:root {
  --bg: #0b6e99;
  --bg-2: #075985;
  --side: #082f49;
  --side-2: #0c4a6e;
  --card: #ffffff;
  --card-2: #eef8f6;
  --ink: #0f2a3d;
  --ink-2: #557085;
  --line: #d4e9e6;
  --primary: #0ea5e9;
  --primary-d: #0369a1;
  --green: #22c55e;
  --green-d: #15803d;
  --teal: #14b8a6;
  --teal-d: #0f766e;
  --red: #ef4444;
  --red-d: #b91c1c;
  --gold: #fbbf24;
  --gold-d: #b7791f;
  --purple: #6366f1;
  --purple-d: #4338ca;
  --nav-ink: #9cc7dd;
  --on-bg-2: #d3eef9;
  --radius: 16px;
  --shadow: 0 6px 0 rgba(0, 0, 0, .14);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 700;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.09) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(134,239,172,.10) 0 3px, transparent 4px),
    linear-gradient(165deg, #0e86b8 0%, #0b6e99 45%, #0a5f7a 100%);
  background-size: 48px 48px, 72px 72px, 100% 100%;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 900; line-height: 1.15; }
.boot { color: #fff; display: grid; place-items: center; height: 100vh; font-size: 1.4rem; font-weight: 900; }
.muted { color: var(--ink-2); }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons ---------- */
.btn {
  --c: var(--primary); --cd: var(--primary-d);
  appearance: none; border: 0; cursor: pointer;
  background: var(--c); color: #fff;
  font-weight: 900; font-size: 1rem; letter-spacing: .01em;
  padding: 11px 18px 12px; border-radius: 12px;
  box-shadow: 0 5px 0 var(--cd);
  transform: translateY(0); transition: transform .06s, box-shadow .06s, filter .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--cd); }
.btn:disabled { filter: grayscale(.7) opacity(.6); cursor: not-allowed; transform: none; }
.btn.green { --c: var(--green); --cd: var(--green-d); }
.btn.red { --c: var(--red); --cd: var(--red-d); }
.btn.gold { --c: var(--gold); --cd: var(--gold-d); color: #4a3200; }
.btn.purple { --c: var(--purple); --cd: var(--purple-d); }
.btn.blue { --c: var(--primary); --cd: var(--primary-d); }
.btn.teal { --c: var(--teal); --cd: var(--teal-d); }
.btn.ghost { --c: var(--card-2); --cd: #bcdcd7; color: var(--ink); }
.btn.small { min-height: 36px; padding: 6px 12px 7px; font-size: .9rem; border-radius: 10px; box-shadow: 0 4px 0 var(--cd); }
.btn.block { width: 100%; }
.icon-btn { appearance: none; border: 0; background: transparent; cursor: pointer; padding: 8px; border-radius: 10px; display: inline-grid; place-items: center; color: inherit; }
.icon-btn:hover { background: rgba(255,255,255,.12); }

/* ---------- forms ---------- */
[hidden] { display: none !important; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .9rem; font-weight: 800; color: var(--ink-2); }
.input, select.input {
  width: 100%; border: 3px solid var(--line); background: #fff; border-radius: 12px;
  padding: 11px 14px; font-size: 1rem; font-weight: 700; outline: none; min-height: 48px;
}
.input:focus { border-color: var(--primary); }
.hint { font-size: .82rem; color: var(--ink-2); }
.err { color: var(--red); font-size: .92rem; min-height: 1.2em; }

/* ---------- layout ---------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
  background: var(--side); color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.15);
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.3rem; color: #fff; text-decoration: none; letter-spacing: .01em; }
.logo svg { width: 34px; height: 34px; }
.topbar .spacer { flex: 1; }
.token-pill {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.25);
  color: #fff; padding: 6px 12px 6px 8px; border-radius: 999px; font-weight: 900; font-variant-numeric: tabular-nums;
}
.main { padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 24px); max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; color: #fff; }
.page-head h1 { font-size: 1.7rem; text-shadow: 0 3px 0 rgba(0,0,0,.18); }

.bottomnav {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--side); padding: 6px 4px calc(6px + var(--safe-b));
  box-shadow: 0 -4px 0 rgba(0,0,0,.15);
}
.bottomnav a {
  display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--nav-ink);
  font-size: .72rem; font-weight: 800; padding: 6px 2px; border-radius: 12px; position: relative;
}
.bottomnav a svg { width: 26px; height: 26px; }
.bottomnav a.active { color: #fff; background: var(--side-2); }

.badge {
  background: var(--red); color: #fff; font-size: .7rem; font-weight: 900; border-radius: 999px;
  min-width: 19px; height: 19px; padding: 0 5px; display: inline-grid; place-items: center; line-height: 1;
}
.bottomnav .badge { position: absolute; top: 2px; right: calc(50% - 22px); }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 236px 1fr; }
  .topbar, .bottomnav { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
    background: var(--side); color: #fff; padding: 18px 12px; box-shadow: 4px 0 0 rgba(0,0,0,.15); overflow-y: auto;
  }
  .sidebar .logo { padding: 4px 10px 16px; font-size: 1.45rem; }
  .sidebar nav { display: grid; gap: 4px; }
  .sidebar nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
    color: var(--nav-ink); text-decoration: none; font-weight: 800; font-size: 1.02rem;
  }
  .sidebar nav a svg { width: 24px; height: 24px; flex: none; }
  .sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
  .sidebar nav a.active { background: var(--side-2); color: #fff; box-shadow: inset 4px 0 0 #4ade80; }
  .sidebar nav a .badge { margin-left: auto; }
  .sidebar .side-foot { margin-top: auto; display: grid; gap: 10px; padding: 10px 4px 0; }
  .main { padding: 24px 28px 48px; }
}

/* ---------- cards & grids ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 1.2rem; margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.cols { display: grid; gap: 16px; }
@media (min-width: 720px) { .cols.two { grid-template-columns: 1fr 1fr; } .cols.side { grid-template-columns: 1.4fr 1fr; } }

.grid-items { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
@media (min-width: 600px) { .grid-items { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; } }

.tile {
  position: relative; appearance: none; border: 0; cursor: pointer; text-align: center;
  background: var(--card); border-radius: 14px; padding: 8px 6px 9px;
  box-shadow: 0 5px 0 rgba(0,0,0,.12), inset 0 -4px 0 var(--rc, #ccc);
  display: grid; gap: 2px; justify-items: center; transition: transform .1s;
}
.tile:hover { transform: translateY(-2px); }
.tile:active { transform: translateY(2px); }
.tile .art { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.tile .art svg { width: 88%; height: 88%; }
.tile .name { font-size: .86rem; font-weight: 900; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .rar { font-size: .72rem; font-weight: 900; }
.tile .qty {
  position: absolute; top: 6px; right: 6px; background: var(--ink); color: #fff;
  border-radius: 999px; font-size: .72rem; padding: 2px 7px; font-weight: 900;
}
.tile.locked { background: #0f4f72; box-shadow: 0 5px 0 rgba(0,0,0,.18); color: #8fbcd4; cursor: default; }
.tile.locked:hover { transform: none; }
.tile.selected { outline: 4px solid #4ade80; outline-offset: 1px; }
.tile.equipped::after {
  content: 'Equipped'; position: absolute; top: 6px; left: 6px; background: var(--green); color: #fff;
  font-size: .62rem; padding: 2px 6px; border-radius: 999px; font-weight: 900;
}
.tile.banner-tile .art { aspect-ratio: 3 / 1.15; border-radius: 10px; overflow: hidden; }
.tile.banner-tile .art svg { width: 100%; height: 100%; }
.r-Chroma, .r-Mystical { position: relative; overflow: hidden; }
.r-Chroma::before, .r-Mystical::before {
  content: ''; position: absolute; inset: -50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,255,255,.55) 80%, transparent 90%);
  animation: spin 3.5s linear infinite; mix-blend-mode: overlay;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; background: rgba(3,30,48,.35); padding: 5px; border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  appearance: none; border: 0; background: transparent; color: var(--on-bg-2); cursor: pointer; white-space: nowrap;
  font-weight: 900; padding: 8px 14px; border-radius: 10px; display: inline-flex; gap: 6px; align-items: center;
}
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.card .tabs { background: var(--card-2); }
.card .tabs button { color: var(--ink-2); }

/* ---------- profile ---------- */
.profile-hero { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--card); }
.profile-hero .banner { height: 120px; }
.profile-hero .banner svg { width: 100%; height: 100%; display: block; }
.profile-hero .who { display: flex; align-items: flex-end; gap: 14px; padding: 0 18px 16px; margin-top: -52px; position: relative; flex-wrap: wrap; }
.avatar {
  width: 104px; height: 104px; border-radius: 26px; background: var(--card); box-shadow: 0 5px 0 rgba(0,0,0,.15);
  display: grid; place-items: center; border: 5px solid #fff; flex: none;
}
.avatar svg { width: 90%; height: 90%; }
.avatar.sm { width: 44px; height: 44px; border-radius: 12px; border-width: 3px; box-shadow: none; background: var(--card-2); }
.who h1 { font-size: 1.7rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--card-2); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: var(--ink-2); }
.player-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-decoration: none; }
.player-row:hover { background: var(--card-2); }
.player-row .grow { flex: 1; min-width: 0; }
.daily { display: flex; align-items: center; gap: 16px; }
.daily .big-token { flex: none; }

