/* Glosjakten – game UI design system */
:root {
  --bg0: #0b1030; --bg1: #141b4a; --bg2: #1d2763; --panel: #1a2259; --panel2: #232d72; --line: rgba(255, 255, 255, .12); --line2: rgba(255, 255, 255, .22);
  --ink: #f4f6ff; --ink2: #b9c2ea; --ink3: #8590c4;
  --gold: #ffcf3f; --gold2: #ffad1f; --gold3: #c7730a; --teal: #2fe0d0; --teal2: #14a99c; --blue: #3fb4ff; --blue2: #1f7be0; --blue3: #13509c;
  --pink: #ff5fb3; --violet: #9b6bff; --magenta: #e14cff; --green: #4fe07c; --green2: #23a654; --red: #ff5a5f; --orange: #ff9a3c;
  --r-common: #9fb4cc; --r-uncommon: #5fd068; --r-rare: #39a7ff; --r-epic: #b46cff; --r-legendary: #ffb22e;
  --radius: 18px; --radius-s: 12px;
  --shadow: 0 10px 30px rgba(3, 6, 25, .45);
  --font-display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 72px; --top-h: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 700px at 70% -10%, #3a2a7a 0%, transparent 60%), radial-gradient(900px 600px at -10% 110%, #0f5a74 0%, transparent 55%), linear-gradient(180deg, var(--bg1), var(--bg0));
  color: var(--ink); font-family: var(--font); font-weight: 700; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; letter-spacing: .3px; margin: 0; line-height: 1.05; }
h1 { font-size: clamp(30px, 4.6vw, 52px); text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 20px; }
p { margin: 0; }
.muted { color: var(--ink2); font-weight: 600; }
.tiny { font-size: 12px; color: var(--ink3); font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
svg.i { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons ---------- */
.btn { --b1: var(--blue); --b2: var(--blue2); --b3: var(--blue3); --t: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; border-radius: 14px; padding: 13px 22px 15px; min-height: 48px;
  background: linear-gradient(180deg, var(--b1), var(--b2)); color: var(--t); font-family: var(--font-display); font-size: 19px; letter-spacing: .4px; text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
  box-shadow: 0 5px 0 var(--b3), 0 10px 18px rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .35); transition: transform .08s, box-shadow .08s, filter .15s; user-select: none; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--b3), 0 4px 8px rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .3); }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; }
