:root {
  --ink: #f2f5f2;
  --dim: #a9b6a9;
  --mute: #748274;
  --blue: #107c10;
  --blue2: #3fbf3f;
  --glass: rgba(30,34,30, .55);
  --glass2: rgba(255, 255, 255, .06);
  --line: rgba(128,235,88, .16);
  --bronze: #d08a52;
  --silver: #c9d3e0;
  --gold: #f0c75e;
  --plat: #c6f28a;
  --r: 16px;
  --cabar: 64px;
  /* motion: calm ease-out for travel, a soft spring for focus, a livelier pop for things that arrive */
  --out: cubic-bezier(.2, .8, .2, 1);
  --spring: linear(0, .062, .204, .376, .548, .699, .821, .913, .976, 1.016, 1.037, 1.045, 1.045, 1.04, 1.032, 1.024, 1.017, 1.011, 1.006, 1.002, 1, .999, .998, .998, .999, 1);
  --pop: linear(0, .069, .232, .435, .638, .815, .953, 1.047, 1.102, 1.125, 1.123, 1.106, 1.082, 1.056, 1.032, 1.012, .998, .989, .985, .984, .986, .988, .992, .995, .998, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* only the root gets the colour: an opaque body would paint over the fixed z-index:-1 background */
html { background: #070907; }
html, body { margin: 0; color: var(--ink); font: 400 15px/1.45 Inter, system-ui, -apple-system, Segoe UI, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; padding-bottom: calc(var(--cabar) + env(safe-area-inset-bottom) + 8px); }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- background: the selected game's art as soft colour fields, light waves, drifting motes ---------- */
.bg { position: fixed; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 70% 0%, #145a14 0%, #0a260c 38%, #070907 75%); overflow: hidden; }
.bg-kb { position: absolute; inset: 0; animation: kb 46s ease-in-out infinite alternate; }
@keyframes kb { from { transform: none; } to { transform: scale(1.14) translate(3%, -2%) rotate(3deg); } }
.bg-l { position: absolute; left: 50%; top: 50%; width: max(150vw, 150vh); height: max(150vw, 150vh); translate: -50% -50%; opacity: 0; transition: opacity 1.6s var(--out); }
.bg-l.on { opacity: .5; }
.bg-wave { position: absolute; left: -20%; right: -20%; top: 38%; height: 70%; background:
  radial-gradient(60% 40% at 50% 50%, rgba(46,170,46,.2), transparent 70%),
  linear-gradient(180deg, transparent, rgba(7,9,7,.9) 70%);
  animation: wave 14s ease-in-out infinite alternate; }
@keyframes wave { from { transform: translateX(-4%) rotate(-2deg); } to { transform: translateX(4%) rotate(2deg); } }
.bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(130% 85% at 50% 10%, transparent 35%, rgba(7,9,7,.7) 90%), linear-gradient(180deg, rgba(7,9,7,.25), rgba(7,9,7,.15) 40%, rgba(7,9,7,.6)); }
.bg-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }

/* ---------- boot: green light gathers into the orb, the swoosh X lands, the name tracks in, then A ---------- */
.boot { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(70% 55% at 50% 40%, #0f3a12, #030403 72%); overflow: hidden; }
.boot.off { display: none; }
.boot-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.boot-c { position: relative; display: grid; justify-items: center; gap: 20px; }
.boot-sweep { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 38%, rgba(150,255,120,.10) 50%, transparent 62%); transform: translateX(-80%); animation: sweep 3.4s var(--out) 2s infinite; pointer-events: none; }
@keyframes sweep { 0% { transform: translateX(-80%); } 55%, 100% { transform: translateX(80%); } }
.boot-orb { width: min(40vw, 168px); height: auto; overflow: visible; filter: drop-shadow(0 0 18px rgba(80,220,60,.55)); }
.boot-orb .orb-fill { opacity: 0; transform-origin: 44px 44px; animation: orbin 1s var(--pop) 1.55s both; }
@keyframes orbin { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.boot-orb .orb-x { opacity: 0; transform-origin: 44px 44px; animation: orbx .9s var(--pop) 1.85s both; }
@keyframes orbx { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }
.shapes-base .sh { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: draw .8s var(--out) 1.1s forwards; }
.shapes-base .sh:nth-child(2) { animation-delay: 1.25s; } .shapes-base .sh:nth-child(3) { animation-delay: 1.35s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.boot-name { display: flex; font-weight: 800; font-size: 34px; letter-spacing: .32em; padding-left: .32em; line-height: 1.1; }
.boot-name span { display: inline-block; animation: track 1.1s var(--out) both; }
.boot-name span:nth-child(1) { --dx: -42px; animation-delay: 1.9s; } .boot-name span:nth-child(2) { --dx: -28px; animation-delay: 1.94s; }
.boot-name span:nth-child(3) { --dx: -14px; animation-delay: 1.98s; } .boot-name span:nth-child(4) { --dx: 0px; animation-delay: 2.02s; }
.boot-name span:nth-child(5) { --dx: 14px; animation-delay: 2.06s; color: #5dd62c; } .boot-name span:nth-child(6) { --dx: 28px; animation-delay: 2.1s; color: #5dd62c; }
.boot-name span:nth-child(7) { --dx: 42px; animation-delay: 2.14s; color: #5dd62c; }
@keyframes track { from { opacity: 0; transform: translateX(var(--dx)); } to { opacity: 1; transform: none; } }
/* the controller's A button: green, round, a little glossy */
.boot-x { position: relative; width: 80px; height: 80px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, #8cff5a, #2ea82e 45%, #0d5e0d 100%); box-shadow: inset 0 -4px 10px rgba(0,0,0,.45), inset 0 3px 6px rgba(255,255,255,.35), 0 8px 24px rgba(0,0,0,.6); display: grid; place-items: center; cursor: pointer; animation: xin .8s var(--pop) 2.35s both; -webkit-tap-highlight-color: transparent; }
.boot-x span { font-size: 36px; font-weight: 800; color: #fff; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.boot-x::before { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(140,255,100,.75); opacity: 0; animation: ring 2.4s var(--out) 3.1s infinite; }
.boot-x::after { content: ''; position: absolute; inset: -22px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(80,230,60,.55), transparent); opacity: .35; animation: glowp 2.4s ease-in-out 3.1s infinite; }
.boot-x:focus-visible { outline: 3px solid #fff; outline-offset: 6px; }
@keyframes xin { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@keyframes ring { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes glowp { 50% { opacity: 1; } }
.boot-hint { color: #d8ecd8; letter-spacing: .14em; font-size: 14px; font-weight: 600; text-transform: uppercase; animation: hintin .6s ease-out 2.6s backwards, hint 2.4s ease-in-out 3.2s infinite; }
@keyframes hintin { from { opacity: 0; } to { opacity: 1; } }
.abtn, .bbtn { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; font-weight: 800; font-size: .95em; color: #fff; vertical-align: -.25em; margin: 0 .15em; letter-spacing: 0; }
.abtn { background: #2ea82e; }
.bbtn { background: #d6382f; width: 30px; height: 30px; font-size: 15px; margin: 0; vertical-align: 0; }
@keyframes fadein { from { opacity: 0; } }
@keyframes hint { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
.boot-ring { position: fixed; z-index: 51; width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; border: 2px solid rgba(170,255,140,.9); pointer-events: none; animation: bring 1s var(--out) forwards; }
.boot-ring.b { animation-delay: .12s; opacity: 0; border-color: rgba(80,220,60,.7); animation-fill-mode: both; }
@keyframes bring { from { transform: scale(1); opacity: .9; } to { transform: scale(8); opacity: 0; } }
.boot-flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 45% at 50% 50%, rgba(140,255,110,.45), transparent 70%); animation: bflash .8s ease-out forwards; }
@keyframes bflash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: linear-gradient(180deg, rgba(7,9,7,.85), rgba(7,9,7,0)); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: .14em; }
.glyphs { color: #9be59b; font-size: 12px; letter-spacing: .1em; }
.tabs { display: none; gap: 22px; margin-left: 18px; }
.tabs a { position: relative; text-decoration: none; color: var(--dim); font-size: 15px; padding: 10px 0; transition: color .3s; }
.tabs a.on { color: var(--ink); font-weight: 500; }
.tabs a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px; background: #fff; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.online { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }
.online .dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #39d98a; box-shadow: 0 0 8px #39d98a; }
.online .dot.ping::after { content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid #39d98a; animation: ping 1s var(--out) forwards; }
@keyframes ping { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
.clock { font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.mute { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--glass2); cursor: pointer; transition: transform .35s var(--spring); }
.mute:active { transform: scale(.9); transition-duration: .08s; }
.mute .waves { transition: opacity .3s; }
.mute.off .waves { opacity: .15; }
.mute:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

main { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
main > * { min-width: 0; }

/* ---------- home: the row of games ---------- */
.home { padding-top: 4px; }
.mode { display: inline-block; font-size: 11px; letter-spacing: .14em; color: #ffd27a; background: rgba(255,190,70,.1); border: 1px solid rgba(255,190,70,.3); padding: 4px 10px; border-radius: 99px; margin-bottom: 4px; }
.mode.live { color: #7cf0b2; background: rgba(57,217,138,.1); border-color: rgba(57,217,138,.35); }
.row-wrap { margin: 0 -16px; }
/* Tiles are laid out by main.js: every tile is drawn at its focused size and scaled down when not focused,
   so focus is a scale + translate (no layout), and re-sorts glide instead of jumping. */
.row { --t: 72; --tp: 84; --ts: 104; --tps: 112; --gap: 10; --pad: 16; --rad: 18px;
  position: relative; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; padding: 12px 0 18px; }
.row::-webkit-scrollbar { display: none; }
.track { position: relative; height: calc(var(--tps) * 1px); }
.tile { position: absolute; left: 0; bottom: 0; z-index: 1; width: calc(var(--ts) * 1px); height: calc(var(--ts) * 1px); transform-origin: 0 100%; border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: translate .62s var(--out), scale .6s var(--spring); }
.tile.pin { width: calc(var(--tps) * 1px); height: calc(var(--tps) * 1px); }
.tile.sel { z-index: 3; }
.tile .art { position: absolute; inset: 0; border-radius: var(--rad); overflow: hidden; background: #141814; transition: transform .35s var(--spring); }
.tile:active .art { transform: scale(.95); transition-duration: .08s; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 17px; background: linear-gradient(135deg, var(--a, #1f7a1f), var(--b, #0b230d)); }
.tile .gl { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 32%, rgba(255,255,255,.32) 50%, transparent 68%); transform: translateX(-130%); pointer-events: none; }
/* focus ring and the soft light under the focused tile */
.tile::before { content: ''; position: absolute; inset: -5px; z-index: 2; border-radius: calc(var(--rad) + 5px); border: 2.5px solid #fff; opacity: 0; transition: opacity .3s; pointer-events: none; }
.tile::after { content: ''; position: absolute; inset: 2px; z-index: -1; border-radius: var(--rad); box-shadow: 0 0 26px 3px rgba(88,235,61,.5), 0 14px 30px rgba(0,0,0,.6); opacity: 0; transition: opacity .45s; }
.tile.sel::before { opacity: 1; }
.tile.sel::after { opacity: 1; animation: tglow 3.2s ease-in-out .6s infinite; }
@keyframes tglow { 50% { opacity: .5; } }
.tile:focus-visible { outline: none; }
.tile:focus-visible::before { opacity: 1; border-color: #9be59b; }
.tile .tbar { position: absolute; left: 9px; right: 9px; bottom: 9px; z-index: 1; height: 5px; border-radius: 5px; background: rgba(0,0,0,.55); overflow: hidden; }
.tile .tbar i, .bar i { position: relative; display: block; height: 100%; width: 100%; overflow: hidden; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .9s var(--out); }
.tile .tbar i { background: #fff; }
.tile.sel .tbar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(64,235,44,.85), transparent); animation: shim 1.9s ease-in-out infinite; }
@keyframes shim { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.tile .pl { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; padding: 3px 7px; border-radius: 7px; background: rgba(16,124,16,.88); }
.tile .stk { position: absolute; top: 7px; right: 7px; font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 5px; background: rgba(0,0,0,.6); color: #ffd27a; }
/* the "＋ Create" tile: a dashed empty slot that fills with console blue when it takes focus */
.tile.create .art { display: grid; place-items: center; align-content: center; gap: 4px; background: rgba(255,255,255,.08); border: 2px dashed rgba(160,235,110,.5); color: #e3f5e3; transition: transform .35s var(--spring), background-color .45s, border-color .45s; }
.tile.create .plus { font-size: 40px; line-height: 1; font-weight: 300; }
.tile.create .cl { font-size: 15px; font-weight: 600; letter-spacing: .06em; }
.tile.create.sel .art { background: rgba(16,124,16,.32); border-style: solid; border-color: rgba(160,235,110,.75); }
.tile.create.sel .plus { animation: plusin .7s var(--pop); }
@keyframes plusin { from { transform: rotate(-90deg) scale(.6); opacity: .4; } }
/* a coin that just bonded: the bar fills, the ring flashes platinum, then the tile leaves */
.tile.installed::before { opacity: 1; border-color: var(--plat); animation: instring 1.3s var(--out); }
.tile.installed .tbar i { background: linear-gradient(90deg, var(--plat), #fff); }
.tile.installed .art::after { content: 'INSTALLED'; position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: .12em; padding: 4px 8px; border-radius: 7px; background: rgba(135,235,93,.95); color: #062006; animation: badge .6s var(--pop) .25s both; }
.tile.installed .art::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle, rgba(255,255,255,.85), rgba(135,235,93,.3) 60%, transparent); opacity: 0; animation: iflash .9s ease-out; }
@keyframes instring { 0% { transform: scale(1.12); opacity: 0; } 40% { opacity: 1; } 100% { transform: none; } }
@keyframes badge { from { opacity: 0; transform: scale(.6); } }
@keyframes iflash { 15% { opacity: 1; } 100% { opacity: 0; } }

/* sparks (fx.js) */
.sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 5; pointer-events: none; }
.sparks i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 1px rgba(135,235,93,.9); animation: spark .85s var(--out) both; }
.sparks.gold i { box-shadow: 0 0 6px 1px rgba(240,199,94,.9); }
@keyframes spark { from { transform: rotate(var(--a)) translateX(4px) scale(1.2); opacity: 1; } to { transform: rotate(var(--a)) translateX(var(--d)) scale(0); opacity: 0; } }

.hero { padding: 2px 0 4px; min-height: 236px; }
.hero-kicker { font-size: 11px; letter-spacing: .16em; color: var(--dim); text-transform: uppercase; }
.hero-title { margin: 2px 0 2px; font-weight: 300; font-size: 34px; line-height: 1.1; letter-spacing: .01em; overflow-wrap: anywhere; }
.hero-sub { color: var(--dim); font-size: 14px; min-height: 20px; overflow-wrap: anywhere; }
.install { margin: 14px 0 14px; max-width: 520px; }
.install-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); margin-bottom: 6px; }
.install-top b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; transition: box-shadow .6s; }
.bar i { border-radius: 6px; background: linear-gradient(90deg, #5dc21e, #fff); }
.hero:not(.done) .bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); animation: shim 2.2s ease-in-out infinite; }
.hero.done .bar i { background: linear-gradient(90deg, var(--plat), #fff); }
.hero.done .bar { box-shadow: 0 0 14px rgba(135,235,93,.45); }
.install-meta { margin-top: 6px; font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.hero-btns { display: flex; gap: 10px; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 99px; text-decoration: none; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: transform .4s var(--spring), box-shadow .3s, opacity .3s; }
.btn:active { transform: scale(.94); transition-duration: .08s; }
/* the focus ring a controller-driven UI draws around the button you're on */
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px #070907, 0 0 0 5px #fff, 0 0 24px rgba(96,235,66,.65); }
.btn.play { background: #fff; color: #062006; overflow: hidden; isolation: isolate; }
.btn.play::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 38%, rgba(72,235,50,.35) 50%, transparent 62%); transform: translateX(-130%); animation: shine 6s ease-in-out 2.5s infinite; }
@keyframes shine { 0%, 72% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.btn.ghost { background: var(--glass2); border: 1px solid var(--line); color: var(--ink); }
.btn[aria-disabled="true"], .btn:disabled { opacity: .45; pointer-events: none; }
.btn[aria-disabled="true"]::after { animation: none; }
@media (hover: hover) {
  .btn.play:hover { box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 8px 26px rgba(72,235,50,.35); }
  .btn.ghost:hover, .btn.copy:hover { background: rgba(255,255,255,.1); }
}

.ticker { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; padding: 8px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); overflow: hidden; }
.ticker-k { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: #062006; background: #9be59b; padding: 2px 7px; border-radius: 5px; flex: 0 0 auto; }
.ticker-in { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-run { display: inline-flex; gap: 18px; white-space: nowrap; font-size: 13px; color: var(--dim); }
.ticker-run span b { color: var(--ink); font-weight: 600; }
.ticker-run span.just { animation: tkin .7s var(--out) both; }
.ticker-run span.just b { animation: flash 1.6s; }
@keyframes tkin { from { opacity: 0; } }
@keyframes flash { 0%, 30% { color: #9be59b; } 100% { color: var(--ink); } }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); min-width: 0; }
.card .k { font-size: 10px; letter-spacing: .14em; color: var(--dim); }
.card .v { font-size: 24px; font-weight: 600; margin: 4px 0 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; transform-origin: 0 50%; }
.card .v.bump { animation: vbump .7s var(--pop); }
@keyframes vbump { 30% { transform: scale(1.12); color: #fff; text-shadow: 0 0 18px rgba(96,235,66,.8); } }
.card .s { font-size: 12px; color: var(--mute); }
.card.curve { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(16,124,16,.28), rgba(30,34,30,.55)); }
.card.curve .v { font-size: 28px; }
.card.clocks { grid-column: 1 / -1; display: flex; gap: 12px; }
.clk { flex: 1; min-width: 0; }
.clk b { display: block; font-size: 17px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* ---------- panels ---------- */
.panel { margin: 14px 0; }
.panel-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.panel-h h2 { margin: 0; font-size: 18px; font-weight: 500; }
.panel-h span { font-size: 12px; color: var(--mute); }
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.player { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); min-width: 0; overflow: hidden; }
.player.lead { border-color: rgba(240,199,94,.55); background: linear-gradient(135deg, rgba(240,199,94,.18), rgba(30,34,30,.55)); }
.player.lead::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 36%, rgba(255,226,150,.24) 50%, transparent 64%); transform: translateX(-120%); animation: lshine 5.5s ease-in-out 1s infinite; }
@keyframes lshine { 0%, 66% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.player.join { animation: join .75s var(--pop) both; }
@keyframes join { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.player.join::before { content: ''; position: absolute; left: 25px; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: radial-gradient(closest-side, rgba(72,235,50,.55), rgba(72,235,50,0)); animation: ripple 1.1s var(--out) .1s both; pointer-events: none; }
@keyframes ripple { from { transform: scale(.4); opacity: 1; } to { transform: scale(7); opacity: 0; } }
.av { position: relative; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.player.join .av { animation: avin .9s var(--pop) .1s both; }
@keyframes avin { from { transform: rotate(-90deg) scale(.4); } }
.av .crown { position: absolute; top: -8px; left: 50%; width: 16px; height: 11px; margin-left: -8px; color: var(--gold); filter: drop-shadow(0 0 4px rgba(240,199,94,.7)); }
.pn { min-width: 0; }
.pn b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn span { display: inline-block; font-size: 11px; color: var(--dim); transform-origin: 0 50%; }
.pn span.bump { animation: lvbump .7s var(--pop); }
@keyframes lvbump { 30% { transform: scale(1.18); color: #fff; } }
.player.lead .pn span { color: var(--gold); }
.empty { grid-column: 1 / -1; padding: 16px; border-radius: 14px; border: 1px dashed var(--line); color: var(--dim); font-size: 13px; }

.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fi { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); min-width: 0; overflow: hidden; }
.fi .ti { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); }
.fi .tx { min-width: 0; flex: 1; }
.fi .tx b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi .tx span { display: block; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi .ago { font-size: 11px; color: var(--mute); flex: 0 0 auto; }
.fi.mine { border-color: rgba(16,124,16,.6); background: linear-gradient(135deg, rgba(16,124,16,.25), rgba(30,34,30,.55)); }
.fi.in { animation: fin .6s var(--out) both; }
.fi.in::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(96,235,66,.22), transparent 70%); animation: fglow 2.4s ease-out forwards; }
@keyframes fin { from { opacity: 0; transform: translateY(-8px); } }
@keyframes fglow { to { opacity: 0; } }
.fi.link { cursor: pointer; }

/* trophy icon */
.cup { width: 22px; height: 22px; }
.cup.bronze { color: var(--bronze); } .cup.silver { color: var(--silver); } .cup.gold { color: var(--gold); } .cup.platinum { color: var(--plat); }

/* ---------- toasts: the console's achievement pop, bottom centre, above the CA bar ---------- */
.toasts { position: fixed; z-index: 47; bottom: max(calc(var(--cabar) + env(safe-area-inset-bottom) + 14px), var(--toast-floor, 0px)); left: 10px; right: 10px; display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; pointer-events: none; }
.toast { --tc: #2ea82e; position: relative; pointer-events: auto; width: min(400px, 100%); display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 40px; background: rgba(22,24,22,.96); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 14px 40px rgba(0,0,0,.6); overflow: hidden; }
.toast.gold { --tc: #2ea82e; }
.toast.silver { --tc: #2ea82e; }
.toast.bronze { --tc: #2ea82e; }
.toast.platinum { --tc: #b6ff6a; border-color: rgba(182,255,106,.45); box-shadow: 0 14px 40px rgba(0,0,0,.6), 0 0 26px rgba(120,230,60,.25); }
.toast .ti { position: relative; flex: 0 0 auto; width: 48px; height: 48px; }
.toast .ic { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--tc); color: #fff; }
.toast.platinum .ic { background: radial-gradient(circle at 35% 30%, #d8ff9a, #3fbf1f 60%, #107c10); color: #0b2a07; }
.toast .ic .cup { width: 26px; height: 26px; color: inherit; }
.toast .ic img { width: 100%; height: 100%; object-fit: cover; }
.toast .ic .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: linear-gradient(135deg, var(--a, #1f7a1f), var(--b, #0b230d)); }
.toast .glint { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.8) 50%, transparent 70%); transform: translateX(-140%); animation: glint .85s ease-in-out .5s; pointer-events: none; }
.toast.platinum .glint { animation: glint .85s ease-in-out .5s, glint .85s ease-in-out 1.9s; }
@keyframes glint { from { transform: translateX(-140%); } to { transform: translateX(140%); } }
.toast .ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); overflow: visible; color: var(--tc); pointer-events: none; }
.toast .ring circle { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: draw .9s var(--out) .15s forwards; }
.toast.platinum .ti::before { content: ''; position: absolute; inset: -22px; border-radius: 50%; background: radial-gradient(closest-side, rgba(182,255,106,.75), rgba(182,255,106,0)); opacity: 0; animation: bloom 1.1s var(--out) .15s; pointer-events: none; }
@keyframes bloom { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5); } }
.toast .tx { min-width: 0; }
.toast .tx small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast.platinum .tx small { color: #b6ff6a; }
.toast .tx b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast .tx span { display: block; font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast .tl { position: absolute; left: 66px; right: 24px; bottom: 0; height: 2px; border-radius: 2px; background: var(--tc); opacity: .55; transform-origin: 0 50%; animation: tl var(--life, 5s) linear forwards; }
@keyframes tl { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* a friend coming online is quieter: no ring, no glint */
.toast.soft { background: rgba(26,28,26,.96); border-color: rgba(255,255,255,.08); }
.toast.soft .ic { background: none; }
.toast.soft .tl { background: #9be59b; opacity: .3; }

/* ---------- Showcase overlay ---------- */
.sop { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: radial-gradient(90% 70% at 50% 30%, #0f5a12, #030403); padding: 20px 16px calc(var(--cabar) + 20px); overflow: hidden; }
.sop-bg { position: absolute; inset: 0; animation: kb 30s ease-in-out infinite alternate; }
.sop-bg canvas { position: absolute; left: 50%; top: 50%; width: max(150vw, 150vh); height: max(150vw, 150vh); translate: -50% -50%; opacity: 0; transition: opacity 1.4s var(--out); }
.sop-bg canvas.on { opacity: .6; }
.sop::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(90% 70% at 50% 45%, transparent 30%, rgba(3,4,3,.85)); }
.sop-streak { position: absolute; left: 0; width: 45%; height: 1px; z-index: 1; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(136,235,94,.95), transparent); animation: streak 1.5s var(--out) both; }
@keyframes streak { from { transform: translateX(-110%); opacity: 0; } 20% { opacity: 1; } to { transform: translateX(240%); opacity: 0; } }
.sop-in { position: relative; z-index: 2; width: min(720px, 100%); text-align: center; }
.sop-k { font-size: 13px; letter-spacing: .3em; color: #9be59b; margin-bottom: 16px; animation: fadeup .9s var(--out) .2s both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } }
.sop-stage { position: relative; min-height: 300px; display: grid; place-items: center; }
.sop-card { grid-area: 1 / 1; position: relative; }
.sop-card .art { position: relative; width: 150px; height: 150px; margin: 0 auto; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.12); background: #141814; }
.sop-card .art img { width: 100%; height: 100%; object-fit: cover; display: block; animation: kbimg var(--per, 12s) linear both; }
.sop-card .art .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 22px; background: linear-gradient(135deg, var(--a, #1f7a1f), var(--b, #0b230d)); }
@keyframes kbimg { from { transform: scale(1); } to { transform: scale(1.12); } }
.sop-card .rk { margin-top: 18px; font-size: 12px; letter-spacing: .2em; color: var(--dim); }
.sop-card h3 { margin: 4px 0; font-size: 34px; font-weight: 300; overflow-wrap: anywhere; }
.sop-card p { margin: 0; color: var(--dim); }
.sop-card .big { position: absolute; z-index: -1; left: 50%; top: -30px; translate: -50% 0; font-size: 210px; line-height: 1; font-weight: 200; color: rgba(128,235,88,.08); pointer-events: none; }
.sop-title h3 { font-size: 44px; font-weight: 200; letter-spacing: .06em; margin: 0 0 8px; }
.sop-title h3 span { display: inline-block; white-space: pre; animation: chin .9s var(--out) both; animation-delay: calc(var(--i) * 45ms + .35s); }
@keyframes chin { from { opacity: 0; transform: translateY(16px) scale(.92); } to { opacity: 1; transform: none; } }
.sop-title p { animation: fadeup .9s var(--out) 1s both; }
.sop-dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.sop-dots i { position: relative; width: 22px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.2); overflow: hidden; }
.sop-dots i b { position: absolute; inset: 0; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
.sop-dots i.done b { transform: none; }
.sop-dots i.on b { animation: dotfill var(--per, 10s) linear forwards; }
@keyframes dotfill { from { transform: scaleX(0); } to { transform: none; } }

/* ---------- CA bar ---------- */
.cabar { position: fixed; z-index: 46; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: rgba(7,9,7,.92); border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.ca { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); }
.ca-k { font-size: 10px; letter-spacing: .14em; color: var(--dim); }
.ca code { font: 500 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.btn.copy { background: var(--glass2); border: 1px solid var(--line); padding: 0 16px; }
.btn.buy { padding: 0 20px; }

.foot { color: var(--mute); font-size: 12px; padding: 18px 0 8px; border-top: 1px solid var(--line); margin-top: 18px; }
.foot a { color: var(--dim); }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .tabs { display: flex; }
  main { display: grid; grid-template-columns: 1fr 340px; column-gap: 24px; padding: 0 28px; }
  .home, .cards { grid-column: 1; }
  #players { grid-column: 2; grid-row: 1 / span 2; margin-top: 44px; }
  #activity { grid-column: 1 / -1; }
  .foot { grid-column: 1 / -1; }
  .row-wrap { margin: 0 -8px; }
  .row { --t: 96; --tp: 110; --ts: 150; --tps: 160; --gap: 14; --pad: 8; --rad: 24px; padding: 14px 0 22px; }
  .tile .tbar { left: 12px; right: 12px; bottom: 12px; height: 6px; }
  .tile .pl { top: 10px; left: 10px; font-size: 13px; }
  .tile .stk { font-size: 12px; }
  .tile.create .plus { font-size: 56px; } .tile.create .cl { font-size: 19px; }
  .hero-title { font-size: 52px; }
  .hero { min-height: 270px; }
  .cards { grid-template-columns: 1.4fr 1fr 1fr; }
  .card.curve { grid-column: auto; }
  .card.clocks { grid-column: 1 / -1; }
  .players { grid-template-columns: 1fr 1fr; max-height: 620px; overflow: auto; }
  .feed { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .toasts { bottom: max(104px, var(--toast-floor, 0px)); }
  .toast { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(22,24,22,.9); }
  .cabar { left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); width: min(760px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 18px; }
  body { padding-bottom: 96px; }
  .sop-card .art { width: 190px; height: 190px; border-radius: 28px; }
  .sop-card .big { font-size: 280px; top: -50px; }
}

/* ---------- pump.fun livestream (?stream=1): one fixed 16:9 screen ---------- */
body.stream { padding-bottom: 0; overflow: hidden; height: 100vh; }
body.stream .boot, body.stream .foot, body.stream .tabs, body.stream .mute { display: none; }
body.stream main { display: grid; grid-template-columns: 1fr 360px; grid-template-rows: auto 1fr; column-gap: 24px; max-width: none; height: calc(100vh - 70px - 74px); padding: 0 28px; }
body.stream .home { grid-column: 1; grid-row: 1; }
body.stream .cards { grid-column: 1; grid-row: 2; grid-template-columns: 1.4fr 1fr 1fr; align-content: start; }
body.stream .card.curve { grid-column: auto; }
body.stream #players { grid-column: 2; grid-row: 1 / span 2; margin: 0; overflow: hidden; }
body.stream .players { grid-template-columns: 1fr 1fr; }
body.stream #activity { display: none; }
body.stream .row-wrap { margin: 0 -8px; }
body.stream .row { --t: 96; --tp: 110; --ts: 150; --tps: 160; --gap: 14; --pad: 8; --rad: 24px; padding: 14px 0 22px; }
body.stream .tile .tbar { left: 12px; right: 12px; bottom: 12px; height: 6px; }
body.stream .tile .pl { top: 10px; left: 10px; font-size: 13px; }
body.stream .tile.create .plus { font-size: 56px; } body.stream .tile.create .cl { font-size: 19px; }
body.stream .hero-title { font-size: 52px; }
body.stream .toasts { bottom: max(100px, var(--toast-floor, 0px)); }
body.stream .cabar { left: 50%; right: auto; bottom: 12px; transform: translateX(-50%); width: min(820px, calc(100% - 32px)); border-radius: 18px; border: 1px solid var(--line); }

/* lighter on phones and for reduced motion */
@media (max-width: 899px) {
  .card { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(24,28,24,.82); }
  .bg-wave { animation: none; }
}
/* ---------- XBOXPAD skin: the dashboard's square tiles, flat panels, green accents ---------- */
html, body { font-family: 'Segoe UI Variable Text', 'Segoe UI', Inter, system-ui, -apple-system, sans-serif; }
:root { --r: 8px; }
.bg { background: radial-gradient(120% 80% at 75% -5%, #1d6b1d 0%, #0b2a0d 34%, #070907 72%); }
.brand { gap: 10px; letter-spacing: .12em; font-weight: 800; }
.gpic { width: 30px; height: 30px; display: block; filter: drop-shadow(0 0 8px rgba(80,220,60,.45)); }
.gpic svg { width: 100%; height: 100%; display: block; }
.tabs a.on::after { background: #5dd62c; height: 3px; }
.online .dot { background: #5dd62c; box-shadow: 0 0 8px #5dd62c; }
.online .dot.ping::after { border-color: #5dd62c; }
.online-k { color: var(--mute); font-size: 12px; }
.mute { border-radius: 8px; }
.mode { border-radius: 4px; }
.mode.live { color: #b6ff6a; background: rgba(93,214,44,.12); border-color: rgba(93,214,44,.4); }
/* tiles: squarer corners, a thick white focus frame, the green glow under it */
.row { --rad: 6px; }
.tile::before { inset: -6px; border-radius: calc(var(--rad) + 5px); border-width: 3px; }
.tile::after { box-shadow: 0 0 28px 3px rgba(80,220,60,.45), 0 14px 30px rgba(0,0,0,.65); }
.tile .tbar { left: 0; right: 0; bottom: 0; height: 5px; border-radius: 0 0 var(--rad) var(--rad); }
.tile .tbar i { background: #5dd62c; }
.tile.sel .tbar i::after { background: linear-gradient(90deg, transparent, rgba(220,255,200,.9), transparent); }
.tile .pl { border-radius: 3px; background: rgba(16,124,16,.92); }
.tile .mk { border-radius: 3px; background: rgba(93,214,44,.95); color: #082207; }
.tile.create .art { background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.18); }
.tile.create.sel .art { background: rgba(16,124,16,.55); border-color: rgba(200,255,180,.6); }
.tile.installed::before { border-color: #b6ff6a; }
.tile.installed .art::after { content: 'READY TO START'; border-radius: 3px; background: rgba(182,255,106,.95); color: #082207; }
.tile.installed .tbar i { background: linear-gradient(90deg, #5dd62c, #d8ff9a); }
/* hero */
.hero-kicker { color: #8fdc6a; font-weight: 600; }
.hero-title { font-weight: 700; letter-spacing: -.01em; }
.bar { height: 5px; border-radius: 0; background: rgba(255,255,255,.14); }
.bar i { border-radius: 0; background: linear-gradient(90deg, #107c10, #5dd62c); }
.hero.done .bar i { background: linear-gradient(90deg, #5dd62c, #d8ff9a); }
/* buttons: square-ish, green primary like the console's A action */
.btn { border-radius: 4px; }
.btn.play { background: #107c10; color: #fff; }
.btn.play::after { background: linear-gradient(105deg, transparent 38%, rgba(200,255,170,.35) 50%, transparent 62%); }
.btn:focus-visible { box-shadow: 0 0 0 3px #070907, 0 0 0 6px #fff, 0 0 24px rgba(80,220,60,.6); }
@media (hover: hover) { .btn.play:hover { background: #138a13; box-shadow: 0 0 0 2px rgba(255,255,255,.5), 0 8px 26px rgba(80,220,60,.35); } }
.ticker, .card, .player, .fi, .empty, .ca { border-radius: 8px; }
.ticker-k { border-radius: 3px; background: #5dd62c; color: #082207; }
.card { background: rgba(28,32,28,.6); border-color: rgba(255,255,255,.08); }
.card.curve { background: linear-gradient(135deg, rgba(16,124,16,.42), rgba(28,32,28,.6)); }
.card .v.bump { animation: vbump .7s var(--pop); }
@keyframes vbump { 30% { transform: scale(1.12); color: #fff; text-shadow: 0 0 18px rgba(93,214,44,.85); } }
.player { background: rgba(28,32,28,.6); border-color: rgba(255,255,255,.08); }
.player.lead { border-color: rgba(93,214,44,.6); background: linear-gradient(135deg, rgba(16,124,16,.35), rgba(28,32,28,.6)); }
.player.lead::after { background: linear-gradient(105deg, transparent 36%, rgba(200,255,170,.2) 50%, transparent 64%); }
.player.lead .pn span { color: #8fdc6a; }
.av { font-weight: 800; font-size: 16px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.3), 0 0 0 2px rgba(93,214,44,.0); }
.player.lead .av { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 0 0 2px #5dd62c; }
.av .crown { color: #b6ff6a; filter: drop-shadow(0 0 4px rgba(150,255,100,.7)); }
.fi { background: rgba(28,32,28,.6); border-color: rgba(255,255,255,.08); }
.fi.mine { border-color: rgba(93,214,44,.45); background: linear-gradient(135deg, rgba(16,124,16,.3), rgba(28,32,28,.6)); }
.fi .ti { border-radius: 50%; background: #107c10; }
.fi .ti .cup { color: #fff; }
.fi .ti .cup.platinum { color: #d8ff9a; }
.fi .fr { flex: 0 0 auto; display: grid; justify-items: end; gap: 2px; }
.fi .gs { font-size: 12px; font-weight: 700; color: #b6ff6a; font-variant-numeric: tabular-nums; }
.cabar { background: rgba(7,9,7,.94); border-top-color: rgba(255,255,255,.08); }
.sop { background: radial-gradient(90% 70% at 50% 30%, #145a14, #030403); }
.sop-k { color: #8fdc6a; font-weight: 700; }
.sop-title h3 { font-weight: 700; letter-spacing: .02em; }
.sop-card h3 { font-weight: 600; }
.sop-card .art { border-radius: 8px; }
.sop-card .big { color: rgba(140,255,110,.07); font-weight: 800; }
.sop-dots i b { background: #5dd62c; }
@media (min-width: 900px) {
  .row { --rad: 8px; }
  .cabar { border-radius: 10px; border-color: rgba(255,255,255,.1); }
  .sop-card .art { border-radius: 10px; }
}
body.stream .row { --rad: 8px; }
@media (max-width: 899px) {
  .card, .player, .fi { background: rgba(24,28,24,.86); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .bg-fx, .boot-fx, .shapes-gl, .boot-sweep, .sop-streak, .sparks { display: none; }
  .boot-orb .orb-fill, .boot-orb .orb-x { opacity: 1; }
}
