/* Honk Party hub: a dark storefront. One UI accent, per-game accents (--a) on cards and the detail sheet.
   Display: Bricolage Grotesque. Text: Geist. Motion is short and springy; all of it is off with reduced motion.
   Phones (<= 860px): nav tucks away on scroll, hero swipes, filters scroll sideways, the sheet is a bottom sheet. */
:root {
  --bg: #0a0b0d;
  --bg-2: #0f1114;
  --surface: #14171b;
  --surface-2: #1b1f24;
  --line: #252a31;
  --line-2: #3a414b;
  --text: #eceef1;
  --muted: #8d949e;
  --accent: #f5821f;
  --live: #3ddc84;
  --down: #ff5470;
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 48px);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Geist', system-ui, sans-serif;
  --spring: cubic-bezier(.2, .9, .25, 1.15);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
body.lock { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
img { -webkit-user-drag: none; }
.hidden { display: none !important; }
kbd { font-family: var(--body); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: top .2s; }
.skip:focus { top: calc(12px + var(--safe-t)); }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- nav */
#nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: calc(14px + var(--safe-t)) calc(var(--gutter) + var(--safe-r)) 14px calc(var(--gutter) + var(--safe-l)); background: rgba(10, 11, 13, 0.72); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid transparent; transition: border-color .3s, transform .35s var(--ease); }
#nav.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; flex: none; }
.brand .mark { width: 30px; height: 30px; display: block; transform-origin: 40% 90%; transition: transform .4s var(--spring); }
.brand:hover .mark { transform: rotate(-12deg) scale(1.08); }
.brand b { color: var(--accent); font-weight: 800; margin-left: 1px; }
.tabs { display: flex; gap: 4px; }
.tabs a { text-decoration: none; color: var(--muted); font-weight: 500; padding: 7px 12px; border-radius: 9px; transition: color .2s, background .2s; }
.tabs a:hover, .tabs a.on { color: var(--text); background: var(--surface); }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 7px 10px; width: min(280px, 30vw); transition: border-color .2s, width .3s var(--ease), box-shadow .2s; }
.search:focus-within { border-color: var(--line-2); width: min(340px, 36vw); box-shadow: 0 0 0 4px rgba(245, 130, 31, .12); }
.search:focus-within kbd { display: none; }
.search svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.search input { all: unset; flex: 1; min-width: 0; font-size: 14px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.q-clear { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); flex: none; }
.q-clear svg { width: 12px; height: 12px; stroke-width: 2.6; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 9px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; transition: background .2s, border-color .2s, transform .25s var(--spring); }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .pip { fill: currentColor; stroke: none; }
.icon-btn.install { color: var(--bg); background: var(--accent); border-color: var(--accent); padding: 0 12px 0 9px; animation: nudge .6s 1.2s var(--spring) backwards; }
@keyframes nudge { from { transform: translateY(-8px); opacity: 0; } }
#dice.roll svg { animation: roll .45s var(--spring); }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(200deg) scale(.8); } 100% { transform: rotate(360deg) scale(1); } }
.pill { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; transition: border-color .3s, background .3s; }
.pill:hover { border-color: var(--line-2); }
.pill.busy { border-color: rgba(61, 220, 132, .35); background: rgba(61, 220, 132, .07); }
.pill b { font-variant-numeric: tabular-nums; }
.pill em { font-style: normal; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; display: inline-block; }
.dot.up { background: var(--live); }
.dot.live { position: relative; background: var(--live); }
.dot.live::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--live); opacity: 0; animation: live-ring 2s infinite; will-change: transform, opacity; }
.dot.down { background: var(--down); }
@keyframes live-ring { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(2.75); opacity: 0; } }

.banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px var(--gutter); background: #2a1519; color: #ffd0d8; font-size: 14px; font-weight: 500; text-align: center; animation: rise .4s var(--ease); }

main { padding: 0 calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l)); max-width: 1480px; margin: 0 auto; }

/* ---------------------------------------------------------------- hero: stage + (desktop) side list */
#hero { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; height: clamp(420px, 58vh, 580px); }
.hero-stage { position: relative; border-radius: 22px; overflow: hidden; background: var(--surface); isolation: isolate; touch-action: pan-y; }
html:not(.ready) .hero-stage { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility 0s .9s; }
.slide.on { opacity: 1; visibility: visible; transition: opacity .9s var(--ease), visibility 0s; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 8s linear; }
.slide.on img { transform: scale(1); }
.slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 11, 13, .94) 0%, rgba(10, 11, 13, .7) 38%, rgba(10, 11, 13, 0) 70%), linear-gradient(0deg, rgba(10, 11, 13, .8), rgba(10, 11, 13, 0) 45%); }
.slide .copy { position: absolute; z-index: 1; left: clamp(20px, 4vw, 56px); right: 20px; bottom: clamp(28px, 5vw, 56px); max-width: 540px; }
.slide.on .copy > * { animation: rise .7s var(--ease) backwards; }
.slide.on .copy > *:nth-child(2) { animation-delay: .06s; } .slide.on .copy > *:nth-child(3) { animation-delay: .12s; } .slide.on .copy > *:nth-child(4) { animation-delay: .18s; } .slide.on .copy > *:nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--a, var(--accent)); }
.new { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bg); background: var(--a, var(--accent)); padding: 2px 7px; border-radius: 5px; }
.slide h2 { margin: 8px 0 6px; font-family: var(--display); font-size: clamp(38px, 5.4vw, 68px); line-height: .95; letter-spacing: -0.035em; font-weight: 800; text-wrap: balance; }
.slide p { margin: 0 0 16px; color: #c9ced5; font-size: 17px; max-width: 440px; text-wrap: pretty; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.slide .row { margin-bottom: 20px; }
.slide .row:last-child { margin-bottom: 0; }
.chip { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); color: #d5d9df; white-space: nowrap; }
.chip.live { color: var(--live); border-color: rgba(61, 220, 132, .3); background: rgba(61, 220, 132, .08); display: inline-flex; gap: 6px; align-items: center; }
.chip.new { color: var(--bg); background: var(--a, var(--accent)); border-color: transparent; font-weight: 700; }
.play { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 22px 12px 18px; border-radius: 12px; border: 0; background: var(--a, var(--accent)); color: #0a0b0d; box-shadow: 0 8px 30px -8px var(--a, var(--accent)); transition: transform .25s var(--spring), box-shadow .25s, filter .2s; white-space: nowrap; }
.play svg { width: 20px; height: 20px; fill: currentColor; stroke: none; transition: transform .3s var(--spring); }
.play:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.08); box-shadow: 0 14px 40px -8px var(--a, var(--accent)); }
.play:hover svg { transform: translateX(2px) scale(1.1); }
.play:active { transform: scale(.96); }
.ghost { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); font-weight: 500; text-decoration: none; transition: background .2s, transform .25s var(--spring); }
.ghost:hover { background: rgba(255, 255, 255, .12); }
.ghost:active { transform: scale(.96); }
.ghost svg { width: 18px; height: 18px; }