/* ---------- packs ---------- */
.packs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pack {
  appearance: none; border: 0; background: var(--card); cursor: pointer; border-radius: 18px; padding: 14px 12px 12px;
  box-shadow: var(--shadow); display: grid; gap: 8px; justify-items: center; transition: transform .12s;
}
.pack:hover { transform: translateY(-3px) rotate(-1deg); }
.pack .pack-svg { width: 100%; max-width: 130px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.15)); }
.pack .pname { font-weight: 900; font-size: 1.05rem; }
.price { display: inline-flex; align-items: center; gap: 5px; font-weight: 900; font-variant-numeric: tabular-nums; }

.opening { display: grid; justify-items: center; gap: 14px; padding: 6px 0 4px; text-align: center; }
.opening .stage { width: 220px; height: 240px; display: grid; place-items: center; position: relative; }
.opening .stage .pack-svg { width: 170px; animation: shake .5s ease-in-out infinite; }
.opening .stage.reveal .pack-svg { display: none; }
.opening .reveal-blob { width: 200px; height: 200px; animation: pop .55s cubic-bezier(.2,1.6,.4,1) both; position: relative; z-index: 1; }
.opening .rays {
  position: absolute; inset: -10px; border-radius: 50%;
  background: repeating-conic-gradient(var(--rc) 0 10deg, transparent 10deg 20deg); opacity: .35;
  animation: spin 8s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%);
}
.opening .rname { font-size: 1.6rem; font-weight: 900; }
.opening .rlabel { font-weight: 900; padding: 4px 14px; border-radius: 999px; color: #fff; }
@keyframes shake { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-6deg) scale(1.03) } 75% { transform: rotate(6deg) scale(1.03) } }
@keyframes pop { from { transform: scale(.2) rotate(-20deg); opacity: 0 } to { transform: scale(1) rotate(0); opacity: 1 } }
.odds { width: 100%; border-collapse: collapse; font-size: .95rem; }
.odds td { padding: 6px 4px; border-bottom: 2px solid var(--line); }
.odds td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.odds .mini { width: 34px; height: 34px; display: inline-grid; vertical-align: middle; margin-right: 8px; }

