/* ==========================================================================
   Look & feel: bright cartoon shapes (thick ink outlines, sticker shadows,
   bouncy motion) on a dark neon-arcade night. Colors and fonts live here.
   ========================================================================== */

:root {
  --ink: #1a0b3b;
  --night: #120827;
  --panel: #2a1760;
  --panel-hi: #3a2188;
  --text: #fff7ff;
  --muted: #c4b5ef;
  --pink: #ff3ea5;
  --cyan: #2ef2ff;
  --lime: #b8ff3c;
  --yellow: #ffd23f;
  --orange: #ff8a3d;
  --purple: #9b5cff;
  --display: 'Lilita One', 'Fredoka', system-ui, sans-serif;
  --body: 'Fredoka', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: 20px;
  --max: 1280px;
  --panel-bg: linear-gradient(160deg, #3a1d86 0%, #251160 100%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--text);
  background: var(--night);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 12px; }
[hidden] { display: none !important; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Night sky ---------- */

.sky {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(255, 62, 165, .30), transparent 62%),
    radial-gradient(900px 640px at -12% 28%, rgba(46, 242, 255, .16), transparent 62%),
    radial-gradient(900px 700px at 50% 112%, rgba(155, 92, 255, .38), transparent 62%),
    linear-gradient(180deg, #1a0b3d 0%, #120827 48%, #0c051d 100%);
}
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- Sticker text (thick outline + drop) ---------- */

.sticker { position: relative; display: inline-block; line-height: 1.02; }
.sticker::before {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: var(--ink);
  -webkit-text-stroke: .2em var(--ink);
  text-shadow: 0 .1em 0 var(--ink);
}
.sticker > span {
  position: relative;
  background: var(--fill, linear-gradient(180deg, #ffffff 0%, #f3e6ff 100%));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.sticker.yellow { --fill: linear-gradient(180deg, #fff7a8 0%, #ffd23f 52%, #ff9f2b 100%); filter: drop-shadow(0 0 18px rgba(255, 190, 60, .35)); }
.sticker.pink { --fill: linear-gradient(180deg, #ffc2e3 0%, #ff4fb0 50%, #e0198a 100%); filter: drop-shadow(0 0 22px rgba(255, 62, 165, .55)); }
.sticker.cyan { --fill: linear-gradient(180deg, #e2feff 0%, #5ff7ff 50%, #14b8d6 100%); filter: drop-shadow(0 0 22px rgba(46, 242, 255, .45)); }

/* ---------- Buttons, pills, chips ---------- */

.btn {
  --bg: var(--yellow); --fg: var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 4px solid var(--ink);
  background: var(--bg); color: var(--fg);
  font-family: var(--display); font-size: 18px; letter-spacing: .3px; line-height: 1;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform .15s var(--bounce), box-shadow .15s;
}
.btn::after {
  content: ''; position: absolute; z-index: -1;
  top: 4px; left: 14px; width: 34%; height: 32%;
  border-radius: 999px; background: rgba(255, 255, 255, .5);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--ink), 0 0 26px color-mix(in srgb, var(--bg) 75%, transparent); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-lg { font-size: 21px; padding: 15px 28px; }
.btn-sm { font-size: 16px; padding: 9px 16px; border-width: 3px; box-shadow: 0 4px 0 var(--ink); }
.btn-pink { --bg: var(--pink); --fg: #fff; }
.btn-cyan { --bg: var(--cyan); }
.btn-ghost { --bg: var(--panel-hi); --fg: #fff; }
.btn-ghost::after { background: rgba(255, 255, 255, .14); }
.btn.rolling { pointer-events: none; }
.btn.rolling span { overflow: hidden; text-overflow: ellipsis; }
.btn.rolling svg { animation: spin .5s linear infinite; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 2px solid rgba(255, 255, 255, .16);
  font-weight: 600; font-size: 14px; color: #fff;
}
.pill svg { width: 16px; height: 16px; color: var(--yellow); }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: blinkDot 1.6s ease-in-out infinite; }
.pill-yellow { background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); font-family: var(--display); font-weight: 400; font-size: 15px; box-shadow: 0 3px 0 var(--ink); }
.pill-yellow svg { color: var(--ink); }

.round-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--panel-hi); color: #fff;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .15s var(--bounce), background .2s, opacity .2s;
}
.round-btn:hover { transform: translateY(-2px); background: var(--purple); }
.round-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.round-btn:disabled { opacity: .3; cursor: default; transform: none; background: var(--panel-hi); }
.round-btn svg { width: 20px; height: 20px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 7px 15px 7px 9px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--panel-hi); color: #fff;
  font-weight: 600; font-size: 15px; text-decoration: none;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .15s var(--bounce), background .2s;
}
.chip svg { width: 26px; height: 26px; }
.chip:hover { transform: translateY(-2px); background: #4a2aa6; }
.chip.on { background: var(--yellow); color: var(--ink); }

/* ---------- Header ---------- */

.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(18, 8, 39, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 3px solid var(--ink);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 51; background: #120827; }
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--yellow), var(--lime), var(--cyan), var(--purple), var(--pink));
  background-size: 200% 100%;
  animation: rainbow 8s linear infinite;
  box-shadow: 0 0 14px rgba(255, 62, 165, .6);
}
.topbar-inner { max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 14px; }

.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; flex: none; }
.logo-mascot { width: 46px; }
.logo:hover .logo-mascot { animation: wobble .6s var(--bounce); }
.wordmark { font-family: var(--display); font-size: 31px; letter-spacing: .5px; --fill: linear-gradient(180deg, #fff7a8 0%, #ffd23f 45%, #ff4fb0 100%); filter: drop-shadow(0 0 12px rgba(255, 62, 165, .45)); }

.search { position: relative; flex: 1; max-width: 560px; margin: 0 auto; }
.search input {
  width: 100%; height: 48px;
  padding: 0 44px 0 48px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: #2a1760; color: #fff;
  font: 500 16px var(--body);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .25), 0 0 0 0 transparent;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: #a594dd; }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(46, 242, 255, .22), 0 0 26px rgba(46, 242, 255, .35); }
.search-ico { position: absolute; left: 17px; top: 50%; translate: 0 -50%; width: 20px; color: var(--muted); pointer-events: none; }
.slash { position: absolute; right: 12px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(255, 255, 255, .2); color: var(--muted); font: 600 13px var(--body); }
.search input:focus ~ .slash { opacity: 0; }

.search-results {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  display: none; max-height: min(440px, 70vh); overflow: auto;
  padding: 8px;
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 8px 0 var(--ink), 0 24px 48px rgba(0, 0, 0, .45);
}
.search-results.open { display: block; animation: pop .3s var(--bounce); }
.result { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; text-decoration: none; }
.result:hover, .result.sel { background: rgba(255, 255, 255, .09); }
.result .mini { width: 72px; flex: none; aspect-ratio: 16 / 10; border-radius: 10px; border: 2px solid var(--ink); overflow: hidden; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.result .mini svg { width: 100%; height: 100%; }
.r-text { display: grid; min-width: 0; }
.r-text b { font-family: var(--display); font-weight: 400; font-size: 17px; }
.r-text small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.no-results { display: flex; align-items: center; gap: 12px; padding: 10px; color: var(--muted); font-weight: 600; }
.no-results .mascot { width: 54px; flex: none; }

.fav-link { color: var(--pink); }
.fav-link:hover { color: #fff; background: var(--pink); }

.me {
  display: flex; align-items: center; gap: 9px; flex: none;
  padding: 3px 14px 3px 4px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--panel-hi);
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .15s var(--bounce);
}
.me:hover { transform: translateY(-2px); }
.me-avatar { width: 36px; margin-top: -3px; }
.me-text { display: grid; gap: 4px; text-align: left; }
.me-text b { font-family: var(--display); font-weight: 400; font-size: 15px; line-height: 1; }
.me-xp { display: block; width: 66px; height: 7px; border-radius: 9px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.me-xp i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--lime), var(--cyan)); transition: width .6s var(--bounce); }

/* ---------- Hero ---------- */

.hero { max-width: var(--max); margin: 26px auto 0; padding: 0 var(--gutter); }
.hero-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1.04fr 1fr; gap: 34px; align-items: center;
  padding: 40px 48px 50px;
  border-radius: 36px;
  border: 4px solid var(--ink);
  background:
    radial-gradient(600px 400px at 80% 30%, rgba(255, 62, 165, .35), transparent 70%),
    linear-gradient(160deg, #3d1b91 0%, #26105f 55%, #1a0a47 100%);
  box-shadow: 0 10px 0 var(--ink), 0 30px 90px rgba(155, 92, 255, .35);
}
.hero-floor {
  position: absolute; z-index: -1;
  left: -30%; right: -30%; bottom: -26%; height: 62%;
  background-image:
    linear-gradient(rgba(46, 242, 255, .7) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 62, 165, .7) 2px, transparent 2px);
  background-size: 56px 56px;
  transform: perspective(360px) rotateX(62deg);
  transform-origin: top center;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  opacity: .42;
  animation: floor 1.4s linear infinite;
}
.hero-sun {
  position: absolute; z-index: -1;
  right: 9%; top: 4%;
  width: min(380px, 40%); aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff27a 0%, #ffb13b 38%, #ff4fb0 72%, #b22bd6 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0 50%, transparent 50% 54%, #000 54% 62%, transparent 62% 67%, #000 67% 74%, transparent 74% 80%, #000 80% 86%, transparent 86% 93%, #000 93%);
  mask-image: linear-gradient(to bottom, #000 0 50%, transparent 50% 54%, #000 54% 62%, transparent 62% 67%, #000 67% 74%, transparent 74% 80%, #000 80% 86%, transparent 86% 93%, #000 93%);
  opacity: .9;
}
.deco { position: absolute; z-index: 0; width: 34px; animation: float 6s ease-in-out infinite; pointer-events: none; }

.hero-card > * { min-width: 0; }
.hero-copy { position: relative; z-index: 1; }
.headline { margin: 18px 0 16px; font-family: var(--display); }
.headline .line { display: block; animation: popIn .7s var(--bounce) backwards; font-size: clamp(46px, 6.4vw, 86px); }
.headline .line.small { font-size: clamp(26px, 3.2vw, 40px); color: #fff; text-shadow: 0 4px 0 var(--ink); margin-bottom: 6px; }
.headline .line:nth-child(2) { animation-delay: .08s; }
.headline .line:nth-child(3) { animation-delay: .16s; }
.headline .wiggle { transform-origin: 20% 80%; animation: popIn .7s var(--bounce) .16s backwards, wiggle 3.6s ease-in-out 1.4s infinite; }
.lead { max-width: 470px; color: rgba(255, 255, 255, .88); font-size: 19px; line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; }
.hero-stats div { display: grid; }
.hero-stats b { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; text-shadow: 0 3px 0 var(--ink); }
.hero-stats span { color: var(--muted); font-size: 14px; font-weight: 600; }

.feature { position: relative; z-index: 1; padding-top: 54px; }
.feature .peek { position: absolute; z-index: 0; top: 0; left: 36px; width: 104px; animation: peek 5s ease-in-out infinite; transform-origin: bottom center; }
.feature-frame {
  position: relative; z-index: 1; display: block;
  aspect-ratio: 16 / 10;
  border-radius: 26px;
  border: 4px solid var(--ink);
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 10px 0 var(--ink), 0 0 0 8px rgba(255, 255, 255, .06), 0 0 60px color-mix(in srgb, var(--accent) 55%, transparent);
  overflow: hidden;
  transform: rotate(2deg);
  transition: transform .5s var(--bounce), box-shadow .4s;
}
.feature-frame::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .16) 1.6px, transparent 2px); background-size: 16px 16px; }
.feature-frame svg { position: relative; width: 100%; height: 100%; }
.feature-frame.swap svg { animation: artIn .65s var(--bounce); }
.feature:hover .feature-frame { transform: rotate(0deg) scale(1.02); }
.feature-ribbon {
  position: absolute; z-index: 2; top: 40px; right: -8px;
  padding: 6px 14px 5px;
  border-radius: 12px; border: 3px solid var(--ink);
  background: var(--lime); color: var(--ink);
  font-family: var(--display); font-size: 17px;
  box-shadow: 0 4px 0 var(--ink);
  transform: rotate(9deg);
}
.feature-cap {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 14px;
  margin: -28px 22px 0;
  padding: 12px 14px 12px 18px;
  border-radius: 22px; border: 4px solid var(--ink);
  background: var(--panel);
  box-shadow: 0 6px 0 var(--ink);
}
.feature-text { min-width: 0; }
.feature-cap h3 { font-family: var(--display); font-size: 25px; line-height: 1.1; margin-top: 4px; }
.feature-cap p { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-cap .btn { margin-left: auto; flex: none; }
.feature-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.feature-dots button { position: relative; width: 36px; height: 11px; padding: 0; border-radius: 99px; border: 2px solid var(--ink); background: rgba(255, 255, 255, .2); overflow: hidden; }
.feature-dots button.on::after { content: ''; position: absolute; inset: 0; background: var(--yellow); transform-origin: left; animation: fillbar 6s linear forwards; }
.feature:hover .feature-dots button.on::after { animation-play-state: paused; }

/* ---------- Ticker ---------- */

.ticker {
  margin: 34px -10px 0;
  padding: 10px 0 9px;
  overflow: hidden;
  background: var(--yellow);
  border-block: 4px solid var(--ink);
  transform: rotate(-1.2deg);
  box-shadow: 0 6px 0 var(--ink), 0 0 30px rgba(255, 210, 63, .3);
}
.ticker-track { display: flex; align-items: center; width: max-content; animation: ticker 38s linear infinite; }
.ticker span { font-family: var(--display); font-size: 20px; color: var(--ink); padding: 0 18px; white-space: nowrap; }
.ticker b { color: var(--pink); font-size: 20px; -webkit-text-stroke: 1.5px var(--ink); }

/* ---------- Category tiles ---------- */

.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 44px; }
.cat {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: 22px; border: 4px solid var(--ink);
  background: var(--cc); color: var(--ink);
  box-shadow: 0 6px 0 var(--ink);
  font-family: var(--display); font-size: 21px; line-height: 1.05;
  text-decoration: none;
  transition: transform .25s var(--bounce), box-shadow .25s;
}
.cat::after { content: ''; position: absolute; top: -40%; left: -60%; width: 40%; height: 180%; background: rgba(255, 255, 255, .35); transform: rotate(20deg); transition: left .5s ease; }
.cat:hover { transform: translateY(-5px) rotate(-1.5deg); box-shadow: 0 11px 0 var(--ink), 0 0 34px var(--cc); }
.cat:nth-child(even):hover { transform: translateY(-5px) rotate(1.5deg); }
.cat:hover::after { left: 130%; }
.cat-ico { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 16px; border: 3px solid var(--ink); background: rgba(255, 255, 255, .6); }
.cat-ico svg { width: 40px; }
.cat:hover .cat-ico svg { animation: wobble .6s var(--bounce); }
.cat-text small { display: block; margin-top: 3px; font-family: var(--body); font-weight: 600; font-size: 13px; opacity: .72; }

/* ---------- Sections & shelves ---------- */

.sec { margin-top: 50px; scroll-margin-top: 90px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: clamp(25px, 3vw, 33px); text-shadow: 0 3px 0 var(--ink); }
.sec-head h2 small { font-family: var(--body); font-size: 16px; font-weight: 600; color: var(--muted); text-shadow: none; }
.sec-ico { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 13px; border: 3px solid var(--ink); background: var(--hc); color: var(--ink); box-shadow: 0 3px 0 var(--ink); transform: rotate(-7deg); }
.sec-ico svg { width: 24px; height: 24px; }
.sec-tools { display: flex; align-items: center; gap: 14px; }
.more { display: inline-flex; align-items: center; gap: 2px; color: var(--cyan); font-weight: 600; text-decoration: none; white-space: nowrap; }
.more svg { width: 18px; height: 18px; transition: transform .2s; }
.more:hover svg { transform: translateX(4px); }
.shelf-nav { display: flex; gap: 8px; }

.shelf {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4 * 18px) / 5);
  gap: 18px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 10px 6px 26px; margin: -10px -6px -16px;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf > * { scroll-snap-align: start; }

.band {
  padding: 22px 24px 18px;
  border-radius: 30px; border: 4px solid var(--ink);
  background:
    linear-gradient(rgba(46, 242, 255, .08) 1.5px, transparent 1.5px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(46, 242, 255, .08) 1.5px, transparent 1.5px) 0 0 / 34px 34px,
    linear-gradient(160deg, #0f3a6e 0%, #15124f 60%, #1b0c45 100%);
  box-shadow: 0 8px 0 var(--ink), 0 0 50px rgba(46, 242, 255, .2);
}
.band .shelf { grid-auto-columns: calc((100% - 3 * 18px) / 4); }

/* ---------- Game cards ---------- */

.card {
  position: relative;
  border-radius: 22px; border: 4px solid var(--ink);
  background: var(--panel);
  box-shadow: 0 7px 0 var(--ink);
  transition: transform .3s var(--bounce), box-shadow .3s;
}
.card:hover { transform: translateY(-7px) rotate(-1.2deg); box-shadow: 0 13px 0 var(--ink), 0 0 0 3px var(--accent), 0 0 34px color-mix(in srgb, var(--accent) 65%, transparent); }
.card:nth-child(even):hover { transform: translateY(-7px) rotate(1.2deg); }
.card-link { display: block; text-decoration: none; border-radius: 18px; overflow: hidden; }
.thumb { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--c1), var(--c2)); border-bottom: 4px solid var(--ink); overflow: hidden; }
.thumb::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .17) 1.5px, transparent 2px); background-size: 14px 14px; }
.thumb svg { position: relative; width: 100%; height: 100%; transition: transform .45s var(--bounce); }
.card:hover .thumb svg { transform: scale(1.09) rotate(-1deg); }
.soon-chip { position: absolute; z-index: 2; right: 10px; bottom: 10px; padding: 3px 9px 2px; border-radius: 8px; background: rgba(26, 11, 59, .78); color: #fff; font-family: var(--display); font-size: 12px; letter-spacing: .4px; }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(18, 8, 39, .45), transparent 70%); opacity: 0; transition: opacity .25s; }
.thumb .play i { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; border: 4px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 var(--ink); transform: scale(.4) rotate(-30deg); transition: transform .35s var(--bounce); }
.thumb .play svg { width: 26px; height: 26px; margin-left: 3px; transform: none !important; }
.card:hover .play { opacity: 1; }
.card:hover .play i { transform: scale(1) rotate(0); }
.meta { padding: 11px 14px 14px; }
.meta h3 { font-family: var(--display); font-size: 20px; letter-spacing: .3px; line-height: 1.15; color: #fff; }
.meta p { margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.badges { position: absolute; z-index: 2; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.badges.static { position: static; }
.b {
  padding: 3px 9px 2px;
  border-radius: 8px; border: 2.5px solid var(--ink);
  background: #fff; color: var(--ink);
  font-family: var(--display); font-size: 12.5px; letter-spacing: .6px; line-height: 1.25;
  box-shadow: 0 2.5px 0 var(--ink);
  text-decoration: none;
}
.b-pink { background: var(--pink); color: #fff; }
.b-cyan { background: var(--cyan); }
.b-orange { background: var(--orange); }
.b-lime { background: var(--lime); }
.b-yellow { background: var(--yellow); }
.b-cat { background: var(--panel-hi); color: #fff; }

.heart {
  position: absolute; z-index: 3; top: 8px; right: 8px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  padding: 0;
  border-radius: 50%; border: 3px solid var(--ink);
  background: #fff; color: #e2d8fb;
  box-shadow: 0 3px 0 var(--ink);
  opacity: 0; transform: scale(.6);
  transition: transform .25s var(--bounce), opacity .2s, color .2s;
}
.heart svg { width: 22px; height: 22px; }
.card:hover .heart, .card:focus-within .heart, .heart.on { opacity: 1; transform: none; }
.heart:hover { transform: scale(1.14) rotate(-8deg) !important; }
.heart.on { color: var(--pink); }
.heart.pop { animation: heartPop .5s var(--bounce); }
.heart.inline { position: static; opacity: 1; transform: none; width: 44px; height: 44px; box-shadow: 0 4px 0 var(--ink); }
@media (hover: none) { .heart { opacity: 1; transform: none; } }

/* ---------- Grid of every game ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 22px 20px; }
.grid .card { animation: cardIn .5s var(--bounce) backwards; animation-delay: calc(min(var(--i), 14) * 35ms); }
.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 40px 20px 20px; text-align: center; }
.empty .mascot { width: 120px; }
.empty h3 { font-family: var(--display); font-size: 28px; }
.empty p { color: var(--muted); margin-bottom: 8px; }

/* ---------- "Made for playing together" ---------- */

.friends { margin-top: 64px; text-align: center; }
.friends-head h2 { margin-top: 14px; font-family: var(--display); font-size: clamp(34px, 4.8vw, 58px); }
.friends-head p { max-width: 640px; margin: 14px auto 0; color: var(--muted); font-size: 18px; line-height: 1.45; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 30px; text-align: left; }
.mode {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 16px 16px 22px;
  border-radius: 28px; border: 4px solid var(--ink);
  background: linear-gradient(170deg, var(--m1), var(--m2));
  box-shadow: 0 8px 0 var(--ink);
  text-decoration: none;
  transition: transform .3s var(--bounce), box-shadow .3s;
}
a.mode:hover { transform: translateY(-7px) rotate(-.8deg); box-shadow: 0 14px 0 var(--ink), 0 0 40px color-mix(in srgb, var(--m1) 70%, transparent); }
.mode-art { align-self: stretch; height: 160px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 20px; border: 3px solid var(--ink); background: rgba(12, 5, 32, .35); overflow: hidden; }
.mode-art svg { width: 100%; height: 100%; }
.keys-art { display: flex; align-items: center; justify-content: center; gap: 10px; container-type: inline-size; }
.keys-art .keyt { --k: clamp(20px, 9cqi, 38px); grid-template-columns: repeat(3, var(--k)); grid-template-rows: var(--k) var(--k); gap: 4px; }
.keys-art .key { min-width: var(--k); height: var(--k); padding: 0; font-size: calc(var(--k) * .45); border-width: 2.5px; box-shadow: 0 3px 0 var(--ink); }
.keys-art .vs { font-family: var(--display); font-size: clamp(22px, 10cqi, 34px); color: var(--yellow); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); transform: rotate(-8deg); }
a.mode:hover .keys-art .key:nth-child(odd) { animation: keyTap .5s ease-in-out infinite alternate; }
.mode h3 { font-family: var(--display); font-size: 27px; text-shadow: 0 3px 0 var(--ink); }
.mode p { margin: 6px 0 16px; color: rgba(255, 255, 255, .9); line-height: 1.4; flex: 1; }
.mode .soon {
  position: absolute; z-index: 2; top: 18px; right: -42px;
  padding: 5px 46px 4px;
  background: var(--yellow); color: var(--ink);
  border-block: 3px solid var(--ink);
  font-family: var(--display); font-size: 15px;
  transform: rotate(35deg);
}

/* ---------- Keycaps ---------- */

.key {
  display: inline-grid; place-items: center;
  min-width: 38px; height: 38px; padding: 0 8px;
  border-radius: 10px; border: 3px solid var(--ink);
  background: #fff; color: var(--ink);
  font-family: var(--display); font-size: 17px; line-height: 1;
  box-shadow: 0 4px 0 var(--ink);
}
.key.p1 { background: var(--pink); color: #fff; }
.key.p2 { background: var(--cyan); }
.key.wide { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 15px; }
.key.wide svg { width: 18px; height: 18px; }
.keyt { display: inline-grid; grid-template-columns: repeat(3, 38px); grid-template-rows: 38px 38px; gap: 6px; }
.keyt .key:nth-child(1) { grid-area: 1 / 2; }
.keyt .key:nth-child(2) { grid-area: 2 / 1; }
.keyt .key:nth-child(3) { grid-area: 2 / 2; }
.keyt .key:nth-child(4) { grid-area: 2 / 3; }

/* ---------- Daily Zap & profile ---------- */

.duo { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; margin-top: 56px; }
.panel {
  position: relative; overflow: hidden;
  padding: 24px;
  border-radius: 30px; border: 4px solid var(--ink);
  background: var(--panel-bg);
  box-shadow: 0 8px 0 var(--ink);
  scroll-margin-top: 90px;
}
.panel-title { margin-top: 12px; font-family: var(--display); font-size: 28px; text-shadow: 0 3px 0 var(--ink); }
.panel-text { margin-top: 6px; color: rgba(255, 255, 255, .85); line-height: 1.45; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.daily { display: grid; grid-template-columns: 170px 1fr; gap: 24px; align-items: center; background: radial-gradient(circle at 0% 0%, rgba(255, 210, 63, .32), transparent 55%), var(--panel-bg); }
.daily-art svg { width: 100%; animation: float 4.5s ease-in-out infinite; --r: -4deg; }
.countdown { display: flex; align-items: center; gap: 8px; margin: 16px 0 18px; }
.countdown span { display: grid; justify-items: center; min-width: 66px; padding: 8px 6px 6px; border-radius: 16px; border: 3px solid rgba(255, 255, 255, .12); background: var(--ink); }
.countdown b { font-family: var(--display); font-weight: 400; font-size: 31px; line-height: 1; color: var(--yellow); text-shadow: 0 0 14px rgba(255, 210, 63, .6); font-variant-numeric: tabular-nums; }
.countdown small { margin-top: 3px; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.countdown i { font-style: normal; font-family: var(--display); font-size: 26px; color: var(--muted); }
.streak { font-weight: 600; color: var(--muted); }

.profile { display: grid; grid-template-columns: 136px 1fr; gap: 22px; align-items: center; background: radial-gradient(circle at 100% 0%, rgba(46, 242, 255, .25), transparent 55%), var(--panel-bg); }
.avatar-btn { display: grid; justify-items: center; gap: 4px; padding: 0; border: 0; background: none; transition: transform .3s var(--bounce); }
.avatar-btn .mascot { width: 128px; filter: drop-shadow(0 6px 0 var(--ink)); }
.avatar-btn:hover { transform: scale(1.06) rotate(-4deg); }
.avatar-btn.boing { animation: boing .55s var(--bounce); }
.avatar-btn small { font-size: 12px; font-weight: 600; color: var(--muted); }
.lvl-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-weight: 600; color: var(--muted); }
.lvl-badge { padding: 4px 10px 3px; border-radius: 10px; border: 3px solid var(--ink); background: var(--lime); color: var(--ink); font-family: var(--display); font-size: 15px; box-shadow: 0 3px 0 var(--ink); }
.xpbar { height: 18px; margin: 10px 0 4px; border-radius: 99px; border: 3px solid var(--ink); background: rgba(0, 0, 0, .4); overflow: hidden; }
.xpbar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--lime), var(--cyan)); box-shadow: 0 0 14px var(--cyan); }
.medals { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.medal { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .06); font-size: 21px; }
.medal > span { filter: grayscale(1); opacity: .4; }
.medal.on { border: 3px solid var(--yellow); background: rgba(255, 210, 63, .18); box-shadow: 0 0 14px rgba(255, 210, 63, .45); }
.medal.on > span { filter: none; opacity: 1; }
.medal:hover::after, .medal:focus::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  padding: 5px 10px; border-radius: 9px;
  background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}

/* ---------- Category page ---------- */

.catbar { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; padding: 22px 4px 10px; margin: 0 -4px; }
.catbar::-webkit-scrollbar { display: none; }
.cat-hero {
  display: flex; align-items: center; gap: 22px;
  margin: 16px 0 28px; padding: 24px 28px;
  border-radius: 30px; border: 4px solid var(--ink);
  background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--cc) 45%, transparent), transparent 60%), var(--panel-bg);
  box-shadow: 0 8px 0 var(--ink);
}
.cat-hero-ico { width: 88px; height: 88px; flex: none; display: grid; place-items: center; border-radius: 24px; border: 4px solid var(--ink); background: var(--cc); box-shadow: 0 5px 0 var(--ink); transform: rotate(-7deg); }
.cat-hero-ico svg { width: 62px; }
.cat-hero h1 { font-family: var(--display); font-size: clamp(32px, 5vw, 54px); text-shadow: 0 4px 0 var(--ink); }
.cat-hero p { margin-top: 4px; color: var(--muted); font-size: 17px; }
.cat-hero .count { margin-left: auto; flex: none; padding: 8px 16px; border-radius: 99px; background: var(--ink); color: var(--cc); font-family: var(--display); font-size: 20px; }

