/* Wombat Wallop 1.1.0 "Squad Up" — chunky, lit, high-contrast UI */
@font-face { font-family: "Lilita One"; src: url("../fonts/lilita-one.1.1.0.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito-800.1.1.0.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito-900.1.1.0.woff2") format("woff2"); font-weight: 900; font-display: swap; }
:root {
  --bark: #2b1d12; --bark2: #4a2f1c; --cream: #fff7e6; --paper: #fbecd0; --ochre: #e0892f; --ochre2: #c96b17;
  --gum: #5e8f4e; --gum2: #3f6b34; --teal: #2f8f8a; --sky: #7cc3e8; --rose: #d9534f; --gold: #ffcf3f;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --ui: 1;
  --font: "Nunito", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
}
body.large { --ui: 1.15; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b2a3a; overscroll-behavior: none; }
body { font-family: var(--font); color: var(--bark); position: fixed; inset: 0; width: 100%; height: 100dvh; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#game { position: fixed; inset: 0; display: block; touch-action: none; }
button { font-family: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn { --c: var(--ochre); --d: var(--ochre2); position: relative; border: 3px solid var(--bark); border-radius: 18px; background: linear-gradient(var(--c), var(--d));
  color: #fff; font-weight: 900; font-size: calc(18px * var(--ui)); padding: calc(12px * var(--ui)) calc(22px * var(--ui)); min-height: 48px; min-width: 48px;
  box-shadow: 0 5px 0 var(--bark), 0 8px 14px rgba(0,0,0,.25); text-shadow: 0 2px 0 rgba(0,0,0,.35); letter-spacing: .3px;
  transition: transform .12s cubic-bezier(.3,1.6,.6,1), box-shadow .12s; font-family: var(--display); font-weight: 400; letter-spacing: .5px; }
.btn::before { content: ''; position: absolute; left: 8px; right: 8px; top: 3px; height: 38%; border-radius: 12px 12px 40% 40% / 12px 12px 18px 18px; background: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,0)); pointer-events: none; }
.btn.plain::before { background: linear-gradient(rgba(255,255,255,.9), rgba(255,255,255,0)); }
.icon-btn::before { left: 5px; right: 5px; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--bark), 0 3px 6px rgba(0,0,0,.2); }
.btn.big { font-size: calc(26px * var(--ui)); padding: calc(14px * var(--ui)) calc(34px * var(--ui)); border-radius: 22px; }
.btn.green { --c: #79b45f; --d: #4e8a3c; } .btn.teal { --c: #43aea7; --d: #26807b; } .btn.rose { --c: #e8716c; --d: #c04741; }
.btn.plain { --c: #fff7e6; --d: #f0dcb5; color: var(--bark); text-shadow: none; }
.btn.dark { --c: #5a4436; --d: #3c2b20; }
.btn.gold { --c: #ffd84a; --d: #f0a21c; color: var(--bark); text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.btn.small { font-size: calc(15px * var(--ui)); padding: 6px 14px; min-height: 40px; border-radius: 14px; box-shadow: 0 4px 0 var(--bark); }
.btn.disabled { filter: grayscale(.7) brightness(.95); opacity: .7; }
.btn:disabled { filter: grayscale(.8) brightness(.9); opacity: .6; }
.icon-btn { width: calc(50px * var(--ui)); height: calc(50px * var(--ui)); padding: 0; display: inline-grid; place-items: center; border-radius: 16px; font-size: 22px; }
.icon-btn svg { width: 60%; height: 60%; fill: #fff; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.btn.plain svg { fill: var(--bark); filter: none; }

/* ---------- Screens ---------- */
#screens { position: fixed; inset: 0; pointer-events: none; }
.screen { position: absolute; inset: 0; padding: calc(12px + var(--safe-t)) calc(12px + var(--safe-r)) calc(12px + var(--safe-b)) calc(12px + var(--safe-l));
  display: flex; flex-direction: column; opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .28s ease, transform .35s cubic-bezier(.2,1.3,.4,1);
  pointer-events: none; overflow: hidden; }
.screen.on { opacity: 1; transform: none; pointer-events: auto; }
.screen.passthru, .screen.passthru.on { pointer-events: none; }
.reduce .screen, .reduce .card, .reduce .btn { transition: opacity .15s !important; transform: none !important; }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; flex: 1; min-height: 0; }
.backdrop { position: absolute; inset: 0; background: linear-gradient(rgba(43,29,18,.25), rgba(43,29,18,.55)); z-index: -1; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.topbar h2 { font-family: var(--display); font-weight: 400; letter-spacing: .5px; flex: 1; margin: 0; color: #fff; font-size: calc(26px * var(--ui)); text-shadow: 0 3px 0 var(--bark), 0 0 12px rgba(0,0,0,.4); -webkit-text-stroke: 1px var(--bark); }
.panel { background: var(--cream); border: 3px solid var(--bark); border-radius: 22px; box-shadow: 0 6px 0 var(--bark), 0 12px 30px rgba(0,0,0,.3); padding: 14px; }

/* ---------- Title ---------- */
.title-wrap { flex: 1; display: grid; place-items: center; text-align: center; min-width: 0; }
.title-top { min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; }
.subtitle { font-family: var(--display); color: #fff; font-size: clamp(20px, 4.6vmin, 34px); letter-spacing: 2px; transform: rotate(-4deg); margin-top: 4px;
  -webkit-text-stroke: 5px var(--bark); paint-order: stroke fill; text-shadow: 0 4px 0 var(--bark); }
.subtitle::before, .subtitle::after { content: '\2605'; color: var(--gold); margin: 0 .35em; font-size: .7em; vertical-align: .15em; }
.title-squad { display: block; width: min(100%, 520px); height: auto; aspect-ratio: 720 / 300; margin-top: -4px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.3)); }
.logo { font-family: var(--display); margin: 0; line-height: .86; font-weight: 400; color: #ffd35a; font-size: clamp(54px, 13vmin, 120px); letter-spacing: 1px;
  -webkit-text-stroke: clamp(5px, 1.2vmin, 9px) var(--bark); paint-order: stroke fill; text-shadow: 0 clamp(5px, 1.2vmin, 9px) 0 var(--bark), 0 14px 30px rgba(0,0,0,.35);
  transform: rotate(-4deg); animation: logoIn .9s cubic-bezier(.2,1.6,.4,1) both; }
.logo .l2 { display: block; color: #ff9a3c; font-size: 1.12em; margin-left: .6em; }
@keyframes logoIn { from { transform: rotate(-4deg) scale(.3); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
.studio { color: #fff; font-weight: 800; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; opacity: .9; text-shadow: 0 2px 0 var(--bark); margin-bottom: 6px; }
.promise { color: #fff; font-size: calc(13px * var(--ui)); font-weight: 700; text-shadow: 0 2px 0 rgba(0,0,0,.5); opacity: .95; margin-top: 10px; }
.title-btns { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 18px; }
.mode-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.mode-row .btn { min-width: 120px; font-size: calc(16px * var(--ui)); }
.corner { position: absolute; display: flex; gap: 8px; }
.corner.tr { top: calc(12px + var(--safe-t)); right: calc(12px + var(--safe-r)); }
.corner.tl { top: calc(12px + var(--safe-t)); left: calc(12px + var(--safe-l)); }
.xpchip { background: rgba(43,29,18,.75); color: #fff; border-radius: 14px; padding: 6px 12px; font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; border: 2px solid rgba(255,255,255,.2); }
.xpbar { width: 70px; height: 8px; background: rgba(255,255,255,.2); border-radius: 4px; overflow: hidden; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd35a, #ff9a3c); }

@media (orientation: portrait) {
  .title-wrap { place-items: start center; align-content: start; padding-top: max(56px, 7vh); gap: 0; }
  .title-btns { gap: 10px; margin-top: 12px; }
  .logo { font-size: clamp(50px, 15vw, 96px); }
}
.narrow-only { display: none !important; }
@media (max-width: 520px) { .wide-only { display: none !important; } .narrow-only { display: flex !important; } .corner.tr .icon-btn { width: 46px; height: 46px; } }
.hudq { display: none; justify-content: center; gap: 1px; margin-top: 2px; }
.hudq canvas { width: 26px; height: 26px; display: block; }
.hud .hudq .qbtn { pointer-events: auto; background: none; border: 0; padding: 5px 3px; margin: 0; min-width: 32px; min-height: 36px; cursor: pointer; touch-action: manipulation; }
.hud .hudq .qbtn:active canvas { transform: scale(1.15); }
@media (orientation: portrait) { .hudq { display: flex; } }
/* ---------- Campaign ---------- */
.world-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; touch-action: pan-x; }
.world-tab { flex: 1 0 auto; border: 3px solid var(--bark); border-radius: 16px; padding: 8px 12px; background: var(--paper); font-weight: 900; font-size: calc(14px * var(--ui)); box-shadow: 0 4px 0 var(--bark); min-height: 48px; }
.world-tab.on { background: var(--gold); }
.world-tab small { display: block; font-weight: 700; font-size: 11px; opacity: .75; }
.world-tab.locked { opacity: .55; }
.world-head { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 10px 14px; margin-bottom: 10px; color: #fff; border: 3px solid var(--bark); box-shadow: 0 4px 0 var(--bark); }
.world-head h3 { font-family: var(--display); font-weight: 400; margin: 0; font-size: calc(22px * var(--ui)); text-shadow: 0 2px 0 var(--bark); }
.world-head p { margin: 2px 0 0; font-weight: 700; font-size: 13px; opacity: .95; text-shadow: 0 1px 0 rgba(0,0,0,.4); }
.level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(76px * var(--ui)), 1fr)); gap: 10px; padding-bottom: 20px; }
.lvl { aspect-ratio: 1; border: 3px solid var(--bark); border-radius: 18px; background: linear-gradient(#fff7e6, #f0dcb5); box-shadow: 0 5px 0 var(--bark);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; font-size: calc(24px * var(--ui)); position: relative; padding: 0; min-height: 64px; }
.lvl .st { font-size: 13px; letter-spacing: -1px; color: #c9b48a; margin-top: 2px; }
.lvl .st b { color: #f5a623; text-shadow: 0 1px 0 var(--bark); }
.lvl.locked { background: #b8a58b; color: rgba(43,29,18,.5); }
.lvl.boss { background: linear-gradient(#ffe48a, #f5b93b); }
.lvl.next { animation: pulseLvl 1.4s ease-in-out infinite; }
@keyframes pulseLvl { 50% { transform: translateY(-3px); box-shadow: 0 8px 0 var(--bark), 0 0 0 5px rgba(255,207,63,.7); } }
.lvl:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--bark); }

/* ---------- HUD ---------- */
.hud { position: fixed; left: 0; right: 0; top: 0; padding: calc(8px + var(--safe-t)) calc(10px + var(--safe-r)) 0 calc(10px + var(--safe-l)); display: flex; align-items: flex-start; gap: 8px; pointer-events: none; z-index: 5; }
.hud > * { pointer-events: auto; }
.hud .grow { flex: 1; pointer-events: none; display: flex; justify-content: center; }
.hud .score { background: rgba(43,29,18,.72); color: #fff; border-radius: 16px; padding: 6px 14px; text-align: center; border: 2px solid rgba(255,255,255,.25); min-width: 120px; }
.hud .score b { display: block; font-size: calc(22px * var(--ui)); line-height: 1.05; font-variant-numeric: tabular-nums; }
.hud .score span { font-size: calc(12px * var(--ui)); font-weight: 800; opacity: .9; display: flex; gap: 6px; justify-content: center; align-items: center; }
.hud .toadicons { display: inline-flex; gap: 2px; }
.hud .toadicons i { width: 11px; height: 9px; border-radius: 50% 50% 45% 45%; background: #a3a94b; border: 1.5px solid #2f3a16; display: inline-block; }
.hud .toadicons i.gone { background: transparent; border-color: rgba(255,255,255,.35); }
.hud-ability { position: fixed; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%) scale(.9); background: rgba(43,29,18,.82); color: #fff; padding: 10px 18px; border-radius: 22px;
  font-weight: 900; font-size: calc(16px * var(--ui)); pointer-events: none; opacity: 0; transition: opacity .2s, transform .25s cubic-bezier(.2,1.6,.4,1); border: 2px solid rgba(255,207,63,.8); z-index: 5; white-space: nowrap; }
.hud-ability.on { opacity: 1; transform: translateX(-50%) scale(1); }
.hud-ability b { color: var(--gold); }
.sandbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); display: flex; gap: 6px; z-index: 5; background: rgba(43,29,18,.7); padding: 6px; border-radius: 20px; max-width: calc(100vw - 16px); overflow-x: auto; touch-action: pan-x; }
.sandbar canvas { width: calc(46px * var(--ui)); height: calc(46px * var(--ui)); border-radius: 14px; background: rgba(255,255,255,.12); border: 2px solid transparent; flex: none; }
.sandbar canvas.on { border-color: var(--gold); background: rgba(255,207,63,.25); }
.sandbar .btn { padding: 6px 10px; font-size: 14px; min-height: 46px; flex: none; }
.sandbar .sep { width: 2px; background: rgba(255,255,255,.2); flex: none; }
.sandbar .chip { flex: none; min-width: 46px; min-height: 46px; border-radius: 14px; border: 2px solid transparent; background: rgba(255,255,255,.12); color: #fff; font-weight: 800; font-size: 12px; padding: 0 8px; }
.sandbar .chip.on { border-color: var(--gold); background: rgba(255,207,63,.25); }
.trick-tag { background: var(--rose); color: #fff; font-weight: 900; border-radius: 12px; padding: 2px 8px; font-size: 11px; }

/* ---------- Modals / cards ---------- */
.modal-wrap { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(27,18,10,.55); z-index: 20; padding: calc(12px + var(--safe-t)) 12px calc(12px + var(--safe-b));
  animation: fadeIn .2s ease both; touch-action: none; }
@keyframes fadeIn { from { opacity: 0; } }
.card { width: min(440px, 100%); max-height: 100%; overflow-y: auto; background: var(--cream); border: 4px solid var(--bark); border-radius: 26px; box-shadow: 0 8px 0 var(--bark), 0 20px 50px rgba(0,0,0,.45);
  padding: 18px; text-align: center; animation: cardIn .45s cubic-bezier(.2,1.5,.4,1) both; touch-action: pan-y; }
@keyframes cardIn { from { transform: translateY(40px) scale(.85); opacity: 0; } }
.card h2 { font-family: var(--display); font-weight: 400; letter-spacing: .5px; margin: 0 0 4px; font-size: calc(30px * var(--ui)); color: var(--ochre2); -webkit-text-stroke: 1px var(--bark); text-shadow: 0 3px 0 var(--bark); }
.card h3 { margin: 6px 0; }
.card p { margin: 6px 0; font-weight: 700; line-height: 1.35; font-size: calc(15px * var(--ui)); }
.card .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.card .row .btn { flex: 1 1 120px; }
.card .row.stack { flex-direction: column; align-items: stretch; }
.card .row.stack > .btn { flex: none; }
.card .row.stack > .row { margin: 0; }
.stars { display: flex; justify-content: center; gap: 8px; margin: 8px 0; }
.stars svg { width: 64px; height: 64px; transform: scale(0); }
.stars svg.on { animation: starPop .5s cubic-bezier(.2,1.8,.4,1) both; }
.stars svg.off { transform: scale(.85); opacity: .35; filter: grayscale(1); transition: transform .3s; }
.stars svg:nth-child(2) { width: 80px; height: 80px; margin-top: -12px; }
@keyframes starPop { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
.bigscore { font-family: var(--display); font-size: calc(36px * var(--ui)); font-weight: 400; font-variant-numeric: tabular-nums; }
.lineup { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin: 8px 0; }
.lineup canvas { width: 54px; height: 54px; }
.tipbox { background: #fff0c8; border: 2px dashed #d8b46a; border-radius: 14px; padding: 8px 10px; font-weight: 800; }
.unlock { background: linear-gradient(#e9fbd9, #cfeeb7); border: 2px solid var(--gum2); border-radius: 14px; padding: 8px; margin-top: 8px; font-weight: 800; animation: cardIn .5s .6s both; }
.xpline { display: flex; align-items: center; gap: 8px; justify-content: center; font-weight: 800; margin-top: 6px; }
.xpline .xpbar { width: 140px; height: 12px; background: #e7d3ad; border: 2px solid var(--bark); border-radius: 8px; }
.xpline .xpbar i { transition: width 1s ease .3s; }

/* ---------- Settings ---------- */
.set-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.set-row { display: flex; align-items: center; gap: 12px; background: var(--cream); border: 3px solid var(--bark); border-radius: 18px; padding: 10px 14px; box-shadow: 0 4px 0 var(--bark); min-height: 56px; }
.set-row label, .set-row .lab { flex: 1; font-weight: 800; font-size: calc(16px * var(--ui)); }
.set-row small { display: block; font-weight: 700; opacity: .7; font-size: 12px; }
.switch { width: 58px; height: 34px; border-radius: 20px; border: 3px solid var(--bark); background: #cbb998; position: relative; flex: none; padding: 0; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--bark); transition: left .2s cubic-bezier(.3,1.6,.5,1); }
.switch.on { background: var(--gum); }
.switch.on::after { left: 26px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 46%; height: 12px; border-radius: 8px; background: #e7d3ad; border: 2px solid var(--bark); touch-action: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ochre); border: 3px solid var(--bark); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--ochre); border: 3px solid var(--bark); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; width: 100%; }
.pick { border: 3px solid var(--bark); border-radius: 16px; overflow: hidden; background: #fff; padding: 0; box-shadow: 0 4px 0 var(--bark); position: relative; text-align: center; }
.pick canvas { display: block; width: 100%; aspect-ratio: 16/10; }
.pick span { display: block; font-weight: 800; font-size: 13px; padding: 4px; }
.pick.on { outline: 4px solid var(--gold); outline-offset: 0; }
.pick.locked canvas { filter: grayscale(1) brightness(.6); }
.pick .lock { position: absolute; top: 6px; right: 6px; background: var(--bark); color: #fff; font-size: 11px; border-radius: 10px; padding: 2px 7px; font-weight: 800; }
.built { text-align: center; color: #fff; font-weight: 700; font-size: 13px; opacity: .9; text-shadow: 0 1px 0 var(--bark); padding: 8px; }

/* ---------- Trophies / cast / daily ---------- */
.tro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tro { background: var(--cream); border: 3px solid var(--bark); border-radius: 16px; padding: 10px; box-shadow: 0 4px 0 var(--bark); display: flex; gap: 8px; align-items: center; }
.tro .medal { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 20px; border: 3px solid var(--bark); background: radial-gradient(circle at 35% 35%, #ffe98a, #e0a92a); }
.tro.locked { opacity: .55; } .tro.locked .medal { background: #c9b9a0; filter: grayscale(1); }
.tro b { display: block; font-size: 14px; } .tro small { font-weight: 700; font-size: 12px; opacity: .8; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0 20px; }
.stat { background: rgba(255,247,230,.95); border: 3px solid var(--bark); border-radius: 14px; padding: 8px; text-align: center; font-weight: 800; }
.stat b { display: block; font-size: 22px; }
.section-title { color: #fff; font-size: 18px; margin: 12px 4px 8px; text-shadow: 0 2px 0 var(--bark); }
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding-bottom: 20px; }
.cast { background: var(--cream); border: 3px solid var(--bark); border-radius: 18px; padding: 10px; display: flex; gap: 10px; box-shadow: 0 4px 0 var(--bark); text-align: left; }
.cast canvas { width: 86px; height: 86px; flex: none; background: radial-gradient(#fff3d1, #f2d9a6); border-radius: 14px; }
.cast h4 { margin: 0; font-size: 17px; } .cast .pw { color: var(--ochre2); font-weight: 900; font-size: 13px; }
.cast p { margin: 3px 0 0; font-size: 13px; font-weight: 700; line-height: 1.3; }
.cast.unmet canvas { filter: brightness(0) opacity(.35); background: none; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; font-weight: 900; font-size: 12px; opacity: .6; }
.cal .day { aspect-ratio: 1; border-radius: 12px; border: 2px solid rgba(43,29,18,.25); display: grid; place-items: center; font-weight: 900; font-size: 15px; background: #fff; position: relative; padding: 0; min-height: 36px; }
.cal .day.done { background: linear-gradient(#ffe48a, #f5b93b); border-color: var(--bark); }
.cal .day.today { outline: 3px solid var(--rose); outline-offset: 1px; }
.cal .day.future { opacity: .35; }
.cal .day small { position: absolute; bottom: 1px; font-size: 8px; letter-spacing: -1px; color: var(--bark); }
.streak { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 900; font-size: 18px; margin: 8px 0; }
.flame { width: 34px; height: 40px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; top: calc(74px + var(--safe-t)); transform: translate(-50%, -20px); opacity: 0; z-index: 30; background: var(--cream); border: 3px solid var(--bark);
  border-radius: 18px; padding: 8px 16px; font-weight: 900; font-size: calc(15px * var(--ui)); box-shadow: 0 4px 0 var(--bark); pointer-events: none; transition: opacity .25s, transform .35s cubic-bezier(.2,1.6,.4,1); max-width: calc(100vw - 24px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.menu { top: auto; bottom: calc(16px + var(--safe-b)); }

/* ---------- Tutorial hand ---------- */
.tut { position: fixed; z-index: 6; pointer-events: none; }
.tut .hand { width: 56px; height: 56px; position: absolute; transform: translate(-30%, -10%); filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); }
.tut-msg { position: fixed; left: 50%; transform: translateX(-50%); top: calc(84px + var(--safe-t)); z-index: 6; background: var(--cream); border: 3px solid var(--bark); border-radius: 18px; padding: 10px 16px;
  font-weight: 900; font-size: calc(17px * var(--ui)); box-shadow: 0 4px 0 var(--bark); pointer-events: none; text-align: center; max-width: calc(100vw - 24px); animation: cardIn .4s both; }
.ios-steps { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.ios-steps div { flex: 1; background: #fff; border: 2px solid var(--bark); border-radius: 14px; padding: 8px; font-weight: 800; font-size: 13px; }
.ios-steps svg { width: 48px; height: 48px; display: block; margin: 0 auto 4px; }
@media (max-height: 500px) { .cal .day { aspect-ratio: auto; height: 34px; min-height: 34px; } .panel { padding: 10px; } .streak { margin: 2px 0; font-size: 16px; } }

/* ---------- size overrides (must stay last) ---------- */
@media (orientation: landscape) and (max-height: 500px) {
  .title-wrap { grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 52px; align-items: center; }
  .logo { font-size: clamp(44px, 15vh, 90px); }
  .title-btns { margin-top: 0; gap: 8px; }
  .title-btns .btn { padding: 8px 16px; min-height: 44px; font-size: 15px; }
  .title-btns .btn.big { font-size: 22px; padding: 8px 28px; }
  .mode-row { gap: 6px; } .mode-row .btn { min-width: 100px; }
  .promise { margin-top: 2px; }
  .card { padding: 10px 14px; }
  .card h2 { font-size: 24px; }
  .card p { margin: 3px 0; font-size: 13px; }
  .card .row { margin-top: 8px; }
  .stars { margin: 2px 0; } .stars svg { width: 44px; height: 44px; } .stars svg:nth-child(2) { width: 54px; height: 54px; margin-top: -6px; }
  .bigscore { font-size: 26px; }
  .unlock { padding: 4px 8px; font-size: 13px; margin-top: 4px; }
  .lineup canvas { width: 42px; height: 42px; }
  .card .btn { min-height: 44px; padding: 6px 12px; }
  .card .btn.big { font-size: 20px; padding: 6px 18px; }
  .xpline { margin-top: 2px; font-size: 13px; }
}
@media (orientation: landscape) and (max-height: 500px) and (min-width: 600px) { .card { width: min(620px, 100%); } .endcard { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); gap: 12px; align-items: center; width: min(700px, 100%); } }
@media (min-width: 700px) and (min-height: 700px) { :root { --ui: 1.22; } body.large { --ui: 1.4; } .logo { font-size: clamp(80px, 12vmin, 140px); } .card { width: min(520px, 100%); } }



/* =================== 1.1.0 "Squad Up" screens =================== */
.kicker { margin: 0 0 2px !important; font-size: calc(12px * var(--ui)) !important; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ochre2); font-weight: 900 !important; }
.fine { font-size: calc(13px * var(--ui)) !important; opacity: .85; font-weight: 700 !important; }
.quote { font-style: italic; color: var(--bark2); }
.card h2 small { display: block; font-family: var(--font); font-size: calc(14px * var(--ui)); color: var(--bark2); -webkit-text-stroke: 0; text-shadow: none; letter-spacing: 1px; text-transform: uppercase; font-weight: 900; }
.card.wide { width: min(680px, 100%); }
.backdrop.title-glow { background: radial-gradient(ellipse at 50% 30%, rgba(255,214,120,.25), rgba(43,29,18,0) 60%), linear-gradient(rgba(43,29,18,.05), rgba(43,29,18,.35)); }

/* Comic, postcard, intro */
.comic-cv, .postcard { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; border-radius: 16px; border: 3px solid var(--bark); box-shadow: 0 4px 0 var(--bark); margin-bottom: 8px; background: #1b2550; }
@media (max-height: 560px) { .comic-cv, .postcard { width: auto; max-width: 100%; max-height: 42vh; margin: 0 auto 8px; } .card.comic h2 { font-size: calc(24px * var(--ui)); } .card.comic .row { margin-top: 8px; } }
.intro-card { --wcol: var(--ochre); background: radial-gradient(circle at 50% 22%, color-mix(in srgb, var(--wcol) 30%, #fff7e6), var(--cream) 60%); }
.intro-cv { width: min(220px, 56vw); height: auto; aspect-ratio: 1; display: block; margin: 4px auto; filter: drop-shadow(0 6px 0 rgba(43,29,18,.25)); animation: introPop .6s cubic-bezier(.2,1.7,.4,1) both; }
@media (max-height: 560px) and (orientation: landscape) {
  .card.intro-card { width: min(640px, 100%); display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; text-align: left; }
  .card.intro-card > .intro-cv { grid-row: 1 / span 5; width: min(170px, 40vh); margin: 0; }
  .card.intro-card > .kicker { margin-top: 0; }
  .card.intro-card > .row { grid-column: 2; margin-top: 8px; }
}
@keyframes introPop { from { transform: scale(.2) rotate(-12deg); opacity: 0; } }
.powerbox { background: #fff; border: 3px solid var(--bark); border-radius: 16px; padding: 10px 12px; font-weight: 800; text-align: left; box-shadow: 0 3px 0 var(--bark); line-height: 1.35; }
.powerbox b { color: var(--ochre2); }

/* Meet the Squad */
.meet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin: 10px 0; }
.meet { background: #fff; border: 3px solid var(--bark); border-radius: 16px; padding: 6px; box-shadow: 0 3px 0 var(--bark); display: flex; flex-direction: column; align-items: center; }
.meet canvas { width: 100%; height: auto; aspect-ratio: 1; }
.meet b { font-family: var(--display); font-weight: 400; font-size: 16px; } .meet small { font-weight: 800; font-size: 11px; opacity: .75; }
.meet.locked { background: #d9c8a6; }
.oldmob-notes { text-align: left; } .oldmob-notes p { font-size: calc(13px * var(--ui)); margin: 4px 0; }

/* Squad Up */
.squadup { text-align: left; }
.su-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.su-head .xpchip { flex: none; }
.fort-preview { display: block; width: 100%; height: auto; aspect-ratio: 560 / 220; border-radius: 16px; border: 3px solid var(--bark); box-shadow: 0 4px 0 var(--bark); margin: 8px 0; }
.mats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.mat { border: 2px solid var(--bark); border-radius: 999px; padding: 2px 10px; font-weight: 900; font-size: 12px; background: #fff; }
.mat-wood { background: #f0c48a; } .mat-stone { background: #e9c99a; } .mat-glass { background: #bfeaf6; } .mat-ice { background: #dff4ff; } .mat-iron { background: #c4ccd2; } .mat-fizz { background: #ff9d6b; }
.mat.shots { background: var(--bark); color: #fff; }
.slots { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0 6px; }
.slot { position: relative; width: calc(64px * var(--ui)); height: calc(64px * var(--ui)); border-radius: 18px; border: 3px dashed rgba(43,29,18,.45); background: rgba(255,255,255,.6); padding: 0; display: grid; place-items: center; }
.slot.full { border-style: solid; border-color: var(--bark); background: radial-gradient(circle at 50% 35%, #fff, #f2dcb0); box-shadow: 0 4px 0 var(--bark); }
.slot canvas { width: 92%; height: 92%; }
.slot .num { position: absolute; top: -8px; left: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--bark); color: #fff; font-weight: 900; font-size: 12px; display: grid; place-items: center; }
.slot .plus { font-family: var(--display); font-size: 30px; color: rgba(43,29,18,.4); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(92px * var(--ui)), 1fr)); gap: 8px; margin-top: 6px; }
.rw { position: relative; background: #fff; border: 3px solid var(--bark); border-radius: 16px; padding: 4px 4px 6px; box-shadow: 0 4px 0 var(--bark); display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 48px; transition: transform .12s; }
.rw:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bark); }
.rw canvas { width: 64px; height: 64px; }
.rw b { font-family: var(--display); font-weight: 400; font-size: 15px; line-height: 1.1; }
.rw small { font-weight: 800; font-size: 10.5px; opacity: .75; line-height: 1.2; }
.rw.used { background: linear-gradient(#fff6cf, #ffe38a); }
.rw.dim { opacity: .6; }
.rw.locked { background: #d9c8a6; box-shadow: 0 4px 0 rgba(43,29,18,.5); border-color: rgba(43,29,18,.5); }
.rw .cnt { position: absolute; top: -8px; right: -6px; background: var(--rose); color: #fff; border: 2px solid var(--bark); border-radius: 12px; font-style: normal; font-weight: 900; font-size: 12px; padding: 0 6px; }

/* End card extras */
.wxp { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; text-align: left; }
.wxp-one { display: flex; gap: 8px; align-items: center; background: #fff; border: 2px solid rgba(43,29,18,.35); border-radius: 14px; padding: 4px 8px; }
.wxp-one canvas { width: 40px; height: 40px; flex: none; }
.wxp-one > div { flex: 1; min-width: 0; }
.wxp-one b { font-size: 13px; display: block; }
.wxp-one .xpbar { display: block; width: 100%; height: 8px; background: #e7d3ad; border: 2px solid var(--bark); border-radius: 6px; }
.wxp-one.up { border-color: var(--gold); background: #fff8d6; animation: cardIn .5s .5s both; }
.lvup { display: block; font-weight: 900; color: var(--ochre2); font-size: 12px; }
.newbest { color: var(--rose); font-family: var(--display); font-weight: 400 !important; font-size: 20px !important; }
.mate-tease { display: flex; align-items: center; gap: 8px; background: #fff3c6; border: 2px solid var(--bark); border-radius: 14px; padding: 6px 10px; font-weight: 800; font-size: 13px; text-align: left; }
.mate-tease canvas { width: 44px; height: 44px; flex: none; }
.lbline { font-weight: 900 !important; color: var(--gum2); min-height: 0; }
.lbline:empty { display: none; }
.mate-head { display: flex; align-items: center; gap: 10px; text-align: left; }
.mate-head canvas { width: 90px; height: 90px; flex: none; }
.card.mate .roster { margin-top: 8px; }

/* Weekly Cup */
.cup-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.cup-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--bark); border-radius: 16px; padding: 8px 10px; box-shadow: 0 4px 0 var(--bark); text-align: left; min-height: 56px; }
.cup-row:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bark); }
.cup-n { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bark); display: grid; place-items: center; font-family: var(--display); font-size: 18px; flex: none; }
.cup-t { flex: 1; min-width: 0; } .cup-t b { display: block; font-size: 15px; } .cup-t small { font-weight: 700; opacity: .75; font-size: 12px; }
.cup-sq { display: flex; gap: 0; } .cup-sq canvas { width: 28px; height: 28px; }
.cup-best { font-family: var(--display); font-size: 16px; min-width: 64px; text-align: right; }
@media (max-width: 420px) { .cup-sq { display: none; } }

/* Leaderboards */
.boards .world-tabs { padding-bottom: 8px; }
.me-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff3c6; border: 2px solid var(--bark); border-radius: 14px; padding: 6px 10px; font-weight: 800; margin-bottom: 8px; }
.board-list { display: flex; flex-direction: column; gap: 4px; }
.brow { display: grid; grid-template-columns: 52px 30px 1fr auto; align-items: center; gap: 6px; background: #fff; border: 2px solid rgba(43,29,18,.3); border-radius: 12px; padding: 6px 10px; font-weight: 800; }
.brow:nth-child(1) { background: linear-gradient(#fff3b0, #ffd84a); border-color: var(--bark); }
.brow:nth-child(2) { background: linear-gradient(#ffffff, #dfe6ea); }
.brow:nth-child(3) { background: linear-gradient(#ffe9d6, #f0b98a); }
.brow.me { outline: 3px solid var(--teal); }
.brow .rk { font-family: var(--display); } .brow .bd { font-size: 20px; text-align: center; } .brow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .brow .sc { font-family: var(--display); font-variant-numeric: tabular-nums; }
.gap { text-align: center; font-weight: 900; opacity: .5; }
.offline { text-align: center; font-family: var(--display); font-size: 20px; color: var(--bark2); padding: 24px 8px; background: repeating-linear-gradient(45deg, #fff7e6, #fff7e6 10px, #f6e8c8 10px, #f6e8c8 20px); border-radius: 14px; border: 2px dashed rgba(43,29,18,.3); }

/* Name entry */
.name-card .name-in { width: 100%; font: 400 calc(22px * var(--ui)) var(--display); padding: 10px 14px; border: 3px solid var(--bark); border-radius: 16px; background: #fff; color: var(--bark); text-align: center; box-shadow: inset 0 3px 0 rgba(0,0,0,.08); -webkit-user-select: text; user-select: text; touch-action: manipulation; }
.name-card .name-in:focus { outline: 4px solid var(--gold); }
.err { color: var(--rose); font-weight: 900 !important; min-height: 1.2em; margin: 4px 0 !important; }
.err:empty { min-height: 0; margin: 0 !important; }
.badge-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 8px; }
.badge { aspect-ratio: 1; min-height: 44px; border: 3px solid var(--bark); border-radius: 14px; background: #fff; font-size: 22px; padding: 0; box-shadow: 0 3px 0 var(--bark); }
.badge.on { background: var(--gold); transform: translateY(-2px); box-shadow: 0 5px 0 var(--bark); }
.notice { font-size: 12px !important; font-weight: 700 !important; opacity: .85; }
.notice a { color: var(--teal); font-weight: 900; }

/* Squad Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.scard { --wcol: var(--ochre); background: var(--cream); border: 3px solid var(--bark); border-radius: 22px; box-shadow: 0 6px 0 var(--bark); overflow: hidden; display: flex; flex-direction: column; }
.scard > canvas { width: 100%; height: 170px; object-fit: contain; background: linear-gradient(color-mix(in srgb, var(--wcol) 60%, #fff), var(--wcol)); border-bottom: 3px solid var(--bark); }
.scard.locked > canvas { background: #8a7a62; }
.scard.locked > div { padding: 10px 14px; } .scard.locked h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; } .scard.locked p { margin: 4px 0 0; font-weight: 700; font-size: 13px; }
.sc-body { padding: 10px 14px 14px; }
.sc-body h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.05; }
.sc-body h4 small { display: block; font-family: var(--font); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; font-weight: 900; opacity: .7; }
.sc-body .pw { color: var(--ochre2); font-weight: 900; font-size: 14px; margin: 2px 0 4px; }
.sc-body .xpline { justify-content: flex-start; font-size: 12px; margin: 0 0 6px; }
.sc-body .xpline .xpbar { width: 110px; }
.sc-body p { margin: 4px 0; font-weight: 700; font-size: 13px; line-height: 1.35; }
.sc-body .story { opacity: .85; }
.facts, .chal { background: #fff; border: 2px solid rgba(43,29,18,.25); border-radius: 12px; padding: 6px 10px; margin-top: 6px; font-size: 13px; font-weight: 700; }
.facts ul { margin: 4px 0 0; padding-left: 18px; } .facts li { margin: 2px 0; }
.chal .ch { display: flex; gap: 8px; align-items: flex-start; margin-top: 4px; } .chal .ch > span { font-weight: 900; width: 16px; }
.chal .ch b { display: block; font-size: 13px; } .chal .ch small { font-size: 12px; opacity: .8; }
.chal .ch.done { color: var(--gum2); }
.looks { display: flex; gap: 6px; margin-top: 8px; }
.looks .chip { border: 2px solid var(--bark); border-radius: 12px; background: #fff; font-weight: 900; font-size: 12px; padding: 6px 10px; min-height: 36px; }
.looks .chip.on { background: var(--gold); }
.looks .chip.locked { opacity: .5; }

/* Settings: leaderboard rows */
.set-row .val { font-family: var(--display); font-size: 18px; }
.gate { font-weight: 900; font-size: 13px; }

@media (max-width: 520px) {
  .squadup { padding: 12px; }
  .squadup .tipbox { font-size: 13px; padding: 6px 8px; }
  .fort-preview { margin: 6px 0; }
  .roster { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .rw canvas { width: 52px; height: 52px; }
  .rw b { font-size: 13px; } .rw small { font-size: 9.5px; }
  .slot { width: 56px; height: 56px; }
}
@media (max-height: 760px) { .fort-preview { max-height: 120px; object-fit: cover; } }
/* Squad Up on short phones: the Back / Suggested / Go! buttons stay pinned at the bottom of the card while the roster scrolls. */
.squadup > .row:last-child { position: sticky; bottom: -18px; z-index: 2; margin: 10px -18px -18px; padding: 12px 18px 16px; background: linear-gradient(rgba(255,247,230,0), var(--cream) 22%); }
@media (max-width: 520px) { .squadup > .row:last-child { bottom: -12px; margin: 8px -12px -12px; padding: 10px 12px 12px; } .squadup > .row:last-child .btn { min-height: 0; padding-top: 10px; padding-bottom: 10px; } }