/* ---------- market & trades ---------- */
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
.filters .search { grid-column: 1 / -1; }
@media (min-width: 720px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr; } .filters .search { grid-column: auto; } }
.listing { display: grid; gap: 6px; }
.listing .tile { cursor: default; }
.listing .tile:hover { transform: none; }
.listing .seller { font-size: .78rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.trade { display: grid; gap: 12px; }
.trade-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trade-head .grow { flex: 1; }
.trade-sides { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .trade-sides { grid-template-columns: 1fr auto 1fr; align-items: stretch; } }
.side-box { background: var(--card-2); border-radius: 14px; padding: 10px; min-height: 86px; }
.side-box h4 { margin: 0 0 8px; font-size: .85rem; color: var(--ink-2); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.swap { display: grid; place-items: center; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 12px; padding: 4px 9px 4px 4px;
  font-size: .85rem; font-weight: 800; box-shadow: inset 0 -3px 0 var(--rc, #ddd);
}
.chip .mini { width: 30px; height: 30px; display: grid; place-items: center; }
.chip .mini svg { width: 100%; height: 100%; }
.chip .mini.bn { width: 40px; height: 18px; border-radius: 5px; overflow: hidden; }
.chip button { appearance: none; border: 0; background: var(--card-2); border-radius: 8px; cursor: pointer; padding: 2px 7px; font-weight: 900; }
.status { font-size: .78rem; font-weight: 900; padding: 3px 9px; border-radius: 999px; color: #fff; text-transform: capitalize; }
.status.pending { background: var(--gold-d); }
.status.accepted { background: var(--green); }
.status.declined, .status.cancelled { background: #7f95a3; }
.empty { text-align: center; padding: 26px 12px; color: var(--ink-2); }
.empty svg { width: 72px; height: 72px; opacity: .9; }
.builder-side { display: grid; gap: 10px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--card-2); border-radius: 10px; padding: 3px; }
.stepper button { appearance: none; border: 0; background: #fff; width: 34px; height: 34px; border-radius: 8px; font-weight: 900; font-size: 1.1rem; cursor: pointer; }
.stepper input { width: 64px; text-align: center; border: 0; background: transparent; font-weight: 900; font-size: 1rem; }

/* ---------- leaderboard ---------- */
.lb-row { display: grid; grid-template-columns: 34px 44px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; text-decoration: none; }
.lb-row:nth-child(odd) { background: var(--card-2); }
.lb-row .rank { font-weight: 900; text-align: center; font-size: 1.1rem; }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 100; background: rgba(3, 25, 40, .6);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .15s;
}
.modal {
  background: var(--card); width: 100%; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + var(--safe-b)); animation: up .22s cubic-bezier(.2,1,.3,1);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.modal-head h2 { font-size: 1.3rem; }
.modal .close { background: var(--card-2); border-radius: 10px; width: 38px; height: 38px; }
@media (min-width: 640px) {
  .modal-back { align-items: center; padding: 20px; }
  .modal { max-width: 520px; border-radius: 22px; box-shadow: 0 8px 0 rgba(0,0,0,.2); }
  .modal.wide { max-width: 860px; }
}
@keyframes fade { from { opacity: 0 } }
@keyframes up { from { transform: translateY(40px); opacity: 0 } }
.item-detail { display: grid; justify-items: center; gap: 6px; text-align: center; }
.item-detail .art { width: 170px; height: 170px; }
.item-detail .art.bn { width: 100%; height: 110px; border-radius: 14px; overflow: hidden; }
.item-detail .art svg { width: 100%; height: 100%; }
.actions { display: grid; gap: 10px; margin-top: 14px; }
.actions .row > * { flex: 1; }

/* ---------- toast ---------- */
#toast-root { position: fixed; z-index: 200; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 12px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 800; max-width: 460px;
  box-shadow: 0 5px 0 rgba(0,0,0,.25); animation: up .2s; pointer-events: auto;
}
.toast.error { background: var(--red); }
.toast.ok { background: var(--green-d); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth { width: 100%; max-width: 420px; }
.auth .logo { justify-content: center; font-size: 2.2rem; margin-bottom: 6px; text-shadow: 0 4px 0 rgba(0,0,0,.2); }
.auth .logo svg { width: 56px; height: 56px; }
.auth .tag { color: var(--on-bg-2); text-align: center; margin: 0 0 18px; }
.auth-parade { display: flex; justify-content: center; gap: 4px; margin-bottom: -18px; position: relative; z-index: 1; }
.auth-parade svg { width: 66px; height: 66px; animation: bob 2.4s ease-in-out infinite; }
.auth-parade svg:nth-child(2) { animation-delay: .3s } .auth-parade svg:nth-child(3) { animation-delay: .6s } .auth-parade svg:nth-child(4) { animation-delay: .9s }
@keyframes bob { 50% { transform: translateY(-8px) } }

@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* icon sizing inside controls */
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.small svg { width: 17px; height: 17px; }
.icon-btn svg { width: 24px; height: 24px; }
.swap svg { width: 26px; height: 26px; }
@media (min-width: 640px) { .swap svg { transform: rotate(90deg); } }
.tile .art > svg[stroke] { width: 40%; height: 40%; color: var(--primary); }
.cols > .card + .card, .stack > .card + .card { margin-top: 0; }
.cols + .card { margin-top: 16px; }
.tile.locked .rar { background: rgba(255,255,255,.9); padding: 0 6px; border-radius: 6px; }
.main { width: 100%; min-width: 0; }

/* collections & misc (Blobstash) */
.head-note { color: var(--on-bg-2); font-weight: 800; font-size: .9rem; }
.pack-prog { font-size: .78rem; font-weight: 900; color: var(--ink-2); background: var(--card-2); border-radius: 999px; padding: 2px 10px; }
.pack-prog.done { background: #dcfce7; color: var(--green-d); }
.set-row { display: grid; gap: 6px; }
.set-row.compact { padding: 8px 0; border-top: 2px solid var(--line); }
.set-row.compact:first-of-type { border-top: 0; }
.set-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bar { height: 12px; border-radius: 999px; background: var(--card-2); overflow: hidden; box-shadow: inset 0 2px 0 rgba(0,0,0,.06); }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22c55e, #14b8a6, #0ea5e9); transition: width .4s; }
.set-foot { display: flex; align-items: center; min-height: 28px; }
.set-foot .reward { font-size: .82rem; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.set-row.compact .set-foot { min-height: 0; }
.set-row.compact .reward { display: none; }
a.muted { text-decoration: none; font-weight: 800; }
a.muted:hover { color: var(--primary-d); }
.cols { align-items: start; }
@media (max-height: 900px) { .opening .stage { height: 190px; } .opening .reveal-blob { width: 160px; height: 160px; } .opening .stage .pack-svg { width: 130px; } }

/* ===================== v3: bottom nav with 6 items ===================== */
.bottomnav { grid-template-columns: repeat(6, 1fr); }
.bottomnav a { font-size: .66rem; padding: 6px 0; }
.bottomnav a svg { width: 24px; height: 24px; }
.linkish { appearance: none; border: 0; background: none; padding: 0; color: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.linkish.danger { color: var(--red); }
.linkish:disabled { opacity: .4; cursor: default; }
.section-h { color: #fff; font-size: 1.25rem; margin: 22px 0 12px; scroll-margin-top: 76px; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
a.pack { text-decoration: none; color: inherit; }

/* ---------- seasonal ---------- */
.season-hero {
  display: flex; gap: 18px; align-items: center; text-decoration: none; color: #fff; border-radius: 22px; padding: 18px;
  background: radial-gradient(circle at 15% 30%, color-mix(in srgb, var(--c1) 70%, transparent), transparent 60%), linear-gradient(135deg, var(--c2), #082f49);
  box-shadow: var(--shadow), inset 0 0 0 3px rgba(255,255,255,.18); flex-wrap: wrap; position: relative; overflow: hidden;
}
.season-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%); background-size: 250% 100%; animation: sheen 4s linear infinite; pointer-events: none; }
@keyframes sheen { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.sh-pack { width: 150px; flex: none; margin: 0 auto; animation: float 3s ease-in-out infinite; }
.sh-pack svg { width: 100%; filter: drop-shadow(0 10px 14px rgba(0,0,0,.35)); }
.sh-text { flex: 1; min-width: 240px; display: grid; gap: 6px; }
.sh-text h2 { font-size: 1.7rem; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.sh-text p { margin: 0; opacity: .92; font-weight: 700; }
.sh-kicker { background: rgba(255,255,255,.2); border-radius: 999px; padding: 3px 12px; justify-self: start; font-weight: 900; font-size: .85rem; }
.sh-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sh-peek { display: flex; gap: 2px; flex-wrap: wrap; }
.sh-peek span { width: 38px; height: 38px; background: rgba(255,255,255,.14); border-radius: 10px; display: grid; place-items: center; }
.sh-peek svg { width: 92%; height: 92%; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-2deg); } }
.season-cal { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.season-chip {
  appearance: none; border: 0; cursor: pointer; text-align: left; color: #fff; border-radius: 16px; padding: 12px; display: grid; gap: 3px;
  background: linear-gradient(135deg, var(--c2), #0b3550); box-shadow: 0 5px 0 rgba(0,0,0,.18); opacity: .78; filter: saturate(.7);
}
.season-chip.on { opacity: 1; filter: none; outline: 3px solid #4ade80; }
.season-chip .sc-month { font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.season-chip b { font-size: 1.05rem; }
.season-chip .sc-state { font-size: .8rem; opacity: .9; }
.season-chip .pack-prog { justify-self: start; margin-top: 4px; }
.chips-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chip-btn { appearance: none; border: 0; cursor: pointer; white-space: nowrap; background: rgba(255,255,255,.16); color: #fff; font-weight: 800; padding: 6px 12px; border-radius: 999px; }
.chip-btn.active { background: #fff; color: var(--ink); }

/* ===================== pack opening screen ===================== */
.open-screen, .play-screen {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; color: #fff;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.os-bg { position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 40%, var(--c1), var(--c2) 55%, #04121d 100%) #04121d; }
.os-floaters { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.os-floaters span { position: absolute; bottom: -20px; width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.35); animation: rise 7s linear infinite; }
.os-floaters span:nth-child(3n) { width: 6px; height: 6px; }
@keyframes rise { to { transform: translateY(-110vh) translateX(30px); opacity: 0; } }
.os-top { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px; }
.os-icon { appearance: none; border: 0; cursor: pointer; width: 44px; height: 44px; border-radius: 14px; background: rgba(0,0,0,.28); color: #fff; display: grid; place-items: center; flex: none; }
.os-icon svg { width: 24px; height: 24px; }
.os-title { display: grid; line-height: 1.15; min-width: 0; }
.os-title b { font-size: 1.15rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-tag { font-size: .78rem; opacity: .85; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-spacer { flex: 1; }
.os-stage { flex: 1; display: grid; place-items: center; align-content: center; gap: 10px; padding: 8px 14px; min-height: 340px; position: relative; cursor: pointer; }
.os-hint { margin: 0; opacity: .75; font-weight: 800; font-size: .9rem; }
.os-pack { width: min(230px, 55vw); position: relative; --glow: #fff; }
.os-pack svg { width: 100%; filter: drop-shadow(0 14px 18px rgba(0,0,0,.4)); }
.os-pack.idle { animation: float 3s ease-in-out infinite; }
.os-pack.charging { animation: shake .32s ease-in-out infinite; }
.os-pack.charging svg { transition: filter .6s; }
.os-pack.hint svg { filter: drop-shadow(0 0 22px var(--glow)) drop-shadow(0 0 40px var(--glow)); }
.os-pack.intense { animation: shake .14s linear infinite; }
.os-pack.intense svg { filter: drop-shadow(0 0 30px var(--glow)) drop-shadow(0 0 70px var(--glow)) brightness(1.15); }
.os-flash { position: fixed; inset: 0; background: #fff; animation: flash .45s ease-out forwards; pointer-events: none; z-index: 5; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
.os-halves { width: min(230px, 55vw); height: min(290px, 70vw); position: relative; }
.os-halves .half { position: absolute; inset: 0; }
.os-halves .half svg { width: 100%; }
.os-halves .top { clip-path: inset(0 0 52% 0); animation: flyUp .5s ease-in forwards; }
.os-halves .bottom { clip-path: inset(48% 0 0 0); animation: flyDown .5s ease-in forwards; }
@keyframes flyUp { to { transform: translate(-30px, -180px) rotate(-25deg); opacity: 0; } }
@keyframes flyDown { to { transform: translate(30px, 180px) rotate(20deg); opacity: 0; } }
.quake { animation: quake .35s linear 2; }
@keyframes quake { 25% { transform: translate(6px, -4px); } 50% { transform: translate(-5px, 5px); } 75% { transform: translate(4px, 3px); } }

.os-reveal { display: grid; justify-items: center; gap: 8px; text-align: center; position: relative; }
.os-rays { position: absolute; width: 520px; height: 520px; left: 50%; top: 120px; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(var(--rc) 0 9deg, transparent 9deg 18deg); opacity: .4; animation: spin 10s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 65%); mask: radial-gradient(circle, #000 18%, transparent 65%); }
.os-reveal.o1 .os-rays, .os-reveal.o2 .os-rays { opacity: .22; }
.os-reveal.o6 .os-rays { background: repeating-conic-gradient(#ff5f6d 0 9deg, #ffc371 9deg 18deg, #7dff8a 18deg 27deg, #4fc3f7 27deg 36deg, #b388ff 36deg 45deg); opacity: .5; animation-duration: 5s; }
.os-reveal.o7 .os-rays { background: repeating-conic-gradient(#c084fc 0 6deg, #1e1b4b 6deg 12deg); opacity: .7; animation-duration: 4s; }
.os-blob { width: min(240px, 60vw); height: min(240px, 60vw); position: relative; animation: pop .6s cubic-bezier(.2,1.6,.4,1) both; }
.os-blob svg { width: 100%; height: 100%; filter: drop-shadow(0 12px 16px rgba(0,0,0,.35)); }
.os-reveal.o5 .os-blob svg, .os-reveal.o6 .os-blob svg, .os-reveal.o7 .os-blob svg { filter: drop-shadow(0 0 24px var(--rc)) drop-shadow(0 12px 16px rgba(0,0,0,.35)); }
.os-name { font-size: 2rem; font-weight: 900; text-shadow: 0 3px 0 rgba(0,0,0,.3); position: relative; }
.os-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; position: relative; }
.rlabel { font-weight: 900; padding: 4px 14px; border-radius: 999px; color: #fff; font-size: .9rem; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.rlabel.new { background: var(--green); }
.rlabel.pity { background: #7c3aed; }
.os-sub { font-weight: 800; opacity: .9; position: relative; display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: center; }
.particles { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.particles i { position: absolute; width: 9px; height: 13px; border-radius: 2px; animation: burst 1.4s cubic-bezier(.1,.8,.3,1) forwards; }
@keyframes burst { from { transform: translate(0,0) rotate(0); opacity: 1; } to { transform: translate(var(--x), calc(var(--y) + 160px)) rotate(var(--r)); opacity: 0; } }

.os-grid { display: grid; gap: 10px; width: min(760px, 100%); grid-template-columns: repeat(5, 1fr); }
.os-grid.n10 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 560px) { .os-grid { grid-template-columns: repeat(3, 1fr); } .os-grid.n5 { grid-template-columns: repeat(3, 1fr); } }
.os-card { aspect-ratio: 3 / 4; perspective: 800px; position: relative; }
.os-card .face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; transition: transform .45s cubic-bezier(.3,1.4,.5,1); display: grid; place-items: center; }
.os-card .back { background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: inset 0 0 0 4px rgba(255,255,255,.35), 0 6px 0 rgba(0,0,0,.25); font-size: 2.2rem; font-weight: 900; }
.os-card .front { transform: rotateY(180deg); background: #fff; color: var(--ink); box-shadow: inset 0 -5px 0 var(--rc), 0 6px 0 rgba(0,0,0,.25); align-content: center; gap: 2px; padding: 6px; text-align: center; }
.os-card .front .art { width: 82%; aspect-ratio: 1; }
.os-card .front .art svg { width: 100%; height: 100%; }
.os-card .front b { font-size: .78rem; line-height: 1.1; }
.os-card .front small { font-size: .68rem; font-weight: 900; }
.os-card .front.o5, .os-card .front.o6, .os-card .front.o7 { box-shadow: inset 0 -5px 0 var(--rc), 0 0 18px var(--rc), 0 6px 0 rgba(0,0,0,.25); }
.os-card.flipped .back { transform: rotateY(180deg); }
.os-card.flipped .front { transform: rotateY(360deg); }
.os-card.tease .back { animation: shake .2s linear infinite; box-shadow: inset 0 0 0 4px #fff, 0 0 26px var(--rc); }
.mini-new { position: absolute; top: 5px; left: 5px; background: var(--green); color: #fff; font-size: .6rem; font-weight: 900; padding: 1px 6px; border-radius: 999px; }
.os-summary { margin: 4px 0 0; font-weight: 800; text-align: center; background: rgba(0,0,0,.28); padding: 8px 14px; border-radius: 12px; }
.os-revealall { margin-top: 4px; }
.os-controls { display: grid; gap: 12px; justify-items: center; padding: 10px 14px 18px; }
.os-pity { width: min(420px, 100%); display: grid; gap: 6px; text-align: center; font-weight: 800; font-size: .9rem; }
.os-pity .bar { background: rgba(0,0,0,.3); box-shadow: none; }
.os-pity .bar span { background: linear-gradient(90deg, #fbbf24, #f472b6, #a78bfa); }
.os-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(520px, 100%); }
.os-open { flex-direction: column; gap: 0; padding: 8px 6px 10px; min-height: 62px; }
.os-open span { font-size: 1.05rem; }
.os-open small { font-weight: 900; opacity: .95; }
.os-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; font-weight: 800; }
.os-links a { color: #fff; }
.os-quick { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.os-quick input { width: 18px; height: 18px; accent-color: #22c55e; }
.open-screen .token-pill, .play-screen .token-pill { position: relative; }

/* ===================== stashes ===================== */
.stash-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.stash-card { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); text-decoration: none; position: relative; transition: transform .1s; }
.stash-card:hover { transform: translateY(-2px); }
.sc-cover { width: 64px; height: 64px; flex: none; border-radius: 16px; background: linear-gradient(145deg, #e0f2fe, #dcfce7); display: grid; place-items: center; }
.sc-cover svg { width: 88%; height: 88%; }
.sc-cover.big { width: 96px; height: 96px; border-radius: 22px; }
.sc-body { display: grid; gap: 2px; min-width: 0; }
.sc-body b { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-body .muted { font-size: .82rem; }
.sc-desc { font-size: .85rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vis { font-size: .7rem; font-weight: 900; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--card-2); color: var(--ink-2); }
.stash-card .vis { position: absolute; top: 8px; right: 8px; }
.vis.private { background: #fee2e2; color: #b91c1c; }
.vis.unlisted { background: #fef3c7; color: #92400e; }
.study-bar { display: grid; gap: 6px; }
.study-bar .row b { display: inline-flex; align-items: center; gap: 4px; }
.stash-hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.stash-hero h1 { font-size: 1.6rem; }
.mode-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.mode-card { display: grid; gap: 6px; text-decoration: none; color: #fff; padding: 16px; border-radius: 18px; background: linear-gradient(145deg, var(--mc), color-mix(in srgb, var(--mc) 55%, #082f49)); box-shadow: var(--shadow); transition: transform .1s; }
.mode-card:hover { transform: translateY(-3px); }
.mode-card b { font-size: 1.3rem; }
.mode-card > span:not(.mc-icon):not(.mc-go) { font-size: .9rem; opacity: .95; }
.mc-icon { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.22); display: grid; place-items: center; }
.mc-icon svg { width: 26px; height: 26px; }
.mc-go { justify-self: start; --c: #fff; --cd: rgba(0,0,0,.25); color: var(--ink); margin-top: 4px; }
.boards { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.board h4 { margin: 0 0 6px; display: flex; gap: 6px; align-items: center; font-size: .95rem; }
.board h4 svg { width: 18px; height: 18px; }
.board ol { margin: 0; padding-left: 20px; display: grid; gap: 3px; }
.board li span { margin-right: 6px; }
.board li b { float: right; }
.q-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.q-list li > span { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.q-list em { font-style: normal; font-size: .85rem; background: var(--card-2); padding: 2px 8px; border-radius: 8px; }
.q-list em.ok { background: #dcfce7; color: var(--green-d); font-weight: 900; }
.report-line { text-align: center; color: var(--on-bg-2); }
.editor-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pick-cover { appearance: none; border: 0; cursor: pointer; position: relative; flex-direction: column; }
.pick-cover span { position: absolute; bottom: -10px; background: var(--ink); color: #fff; font-size: .7rem; font-weight: 900; padding: 2px 8px; border-radius: 999px; }
.q-edit { display: grid; gap: 10px; }
.q-edit textarea { resize: vertical; min-height: 60px; font-family: inherit; }
.ans-list { display: grid; gap: 8px; }
.ans-row { display: flex; gap: 8px; align-items: center; }
.ans-row .input { flex: 1; min-height: 44px; }
.ans-row .icon-btn { color: var(--ink-2); }
.ans-row .icon-btn:disabled { opacity: .3; }
.correct-pick { position: relative; width: 34px; height: 34px; flex: none; cursor: pointer; }
.correct-pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.correct-pick span { position: absolute; inset: 3px; border-radius: 50%; border: 3px solid var(--line); background: #fff; }
.correct-pick input:checked + span { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 4px #fff; }
.correct-pick input:focus-visible + span { outline: 3px solid var(--primary); }
pre.example { background: var(--card-2); padding: 10px 12px; border-radius: 10px; font-size: .85rem; overflow-x: auto; white-space: pre-wrap; }

/* ===================== play screen ===================== */
.play-screen { background: radial-gradient(circle at 50% 0%, var(--mc), #082f49 75%) #082f49; }
.play-screen.penalty { animation: quake .3s linear 1; }
.play-hud { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 0 14px 8px; min-height: 40px; }
.hud-pill { background: rgba(0,0,0,.28); padding: 6px 12px; border-radius: 999px; font-weight: 900; display: inline-flex; gap: 5px; align-items: center; font-variant-numeric: tabular-nums; }
.hud-pill.big { font-size: 1.15rem; background: rgba(255,255,255,.2); }
.hud-pill.hot { background: #f97316; }
.hud-pill.warn { background: var(--red); animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.06); } }
.q-card { width: min(820px, calc(100% - 28px)); margin: 0 auto 16px; display: grid; gap: 14px; }
.q-card.hide { visibility: hidden; height: 0; overflow: hidden; margin: 0 auto; }
.q-prompt { background: #fff; color: var(--ink); border-radius: 18px; padding: 22px 18px; font-size: clamp(1.15rem, 3.4vw, 1.6rem); font-weight: 900; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.2); white-space: pre-wrap; overflow-wrap: anywhere; }
.q-answers { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.q-answers.n3 > :last-child { grid-column: 1 / -1; }
@media (max-width: 520px) { .q-answers { grid-template-columns: 1fr; } .q-answers.n3 > :last-child { grid-column: auto; } }
.q-ans { appearance: none; border: 0; cursor: pointer; min-height: 78px; border-radius: 16px; padding: 12px 14px; color: #fff; font-weight: 900; font-size: 1.1rem;
  background: var(--ac); box-shadow: 0 6px 0 color-mix(in srgb, var(--ac) 60%, #000); transition: transform .06s, opacity .2s, filter .2s; overflow-wrap: anywhere; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.q-ans:active { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--ac) 60%, #000); }
.q-ans:disabled { cursor: default; opacity: .45; }
.q-ans.right { opacity: 1; background: #16a34a; box-shadow: 0 6px 0 #14532d, 0 0 0 4px #fff; animation: pop .35s; }
.q-ans.wrong { opacity: 1; background: #dc2626; box-shadow: 0 6px 0 #7f1d1d; animation: quake .3s; }
.play-note { text-align: center; font-weight: 800; padding: 0 16px 16px; min-height: 1em; color: #fde68a; }
.float-plus { position: absolute; right: 6px; top: -4px; color: #fde047; font-weight: 900; font-size: 1.2rem; animation: floatUp 1s ease-out forwards; pointer-events: none; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
@keyframes floatUp { to { transform: translateY(-34px); opacity: 0; } }
.results { background: #fff; color: var(--ink); border-radius: 22px; padding: 26px 18px; text-align: center; display: grid; gap: 8px; justify-items: center; box-shadow: 0 8px 0 rgba(0,0,0,.2); animation: pop .45s cubic-bezier(.2,1.5,.4,1); }
.res-big { font-size: clamp(2.4rem, 9vw, 3.4rem); font-weight: 900; color: var(--primary-d); line-height: 1; }
.results p { margin: 0; font-weight: 800; }
.res-tokens { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Blob Fishing scene ---- */
.fish-scene { position: relative; height: clamp(200px, 34vh, 300px); width: min(820px, calc(100% - 28px)); margin: 0 auto 14px; border-radius: 22px; overflow: hidden; box-shadow: 0 6px 0 rgba(0,0,0,.25); flex: none; }
.fish-scene .sky { position: absolute; inset: 0 0 45% 0; background: linear-gradient(#7dd3fc, #e0f2fe); }
.fish-scene .sun { position: absolute; right: 12%; top: 14%; width: 46px; height: 46px; border-radius: 50%; background: #fde047; box-shadow: 0 0 30px #fde047; }
.fish-scene .water { position: absolute; inset: 55% 0 0 0; background: linear-gradient(#0ea5e9, #0c4a6e); transition: background .6s; }
.fish-scene.frenzy .water { background: linear-gradient(#a855f7, #312e81); }
.fish-scene.frenzy .sky { background: linear-gradient(#c4b5fd, #f5d0fe); }
.wave { position: absolute; left: -50%; width: 200%; height: 14px; top: -7px; background: radial-gradient(circle at 10px 0, transparent 9px, rgba(255,255,255,.55) 10px, transparent 12px) 0 0 / 28px 14px repeat-x; animation: waves 3s linear infinite; }
.wave.w2 { top: 18px; opacity: .5; animation-duration: 5s; animation-direction: reverse; }
@keyframes waves { to { transform: translateX(28px); } }
.dock { position: absolute; left: 0; bottom: 30%; width: 32%; height: 16px; background: #8d6e63; border-top: 4px solid #6d4c41; box-shadow: 0 30px 0 -6px #6d4c41; }
.fisher { position: absolute; left: 10%; bottom: calc(30% + 14px); width: 80px; height: 80px; }
.fisher svg { width: 100%; height: 100%; }
.rod { position: absolute; left: calc(10% + 62px); bottom: calc(30% + 46px); width: 120px; height: 5px; background: #5d4037; border-radius: 3px; transform-origin: left center; transform: rotate(-32deg); transition: transform .3s; }
.casting .rod { transform: rotate(-8deg); }
.line { position: absolute; left: calc(10% + 160px); top: 22%; width: 2px; height: 0; background: rgba(255,255,255,.9); transition: height .5s ease-out .15s; }
.casting .line, .bite .line { height: 40%; }
.bobber { position: absolute; left: calc(10% + 153px); top: 60%; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(#ef4444 50%, #fff 50%); border: 2px solid #7f1d1d; opacity: 0; transition: opacity .2s .5s; }
.casting .bobber, .bite .bobber { opacity: 1; }
.bite .bobber { animation: bob .18s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(6px); } }
.miss .fisher { animation: quake .3s; }
.catch { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .35s cubic-bezier(.2,1.6,.4,1); }
.catch.show { opacity: 1; transform: scale(1); }
.catch-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 10px 18px 12px; display: grid; justify-items: center; box-shadow: inset 0 -5px 0 var(--tc), 0 8px 0 rgba(0,0,0,.25); text-align: center; }
.catch-card .art { width: 92px; height: 92px; }
.catch-card .art svg { width: 100%; height: 100%; }
.catch-card .tier { font-size: .8rem; font-weight: 900; color: var(--tc); }
.catch-card .lbs { font-size: 1.4rem; font-weight: 900; color: var(--primary-d); }
.miss-msg { background: rgba(0,0,0,.55); padding: 10px 18px; border-radius: 14px; font-weight: 900; font-size: 1.2rem; }
.frenzy-banner { position: absolute; left: 50%; top: 40%; translate: -50% -50%; font-size: clamp(2rem, 8vw, 3.4rem); font-weight: 900; color: #fde047; text-shadow: 0 4px 0 #7c3aed, 0 0 30px #a855f7; opacity: 0; transform: scale(.4) rotate(-8deg); transition: all .35s cubic-bezier(.2,1.6,.4,1); pointer-events: none; }
.frenzy-banner.show { opacity: 1; transform: scale(1) rotate(-4deg); }
@media (max-width: 560px) {
  .os-grid, .os-grid.n5, .os-grid.n10 { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .os-card .front { padding: 3px; border-radius: 10px; }
  .os-card .back { border-radius: 10px; font-size: 1.5rem; }
  .os-card .front b { font-size: .6rem; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .os-card .front small { display: none; }
  .os-card .front .art { width: 92%; }
  .mini-new { font-size: .5rem; padding: 0 4px; top: 3px; left: 3px; }
}
.open-screen { background: #04121d; }

/* ===================== live games ===================== */
.join-wrap { min-height: 60vh; display: grid; place-items: center; }
.join-card { width: min(420px, 100%); text-align: center; display: grid; gap: 10px; }
.join-card h1 { font-size: 1.8rem; }
.join-card p { margin: 0; }
.code-input { font-size: 2.2rem; text-align: center; letter-spacing: .12em; font-weight: 900; min-height: 72px; }
.join-or { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 800; }
.join-or::before, .join-or::after { content: ''; flex: 1; height: 2px; background: var(--line); }
.host-card { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(135deg, #ede9fe, #e0f2fe); }
.host-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.host-mode input { position: absolute; opacity: 0; }
.host-mode span { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 10px; border-radius: 16px; border: 3px solid var(--line); cursor: pointer; }
.host-mode span svg { width: 30px; height: 30px; color: var(--mc); }
.host-mode small { color: var(--ink-2); font-weight: 700; }
.host-mode input:checked + span { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 12%, #fff); }
.host-mode input:focus-visible + span { outline: 3px solid var(--primary); }
.check-row { display: flex; gap: 8px; align-items: flex-start; font-weight: 800; margin-bottom: 8px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--green); margin-top: 2px; flex: none; }
.check-row .muted { font-weight: 700; font-size: .85rem; }
.live-screen { background: radial-gradient(circle at 50% 0%, #7c3aed, #082f49 75%) #082f49; }
.lv-body { flex: 1; display: flex; flex-direction: column; }
.lv-center { flex: 1; display: grid; place-items: center; padding: 20px; }
.lv-big { font-size: 1.4rem; font-weight: 900; }
.muted-w { color: rgba(255,255,255,.75); font-weight: 800; }
.lv-lobby { display: grid; gap: 16px; justify-items: center; padding: 10px 16px 30px; }
.lv-code-card { background: #fff; color: var(--ink); border-radius: 22px; padding: 16px 28px; display: grid; justify-items: center; gap: 2px; box-shadow: 0 8px 0 rgba(0,0,0,.25); text-align: center; }
.lv-code-card .muted-w { color: var(--ink-2); }
.lv-url { font-size: 1.2rem; color: var(--primary-d); }
.lv-code { font-size: clamp(3rem, 14vw, 5.5rem); font-weight: 900; letter-spacing: .06em; line-height: 1.05; color: #4c1d95; font-variant-numeric: tabular-nums; }
.lv-status { display: grid; gap: 10px; justify-items: center; text-align: center; font-size: 1.15rem; }
.lv-players { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: min(900px, 100%); }
.lv-player { position: relative; width: 92px; display: grid; justify-items: center; gap: 2px; animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
.lv-player.offline { opacity: .45; }
.lv-av { width: 72px; height: 72px; border-radius: 20px; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.lv-av svg { width: 88%; height: 88%; }
.lv-player span { font-weight: 900; font-size: .85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-kick { position: absolute; top: -6px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 1; box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.lv-kick svg { width: 14px; height: 14px; }
.lv-play { display: grid; gap: 14px; padding: 0 0 20px; }
@media (min-width: 1000px) { .lv-play { grid-template-columns: 1fr 300px; padding-right: 16px; align-items: start; } .lv-side { position: sticky; top: 10px; } }
.lv-main { min-width: 0; }
.lv-side { background: rgba(0,0,0,.25); border-radius: 18px; padding: 12px; margin: 0 14px; }
@media (min-width: 1000px) { .lv-side { margin: 0; } }
.lv-side h3 { margin: 0 0 8px; font-size: 1rem; }
.lv-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lv-board li { display: grid; grid-template-columns: 24px 34px minmax(0, 1fr) minmax(40px, 1.2fr) auto; gap: 8px; align-items: center; background: rgba(255,255,255,.1); border-radius: 12px; padding: 5px 8px; }
.card .lv-board li { background: var(--card-2); color: var(--ink); }
.lv-board li.me { outline: 3px solid #4ade80; }
.lv-board .rk { font-weight: 900; text-align: center; }
.lv-board .av { width: 34px; height: 34px; }
.lv-board .av svg { width: 100%; height: 100%; }
.lv-board .nm { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-board .bar { height: 8px; background: rgba(0,0,0,.15); }
.lv-board .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #22c55e, #0ea5e9); transition: width .5s; }
.lv-board b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-hostboard { width: min(900px, calc(100% - 28px)); margin: 0 auto 20px; display: grid; gap: 14px; }
.lv-ended { width: min(820px, calc(100% - 28px)); margin: 0 auto 30px; display: grid; gap: 16px; }
.lv-final { text-align: center; font-size: 2rem; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; max-width: 520px; margin: 0 auto; width: 100%; }
.pod { display: grid; justify-items: center; gap: 2px; text-align: center; position: relative; animation: pop .6s cubic-bezier(.2,1.6,.4,1) both; }
.pod.p1 { animation-delay: .5s; } .pod.p2 { animation-delay: .25s; }
.pod-av { width: 84px; height: 84px; }
.pod.p1 .pod-av { width: 110px; height: 110px; }
.pod-av svg { width: 100%; height: 100%; }
.pod b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pod span { font-weight: 800; opacity: .9; font-size: .9rem; }
.pod-block { width: 100%; margin-top: 6px; border-radius: 12px 12px 4px 4px; display: grid; place-items: center; font-size: 2rem; font-weight: 900; color: #fff; box-shadow: inset 0 -6px 0 rgba(0,0,0,.2); }
.p1 .pod-block { height: 120px; background: linear-gradient(#fbbf24, #d97706); }
.p2 .pod-block { height: 90px; background: linear-gradient(#cbd5e1, #94a3b8); }
.p3 .pod-block { height: 66px; background: linear-gradient(#fdba74, #c2410c); }
.lv-you .res-big small { font-size: 1.2rem; color: var(--ink-2); }
.q-ans.picked { opacity: 1; outline: 4px solid #fff; }

/* ===================== weekly shop ===================== */
.shop-timer { background: rgba(3,30,48,.4); color: #fff; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums; }
.weekly-blobs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.wb-card { background: #fff; border-radius: 18px; padding: 12px 10px 14px; display: grid; justify-items: center; gap: 3px; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.14), inset 0 -5px 0 var(--rc); position: relative; overflow: hidden; }
.wb-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 60%; background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--rc) 25%, #fff), #fff 70%); }
.wb-art { width: 110px; height: 110px; position: relative; }
.wb-art svg { width: 100%; height: 100%; }
.wb-card b { font-size: 1.05rem; position: relative; }
.wb-rar { font-weight: 900; font-size: .85rem; }
.wb-pack { font-size: .78rem; margin-bottom: 6px; }
.deal-tag { background: var(--red); color: #fff; font-weight: 900; font-size: .75rem; padding: 2px 7px; border-radius: 999px; }
.old-price { opacity: .7; font-weight: 800; }

.official-tag { display: inline-block; vertical-align: middle; font-size: .7rem; font-weight: 900; color: #fff; background: linear-gradient(135deg, #0ea5e9, #22c55e); padding: 2px 8px; border-radius: 999px; margin-left: 4px; letter-spacing: .02em; }

/* ---------- admin dashboard ---------- */
.ad-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ad-tile { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-label { font-size: .8rem; font-weight: 800; color: var(--ink-2); }
.ad-value { font-size: 1.7rem; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.ad-sub { font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ad-grid > .card, .ad-chart { margin: 0; min-width: 0; }
.ad-chart h3, .ad-grid h3, .card > h3 { margin: 0 0 10px; font-size: 1rem; }
.ad-cols { display: flex; align-items: flex-end; gap: 2px; height: 150px; padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.ad-col { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; justify-content: center; outline: none; }
.ad-col i { display: block; width: 72%; max-width: 26px; background: var(--primary-d); border-radius: 4px 4px 0 0; transition: background .15s; }
.ad-col:hover i, .ad-col:focus i { background: #075985; }
.ad-col-val { position: absolute; top: -18px; font-size: .72rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.ad-col-x { position: absolute; bottom: -19px; font-size: .68rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .75rem; font-weight: 800; padding: 5px 8px; border-radius: 8px; white-space: nowrap; z-index: 5; pointer-events: none; }
.ad-hbars { display: flex; flex-direction: column; gap: 6px; }
.ad-hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: .85rem; }
.ad-hname { font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-htrack { height: 12px; background: var(--card-2); border-radius: 6px; overflow: hidden; }
.ad-htrack i { display: block; height: 100%; background: var(--primary-d); border-radius: 0 4px 4px 0; }
.ad-hbar b { font-variant-numeric: tabular-nums; color: var(--ink); }
.ad-scroll { overflow-x: auto; }
.ad-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.ad-table th { text-align: left; color: var(--ink-2); font-weight: 800; padding: 6px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.ad-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.ad-hidden { display: none !important; }

/* ---------- friends & invites ---------- */
.quick-row { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-row .btn { flex: 1 1 180px; }
.friend-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.friend-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; flex-wrap: wrap; }
.friend-row:nth-child(odd) { background: var(--card-2); }
.friend-who { display: flex; align-items: center; gap: 10px; flex: 1 1 160px; min-width: 0; text-decoration: none; color: inherit; position: relative; }
.friend-who .grow { display: flex; flex-direction: column; min-width: 0; }
.friend-who .grow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-who .muted { font-size: .8rem; }
.friend-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #b0bec5; border: 2px solid #fff; display: inline-block; flex: none; }
.friend-who .dot { position: absolute; left: 34px; top: 32px; }
.dot.on { background: var(--green); }
.fr-h { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 14px 0 6px; }
.invites-card { border: 3px solid var(--purple); }
.invite-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.invite-row:first-of-type { border-top: 0; }
.invite-row .grow { flex: 1 1 200px; display: flex; flex-direction: column; }
.invite-row .muted { font-size: .8rem; }
.icon-btn.small { width: 34px; height: 34px; }
.chips-row.wrap { flex-wrap: wrap; overflow: visible; }
.inv-friend { display: inline-flex; align-items: center; gap: 6px; }
.avatar.xs { width: 26px; height: 26px; border-radius: 8px; border-width: 2px; box-shadow: none; background: var(--card-2); }
.inv-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; margin-top: 8px; }
.inv-stash { appearance: none; text-align: left; border: 2px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; cursor: pointer; font: inherit; color: var(--ink); }
.inv-stash.active { border-color: var(--teal); background: #e6fffa; }
.inv-stash .muted { font-size: .8rem; }
.inv-go { display: flex; flex-direction: column; gap: 8px; }
.inv-go .row .input { flex: 1; }
.qt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.qt-friend { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 14px; background: var(--card-2); text-decoration: none; color: var(--ink); font-size: .85rem; }
.qt-friend .avatar { width: 56px; height: 56px; border-radius: 16px; border-width: 3px; box-shadow: none; }
.qt-friend b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.chip-btn.inv-friend { background: var(--card-2); color: var(--ink); border: 2px solid var(--line); }
.chip-btn.inv-friend.active { background: #e6fffa; border-color: var(--teal); }
.chip-btn.inv-friend.active::before { content: '✓'; font-weight: 900; color: var(--teal-d); }

/* ---------- guests ---------- */
.guest-cta { margin-top: 14px; }
.guest-main { min-height: 100vh; padding: 16px; display: block; }
.guest-join { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.guest-logo { color: #fff; font-size: 1.6rem; font-weight: 900; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.guest-logo svg { width: 42px; height: 42px; }
.guest-pill { font-weight: 800; }
.guest-tag { font-style: normal; font-size: .7em; font-weight: 800; background: rgba(255,255,255,.25); color: inherit; padding: 1px 6px; border-radius: 999px; vertical-align: middle; }
.lv-board .guest-tag { background: var(--card-2); color: var(--ink-2); }
.lv-how { color: #fff; text-align: center; max-width: 640px; margin: 0 auto 12px; font-weight: 700; opacity: .92; }
.notice-card { border: 3px solid var(--gold); margin-bottom: 14px; }

/* ---------- Treasure Stash ---------- */
.chests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.chest { appearance: none; border: 0; background: var(--card-2); border-radius: 18px; padding: 14px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; transition: transform .15s; min-height: 120px; }
.chest svg { width: 80px; max-width: 100%; }
.chest:hover:not(:disabled) { transform: translateY(-4px) rotate(-2deg); }
.chest.opening { animation: chest-shake .4s ease infinite; }
@keyframes chest-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.chest.open { animation: none; opacity: .55; }
.chest.open.mine { opacity: 1; transform: scale(1.06); box-shadow: 0 0 0 4px var(--gold); }
.chest-label { font-weight: 900; font-size: .95rem; color: var(--ink); }
.chest.good .chest-label { color: var(--green-d); }
.chest.bad .chest-label { color: var(--red-d); }
.target-list, .offer-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.target-btn, .offer-btn { appearance: none; border: 3px solid var(--line); background: var(--card); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; color: var(--ink); position: relative; }
.target-btn svg, .offer-btn svg { width: 64px; height: 64px; }
.target-btn:hover:not(:disabled), .offer-btn:hover:not(:disabled) { border-color: var(--purple); }
.target-btn span, .offer-btn span { font-size: .8rem; color: var(--ink-2); font-weight: 700; }
.offer-btn .rar { text-transform: uppercase; letter-spacing: .04em; }
.offer-btn.r-Rare { border-color: #42a5f5; } .offer-btn.r-Epic { border-color: #ec407a; } .offer-btn.r-Legendary { border-color: #ffa000; }
.offer-btn.r-Chroma { border-color: #00bcd4; } .offer-btn.r-Mystical { border-color: #8e24aa; }
.lvl-up { position: absolute; top: -10px; right: -6px; background: var(--green); color: #fff; font-style: normal; font-weight: 900; font-size: .7rem; padding: 2px 8px; border-radius: 999px; }

/* ---------- Blob Factory ---------- */
.factory { background: rgba(255,255,255,.95); border-radius: 18px; padding: 12px; margin-bottom: 12px; }
.fac-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--ink); font-size: .9rem; }
.fac-head span { font-weight: 800; color: var(--purple-d); font-variant-numeric: tabular-nums; }
.fac-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fac-slot { aspect-ratio: 1; background: var(--card-2); border-radius: 12px; display: grid; place-items: center; position: relative; border: 2px solid var(--line); }
.fac-slot svg { width: 80%; height: 80%; }
.fac-slot span { position: absolute; bottom: 2px; right: 4px; font-size: .65rem; font-weight: 900; color: var(--ink-2); }
.fac-slot.empty { border-style: dashed; }
.fac-slot.r-Rare { border-color: #42a5f5; } .fac-slot.r-Epic { border-color: #ec407a; } .fac-slot.r-Legendary { border-color: #ffa000; }
.fac-slot.r-Chroma { border-color: #00bcd4; } .fac-slot.r-Mystical { border-color: #8e24aa; }

/* ---------- Blob Dash ---------- */
.dash-track { background: linear-gradient(#7cb342, #558b2f); border-radius: 18px; padding: 8px 10px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.lane { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; }
.lane-name { color: #fff; font-weight: 800; font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane.me .lane-name { color: #fff59d; }
.lane-road { position: relative; height: 38px; background: #8d6e63; border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.15); }
.lane.me .lane-road { box-shadow: inset 0 0 0 3px #fff59d; }
.runner { position: absolute; top: 2px; width: 34px; height: 34px; transition: left .5s cubic-bezier(.3, 1.4, .5, 1); }
.runner svg { width: 100%; height: 100%; }
.finish { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; border-radius: 0 10px 10px 0; background: repeating-linear-gradient(#fff 0 6px, #212121 6px 12px); }
.dash-done { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; text-align: center; }
.dash-done b { font-size: 1.3rem; }

/* ---------- rounds (Showdown, Last Blob Standing) ---------- */
.rd-timer { position: relative; height: 12px; border-radius: 999px; background: rgba(255,255,255,.25); overflow: hidden; margin: 4px 0 12px; }
.rd-timer i { position: absolute; inset: 0 auto 0 0; background: #fff59d; border-radius: 999px; transition: width .2s linear; }
.rd-timer span { position: absolute; right: 8px; top: -3px; font-size: .7rem; font-weight: 900; color: var(--ink); }
.rd-result { text-align: center; font-size: 1.3rem; font-weight: 900; padding: 10px; border-radius: 16px; margin-bottom: 10px; color: #fff; }
.rd-result.good { background: var(--green); } .rd-result.bad { background: var(--red); } .rd-result.meh { background: rgba(255,255,255,.25); }
.hearts { display: inline-flex; gap: 4px; align-items: center; }
.heart { width: 20px; height: 20px; fill: rgba(255,255,255,.3); }
.heart.on { fill: #ff4d8d; }
.lv-board li.out { opacity: .5; }
/* ---------- admin moderation ---------- */
.ad-tabs { margin-bottom: 14px; }
.ad-tabs a { text-decoration: none; padding: 8px 14px; border-radius: 10px; color: #fff; font-weight: 800; white-space: nowrap; }
.ad-tabs a.active { background: #fff; color: var(--ink); }
.chip-btn.ad-chip { background: var(--card-2); color: var(--ink); border: 2px solid var(--line); }
.chip-btn.ad-chip.active { background: var(--primary-d); color: #fff; border-color: var(--primary-d); }
.ad-badge { display: inline-block; font-size: .75rem; font-weight: 900; padding: 2px 8px; border-radius: 999px; }
.ad-badge.ok { background: #dcfce7; color: var(--green-d); }
.ad-badge.bad { background: #fee2e2; color: var(--red-d); }
.ad-actions { display: grid; gap: 10px; }
.ad-act { display: flex; flex-direction: column; gap: 6px; background: var(--card-2); border-radius: 14px; padding: 12px; }
.ad-act .muted { font-size: .85rem; }
.ad-act .btn { align-self: flex-start; }
.temp-pw { margin-top: 8px; background: #fff; border: 3px dashed var(--gold); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.temp-pw code { font-size: 1.4rem; font-weight: 900; letter-spacing: .03em; color: var(--ink); user-select: all; }
.fac-grid { grid-template-columns: repeat(10, 1fr); }
@media (max-width: 760px) { .fac-grid { grid-template-columns: repeat(5, 1fr); } }
.guest-cta { white-space: normal; text-align: center; line-height: 1.25; }

/* ---------- limited / special packs ---------- */
.sub-h { color: #fff; font-size: 1.05rem; margin: 16px 0 8px; }
.limited-tag { font-size: .7rem; font-weight: 900; color: #fff; background: var(--purple); padding: 2px 8px; border-radius: 999px; }
.earn-pill { font-size: .8rem; font-weight: 900; color: var(--green-d); }
.pack.reward { box-shadow: 0 0 0 3px var(--gold), var(--shadow); }
.pack.mystery { position: relative; }
.mystery-q { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); font-size: 3.2rem; font-weight: 900; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.35); pointer-events: none; }

/* ---------- classroom, reports, Plus ---------- */
.plus-tag { display: inline-block; background: linear-gradient(90deg, #6366f1, #a855f7); color: #fff; font-size: .72rem; font-weight: 900; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.upsell { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 3px solid #a5b4fc; }
.upsell > div { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 220px; }
.plan-strip { display: flex; gap: 6px 14px; align-items: center; flex-wrap: wrap; background: rgba(3,30,48,.35); color: #e0f2fe; border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-size: .9rem; }
.plan-strip b { color: #fff; }
.plan-strip a { margin-left: auto; color: #fff; font-weight: 900; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.class-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); transition: transform .12s; }
.class-card:hover { transform: translateY(-2px); }
.class-card b { font-size: 1.1rem; }
.class-card.archived { opacity: .6; }
.class-code { align-self: flex-start; margin-top: 6px; font-family: ui-monospace, Menlo, monospace; font-weight: 900; letter-spacing: .12em; background: var(--card-2); border-radius: 10px; padding: 4px 10px; color: var(--primary-d); }
.class-hero { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.code-box { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--card-2); border-radius: 16px; padding: 14px 20px; min-width: 200px; }
.code-box span { font-weight: 800; color: var(--ink-2); font-size: .85rem; }
.code-box b { font-family: ui-monospace, Menlo, monospace; font-size: 2.2rem; letter-spacing: .14em; color: var(--primary-d); }
.class-how { flex: 1; min-width: 220px; }
.class-how ol { margin: 6px 0; padding-left: 20px; }
.code-input { text-transform: uppercase; letter-spacing: .08em; font-weight: 900; min-width: 0; }
.code-input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 700; }
.joined-list { margin-top: 10px; display: grid; gap: 6px; }
.joined-row { display: flex; gap: 10px; align-items: center; background: var(--card-2); border-radius: 12px; padding: 8px 12px; }
.joined-row .linkish { margin-left: auto; color: var(--ink-2); }
.join-class-card, .teacher-card { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.join-class-card > div { flex: 1 1 240px; min-width: 0; }
.join-class-card form { flex-wrap: nowrap; flex: 1 1 260px; min-width: 0; }
.join-class-card .code-input { flex: 1; width: 100%; }
.join-class-card form .btn { flex: none; }
.hw-list { display: grid; gap: 8px; margin-top: 10px; }
.hw-row { display: flex; gap: 12px; align-items: center; background: var(--card-2); border-radius: 14px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.hw-row.late { box-shadow: inset 4px 0 0 var(--red); }
.hw-row.done { opacity: .75; }
.hw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hw-main .bar { height: 8px; }
.hw-count { font-weight: 900; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hw-done { font-weight: 800; }
.cl-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.cl-table th { text-align: left; color: var(--ink-2); font-weight: 800; padding: 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.cl-table td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.cl-table td.wrap { white-space: normal; min-width: 180px; }
.cl-table tr.past td { color: var(--ink-2); }
.cl-who { display: inline-flex; gap: 8px; align-items: center; font-weight: 800; }
.cl-av { width: 30px; height: 30px; display: inline-block; }
.cl-av svg { width: 100%; height: 100%; }
.st { font-size: .78rem; font-weight: 900; padding: 3px 9px; border-radius: 999px; color: #fff; }
.st.ok { background: var(--green); } .st.warn { background: var(--gold-d); } .st.mid { background: var(--primary); } .st.off { background: #94a3b8; }
.acc { position: relative; display: inline-flex; align-items: center; width: 110px; height: 20px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.acc i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }
.acc.hi i { background: #86efac; } .acc.md i { background: #fde68a; } .acc.lo i { background: #fca5a5; }
.acc em { position: relative; font-style: normal; font-weight: 900; font-size: .78rem; padding-left: 8px; color: var(--ink); }
.qcell { text-align: center; font-weight: 900; }
.q1 { color: var(--green-d); } .q2 { color: var(--gold-d); } .q3 { color: var(--red-d); } .q0 { color: #cbd5e1; }
.hard-q { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hard-q > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.report-list { display: grid; gap: 8px; }
.report-row { display: flex; flex-direction: column; gap: 2px; background: var(--card-2); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.as-res { display: grid; gap: 6px; margin-top: 8px; max-height: 260px; overflow-y: auto; }
.as-pick { appearance: none; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 10px; text-align: left; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font: inherit; color: var(--ink); }
.as-pick.on { border-color: var(--green); background: #f0fdf4; }
.plan-card { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.plan-card > div { display: flex; flex-direction: column; gap: 4px; }
.plan-card.on { border: 3px solid #a5b4fc; }
.plan-table td:nth-child(2), .plan-table td:nth-child(3), .plan-table th:nth-child(2), .plan-table th:nth-child(3) { text-align: center; }
.buy-card h2 { margin-top: 0; }
.lv-report { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.lv-report > div { display: flex; flex-direction: column; gap: 2px; }
.legal { max-width: 760px; margin: 0 auto; line-height: 1.55; }
.legal h3 { margin: 18px 0 4px; }
.legal-links { text-align: center; margin-top: 14px; }
.legal-links a { color: #e0f2fe; font-weight: 800; }
details.card summary { cursor: pointer; }
@media (max-width: 640px) {
  .code-box b { font-size: 1.8rem; }
  .join-class-card form { width: 100%; }
  .join-class-card .code-input { flex: 1; width: auto; }
  .hw-row .btn { display: none; }
}
