/* 23 Nov 2026 type spec (owner): one face, Rubik Bold; capitals always; rounded outlines; only seven sizes, each with its
   outline (mock px of the 1440 x 2560 frame, so text scales with the screen like the art):
     108 / 10   the Home screen's CTA (PLAY) only
      56 / 7    sub-CTA buttons, big buttons, titles where space allows
      48 / 6
      40 / 5.5  most text: buttons, body, titles, sub-titles, currency
      36 / 5.2
      32 / 4.5  rare: only where space is tight
      24 / 4
   Loaded last (index.html). The 22 Nov roles keep their names and point at the steps (no pixel floors). A rule that
   sets a size also sets its outline (--ow, mock px), which the text strokes below it read: the outline always matches
   the size. Kit labels (figscreen.js / chrome.js label()) snap --fs to a step and take --sw from src/typespec.js. */
:root {
  --f108: calc(var(--m, .27px) * 108); --f56: calc(var(--m, .27px) * 56); --f48: calc(var(--m, .27px) * 48); --f40: calc(var(--m, .27px) * 40);
  --f36: calc(var(--m, .27px) * 36); --f32: calc(var(--m, .27px) * 32); --f24: calc(var(--m, .27px) * 24);
  --t-micro: var(--f32);    /* badges, rarity pills, tiny counters */
  --t-label: var(--f36);    /* card labels, name tags, node labels */
  --t-tab: var(--f40);      /* tab bar labels */
  --t-sec: var(--f36);      /* secondary / reward lines */
  --t-body: var(--f40);     /* body / description text */
  --t-lead: var(--f48);     /* a popup's one-line lead */
  --t-toast: var(--f40);    /* toasts, the race feed */
  --t-hud: var(--f48);      /* HUD counters (coins, pinballs, trophies) */
  --t-num: var(--f48);      /* reward tile numbers */
  --t-btn: var(--f40);      /* buttons */
  --t-stitle: var(--f48);   /* screen titles / banners */
  --t-ptitle: var(--f56);   /* popup titles */
  --ow: 5.5;                /* the outline (mock px) of the size in force; every sized rule sets its own */
  --tap: 44px;              /* the smallest tap target */
}
/* capitals always (inputs keep what is typed); outlines rounded (stroke joins), on every text stroke */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; stroke-linejoin: round; }
body, button { text-transform: uppercase; }   /* (buttons too: the browser's own stylesheet sets them to none) */
input, textarea, select, [contenteditable], .nocaps { text-transform: none; }

/* ---- the Figma kit's outlined labels (label(): --fs / --sw in mock px, snapped to the spec by src/typespec.js) ---- */
.fx { font-size: calc(var(--m) * var(--fs, 40)); -webkit-text-stroke-width: calc(var(--m) * var(--sw, 5.5) * 2); }

/* ---- shared chrome: the top bar, the world band, Home's side tiles, the nav (src/chrome.js, home.js) ---- */
/* 24 Nov (Basil's annotated screens: "number needs an outline, needs to be circle, fix it across the entire game"): every red
   badge is a circle (as tall as wide; a longer number widens it) with the number outlined; no px floor, which made it an oval */
.fc-badge, .fc-nav .fc-badge.tab-badge, .bb-tab .bb-badge { font-size: var(--t-micro); min-height: 0; aspect-ratio: 1 / 1; line-height: 1; --ow: 4.5;
  -webkit-text-stroke: calc(var(--m) * 4.5 * 2) var(--oc); paint-order: stroke fill; }
.fc-badge { min-width: 0; }
/* the player's name under the avatar: one 12 px line, centred on the tile but kept on screen */
.fc-pname { left: calc(var(--m) * -20) !important; width: calc(var(--m) * 220) !important; justify-content: center; letter-spacing: -.01em; }
/* the rank under it: a pill that fits its word (the 167 x 47 art held 6.5 px text) */
/* 24 Nov (Basil's annotated Home screen: "align with profile panel"): the Home mock's pill, as wide as the 160 profile square
   and under it (50, 206), the word at 32 */