.btn.gold { --b1: #ffe066; --b2: var(--gold2); --b3: var(--gold3); --t: #3a2100; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
.btn.green { --b1: #6cf094; --b2: var(--green2); --b3: #146b35; --t: #fff; }
.btn.pink { --b1: #ff86c6; --b2: #e83e94; --b3: #9b1d5e; }
.btn.ghost { --b1: rgba(255, 255, 255, .12); --b2: rgba(255, 255, 255, .06); --b3: rgba(0, 0, 0, .35); font-family: var(--font); font-weight: 800; font-size: 16px; }
.btn.red { --b1: #ff7b7f; --b2: #e2363c; --b3: #8f1d21; }
.btn.big { font-size: 26px; padding: 16px 34px 18px; min-height: 64px; border-radius: 18px; }
.btn.huge { font-size: 34px; padding: 18px 44px 22px; border-radius: 22px; }
.btn.small { font-size: 15px; padding: 8px 14px 10px; min-height: 38px; border-radius: 11px; box-shadow: 0 3px 0 var(--b3), inset 0 2px 0 rgba(255, 255, 255, .3); }
.btn.icon { padding: 0; width: 48px; }
.btn .price { display: inline-flex; align-items: center; gap: 4px; }
.link { background: none; border: 0; color: var(--teal); font-weight: 800; padding: 6px; text-decoration: underline; text-underline-offset: 3px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); font-size: 13px; font-weight: 800; white-space: nowrap; }

/* ---------- panels ---------- */
.panel { position: relative; background: linear-gradient(180deg, rgba(43, 54, 140, .92), rgba(26, 33, 92, .94)); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .12); }
.panel.pad { padding: 20px; }
.glass { background: rgba(14, 20, 60, .62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1.5px solid var(--line); border-radius: var(--radius); }

/* ---------- app shell ---------- */
.topbar { position: fixed; z-index: 30; inset: 0 0 auto 0; height: var(--top-h); display: flex; align-items: center; gap: 14px; padding: 0 18px; background: linear-gradient(180deg, rgba(9, 13, 40, .92), rgba(9, 13, 40, .6)); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 26px; letter-spacing: .5px; text-decoration: none; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.logo .mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--gold), var(--orange)); box-shadow: 0 3px 0 var(--gold3); transform: rotate(-6deg); }
.logo .mark svg { width: 24px; height: 24px; stroke: #3a2100; }
.logo .mark:has(img) { background: none; box-shadow: none; overflow: visible; }
.logo .mark img { width: 100%; height: 100%; border-radius: 10px; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); display: block; }
.logo b { color: var(--gold); }
.nav { display: flex; gap: 6px; margin-left: 18px; }
.nav button { white-space: nowrap; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--ink2); padding: 10px 16px; border-radius: 12px; font-weight: 900; font-size: 16px; transition: background .15s, color .15s; }
.nav button:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav button[aria-current="page"] { color: #1b1300; background: linear-gradient(180deg, #ffe066, var(--gold2)); box-shadow: 0 3px 0 var(--gold3); }
.spacer { flex: 1; }
.stat { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); font-family: var(--font-display); font-size: 20px; }
.coin { width: 28px; height: 28px; flex: none; }
.level-badge { position: relative; width: 44px; height: 44px; display: grid; place-items: center; font-family: var(--font-display); font-size: 18px; }
.level-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.level-badge .track { stroke: rgba(255, 255, 255, .15); }
.level-badge .fill { stroke: var(--teal); transition: stroke-dashoffset .8s cubic-bezier(.2, .8, .2, 1); }
.profile-chip { display: flex; align-items: center; gap: 10px; border: 0; background: rgba(0, 0, 0, .3); border-radius: 999px; padding: 4px 14px 4px 4px; border: 1px solid var(--line); }
.profile-chip .name { font-weight: 900; font-size: 15px; line-height: 1.1; text-align: left; }
.profile-chip .title { font-size: 11px; color: var(--ink3); letter-spacing: .5px; text-transform: uppercase; }
.bottomnav { display: none; }
main { padding: calc(var(--top-h) + 18px) 18px 30px; max-width: 1440px; margin: 0 auto; min-height: 100vh; }
.screen { animation: screenIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- hub ---------- */
.hub { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.05fr); gap: 22px; align-items: stretch; min-height: calc(100vh - var(--top-h) - 50px); }
.stage-wrap { position: relative; border-radius: 26px; overflow: hidden; min-height: 540px; background: #1c2050; box-shadow: var(--shadow); border: 2px solid var(--line); }
.stage-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.stage-overlay { position: absolute; inset: auto 16px 16px 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; pointer-events: none; }
.stage-overlay > * { pointer-events: auto; }
.nameplate { padding: 10px 16px; }
.nameplate .n { font-family: var(--font-display); font-size: 26px; }
.nameplate .t { font-size: 12px; color: var(--teal); letter-spacing: 1px; text-transform: uppercase; }
.stage-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.stage-top > * { pointer-events: auto; }
.loading-figure { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.loading-figure .ring { width: 90px; height: 90px; border-radius: 50%; border: 6px solid rgba(255, 255, 255, .15); border-top-color: var(--gold); animation: spin 1s linear infinite; }
.loading-figure p { margin-top: 12px; text-align: center; font-family: var(--font-display); font-size: 20px; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
@keyframes spin { to { transform: rotate(360deg); } }

.play-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
main { overflow-x: clip; }
.hello h1 span { color: var(--gold); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mode { position: relative; overflow: hidden; border-radius: 18px; border: 3px solid transparent; background: var(--panel); padding: 0; text-align: left; min-height: 150px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; isolation: isolate; }
.mode:hover { transform: translateY(-3px); }
.mode[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 207, 63, .25), var(--shadow); }
.mode img, .mode .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.mode::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(8, 10, 35, .92)); }
.mode .body { position: absolute; inset: auto 12px 12px 12px; }
.mode .name { font-family: var(--font-display); font-size: 22px; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.mode .tag { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 900; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, .55); letter-spacing: .6px; text-transform: uppercase; }
.mode .tag.t-action { color: var(--gold); }
.mode .tag.t-calm { color: var(--teal); }
.mode .tag.t-spell { color: #ffd28a; }
.mode .tag.t-listen { color: #ff9be0; }
.mode.featured { grid-column: 1 / -1; min-height: 210px; }
.mode:not(.featured) .desc { font-size: 12px; color: var(--ink2); max-width: 30ch; }
.mode.featured .name { font-size: 34px; }
.mode .desc { font-size: 13px; color: var(--ink2); font-weight: 700; margin-top: 3px; max-width: 46ch; }
.wordpick { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.wordpick .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.list-select { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, .28); border: 1.5px solid var(--line); text-align: left; }
.list-select .ttl { font-weight: 900; font-size: 16px; }
.list-select .sub { font-size: 12px; color: var(--ink3); }
.seg { display: inline-flex; background: rgba(0, 0, 0, .3); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--ink2); padding: 8px 12px; border-radius: 9px; font-weight: 900; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--panel2); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.play-row { display: flex; gap: 12px; align-items: center; }
.play-row .btn.huge { flex: 1; }
.progress-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.progress-strip .cell { padding: 12px 14px; }
.progress-strip .v { font-family: var(--font-display); font-size: 26px; }

/* ---------- picker modal / sheets ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(4, 6, 22, .7); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 18px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: min(86vh, 900px); overflow: auto; padding: 22px; animation: pop .28s cubic-bezier(.2, 1.3, .3, 1); }
.modal.wide { width: min(900px, 100%); }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.modal h2 { margin-bottom: 8px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.option-list { display: grid; gap: 10px; margin-top: 14px; }
.option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 2px solid var(--line); text-align: left; }
.option:hover { border-color: var(--line2); }
.option[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 207, 63, .08); }
.option .dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.option .grow { flex: 1; }
.toast-zone { position: fixed; z-index: 90; left: 50%; top: calc(var(--top-h) + 12px); transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 12px 18px; border-radius: 14px; background: rgba(12, 16, 48, .95); border: 2px solid var(--line2); box-shadow: var(--shadow); font-weight: 900; animation: toastIn .35s cubic-bezier(.2, 1.3, .3, 1); display: flex; align-items: center; gap: 10px; }
.toast.good { border-color: var(--green); }
.toast.bad { border-color: var(--red); }
@keyframes toastIn { from { transform: translateY(-12px) scale(.9); opacity: 0; } }

/* ---------- locker / studio ---------- */
.studio { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(380px, 560px); gap: 20px; min-height: calc(100vh - var(--top-h) - 50px); }
.studio .stage-wrap { min-height: 600px; }
.locker { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 16px; gap: 12px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.cat { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 74px; padding: 9px 4px 8px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 2px solid transparent; color: var(--ink2); font-size: 12px; font-weight: 900; }
.cat svg.i { width: 26px; height: 26px; }
.cat[aria-pressed="true"] { color: #fff; border-color: var(--gold); background: rgba(255, 207, 63, .12); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; overflow: auto; padding: 2px; align-content: start; flex: 1; min-height: 200px; }
.item { --rc: var(--r-common); position: relative; aspect-ratio: 1 / 1.18; border-radius: 14px; border: 0; padding: 0; overflow: hidden; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 55%, #fff 0%) 0%, color-mix(in srgb, var(--rc) 70%, #000) 70%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15), 0 4px 0 rgba(0, 0, 0, .3); transition: transform .12s; display: flex; flex-direction: column; }
.item:hover { transform: translateY(-2px); }
.item[data-r="uncommon"] { --rc: var(--r-uncommon); } .item[data-r="rare"] { --rc: var(--r-rare); } .item[data-r="epic"] { --rc: var(--r-epic); } .item[data-r="legendary"] { --rc: var(--r-legendary); }
.item .thumb { flex: 1; display: grid; place-items: center; min-height: 0; }
.item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item .thumb .sw { width: 60%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .2), 0 4px 10px rgba(0, 0, 0, .35); }
.item .label { background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .55)); font-size: 12px; font-weight: 900; padding: 5px 6px 6px; text-align: center; line-height: 1.1; min-height: 34px; display: grid; place-items: center; }
.item .badge { position: absolute; top: 6px; right: 6px; height: 24px; min-width: 24px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 900; background: rgba(0, 0, 0, .6); }
.item .badge.on { background: var(--green2); }
.item .badge.lock svg { width: 13px; height: 13px; }
.item[aria-pressed="true"] { outline: 3px solid #fff; outline-offset: -3px; box-shadow: 0 0 0 4px var(--gold), 0 4px 0 rgba(0, 0, 0, .3); }
.item.locked .thumb { filter: saturate(.7) brightness(.85); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 48px; height: 48px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18); }
.swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 3px var(--gold), inset 0 -5px 0 rgba(0, 0, 0, .18); }
.locker .section-title { font-family: var(--font-display); font-size: 18px; color: var(--ink2); margin-top: 4px; }
.locker-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.tryon-banner { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: rgba(255, 90, 160, .9); font-weight: 900; font-size: 13px; letter-spacing: .5px; box-shadow: var(--shadow); white-space: nowrap; }
.namefield { display: flex; gap: 8px; align-items: center; }
.namefield input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--line); background: rgba(0, 0, 0, .3); font-weight: 900; font-size: 18px; }
.stage-btn { width: 46px; height: 46px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(10, 14, 44, .65); display: grid; place-items: center; backdrop-filter: blur(6px); }

