/* FE01 visual prototype — light, fresh game-discovery theme over an animated backdrop.
   Tokens first; every color goes through them. `.on-dark` re-scopes tokens for the few dark islands. */
:root {
  --bg: #f3f7fa; --bg-2: #eef3f7;
  --panel: #ffffff; --panel-2: #f7fafc; --panel-3: #eef4f8;
  --line: #e2e9f0; --line-2: #cbd6e2;
  --text: #0f1d2e; --text-2: #3f4f63; --text-3: #5f6e84;
  --accent: #0d9488; --accent-2: #0284c7; --accent-ink: #ffffff; --link: #0f766e;
  --tint-1: #99f6e4; --tint-2: #bae6fd; --tint-3: #fde68a; --tint-4: #fbcfe8;
  --good: #15803d; --warn: #b45309; --bad: #dc2626; --fav: #e11d48;
  --gold: #f59e0b; --silver: #94a3b8; --bronze: #d97736;
  --shadow-sm: 0 1px 2px rgba(15, 29, 46, .05), 0 2px 8px rgba(15, 29, 46, .04);
  --shadow: 0 10px 28px -14px rgba(15, 29, 46, .22);
  --shadow-lg: 0 28px 60px -24px rgba(15, 29, 46, .32);
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", -apple-system, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  --header-h: 64px;
  color-scheme: light;
}
[data-theme="sky"] { --accent: #2563eb; --accent-2: #7c3aed; --link: #1d4ed8; --tint-1: #bfdbfe; --tint-2: #ddd6fe; --tint-3: #a5f3fc; --tint-4: #fbcfe8; }
[data-theme="peach"] { --accent: #e8590c; --accent-2: #db2777; --link: #c2410c; --tint-1: #fed7aa; --tint-2: #fbcfe8; --tint-3: #fef08a; --tint-4: #bbf7d0; }
.on-dark {
  --text: #eef4fb; --text-2: #bccbdc; --text-3: #93a4ba; --line: rgba(255, 255, 255, .12); --line-2: rgba(255, 255, 255, .22);
  --panel: rgba(255, 255, 255, .06); --panel-2: rgba(255, 255, 255, .1); --good: #4ade80; --bad: #f87171; --warn: #fbbf24; --link: #5eead4;
  color: var(--text);
}
[data-theme="sky"] .on-dark { --link: #a5b4fc; }
[data-theme="peach"] .on-dark { --link: #fdba74; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 28px; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: currentColor; stroke: none; }
.lnk { color: var(--link); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--link) 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color .15s; }
.lnk:hover { text-decoration-color: currentColor; }

/* ---------- backdrop: one GPU canvas (bg.js); the CSS gradient shows only without WebGL ---------- */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; background: linear-gradient(160deg, #e9f8f4 0%, #eef4fd 45%, #f8f1fb 100%); }
[data-theme="sky"] .bg { background: linear-gradient(160deg, #eaf0ff 0%, #f2eefe 50%, #eaf8fb 100%); }
[data-theme="peach"] .bg { background: linear-gradient(160deg, #fff1e8 0%, #fdeef4 50%, #eef8f1 100%); }
#bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1; transition: opacity .5s ease; }
[data-bg="pixel"] #bg-canvas { image-rendering: pixelated; }   /* bg.js sizes it to whole art pixels */
.bg-only body > :not(.bg) { visibility: hidden !important; opacity: 0 !important; }
.bg-only::view-transition-group(*) { display: none; }
.skip { position: absolute; left: 12px; top: -40px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }

/* ---------- demo strip & header ---------- */
.demo-strip { font-size: 11.5px; text-align: center; padding: 5px 16px; color: #8a5a12; letter-spacing: .02em; background: #fff8e6; border-bottom: 1px solid #f3e3bb; }
.demo-strip b { color: #b45309; margin-right: 6px; }
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, .72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid rgba(15, 29, 46, .07); }
.hdr { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 32px; height: 32px; filter: drop-shadow(0 4px 8px color-mix(in oklab, var(--accent) 35%, transparent)); }
.brand-name { font: 800 19px/1 var(--display); letter-spacing: -.01em; }
.brand-name small { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-3); letter-spacing: .14em; margin-top: 3px; }
.nav { display: flex; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; color: var(--text-2); text-decoration: none; font-weight: 650; font-size: 14px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: rgba(15, 29, 46, .05); }
.nav a.on { color: var(--accent); background: color-mix(in oklab, var(--accent) 11%, white); }
.nav .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--fav); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.hsearch { flex: 1; max-width: 440px; margin-left: auto; position: relative; }
.hsearch .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 17px; }
.hsearch input { width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .85); padding: 0 44px 0 38px; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.hsearch input::placeholder { color: var(--text-3); }
.hsearch input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent); }
.kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px var(--mono); color: var(--text-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; background: #fff; }
.suggest { position: absolute; top: 48px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: none; }
.suggest.open { display: block; }
.suggest a { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; text-decoration: none; }
.suggest a:hover { background: var(--panel-3); }
.suggest img { width: 76px; height: 36px; object-fit: cover; border-radius: 6px; }
.suggest .s-name { font-weight: 650; font-size: 14px; line-height: 1.3; }
.suggest .s-sub { font-size: 12px; color: var(--text-3); }
.suggest .s-all { display: block; text-align: center; color: var(--link); font-weight: 700; font-size: 13px; padding: 9px; }
.prefs { position: relative; flex: none; }
.prefs-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .85); color: var(--text-2); font-size: 13px; font-weight: 650; cursor: pointer; transition: border-color .15s, color .15s; }
.prefs-btn:hover { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.prefs-pop { position: absolute; right: 0; top: 50px; width: 330px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow-lg); display: none; }
.prefs-pop.open { display: block; animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
.prefs-pop h4 { margin: 0 0 14px; font-size: 15px; }
.field { margin-bottom: 14px; }
.field label, .field .lbl { display: block; font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: 6px; letter-spacing: .02em; }
.seg { display: flex; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); }
.seg button, .seg a { flex: 1; text-align: center; padding: 7px 10px; border-radius: 8px; border: 0; background: none; color: var(--text-2); font-weight: 650; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover, .seg a:hover { color: var(--accent); }
.seg .on { background: #fff; color: var(--accent); box-shadow: var(--shadow-sm); }
.select { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 0 12px; font-size: 13.5px; cursor: pointer; }
.select:hover { border-color: var(--line-2); }
.prefs-pop .note { font-size: 12px; color: var(--text-3); margin: 4px 0 0; line-height: 1.5; }

/* ---------- shared atoms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; font-weight: 700; font-size: 14.5px; border: 0; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s, filter .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: 0 10px 24px -10px color-mix(in oklab, var(--accent) 80%, transparent); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 14px 30px -10px color-mix(in oklab, var(--accent) 90%, transparent); transform: translateY(-1px); }
.btn-primary .ico { transition: transform .2s; }
.btn-primary:hover .ico { transform: translateX(3px); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost.on { color: var(--fav); border-color: color-mix(in oklab, var(--fav) 45%, transparent); background: color-mix(in oklab, var(--fav) 7%, white); }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; box-shadow: none; filter: grayscale(.4); transform: none; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--panel-3); border: 1px solid transparent; text-decoration: none; white-space: nowrap; }
a.chip { color: var(--link); background: color-mix(in oklab, var(--accent) 8%, white); border-color: color-mix(in oklab, var(--accent) 22%, transparent); }
a.chip::before { content: "#"; opacity: .55; margin-right: -3px; }
a.chip:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.live { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: none; position: relative; }
.live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #22c55e; opacity: 0; animation: ping 2.2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: .8; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.up { color: var(--good); } .down { color: var(--bad); } .flat { color: var(--text-3); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.fresh { color: #15803d; background: #dcfce7; }
.st.stale { color: #b45309; background: #fef3c7; }
.st.missing { color: var(--text-3); background: var(--panel-3); }
.st.unavailable { color: #6d28d9; background: #ede9fe; }
.st.demo { color: #b45309; background: #fef3c7; }
.rv { display: inline-flex; align-items: center; gap: 8px; }
.rv-bar { width: 64px; height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.rv-bar i { display: block; height: 100%; border-radius: 3px; background: var(--rvc, var(--good)); }
.rv-pct { font-weight: 750; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--rvc, var(--good)); }
.rvc-excellent { --rvc: #0d9488; } .rvc-great { --rvc: #16a34a; } .rvc-good { --rvc: #65a30d; } .rvc-mixed { --rvc: #d97706; } .rvc-bad { --rvc: #dc2626; }
.on-dark .rvc-excellent, .on-dark.rvc-excellent { --rvc: #5eead4; } .on-dark .rvc-great { --rvc: #4ade80; } .on-dark .rvc-good { --rvc: #a3e635; } .on-dark .rvc-mixed { --rvc: #fbbf24; }
.ring { position: relative; flex: none; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.art { position: relative; overflow: hidden; background: var(--panel-3); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art img.px { image-rendering: pixelated; }   /* title-less covers ship at art-pixel size (covers.js) */
.spark { display: block; overflow: visible; }
.go { display: inline-flex; align-items: center; gap: 4px; color: var(--link); font-weight: 700; font-size: 13px; }
.go .ico { width: 15px; height: 15px; transition: transform .2s; }
.chev { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--text-3); background: var(--panel-3); transition: background .2s, color .2s, transform .2s; flex: none; }
.chev .ico { width: 16px; height: 16px; }

/* ---------- sections ---------- */
main { min-height: 60vh; padding-bottom: 80px; outline: none; position: relative; }
.section { margin-top: 64px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sec-head h2 { font: 800 25px/1.2 var(--display); margin: 0; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; }
.sec-head h2 .ico { width: 22px; height: 22px; color: var(--accent); padding: 5px; box-sizing: content-box; border-radius: 10px; background: color-mix(in oklab, var(--accent) 12%, white); }
.sec-head p { margin: 5px 0 0; color: var(--text-3); font-size: 13px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 16px; border-radius: 999px; color: var(--link); background: #fff; border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); text-decoration: none; font-weight: 700; font-size: 13.5px; white-space: nowrap; box-shadow: var(--shadow-sm); transition: all .2s; }
.link-more:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.link-more .ico { width: 16px; height: 16px; transition: transform .2s; }
.link-more:hover .ico { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 16px; margin-top: 24px; }
.stage { position: relative; height: clamp(420px, 44vw, 540px); border-radius: 26px; overflow: hidden; background: var(--panel-3); isolation: isolate; box-shadow: var(--shadow-lg); }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s .9s; }
.slide.on { opacity: 1; visibility: visible; z-index: 1; transition: opacity .9s ease; }
.slide.prev { opacity: 1; visibility: visible; transition: none; }   /* outgoing slide stays opaque under the incoming one */
.slide.prev .slide-body { opacity: 0; transition: opacity .15s; }
.slide .art { position: absolute; inset: 0; }
.slide .art img { transform: scale(1.06); transition: transform 9s ease-out; }
.slide.on .art img { transform: scale(1); }
/* Cinematic: the artwork fills the stage; copy sits on a soft scrim instead of a panel that hides the art. */
.slide::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 14, 26, .82) 0%, rgba(7, 14, 26, .55) 34%, rgba(7, 14, 26, 0) 66%), linear-gradient(0deg, rgba(7, 14, 26, .5), rgba(7, 14, 26, 0) 42%); }
.slide-body { position: absolute; left: 48px; bottom: 44px; max-width: 480px; z-index: 2; color: var(--text); }
.slide-body > * { animation: rise .7s .18s both; }   /* starts after the outgoing text has faded */
.slide.on .slide-body > :nth-child(2) { animation-delay: .24s; } .slide.on .slide-body > :nth-child(3) { animation-delay: .3s; }
.slide.on .slide-body > :nth-child(4) { animation-delay: .36s; } .slide.on .slide-body > :nth-child(5) { animation-delay: .42s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.slide h2 { font: 850 clamp(30px, 3.6vw, 46px)/1.05 var(--display); margin: 10px 0 4px; letter-spacing: -.025em; }
.slide h2 a { text-decoration: none; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.slide h2 a:hover { color: var(--link); }
.slide .eyebrow { color: var(--link); }
.slide .orig { color: var(--text-3); font-size: 13.5px; margin-bottom: 12px; letter-spacing: .01em; }
.slide .blurb { color: var(--text-2); font-size: 15px; line-height: 1.7; margin: 0 0 18px; }
.slide .pill { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: var(--text); }
.slide .pill .ico { color: var(--link); }
.slide a.pill:hover { background: rgba(255, 255, 255, .2); border-color: var(--link); color: #fff; }
.slide .btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .3); box-shadow: none; }
.slide .btn-ghost:hover { background: rgba(255, 255, 255, .2); color: #fff; border-color: #fff; }
.slide .btn-ghost.on { color: #fff; background: color-mix(in oklab, var(--fav) 70%, transparent); border-color: var(--fav); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 650; color: var(--text); text-decoration: none; transition: all .18s; }
.pill .ico { width: 15px; height: 15px; color: var(--accent); }
a.pill::after { content: "›"; color: var(--text-3); font-weight: 700; margin-left: 1px; transition: transform .18s, color .18s; }
a.pill:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in oklab, var(--accent) 7%, white); }
a.pill:hover::after { color: var(--accent); transform: translateX(2px); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dots { position: absolute; right: 24px; bottom: 24px; z-index: 3; display: flex; gap: 6px; padding: 8px 10px; border-radius: 999px; background: rgba(7, 14, 26, .45); border: 1px solid rgba(255, 255, 255, .14); }
.dots button { width: 24px; height: 4px; border-radius: 2px; border: 0; background: rgba(255, 255, 255, .28); cursor: pointer; padding: 0; overflow: hidden; }
.dots button.on { background: rgba(255, 255, 255, .22); }
.dots button.on::after { content: ""; display: block; height: 100%; background: var(--accent); animation: fill 7s linear forwards; }
@keyframes fill { from { width: 0; } to { width: 100%; } }
.queue { display: flex; flex-direction: column; gap: 10px; }
.q-item { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 16px; background: #fff; border: 1px solid var(--line); cursor: pointer; text-align: left; overflow: hidden; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s, transform .2s; }
.q-item:hover { border-color: var(--line-2); transform: translateX(-2px); box-shadow: var(--shadow); }
.q-item.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 16%, transparent); }
.q-item .art { width: 112px; height: 52px; border-radius: 10px; }
.q-item .q-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.q-item .q-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.q-item .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; }
.q-item.on .bar { animation: fill 7s linear forwards; }
.paused .q-item.on .bar, .paused .dots button.on::after { animation-play-state: paused; }
.pulse { margin-top: auto; padding: 16px 18px; border-radius: 18px; text-decoration: none; display: block; position: relative; overflow: hidden;
  background: radial-gradient(240px 140px at 100% 0, color-mix(in oklab, var(--accent) 45%, transparent), transparent), linear-gradient(160deg, #10263a, #0b1a29); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.pulse:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pulse .p-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.pulse .p-num { font: 850 32px/1.1 var(--display); margin: 10px 0 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pulse .p-lbl { font-size: 12.5px; color: var(--text-2); }
.pulse .p-meta { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); display: grid; gap: 3px; }
.pulse .go { margin-top: 10px; }

.ticker { margin-top: 16px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .8); overflow: hidden; height: 46px; box-shadow: var(--shadow-sm); }
.ticker .t-lbl { flex: none; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 16px; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--accent); border-right: 1px solid var(--line); background: #fff; position: relative; z-index: 1; }
.ticker .t-view { flex: 1; overflow: hidden; position: relative; }
.ticker .t-view::before, .ticker .t-view::after { content: ""; position: absolute; top: 0; bottom: 0; width: 36px; z-index: 1; pointer-events: none; }   /* edge fades without a mask layer */
.ticker .t-view::before { left: 0; background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0)); }
.ticker .t-view::after { right: 0; background: linear-gradient(-90deg, #fff, rgba(255, 255, 255, 0)); }
.ticker .t-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.ticker:hover .t-track { animation-play-state: paused; }
.ticker .t-item { display: flex; align-items: center; gap: 8px; margin: 0 4px; padding: 5px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; text-decoration: none; color: var(--text-2); transition: background .15s; }
.ticker .t-item:hover { background: color-mix(in oklab, var(--accent) 10%, white); }
.ticker .t-item:hover b { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.ticker .t-item b { color: var(--text); font-weight: 650; }
.ticker .t-item .num { color: var(--text); font-weight: 750; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- most played (home) ---------- */
.mp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; }
.mp-lead { position: relative; border-radius: 24px; overflow: hidden; min-height: 390px; display: flex; flex-direction: column; justify-content: flex-end; padding: 26px; text-decoration: none; isolation: isolate; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.mp-lead:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.mp-lead .art { position: absolute; inset: 0; z-index: -2; }
.mp-lead .art img { transition: transform .8s ease; }
.mp-lead:hover .art img { transform: scale(1.04); }
.mp-lead::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 18, 30, .92) 10%, rgba(8, 18, 30, .45) 55%, rgba(8, 18, 30, .05)); }
.mp-lead .big-rank { position: absolute; top: 18px; left: 22px; font: 900 60px/1 var(--display); letter-spacing: -.04em; background: linear-gradient(180deg, #ffe08a, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .4)); }
.mp-lead h3 { font: 800 28px/1.15 var(--display); margin: 0 0 4px; letter-spacing: -.015em; display: flex; align-items: center; gap: 10px; }
.mp-lead .orig { font-size: 13px; color: var(--text-2); }
.mp-lead .lead-stats { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 18px; }
.mp-lead .lead-num { font: 850 42px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mp-lead .lead-lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-top: 6px; }
.mp-lead .go { position: absolute; top: 22px; right: 22px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #0f766e; font-size: 13px; box-shadow: var(--shadow); }
.mp-lead:hover .go .ico { transform: translateX(3px); }
.mp-list { display: flex; flex-direction: column; gap: 8px; }
.mp-row { display: grid; grid-template-columns: 34px 124px minmax(0, 1fr) auto 104px 30px; align-items: center; gap: 14px; padding: 9px 12px 9px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .2s, transform .2s, box-shadow .2s; flex: 1; }
.mp-row:hover { border-color: color-mix(in oklab, var(--accent) 50%, transparent); transform: translateX(3px); box-shadow: var(--shadow); }
.mp-row:hover .g-name { color: var(--accent); }
.mp-row:hover .chev, .rtable tbody tr:hover .chev { background: var(--accent); color: var(--accent-ink); transform: translateX(2px); }
.mp-row .art { width: 124px; height: 58px; border-radius: 10px; }
.rank-n { font: 850 20px/1 var(--display); color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
.rank-n.r1 { color: var(--gold); } .rank-n.r2 { color: var(--silver); } .rank-n.r3 { color: var(--bronze); }
.g-name { font-weight: 700; font-size: 14.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.g-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-row .p { text-align: right; }
.mp-row .p .num { font-weight: 800; font-size: 15px; display: block; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 18px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(258px, 1fr); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 14px; margin: -8px -4px 0; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail > * { scroll-snap-align: start; }
.card { position: relative; display: flex; flex-direction: column; border-radius: 18px; background: #fff; border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s; }
.card:hover { transform: translateY(-5px); border-color: color-mix(in oklab, var(--accent) 55%, transparent); box-shadow: 0 22px 40px -22px color-mix(in oklab, var(--accent) 55%, rgba(15, 29, 46, .5)); }
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: 18px; }
.card .media { position: relative; }
.card .art { aspect-ratio: 460 / 215; }
.card .art img { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .art img { transform: scale(1.06); }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 15.5px; font-weight: 750; line-height: 1.3; display: flex; align-items: center; gap: 6px; transition: color .15s; }
.card h3 .ico { width: 16px; height: 16px; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; }
.card:hover h3 { color: var(--accent); }
.card:hover h3 .ico { opacity: 1; transform: none; }
.card .orig { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.card .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; }
.card .meta .pl { display: flex; align-items: center; gap: 7px; font-weight: 750; font-variant-numeric: tabular-nums; }
.card .meta .pl small { color: var(--text-3); font-weight: 500; }
.fav-btn { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, .92); border: 1px solid rgba(255, 255, 255, .9); color: var(--text-2); box-shadow: 0 4px 12px -4px rgba(15, 29, 46, .35); transition: transform .2s, color .2s, background .2s; }
.fav-btn:hover { color: var(--fav); transform: scale(1.08); }
.fav-btn.on { color: #fff; background: var(--fav); border-color: var(--fav); }
.fav-btn .ico { width: 17px; height: 17px; }
.fav-btn.pop, .fav-inline.pop { animation: heart .4s ease; }
@keyframes heart { 40% { transform: scale(1.25); } }
.badges { position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; gap: 6px; }
.badge-disc { background: #16a34a; color: #fff; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 7px; font-variant-numeric: tabular-nums; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .4); }
.badge-new { background: #fff; color: var(--accent); font-weight: 850; font-size: 11px; padding: 3px 8px; border-radius: 7px; letter-spacing: .06em; display: grid; place-items: center; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .35); }
.price { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price s { color: var(--text-3); font-weight: 500; font-size: .86em; }

/* ---------- topics & genres ---------- */
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.topic { position: relative; border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s; }
.topic:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.topic-media { position: relative; height: 168px; overflow: hidden; isolation: isolate; }
.topic .bgart { position: absolute; inset: -30px; z-index: -1; filter: blur(20px) saturate(1.3); opacity: .85; }
.topic .bgart .art, .topic .bgart img { width: 100%; height: 100%; }
.fan { position: absolute; left: 50%; top: 24px; width: 240px; height: 120px; transform: translateX(-50%); }
.fan .art { position: absolute; width: 160px; aspect-ratio: 460 / 215; border-radius: 12px; box-shadow: 0 14px 28px -10px rgba(15, 29, 46, .55); border: 2px solid #fff; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.fan .art:nth-child(1) { left: 0; top: 16px; transform: rotate(-9deg); }
.fan .art:nth-child(2) { left: 40px; top: 0; transform: rotate(-1deg); z-index: 1; }
.fan .art:nth-child(3) { left: 80px; top: 20px; transform: rotate(8deg); z-index: 2; }
.topic:hover .fan .art:nth-child(1) { transform: rotate(-15deg) translate(-16px, -2px); }
.topic:hover .fan .art:nth-child(3) { transform: rotate(14deg) translate(16px, 0); }
.topic-body { padding: 18px 20px 18px; display: flex; flex-direction: column; flex: 1; }
.topic h3 { font: 800 19px/1.3 var(--display); margin: 0 0 6px; letter-spacing: -.01em; transition: color .15s; }
.topic:hover h3 { color: var(--accent); }
.topic p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.topic .t-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--text-3); font-weight: 600; }
.topic .t-foot .go { padding: 6px 12px; border-radius: 999px; background: color-mix(in oklab, var(--accent) 10%, white); transition: background .2s, color .2s; }
.topic:hover .t-foot .go { background: var(--accent); color: var(--accent-ink); }
.topic:hover .t-foot .go .ico { transform: translateX(3px); }
.genres { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.genre { position: relative; aspect-ratio: 1.55; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px 14px; text-decoration: none; isolation: isolate; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }
.genre:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.genre .art { position: absolute; inset: 0; z-index: -2; }
.genre .art img { transition: transform .5s; }
.genre:hover .art img { transform: scale(1.08); }
.genre::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 18, 30, .8) 0%, rgba(8, 18, 30, .3) 45%, transparent 75%); }
.genre b { font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; }
.genre b .ico { width: 16px; height: 16px; opacity: .7; transition: transform .2s, opacity .2s; }
.genre:hover b .ico { opacity: 1; transform: translateX(3px); }
.genre small { font-size: 12px; color: var(--text-2); }

/* ---------- page head / charts ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); padding-top: 22px; }
.crumbs a { text-decoration: none; color: var(--link); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs .ico { width: 14px; height: 14px; }
.page-head { padding: 16px 0 6px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-head h1 { font: 850 clamp(30px, 3.6vw, 44px)/1.1 var(--display); margin: 0; letter-spacing: -.025em; }
.page-head p { color: var(--text-2); margin: 8px 0 0; }
.tabs { display: flex; gap: 4px; padding: 5px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 10px; color: var(--text-2); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.tabs a:hover { color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, white); }
.tabs a.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); }
.tabs a .ico { width: 16px; height: 16px; }
.rule { display: grid; grid-template-columns: auto 1fr auto; gap: 14px 16px; align-items: start; padding: 18px 20px; margin: 22px 0 14px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 9%, white), #fff 70%); border: 1px solid color-mix(in oklab, var(--accent) 22%, transparent); }
.rule .r-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 14%, white); color: var(--accent); }
.rule h4 { margin: 0 0 3px; font-size: 13px; color: var(--text-3); letter-spacing: .02em; }
.rule p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text); }
.rule-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.rule-meta span { display: inline-flex; align-items: center; gap: 6px; }
.rule-meta .ico { width: 14px; height: 14px; }
.rule .r-ctl { min-width: 170px; }
.rtable { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.rtable th { text-align: left; font-size: 12px; font-weight: 700; color: var(--text-3); padding: 4px 14px; letter-spacing: .03em; white-space: nowrap; }
.rtable th.r, .rtable td.r { text-align: right; }
.rtable td { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 14px; vertical-align: middle; transition: background .15s, border-color .15s; }
.rtable td:first-child { border-left: 1px solid var(--line); border-radius: 16px 0 0 16px; }
.rtable td:last-child { border-right: 1px solid var(--line); border-radius: 0 16px 16px 0; }
.rtable tbody tr { cursor: pointer; }
.rtable tbody tr:hover td { background: color-mix(in oklab, var(--accent) 5%, white); border-color: color-mix(in oklab, var(--accent) 35%, transparent); }
.rtable tbody tr:hover .g-name { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.rtable .top td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.rtable .g-cell { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* The game column takes the remaining width and never grows past it, so very long names end in an ellipsis. */
.rtable td.r { white-space: nowrap; }
.rtable td:has(> .g-cell) { width: 100%; max-width: 0; }
.rtable .g-cell > div { min-width: 0; }
.rtable .g-cell .art { width: 132px; height: 62px; border-radius: 10px; flex: none; }
.rtable .g-cell a { text-decoration: none; }
.rtable .g-tags { display: flex; gap: 5px; margin-top: 5px; }
.rtable .g-tags .chip { font-size: 11px; padding: 1px 8px; }
.rtable .big { font: 800 17px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.rtable .muted { color: var(--text-3); font-size: 12px; }
.rtable .rank-n { font-size: 24px; width: 40px; }
.rtable .go-c { width: 54px; padding-left: 4px; }
.excluded { margin-top: 26px; }
.excluded h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--warn); margin: 0 0 4px; }
.excluded p { margin: 0 0 6px; font-size: 13px; color: var(--text-3); }
.excluded .rtable td { background: #fffbeb; }
.more-row { display: flex; justify-content: center; margin-top: 14px; }

/* ---------- detail ---------- */
.d-backdrop { position: absolute; left: 0; right: 0; top: 0; height: 640px; z-index: -1; overflow: hidden; pointer-events: none;
  mask-image: linear-gradient(180deg, #000 10%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent); }
.d-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(1.5); opacity: .3; transform: scale(1.2); }
.d-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; padding-top: 18px; align-items: start; }
.d-media { border-radius: 24px; aspect-ratio: 16 / 9; box-shadow: var(--shadow-lg); border: 4px solid #fff; }
.d-info { display: flex; flex-direction: column; gap: 16px; padding-top: 4px; }
.d-info h1 { font: 850 clamp(30px, 3.6vw, 46px)/1.06 var(--display); margin: 0; letter-spacing: -.025em; }
.d-info .orig { color: var(--text-3); margin-top: 6px; font-size: 14px; }
.d-sum { color: var(--text-2); font-size: 15px; line-height: 1.75; margin: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 13.5px; margin: 0; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .75); border: 1px solid var(--line); }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; font-weight: 650; }
.plats { display: flex; gap: 6px; flex-wrap: wrap; }
.plat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 650; color: var(--text-2); text-decoration: none; transition: all .15s; }
a.plat:hover { border-color: var(--accent); color: var(--accent); }
.plat .ico { width: 14px; height: 14px; }
.d-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.d-actions .hint { font-size: 12px; color: var(--text-3); align-self: center; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.metric { padding: 16px 18px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.metric .k { font-size: 12.5px; color: var(--text-3); font-weight: 650; display: flex; align-items: center; gap: 6px; }
.metric .k .ico { width: 15px; height: 15px; color: var(--accent); }
.metric .v { font: 850 30px/1.1 var(--display); margin: 10px 0 8px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 10px; }
.metric .v small { font-size: 14px; font-weight: 700; }
.metric .s { font-size: 12px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.metric .go { margin-top: auto; padding-top: 10px; font-size: 12.5px; }
.metric.click { cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
.metric.click:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--accent) 55%, transparent); box-shadow: var(--shadow); }
.metric.click:hover .go .ico { transform: translateX(3px); }
.metric.stale { border-color: #f6d58e; background: #fffdf5; }
.metric.stale .v { color: var(--text-2); }
.metric.missing .v { color: var(--text-3); font-size: 20px; }
.metric.hl::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; margin-top: 20px; align-items: start; }
.d-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel { padding: 22px 24px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); scroll-margin-top: calc(var(--header-h) + 20px); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-h h2 { font: 800 18px/1.3 var(--display); margin: 0; display: flex; align-items: center; gap: 9px; }
.panel-h h2 .ico { color: var(--accent); width: 19px; height: 19px; }
.panel .note { font-size: 12.5px; color: var(--text-3); margin: 12px 0 0; display: flex; gap: 6px; align-items: flex-start; line-height: 1.55; }
.panel .note .ico { width: 14px; height: 14px; margin-top: 3px; }
.seg.small button { padding: 5px 12px; font-size: 12.5px; }
.chart { position: relative; height: 300px; margin: 0 -6px; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; cursor: crosshair; }
.chart .axis { font: 11px var(--font); fill: var(--text-3); font-variant-numeric: tabular-nums; }
.chart .grid-l { stroke: var(--line); }
.chart .hatch-l { stroke: rgba(15, 29, 46, .07); }
.tip { position: absolute; top: 0; left: 0; pointer-events: none; background: #0f1d2e; color: #eef4fb; border-radius: 10px; padding: 8px 11px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -100%); opacity: 0; transition: opacity .12s; box-shadow: var(--shadow); }
.tip b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.tip span { color: #9fb0c4; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-3); margin-top: 10px; }
.chart-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rv-big { display: flex; align-items: center; gap: 18px; padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.rv-big .lbl { font: 800 20px/1.2 var(--display); color: var(--rvc); }
.rv-big .sub { color: var(--text-3); font-size: 13px; }
.lang-rows { display: grid; gap: 10px; }
.lang-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 46px 70px; align-items: center; gap: 12px; font-size: 13px; }
.lang-row .bar { height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.lang-row .bar i { display: block; height: 100%; border-radius: 4px; background: var(--rvc); }
.lang-row .pct { font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; color: var(--rvc); }
.lang-row .n { text-align: right; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.ltable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ltable th { text-align: center; font-size: 12px; color: var(--text-3); font-weight: 700; padding: 0 6px 10px; }
.ltable th:first-child { text-align: left; }
.ltable td { padding: 9px 6px; border-top: 1px solid var(--line); text-align: center; }
.ltable td:first-child { text-align: left; font-weight: 650; }
.ltable tr.mine td { background: color-mix(in oklab, var(--accent) 7%, white); }
.ltable tr.mine td:first-child::after { content: "●"; color: var(--accent); font-size: 8px; margin-left: 6px; vertical-align: 2px; }
.yes { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in oklab, var(--accent) 14%, white); color: var(--accent); }
.yes .ico { width: 13px; height: 13px; stroke-width: 3; }
.no { color: var(--line-2); }
.feats { display: flex; flex-wrap: wrap; gap: 8px; }
.feat { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; font-weight: 650; }
.feat .ico { width: 16px; height: 16px; color: var(--accent); }
.src-rows { display: grid; gap: 0; }
.src-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.src-row:first-child { border-top: 0; padding-top: 0; }
.src-row .n { font-weight: 700; }
.src-row .w { color: var(--text-3); font-size: 12px; grid-column: 1 / -1; }
.price-box { display: flex; align-items: center; gap: 12px; }
.price-box .disc { background: #16a34a; color: #fff; font-weight: 850; padding: 4px 9px; border-radius: 8px; font-size: 15px; }
.price-box .now { font: 850 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.price-box s { color: var(--text-3); font-size: 13px; display: block; }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-size: 13.5px; margin-top: 16px; }
.banner .ico { flex: none; }
.banner.warn { background: #fffbeb; border: 1px solid #f6d58e; color: #92400e; }
.banner.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ---------- search ---------- */
.s-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 26px; margin-top: 22px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); padding: 20px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.filters h3 { font-size: 15px; margin: 0; display: flex; align-items: center; justify-content: space-between; }
.filters h3 button { border: 0; background: none; color: var(--link); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.fgroup { margin-top: 18px; }
.fgroup .lbl { display: block; font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: 8px; letter-spacing: .02em; }
.toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: var(--text-2); background: #fff; border: 1px solid var(--line-2); cursor: pointer; transition: all .15s; }
.toggle .ico { width: 14px; height: 14px; }
.toggle:hover { color: var(--accent); border-color: var(--accent); }
.toggle.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.s-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.s-bar .count { font-size: 14px; color: var(--text-2); }
.s-bar .count b { color: var(--text); font-size: 18px; margin: 0 2px; }
.s-input { position: relative; flex: 1; max-width: 520px; }
.s-input input { width: 100%; height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; padding: 0 18px 0 46px; font-size: 16px; box-shadow: var(--shadow-sm); }
.s-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent); }
.s-input .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.sort .select { width: auto; min-width: 130px; }
.filter-open { display: none; }

/* ---------- empty / error / skeleton ---------- */
.empty { text-align: center; padding: 60px 24px; border: 1.5px dashed var(--line-2); border-radius: 24px; background: rgba(255, 255, 255, .78); }
.empty .e-art { width: 120px; height: 120px; margin: 0 auto 16px; }
.empty h3 { font: 800 21px/1.3 var(--display); margin: 0 0 6px; }
.empty p { color: var(--text-2); margin: 0 auto 20px; max-width: 420px; }
.empty.error { border-color: #fca5a5; background: rgba(255, 245, 245, .85); }
.empty .code { font: 600 11.5px var(--mono); color: var(--text-3); margin-top: 14px; }
.sk { background: linear-gradient(90deg, #eef3f7 25%, #f8fbfd 37%, #eef3f7 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 14px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-line { height: 12px; border-radius: 6px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 26px; }
.about .panel h2 { font: 800 18px/1.3 var(--display); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.about .panel h2 .ico { color: var(--accent); }
.about .panel p { margin: 0; color: var(--text-2); line-height: 1.75; font-size: 14.5px; }
.about .states { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- footer (dark island) ---------- */
.site-footer { margin-top: 40px; padding: 48px 0 36px; background: linear-gradient(180deg, #10233a, #0b1828); }
.f-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.f-grid h5 { margin: 0 0 12px; font-size: 13px; color: var(--text); letter-spacing: .04em; }
.f-grid a { display: block; color: var(--text-2); text-decoration: none; font-size: 13.5px; padding: 3px 0; }
.f-grid a:hover { color: #5eead4; text-decoration: underline; text-underline-offset: 3px; }
.f-grid a.brand { display: flex; padding: 0; color: var(--text); text-decoration: none; }
.f-tag { color: var(--text-2); max-width: 340px; margin: 14px 0 0; font-size: 14px; }
.f-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }

/* ---------- bottom nav, dev panel, toast ---------- */
.bottom-nav { display: none; }
.dev { position: fixed; right: 18px; bottom: 18px; z-index: 80; }
.dev-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--text-3); cursor: pointer; box-shadow: var(--shadow-sm); }
.dev-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }   /* label kept for screen readers */
.dev-toggle:hover { color: var(--accent); }
.dev-toggle:hover { background: #fef3c7; }
.dev-panel { position: absolute; right: 0; bottom: 50px; width: 316px; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: none; }
.dev.open .dev-panel { display: block; animation: pop .16s ease-out; }
.dev-panel h4 { margin: 0 0 4px; font-size: 13px; color: #92400e; }
.dev-panel .lbl { font-size: 11.5px; font-weight: 700; color: var(--text-3); margin: 12px 0 7px; }
.dev-panel .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 90; background: #0f1d2e; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 650; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; display: flex; align-items: center; gap: 8px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ico { color: #fb7185; }

.page-enter { animation: fadein .35s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .queue { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .q-item { grid-template-columns: 1fr; }
  .q-item .art { width: 100%; height: auto; aspect-ratio: 460 / 215; }
  .pulse { display: none; }
  .genres { grid-template-columns: repeat(4, 1fr); }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .d-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .mp { grid-template-columns: 1fr; }
  .topics { grid-template-columns: 1fr; }
  .d-top { grid-template-columns: 1fr; }
  .s-layout { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: block; }
  .filter-open { display: inline-flex; }
  .f-grid { grid-template-columns: 1fr 1fr; }
  .rtable .c-trend, .rtable .c-peak { display: none; }
}
@media (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); font-size: 14.5px; }
  .wrap { padding: 0 16px; }
  .nav, .hsearch { display: none; }
  .prefs { margin-left: auto; }
  .hdr { gap: 10px; }
  .brand-name small { display: none; }
  .prefs-btn .lbl-long { display: none; }
  .prefs-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; }
  .stage { height: 540px; border-radius: 22px; }
  .slide-body { left: 12px; right: 12px; bottom: 12px; padding: 18px; border-radius: 18px; }
  .slide .blurb { font-size: 14px; }
  .dots { top: 14px; right: 14px; bottom: auto; }
  .queue { display: flex; flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px; }
  .q-item { flex: 0 0 46%; scroll-snap-align: start; }
  .section { margin-top: 48px; }
  .sec-head h2 { font-size: 21px; }
  .link-more { height: 32px; padding: 0 10px 0 12px; font-size: 12.5px; }
  .mp-row { grid-template-columns: 26px 96px minmax(0, 1fr) auto; gap: 10px; padding: 8px 10px; }
  .mp-row .art { width: 96px; height: 45px; }
  .mp-row .spark-c, .mp-row .chev { display: none; }
  .mp-lead { min-height: 300px; padding: 20px; }
  .mp-lead .lead-num { font-size: 34px; }
  .rail { grid-auto-columns: 78%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; }
  .genres { grid-template-columns: repeat(2, 1fr); }
  .rule { grid-template-columns: 1fr; }
  .rule .r-ico { display: none; }
  .rtable thead { display: none; }
  .rtable .c-change, .rtable .c-peak, .rtable .c-trend, .rtable .c-score { display: none; }
  .rtable td { padding: 9px 8px; }
  .rtable .g-cell { gap: 10px; }
  .rtable .g-cell .art { width: 64px; height: 30px; }
  /* Room for the name on a phone: the whole row is the link, and the percentage carries the review score. */
  .rtable .go-c, .rtable .rv-bar { display: none; }
  .rtable tr:has(> .go-c) td:nth-last-child(2) { border-right: 1px solid var(--line); border-radius: 0 16px 16px 0; }
  .rtable .g-tags { display: none; }
  .rtable .rank-n { font-size: 18px; width: 24px; }
  .rtable .big { font-size: 15px; }
  .rtable .go-c { width: 36px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric .v { font-size: 24px; }
  .panel { padding: 18px; }
  .chart { height: 240px; }
  .lang-row { grid-template-columns: 76px minmax(0, 1fr) 42px; }
  .lang-row .n { display: none; }
  .f-grid { grid-template-columns: 1fr; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 650; color: var(--text-3); text-decoration: none; position: relative; }
  .bottom-nav a.on { color: var(--accent); }
  .bottom-nav .ico { width: 21px; height: 21px; }
  .bottom-nav .count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--fav); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
  .dev { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .dev-toggle span { display: none; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
/* =================================================================================================
   Premium layer — rhythm, motion and interaction. Later rules intentionally refine the base above.
   ================================================================================================= */
:root { --ease: cubic-bezier(.2, .7, .2, 1); --ease-out: cubic-bezier(.16, 1, .3, 1); --spring: cubic-bezier(.34, 1.4, .64, 1); }

/* ---- rhythm: more air between and inside blocks ---- */
.section { margin-top: 112px; }
.sec-head { margin-bottom: 30px; }
.sec-head h2 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.025em; }
.sec-head p { font-size: 14px; margin-top: 8px; max-width: 540px; }
.kicker { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.kicker span { font: 600 11px var(--mono); color: var(--text-3); letter-spacing: .06em; padding-right: 10px; border-right: 1px solid var(--line-2); }
.kicker::after { content: ""; width: 40px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.pix { width: 16px; height: 16px; flex: none; image-rendering: pixelated; filter: drop-shadow(1px 1px 0 rgba(255, 255, 255, .9)); }
.p-a { fill: var(--accent); } .p-b { fill: var(--accent-2); } .p-w { fill: #fff; } .p-y { fill: #fbbf24; } .p-Y { fill: #fff3b0; } .p-o { fill: #f97316; } .p-r { fill: #dc2626; }
/* Headings that sit straight on the landscape get a soft light halo so they read over trees and water. */
.sec-head h2, .sec-head p, .kicker, .page-head h1, .page-head p, .crumbs { text-shadow: 0 0 1px #fff, 0 0 6px rgba(255, 255, 255, .95), 0 0 16px rgba(255, 255, 255, .85); }
.hero { gap: 20px; margin-top: 32px; }
.ticker { margin-top: 24px; }
.ticker .t-item { margin: 0 10px; }
.grid { gap: 26px; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }
.rail { gap: 26px; grid-auto-columns: minmax(290px, 1fr); }
.card { border-radius: 22px; }
.card-link { border-radius: 22px; }
.card .body { padding: 16px 18px 18px; gap: 10px; }
.mp, .topics { gap: 26px; }
.mp-list { gap: 10px; padding-right: 8px; }   /* room for the active row's nudge */
.d-grid, .d-col { gap: 26px; }
.metrics { gap: 16px; margin-top: 36px; }
.panel { padding: 26px 28px; border-radius: 24px; }
.site-footer { padding-top: 0; margin-top: 72px; overflow: hidden; background: linear-gradient(180deg, transparent 0 166px, #10233a 166px, #0b1828); }
.f-scene { display: block; height: 168px; image-rendering: pixelated; margin-bottom: 36px; }   /* night valley, sized to whole art pixels by app.js */

/* ---- header: condenses on scroll; reading-progress hairline ---- */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 90; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent-2)); pointer-events: none; }
.site-header { transition: background .3s, box-shadow .3s, border-color .3s; }
.hdr { transition: height .35s var(--ease); }
.scrolled .site-header { background: rgba(255, 255, 255, .88); box-shadow: 0 12px 30px -20px rgba(15, 29, 46, .4); border-color: transparent; }
.scrolled .hdr { height: 56px; }
.hsearch { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .85); color: var(--text-3); font-size: 14px; cursor: pointer; text-align: left; transition: border-color .2s, box-shadow .2s, color .2s; }
.hsearch:hover { border-color: color-mix(in oklab, var(--accent) 50%, transparent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 12%, transparent); color: var(--text-2); }
.hsearch .ico, .hsearch .kbd { position: static; transform: none; }
.hsearch .ph { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- reveal on scroll (JS adds data-reveal + --i stagger, then .in) ---- */
[data-reveal]:not(.in) { opacity: 0; }
[data-reveal].in { animation: reveal .9s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(24px); } }   /* opacity + transform only: compositor-friendly while scrolling */

/* ---- lines draw in, rings sweep, bars grow ---- */
.spark .line, .chart .line { stroke-dasharray: 1; }
[data-reveal].in .spark .line { animation: draw 1.6s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms + .25s); }
[data-reveal].in .spark .area { animation: fade .9s ease backwards; animation-delay: calc(var(--i, 0) * 70ms + .7s); }
.chart .line { animation: draw 1.4s var(--ease) backwards; }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes fade { from { opacity: 0; } }
[data-reveal].in .ring .arc { animation: ringIn 1.5s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms + .2s); }
@keyframes ringIn { from { stroke-dashoffset: var(--v); } }
[data-reveal].in .rv-bar i, [data-reveal].in .lang-row .bar i { animation: grow 1.2s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms + .3s); transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }

/* ---- sliding selection pill for tabs / segmented controls ---- */
.tabs, .seg { position: relative; isolation: isolate; }
.tabs > .ind, .seg > .ind { position: absolute; left: 0; top: 0; z-index: -1; border-radius: 10px; pointer-events: none; }
.ind-ready > .ind { transition: transform .55s var(--spring), width .55s var(--spring), height .3s var(--ease); }
.tabs > .ind { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 22px -12px color-mix(in oklab, var(--accent) 85%, transparent); }
.tabs:has(> .ind) a.on { background: transparent; }
.seg > .ind { background: #fff; border-radius: 8px; box-shadow: var(--shadow-sm), 0 0 0 1px rgba(15, 29, 46, .05); }
.seg:has(> .ind) .on { background: transparent; box-shadow: none; }

/* ---- depth: tilt toward the pointer, a specular sheen and a border that lights up under the cursor ---- */
.card { transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out), border-color .3s; }
.card:hover { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-8px);
  box-shadow: 0 32px 60px -30px color-mix(in oklab, var(--accent) 45%, rgba(15, 29, 46, .55)); border-color: transparent; }
.topic { transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out), border-color .3s; }
.topic:hover { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); }
.mp-lead { transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out); }
.mp-lead:hover { transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); }
.card::after, .topic::after, .mp-lead::after, .metric.click::after, .q-item::after, .pulse::after, .genre::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 4; opacity: 0; transition: opacity .45s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .2), transparent 45%); }
.card:hover::after, .topic:hover::after, .mp-lead:hover::after, .metric.click:hover::after, .q-item:hover::after, .pulse:hover::after, .genre:hover::after { opacity: 1; }
.card { isolation: isolate; }
.card > .media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .45s;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%); background-size: 250% 100%; background-position: 120% 0; }
.card:hover > .media::after { opacity: 1; animation: sheen 1.1s var(--ease) forwards; }
@keyframes sheen { to { background-position: -40% 0; } }
.card:hover { background: linear-gradient(#fff, #fff) padding-box, radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--accent), color-mix(in oklab, var(--accent-2) 40%, var(--line)) 70%) border-box; border: 1px solid transparent; }
.metric.click:hover { background: linear-gradient(#fff, #fff) padding-box, radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), var(--accent), var(--line) 70%) border-box; border: 1px solid transparent; }

/* ---- buttons: magnetic drift (JS sets translate) and a light sweep ---- */
.btn-primary, .link-more, .chev, .to-top { transition: translate .4s var(--ease-out), transform .2s, box-shadow .3s, background .2s, color .2s, filter .2s; }
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); transform: translateX(-120%); transition: transform .9s var(--ease); }
.btn-primary:hover::after { transform: translateX(120%); }

/* ---- hero: pointer parallax between artwork and glass panel ---- */
.stage { --hx: 0; --hy: 0; }
.slide .art img { transform: none; scale: 1.1; translate: calc(var(--hx) * -22px) calc(var(--hy) * -14px); transition: scale 9s ease-out, translate 1s var(--ease-out); }
.slide.on .art img { transform: none; scale: 1.05; }
.slide-body { translate: calc(var(--hx) * 10px) calc(var(--hy) * 8px); transition: translate 1s var(--ease-out), opacity .15s; }
.slide h2 { font-size: clamp(34px, 4vw, 54px); }
.q-item { transition: border-color .25s, box-shadow .3s, transform .4s var(--ease-out); }

/* ---- home: master–detail "most played" ---- */
.mp-lead .lead-inner { display: contents; }
.mp-lead .lead-body { display: flex; flex-direction: column; gap: 0; }
.mp-lead.swap .lead-body, .mp-lead.swap .big-rank { animation: leadIn .65s var(--ease-out) backwards; }
.mp-lead.swap .art img { animation: fade .7s ease backwards; }
@keyframes leadIn { from { opacity: 0; transform: translateY(16px); } }
.mp-lead .big-rank:not(.r1) { background: linear-gradient(180deg, #ffffff, #cbd5e1); -webkit-background-clip: text; background-clip: text; }
.mp-row { transition: border-color .25s, transform .45s var(--ease-out), box-shadow .3s, background .25s; }
.mp-row.on { border-color: color-mix(in oklab, var(--accent) 55%, transparent); background: color-mix(in oklab, var(--accent) 5%, #fff); box-shadow: var(--shadow); transform: translateX(8px); }
.mp-row.on .g-name { color: var(--accent); }
.mp-row.on .chev { background: var(--accent); color: var(--accent-ink); }
.mp-row:hover { transform: translateX(8px); }

/* ---- home: genre accordion ---- */
.genres { display: flex; flex-direction: column; gap: 14px; }
.genre-row { display: flex; gap: 14px; }
.genre { flex: 1 1 0; min-width: 0; aspect-ratio: auto; height: 168px; transition: flex-grow .75s var(--ease-out), box-shadow .3s, transform .3s; }
.genre-row:hover .genre { flex-grow: .8; }
.genre-row .genre:hover, .genre:focus-visible { flex-grow: 2.6; transform: none; }
.genre b, .genre small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.genre .g-top { position: absolute; top: 14px; left: 14px; right: 14px; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .92); opacity: 0; transform: translateY(-6px); transition: opacity .4s .12s, transform .4s .12s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.genre .g-top::before { content: "★ "; color: #ffd36b; }
.genre:hover .g-top, .genre:focus-visible .g-top { opacity: 1; transform: none; }

/* ---- command palette ---- */
.cmdk { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding-top: 12vh; pointer-events: none; }
.cmdk:empty { display: none; }
.cmdk.open { pointer-events: auto; }
.cmdk-scrim { position: absolute; inset: 0; background: rgba(15, 29, 46, .26); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.cmdk.open .cmdk-scrim { opacity: 1; }
.cmdk-box { position: relative; width: min(640px, calc(100vw - 32px)); background: rgba(255, 255, 255, .97); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 40px 100px -30px rgba(15, 29, 46, .55); overflow: hidden; opacity: 0; transform: translateY(-12px) scale(.97); transition: opacity .25s var(--ease-out), transform .4s var(--ease-out); }
.cmdk.open .cmdk-box { opacity: 1; transform: none; }
.cmdk-in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cmdk-in .ico { width: 20px; height: 20px; color: var(--accent); }
.cmdk-in input { flex: 1; border: 0; outline: none; background: none; font-size: 17px; min-width: 0; }
.cmdk-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.cmdk-group { font-size: 11.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); padding: 12px 12px 6px; }
.cmdk-item { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 12px; text-decoration: none; transition: background .15s; }
.cmdk-item img { width: 72px; height: 34px; object-fit: cover; border-radius: 7px; flex: none; }
.cmdk-item .ci-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 10%, #fff); color: var(--accent); flex: none; }
.cmdk-item .ci-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.cmdk-item .ci-main b { font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item .ci-main small { font-size: 12px; color: var(--text-3); }
.cmdk-item > .ico { color: var(--text-3); width: 16px; height: 16px; }
.cmdk-item.hl { background: color-mix(in oklab, var(--accent) 9%, #fff); }
.cmdk-item.hl .ci-main b, .cmdk-item.hl > .ico { color: var(--accent); }
.cmdk-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); background: var(--panel-2); }
.cmdk-foot .kbd, .cmdk-in .kbd { position: static; transform: none; margin-right: 4px; }
.cmdk-empty { padding: 28px; text-align: center; color: var(--text-3); }
html.cmdk-on body { overflow: hidden; }

/* ---- back to top ---- */
.to-top { position: fixed; right: 18px; bottom: 72px; z-index: 75; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); color: var(--text-2); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none; transition: opacity .3s, transform .45s var(--spring), color .2s, translate .4s var(--ease-out); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--accent); }

/* ---- page-to-page transition (View Transitions API) ---- */
main { view-transition-name: page; }
::view-transition-old(page) { animation: vtOut .26s var(--ease) both; }
::view-transition-new(page) { animation: vtIn .55s var(--ease-out) both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(18px); } }

@media (max-width: 760px) {
  .section { margin-top: 72px; }
  .sec-head { margin-bottom: 20px; }
  .genre-row { flex-wrap: wrap; gap: 12px; }
  .genres { gap: 12px; }
  .genre { flex: 1 1 calc(50% - 6px); height: 116px; }
  .genre-row:hover .genre, .genre-row .genre:hover { flex-grow: 1; }
  .to-top { bottom: calc(132px + env(safe-area-inset-bottom)); right: 14px; }
  .mp-row.on, .mp-row:hover { transform: none; }
  .hsearch { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ticker .t-track { animation: none !important; }
  [data-reveal]:not(.in) { opacity: 1; }
}
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; }
.no-motion [data-reveal]:not(.in) { opacity: 1; }