.fc-rank { left: calc(var(--m) * 50) !important; top: calc(var(--m) * 206) !important; width: calc(var(--m) * 160) !important; height: calc(var(--m) * 44) !important;
  display: grid; place-items: center; box-sizing: border-box; border-radius: 99px; background: linear-gradient(#ffe36b, #ffc21a); box-shadow: 0 0 0 calc(var(--m) * 5) #000; }
.fc-rank > .fimg { display: none; }
.fc-rank > .fx { position: static; width: auto !important; height: auto !important; line-height: 1; }
.fh-tname { line-height: 1; }
/* nav labels: sentence case (Critters' "Battle / Tatari / Camp"), as big as the tab allows */
.fc-nav .fc-tablbl { letter-spacing: -.01em; }

/* ---- popups (api.openCard: #card > header h2 + .body) ---- */
/* titles: Critters' popup title size; long ones wrap instead of shrinking */
.card h2, .card.chest-card h2, .card.attack-card h2 { font-size: var(--t-ptitle); line-height: 1.02; white-space: normal; overflow-wrap: anywhere;
  -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); --ow: 7; }
.card.attack-card h2 { width: auto; height: auto; min-height: calc(var(--m) * 127); padding: 0 calc(var(--m) * 40); }
.card header h2 { padding-left: 0; padding-right: 0; }
.card header:has(.xbtn) h2 { padding-left: 44px; padding-right: 44px; }
.card.chest-card h2 { padding: 0 34px; }
.card .body p, .card .body li { font-size: var(--f48); line-height: 1.3; --ow: 6; }   /* (style.css had 18 px here: never smaller) */
.card .body p small, .card .body small { font-size: var(--t-sec); --ow: 5.2; }
/* the close X: a 44 px target */
.card .xbtn, .card.chest-card .xbtn, .card.attack-card .xbtn { min-width: var(--tap); min-height: var(--tap); }
/* 24 Nov (Basil, the Figma popups): every popup at the mock's width, never across the screen: the chest card and a plain
   popup 850 of the 1440 frame (Frames 14, 23), the attack / flappy cards 940 (Frame 16; fig.css). The 22-23 Nov widths
   (1300 and 1100, after Critters) are gone; text is in mock px since the 23 Nov type spec, so it keeps the mock's proportions */
.card.chest-card { width: min(calc(100vw - 24px), calc(var(--m) * 850)); }
.card.attack-card { width: min(calc(100vw - 24px), calc(var(--m) * 940)); }
/* the navy / plain popups hold px-sized content (bird canvases, reward tiles, 44 px buttons), so on a phone they keep 320 px */
#card.card:not(.chest-card):not(.attack-card):not(.flappy-card):not(.dev-card):not(.how-card) { width: min(calc(100vw - 24px), max(calc(var(--m) * 850), 320px)); box-sizing: border-box; }
.card.chest-card { padding-left: calc(var(--m) * 44); padding-right: calc(var(--m) * 44); }
/* the kit's button rows: a pill (icon + value) and the label, side by side and as tall as their text needs */
.cc-row { display: flex; align-items: center; justify-content: center; gap: 8px; height: auto; min-height: max(52px, calc(var(--m) * 150)); padding: 6px 10px 9px;
  font-size: var(--t-btn); line-height: 1.05; -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); --ow: 5.5; }
.cc-row .cc-pill { position: relative; left: auto; top: auto; flex: none; display: flex; align-items: center; gap: 4px; width: auto; height: auto; min-height: 36px; padding: 2px 12px 2px 4px; }
.cc-row .cc-ico, .cc-row .cc-ico.coin, .cc-row .cc-ico.ad { position: static; width: 30px; height: 30px; object-fit: contain; }
.cc-row .cc-val { position: static; width: auto; height: auto; font-size: var(--t-hud); --ow: 6; }
.cc-row .cc-lbl, .cc-row .cc-lbl.cc-wide { position: static; flex: 1 1 auto; width: auto; height: auto; min-width: 0; white-space: normal; text-align: center; }
/* 23 Nov (owner): a kit popup's buttons fit their label (a pill and the label side by side, centred), not a bar across the
   popup; the info bands keep the popup's width */
.cc-list { align-items: center; }
.cc-list > button.cc-row { width: auto; min-width: min(100%, calc(var(--m) * 560)); max-width: 100%; padding-left: calc(var(--m) * 50); padding-right: calc(var(--m) * 50); gap: calc(var(--m) * 30); }
.cc-list > button.cc-row .cc-lbl, .cc-list > button.cc-row .cc-lbl.cc-wide { flex: 0 1 auto; }
.cc-list > .cc-row.cc-timer { width: 100%; align-self: stretch; }
/* 24 Nov (Basil, the Chest Details mock): the chest card's buttons stack one by one, each a bar across the card with the
   pill on the left and the label centred in the rest */