#hero-list { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.hitem { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 14px; background: transparent; text-align: left; overflow: hidden; isolation: isolate; transition: background .25s; }
.hitem:hover { background: var(--surface); }
.hitem.on { background: var(--surface-2); }
.hitem img { height: 100%; max-height: 64px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 9px; flex: none; opacity: .7; transition: opacity .3s, transform .3s var(--spring); }
.hitem:hover img, .hitem.on img { opacity: 1; }
.hitem.on img { transform: scale(1.04); }
.ht { display: flex; flex-direction: column; min-width: 0; }
.ht b { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); transition: color .25s; }
.hitem.on b, .hitem:hover b { color: var(--text); }
.ht small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hitem .fillbar { position: absolute; z-index: -1; inset: 0; background: color-mix(in srgb, var(--a) 16%, transparent); transform: scaleX(0); transform-origin: left; }
.hitem.on .fillbar { animation: fill var(--dur, 7s) linear forwards; }
#hero.paused .hitem.on .fillbar, #hero.paused .hdot.on span { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
#hero-dots { display: none; position: absolute; z-index: 2; left: 20px; bottom: 18px; gap: 6px; }
.hdot { position: relative; width: 18px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; transition: width .35s var(--ease); }
.hdot::before { content: ''; position: absolute; inset: -10px -3px; }
.hdot.on { width: 40px; }
.hdot span { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.hdot.on span { animation: fill var(--dur, 7s) linear forwards; }
.hero-arrow { display: none; position: absolute; z-index: 2; top: 50%; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); background: rgba(10, 11, 13, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); place-items: center; opacity: 0; transition: opacity .25s, transform .25s var(--spring); }
.hero-arrow svg { width: 20px; height: 20px; }
.hero-arrow.prev { left: 14px; } .hero-arrow.next { right: 14px; }
.hero-stage:hover .hero-arrow { opacity: 1; }
.hero-arrow:active { transform: scale(.9); }

