body.hub-page {
  overflow-y: auto;
  overflow-x: hidden;
}

.topbar {
  background: linear-gradient(rgba(234, 246, 255, 0.85), rgba(234, 246, 255, 0));
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 4px 22px 4px 6px;
  box-shadow: var(--shadow);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
}

.brand img {
  width: 52px;
  height: 52px;
  animation: wiggle 3s ease-in-out infinite;
}

.brand span {
  background: linear-gradient(90deg, var(--pink-deep), var(--lav-deep), var(--sky-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sparkles img {
  position: fixed;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: auto;
  aspect-ratio: 1;
  opacity: 0.85;
  pointer-events: none;
  animation: twinkle 3.2s ease-in-out infinite;
  animation-delay: var(--d);
  z-index: 0;
}

.hub {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.4vh, 26px);
  padding: 96px 24px 40px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-title {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  color: var(--ink);
  text-shadow: 0 3px 0 #fff, 0 6px 14px rgba(61, 58, 92, 0.12);
}

.hero-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.hero-mascot {
  width: clamp(110px, 15vw, 170px);
  height: auto;
  aspect-ratio: 1;
  animation: bob 2.6s ease-in-out infinite;
  filter: drop-shadow(0 10px 12px rgba(61, 58, 92, 0.2));
}

.hero .bubble {
  margin-bottom: 50px;
}

.groups {
  display: flex;
  gap: clamp(12px, 2.4vw, 28px);
  flex-wrap: wrap;
  justify-content: center;
}

.group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 28px 10px 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 5px solid transparent;
  text-align: left;
  transition: transform 0.25s cubic-bezier(0.2, 1.4, 0.4, 1), background 0.2s, border-color 0.2s;
}

.group img {
  width: clamp(64px, 8vw, 92px);
  height: clamp(64px, 8vw, 92px);
  object-fit: contain;
  filter: drop-shadow(0 6px 6px rgba(61, 58, 92, 0.15));
}

.group-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.group-text b {
  font-size: clamp(22px, 2.6vw, 30px);
}

.group-text small {
  font-size: 16px;
  color: var(--ink-soft);
  font-weight: 700;
}

.group:hover {
  transform: translateY(-4px) rotate(-1deg);
}

.g-small.on {
  background: var(--peach);
  border-color: var(--peach-deep);
  transform: scale(1.06);
}

.g-big.on {
  background: var(--lav);
  border-color: var(--lav-deep);
  transform: scale(1.06);
}

.g-small.on img,
.g-big.on img {
  animation: bob 2s ease-in-out infinite;
}

.cards {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.card {
  --bg: var(--mint);
  --deep: var(--mint-deep);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border-radius: 34px;
  padding: 14px 14px 18px;
  box-shadow: var(--shadow);
  border: 5px solid var(--bg);
  animation: card-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) backwards;
  animation-delay: calc(var(--i) * 0.05s);
  transition: transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1), border-color 0.2s;
}

.card.tint-mint { --bg: var(--mint); --deep: var(--mint-deep); }
.card.tint-peach { --bg: var(--peach); --deep: var(--peach-deep); }
.card.tint-sky { --bg: var(--sky); --deep: var(--sky-deep); }
.card.tint-butter { --bg: var(--butter); --deep: var(--butter-deep); }
.card.tint-lav { --bg: var(--lav); --deep: var(--lav-deep); }
.card.tint-pink { --bg: var(--pink); --deep: var(--pink-deep); }

.card:hover,
.card:focus-visible {
  transform: translateY(-8px) rotate(-1.5deg);
  border-color: var(--deep);
  outline: none;
}

.card:nth-child(even):hover,
.card:nth-child(even):focus-visible {
  transform: translateY(-8px) rotate(1.5deg);
}

.card-art {
  width: 100%;
  height: clamp(110px, 16vh, 140px);
  display: grid;
  place-items: center;
  background: var(--bg);
  border-radius: 26px;
}

.card-art img {
  max-height: 86%;
  max-width: 80%;
  filter: drop-shadow(0 8px 8px rgba(61, 58, 92, 0.15));
  transition: transform 0.25s ease;
}

.card:hover .card-art img {
  transform: scale(1.1) rotate(-4deg);
}

.card-art .tint-balloon {
  width: 60%;
  height: 86%;
}

.card-art.letters {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.card-art.letters span {
  width: 50px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.12);
}

.card-art.letters span:nth-child(1) {
  background: var(--pink-deep);
  transform: rotate(-8deg);
}

.card-art.letters span:nth-child(2) {
  background: var(--sky-deep);
  transform: translateY(-8px);
}

.card-art.letters span:nth-child(3) {
  background: var(--mint-deep);
  transform: rotate(8deg);
}

.card-title {
  font-size: clamp(21px, 2.2vw, 26px);
  font-weight: 800;
  margin-top: 10px;
  text-align: center;
  line-height: 1.15;
}

.card-sub {
  font-size: 16px;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 2px;
}

.card-play {
  margin-top: 10px;
  padding: 4px 22px;
  border-radius: 999px;
  background: var(--deep);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
}

.all-games {
  position: relative;
  z-index: 1;
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 24px auto 40px;
  padding: 26px clamp(18px, 3vw, 40px) 22px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 40px;
  border: 5px solid var(--butter);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px clamp(16px, 2.4vw, 28px);
  user-select: text;
  -webkit-user-select: text;
}

.all-heading,
.all-intro,
.all-note {
  grid-column: 1 / -1;
  margin: 0;
}

.all-heading {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.all-intro {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
  max-width: 900px;
  justify-self: center;
}

.all-group {
  border-radius: 28px;
  padding: 16px 20px 18px;
}

.all-be-5-6 {
  background: var(--peach);
}

.all-be-6-10 {
  background: var(--lav);
}

.all-group h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  scroll-margin-top: 100px;
}

.all-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.all-group li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 8px 16px;
}

.all-group a {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-soft);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.all-group a:hover,
.all-group a:focus-visible {
  color: #7a5fd0;
  text-decoration-color: currentColor;
}

.all-group span {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
}

.all-note {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
}

@keyframes card-in {
  from {
    transform: translateY(24px) scale(0.85);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes twinkle {
  0%,
  100% {
    transform: scale(1) rotate(0);
    opacity: 0.85;
  }
  50% {
    transform: scale(0.75) rotate(14deg);
    opacity: 0.5;
  }
}

@media (max-width: 640px) {
  .brand span {
    display: none;
  }
  .group {
    padding-right: 18px;
  }
  .all-games {
    grid-template-columns: minmax(0, 1fr);
    width: calc(100% - 28px);
    border-radius: 30px;
  }
}

.all-games li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
}

.card-art img {
  width: auto;
  height: 80%;
  max-height: none;
  max-width: 82%;
  object-fit: contain;
}

.group img,
.hero-mascot,
.brand img {
  object-fit: contain;
}
