/* v0.18 — GDD screens and popups (Rohit's GDD, mockups M01–M38). Same kit as the mockups
   (tools/mockups/gdd_mockups.html): navy card body, sky header, gold title, chunky ink outlines. */

/* ---- navy card (Chest Details, Activity summary, purchases, unlocks …) ---- */
.card.navy { background: linear-gradient(#22346c, #131c42); color: #fff; border-width: 5px; }
.card.navy header { border-bottom-width: 4px; }
.card.navy .body { align-items: stretch; gap: 10px; padding: 14px 16px 18px; }
.card.navy p, .card.navy .g-t { font: 700 14px/1.35 system-ui, sans-serif; color: #cfdcff; margin: 0; }
.card.navy .note, .card.navy small { color: #a9bbe8; }
.card.navy .xbtn { background: url("assets/ui/hd/btn_close.webp") center / contain no-repeat; border: 0; box-shadow: none; color: transparent; width: 42px; height: 42px; }
.card.navy .btn { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: clamp(17px, 5vw, 22px); padding: 10px 16px; border-width: 4px; white-space: nowrap; }
.card.navy .btn img { width: 26px; }
.btn.blue { background: linear-gradient(#6fd0ff, #1f86e6); box-shadow: 0 5px 0 #0d4f9c, 0 7px 0 var(--ink); }
.btn.grey { background: linear-gradient(#e2e6ee, #9aa4b8); box-shadow: 0 5px 0 #5b6378, 0 7px 0 var(--ink); }
.btn.red { background: linear-gradient(#ff8a8a, #d83a3a); box-shadow: 0 5px 0 #7a1a1a, 0 7px 0 var(--ink); }
.btn.sm { font-size: 16px !important; padding: 6px 12px !important; border-width: 3px !important; border-radius: 12px; min-height: 38px !important; }
.btn small.g-chip, .g-chip { font: 800 11px system-ui, sans-serif; -webkit-text-stroke: 0; background: #14161fcc; color: #fff; border-radius: 999px; padding: 2px 8px; letter-spacing: .02em; }
.btn[disabled] { filter: grayscale(.8); opacity: .75; cursor: default; }
.g-h { font-weight: 400; font-size: 22px; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; margin: 0; line-height: 1.1; }
.g-row { display: flex; gap: 10px; align-items: center; } .g-row > .grow { flex: 1; min-width: 0; }
.g-row.c { justify-content: center; } .g-row.sa { justify-content: space-around; }
.g-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: #0b2350; border: 3px solid var(--ink); font-size: 16px; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.g-pill img { width: 24px; }
.g-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 800 11px system-ui, sans-serif; letter-spacing: .04em; background: #14161fcc; color: #fff; -webkit-text-stroke: 0; vertical-align: middle; }
.g-tag.new, .g-tag.red { background: #ff3b3b; } .g-tag.green { background: #2f9a1f; } .g-tag.gold { background: #e89400; } .g-tag.blue { background: #1f7ad6; } .g-tag.grey { background: #5b6378; }
.g-box { padding: 10px 12px; border-radius: 14px; background: #ffffff12; border: 3px solid #0b1636; }
.g-list { display: flex; flex-direction: column; gap: 8px; }
.g-item { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 16px; background: #ffffff12; border: 3px solid #0b1636; text-align: left; }
.g-item .ttl { font-weight: 400; font-size: 17px; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; color: #fff; }
.g-item .sub { font: 700 12px/1.3 system-ui, sans-serif; color: #a9bbe8; }
.g-item.dim { opacity: .65; }
.g-av { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 3px var(--ink); background: radial-gradient(circle, #cfe9ff, #7cc4ff); display: grid; place-items: center; overflow: hidden; }
.g-av canvas { width: 100%; height: 100%; }
.g-chest { display: grid; place-items: center; }
.g-chest img { width: 150px; filter: drop-shadow(0 5px 0 #0006); animation: gBob 2.4s ease-in-out infinite; }
@keyframes gBob { 50% { transform: translateY(-5px) rotate(-2deg); } }
.g-ring { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#ffd23a 0 var(--p), #1d2747 var(--p) 100%); border: 3px solid var(--ink); flex: none; }
.g-ring > div { width: 60px; height: 60px; border-radius: 50%; background: #1f74dc; display: grid; place-items: center; }
.g-ring img { width: 46px; }
.g-prog { height: 18px; border-radius: 999px; background: #0b1230; border: 3px solid var(--ink); overflow: hidden; position: relative; }
.g-prog i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#ffe680, #ffb21c); }
.g-prog.blue i { background: linear-gradient(#9fe7ff, #1f7ad6); } .g-prog.green i { background: linear-gradient(#8ef05a, #2f9a1f); }
.g-seg { display: flex; gap: 6px; } .g-seg button { flex: 1; text-align: center; padding: 6px 0; border-radius: 999px; border: 3px solid var(--ink); background: #ffffff18; font: 400 15px var(--font); color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; cursor: pointer; min-height: 38px; }
.g-seg button.on { background: linear-gradient(#ffe066, var(--gold)); }
.g-big { font-weight: 400; font-size: 34px; color: #ffe066; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; display: inline-flex; align-items: center; gap: 8px; }
.g-big img { width: 42px; }
.g-receipt { font: 700 13px/1.5 system-ui, sans-serif; color: #cfdcff; text-align: left; }

/* ---- full-screen sheets added in v0.18 (Activity, Profile, Friends, Settings, Events, Daily) ---- */
.gsheet { position: absolute; inset: 0; overflow: hidden; background: url("assets/bg_sky.webp") center / cover, linear-gradient(#5ec3ff, #2f9be9); }
.gsheet .gs-in { position: absolute; left: 50%; transform: translateX(-50%); width: min(var(--colw, 100vw), 520px); top: var(--gtop, 120px); bottom: var(--gbot, 70px);
  display: flex; flex-direction: column; gap: 10px; padding: 0 calc(var(--k, 1px) * 14) calc(var(--k, 1px) * 10); }
.gs-head { text-align: center; flex: none; }
.gs-head h1 { margin: 0; font-weight: 400; font-size: calc(var(--k, 1px) * 38); color: var(--gold); -webkit-text-stroke: calc(var(--k, 1px) * 7) var(--ink); paint-order: stroke fill; text-shadow: 0 calc(var(--k, 1px) * 5) 0 var(--ink); line-height: 1.05; }
.gs-head .gs-sub { font: 800 calc(var(--k, 1px) * 13) system-ui, sans-serif; color: #fff; text-shadow: 0 2px 0 #0b3c7a; letter-spacing: .04em; }
.gs-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 12px; overscroll-behavior: contain; touch-action: pan-y; }
.gs-card { background: linear-gradient(#22346c, #131c42); border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 #0006; padding: 12px; color: #fff; display: flex; flex-direction: column; gap: 10px; }
.gs-card.light { background: linear-gradient(#f7fbff, #dceaff); color: #1e2a4a; }
.gs-card h3 { margin: 0; font-weight: 400; font-size: 20px; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.gs-empty { text-align: center; padding: 22px 10px; }
.gs-foot { flex: none; display: flex; gap: 10px; justify-content: center; }
.gs-foot .btn { font-size: clamp(17px, 5vw, 22px); padding: 10px 18px; }
.g-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.g-stat div { background: #ffffff12; border: 3px solid #0b1636; border-radius: 14px; padding: 8px 4px; text-align: center; }
.g-stat b { display: block; font-weight: 400; font-size: 22px; color: #ffe066; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.g-stat small { font: 800 10px system-ui, sans-serif; color: #a9bbe8; letter-spacing: .04em; }
.g-toggle { width: 56px; height: 32px; border-radius: 999px; background: #2f9a1f; border: 3px solid var(--ink); position: relative; cursor: pointer; flex: none; padding: 0; }
.g-toggle::after { content: ''; position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: all .15s; }
.g-toggle.off { background: #5b6378; } .g-toggle.off::after { right: 27px; }
.g-set { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.g-set > span { flex: 1; font-size: 17px; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-align: left; }
.g-set input[type=range] { flex: 1.4; accent-color: #ffd23a; height: 28px; }
.g-set select { font: 700 14px system-ui; border-radius: 10px; border: 3px solid var(--ink); padding: 4px 8px; }

/* ---- Home additions (M01) ---- */
.home-profile-tag { position: absolute; z-index: 3; display: flex; align-items: center; gap: calc(var(--u) * 10); pointer-events: none; }
.hm-chip { position: absolute; z-index: 3; display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 8); border-radius: 999px; border: calc(var(--u) * 6) solid var(--ink);
  font-size: calc(var(--u) * 34); color: #fff; -webkit-text-stroke: calc(var(--u) * 6) var(--ink); paint-order: stroke fill; cursor: pointer; padding: 0 calc(var(--u) * 16); box-shadow: 0 calc(var(--u) * 6) 0 #0006; }
.hm-chip.shield { background: linear-gradient(#22346c, #131c42); }
.hm-chip.shield canvas { width: calc(var(--u) * 56); height: calc(var(--u) * 56); }
.hm-chip.basechip { background: linear-gradient(#5fd25a, #2f9a1f); flex-direction: column; gap: 0; line-height: 1; }
.hm-chip.basechip small { font: 800 calc(var(--u) * 20) system-ui, sans-serif; -webkit-text-stroke: 0; color: #eaffdf; letter-spacing: .05em; }
.hm-act { position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border: 0; padding: 0; background: none; cursor: pointer; }
.hm-act .ha-ico { width: 100%; aspect-ratio: 1; border-radius: calc(var(--u) * 30); border: calc(var(--u) * 6) solid var(--ink); background: linear-gradient(#6fd0ff, #1f86e6 60%, #1767c4); box-shadow: inset 0 calc(var(--u) * 4) 0 #fff8, 0 calc(var(--u) * 6) 0 var(--ink); display: grid; place-items: center; }
.hm-act .ha-ico svg { width: 66%; height: 66%; }
.hm-act b { font-weight: 400; font-size: calc(var(--u) * 28); color: #fff; -webkit-text-stroke: calc(var(--u) * 6) var(--ink); paint-order: stroke fill; margin-top: calc(var(--u) * 4); }
.hm-badge { position: absolute; top: calc(var(--u) * -12); right: calc(var(--u) * -12); min-width: calc(var(--u) * 46); height: calc(var(--u) * 46); padding: 0 calc(var(--u) * 10); border-radius: 999px; background: #ff3b3b;
  border: calc(var(--u) * 5) solid var(--ink); font-size: calc(var(--u) * 26); line-height: calc(var(--u) * 36); text-align: center; color: #fff; -webkit-text-stroke: calc(var(--u) * 5) var(--ink); paint-order: stroke fill; }
.hm-badge.gold { background: #ffb21c; }
.hm-notice { position: absolute; z-index: 3; display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 12); border-radius: calc(var(--u) * 22);
  background: #b0281bee; border: calc(var(--u) * 5) solid var(--ink); font: 800 calc(var(--u) * 26) system-ui, sans-serif; color: #fff; text-align: center; padding: 0 calc(var(--u) * 20); }
.hm-notice[hidden] { display: none; }
.tb-name { display: flex; align-items: center; gap: calc(var(--k) * 10); height: calc(var(--k) * 17); margin: calc(var(--k) * -4) 0 calc(var(--k) * -1); padding-left: calc(var(--k) * 2); pointer-events: none; }
.tb-name b { font-size: calc(var(--k) * 14); line-height: 1; color: #fff; -webkit-text-stroke: calc(var(--k) * 3) var(--ink); paint-order: stroke fill; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.tb-name .g-tag { font-size: calc(var(--k) * 10); line-height: 1; padding: calc(var(--k) * 3) calc(var(--k) * 9); border: calc(var(--k) * 2) solid var(--ink); }
.tb-name[hidden] { display: none; }
.tb-left { position: relative; overflow: visible !important; }
.tb-left.dot::after { content: ''; position: absolute; top: calc(var(--k) * -5); right: calc(var(--k) * -5); width: calc(var(--k) * 14); height: calc(var(--k) * 14); border-radius: 50%; background: #ff3b3b; border: calc(var(--k) * 3) solid var(--ink); }
.tb-caption .tb-prog { font-style: normal; font: 800 calc(var(--k) * 11) system-ui, sans-serif; background: #ffffff33; border-radius: 999px; padding: calc(var(--k) * 1) calc(var(--k) * 6); margin-left: calc(var(--k) * 2); }

/* chest slot states (M15): waiting shows its duration, unlocking a progress ring */
.cslot .cs-ring { position: absolute; inset: 6%; border-radius: 50%; background: conic-gradient(#ffd23a 0 var(--p, 0%), #ffffff22 var(--p, 0%) 100%); -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); pointer-events: none; }

/* ---- feature unlock (M30) ---- */
.card.unlock .u-art { display: grid; place-items: center; min-height: 120px; }
.card.unlock .u-art img { width: 200px; } .card.unlock .u-art canvas { width: 120px; height: auto; }
.card.unlock .u-oldnew { display: flex; justify-content: center; align-items: center; gap: 14px; font-size: 34px; color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.card.unlock .u-oldnew em { font-style: normal; color: #ffe066; }

/* ---- simulated ad ---- */
.fake-ad { position: fixed; inset: 0; z-index: 60; background: #000d; display: grid; place-items: center; color: #fff; font-family: var(--font); }
.fake-ad .fa-box { width: min(340px, 86vw); aspect-ratio: 9 / 14; border-radius: 22px; border: 5px solid #fff; background: linear-gradient(160deg, #ff8a3d, #b22e86 60%, #2b1d6b); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; position: relative; text-align: center; padding: 18px; }
.fake-ad .fa-box b { font-weight: 400; font-size: 30px; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.fake-ad .fa-box small { font: 700 13px system-ui; opacity: .85; }
.fake-ad .fa-t { position: absolute; top: 10px; right: 12px; font: 800 14px system-ui; background: #0008; border-radius: 999px; padding: 4px 10px; }
.fake-ad .fa-x { position: absolute; top: 10px; left: 12px; font: 800 13px system-ui; background: #0008; color: #fff; border: 2px solid #fff8; border-radius: 999px; padding: 4px 10px; cursor: pointer; }

/* ---- saving indicator + loading (M38) ---- */
.save-ind { position: fixed; z-index: 40; right: calc(var(--k, 1px) * 10 + var(--colx, 0px)); bottom: calc(var(--k, 1px) * 70 + var(--sab, 0px)); display: flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; background: #14161fcc; color: #fff; font: 800 12px system-ui, sans-serif; opacity: 0; transition: opacity .25s; pointer-events: none; }
.save-ind.on { opacity: 1; }
.save-ind i { width: 12px; height: 12px; border-radius: 50%; border: 3px solid #fff; border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- screen transitions (GDD §17): 150 ms fade + 12 px slide ---- */
.screen.enter { animation: scrIn .16s ease-out; }
@keyframes scrIn { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .screen.enter { animation: none; } }
.save-spin { width: 44px; height: 44px; border-radius: 50%; border: 6px solid #ffd23a; border-top-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
.toast-bar { position: fixed; z-index: 95; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 4px); }

/* ---- pinball (M16) ---- */
#hits .bird-meter { position: absolute; pointer-events: auto; background: none; border: 0; padding: 0; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; cursor: pointer; }
#hits .bird-meter .bm-ring { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--ink); background: conic-gradient(#ffd23a 0 var(--p, 0%), #1d2747 var(--p, 0%) 100%); display: grid; place-items: center; box-shadow: 0 4px 0 #0006; }
#hits .bird-meter .bm-bird { width: 74%; aspect-ratio: 1; border-radius: 50%; background: #1f74dc url("assets/birds/faby.png") 0 50% / 400% auto no-repeat; image-rendering: pixelated; }
#hits .bird-meter b { font-family: var(--font); font-weight: 400; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; font-size: 1em; white-space: nowrap; background: #14161fb0; border-radius: 999px; padding: 1px 8px; }
#hits .bird-meter.pump .bm-ring { animation: bmPump .45s ease-out; }
@keyframes bmPump { 40% { transform: scale(1.18); box-shadow: 0 0 22px #ffd23a; } }
#hits .board-info { position: absolute; pointer-events: auto; border-radius: 50% !important; border: 4px solid var(--ink) !important; background: linear-gradient(#6fd0ff, #1f86e6) !important;
  color: #fff !important; font-family: Georgia, serif !important; font-weight: 700; font-style: italic; display: grid; place-items: center; box-shadow: 0 3px 0 var(--ink); }
.lt-tag.live { right: auto; top: auto; left: 50%; bottom: 3%; transform: translateX(-50%); background: linear-gradient(#ffb15c, #e0661d); }
.ltile .hm-badge { top: -6%; right: -6%; min-width: 1.5em; height: 1.5em; line-height: 1.15em; font-size: .8em; padding: 0 .35em; border-width: .14em; -webkit-text-stroke-width: .14em; z-index: 3; }
.home-stage .hm-act { translate: calc(var(--u) * var(--edge-l, 0)) calc(var(--u) * var(--edge-t, 0)); }
.home-stage .hm-chip.basechip { translate: calc(var(--u) * var(--edge-r, 0) * -1) calc(var(--u) * var(--edge-t, 0)); border-radius: calc(var(--u) * 26); }
.hm-act[hidden], .hm-chip[hidden], .ltile[hidden] { display: none; }
.home-stage .hm-chip, .home-stage .hm-act { min-height: 0; min-width: 0; font-family: var(--font); }
.hm-act b { font-family: var(--font); }
#s-activity, #s-profile, #s-friends, #s-settings, #s-events, #s-daily { z-index: auto !important; }
.gs-body > .g-list > .g-item { background: linear-gradient(#22346c, #131c42); border: 4px solid var(--ink); box-shadow: 0 4px 0 #0005; }
.gs-body > .g-list > .g-item.dim { opacity: 1; filter: saturate(.55) brightness(.9); }
.gs-foot .g-t { color: #fff; text-shadow: 0 2px 0 #0b3c7a; text-align: center; }

/* ---- race (v0.18.1: v0.17 HUD, pause card and bottom-centre feed restored) ---- */
#s-race.practice .race-roster { display: none; }

/* ---- raid (M19) ---- */
.raid-attack { font-size: calc(var(--u) * 54) !important; padding: calc(var(--u) * 14) calc(var(--u) * 60) !important; border-width: calc(var(--u) * 7) !important; pointer-events: auto; }
.raid-attack[hidden] { display: none; }
.raid-attack.pop { animation: pop .3s cubic-bezier(.2, 1.6, .4, 1); }
.raid-noaim { position: absolute; z-index: 3; display: flex; justify-content: center; pointer-events: none; }
.raid-noaim[hidden] { display: none; }
.raid-noaim span { font: 800 calc(var(--u) * 24) system-ui, sans-serif; color: #fff; background: #14161fcc; border-radius: 999px; padding: calc(var(--u) * 6) calc(var(--u) * 16); white-space: nowrap; }
.raid-target.sel { box-shadow: none; }

/* ---- base (M21) ---- */
.base-stage .build-next { position: absolute; z-index: 4; display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 12); font-size: calc(var(--u) * 34) !important; padding: 0 !important; border-width: calc(var(--u) * 5) !important; border-radius: calc(var(--u) * 22); box-shadow: 0 calc(var(--u) * 6) 0 var(--gold-d), 0 calc(var(--u) * 9) 0 var(--ink); }
.base-stage .build-next .ico-svg { width: calc(var(--u) * 40); height: calc(var(--u) * 40); } .base-stage .build-next .ico-svg svg { width: 100%; height: 100%; display: block; }
.base-stage .build-next small.g-chip { font-size: calc(var(--u) * 22); padding: calc(var(--u) * 3) calc(var(--u) * 12); }
.base-stage .build-next.poor { filter: saturate(.55) brightness(.95); }
.base-stage .build-next[hidden], .view-bar[hidden] { display: none; }
.view-bar { position: absolute; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: calc(var(--u) * 12); padding: 0 calc(var(--u) * 12) 0 calc(var(--u) * 24); border-radius: 999px; background: #14161fd0; border: calc(var(--u) * 4) solid #ffd23a; color: #fff; font-size: calc(var(--u) * 28); -webkit-text-stroke: calc(var(--u) * 4) var(--ink); paint-order: stroke fill; }
#s-base.viewonly .base-canvas { filter: none; }
.raid-switch[hidden] { display: none !important; }
#raidPrompt { font-size: calc(var(--u) * 46); text-align: center; }
.raid-attack-hint { font: 800 calc(var(--u) * 24) system-ui, sans-serif; color: #fff; background: #14161fcc; border-radius: 999px; padding: calc(var(--u) * 6) calc(var(--u) * 18); }
.raid-attack-hint[hidden] { display: none; }

/* ---- birds (M25–M28) ---- */
.flock-filter { position: absolute; z-index: 2; }
.flock-filter button { font-size: calc(var(--u) * 36); min-height: 0; padding: calc(var(--u) * 12) 0; }
.bird-tile .newb.ready { background: #ffb21c; }
.bird-tile.locked b { opacity: .9; }
.bird-details .bird-sheet, .cz-pv { margin: 0 auto; width: 210px; height: 150px; display: grid; place-items: center; border-radius: 18px; background: radial-gradient(#7fd3ff, #2a86e0); border: 4px solid var(--ink); }
.cz-pv { width: 100%; height: 130px; position: relative; overflow: hidden; }
.cz-pv.trail::before { content: ''; position: absolute; left: 8%; right: 55%; top: 48%; height: 18px; border-radius: 999px; background: linear-gradient(90deg, transparent, #ff7a3d99, #ffd23aaa); }
.cz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cz-opt { border-radius: 14px; border: 3px solid var(--ink); background: linear-gradient(#5bb8ff, #1f6fd0); padding: 10px 4px; color: #fff; font-family: var(--font); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; }
.cz-opt b { font-weight: 400; font-size: 15px; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.cz-opt small { font: 800 10px system-ui, sans-serif !important; color: #fff !important; background: #14161fcc; border-radius: 999px; padding: 1px 7px; }
.cz-opt.on { background: linear-gradient(#8ef05a, #2f9a1f); box-shadow: 0 0 0 3px #ffd23a; }
.cz-opt.locked { background: #1d2b58; opacity: .8; cursor: default; }
.vic-bounce canvas { animation: vicBounce .9s ease-in-out infinite; }
.vic-spin canvas { animation: vicSpin 1.1s ease-in-out infinite; }
.vic-flip canvas { animation: vicFlip 1.2s ease-in-out infinite; }
@keyframes vicBounce { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-26px) scale(1.06, .94); } 55% { transform: translateY(0) scale(1.1, .9); } }
@keyframes vicSpin { 0% { transform: rotate(0); } 60%, 100% { transform: rotate(-360deg); } }
@keyframes vicFlip { 0% { transform: scaleX(1); } 25% { transform: scaleX(-1) translateY(-14px); } 50%, 100% { transform: scaleX(1); } }
.mastery-card .g-item { grid-template-columns: 54px 1fr auto; }

/* ---- store (M31) ---- */
.spacks { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--u) * 22); }
.spack { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 4px; padding: calc(var(--u) * 20) calc(var(--u) * 10) calc(var(--u) * 18); border-radius: calc(var(--u) * 34); border: calc(var(--u) * 7) solid var(--ink); background: linear-gradient(#ffffff, #dcecff); box-shadow: 0 calc(var(--u) * 8) 0 #0005; color: #1e2a4a; text-align: center; min-width: 0; }
.spack img { width: calc(var(--u) * 110); height: calc(var(--u) * 110); object-fit: contain; }
.spack > b { font-weight: 400; font-size: max(18px, calc(var(--u) * 50)); color: #fff; -webkit-text-stroke: calc(var(--u) * 9) var(--ink); paint-order: stroke fill; line-height: 1.05; }
.spack > small { font: 700 max(11px, calc(var(--u) * 24)) system-ui, sans-serif; color: #3b4266; }
.spack .btn { width: 100%; font-size: max(15px, calc(var(--u) * 38)) !important; }
.spack .g-tag { position: absolute; top: calc(var(--u) * -18); left: 50%; transform: translateX(-50%); white-space: nowrap; }
.spack.cos .g-tag.green { position: static; transform: none; font-size: 13px; }
.spack .cos-art { height: calc(var(--u) * 110); display: grid; place-items: center; }
.sfeat { display: grid; grid-template-columns: auto 1fr; gap: calc(var(--u) * 24); align-items: center; padding: calc(var(--u) * 24); border-radius: calc(var(--u) * 38); border: calc(var(--u) * 8) solid var(--ink); background: linear-gradient(#ffe066, #f7a400); box-shadow: 0 calc(var(--u) * 8) 0 #0005; }
.sf-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: #1e2a4a; }
.sf-txt b { font-weight: 400; font-size: max(20px, calc(var(--u) * 52)); color: #fff; -webkit-text-stroke: calc(var(--u) * 9) var(--ink); paint-order: stroke fill; }
.sf-txt small { font: 700 max(12px, calc(var(--u) * 26)) system-ui, sans-serif; }

/* ---- trophy road path (M29) ---- */
.road-path { position: absolute; display: flex; flex-direction: column; gap: 12px; padding: 8px 6px 20px 0; }
.road-path .rp-line { position: absolute; left: calc(max(44px, var(--u) * 100) / 2 + 2px); top: 0; bottom: 0; width: 10px; margin-left: -5px; border-radius: 6px; background: linear-gradient(#1d2747, #1d2747); border: 3px solid var(--ink); min-height: 100%; }
.rp-row { position: relative; display: grid; grid-template-columns: max(44px, calc(var(--u) * 100)) 1fr; gap: 10px; align-items: center; }
.rp-node { position: relative; z-index: 1; width: max(44px, calc(var(--u) * 100)); aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--ink); background: linear-gradient(#5bc3ff, #1f7ad6); color: #fff; font-family: var(--font); font-size: max(13px, calc(var(--u) * 30)); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; cursor: pointer; display: grid; place-items: center; padding: 0; }
.rp-node.locked { background: linear-gradient(#3a4664, #1e2638); }
.rp-node.claimable { background: linear-gradient(#ffe066, #f0a400); box-shadow: 0 0 16px #ffd23a; }
.rp-node.claimed { background: linear-gradient(#8ef05a, #2f9a1f); }
.rp-node .ico-svg { width: 70%; height: 70%; } .rp-node .ico-svg svg { width: 100%; height: 100%; display: block; }
.rp-node.next { box-shadow: 0 0 0 4px #ffd23a; }
.rp-you { position: relative; z-index: 2; display: flex; align-items: center; gap: 6px; margin: -4px 0; }
.rp-you .rp-bird { display: grid; place-items: center; width: max(44px, calc(var(--u) * 100)); }
.rp-you b { font-weight: 400; font-size: 15px; color: #fff; background: #e89400; border: 3px solid var(--ink); border-radius: 999px; padding: 2px 12px; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.road-path .ms { cursor: pointer; }
.road-path .ms-ico { width: max(46px, calc(var(--u) * 104)); height: max(46px, calc(var(--u) * 104)); }
.road-all { font-size: clamp(18px, 5vw, 26px) !important; }
.road-all[hidden], .road-go[hidden] { display: none !important; }
.road-info-ico .ms-ico { width: 96px; height: 96px; }

/* ---- Settings, fix list 25 Oct (#4, #5): compact cards, the account first, two small grids ---- */
#s-settings .gs-body { gap: 7px; padding-bottom: 8px; }
#s-settings .gs-card { padding: 8px 12px 10px; gap: 2px; border-radius: 16px; box-shadow: 0 4px 0 #0006; }
#s-settings .gs-card h3 { font-size: 15px; -webkit-text-stroke: 3px var(--ink); line-height: 1.2; }
#s-settings .g-set { min-height: 30px !important; gap: 10px; }
#s-settings .g-set .g-tag { flex: none; }
#s-settings .g-set > span { font-size: 15px; }
#s-settings .g-set input[type=range] { height: 22px; }
#s-settings .g-toggle { width: 48px; height: 26px; } #s-settings .g-toggle::after { width: 16px; height: 16px; }
#s-settings .g-toggle.off::after { right: 23px; }
#s-settings .g-set .g-tag { font-size: 12px; padding: 3px 10px; }
.set-acct { background: linear-gradient(#2b4a9a, #182a63) !important; border-color: var(--ink); }
.acct-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.acct-av { width: 52px; height: 52px; flex: none; display: grid; place-items: center; background: #5ec8ff; border: 3px solid var(--ink); border-radius: 14px; }
.acct-av canvas { image-rendering: pixelated; }
.acct-id { flex: 1; min-width: 0; text-align: left; }
.acct-id b { display: block; font-weight: 400; font-size: 20px; line-height: 1.1; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-id small { display: block; margin-top: 3px; font: 800 12px system-ui, sans-serif; color: #cfdcff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn.xs { font-size: 13px !important; padding: 4px 8px !important; border-width: 3px !important; border-radius: 10px; min-height: 30px !important; line-height: 1.1; }
.acct-row .btn.sm { min-height: 34px !important; padding: 4px 12px !important; font-size: 15px !important; }
.set-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.set-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.dev-card .dev-pop { width: 100%; align-self: stretch; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; text-align: left; }
.dev-card .dev-lab { margin: 6px 0 0; font: 800 13px system-ui, sans-serif; }
.dev-card .g-seg button { color: var(--ink); -webkit-text-stroke: 0; font-size: 14px; }
.acct-in { width: 100%; box-sizing: border-box; font: 400 22px var(--font); text-transform: uppercase; padding: 8px 12px; border: 4px solid var(--ink); border-radius: 14px; margin: 6px 0 10px; }
.acct-err { color: #d23a3a; font: 800 13px system-ui, sans-serif; margin: -4px 0 8px; }
.acct-note { font: 700 12px system-ui, sans-serif; opacity: .75; }
.dev-card .g-seg { width: 100%; } .dev-card .g-seg button { white-space: nowrap; }

/* ---- v0.19.2: power-ups in the Store, snack picker, GAMES hub and the Power Lab ---- */
.spack.boost .bo-art { display: flex; justify-content: center; gap: 2px; min-height: 64px; align-items: center; }
.spack.boost .g-tag { position: static; transform: none; font-size: 11px; padding: 1px 8px; }
.spack.boost > b { font-size: max(15px, calc(var(--u) * 40)); }
.spack.boost > small { font-size: max(10px, calc(var(--u) * 21)); line-height: 1.2; min-height: 2.4em; }
.spack.boost.pack .bo-art canvas { margin: 0 -6px; }
.spack.boost.pack > b { font-size: max(14px, calc(var(--u) * 34)); }
.shop-note { margin: -4px 0 8px; font: 700 13px system-ui, sans-serif; color: #fff; text-shadow: 0 1px 0 #0b3c7a; }
.sn-held { margin: 8px 0 4px; text-align: left; }
.sn-held > b { display: block; font: 400 16px var(--font); color: #ffd23a; -webkit-text-stroke: 3px #14161f; paint-order: stroke fill; }
.sn-held > small { display: block; font: 700 11px system-ui, sans-serif; color: #cfdcff; margin-bottom: 6px; }
.sn-hrow { display: flex; flex-wrap: wrap; gap: 6px; }
.sn-h { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border: 3px solid #14161f; border-radius: 99px; background: #fff; color: #14161f; font: 400 13px var(--font); cursor: pointer; }
.sn-h[data-k=""] { padding-left: 10px; }
.sn-h.on { background: #ffd23a; }
.gcard .gc-orbs { position: absolute; right: 4%; top: 12%; display: flex; gap: 4px; align-items: center; z-index: 2; }
.gcard .gc-rule { background: #14161f; color: #ffd23a; border-radius: 99px; padding: 2px 8px; font: 400 13px var(--font); }
.gcard.lab { background: linear-gradient(#5a3fc0, #2b1d72); min-height: 110px; }
.gcard.lab .gc-orbs { top: 18%; }
.arc-lab .rcard.lab { max-height: calc(100vh - 24px); overflow: auto; }
.lab-presets { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0; }
.lab-pre { border: 3px solid #14161f; border-radius: 99px; background: #ffd23a; color: #14161f; padding: 4px 10px; font: 400 13px var(--font); cursor: pointer; }
.lab-pre.clear { background: #fff; }
.lab-h { text-align: left; font: 400 16px var(--font); color: #fff; -webkit-text-stroke: 3px #14161f; paint-order: stroke fill; margin: 8px 0 4px; }
.lab-h small { font: 700 11px system-ui, sans-serif; color: #cfdcff; -webkit-text-stroke: 0; margin-left: 6px; }
.lab-pk { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lab-k { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border: 3px solid #14161f; border-radius: 14px; background: #ffffff30; color: #fff; font: 400 13px var(--font); cursor: pointer; opacity: .55; }
.lab-k.on { background: #fff; color: #14161f; opacity: 1; }
.lab-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.lab-row > span { width: 72px; text-align: left; font: 800 12px system-ui, sans-serif; color: #fff; }
.lab-seg { flex: 1; display: flex; gap: 4px; }
.lab-seg button { flex: 1; border: 3px solid #14161f; border-radius: 99px; background: #ffffff30; color: #fff; padding: 3px 0; font: 400 12px var(--font); cursor: pointer; }
.lab-seg button.on { background: #ffd23a; color: #14161f; }
.lab-togs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 4px; }
.lab-tog { border: 3px solid #14161f; border-radius: 12px; background: #ffffff30; color: #fff; padding: 5px 2px; font: 400 12px var(--font); cursor: pointer; }
.lab-tog.on { background: #7be35a; color: #14161f; }
.lab-save { margin-top: 6px; background: none; border: 0; color: #cfdcff; font: 800 12px system-ui, sans-serif; text-decoration: underline; cursor: pointer; }
.gcard.event .gc-orbs { top: auto; bottom: 6%; right: 3%; }
.rcard.lab { width: min(94vw, 520px); }
.rcard.lab .lab-h, .rcard.lab .lab-row, .rcard.lab .lab-pk, .rcard.lab .lab-togs, .rcard.lab .lab-presets { width: 100%; align-self: stretch; box-sizing: border-box; }
.rcard.lab .lab-seg button { white-space: nowrap; font-size: 12px; }
.rcard.lab .lab-k { justify-content: flex-start; white-space: nowrap; }
.rcard.lab .lab-k b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.rcard.lab .lab-k:not(.on) canvas { filter: grayscale(.7); }
.arc-lab .rcard.lab .rs-actions { position: sticky; bottom: -2px; padding: 8px 0 2px; background: #0f1a3c; z-index: 2; }
.rcard.lab .rs-place { font-size: clamp(28px, 8vw, 40px); }
.rcard.lab .rs-sub { margin-bottom: 0; }
.rcard.lab .rs-actions { display: flex; flex-direction: row; gap: 10px; } .rcard.lab .rs-actions .btn { flex: 1; margin: 0; }