/* ---------- shop ---------- */
.shop { display: grid; gap: 22px; }
.chests { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.chest-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px; padding: 18px; min-height: 230px; }
.chest-card .art { position: relative; height: 200px; }
.chest-card .art canvas, .chest-card .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.chest-card .glow { position: absolute; inset: 10% 5%; border-radius: 50%; filter: blur(40px); opacity: .55; }
.chest-card h3 { font-size: 26px; }
.chest-card .btn { white-space: nowrap; width: 100%; justify-content: center; }
.chest-card .btn .cost { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; padding: 2px 10px 2px 4px; border-radius: 999px; background: rgba(0, 0, 0, .14); }
.odds { display: grid; gap: 4px; margin: 10px 0; font-size: 13px; }
.odds div { display: flex; justify-content: space-between; gap: 10px; }
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.offer .item { aspect-ratio: 1 / 1.1; }
.offer .buy { margin-top: 8px; width: 100%; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.timer { font-size: 13px; color: var(--ink3); }

/* chest opening overlay */
.chest-overlay { position: fixed; inset: 0; z-index: 80; background: radial-gradient(circle at 50% 45%, #2b1d6e, #070a24 70%); display: grid; grid-template-rows: 1fr auto; animation: fade .3s; }
.chest-overlay canvas { width: 100%; height: 100%; display: block; }
.chest-ui { position: absolute; inset: auto 0 0 0; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 70px 16px max(5vh, 22px); pointer-events: none; background: linear-gradient(180deg, transparent, rgba(6, 8, 30, .78) 45%, rgba(6, 8, 30, .92)); }
.chest-ui:empty { display: none; }
.chest-ui .kind { font-size: 13px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--ink2); }
.chest-ui > * { pointer-events: auto; }
.chest-ui .rar { font-family: var(--font-display); font-size: 18px; letter-spacing: 3px; text-transform: uppercase; padding: 4px 14px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 2px solid currentColor; text-shadow: 0 0 12px currentColor; }
.chest-ui .nm { font-family: var(--font-display); font-size: clamp(34px, 6vw, 60px); text-shadow: 0 5px 0 rgba(0, 0, 0, .35); }
.chest-ui .row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.skip { position: absolute; top: 16px; right: 16px; }
.reveal-in { animation: revealIn .5s cubic-bezier(.2, 1.4, .3, 1) both; }
@keyframes revealIn { from { transform: translateY(20px) scale(.8); opacity: 0; } }

/* ---------- homework ---------- */
.hw { display: grid; gap: 18px; }
.lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.list-card { padding: 16px; display: grid; gap: 10px; }
.list-card .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.list-card h3 { font-size: 22px; word-break: break-word; }
.mastery { height: 10px; border-radius: 999px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.mastery i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--green)); border-radius: inherit; }
.new-card { display: grid; place-items: center; text-align: center; gap: 10px; min-height: 180px; border: 3px dashed rgba(255, 255, 255, .22); border-radius: var(--radius); background: rgba(255, 255, 255, .03); padding: 20px; }
.import-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.import-opt { display: grid; justify-items: center; gap: 8px; padding: 18px 10px; text-align: center; border-radius: 16px; border: 2px solid var(--line); background: rgba(0, 0, 0, .22); }
.import-opt:hover { border-color: var(--gold); }
.import-opt .ic { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; }
.import-opt .ic svg { width: 34px; height: 34px; }
.import-opt b { font-size: 17px; }
.drop { border: 3px dashed rgba(255, 255, 255, .25); border-radius: 18px; padding: 26px; text-align: center; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--gold); background: rgba(255, 207, 63, .07); }
.crop-wrap { position: relative; display: grid; place-items: center; background: rgba(0, 0, 0, .35); border-radius: 14px; padding: 10px; }
.crop-wrap canvas { max-width: 100%; max-height: 62vh; touch-action: none; border-radius: 8px; }
.scanbar { position: absolute; left: 10px; right: 10px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, transparent, var(--teal), transparent); box-shadow: 0 0 18px var(--teal); animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { top: 12px; } to { top: calc(100% - 16px); } }
.ocr-progress { display: grid; gap: 8px; }
.bar { height: 14px; border-radius: 999px; background: rgba(0, 0, 0, .35); overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .3s; }
.review-table { display: grid; gap: 8px; }
.prow { display: grid; grid-template-columns: 10px 1fr 1fr auto; gap: 8px; align-items: center; padding: 6px; border-radius: 12px; background: rgba(0, 0, 0, .2); border: 2px solid transparent; }
.prow.warn { border-color: rgba(255, 154, 60, .6); background: rgba(255, 154, 60, .08); }
.prow .st { width: 10px; height: 100%; min-height: 36px; border-radius: 6px; background: var(--green2); }
.prow.warn .st { background: var(--orange); }
.prow input { width: 100%; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--line); background: rgba(0, 0, 0, .3); font-weight: 800; font-size: 16px; }
.prow input:focus { border-color: var(--gold); outline: none; }
.prow .why { grid-column: 2 / -1; font-size: 13px; color: #ffc48a; font-weight: 700; display: grid; gap: 6px; }
.prow .why:empty { display: none; }
.prow .why .btn { justify-self: start; }
.prow .snips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prow .snips canvas { height: 40px; width: auto; max-width: 100%; object-fit: contain; border-radius: 6px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.prow.warn .snips canvas { height: 56px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
textarea.paste { width: 100%; min-height: 220px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: rgba(0, 0, 0, .3); font-weight: 700; font-size: 16px; line-height: 1.5; resize: vertical; }
.field { display: grid; gap: 6px; }
.field input, .field select { padding: 11px 14px; border-radius: 12px; border: 2px solid var(--line); background: rgba(0, 0, 0, .3); font-weight: 800; font-size: 16px; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pack { display: flex; gap: 12px; align-items: center; padding: 14px; text-align: left; border-radius: 16px; border: 2px solid var(--line); background: rgba(0, 0, 0, .22); }
.pack .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #11152e; }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 13px; }

/* ---------- game overlay ---------- */
.game { position: fixed; inset: 0; z-index: 50; background: #0b0f2a; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.game canvas.view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-display); }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-box { background: rgba(8, 12, 40, .62); border: 2px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 8px 14px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.hearts { display: flex; gap: 4px; align-items: center; }
.heart { width: 28px; height: 28px; }
.heart.empty { opacity: .25; filter: grayscale(1); }
.shield-pip { width: 24px; height: 24px; }
.wavebox { text-align: center; min-width: 170px; }
.wavebox .w { font-size: 26px; line-height: 1; }
.wavebox .t { font-family: var(--font); font-weight: 900; font-size: 12px; color: var(--ink2); letter-spacing: .5px; }
.timer-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .15); margin-top: 6px; overflow: hidden; }
.timer-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.storm { display: flex; gap: 4px; align-items: center; margin-top: 6px; justify-content: center; }
.storm i { width: 16px; height: 8px; border-radius: 3px; background: rgba(255, 255, 255, .15); }
.storm i.on { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.scorebox { text-align: right; font-size: 26px; }
.scorebox small { display: block; font-family: var(--font); font-size: 12px; font-weight: 900; color: var(--ink2); }
.pause-btn { width: 50px; height: 50px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .2); background: rgba(8, 12, 40, .62); display: grid; place-items: center; }
.super-btn, .dash-btn { position: absolute; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .3); background: rgba(8, 12, 40, .55); display: grid; place-items: center; font-family: var(--font-display); color: #fff; touch-action: none; }
.dash-btn { right: 26px; bottom: 30px; width: 96px; height: 96px; font-size: 18px; }
.super-btn { right: 136px; bottom: 50px; width: 76px; height: 76px; font-size: 13px; }
.super-btn .fillring { position: absolute; inset: -3px; }
.super-btn.ready { border-color: var(--magenta); box-shadow: 0 0 22px var(--magenta); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.dash-btn.cd { opacity: .55; }
.energy { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(360px, 60vw); }
.energy .lbl { font-family: var(--font); font-weight: 900; font-size: 12px; color: var(--ink2); text-align: center; margin-bottom: 4px; letter-spacing: .5px; }
.energy .bar i { background: linear-gradient(90deg, #a24bff, var(--magenta)); }
.energy.full .bar { box-shadow: 0 0 16px var(--magenta); }
.joystick { position: absolute; left: 0; bottom: 0; width: 50%; height: 60%; touch-action: none; }
.stick-base { position: absolute; width: 130px; height: 130px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); transform: translate(-50%, -50%); pointer-events: none; }
.stick-knob { position: absolute; width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 255, 255, .35); border: 3px solid rgba(255, 255, 255, .6); transform: translate(-50%, -50%); pointer-events: none; }
.callout { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); text-align: center; font-size: clamp(36px, 6vw, 72px); text-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 0 30px rgba(0, 0, 0, .4); pointer-events: none; white-space: nowrap; animation: callout 1.4s cubic-bezier(.2, 1.4, .3, 1) both; }
.callout small { display: block; font-size: .38em; font-family: var(--font); font-weight: 900; letter-spacing: 1px; }
@keyframes callout { 0% { transform: translateX(-50%) scale(.5); opacity: 0; } 15% { transform: translateX(-50%) scale(1.1); opacity: 1; } 25% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-20px); } }
.popups { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: 22px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); animation: popUp .9s ease-out forwards; white-space: nowrap; }
.pop.gold { color: var(--gold); } .pop.red { color: #ff8a8a; } .pop.pink { color: #ff8be8; } .pop.big { font-size: 30px; }
@keyframes popUp { 0% { transform: translate(-50%, -30%) scale(.6); opacity: 0; } 20% { transform: translate(-50%, -60%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -160%) scale(1); opacity: 0; } }
.edge-arrow { position: absolute; width: 44px; height: 44px; transform: translate(-50%, -50%); pointer-events: none; }
.vignette-hurt { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(255, 30, 60, .0); transition: box-shadow .1s; }

/* question card */
.q-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 50%, rgba(10, 8, 40, .35), rgba(5, 6, 25, .75)); animation: fade .3s; pointer-events: auto; }
.qcard { width: min(720px, 100%); padding: 22px; text-align: center; animation: pop .35s cubic-bezier(.2, 1.3, .3, 1); font-family: var(--font); }
.qcard .kicker { font-size: 13px; font-weight: 900; color: var(--teal); letter-spacing: 1.5px; text-transform: uppercase; }
.qcard .word { font-family: var(--font-display); font-size: clamp(38px, 7vw, 68px); margin: 6px 0 4px; word-break: break-word; text-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.qcard .hint { color: var(--ink2); font-size: 15px; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.answer { position: relative; display: flex; align-items: center; gap: 12px; text-align: left; padding: 16px 16px; min-height: 66px; border-radius: 16px; border: 0; background: linear-gradient(180deg, #3a4aa8, #2a3784); box-shadow: 0 5px 0 #18205a, inset 0 2px 0 rgba(255, 255, 255, .2); font-weight: 900; font-size: clamp(17px, 2.2vw, 22px); color: #fff; transition: transform .08s, filter .1s; word-break: break-word; }
.answer:hover { filter: brightness(1.12); }
.answer:active { transform: translateY(3px); }
.answer .k { width: 32px; height: 32px; border-radius: 10px; background: rgba(0, 0, 0, .3); display: grid; place-items: center; font-family: var(--font-display); font-size: 18px; flex: none; }
.answer.right { background: linear-gradient(180deg, #5ce887, #23a654); box-shadow: 0 5px 0 #146b35; animation: rightPop .5s; }
.answer.wrongpick { background: linear-gradient(180deg, #ff8a8e, #d63b40); box-shadow: 0 5px 0 #7d1d21; animation: shake .4s; }
.answer.dim { opacity: .45; }
@keyframes rightPop { 40% { transform: scale(1.06); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.stakes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; text-align: left; }
.stake { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; font-size: 13px; font-weight: 800; color: var(--ink2); background: rgba(0, 0, 0, .25); border: 1.5px solid var(--line); }
.stake b { display: block; color: #fff; font-size: 14px; }
.stake .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.typed { display: flex; gap: 10px; margin-top: 18px; }
.typed input { flex: 1; min-width: 0; padding: 16px; border-radius: 16px; border: 3px solid var(--line2); background: rgba(0, 0, 0, .35); font-weight: 900; font-size: 24px; text-align: center; }
.typed input:focus { outline: none; border-color: var(--gold); }
.special { display: flex; gap: 6px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.special button { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line2); background: rgba(255, 255, 255, .08); font-weight: 900; font-size: 20px; }
.reveal-box { margin-top: 14px; padding: 14px; border-radius: 16px; display: grid; gap: 6px; }
.reveal-box.good { background: rgba(79, 224, 124, .12); border: 2px solid rgba(79, 224, 124, .5); }
.reveal-box.bad { background: rgba(255, 90, 95, .12); border: 2px solid rgba(255, 90, 95, .5); }
.reveal-box .pair { font-family: var(--font-display); font-size: 26px; }
.brief { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; text-align: left; margin-top: 12px; }
.brief .monsters { display: flex; gap: 6px; flex-wrap: wrap; }
.brief .mon { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 12px; background: rgba(0, 0, 0, .3); font-weight: 900; font-size: 14px; }
.brief .mon.elite { background: rgba(225, 76, 255, .25); border: 1.5px solid var(--magenta); }
.key-hint { font-size: 12px; color: var(--ink3); margin-top: 10px; font-weight: 800; }

/* result */
.result { width: min(760px, 100%); padding: 24px; text-align: center; }
.result .stars-big { font-size: 46px; color: var(--gold); letter-spacing: 6px; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.reward-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.reward { padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1.5px solid var(--line); }
.reward .v { font-family: var(--font-display); font-size: 34px; }
.reward .l { font-size: 12px; font-weight: 900; color: var(--ink2); letter-spacing: .6px; text-transform: uppercase; }
.xpbar { height: 18px; border-radius: 999px; background: rgba(0, 0, 0, .35); overflow: hidden; border: 1.5px solid var(--line); margin-top: 8px; }
.xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), #8affd8); transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.missed { text-align: left; display: grid; gap: 6px; margin-top: 14px; }
.missed div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .25); font-weight: 800; }
.levelup { font-family: var(--font-display); font-size: 40px; color: var(--gold); animation: callout 2.2s both; }

/* calm games */
.calm { position: fixed; inset: 0; z-index: 50; overflow-x: hidden; overflow-y: auto; background: radial-gradient(900px 600px at 70% 0%, #2c3f9e, transparent 60%), linear-gradient(180deg, #17205a, #0b1030); }
.calm-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.calm-body { max-width: 980px; margin: 0 auto; padding: 10px 18px 40px; }
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; perspective: 900px; }
.mcard { position: relative; aspect-ratio: 4 / 3.2; border: 0; padding: 0; background: none; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.mcard.flip { transform: rotateY(180deg); }
.mcard .f, .mcard .b { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; padding: 10px; font-weight: 900; font-size: clamp(15px, 2vw, 22px); word-break: break-word; text-align: center; }
.mcard .b { background: radial-gradient(circle at 50% 42%, #2f3f9a, #151c52 72%); box-shadow: inset 0 0 0 3px #d9a93a, inset 0 0 0 8px #151c52, inset 0 0 0 10px rgba(217, 169, 58, .55), 0 5px 0 #0b1035, 0 12px 20px rgba(0, 0, 0, .35); }
.mcard .b svg { width: 52%; height: 52%; filter: drop-shadow(0 0 10px rgba(255, 207, 63, .35)); }
.mcard:not(.flip):not(.done):hover .b { box-shadow: inset 0 0 0 3px #ffd35a, inset 0 0 0 8px #151c52, inset 0 0 0 10px rgba(255, 211, 90, .8), 0 5px 0 #0b1035, 0 0 22px rgba(255, 207, 63, .35); }
.mcard .f { transform: rotateY(180deg); background: linear-gradient(180deg, #fff7e6, #ffe7b8); color: #2a1c05; box-shadow: 0 5px 0 #b88a3a; }
.mcard .f.tr { background: linear-gradient(180deg, #e3fbff, #b8eef7); box-shadow: 0 5px 0 #4b9fb0; color: #0b2b33; }
.mcard.done .f { background: linear-gradient(180deg, #8ff0ac, #44c96f); box-shadow: 0 5px 0 #1d7a3c; color: #062611; }
.mcard.miss .f { animation: shake .4s; }
.calm .tip-glass { background: rgba(16, 20, 62, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-color: rgba(255, 207, 63, .25); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hub, .studio { grid-template-columns: minmax(0, 1fr); }
  .stage-wrap { min-height: 420px; }
  .studio .stage-wrap { min-height: 46vh; position: sticky; top: calc(var(--top-h) + 8px); z-index: 2; }
}
@media (max-width: 760px) {
  :root { --top-h: 56px; }
  .nav { display: none; }
  .topbar { padding: 0 10px; gap: 8px; }
  .logo { font-size: 21px; } .logo .mark { width: 32px; height: 32px; }
  .profile-chip .txt { display: none; }
  .profile-chip { padding: 4px; }
  .stat { font-size: 17px; padding: 4px 10px 4px 4px; }
  .coin { width: 24px; height: 24px; }
  main { padding: calc(var(--top-h) + 10px) 12px calc(var(--nav-h) + 24px); }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 30; inset: auto 0 0 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(9, 13, 40, .96); border-top: 1px solid var(--line); }
  .bottomnav button { border: 0; background: none; color: var(--ink3); display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 12px; font-weight: 900; }
  .bottomnav button svg.i { width: 26px; height: 26px; }
  .bottomnav button[aria-current="page"] { color: var(--gold); }
  .modes { grid-template-columns: 1fr 1fr; }
  .mode.featured { grid-column: span 2; min-height: 170px; }
  .stage-wrap { min-height: 380px; border-radius: 20px; }
  .stage-overlay { inset: auto 10px 10px 10px; flex-wrap: wrap; align-items: flex-end; }
  .nameplate { padding: 7px 12px; } .nameplate .n { font-size: 20px; } .nameplate .t { font-size: 10px; }
  .stage-overlay .btn.small { padding: 8px 12px; font-size: 14px; }
  .mode:not(.featured) { min-height: 128px; }
  .mode:not(.featured) .desc { display: none; }
  .mode .name { font-size: 19px; }
  .chests { grid-template-columns: 1fr; }
  .chest-card { grid-template-columns: 1fr; }
  .import-options { grid-template-columns: 1fr 1fr; }
  .answers { grid-template-columns: 1fr; gap: 9px; }
  .answer { min-height: 56px; padding: 12px; }
  .stakes { grid-template-columns: 1fr; }
  .qcard { padding: 16px; }
  .mem-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .calm-top { padding: 10px 12px; gap: 8px; } .calm-top h2 { font-size: 22px; }
  .calm-body { padding: 6px 12px 30px; }
  .typed input { font-size: 20px; padding: 13px; }
  .progress-strip { grid-template-columns: repeat(3, 1fr); gap: 6px; } .progress-strip .v { font-size: 20px; }
  .dash-btn { width: 84px; height: 84px; right: 18px; bottom: 22px; }
  .super-btn { right: 112px; bottom: 34px; width: 66px; height: 66px; }
  .reward-row { gap: 8px; } .reward .v { font-size: 26px; }
  .hud-top { top: 8px; left: 8px; right: 8px; gap: 6px; }
  .wavebox { min-width: 120px; } .wavebox .w { font-size: 20px; } .scorebox { font-size: 20px; }
  .heart { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
.hw > .btn.ghost.small { justify-self: start; }
/* phones with a notch: keep the fixed top bar clear of the status bar */
.topbar { padding-top: env(safe-area-inset-top, 0px); height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); }

/* ---------- game kit (shared by the word games) ---------- */
.gk-top { position: absolute; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; pointer-events: none; }
.gk-top > * { pointer-events: auto; }
.gk-title { font-family: var(--font-display); font-size: 24px; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gk-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.gk-chip { font-family: var(--font-display); font-size: 18px; padding: 6px 12px; border-radius: 999px; background: rgba(8, 12, 40, .62); border: 2px solid rgba(255, 255, 255, .14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap; }
.gk-chip.gold { color: var(--gold); } .gk-chip.teal { color: var(--teal); } .gk-chip.pink { color: var(--pink); }
.gk-overlay { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 40%, rgba(12, 10, 46, .45), rgba(4, 6, 24, .82)); animation: fade .3s; overflow-y: auto; }
.gk-intro { width: min(560px, 100%); padding: 22px; text-align: center; display: grid; gap: 12px; justify-items: center; animation: pop .35s cubic-bezier(.2, 1.3, .3, 1); }
.gk-intro-art { width: 100%; aspect-ratio: 16 / 7; border-radius: 14px; background: center / cover no-repeat; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12); }
.gk-intro h2 { font-size: clamp(30px, 6vw, 44px); }
.gk-intro ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; text-align: left; width: 100%; }
.gk-intro li { padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, .22); font-weight: 800; color: var(--ink2); }
.gk-count { position: absolute; inset: 0; z-index: 31; display: grid; place-items: center; font-family: var(--font-display); font-size: clamp(90px, 22vw, 200px); color: #fff; text-shadow: 0 8px 0 rgba(0, 0, 0, .35), 0 0 40px rgba(255, 207, 63, .6); pointer-events: none; }
.gk-count.pop { animation: gkPop .6s cubic-bezier(.2, 1.4, .3, 1); }
@keyframes gkPop { from { transform: scale(2.2); opacity: 0; } 40% { opacity: 1; } to { transform: scale(1); } }
.gk-float { position: absolute; z-index: 25; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: 28px; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .45); pointer-events: none; animation: gkFloat 1.1s ease-out forwards; white-space: nowrap; }
.gk-float.good { color: #8cf5ae; } .gk-float.bad { color: #ffb0b2; } .gk-float.gold { color: var(--gold); }
@keyframes gkFloat { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }
.gk-banner { position: absolute; z-index: 26; left: 50%; top: 38%; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: clamp(40px, 9vw, 84px); color: var(--gold); text-shadow: 0 6px 0 rgba(0, 0, 0, .4), 0 0 30px rgba(255, 207, 63, .5); pointer-events: none; animation: gkBanner 1.3s cubic-bezier(.2, 1.2, .3, 1) forwards; white-space: nowrap; }
.gk-banner.good { color: #8cf5ae; text-shadow: 0 6px 0 rgba(0, 0, 0, .4), 0 0 30px rgba(79, 224, 124, .5); }
.gk-banner.bad { color: #ffb0b2; text-shadow: 0 6px 0 rgba(0, 0, 0, .4), 0 0 30px rgba(255, 90, 95, .5); }
@keyframes gkBanner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 30% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }
.gk-hearts { display: flex; gap: 4px; }
.gk-heart { width: 26px; height: 24px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cpath d='M16 28S2 19.5 2 10.5A6.5 6.5 0 0 1 16 7a6.5 6.5 0 0 1 14 3.5C30 19.5 16 28 16 28z' fill='%23ff5a6e' stroke='%238f1426' stroke-width='2'/%3E%3C/svg%3E"); transition: transform .2s, filter .2s, opacity .2s; }
.gk-heart.lost { filter: grayscale(1) brightness(.5); opacity: .5; transform: scale(.8); }
.gk-prompt { position: absolute; z-index: 15; left: 50%; transform: translateX(-50%); top: calc(64px + env(safe-area-inset-top, 0px)); text-align: center; padding: 8px 22px 10px; border-radius: 18px; background: rgba(8, 12, 40, .7); border: 2px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); max-width: calc(100% - 24px); pointer-events: none; }
.gk-prompt .k { font-size: 12px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; color: var(--teal); }
.gk-prompt .w { font-family: var(--font-display); font-size: clamp(30px, 6vw, 52px); line-height: 1.05; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); word-break: break-word; }
.gk-prompt.pulse { animation: gkCenterPop .35s cubic-bezier(.2, 1.3, .3, 1); }
@keyframes gkCenterPop { from { transform: translateX(-50%) scale(.9); opacity: 0; } }
.gk-reveal { position: absolute; z-index: 16; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); padding: 10px 18px; border-radius: 16px; background: rgba(40, 10, 20, .78); border: 2px solid rgba(255, 90, 95, .55); font-family: var(--font-display); font-size: clamp(20px, 4vw, 30px); white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; animation: gkCenterPop .3s; pointer-events: none; }
.gk-reveal.good { background: rgba(10, 40, 22, .78); border-color: rgba(79, 224, 124, .55); }
.gk-touch { position: absolute; z-index: 14; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 12px; }
.gk-touch button { width: 76px; height: 76px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .3); background: rgba(8, 12, 40, .55); color: #fff; display: grid; place-items: center; touch-action: none; }
.gk-touch button svg { width: 34px; height: 34px; }
@media (max-width: 760px) { .gk-title { font-size: 19px; } .gk-chip { font-size: 15px; padding: 5px 10px; } .gk-prompt { top: calc(58px + env(safe-area-inset-top, 0px)); padding: 6px 16px 8px; } }

/* ---------- nav fits five sections ---------- */
@media (max-width: 1240px) { .nav { margin-left: 6px; gap: 2px; } .nav button { padding: 10px 11px; font-size: 15px; } }
@media (max-width: 1020px) { .nav button svg.i { display: none; } .nav button { padding: 9px 9px; } }

/* ---------- game picker ---------- */
.gpick { display: grid; gap: 10px; }
.gpick-words { max-height: 34vh; overflow: auto; border-radius: 14px; background: rgba(0, 0, 0, .2); padding: 6px; }
.gpick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gpick-card { position: relative; overflow: hidden; border-radius: 14px; border: 3px solid transparent; background: var(--panel2); min-height: 96px; padding: 0; text-align: left; isolation: isolate; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.gpick-card:hover, .gpick-card:focus-visible { transform: translateY(-2px); border-color: var(--gold); outline: none; }
.gpick-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.gpick-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 25%, rgba(8, 10, 35, .92)); }
.gpick-card b { position: absolute; left: 10px; bottom: 8px; font-family: var(--font-display); font-size: 19px; font-weight: 400; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.gpick-card .tag { position: absolute; top: 7px; left: 7px; font-size: 10px; font-weight: 900; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); letter-spacing: .6px; text-transform: uppercase; color: var(--teal); }
.gpick-card .tag.t-action { color: var(--gold); } .gpick-card .tag.t-spell { color: #ffd28a; } .gpick-card .tag.t-listen { color: #ff9be0; }
.gpick-card.suggested { border-color: rgba(255, 207, 63, .7); }
.gpick-star { position: absolute; top: 6px; right: 7px; color: var(--gold); } .gpick-star svg { width: 22px; height: 22px; }

/* ---------- Engelskaresan ---------- */
.journey { display: grid; gap: 18px; }
.journey .section-head { align-items: flex-end; flex-wrap: wrap; gap: 14px; }
.j-progress { display: flex; gap: 6px; padding: 8px; }
.j-progress > div { display: grid; justify-items: center; padding: 6px 14px; border-radius: 12px; background: rgba(0, 0, 0, .2); }
.j-progress b { font-family: var(--font-display); font-weight: 400; font-size: 24px; }
.j-path { position: relative; display: grid; gap: 14px; padding-left: 26px; }
.j-path::before { content: ''; position: absolute; left: 9px; top: 20px; bottom: 20px; width: 4px; border-radius: 4px; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .28) 0 10px, transparent 10px 20px); }
.j-level { position: relative; border-radius: 22px; background: var(--panel); border: 2px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.j-level::before { content: ''; position: absolute; left: -26px; top: 34px; width: 22px; height: 22px; border-radius: 50%; background: var(--lc); box-shadow: 0 0 0 4px var(--bg0), 0 0 16px var(--lc); }
.j-level.locked { filter: saturate(.35) brightness(.75); }
.j-level.open { border-color: color-mix(in srgb, var(--lc) 70%, white 0%); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc) 35%, transparent), var(--shadow); }
.j-head { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 14px; width: 100%; min-height: 150px; padding: 16px 18px; border: 0; background: none; text-align: left; isolation: isolate; color: var(--ink); }
.j-head:disabled { cursor: not-allowed; }
.j-art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.j-head::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 10, 35, .92) 0%, rgba(8, 10, 35, .55) 55%, rgba(8, 10, 35, .1) 100%); }
.j-num { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-family: var(--font-display); font-size: 32px; color: #14183a; box-shadow: 0 4px 0 rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .5); }
.j-text h3 { font-size: clamp(26px, 4vw, 36px); text-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
.j-text .tiny { color: #fff; opacity: .85; }
.j-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-weight: 800; color: var(--ink2); }
.j-meta svg { width: 18px; height: 18px; }
.j-reward { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); border: 1.5px solid var(--rc); color: #fff; font-size: 13px; }
.j-reward small { color: var(--rc); font-weight: 900; }
.j-crown { display: inline-flex; gap: 6px; align-items: center; color: var(--gold); }
.j-chev { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .35); transition: transform .2s; }
.j-level.open .j-chev { transform: rotate(90deg); }
.j-body { padding: 14px 16px 18px; display: grid; gap: 12px; background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .05)); }
.j-stations { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.j-station, .j-boss { display: grid; justify-items: center; gap: 6px; padding: 14px 10px 12px; border-radius: 16px; border: 2px solid var(--line2); background: rgba(255, 255, 255, .06); color: var(--ink); text-align: center; transition: transform .15s, border-color .15s, background .15s; }
.j-station:hover, .j-boss:hover { transform: translateY(-2px); border-color: var(--lc); background: rgba(255, 255, 255, .1); }
.j-station.done { border-color: color-mix(in srgb, var(--lc) 60%, transparent); }
.j-dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 22px; background: var(--lc); color: #14183a; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.j-dot svg { width: 24px; height: 24px; }
.j-dot.boss { width: 54px; height: 54px; background: linear-gradient(180deg, #ff7b7f, #c42a4c); color: #fff; }
.j-boss.done .j-dot.boss { background: linear-gradient(180deg, #ffe066, var(--gold2)); color: #3a2100; }
.j-sname { font-weight: 900; font-size: 15px; }
.j-boss { grid-template-columns: auto 1fr auto; align-items: center; justify-items: start; text-align: left; padding: 12px 16px; background: linear-gradient(90deg, rgba(196, 42, 76, .25), rgba(255, 255, 255, .04)); border-color: rgba(255, 123, 127, .4); }
.j-boss .j-sname { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.jw-list { display: grid; gap: 4px; }
.jw { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); font-size: 15px; }
.jw b { font-weight: 900; }
@media (max-width: 760px) {
  .j-stations { grid-template-columns: 1fr 1fr; }
  .j-head { min-height: 128px; padding: 12px 14px; gap: 10px; }
  .j-num { width: 46px; height: 46px; font-size: 26px; border-radius: 14px; }
  .j-path { padding-left: 20px; } .j-path::before { left: 6px; } .j-level::before { left: -20px; width: 18px; height: 18px; }
  .j-progress b { font-size: 19px; } .j-progress > div { padding: 5px 9px; }
}

/* ---------- Nivåstigen (hub) ---------- */
.road { display: grid; gap: 12px; padding: 14px 16px; }
.road-me { display: flex; gap: 14px; align-items: center; }
.road-lv { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at 50% 30%, #4a3cff, #241a8a); border: 2px solid rgba(255, 255, 255, .25); box-shadow: 0 0 22px rgba(120, 100, 255, .45), inset 0 2px 0 rgba(255, 255, 255, .25); }
.road-lv span { font-size: 10px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--ink2); line-height: 1; }
.road-lv b { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1; }
.road-title { font-family: var(--font-display); font-size: 22px; margin-bottom: 4px; }
.road-next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.road-step { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 1.5px solid transparent; min-width: 0; }
.road-step.next { border-color: rgba(255, 207, 63, .5); background: rgba(255, 207, 63, .08); }
.road-n { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-display); background: rgba(255, 255, 255, .12); }
.road-step.next .road-n { background: var(--gold); color: #3a2100; }
.road-items { display: grid; gap: 4px; min-width: 0; }
.rw { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; color: var(--ink); min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.rw svg { width: 16px; height: 16px; flex: none; color: var(--rc, var(--teal)); }
.rw-title svg { color: var(--gold); } .rw-chest svg { color: #3fb6ff; } .rw-chest.storm svg { color: #c35bff; }
.link-cell { text-align: left; color: var(--ink); cursor: pointer; }
.link-cell:hover { border-color: var(--teal); }
@media (max-width: 760px) { .road-next { grid-template-columns: 1fr; } .road-lv { width: 54px; height: 54px; } .road-lv b { font-size: 26px; } }

/* ---------- level-up ceremony ---------- */
.lu-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; overflow: hidden auto; background: radial-gradient(circle at 50% 38%, #3b2a9e 0%, #160f4f 45%, #05061a 100%); animation: fade .35s; }
.lu-overlay.out { opacity: 0; transition: opacity .25s; }
.lu-rays { position: absolute; left: 50%; top: 38%; width: 220vmax; height: 220vmax; transform: translate(-50%, -50%); background: repeating-conic-gradient(from 0deg, rgba(255, 220, 120, .16) 0deg 9deg, transparent 9deg 22deg); -webkit-mask: radial-gradient(circle, #000 0%, transparent 55%); mask: radial-gradient(circle, #000 0%, transparent 55%); animation: luSpin 28s linear infinite; pointer-events: none; }
.lu-overlay.reduced .lu-rays { animation: none; }
@keyframes luSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.lu-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lu-box { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; width: min(760px, 100%); }
.lu-kicker { font-weight: 900; letter-spacing: 3px; text-transform: uppercase; color: var(--teal); font-size: 15px; }
.lu-badge { position: relative; width: 170px; height: 170px; display: grid; place-items: center; align-content: center; clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); background: linear-gradient(160deg, #fff1a1, #ffc83a 45%, #e58a10); box-shadow: 0 0 0 6px rgba(255, 255, 255, .2); opacity: 0; transform: scale(2.6) rotate(-12deg); }
.lu-badge::before { content: ''; position: absolute; inset: 9px; clip-path: inherit; background: radial-gradient(circle at 50% 30%, #5a46ff, #23188a); }
.lu-badge > * { position: relative; }
.lu-badge-k { font-size: 13px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: #ffe9a8; }
.lu-badge b { font-family: var(--font-display); font-weight: 400; font-size: 78px; line-height: .95; color: #fff; text-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 0 24px rgba(255, 220, 120, .7); }
.lu-badge.in { animation: luSlam .55s cubic-bezier(.2, 1.5, .35, 1) forwards; filter: drop-shadow(0 0 28px rgba(255, 207, 63, .65)); }
@keyframes luSlam { 0% { opacity: 0; transform: scale(2.6) rotate(-12deg); } 60% { opacity: 1; transform: scale(.92) rotate(2deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
.lu-title { font-size: clamp(48px, 11vw, 96px); color: var(--gold); text-shadow: 0 6px 0 rgba(0, 0, 0, .4), 0 0 40px rgba(255, 207, 63, .5); opacity: 0; transform: translateY(16px) scale(.9); transition: opacity .35s, transform .45s cubic-bezier(.2, 1.4, .3, 1); }
.lu-box.show-title .lu-title { opacity: 1; transform: none; }
.lu-sub { font-family: var(--font-display); font-size: 22px; color: var(--ink2); opacity: 0; transition: opacity .4s .2s; }
.lu-box.show-title .lu-sub { opacity: 1; }
.lu-newtitle { position: relative; overflow: hidden; display: grid; justify-items: center; padding: 8px 26px 10px; border-radius: 16px; background: linear-gradient(180deg, rgba(255, 207, 63, .18), rgba(255, 207, 63, .05)); border: 2px solid rgba(255, 207, 63, .55); opacity: 0; transform: scale(.8); transition: opacity .3s, transform .4s cubic-bezier(.2, 1.5, .3, 1); }
.lu-newtitle span { font-size: 12px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.lu-newtitle b { font-family: var(--font-display); font-weight: 400; font-size: 34px; }
.lu-newtitle::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); }
.lu-box.show-newtitle .lu-newtitle { opacity: 1; transform: none; }
.lu-box.show-newtitle .lu-newtitle::after { animation: luShine 1.4s .2s ease-in-out; }
@keyframes luShine { to { left: 130%; } }
.lu-cards { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; min-height: 10px; margin-top: 6px; }
.lu-card { width: 150px; display: grid; justify-items: center; gap: 4px; padding: 12px 10px 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(43, 54, 140, .95), rgba(26, 33, 92, .95)); border: 2px solid var(--rc, rgba(255, 255, 255, .2)); box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 24px color-mix(in srgb, var(--rc, #fff) 30%, transparent); opacity: 0; transform: perspective(600px) rotateY(90deg) scale(.8); transition: transform .55s cubic-bezier(.2, 1.4, .3, 1), opacity .25s; }
.lu-card.in { opacity: 1; transform: none; }
.lu-card.coins { --rc: #ffcf3f; } .lu-card.chest { --rc: #3fb6ff; } .lu-card.chest.storm { --rc: #c35bff; }
.lu-art { width: 96px; height: 96px; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--rc, #fff) 30%, transparent), transparent 70%); overflow: hidden; }
.lu-art img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.lu-art svg.i { width: 54px; height: 54px; color: var(--rc); }
.lu-card b { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.1; }
.lu-card span { font-size: 12px; font-weight: 800; color: var(--ink2); }
.lu-done { opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; margin-top: 8px; }
.lu-done.in { opacity: 1; transform: none; }
@media (max-width: 760px) { .lu-badge { width: 130px; height: 130px; } .lu-badge b { font-size: 58px; } .lu-card { width: 128px; } .lu-art { width: 76px; height: 76px; } }

/* ---------- course result ---------- */
.course-res { margin: 14px auto 4px; max-width: 520px; display: grid; gap: 6px; justify-items: center; padding: 12px 16px; border-radius: 16px; background: rgba(47, 224, 208, .1); border: 2px solid rgba(47, 224, 208, .45); }
.course-res.win { background: linear-gradient(180deg, rgba(255, 207, 63, .16), rgba(255, 207, 63, .05)); border-color: rgba(255, 207, 63, .6); }
.course-res.try { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .2); }
.cr-k { font-size: 12px; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; color: var(--teal); }
.cr-big { font-family: var(--font-display); font-size: 26px; }
.course-res.win .cr-big { color: var(--gold); }
.cr-stars { font-size: 26px; color: var(--gold); letter-spacing: 3px; }
.cr-line { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--ink2); }
.cr-line svg.i { width: 18px; height: 18px; }
.cr-item svg.i { color: var(--rc); } .cr-item b { color: #fff; }
.free-tag { position: absolute; top: 12px; left: 12px; padding: 5px 12px; border-radius: 999px; background: linear-gradient(180deg, #6cf094, var(--green2)); color: #fff; font-family: var(--font-display); font-size: 16px; box-shadow: 0 3px 0 #146b35; transform: rotate(-4deg); }

@media (max-width: 1340px) { .profile-chip .txt { display: none; } .profile-chip { padding: 4px; } }

/* ---------- locker: vehicle card ---------- */
.vehicle-card { position: absolute; inset: 70px 16px 16px; z-index: 3; display: grid; grid-template-rows: 1fr auto; gap: 10px; padding: 16px; border-radius: 22px; background: radial-gradient(circle at 50% 40%, rgba(70, 60, 200, .55), rgba(8, 10, 35, .88) 70%); border: 2px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vc-art { display: grid; place-items: center; min-height: 0; }
.vc-art img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .5)); animation: vcFloat 3s ease-in-out infinite; }
.vc-art svg.i { width: 80px; height: 80px; color: var(--teal); }
@keyframes vcFloat { 50% { transform: translateY(-8px); } }
.vc-txt { text-align: center; } .vc-txt b { font-family: var(--font-display); font-weight: 400; font-size: 30px; display: block; } .vc-txt p { color: var(--ink2); font-weight: 700; }
.name-lang { display: grid; grid-template-columns: 1fr 200px; gap: 12px; }
.name-lang select { width: 100%; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--ink); font-weight: 800; font-size: 16px; }
@media (max-width: 560px) { .name-lang { grid-template-columns: 1fr; } }
.say-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: 10px; vertical-align: middle; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); background: rgba(47, 224, 208, .18); color: var(--teal); transition: transform .15s, background .15s; }
.say-btn:hover { transform: scale(1.08); background: rgba(47, 224, 208, .3); }
.say-btn svg.i { width: 22px; height: 22px; }
button.road { width: 100%; text-align: left; color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s; }
button.road:hover { border-color: rgba(255, 207, 63, .5); transform: translateY(-1px); }
.roadfull { display: grid; gap: 10px; }
.rf-list { display: grid; gap: 6px; max-height: 60vh; overflow: auto; padding-right: 4px; }
.rf-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, .2); }
.rf-row.done { opacity: .55; } .rf-row.done .road-n { background: var(--green2); }
.rf-row.next { border: 2px solid rgba(255, 207, 63, .55); background: rgba(255, 207, 63, .08); } .rf-row.next .road-n { background: var(--gold); color: #3a2100; }
.rf-items { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.road-n svg.i { width: 16px; height: 16px; }

/* result card never wider than the phone */
.q-overlay > .result { min-width: 0; max-width: 100%; }
.reward-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reward .l, .missed div span { overflow-wrap: anywhere; }
@media (max-width: 480px) { .reward { padding: 12px 6px; min-width: 0; } .result { padding: 18px 14px; } }
.mode.off { filter: grayscale(.85) brightness(.6); }
.mode .mode-lock { display: none; }
.mode.off .mode-lock { display: inline-flex; position: absolute; top: 10px; right: 10px; align-items: center; gap: 4px; font-size: 11px; font-weight: 900; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; }
.mode.off .mode-lock svg.i { width: 13px; height: 13px; }

/* "Ny version" banner on the stand-alone site (js/pwa.js) */
.pwa-update { position: fixed; z-index: 200; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-radius: 18px; background: rgba(12, 18, 60, .96); border: 2px solid rgba(255, 207, 63, .55); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); font-weight: 800; white-space: nowrap; max-width: calc(100% - 20px); animation: pwaIn .4s cubic-bezier(.2, 1.4, .3, 1); }
@keyframes pwaIn { from { transform: translate(-50%, 20px) scale(.92); opacity: 0; } }
.pwa-update span { white-space: normal; line-height: 1.15; } .pwa-update .pwa-later { padding-left: 12px; padding-right: 12px; }
@media (max-width: 760px) { .pwa-update { bottom: calc(var(--nav-h, 64px) + 12px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 20px); gap: 8px; padding: 8px 8px 8px 14px; font-size: 15px; } .pwa-update span { flex: 1; } }
