/* Figma UI rebuild (2026-11-03): the kit every rebuilt screen uses.
   --m   = CSS px per mock px (the Figma frames are 1440 x 2560), set by chrome.js measure()
   art   = PNG exports from Figma (src/figkit.js, assets/ui/fig/), never re-drawn in CSS
   text  = Rubik Bold (23 Nov type spec), capitals, white with a rounded black outside stroke */
:root { --font-ui: "UI", system-ui, sans-serif; }

/* outlined text: --sw = the mock's outside stroke weight (mock px), --fs = font size (mock px) */
.fx {
  font-family: var(--font-ui); font-weight: 700; color: #fff; line-height: 1; white-space: nowrap;
  font-size: calc(var(--m) * var(--fs, 32)); letter-spacing: 0;
  -webkit-text-stroke: calc(var(--m) * var(--sw, 6) * 2) var(--oc); paint-order: stroke fill;
}
.fx.nostroke { -webkit-text-stroke: 0; }

/* an exported image as an element's whole background (fixed-size art) */
.fimg { background: var(--img) 0 0 / 100% 100% no-repeat; }
.fabs { position: absolute; }

/* a button made of exported art; the mock has no pressed state, so it sinks and darkens a little */
.fbtn {
  position: absolute; display: grid; place-items: center; padding: 0; margin: 0; border: 0; cursor: pointer;
  background: var(--img) 0 0 / 100% 100% no-repeat; font: inherit; color: inherit; touch-action: manipulation;
  transition: transform .06s, filter .06s;
}
.fbtn:active:not(:disabled) { transform: translateY(calc(var(--m) * 4)); filter: brightness(.92); }
.fbtn:focus-visible { outline: calc(var(--m) * 8) solid #fff; outline-offset: calc(var(--m) * 4); }
.fbtn:disabled { cursor: default; filter: grayscale(.6) brightness(.9); }

/* 9-slice: art that stretches (--img, --sl = slice insets in image px, --bw = their on-screen size) */
.f9 {
  border-style: solid; border-color: transparent; background: none;
  border-image: var(--img) var(--sl) fill / var(--bw) stretch;
}

/* ---- chrome: top bar + nav (src/chrome.js; mock Home 265:156) ---- */
.fc-top { position: absolute; z-index: 9; left: var(--colx); top: var(--sat, 0px); width: var(--colw); height: 0; pointer-events: none; }
.fc-top > *, .fc-world > * { pointer-events: auto; }
.fc-top[hidden], .fc-nav[hidden], .fc-top [hidden], .fc-nav [hidden] { display: none !important; }
/* 26 Nov 2026 (dev feedback, 25 Nov: "Bronze chest popup: the top HUD should be on top layer"): over a chest card the window
   dims as before (no clear strip: 23 Nov), and the top bar sits above the dim; the card stays above everything */
body:has(#modal:not([hidden]) > .card.chest-open) #modal { background: none; }
body:has(#modal:not([hidden]) > .card.chest-open) #app::after { content: ""; position: absolute; inset: 0; z-index: 9; background: #061a33b8; pointer-events: none; }
body:has(#modal:not([hidden]) > .card.chest-open) #topbar { z-index: 10; }
.fc-world { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.fc-top button, .fc-nav button { background-color: transparent; border: 0; padding: 0; margin: 0; cursor: pointer; font: inherit; touch-action: manipulation; }
.fc-top button:not(.fbtn):active, .fc-nav .fc-tab:active { filter: brightness(.93); }
.fc-txt { display: flex; align-items: center; justify-content: center; text-align: center; overflow: visible; }
.fc-pbird canvas, .fc-tabbird canvas { display: block; image-rendering: pixelated; }
.fc-pill.pump { animation: hudPump .25s; }
.fc-pill.shield { cursor: pointer; }
.fc-dot { position: absolute; right: calc(var(--m) * -6); top: calc(var(--m) * -6); width: calc(var(--m) * 34); height: calc(var(--m) * 34); border-radius: 50%; background: #e8322e; border: calc(var(--m) * 5) solid #000; }
.fc-badge { display: grid; place-items: center; box-sizing: border-box; border-radius: 999px; background: #e8322e; border: calc(var(--m) * 5) solid #000;
  font: 700 var(--f32)/1 var(--font-ui); color: #fff; pointer-events: none; --ow: 4.5; }
.fc-badge.care { background: #fff; }
/* 5 Nov: a nav badge is a circle for one digit, a pill for more (style.css's old .tab-badge min-width made every one an
   oval, and the care emoji a pill that ran under the next tab); the care badge is its icon in a circle */
.fc-nav .fc-badge.tab-badge { width: auto !important; min-width: calc(var(--m) * 52); padding: 0 calc(var(--m) * 9); }
.fc-nav .fc-badge.tab-badge.care { width: calc(var(--m) * 52) !important; min-width: 0; padding: 0; }
.fc-badge.care img { display: block; width: 80%; height: 80%; object-fit: contain; }
.fc-nav { position: absolute; z-index: 9; left: var(--colx); width: var(--colw); bottom: var(--sab, 0px); height: calc(var(--m) * 239); pointer-events: none; }
.fc-nav > * { pointer-events: auto; }
.fc-navfill { position: absolute; left: calc(var(--m) * 64); width: calc(var(--m) * 1312); top: 100%; height: var(--sab, 0px); background: #71c5ff; }
.fc-tab .fc-tabon { display: none; }
.fc-tab.on .fc-tabon { display: block; }
/* 5 Nov (Basil): the active art is 5 mock px wider than its slot on each side; above its neighbours (as in the
   mock) so the next tab no longer covers its right outline */
.fc-nav .fc-tab.on { z-index: 1; }
.fc-pill .cp-ico { margin: 0; filter: none; animation: none; }   /* (style.css's old .cp-ico sizing; the class stays as the fly-to target) */

/* ---- mock-frame layers (src/figscreen.js) ---- */
.fs-layer { position: absolute; left: var(--colx); width: var(--colw); height: calc(var(--m) * 2560); pointer-events: none; }
.fs-layer > * { pointer-events: auto; }
.fs-top { top: var(--sat, 0px); }
.fs-bottom { bottom: var(--sab, 0px); }
.fs-backdrop { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fs-blur { display: none; position: absolute; inset: -24px; background: center / cover no-repeat; filter: blur(14px) brightness(.85); }
body[data-wide="1"] .fs-blur { display: block; }
/* 4 Nov: the exported backdrops overhang the mock frame (home_bg: 111 mock px a side, opaque sea in its lower
   half); Figma clips them to the frame, so on a column narrower than the window the sides show the blur only */
body[data-wide="1"] .fs-backdrop > .fs-layer { clip-path: inset(-100vh 0); }
.fs-bgimg { position: absolute; background: 0 0 / 100% 100% no-repeat; }
.fs-layer button { background-color: transparent; padding: 0; margin: 0; cursor: pointer; font: inherit; touch-action: manipulation; }
/* (5 Nov: the border reset skips kit buttons: `border: 0` here outranked .btn's 9-slice (its slice fell back to 100 %), so a .btn on a
   Figma screen, the Base bar's TRAVEL / CLAIM, drew only the art's four corners) */
.fs-layer button:not(.btn) { border: 0; }
.fs-layer [hidden] { display: none !important; }

/* ---- Home (src/home.js; mock 265:156) ---- */
#s-home { overflow: hidden; }
.fh-tile { cursor: pointer; }
.fh-tile:active { transform: scale(.96); }
.fh-ico-img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.fh-tile canvas { position: absolute; inset: 8%; width: 84% !important; height: auto !important; image-rendering: pixelated; }
.fh-tname { white-space: pre-line; line-height: 1.05; }
.fh-badge { left: calc(var(--m) * 120); top: calc(var(--m) * -8); width: calc(var(--m) * 46); height: calc(var(--m) * 46); }
.fh-bird { pointer-events: none !important; }
.fh-bird .hb-bob, .fh-bird .hb-wing { position: absolute; inset: 0; }
.fh-bird canvas { image-rendering: pixelated; }
.fh-hero { z-index: 1; }
.fh-play .fh-dots { position: absolute; inset: 0; pointer-events: none; }
.fh-sub { letter-spacing: 0; }
.fh-slot { cursor: pointer; }
/* 20 Nov (QA): Birds, Care not open yet: a solid band where the care rewards show (birdspage.js lockBand) */
.fbr-lockband { background: #0b2350; border-radius: calc(var(--m) * 16); box-shadow: 0 0 0 calc(var(--m) * 5) #000; display: flex; pointer-events: none; }
.fbr-lockband[hidden] { display: none; }
/* 30 Nov (dev feedback, Birds card): a sky behind the bird, clipped to the light panel's own art (br_inner, with its notch
   for the Bond heart); the mastery stars and (i) under the bird, one button; EQUIP the card's one CTA */
.fbr-sky { pointer-events: none; background: var(--puffs) 50% 6% / 150% auto no-repeat, var(--bank) 50% calc(var(--m) * 290) / 125% auto no-repeat, linear-gradient(#4db6f6, #a9e3ff 75%);
  -webkit-mask: var(--mask) 0 0 / 100% 100% no-repeat; mask: var(--mask) 0 0 / 100% 100% no-repeat; }
.fbr-mastery { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .06s; }
.fbr-mastery:active { transform: scale(.95); }
.fbr-mastery:focus-visible { outline: calc(var(--m) * 8) solid #fff; outline-offset: calc(var(--m) * 4); border-radius: calc(var(--m) * 20); }
.fbr-sstar-off { filter: brightness(.55) saturate(1.6); }   /* (an unearned star: navy, readable on the sky and the clouds) */
.fbr-info { display: block; filter: drop-shadow(0 calc(var(--m) * 4) 0 #0004); }
.fbr-info svg { width: 100%; height: 100%; display: block; }
.fbr-card .fbr-mlock { background: #0b2350d9; }
.fbr-locktxt { color: #fff; }
/* 20 Nov (QA): a chest queued behind the unlocking one: grey WAITING, not a green OPEN (GDD v1.6 §6.1, one timer at a time) */
.fh-slot.queued .fh-openart { filter: grayscale(1) brightness(.8); }
.fh-slot.incoming .fh-sart { visibility: hidden; }
.fh-slot.landed .fh-sart { animation: fhLand .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes fhLand { from { transform: scale(1.15, .85); } }
.fh-slot.opening .fh-sart, .fh-slot.ready .fh-sart { animation: none; }
.fh-slot.ready .fh-sart { animation: fhBob 1.2s ease-in-out infinite; }
@keyframes fhBob { 50% { transform: translateY(calc(var(--m) * -10)); } }
/* 26 Nov 2026 (dev feedback, 25 Nov: "instead of showing an arrow on the chest, pop and animate the chest so the player clicks on
   it"): the chest the first session suggests pops and wobbles, with a glow (src/guide.js pop) */
.fh-slot[data-guide-pop] .fh-sart { animation: fhGuidePop 1.1s ease-in-out infinite; transform-origin: 50% 80%; filter: drop-shadow(0 0 calc(var(--m) * 18) #ffe26a); }
@keyframes fhGuidePop { 0%, 55%, 100% { transform: scale(1) rotate(0); } 12% { transform: scale(1.18, 1.1) rotate(-6deg); } 24% { transform: scale(1.12) rotate(5deg); } 36% { transform: scale(1.15) rotate(-3deg); } 46% { transform: scale(1.04) rotate(0); } }
.fh-plus, .fh-lock { color: #7ed4ff; }
/* 5 Nov (mock Rectangle 102): a waiting chest's unlock-time tab, hanging from the slot's top edge */
.fh-tab { background: #0061a9; border-radius: 0 0 calc(var(--m) * 15) calc(var(--m) * 15); }
.fh-tabtime { justify-content: flex-start; text-align: left; }
.fh-lock { white-space: normal; line-height: 1.15; }
.fh-notice { --fs: 24; --sw: 4;  display: flex; align-items: center; justify-content: center; border-radius: 999px; background: #000c; padding: 0 calc(var(--m) * 20); font-size: var(--f24); --ow: 4; }
.fh-dot { pointer-events: none; }
/* roby-island (8 Nov): CLASSIC, a blue button to the right of PLAY (PLAY keeps the true centre); the mock's
   button shape (.fy-btn) in blue, the best score on a dark tab like PLAY's subtitle */
/* 23 Nov (owner: "match CLASSIC to the mock too"): the Home mock's blue: a white top band, the gradient, a deep foot */
.fg-btn { border-radius: calc(var(--m) * 22); background: #3192e8 linear-gradient(#5bbffc, #3192e8);
  box-shadow: 0 0 0 calc(var(--m) * 6) #000, inset 0 calc(var(--m) * -24) 0 #0159a4, inset 0 calc(var(--m) * 8) 0 #fff; }
button.fh-classic { cursor: pointer; }
button.fh-classic:active { filter: brightness(.93); transform: translateY(calc(var(--m) * 3)); }
.fh-classic.off { filter: grayscale(.8) brightness(.9); }
.fh-classic:focus-visible { outline: calc(var(--m) * 8) solid #fff; outline-offset: calc(var(--m) * 6); }
.fh-csubbg { background: #006dba; border-radius: calc(var(--m) * 8); }   /* (24 Nov: the Home mock's radius 8) */
.fh-csub { letter-spacing: 0; }
.fh-csub .fh-subcup { height: 1.05em; width: auto; vertical-align: -0.15em; margin: 0 0.08em; }   /* (25 Nov 2026: the cup in AT 80) */
@media (prefers-reduced-motion: reduce) { .fh-slot.ready .fh-sart, .fh-slot[data-guide-pop] .fh-sart { animation: none; } }

/* ---- Build / Base (src/base.js; mock 269:445): the stage is the bottom-anchored mock frame in island px (--u) ---- */
#s-base { overflow: hidden; background: linear-gradient(#5fbaf5, #8fd0f7 40%, #c5dffb); }
#s-base .base-stage { position: absolute; left: var(--colx); width: var(--colw); bottom: var(--sab, 0px); top: auto; height: calc(var(--m) * 2560);
  -webkit-mask-image: none; mask-image: none;
  background: url("assets/ui/fig/base_fade.5ac39a68.webp") 0 calc(var(--m) * 2095) / 100% calc(var(--m) * 655) no-repeat, url("assets/ui/fig/base_bg.be380b5b.webp") 0 calc(var(--m) * -201) / 100% auto no-repeat, transparent; }
#s-base[data-world="2"] { background: #35b2fb; }   /* the NY art's own sky above it on tall phones */
#s-base[data-world="1"] { background: linear-gradient(#3cbcfc, #acd8fa); }
#s-base[data-world="3"] { background: #48affc; } #s-base[data-world="4"] { background: #7cb4fd; }   /* 20 Nov: each island's own sky above it */
#s-base .base-stage[data-world="1"] { background: url("assets/base/meadows/bg.1ad74e88.webp") 0 0 / 100% auto no-repeat, transparent; }   /* 13 Nov: Meadows, 1440 x 2360 from the top (src/isle.js STAGED) */
#s-base .base-stage[data-world="2"] { background: url("assets/base/ny/bg.40d31011.webp") 0 0 / 100% auto no-repeat, transparent; }   /* 13 Nov: New York, a whole screen (src/isle.js STAGED) */
#s-base .base-stage[data-world="3"] { background: url("assets/base/birdmore/bg.ccacfffb.webp") 0 0 / 100% auto no-repeat, transparent; }   /* 20 Nov: Mt. Birdmore, a whole screen (src/isle.js STAGED) */
#s-base .base-stage[data-world="4"] { background: url("assets/base/wildwest/bg.6c97927b.webp") 0 0 / 100% auto no-repeat, transparent; }   /* 20 Nov: Wild West, a whole screen */
#s-base .base-bottom { --u: calc(var(--m) * 1440 / 853); z-index: 2; }
.fb-card { cursor: pointer; transition: transform .15s; }
.fb-card.sel { transform: translateY(calc(var(--m) * -14)); }
.fb-card.sel > .fimg:first-child { filter: drop-shadow(0 0 calc(var(--m) * 10) #ffd23a) drop-shadow(0 0 calc(var(--m) * 4) #ffd23a); }
.fb-card.shake { animation: shake .4s; }
/* 5 Nov (mock Build, ARENA): a damaged landmark shows at 30 % under the wrench, DAMAGED! in red where its stage dots were */
.fb-card.damaged .fb-thumb { opacity: .3; }
.fb-dmg { color: #ff7272; }
.fb-wrench, .fb-logtile { pointer-events: none; }
/* 5 Nov (mock Build, Group 17 / Rectangle 24): ACTIVITY LOG on the rail's navy tile (#223052 at 20 %) */
.fb-logtile { border-radius: calc(var(--m) * 20); background: rgba(34, 48, 82, .2); }
.fb-log { cursor: pointer; }
.fb-log:active { transform: scale(.96); }
.fb-log:focus-visible { outline: calc(var(--m) * 8) solid #fff; outline-offset: calc(var(--m) * 2); border-radius: calc(var(--m) * 20); }
.fb-thumb { width: calc(var(--m) * 200); height: calc(var(--m) * 190); object-fit: contain; }
.fb-maxed { color: #4ac3ff; }
.fb-price.poor { filter: saturate(.35) brightness(.95); }
.fb-price .ico-svg { display: block; }
.fb-price .ico-svg svg { width: 100%; height: 100%; }
#s-base .bp-head { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--m) * 20); padding: 0 calc(var(--m) * 16) 0 calc(var(--m) * 34); border-radius: 999px; background: #0b2350e6; border: calc(var(--m) * 5) solid #000; }
#s-base .bp-head .wb-foot { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--m) * 20); width: 100%; }
#s-base .bp-head .wb-goal { font: 700 var(--f32)/1.1 var(--font-ui); color: #fff; white-space: normal; --ow: 4.5; }
#s-base .bp-head .btn { font-family: var(--font-ui); font-weight: 700; font-size: var(--f36); padding: calc(var(--m) * 10) calc(var(--m) * 30); --ow: 5.2; }
/* 5 Nov (Basil): the bar's TRAVEL / CLAIM is the cards' green price button (src/base.js), a flex item at the bar's right end */
#s-base .bp-head .wb-travel { position: relative; flex: none; }

/* ---- Pinball (src/pinball.js, render.js; mock 270:683): the machine is canvas, these sit on it ---- */
#hits .pin-rail { position: absolute; pointer-events: none; --bw: calc(var(--m) * 24); }
#hits .pin-tile { position: absolute; pointer-events: auto; background: transparent; border: 0; padding: 0; cursor: pointer; color: #fff; font-size: inherit; }
#hits .pin-tile .pt-ico { position: absolute; left: 0; top: 0; width: 100%; height: 87%; }
#hits .pin-tile b { position: absolute; left: -12%; right: -12%; top: 75%; text-align: center; line-height: 1.05; font-size: 1em; -webkit-text-stroke: calc(var(--m) * var(--ow, 5.5) * 2) var(--oc); paint-order: stroke fill; }
#hits .pin-tile:active { transform: scale(.96); }
#hits .fig-x2 { border: 0; border-radius: 0; box-shadow: none; padding: 0; background: var(--img) 0 0 / 100% 100% no-repeat !important; color: #fff; }
#hits .fig-x2::before, #hits .fig-x2::after { content: none; }
#hits .fig-x2 b { position: absolute; inset: 0; opacity: 0; pointer-events: none; }   /* 5 Nov: the label is in the dial's art */
#hits .fig-x2 .x-prev { position: absolute; inset: 0; background: var(--img) 0 0 / 100% 100% no-repeat; animation: xPrevOut .22s ease-out forwards; pointer-events: none; }
@keyframes xPrevOut { from { opacity: 1; } to { opacity: 0; } }
/* 13 Nov (Siddharth's Figma review #49): tapped, the dial only dims; it no longer sinks or pumps */
#hits .fig-x2:active { transform: none; filter: brightness(.93); }
#hits .fig-x2.bump { animation: none; }

/* ---- Birds: one page (src/birdspage.js; mock 281:409) ---- */
#s-birds { overflow: hidden; }
.fbr-scroll { position: absolute; left: var(--colx); width: var(--colw); top: calc(var(--sat, 0px) + var(--m) * 153); bottom: calc(var(--sab, 0px) + var(--m) * 222);
  overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: none; }
.fbr-scroll::-webkit-scrollbar { display: none; }
.fbr-page { position: relative; width: 100%; }
.fbr-page button { background-color: transparent; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; touch-action: pan-y; }
.fbr-page .fbtn { background: var(--img) 0 0 / 100% 100% no-repeat; }
.fbr-page .fbtn:disabled, .fbr-page .fbtn.off, .fbr-mastery.off { filter: grayscale(1) brightness(.88); }   /* 13 Nov (Figma review #46-#48): grey, EQUIPPED included */
.fbr-mastery.off { cursor: default; }
.fbr-mastery.off:active { transform: none; }
.fbr-bfill { transition: width .5s ease-out; }
/* wave 3 (22 Nov 2026, owner item 9): a progress fill takes the track's full inner height, has round ends like the track
   and is never narrower than it is tall (1/50 reads as a small round fill, not a square stub). .zero = nothing yet. */
.fbr-bfill, .w3-fill { box-sizing: border-box; min-width: calc(var(--m) * 24); border-radius: 999px; background: linear-gradient(#ff97a6, #fc576d 45%, #e03a55); box-shadow: inset 0 calc(var(--m) * 3) 0 #ffffff66; }
.fbr-bfill.zero, .w3-fill.zero { display: none; }   /* 13 Nov (#41): the bond bar fills, it doesn't jump */
.fbr-arc { position: absolute; inset: 0; }
/* 13 Nov (Siddharth's Figma review #42, #43, #45): the arc runs on the black ring, as in the mock (Ellipse 33: a 10 px
   outside stroke on the 120 px circle, so its centre line is r 65; it was r 55, inside the blue disc) */
.fbr-arc svg { width: 100%; height: 100%; display: block; overflow: visible; transform: rotate(-90deg); }
.fbr-arc .fbr-arcc { fill: none; stroke: #3bd512; stroke-width: 10; stroke-linecap: butt; stroke-dasharray: 0 100; transition: stroke-dasharray .4s; }
.fbr-hero canvas { image-rendering: pixelated; }
.fbr-bird { cursor: pointer; transition: transform .12s; }
.fbr-bird:active { transform: scale(.97); }
.fbr-bird.sel > .fimg:first-child { filter: drop-shadow(0 0 calc(var(--m) * 8) #ffd23a) drop-shadow(0 0 calc(var(--m) * 4) #ffd23a); }
.fbr-bird canvas { image-rendering: pixelated; }
.fbr-bird.locked canvas { opacity: .9; }
.fbr-task { cursor: pointer; }
.fbr-task:disabled { cursor: default; }
.fbr-task .fbr-tick[hidden] { display: none; }
.fbr-ttxt { white-space: pre-line; line-height: 1.1; }
.fbr-chest.locked .fbr-task { filter: saturate(.4); }
/* roby-island (8 Nov): the care chest says what to do. GO tags on unfinished steps, the next one pulsing;
   locked: a solid navy band with the trophy bar and RACE (no fades) */
.fbr-go { display: flex; align-items: center; justify-content: center; border-radius: 999px; background: #3fbf2e; color: #fff;
  box-shadow: 0 0 0 calc(var(--m) * 5) #14161f; font: 700 var(--f32) var(--font); letter-spacing: .04em; pointer-events: none; --ow: 4.5; }
.fbr-go[hidden] { display: none; }
.fbr-task.next { animation: fbrNudge 1.4s ease-in-out infinite; }
@keyframes fbrNudge { 0%, 100% { transform: none; } 50% { transform: translateY(calc(var(--m) * -8)); } }
.fbr-chest.ready .fbr-done { color: #ffe14a; }
.fbr-lock { background: #10265c; border-radius: calc(var(--m) * 24); box-shadow: 0 0 0 calc(var(--m) * 6) #14161f; z-index: 2; }
.fbr-lock[hidden] { display: none; }
.fbr-lico { background: no-repeat center / contain url("assets/ui/daily/lock.2176b1c6.webp"); }
.fbr-ltitle { justify-content: flex-start; text-align: left; }
.fbr-chest [hidden] { display: none !important; }
.fbr-lbar { background: #000; border-radius: 999px; box-shadow: 0 0 0 calc(var(--m) * 5) #000; overflow: hidden; }
.fbr-lbar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(#5abffb, #2788e4); transition: width .4s ease-out; }
.fbr-lval { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 10); }
.fbr-lval img { display: block; height: calc(var(--m) * 44); width: auto; }
.fbr-lval b { --fs: 32; --sw: 4; }
@media (prefers-reduced-motion: reduce) { .fbr-task.next { animation: none; } }
.fbr-mbadge[hidden] { display: none; }

/* ---- Race HUD (src/race/race.js; mock 289:436): in the race stage's design px (--u = mock px × 1125/1440) ---- */
/* 5 Nov: the race world is clipped to the portrait column (race.js fitRace); black bars outside it on wide windows */
#s-race { background: #000; }
/* 5 Nov (Basil: the top UI not aligned): on tall phones the HUD rises with the stage's lift to the screen's top (30 Oct), under the notch */
.race-stage .race-top { left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) - var(--race-lift, 0px)); height: 0; }
.race-stage .race-pause { position: absolute; left: calc(var(--u) * 33.6); top: calc(var(--u) * 33.6); width: calc(var(--u) * 87.5); height: calc(var(--u) * 87.5);
  border: 0; padding: 0; border-radius: 50%; box-shadow: none; font-size: 0; color: transparent; pointer-events: auto; cursor: pointer;
  background: url("assets/ui/fig/tb_round.eea037d6.webp") 0 0 / 100% 100% no-repeat; }
.race-stage .race-pause::before, .race-stage .race-pause::after { content: ""; position: absolute; top: calc(var(--u) * 21); width: calc(var(--u) * 10.8); height: calc(var(--u) * 41); border-radius: calc(var(--u) * 3); background: #fff; box-shadow: 0 0 0 calc(var(--u) * 1.6) #000; }
.race-stage .race-pause::before { left: calc(var(--u) * 28); }
.race-stage .race-pause::after { left: calc(var(--u) * 43.6); }
.race-stage .race-score { position: absolute; left: 0; right: 0; top: calc(var(--u) * 39); text-align: center; font: 700 calc(var(--u) * 100)/1 var(--font-ui); color: #fff;   /* (mock '12': 29, 170 tall line, centre 114) */
  -webkit-text-stroke: calc(var(--u) * 15.6) var(--oc); paint-order: stroke fill; text-shadow: none; }
/* 5 Nov (Basil: the count overlapping the racer strip): the placement HUD's viewport size (arcade.css v0.20, #s-race.placehud, up
   to 66 px) outranked the mock's 100 on every real race, so on a wide window (a small --u) the count ran into the strip */
#s-race.placehud .race-stage .race-score { font-size: calc(var(--u) * 100); }
.race-stage .race-left { position: absolute; left: 0; right: 0; top: calc(var(--u) * 292); text-align: center;   /* 5 Nov (Basil): clear of the strip, which ends at 273 (was 268, its top inside the strip) */ font: 700 calc(var(--u) * 31.25)/1 var(--font-ui); color: #fff;
  -webkit-text-stroke: calc(var(--u) * var(--ow, 5.5) * 2.56) var(--oc); paint-order: stroke fill; background: none; border: 0; padding: 0;
  z-index: 1; pointer-events: none; --ow: 5.5; }   /* 5 Nov: over the racer strip, as in the mock (the strip comes later in the HUD and covered the count's top) */
.race-stage .race-roster { transform: none; right: auto; margin: 0; left: calc(var(--u) * 152.3); top: calc(var(--u) * 195.3 + env(safe-area-inset-top, 0px) - var(--race-lift, 0px)); width: calc(var(--u) * 820.3); height: calc(var(--u) * 78.1); padding: 0 calc(var(--u) * 20);
  display: flex; align-items: center; justify-content: space-between; gap: 0; border-radius: calc(var(--u) * 15.6); background: url("assets/ui/fig/race_strip.9c327601.webp") 0 0 / 100% 100% no-repeat; border: 0; box-shadow: none; }
.race-stage .race-roster .rr { width: calc(var(--u) * 71); height: calc(var(--u) * 48.4); position: relative; overflow: visible; }
/* 5 Nov: the slot is the mock's bird body (92 x 63); the sprite cell (28 x 26, body 22 x 15 at 2, 10) is placed so the body fills it, as birdInBox does */
.race-stage .race-roster .rr canvas { position: absolute; left: 50%; top: 50%; width: calc(100% * 28 / 22) !important; height: auto !important; max-width: none; transform: translate(-46.43%, -67.31%); }
.race-stage .race-roster .rr.you { outline: none; }
.race-stage .race-feed { left: 0; right: 0; top: calc(var(--u) * 1821); bottom: auto; gap: calc(var(--u) * 10); }
.race-stage .race-feed .fe { min-width: calc(var(--u) * 463.3); height: calc(var(--u) * 78.1); padding: 0 calc(var(--u) * 26); border-radius: calc(var(--u) * 15.6); justify-content: center;
  background: url("assets/ui/fig/race_pill.8fdd9d36.webp") 0 0 / 100% 100% no-repeat; font: 700 calc(var(--u) * 28.12)/1 var(--font-ui); color: #fff; -webkit-text-stroke: calc(var(--u) * var(--ow, 5.5) * 2.56) var(--oc); paint-order: stroke fill; gap: calc(var(--u) * 12); --ow: 5.2; }
.race-stage .race-feed .fe b { color: #fff; }
.race-stage .race-feed .fe canvas { width: calc(var(--u) * 50) !important; }

/* ---- Race results (src/race/resultview.js; mock 289:634 / 289:1229): mock px on the race stage ---- */
.race-stage .race-result { position: absolute; inset: 0; z-index: 5; background: none; display: block; padding: 0; }
.race-stage .race-result[hidden] { display: none; }
.fres { position: absolute; left: 0; top: 0; width: calc(var(--u) * 1125); height: calc(var(--u) * 2000); --m: calc(var(--u) * 1125 / 1440); color: #fff; overflow: visible;
  animation: fresIn .35s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes fresIn { from { opacity: 0; transform: scale(1.04); } }
/* 5 Nov: the parts build up one by one (resultview.js enter(): --d is each part's delay): the balances, the place stamping
   down from large (the 'stamp' sound lands with it), the sub line, the nest and the winnings, the reward cards left to
   right, the note, the mastery card, the Bond / Shine pill, then the buttons rising from below; ~1.4 s in all */
.fres .fres-in { animation: fresPop .45s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: var(--d, 0ms); }
@keyframes fresPop { from { opacity: 0; transform: scale(.6); } }
.fres .fres-in.fres-drop { animation-name: fresDrop; animation-duration: .4s; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
@keyframes fresDrop { from { opacity: 0; transform: scale(2.2); } 70% { opacity: 1; transform: scale(.94); } }
.fres .fres-in.fres-rise { animation-name: fresRise; }
@keyframes fresRise { from { opacity: 0; transform: translateY(calc(var(--m) * 160)); } }
/* 26 Nov 2026 (dev feedback, 25 Nov, "Result screen"): a win's results in beats (resultview.js runBeats): a part waits unseen
   (.fres-hold) until its beat; the chest pops out of the nest over spinning rays, the coins and pinballs jump out of it,
   the balances pump as they land, the mastery bar grows, confetti falls */
.fres .fres-hold { opacity: 0; pointer-events: none; animation: none; }
.fres .fres-in.fres-chest { animation: fresChest .7s cubic-bezier(.2, 1.6, .4, 1) var(--d, 0ms) both, fresChestBob 1.8s ease-in-out calc(var(--d, 0ms) + .9s) infinite; }
@keyframes fresChest { from { opacity: 0; transform: translateY(calc(var(--m) * 140)) scale(.2) rotate(-14deg); } 60% { opacity: 1; transform: translateY(calc(var(--m) * -18)) scale(1.14) rotate(4deg); } }
@keyframes fresChestBob { 50% { transform: translateY(calc(var(--m) * -8)) rotate(-2deg); } }
.fres .fres-rays { border-radius: 50%; pointer-events: none; background: repeating-conic-gradient(from 0deg, #fff5 0deg 9deg, #fff0 9deg 30deg);
  -webkit-mask: radial-gradient(closest-side, #000 25%, #0000 100%); mask: radial-gradient(closest-side, #000 25%, #0000 100%); animation: fresSpin 10s linear infinite; }
.fres .fres-in.fres-rays { animation: fresRaysIn .5s ease-out var(--d, 0ms) both, fresSpin 10s linear infinite; }
@keyframes fresRaysIn { from { opacity: 0; } }
@keyframes fresSpin { to { transform: rotate(360deg); } }
.fres .fres-in.fres-out { animation: fresOut .55s cubic-bezier(.2, 1.3, .4, 1) var(--d, 0ms) both; }
@keyframes fresOut { from { opacity: 0; transform: translate(var(--fx, 0px), var(--fy, 0px)) scale(.25); } 45% { opacity: 1; } }
.fres .fres-pump { animation: hudPump .25s; }
.fres .fres-fill.grow { transition: width .85s cubic-bezier(.3, .8, .4, 1); }
.fres .fres-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 6; }
.fres .fres-cf { position: absolute; top: -3%; width: calc(var(--m) * 22); height: calc(var(--m) * 34); border-radius: calc(var(--m) * 4);
  animation: fresFall var(--t, 2.6s) cubic-bezier(.3, .2, .6, 1) var(--dl, 0s) both; }
@keyframes fresFall { from { transform: translate(0, 0) rotate(0); } to { transform: translate(var(--dx, 0px), calc(var(--m) * 2700)) rotate(var(--rot, 540deg)); } }
/* spec F1.4 (21 Nov), result_cta race_again: RACE AGAIN is the primary button (a slow pulse once the card has built up),
   CONTINUE the secondary (a little quieter); today's layout has neither class */
.fres .rs-actions .fbtn.cta-hero { animation: ctaPulse 1.3s ease-in-out 1.5s infinite; z-index: 1; }
.fres .rs-actions .fbtn.cta-second { filter: saturate(.7) brightness(.94); }
/* wave 3 (22 Nov 2026, owner item 1): gameover_home on the race result. PLAY AGAIN alone in the middle; HOME is small:
   near the top of the screen (top), a text button under PLAY AGAIN (bottom), or absent in a player's first 3 runs. */
#raceResult[data-home] #raceAgain { left: 0 !important; right: 0; margin-inline: auto; }
#raceResult .rs-home-s { position: absolute; font: 700 var(--f36)/1 var(--font-ui, sans-serif); color: #fff; border: 0; cursor: pointer; touch-action: manipulation; --ow: 5.2; }
#raceResult .rs-home-s[hidden], #raceResult .rs-home-s.none { display: none; }
#raceResult .rs-home-s.top { position: absolute; left: max(10px, env(safe-area-inset-left)); top: max(10px, env(safe-area-inset-top)); z-index: 3; height: calc(var(--m) * 84); min-height: 36px; padding: 0 calc(var(--m) * 34);
  border-radius: calc(var(--m) * 42); background: #0f2a44cc; box-shadow: 0 0 0 calc(var(--m) * 4) #000; }
#raceResult .rs-home-s.bottom { left: 0; right: 0; margin-inline: auto; width: max-content; top: calc(var(--m) * 330); padding: calc(var(--m) * 16) calc(var(--m) * 40); background: none; text-decoration: underline;
  text-underline-offset: calc(var(--m) * 6); -webkit-text-stroke: calc(var(--m) * var(--ow, 5.5) * 2) var(--oc); paint-order: stroke fill; }
#raceResult .rs-home-s:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@keyframes ctaPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .fres .rs-actions .fbtn.cta-hero { animation: none; } }
@media (prefers-reduced-motion: reduce) { .fres .fres-in, .fres .fres-in.fres-chest, .fres .fres-in.fres-out, .fres .fres-rays, .fres .fres-in.fres-rays { animation: none; } }
/* QA 14 (22 Nov 2026): a solo crash's result (resultview.js quick) pops each part in 0.3 s */
.fres.fres-quick .fres-in { animation-duration: .3s; }
.fres-bg { box-shadow: 0 0 0 100vmax #ffbe46; }
.fres button { background-color: transparent; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; }
.fres .fbtn { background: var(--img) 0 0 / 100% 100% no-repeat; }
/* 13 Nov (Siddharth's Figma review #20: "missing the outline"): the mock's two layers (Group 595, 289:1238-1241), one on
   the other: the back one's 10.3 px outside stroke (#0526ca, 82 %) and soft shadow, the white-blue face with its dark
   halo (black 80 %, blur 10.2), the letters 22 px tighter */
.fres-place .fp { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; font: 700 calc(var(--m) * 318)/1 var(--font-ui); letter-spacing: calc(var(--m) * -8); }   /* (the mock's -22 is set on one digit; at -22 the two of "10th" ran together) */
.fres-place .fp b { font-weight: 700; }
.fres-place .fp i { font-style: italic; font-size: calc(var(--m) * 136.4); letter-spacing: calc(var(--m) * -9.55); margin: calc(var(--m) * 25) 0 0 calc(var(--m) * 14); }
.fres-place .fp.edge { color: #2f6fe0; -webkit-text-stroke: calc(var(--m) * 20.6) rgba(5, 38, 202, .82); paint-order: stroke fill; filter: drop-shadow(0 calc(var(--m) * 8.8) calc(var(--m) * 6.4) rgba(0, 0, 0, .5)); }
.fres-place .fp.face { filter: drop-shadow(0 0 calc(var(--m) * 5) rgba(0, 0, 0, .8)); }
.fres-place .fp.face b, .fres-place .fp.face i { background: linear-gradient(0deg, #ffffff 29%, #8fb3f5 50%, #ffffff 70%); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 calc(var(--m) * 14); margin-left: calc(var(--m) * -14); margin-right: calc(var(--m) * -14); }
.fres-subrow { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 12); --fs: 32; --sw: 4.5;  font-size: var(--f32); --ow: 4.5; }
.fres-pipe { display: inline-block; width: calc(var(--m) * 34); height: calc(var(--m) * 44); background: var(--img) 0 0 / 100% 100% no-repeat; -webkit-text-stroke: 0; }
.fres-note { color: #fff; }
.fres-bird canvas { image-rendering: pixelated; }
/* 20 Nov (QA, Rahul: the WATCH AD text ran out of its button on an iPhone). The old results card's short-screen rule
   (arcade.css @media (max-height: 780px) .race-result .rs-actions .btn: font-size clamp(16px, 5vw, 22px)) is more
   specific than this one, so on a phone under 780 px tall the label was 5vw, twice the card's size, and the box
   itself was not absolute (no .fabs). Now: one line in the card's own unit, never wider than its box. */
.fres-rv { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.race-result .fres .fres-rv .btn, .fres-rv .btn { flex: none; min-width: 0; min-height: 0; width: 100%; height: 100%; font-family: var(--font-ui); font-weight: 700; font-size: var(--f36); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 calc(var(--m) * 16); display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 8); --ow: 5.2; }
/* (the old results card's .rs / .rs-actions rules in style.css and arcade.css don't apply to the rebuilt view) */
.race-stage .race-result .rs.fres { width: calc(var(--u) * 1125); height: calc(var(--u) * 2000); max-height: none; padding: 0; margin: 0; background: none; border: 0; border-radius: 0; box-shadow: none;
  display: block; overflow: visible; text-align: left; gap: 0; }
.race-stage .race-result .fres .rs-actions { position: absolute; display: block; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; width: calc(var(--m) * 1440); bottom: auto; flex: none; gap: 0; }
.race-stage .race-result .fres .rs-actions .fbtn { position: absolute; width: auto; }

/* ---- Chest opening (src/chestfx.js; mock 289:1328) ---- */
.chestfx.fchest { position: fixed; inset: 0; z-index: 60; background: #6a2fd0; overflow: hidden; display: block; padding: 0; animation: fcxIn .25s ease-out; }
@keyframes fcxIn { from { opacity: 0; } }
.chestfx.fchest.out { opacity: 0; transition: opacity .2s; }
.fcx-bg { position: absolute; inset: 0; background: var(--img) center / cover no-repeat; }
.fcx-frame { position: absolute; left: var(--colx); width: var(--colw); bottom: var(--sab, 0px); height: calc(var(--m) * 2560); }
.fcx-frame button { background-color: transparent; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; color: #fff; }
.fcx-frame .fbtn { background: var(--img) 0 0 / 100% 100% no-repeat; }
.fcx-open { opacity: 0; transform: scale(.7); transition: opacity .25s, transform .35s cubic-bezier(.2, 1.6, .4, 1); }
.fchest.opened .fcx-open { opacity: 1; transform: none; }
.fchest.opened .fcx-closed { opacity: 0; transform: scale(1.2); transition: opacity .2s, transform .25s; }
.fchest.shake .fcx-closed { animation: fcxShake .56s; }
@keyframes fcxShake { 15% { transform: rotate(-6deg) scale(1.03); } 35% { transform: rotate(6deg) scale(1.06); } 55% { transform: rotate(-5deg) scale(1.08); } 75% { transform: rotate(4deg) scale(1.1); } }
/* 10 Nov: each tier has its own open chest (assets/ui/hd/chest_open_*.webp); the light pouring out of it is drawn here */
.fcx-glow { pointer-events: none; opacity: 0; mix-blend-mode: screen; border-radius: 50%;
  background: radial-gradient(ellipse 50% 50% at 50% 62%, #fff8dce6 0%, #ffe48cb3 22%, #ffc84a4d 45%, #ffb02000 70%); }
.fchest.opened .fcx-glow { opacity: 1; transition: opacity .3s .05s; animation: fcxGlow 1.6s ease-in-out .35s infinite alternate; }
@keyframes fcxGlow { to { opacity: .7; transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .fchest.opened .fcx-glow { animation: none; } }
.fcx-card { animation: fcxCard .35s cubic-bezier(.2, 1.6, .4, 1); }
.fcx-card.still { animation: none; }
@keyframes fcxCard { from { transform: translateY(calc(var(--m) * 380)) scale(.4); opacity: 0; } }
.fcx-skip { --fs: 32; --sw: 4.5;  display: flex; align-items: center; justify-content: center; font-size: var(--f32); opacity: .85; --ow: 4.5; }
.fcx-continue[hidden], .fcx-skip[hidden] { display: none; }

/* ---- the kit on every other screen (Figma UI rebuild): Store, sheets, modals, tutorial, arcade ---- */
:root { --font: var(--font-ui); }   /* one face everywhere (was Lilita One) */
/* buttons: the mock's Base Button, drawn in CSS like the result card's SHARE / PLAY AGAIN / HOME (arcade.css .go-b):
   a gradient, a 3 px black outline, a darker foot and a light top edge. 13 Nov (Basil): every popup uses this one;
   the 9-sliced kit buttons (btn_k_*.webp, Components 3:32) are gone. */
.btn { font-family: var(--font-ui); font-weight: 700; color: #fff; border: 0 !important; border-image: none !important; border-radius: 11px !important;
  --top: #50de06; --bot: #0ec12a; --dk: #038623;
  background: linear-gradient(var(--top), var(--bot)) !important; box-shadow: 0 0 0 3px #000, inset 0 -7px 0 var(--dk), inset 0 4px 0 #fff !important;
  -webkit-text-stroke: calc(var(--m) * var(--ow, 5.5) * 2) var(--oc); paint-order: stroke fill; text-shadow: none; }
.btn.gold { --top: #f9e51a; --bot: #fc9407; --dk: #af3f01; }
.btn.blue, .btn.navy { --top: #5dc2fd; --bot: #2b8ce5; --dk: #0159a4; }
.btn.grey { --top: #b3b3b3; --bot: #939393; --dk: #5e5e5e; }
.btn.danger, .btn.red { --top: #ff7b6e; --bot: #e2362a; --dk: #96180f; }
.btn.sm { border-radius: 9px !important; box-shadow: 0 0 0 3px #000, inset 0 -5px 0 var(--dk), inset 0 3px 0 #fff !important; -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); }
.btn:active:not(:disabled) { transform: translateY(2px); filter: brightness(.93); }
.btn:disabled { filter: grayscale(.65) brightness(.92); }
/* modals: the mock's popup (Frame 14: the blue panel 289:1543 around a light panel 289:1545), the title white on top */
.card { background: none !important; box-shadow: none; border-radius: 0; border-style: solid !important; border-color: transparent !important; border-width: 18px !important;
  border-image: url("assets/ui/fig/pop_panel.ea159202.webp") 40 40 60 40 fill / 14px 14px 20px 14px stretch; }
.card header { background: none !important; border: 0 !important; border-radius: 0; padding: 2px 8px 8px; }
/* 15 Nov: the header's 8px sides drop style.css's 52px room for the ✕ (44px at right 8px), so the title ran under it; the h2 keeps that room, both sides so it stays centred */
.card header h2 { padding: 0 48px; }
/* 30 Nov (dev feedback: "The close button in the popup cuts in 80%"): the ✕ (44 px, centred on the header) stood taller
   than a one-line title's header (~28 px), so the card (overflow, inside its 18 px frame) cut its top off. A header with
   a ✕ is at least as tall as it, the title centred beside it */
.card:not(.chest-card):not(.attack-card) header:has(> .xbtn) { min-height: calc(var(--tap, 44px) + 4px); box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; }
.card h2 { font-family: var(--font-ui); font-weight: 700; color: #fff; -webkit-text-stroke: calc(var(--m) * var(--ow, 5.5) * 2) var(--oc); paint-order: stroke fill; text-shadow: none; letter-spacing: 0; font-size: var(--f56); --ow: 7; }
.card:not(.navy) .body { border-style: solid; border-color: transparent; border-width: 10px; border-image: url("assets/ui/fig/pop_inner.075f0080.webp") 30 fill / 12px stretch; margin: 0 2px 2px; }
.card.navy .body { background: #0b2350eb; border-radius: 14px; margin: 0 2px 2px; }
/* 5 Nov: the chest card, Frames 14 / 15 (289:1538 / 324:463), in mock px (--m): the blue card 850 wide (#01a7f9, a 6 px
   outline, the darker foot), the title, the light panel with the chest, then 750 x 130 rows 30 apart (src/chestui.js).
   How the mock draws its kit (measured on the Figma render, 5 Nov): an inner shadow is cast from the outline's outer edge,
   so the outline hides that much of it (the panel's 30 px foot under a 6 px outline shows 24; a Base Button's 10 px light
   top and 15 px dark foot under its 5 px outline show 5 and 10), and every Base Button layer is turned 180°, so its
   gradient reads bottom to top (the yellow button is yellow on top, orange at the foot). */
.card.chest-card { width: calc(var(--m) * 850); max-width: none; max-height: none; overflow: visible; position: relative; box-sizing: border-box;
  padding: calc(var(--m) * 28) calc(var(--m) * 50) calc(var(--m) * 68); background: #01a7f9 !important; border: 0 !important; border-image: none !important;
  border-radius: calc(var(--m) * 20) !important; box-shadow: 0 0 0 calc(var(--m) * 6) #000, inset 0 calc(var(--m) * -24) 0 #0158bc !important; }
/* 13 Nov (Siddharth's Figma review #22, and the egg card): the header's 27 px gap was lost to a later, equally specific
   rule (.card:not(.navy) > header), so the title sat on the light panel (70 px down, not 100); and the X now sits where
   the file has it today, 20 px over the corner like the attack card's (it was 50 up, 25 out) */
.card.chest-card:not(.navy) > header { position: static !important; padding: 0 !important; margin: 0 0 calc(var(--m) * 27); }
.card.chest-card h2 { padding: 0; font-size: var(--f48); line-height: calc(var(--m) * 45); -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); --ow: 6; }
.card.chest-card .xbtn, .card.attack-card .xbtn { right: calc(var(--m) * -20); top: calc(var(--m) * -20); transform: none; width: calc(var(--m) * 100); height: calc(var(--m) * 100); border: 0; border-radius: calc(var(--m) * 15);
  color: transparent; font-size: 0; filter: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 56.69 56.69'%3E%3Cpath d='M7.55 7.55 41.14 41.14M41.14 7.55 7.55 41.14' stroke='%23000' stroke-width='23.1' stroke-linecap='round'/%3E%3Cpath d='M7.55 7.55 41.14 41.14M41.14 7.55 7.55 41.14' stroke='%23fff' stroke-width='15.1' stroke-linecap='round'/%3E%3C/svg%3E") center / 56.69% no-repeat, linear-gradient(#ff5f5f, #c40000) !important;
  box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -10) 0 #780000, inset 0 calc(var(--m) * 5) 0 #fff !important; }
/* (the X: the mock's Union, two 15 px bars with round ends corner to corner of a 48.69 px square, a 4 px outline) */
.card.chest-card .body, .card.attack-card .body { display: block; padding: 0; margin: 0 !important; border: 0 !important; border-image: none !important; background: none !important; }
/* 5 Nov: the return summary, "Your base was attacked!" (Frame 16, 328:990), in mock px (--m) from the card's top-left: the
   blue card 940 wide (#01a7f9, a 6 px outline, the darker foot) over the swords (405 x 394 at (268, -319)), the X at
   (860, -20), the yellow title in its 539 x 127 box at (201, 25), the SHIELDS USED pill 537 x 100 at (207, 170), then
   838 x 167 rows 20 apart from (51, 310): five show, more scroll. The backdrop is the mock's 60 % black. */
.modal:has(> .card.attack-card), .modal:has(> .card.flappy-card) { background: rgba(0, 0, 0, .6); }
.card.attack-card, .card.flappy-card { width: calc(var(--m) * 940); max-width: none; max-height: none; overflow: visible; position: relative; box-sizing: border-box; isolation: isolate;
  padding: calc(var(--m) * 25) calc(var(--m) * 51) calc(var(--m) * 79); margin-bottom: calc(var(--m) * 90);
  background: none !important; border: 0 !important; border-image: none !important; border-radius: calc(var(--m) * 20) !important; box-shadow: none !important; }
.card.attack-card::before, .card.flappy-card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: #01a7f9; box-shadow: 0 0 0 calc(var(--m) * 6) #000, inset 0 calc(var(--m) * -24) 0 #0259bc; }
.card.attack-card .xbtn { right: calc(var(--m) * -20); top: calc(var(--m) * -20); }
/* 5 Nov: the new Flappy card, "New Flappy unlocked!" (Frame 17, 328:1115): the same blue card, 940 x 930, its parts placed
   in mock px by src/pinball.js showFlappies (title, COLLECTED, the light panel with the name, the Flappy, the rarity pill, CONTINUE) */
.card.flappy-card { height: calc(var(--m) * 930); padding: 0; }
.card.flappy-card.offer { height: calc(var(--m) * 1010); }   /* 20 Nov: room for VIEW BIRDS / LATER under EQUIP & RACE */
.fl-title { color: #fffb0c; }
.fl-panel { border-radius: calc(var(--m) * 20); background: linear-gradient(#fff, #9de4fd); }
.fl-bird, .fl-coin, .flappy-card .fbr-pill { pointer-events: none; }
.fl-bird canvas { image-rendering: pixelated; }
.fl-coin { object-fit: contain; }
.fl-go { padding: 0; border: 0; font: inherit; cursor: pointer; }
/* 20 Nov: the lesson bird's VIEW BIRDS / LATER, text links under EQUIP & RACE */
.fl-link { padding: 0; border: 0; font: inherit; cursor: pointer; background: none; color: #fff; text-decoration: underline; text-underline-offset: calc(var(--m) * 6); }
.card.attack-card:focus { outline: none; }
.card.attack-card header { position: static !important; padding: 0 !important; margin: 0; }
.card.attack-card h2 { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: calc(var(--m) * 539); height: calc(var(--m) * 127); margin: 0 auto; padding: 0;
  color: #fffb0c; font-size: var(--f48); line-height: calc(var(--m) * 64); -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); --ow: 6; }
.ac-swords { position: absolute; z-index: -2; left: calc(var(--m) * 268); top: calc(var(--m) * -319); width: calc(var(--m) * 405); height: calc(var(--m) * 394); pointer-events: none; user-select: none; }
.ac-pill { position: relative; width: calc(var(--m) * 537); height: calc(var(--m) * 100); margin: calc(var(--m) * 18) 0 0 calc(var(--m) * 156); border-radius: calc(var(--m) * 20); background: #006dba; }
.ac-shield { position: absolute; left: calc(var(--m) * 50); top: calc(var(--m) * 10); width: calc(var(--m) * 71); height: calc(var(--m) * 80); }
.ac-used { position: absolute; left: calc(var(--m) * 133); top: calc(var(--m) * 35); width: calc(var(--m) * 342); height: calc(var(--m) * 30); display: flex; align-items: center; justify-content: center; --fs: 40; --sw: 4; }
/* the list: 32 px wider than the rows, so a scrollbar sits in the card's right margin, not on the rows */
.ac-list { display: flex; flex-direction: column; gap: calc(var(--m) * 20); width: calc(var(--m) * 870); max-height: calc(var(--m) * 915); margin-top: calc(var(--m) * 40);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #006dba transparent; }
.ac-row { position: relative; flex: none; width: calc(var(--m) * 838); height: calc(var(--m) * 167); border-radius: calc(var(--m) * 20); background: linear-gradient(#fff, #9de4fd); text-align: left; }
.ac-av { position: absolute; left: calc(var(--m) * 34); top: calc(var(--m) * 34); width: calc(var(--m) * 100); height: calc(var(--m) * 100); border-radius: 50%; overflow: hidden;
  background: #000; box-shadow: 0 0 0 calc(var(--m) * 6) #5ac2e6; }
.ac-av canvas { display: block; width: 100%; height: 100%; }
.ac-t { position: absolute; left: calc(var(--m) * 166); display: flex; align-items: center; }
.ac-name { top: calc(var(--m) * 32); height: calc(var(--m) * 30); --fs: 40; --sw: 4; }
.ac-what { top: calc(var(--m) * 82); height: calc(var(--m) * 18); --fs: 24; --sw: 4; color: #ff7272; }
.ac-row.blocked .ac-what { color: #01a7f9; }
.ac-when { top: calc(var(--m) * 117); height: calc(var(--m) * 18); --fs: 24; color: #006dba; }
.ac-rv { position: absolute; left: calc(var(--m) * 553); top: calc(var(--m) * 36); width: calc(var(--m) * 266); height: calc(var(--m) * 96); padding: 0; border: 0; font: inherit; }
.ac-rvt { position: absolute; left: calc(var(--m) * 19); top: 0; width: calc(var(--m) * 231); height: calc(var(--m) * 88); display: flex; align-items: center; justify-content: center; --fs: 32; --sw: 4; }
.cc-art { height: calc(var(--m) * 460); box-sizing: border-box; padding-top: calc(var(--m) * 60); border-radius: calc(var(--m) * 20); background: linear-gradient(#fff, #9de4fd); }
.cc-art img { display: block; margin: 0 auto; width: calc(var(--m) * 375); height: calc(var(--m) * 341); object-fit: contain; }
.cc-list { display: flex; flex-direction: column; gap: calc(var(--m) * 30); margin-top: calc(var(--m) * 42); }
.cc-row { position: relative; display: block; width: 100%; height: calc(var(--m) * 130); padding: 0; border: 0; border-radius: calc(var(--m) * 15); cursor: pointer;
  font: 700 var(--f40) / 1 var(--font-ui); color: #fff; -webkit-text-stroke: calc(var(--m) * var(--ow, 5.5) * 2) var(--oc); paint-order: stroke fill; --ow: 5.5; }
.cc-row.green { background: linear-gradient(#50de06, #0ec12a); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -10) 0 #038623, inset 0 calc(var(--m) * 5) 0 #fff; }
.cc-row.yellow { background: linear-gradient(#f9e51a, #fc9407); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -10) 0 #af3f01, inset 0 calc(var(--m) * 5) 0 #fff; }
.cc-row:active:not(:disabled) { transform: translateY(calc(var(--m) * 4)); filter: brightness(.93); }
.cc-row:disabled, .cc-row.poor { filter: grayscale(.75) brightness(.92); }
.cc-row:disabled { cursor: default; }
.cc-pill { position: absolute; left: calc(var(--m) * 20); top: calc(var(--m) * 22); width: calc(var(--m) * 280); height: calc(var(--m) * 80); border-radius: calc(var(--m) * 45); background: #12a435; }
.cc-row.yellow .cc-pill { background: #db8325; }
.cc-ico { position: absolute; left: calc(var(--m) * 25); top: calc(var(--m) * 6); width: calc(var(--m) * 66); height: calc(var(--m) * 66); }
.cc-ico.coin { left: calc(var(--m) * 24); top: calc(var(--m) * 5); width: calc(var(--m) * 68); height: calc(var(--m) * 69); }
.cc-ico.ad { top: calc(var(--m) * 13); width: calc(var(--m) * 68); height: calc(var(--m) * 55); }
.cc-val { position: absolute; left: calc(var(--m) * 93); top: calc(var(--m) * 19); width: calc(var(--m) * 152); height: calc(var(--m) * 43); display: grid; place-items: center; font: inherit; }
.cc-lbl { position: absolute; left: calc(var(--m) * 278); top: calc(var(--m) * 21); width: calc(var(--m) * 407); height: calc(var(--m) * 88); display: grid; place-items: center; }
/* 20 Nov (QA): why a waiting chest can't start yet (one timer at a time); a solid band, the game's font, capitals */
.card.chest-card .cc-note { margin: 0; padding: calc(var(--m) * 18) calc(var(--m) * 24); border-radius: calc(var(--m) * 15); background: #0b2350; color: #fff; text-align: center;
  font-family: var(--font-ui); font-weight: 700; font-size: var(--f32); line-height: 1.3; letter-spacing: .02em; --ow: 4.5; }
.cc-row.cc-timer { display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 12); background: #0072bf; cursor: default; }
.cc-timer .cc-ico { position: static; }
.cc-timer b { font: inherit; }
/* sheet titles (Store, Trophy Road, World Map, Daily, Events …): the mock's white outlined titles */
.sheet-head h1 { font-family: var(--font-ui); font-weight: 700; color: #fff; text-shadow: none; -webkit-text-stroke-color: var(--oc); }
/* the tutorial bubble: the kit's light panel with an outline */
.guide-bubble { background: #fff; border: 4px solid #000; border-radius: 18px; box-shadow: 0 6px 0 #0006; }
.gb-step { font-family: var(--font-ui); font-weight: 700; }

/* ---- 5 Nov: the mock's yellow button (Base Button): yellow → orange, a dark foot, a light top edge, a 5 px outline ---- */
.fy-btn { border-radius: calc(var(--m) * 15); background-image: linear-gradient(#f9e51a, #fc9407);
  box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -10) 0 #af3f01, inset 0 calc(var(--m) * 5) 0 #fff; }
.fy-btn:focus-visible { outline: calc(var(--m) * 8) solid #fff; outline-offset: calc(var(--m) * 6); }
button.fy-btn { cursor: pointer; }
button.fy-btn:active:not(:disabled) { filter: brightness(.93); transform: translateY(calc(var(--m) * 3)); }
button.fy-btn:disabled { filter: grayscale(.7) brightness(.92); cursor: default; }

/* ---- 5 Nov: the Store (mock frame 'Store' 324:608) ---- */
.fst-starter, .fst-sec, .fst-card { pointer-events: none; }
.fst-starter > button, .fst-card > button { pointer-events: auto; }
.fst-panel { border-radius: calc(var(--m) * 35);
  background: linear-gradient(rgba(0, 0, 0, .37), rgba(0, 0, 0, 0) 25.6%), linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .2)), var(--img) center / cover no-repeat; }
.fst-once { background: rgba(0, 0, 0, .3); border-radius: calc(var(--m) * 10); }
.fst-item { background: rgba(0, 0, 0, .4); border-radius: calc(var(--m) * 13.57); box-shadow: 0 0 0 calc(var(--m) * 4.8) #000; }
.fst-epic { background: #c248fa; border-radius: calc(var(--m) * 19); box-shadow: 0 0 0 calc(var(--m) * 4) #8108ba; }
.fst-bird { image-rendering: pixelated; }
.fst-art, .fst-frame, .fst-bird { object-fit: contain; }
/* STARTER PACK: Rubik Bold, two layers as in the mock (Group 607): the blue one's outside stroke and
   shadow under the light one */
.fst-title { font: 700 var(--f56)/calc(var(--m) * 118.67) var(--font-ui); letter-spacing: 0;   /* (23 Nov type spec: a title, 56) */
  text-align: center; white-space: nowrap; }
.fst-title > span { position: absolute; inset: 0; color: transparent; -webkit-background-clip: text; background-clip: text; }
.fst-title .a { background-image: linear-gradient(to top, #003dbe 28.8%, #4f8cff 60%, #007bff 69.5%); -webkit-text-stroke: calc(var(--m) * 7 * 2) #0425ca;
  filter: drop-shadow(0 calc(var(--m) * 3.1) calc(var(--m) * 2.25) rgba(0, 0, 0, .5)); }
.fst-title .b { background-image: linear-gradient(to top, #fff 28.8%, #8eb2f5 60%, #fff 69.5%); filter: drop-shadow(0 0 calc(var(--m) * 3.58) rgba(0, 0, 0, .8)); }
.fst-sec { background: #01a7f9; border-radius: calc(var(--m) * 20); box-shadow: 0 0 0 calc(var(--m) * 6) #000, inset 0 calc(var(--m) * -24) 0 #0158bc; }
.fst-card { border-radius: calc(var(--m) * 20); background: linear-gradient(#fff, #9de4fd); }
.fst-head { background: #a3d9ff; border-radius: calc(var(--m) * 10); }
.fst-hrow { display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 12); pointer-events: none; }
.fst-hrow img { width: calc(var(--m) * 60); height: calc(var(--m) * 61); object-fit: contain; }
.fst-note { opacity: .9; }
.fst-starter.focus, .fst-sec.focus { animation: fstFocus .5s ease-out 2; }
@keyframes fstFocus { 40% { transform: scale(1.025); filter: brightness(1.12); } }
@media (prefers-reduced-motion: reduce) { .fst-starter.focus, .fst-sec.focus { animation: none; } }

/* ---- RAID (11 Nov; mock Frames 18–25, 367:473 … 368:1080; src/raid.js) ----
   The stage is the play column, the full height of the screen. Three origins, all in mock px (--m):
   .rd-top hangs from the top, .rd-bot is a frame standing on the bottom, and --iy is the top of the island's
   frame midway between them (the island, the intro, the result card). --u = one island design px. */
.raid-stage { position: absolute; top: 0; overflow: hidden; background: linear-gradient(#2aa9fb 0 50%, #c6e0fc 50% 100%); animation: rdIn .35s cubic-bezier(.2, 1.4, .4, 1); }
.raid-stage[data-world="2"] { background: linear-gradient(#36b3fd 0 50%, #eef5fd 50% 100%); }
.raid-stage[data-world="1"] { background: linear-gradient(#3cbcfc 0 50%, #acd8fa 50% 100%); }
.raid-stage[data-world="3"] { background: linear-gradient(#48affc 0 50%, #9bd1fa 50% 100%); }
.raid-stage[data-world="4"] { background: linear-gradient(#7cb4fd 0 50%, #bdc9fa 50% 100%); }
@keyframes rdIn { from { transform: scale(.9); opacity: 0 } }
@keyframes rdPop { from { scale: .3; opacity: 0 } }
@keyframes rdFade { from { opacity: 0 } }
@keyframes rdSpin { to { rotate: 360deg } }
.raid-stage [hidden] { display: none !important; }
.raid-stage button { font: inherit; touch-action: manipulation; }
.rd-bg { position: absolute; left: 0; width: 100%; top: calc(var(--iy) + var(--m) * -201); height: calc(var(--m) * 2561); background: url("assets/ui/fig/base_bg.be380b5b.webp") 0 0 / 100% 100% no-repeat; }
.raid-stage[data-world="2"] .rd-bg, .raid-stage[data-world="3"] .rd-bg, .raid-stage[data-world="4"] .rd-bg { top: var(--iy); height: calc(var(--m) * 2560); }
.raid-stage[data-world="2"] .rd-bg { background-image: url("assets/base/ny/bg.40d31011.webp"); }
.raid-stage[data-world="1"] .rd-bg { top: var(--iy); height: calc(var(--m) * 2360); background-image: url("assets/base/meadows/bg.1ad74e88.webp"); }
.raid-stage[data-world="1"] .rd-fade { display: none; }
.raid-stage[data-world="3"] .rd-bg { background-image: url("assets/base/birdmore/bg.ccacfffb.webp"); }
.raid-stage[data-world="4"] .rd-bg { background-image: url("assets/base/wildwest/bg.6c97927b.webp"); }
.rd-fade { position: absolute; left: 0; width: 100%; top: calc(var(--iy) + var(--m) * 2095); height: calc(var(--m) * 655); background: linear-gradient(#fdf4ee00, #c6e0fc 41.6%); }
.raid-stage[data-world="2"] .rd-fade, .raid-stage[data-world="3"] .rd-fade, .raid-stage[data-world="4"] .rd-fade { display: none; }
.rd-sky { position: absolute; inset: 0; background: #8fd6fb url("assets/ui/raid/sky.64fd6a94.webp") center / cover no-repeat; transition: opacity .3s; pointer-events: none; }
.raid-stage:not([data-phase="intro"]):not([data-phase="reel"]) .rd-sky { opacity: 0; }

/* top bar: the victim's tile, the world chip, the prompt (the RAID! logo while the cards spin) */
.rd-top { position: absolute; left: 0; top: var(--sat, 0px); width: 100%; height: 0; pointer-events: none; }
.rd-top > * { position: absolute; }
.raid-stage[data-phase="intro"] .rd-top > *, .raid-stage[data-phase="reel"] .rd-top > :not(.rd-logo), .raid-stage:not([data-phase="reel"]) .rd-logo { display: none; }
.rd-logo { left: calc(var(--m) * 392); top: calc(var(--m) * 84); width: calc(var(--m) * 656); height: calc(var(--m) * 218); animation: rdPop .4s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.rd-who { left: calc(var(--m) * 57); top: calc(var(--m) * 52); width: calc(var(--m) * 230); height: calc(var(--m) * 240); border-radius: calc(var(--m) * 20); background: #22305266; }
.rd-who i { position: absolute; left: calc(var(--m) * 25); top: calc(var(--m) * 19); width: calc(var(--m) * 180); height: calc(var(--m) * 180); border-radius: 50%; background: #fff; box-shadow: 0 0 0 calc(var(--m) * 5) #000; }
.rd-who i canvas { display: block; width: 100%; height: 100%; border-radius: 50%; }
.rd-who b { position: absolute; left: calc(var(--m) * -20); right: calc(var(--m) * -20); top: calc(var(--m) * 186); height: calc(var(--m) * 37); display: flex; align-items: center; justify-content: center; --fs: 48; --sw: 5; }
.rd-tag { left: calc(var(--m) * 57); top: calc(var(--m) * 310); width: calc(var(--m) * 230); height: calc(var(--m) * 54); border-radius: calc(var(--m) * 14); background: #e73838; box-shadow: 0 0 0 calc(var(--m) * 5) #000;
  display: grid; place-items: center; --fs: 32; --sw: 4.5;  }
.rd-tag.friend { background: #2f8be6; }
.rd-world { left: calc(var(--m) * 495); top: calc(var(--m) * 64); width: calc(var(--m) * 449); height: calc(var(--m) * 72); box-sizing: border-box; padding-bottom: calc(var(--m) * 6); border-radius: calc(var(--m) * 10);
  background: linear-gradient(#5dc3fd, #2182e1); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -10) 0 #0159a4; display: grid; place-items: center; --fs: 32; --sw: 4; }
.rd-prompt { left: calc(var(--m) * 343); top: calc(var(--m) * 189); width: calc(var(--m) * 737); height: calc(var(--m) * 173); display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fffb0c; white-space: normal; line-height: calc(var(--m) * 63.8); --fs: 48; --sw: 6; }
.raid-stage[data-phase="attack"] .rd-prompt { animation: rdPop .3s cubic-bezier(.2, 1.8, .4, 1); }
.raid-stage[data-phase="result"] .rd-prompt { display: none; }
/* the coin pill stays lit over the result's dim layer, as in the mock */
.rd-coins { position: absolute; z-index: 9; left: calc(var(--m) * 1026); top: calc(var(--sat, 0px) + var(--m) * 52); width: calc(var(--m) * 370); height: calc(var(--m) * 90); border-radius: calc(var(--m) * 45); background: #22305280; pointer-events: none; }
.raid-stage[data-phase="intro"] .rd-coins, .raid-stage[data-phase="reel"] .rd-coins { display: none; }
.rd-coins > * { position: absolute; }
.rd-coins .coin { left: calc(var(--m) * 4); top: calc(var(--m) * 4); width: calc(var(--m) * 79); height: calc(var(--m) * 80); }
.rd-coins span { left: calc(var(--m) * 84); top: 0; width: calc(var(--m) * 200); height: 100%; display: flex; align-items: center; justify-content: center; --fs: 40; --sw: 4; font-variant-numeric: tabular-nums; }
.rd-coins .plus { left: calc(var(--m) * 302); top: calc(var(--m) * 22); width: calc(var(--m) * 44); height: calc(var(--m) * 44); }
.rd-coins.pump { animation: hudPump .25s; }

/* bottom frame: ATTACK <BUILDING>!, the reward bar, the hidden Flappy */
.rd-bot { position: absolute; left: 0; bottom: var(--sab, 0px); width: 100%; height: calc(var(--m) * 2560); pointer-events: none; }
.rd-bot > * { position: absolute; pointer-events: auto; }
.raid-stage:not([data-phase="aim"]) .rd-bot { display: none; }
.rd-btn { border: 0; padding: 0; margin: 0; cursor: pointer; border-radius: calc(var(--m) * 15); background: linear-gradient(#f9e51a, #fc9407);
  box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -10) 0 #af3f01, inset 0 calc(var(--m) * 5) 0 #fff; transition: transform .06s, filter .06s; }
.rd-btn:active:not(:disabled) { transform: translateY(calc(var(--m) * 4)); filter: brightness(.92); }
.rd-btn:focus-visible { outline: calc(var(--m) * 8) solid #fff; outline-offset: calc(var(--m) * 6); }
.rd-btn b { display: flex; align-items: center; justify-content: center; --fs: 40; --sw: 5; }
.rd-attack { left: calc(var(--m) * 329); top: calc(var(--m) * 1894); width: calc(var(--m) * 780); height: calc(var(--m) * 150); }
.rd-attack img { position: absolute; left: calc(var(--m) * 17); top: calc(var(--m) * -22); width: calc(var(--m) * 155); height: calc(var(--m) * 145); filter: drop-shadow(0 calc(var(--m) * 5) calc(var(--m) * 3) #0006); pointer-events: none; }
.rd-attack b { position: absolute; left: calc(var(--m) * 142); top: calc(var(--m) * 29); width: calc(var(--m) * 595); height: calc(var(--m) * 88); }
.rd-attack.pop { animation: pop .3s cubic-bezier(.2, 1.6, .4, 1); }
.rd-reward { left: calc(var(--m) * 329); top: calc(var(--m) * 2088); width: calc(var(--m) * 780); height: calc(var(--m) * 124); border-radius: calc(var(--m) * 20); background: #22305266; display: flex; align-items: center; justify-content: center; }
.rd-reward b { --fs: 32; --sw: 4; }
.rd-reward b.amt { --fs: 40; font-variant-numeric: tabular-nums; }
.rd-reward img { width: calc(var(--m) * 79); height: calc(var(--m) * 80); margin: 0 calc(var(--m) * 8) 0 calc(var(--m) * 41); }
.rd-reward em { font-style: normal; box-sizing: border-box; min-width: calc(var(--m) * 90); height: calc(var(--m) * 61); padding: 0 calc(var(--m) * 14); margin-left: calc(var(--m) * 20); border-radius: calc(var(--m) * 20);
  background: #ba3cfd; box-shadow: 0 0 0 calc(var(--m) * 4) #000; display: grid; place-items: center; --fs: 40; --sw: 4; }
.rd-pet { left: calc(var(--m) * 221); top: calc(var(--m) * 2218); width: calc(var(--m) * 980); height: calc(var(--m) * 210); border-radius: calc(var(--m) * 20); background: linear-gradient(#fff, #9de4fd); box-shadow: 0 0 0 calc(var(--m) * 6) #000;
  animation: rdPop .35s cubic-bezier(.2, 1.5, .4, 1) .15s backwards; }
.rd-bird { position: absolute; left: calc(var(--m) * 60); top: calc(var(--m) * 20); width: calc(var(--m) * 165); height: calc(var(--m) * 113); }
.rd-bird canvas { image-rendering: pixelated; }
.rd-rar { position: absolute; left: calc(var(--m) * 58); top: calc(var(--m) * 149); width: calc(var(--m) * 170); height: calc(var(--m) * 38); border-radius: calc(var(--m) * 19); font-style: normal; text-transform: uppercase;
  background: #c249fb; box-shadow: 0 0 0 calc(var(--m) * 4) #8109ba; display: grid; place-items: center; --fs: 24; --sw: 3; }
.rd-rar[data-r="1"] { background: #d2d2d2; box-shadow: 0 0 0 calc(var(--m) * 4) #7f7f7f; }
.rd-rar[data-r="2"] { background: #498afb; box-shadow: 0 0 0 calc(var(--m) * 4) #0a53d2; }
.rd-pet p { position: absolute; margin: 0; left: calc(var(--m) * 301); top: calc(var(--m) * 56); width: calc(var(--m) * 625); height: calc(var(--m) * 101); display: flex; align-items: center; text-align: left;
  white-space: normal; text-transform: uppercase; line-height: calc(var(--m) * 48); --fs: 32; --sw: 5; }

.raid-skip { position: absolute; inset: 0; z-index: 6; background: transparent; border: 0; cursor: pointer; display: flex; align-items: flex-end; justify-content: center;
  padding: 0 0 calc(var(--sab, 0px) + var(--m) * 260); color: #fff; opacity: .85; --fs: 32; --sw: 4; }
.raid-stage[data-phase="intro"] .raid-skip { color: transparent; -webkit-text-stroke-color: transparent; }

/* the result card (Frames 23–25): 850 x 1120 at (295, 633) of the island's frame */
.rd-dim { position: absolute; inset: 0; z-index: 7; background: #000000b3; animation: rdFade .25s backwards; }
.rd-rrays { position: absolute; z-index: 7; left: calc(var(--m) * 295); top: calc(var(--iy) + var(--m) * 237); width: calc(var(--m) * 850); height: calc(var(--m) * 850); max-width: none; opacity: .4; animation: rdSpin 16s linear infinite, rdFade .4s backwards; pointer-events: none; }
.raid-result { position: absolute; z-index: 8; left: calc(var(--m) * 295); top: calc(var(--iy) + var(--m) * 633); width: calc(var(--m) * 850); box-sizing: border-box; padding: calc(var(--m) * 83) calc(var(--m) * 50) calc(var(--m) * 68);
  border-radius: calc(var(--m) * 20); background: #01a7f9; box-shadow: 0 0 0 calc(var(--m) * 6) #000, inset 0 calc(var(--m) * -24) 0 #0259bc; display: flex; flex-direction: column; align-items: center;
  animation: rdPop .35s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.rd-ico { position: absolute; left: calc(var(--m) * 279); top: calc(var(--m) * -204); width: calc(var(--m) * 307); height: calc(var(--m) * 287); max-width: none; filter: drop-shadow(0 calc(var(--m) * 10) calc(var(--m) * 5) #0006);
  animation: rdPop .45s cubic-bezier(.2, 1.8, .4, 1) .15s backwards; pointer-events: none; }
.raid-result.blocked .rd-ico { left: calc(var(--m) * 314); top: calc(var(--m) * -165); width: calc(var(--m) * 222); height: calc(var(--m) * 250); filter: none; }
.raid-result h3 { margin: 0; height: calc(var(--m) * 117); display: flex; align-items: center; color: #fffb0c; --fs: 56; --sw: 7;  }
.rd-sub { margin: calc(var(--m) * 11) 0 0; height: calc(var(--m) * 86); box-sizing: border-box; padding-top: calc(var(--m) * 15); display: flex; align-items: center; --fs: 32; --sw: 5; }
.rd-amt { width: calc(var(--m) * 750); height: calc(var(--m) * 147); border-radius: calc(var(--m) * 20); background: #006dba; display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 13);
  --fs: 56; --sw: 7;  font-variant-numeric: tabular-nums; }
.rd-amt img { width: calc(var(--m) * 91); height: calc(var(--m) * 92); }
.rd-loot { position: relative; width: calc(var(--m) * 750); height: calc(var(--m) * 360); margin-top: calc(var(--m) * 61); border-radius: calc(var(--m) * 20); background: linear-gradient(#fff, #9de4fd); }
.rd-loot .rd-bird { left: calc(var(--m) * 293); top: calc(var(--m) * 36); }
.rd-loot .rd-rar { left: calc(var(--m) * 291); top: calc(var(--m) * 165); }
.rd-loot.miss .rd-bird, .rd-loot.miss .rd-rar { opacity: .18; }
.rd-loot p { position: absolute; margin: 0; left: calc(var(--m) * 63); top: calc(var(--m) * 205); width: calc(var(--m) * 625); height: calc(var(--m) * 143); display: flex; align-items: center; justify-content: center; text-align: center;
  white-space: normal; text-transform: uppercase; line-height: calc(var(--m) * 48); --fs: 32; --sw: 5; }
.rd-ok { width: calc(var(--m) * 750); height: calc(var(--m) * 130); margin-top: calc(var(--m) * 57); display: grid; place-items: center; }

/* ---- DAILY LOGIN REWARDS + DAILY MISSIONS (26 Nov 2026, Basil: the "Font Adjustments" frames "Daily Login" and
   "Daily Missions"; src/dailypop.js) ----
   Popups over an 80 % black layer (the Rules board). --u = CSS px per mock px. The login notebook shrinks to fit the
   screen; the missions keep the column's unit and the layer scrolls (the care strip sits a little below the fold, as
   in the mock). Every box is in the popup's mock px (--x --y --w --h). */
.dp-layer { position: fixed; inset: 0; z-index: 85; background: #000000cc; display: flex; overflow-y: auto; overscroll-behavior: contain;
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); box-sizing: border-box; }
.dp-stack { --u: min(var(--m, calc(100vw / 1440)), calc((var(--vvh, 100vh) - 24px - var(--m, 0px) * 240 - var(--sab, 0px)) / var(--ph)), calc((100vw - 16px) / var(--pw)));
  flex: none; margin: auto; display: flex; flex-direction: column; align-items: center; }
.dp-layer.missions .dp-stack { --u: min(var(--m, calc(100vw / 1440)), calc((100vw - 16px) / var(--pw))); margin: calc(var(--u) * 20) auto auto; }
.dp-panel { position: relative; flex: none; width: calc(var(--u) * var(--pw)); height: calc(var(--u) * var(--ph)); animation: dpIn .3s cubic-bezier(.2, 1.3, .4, 1) both; }
.dp-panel.missions.nocare { height: calc(var(--u) * 1130); }
.dp-panel.still { animation: none; }
@keyframes dpIn { from { transform: scale(.86); opacity: 0 } }
.dp-ab { position: absolute; box-sizing: border-box; margin: 0; left: calc(var(--u) * var(--x)); top: calc(var(--u) * var(--y)); width: calc(var(--u) * var(--w)); height: calc(var(--u) * var(--h)); }
.dp-panel img.dp-ab { object-fit: contain; pointer-events: none; }
.dp-t { display: flex; align-items: center; justify-content: center; margin: 0; font: 700 calc(var(--u) * var(--fs, 40))/1 var(--font-ui); color: #fff; letter-spacing: 0; white-space: nowrap;
  -webkit-text-stroke: calc(var(--u) * var(--sw, 4) * 2) var(--oc); paint-order: stroke fill; font-variant-numeric: tabular-nums; text-transform: uppercase; }
/* titles: 56, yellow #FFFB0C, the blue outline (also on the notebook); the line under them 36 */
.dp-title { color: #fffb0c; --oc: var(--oc-blue); }
.dp-sub, .dp-rt, .dp-bart { --oc: var(--oc-blue); }
.dp-amt { --oc: #363c53; }
.dp-rt { justify-content: flex-start; text-align: left; }

/* the blue panels (#01A7F5, a 6 px outline, the dark foot) */
.dp-blue { border-radius: calc(var(--u) * 20); background: #01a7f5; box-shadow: 0 0 0 calc(var(--u) * 6) #000, inset 0 calc(var(--u) * -30) 0 #0259bc; }
/* ---- login: the cards on the notebook (beige; today green with rays; claimed faded under a red CLAIMED stamp) */
.dp-day { border-radius: calc(var(--u) * 20); background: #f4debd; box-shadow: inset 0 0 0 calc(var(--u) * 5) #edb98b; --oc: var(--oc-brown); }
.dp-day .dp-head { border-radius: calc(var(--u) * 10); background: #f1ceae; }
.dp-day.today { background: #bae7b0; box-shadow: inset 0 0 0 calc(var(--u) * 5) #4bbe31; cursor: pointer; --oc: var(--oc-green); }
.dp-day.today .dp-head { background: #7bd067; }
.dp-day .dp-rays { opacity: 1; border-radius: calc(var(--u) * 16); }
.dp-day .dp-amt { --oc: #363c53; }
.dp-day.got .dp-rw, .dp-day.got .dp-amt { opacity: .2; }
.dp-stamp { z-index: 1; }
.dp-day7 { border-radius: calc(var(--u) * 20); }
.dp-day7 > img.dp-ab { pointer-events: none; }
.dp-day7.got > img:first-child { opacity: .45; }
.dp-day7.today { cursor: pointer; box-shadow: 0 0 0 calc(var(--u) * 8) #7bd067, 0 0 calc(var(--u) * 40) #b6ff9a; }
/* ---- missions: rows white → sky with a sky tile; care rows the same without the tile */
.dp-mis, .dp-crow { border-radius: calc(var(--u) * 20); background: linear-gradient(#fff, #9de4fd); }
.dp-tile { border-radius: calc(var(--u) * 10); background: #a5defa; }
.dp-mis.got .dp-rw, .dp-mis.got .dp-amt { opacity: .4; }
/* the progress: a black track (5 px outline), the blue fill, the count over it */
.dp-bar { border-radius: calc(var(--u) * 30); background: #000; box-shadow: 0 0 0 calc(var(--u) * 5) #000; overflow: hidden; }
.dp-bar i { display: block; height: 100%; border-radius: calc(var(--u) * 30) calc(var(--u) * 15) calc(var(--u) * 15) calc(var(--u) * 30); background: linear-gradient(#5abffb, #2788e4); }
/* the mock's buttons: a black outline, the white top edge (Rules board), a dark foot */
.dp-btn { display: flex; align-items: center; justify-content: center; padding: 0; border: 0; cursor: pointer; touch-action: manipulation; font: inherit;
  border-radius: calc(var(--u) * 15); box-shadow: 0 0 0 calc(var(--u) * 5) #000, inset 0 calc(var(--u) * -15) 0 var(--dk), inset 0 calc(var(--u) * 10) 0 #fff;
  transition: transform .06s, filter .06s; }
.dp-btn > .dp-t { left: 0; top: 0; }
.dp-btn:active:not(:disabled) { transform: translateY(calc(var(--u) * 4)); filter: brightness(.92); }
.dp-btn:disabled { cursor: default; }
.dp-btn:focus-visible { outline: calc(var(--u) * 8) solid #fff; outline-offset: calc(var(--u) * 4); }
.dp-btn.green { background: linear-gradient(#50de06, #0ec12a); --dk: #038623; --oc: var(--oc-green); }
.dp-btn.blue { background: linear-gradient(#5ac0fb, #2687e3); --dk: #1561b4; --oc: var(--oc-blue); }
.dp-btn.grey { background: linear-gradient(#bdbdbd, #959595); --dk: #595959; --oc: var(--oc-grey); }
/* a care row's end: the green tick, or the round arrow */
.dp-tick { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(#50de06, #0ec12a);
  box-shadow: 0 0 0 calc(var(--u) * 6) #000, inset 0 calc(var(--u) * -10) 0 #038623, inset 0 calc(var(--u) * 8) 0 #fff; }
.dp-tick svg { width: 54%; height: 54%; overflow: visible; margin-top: -6%; }
.dp-tick path { fill: none; stroke: #fff; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 2px #005114); }
.dp-go { border: 0; padding: 0; cursor: pointer; border-radius: 50%; background: linear-gradient(#e8f4ff, #9ad2ff); box-shadow: 0 0 0 calc(var(--u) * 6) #000, inset 0 calc(var(--u) * 14) 0 #fff; }
.dp-go:active { transform: translateY(calc(var(--u) * 4)); }
/* the strips under the panels: purple #A545FF, a 6 px outline, the dark foot; the reward tile, then the n dots */
.dp-strip { border-radius: calc(var(--u) * 20); background: #a545ff; box-shadow: 0 0 0 calc(var(--u) * 6) #000, inset 0 calc(var(--u) * -30) 0 #561097; --oc: var(--oc-purple); }
.dp-strip .dp-tile { background: #7926c7; }
.dp-strip .dp-amt { --oc: #363c53; }
.dp-strip.got .dp-rw, .dp-strip.got .dp-amt { opacity: .4; }
.dp-dots { border-radius: calc(var(--u) * 15); background: #7926c7; box-shadow: 0 0 0 calc(var(--u) * 5) #000; }
.dp-dot { border-radius: 50%; background: #000; }
.dp-dot.on { background: radial-gradient(circle at 40% 35%, #ffe066, #fca400 70%); box-shadow: 0 0 0 calc(var(--u) * 3) #000; }
/* the close bar at the foot of the screen, as in the mock (the Birds area's .bb-bar: 1300 x 216 at (70, 2344), the
   round button 112 at (664, 2376)); the popup above it keeps clear of it */
.dp-layer { padding-bottom: calc(var(--m) * 240 + var(--sab, 0px)); }
.dp-closebar { position: fixed; z-index: 2; left: calc(var(--colx, 0px) + var(--m) * 70); bottom: 0; width: calc(var(--m) * 1300); height: calc(var(--m) * 216 + var(--sab, 0px));
  background: #72c6ff; border-radius: calc(var(--m) * 20) calc(var(--m) * 20) 0 0; box-shadow: 0 0 0 calc(var(--m) * 6) #000; }
.dp-closebar > i { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--m) * 200); box-sizing: border-box; border-radius: calc(var(--m) * 20);
  background: linear-gradient(#fff, #9de4fd); border: solid #72c6ff; border-width: 0 calc(var(--m) * 4) calc(var(--m) * 4); }
.dp-closebar .dp-x { left: calc(var(--m) * 594); top: calc(var(--m) * 32); width: calc(var(--m) * 112); height: calc(var(--m) * 112); border: 0; padding: 0; }
.dp-x svg { width: 62%; height: 62%; overflow: visible; }
body:has(.dp-layer) .perch { display: none; }   /* (the Home alert pill waits under a daily popup, src/perch.js) */
@media (prefers-reduced-motion: reduce) { .dp-panel { animation: none; } }


/* ---- 12 Nov (QA): popup cards ---- */
/* a scrolling card's title stays on top (arcade.css): it had no face, so the text under it showed through
   (REWARDS & ODDS). The title bar carries the card's blue. */
.card:not(.navy) > header { background: #01a7f9 !important; margin: -2px -2px 0; }
/* two buttons side by side (EDIT PROFILE's CHANGE BIRD, the checkout's REOPEN CHECKOUT): long labels ran out of
   their button. Less side padding, a size that fits two lines, text centred in the face. */
.card .g-row > .btn.grow { padding: 10px 8px 14px; font-size: var(--f48); line-height: 1.08; white-space: normal; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; min-height: 58px; -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); --ow: 6; }
.card .g-row { align-items: stretch; }
/* Rewards & Odds: a long pocket name sat under its % pill, and the coin in the note had no size */
.odds-card .br-row { grid-template-columns: 34px minmax(64px, 1fr) auto minmax(0, auto); gap: 6px; }
.odds-card .br-row b { line-height: 1.05; }
.odds-card .br-row span { white-space: normal; flex-wrap: wrap; justify-content: flex-end; font-size: var(--f40); --ow: 5.5; }
/* the bird card's three buttons (EQUIPPED · ★ MASTERY · CUSTOMISE): each label on one line inside its face
   (the star stuck out above MASTERY and CUSTOMISE touched the edge) */
.card.navy .bd-acts { gap: 6px; }
.card.navy .bd-acts .btn.slim.grow { padding: 8px 4px 12px; font-size: var(--f40); white-space: nowrap; min-height: 46px; -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); gap: 3px; letter-spacing: 0; --ow: 5.5; }
.odds-card p.note img, .card p.note img { width: 16px; height: 16px; vertical-align: -3px; }

/* ---- Trophy Tree (13 Nov, src/trophytree.js): Figma frames "Trophy Tree", "Unlocked", "Locked", in mock px ---- */
#s-trophyroad.tt-screen { background: #26abfe; --tm: var(--m); }
#s-trophyroad.tt-screen::after { display: none; }
#s-trophyroad :is(b, i, div, button) { letter-spacing: 0; }
/* 13 Nov (phone: "cannot scroll in trophy road"): pan-y as every other phone list (.sheet-body, .fbr-scroll) */
.tt-scroll { position: absolute; inset: 0; overflow: hidden auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: none; }
.tt-scroll::-webkit-scrollbar { display: none; }
.tt-col { position: relative; margin-left: var(--colx); width: var(--colw); overflow: hidden; }
.tt-col img, .tt-pop img, .tt-back img { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.tt-trunk { background: var(--img) 0 0 / calc(var(--m) * 300) calc(var(--m) * 900) repeat-y; }
/* the mock's strokes sit outside their boxes */
.tt-groove { background: #4b3025; box-shadow: 0 0 0 calc(var(--m) * 4) #000; }
.tt-fill { background: linear-gradient(90deg, #168800, #35d215 30%, #35d215 70%, #168800); box-shadow: 0 0 0 calc(var(--m) * 4) #000; }
.tt-flip { transform: scaleX(-1); }
.tt-pill { position: absolute; border-radius: calc(var(--m) * 15); background: linear-gradient(#feffff, #a1e5fe);
  box-shadow: inset 0 calc(var(--m) * -10) 0 #72c6ff, inset 0 calc(var(--m) * 10) 0 #fff, 0 0 0 calc(var(--m) * 5) #000; }
.tt-slot { border-radius: calc(var(--m) * 8); background: #000; box-shadow: 0 0 0 calc(var(--m) * 4) #000; }
.tt-card { position: absolute; border-radius: calc(var(--m) * 20); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background: #ffd400; box-shadow: inset 0 calc(var(--m) * -30) 0 #d88d37, 0 0 0 calc(var(--m) * 6) #000; transition: transform .08s; }
.tt-card.off { background: #a9a9a9; box-shadow: inset 0 calc(var(--m) * -30) 0 #646464, 0 0 0 calc(var(--m) * 6) #000; }
.tt-col .tt-card:active { transform: scale(.96); }
.tt-card:focus-visible { outline: calc(var(--m) * 8) solid #fff; outline-offset: calc(var(--m) * 8); }
.tt-well { border-radius: calc(var(--m) * 20); background: #e9a620; }
.tt-card.off .tt-well { background: #828282; }
.tt-art { object-fit: contain; pointer-events: none; }
.tt-back { border-radius: calc(var(--m) * 20); background: linear-gradient(#5dc2fd, #2b8ce5) !important; border: 0; padding: 0; cursor: pointer;
  box-shadow: inset 0 calc(var(--m) * -30) 0 #0159a4, inset 0 calc(var(--m) * 14) 0 #fff, 0 0 0 calc(var(--m) * 6) #000; transition: transform .06s, filter .06s; }
.tt-back:active { transform: translateY(calc(var(--m) * 4)); filter: brightness(.92); }
.tt-front { z-index: 4; }
/* 30 Nov (dev feedback: "when a tab is tapped upon in trophy road, we can increase opacity of BG to make the text stand
   out"): the tree behind a card's popup is dimmed to 92 % (it was 80 %, and the pills and cards behind read through) */
.tt-dim { position: absolute; inset: 0; z-index: 2; background: #000000eb; animation: ttFade .18s ease-out; }
/* 30 Nov (dev feedback: "Trophy road needs a title on top"): TROPHY ROAD on the world banner, fixed over the tree */
.tt-head { position: absolute; z-index: 1; left: var(--colx, 0px); width: var(--colw, 100%); top: calc(var(--sat, 0px) + var(--m) * 24); height: calc(var(--m) * 116); pointer-events: none; }
.tt-hbox { background: url("assets/ui/fig/wb_banner.691e1310.webp") 0 0 / 100% 100% no-repeat; filter: drop-shadow(0 calc(var(--m) * 6) 0 #0005); }
.tt-htxt { display: flex; align-items: center; justify-content: center; color: #fffb0c; --oc: var(--oc-blue); white-space: nowrap; }
.tt-bird { pointer-events: none; }
.tt-dim[hidden], .tt-pop[hidden] { display: none; }
.tt-pop { z-index: 3; top: 50%; margin-top: calc(var(--m) * -1280); pointer-events: auto; cursor: pointer; }
.tt-pop .tt-big > * { cursor: inherit; animation: ttPop .28s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.tt-pop .tt-rays { opacity: .4; animation: ttFade .4s ease-out backwards, ttSpin 40s linear infinite; }
.tt-pop .tt-title { color: #fffb0c; animation: ttPop .32s cubic-bezier(.2, 1.6, .4, 1) .05s backwards; }
.tt-pop .tt-desc { white-space: normal; line-height: 1.33; animation: ttFade .3s ease-out .1s backwards; }
.tt-pop .tt-desc.tt-list { white-space: pre-line; line-height: 1.4; }   /* 22 Nov 2026: a step's popup, a line for each thing it gives */
/* 13 Nov: the unlock story (src/trophytree.js celebrate): a new card flips to gold on the tree with a burst of light,
   then its UNLOCKED! comes in bigger: the rays flash, the card rises and turns, the title drops in and settles */
.tt-col .tt-card.burst { z-index: 1; animation: ttFlip .55s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.tt-col .tt-card.burst::after { content: ''; position: absolute; inset: calc(var(--m) * -60); border-radius: 50%; pointer-events: none;
  background: radial-gradient(#fff7b0, #ffd23a99 35%, #ffd23a00 70%); animation: ttGlow .9s ease-out forwards; }
.tt-pop.auto .tt-rays { animation: ttFlash .6s ease-out backwards, ttSpin 40s linear infinite; }
.tt-pop.auto .tt-big > * { animation: ttRise .6s cubic-bezier(.2, 1.4, .4, 1) .1s backwards; }
.tt-pop.auto .tt-title { animation: ttDrop .5s cubic-bezier(.3, 1.8, .5, 1) .35s backwards; }
.tt-pop.auto .tt-desc { animation: ttFade .35s ease-out .6s backwards; }
@keyframes ttFlip { 0% { transform: rotateY(90deg) scale(.8); filter: brightness(2); } 60% { transform: rotateY(-12deg) scale(1.12); } 100% { transform: none; } }
@keyframes ttGlow { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes ttFlash { 0% { opacity: 0; scale: .3; } 40% { opacity: 1; scale: 1.15; } 100% { opacity: .4; scale: 1; } }
@keyframes ttRise { 0% { transform: translateY(calc(var(--tm) * 500)) scale(.3) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes ttDrop { 0% { transform: translateY(calc(var(--tm) * -400)) scale(1.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tt-col .tt-card.burst, .tt-col .tt-card.burst::after, .tt-pop.auto .tt-big > *, .tt-pop.auto .tt-title, .tt-pop.auto .tt-rays { animation: none; } }
.tt-need { display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 6); animation: ttFade .25s ease-out backwards; }
.tt-need b { --fs: 48; --sw: 6; }
.tt-need img { width: calc(var(--m) * 64); height: calc(var(--m) * 56); margin: 0 calc(var(--m) * 4); }
@keyframes ttFade { from { opacity: 0; } }
@keyframes ttPop { from { opacity: 0; transform: scale(.7); } }
@keyframes ttSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tt-pop .tt-rays { animation: none; } }

/* 13 Nov (GDD v1.3 §3.4): a Survival race has no pause. Its top-left button is LEAVE (the two bars cross into an X),
   a crash offers CLAIM REWARDS or SPECTATE, and spectating shows the followed bird's name and two buttons. */
.race-stage .race-pause.leave::before, .race-stage .race-pause.leave::after { left: calc(var(--u) * 38.4); }
.race-stage .race-pause.leave::before { transform: rotate(45deg); }
.race-stage .race-pause.leave::after { transform: rotate(-45deg); box-shadow: none; }
.race-stage .race-spec { position: absolute; left: 0; right: 0; bottom: calc(var(--u) * 150); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 22); pointer-events: none; color: #fff; text-align: center; font: 700 calc(var(--u) * 43.75)/1 var(--font-ui); --ow: 7; }
.race-stage .race-spec[hidden] { display: none; }
.race-stage .race-spec > div { display: flex; gap: calc(var(--u) * 20); pointer-events: auto; }

/* ==== 13 Nov: the Birds area (mock frames "Birds", "Frame 28–30") ==== */
/* its bottom bar (chrome.js): FLAPPYDEX / NESTS / MARKET on a black panel, the close bar under it. Origin = mock (0, 2154). */
.fc-birdbar { position: absolute; z-index: 9; left: var(--colx); width: var(--colw); bottom: var(--sab, 0px); height: calc(var(--m) * 406); pointer-events: none; }
.fc-birdbar[hidden], .fc-birdbar [hidden] { display: none !important; }
.fc-birdbar > * { pointer-events: auto; }
.fc-birdbar button { border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; touch-action: manipulation; }
.bb-panel { background: #000; border-radius: calc(var(--m) * 20); box-shadow: 0 0 0 calc(var(--m) * 6) #000; }   /* (the same 6 px outline as the panels above and the bar below, so the three line up) */
.bb-tab { border-radius: calc(var(--m) * 15); background: #a6a6a6; box-shadow: 0 0 0 calc(var(--m) * 5) #000; transition: transform .06s, filter .06s; }
.bb-tab:active { transform: translateY(calc(var(--m) * 4)); filter: brightness(.92); }
.bb-tab.on { background: linear-gradient(#5dc2fd, #2b8ce5); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 #0159a4, inset 0 calc(var(--m) * 10) 0 #fff; }
/* 15 Nov (Roby): grey NESTS / MARKET read as disabled. FLAPPYDEX is the area's tab (blue when lit, a dimmer blue tab
   otherwise); NESTS is a green button and MARKET a purple one, always coloured, lit with a gold ring when you are on them */
.bb-tab[data-id="dex"]:not(.on) { background: linear-gradient(#3f8fc9, #2a6ea8); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -12) 0 #1b4f80; }
.bb-tab[data-id="nests"] { background: linear-gradient(#50de06, #0ec12a); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 #038623, inset 0 calc(var(--m) * 10) 0 #fff; }
.bb-tab[data-id="market"] { background: linear-gradient(#c77bff, #9a3cf0); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 #561097, inset 0 calc(var(--m) * 10) 0 #fff; }
.bb-tab[data-id="nests"].on, .bb-tab[data-id="market"].on { outline: calc(var(--m) * 8) solid #ffd23a; outline-offset: calc(var(--m) * 4); }
/* 30 Nov (dev feedback: "the yellow outline is not present on flappydex, the default selected tab. Instead there is a white
   section bleeding on top"): FLAPPYDEX lit takes the same gold ring as NESTS / MARKET, and every tab's top edge is a soft
   6 px light (it was a solid 10 px white band that ran round the rounded corners) */
.bb-tab[data-id="dex"].on { outline: calc(var(--m) * 8) solid #ffd23a; outline-offset: calc(var(--m) * 4); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 #0159a4, inset 0 calc(var(--m) * 6) 0 #ffffff80; }
.bb-tab[data-id="nests"] { box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 #038623, inset 0 calc(var(--m) * 6) 0 #ffffff80; }
.bb-tab[data-id="market"] { box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 #561097, inset 0 calc(var(--m) * 6) 0 #ffffff80; }
.bb-tab .bb-badge { left: auto !important; right: calc(var(--m) * -14); top: calc(var(--m) * -18) !important; width: auto !important; min-width: calc(var(--m) * 52); padding: 0 calc(var(--m) * 9); }
.bb-tab:focus-visible { outline: calc(var(--m) * 8) solid #fff; outline-offset: calc(var(--m) * 6); }
.bb-bar { background: #72c6ff; border-radius: calc(var(--m) * 20) calc(var(--m) * 20) 0 0; box-shadow: 0 0 0 calc(var(--m) * 6) #000; }
.bb-bar > i { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--m) * 200); box-sizing: border-box; border-radius: calc(var(--m) * 20);
  background: linear-gradient(#fff, #9de4fd); border: solid #72c6ff; border-width: 0 calc(var(--m) * 4) calc(var(--m) * 4); }
.bb-fill { position: absolute; left: calc(var(--m) * 64); width: calc(var(--m) * 1312); top: 100%; height: var(--sab, 0px); background: #72c6ff; }
.bb-close svg { width: 62%; height: 62%; overflow: visible; }
/* wave 3 (22 Nov 2026, owner items 7 and 12): the bottom close button is the ORIGINAL one again: the small light-blue
   round button with a black outline on the light-blue bar (the mock's button). Its X: mp.css (24 Nov: the mock's white X) */
.bb-close:focus-visible, .dp-closebar .dp-x:focus-visible { outline: max(3px, calc(var(--m) * 8)) solid #fff; outline-offset: max(2px, calc(var(--m) * 5)); }
.fc-feedsub { white-space: nowrap; }
#s-birds .fbr-scroll, #s-hatchery .hx-scroll { bottom: calc(var(--sab, 0px) + var(--m) * 386); }

/* tan panels and the cream bird card (Flappydex, YOUR BIRDS) */
.tan-outer { background: #e2b480; border-radius: calc(var(--m) * 20); box-shadow: 0 0 0 calc(var(--m) * 6) #000; }
.tan-inner { background: #f2ddb1; border-radius: calc(var(--m) * 20); }
.tan-line { background: #e2b480; }
.fbr-sethead { display: flex; align-items: center; gap: calc(var(--m) * 20); }
.fbr-sethead > b { position: relative; flex: none; white-space: nowrap; }
.fbr-sethead > .tan-line { flex: 1; height: calc(var(--m) * 6); min-width: calc(var(--m) * 20); }
.bc-bg { background: #fff6df; border-radius: calc(var(--m) * 20); pointer-events: none; }
.fbr-bird.sel > .bc-bg { box-shadow: 0 0 0 calc(var(--m) * 6) #ffb400, 0 0 calc(var(--m) * 18) #ffd23a; }
.fbr-copies { background: #00000026; border-radius: 0 0 calc(var(--m) * 23) calc(var(--m) * 23); pointer-events: none; }

/* NESTS (src/hatchery.js): the room, three shelves, six incubators; everything in mock px from the frame's top-left */
#s-hatchery { background: #2f5d38; overflow: hidden; }
#s-hatchery [hidden] { display: none !important; }
body[data-wide="1"] #s-hatchery::before { content: ""; position: absolute; inset: -40px; background: var(--room) 50% 50% / cover no-repeat; filter: blur(22px) brightness(.75); }
body[data-wide="1"] #s-hatchery[data-view="pick"]::before { filter: blur(22px) brightness(.2); }
body[data-wide="1"] #s-hatchery:not([data-view="nests"]):not([data-view="pick"])::before { display: none; }
.hn-room { position: absolute; left: var(--colx); width: var(--colw); top: 0; bottom: 0; background: 50% 0 / cover no-repeat; }
.hn-scene, .hp-view { position: absolute; left: var(--colx); width: var(--colw); top: var(--sat, 0px); bottom: 0; overflow: hidden; }
.hn-scene button, .hp-view button { border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; background-color: transparent; touch-action: manipulation; }
.hn-pic { background: 0 0 / 100% 100% no-repeat; pointer-events: none; }
.hn-glow { background: #b5e2f3; border-radius: 50%; }
.hn-egg.wob { animation: hxWob 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.card.egg-card .cc-art img { animation: hxWob 1.6s ease-in-out infinite; transform-origin: 50% 90%; }   /* 13 Nov (#55): and in its popup */
.hn-hit { border-radius: 40%; }
.hn-btn { display: grid; place-items: center; border-radius: calc(var(--m) * 15); transition: transform .06s, filter .06s;
  box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 var(--dk), inset 0 calc(var(--m) * 10) 0 #fff; }
.hn-btn.green { background: linear-gradient(#50de06, #0ec12a); --dk: #038623; }
.hn-btn.yellow { background: linear-gradient(#f9e51a, #fc9407); --dk: #af3f01; }
.hn-btn.off { background: linear-gradient(#b3b3b3, #939393); --dk: #5e5e5e; }
.hn-btn:active { transform: translateY(calc(var(--m) * 4)); filter: brightness(.92); }
.hn-btn:focus-visible, .hp-view button:focus-visible { outline: calc(var(--m) * 8) solid #fff; outline-offset: calc(var(--m) * 6); }
.hn-btn.pulse { animation: hxPulse 1.1s ease-in-out infinite; }
.hn-adchip { background: #dc8425; border-radius: calc(var(--m) * 45); }
.hn-adico svg { display: block; width: 100%; height: 100%; }
.hn-timer { border-radius: calc(var(--m) * 15); background: linear-gradient(#feffff, #a1e5fe); box-shadow: 0 0 0 calc(var(--m) * 4) #000; }
.hn-timer::before { content: ""; position: absolute; left: calc(var(--m) * 13); top: calc(var(--m) * 13); width: calc(var(--m) * 248); height: calc(var(--m) * 66); border-radius: calc(var(--m) * 8); background: #000; }
.hn-time { font-variant-numeric: tabular-nums; }
.hn-time.wide { --fs: 32!important; --sw: 4.5!important; }

/* breeding (mock "Frame 29 / 30"): the picker over the dimmed room */
.hp-view { z-index: 2; background: #000c; }
.hp-title { color: #fffb0c; }
.hp-panel { background: #3aa146; border-radius: calc(var(--m) * 20); box-shadow: 0 0 0 calc(var(--m) * 6) #000, inset 0 calc(var(--m) * -30) 0 #076b13; }
.hp-view .hp-slot { background-color: #2e903a; border-radius: calc(var(--m) * 20); cursor: default; }
.hp-view .hp-slot.full { cursor: pointer; }
.hp-view .hp-slot.full:active { transform: scale(.97); }
.hp-view .hp-slot canvas { image-rendering: pixelated; }
.hp-chip { background: #8f8f8f; border-radius: calc(var(--m) * 36); }
.hp-view .hp-breed { border-radius: calc(var(--m) * 15); background-image: linear-gradient(#b3b3b3, #939393);
  box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 #5e5e5e, inset 0 calc(var(--m) * 10) 0 #fff; transition: transform .06s; }
.hp-view .hp-breed.fy-btn { background-image: linear-gradient(#f9e51a, #fc9407); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 #af3f01, inset 0 calc(var(--m) * 10) 0 #fff; }
.hp-breed.fy-btn .hp-chip { background: #e18f12; }
.hp-breed:active { transform: translateY(calc(var(--m) * 4)); }
.hp-breed.is-busy { filter: grayscale(.5); }
.hp-list { position: absolute; left: calc(var(--m) * 70); width: calc(var(--m) * 1300); top: calc(var(--m) * 1175); bottom: calc(var(--sab, 0px) + var(--m) * 190); }
.hp-list > .tan-outer { position: absolute; inset: 0; }
.hp-scroll { position: absolute; left: 0; right: 0; top: calc(var(--m) * 130); bottom: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  background: #f2ddb1; border-radius: calc(var(--m) * 20) calc(var(--m) * 20) 0 0; }
.hp-scroll::-webkit-scrollbar { display: none; }
.hp-scroll > .tan-inner { display: none; }
.hp-grid { position: relative; width: 100%; margin-bottom: calc(var(--m) * 60); }
.hp-view .fbr-bird { touch-action: pan-y; }
.hp-view .fbr-bird.on { opacity: .2; }
.hp-view .fbr-bird.off { opacity: .5; filter: saturate(.3); }
.hp-tag { display: grid; place-items: center; border-radius: 999px; background: #14161f; color: #fff; font: 700 var(--f24) var(--font-ui); --ow: 4; }
@media (prefers-reduced-motion: reduce) { .hn-egg.wob, .hn-btn.pulse, .card.egg-card .cc-art img { animation: none; } }
.hn-inc.egg .hn-timer { pointer-events: none; }   /* (the whole incubator is the tap target: the egg popup) */

/* ==== 13 Nov (Basil, Figma "Frame 31-34"): the Market, the sell popup, the hatch reveal; the race's count and emblem art ==== */
/* the Market (src/hatchery.js renderMarket): mock px from the frame's top-left, on the orange backdrop */
.mk-bg { position: absolute; inset: 0; background: #f08a3c 50% 0 / cover no-repeat; }
.mk-view { position: absolute; left: var(--colx); width: var(--colw); top: var(--sat, 0px); bottom: 0; overflow: hidden; }
.mk-view button, .mk-pop button, .rv button { border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; background-color: transparent; touch-action: manipulation; }
.mk-shop { background: #9442f2; border-radius: calc(var(--m) * 20); box-shadow: 0 0 0 calc(var(--m) * 6) #000, inset 0 calc(var(--m) * -30) 0 #7a2fd6; }
.mk-shop::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--m) * 96); border-radius: calc(var(--m) * 20) calc(var(--m) * 20) 0 0; background: #d67dff; }
.mk-cell { background: #742fca; border-radius: calc(var(--m) * 20); }
.mk-name { background: #8239dc; border-radius: calc(var(--m) * 12); }
.mk-buy { cursor: pointer; }
.mk-price { display: inline-flex; align-items: center; gap: calc(var(--m) * 14); padding-bottom: calc(var(--m) * 12); }
.mk-tok { display: block; flex: none; }
.mk-line { color: #fffb0c; }
.mk-list { position: absolute; left: calc(var(--m) * 70); width: calc(var(--m) * 1300); top: calc(var(--m) * 981); bottom: calc(var(--sab, 0px) + var(--m) * 190); }
.mk-list > .tan-outer { position: absolute; inset: 0; }
.mk-scroll { position: absolute; left: 0; right: 0; top: calc(var(--m) * 130); bottom: calc(var(--m) * 222); overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  background: #f2ddb1; border-radius: calc(var(--m) * 20) calc(var(--m) * 20) 0 0; }
.mk-list::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--m) * 222); background: #f2ddb1; }   /* (the panel runs on behind the tabs) */
.mk-scroll::-webkit-scrollbar { display: none; }
.mk-view .fbr-bird { touch-action: pan-y; }
/* the sell popup (sellPop; mock "Frame 32"): origin = the bird card's top-left, mock (295, 400) */
.hx-layer.mk { background: #000000b3; }
.mk-pop { position: relative; width: calc(var(--m) * 850); height: calc(var(--m) * 1348); animation: hxPop .35s cubic-bezier(.2, 1.4, .4, 1); }
.mk-panel { background: #a545ff; border-radius: calc(var(--m) * 20); box-shadow: 0 0 0 calc(var(--m) * 6) #000, inset 0 calc(var(--m) * -30) 0 #561097; }   /* (the mock's Rectangle 77) */
.mk-card { pointer-events: none; }
.mk-wrap { white-space: normal; line-height: 1.2; }
.mk-warn { color: #ff5468; }
.mk-well { background: #7926c7; border-radius: calc(var(--m) * 20); }
.mk-get { display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 16); }
.mk-count { font-variant-numeric: tabular-nums; }
.mk-step.dim { filter: saturate(.35) brightness(.85); }
.mk-sign, .mk-sign.plus::after { display: block; width: calc(var(--m) * 46); height: calc(var(--m) * 12); margin-bottom: calc(var(--m) * 12); border-radius: calc(var(--m) * 3); background: #fff; box-shadow: 0 0 0 calc(var(--m) * 5) #000; }
.mk-sign.plus { position: relative; }
.mk-sign.plus::after { content: ""; position: absolute; inset: 0; margin: 0; transform: rotate(90deg); }
.mk-sign.plus::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: calc(var(--m) * 3); background: #fff; }
.mk-range { -webkit-appearance: none; appearance: none; margin: 0; padding: 0; background: transparent; cursor: pointer; touch-action: none; }
.mk-range::-webkit-slider-runnable-track { height: calc(var(--m) * 14); border-radius: calc(var(--m) * 7); background: #000; }
.mk-range::-moz-range-track { height: calc(var(--m) * 14); border-radius: calc(var(--m) * 7); background: #000; }
.mk-range::-webkit-slider-thumb { -webkit-appearance: none; width: calc(var(--m) * 50); height: calc(var(--m) * 50); margin-top: calc(var(--m) * -18); border-radius: 50%; background: linear-gradient(#fff, #9de4fd); border: calc(var(--m) * 5) solid #000; box-sizing: border-box; }
.mk-range::-moz-range-thumb { width: calc(var(--m) * 50); height: calc(var(--m) * 50); border-radius: 50%; background: linear-gradient(#fff, #9de4fd); border: calc(var(--m) * 5) solid #000; box-sizing: border-box; }
.mk-range:focus-visible { outline: calc(var(--m) * 6) solid #fff; outline-offset: calc(var(--m) * 4); }
.hn-btn.blue { background: linear-gradient(#5dc2fd, #2b8ce5); --dk: #0159a4; }
/* the hatch reveal (reveal; mock "Frame 33" then "Frame 34"): a 1440 x 2560 stage in the middle of the screen */
.rv { position: absolute; inset: 0; overflow: hidden; }
.rv-bg { position: absolute; inset: 0; background: #b77dff 50% 50% / cover no-repeat; }
.rv-stage { position: absolute; left: 50%; top: 50%; width: calc(var(--m) * 1440); height: calc(var(--m) * 2560); margin: calc(var(--m) * -1280) 0 0 calc(var(--m) * -720); }
.rv-title { color: #fff80c; animation: hxPop .5s cubic-bezier(.2, 1.6, .4, 1); }
.rv.crack .rv-title { animation: hxPulse .7s ease-in-out infinite; }
.rv-skip { opacity: .8; }
.rv-egg { transform-origin: 50% 92%; animation: hxRock 2.1s cubic-bezier(.4, 0, .6, 1) both; }
.rv-egg svg { position: absolute; left: 8%; top: 6%; width: 84%; height: 88%; overflow: visible; }
.rv-egg path { fill: none; stroke: #2a1245; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 160; stroke-dashoffset: 160; }
.rv-egg .c1 { animation: hxCrack .3s ease-out .28s forwards; }
.rv-egg .c2 { animation: hxCrack .3s ease-out .82s forwards; }
.rv-egg .c3 { animation: hxCrack .3s ease-out 1.36s forwards; }
.rv-bird { display: grid; place-items: center; animation: hxHatchUp .8s cubic-bezier(.2, 1.5, .4, 1) .1s both; }
.rv-bird canvas { image-rendering: pixelated; }
@keyframes hxHatchUp { from { transform: translateY(calc(var(--m) * 320)) scale(.2); } }
.rv-spark { animation: rvTwinkle 1.4s ease-in-out infinite; }
@keyframes rvTwinkle { 50% { opacity: .55; transform: scale(.96); } }
.rv.out .rv-name { animation: hxUp .4s ease-out .35s both; }
.rv.out .fbr-rar, .rv.out .rv-note { animation: hxUp .4s ease-out .5s both; }
.rv.out .hn-btn { animation: hxUp .4s ease-out .9s both; }
.rv .hx-flash { position: fixed !important; }
@media (prefers-reduced-motion: reduce) { .rv *, .mk-pop { animation: none !important; } .rv .hx-flash { display: none; } }
/* the race: the start / resume count ("1 2 3 GO!") and ELIMINATED! are the mock's art */
.race-count img { display: block; height: calc(var(--colw, 390px) * .23); width: auto; filter: drop-shadow(0 calc(var(--colw, 390px) * .012) 0 #0006); }
.race-banner .rb-art.wide { width: calc(var(--colw, 390px) * .86); }
.rp-laurels { transform-origin: 500px 300px; animation: rpIn .55s cubic-bezier(.2, 1.5, .4, 1) .85s both; }
@media (prefers-reduced-motion: reduce) { .rp-laurels { animation: none !important; } }
.rv .fbr-rar { transform: scale(1.36); transform-origin: 50% 0; }
.rv.out .fbr-rar { animation-name: rvPillUp; }
@keyframes rvPillUp { from { opacity: 0; transform: translateY(calc(var(--m) * 40)) scale(1.36); } }
/* the first session (src/guide.js): a new account's Home waits under this cover until the opening starts */
.guide-veil { position: fixed; inset: 0; z-index: 58; display: grid; place-items: center; background: #06183380; touch-action: none; animation: gvIn .3s ease-out .5s both; }
.guide-veil[hidden] { display: none; }
.guide-veil b { --fs: 56; --sw: 7;  color: #fffb0c; animation: hxPulse .8s ease-in-out infinite; }
@keyframes gvIn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .guide-veil, .guide-veil b { animation: none; } }
/* 13 Nov (Basil): the whole trophy bar opens Trophy Road. The track, the fill, the count, the cup and the chest sit on
   the bar's button and took its taps, so only the border worked. */
.fc-world > .wb-track, .fc-world > .wb-fill, .fc-world > .wb-txt, .fc-world > .wb-cup, .fc-world > .wb-chest, .fc-world > .fc-badge { pointer-events: none; }
/* the Starter Egg popup (starterPop; mock "Frame 35"): origin = the panel's top-left, mock (295, 633) */
.sp-pop { height: calc(var(--m) * 1120); }
/* 20 Nov: the Starter Egg offer over Base or Home (app.js offerStarter), above the chrome */
.hx-layer.sp-host { position: fixed; z-index: 72; }
.sp-title { color: #fffb0c; }
.sp-time { display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 12); }
.sp-time img { display: block; width: calc(var(--m) * 43); height: calc(var(--m) * 42); }
.sp-spark { animation: rvTwinkle 1.4s ease-in-out infinite; }
.sp-spark.b { animation-delay: .5s; }
@media (prefers-reduced-motion: reduce) { .sp-spark { animation: none; } }

/* ==== 13 Nov (Basil, Figma: the Settings frame): Settings on the orange backdrop, in mock px (src/sheets.js renderSettings) ==== */
:is(#s-settings, #s-profile) .gsheet { background: #f08a3c url("assets/ui/hatch/market_bg.e99e3f24.webp") 50% 0 / cover no-repeat; }
:is(#s-settings, #s-profile) .gs-in { width: var(--colw, 100vw); }
:is(#s-settings, #s-profile) .gs-head { display: none; }
:is(#s-settings, #s-profile) .gs-body { gap: calc(var(--m) * 38); margin-top: calc(var(--m) * 134); padding: calc(var(--m) * 10) 0 calc(var(--m) * 60); align-items: center; }   /* (the list scrolls under the profile, not over it) */
.sx-panel { flex: none; width: calc(var(--m) * 1160); border-radius: calc(var(--m) * 20); background: #04a6f9; box-shadow: 0 0 0 calc(var(--m) * 6) #000; }
.sx-panel > h3 { margin: 0; height: calc(var(--m) * 92); display: grid; place-items: center; --fs: 36; --sw: 5; }
.sx-in { border-radius: calc(var(--m) * 20); background: linear-gradient(#fff, #9de4fd); }
.sx-panel.purple { background: #d67dff; }
.sx-panel.purple .sx-in { background: #a545ff; box-shadow: inset 0 calc(var(--m) * -30) 0 #561097; border-radius: 0 0 calc(var(--m) * 20) calc(var(--m) * 20); }
.sx-acct .sx-in { display: flex; align-items: flex-start; gap: calc(var(--m) * 38); height: calc(var(--m) * 301); box-sizing: border-box; padding: calc(var(--m) * 14) calc(var(--m) * 22) 0 calc(var(--m) * 29); }
.sx-av { position: relative; flex: none; width: calc(var(--m) * 170); margin-top: calc(var(--m) * 11); }
.sx-av > i { display: grid; place-items: center; width: calc(var(--m) * 170); height: calc(var(--m) * 170); border-radius: calc(var(--m) * 20); background: #6a3aa8; }
.sx-av canvas { image-rendering: pixelated; transform: translate(-4%, -14%) scale(1.2); }
.sx-rank { display: grid; place-items: center; width: calc(var(--m) * 170); height: calc(var(--m) * 44); margin-top: calc(var(--m) * -6); border-radius: calc(var(--m) * 10); background: #ffd93a; box-shadow: 0 0 0 calc(var(--m) * 4) #000; position: relative; --fs: 24; --sw: 3.2; }
.sx-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--m) * 14); margin-top: calc(var(--m) * 66); text-align: left; }
.sx-id b { --fs: 48; --sw: 5; overflow: hidden; text-overflow: clip; }
.sx-id small { --fs: 36; --sw: 4.5; overflow: hidden; text-overflow: clip; }
.sx-acts { flex: none; display: flex; flex-direction: column; gap: calc(var(--m) * 14); }
.sx-acts .sx-b { width: calc(var(--m) * 365); height: calc(var(--m) * 115); }
.sx-linked { display: grid; place-items: center; width: calc(var(--m) * 365); height: calc(var(--m) * 115); border-radius: calc(var(--m) * 15); background: #561097; --fs: 40; --sw: 5; }
.sx-audio .sx-in { display: flex; flex-direction: column; gap: calc(var(--m) * 21); padding: calc(var(--m) * 14) calc(var(--m) * 23) calc(var(--m) * 26); }
.sx-row { display: flex; align-items: center; justify-content: space-between; height: calc(var(--m) * 80); padding: 0 calc(var(--m) * 26) 0 calc(var(--m) * 27); border-radius: calc(var(--m) * 12); background: #a5dcff; }
.sx-row > b { --fs: 40; --sw: 5; }
.sx-range { width: calc(var(--m) * 646); height: calc(var(--m) * 60); }
.sx-tag { display: grid; place-items: center; height: calc(var(--m) * 56); padding: 0 calc(var(--m) * 28); border-radius: calc(var(--m) * 28); background: #2b8ce5; box-shadow: 0 0 0 calc(var(--m) * 4) #000; --fs: 32; --sw: 4.5;  }
.sx-help .sx-in { display: grid; grid-template-columns: repeat(3, calc(var(--m) * 345)); gap: calc(var(--m) * 23) calc(var(--m) * 27); justify-content: center; padding: calc(var(--m) * 25) 0 calc(var(--m) * 42); }
.sx-dev .sx-in { display: grid; grid-template-columns: repeat(2, calc(var(--m) * 533)); gap: calc(var(--m) * 24) calc(var(--m) * 22); justify-content: center; padding: calc(var(--m) * 30) 0 calc(var(--m) * 36); }
/* the mock's Base Button at its mock size (the .btn colours, in mock px) */
:is(#s-settings, #s-profile) .btn.sx-b { height: calc(var(--m) * 106); min-height: 0 !important; padding: 0 0 calc(var(--m) * 10) !important; margin: 0; display: grid; place-items: center; border-radius: calc(var(--m) * 15) !important; -webkit-text-stroke: 0;
  box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 var(--dk), inset 0 calc(var(--m) * 8) 0 #fff !important; font-size: var(--f36)!important; overflow: visible; --ow: 5.2; }
:is(#s-settings, #s-profile) .btn.sx-b > b { --fs: 36; --sw: 5; }
:is(#s-settings, #s-profile) .sx-acts .btn.sx-b > b { --fs: 40; }
:is(#s-settings, #s-profile) .sx-dev .btn.sx-b > b { --fs: 36; --sw: 5.2; }
:is(#s-settings, #s-profile) .btn.sx-b:active:not(:disabled) { transform: translateY(calc(var(--m) * 4)); }

/* GDD v1.4 re-applied on the Figma screens (14 Nov): the Market's spare count under a bird card (green), the Sell Spare popup's
   copies line, the Mystery Egg's odds under the shop, and the spares lesson drawn as the chest card */
.mk-spares { background: #2f9e22; }
.mk-info { color: #ffe46b; }
.mk-odds { color: #ffe46b; }
.card.spares-card .sp-art { display: grid; place-items: center; padding-top: 0; }
.card.spares-card .sp-art { height: calc(var(--m) * 380); overflow: hidden; }
.card.spares-card .sp-art > span { position: relative; display: block; width: calc(var(--m) * 300); height: calc(var(--m) * 206); }   /* birdInBox sizes the bird to this box */
.card.spares-card .sp-art canvas { image-rendering: pixelated; }
.card.spares-card .cc-info { height: auto; min-height: calc(var(--m) * 96); padding: calc(var(--m) * 16) calc(var(--m) * 24); font-size: var(--f32); --ow: 4.5; }
.card.spares-card .cc-info .cc-ico { position: static; flex: none; }
.cc-ico.token { left: calc(var(--m) * 22); top: calc(var(--m) * 10); width: calc(var(--m) * 72); height: calc(var(--m) * 59); object-fit: contain; }
.cc-lbl.cc-wide { left: 0; width: 100%; }

/* ---- 16 Nov (QA feedback on the first session) ---- */
.race-stage .race-pause[hidden] { display: none; }
/* CONTINUE is focused from code (Enter works): no square ring around the rounded art */
.fcx-continue:focus-visible, .fres .fbtn:focus-visible { outline: none; }
/* the chest comes in, bursts open, and each reward flies out of its mouth (src/chestfx.js) */
.fchest.arrive .fcx-closed { animation: fcxArrive .48s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes fcxArrive { from { transform: translateY(calc(var(--m) * -700)) scale(.55); opacity: 0; } 60% { opacity: 1; } }
.fcx-card { animation: fcxCard .5s cubic-bezier(.2, 1.35, .4, 1) both; }
@keyframes fcxCard { from { transform: translate(calc(var(--m) * var(--dx, 0)), calc(var(--m) * var(--dy, 380))) scale(.12); opacity: 0; } 35% { opacity: 1; } }
.fcx-sparks { pointer-events: none; }
.fcx-spark { position: absolute; left: 0; top: 0; width: calc(var(--m) * var(--s)); height: calc(var(--m) * var(--s)); margin: calc(var(--m) * var(--s) * -.5); border-radius: 50%;
  background: var(--c); box-shadow: 0 0 calc(var(--m) * 20) var(--c); animation: fcxSpark var(--t) cubic-bezier(.15, .7, .3, 1) var(--d) both; }
@keyframes fcxSpark { from { transform: scale(.3); opacity: 1; } 65% { opacity: 1; } to { transform: translate(calc(var(--m) * var(--x)), calc(var(--m) * var(--y))) scale(1); opacity: 0; } }
/* the chest card: timer and coin buttons side by side (src/chestui.js). 23 Nov (owner): the backdrop covers the whole window,
   the top bar too, like every popup (it started under the bar: a bright band on a desktop, then a clear strip that read as a
   gap); the card sits in the middle, clear of the bar */
/* the landmark card the first session's arrow points at (src/guide.js pick) */
.fb-card.guide-pick { transform: translateY(calc(var(--m) * -14)); animation: guidePick 1s ease-in-out infinite alternate; }
@keyframes guidePick { from { filter: drop-shadow(0 0 calc(var(--m) * 6) #ffd23a); } to { filter: drop-shadow(0 0 calc(var(--m) * 22) #ffd23a) brightness(1.06); } }
@media (prefers-reduced-motion: reduce) { .fb-card.guide-pick, .fchest.arrive .fcx-closed { animation: none; } }
/* W7 (22 Nov): Home's revenge card, "<NAME> RAIDED YOU · REVENGE" for the 48 h a revenge lasts (src/home.js renderRevenge).
   A crisp solid navy block with the red raid edge (no gradient scrim) */
.fh-rev { z-index: 3; background: #0b2348; border: calc(var(--m) * 6) solid #000; border-radius: calc(var(--m) * 30); box-shadow: inset 0 0 0 calc(var(--m) * 6) #e8322e; }
.fh-rev[hidden] { display: none; }
.fh-rev .fh-rvl { justify-content: flex-start; text-align: left; }
.fh-rev .fh-rvsub { color: #ffd23f; }
.fh-rvgo { cursor: pointer; box-shadow: 0 0 0 calc(var(--m) * 6) #000; }
.fh-rvgo:active { transform: translateY(calc(var(--m) * 3)); filter: brightness(.93); }
.fh-rvx { cursor: pointer; border-radius: 50%; background: #e8322e; border: calc(var(--m) * 6) solid #000; color: #fff; font: 700 var(--f36) / 1 var(--font-ui); padding: 0; --ow: 5.2; }

/* 22 Nov 2026 (FTUE v3): the FIRST GOALS card (guide.js openGoals, src/firstgoals.js), in the chest card's look: a
   solid blue row per goal (number or tick, the goal, its reward), a green GO, DONE or the lock's reason; LATER closes */
.card.goals-card .fg-list { display: flex; flex-direction: column; gap: calc(var(--m) * 26); }
.card.goals-card .fg-sub { margin: 0; padding: calc(var(--m) * 14) calc(var(--m) * 20); border-radius: calc(var(--m) * 15); background: #0b2350; color: #fff; text-align: center;
  font: 700 var(--f32) / 1.2 var(--font-ui); letter-spacing: .02em; --ow: 4.5; }
.fg-row { position: relative; display: flex; align-items: center; gap: calc(var(--m) * 22); min-height: calc(var(--m) * 150); box-sizing: border-box;
  padding: calc(var(--m) * 16) calc(var(--m) * 20); border-radius: calc(var(--m) * 15); background: #0072bf; box-shadow: 0 0 0 calc(var(--m) * 5) #000; color: #fff; }
.fg-row.done { background: #0a5c8f; }
.fg-row.locked { background: #3d5a73; }
.fg-n { flex: 0 0 auto; display: grid; place-items: center; width: calc(var(--m) * 86); height: calc(var(--m) * 86); border-radius: 50%; background: #ffd23a; color: #14161f;
  box-shadow: 0 0 0 calc(var(--m) * 5) #000; font: 700 var(--f48) / 1 var(--font-ui); --ow: 6; }
.fg-row.done .fg-n { background: #50de06; }
.fg-row.locked .fg-n { background: #9fb3c4; }
.fg-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--m) * 10); }
.fg-title { font: 700 var(--f36) / 1.1 var(--font-ui); color: #fff; -webkit-text-stroke: calc(var(--m) * var(--ow, 5.5) * 2) var(--oc); paint-order: stroke fill; white-space: normal; --ow: 5.2; }
.fg-reward { font: 700 var(--f24) / 1.2 var(--font-ui); color: #ffe46b; white-space: normal; --ow: 4; }
.fg-go { flex: 0 0 auto; width: calc(var(--m) * 150); height: calc(var(--m) * 100); padding: 0; border: 0; border-radius: calc(var(--m) * 15); cursor: pointer;
  background: linear-gradient(#50de06, #0ec12a); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -10) 0 #038623, inset 0 calc(var(--m) * 5) 0 #fff;
  font: 700 var(--f40) / 1 var(--font-ui); color: #fff; -webkit-text-stroke: calc(var(--m) * var(--ow, 5.5) * 2) var(--oc); paint-order: stroke fill; --ow: 5.5; }
.fg-go:active { transform: translateY(calc(var(--m) * 4)); filter: brightness(.93); }
.fg-tag { flex: 0 0 auto; max-width: calc(var(--m) * 180); text-align: center; font: 700 var(--f24) / 1.15 var(--font-ui); color: #fff; --ow: 4; }
.fg-tag.done { color: #8dff5a; }
.card.goals-card .fg-later { margin-top: calc(var(--m) * 6); }
.fg-why { font: 700 var(--f24) / 1.2 var(--font-ui); color: #d9e6f0; white-space: normal; --ow: 4; }
.fg-go.later { background: linear-gradient(#f9e51a, #fc9407); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -10) 0 #af3f01, inset 0 calc(var(--m) * 5) 0 #fff; }
/* 24 Nov 2026: the Birds card's bird flies as Home's does (birdspage.js heroHover): its bob, its wing, its look-around */
.fbr-hero .hb-bob, .fbr-hero .hb-wing { position: absolute; inset: 0; }
.fbr-hero .hb-wing { transform-origin: 50% 62%; will-change: transform; }
.fbr-hero.look > * { animation: polLook 1.1s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .fbr-hero.look > * { animation: none; } }

/* ---- WORLD COMPLETE (26 Nov 2026, Basil: the "World Complete" / "Next World" frames on Font Adjustments; src/base.js) ----
   1) the full screen: the title art, two dark cards (#000 40 %, a 6 px outline), COLLECT; no world block, cards or nav.
   2) the Base after COLLECT: no landmark cards, one TRAVEL TO THE NEXT WORLD (48 / 6) over the nav. */
#s-base:is(.wc-full, .wc-travel) .fb-sheet, #s-base.wc-full :is(.fb-logtile, .fb-log) { display: none !important; }
body:has(#s-base.wc-full:not([hidden])) :is(#navbar, .fc-world) { visibility: hidden; }
.wc-title { object-fit: contain; pointer-events: none; animation: wcPop .55s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes wcPop { from { transform: scale(.4); opacity: 0 } }
.wc-box { position: absolute; inset: 0; pointer-events: none; }
.wc-box > * { pointer-events: auto; }
.wc-card { border-radius: calc(var(--m) * 17); background: #0006; box-shadow: 0 0 0 calc(var(--m) * 6) #000; --oc: #363c53; animation: dpIn .35s .15s cubic-bezier(.2, 1.3, .4, 1) both; }
.wc-card img { object-fit: contain; }
.wc-btn { border: 0; padding: 0; box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 #af3f01, inset 0 calc(var(--m) * 10) 0 #fff; --oc: var(--oc-yellow); }
/* the Next World popup (the daily popup's kit, src/dailypop.js): no close bar, so no room kept for it */
.nw-layer { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.nw-layer .dp-title, .nw-sub { --oc: #363c53; }
.nw-name { --oc: var(--oc-blue); }
.nw-sub { white-space: pre-line; }
.dp-wrap { white-space: normal; line-height: 1.02; text-align: center; }
.dp-rt.dp-wrap { text-align: left; }
.nw-pic { border-radius: calc(var(--u) * 20); box-shadow: 0 0 0 calc(var(--u) * 5) #2b70be; object-fit: cover; }
.dp-btn.yellow { background: linear-gradient(#f9e51a, #fc9407); --dk: #af3f01; --oc: var(--oc-yellow); }
/* 30 Nov: Base's NOT ENOUGH COINS (base.js shortfall): YOU NEED (coin) N MORE on a red pill, the Store's coin bundle card,
   OR EARN COINS with RACE / PINBALL round icon buttons; the ✕ inside the frame (--m follows the popup's --u) */
.sf { --m: var(--u); }
.sf-title { --oc: var(--oc-blue); }
.sf-need { display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 14); border-radius: calc(var(--u) * 24); background: #b0281b; box-shadow: 0 0 0 calc(var(--u) * 5) #000, inset 0 calc(var(--u) * -12) 0 #7d1a10; }
.sf-need b { --fs: 48; --sw: 6; --oc: #5c1209; }
.sf-need img { width: calc(var(--u) * 72); height: calc(var(--u) * 72); object-fit: contain; }
.sf-card { border-radius: calc(var(--u) * 20); background: linear-gradient(#fff, #9de4fd); box-shadow: 0 0 0 calc(var(--u) * 6) #000; }
.sf-head { display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 14); border-radius: calc(var(--u) * 12); background: #a3d9ff; }
.sf-head img { width: calc(var(--u) * 74); height: calc(var(--u) * 75); object-fit: contain; }
.sf-head b { --fs: 64; --sw: 7; --oc: var(--oc-blue); }
.sf-tag { border-radius: calc(var(--u) * 30); background: linear-gradient(#ff6b5a, #e0321f); box-shadow: 0 0 0 calc(var(--u) * 5) #000; --oc: #7d1a10; }
.sf-or, .sf-word { --oc: var(--oc-blue); }
.sf-earn { border-radius: calc(var(--u) * 75); }
.sf-earn.green { background: linear-gradient(#50de06, #0ec12a); --dk: #038623; }
.sf-ico { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); pointer-events: none; }
.sf-bird { width: calc(var(--u) * 110); height: calc(var(--u) * 80); }
.sf-bird canvas { image-rendering: pixelated; }
.sf-ball { width: calc(var(--u) * 96); height: calc(var(--u) * 96); object-fit: contain; }
.sf-x { padding: 0; border: 0; background: none; cursor: pointer; z-index: 2; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .06s; }
.sf-x img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 calc(var(--u) * 4) 0 #0005); }
.sf-x:active { transform: scale(.94); }
.sf-x:focus-visible { outline: calc(var(--u) * 8) solid #fff; outline-offset: calc(var(--u) * 2); border-radius: calc(var(--u) * 24); }
@media (prefers-reduced-motion: reduce) { .wc-title, .wc-card { animation: none; } }

/* ---- LEADERBOARD (26 Nov 2026, Basil: "Leaderboard Classic" / "Leaderboard Multiplayer"; src/leaderboard.js) ----
   The results' sunburst behind (not a dim), the blue panel, the light list with the DAILY / ALL TIME tray, rows like
   the Game Over board, this player's row pinned white, the CLASSIC / MULTIPLAYER switch on a black foot. */
.lbs-layer { background: #f7b04a url("assets/ui/fig/res_bg.b6c25c51.webp") center top / auto 100% no-repeat; }
.dp-btn.purple { background: linear-gradient(#c56bff, #8a2be2); --dk: #5300a1; --oc: var(--oc-purple); }
.lbs-title { --oc: var(--oc-blue); }
.lbs-in { border-radius: calc(var(--u) * 14); background: linear-gradient(#fff, #9de4fd); }
.lbs-tabs { border-radius: calc(var(--u) * 15); background: #cfe9f7; }
.lbs-tab { border: 0; padding: 0; background: none; border-radius: calc(var(--u) * 15); cursor: pointer; --oc: var(--oc-blue); }
.lbs-tab:not(.on) .dp-t { color: #5aa9d6; -webkit-text-stroke: 0; }
.lbs-tab.on { background: linear-gradient(#5ac0fb, #2687e3); box-shadow: 0 0 0 calc(var(--u) * 5) #000, inset 0 calc(var(--u) * -10) 0 #1561b4, inset 0 calc(var(--u) * 8) 0 #fff; }
.lbs-tab:focus-visible { outline: calc(var(--u) * 8) solid #fff; outline-offset: calc(var(--u) * 4); }
.lbs-head .dp-t { color: #fff; --oc: var(--oc-blue); }
.lbs-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.lbs-list::-webkit-scrollbar { display: none; }
.lbs-rows { position: relative; height: calc(var(--u) * var(--rh)); }
.lbs-row { --oc: var(--oc-blue); }
.lbs-row .lbs-badge { background: var(--img) center / contain no-repeat; --oc: #363c53; }
.lbs-pill { border-radius: calc(var(--u) * 10); background: #c5ecff; }
.lbs-msg { color: #fff; --oc: var(--oc-blue); }
.lbs-you { border-radius: calc(var(--u) * 20); background: #fff; box-shadow: 0 0 0 calc(var(--u) * 5) #008bd0; }
.lbs-you .lbs-row { top: calc(var(--u) * 10); }
.lbs-foot { border-radius: calc(var(--u) * 20) calc(var(--u) * 20) 0 0; background: #000; }
.lbs-sw:not(.on) { filter: saturate(.85) brightness(.9); }

/* ---- ACTIVITY LOG (26 Nov 2026, Basil: "Activity Log" frame): the attack card under ACTIVITY LOG; EXPIRED is a grey button */
.card.attack-card .ac-rv.grey, .card.attack-card .ac-rv.grey:disabled { background-image: linear-gradient(#bdbdbd, #959595); filter: none; opacity: 1;
  box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -12) 0 #595959, inset 0 calc(var(--m) * 8) 0 #fff; --oc: var(--oc-grey); }
.card.log-card .ac-empty { margin: calc(var(--m) * 40) calc(var(--m) * 40) calc(var(--m) * 60); color: #fff; text-align: center; font-size: var(--f36); --oc: var(--oc-blue); }
/* 1 Dec (QA: "the Store screen does not fit the device's screen properly, leaving a large yellow background area visible at
   the top" on Android, 20:9): the Store's panels hang from the top bar (they were bottom-anchored, the frame's extra height
   was the orange sky above them) and its wood backdrop covers the whole screen */
#s-shop .shop-bottom { bottom: auto; top: var(--sat, 0px); }
#s-shop .shop-bd .fs-layer { top: var(--sat, 0px); bottom: var(--sab, 0px); height: auto; }
#s-shop .shop-bd-img { top: 0 !important; height: 100% !important; background-size: cover !important; background-position: center top !important; }
/* 1 Dec (QA: "the Victory screen appears much lower than the device's screen area, leaving a large yellow background visible
   at the top" on Android, 20:9): the race's stage is bottom-anchored, so the result sat under a plain yellow band (the
   backdrop's edge colour). The result is centred in the screen (half the lift above, half below) and its rays cover it all */
.race-stage #raceResult { top: calc(var(--race-lift, 0px) / -2); bottom: calc(var(--race-lift, 0px) / 2); }
.race-stage #raceResult .fres-bg { top: calc(var(--race-lift, 0px) / -2) !important; height: calc(100% + var(--race-lift, 0px)) !important; background-size: cover !important; background-position: center !important; }
/* 1 Dec 2026 (Basil, Figma "Trophy Tree" 699:1288): a card hangs on a line from a dot on the trunk; the trophy pill is
   the card's top; reached = gold + green tick, the rest the same card in grey. Colours from the mock. */
.tt-trunk { background-size: calc(var(--m) * 189) calc(var(--m) * 567); }
.tt-card { background: none !important; box-shadow: none !important; border-radius: 0; }
.tt-body { border-radius: calc(var(--m) * 18); background: #ffd400; box-shadow: inset 0 calc(var(--m) * -42) 0 #c06a10, 0 0 0 calc(var(--m) * 6) #363c53; }
.tt-tpill { border-radius: calc(var(--m) * 18); background: linear-gradient(#feffff, #b5defc); box-shadow: inset 0 calc(var(--m) * -8) 0 #8fcdfb, 0 0 0 calc(var(--m) * 6) #363c53; }
.tt-tslot { border-radius: calc(var(--m) * 10); background: #4e4e4e; box-shadow: 0 0 0 calc(var(--m) * 5) #363c53; }
.tt-tnum, .tt-hcount { display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 8); }
.tt-tnum b { --fs: 48; --sw: 6; color: #fff; }
.tt-tnum img { width: calc(var(--m) * 58); height: calc(var(--m) * 51); }
.tt-hcount b { --fs: 56; --sw: 7; color: #fff; }
.tt-hcount img { width: calc(var(--m) * 92); height: calc(var(--m) * 81); }
.tt-cname { display: flex; align-items: center; justify-content: center; color: #fff; --oc: #363c53; }
.tt-tile { border-radius: calc(var(--m) * 16); }
.tt-card .tt-well { background: #e9a620; border-radius: calc(var(--m) * 16); }
.tt-card.off { filter: grayscale(1) brightness(.78); }
.tt-card.off .tt-well { background: #e9a620; }
.tt-line { background: #ffd400; box-shadow: inset 0 calc(var(--m) * -5) 0 #c06a10, 0 0 0 calc(var(--m) * 5) #363c53; }
.tt-dot { border-radius: 50%; background: #ffd400; box-shadow: inset 0 calc(var(--m) * -8) 0 #c06a10, 0 0 0 calc(var(--m) * 5) #363c53; }
.tt-line.off, .tt-dot.off { filter: grayscale(1) brightness(.6); }
.tt-head { height: calc(var(--m) * 406); top: var(--sat, 0px); }
.tt-head img { display: block; max-width: none; }
/* 1 Dec 2026 (Basil, Figma "Birds" 699:1800 / 702:621): CARE opens a tray (BERRY / FEED / PET) over the Flappydex */
#s-birds .fbr-card { z-index: 2; }
.fbr-tray { display: none; overflow: visible; }
.fbr-card[data-care="open"] .fbr-tray { display: block; }
.fbr-carebtn .fbr-chev { transform: scaleY(-1); transition: transform .15s; }
.fbr-card[data-care="open"] .fbr-carebtn .fbr-chev { transform: none; }
.fbr-carebtn .fbr-ctxt { justify-content: flex-end; }
.fbr-carebtn .fx { --oc: #0d6b12; }
.fbr-ibtn { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .06s; }
.fbr-ibtn:active { transform: scale(.94); }
.fbr-ibtn img { display: block; width: 100%; height: 100%; }
.fbr-ibtn.off { filter: grayscale(1) brightness(.88); }
/* 1 Dec 2026 (Basil, Figma "Out of Coins" / "Out of Pinballs"): offerpop.js */
.of .of-title { color: #ff5656; --oc: #000; white-space: pre-line; line-height: 1; text-align: center; }
.of .of-need { display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 10); border-radius: calc(var(--u) * 15); background: #006dba; }
.of .of-need b { --fs: 32; --sw: 4; --oc: #003f74; }
.of .of-need img { width: calc(var(--u) * 50); height: calc(var(--u) * 50); }
.of .of-card { border-radius: calc(var(--u) * 20); background: linear-gradient(#fff, #a0e2fb); }
.of .of-head { display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 10); border-radius: calc(var(--u) * 12); background: #a3daff; }
.of .of-head img { width: calc(var(--u) * 60); height: calc(var(--u) * 60); }
.of .of-head b { --fs: 48; --sw: 6; --oc: #000; }
.of .of-rays, .of .of-spark, .of .of-tag { pointer-events: none; }
/* 1 Dec 2026 (Basil, Figma "Hamburger"): menupop.js */
.mn .mn-panel { border-radius: calc(var(--u) * 20); background: #f2ddb1; box-shadow: 0 0 0 calc(var(--u) * 6) #000, inset 0 calc(var(--u) * -28) 0 #ae7c5d; }
.mn .mn-dash { background: repeating-linear-gradient(90deg, #deaf90 0 calc(var(--u) * 24), transparent calc(var(--u) * 24) calc(var(--u) * 38)); border-radius: calc(var(--u) * 4); }
.mn .mn-duck { pointer-events: none; }
/* 1 Dec 2026 (Basil, Figma "Locked Bird"): birds.js lockedPop */
.lk-panel { border-radius: calc(var(--u) * 15); background: linear-gradient(#fff, #a1e5fe); }
.lk-sil { pointer-events: none; }
.lk-sil canvas { display: block; max-width: none; image-rendering: pixelated; }
.lk .lk-nfy { color: #fffb0c; }
.lk .lk-sub { white-space: pre-line; text-align: center; line-height: 1.05; }
.lk-rar { border-radius: 999px; background: #c249fb; --rring: #8109ba; box-shadow: 0 0 0 calc(var(--u) * 5) var(--rring); }
.lk-rar[data-r="0"], .lk-rar[data-r="1"] { background: #d2d2d2; --rring: #7f7f7f; }
.lk-rar[data-r="2"] { background: #498afb; --rring: #0a53d2; }
.lk-rar .dp-t { -webkit-text-stroke-color: var(--rring); }
/* 1 Dec 2026 (Basil, Figma "Mastery"): birds.js masteryPop */
.mst .ms-title { color: #fffb0c; }
.mst .ms-staroff { filter: brightness(.55) saturate(1.6); }
.mst .ms-row { border-radius: calc(var(--u) * 15); background: linear-gradient(#fff, #cff2fe 40%, #a2e5fd); }
.mst .ms-tile { border-radius: calc(var(--u) * 12); background: #a5defa; }
.mst .ms-faded { opacity: .4; filter: saturate(.3); }
.mst .ms-goal { justify-content: flex-start; text-align: left; }
.mst .ms-bar { border-radius: 999px; background: #000; box-shadow: 0 0 0 calc(var(--u) * 4) #000; overflow: hidden; }
.mst .ms-bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: #40a3ef; }
.mst .ms-bar .dp-t { z-index: 1; }
.mst .ms-go { display: flex; align-items: center; justify-content: center; }
.mst .ms-go svg { width: 46%; height: 46%; }
.mst .ms-tick:disabled { cursor: default; }
.mst .ms-tick.ready { cursor: pointer; animation: msPulse 1s ease-in-out infinite; }
@keyframes msPulse { 50% { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .mst .ms-tick.ready { animation: none; } }
/* 1 Dec 2026 (Basil, Figma "World Map"): worldmap.js, the notebook */
#s-worldmap.wm-screen { background: #f08a2e; }
#s-worldmap .wm-book { z-index: 0; pointer-events: none; }
#s-worldmap .wm-book img { display: block; max-width: none; }
.wm-scroll { position: absolute; inset: 0; z-index: 1; overflow: hidden auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: none; }
.wm-scroll::-webkit-scrollbar { display: none; }
.wm-col { position: relative; margin-left: var(--colx); width: var(--colw); overflow: hidden; }
.wm-col img { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.wm-head { position: absolute; z-index: 2; left: var(--colx, 0px); width: var(--colw, 100%); top: var(--sat, 0px); height: calc(var(--m) * 361); pointer-events: none; }
.wm-head img { display: block; max-width: none; }
.wm-trail { position: absolute; inset: 0; pointer-events: none; }
.wm-trail svg { width: 100%; height: 100%; display: block; }
.wm-trail path { fill: none; stroke: #e7b48c; stroke-width: calc(var(--m) * 12); stroke-dasharray: calc(var(--m) * 40) calc(var(--m) * 30); stroke-linecap: round; vector-effect: non-scaling-stroke; }
.wm-card { position: absolute; transform: rotate(var(--tilt, 0deg)); border-radius: calc(var(--m) * 14); background: #fdf9f3; box-shadow: 0 calc(var(--m) * 10) calc(var(--m) * 18) #7a4a2a55; -webkit-tap-highlight-color: transparent; }
.wm-card[role="button"] { cursor: pointer; }
.wm-card[role="button"]:active { transform: rotate(var(--tilt, 0deg)) scale(.97); }
.wm-card:focus-visible { outline: calc(var(--m) * 8) solid #fff; outline-offset: calc(var(--m) * 6); }
.wm-photo { border-radius: calc(var(--m) * 4); background: #ccc center / cover no-repeat; }
.wm-name { display: flex; align-items: center; justify-content: center; font: 700 calc(var(--m) * 60)/1 var(--font-ui); color: #a75928; letter-spacing: .02em; white-space: nowrap; }
.wm-card.locked .wm-photo { filter: grayscale(1) brightness(1.05) contrast(.9); }
.wm-card.locked .wm-name { color: #b9b1a8; }
.wm-stamp { display: flex; align-items: center; justify-content: center; transform: rotate(-18deg); font: 800 calc(var(--m) * 84)/1 var(--font-ui); color: #c8202a; letter-spacing: .04em;
  border: calc(var(--m) * 9) solid #c8202a; border-radius: calc(var(--m) * 16); background: #ffffff30; opacity: .9; }
.wm-here { display: flex; align-items: center; justify-content: center; border-radius: 999px; background: #4fc81a; box-shadow: 0 0 0 calc(var(--m) * 5) #000;
  font: 700 calc(var(--m) * 32)/1 var(--font-ui); color: #fff; -webkit-text-stroke: calc(var(--m) * 6) #1d6b04; paint-order: stroke fill; }
.wm-tape { pointer-events: none; }
/* (the page runs the screen's height on a phone taller than the 9:16 mock: the layer, already on the column (.fs-layer),
   is the screen's height and the page fills it. 2 Dec: the page took --colx again inside the layer, so on a desktop it
   sat a column's offset to the right of the photos) */
#s-worldmap .wm-book { top: 0; bottom: 0; height: auto; }
#s-worldmap .wm-book img { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
#s-settings .btn.sx-b.sx-flap { width: calc(var(--m) * 480); height: calc(var(--m) * 90); cursor: default; }   /* (1 Dec 2026 mock: FLAP CONTROL, a green button) */
#s-settings .btn.sx-b.sx-flap > b { --fs: 32; --sw: 4.5; }
/* 1 Dec 2026 (Basil, Figma "profile"): Profile as Settings: PROFILE (purple), RECORD (blue) with its world / trophies strip and
   RACE / CLASSIC tiles */
#s-profile .pf-acts { margin-top: calc(var(--m) * 136); }
.pf-rec > h3 { height: calc(var(--m) * 96); }
.pf-strip { display: flex; gap: calc(var(--m) * 24); padding: 0 calc(var(--m) * 26) calc(var(--m) * 18); }
.pf-strip > span { display: flex; align-items: center; justify-content: center; gap: calc(var(--m) * 10); height: calc(var(--m) * 100); border-radius: calc(var(--m) * 15); background: #9dd6ff; }
.pf-world { flex: 0 0 calc(var(--m) * 756); } .pf-cups { flex: 1; }
.pf-strip b { --fs: 40; --sw: 5; }
.pf-cups img { width: calc(var(--m) * 92); height: calc(var(--m) * 81); }
.pf-in { display: flex; flex-direction: column; align-items: center; gap: calc(var(--m) * 20); padding: calc(var(--m) * 22) calc(var(--m) * 26) calc(var(--m) * 48); }
.pf-in > h4 { margin: 0; --fs: 40; --sw: 5; }
.pf-tiles { display: grid; gap: calc(var(--m) * 12); width: 100%; }
.pf-tiles.c4 { grid-template-columns: repeat(4, 1fr); }
.pf-tiles.c2 { grid-template-columns: repeat(2, calc(var(--m) * 268)); justify-content: center; }
.pf-tile { position: relative; display: flex; flex-direction: column; align-items: stretch; height: calc(var(--m) * 236); box-sizing: border-box; padding: calc(var(--m) * 8); border-radius: calc(var(--m) * 15); background: #9dd6ff; }
.pf-tile > b { flex: 1; display: grid; place-items: center; --fs: 72; --sw: 7; }
.pf-lab { display: grid; place-items: center; height: calc(var(--m) * 80); border-radius: calc(var(--m) * 12); background: #69baf2; }
.pf-lab b { --fs: 40; --sw: 5; }
.pf-tile .pr-medal { position: absolute; right: calc(var(--m) * -10); top: calc(var(--m) * -14); }
/* 1 Dec 2026 (Basil, Figma EDIT PROFILE): sheets.js editAccount */
.pe .pe-title { color: #fffb0c; }
.pe .pe-field { display: flex; align-items: center; border-radius: calc(var(--u) * 15); background: #fff; cursor: text; }
.pe .pe-name { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; padding: 0 calc(var(--u) * 110); text-align: center; text-transform: uppercase;
  font: 700 max(16px, calc(var(--u) * 64)) var(--font-ui); color: #000; }
.pe .pe-pen { position: absolute; right: calc(var(--u) * 30); top: calc(var(--u) * 25); width: calc(var(--u) * 70); height: calc(var(--u) * 70); pointer-events: none; }
.pe .pe-pen svg { width: 100%; height: 100%; display: block; }
.pe .pe-err { color: #fffb0c; }
.pe .pe-err[hidden] { display: none; }
.pe .pe-grid { display: grid; grid-template-columns: repeat(5, calc(var(--u) * 200)); grid-auto-rows: calc(var(--u) * 200); gap: calc(var(--u) * 20); align-content: start;
  overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: none; padding: calc(var(--u) * 8) 0; box-sizing: border-box; }
.pe .pe-grid::-webkit-scrollbar { display: none; }
.pe .pe-tile { position: relative; display: grid; place-items: center; padding: 0; border: 0; border-radius: calc(var(--u) * 15); background: linear-gradient(#eaf7ff, #a9dcfb); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pe .pe-tile canvas { image-rendering: pixelated; pointer-events: none; }
.pe .pe-tile.on { box-shadow: inset 0 0 0 calc(var(--u) * 8) #3bc41b, 0 0 0 calc(var(--u) * 4) #0c5f00; }
.pe .pe-check { display: none; position: absolute; right: calc(var(--u) * -8); top: calc(var(--u) * -8); width: calc(var(--u) * 60); height: calc(var(--u) * 60); border-radius: 50%;
  background: #3bc41b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat; box-shadow: 0 0 0 calc(var(--u) * 4) #0c5f00; }
.pe .pe-tile.on .pe-check { display: block; }
.dp-panel:focus { outline: none; }
.pf-in > h4:nth-of-type(2) { margin-top: calc(var(--m) * 16); }