/* ---------------------------------------------------------------- shelves + cards */
.shelf { margin-top: 56px; }
.shelf-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 18px; }
.shelf-head h2 { margin: 0; font-family: var(--display); font-size: 32px; letter-spacing: -0.03em; font-weight: 700; }
.shelf-head h2 small { font-family: var(--body); font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.sub { margin: 0; color: var(--muted); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; padding: 6px 13px; border-radius: 999px; white-space: nowrap; transition: color .2s, border-color .2s, background .2s, transform .2s var(--spring); }
.filters button:hover { color: var(--text); border-color: var(--line-2); }
.filters button:active { transform: scale(.94); }
.filters button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.filters .dot { width: 7px; height: 7px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; outline: 1px solid var(--line); outline-offset: -1px; cursor: pointer; transition: transform .35s var(--spring), box-shadow .35s var(--ease), outline-color .3s; opacity: 0; transform: translateY(24px); }
.card.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .35s var(--ease), outline-color .3s; }
.card.in.quick { transition: transform .35s var(--spring), box-shadow .35s var(--ease), outline-color .3s; animation: pop-in .35s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: scale(.97); } }
.card .media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease), filter .4s, opacity .5s; filter: saturate(.92); opacity: 0; }
.card img.ok { opacity: 1; }
.card .media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--surface) 0%, rgba(20, 23, 27, 0) 45%); pointer-events: none; }
.card .status { position: absolute; top: 12px; left: 12px; z-index: 1; display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(10, 11, 13, .84); }
.card .status:empty { display: none; }
.ribbon { position: absolute; top: 12px; right: 12px; z-index: 1; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bg); background: var(--a); padding: 4px 9px; border-radius: 7px; box-shadow: 0 6px 18px -6px var(--a); }
.card .hover-play { position: absolute; z-index: 1; right: 12px; bottom: 12px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--a); color: #0a0b0d; transform: scale(.6) translateY(10px); opacity: 0; transition: transform .35s var(--spring), opacity .25s; text-decoration: none; box-shadow: 0 8px 24px -8px var(--a); }
.card .hover-play svg { width: 20px; height: 20px; fill: currentColor; stroke: none; margin-left: 2px; }
.card .hover-play:hover { transform: scale(1.1); }
.card .info { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-family: var(--display); font-size: 22px; letter-spacing: -0.02em; font-weight: 700; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .row { margin-top: auto; padding-top: 8px; }
/* platform badges: desktop + phone, each with a check / dash / cross */
.plat { display: inline-flex; gap: 5px; margin-left: auto; align-self: center; }
.plat i { position: relative; display: grid; place-items: center; width: 26px; height: 24px; border-radius: 7px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.plat i > svg { width: 15px; height: 15px; fill: none; stroke: #c9ced6; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plat b { position: absolute; right: -5px; bottom: -5px; width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--bg, #0f1115); }
.plat b svg { width: 9px; height: 9px; fill: none; stroke: #0f1115; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.plat .p-yes b { background: var(--live, #3ddc84); }
.plat .p-ok b { background: #ffc53d; }
.plat .p-no b { background: #ff5c5c; }
.plat .p-no > svg { opacity: .45; }
.d-plat { display: grid; gap: 8px; }
.d-plat .pl { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line, rgba(255,255,255,.08)); }
.d-plat .pi svg { width: 26px; height: 26px; fill: none; stroke: #e6e9ee; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
.d-plat .pt { display: flex; flex-direction: column; line-height: 1.25; }
.d-plat .pt small { color: var(--muted, #9aa1ab); font-size: 12.5px; }
.d-plat .pm { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.d-plat .pm svg { width: 15px; height: 15px; fill: none; stroke: #0f1115; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.d-plat .p-yes .pm { background: var(--live, #3ddc84); }
.d-plat .p-ok .pm { background: #ffc53d; }
.d-plat .p-no .pm { background: #ff5c5c; }
.d-plat .p-no .pi svg { opacity: .45; }
.card .chip { background: var(--surface-2); border-color: var(--line); color: #b9bfc7; }
.card:focus-visible { outline: 2px solid var(--a); }
.card:active { transform: scale(.985); }
@media (hover: hover) {
  .card.in:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -20px var(--a), 0 8px 24px -12px rgba(0, 0, 0, .8); outline-color: color-mix(in srgb, var(--a) 60%, transparent); transition: transform .35s var(--spring), box-shadow .35s var(--ease), outline-color .3s; }
  .card:hover img.ok { transform: scale(1.06); filter: saturate(1.1); }
  .card:hover .hover-play, .card:focus-visible .hover-play { transform: none; opacity: 1; }
}
@media (hover: none) { .card .hover-play { transform: none; opacity: 1; width: 42px; height: 42px; } }
.card.skel { cursor: default; outline-color: var(--line); }
.card.skel .media, .card.skel i { background: linear-gradient(100deg, var(--surface-2) 30%, #232830 50%, var(--surface-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.card.skel .info { padding-top: 14px; gap: 10px; }
.card.skel i { display: block; height: 12px; border-radius: 6px; }
.card.skel i:first-child { height: 20px; width: 55%; } .card.skel i:nth-child(2) { width: 90%; } .card.skel i:nth-child(3) { width: 35%; margin-top: 10px; }
#apps .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
#empty, .none { text-align: center; color: var(--muted); padding: 40px 16px; margin: 0; }

/* "Jump back in" rail */
.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 10px; margin: -4px -2px 0; }
.rail::-webkit-scrollbar { display: none; }
.mini { flex: none; width: 250px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; scroll-snap-align: start; animation: pop-in .4s var(--ease) backwards; }
.mini-img { position: relative; aspect-ratio: 16 / 9; border-radius: 13px; overflow: hidden; outline: 1px solid var(--line); outline-offset: -1px; background: var(--surface-2); transition: transform .3s var(--spring), box-shadow .3s; }
.mini-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 11, 13, .35); opacity: 0; transition: opacity .25s; }
.mini-play svg { width: 44px; height: 44px; padding: 12px; border-radius: 50%; background: var(--a); color: var(--bg); fill: currentColor; stroke: none; transform: scale(.7); transition: transform .3s var(--spring); }
.mini:hover .mini-img, .mini:focus-visible .mini-img { transform: translateY(-4px); box-shadow: 0 18px 40px -18px var(--a); }
.mini:hover .mini-play, .mini:focus-visible .mini-play { opacity: 1; }
.mini:hover .mini-play svg { transform: none; }
.mini-t { display: flex; flex-direction: column; padding: 0 2px; }
.mini-t b { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.mini-t small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin: 80px auto 0; padding: 28px calc(var(--gutter) + var(--safe-r)) calc(40px + var(--safe-b)) calc(var(--gutter) + var(--safe-l)); max-width: 1480px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.foot-r { display: flex; gap: 18px; flex-wrap: wrap; }
.build { font-variant-numeric: tabular-nums; opacity: .7; }

/* ---------------------------------------------------------------- detail sheet */
#detail { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
#detail .scrim, #ios-install .scrim { position: absolute; inset: 0; background: rgba(4, 5, 6, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .3s var(--ease); transition: opacity .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: min(1080px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; background: var(--bg-2); border-radius: 24px; outline: 1px solid var(--line); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9); animation: pop .45s var(--spring); scrollbar-width: thin; scrollbar-color: #2b3038 transparent; transition: transform .3s var(--ease); }
.sheet:focus { outline: 1px solid var(--line); }
#detail.vt .sheet, #detail.vt .d-media img { animation: none; }
#detail.closing .sheet { animation: drop .24s var(--ease) forwards; }
#detail.closing .scrim { animation: fade .24s var(--ease) reverse forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(40px) scale(.96); } }
@keyframes drop { to { opacity: 0; transform: translateY(24px) scale(.98); } }
#detail.dragged.closing .sheet { animation: slide-off .24s var(--ease) forwards; }
@keyframes slide-off { to { transform: translateY(100%); } }
.grab { display: none; }
.close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(10, 11, 13, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .25s var(--spring), background .2s; }
.close:hover { transform: rotate(90deg); background: rgba(40, 44, 50, .9); }
.close svg { width: 18px; height: 18px; }
.d-media { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: #000; }
.d-media img { width: 100%; height: 100%; object-fit: cover; display: block; animation: settle 1.4s var(--ease); }
@keyframes settle { from { transform: scale(1.1); filter: blur(6px); } }
.d-fade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg-2) 2%, rgba(15, 17, 20, 0) 55%); }
.d-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; padding: 0 36px 36px; margin-top: -90px; position: relative; }
.d-main > * { animation: rise .6s var(--ease) backwards; }
.d-main > *:nth-child(2) { animation-delay: .05s; } .d-main > *:nth-child(3) { animation-delay: .1s; } .d-main > *:nth-child(4) { animation-delay: .15s; } .d-main > *:nth-child(n+5) { animation-delay: .2s; }
.d-kind { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--a); }
#d-name { margin: 6px 0 4px; font-family: var(--display); font-size: clamp(36px, 5vw, 60px); line-height: .95; letter-spacing: -0.035em; font-weight: 800; text-wrap: balance; }
.d-tag { margin: 0 0 20px; font-size: 18px; color: #c4c9d0; text-wrap: pretty; }
.d-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.play.big { font-size: 17px; padding: 15px 30px 15px 24px; border-radius: 14px; }
.play.big svg { width: 22px; height: 22px; }
.d-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.d-chips .chip:not(.new) { background: var(--surface); border-color: var(--line); }
.d-about p { margin: 0 0 14px; color: #c9ced5; font-size: 16px; line-height: 1.65; max-width: 62ch; text-wrap: pretty; }
.d-main h3 { margin: 26px 0 10px; font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.d-feat { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.d-feat li { position: relative; padding: 10px 12px 10px 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; font-size: 14px; }
.d-feat li::before { content: ''; position: absolute; left: 13px; top: 15px; width: 10px; height: 10px; border-radius: 3px; background: var(--a); transform: rotate(45deg); }
.d-side { display: flex; flex-direction: column; gap: 14px; padding-top: 96px; }
.card-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; animation: rise .6s .15s var(--ease) backwards; }
.card-panel h4 { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.big-num { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.big-num b { font-family: var(--display); font-size: 44px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.big-num span { color: var(--muted); font-size: 14px; }
.note { color: var(--muted); font-size: 13px; margin-top: 6px; }
.ms { color: var(--muted); font-weight: 500; }
.stat-line { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; border-top: 1px solid var(--line); }
.stat-line span:first-child { color: var(--muted); }
.note + .stat-line, .spark-cap + .stat-line, .state + .stat-line { margin-top: 12px; }
.spark { width: 100%; height: 56px; display: block; margin-top: 10px; overflow: visible; }
.fresh .spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s .2s var(--ease) forwards; }
.fresh .spark-fill { animation: fade 1s .5s var(--ease) backwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.spark-cap { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.state { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0; }
dt, dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
dt { color: var(--muted); padding-right: 14px; }
dd { text-align: right; overflow-wrap: anywhere; }
dl > :nth-child(-n+2) { border-top: 0; }
.d-more { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 36px 36px; }
.d-more:empty { display: none; }
.d-more button { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; min-width: 0; transition: border-color .25s, transform .25s var(--spring), background .25s; }
.d-more button:hover { border-color: color-mix(in srgb, var(--a) 55%, transparent); background: var(--surface-2); }
.d-more button:active { transform: scale(.98); }
.d-more .nx { justify-content: flex-end; text-align: right; }
.d-more svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.d-more img { width: 76px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; flex: none; }
.d-more span { display: flex; flex-direction: column; min-width: 0; }
.d-more small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.d-more b { font-family: var(--display); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-bar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px calc(12px + var(--safe-b)); background: rgba(15, 17, 20, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); transform: translateY(100%); opacity: 0; margin-top: -1px; pointer-events: none; transition: transform .35s var(--spring), opacity .2s; }
.d-bar.show { transform: none; opacity: 1; pointer-events: auto; }
.d-bar-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.d-bar-name img { width: 52px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 7px; flex: none; }
.d-bar-name b { font-family: var(--display); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-bar .play { padding: 10px 18px 10px 14px; }

/* view transitions: the cover morphs between card and sheet */
::view-transition-group(hub-cover) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(hub-cover), ::view-transition-new(hub-cover) { height: 100%; object-fit: cover; overflow: clip; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }

/* iOS "add to home screen" hint */
#ios-install { position: fixed; inset: 0; z-index: 70; display: grid; place-items: end center; padding: 16px 16px calc(16px + var(--safe-b)); }
.mini-sheet { position: relative; width: min(420px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; padding: 22px; animation: pop .4s var(--spring); }
.mini-sheet h3 { margin: 0 0 12px; font-family: var(--display); font-size: 22px; letter-spacing: -0.02em; }
.mini-sheet ol { margin: 0 0 18px; padding-left: 20px; color: #c9ced5; }
.mini-sheet li { margin-bottom: 8px; }
.mini-sheet li svg { width: 18px; height: 18px; vertical-align: -3px; color: #4ea1ff; }
.mini-sheet .ghost { width: 100%; justify-content: center; }

/* toasts */
#toasts { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 14px; background: var(--text); color: var(--bg); font-weight: 600; padding: 10px 12px 10px 18px; border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8); animation: rise .35s var(--spring); pointer-events: auto; overflow-wrap: anywhere; }
.toast:not(:has(button)) { padding-right: 18px; }
.toast button { border: 0; background: var(--accent); color: var(--bg); font-weight: 700; padding: 7px 13px; border-radius: 9px; flex: none; }
.toast.out { animation: fade .25s var(--ease) reverse forwards; }

/* ---------------------------------------------------------------- medium: hero without the side list */
@media (max-width: 1180px) {
  #hero { grid-template-columns: 1fr; }
  #hero-list { display: none; }
  #hero-dots { display: flex; }
  .hero-arrow { display: grid; }
  .slide .copy { bottom: 52px; }
}
@media (hover: none) { .hero-arrow { display: none !important; } }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 860px) {
  html { scroll-padding-top: 130px; }
  .tabs { display: none; }
  #nav { flex-wrap: wrap; gap: 10px 8px; padding-top: calc(12px + var(--safe-t)); padding-bottom: 12px; }
  #nav.tuck { transform: translateY(-100%); }
  .brand { font-size: 20px; margin-right: auto; }
  .search { order: 2; width: 100% !important; margin-left: 0; padding: 9px 12px; }
  .search kbd { display: none; }
  .search input { font-size: 16px; } /* no iOS zoom on focus */
  .icon-btn.install span { display: none; }
  .icon-btn.install { padding: 0 9px; }
  #hero { height: auto; margin-top: 12px; }
  .hero-stage { height: min(520px, 74vh); height: min(520px, 74svh); border-radius: 18px; }
  .slide::after { background: linear-gradient(0deg, rgba(10, 11, 13, .97) 12%, rgba(10, 11, 13, .55) 55%, rgba(10, 11, 13, .1)); }
  .slide .copy { left: 20px; right: 20px; bottom: 52px; }
  .slide h2 { font-size: clamp(34px, 10vw, 46px); }
  .slide p { font-size: 15px; margin-bottom: 14px; }
  .slide .row { margin-bottom: 16px; }
  .slide .row .play, .slide .row .ghost { flex: 1; justify-content: center; }
  .shelf { margin-top: 40px; }
  .shelf-head h2 { font-size: 27px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); scrollbar-width: none; scroll-snap-type: x proximity; -webkit-mask: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); mask: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent); }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { scroll-snap-align: center; padding: 8px 14px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  /* apps: a sideways rail of smaller cards */
  #apps .grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  #apps .grid::-webkit-scrollbar { display: none; }
  #apps .card { flex: none; width: min(78vw, 300px); scroll-snap-align: start; }
  .rail { margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; scroll-padding: 0 var(--gutter); }
  .mini { width: min(62vw, 230px); }
  .card h3 { font-size: 21px; }
  #detail { padding: 0; place-items: end center; }
  .sheet { max-height: 94vh; max-height: calc(100dvh - 24px - var(--safe-t)); border-radius: 22px 22px 0 0; animation-name: sheet-up; animation-duration: .45s; }
  @keyframes sheet-up { from { transform: translateY(100%); } }
  #detail.closing:not(.dragged) .sheet { animation: slide-off .26s var(--ease) forwards; }
  .grab { display: block; position: sticky; top: 0; z-index: 4; height: 0; }
  .grab::before { content: ''; position: absolute; left: 50%; top: 8px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(255, 255, 255, .45); box-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
  .close { top: 12px; right: 12px; width: 36px; height: 36px; }
  .d-media { aspect-ratio: 16 / 10; }
  .d-body { grid-template-columns: 1fr; padding: 0 20px 24px; margin-top: -60px; gap: 8px; }
  .d-side { padding-top: 12px; }
  .d-actions .play.big { flex: 1; justify-content: center; }
  .d-tag { font-size: 16px; }
  .d-about p { font-size: 15.5px; }
  .d-more { grid-template-columns: 1fr 1fr; padding: 0 20px 24px; gap: 8px; }
  .d-more img { display: none; }
  .d-bar { padding-left: 20px; padding-right: 20px; }
  footer { flex-direction: column; margin-top: 56px; }
}
@media (max-width: 400px) {
  .brand { font-size: 18px; gap: 8px; }
  .brand .mark { width: 26px; height: 26px; }
  .nav-actions { gap: 6px; }
  .icon-btn { height: 34px; min-width: 34px; padding: 0 7px; }
  .pill { height: 34px; padding: 0 11px; gap: 6px; }
  .pill em { display: none; } /* dot + player count only */
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .card, .card img { opacity: 1; transform: none; }
  #nav.tuck { transform: none; }
}

/* ---------------------------------------------------------------- lobby: who's here + chat */
.lobby-fab { position: fixed; z-index: 40; right: calc(20px + var(--safe-r)); bottom: calc(20px + var(--safe-b)); display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px 0 15px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(20, 23, 27, .95); box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .9); font-size: 14px; font-weight: 600; transition: transform .3s var(--spring), border-color .2s, background .2s, opacity .2s; animation: nudge .6s .8s var(--spring) backwards; }
.lobby-fab svg { width: 21px; height: 21px; }
.lobby-fab:hover { border-color: var(--accent); transform: translateY(-2px); }
.lobby-fab:active { transform: scale(.95); }
.lobby-fab.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.fab-here { display: flex; align-items: center; gap: 7px; }
.fab-here b { font-variant-numeric: tabular-nums; }
.fab-here em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: -3px; }
.lobby-fab.on .fab-here em { color: inherit; opacity: .7; }
.fab-unread { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--bg); font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); animation: pop .4s var(--spring); }
body.lock .lobby-fab, body.lock .lobby-peek { opacity: 0; pointer-events: none; }
.lobby-peek { position: fixed; z-index: 40; right: calc(20px + var(--safe-r)); bottom: calc(82px + var(--safe-b)); max-width: min(320px, calc(100vw - 40px)); display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .9); font-size: 14px; cursor: pointer; opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom right; pointer-events: none; transition: opacity .25s, transform .35s var(--spring); }
.lobby-peek.show { opacity: 1; transform: none; pointer-events: auto; }
.lobby { position: fixed; inset: 0; z-index: 45; pointer-events: none; }
.lobby-scrim { display: none; }
.lobby-box { position: absolute; right: calc(20px + var(--safe-r)); bottom: calc(82px + var(--safe-b)); width: 370px; height: min(580px, calc(100vh - 170px)); display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .95); overflow: hidden; pointer-events: auto; transform-origin: bottom right; animation: lobby-in .35s var(--spring); }
@keyframes lobby-in { from { opacity: 0; transform: translateY(16px) scale(.95); } }
.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.lobby-head h3 { margin: 0; font-family: var(--display); font-size: 21px; letter-spacing: -0.02em; }
.lobby-head small { color: var(--muted); font-size: 13px; }
.lobby-head .close { position: static; width: 36px; height: 36px; background: var(--surface); }
.lobby-roster { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); flex: none; }
.lobby-roster::-webkit-scrollbar { display: none; }
.gchip { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; font-weight: 600; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); animation: pop-in .3s var(--ease) backwards; }
.gchip i { width: 9px; height: 9px; border-radius: 50%; background: hsl(var(--g) 75% 62%); box-shadow: 0 0 0 3px hsl(var(--g) 75% 62% / .18); }
.gchip.me { border-color: hsl(var(--g) 60% 55% / .5); }
.lobby-log { flex: 1; margin: 0; padding: 12px 16px; list-style: none; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: #2b3038 transparent; }
.lobby-log > :first-child { margin-top: auto; }
.msg { max-width: 88%; align-self: flex-start; margin-top: 8px; }
.msg.cont { margin-top: 0; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.arrive { animation: rise .3s var(--ease); }
.mhead { display: flex; align-items: baseline; gap: 8px; margin: 0 4px 3px; font-size: 12px; }
.msg.mine .mhead { justify-content: flex-end; }
.gname { font-weight: 700; color: hsl(var(--g) 80% 70%); }
.gname small { font-weight: 500; color: var(--muted); }
.mhead time { color: var(--muted); font-variant-numeric: tabular-nums; }
.msg p { display: inline-block; margin: 0; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
.msg.cont p { border-radius: 14px; }
.msg.mine p { border-radius: 14px 4px 14px 14px; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.msg.mine.cont p { border-radius: 14px; }
.sys { align-self: center; margin: 10px 0 4px; font-size: 12px; color: var(--muted); text-align: center; }
.lobby-peek .gname { font-size: 12px; }
.lobby-form { display: flex; gap: 8px; padding: 12px 12px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; }
.lobby-form input { all: unset; flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; transition: border-color .2s; }
.lobby-form input:focus { border-color: var(--line-2); }
.lobby-form input::placeholder { color: var(--muted); }
.lobby-form button { width: 44px; border: 0; border-radius: 12px; background: var(--accent); color: var(--bg); display: grid; place-items: center; transition: transform .2s var(--spring); flex: none; }
.lobby-form button:active { transform: scale(.9); }
.lobby-form button svg { width: 19px; height: 19px; fill: currentColor; stroke-width: 1.5; }
footer { padding-bottom: calc(96px + var(--safe-b)); } /* room for the chat button */
@media (max-width: 860px) {
  .lobby-fab { right: calc(14px + var(--safe-r)); bottom: calc(14px + var(--safe-b)); height: 48px; padding: 0 15px 0 13px; }
  .fab-here em { display: none; }
  .lobby-peek { right: calc(14px + var(--safe-r)); bottom: calc(72px + var(--safe-b)); }
  .lobby { pointer-events: auto; }
  .lobby-scrim { display: block; position: absolute; inset: 0; background: rgba(4, 5, 6, .6); animation: fade .25s var(--ease); }
  .lobby-box { left: 0; right: 0; bottom: 0; width: auto; height: min(76dvh, 640px); border-radius: 22px 22px 0 0; border-bottom: 0; animation: sheet-up .4s var(--spring); }
  .lobby-form input { font-size: 16px; } /* no iOS zoom */
  body.lobby-open { overflow: hidden; }
}

/* account button + verified (logged-in) names: gold with a seal, the same colour every game uses (sso.js --sq-gold) */
.acct-btn { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px 0 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; transition: border-color .2s, background .2s; }
.acct-btn:hover { border-color: var(--line-2); }
.acct-btn svg { width: 17px; height: 17px; }
.acct-btn.in { border-color: color-mix(in srgb, var(--sq-gold, #ffc53d) 45%, transparent); background: color-mix(in srgb, var(--sq-gold, #ffc53d) 8%, var(--surface)); }
.acct-btn .sq-verified { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }
.seal { width: .95em; height: .95em; vertical-align: -.12em; margin-right: .2em; }
.seal path { fill: var(--sq-gold, #ffc53d); stroke: none; }
.seal .tick { fill: none; stroke: #1a1300; stroke-width: 1.9; }
.gname.acct, .gchip.acct { color: var(--sq-gold, #ffc53d); }
.gchip.acct { border-color: color-mix(in srgb, var(--sq-gold, #ffc53d) 40%, transparent); }
/* VIP (vip/pass/founder/venue role) names are purple, staff keep gold with a star (sso-kit/README.md) */
.gname.acct.vip, .gchip.acct.vip { color: var(--sq-vip, #b48cff); }
.gchip.acct.vip { border-color: color-mix(in srgb, var(--sq-vip, #b48cff) 40%, transparent); }
.gname.acct.staff::after, .gchip.acct.staff::after { content: ' °5'; font-size: .8em; }
@media (max-width: 860px) { .acct-btn { height: 34px; padding: 0 10px; } .acct-btn:not(.in) span { display: none; } }

/* chat @mentions: highlighted names, a glow on messages that mention you, the @ autocomplete, a ping on the chat button */
.msg p .mention { font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 5px; padding: 0 3px; }
.msg p .mention.me { color: #1a1300; background: var(--sq-gold, #ffc53d); }
.msg.mentioned p { border-color: color-mix(in srgb, var(--sq-gold, #ffc53d) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--sq-gold, #ffc53d) 40%, transparent), 0 6px 22px -8px color-mix(in srgb, var(--sq-gold, #ffc53d) 60%, transparent); }
.mention-pop { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; flex: none; }
.mention-pop button { all: unset; cursor: pointer; padding: 6px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.mention-pop button[aria-selected="true"], .mention-pop button:hover { border-color: var(--accent); color: var(--accent); }
.lobby-roster .gchip:not(.me) { cursor: pointer; }
.lobby-fab.pinged { animation: fab-ping .6s var(--spring) 3; }
@keyframes fab-ping { 50% { transform: scale(1.12) rotate(-4deg); box-shadow: 0 0 0 6px color-mix(in srgb, var(--sq-gold, #ffc53d) 45%, transparent); } }
@media (prefers-reduced-motion: reduce) { .lobby-fab.pinged { animation: none; } }

/* work in progress (catalog stage): a hazard-striped tag, so it never looks like the New badge */
.stage { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #15130f; padding: 3px 8px 3px 20px; border-radius: 4px; margin-right: 6px;
  background: linear-gradient(#f2c230, #f2c230) padding-box, #f2c230; background-image: repeating-linear-gradient(-45deg, #15130f 0 4px, transparent 4px 8px); background-size: 14px 100%; background-repeat: no-repeat; background-color: #f2c230; }
.card .wip { position: absolute; left: 12px; bottom: 12px; z-index: 1; }
.card .wip .stage { box-shadow: 0 6px 18px -6px rgba(0,0,0,.6); }
#d-chips .stage { vertical-align: middle; }

/* footer tip jar (js/app.js tipJar): hidden until the passport says the jar is on */
footer .tipjar { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; border-bottom: 1px dashed currentColor; }
footer .tipjar:hover, footer .tipjar:focus-visible { color: var(--gold, #ffc53d); }
footer .tipjar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
footer .tipjar.hidden { display: none; }

/* ---------------------------------------------------------------- admin markers (hub only, admins only) */
.offprod { display: none; position: absolute; left: 12px; bottom: 12px; z-index: 2; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffd9a8; background: rgba(10, 11, 13, .86); border: 1px dashed rgba(255, 197, 61, .55); padding: 3px 8px; border-radius: 7px; }
body.is-admin .offprod { display: inline-block; }
.admin-link { text-decoration: none; color: var(--sq-gold, #ffc53d); border-color: color-mix(in srgb, var(--sq-gold, #ffc53d) 35%, var(--line)); }
@media (max-width: 860px) { .admin-link span { display: none; } }

/* ---------------------------------------------------------------- premium layer: ambient light, grain, glass edges */
body { background: transparent; } /* html paints --bg; the ambient glow (z -1) sits between the two */
body::before { content: ''; position: fixed; inset: -20vh -10vw auto; height: 90vh; z-index: -1; pointer-events: none; background: radial-gradient(60% 55% at 30% 20%, color-mix(in srgb, var(--hero-a, var(--accent)) 16%, transparent), transparent 70%), radial-gradient(40% 40% at 85% 10%, rgba(120, 140, 255, .07), transparent 70%); transition: background 1.2s var(--ease); }
body::after { content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero-stage { box-shadow: 0 40px 90px -40px color-mix(in srgb, var(--hero-a, var(--accent)) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .07); transition: box-shadow 1.2s var(--ease); }
.hero-stage::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .12); }
.slide h2 { text-shadow: 0 6px 40px rgba(0, 0, 0, .5); }
.play { background-image: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 55%); box-shadow: 0 8px 30px -8px var(--a, var(--accent)), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .15); }
.shelf-head h2 { position: relative; padding-left: 16px; }
.shelf-head h2::before { content: ''; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px; border-radius: 4px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 20%, transparent)); box-shadow: 0 0 16px -2px var(--accent); }
.card { background: linear-gradient(180deg, color-mix(in srgb, var(--a) 5%, var(--surface)), var(--surface) 40%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.card .media::before { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .22) 48%, transparent 60%); transform: translateX(-120%); }
@media (hover: hover) {
  .card.in { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
  .card.in:hover { transform: perspective(900px) translateY(-6px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
  .card.in.tilting { transition: transform .12s linear, box-shadow .35s var(--ease), outline-color .3s; }
  .card:hover .media::before { transform: translateX(120%); transition: transform .9s var(--ease); }
}

/* ---------------------------------------------------------------- the intro (js/splash.js): only after a long break */
#splash { display: none; }
html.splash #splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; overflow: hidden; background: #07080a; cursor: pointer; animation: sp-out .6s 2.1s var(--ease) forwards; }
html.splash body { overflow: hidden; }
html.splash #nav, html.splash main { animation: sp-hub-in .9s 2.15s var(--ease) backwards; }
.sp-glow { position: absolute; inset: -30%; background: radial-gradient(32% 32% at 50% 46%, rgba(245, 130, 31, .38), rgba(245, 130, 31, .06) 55%, transparent 70%); animation: sp-glow 2.4s var(--ease) both; }
.sp-grid { position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 56px 56px; background-position: center; -webkit-mask: radial-gradient(45% 45% at 50% 46%, #000, transparent 75%); mask: radial-gradient(45% 45% at 50% 46%, #000, transparent 75%); animation: sp-grid 2.6s var(--ease) both; }
.sp-center { position: relative; display: grid; justify-items: center; gap: 18px; animation: sp-shake .4s .84s linear, sp-lift .6s 2.1s cubic-bezier(.5, 0, .75, 0) forwards; }
.sp-mark { position: relative; width: clamp(200px, 56vw, 300px); aspect-ratio: 1; display: grid; place-items: center; animation: sp-mark 1.2s var(--spring) both; }
.sp-goose { position: relative; width: 100%; height: 100%; display: block; border-radius: 50%; overflow: hidden; border: 4px solid #14100c; background: #f3e6cf url(/art/goose/goose.webp) center / cover; box-shadow: 0 6px 0 #14100c, 0 0 0 10px rgba(245, 130, 31, .16), 0 24px 70px -10px rgba(245, 130, 31, .55); transform-origin: 50% 90%; opacity: 0; animation: sp-goose-in .55s .05s var(--spring) forwards, sp-honk .55s .82s var(--ease); }
.sp-goose video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.sp-goose::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), inset 0 -18px 30px -14px rgba(0, 0, 0, .4); }
@keyframes sp-goose-in { from { opacity: 0; transform: translateY(40%) scale(.6) rotate(8deg); } to { opacity: 1; transform: none; } }
@keyframes sp-honk { 0%, 100% { transform: none; } 25% { transform: scale(1.12, .9); } 50% { transform: scale(.95, 1.06) rotate(-3deg); } 75% { transform: scale(1.02) rotate(2deg); } }
@keyframes sp-shake { 0%, 100% { translate: 0 0; } 20% { translate: -6px 2px; } 40% { translate: 5px -3px; } 60% { translate: -4px 1px; } 80% { translate: 2px -1px; } }
.sp-ring { position: absolute; inset: 8%; border-radius: 50%; border: 1.5px solid rgba(255, 176, 122, .6); opacity: 0; animation: sp-ring 1.1s .84s var(--ease) forwards; }
.sp-ring.r2 { animation-delay: 1s; border-color: rgba(245, 130, 31, .45); }
.sp-sparks { position: absolute; inset: 50% auto auto 50%; }
.sp-sparks i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #ffd2b8; box-shadow: 0 0 10px 2px rgba(255, 140, 80, .9); opacity: 0; transform: rotate(var(--r)) translateX(90px); animation: sp-spark .8s calc(.86s + var(--d) * .05s) cubic-bezier(.15, .8, .3, 1) forwards; }
.sp-word { display: flex; font-family: var(--display); font-weight: 700; font-size: clamp(36px, 8vw, 58px); letter-spacing: -0.035em; line-height: 1; color: var(--text); }
.sp-word span { display: inline-block; opacity: 0; transform: translateY(.5em) rotate(6deg); filter: blur(6px); animation: sp-letter .6s calc(1.05s + var(--i) * .04s) var(--spring) forwards; }
.sp-word span.b { color: var(--accent); font-weight: 800; }
.sp-word span.b:first-of-type { margin-left: 2px; }
.sp-tag { font-size: 12px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); opacity: 0; animation: sp-tag .7s 1.5s var(--ease) forwards; }
html.splash-skip #splash { animation: sp-out .35s var(--ease) forwards !important; }
html.splash-skip #nav, html.splash-skip main { animation: sp-hub-in .5s var(--ease) backwards !important; }
@keyframes sp-out { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes sp-hub-in { from { opacity: 0; transform: scale(.985) translateY(12px); filter: blur(6px); } }
@keyframes sp-glow { from { opacity: 0; transform: scale(.6); } 60% { opacity: 1; } }
@keyframes sp-grid { from { opacity: 0; transform: scale(1.15); } to { opacity: .5; transform: none; } }
@keyframes sp-lift { to { transform: scale(1.18) translateY(-10px); opacity: 0; filter: blur(8px); } }
@keyframes sp-mark { from { transform: scale(.7) translateY(14px); } }
@keyframes sp-pop { to { transform: none; } }
@keyframes sp-ring { 0% { opacity: .9; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes sp-spark { 0% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--r)) translateX(220px) scale(.3); } }
@keyframes sp-letter { to { opacity: 1; transform: none; filter: none; } }
@keyframes sp-tag { from { letter-spacing: .6em; } to { opacity: 1; letter-spacing: .32em; } }
@media (prefers-reduced-motion: reduce) {
  html.splash #splash { animation: sp-out .4s 1.2s linear forwards; }
  html.splash #splash *, html.splash #nav, html.splash main { animation-duration: .01s !important; animation-delay: 0s !important; }
  .card.in, .card.in:hover { transform: none; }
}

#hero.few { grid-template-columns: minmax(0, 1fr); }
#hero.few #hero-list { display: none; }
#hero.few #hero-dots { display: flex; left: auto; right: 22px; }
#hero.few .hero-arrow { display: grid; }