.card.chest-card .cc-list > button.cc-row { width: 100%; align-self: stretch; justify-content: flex-start; }
.card.chest-card .cc-list > button.cc-row .cc-pill { min-width: calc(var(--m) * 280); justify-content: center; }
.card.chest-card .cc-list > button.cc-row .cc-lbl { flex: 1 1 auto; }
.cc-row.cc-timer { font-size: var(--t-btn); --ow: 5.5; }
.cc-row.cc-timer .cc-ico { width: 30px; height: 30px; }
.card.chest-card .cc-note { font-size: var(--t-sec); line-height: 1.3; --ow: 5.2; }
/* FIRST GOALS (guide.js openGoals): sentence-case lines, the goal in the display face */
.card.goals-card .fg-sub { font-size: var(--t-sec); line-height: 1.25; --ow: 5.2; }
.fg-row { gap: 10px; padding: 10px 12px; }
.fg-n { width: 36px; height: 36px; font-size: var(--f48); --ow: 6; }
.fg-title { font-size: var(--t-lead); line-height: 1.1; -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); --ow: 6; }
.fg-reward, .fg-why { font-size: var(--t-sec); line-height: 1.25; --ow: 5.2; }
.fg-tag { font-size: var(--t-sec); max-width: none; --ow: 5.2; }
.fg-go { width: auto; min-width: 64px; height: auto; min-height: var(--tap); padding: 4px 12px 7px; font-size: var(--t-btn); -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); --ow: 5.5; }
/* the race's pause / leave / eliminated cards (race.js): their notes are sentences */
.card.race-pop .rpop-note { font-size: var(--t-lead); line-height: 1.25; --ow: 6; }
.card.race-pop .rpop-note.sm { font-size: var(--t-body); --ow: 5.5; }
.card.race-pop .cc-row { font-size: var(--t-btn); --ow: 5.5; }
.card.race-pop .cc-row .g-chip { font-size: var(--t-micro); --ow: 4.5; }
/* toasts */
.toast, .toast-bar { font-size: var(--t-toast); padding: 8px 18px; white-space: normal; text-align: center; line-height: 1.2; --ow: 5.5; }

/* ---- the race (race.js: the stage is laid out in --u, one design px of 1125 x 2000) ---- */
.race-stage .race-left { font-size: var(--t-toast); -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); --ow: 5.5; }
.race-stage .race-feed { top: auto; bottom: calc(var(--u) * 60); }
.race-stage .race-feed .fe { height: auto; min-height: max(36px, calc(var(--u) * 78.1)); padding: 4px 16px; font-size: var(--t-toast); line-height: 1.15; -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); gap: 8px; --ow: 5.5; }
.race-stage .race-feed .fe canvas { width: 26px !important; }
/* the pause button: a 44 px target around the 30 px round art (a transparent border; the art stays where it was) */
.race-stage .race-pause { border: max(0px, calc((var(--tap) + 2px - var(--u) * 87.5) / 2)) solid transparent; margin: calc(max(0px, calc((var(--tap) + 2px - var(--u) * 87.5) / 2)) * -1); background-clip: padding-box; box-sizing: content-box; }
.race-stage .race-best, .race-stage .race-inv { font-size: var(--t-hud); --ow: 6; }
.race-stage .race-hint { font-size: var(--t-toast); --ow: 5.5; }
.race-stage .race-spec > b { font-size: var(--t-lead); --ow: 6; }
.race-stage .race-spec .btn { font-size: var(--t-btn); min-height: var(--tap); --ow: 5.5; }

/* ---- the chest opening (chestfx.js; the welcome chest adds its title, guide.js) ---- */
.guide-welcome { top: calc(var(--m) * 380) !important; }
/* CONTINUE: a 20 px label needs a bigger button than the 422 x 140 art (the art stretches) */
.fcx-continue { left: calc(var(--m) * 400) !important; width: calc(var(--m) * 640) !important; height: max(56px, calc(var(--m) * 180)) !important; top: calc(var(--m) * 2210) !important; }
.fcx-continue > .fx { width: 100% !important; height: calc(100% - 6px) !important; }