/* ---------- Info pages (About us, For parents, Privacy, Contact) ---------- */

.prose { max-width: 860px; padding: 30px clamp(20px, 4vw, 40px) 34px; font-size: 17px; line-height: 1.6; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 30px 0 8px; font-family: var(--display); font-size: 25px; line-height: 1.15; color: var(--yellow); text-shadow: 0 3px 0 var(--ink); text-wrap: balance; }
.prose p { max-width: 68ch; color: rgba(255, 255, 255, .88); }
.prose p + p { margin-top: 12px; }
.prose a:not(.btn) { color: var(--cyan); font-weight: 600; text-underline-offset: 3px; }
.prose a:not(.btn):hover { color: #fff; }
.prose b { color: #fff; font-weight: 600; }
.prose .updated { margin-bottom: 22px; font-size: 13px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.prose .facts { flex-wrap: wrap; gap: 16px 34px; margin: 24px 0 4px; }
.checks { display: grid; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.checks li { position: relative; max-width: 68ch; padding-left: 42px; color: rgba(255, 255, 255, .88); }
.checks li::before {
  content: ''; position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--ink);
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a0b3b' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.email-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px 18px; padding: 18px 20px; border-radius: 22px; border: 3px solid var(--ink); background: rgba(0, 0, 0, .28); }
.email-ico { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; border: 3px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 var(--ink); transform: rotate(-6deg); }
.email-ico svg { width: 30px; height: 30px; }
.email-text { display: grid; min-width: 0; }
.email-card .row { grid-column: 1 / -1; gap: 12px; }
.email-text small { font-size: 13px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.email-addr { font-family: var(--display); font-weight: 400; font-size: clamp(19px, 3vw, 26px); color: #fff; overflow-wrap: anywhere; user-select: all; }

/* ---------- Game page ---------- */

.game-top { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; margin-top: 16px; }
.cabinet {
  padding: 14px;
  border-radius: 30px; border: 4px solid var(--ink);
  background: linear-gradient(180deg, #3d1d8c, #22104f);
  box-shadow: 0 10px 0 var(--ink), 0 0 50px color-mix(in srgb, var(--accent) 35%, transparent);
}
.marquee {
  position: relative; display: grid; place-items: center;
  height: 58px; margin-bottom: 12px;
  border-radius: 18px; border: 3px solid var(--ink);
  background:
    radial-gradient(circle at 8px 50%, #ffe680 3px, transparent 4px) 0 4px / 18px 10px repeat-x,
    radial-gradient(circle at 8px 50%, #ffe680 3px, transparent 4px) 9px calc(100% - 4px) / 18px 10px repeat-x,
    #160831;
  animation: chase .6s steps(2) infinite;
  overflow: hidden;
}
.marquee span { font-family: var(--display); font-size: 26px; letter-spacing: 1px; color: #fff3b0; text-shadow: 0 0 8px var(--orange), 0 0 22px var(--pink); }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; border: 4px solid var(--ink); background: linear-gradient(135deg, var(--c1), var(--c2)); overflow: hidden; }
.screen-art { position: absolute; inset: 0; display: grid; place-items: center; }
.screen-art svg { width: 100%; height: 100%; }
.game-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #120827; }
.screen.playing { background: #120827; }
.screen:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; border: 0; border-radius: 0; }
.scanlines { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(rgba(0, 0, 0, .14) 0 2px, transparent 2px 4px); }
.overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: radial-gradient(circle, rgba(12, 5, 32, .35), rgba(12, 5, 32, .7)); }
.play-big { display: grid; place-items: center; width: 112px; height: 112px; padding: 0; border-radius: 50%; border: 5px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 0 8px 0 var(--ink), 0 0 0 12px rgba(255, 210, 63, .22); animation: pulse 1.8s ease-in-out infinite; transition: transform .2s var(--bounce); }
.play-big svg { width: 50px; height: 50px; margin-left: 6px; }
.play-big:hover { transform: scale(1.08); }
.press { font-family: var(--display); font-size: 20px; color: #fff; text-shadow: 0 3px 0 var(--ink); animation: blinkDot 1.4s ease-in-out infinite; }
.overlay.soon-mode { background: rgba(12, 5, 32, .78); }
.soon-box { display: grid; justify-items: center; gap: 10px; max-width: 440px; padding: 20px; text-align: center; animation: pop .45s var(--bounce); }
.soon-sticker { padding: 6px 16px 5px; border-radius: 12px; border: 3px solid var(--ink); background: var(--lime); color: var(--ink); font-family: var(--display); font-size: 18px; box-shadow: 0 4px 0 var(--ink); transform: rotate(-4deg); }
.soon-box h3 { font-family: var(--display); font-size: 30px; text-shadow: 0 3px 0 var(--ink); }
.soon-box p { color: rgba(255, 255, 255, .85); line-height: 1.45; margin-bottom: 6px; }
.cabinet-bar { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 0 4px; }
.cab-title { display: grid; min-width: 0; }
.cab-title b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.cab-title small { color: var(--muted); font-weight: 600; }
.cab-actions { display: flex; gap: 10px; margin-left: auto; }

.info { padding: 22px 22px 24px; }
.info h1 { margin: 12px 0 8px; font-family: var(--display); font-size: 40px; line-height: 1.05; text-shadow: 0 4px 0 var(--ink); }
.info .desc { color: rgba(255, 255, 255, .88); line-height: 1.5; }
.info h4 { margin: 22px 0 10px; font-family: var(--display); font-size: 20px; color: var(--yellow); }
.howto { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.howto li { counter-increment: step; display: flex; align-items: flex-start; gap: 12px; line-height: 1.4; }
.howto li::before { content: counter(step); flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--ink); background: var(--accent); color: var(--ink); font-family: var(--display); font-size: 14px; }
.ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; padding: 12px; border-radius: 18px; background: rgba(12, 5, 32, .4); }
.ctrl .who { min-width: 70px; font-family: var(--display); font-size: 15px; color: var(--wc); }
.ctrl-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ctrl-keys small { color: var(--muted); font-weight: 600; font-size: 14px; }
.ctrl-keys .plus { font-style: normal; font-family: var(--display); color: var(--muted); }
.ctrl .keyt { grid-template-columns: repeat(3, 32px); grid-template-rows: 32px 32px; gap: 5px; }
.ctrl .key { min-width: 32px; height: 32px; font-size: 15px; box-shadow: 0 3px 0 var(--ink); }
.touch { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.touch svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--cyan); }

/* ---------- Footer ---------- */

.foot { position: relative; margin-top: 110px; background: #0b041a; border-top: 4px solid var(--ink); }
.peekers { position: absolute; left: 0; right: 0; top: -66px; height: 62px; display: flex; justify-content: center; gap: clamp(14px, 4vw, 44px); overflow: hidden; pointer-events: none; }
.peekers .mascot { width: 78px; flex: none; margin-top: 12px; animation: bob 3s ease-in-out infinite; }
.peekers .mascot:nth-child(2) { animation-delay: -.7s; }
.peekers .mascot:nth-child(3) { animation-delay: -1.4s; width: 92px; margin-top: 4px; }
.peekers .mascot:nth-child(4) { animation-delay: -2.1s; }
.peekers .mascot:nth-child(5) { animation-delay: -2.6s; }
.foot-inner { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 24px; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
.foot-brand .wordmark { font-size: 36px; }
.foot-brand p { margin-top: 12px; max-width: 320px; color: var(--muted); line-height: 1.5; }
.foot-col { display: grid; align-content: start; gap: 9px; }
.foot-col h4 { margin-bottom: 4px; font-family: var(--display); font-size: 18px; color: var(--yellow); }
.foot-col a { color: var(--muted); text-decoration: none; font-weight: 500; width: fit-content; }
.foot-col a:hover { color: #fff; }
.foot-bottom { padding: 18px var(--gutter) 26px; border-top: 2px solid rgba(255, 255, 255, .07); text-align: center; color: #8d7cc4; font-size: 14px; }

/* ---------- Mobile tab bar, toast, sparkles ---------- */

.tabbar { display: none; }

.toast {
  position: fixed; z-index: 90; left: 50%; bottom: 28px;
  padding: 12px 22px 11px;
  border-radius: 999px; border: 3px solid var(--ink);
  background: var(--lime); color: var(--ink);
  font-family: var(--display); font-size: 17px; white-space: nowrap;
  box-shadow: 0 5px 0 var(--ink), 0 0 30px rgba(184, 255, 60, .4);
  transform: translate(-50%, 160%); opacity: 0;
  transition: transform .45s var(--bounce), opacity .25s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.spark { position: fixed; z-index: 100; width: 9px; height: 9px; border-radius: 3px; border: 2px solid var(--ink); pointer-events: none; translate: -50% -50%; animation: spark .65s ease-out forwards; }

/* ---------- Mascot eyes ---------- */

.track .eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.peekers .mascot:nth-child(even) .eye { animation-delay: -2.2s; }
.feature .peek .eye { animation-delay: -3.1s; }

/* ---------- Motion ---------- */

@keyframes rainbow { to { background-position: 200% 0; } }
@keyframes floor { to { background-position: 0 56px, 0 0; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-14px) rotate(calc(var(--r, 0deg) + 10deg)); } }
@keyframes popIn { from { opacity: 0; transform: translateY(26px) scale(.9) rotate(-3deg); } }
@keyframes wiggle { 0%, 78%, 100% { transform: none; } 82% { transform: rotate(-4deg) scale(1.05); } 86% { transform: rotate(3deg) scale(1.05); } 90% { transform: rotate(-2deg); } 94% { transform: rotate(1deg); } }
@keyframes peek { 0%, 100% { transform: translateY(16px) rotate(-5deg); } 50% { transform: translateY(0) rotate(4deg); } }
@keyframes artIn { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
@keyframes fillbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg) scale(1.1); } 50% { transform: rotate(9deg); } 75% { transform: rotate(-5deg); } }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(-6px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(20px) scale(.94); } }
@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.4) rotate(-10deg); } 100% { transform: scale(1); } }
@keyframes boing { 0% { transform: scale(1); } 30% { transform: scale(1.18, .84); } 60% { transform: scale(.9, 1.12); } 100% { transform: scale(1); } }
@keyframes keyTap { to { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 8px 0 var(--ink), 0 0 0 10px rgba(255, 210, 63, .22); } 50% { box-shadow: 0 8px 0 var(--ink), 0 0 0 22px rgba(255, 210, 63, .08); } }
@keyframes blinkDot { 50% { opacity: .45; } }
@keyframes chase { to { background-position: 9px 4px, 0 calc(100% - 4px), 0 0; } }
@keyframes bob { 0%, 100% { transform: translateY(10px); } 50% { transform: translateY(0); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) rotate(200deg) scale(.3); opacity: 0; } }

/* ---------- Smaller screens ---------- */

@media (max-width: 1100px) {
  .shelf { grid-auto-columns: calc((100% - 3 * 18px) / 4); }
  .band .shelf { grid-auto-columns: calc((100% - 2 * 18px) / 3); }
  .cats { grid-template-columns: repeat(5, minmax(168px, 1fr)); gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 4px 4px 14px; margin-left: -4px; margin-right: -4px; }
  .cats::-webkit-scrollbar { display: none; }
}

@media (max-width: 960px) {
  .hero-card { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 34px 32px 40px; }
  .hero-sun { right: -6%; top: 46%; width: 340px; }
  .feature { max-width: 560px; width: 100%; margin: 0 auto; }
  .duo { grid-template-columns: 1fr; }
  .game-top { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr 1fr; }
  .modes .mode:last-child { grid-column: 1 / -1; }
  .foot-inner { grid-template-columns: 1fr 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { padding-bottom: 92px; }
  .topbar-inner { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
  .logo-mascot { width: 38px; }
  .wordmark { font-size: 25px; }
  .fav-link, .slash, .me-text { display: none; }
  .me { padding: 3px; }
  .search input { height: 44px; padding-right: 16px; padding-left: 42px; font-size: 15px; }
  .search-ico { left: 15px; }
  .hero { margin-top: 16px; }
  .hero-card { padding: 26px 20px 30px; border-radius: 28px; }
  .headline { margin: 14px 0 12px; }
  .lead { font-size: 17px; }
  .hero-actions { gap: 12px; }
  .hero-actions .btn-lg { font-size: 18px; padding: 13px 20px; flex: 1 1 210px; }
  .hero-stats { gap: 22px; margin-top: 22px; }
  .hero-stats b { font-size: 28px; }
  .hero-sun { top: auto; bottom: 110px; right: -50px; width: 240px; }
  .feature { padding-top: 46px; }
  .feature .peek { width: 88px; left: 24px; }
  .feature-cap { margin: -24px 10px 0; padding: 10px 10px 10px 14px; }
  .feature-cap h3 { font-size: 21px; }
  .feature-cap p { white-space: normal; font-size: 13px; line-height: 1.25; }
  .deco { width: 26px; }
  .ticker span, .ticker b { font-size: 17px; }
  .cats { grid-template-columns: repeat(5, 172px); gap: 12px; margin-top: 34px; }
  .cat { font-size: 19px; padding: 12px; }
  .cat-ico { width: 46px; height: 46px; }
  .sec { margin-top: 40px; }
  .sec-head h2 small { display: none; }
  .shelf-nav { display: none; }
  .shelf, .band .shelf { grid-auto-columns: 46%; gap: 14px; }
  .band { padding: 18px 14px 14px; margin-left: -6px; margin-right: -6px; }
  .modes { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
  .meta { padding: 9px 11px 12px; }
  .meta h3 { font-size: 17px; }
  .meta p { font-size: 13px; }
  .b { font-size: 11px; padding: 2px 7px 1px; }
  .daily { grid-template-columns: 110px 1fr; gap: 16px; padding: 20px; }
  .countdown span { min-width: 54px; }
  .countdown b { font-size: 25px; }
  .profile { grid-template-columns: 104px 1fr; gap: 16px; padding: 20px; }
  .avatar-btn .mascot { width: 100px; }
  .cat-hero { flex-wrap: wrap; padding: 20px; gap: 16px; }
  .cat-hero-ico { width: 70px; height: 70px; }
  .cat-hero-ico svg { width: 48px; }
  .cat-hero .count { margin-left: 0; }
  .marquee { height: 48px; }
  .marquee span { font-size: 21px; }
  .play-big { width: 84px; height: 84px; }
  .press { display: none; }
  .play-big svg { width: 38px; height: 38px; }
  .soon-box { padding: 12px; gap: 8px; }
  .soon-box h3 { font-size: 22px; }
  .soon-box p { font-size: 14px; }
  .info h1 { font-size: 34px; }
  .foot { margin-top: 96px; }
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .foot-col:last-child { display: none; }
  .toast { bottom: 104px; font-size: 15px; }

  .tabbar {
    position: fixed; z-index: 60;
    left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    display: flex; justify-content: space-around; gap: 4px;
    padding: 6px;
    border-radius: 24px; border: 3px solid var(--ink);
    background: rgba(26, 11, 59, .94);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, .45), 0 0 26px rgba(155, 92, 255, .4);
  }
  .tabbar a, .tabbar button { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 7px 0 5px; border: 0; border-radius: 17px; background: none; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar .on { background: var(--yellow); color: var(--ink); }
}

@media (max-width: 420px) {
  .wordmark { font-size: 22px; }
  .logo-mascot { width: 34px; }
  .shelf, .band .shelf { grid-auto-columns: 62%; }
  .grid { gap: 14px 12px; }
  .daily { grid-template-columns: 1fr; }
  .daily-art { width: 110px; }
  .profile { grid-template-columns: 1fr; justify-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .feature-dots button.on::after { transform: none; }
}
