:root {
  --hud-dim: .15; /* [s26] the HUD under any card over the game (pause, result, Go to…, the city, jobs, dolls) */
  --cream: #FFF6E9;
  --paper: #FFFDF8;
  --ink: #1D1A1F;
  --muted: #6B6470;
  --line: #E8DCC8;
  --red: #E0402F;
  --red-deep: #9E1426;
  --gold: #F2B33D;
  --sky: #5C9BD6;
  --green: #3E9B6A;
  --shadow: var(--ink);
  --world-shadow: var(--shadow); /* [s2] the drop over the game world (the HUD, toasts, cards on the map): #000 in dark mode too */
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* [s98] Spacing (docs/art/TOKENS.md "Spacing"): the 4-point grid and its roles, the app's Space (Theme.swift). A stacked .btn's
     4px ledge takes room (margin-bottom), as the app's ChunkyButton's frame holds it, so a gap after a button is what the eye sees. */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px;
  --s-page: var(--s-5); --s-header: var(--s-3); --s-label: var(--s-2); --s-section: var(--s-5); --s-card: var(--s-4); --s-row: var(--s-3); --s-stack: var(--s-2); --s-ledge: var(--s-1);
  --measure: 55ch; /* [s72] the reading measure (docs/art/TOKENS.md "Layout: reading measure"): ~65 characters of the rounded font a line; the app's Reading.measure, 34 em */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  /* [s66] the reading type scale (docs/art/TOKENS.md "Type scale"; the app's Theme.swift ReadType): px = the app's points */
  --rt-section: 1.5rem; --rt-title: 1.1875rem; --rt-name: 1.0625rem; --rt-lead: 1.0625rem; --rt-body: 1.0625rem; --rt-secondary: 0.9375rem; --rt-caption: 0.8125rem;
  --rt-lh: 1.5; --rt-lh-small: 1.4; /* long text's line height (the app's lineSpacing 5 at 17, 3 at 15) */
  /* [s97] corner radii and elevation (docs/art/TOKENS.md "Corner radii", "Elevation"; Theme.swift Radius, Elevation): a 4 px step;
     nested radius = outer - inset. The in-play HUD and world keep their own (TOKENS.md "Elevation": in-play exceptions). */
  --r-tick: 4px; --r-small: 8px; --r-field: 12px; --r-button: 16px; --r-card: 20px; --r-panel: 24px; --r-pill: 999px;
  --drop-pressed: 1px; --drop-small: 2px; --drop-button: 4px; --drop-card: 6px;
}
:root { color-scheme: light; }
/* [s67] the edge of a card, panel, button or chip on the menus (docs/art/TOKENS.md "Strokes and colour roles"; Theme.swift Palette.edge):
   light, the 3px ink line; dark, a stepped-down cream half a pixel thinner (the full cream made a halo on the near-black);
   more contrast, the full ink and 3px again. The game's HUD keeps its own lines (--hud-line). */
:root { --edge: var(--ink); --edge-w: 3px; }

[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--cream); color: var(--ink); font-family: var(--font); }
body { position: fixed; inset: 0; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; } /* pinch-zoom works (WCAG 1.4.4), a quick double tap on a button doesn't zoom */
input { font: inherit; -webkit-user-select: text; user-select: text; }
/* [s71] no orphans: headings, taglines, rows and links share their lines out evenly, and running copy never ends on one lonely word
   ("a / lot.", "forgot to / book."). One rule for every screen, not a <br> per string; the app's Text gets the same with
   .lineLimit-free wrapping plus TOKENS.md "Line breaks". */
h1, h2, h3, h4, .tagline, .eyebrow, .link, .btn, figcaption { text-wrap: balance; } /* (short lines, often centred: even halves) */
p, li, dd, .muted, .set-row { text-wrap: pretty; } /* (left-aligned running copy: the full measure, only the last line kept from one word) */