/* ---- race results (race/resultview.js; .fres has its own --m from the stage) ---- */
.fres .fres-note { white-space: normal; height: auto !important; line-height: 1.15; }
/* the reward cards: their titles in the card's head band, the amounts big (Critters' reward tiles) */
.fres .fres-ctitle { letter-spacing: -.02em; }
/* PLAY AGAIN / CONTINUE: 20 px labels on wider buttons (the art stretches) */
.race-stage .race-result .fres .rs-actions .fbtn#raceAgain { left: calc(var(--m) * 96) !important; width: calc(var(--m) * 610) !important; }
.race-stage .race-result .fres .rs-actions .fbtn#raceHome { left: calc(var(--m) * 734) !important; width: calc(var(--m) * 610) !important; }
.race-stage .race-result .fres .rs-actions:not(:has(#raceAgain)) .fbtn#raceHome { left: calc(var(--m) * 415) !important; }
.race-stage .race-result .fres .rs-actions .fbtn:is(#raceAgain, #raceHome) { top: calc(var(--m) * 216) !important; height: max(52px, calc(var(--m) * 170)) !important; }
.race-stage .race-result .fres .rs-actions .fbtn:is(#raceAgain, #raceHome) > .fx { width: 100% !important; height: calc(100% - 6px) !important; }
/* the ad offer over them: a 44 px button, its label at the button size, two lines if it must */
.fres .fres-rv { left: calc(var(--m) * 170) !important; width: calc(var(--m) * 1100) !important; height: auto !important; top: auto !important; bottom: calc(100% - var(--m) * 208); display: flex; justify-content: center; }
.race-result .fres .fres-rv .btn, .fres-rv .btn { width: auto; max-width: 100%; font-size: var(--t-btn); min-height: var(--tap); height: auto; white-space: normal; padding: 2px 18px 5px; line-height: 1.1; margin: 0; --ow: 5.5; }

/* ---- pills drawn from art (rank, rarity, copies): the art stretches round its (bigger) word ---- */
.fbr-rar:not(.rv .fbr-rar) { width: auto !important; height: auto !important; min-width: calc(var(--m) * 150); left: 50% !important; transform: translateX(-50%); padding: 1px 8px 0; }
.fbr-rar > .fimg { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.fbr-rar:not(.rv .fbr-rar) > .fx { position: relative; left: 0 !important; top: 0 !important; width: auto !important; height: auto !important; line-height: 1.15; }

/* ---- Build (base.js): the landmark cards and the bar over them ---- */
.fb-card .fb-name { letter-spacing: -.02em; }
#s-base .wb-foot .wb-goal, .base-sheet .wb-foot .wb-goal, .wb-foot .wb-goal { font-size: var(--t-sec); line-height: 1.2; --ow: 5.2; }

/* ---- Birds / Nests / Market (birdspage.js, birdcard.js, hatchery.js) ---- */
.fbr-etxt { letter-spacing: -.03em; }
/* the grey MASTERY button's "OPENS AT 40 TROPHIES": two 12 px lines in a band as wide as the button */
.fbr-mlock { height: auto !important; padding: 3px 4px; }
.fbr-mlock .fbr-locktxt { position: relative; width: auto !important; height: auto !important; white-space: normal; line-height: 1.05; }
.mk-odds { white-space: normal !important; height: auto !important; line-height: 1.2; padding: 0 8px; top: calc(var(--m) * 562) !important; }
/* (the odds take two lines now: the shop panel, the line under it and the list move down to make room) */
.mk-shop { height: calc(var(--m) * 680) !important; }
.mk-line { top: calc(var(--m) * 922) !important; }
.mk-list { top: calc(var(--m) * 1020); }
.mk-nosaletag > .fx, .mk-spares > .fx, .mk-selltag > .fx { letter-spacing: -.02em; }
.mk-wrap { white-space: normal !important; line-height: 1.2; }
.rv-note, .rv-skip { white-space: normal !important; line-height: 1.2; }

/* ---- Store (shop.js) ---- */
.fst-note { white-space: normal !important; line-height: 1.2; }

/* ---- Trophy Road (trophytree.js) ---- */
.tt-card { container-type: inline-size; }
/* a step's lines stack from the top of the band above the well */
.tt-card .tt-name { white-space: pre-line !important; line-height: 1.02; letter-spacing: -.03em; flex-direction: column; justify-content: flex-start; overflow-wrap: normal; }

/* ---- Profile and Settings (sheets.js, skin.css) ---- */
.pr-lab { font-size: var(--t-sec); --ow: 5.2; }
.pr-tile b { font-size: var(--f56); --ow: 7; }
.pr-tile small { font-size: var(--f36); white-space: normal; line-height: 1.1; text-align: center; --ow: 5.2; }
.g-tag, .g-pill, .g-pill > span, .prof-sid { font-size: 1em; }
:is(#s-settings, #s-profile) .sx-rank { width: auto; min-width: 76px; height: auto; padding: 2px 8px; }
:is(#s-settings, #s-profile) .sx-rank b { font-size: var(--f36); --ow: 5.2; }
:is(#s-settings, #s-profile) .sx-id small { font-size: var(--t-sec); --ow: 5.2; }
:is(#s-settings, #s-profile) .btn.sx-b > b, :is(#s-settings, #s-profile) .sx-acts .btn.sx-b > b, :is(#s-settings, #s-profile) .sx-dev .btn.sx-b > b { font-size: var(--f48); white-space: normal; line-height: 1.05; text-align: center; --ow: 6; }
:is(#s-settings, #s-profile) .sx-help .btn.sx-b, :is(#s-settings, #s-profile) .sx-dev .btn.sx-b { height: auto; min-height: 48px !important; padding: 4px 4px 8px !important; }
:is(#s-settings, #s-profile) .sx-tag b, :is(#s-settings, #s-profile) .sx-tag { font-size: var(--f36); --ow: 5.2; }

/* ---- Multiplayer hub and rooms (mp/flow.js, mp.css) ---- */
.mp-live { font-size: var(--f36); min-height: 18px; --ow: 5.2; }

/* ---- Classic GAME OVER (race/gameover.js, arcade.css): the whole sheet in --u, so it grows to the phone's width ---- */
.go-layer { --u: min(calc((var(--vvh, 100vh) - 24px) / 1880), calc((100vw - 16px) / 860), .5px); }
.go-layer .go-rw span { --fs: 36; --sw: 5.2; }
.go-layer .lb-tab small { font-size: calc(var(--u) * 18.75); --ow: 4; }
.go-layer .go-note { font-size: 1em; }
.go-layer .lb-rows li > span.l, .go-layer .lb-rows li > span.xl { font-size: calc(var(--u) * 28.12); --ow: 5.2; }

/* ---- Pinball (pinball.js; the board's own text is drawn in render.js with CSS-px minimums) ---- */
#hits .pin-tile b { font-size: 1em; left: -30%; right: -30%; -webkit-text-stroke-width: calc(var(--m) * var(--ow, 5.5) * 2); }
/* HOW TO PLAY, the RESCUE LOG help (skin.css set 13.5 px with !important) */
.htp-sec h4 { font-size: var(--t-lead); --ow: 6; }
.htp-sec p, .htp-help { font-size: var(--t-body)!important; line-height: 1.22 !important; --ow: 5.5; }
.card.how-card { width: min(calc(100vw - 16px), 440px); }
.modal:has(> .card.how-card) { padding: 8px; }
.htp-sec h4 { line-height: 1.05; }
.htp-list { gap: 6px; }
.htp-sec { padding: 4px 8px 4px 4px; gap: 8px; }
.htp-sec h4 { margin: 0; }
/* generic card buttons (openCard bodies: .btn) and the sticky action band */
.card .btn { font-size: var(--t-btn); min-height: var(--tap); --ow: 5.5; }
.card .btn.slim, .card .btn.sm { font-size: var(--f56); --ow: 7; }
.card .g-row > .btn.grow { font-size: var(--t-btn); --ow: 5.5; }
.card.how-card header { padding-bottom: 4px; }
.card.how-card .htp-list { gap: 4px; }

/* ---- "YOUR BASE WAS ATTACKED!" rows (sheets.js attackRow): the mock placed name / what / when at fixed heights for
   24-40 mock px text; with readable text they ran into each other and into REVENGE. A grid instead: face | three
   lines | button, the row as tall as its text, the list as wide as the card. ---- */
.card.attack-card .ac-list { width: 100%; box-sizing: border-box; padding: 0 calc(var(--m) * 30); margin-left: 0; margin-right: 0; }
.ac-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto auto; column-gap: 10px; row-gap: 2px; align-items: center;
  width: auto; height: auto; min-height: calc(var(--m) * 167); box-sizing: border-box; padding: 8px 10px 8px 12px; }
.ac-av { position: static; grid-row: 1 / 4; width: max(40px, calc(var(--m) * 100)); height: max(40px, calc(var(--m) * 100)); }
.ac-t { position: static; left: auto; top: auto; height: auto; min-width: 0; grid-column: 2; line-height: 1.1; white-space: normal; overflow-wrap: anywhere; }
.ac-name { grid-row: 1; }
.ac-what { grid-row: 2; }
.ac-when { grid-row: 3; }
.ac-rv { position: static; grid-column: 3; grid-row: 1 / 4; width: auto; height: auto; min-height: var(--tap); padding: 6px 12px 9px; }
.ac-rvt { position: static; width: auto; height: auto; }


/* 24 Nov (Basil, the "Slots Full" mock on the Font Adjustments page): a race chest won with every slot full (src/home.js
   openSlotsFull). The popup lives inside Home: a 60 % black dim over the screen, the chest tray lifted above it (its waiting
   slots read REPLACE), the title, the card (the chest card's kit: 850 at (295, 520)) and the OR line in a mock layer. The
   top bar and the tab bar sit outside Home, so they are dimmed and switched off here; the popup has no X. */
.sf-wrap { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.sf-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .8); pointer-events: auto; }   /* (24 Nov: the mock's #000000 at 80 %) */
.sf-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; }
.sf-col > .sf-card { position: relative; flex: none; margin: 0; }
.sf-col > .sf-or { margin-top: calc(var(--m) * 50); line-height: 1.05; }
.slots-full .fh-chests, .slots-full .fh-slot { z-index: 31; }
/* (24 Nov, Basil's annotated Slots Full: "gold panel needs to be visible"): the top bar and the tab bar under the same 80 %
   black, except the coins pill, which stays lit: the coin OPEN NOW spends from it */
body.slots-full-up #topbar > :not(.fc-pill.coins), body.slots-full-up #navbar { filter: brightness(.2); }
body.slots-full-up #topbar, body.slots-full-up #navbar { pointer-events: none; }
body.slots-full-up #topbar .wb-banner { visibility: hidden; }   /* (the mock's title sits where the world's name is) */
.sf-head { color: #fff80c; white-space: nowrap; max-width: 100%; }
.sf-sub { white-space: nowrap; }
.sf-sub, .sf-or { color: #fff; line-height: 1.15; }
.sf-or { white-space: pre-line; max-width: 100%; }
.cc-row.red { background: linear-gradient(#ff5a4a, #e0201a); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -10) 0 #9a0d08, inset 0 calc(var(--m) * 5) 0 #fff; }
.card.chest-card .cc-list > button.cc-row.sf-discard { justify-content: center; }
.card.chest-card .cc-list > button.cc-row.sf-discard .cc-lbl { flex: 1 1 auto; }
/* the light panel a little shorter than the chest card's (460), so the card, the OR line and the slots fit one screen */


/* ---- 24 Nov (Basil): the Birds screen 1:1 with the "Birds" frames (Font Adjustments page; src/birdspage.js, birdcard.js) ---- */
/* the kit buttons drawn in CSS (Base Button: radius 15, a 5 px black outline, a 15 px dark foot and a 10 px light top) */
.kbtn { border-radius: calc(var(--m) * 15); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 var(--kfoot), inset 0 calc(var(--m) * 10) 0 #fff; }
.kbtn:active:not(:disabled) { transform: translateY(calc(var(--m) * 4)); filter: brightness(.95); }
.kbtn.green { background: linear-gradient(#50de06, #0ec12a); --kfoot: #038623; }
.kbtn.blue { background: linear-gradient(#5ac0fb, #2687e3); --kfoot: #1561b4; }
.kbtn.yellow { background: linear-gradient(#f9e51a, #fc9407); --kfoot: #af3f01; }
.kbtn.brown { background: linear-gradient(#c89f72, #bf9464); --kfoot: #9e723f; border-radius: calc(var(--m) * 12); }   /* (24 Nov: the mock's light brown, white top edge) */
.kbtn.done { background: linear-gradient(#bdbdbd, #959595); --kfoot: #595959; filter: none; }   /* EQUIPPED (Group 701) */
.fbr-page .kbtn:disabled:not(.done), .fbr-page .kbtn.off { filter: grayscale(1) brightness(.88); }
.fbr-page .kbtn { cursor: pointer; }
/* Bond: the 1040 x 20 track (black, a 4 px outline) and its fill (#FE6C8C to #FD444F, radius 10) */
.fbr-btrack { background: #000; border-radius: calc(var(--m) * 10); box-shadow: 0 0 0 calc(var(--m) * 4) #000; }
.fbr-card .fbr-bfill { min-width: calc(var(--m) * 20); border-radius: calc(var(--m) * 10); background: linear-gradient(#fe6c8c, #fd444f); box-shadow: none; }
/* the rarity pill top right (Rectangle 78: 250 x 50, a 5 px outline) and the Flappydex card's (Rectangle 90: 200 x 44, 4 px) */
.fbr-rtop, .bc-rpill { background: #d2d2d2; border-radius: 999px; box-shadow: 0 0 0 calc(var(--m) * 5) #7f7f7f; }
.bc-rpill { box-shadow: 0 0 0 calc(var(--m) * 4) #7f7f7f; }
.fbr-rtop[data-r="2"], .bc-rpill[data-r="2"] { background: #498afb; --ring: #0a53d2; }
.fbr-rtop[data-r="3"], .fbr-rtop[data-r="4"], .fbr-rtop[data-r="5"], .bc-rpill[data-r="3"], .bc-rpill[data-r="4"], .bc-rpill[data-r="5"] { background: #c249fb; --ring: #8109ba; }
.fbr-rtop[data-r="2"], .fbr-rtop[data-r="3"], .fbr-rtop[data-r="4"], .fbr-rtop[data-r="5"] { box-shadow: 0 0 0 calc(var(--m) * 5) var(--ring); }
.bc-rpill[data-r="2"], .bc-rpill[data-r="3"], .bc-rpill[data-r="4"], .bc-rpill[data-r="5"] { box-shadow: 0 0 0 calc(var(--m) * 4) var(--ring); }
/* the copies pill on the card (Rectangle 220: 220 x 70, #223052 at 20 %) and under a Flappydex card (Rectangle 133) */
.fbr-cpill { background: #22305233; border-radius: 999px; pointer-events: none; }
.fbr-cpico svg { display: block; width: 100%; height: 100%; }
.fbr-dex .fbr-copies { background: #0000001a; border-radius: 0 0 calc(var(--m) * 23) calc(var(--m) * 23); }
/* the reward strips (373 x 90, white at 50 %, round bottom corners) and the navy strip under the card */
.fbr-card .fbr-fx { background: #ffffff80; border-radius: 0 0 calc(var(--m) * 10) calc(var(--m) * 10); }
.fbr-strip { background: #08406e; border-radius: 0 0 calc(var(--m) * 20) calc(var(--m) * 20); }
.fbr-mstar-off { filter: brightness(.6) saturate(1.5); }   /* (image 214: an unearned star in the button's dark blue) */
.fbr-mstars { position: absolute; inset: 0; pointer-events: none; }
/* the Flappydex card (300 x 400, white) and the equipped bird's E (Ellipse 45) */
/* 24 Nov (Basil's annotated Birds screen): only the bird on the card above is white (#FFFFFF), the others beige (#FFF6DF) */
.fbr-dex .bc-bg { background: #fff6df; box-shadow: none; }
.fbr-dex.sel > .bc-bg { background: #fff; box-shadow: none; }
.bc-eq { border-radius: 50%; background: linear-gradient(#f9e51a, #fc9407); box-shadow: 0 0 0 calc(var(--m) * 4) #000; pointer-events: none; }
.bc-staroff { filter: grayscale(1) brightness(1.25); }   /* (an unearned star on a Flappydex card is the mock's light grey) */
.fbr-cptxt, .fbr-copies .fc-txt { text-transform: none; }   /* (the mock's lowercase x3) */
.fbr-card .fbr-mlock { justify-content: center; padding: 0; }
/* 24 Nov (Basil's annotated screens: "wrong font size, wrong outline colour, fix it across the entire game and for all
   rarities"): a rarity pill's word is white, at 32 (36 on the Birds card's top pill), outlined in the pill's ring colour
   (the mock's EPIC: #8109BA), on every screen: Birds, the bird cards, the Hatchery, Pinball's reveal, the Store, raids */
.fbr-rtop, .bc-rpill, .fbr-rar, .hx-rar, .rd-rar, .rar-chip, .fl-rar, .fst-rar { --rring: #7f7f7f; }
:is(.fbr-rtop, .bc-rpill, .fbr-rar, .hx-rar, .rd-rar)[data-r="2"], .rar-chip.r2, .fl-rar.r2 { --rring: #0a53d2; }
:is(.fbr-rtop, .bc-rpill, .fbr-rar, .hx-rar, .rd-rar):is([data-r="3"], [data-r="4"], [data-r="5"]), .rar-chip.r3, .fl-rar:is(.r3, .r4, .r5), .fst-rar { --rring: #8109ba; }
:is(.fbr-rtop, .bc-rpill, .fbr-rar, .hx-rar) .fx, .fl-rar.fx, .fst-rar.fx { color: #fff; -webkit-text-stroke-color: var(--rring); }
.rd-rar.fx { color: #fff; font-size: var(--f32); -webkit-text-stroke: calc(var(--m) * 4.5 * 2) var(--rring); paint-order: stroke fill; }
.rar-chip { text-shadow: none; -webkit-text-stroke: calc(var(--m) * 4.5 * 2) var(--rring); paint-order: stroke fill; font-size: var(--f32); border-color: var(--rring); }
/* the WORLD n tab (24 Nov, the Home mock's Rectangle 23: 256 x 58, #223052 at 50 %, round top corners) */
.wb-tag .wb-tagbg { inset: 0; background: #22305280; border-radius: calc(var(--m) * 20) calc(var(--m) * 20) 0 0; pointer-events: none; }

/* 24 Nov (Basil's annotated Slots Full: "buttons too tall, follow mock"; the inside rectangles capsule shaped): a chest card's
   buttons are the mock's Base Button, 750 x 130 (radius 15, a 5 px outline, a 15 px foot, a 10 px white top edge), 30 apart;
   the price / AD capsule 280 x 80 (radius 45: #12A536 / #DC8425) 20 in, its icon 24 in, the words at 48 */
.card.chest-card { padding-left: calc(var(--m) * 50); padding-right: calc(var(--m) * 50); }
.card.chest-card .cc-list > button.cc-row { height: calc(var(--m) * 130); min-height: 0; min-width: 0; padding: 0 calc(var(--m) * 20); gap: 0;
  font-size: var(--f48); --ow: 6; line-height: 1; }
.card.chest-card .cc-list > button.cc-row.green { 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; }
.card.chest-card .cc-list > button.cc-row.yellow { background: 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; }
.card.chest-card .cc-list > button.cc-row.red { background: linear-gradient(#ff6060, #c40000); box-shadow: 0 0 0 calc(var(--m) * 5) #000, inset 0 calc(var(--m) * -15) 0 #730000, inset 0 calc(var(--m) * 10) 0 #fff; }
.card.chest-card .cc-list > button.cc-row .cc-pill { width: calc(var(--m) * 280); min-width: 0; height: calc(var(--m) * 80); min-height: 0; padding: 0; gap: 0;
  border-radius: calc(var(--m) * 45); justify-content: flex-start; background: #12a536; }
.card.chest-card .cc-list > button.cc-row.yellow .cc-pill { background: #dc8425; }
.card.chest-card .cc-list > button.cc-row .cc-ico { width: calc(var(--m) * 68); height: calc(var(--m) * 69); margin-left: calc(var(--m) * 24); flex: none; }
.card.chest-card .cc-list > button.cc-row .cc-ico.ad { height: calc(var(--m) * 55); }
.card.chest-card .cc-list > button.cc-row .cc-val { flex: none; width: calc(var(--m) * 152); text-align: center; font-size: var(--f48); --ow: 6; }
/* the words in the mock's 407 box from x 278 of the button (OPEN NOW); DISCARD THIS CHEST across the whole button */
.card.chest-card .cc-list > button.cc-row .cc-lbl { flex: none; width: calc(var(--m) * 407); margin-left: calc(var(--m) * -22); font-size: var(--f48); --ow: 6; }
.card.chest-card .cc-list > button.cc-row.sf-discard .cc-lbl { flex: 1 1 auto; width: auto; margin-left: 0; }
body.slots-full-up .perch { display: none !important; }
/* the chest card's title at the mock's 48 (GOLD CHEST: 48 / 6 in a 45 box), so the art box starts at 100 */
.card.chest-card h2 { font-size: var(--f48); line-height: calc(var(--m) * 45); --ow: 6; }
.card.chest-card .cc-list > button.cc-row .cc-pill { margin-top: calc(var(--m) * -6); }   /* (22 down in the 130, over the 15 foot) */

/* ---- 24 Nov 2026 (owner's "OUTLINE RULE FOR TEXT"): never a black outline. Every text outline reads --oc: neutral #363C53
   on no panel (or a semitransparent one); a button or panel sets its own, which its words inherit. Yellow #8C2902, green
   #005114, blue #003F74, purple #5300A1, brown buttons and beige panels #7B4C15, grey #595959; red (not in the rule;
   26 Nov Rules board: red buttons #820606). A rarity pill keeps its ring colour (--rring). ---- */
:root { --oc: #363c53; --oc-yellow: #8c2902; --oc-green: #005114; --oc-blue: #003f74; --oc-purple: #5300a1; --oc-brown: #7b4c15; --oc-grey: #595959; --oc-red: #820606; }
/* yellow */
.kbtn.yellow, .cc-row.yellow, .fy-btn, .btn.gold, .fh-play, .fh-open.y, .fg-go.later, .hp-breed.fy-btn, .bc-eq, .fc-rank, .fl-go { --oc: var(--oc-yellow); }
/* green */
.btn, .kbtn.green, .cc-row.green, .fh-mp, .fg-btn.fh-mp, .bb-tab[data-id="nests"], .fg-go, .fh-open.g { --oc: var(--oc-green); }
/* blue: buttons, the blue cards and panels (the chest card, the Birds card, the chest tray, the world banner) */
.kbtn.blue, .cc-row.blue, .btn.blue, .btn.navy, .fg-btn, .fh-classic, .bb-tab[data-id="flappydex"], .bb-tab.on:not([data-id="nests"]):not([data-id="market"]),
.card, .card.chest-card, .card.navy, .fbr-card, .fbr-strip, .wb-banner, .tt-back, .fh-chests, .fh-slot, .cc-row.cc-timer { --oc: var(--oc-blue); }
/* purple */
.bb-tab[data-id="market"], .btn.purple, .mp-purple { --oc: var(--oc-purple); }
/* brown buttons, beige panels (the Flappydex, the tan panels) */
.kbtn.brown, .fbr-flock, .tan-outer, .tan-inner, .fbr-sethead { --oc: var(--oc-brown); }
.fbr-flock .fbr-dex { --oc: var(--oc-brown); }
/* grey */
.kbtn.done, .cc-row.grey, .btn.grey, .bb-tab:not(.on):not([data-id]) { --oc: var(--oc-grey); }
/* red */
.cc-row.red, .btn.red, .btn.danger, .fc-badge, .bb-badge, .tab-badge { --oc: var(--oc-red); }
/* the rarity pills keep their ring colour */
:is(.fbr-rtop, .bc-rpill, .fbr-rar, .hx-rar) { --oc: var(--rring); }

/* 26 Nov 2026 QA ("the Close (X) button is partly cut off in popups such as Checkout and Bird Profile"): the X hangs below
   the title band and the body panel was drawn over its foot. The header (and its X) now sit above the body. */
.card > header { position: relative; z-index: 2; }
.card .xbtn { z-index: 3; }