/* iPad and Mac: everything on the screens and the HUD is drawn at --ui (set in resize(), 1 on phones). */
.screen > *, .hud-top, .hud-fluffy, .hud-thought, .hud-abilities, .watch-bar, .time-banner, .ff-card { zoom: var(--ui, 1); }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- Screens ---------- */
.screen { position: fixed; inset: 0; display: none; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  background: var(--cream); z-index: 10; }
.screen-dim { background: rgba(29, 26, 31, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
body[data-screen="title"] #s-title, body[data-screen="levels"] #s-levels, body[data-screen="intro"] #s-intro,
body[data-screen="pause"] #s-pause, body[data-screen="result"] #s-result, body[data-screen="how"] #s-how,
body[data-screen="scores"] #s-scores,
body[data-screen="opening"] #s-opening, body[data-screen="chill"] #s-chill, body[data-screen="guide"] #s-guide,
body[data-screen="settings"] #s-settings, body[data-screen="curtain"] #s-curtain,
body[data-screen="foundation"] #s-foundation, body[data-screen="credits"] #s-credits { display: flex; flex-direction: column; align-items: center; } /* [foundation35] [act1] */
body[data-screen="pause"] #hud, body[data-screen="result"] #hud { opacity: var(--hud-dim); } /* [s26] a hint of the game under the cards, not a second layer to read (HUDView.swift the same) */
/* [anywhere] Free Roam Mode's 🧭 Go to… (#s-goto, game.js gotoOpen): the pause card's family, a list of every place by group */
body[data-screen="goto"] #s-goto { display: flex; flex-direction: column; align-items: center; }
/* [m2] screen transitions (game.js scrIn; the apps' Screens.swift screenTransition and pop): in from the side we're heading while the last one
   slides 60% as far the other way and fades (it stays shown, inert, under the new one for a quarter of a second), or a card's pop over a
   fading veil, or a fade; Reduce Motion: a cross-fade. The classes come off once it's in (no transform left: fixed children stay the viewport's) */
.screen.scr-in { animation: scrIn .36s cubic-bezier(.25, .8, .25, 1); } /* [s53] shorter, and settled at its end (the last pixels used to creep for a third of a second) */
.screen.scr-pop, .screen.scr-fade { animation: scrFade .2s ease-out; } .screen.scr-pop > * { animation: scrPop .34s cubic-bezier(.2, .9, .25, 1); } /* (the veil fades, the card pops) */
.screen:is(.scr-out, .scr-out-fade) { z-index: 9; pointer-events: none; } /* (its own layout kept inline: game.js SCR_KEEP) */
.screen.scr-out { animation: scrOut .3s cubic-bezier(.25, .8, .25, 1) forwards; } .screen.scr-out-fade { animation: scrFadeOut .2s ease-in forwards; }
.screen.scr-out-fade.scr-was-pop > * { animation: scrPop .2s ease-in reverse forwards; } /* (a card shrinks to 0.88 as it goes) */
#hud { transition: opacity .2s ease-out; } /* (dimmed under the cards with their veil) */
@keyframes scrIn { from { opacity: 0; transform: translateX(var(--scr-dx, 70px)); } to { opacity: 1; transform: none; } }
@keyframes scrOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(calc(var(--scr-dx, 70px) * -.6)); } }
@keyframes scrPop { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }
@keyframes scrFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrFadeOut { from { opacity: 1; } to { opacity: 0; } }
html.calm .screen:is(.scr-in, .scr-pop, .scr-fade) { animation: scrFade .2s ease-out; } html.calm .screen.scr-pop > * { animation: none; }
html.calm .screen:is(.scr-out, .scr-out-fade) { animation: scrFadeOut .2s ease-in forwards; } html.calm .screen.scr-was-pop > * { animation: none; }
body[data-screen="goto"] #hud { opacity: var(--hud-dim); }
.goto-panel { max-width: 460px; text-align: left; }
.goto-panel .panel-head { margin-bottom: 0; }
.goto-lede { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.goto-list { display: flex; flex-direction: column; gap: 14px; }
.goto-group { display: flex; flex-direction: column; gap: 6px; }
.goto-group h3 { margin: 6px 0 0; font-size: 1rem; font-weight: 900; }
.btn.goto-btn { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; font-size: 0.9375rem; padding: 10px 14px; }
.goto-how { flex: none; font-size: 0.75rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.btn.goto-here { border-style: dashed; }
/* [world] the city map (#s-city, game.js cityOpen): the neighbourhood drawn on a canvas, its places real buttons over it, the card beside */
body[data-screen="city"] #s-city { display: flex; flex-direction: column; align-items: stretch; padding: calc(10px + var(--safe-t)) calc(10px + var(--safe-r)) calc(10px + var(--safe-b)) calc(10px + var(--safe-l)); }
body[data-screen="city"] #hud { opacity: var(--hud-dim); }
.city-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; background: var(--paper); border: var(--edge-w) solid var(--edge); border-radius: var(--r-panel); padding: 12px; box-shadow: 0 var(--drop-card) 0 var(--shadow); }
.city-head { margin-bottom: 0; } .city-head h2 { flex: 1; font-size: 1.375rem; }
.city-clock { font-size: 0.875rem; font-weight: 800; color: var(--muted); }
.btn.city-list { width: auto; padding: 8px 14px; }
.city-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.city-wrap { position: relative; flex: 1; min-height: 240px; border-radius: var(--r-button); overflow: hidden; background: #EDE6DA; }
.city-wrap canvas { position: absolute; inset: 0; }
.city-pins { position: absolute; inset: 0; }
.city-pin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 0; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--paper); }
.city-pin::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--green); }
.city-pin.pin-look::after { background: var(--sky); border-radius: var(--r-tick); }
.city-pin.pin-star { background: var(--gold); } .city-pin.pin-star::after { inset: 3px; background: var(--paper); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); border-radius: 0; }
.city-pin.pin-mark::after { background: #2D7FC1; transform: rotate(45deg); border-radius: var(--r-tick); } .city-pin.pin-job::after { background: var(--gold); } .city-pin.pin-event::after { background: #C93A72; } .city-pin.pin-heat::after { background: var(--red); }
.city-pin.pin-wp { background: #2D7FC1; } .city-pin.pin-wp::after { background: var(--paper); inset: 6px; }
.city-pin .pin-n { position: absolute; top: -9px; right: -11px; z-index: 1; min-width: 16px; height: 16px; padding: 0 4px; border: 2px solid var(--paper); border-radius: var(--r-small); background: var(--ink); color: var(--paper); font: 900 10px/12px ui-rounded, system-ui; text-align: center; box-sizing: border-box; } /* [citypolish] pins on one spot: how many */
.city-card-list { display: flex; flex-wrap: wrap; gap: 5px; } .city-card-list[hidden], .city-card-btns[hidden] { display: none; }
.city-pin:focus-visible, .city-pin:hover { transform: scale(1.35); outline: 3px solid var(--gold); outline-offset: 1px; z-index: 2; }
.city-side { display: flex; flex-direction: column; gap: 6px; max-height: 34%; overflow-y: auto; }
.city-card { border: var(--edge-w) solid var(--edge); border-radius: var(--r-button); padding: 10px 12px; background: var(--cream); display: flex; flex-direction: column; gap: 6px; }
.city-card-name { font-size: 1.0625rem; font-weight: 900; } .city-card-what { font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.city-card-btns { display: flex; gap: 8px; } .city-card-btns .btn { padding: 10px 12px; font-size: 0.9375rem; }
.city-lede { margin: 2px 0 0; font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.city-away { display: flex; flex-wrap: wrap; gap: 5px; } .btn.city-far { width: auto; padding: 5px 9px; font-size: 0.75rem; border-width: 2px; box-shadow: 0 var(--drop-small) 0 var(--shadow); }
.city-away-h { flex-basis: 100%; margin-top: 4px; font-size: 0.8125rem; font-weight: 900; }
body.wide .city-body { flex-direction: row; } body.wide .city-side { width: 320px; max-height: none; }
.city-toast { zoom: var(--ui, 1); position: absolute; left: calc(12px + var(--safe-l)); top: calc(var(--safe-t) + 132px + var(--hud-drop, 0px)); max-width: min(300px, calc(100vw - 150px)); padding: 5px 12px; border: 3px solid var(--ink); border-radius: var(--r-field); background: var(--paper); font-size: 13px; font-weight: 900; line-height: 1.2; pointer-events: none; }
.city-toast.show { animation: cityIn 3.2s ease-out forwards; }
@keyframes cityIn { 0% { opacity: 0; transform: translateY(-6px); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
body:not(.wide) #cabBtn { display: none; } /* (a phone's top bar has no room: there the map's Go is the cab, from any street) */
html.calm .city-toast.show { animation-name: scrapFade; }
body.ff .city-toast { display: none; }
/* [jobs] an odd job's card (#s-job) and the job log (#s-jobs, in Go to…'s family); the HUD's line (#hudJob) */
body[data-screen="job"] #s-job, body[data-screen="jobs"] #s-jobs { display: flex; flex-direction: column; align-items: center; }
body[data-screen="job"] #hud, body[data-screen="jobs"] #hud { opacity: var(--hud-dim); }
.job-panel { max-width: 440px; }
.job-ask { margin: 4px 0 0; font-size: 1.0625rem; font-weight: 800; font-style: italic; }
.job-brief { margin: 6px 0 0; font-size: 0.9375rem; }
.job-steps { margin: 8px 0 0; padding-left: 22px; text-align: left; font-size: 0.875rem; font-weight: 700; }
.job-steps li { margin: 3px 0; }
.job-reward { margin: 8px 0 4px; font-size: 0.875rem; font-weight: 800; color: #7A5200; }
.jobs-now { margin: 0; font-size: 0.875rem; font-weight: 700; }
/* [dolls] the name test's card (#s-dolls): "Who am I?", three big cards, each a drawn name tag and a name; 1, 2, 3 on a keyboard */
body[data-screen="dolls"] #s-dolls { display: flex; flex-direction: column; align-items: center; }
body[data-screen="dolls"] #hud { opacity: var(--hud-dim); }
.dolls-panel { max-width: 520px; }
.dolls-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; margin: 12px 0 6px; }
.dolls-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 124px; padding: 14px 4px 12px; font-size: 1.0625rem; font-weight: 900; }
.dolls-tag { width: 64px; height: 44px; }
.dolls-name { white-space: nowrap; line-height: 1.1; }
.dolls-key { position: absolute; top: 5px; left: 8px; font-size: 0.6875rem; font-weight: 900; color: var(--muted); }
@media (max-width: 440px) { .dolls-card { font-size: 0.9375rem; } }
@media (max-width: 360px) { .dolls-cards { grid-template-columns: 1fr; } .dolls-card { min-height: 0; flex-direction: row; justify-content: center; } }
.jobs-done { margin: 0; font-size: 0.875rem; color: var(--muted); }
.btn.jobs-again { border-color: #2BB3C0; }
.jobs-title { display: block; }
.jobs-where { display: block; margin-top: 2px; font-size: 0.78125rem; font-weight: 700; color: var(--muted); }
#s-jobs .goto-name { min-width: 0; }
.hud-top { flex-wrap: wrap; }
.hud-job { order: 99; flex: 0 0 100%; pointer-events: auto; margin: 0 0 1px -4px; padding: 3px 10px; border: 0; border-radius: 10px; background: rgba(29, 26, 31, .78); color: #FFF5D6; font: inherit; font-size: 12.5px; font-weight: 800; line-height: 1.25; text-align: center; cursor: pointer; }
.hud-job[hidden] { display: none; }
body.has-job .hud-fluffy, body.has-job .hud-adapt { top: calc(92px + var(--safe-t) + var(--hud-drop, 0px)); } /* (below the bar and its job line) */
body.has-job .city-toast { top: calc(var(--safe-t) + 160px + var(--hud-drop, 0px)); } /* ([world] the block's name, below the job line too: HUDView's CityToast the same) */
@media (max-width: 520px) { #jobsBtn { display: none; } } /* (a phone: the job line and the pause card open the log; the bar keeps room for the title) */

.title-card { margin: auto; width: 100%; max-width: 420px; text-align: center; display: flex; flex-direction: column; align-items: center; }
body.wide .title-card { display: grid; grid-template-columns: 420px 380px; column-gap: 56px; align-items: center; max-width: none; width: auto; }
body.wide .title-card > * { grid-column: 1; }
body.wide .title-card > .menu { grid-column: 2; grid-row: 1 / 5; align-self: center; } /* (the logo, tagline, cast and its line on the left) */
/* [titlefix] (the audit's N5) every mode, Continue, Player Guides and Game Settings on the screen without scrolling on a phone, upright and on its
   side, first visit or returning, with the holiday banner, the progress and the move offer. Three parts: the wrapper round the logo, its line,
   the crowd and the owner's line (.title-hero) isn't drawn (display: contents), so every layout above is as it was, the iPad's two columns
   ([ipad37]) included; on a short screen the logo, the words and the buttons get a little smaller (never a button under 44 px); and the crowd
   takes the room that's left (title-cast.js fitCh: it shrinks only when the menu's last row would be under the bottom edge, down to a floor).
   On a phone on its side (landscape, at most 560 px tall: no iPad is), the crowd's column beside the menu. The app's TitleView fits its
   crowd the same way (CastStage.fit) and puts the crowd beside the menu on its side (WindowLayout.beside). */
.title-hero { display: contents; }
body.wide .title-hero > * { grid-column: 1; }
#s-title.screen { overflow-x: hidden; } /* (never sideways: someone small at the crowd's edge has a 44 px tap area, .cs.small::before, that can reach a few px past it) */
@media (max-height: 760px) and (orientation: portrait), (min-height: 561px) and (max-height: 760px) { /* (upright, or any window too tall for the phone-on-its-side layout below) */
  body:not(.wide) #s-title .logo { font-size: clamp(3.5rem, 17vw, 4.375rem); }
  body:not(.wide) #s-title .tagline { margin-top: 4px; font-size: 1rem; }
  body:not(.wide) #s-title .hd-banner { max-width: 300px; margin: 2px 0 -6px; }
  body:not(.wide) #s-title .cast-stage { margin-top: 4px; }
  body:not(.wide) #s-title .cast-hint { margin: 6px 0 10px; }
  body:not(.wide) #s-title .menu { gap: 8px; }
  body:not(.wide) #s-title .menu > .btn:not(.btn-continue) { padding-top: 12px; padding-bottom: 12px; }
  body:not(.wide) #s-title .btn-continue { padding-top: 7px; padding-bottom: 7px; }
}
@media (max-height: 600px) and (orientation: portrait), (min-height: 561px) and (max-height: 600px) {
  body:not(.wide) #s-title.screen { padding-top: calc(12px + var(--safe-t)); padding-bottom: calc(12px + var(--safe-b)); }
  body:not(.wide) #s-title .logo { font-size: clamp(3rem, 14vw, 3.5rem); }
  body:not(.wide) #s-title .tagline { margin-top: 2px; font-size: 0.9375rem; }
  body:not(.wide) #s-title .hd-banner { max-width: 240px; }
  body:not(.wide) #s-title .cast-hint { margin: 4px 0 8px; font-size: 0.75rem; }
  body:not(.wide) #s-title .menu { gap: 7px; }
  body:not(.wide) #s-title .menu > .btn:not(.btn-continue) { padding-top: 10px; padding-bottom: 10px; font-size: 1.0625rem; }
  body:not(.wide) #s-title .btn-continue { padding-top: 5px; padding-bottom: 5px; }
  body:not(.wide) #s-title .tc-go { font-size: 1rem; }
  body:not(.wide) #s-title .tc-name { font-size: 0.8125rem; }
  body:not(.wide) #s-title .btn-daily:not(.solo) { padding-top: 4px; padding-bottom: 4px; } /* [dailytitle] Today's walk beside Continue: no taller than it needs */
  body:not(.wide) #s-title .btn-daily:not(.solo) .td-what { font-size: 0.875rem; }
  body:not(.wide) #s-title .btn-daily:not(.solo) .td-state, body:not(.wide) #s-title .btn-daily:not(.solo) .td-streak { font-size: 0.75rem; line-height: 1.1; }
}
@media (orientation: landscape) and (max-height: 560px) {
  #s-title.screen { padding-top: calc(8px + var(--safe-t)); padding-bottom: calc(8px + var(--safe-b)); }
  #s-title .title-card { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 36px); width: 100%; max-width: 860px; }
  #s-title .title-hero { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; max-width: 420px; }
  #s-title .title-card > .menu { flex: 0 1 clamp(248px, 44vw, 340px); width: auto; min-width: 248px; gap: 7px; } /* (an iPhone SE on its side: the logo's column keeps room for the tagline on one line) */
  #s-title .logo { font-size: clamp(2.5rem, 7vw, 3.375rem); text-shadow: 3px 3px 0 var(--gold); }
  #s-title .tagline { margin-top: 2px; font-size: 0.875rem; }
  #s-title .hd-banner { max-width: 260px; margin: 0 0 -6px; }
  #s-title .cast-stage { --ch: 215px; --cw: 110px; margin-top: 2px; }
  #s-title .cast-hint { margin: 2px 0 0; font-size: 0.75rem; }
  #s-title .menu > .btn:not(.btn-continue) { padding-top: 9px; padding-bottom: 9px; font-size: 1.0625rem; }
  #s-title .btn-continue { padding-top: 5px; padding-bottom: 5px; }
  #s-title .tc-go { font-size: 1rem; }
  #s-title .tc-name { font-size: 0.8125rem; }
  #s-title .title-wallet { margin-top: 0; padding-top: 4px; padding-bottom: 4px; }
}
.eyebrow { margin: 0; font-size: 0.8125rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-wrap: balance; }
.logo { margin: 0; font-size: clamp(4rem, 20vw, 6rem); line-height: .95; font-weight: 900; letter-spacing: -.03em;
  color: var(--ink); text-shadow: 4px 4px 0 var(--gold); }
.tagline { margin: 8px 0 0; font-size: 1.125rem; font-weight: 700; }
.hero { width: 170px; height: auto; margin: 10px 0 6px; animation: bob 2.4s ease-in-out infinite; }
.hero-photo { width: 150px; margin: 6px 0 4px; }
@media (max-height: 700px) { .hero-photo { width: 110px; } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }

/* [menutidy] Title-screen cast: the full cast gathered around the real Charlie, a group shot (the owner, October 25, 2026: "in that
   screen we want more people to be around the dog we want the full cast and when you click on a person they come to the front").
   title-cast.js places everyone (inline left/width/height/bottom/z-index, class .placed: rows, the back ones higher and smaller,
   Charlie in the middle front) and brings whoever is tapped to the front (.front: --fx/--fy/--fs, over everyone, their name up). */
.cast-stage { --ch: 293px; --cw: 150px; direction: ltr; /* [s85] the group shot keeps its places in right to left */ position: relative; width: 100%; max-width: 400px; height: calc(var(--ch) + 12px); margin: 8px 0 0; }
@media (max-height: 700px) { .cast-stage { --ch: 215px; --cw: 110px; } }
@media (min-height: 820px) { .cast-stage { --ch: 340px; } } /* [menutidy] a tall phone has the room: the crowd's three rows get it */
.cast-stage .hero-photo { position: absolute; z-index: 40; bottom: 6px; left: 50%; width: var(--cw); margin: 0 0 0 calc(var(--cw) / -2); -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
/* [castintro] the easter egg's ring over the real Charlie while he's held (public/meet.js egg()): it comes up after a moment (a tap or a
   pet never shows it) and fills over the five seconds, a paw in the middle; drawn, never an emoji */
.egg-ring { position: absolute; z-index: 45; width: 58px; height: 58px; margin: -29px 0 0 -29px; pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .25s ease-out, transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.egg-ring.on { opacity: 1; transform: none; }
.egg-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--paper); box-shadow: 0 var(--drop-small) 0 var(--ink); }
.egg-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.egg-ring circle { fill: none; stroke-width: 5; }
.egg-ring .egg-track { stroke: var(--ink); opacity: .2; }
.egg-ring .egg-fill { stroke: var(--gold); stroke-linecap: round; }
.egg-ring .ui-i { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; }
html.calm .egg-ring { transform: none; transition: opacity .2s; }
.cs { position: absolute; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; bottom: 6px; height: 40%; width: 12%;
  transform-origin: 50% 100%; outline-offset: 4px; border-radius: var(--r-field); cursor: pointer;
  opacity: 0; transform: translateY(36px) scale(.7); transition: opacity .35s ease-out, transform .5s cubic-bezier(.3, 1.7, .5, 1), translate .45s cubic-bezier(.3, 1.3, .5, 1), scale .45s cubic-bezier(.3, 1.3, .5, 1); }
.cs.in { opacity: 1; transform: none; }
.cast-stage .cs.front { translate: var(--fx, 0) var(--fy, 0); scale: var(--fs, 1); z-index: 60 !important; } /* (over everyone but the kids and pets at the very front: z 70) */
.cast-stage .cs { min-width: 24px; } /* [web2] everyone at least 24 px wide to tap (WCAG 2.2 target size: the back row was 23 px at 375 px; the picture stays centred in the box, at most a pixel or two over) */
.cs.small::before { content: ""; position: absolute; left: 50%; bottom: 0; width: max(100%, 44px); height: max(100%, 44px); transform: translateX(-50%); } /* (someone small, a pet on a phone: 44 px to tap all the same) */
.cs img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 100%; pointer-events: none; -webkit-user-drag: none; }
/* the rows behind stand on risers: their lower half fades into the crowd (no feet floating between the front row's), all of them
   once they step to the front */
.cs[data-row="1"]:not(.front) img, .cs[data-row="2"]:not(.front) img { -webkit-mask-image: linear-gradient(to top, transparent 0, rgba(0,0,0,.06) 10%, rgba(0,0,0,.24) 20%, rgba(0,0,0,.55) 30%, rgba(0,0,0,.84) 40%, rgba(0,0,0,.95) 45%, #000 50%); mask-image: linear-gradient(to top, transparent 0, rgba(0,0,0,.06) 10%, rgba(0,0,0,.24) 20%, rgba(0,0,0,.55) 30%, rgba(0,0,0,.84) 40%, rgba(0,0,0,.95) 45%, #000 50%); }
/* [s3] the rows behind fade on an eased ramp (a straight one left a band at the knees): TitleView.swift CastStage.fadeStops */
.cs-parakeet:not(.front) img { -webkit-mask-image: none; mask-image: none; }
.cs .cs-cap, .cs-charlie-tag { position: absolute; left: 50%; bottom: -4px; z-index: 9; white-space: nowrap; pointer-events: none;
  padding: 3px 9px; border: calc(var(--edge-w) - .5px) solid var(--edge); border-radius: var(--r-pill); background: var(--gold); color: #1D1A1F;
  font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; line-height: 1.25;
  opacity: 0; transform: translate(-50%, 6px) scale(.8); transition: opacity .2s, transform .25s cubic-bezier(.3, 1.7, .5, 1); }
/* the name: the one at the front (its own tag, .cs-front-cap, over everyone), and whoever has the focus or the pointer (never everyone at once) */
.cs.front .cs-cap { display: none; }
.cs:not(.front):focus-visible .cs-cap, .cast-stage.tag-charlie .cs-charlie-tag { opacity: 1; transform: translate(-50%, 0) scale(1); }

.cs-front-cap { position: absolute; z-index: 90; left: 50%; bottom: 0; white-space: nowrap; pointer-events: none; padding: 3px 9px; border: calc(var(--edge-w) - .5px) solid var(--edge); border-radius: var(--r-pill);
  background: var(--gold); color: #1D1A1F; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; line-height: 1.25;
  opacity: 0; transform: translate(-50%, 6px) scale(.8); transition: opacity .2s .25s, transform .25s .25s cubic-bezier(.3, 1.7, .5, 1); }
.cs-front-cap.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.cs-hover-cap { z-index: 91; background: var(--paper); color: var(--ink); transition: opacity .15s, transform .2s cubic-bezier(.3, 1.7, .5, 1); } /* (a mouse over someone: their name, by who's drawn under it, title-cast.js) */
.cs-charlie-tag { z-index: 45; bottom: -8px; background: var(--paper); color: var(--ink); }
.cast-stage .cs:focus-visible:not(.front) { z-index: 58 !important; } /* (the one the keyboard is on, over the crowd; the front one stays in front) */
/* Keep the edge names on screen: whoever stands at either end (title-cast.js sets .edge-l / .edge-r). */
.cs.edge-l:not(.front) .cs-cap { left: 0; transform: translate(0, 6px) scale(.8); }
.cs.edge-r:not(.front) .cs-cap { left: auto; right: 0; transform: translate(0, 6px) scale(.8); }
.cs.edge-l:not(.front):focus-visible .cs-cap, .cs.edge-r:not(.front):focus-visible .cs-cap { transform: none; }

/* [hook] Aunty's left hand, once the first encounter has played (game.js syncHookArt: <html class="aunty-hook">): a pirate hook,
   drawn over lf-aunty-tipsy.webp (126 × 436) at her left hand (CHARACTER_BIBLE.md: everywhere she appears). The app: AuntyHookArt. */
.aunty-hook .cs-aunty::after { content: ""; position: absolute; left: 73%; top: 39.45%; width: 41.27%; height: 13.3%; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='92 172 52 58'%3E%3Crect x='96' y='176' width='28' height='18' rx='5' fill='%233A3F48' stroke='%231D1A1F' stroke-width='3.5'/%3E%3Cpath d='M110 192 L110 208 A12 12 0 1 0 132.7 202.6' fill='none' stroke='%231D1A1F' stroke-width='13' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M110 192 L110 208 A12 12 0 1 0 132.7 202.6' fill='none' stroke='%23D9DEE6' stroke-width='7' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='108.5' cy='197' r='2.4' fill='%23fff'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
/* (the hook sways with her: the same animation, turning about her feet, the box's bottom middle, from the hook's own box) */
.aunty-hook .cs-aunty.in::after { animation: cs-tipsy 2.6s ease-in-out infinite; animation-delay: var(--fd, 0s); transform-origin: -55.7% 455%; }
html.calm .aunty-hook .cs-aunty.in::after { animation: none; }
/* Everyone fidgets in their own way (each at their own pace: title-cast.js staggers the delays). */
.cs.in img { animation: cs-breathe 3.2s ease-in-out infinite; animation-delay: var(--fd, 0s); }
.screen:is(.scr-in, .scr-out) .cs.in :is(img, .cs-costume) { animation-play-state: paused; } /* [s53] the cast holds still while its screen slides (their breathing under the slide stuttered it) */
.cs-grandpa.in img { animation-name: cs-shuffle; animation-duration: 3.8s; }
.cs-maid.in img { animation-name: cs-sweep; animation-duration: 1.3s; }
.cs-aunty.in img { animation-name: cs-tipsy; animation-duration: 2.6s; }
.cs-nichole.in img, .cs-assistant.in img, .cs-receptionist.in img { animation-name: cs-sway; animation-duration: 3s; }
.cs-mija.in img, .cs-puppy.in img { animation-name: cs-bounce; animation-duration: 1.6s; }
.cs-parakeet.in img { animation-name: cs-bob; animation-duration: .9s; }
.cs-boss.in img, .cs-super.in img { animation-name: cs-shake; animation-duration: 2.4s; }
@keyframes cs-sway { 50% { transform: rotate(2deg) translateY(-2px); } }
@keyframes cs-breathe { 50% { transform: translateY(-3px) rotate(-1deg); } }
@keyframes cs-shuffle { 25% { transform: translateX(-3px) rotate(-1.5deg); } 75% { transform: translateX(3px) rotate(1.5deg); } }
@keyframes cs-sweep { 50% { transform: translateX(-6px) rotate(-2deg); } }
@keyframes cs-tipsy { 30% { transform: rotate(-5deg) translateX(-3px); } 70% { transform: rotate(4deg) translateX(2px); } }
@keyframes cs-bounce { 50% { transform: translateY(-4px); } }
@keyframes cs-bob { 50% { transform: translateY(-3px) rotate(-6deg); } }
/* Fluffy's moods (title-cast.js swaps the picture). */
.cs-fluffy.volcano img { filter: drop-shadow(0 0 10px rgba(255, 110, 20, .85)); animation: cs-shake .14s linear infinite; }
.cs-fluffy.devil img { filter: drop-shadow(0 0 12px rgba(200, 16, 46, .9)); animation: cs-menace 1.1s ease-in-out infinite; }
@keyframes cs-shake { 25% { transform: translateX(-2px) rotate(-1deg); } 75% { transform: translateX(2px) rotate(1deg); } }
@keyframes cs-menace { 50% { transform: scale(1.06); } }
.cast-hint { margin: 10px 0 12px; font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
/* [holidays] every major holiday (title-cast.js, public/holidays.js; [halloween] was the first): the banner over the crowd (its words
   in the holiday's ink, as big as Halloween's or smaller for the long ones: --hd-fit, in hundredths of the banner's width), everyone's
   piece, moving as their picture moves, and the real Charlie's (.hd-hero, over his photo); the banner's lights twinkle, its flames flicker */
.hd-banner { position: relative; width: 100%; max-width: 400px; margin: 4px 0 -6px; }
.hd-banner svg { display: block; width: 100%; height: auto; overflow: visible; }
.hd-words { position: absolute; left: 50%; top: 66%; transform: translate(-50%, -50%); white-space: nowrap; font: 900 22px/1 ui-rounded, system-ui, sans-serif; font-size: min(22px, calc(var(--hd-fit, 5.5) * 1cqw)); letter-spacing: .06em; text-transform: uppercase; color: var(--hd-ink, #F07C1E); -webkit-text-stroke: 1.5px #2A2320; paint-order: stroke fill; text-shadow: 0 2px 0 #2A2320; }
.cast-stage .hd-hero { position: absolute; z-index: 41; overflow: visible; pointer-events: none; }
.hd-tw { animation: hd-tw 1.8s ease-in-out infinite; }
@keyframes hd-tw { 50% { opacity: .3; } }
.hd-fl { transform-box: fill-box; transform-origin: 50% 100%; animation: hd-fl .45s ease-in-out infinite alternate; }
@keyframes hd-fl { to { transform: scale(.9, .82); opacity: .82; } }
html.calm .hd-tw, html.calm .hd-fl { animation: none; }
.cs .cs-costume { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; transform-origin: 50% 100%; z-index: 2; }
.cs.in .cs-costume { animation: cs-breathe 3.2s ease-in-out infinite; animation-delay: var(--fd, 0s); }
.cs-grandpa.in .cs-costume { animation-name: cs-shuffle; animation-duration: 3.8s; }
.cs-maid.in .cs-costume { animation-name: cs-sweep; animation-duration: 1.3s; }
.cs-aunty.in .cs-costume { animation-name: cs-tipsy; animation-duration: 2.6s; }
.cs-nichole.in .cs-costume, .cs-assistant.in .cs-costume, .cs-receptionist.in .cs-costume { animation-name: cs-sway; animation-duration: 3s; }
.cs-mija.in .cs-costume { animation-name: cs-bounce; animation-duration: 1.6s; }
.cs-boss.in .cs-costume, .cs-super.in .cs-costume { animation-name: cs-shake; animation-duration: 2.4s; }
.cs-fluffy.volcano .cs-costume { animation: cs-shake .14s linear infinite; }
.cs-fluffy.devil .cs-costume { animation: cs-menace 1.1s ease-in-out infinite; }
html.calm .cs.in .cs-costume, html.calm .cs-fluffy.volcano .cs-costume, html.calm .cs-fluffy.devil .cs-costume { animation: none; }
/* [batwings] the real Charlie's bat wings, behind his photo (his shoulders about 40% down it: the photo is 600 × 1170) */
.cast-stage .hw-wings { position: absolute; z-index: 39; left: 0; width: 0; bottom: 0; pointer-events: none; } /* (title-cast.js puts them behind his photo, wherever it stands) */
.hw-wings svg { display: block; width: 100%; height: auto; overflow: visible; }
.hw-wing { transform-box: fill-box; transform-origin: 0 78%; animation: hw-flap 1.6s ease-in-out infinite; } /* (each from where it meets his back; the left one's mirror flaps it the other way) */
@keyframes hw-flap { 50% { transform: rotate(-9deg); } }
html.calm .hw-wing { animation: none; }
/* (they appear and stand still; the one tapped is at the front at once, no glide) */
  html.calm .cs, html.calm .cs .cs-cap, html.calm .cs-front-cap { transition: none; }
  html.calm .cs.in img, html.calm .cs-fluffy.volcano img, html.calm .cs-fluffy.devil img { animation: none; }
.menu { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.menu-row { display: flex; gap: 8px; }
.surv-list { margin-top: 12px; }
.surv-list .surv-sub { display: block; margin: 2px 0 0; overflow-wrap: anywhere; } /* [survival] the place's name and best, under it */
/* [s63] each place: its own art (60 × 48) beside the words, the place's name leading at 20px, the mode's name and its best a line each (13px); the art over the words on a very
   narrow screen (App/SurvivalChooser.swift placeLabel) */
.surv-list .btn { display: flex; align-items: center; gap: 14px; text-align: start; padding-inline-start: 17px; }
.surv-list .surv-art { flex: none; width: 60px; height: 48px; object-fit: contain; }
.surv-list .surv-words { flex: 1; min-width: 0; }
.surv-list .surv-place { display: block; font-size: 1.25rem; font-weight: 900; line-height: 1.15; }
.surv-list .surv-stat { margin-top: 0; } /* [s63] the best under the mode's name */
@media (max-width: 300px) { .surv-list .btn { flex-direction: column; gap: 6px; text-align: center; padding-inline-start: 18px; } .surv-list .surv-art { height: 40px; } }
.menu-row .btn { flex: 1; }
.btn-settings { position: relative; }
/* [menutidy] the What's new badge on ⚙️ Game Settings (and "New" on its What's new row) until /whats-new is opened for the newest
   release: <html class="wn-new">, set by the whatsnew:line block (scripts/content.ts). It replaced the title's "✨ New: …" line. */
.wn-badge { display: none; }
.wn-new .btn-settings .wn-badge { display: block; position: absolute; top: -7px; inset-inline-end: -7px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--red); border: 2.5px solid var(--ink); box-shadow: 0 var(--drop-small) 0 var(--shadow); }
.wn-new .set-row .wn-badge { display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--red); color: #fff;
  border: 2px solid var(--ink); font-size: 0.75rem; font-weight: 900; letter-spacing: .04em; vertical-align: 1px; }
/* [menutidy] Player Guides: Learn (the big buttons), then More ways to play and Bonus extras (small ones, two or three to a row) */
.pg-h { width: 100%; margin: var(--s-section) 0 var(--s-label) var(--s-1); font-size: 0.8125rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left; }
.panel > .pg-h:first-of-type { margin-top: var(--s-1); }
.guide-menu { margin-top: 0; }
.guide-menu a.btn { text-align: center; text-decoration: none; color: #1D1A1F; } /* (Charlie’s Guide is a link to /guide, dressed as a button; dark words on its pastel blue in both themes, like the dark theme’s .btn-day) */
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s-stack); }
.panel .menu { gap: var(--s-stack); } /* [s98] (10: 6 between the buttons, the app's 10) */
.panel :is(.menu, .pg-grid) > .btn, .panel-center > .btn, .card-foot > .btn { margin-bottom: var(--s-ledge); } /* [s98] the ledge takes room, as ChunkyButton's (the grid's rows sat 4 apart, the app's 8) */
.pg-grid .btn { display: flex; align-items: center; justify-content: center; min-height: 48px; text-align: center; text-decoration: none; color: var(--ink); }
.pg-grid .btn-dawn, .pg-grid .btn-extras, .pg-grid .btn-meadow { color: #1D1A1F; } .pg-grid .btn-meadow { background: #CDE8C0; } /* [s14] Survival in its own colour, as Daily Walk and Top Dogs */
.pg-grid.pg-three { grid-template-columns: repeat(auto-fit, minmax(max(100px, 6.5em), 1fr)); } /* [s98] 6.5em (7): still three in a row inside the page margin */ /* [s14] More ways to play: the three in one row */
/* [menutidy] Game Settings: the old footer's buttons and links as rows on paper cards */
.set-group { width: 100%; display: flex; flex-direction: column; border: var(--edge-w) solid var(--edge); border-radius: var(--r-button); background: var(--paper); box-shadow: 0 var(--drop-button) 0 var(--shadow); overflow: hidden; }
.set-row { display: flex; align-items: center; width: 100%; min-height: 50px; padding: var(--s-row) var(--s-4); border: 0; background: none;
  color: var(--ink); font-size: 1.0625rem; font-weight: 800; text-align: left; text-decoration: none; cursor: pointer; }
.set-row ~ .set-row { border-top: 2px solid var(--line); } /* (a line between rows: not over the first, whatever sits between them) */
.set-row:hover { background: var(--cream); }
.set-row:disabled { color: var(--muted); font-weight: 600; cursor: default; } .set-row:disabled:hover { background: none; } /* [s71] off, still readable: the muted ink (AA on paper in both themes and Increase Contrast), never half opacity (was .5: 2.4:1) */
.set-go::after { content: ""; flex: none; box-sizing: content-box; align-self: flex-start; margin-block-start: calc((1lh - .72em) / 2 + .06em); margin-inline-start: auto; width: .46em; height: .72em; padding-inline-start: 12px; background: var(--muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 14'%3E%3Cpath d='M2.5 2l5 5-5 5' fill='none' stroke='%23000' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 14'%3E%3Cpath d='M2.5 2l5 5-5 5' fill='none' stroke='%23000' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; -webkit-mask-origin: content-box; mask-origin: content-box; } /* [s96] Icons: the row role, drawn as the app's chevron.forward (heavy, 14 at the ui scale): it was the "›" glyph at 22px, thin and its own size; em, so it grows with the text; centred on the first line (1lh) of a row that wraps, as the app's firstTextBaseline */
.set-go[target="_blank"]::after { width: .68em; height: .68em; margin-top: calc((1lh - .68em) / 2 + .06em); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.8 10.2 10 2M3.8 1.8H10.2v6.4' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.8 10.2 10 2M3.8 1.8H10.2v6.4' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; -webkit-mask-origin: content-box; mask-origin: content-box; } /* [s96] a row that opens a new tab: the app's ↗ (OutLinkRow), not ›, so the role reads the same on both */
:dir(rtl) .set-go::after { transform: scaleX(-1); padding-inline: 0 12px; } /* [release39] s85 x s96: the drawn chevron points forward right to left too; the flip moves the box's padding, so it starts on the other side to land next to the words */
@media (forced-colors: active) { .set-go::after { forced-color-adjust: none; background: ButtonText; } }
#s-settings .get-app { margin-top: 18px; }
/* [foundation35] About the Foundation (#s-foundation: a paper card with the Foundation's words, then its links as rows) and Made possible by
   (#s-credits: each section's credits as rows, a sponsor's logo beside its name); both from content/credits.json (scripts/credits.mjs) */
.fd-card { margin: 0 0 var(--s-card); padding: 18px 18px 6px; border: var(--edge-w) solid var(--edge); border-radius: var(--r-button); background: var(--paper); box-shadow: 0 var(--drop-button) 0 var(--shadow); }
.fd-lead { margin: 0 0 14px; font-size: var(--rt-lead); line-height: var(--rt-lh); font-weight: 600; } /* [s66] the reading scale's lead */
.fd-quote { margin: 0 0 14px; padding-block: 2px; padding-inline: 14px 0; border-inline-start: 5px solid var(--gold); }
.fd-quote blockquote { margin: 0; }
.fd-quote blockquote p { margin: 0; font-size: var(--rt-title); line-height: 1.35; font-weight: 800; font-style: italic; }
.fd-quote figcaption { margin-top: 6px; font-size: var(--rt-caption); font-weight: 700; color: var(--muted); }
.fd-text { margin: 0 0 12px; font-size: var(--rt-body); line-height: var(--rt-lh); font-weight: 500; } /* [s66] body */
.fd-links { margin-bottom: 8px; }
.cr-list { list-style: none; margin: 0; padding: 0; border: var(--edge-w) solid var(--edge); border-radius: var(--r-button); background: var(--paper); box-shadow: 0 var(--drop-button) 0 var(--shadow); overflow: hidden; }
.cr-entry { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.cr-entry + .cr-entry { border-top: 2px solid var(--line); }
.cr-logo { flex: none; width: 56px; height: 56px; object-fit: contain; border-radius: var(--r-field); background: #fff; }
.cr-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-name { font-size: var(--rt-name); font-weight: 900; color: var(--ink); overflow-wrap: anywhere; }
a.cr-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cr-line { font-size: var(--rt-secondary); line-height: var(--rt-lh-small); font-weight: 600; color: var(--muted); }
#s-credits .panel { padding-bottom: 24px; }
.link:disabled { text-decoration: none; cursor: default; } /* [s71] off: it loses its underline (a link already wears the muted ink), never half opacity (was .5: under 2:1) */

.btn { display: block; width: 100%; padding: 15px 18px; border: var(--edge-w) solid var(--edge); border-radius: var(--r-button); background: var(--paper);
  font-size: 1.125rem; font-weight: 800; box-shadow: 0 var(--drop-button) 0 var(--shadow); transition: transform .06s, box-shadow .06s; }
.btn:active { transform: translateY(3px); box-shadow: 0 var(--drop-pressed) 0 var(--shadow); }
/* [polish2] disabled (e.g. Submit after sending): no fill colour and no drop shadow, muted words and border (still 5:1+ on the
   cream, both themes), sitting where a pressed button sits (ChunkyButton in the apps) */
.btn:disabled, .btn:disabled:active { background: var(--cream); color: var(--muted); border-color: var(--muted); border-style: dashed; box-shadow: none; transform: translateY(3px); cursor: default; } /* [s83] Unavailable controls (docs/art/TOKENS.md): cream face, muted words, dashed muted edge, no shadow */
.btn-primary { background: var(--gold); }
.btn-small { padding: 10px 8px; font-size: 0.9375rem; border-radius: var(--r-field); }
.link { background: none; border: 0; padding: 8px; color: var(--muted); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; font-size: 0.875rem; }
.muted { color: var(--muted); }

.panel { width: 100%; max-width: 480px; margin: 0 auto; padding-inline: calc(var(--s-page) - 16px); } /* [s98] the page margin past .screen's 16 (the app's 20) */
#s-how .panel, #s-a11yguide .panel, #s-foundation .panel { max-width: min(480px, var(--measure)); } /* [s72] the reading panels (PanelPage(reading:)): never past the reading measure, whatever widens .panel */
.pause-daily { margin: 0; font-size: 0.8125rem; font-weight: 700; color: var(--muted, #6B6470); } /* [qa4fix] (the apps' DailyPauseNote) */
#pauseAskP { margin: 0; font-size: 1rem; line-height: 1.4; }
.panel-center { margin: auto; text-align: center; display: flex; flex-direction: column; gap: var(--s-stack); align-items: stretch;
  background: var(--paper); border: var(--edge-w) solid var(--edge); border-radius: var(--r-panel); padding: 22px 18px; box-shadow: 0 var(--drop-card) 0 var(--shadow); max-width: 400px; }
.panel-center h2 { margin: 0; font-size: 1.875rem; line-height: 1.1; }
/* [bugs35] The mission card's "Let's go, Charlie", the pause card's Keep going … Quit to menu and the result card's buttons sat below
   the bottom of an 800-pixel window (the November 4, 2026 playtest): they're the card's foot now, held at the bottom of the screen
   while the card scrolls under it (sticky: at rest, where they always were). A card that runs past the screen gets a shadow over its
   foot (.overflows, game.js footFit). A short screen (body.short: under 900 CSS px of room at the HUD's scale, resize()) puts the pause
   card's other buttons in two columns under Keep going, so its foot never fills the screen. The apps: Screens.swift PauseView. */
.card-foot { position: sticky; bottom: calc(-16px / var(--ui, 1)); z-index: 1; display: flex; flex-direction: column; gap: var(--s-stack); align-items: stretch;
  margin: 0 -18px -22px; padding: 0 18px 22px; background: var(--paper); border-radius: 0 0 calc(var(--r-panel) - var(--edge-w)) calc(var(--r-panel) - var(--edge-w)); } /* (bottom: past the screen's 16px padding, to its edge: sticky stops at the scroller's padding; at the HUD's scale) */
.overflows .card-foot { padding-top: 10px; padding-bottom: 16px; border-top: 2px solid var(--line); box-shadow: 0 -10px 12px -10px rgba(29, 26, 31, .35), 0 var(--safe-b) 0 0 var(--paper); }
/* [s86] a page's foot (Top Dogs' Play Survival / Daily Walk): on the cream page, no card, so no paper and no negative margins. At rest
   it sits where the button always did; when the page runs past the screen (.overflows) it's pinned at the bottom as a bar: cream to the
   window's edges, a 2px rule on top and a 16px fade above it, the sign there's more (border-image paints past the box without widening
   the scroll). The apps: PanelPage(pinned:) on PinnedScroll; docs/art/TOKENS.md "Pinned bars". */
.page-foot { margin: 14px 0 0; padding: 0; background: none; border-radius: 0; }
.page-foot > .board-play { margin-top: 0; }
.overflows .page-foot { padding: 10px 0 16px; border-top: 0; box-shadow: none; background: var(--cream);
  border-image: linear-gradient(rgba(255, 255, 255, 0), var(--cream) 16px, var(--line) 16px 18px, var(--cream) 18px) fill 0 / 0 / 16px 100vmax var(--safe-b, 0px) 100vmax; }
html.see-opaque .overflows .page-foot { border-image: linear-gradient(var(--line) 0 2px, var(--cream) 2px) fill 0 / 0 / 0 100vmax var(--safe-b, 0px) 100vmax; } /* (Reduce Transparency: the rule alone, no fade) */
body.short .pause-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.short .pause-foot > .btn-primary { grid-column: 1 / -1; }
body.short .pause-foot > .btn:not(.btn-primary) { padding: 10px 6px; font-size: 0.9375rem; line-height: 1.15; border-radius: var(--r-button); }
.panel-head { display: flex; align-items: center; gap: 12px; /* [s58] room for the focus ring, as the apps */ margin-bottom: var(--s-header); }
.panel-head h2 { margin: 0; font-size: 1.625rem; }
.back { width: 44px; height: 44px; flex: none; border: var(--edge-w) solid var(--edge); border-radius: var(--r-field); background: var(--paper); font-size: 0; line-height: 1; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.back::before { content: ""; width: 9px; height: 16px; margin-inline-start: -2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 16'%3E%3Cpath d='M7 1 1 8l6 7' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 16'%3E%3Cpath d='M7 1 1 8l6 7' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; } /* [s13] the chevron drawn, the "‹" glyph was thin (Theme.swift BackChevron); the "‹" stays as the button's text for anything without CSS */

/* ---------- Levels ---------- */
.levels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
body.tablet #s-levels .panel { max-width: 860px; }
body.tablet .levels { display: grid; grid-template-columns: 1fr 1fr; } /* iPad and Mac: missions in two columns */
.lvl { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border: var(--edge-w) solid var(--edge);
  border-radius: var(--r-button); background: var(--paper); box-shadow: 0 var(--drop-button) 0 var(--shadow); }
.lvl:disabled { opacity: .5; box-shadow: none; cursor: default; }
.lvl-num { flex: none; width: 44px; height: 44px; border-radius: var(--r-field); background: var(--gold); border: var(--edge-w) solid var(--edge);
  display: grid; place-items: center; font-weight: 900; font-size: 1.25rem; }
.lvl-body { flex: 1; min-width: 0; }
.lvl-name { display: block; font-weight: 800; font-size: 1.0625rem; }
.lvl-who { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 2px; }
.lvl-stars { flex: none; font-size: 0.9375rem; letter-spacing: 1px; }
.lvl-endless .lvl-num { background: var(--red); color: #fff; }
.lvl:disabled .lvl-num { background: var(--line); } /* locked: no gold, so the one mission you can play is the only gold on the list (faded gold read as dirty) */
/* [holidaylevels] Mission Mode's Holiday row: the limited-time levels, above the numbered missions (game.js renderHolRow) */
.hol-row { margin: 0 0 16px; }
.hol-head { margin: 0 0 8px; font-size: 0.9375rem; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.lvl-hol { background: #FFF4E2; }
[data-theme="dark"] .lvl-hol { background: #3A2A1E; }
.hol-tile { background: #2A2233; }
.hol-tile svg { display: block; }
.hol-badge { display: inline-block; margin-top: 4px; padding: 1px 9px; border: calc(var(--edge-w) - 1px) solid var(--edge); border-radius: var(--r-pill); background: #F2B33D; color: #1D1A1F; font-size: 0.75rem; font-weight: 900; }
.hol-chip { display: inline-block; align-self: center; margin: 4px auto 2px; padding: 3px 12px; border: calc(var(--edge-w) - .5px) solid var(--edge); border-radius: var(--r-pill); background: #F2B33D; color: #1D1A1F; font-size: 0.875rem; font-weight: 900; }

/* ---------- Intro ---------- */
.intro-cast { display: flex; justify-content: center; gap: 8px; min-height: 128px; margin-top: 6px; } /* [u4] the cast large: the card's picture, not thumbnails (Screens.swift CastStand) */
.intro-cast > * { min-width: 0; flex-shrink: 1; } .intro-cast > img:not(.pet) { flex-shrink: 0; } /* (a crowded row shrinks rather than spill off the card, the pets giving way first, the people kept: Mission 36; the app's HStack the same) */
.intro-cast img { height: 133px; width: auto; padding-bottom: 5px; object-fit: contain; object-position: 50% 100%; background: radial-gradient(35% 5px at 50% calc(100% - 5px), var(--stand), transparent) no-repeat; } /* [u4] each on a soft contact shadow, centred on the soles (castStand) */
.intro-cast img.ghost { background: none; } /* (a ghost casts no shadow) */
.intro-cast { align-items: flex-end; direction: ltr; } /* [s85] the line-up is a picture: in right to left it keeps its order (the app's .artNeverMirrors()) */
.intro-cast img.pet { height: 67px; } .intro-cast img.pet[data-play^="pepe"] { height: 73px; } /* (each + its 5px of floor) */ /* (the pets near their size in the world: CastStand.puppy, .pepe) */
.intro-cast img.ghost { opacity: .6; filter: grayscale(1) brightness(1.35) drop-shadow(0 0 6px rgba(160, 210, 255, .9)); } /* [pepe] Mission 16: Pepe's ghost (game.js castImg) */
.intro-text { margin: 0; font-size: 1rem; line-height: 1.45; }
.intro-tip { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--red-deep); background: #FFE9E3; border-radius: var(--r-field); padding: 8px 10px; }
/* [act1-words] the card: two sentences, the keys row (the player's own keys for the input in use), the Story panel and the Side Sniffs folded */
.intro-text.intro-card { font-size: 1rem; font-weight: 500; } /* [s34] the app's weight (17 at 600 read heavy beside it) */
.intro-text .card-line { display: block; }
.intro-text .card-line + .card-line { margin-top: 10px; } /* [s35] the app's gap between the card's two lines (4 ran them together) */
.intro-keys { margin: 0; font-size: 0.875rem; font-weight: 500; line-height: 1.5; color: var(--ink); background: rgba(242, 179, 61, .16); border-radius: var(--r-field); padding: 7px 10px; }
.intro-keys .ck { white-space: nowrap; }
.intro-keys .ck i { font-style: normal; color: var(--muted); }
.intro-keys .ck-dot { color: var(--muted); }
.intro-keys .ck-new { display: inline-block; font-size: 0.6875rem; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; background: var(--gold); color: #1D1A1F; border-radius: var(--r-small); padding: 0 5px; vertical-align: 1px; }
.intro-fold { text-align: left; font-size: 0.875rem; border-top: 2px dashed rgba(107, 100, 112, .35); padding-top: 4px; }
.intro-fold > summary { cursor: pointer; font-weight: 800; color: var(--muted); padding: 4px 0; }
.intro-fold > summary { list-style: none; display: flex; align-items: center; gap: 6px; } .intro-fold > summary::-webkit-details-marker { display: none; } /* [s41] the app's chevron, not the browser's ▸ (Act1CardViews.swift FoldRow) */
.intro-fold > summary::before { content: ""; display: inline-block; vertical-align: middle; width: 8px; height: 12px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M2 2l4 4-4 4' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M2 2l4 4-4 4' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .15s ease-out; }
.intro-fold[open] > summary::before { transform: rotate(90deg); }
html.calm .intro-fold > summary::before { transition: none; }
/* [s85] Right to left (docs/art/TOKENS.md "Right to left: layout"): the chevrons that point the way you read turn round (the app's
   Shapes do by themselves); the disclosure still opens downwards. Spacing and edges are logical (margin-inline, inset-inline-end,
   border-inline-start), so the rest mirrors with dir="rtl" alone. */
:dir(rtl) .back::before { transform: scaleX(-1); }
:dir(rtl) .intro-fold > summary::before { transform: rotate(0deg) scaleX(-1); }
:dir(rtl) .intro-fold[open] > summary::before { transform: rotate(-90deg) scaleX(-1); } /* ([s41] Reduce Motion: the game's own switch, html.calm, never the media query alone) */
@media (forced-colors: active) { .intro-fold > summary::before { forced-color-adjust: none; background: ButtonText; } }
.intro-fold > p { margin: 4px 0 2px; line-height: 1.45; }
/* [s70] the mission card reads in order: place and time, title, cast, story, how to play, Let's go (docs/art/TOKENS.md "The mission
   card"; the app's MissionCard, Act1CardViews.swift). The story at the reading body, 17 at 500 and 1.5 (s66's --rt body), the long
   paragraph ranged left; how to play (the keys row, the older cards' tip) one quiet band at 15, after the story; a wide window's card
   at 580, so the story runs about 60 characters a line, not a 340-pixel column */
#introText { font-size: 1.0625rem; font-weight: 500; line-height: 1.5; }
#introText:not(.intro-card) { text-align: left; }
#introStory > p { font-size: 1.0625rem; line-height: 1.5; }
#introTip, #introKeys { font-size: 0.9375rem; font-weight: 500; line-height: 1.5; color: var(--ink); background: rgba(242, 179, 61, .16); padding: 7px 10px; }
[data-theme="dark"] #introTip, [data-theme="dark"] #introKeys { background: rgba(242, 179, 61, .12); }
html.see-opaque #introTip, html.see-opaque #introKeys { background: #FDF1DA; }
html.see-opaque[data-theme="dark"] #introTip, html.see-opaque[data-theme="dark"] #introKeys { background: #3F332E; }
@media (min-width: 760px) { #s-intro .panel-center { max-width: 580px; } }
.intro-fold .sniffs { margin-top: 4px; }
.res-story { text-align: left; max-height: 38vh; overflow: auto; font-size: 0.875rem; }
.res-story h3 { margin: 4px 0; font-size: 0.9375rem; }
.res-story .story-recap { margin: 0; padding-left: 0; list-style: none; }
.res-story .story-recap li { margin: 0 0 6px; line-height: 1.4; }
.res-story .sr-label { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.res-story .sr-more { font-weight: 700; }

/* ---------- Result ---------- */
.stars { font-size: 2.5rem; letter-spacing: 4px; min-height: 48px; }
.stars .off { filter: grayscale(1); opacity: .3; }
.res-line { margin: 0; font-size: 1rem; }
#resNext[hidden] ~ #resRoam[hidden] ~ #resRetry { background: var(--gold); color: #1D1A1F; } /* no Next mission: Try again is the card's main button (every card has one gold button) ([w1] it was `+`, which never matched: #resRoam and #resAuto sit between) */
.res-score { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; text-align: left; font-size: 0.9375rem;
  background: var(--cream); border-radius: var(--r-field); padding: 10px 12px; }
.res-score dt { color: var(--muted); }
.res-score dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; } /* [s10] the figures in a column */
.res-score .total { font-size: 1.125rem; color: var(--ink); border-top: 2px dashed var(--line); padding-top: 6px; }
.submit { text-align: left; display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 0.875rem; }
.submit-row { display: flex; gap: 8px; }
.submit-row input { flex: 1; min-width: 0; padding: 10px 12px; border: var(--edge-w) solid var(--edge); border-radius: var(--r-field); font-size: 1rem; background: #fff; }
.submit-row .btn { width: auto; }
.submit-msg { margin: 0; font-size: 0.8125rem; color: var(--muted); min-height: 1em; }

/* ---------- How / cast / board ---------- */
.how { background: var(--paper); border: var(--edge-w) solid var(--edge); border-radius: var(--r-card); padding: 4px 16px 12px; line-height: var(--rt-lh); font-size: var(--rt-body); font-weight: 500; } /* [s66] the reading scale's body */
.how h3 { margin: 16px 0 4px; font-size: var(--rt-title); font-weight: 900; }
.how p { margin: 6px 0; }
.how-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.how-list li { display: flex; gap: 10px; }
.how-list span { font-size: 1.5rem; line-height: 1.2; }
.board { list-style: none; margin: 0; padding: 0; background: var(--paper); border: var(--edge-w) solid var(--edge); border-radius: var(--r-card); overflow: hidden; box-shadow: 0 var(--drop-button) 0 var(--shadow); }
.board li { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 2px solid var(--line); font-size: 1rem; }
.board li:last-child { border-bottom: 0; }
.board .rank { width: 28px; font-weight: 900; color: var(--muted); }
.board .who { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .pts { font-weight: 900; }
/* [states] the board's loading and failure rows: a gentle pulse while it fetches (none with Reduce Motion), why it failed and Try again */
html:not(.calm) .board .board-wait { animation: boardWait 1.2s ease-in-out infinite alternate; } @keyframes boardWait { to { opacity: .45; } }
.board li.board-fail { flex-direction: column; align-items: center; gap: 10px; }
.board li.board-fail .btn { width: auto; color: var(--ink); }
/* [x1] the board's empty and trouble states, designed (TopDogs.swift BoardState): a drawn icon in a soft disc, a heading, the words, centred */
.board li.board-state { flex-direction: column; align-items: center; text-align: center; padding: 20px 16px; }
.board-state [role="alert"], .board li.board-state { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.board li.board-state.board-fail { gap: 10px; }
.board-state .bs-ico { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 50%; background: color-mix(in srgb, var(--line) 60%, transparent); }
[data-theme="dark"] .board-state .bs-ico { background: #E8DCC8; } /* (a light disc in both themes: the icons are painted for light) */
.board-state .bs-ico .ui-i { width: 30px; height: 30px; }
/* [s64] the empty board: Charlie waiting on the empty winner's step (TopDogs.swift EmptyPodium; docs/art/TOKENS.md "Empty states") */
.board-state .bs-podium { position: relative; display: block; width: 100px; height: 134px; margin-bottom: 8px; }
.board-state .bs-disc { position: absolute; left: 0; bottom: 23px; width: 100px; height: 100px; border-radius: 50%; background: color-mix(in srgb, var(--line) 60%, transparent); }
[data-theme="dark"] .board-state .bs-disc { background: #E8DCC8; }
.board-state .bs-podium img { position: absolute; left: 50%; bottom: 30px; z-index: 1; height: 104px; width: auto; transform: translateX(-50%); } /* (his paws just over the step's top edge) */
.board-state .bs-step { position: absolute; left: 2px; bottom: 3px; box-sizing: border-box; display: grid; place-items: center; width: 96px; height: 30px; border: 3px solid var(--ink); border-radius: var(--r-small); background: var(--gold); box-shadow: 0 var(--drop-button) 0 var(--shadow); }
.board-state .bs-podium.bs-today .bs-step { background: #FFC9A3; }
.board-state .bs-step .ui-i { width: 22px; height: 22px; filter: drop-shadow(0 0 1.5px #FFF8EA); } /* (a pale halo: the gold star on the gold step) */
/* [s64 review] the compact star disc stands in for the podium when the text is big for the screen (browser text size or zoom: em media
   queries follow the reader's text size), so the words and Play Survival stay on the first screen (TopDogs.swift: the accessibility sizes) */
.board-state .bs-podium + .bs-ico { display: none; }
@media (max-height: 30em) { .board-state .bs-podium { display: none; } .board-state .bs-podium + .bs-ico { display: grid; } }
.board-state .bs-title { font-size: 1.0625rem; font-weight: 900; color: var(--ink); }
.board-state .bs-text { font-size: 0.9375rem; color: var(--muted); }
.board .me { background: #FFF0C7; }
.board .flag { flex: none; border: 0; background: none; font: inherit; font-size: 1.0625rem; line-height: 1; padding: 0 2px; margin: -4px -4px -4px 0; color: var(--muted); cursor: pointer; min-width: 32px; min-height: 28px; }
.board-note { font-size: 0.875rem; margin: 10px 2px 4px; }
.board-play { margin-top: var(--s-card); } /* the way onto the board from here (#s-scores was a dead end) */
/* [daily] Daily Walk: the dawn button, Top Dogs' two boards, the screen's card, the result card's note */
body[data-screen="daily"] #s-daily { display: flex; flex-direction: column; align-items: center; }
body[data-screen="survival"] #s-survival { display: flex; flex-direction: column; align-items: center; } /* [survival] the chooser */
.btn-dawn { background: #FFC9A3; color: #1D1A1F; }
[data-theme="dark"] .btn-dawn { color: #1D1A1F; }
.board-tabs { display: flex; gap: 8px; margin: 0 0 10px; }
.board-tabs .btn { flex: 1; }
.board-tabs .btn[aria-pressed="true"] { background: var(--gold); color: #1D1A1F; transform: translateY(2px); box-shadow: 0 var(--drop-small) 0 var(--shadow); }
.board-tabs .btn[data-board-tab="today"][aria-pressed="true"] { background: #FFC9A3; }
.daily-card { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 8px; padding: 14px 14px 18px; background: var(--paper); border: var(--edge-w) solid var(--edge); border-radius: var(--r-card); box-shadow: 0 var(--drop-button) 0 var(--shadow); }
.daily-card h3 { margin: 0; font-size: 1.25rem; font-weight: 900; }
.daily-card p { margin: 0; font-size: 0.9375rem; line-height: 1.45; }
.daily-card .daily-date { font-size: 0.8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.daily-card .daily-small { font-size: 0.8125rem; }
.daily-next { font-size: 0.875rem; font-weight: 600; color: var(--muted); margin: 6px 2px 10px; } /* [s19] a quiet line, not a heading */
.daily-res p { margin: 2px 0; font-size: 0.8125rem; font-weight: 700; }
/* [streak] the Daily Walk's streak, five-week calendar and chosen day (game.js renderDailyHistory; apple/App/DailyCalendar.swift) */
.daily-history { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.daily-streak, .daily-cal { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--paper); border: var(--edge-w) solid var(--edge); border-radius: var(--r-card); box-shadow: 0 var(--drop-button) 0 var(--shadow); }
.daily-streak-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.daily-streak h3, .daily-cal h3 { margin: 0; font-size: 1.25rem; font-weight: 900; }
.daily-streak p, .daily-pick p { margin: 0; font-size: 0.875rem; line-height: 1.45; }
.daily-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.daily-wd { text-align: center; font-size: 0.75rem; font-weight: 900; color: var(--muted); }
.daily-day { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 50px; padding: 2px; font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--line); border: 2px solid color-mix(in srgb, var(--muted) 35%, transparent); /* [s19] (DailyCalendar.swift the same; var(--line) where color-mix isn't) */ border-radius: var(--r-small); cursor: pointer; }
.daily-day .dn { font-size: 0.6875rem; font-weight: 800; color: var(--muted); }
.daily-day .ds { font-size: 0.75rem; font-weight: 900; min-height: 1.1em; }
.daily-day .dr { font-size: 0.625rem; font-weight: 900; min-height: 1.1em; }
.daily-day.walked { background: #FFC9A3; color: #1D1A1F; }
.daily-day.walked .dn { color: rgba(29, 26, 31, .7); }
.daily-day.practice { border: 2px dashed var(--muted); }
.daily-day.today { border: var(--edge-w) solid var(--edge); }
.daily-cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; } /* [qa7fix] the grid's dates */
.daily-cal-head .muted { font-size: 0.8125rem; font-weight: 800; white-space: nowrap; }
.daily-day .dn.dm { color: var(--ink); font-weight: 900; white-space: pre; font-size: 0.625rem; line-height: 1.05; text-align: center; } /* [s25] the month over its day (DailyCalendar.swift the same) */
.daily-day.walked .dn.dm { color: rgba(29, 26, 31, .7); }
.daily-day .dn.dt { padding: 0 4px; font-size: 0.625rem; font-weight: 900; color: var(--paper); background: var(--ink); border-radius: var(--r-pill); }
.daily-day.picked { outline: 3px solid #F2B33D; outline-offset: 1px; }
.daily-day:disabled { opacity: .35; cursor: default; }
.daily-day:focus-visible { outline: 3px solid #F2B33D; outline-offset: 2px; }
.daily-legend { margin: 0; font-size: 0.75rem; }
.daily-pick { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r-button); background: var(--cream, #FFF6E9); }
.daily-share { display: flex; flex-direction: column; gap: 6px; } /* [dailytitle] a walk's Share and, where a picture can't be shared, Save the postcard */
.daily-share .daily-save { text-align: center; text-decoration: none; color: var(--ink); }
.daily-share .daily-save[hidden] { display: none; }
.daily-pick h4 { margin: 0; font-size: 1.0625rem; font-weight: 900; }
.daily-pick .daily-date { margin: 0; font-size: 0.8125rem; font-weight: 800; color: var(--muted); }
.daily-doodle { font-size: 1rem; font-weight: 800; }
.linkish { border: 0; background: none; padding: 4px 2px; font: inherit; font-size: 0.875rem; font-weight: 700; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; display: none; z-index: 5; }
body[data-screen="game"] #hud, body[data-screen="pause"] #hud, body[data-screen="result"] #hud { display: block; }
.hud-top { position: absolute; top: calc(6px + var(--safe-t)); left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r));
  display: flex; align-items: center; gap: 8px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px;
  padding: 3px 4px 3px 8px; box-shadow: 0 3px 0 var(--world-shadow); }
.hud-hearts { font-size: 22px; letter-spacing: 1px; white-space: nowrap; min-width: 90px; }
.hud-hearts .lost { filter: grayscale(1); opacity: .35; }
.hud-hearts { display: flex; align-items: center; gap: 5px; }
.hp-icon { font-size: 18px; }
.hud-left { display: flex; flex-direction: column; gap: 3px; }
.hud-clock { font-size: 12px; font-weight: 900; color: var(--ink); background: #FFFDF8; border: 2px solid var(--ink); border-radius: 8px; padding: 1px 6px; align-self: flex-start; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hud-clock:empty { display: none; }
/* [bonewallet] Free Roam: the Dog Bones in Charlie's wallet, the bone drawn and the count, under the clock (game.js hudWallet) */
.hud-wallet { font-size: 12px; font-weight: 900; color: var(--ink); background: #FFFDF8; border: 2px solid var(--ink); border-radius: 8px; padding: 1px 6px; align-self: flex-start; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hud-wallet[hidden] { display: none; }
/* [bonewallet] the title: the wallet's count, and the way to the Bone Shop (the Wardrobe) */
.title-wallet { display: inline-flex; align-items: center; gap: 6px; align-self: center; margin-top: 4px; padding: 6px 14px; border-radius: var(--r-pill); border: calc(var(--edge-w) - .5px) solid var(--edge); background: var(--paper); color: var(--ink); font-weight: 900; font-size: 0.9375rem; text-decoration: none; box-shadow: 0 var(--drop-button) 0 var(--shadow); }
.title-wallet .ui-i { width: 1.4em; height: 1.4em; }
.title-wallet .tw-shop { color: var(--muted); font-weight: 800; }
.title-wallet:active { transform: translateY(3px); box-shadow: 0 var(--drop-pressed) 0 var(--shadow); }
/* [onboard] the title for a first visit and a returning player (game.js titleOnboard; the app's TitleView, the same shapes): "Start here"
   on Mission Mode, a tag on its top edge (ink on paper's opposite, both themes); Continue under it, a paper button in words alone, as the
   title's buttons are ([hud]): "Continue: Mission 4", then the piece's name, muted, both wrapping at any text size, never cut; the
   progress under the wallet, small and muted. Nothing moves or blinks. */
#s-title .menu > .btn-primary { position: relative; }
.start-here { position: absolute; top: -13px; inset-inline-end: 12px; padding: 2px 10px 3px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font-size: 0.8125rem; font-weight: 900; line-height: 1.25; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--cream); pointer-events: none; white-space: nowrap; } /* [s4] a ring of the page's colour, centred on the stroke (TitleView.swift StartHereTag) */
.btn-continue { padding: 10px 16px; border-radius: var(--r-button); color: var(--ink); }
.tc-words { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.tc-go { font-size: 1.0625rem; font-weight: 900; line-height: 1.2; }
.tc-name { font-size: 0.875rem; font-weight: 700; line-height: 1.25; color: var(--muted); overflow-wrap: anywhere; }
.title-progress { margin: 0; font-size: 0.8125rem; font-weight: 700; line-height: 1.35; color: var(--muted); text-align: center; }
/* [dailytitle] (the audit's N6) the Daily Walk on the title (game.js titleDaily; the app's TitleView dailyButton and DailyTitleLabel, the same words): a
   returning player's Continue and Today's walk share one row, Continue three parts of the room to Today's walk's one, in short lines
   ("Today's walk" / "not yet" / "3-day streak"), so the menu grows by a line at most and [titlefix]'s fit holds (every mode, Continue, Player Guides
   and Game Settings on the screen, the crowd taking what's left). Today's walk alone (a first-timer who has played, or every piece done) is
   one full-width line under the three modes or Mission Mode: "Today's walk · not yet", "Today's walk: done · 3-day streak". Paper and ink
   like Continue with a dawn edge (the Daily Walk's colour); done, the dawn fills it. At least 44 px, in words alone as the title's buttons
   are ([hud]), words wrap at any size, nothing moves or blinks, no emoji. A narrow menu (an iPhone SE's, a phone on its side's column) gets the smaller words. */
.title-next { display: flex; flex-wrap: wrap; gap: 8px; } /* (side by side while both fit their least widths, 266 px: stacked only at a big zoom) */
.title-next[hidden] { display: none; }
.title-next > .btn { width: auto; min-width: 0; }
.title-next > .btn-continue { flex: 3 1 150px; padding-left: 10px; padding-right: 10px; }
.btn-daily { display: flex; align-items: center; justify-content: center; flex: 1 1 108px; min-height: 44px; padding: 6px 8px; border-radius: var(--r-button); border-inline-start-width: 7px; border-inline-start-color: #E8955F; color: var(--ink); }
.btn-daily[hidden] { display: none; }
.btn-daily.done { background: #FFC9A3; color: #1D1A1F; } /* (dark words on the dawn pastel in both themes, like .btn-dawn) */
.td-words { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.td-what { font-size: 0.9375rem; font-weight: 900; line-height: 1.15; }
.td-sep { display: none; }
.td-state, .td-streak { font-size: 0.8125rem; font-weight: 800; line-height: 1.2; color: var(--muted); overflow-wrap: anywhere; }
.td-streak:empty { display: none; }
.btn-daily.done .td-state, .btn-daily.done .td-streak { color: #4A444F; }
.btn-daily.solo { flex-basis: 100%; padding: 8px 12px; }
.btn-daily.solo .td-words { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: .35em; }
.btn-daily.solo .td-sep { display: inline; }
.btn-daily.solo .td-sep:empty { display: none; }
.btn-daily.solo .td-sep, .btn-daily.solo .td-state, .btn-daily.solo .td-streak { font-size: 0.9375rem; line-height: 1.2; }
@media (max-width: 359px), (orientation: landscape) and (max-height: 560px) and (max-width: 772px) { /* (a narrow menu: a 320-point iPhone's, and the column beside the crowd on a phone on its side under 773 points, 44vw) */
  #s-title .title-next > .btn-continue .tc-go { font-size: 0.9375rem; }
  #s-title .title-next > .btn-continue .tc-name { font-size: 0.78125rem; }
  .btn-daily:not(.solo) { padding-left: 6px; padding-right: 6px; }
  .btn-daily:not(.solo) .td-what { font-size: 0.8125rem; }
  .btn-daily:not(.solo) .td-state, .btn-daily:not(.solo) .td-streak { font-size: 0.75rem; }
}
@media (max-width: 359px) { /* (a 320-point iPhone upright: Continue's first line on one line beside the tile, so the row is no taller than Continue's was) */
  body:not(.wide) #s-title .title-next > .btn-continue { padding-left: 6px; padding-right: 6px; }
  body:not(.wide) #s-title .title-next > .btn-continue .tc-go { font-size: 0.875rem; }
  body:not(.wide) #s-title .title-next > .btn-continue .tc-name { font-size: 0.75rem; }
  body:not(.wide) #s-title .btn-daily:not(.solo) { flex-basis: 100px; padding-left: 5px; padding-right: 5px; }
  body:not(.wide) #s-title .btn-daily:not(.solo) .td-what { font-size: 0.8125rem; }
}
.btn-daily.solo .td-state { font-size: 0.9375rem; line-height: 1.2; }
/* [onboard] gdaycharlie.com's progress-move offer and its note (public/move.js), in the title's flow under the wallet and the progress: a quiet
   dashed box, its words wrapping, its buttons 44 px tall; never fixed or over anything (the old .move-toast covered Auto Play Mode on a phone) */
.move-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin: 0; padding: 10px 12px; border: 2px dashed var(--line); border-radius: var(--r-button);
  font-size: 0.875rem; font-weight: 700; line-height: 1.35; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.move-offer span { flex: 1 1 100%; }
.move-offer button { min-height: 44px; padding: 6px 14px; border: 2.5px solid var(--ink); border-radius: var(--r-field); background: var(--paper); color: var(--ink); font: inherit; font-weight: 900; box-shadow: 0 var(--drop-button) 0 var(--shadow); cursor: pointer; }
.move-offer .move-later { border-color: transparent; background: transparent; box-shadow: none; text-decoration: underline; text-underline-offset: 3px; }
.move-offer button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hp-bar { width: 70px; height: 12px; border: 2.5px solid var(--ink); border-radius: var(--r-small); background: #FFFDF8; overflow: hidden; }
.hp-bar i { display: block; height: 100%; transition: width .25s, background .25s; }
.hp-num { font-size: 13px; font-weight: 900; min-width: 24px; }
.hud-hearts.ouch { animation: ouch .4s; }
@keyframes ouch { 30% { transform: scale(1.25) rotate(-6deg); } }
.hud-mid { flex: 1; text-align: center; min-width: 0; }
.hud-level { font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* [qafix] (QA #9) a long title on a phone: smaller, then two lines (game.js fitHudLevel; HUDView.swift the same) */
.hud-level.fit-s { font-size: 11px; }
.hud-level.fit-2, .hud-level.fit-3 { font-size: 11px; line-height: 1.15; white-space: pre-line; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.hud-level.fit-3 { font-size: 10px; }
.hud-goal { font-size: 20px; font-weight: 900; }
.icon-btn { pointer-events: auto; width: 40px; height: 40px; border: 3px solid var(--ink); border-radius: var(--r-field); background: var(--paper); font-size: 14px; font-weight: 900; }
.zoom-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; line-height: 1; flex: none; }
.zoom-btn[hidden] { display: none; }
.zoom-name { font-size: 8px; font-weight: 900; margin-top: 2px; }
/* [layout33] --hud-drop: the meter's row and the block's name, below the top bar as drawn when it's taller than their place allows (game.js hudDrop) */
.hud-fluffy { position: absolute; top: calc(64px + var(--safe-t) + var(--hud-drop, 0px)); left: calc(8px + var(--safe-l)); width: min(250px, 62vw);
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; background: var(--paper); border: 2.5px solid var(--ink);
  border-radius: 99px; padding: 4px 8px; }
.hud-fluffy[hidden] { display: none; }
.hud-adapt { position: absolute; top: calc(64px + var(--safe-t) + var(--hud-drop, 0px)); left: calc(8px + var(--safe-l)); zoom: var(--ui, 1); font-size: 12px; font-weight: 900; color: #1D1A1F; background: #CFEAD6; border: 2.5px solid var(--ink); border-radius: 99px; padding: 4px 8px; white-space: nowrap; } /* [adaptive] a tier run's pill: Easier / Can't lose (HUDView's: the meter's row) */
.hud-fluffy:not([hidden]) + .hud-adapt { left: calc(8px + var(--safe-l) + min(250px, 62vw) + 6px); }
body.watching .hud-adapt { display: none; }
.fm-label { white-space: nowrap; min-width: 112px; }
.fm-bar { position: relative; flex: 1; height: 12px; border: 2.5px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.fm-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #F5C04A, #F07A3A 50%, #C8102E); transition: width .2s; }
.fm-tick { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .5; }
.hud-fluffy.volcano .fm-label { color: #D2401F; }
.hud-fluffy.devil .fm-label { color: var(--red-deep); animation: shake .25s infinite; }
@keyframes shake { 25% { transform: translateX(-1px); } 75% { transform: translateX(1px); } }
.hud-thought { position: absolute; left: calc(10px + var(--safe-l)); bottom: calc(108px + var(--safe-b)); width: min(calc(340px * max(1, var(--subs, 1))), calc(100vw - 20px));
  background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 8px 12px; font-size: calc(14px * var(--subs, 1)); font-weight: 700; /* [a11y35] at Subtitle size (--subs) */
  text-align: center; box-shadow: 0 3px 0 var(--shadow); animation: pop .25s; }
.hud-thought[hidden] { display: none; }
/* [bugs35] off Charlie and the goal (game.js thoughtSpot): bottom right, or the top, centred under the bar and the meter (--th-top) */
.hud-thought.th-right { left: auto; right: calc(10px + var(--safe-r)); }
.hud-thought.th-top { bottom: auto !important; top: var(--th-top, 120px); left: 0; right: 0; margin: 0 auto; }
body.joy-fixed .hud-thought:not(.th-top) { bottom: calc(max(108px, calc(var(--joy-h, 152px) / var(--ui, 1))) + var(--safe-b)); } /* [move37] the fixed joystick's corner: Charlie's thoughts sit above it (game.js syncM37 sets --joy-h) */
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
.hud-abilities { position: absolute; right: calc(12px + var(--safe-r)); bottom: calc(14px + var(--safe-b)); display: flex; align-items: flex-end; gap: 10px; }
.ab { pointer-events: auto; position: relative; width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; box-shadow: 0 3px 0 var(--world-shadow); touch-action: none; }
.ab-big { width: 82px; height: 82px; background: var(--gold); }
.ab-ico { font-size: 26px; line-height: 1; }
.ab-big .ab-ico { font-size: 32px; }
.ab-name { font-size: 11px; font-weight: 900; margin-top: 2px; white-space: nowrap; }
.ab-key::after, .key-hint::after { content: attr(data-k); } /* [a11y3] the key hint as drawing, not words in the button's name */
.ab-key { display: none; position: absolute; top: -8px; right: -6px; font-size: 10px; font-weight: 900; background: var(--ink); color: #fff; border-radius: 6px; padding: 1px 5px; }
@media (hover: hover) and (pointer: fine) { .ab-key { display: block; } }
body.pad .ab-key { display: block; } /* a game controller is connected: its button on each ability */
body.pad :focus-visible, body.pad .btn:focus, body.pad .lvl:focus { outline: 4px solid var(--gold); outline-offset: 3px; }
.ab::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(rgba(29,26,31,.55) calc(var(--cd, 0) * 1turn), transparent 0); pointer-events: none; }
.ab.ready { animation: ready .3s; }
@keyframes ready { 50% { transform: scale(1.12); } }
.ab:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shadow); }

body.night { background: #1A1620; }
.intro-emoji { font-size: 4rem; line-height: 84px; }

.btn-day { background: #9FD0F0; }
.btn-sub { font-size: 0.8125rem; font-weight: 700; opacity: .75; margin-left: 4px; }
.btn-extras { text-align: center; text-decoration: none; color: var(--ink); background: #FFE7A8; }

/* Watch Mode: the speed/excitement bar in place of the ability buttons, and the hour banner ([autoplay] no setup screen: the title's
   📺 Auto Play Mode starts the week, and this bar is where Speed and Excitement change) */
.btn-watch { background: #F7C6DF; }
.ws-note { margin: 8px 0 12px; font-size: 14px; }
body.watching .hud-abilities { display: none; }
body.watching .hud-hearts { display: none; } /* nothing can hurt Charlie on autopilot */
body.watching .hud-goal { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.watching .hud-thought { bottom: calc(122px + var(--safe-b)); } /* [followcam] (+ the Follow chips' row) */
body.watching.ft-on .hud-thought { bottom: calc(240px + var(--safe-b)); } /* [polish4] above the "left" toast while it shows (it sat in the same spot) */
/* [followcam] Watch Mode as a TV broadcast: the Follow chips over the Watch bar, the picture-in-picture's frame, the "left" toast */
.wb-follow { display: none; position: absolute; left: 0; right: 0; bottom: calc(55px + var(--safe-b)); zoom: var(--ui, 1); gap: 4px; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 0 calc(8px + var(--safe-l)); justify-content: safe center; }
.wb-follow::-webkit-scrollbar { display: none; }
.wb-follow { pointer-events: auto; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 32px; } /* (padding-right after the shorthand above) it scrolls sideways (touch, trackpad, Tab); the fade says there's more */
body.watching .wb-follow { display: flex; }
.wf-label { font-size: 12px; font-weight: 900; white-space: nowrap; color: var(--ink); background: color-mix(in srgb, var(--paper) 85%, transparent); border-radius: 99px; padding: 4px 8px; }
.wf-chip { pointer-events: auto; flex: none; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; display: flex; align-items: center; } /* a 44 px target around the compact pill */
.wf-pill { display: flex; align-items: center; min-height: 30px; box-sizing: border-box; padding: 0 10px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 900; white-space: nowrap; }
.wf-chip.on .wf-pill { background: var(--gold); color: #1D1A1F; border-width: 3px; }
.wf-chip:disabled:not(.on) { cursor: default; } .wf-chip:disabled:not(.on) .wf-pill { background: var(--cream); color: var(--muted); border-color: var(--muted); border-style: dashed; } /* [s83] someone not here: the Unavailable look, never an opacity (at .4 over a night room Corey was dark on dark, under 2:1) */
.wf-chip:focus-visible { outline: none; } .wf-chip:focus-visible .wf-pill { outline: 3px solid var(--gold); outline-offset: 2px; }
.wf-chip.wait .wf-pill span::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .35em; vertical-align: -.05em; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; } /* [hud] waiting: a little ring (it was ⏳) */
.pip { position: absolute; pointer-events: auto; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--shadow); touch-action: none; cursor: pointer; box-sizing: border-box; }
.pip:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pip-label { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 900; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 99px; padding: 1px 7px; }
.follow-toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(110px + var(--safe-b)); zoom: var(--ui, 1); pointer-events: auto; width: min(360px, calc(100vw - 32px)); box-sizing: border-box; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--world-shadow); padding: 12px; text-align: center; }
.follow-toast p { margin: 0 0 8px; font-size: 14px; font-weight: 900; color: var(--ink); }
.ft-btns { display: flex; gap: 8px; justify-content: center; }
.ft-btn { min-height: 34px; padding: 0 12px; border: 2.5px solid var(--ink); border-radius: var(--r-field); background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; font-weight: 900; }
.ft-btn.ft-go { background: var(--gold); color: #1D1A1F; }
html:not(.calm) .follow-toast:not([hidden]) { animation: ftIn .2s ease-out; } @keyframes ftIn { from { opacity: 0; translate: 0 12px; } }
.watch-bar { position: absolute; left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); bottom: calc(10px + var(--safe-b)); display: flex; gap: 8px; justify-content: center; }
.wb-group { pointer-events: auto; display: flex; align-items: center; gap: 6px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 4px 6px 4px 10px; box-shadow: 0 3px 0 var(--shadow); }
.wb-label { font-size: 12px; font-weight: 900; white-space: nowrap; min-width: 0; }
.wb-btn:disabled { background: var(--cream); color: var(--muted); border-color: var(--muted); border-style: dashed; cursor: default; } /* [s83] the Unavailable look (the app's Watch bar at Speed or Excitement's end) */
.wb-btn { width: 34px; height: 34px; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--gold); color: #1D1A1F; font-size: 18px; font-weight: 900; line-height: 1; padding: 0; }
.wb-val { font-size: 16px; font-weight: 900; min-width: 14px; text-align: center; }
@media (max-width: 460px) { .wb-label span { display: none; } .wb-label::after { content: attr(data-short); } }
/* [qafix] the Excitement stepper's word (the setup's and the Guide's, not "Chaos") doesn't fit beside Speed under 400px (an iPhone 16e): just 🎢, still named Excitement for screen readers */
@media (max-width: 399px) { .wb-label[data-short="Excitement"]::after { content: "Thrills" / "Excitement"; } } /* [hud] (it was the 🎢 alone: a word) */
.time-banner { position: absolute; left: 50%; top: calc(var(--safe-t) + 116px); transform: translate(-50%, 0); /* just under the HUD, off Charlie and Fluffy */ white-space: nowrap; font-size: 17px; font-weight: 900;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 6px 12px; box-shadow: 0 3px 0 var(--world-shadow); opacity: 0; }
.time-banner.show { animation: banner 2.5s ease-out forwards; }
/* Highlights (Watch Mode's top speed): the fast-forward card over the dimmed scene, and the tag while a highlight plays */
body.ff #hud::before { content: ""; position: absolute; inset: 0; background: rgba(29, 26, 31, .42); pointer-events: none; } /* the scene, dimmed */
body.hl .hud-level { display: none; } /* the tag takes its line in the top bar */
body.ff .hud-thought, body.ff .time-banner { display: none; } /* the card has the line and the clock */
.ff-card { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: min(340px, calc(100vw - 40px)); text-align: center;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 10px 14px 12px; box-shadow: 0 4px 0 var(--world-shadow); }
.ff-card[hidden], .hl-tag[hidden] { display: none; }
@media (max-width: 460px) { .hl-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } } /* phones: the label alone fits the bar (still read out) */
.ff-clock { margin: 0; font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ff-gist { margin: 6px 0 0; font-size: 14px; font-weight: 700; min-height: 2.6em; }
.hl-tag { display: inline-block; vertical-align: top; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* in the top bar, in the level line's place (a compact pill: the bar barely grows); apple/App/WatchHUD.swift HighlightTag */
  font-size: 12px; line-height: 15px; font-weight: 900; color: #1D1A1F; background: var(--gold); border: 2px solid var(--ink); border-radius: var(--r-pill); padding: 0 8px; animation: pop .25s; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.9); } 12%, 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%); } }
/* [nonstop] Auto Play Mode's next week (game.js weekCard): "Week 2" and the week just watched, where the hour's banner goes, for a few
   seconds (WEEK_CARD_MS), then gone by itself. No button, never in the way of a tap; the hour's banner and the fast-forward card step
   aside while it's up. Only over the game (the pause screen and the menus never show it). */
.week-card { zoom: var(--ui, 1); position: absolute; left: 50%; top: calc(var(--safe-t) + 116px); transform: translate(-50%, 0); width: min(340px, calc(100vw - 40px)); text-align: center; pointer-events: none;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 8px 14px 10px; box-shadow: 0 4px 0 var(--world-shadow); opacity: 0; }
.week-card[hidden] { display: none; }
.week-card.show { animation: weekCard 6.5s ease-out forwards; }
.wk-eyebrow { margin: 0; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wk-title { margin: 2px 0 0; font-size: 30px; font-weight: 900; line-height: 1.1; }
.wk-sum { margin: 4px 0 0; font-size: 13px; font-weight: 700; }
.wk-sum[hidden] { display: none; }
body:not([data-screen="game"]) .week-card { display: none; }
body.wk-on .time-banner, body.wk-on .ff-card { visibility: hidden; }
body.wk-on .scrap-toast { top: calc(var(--safe-t) + 252px); } /* (the Scrapbook's toast, under the card rather than over its numbers) */
@keyframes weekCard { 0% { opacity: 0; transform: translate(-50%, -10%) scale(.94); } 6%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -6%); } }
@keyframes weekCardFade { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
/* [nonstop] the cookie banner (src/lib/ga.ts, where the law asks for one) waits while Auto Play plays: it's back on the pause screen, the
   title or any other mode (nothing is collected till it's answered: consent starts denied) */
body.watching[data-screen="game"] [role="dialog"][aria-label="Cookie consent"] { display: none !important; }
body.watching[data-screen="game"] .move-toast { display: none !important; } /* [nonstop] and gdaycharlie.com's progress-move offer or note (public/move.js), left up on the title: back on any other screen */
html.calm .time-banner.show { animation: none; opacity: 1; } html.calm .week-card.show { animation: weekCardFade 6.5s linear forwards; } html.calm .hud-hearts.ouch, html.calm .ab.ready, html.calm .fm-label, html.calm .hl-tag { animation: none !important; }
/* The opening scene: the game world shows through; a caption card over it */
/* The page starts on the opening (index.html), so the first paint is the scene's dark, not a cream flash before it. */
html:has(body[data-screen="opening"]), body[data-screen="opening"] { background: #2B2530; }
.screen-opening { background: transparent; justify-content: flex-end; cursor: pointer; padding-bottom: calc(28px + var(--safe-b)); }
.op-card { background: var(--paper); border: var(--edge-w) solid var(--edge); border-radius: var(--r-card); padding: 12px 18px; text-align: center; box-shadow: 0 var(--drop-button) 0 var(--shadow); max-width: 360px; width: 100%; }
.op-time { margin: 0; font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.op-line { margin: 4px 0 0; font-size: calc(19px * var(--subs, 1)); font-weight: 900; animation: pop .35s; } /* [a11y35] at Subtitle size */
/* [lcp] [lcp2] The first line is in index.html and is the page's first frame: no pop, so it's there at full size in the very first
   paint (the page's largest contentful paint, before any script runs; a pop would make the opening's re-show a bigger, later one).
   The later lines (game.js updateOpening) pop as before. */
.op-line.op-first { animation: none; }
html.calm .op-line { animation: none; }
.op-line { min-height: 2.4em; display: flex; align-items: center; justify-content: center; } /* [lcp2] room for the two-line line 2, so the card doesn't jump when it wraps */
.op-skip { margin: 10px 0 0; font-size: 14px; font-weight: 900; color: #FFFDF8; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* ---------- [meet] Meet the Cast (public/meet.js, content/intro.json): a dark stage, a spotlight, one hooman at a time ----------
   The stage is the opening's dark in both themes; the narrator's card follows the theme. Heights inside the zoomed children
   are divided by --ui (zoom scales them again). Reduce Motion: no bounce, no idle moves, just fades. */
html:has(body[data-screen="meet"]), body[data-screen="meet"] { background: #2B2530; }
body[data-screen="meet"] #s-meet { display: flex; flex-direction: column; align-items: center; }
.screen-meet { background: radial-gradient(120% 75% at 50% 32%, #4A3F55 0%, #2B2530 58%, #1D1A1F 100%); color: #FFFDF8; overflow: hidden; cursor: pointer; gap: 8px; }
.meet-top { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; }
.meet-kicker { margin: 0; font-size: 13px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #F2B33D; }
.meet-count { margin: 0 0 0 auto; font-size: 13px; font-weight: 800; color: #D9D0DF; font-variant-numeric: tabular-nums; }
.meet-skip { min-height: 44px; min-width: 44px; padding: 6px 14px; border: 2px solid #D9D0DF; border-radius: var(--r-pill); background: rgba(0, 0, 0, .25); color: #FFFDF8; font-size: 14px; font-weight: 900; }
.meet-count:empty + .meet-skip { margin-left: auto; }
.meet-stage { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.meet-star { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.meet-star::before { content: ''; position: absolute; left: 50%; bottom: 10px; width: 300px; height: 135%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(50% 55% at 50% 72%, rgba(255, 226, 150, .34), rgba(255, 226, 150, 0) 72%); } /* the spotlight */
.meet-star::after { content: ''; position: absolute; left: 50%; bottom: 34px; width: 200px; height: 26px; transform: translateX(-50%); border-radius: 50%; background: rgba(0, 0, 0, .35); filter: blur(4px); z-index: 0; } /* the floor under them */
.meet-pic { position: relative; z-index: 1; display: block; flex: 1 1 0; min-height: 90px; height: 0; width: 100%; max-height: 340px; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 100%; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); } /* (takes whatever height the stage has left) */
.meet-emoji { display: none; position: relative; z-index: 1; font-size: 96px; line-height: 1; margin-bottom: 14px; }
.screen-meet.welcome .meet-pic { display: none; }
.screen-meet.welcome .meet-emoji { display: block; }
.meet-plate { flex: none; position: relative; z-index: 2; margin-top: -8px; padding: 4px 16px 6px; background: #F2B33D; color: #1D1A1F; border: 3px solid #1D1A1F; border-radius: var(--r-button); text-align: center; box-shadow: 0 var(--drop-button) 0 #1D1A1F; }
.meet-name { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.15; }
.meet-tag { margin: 0; font-size: 13px; font-weight: 800; }
.meet-tag:empty { display: none; }
.meet-star.in { animation: meetIn .55s cubic-bezier(.2, 1.35, .4, 1) both; }
@keyframes meetIn { from { transform: translateY(46px) scale(.55); opacity: 0; } to { transform: none; opacity: 1; } }
/* each character's own way of standing about (content/intro.json "move"; play.json's moves) */
.meet-pic.mv-hop { animation: meetHop 1.6s ease-in-out .6s infinite; }
.meet-pic.mv-stomp { animation: meetStomp 2.2s ease-in-out .6s infinite; }
.meet-pic.mv-wobble { animation: meetWobble 2.8s ease-in-out .6s infinite; }
.meet-pic.mv-sweep { animation: meetSweep 1.8s ease-in-out .6s infinite; }
.meet-pic.mv-sway { animation: meetSway 2.6s ease-in-out .6s infinite; }
.meet-pic.mv-wave { animation: meetWave 2s ease-in-out .6s infinite; }
@keyframes meetHop { 0%, 40%, 100% { transform: none; } 20% { transform: translateY(-14px) scale(1.02, .98); } }
@keyframes meetStomp { 0%, 100% { transform: none; } 25% { transform: rotate(-1.5deg) translateY(-3px); } 50% { transform: none; } 75% { transform: rotate(1.5deg) translateY(-3px); } }
@keyframes meetWobble { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2.5deg); } 70% { transform: rotate(2deg); } }
@keyframes meetSweep { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-10px) rotate(-2deg); } }
@keyframes meetSway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-4deg) translateX(-4px); } 70% { transform: rotate(3deg) translateX(3px); } }
@keyframes meetWave { 0%, 100% { transform: none; } 50% { transform: translateY(-5px) rotate(1.5deg); } }
/* what they say (a 💭 thought for Charlie) */
.meet-say { flex: none; position: relative; z-index: 3; visibility: hidden; max-width: min(92%, 420px); min-height: 2.6em; margin-bottom: 14px; padding: 9px 14px; background: #FFFDF8; color: #1D1A1F;
  border: 3px solid #1D1A1F; border-radius: var(--r-button); font-size: 17px; font-weight: 800; line-height: 1.3; text-align: center; box-shadow: 0 var(--drop-button) 0 #1D1A1F; }
.meet-say::after { content: ''; position: absolute; left: 50%; bottom: -12px; width: 18px; height: 18px; margin-left: -9px; background: #FFFDF8; border: 3px solid #1D1A1F; border-top: 0; border-left: 0; transform: rotate(45deg); }
.meet-say.on { visibility: visible; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.meet-say.think { border-radius: var(--r-panel); border-style: dashed; font-style: italic; }
.meet-say.think::after { width: 12px; height: 12px; margin-left: -6px; bottom: -20px; border: 3px solid #1D1A1F; border-radius: 50%; transform: none; }
/* the line-up: everyone introduced so far (they react to the newcomer) */
.meet-line { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; list-style: none; margin: 12px 0 0; padding: 0; min-height: 66px; }
.meet-mate { position: relative; display: flex; flex-direction: column; align-items: center; width: 50px; }
.meet-mate img { width: 46px; height: 46px; object-fit: cover; object-position: 50% 8%; border-radius: 50%; background: #FFFDF8; border: 2.5px solid #F2B33D; }
.meet-mate-name { max-width: 64px; margin-top: 2px; font-size: 10px; font-weight: 800; color: #D9D0DF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meet-mate.pop { animation: pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.meet-mate.reacting img { animation: meetShake .5s ease-in-out 2; }
.meet-react { position: absolute; top: -16px; right: -6px; font-size: 22px; animation: meetReact 2.4s ease-out both; }
@keyframes meetShake { 25% { transform: translateX(-3px) rotate(-6deg); } 75% { transform: translateX(3px) rotate(6deg); } }
@keyframes meetReact { 0% { transform: translateY(8px) scale(.4); opacity: 0; } 15% { transform: translateY(-4px) scale(1.15); opacity: 1; } 25%, 85% { transform: none; opacity: 1; } 100% { transform: translateY(-6px); opacity: 0; } }
.screen-meet.finale .meet-mate { width: 66px; }
.screen-meet.finale .meet-mate img { width: 60px; height: 60px; }
.screen-meet.finale .meet-mate-name { max-width: 84px; }
.screen-meet.finale .meet-mate:nth-child(odd) img { animation: meetHop 1.4s ease-in-out infinite; }
.screen-meet.finale .meet-mate:nth-child(even) img { animation: meetHop 1.4s ease-in-out .7s infinite; }
/* the narrator's caption, as in the opening */
.meet-card { flex: none; width: 100%; max-width: 560px; background: var(--paper); color: var(--ink); border: var(--edge-w) solid var(--edge); border-radius: var(--r-card); padding: 10px 16px 12px; box-shadow: 0 var(--drop-button) 0 var(--shadow); cursor: default; }
.meet-who { margin: 0; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.meet-narr { margin: 4px 0 0; font-size: 17px; font-weight: 800; line-height: 1.35; min-height: calc(1.35em * 3); }
.meet-narr.pop { animation: pop .35s; }
.meet-next { flex: none; max-width: 560px; color: #1D1A1F; }
.meet-hint { margin: 0; font-size: 13px; font-weight: 800; color: #D9D0DF; }
@media (max-height: 700px) { .meet-narr { font-size: 15px; min-height: calc(1.35em * 2); } .meet-hint { display: none; } }
/* [castintro] the chapters: the people around a main character stand a little smaller (.sat), the main character's face on their plate */
.screen-meet.sat .meet-pic { max-height: 240px; }
.meet-head { position: absolute; left: -24px; top: 50%; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; object-fit: cover; object-position: 50% 8%; background: #FFFDF8; border: 3px solid #1D1A1F; box-shadow: 0 var(--drop-small) 0 #1D1A1F; }
.meet-head[hidden] { display: none; }
.screen-meet.sat .meet-plate { margin-left: 18px; padding-left: 26px; }
/* [castintro] the longer introductions (over 300 characters: Klondie's, Fluffy's…) a size down, and the line-up smaller once it's long
   (public/meet.js: .long, .many, .crowd), so a phone still has room for the one on stage */
.meet-narr.long { font-size: 15px; line-height: 1.32; }
@media (max-height: 700px) { .meet-narr.long { font-size: 13.5px; } }
.meet-line.many .meet-mate { width: 38px; } .meet-line.many .meet-mate img { width: 34px; height: 34px; border-width: 2px; } .meet-line.many .meet-mate-name { display: none; }
.meet-line.many { min-height: 40px; gap: 4px 5px; }
.meet-line.crowd .meet-mate { width: 28px; } .meet-line.crowd .meet-mate img { width: 26px; height: 26px; }
.screen-meet.finale .meet-line.many .meet-mate { width: 44px; } .screen-meet.finale .meet-line.many .meet-mate img { width: 40px; height: 40px; }
/* [a11y35] Reduce Motion: html.calm (game.js calm, theme.js) */
  html.calm .meet-star.in { animation: meetFade .25s both; }
  html.calm .meet-pic[class*="mv-"], html.calm .screen-meet.finale .meet-mate img, html.calm .meet-mate.reacting img { animation: none !important; }
  html.calm .meet-say.on, html.calm .meet-mate.pop, html.calm .meet-narr.pop { animation: meetFade .2s both; }
  html.calm .meet-react { animation: none; }
@keyframes meetFade { from { opacity: 0; } }

/* ---------- [origin] How Charlie came home (public/origin.js, content/origin.json): a drawn flashback, full-bleed, the caption card under it ----------
   The scene is the canvas behind everything (zoom 1: it's sized in real pixels); the top row, the empty scene box (origin.js fits the
   drawing between the top row and the card), the card and Next sit over it in a column. The bubble is placed by origin.js over whoever
   speaks, in real pixels (its layer is zoom 1, its words scaled by --ui). Reduce Motion: no pops. */
html:has(body[data-screen="origin"]), body[data-screen="origin"], html:has(body[data-screen="pride"]), body[data-screen="pride"] { background: #2B2530; }
body[data-screen="origin"] #s-origin, body[data-screen="pride"] #s-pride { display: flex; flex-direction: column; align-items: center; } /* ([pride] The best day at the store: the same screen, #s-pride) */
.screen-origin { background: #2B2530; color: #FFFDF8; overflow: hidden; cursor: pointer; gap: 8px; }
#s-origin > .origin-canvas, #s-origin > .origin-layer, #s-pride > .origin-canvas, #s-pride > .origin-layer { zoom: 1; position: absolute; inset: 0; width: 100%; height: 100%; }
#s-origin > .origin-canvas, #s-pride > .origin-canvas { display: block; z-index: 0; }
#s-origin > .origin-layer, #s-pride > .origin-layer { z-index: 3; pointer-events: none; }
#s-origin > :not(.origin-canvas):not(.origin-layer), #s-pride > :not(.origin-canvas):not(.origin-layer) { position: relative; z-index: 2; }
.origin-top { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; }
.origin-kicker { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 12px; font-size: 13px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #1D1A1F; background: #F2B33D; border: 2.5px solid #1D1A1F; border-radius: var(--r-pill); box-shadow: 0 var(--drop-button) 0 #1D1A1F; }
.origin-count { flex: none; white-space: nowrap; margin: 0 0 0 auto; padding: 2px 8px; font-size: 13px; font-weight: 900; color: #FFFDF8; background: rgba(0, 0, 0, .35); border-radius: var(--r-pill); font-variant-numeric: tabular-nums; }
.origin-count:empty { display: none; }
.origin-count:empty + .meet-skip { margin-left: auto; }
#originSkip, #prideSkip { flex: none; white-space: nowrap; }
@media (max-width: 420px) { .origin-kicker { font-size: 11px; letter-spacing: .08em; padding: 4px 9px; } }
.origin-scene { flex: 1 1 auto; min-height: 0; width: 100%; }
.origin-say { position: absolute; left: 0; top: 0; visibility: hidden; width: max-content; max-width: min(78vw, calc(380px * var(--ui, 1))); padding: calc(8px * var(--ui, 1)) calc(13px * var(--ui, 1)); background: #FFFDF8; color: #1D1A1F;
  border: 3px solid #1D1A1F; border-radius: var(--r-button); font-size: calc(16px * var(--ui, 1)); font-weight: 800; line-height: 1.3; text-align: center; box-shadow: 0 var(--drop-button) 0 #1D1A1F; transform: translate(-50%, -100%); }
.origin-say::after { content: ''; position: absolute; left: var(--tail, 50%); bottom: -12px; width: 18px; height: 18px; margin-left: -9px; background: #FFFDF8; border: 3px solid #1D1A1F; border-top: 0; border-left: 0; transform: rotate(45deg); }
.origin-say.on { visibility: visible; animation: originPop .35s cubic-bezier(.2, 1.4, .4, 1); }
.origin-say.think { border-radius: var(--r-panel); border-style: dashed; font-style: italic; }
.origin-say.think::after { width: 12px; height: 12px; margin-left: -6px; bottom: -20px; border: 3px solid #1D1A1F; border-radius: 50%; transform: none; }
.origin-who { display: block; font-size: .72em; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: #8A6A1E; font-style: normal; }
@keyframes originPop { from { transform: translate(-50%, -100%) scale(.6); opacity: 0; } to { transform: translate(-50%, -100%); opacity: 1; } }
.origin-card .meet-narr { min-height: calc(1.35em * 2); }
.origin-next { flex: none; max-width: 560px; color: #1D1A1F; }
@media (max-height: 700px) { .origin-card .meet-narr { font-size: 15px; } }
html.calm .origin-say.on { animation: none; }

/* Dark mode: theme.js sets <html data-theme="dark"> when the device is in dark mode (Theme: auto, the default)
   or when the player picks Theme: dark. Light pastels keep dark text; the canvas game world keeps its own art. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --cream: #17141B;
  --paper: #26212C;
  --ink: #F4EDE3;
  --muted: #B3AAB8;
  --line: #3D3545;
  --red-deep: #FF8A80;
  --world-shadow: #000;
  --shadow: #4A4452; /* [s2] the chunky drop, a lifted plum: #000 on #17141B was invisible (Theme.swift darkP) */
  --edge: #A89E94; /* [s67] 6.9:1 on the background, 6:1 on the paper */
  --edge-w: 2.5px;
}
@media (prefers-contrast: more) { :root[data-theme="dark"] { --edge: var(--ink); --edge-w: 3px; } } /* [s67] Increase Contrast: the full edge */
html.see-contrast[data-theme="dark"] { --edge: var(--ink); --edge-w: 3px; }
[data-theme="dark"] .screen-dim { background: rgba(0, 0, 0, .6); }
[data-theme="dark"] :is(.btn-primary, .lvl-num, .ab-big, .btn-day, .btn-watch, .btn-extras, .ab-key) { color: #1D1A1F; }
[data-theme="dark"] .intro-tip { background: #3A2226; }
[data-theme="dark"] .intro-keys { background: rgba(242, 179, 61, .12); }
[data-theme="dark"] .submit-row input { background: var(--cream); color: var(--ink); }
[data-theme="dark"] :is(.hud-clock, .hud-wallet, .hp-bar, .fm-bar) { background: var(--cream); }
[data-theme="dark"] .board .me { background: #4A3B17; }
[data-theme="dark"] .lvl-endless .lvl-num { color: #fff; }
[data-theme="dark"] body.night { background: #0E0C11; }

/* ---------- Watch Mode: Today on Park Avenue (the day's highlights, opened from the pause screen and the week's results: game.js "Today on Park Avenue") ---------- */
.recap { position: fixed; inset: 0; z-index: 30; display: flex; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  background: rgba(29, 26, 31, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.recap[hidden] { display: none; }
.recap-card { zoom: var(--ui, 1); max-width: 460px; animation: recapIn .38s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes recapIn { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.recap-card h2 { font-size: 2rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.recap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.recap-list li { display: flex; gap: 10px; align-items: flex-start; }
.rc-time { flex: none; width: 5.4em; white-space: nowrap; text-align: right; font-size: 0.8125rem; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.rc-emoji { flex: none; width: 28px; text-align: center; font-size: 1.25rem; line-height: 1; } /* fixed columns: every row's words start at the same x */
.rc-body { display: flex; flex-direction: column; gap: 2px; font-size: 0.9375rem; }
.rc-who { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.rc-body q { font-size: 0.8125rem; font-style: italic; }
.rc-quiet { justify-content: center; font-size: 1.125rem; font-weight: 800; padding: 6px 0; }
.recap-sum { margin: 0; padding: 10px 12px; border-radius: var(--r-field); background: var(--cream); font-size: 1rem; font-weight: 700; }
.recap-week { text-align: left; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--r-field); font-size: 0.8125rem; }
.recap-week h3 { margin: 0 0 6px; font-size: 1rem; }
.recap-week p { margin: 0 0 4px; } .recap-week b { display: inline-block; min-width: 34px; color: var(--muted); }
[data-theme="dark"] .recap { background: rgba(0, 0, 0, .6); }
html.calm .recap-card { animation: none; }
input[type="checkbox"] { accent-color: var(--gold); width: 1.1em; height: 1.1em; vertical-align: -0.15em; } /* the brand gold, not the browser blue */

/* Chill Mode (assists): Settings rows and the result card's badge */
.chill-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 8px 0; border: var(--edge-w) solid var(--edge); border-radius: var(--r-button); background: var(--paper); box-shadow: 0 var(--drop-button) 0 var(--shadow); cursor: pointer; text-align: left; }
.chill-row input { flex: none; width: 26px; height: 26px; accent-color: var(--gold); }
.chill-txt { display: flex; flex-direction: column; gap: 2px; font-size: 1rem; }
.chill-hint { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.chill-main { background: #FFE7A8; color: #1D1A1F; }
.chill-main .chill-hint { color: #5A4A2A; }
.chill-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.chill-set:disabled .chill-row { opacity: .5; cursor: default; }
.res-outro { margin: 2px 0 6px; font-weight: 800; font-size: 0.9375rem; text-align: center; } /* [qa2fix] the last mission's closing line */
.chill-badge { display: inline-block; align-self: center; margin: 4px auto 2px; padding: 3px 12px; border: calc(var(--edge-w) - .5px) solid var(--edge); border-radius: var(--r-pill); background: #CFEAD6; color: #1D1A1F; font-size: 0.875rem; font-weight: 900; }
.chill-note { font-size: 0.8125rem; margin: 4px 0 10px; }
.adapt-note { align-self: center; margin: 4px auto 6px; padding: 6px 16px; max-width: 30em; border: 1.5px solid #8DBF9B; border-radius: var(--r-button); background: #CFEAD6; color: #1D1A1F; font-size: 0.875rem; font-weight: 800; line-height: 1.35; text-align: center; } /* [adaptive] the intro's and the fail card's word on the tier (Screens.swift AdaptNote) */

/* Photo Mode (game.js "Photo Mode"; apple/App/PhotoMode.swift): over the frozen canvas, no HUD, no dimming */
body[data-screen="photo"] #s-photo { display: block; }
.screen-photo { background: transparent; padding: 0; overflow: hidden; }
.photo-pan { position: absolute; inset: 0; touch-action: none; cursor: grab; }
.photo-pan:active { cursor: grabbing; }
.photo-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(0, 0, 0, .28); pointer-events: none; } /* [qa2fix] the screen under the toolbar isn't in the picture */
.photo-pan:focus-visible { outline: 4px solid var(--gold); outline-offset: -8px; }
.photo-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(8px + var(--safe-t)) calc(10px + var(--safe-r)) 0 calc(10px + var(--safe-l)); pointer-events: none; }
.photo-top > * { pointer-events: auto; }
.photo-top .btn { width: 110px; }
.photo-tag { padding: 8px 12px; border: 3px solid var(--ink); border-radius: var(--r-pill); background: var(--paper); font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.photo-bar { position: absolute; left: 50%; bottom: calc(8px + var(--safe-b)); transform: translateX(-50%); width: calc(100% - 20px - var(--safe-l) - var(--safe-r)); max-width: 520px;
  display: flex; flex-direction: column; gap: 8px; padding: 12px; background: color-mix(in srgb, var(--paper) 94%, transparent); border: 3px solid var(--ink); border-radius: var(--r-panel); box-shadow: 0 var(--drop-card) 0 var(--shadow); }
.photo-row { display: flex; gap: 6px; align-items: center; }
.photo-row .btn { flex: 1; }
.photo-row[hidden] { display: none; }
.photo-zoom { min-width: 64px; text-align: center; font-weight: 900; }
.photo-hint { margin: 0; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.photo-bar .btn:disabled { cursor: default; } /* [polish2] dimmed by .btn:disabled (an opacity on top of it went below readable) */
.key-hint { display: inline-block; margin-left: 6px; padding: 1px 6px; border: 1.5px solid currentColor; border-radius: var(--r-tick); font: 800 12px ui-rounded, system-ui, sans-serif; opacity: .6; vertical-align: 2px; }
@media (pointer: coarse) { .key-hint { display: none; } }
.photo-sticker { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 270px); width: max-content; max-width: min(86%, 520px);
  padding: 10px 14px; background: #FFFDF8; color: #1D1A1F; border: 3px solid #1D1A1F; border-radius: var(--r-button); box-shadow: 0 var(--drop-button) 0 #1D1A1F; pointer-events: none; }
.photo-sticker.top { bottom: auto; top: calc(var(--safe-t) + 70px); }
.photo-sticker.stamped { padding-left: 32px; }
.photo-sticker .ps-text { display: block; font-size: 18px; font-weight: 900; }
.photo-sticker .ps-who { display: block; font-size: 13px; font-weight: 800; color: #6B6470; }
.photo-sticker .ps-stamp { position: absolute; left: -14px; top: -14px; width: 38px; height: 38px; display: grid; place-items: center; font-size: 22px; background: #F2B33D; border: 3px solid #1D1A1F; border-radius: 50%; transform: rotate(-10deg); }
.photo-sticker .ps-stamp[hidden] { display: none; }
.photo-dialog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: calc(100% - 24px); max-width: 520px; max-height: calc(100% - 24px - var(--safe-t) - var(--safe-b));
  overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--cream); border: 3px solid var(--ink); border-radius: var(--r-panel); box-shadow: 0 var(--drop-card) 0 var(--shadow); text-align: center; }
.photo-dialog[hidden] { display: none; }
.photo-dialog h2 { margin: 0; font-size: 1.625rem; }
.photo-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.photo-dialog-head .btn { width: 100px; }
.photo-lines { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.photo-lines h3 { margin: 6px 0 0; font-size: 0.75rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.photo-line { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px; border: 2px solid var(--line); border-radius: var(--r-field); background: var(--paper); color: var(--ink); text-align: left; font-size: 0.9375rem; font-weight: 800; }
.photo-line.on { border-color: var(--ink); background: color-mix(in srgb, var(--gold) 35%, var(--paper)); }
.photo-line small { display: block; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
#photoOk, #photoErr { display: flex; flex-direction: column; gap: 10px; }
#photoOk[hidden], #photoErr[hidden] { display: none; }
#photoErr p { margin: 0; font-size: 1rem; font-weight: 700; }
.photo-img { display: block; max-width: 100%; max-height: 50vh; margin: 0 auto; object-fit: contain; border: 1px solid var(--line); }
#photoDownload { text-align: center; text-decoration: none; color: #1D1A1F; }
.photo-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.photo-flash.go { animation: photoFlash .35s ease-out; }
@keyframes photoFlash { from { opacity: 1; } to { opacity: 0; } }
[data-theme="dark"] .photo-flash.go { animation-name: photoFlashSoft; } /* [see37] a dark interface: no bright flash (the Dark Interface label; SeeRules.cameraFlash: a third) */
@keyframes photoFlashSoft { from { opacity: .3; } to { opacity: 0; } }
html.calm .photo-flash.go { animation: none; }

/* ---------- Side Sniffs (game.js "Side Sniffs"): the intro's, pause card's and result card's lists ---------- */
.sniffs { text-align: left; background: var(--cream); border: 2.5px dashed var(--line); border-radius: var(--r-button); padding: 8px 12px 10px; }
.sniffs-head { margin: 0 0 4px; font-size: 0.9375rem; font-weight: 900; display: flex; justify-content: space-between; gap: 8px; }
.sniffs-n { color: var(--muted); font-weight: 800; }
.sniffs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sniff { display: flex; gap: 8px; align-items: baseline; font-size: 0.875rem; font-weight: 600; line-height: 1.3; }
.sniff-tick { flex: none; width: 1.3em; text-align: center; color: var(--muted); }
.sniff.done .sniff-text { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--gold); }
.sniff.new .sniff-text { color: var(--ink); text-decoration: none; font-weight: 800; }
.sniff.new .sniff-tick { animation: sniff-pop .5s cubic-bezier(.3, 1.6, .5, 1) .45s both; }
@keyframes sniff-pop { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
html.calm .sniff.new .sniff-tick { animation: none; }
.lvl-paw { margin-left: 4px; }
/* [webcontent] the title screen's App Store line (index.html #getApp): a plain link, no badge */
.get-app { margin: 4px 0 0; font-size: 0.875rem; line-height: 1.4; color: var(--muted); text-align: center; text-wrap: balance; }
.get-app a { color: var(--ink); font-weight: 900; text-underline-offset: 3px; white-space: nowrap; }
.get-app span { font-weight: 700; }

/* [scrapbook] "📒 New in the Scrapbook: …" (game.js scrapToastTick): under the top bar and the minimap, centred, never over
   the hearts, the abilities, the thought card or Watch Mode's bar; slides in (fades, with Reduce Motion) and goes after 4 s */
.scrap-toast { zoom: var(--ui, 1); position: absolute; left: 50%; top: calc(var(--safe-t) + 200px); transform: translateX(-50%); max-width: min(360px, calc(100vw - 32px));
  background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 7px 12px; box-shadow: 0 3px 0 var(--world-shadow);
  font-size: 15px; font-weight: 800; text-align: center; pointer-events: none; }
.scrap-toast b { font-weight: 900; color: var(--muted); }
.scrap-toast[hidden] { display: none; }
.scrap-toast.show { animation: scrapIn 4s ease-out forwards; }
@keyframes scrapIn { 0% { opacity: 0; transform: translate(-50%, -14px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }
@keyframes scrapFade { 0% { opacity: 0; } 8%, 85% { opacity: 1; } 100% { opacity: 0; } }
html.calm .scrap-toast.show { animation-name: scrapFade; }
body.ff .scrap-toast { display: none; }
/* [stab] the result card's "🧣 New in the Wardrobe: …" (game.js wardrobeResult) */
.res-wardrobe { margin: 10px auto 0; padding: 5px 14px; width: fit-content; max-width: 100%; border: 2.5px solid var(--line); border-radius: var(--r-button); background: var(--cream); color: var(--ink); font-size: 0.9375rem; font-weight: 800; text-align: center; } /* [design2] a note, not a button (cream, a soft line: the ink outline is the buttons' look) */
.res-wardrobe[hidden] { display: none; }
/* [web2] Keep Charlie on the result card (public/install.js): a note with two buttons, cream like the Wardrobe's, after the card's
   own lines and before its buttons; no slide-in with Reduce Motion (html.calm) */
.keep-card { margin: 12px auto 2px; padding: 12px 14px 8px; width: 100%; max-width: 30em; box-sizing: border-box; border: calc(var(--edge-w) - .5px) solid var(--edge); border-radius: var(--r-button); background: var(--cream); color: var(--ink); text-align: left; animation: keep-in .3s ease-out; }
.keep-card[hidden], .keep-steps[hidden], .keep-home[hidden] { display: none; }
.keep-h { margin: 0 0 4px; font-size: 1rem; font-weight: 900; line-height: 1.25; }
.keep-p { margin: 0 0 6px; font-size: 0.875rem; font-weight: 700; line-height: 1.4; }
.keep-steps { margin: 0 0 8px; padding-left: 1.4em; font-size: 0.875rem; font-weight: 700; line-height: 1.45; }
.keep-steps li + li { margin-top: 4px; }
.keep-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.keep-btns .btn { display: inline-block; width: auto; min-height: 44px; padding: 8px 16px; }
.keep-btns .link { min-height: 44px; }
.keep-share { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; }
.keep-inline { padding: 0 2px; font-size: inherit; color: var(--ink); min-height: 24px; }
@keyframes keep-in { from { opacity: 0; transform: translateY(8px); } }
html.calm .keep-card { animation: none; }

/* ---------- Controls (s-controls) [controls] ---------- */
body[data-screen="controls"] #s-controls { display: flex; flex-direction: column; align-items: center; }
.ctl-h { margin: 14px 0 2px; padding: 0; font-size: 1.0625rem; font-weight: 900; color: var(--ink); }
.ctl-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
/* [a11ygroups] Accessibility and controls by need (the app's A11yGroupsViews.swift): Find a setting, the four groups' jumps, each group's
   heading (an h3, a line above it) and who it's for; Motor's Controls and Cognitive's Chill Mode rows; Controls' own part after them */
.a11y-find { margin: 12px 0 2px; }
.a11y-find-box { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border: calc(var(--edge-w) - .5px) solid var(--edge); border-radius: var(--r-field); background: var(--paper); color: var(--muted); cursor: text; }
.a11y-find-box svg { flex: none; width: 20px; height: 20px; }
.a11y-find-box:focus-within { outline: 4px solid var(--gold); outline-offset: 2px; }
.a11y-find-box input { flex: 1; min-width: 0; padding: 4px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; font-weight: 700; outline: none; }
.a11y-find-box input::placeholder { color: var(--muted); opacity: 1; }
.a11y-says { margin: 8px 0 0; font-weight: 700; }
.a11y-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.a11y-chip { min-height: 44px; padding: 6px 16px; border: calc(var(--edge-w) - .5px) solid var(--edge); border-radius: var(--r-pill); background: var(--paper); color: var(--ink); box-shadow: 0 var(--drop-button) 0 var(--shadow); font: inherit; font-size: 0.9375rem; font-weight: 800; cursor: pointer; }
.a11y-chip:hover { background: var(--cream); }
.a11y-h { margin: 22px 0 0; padding-top: 14px; border-top: 2px solid var(--line); font-size: 1.375rem; }
.a11y-sub { margin: 2px 0 6px; font-weight: 700; }
.a11y-says:empty { margin: 0; }
.a11y-group[hidden], .a11y-item[hidden], .a11y-h[hidden], .ctl-part[hidden], .a11y-jump[hidden], .a11y-note[hidden] { display: none !important; }
.a11y-go { width: 100%; color: var(--ink); font: inherit; }
.a11y-go::after { content: "\203A"; margin-left: auto; padding-left: 12px; font-size: 1.375rem; line-height: 1; color: var(--muted); }
.ctl-part > .ctl-h:first-child { margin-top: 22px; padding-top: 14px; border-top: 2px solid var(--line); font-size: 1.375rem; }
@media (forced-colors: active) { .a11y-chip, .a11y-find-box { border-color: CanvasText; } .a11y-h, .ctl-part > .ctl-h:first-child { border-top-color: CanvasText; } }
.ctl-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px 6px 12px; border: var(--edge-w) solid var(--edge); border-radius: var(--r-button); background: var(--paper); color: var(--ink); box-shadow: 0 var(--drop-button) 0 var(--shadow); font: inherit; font-size: 1rem; font-weight: 800; text-align: left; cursor: pointer; }
.ctl-ico { flex: none; width: 26px; text-align: center; font-size: 1.125rem; }
.ctl-name { flex: 1; }
.ctl-key { flex: none; min-width: 64px; padding: 5px 10px; border: calc(var(--edge-w) - .5px) solid var(--edge); border-radius: var(--r-field); background: var(--paper); box-shadow: 0 var(--drop-small) 0 var(--shadow); font: inherit; font-size: 0.9375rem; font-weight: 900; text-align: center; }
.ctl-row.on .ctl-key { background: var(--gold); color: #1D1A1F; font-size: 0.8125rem; }
.ctl-msg { margin: 10px 0; padding: 10px; border: calc(var(--edge-w) - 1px) solid var(--edge); border-radius: var(--r-field); background: var(--cream); font-weight: 800; }
/* [s83] #ctlReset:disabled: .btn:disabled alone (an opacity on top took it under readable) */

/* [whatsnew] the title screen's "✨ New: …" line (generated from content/whatsnew.json into index.html), dismissible */

/* [a11y3] Increase Contrast: stronger secondary text and rules (the app: Palette.contrasted). [s73] on the page's contrast class
   (theme.js sets html.see-contrast from prefers-contrast: more before the page paints), the rules at 3:1 or more on paper and cream
   (#A8977E was 2.7:1), and the faint pieces at full strength (docs/art/TOKENS.md "Colour roles: Increase Contrast") */
html.see-contrast { --muted: #4A444F; --line: #8C7B62; }
html.see-contrast[data-theme="dark"] { --muted: #DDD5E1; --line: #7A6E85; }
html.see-contrast .key-hint { opacity: 1; } /* the Photo button's F (the app: the badge's edge in muted) */
/* [s73] a placeholder is the page's muted at full strength, never the browser's pale grey or a faded muted (2.5:1 at 60%), so the
   contrast class darkens it with the rest (the app: Palette.prompt) */
::placeholder { color: var(--muted); opacity: 1; }

/* [access] the access code dialog (index.html #accessDlg) */
.access-dlg { width: min(360px, calc(100vw - 32px)); padding: 20px; border: var(--edge-w) solid var(--edge); border-radius: var(--r-card); background: var(--paper); color: var(--ink); box-shadow: 0 var(--drop-card) 0 var(--shadow); font-family: var(--font); }
.access-dlg::backdrop { background: rgba(29, 26, 31, .55); }
.access-dlg h2 { margin: 0 0 6px; font-size: 1.375rem; }
.access-dlg p { margin: 0 0 12px; color: var(--muted); font-size: 0.9375rem; line-height: 1.35; }
.access-dlg label { display: block; font-weight: 800; font-size: 0.875rem; margin-bottom: 6px; }
.access-dlg input { width: 100%; box-sizing: border-box; font: 700 1.125rem var(--font); padding: 10px 12px; border: calc(var(--edge-w) - 1px) solid var(--edge); border-radius: var(--r-field); background: var(--cream); color: var(--ink); }
.access-dlg input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.access-dlg .access-err { min-height: 1.3em; margin: 8px 0 4px; color: var(--red); font-weight: 700; }
.access-row { display: flex; gap: 8px; justify-content: flex-end; }
.access-row .btn { flex: 1; }
.access-dlg[aria-busy="true"] .access-err { color: var(--muted); } /* (Checking… / You're in!: not an error) */
.access-dlg h2 { line-height: 1.2; text-wrap: balance; }
@media (max-width: 359px) { .access-dlg { padding: 16px; } .access-dlg h2 { font-size: 1.25rem; } .access-row { flex-wrap: wrap; } } /* (a 320 px phone) */
/* [access] Game Settings → Access (game.js syncAccess): the code's label (not a button) and "Use a different code"; a code
   that fixes the version leaves the Version row showing it, not switching it */
.set-access { width: 100%; }
.set-note { margin: 0; cursor: default; color: var(--muted); font-size: var(--rt-secondary); line-height: var(--rt-lh-small); font-weight: 600; } /* [s66] a setting's note: the reading scale's secondary, as the app's */
.set-note:hover { background: none; }
.set-row.set-locked { cursor: default; color: var(--muted); }
.set-row.set-locked:hover { background: none; }
/* [cloudsave] Game Settings → Save progress (game.js "Save progress"): rows show and hide as you sign in and out, so the lines
   between rows go only between the ones on show; an empty status line takes no room; the providers' own buttons, stacked and
   centred (they draw themselves: Apple JS and Google Identity Services, white with an outline in both themes) */
.set-save { width: 100%; }
.save-group .set-row ~ .set-row { border-top: 0; }
.save-group .set-row:not([hidden]) ~ .set-row:not([hidden]) { border-top: 2px solid var(--line); }
.save-group .save-status:empty { min-height: 0; padding: 0; border-top: 0 !important; }
.save-group .save-status:focus { outline: none; }
.save-group .save-status:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.save-intro { font-size: 0.9375rem; line-height: 1.35; }
.save-who { color: var(--ink); }
.save-providers { flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px 16px; cursor: default; }
.save-providers:hover { background: none; }
.save-link { margin: 0; width: 100%; color: var(--muted); font-size: 0.9375rem; font-weight: 700; text-align: left; }
.save-btn { display: flex; justify-content: center; width: 260px; max-width: 100%; min-height: 40px; }
#appleid-signin { width: 260px; max-width: 100%; height: 40px; cursor: pointer; }
.set-row.save-del { color: var(--red); }
/* [gdaycharlie] Game Settings → From the old address (public/move.js: on gdaycharlie.com only; its rows as Save progress's) and the
   move's quiet note at the bottom ("Your progress came with you.", or the one-time offer on the title), as pwa.js's toast */
.set-move { width: 100%; }
.set-move .save-intro, .move-toast { overflow-wrap: anywhere; }
.move-toast { position: fixed; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 9998; width: fit-content; max-width: 460px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 10px 10px 16px; background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); border-radius: var(--r-button); box-shadow: 0 var(--drop-button) 0 var(--shadow); font: 800 15px/1.3 var(--font); animation: move-in .25s ease-out; }
.move-toast span { flex: 1 1 200px; }
.move-toast button { font: inherit; cursor: pointer; min-height: 44px; padding: 6px 14px; border: 3px solid var(--ink); border-radius: var(--r-field); background: var(--gold); color: #1D1A1F; box-shadow: 0 var(--drop-button) 0 var(--shadow); }
.move-toast .move-later { background: transparent; color: var(--ink); border-color: transparent; box-shadow: none; }
.move-toast button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@keyframes move-in { from { transform: translateY(20px); opacity: 0; } }
html.calm .move-toast { animation: none; }
.save-del-go { background: var(--red); color: #fff; }
[data-theme="dark"] .save-del-go { color: #fff; }
/* [transfer] I have a code's and Link an Apple TV's fields (a row of the group: label, field, what went wrong, the button), and the
   save code's dialog: the letters big and in one line (smaller on a 320 px phone), the QR on white whatever the theme */
.save-form { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 16px 16px; cursor: default; }
.save-form:hover { background: none; }
.save-form label { font-weight: 800; font-size: 0.875rem; }
.save-form input { width: 100%; box-sizing: border-box; font: 800 clamp(0.9375rem, 4.6vw, 1.125rem) var(--font); letter-spacing: .5px; text-transform: uppercase; padding: 10px 12px; border: calc(var(--edge-w) - 1px) solid var(--edge); border-radius: var(--r-field); background: var(--cream); color: var(--ink); }
.save-form input::placeholder { color: var(--muted); opacity: 1; } /* [s73] (was 60%: 2.5:1) */
.save-form input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.save-form .btn { align-self: flex-start; }
.save-err { margin: 0; color: var(--red); font-weight: 700; font-size: 0.875rem; line-height: 1.35; }
.save-err:empty { display: none; }
.save-code-dlg .save-code { margin: 4px 0 12px; color: var(--ink); font: 900 clamp(1.125rem, 6vw, 1.625rem)/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 1px; text-align: center; white-space: nowrap; user-select: all; -webkit-user-select: all; }
.save-qr { width: 176px; height: 176px; margin: 0 auto 12px; padding: 0; border-radius: var(--r-field); background: #fff; overflow: hidden; }
.save-qr:empty { display: none; }
.save-qr svg { display: block; width: 100%; height: 100%; }
.save-code-dlg .save-code-msg { min-height: 1.3em; margin: 0 0 8px; color: var(--ink); font-weight: 700; }
.save-code-dlg .save-code-msg:empty { min-height: 0; margin: 0; }

/* ---------- [hud] the interface, drawn (public/ui-icons.css: .ui-i[data-i]; scripts/ui-icons.mjs; README "🎨 The interface, drawn") ---------- */
/* Words first; an icon only where it does a job the words can't (the health bar's heart, the ability buttons, Fluffy's mood gem, a
   mission's stars, the locks, the Side Sniffs' paw); never an emoji (the owner, October 28, 2026). */
.hp-icon .ui-i { width: 20px; height: 20px; vertical-align: -4px; }
.hud-goal { font-size: 17px; white-space: nowrap; overflow: hidden; } /* (game.js fitHudGoal fits it to the middle's width) */
.hud-goal.two { display: flex; flex-direction: column; align-items: flex-start; width: max-content; max-width: 100%; margin: 0 auto; font-size: 13.5px; line-height: 1.12; } /* [s38] a counter a line, their icons in one column, the block centred (HUDView.swift the same) */ .hud-goal.two .hg-dot { display: none; }
.fm-label .ui-i { width: 17px; height: 17px; vertical-align: -4px; margin-right: 3px; }
.zoom-btn .zoom-name { font-size: 10px; margin-top: 0; line-height: 1.05; text-align: center; letter-spacing: -0.2px; }
.ab-ico .ui-i { width: 32px; height: 32px; vertical-align: middle; }
.ab-big .ab-ico .ui-i { width: 40px; height: 40px; }
.stars .ui-i { width: 46px; height: 46px; }
.lvl-num .ui-i { width: 24px; height: 24px; vertical-align: middle; }
.lvl-stars .ui-i { width: 17px; height: 17px; vertical-align: -3px; } .lvl-stars .ui-i.off { opacity: .3; filter: grayscale(1); }
.sniff-tick .ui-i { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.ctl-ico:empty { display: none; }
.photo-sticker .ps-stamp .ui-i { width: 26px; height: 26px; transform: rotate(10deg); }
.intro-emoji.intro-pic { display: inline-block; width: 62px; height: 72px; background: center bottom / contain no-repeat; position: relative; isolation: isolate; margin-bottom: 3px; } /* [u4] a prop a little over half a person (Screens.swift CastStand.prop), grounded like the people */
.intro-emoji.intro-pic::after { content: ''; position: absolute; left: 15%; right: 15%; bottom: -5px; height: 10px; z-index: -1; background: radial-gradient(closest-side, var(--stand), transparent); }
.intro-emoji.intro-word { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 3px; /* [u4] on the row's floor */ padding: 0 12px; font-size: 0.875rem; font-weight: 900; line-height: 1.1; border: calc(var(--edge-w) - 1px) solid var(--edge); border-radius: var(--r-pill); background: var(--paper); color: var(--ink); }
.meet-emoji:empty { display: none; }

/* [act1] Act One, rebuilt: the list's prologue, scenes and finale (game.js renderLevels), and the curtain call (#s-curtain, game.js curtainCall) */
.lvl-new { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--red); color: #fff; font: 800 0.6875rem/1.5 var(--font); letter-spacing: .3px; vertical-align: middle; }
.lvl-done { font: 800 0.8125rem var(--font); color: var(--muted); letter-spacing: .3px; }
.lvl-piece .lvl-num { background: var(--paper, #FFFDF8); }
.screen-curtain { justify-content: center; gap: 14px; padding: 16px; background: var(--cream); }
.curtain-host { width: 100%; max-width: 420px; display: flex; justify-content: center; }
.curtain-host .cast-stage { margin: 0; }
.curtain-line { max-width: 34em; min-height: 2.8em; margin: 0; text-align: center; font: 700 1.0625rem/1.4 var(--font); color: var(--ink); }
.curtain-end { margin: 0; font: 900 1.875rem/1.2 var(--font); color: var(--ink); letter-spacing: .5px; }
.curtain-skip { position: absolute; right: 16px; bottom: 16px; }

/* ---------- [a11y35] Accessibility and controls (game.js syncA35): Subtitle size's and Reduce Motion's choices, the note about flashing
   lights (and its first-visit card), Left-handed, the Walk button, the pause card's Last lines ---------- */
.ctl-choice-set { margin: 10px 0 2px; }
.ctl-sub { margin: 0 0 4px; padding: 0; font-size: 1rem; font-weight: 900; color: var(--ink); }
.ctl-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.ctl-choice label { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border: var(--edge-w) solid var(--edge); border-radius: var(--r-button); background: var(--paper); box-shadow: 0 var(--drop-button) 0 var(--shadow); font-weight: 800; cursor: pointer; }
.ctl-choice input { width: 22px; height: 22px; accent-color: var(--gold); margin: 0; }
.ctl-choice label:has(input:checked) { background: #FFE7A8; color: #1D1A1F; }
.sub-preview { margin: 6px 0 4px; padding: 8px 12px; border: var(--edge-w) solid var(--edge); border-radius: var(--r-button); background: var(--paper); font-size: calc(14px * var(--subs, 1)); font-weight: 700; text-align: center; }
.flash-note { margin: 8px 0 4px; padding: 10px 12px; border: 2.5px dashed var(--line); border-radius: var(--r-button); background: var(--cream); font-size: 0.875rem; font-weight: 600; line-height: 1.4; text-align: left; }
.flash-card-wrap { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(29,26,31,.6); }
.flash-card-wrap[hidden] { display: none; }
.flash-card { max-width: 30em; zoom: var(--ui, 1); }
.flash-card p { font-size: 0.9375rem; font-weight: 600; line-height: 1.45; text-align: left; margin: 4px 0 8px; }
body.left-handed .hud-abilities { right: auto; left: calc(12px + var(--safe-l)); flex-direction: row-reverse; } /* (Zoomies nearest the left thumb) */
body.left-handed .hud-thought { left: auto; right: calc(10px + var(--safe-r)); }
body.left-handed .hud-thought.th-right { right: auto; left: calc(10px + var(--safe-l)); } /* ([bugs35]'s landing) the other bottom corner, for the left-handed: the left (HUDView.swift far) */
body.left-handed .hud-thought.th-top { left: 0; right: 0; } /* (and the top, centred, as anyone's) */
.walk-pill { position: absolute; right: calc(12px + var(--safe-r)); bottom: calc(106px + var(--safe-b)); min-width: 82px; height: 44px; padding: 0 16px; zoom: var(--ui, 1); pointer-events: auto;
  border: 3px solid var(--ink); border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 3px 0 var(--world-shadow); font-size: 15px; font-weight: 900; } /* (over Zoomies: 14 + 82 + 10) */
.walk-pill[hidden] { display: none; }
body.left-handed .walk-pill { right: auto; left: calc(12px + var(--safe-l)); }
body.walk-on:not(.watching) .hud-thought { bottom: calc(162px + var(--safe-b)); } /* (up 54, over the pill) */
.line-log { text-align: left; background: var(--cream); border: 2.5px dashed var(--line); border-radius: var(--r-button); padding: 8px 12px 10px; max-height: 40vh; overflow: auto; }
.line-log[hidden] { display: none; }
.line-log h3 { margin: 0 0 4px; font-size: 0.9375rem; font-weight: 900; }
.line-log-list { margin: 0; padding: 0 0 0 1.4em; display: grid; gap: 3px; font-size: calc(0.875rem * var(--subs, 1)); font-weight: 600; line-height: 1.3; }
/* [hear37] Look around (game.js lookSync): out of sight until the focus is in it (L in play, or Tab), then a panel over the game */
.look-list:not(:focus-within) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.look-list:focus-within { position: absolute; left: calc(12px + var(--safe-l, 0px)); right: calc(12px + var(--safe-r, 0px)); top: calc(70px + var(--safe-t, 0px)); max-width: 460px; max-height: calc(100% - 200px); overflow: auto; margin: 0 auto;
  pointer-events: auto; z-index: 6; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; padding: 10px 14px; box-shadow: 0 5px 0 var(--world-shadow); }
.look-h { font-size: 1.125rem; font-weight: 900; margin: 0 0 2px; }
.look-note { font-size: 0.8125rem; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.look-sub { font-size: 0.875rem; font-weight: 900; margin: 8px 0 4px; }
.look-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.look-btn { width: 100%; min-height: 44px; text-align: left; font: inherit; font-size: 0.9375rem; font-weight: 800; color: var(--ink); background: var(--cream, #FFF6E9); border: 2.5px solid var(--ink); border-radius: var(--r-field); padding: 8px 12px; cursor: pointer; }
.look-btn:focus-visible { outline: 4px solid var(--gold); outline-offset: 2px; }
/* ---------- [see37] Seen clearly (game.js "Seen clearly"; theme.js sets html.see-opaque and html.see-contrast before the page paints;
   the app: apple/Render/See37.swift and its SwiftUI twins) ---------- */
/* Reduce Transparency (or more contrast): whatever sits behind words or a control goes solid: the veils behind cards, the job line,
   the fast-forward's dimming, the Follow label, Meet the Cast's and the origin story's pills, the mission card's key hints */
html.see-opaque :is(.screen-dim, .recap, .flash-card-wrap) { background: #1D1A1F; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.see-opaque[data-theme="dark"] :is(.screen-dim, .recap) { background: #000; }
html.see-opaque .access-dlg::backdrop { background: #1D1A1F; }
/* [s75] the card over the solid veil keeps its drawn edge (docs/art/TOKENS.md "Elevation: cards over the game"): a 4px paper ring round
   the card and its 6px drop, light theme only (dark: the light ink stroke reads on #000); the app's PanelCard.ringed */
html.see-opaque:not([data-theme="dark"]) .screen-dim .panel-center { box-shadow: 0 var(--drop-card) 0 var(--shadow), 0 0 0 4px var(--paper), 0 var(--drop-card) 0 4px var(--paper); }
html.see-opaque .hud-job { background: #1D1A1F; }
html.see-opaque body.ff #hud::before { background: #1D1A1F; }
html.see-opaque .wf-label { background: var(--paper); }
html.see-opaque :is(.meet-skip, .origin-count) { background: #1D1A1F; }
html.see-opaque .intro-keys { background: #FDF1DA; }
html.see-opaque[data-theme="dark"] .intro-keys { background: #3F332E; }
html.see-opaque .daily-day.walked :is(.dn, .dn.dm) { color: #614F47; }
html.see-opaque .op-skip { padding: 2px 10px; border-radius: var(--r-pill); background: #1D1A1F; text-shadow: none; }
/* more contrast, in play: the thought card's, the banner's and the fast-forward card's edges thicker (and black on the light theme),
   the health and temper meters outlined (their fill's edge too), the temper meter's halfway tick solid */
html.see-contrast :is(.hud-thought, .time-banner, .ff-card, .follow-toast) { border-width: 4px; }
html.see-contrast:not([data-theme="dark"]) :is(.hud-thought, .time-banner, .ff-card, .follow-toast, .hud-top, .hud-fluffy) { border-color: #000; }
html.see-contrast :is(.hp-bar, .fm-bar) { border-width: 3px; outline: 1.5px solid var(--paper); }
html.see-contrast :is(.hp-bar i, .fm-fill) { box-shadow: inset -2px 0 0 var(--ink); }
html.see-contrast .fm-tick { opacity: 1; }
html.see-contrast .wf-pill { border-width: 3px; }
/* Differentiate Without Color, always (a browser can't say whether it's on; the shapes cost nothing): the Follow chip that's on has a
   check mark as well as its gold; the Daily Walk's picked day a notch as well as its gold ring (the app: FollowChips, DailyCalendar) */
.wf-chip.on .wf-pill::before { content: ""; display: inline-block; width: .32em; height: .62em; margin: -.25em .5em 0 .1em; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.daily-day { position: relative; }
.daily-day.picked::after { content: ""; position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%); border: 5px solid transparent; border-top: 0; border-bottom-color: var(--ink); }
/* Smart Invert (inverted-colors: Safari): the game's canvas and every painted picture inverted back, so only the chrome inverts
   (theme.js has the same rule for every page) */
@media (inverted-colors: inverted) {
  canvas, img, video, picture, .ui-i { filter: invert(1) hue-rotate(180deg); }
}
/* forced colors (a contrast theme): the game keeps its own colors, and the menus their shapes (box shadows and fills are dropped) */
@media (forced-colors: active) {
  .back::before { forced-color-adjust: none; background: ButtonText; } /* [s13] the drawn chevron in High Contrast (a mask's currentColor goes to Canvas) */
  canvas, img, .ui-i { forced-color-adjust: none; }
  .cast-stage button { border: 0; } /* (the cast around Charlie: pictures, not boxes) */
  :is(.wf-chip.on .wf-pill, .daily-day.picked, .daily-day.today) { outline: 3px solid Highlight; outline-offset: 1px; }
  .daily-day.walked { border-style: double; border-width: 4px; }
  :is(.hp-bar i, .fm-fill) { forced-color-adjust: none; background: Highlight; }
  .ab::after { forced-color-adjust: none; }
}

/* ---------- [ipad37] Made for iPad, really (game.js "[ipad37] Made for iPad, really"; the app: apple/App/Pad37Logic.swift, PadPlayViews.swift) ----------
   A wide window in play (PadPlay: 980 wide and no taller than wide, or 900 tall, 600 wide and taller than wide) has a panel beside the
   game (below it upright) instead of the phone's layout blown up: resize() gives the game's view its own rectangle (--pp-g*), the HUD is
   laid over that rectangle only, and the panel over the rest (--pp-x, -y, -w, -h; --pp-ui its type scale, PadPlay.ui). The abilities are
   in the panel, so the HUD's own buttons go (and Auto Play Mode's Watch bar and Follow chips, which its director's panel has). */
body.pp-on #stage { left: var(--pp-gx); top: var(--pp-gy); width: var(--pp-gw); height: var(--pp-gh); right: auto; bottom: auto; }
body.pp-on #hud { left: var(--pp-gx); top: var(--pp-gy); width: var(--pp-gw); height: var(--pp-gh); right: auto; bottom: auto; }
body.pp-on .hud-abilities, body.pp-on #watchBar, body.pp-on .wb-follow { display: none !important; }
body.pp-on .walk-pill { bottom: calc(14px + var(--safe-b)); } /* (Auto-walk's pill alone, where the abilities were) */
.pp-show { flex: none; }
.pad-panel { position: fixed; left: var(--pp-x, 0); top: var(--pp-y, 0); width: var(--pp-w, 0); height: var(--pp-h, 0); z-index: 5; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 10px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--cream); color: var(--ink); border: 0 solid var(--ink); padding: calc(12px + var(--safe-t)) calc(14px + var(--safe-r)) calc(12px + var(--safe-b)) 14px; }
.pad-panel[hidden] { display: none; }
body.pp-side .pad-panel { border-left-width: 3px; }
body.pp-side.pp-lead .pad-panel { border-left-width: 0; border-right-width: 3px; padding: calc(12px + var(--safe-t)) 14px calc(12px + var(--safe-b)) calc(14px + var(--safe-l)); }
body.pp-bottom .pad-panel { border-top-width: 3px; padding: 12px calc(14px + var(--safe-r)) calc(12px + var(--safe-b)) calc(14px + var(--safe-l)); }
body[data-screen="pause"] .pad-panel, body[data-screen="result"] .pad-panel { opacity: .5; } /* (under the cards, as the app's: the HUD's --hud-dim behind the blur) */
.pp-head, .pp-sec, .pp-abs, .pp-hide, .pp-steps { zoom: var(--pp-ui, 1); }
/* beside the game: one column, everything in the panel's own flow (.pp-body and .pp-col only group things for the lower panel), so a short
   window shrinks Last lines (or what's described) first, then scrolls the panel; nothing overlaps */
.pp-body, .pp-col { display: contents; }
.pp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; flex: none; }
.pp-head-l { min-width: 0; } .pp-head-r { flex: none; text-align: right; }
.pp-eyebrow, .pp-week { margin: 0; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pp-eyebrow[hidden], .pp-week[hidden] { display: none; }
.pp-place { margin: 0; font-size: 20px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
body.pp-watch .pp-place { font-size: 22px; }
.pp-clock { margin: 0; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
body.pp-watch .pp-clock { color: var(--ink); }
.pp-clock:empty { display: none; }
.pp-mini { display: flex; justify-content: center; align-items: flex-start; flex: none; }
.pp-mini[hidden] { display: none; }
.pp-mini canvas { display: block; }
.pp-mini[role="button"] { cursor: pointer; border-radius: 14px; }
.pp-mini[role="button"]:focus-visible { outline: 4px solid var(--gold); outline-offset: 2px; }
.pp-sec { background: var(--paper); border: 2.5px solid color-mix(in srgb, var(--ink) 85%, transparent); border-radius: 14px; padding: 9px 12px; min-width: 0; flex: none; }
.pp-sec[hidden] { display: none; }
.pp-h { margin: 0 0 4px; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pp-level { margin: 0; font-size: 14px; font-weight: 800; color: var(--muted); }
.pp-goal { margin: 2px 0 0; font-size: 18px; font-weight: 900; line-height: 1.25; }
.pp-fluffy { margin: 3px 0 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.pp-fluffy.hot { color: var(--red-deep); }
.pp-fluffy[hidden] { display: none; }
.pp-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--muted); }
.pp-list:empty { display: none; }
.pp-list > li:last-child { color: var(--ink); font-weight: 800; }
.pp-none { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.pp-none[hidden] { display: none; }
.pp-here { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-here > li, .pp-here > li:last-child { border: 1.5px solid var(--line); border-radius: 99px; padding: 2px 9px; background: var(--cream); font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.pp-lines { font-size: calc(13.5px * var(--subs, 1)); }
.pp-lines li { overflow-wrap: anywhere; }
/* the cards that give way in a short window (their heading stays; their list scrolls, the newest last and in view: game.js padNewest) */
.pp-lines-sec, #ppDescSec, #ppHlSec { display: flex; flex-direction: column; min-height: 0; }
.pp-lines-sec { flex: 1 1 0; min-height: 4em; }
#ppDescSec { flex: 0 1 auto; min-height: 5em; } #ppHlSec { flex: 0 1 auto; min-height: 4em; }
#ppDescSec[hidden], #ppHlSec[hidden] { display: none; }
:is(.pp-lines-sec, #ppDescSec, #ppHlSec) > .pp-list { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
/* the abilities: three big named buttons, a column (Zoomies last, nearest the thumb; first, left-handed), the painted icon, the name, the
   key cap (with a keyboard or a controller, as the HUD's), the cooldown as a fill that drains from the right as it comes back */
.pp-abs { display: flex; flex-direction: column; gap: 8px; flex: none; }
body.pp-side .pp-abs { position: sticky; bottom: -12px; z-index: 1; margin-bottom: -12px; padding: 4px 0 12px; background: var(--cream); }
html.see-opaque body.pp-side :is(.pp-abs, .pp-steps) { box-shadow: none; border-top: 2px solid var(--line); } /* (always in reach: a window too short for everything scrolls the panel under them) */
body.left-handed .pp-abs { flex-direction: column-reverse; }
.pp-ab { position: relative; overflow: hidden; height: 56px; padding: 0 12px; display: flex; align-items: center; gap: 10px; text-align: left;
  border: 3px solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 3px 0 var(--shadow); font: inherit; touch-action: none; }
.pp-ab-big { height: 66px; background: var(--gold); color: #1D1A1F; }
.pp-ab-ico { position: relative; flex: none; font-size: 29px; line-height: 1; }
.pp-ab-big .pp-ab-ico { font-size: 35px; }
.pp-ab-name { position: relative; flex: 1; min-width: 0; font-size: 17px; font-weight: 900; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-ab-big .pp-ab-name { font-size: 19px; }
.pp-cd { position: absolute; inset: 0; background: rgba(29, 26, 31, .45); transform-origin: 0 50%; transform: scaleX(var(--cd, 0)); pointer-events: none; }
.pp-key { display: none; position: relative; flex: none; font-size: 12px; font-weight: 900; background: #1D1A1F; color: #fff; border-radius: 6px; padding: 2px 7px; }
.pp-key::after { content: attr(data-k); }
@media (hover: hover) and (pointer: fine) { .pp-key { display: block; } }
body.pad .pp-key { display: block; }
.pp-ab:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shadow); }
.pp-ab:focus-visible, .pp-hide:focus-visible, .pp-fbtn:focus-visible, .pp-step-btn:focus-visible { outline: 4px solid var(--gold); outline-offset: 2px; }
html:not(.calm) .pp-ab.ready { animation: ready .3s; } /* (the HUD's pulse as an ability comes back; none with Reduce Motion) */
.pp-hide { flex: none; align-self: center; min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
/* Auto Play Mode's director's panel: the day as a timeline, whom to follow, what's described, the highlights so far, Speed and Excitement */
.pp-today > li, .pp-hl > li { display: grid; grid-template-columns: auto 64px minmax(0, 1fr); align-items: baseline; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.pp-hl > li { grid-template-columns: 64px minmax(0, 1fr); font-weight: 800; }
.pp-today > li.done, .pp-today > li.later { color: var(--muted); }
.pp-today > li.now { font-weight: 900; }
.pp-t { font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-dot { position: relative; align-self: center; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); box-sizing: border-box; }
.pp-today > li.now .pp-dot { background: var(--gold); }
.pp-today > li.next .pp-dot { border-width: 3px; }
.pp-today > li.later .pp-dot { border-color: color-mix(in srgb, var(--ink) 50%, transparent); }
.pp-today > li.done .pp-dot { background: var(--line); }
.pp-today > li.done .pp-dot::after { content: ""; position: absolute; left: 4px; top: 1px; width: 3px; height: 7px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); } /* ([see37] a tick as well as the fill) */
.pp-follow { display: flex; flex-wrap: wrap; gap: 0 6px; }
.pp-fbtn { min-height: 44px; padding: 0; border: 0; background: none; font: inherit; display: flex; align-items: center; color: var(--ink); }
.pp-fbtn > span { display: flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--cream); font-size: 13px; font-weight: 800; white-space: nowrap; }
.pp-fbtn.on > span { background: var(--gold); color: #1D1A1F; border-width: 2.5px; }
.pp-fbtn.on > span::before { content: ""; display: inline-block; width: .32em; height: .62em; margin: -.25em .45em 0 .1em; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); } /* ([see37] a check mark as well as the gold, as the Follow chips) */
.pp-fbtn:disabled:not(.on) { cursor: default; } .pp-fbtn:disabled:not(.on) > span { background: var(--cream); color: var(--muted); border-color: var(--muted); border-style: dashed; } /* [s83] the Unavailable look */
.pp-fbtn[hidden] { display: none; }
.pp-desc { font-size: calc(13px * var(--subs, 1)); }
.pp-steps { display: flex; flex-direction: column; gap: 8px; flex: none; margin-top: auto; }
body.pp-side .pp-steps { position: sticky; bottom: -12px; z-index: 1; margin-bottom: -12px; padding: 6px 0 12px; background: var(--cream); box-shadow: 0 -8px 8px -8px rgba(29, 26, 31, .35); } /* (Speed and Excitement always in reach: a window too short for the whole director's panel scrolls it under them) */
.pp-step { display: flex; align-items: center; gap: 8px; padding: 6px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 14px; }
.pp-step-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pp-step .pp-h { margin: 0; font-size: 11px; }
.pp-step-name { font-size: 16px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pp-step-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--cream); color: var(--ink); font: inherit; font-size: 20px; font-weight: 900; line-height: 1; padding: 0; }
.pp-step-btn:disabled { background: var(--cream); color: var(--muted); border-color: var(--muted); border-style: dashed; cursor: default; } /* [s83] the Unavailable look */
/* the lower panel (a tall window): the map on the left, the place and Hide panel along the top, the panel's columns under them, each
   scrolling on its own */
body.pp-bottom .pad-panel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "mini head hide" "mini body body"; gap: 6px 14px; overflow: hidden; }
body.pp-bottom .pp-mini { grid-area: mini; align-self: center; }
body.pp-bottom .pp-head { grid-area: head; justify-content: flex-start; gap: 16px; align-items: baseline; }
body.pp-bottom .pp-hide { grid-area: hide; align-self: start; min-height: 32px; }
body.pp-bottom .pp-body { grid-area: body; display: grid; gap: 10px; align-items: stretch; min-height: 0; }
body.pp-bottom .pp-col { display: flex; flex-direction: column; gap: 8px; min-height: 0; min-width: 0; overflow-y: auto; }
body.pp-bottom .pp-body > .pp-sec:not(.pp-lines-sec), body.pp-bottom .pp-col > .pp-sec:not(#ppDescSec):not(#ppHlSec) { min-height: 0; overflow-y: auto; }
body.pp-bottom :is(.pp-lines-sec, #ppDescSec, #ppHlSec) { min-height: 0; }
body.pp-bottom .pp-play { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) calc(224px * var(--pp-ui, 1)); }
body.pp-bottom .pp-ab-name { font-size: 16px; } body.pp-bottom .pp-ab-big .pp-ab-name { font-size: 17px; }
body.pp-bottom .pp-abs { justify-content: space-between; }
body.pp-bottom .pp-ab { height: auto; flex: 1; max-height: 66px; }
body.pp-bottom .pp-watch { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) calc(190px * var(--pp-ui, 1)); }
body.pp-bottom .pp-steps { margin: 0; }
body.pp-bottom .pp-step { gap: 4px; padding: 4px; }
body.pp-bottom .pp-step-btn { width: 36px; height: 36px; font-size: 18px; }
body.pp-bottom .pp-step-name { font-size: 14px; }
body.pp-bottom .pp-today > li { grid-template-columns: auto 58px minmax(0, 1fr); gap: 6px; }
/* a short window beside the game (an 11-inch iPad on its side, a mini's, a laptop's): the panel's gaps, buttons and words a little tighter */
@media (max-height: 900px) {
  body.pp-side .pad-panel { gap: 8px; }
  body.pp-side .pp-ab { height: 48px; } body.pp-side .pp-ab-big { height: 56px; }
  body.pp-side .pp-goal { font-size: 16px; }
  body.pp-side .pp-hide { min-height: 36px; }
  body.pp-side .pp-sec { padding: 7px 11px; }
  body.pp-side .pp-step-btn { width: 38px; height: 38px; }
  body.pp-side .pp-step { padding: 4px 6px; }
}
/* Seen clearly ([see37]) and the theme: solid behind everything, the edges thicker with more contrast (black on the light theme) */
html.see-opaque .pad-panel { background: var(--cream); }
html.see-opaque body[data-screen="pause"] .pad-panel, html.see-opaque body[data-screen="result"] .pad-panel { opacity: 1; }
html.see-contrast :is(.pp-sec, .pp-step) { border-width: 3px; border-color: var(--ink); }
html.see-contrast :is(.pp-fbtn > span, .pp-here > li) { border-width: 2.5px; border-color: var(--ink); }
html.see-contrast:not([data-theme="dark"]) :is(.pad-panel, .pp-sec, .pp-step, .pp-ab, .pp-fbtn > span, .pp-here > li, .pp-step-btn, .pp-dot) { border-color: #000; }
html.see-contrast .pp-cd { background: rgba(0, 0, 0, .55); }
html.see-contrast .pp-hide { color: var(--ink); }
@media (forced-colors: active) { .pp-fbtn.on > span, .pp-today > li.now .pp-dot { outline: 3px solid Highlight; outline-offset: 1px; } .pp-cd { forced-color-adjust: none; } }
/* The pause and result cards in two columns (PadCards: a window at least 760 wide, body.wide or body.tablet; a sheet at most 900 wide at the
   cards' scale): what happened on the left (the title, the chips, Side Sniffs, the notes, Last lines, the stars, the line, the score), what
   to do next on the right (the card's foot: Keep going, Next mission, Try again and the rest; then the form and the links). Every element
   and id as on a phone; the foot stays in view at the top of its column as the card scrolls (sticky), instead of pinned to the bottom. */
body.pp-cards .card-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; row-gap: 0; align-items: start; max-width: 900px; padding: 24px; }
body.pp-cards .screen > .card-two { zoom: min(var(--ui, 1), 1.15); } /* (PadLayout.readMax: at an iPad's own type, not the phone's card magnified: the app's PausePinned and ResultView, pad.read) */
body.pp-cards .card-two > * { grid-column: 1; margin: 0 0 10px; }
body.pp-cards #s-pause .card-two { grid-template-rows: repeat(6, auto) 1fr auto; }
body.pp-cards #s-result .card-two { grid-template-rows: repeat(15, auto) 1fr auto; } /* ([w1] one more: Charlie) */
body.pp-cards .card-two > .card-foot { grid-column: 2; grid-row: 1 / -2; position: sticky; top: 0; bottom: auto; margin: 0; padding: 0 0 6px; border-radius: 0; border-top: 0; box-shadow: none; }
body.pp-cards .card-two > :is(.card-links, form) { grid-column: 2; grid-row: -2; margin: 6px 0 0; }
/* [s79] the pause card's links in one wrapping row, as the app's (Screens.swift pauseLinks): Help on its own line, then the toggles side by
   side, 24px apart (no "·": with four, a wrapped line would start on one); the row wraps between links, never inside one. (It was
   display: contents: four links stacked 46px apart.) */
.card-links { display: block; text-align: center; }
.card-links > .link { display: inline-block; vertical-align: middle; margin-inline: 4px; }
.card-links > a.link { display: table; margin-inline: auto; }
.card-links .link { white-space: nowrap; max-width: 100%; } /* [s61] a toggle link stays whole ("Sound: on", never "Sound:" over "on"): the card wraps between the links, never inside one (the apps' pause card: Screens.swift pauseToggles) */
body.pp-cards .card-two > .card-links > br { display: none; }

/* ---------- [read37] Words you can read (game.js "[read37]"; the app: HUDView.swift, DayHUD.swift, Screens.swift) ----------
   --tk: Subtitle size from Medium up (1 to 2: game.js syncA35), for the text in play that isn't drawn on the canvas: the hour banner, the block's
   name, the Scrapbook's toast, Auto Play's next-week card and fast-forward card, the result card over the game, and the goal line; --tk-room:
   the view's width in those cards' own units (less a margin), so a card at Double wraps instead of leaving the screen. The thought card and the
   opening's captions already follow --subs. Easier reading: html.read-plain (a plain font) and html.read-space (more letter and line spacing)
   on the thought card, the opening's captions, the Last lines and the preview (the canvas's bubbles and captions: game.js readFont). */
.time-banner, .week-card, .ff-card, .city-toast, .scrap-toast { zoom: calc(var(--ui, 1) * var(--tk, 1)); }
.time-banner { white-space: normal; width: max-content; max-width: calc(var(--tk-room, 9999) * 1px); text-align: center; }
.week-card, .ff-card { width: min(340px, calc(var(--tk-room, 9999) * 1px)); }
.city-toast { max-width: min(300px, calc(var(--tk-room, 9999) * 1px - 120px)); }
.scrap-toast { max-width: min(360px, calc(var(--tk-room, 9999) * 1px)); }
#s-result .panel { zoom: calc(var(--ui, 1) * var(--tk, 1)); }
.hud-goal { font-size: calc(17px * var(--tk, 1)); }
.hud-goal.two { font-size: calc(13.5px * var(--tk, 1)); }
.op-card { max-width: min(calc(360px * var(--tk, 1)), 100%); }
.hud-thought { overflow-wrap: anywhere; }
html.read-plain .hud-thought, html.read-plain .op-line, html.read-plain .sub-preview, html.read-plain .line-log-list { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 600; }
html.read-space .hud-thought, html.read-space .op-line, html.read-space .sub-preview, html.read-space .line-log-list { letter-spacing: .045em; line-height: 1.5; word-spacing: .08em; }

/* [plat37] The simple menu (Accessibility and controls → Simple menu; the app's, and its whole title screen in Assistive Access): three very
   large buttons, each with Charlie's picture and plain words, one under the other; and Charlie's quiet room (the simple menu's Pet Charlie) */
.simple-menu { max-width: 520px; margin: 0 auto; padding: 12px 4px 24px; display: flex; flex-direction: column; gap: 18px; zoom: var(--ui, 1); }
.simple-menu[hidden], body.simple #s-title .title-card { display: none; }
.simple-title { margin: 4px 0 2px; text-align: center; font-size: 2.5rem; font-weight: 900; color: var(--ink); }
.simple-btn { display: flex; align-items: center; gap: 16px; min-height: 112px; padding: 12px 18px; text-align: left; color: #1D1A1F; }
.simple-btn img { flex: none; width: 84px; height: 84px; object-fit: contain; }
.simple-txt { display: flex; flex-direction: column; gap: 4px; }
.simple-txt b { font-size: 1.625rem; font-weight: 900; }
.simple-txt span { font-size: 1rem; font-weight: 600; }
.simple-watch { background: #F7C6DF; } .simple-walk { background: #9FD0F0; } .simple-pet { background: var(--gold); }
.simple-full { margin-top: 8px; }
/* the simple menu's pause card: Keep going and Back to the menu, nothing else */
body.simple #s-pause :is(#pauseGoto, #pauseBoard, #pauseJobs, #pauseTogether, #recapNowBtn, #photoBtn, #pauseSkip, #restartBtn, #pauseGuide) { display: none !important; }
.calm-room { position: fixed; inset: 0; z-index: 85; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 14px;
  padding: calc(16px + var(--safe-t, 0px)) 20px calc(20px + var(--safe-b, 0px)); background: linear-gradient(#CCE3F5, #F7E8CC); color: #1D1A1F; text-align: center; }
[data-theme="dark"] .calm-room { background: linear-gradient(#2A2430, #3A2E26); color: #F4EDE2; }
.calm-room[hidden] { display: none; }
.calm-title { margin: 0; font-size: 1.875rem; font-weight: 900; }
.calm-charlie { position: relative; width: min(300px, 80vw); height: min(300px, 46vh); border: 0; background: none; padding: 0; cursor: pointer; border-radius: 40px; }
.calm-charlie:focus-visible { outline: 4px solid var(--gold); outline-offset: 6px; }
.calm-rug { position: absolute; left: 4%; right: 4%; bottom: 0; height: 22%; border-radius: 50%; background: #C9A27E; box-shadow: inset 0 0 0 10px #C9A27E, inset 0 0 0 14px #A8805C; }
[data-theme="dark"] .calm-rug { background: #6B4E3A; box-shadow: inset 0 0 0 10px #6B4E3A, inset 0 0 0 14px #8C6A50; }
.calm-charlie img { position: absolute; left: 50%; bottom: 6%; height: 86%; width: auto; transform: translateX(-50%); transform-origin: 50% 100%; }
.calm-charlie.petted img { height: 78%; animation: calmHop .35s ease-out, calmWiggle 1.4s ease-in-out; }
.calm-hearts { position: absolute; inset: 0; pointer-events: none; }
.calm-hearts .ui-i { position: absolute; top: 12%; width: 26px; height: 26px; opacity: 0; }
.calm-hearts .ui-i:nth-child(1) { left: 22%; } .calm-hearts .ui-i:nth-child(2) { left: 46%; width: 32px; height: 32px; } .calm-hearts .ui-i:nth-child(3) { left: 70%; }
.calm-charlie.petted .calm-hearts .ui-i { animation: calmHeart 1.6s ease-out forwards; }
.calm-charlie.petted .calm-hearts .ui-i:nth-child(2) { animation-delay: .2s; } .calm-charlie.petted .calm-hearts .ui-i:nth-child(3) { animation-delay: .4s; }
.calm-line { margin: 0; font-size: 1.25rem; font-weight: 800; min-height: 1.5em; }
.calm-back { max-width: 420px; }
@keyframes calmHop { 0% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-14px); } 100% { transform: translateX(-50%) translateY(0); } }
@keyframes calmWiggle { 0%, 100% { rotate: 0deg; } 20%, 60% { rotate: 3deg; } 40%, 80% { rotate: -3deg; } }
@keyframes calmHeart { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-60px); } }
@keyframes calmHeartStill { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
html.calm .calm-charlie.petted img { animation: none; } /* Reduce Motion: no hop, no wiggle */
html.calm .calm-charlie.petted .calm-hearts .ui-i { animation-name: calmHeartStill; } /* the hearts fade where they are */
/* [a11ypage] Player Guides → Accessibility (#s-a11yguide, written from content/a11yguide.json by scripts/a11yguide.mjs; the app's A11yGuide.swift) */
body[data-screen="a11yguide"] #s-a11yguide { display: flex; flex-direction: column; align-items: center; }
#s-a11yguide .panel { padding-bottom: 24px; }
.ag-lead { margin: 0 0 4px; font-size: var(--rt-lead); line-height: var(--rt-lh); font-weight: 600; } /* [s66] the reading scale's lead */
#s-a11yguide .panel > .pg-h { margin-top: 20px; }
.ag-list .cr-entry { align-items: flex-start; }
.ag-list .cr-line { color: var(--ink); font-size: var(--rt-body); line-height: var(--rt-lh); font-weight: 500; } /* what it does: the main words */
.ag-list .ag-how { color: var(--muted); font-size: var(--rt-secondary); line-height: var(--rt-lh-small); font-weight: 600; } /* where, and what it follows: under them */
.ag-k { color: var(--ink); font-weight: 900; }
.ag-new { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font-size: 0.75rem; font-weight: 900; letter-spacing: .04em; vertical-align: 2px; }
.ag-contact a { overflow-wrap: anywhere; }

/* ---------- [u1hud] The play HUD's material (docs/art/TOKENS.md "HUD"; the app: Theme.swift HUDLook): fine ink lines, solid paper,
   a soft shadow, so the painted game shows and Charlie leads. Only the drawing changes: each piece's border is thinner, and
   its padding takes the difference, so every box keeps its size and place ([layout33], [titlefix] measure them). Seen clearly's more
   contrast keeps the bold look (html.see-contrast, below). */
:root { --hud-line: 2px; --hud-line-thin: 1.25px; --hud-line-button: 2px; --hud-ink: rgba(29, 26, 31, .85); --hud-paper: var(--paper);
  --hud-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 2.5px 6px rgba(0, 0, 0, .2); }
:root[data-theme="dark"] { --hud-ink: rgba(244, 237, 227, .85); }
.hud-top { border: var(--hud-line) solid var(--hud-ink); background: var(--hud-paper); box-shadow: var(--hud-shadow);
  padding: calc(3px + 3px - var(--hud-line)) calc(4px + 3px - var(--hud-line)) calc(3px + 3px - var(--hud-line)) calc(8px + 3px - var(--hud-line)); }
.hud-thought { border: var(--hud-line) solid var(--hud-ink); background: var(--hud-paper); box-shadow: var(--hud-shadow);
  padding: calc(8px + 3px - var(--hud-line)) calc(12px + 3px - var(--hud-line)); }
.hud-top .icon-btn { border: var(--hud-line-button) solid var(--hud-ink); }
.ab-key { background: rgba(29, 26, 31, .85); }
:is(.hud-clock, .hud-wallet) { border: var(--hud-line-thin) solid var(--hud-ink); padding: calc(1px + 2px - var(--hud-line-thin)) calc(6px + 2px - var(--hud-line-thin)); }
:is(.hud-fluffy, .hud-adapt) { border: var(--hud-line-thin) solid var(--hud-ink); box-shadow: var(--hud-shadow);
  padding: calc(4px + 2.5px - var(--hud-line-thin)) calc(8px + 2.5px - var(--hud-line-thin)); }
.hud-fluffy { background: var(--hud-paper); }
:is(.hp-bar, .fm-bar) { border: var(--hud-line-thin) solid var(--hud-ink); }
.ab { border: var(--hud-line) solid var(--hud-ink); box-shadow: var(--hud-shadow); }
.ab:active { box-shadow: 0 1px 3px rgba(0, 0, 0, .13); }
.walk-pill { border: var(--hud-line) solid var(--hud-ink); box-shadow: var(--hud-shadow); }
html.see-contrast { --hud-line: 3px; --hud-line-thin: 2.5px; --hud-line-button: 3px; --hud-ink: var(--ink); --hud-shadow: 0 3px 0 var(--world-shadow); }
html.see-contrast .ab-key { background: var(--ink); }
html.see-contrast :is(.hud-clock, .hud-wallet) { --hud-line-thin: 2px; }
html.see-contrast :is(.hp-bar, .fm-bar) { --hud-line-thin: 3px; }
html.see-contrast .ab:active { box-shadow: 0 1px 0 var(--shadow); }

/* [u1b] the play HUD's quiet layout (game.js hudFold, HUD_FOLD; HUDView.swift the same): in play the clock sits in the name's line
   (Auto Play keeps its chip), one slot: the name for the mission's first seconds, then the clock over it, cross-faded (kept with Reduce
   Motion: nothing moves). Both stay laid out, so the line keeps its height and the bar never changes; the faded name is still read by
   screen readers (opacity, not display). Oliver's meter folds to its chip while he's chill and still, with the bar when the run starts */
.hud-top .hud-mid { display: grid; grid-template-columns: minmax(0, 1fr); }
.hud-top .hud-mid > :is(.hud-level, .hl-tag, .hud-clock) { grid-area: 1 / 1; }
.hud-top .hud-mid > .hud-goal { grid-area: 2 / 1; }
.hud-top .hud-mid > .hl-tag { justify-self: center; } /* (a pill, not the line's width) */
.hud-top .hud-mid > .hud-level { transition: opacity .3s ease; }
.hud-top.folded .hud-mid > .hud-level { opacity: 0; }
.hud-top .hud-mid .hud-clock { display: block; border: 0; padding: 0; background: none; font-size: 13px; font-weight: 800; color: var(--ink); align-self: center; opacity: 0; transition: opacity .3s ease; }
.hud-top.folded .hud-mid .hud-clock { opacity: 1; }
.hud-top .hud-mid .hud-clock:empty, body.hl .hud-top .hud-mid .hud-clock { display: none; }
.hud-fluffy { transition: width .25s ease-out; }
html.calm .hud-fluffy { transition: none; }
.hud-fluffy.quiet { width: 92px; padding-left: 6px; }
.hud-fluffy.quiet:not([hidden]) + .hud-adapt { left: calc(8px + var(--safe-l) + 98px); }
.hud-fluffy.quiet .fm-label { min-width: 0; }
.hud-fluffy.quiet .fm-label .ui-i { margin-right: 0; }
.hud-fluffy.quiet .fm-bar { flex: none; width: 48px; }
.hud-fluffy.quiet .fm-fill { background: #2E8A8A; }
.hud-fluffy.quiet .fm-tick { display: none; }
@media (forced-colors: active) { .hud-fluffy.quiet .fm-fill { background: Highlight; } }

/* [u4] a short window (a small phone's browser, a phone on its side): the cast steps down, so "Let's go, Charlie" stays in reach */
@media (max-height: 760px) { .intro-cast { min-height: 104px; } .intro-cast img { height: 109px; } .intro-cast img.pet { height: 55px; } .intro-cast img.pet[data-play^="pepe"] { height: 60px; } .intro-emoji.intro-pic { width: 50px; height: 58px; } }
@media (max-height: 560px) { .intro-cast { min-height: 84px; } .intro-cast img { height: 89px; } .intro-cast img.pet { height: 46px; } .intro-cast img.pet[data-play^="pepe"] { height: 50px; } .intro-emoji.intro-pic { width: 41px; height: 47px; } }

/* [w1] Charlie on the result card (game.js resHero; Screens.swift ResultHero): standing 96 when he escaped, curled up asleep 56 when the
   hoomans won, on the cast's contact shadow ([u4]) */
.res-hero { display: flex; justify-content: center; align-items: flex-end; margin: 2px 0 4px; }
.res-hero[hidden] { display: none; }
.res-hero img { height: 101px; width: auto; padding-bottom: 5px; background: radial-gradient(35% 5px at 50% calc(100% - 5px), var(--stand), transparent) no-repeat; }
.res-hero.nap img { height: 77px; } /* [s10] asleep: the app's 72 and its padding */
@media (max-height: 560px) { .res-hero { display: none; } } /* (a phone on its side: the buttons first) */
@media (max-height: 700px) { .res-hero img { height: 77px; } .res-hero.nap img { height: 60px; } }

/* [d1] the contact shadow under the cast and Charlie (.intro-cast, .intro-pic, .res-hero): the ink at 16% on a light card, black at 45% on
   a dark one (the ink was the dark card's own colour: the shadow vanished). Screens.swift CastStand, the same */
:root { --stand: rgba(29, 26, 31, .16); }
[data-theme="dark"] { --stand: rgba(0, 0, 0, .45); }
.pause-goal { margin: -4px 0 4px; font-size: 0.9375rem; font-weight: 800; color: var(--muted); } /* [s26] (Screens.swift the pause card the same) */
