/* Designed for exactly 1280x720, read from across a kitchen.
   Everything is drawn from the tokens below; a value that is not a token
   is a one-off with a reason next to it (a game's own art, Marv's ink). */
:root {
  /* Type: one family, eight sizes, each with a job. */
  --font: "Noto Sans", "DejaVu Sans", system-ui, sans-serif;
  --fs-micro: 18px;    /* Marv's card heading, a key chip's word too wide for it, the diagnostics card */
  --fs-label: 22px;    /* key chips, captions, meta lines */
  --fs-body: 28px;     /* buttons, tile names, hints, toasts */
  --fs-title: 40px;    /* the date, a timer's length, day names, Marv's bubble */
  --fs-headline: 64px; /* the alarm, the weather's condition, end-of-round cards */
  --fs-numeral: 120px; /* big secondary numbers: the temperature */
  --fs-display: 168px; /* Home's clock over two portraits, the temperature, a long countdown */
  --fs-hero: 240px;    /* Home's clock, the full-screen countdown */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Space: one 8 px unit. */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;
  --edge: 48px; /* content's margin from the screen's sides */
  --touch: 64px; /* the least a tap target measures on its short side */
  --control: 88px; /* a full-size button's height */

  /* Shape. */
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
  --r-xl: 40px;
  --r-pill: 999px;

  /* Surfaces, darkest to lightest; glass sits over photos (no blur: a
     tinted panel is far cheaper on the Pi than backdrop-filter). */
  --bg: #000;
  --surface-1: #151410;  /* cards, tiles, panels */
  --surface-2: #1f1d18;  /* buttons */
  --surface-3: #2c2a24;  /* a button held down */
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
  --glass: rgba(12, 11, 9, 0.74);
  --glass-strong: rgba(14, 13, 11, 0.88);
  --glass-press: rgba(58, 55, 48, 0.94); /* glass held down */
  --cream-press: #ddd7cb;                /* the app on screen's light plate held down */
  --veil: rgba(0, 0, 0, 0.72); /* behind anything modal */
  --veil-hold: rgba(0, 0, 0, 0.6); /* around the power menu's hold ring */
  /* An app's veil ends at the foot strip the app does not own. On dark
     that strip is black already; a light theme carries the veil on over
     it (Shared controls, .confirm-layer; games.css, .game-card). */
  --veil-foot: transparent;
  --veil-game: rgba(0, 0, 0, 0.6);   /* over a game, behind its end card */
  --veil-game-foot: transparent;
  --zoom-ground: var(--glass-strong); /* behind a bulletin picture full size */

  /* Text: three levels, all readable on --bg and on glass. */
  --text: #f4f1ea;
  --text-2: #bcb7ac;
  --text-3: #8f8a80;
  --text-on-accent: #1d1607;
  --text-on-light: #1a1814;
  --shadow-text: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 8px rgba(0, 0, 0, 0.45), 0 2px 22px rgba(0, 0, 0, 0.5);

  /* Over a photo (Home's clock and corner, a caption, Photos, the photo
     frame): words stay light on the photo's shade in every theme, since
     a photo is not a light surface. --shade-rgb is that shade's colour,
     and every shadow's; --shadow-a scales the shadows that have no token
     of their own (a light theme's are fainter). */
  --photo-text: #f4f1ea;
  --photo-text-2: #bcb7ac;
  --photo-shadow-text: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 8px rgba(0, 0, 0, 0.45), 0 2px 22px rgba(0, 0, 0, 0.5);
  --shade-rgb: 0, 0, 0;
  --shadow-a: 1;
  --shadow-icon: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.45)); /* a weather icon straight on a photo */

  /* The one accent. Never the only cue: what it marks also differs in
     shape, weight or words. */
  --accent: #ffb547;         /* as a fill: the main action, a tag, the alarm */
  --accent-strong: #ffc670;  /* that fill held down */
  --accent-ink: #f2a93d;     /* the sand's stream */
  /* The accent as words, an icon, a ring or a thin line: the same amber
     on dark, a darkened one on light, where amber does not read. And the
     edge an amber fill takes so its shape holds on a light ground. */
  --accent-mark: var(--accent);
  --score-pop: var(--accent-strong); /* a game's score as it goes up */
  --accent-edge: var(--accent);
  --accent-edge-press: var(--accent-strong);

  /* Rain, as data: the drops in the weather icons (js/icons.js) and the
     bars that give each hour's chance of it. Always beside its number. */
  --rain: #5fb4ff;
  /* The weather icons' own colours (js/icons.js, js/moon.js). On dark
     they are flat shapes; a light theme gives the pale ones an edge. */
  --wx-sun: #ffc94a;
  --wx-ray: #ffc94a;
  --wx-cloud: #c9ccd2;
  --wx-cloud-dark: #8d929b;
  --wx-fog: #c9ccd2;
  --wx-moon: #e6e1c8;
  --wx-moon-disc: #e6e1c8;   /* the unlit moon: a faint disc, by these alphas */
  --wx-moon-disc-fill-a: 0.18;
  --wx-moon-disc-edge-a: 0.45;
  --wx-snow: #fff;
  --wx-edge: none;   /* the edge of a cloud or the moon */
  --wx-sun-edge: none;
  --wx-edge-w: 0;
  /* The hourglass's sand, top to bottom of its gradient. */
  --sand-1: #ffc766;
  --sand-2: #e8952a;
  --sand-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1.3 4' preserveAspectRatio='none'%3E%3Crect width='1.3' height='2.5' rx='0.65' fill='%23f2a93d'/%3E%3C/svg%3E");

  /* "This one": a heavy round-ended tick, drawn rather than the font's
     thin glyph. --tick-drawn sits on the theme's own surface (a timer's
     announce box) in the accent's mark colour; --tick-on-ink sits on an
     ink disc ringed in --accent (Marv's taken answer), amber in any
     theme. */
  --tick-drawn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 12.5l5 5 10-11' fill='none' stroke='%23ffb547' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --tick-on-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 12.5l5 5 10-11' fill='none' stroke='%23ffb547' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  /* Marv's paper (marv.css: --m-cream): his bubbles, and the plates his
     answers hang on in the key bar. */
  --paper: #fbf8f3;
  --paper-press: #ddd7cb; /* an answer's plate held down: his, so the same in any theme */

  /* Drawn art (an app's tile picture, a web app's letter): one palette,
     the same in either theme, as Marv's own art is. The ink is his ink
     (--m-ink, the board's), the paper his paper; shapes are edged in ink. */
  --art-ink: #2a2622;
  --art-paper: var(--paper);
  --art-steel: #b9c2cc;
  --art-amber: var(--accent);
  --art-red: #f0705e;
  --art-green: #62c878;
  --art-blue: #5fb4ff;
  --art-line: 4px; /* the one line */

  /* One edge: whatever is raised off the background is edged with one
     line this thick, drawn in --line (a control) or --line-strong (a
     card over a veil, a plate in the key bar). No hairlines, no doubles. */
  --edge-w: 2px;
  /* One shadow, for what floats over a screen (a toast, the volume card,
     an answer, a card over a veil). Controls in the page cast none. */
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.4);
  /* ... and the two under glass: the pill and the timer pill
     over a photo; the tray's tab and the slim pill on the bottom edge. */
  --shadow-glass: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-tray: 0 -4px 16px rgba(0, 0, 0, 0.5);

  /* Controls (.btn and the Back button): a plate like the key bar's. */
  --control-fill: var(--surface-2);
  --control-edge: color-mix(in srgb, var(--text) 16%, transparent);
  --control-press: var(--surface-3);
  --control-text: var(--text);
  --control-off-edge: var(--line-strong); /* nothing to do just now: hollow */
  --control-off-text: var(--text-3);

  /* The key bar's plates (chrome.css, Key bar). */
  --key-w: 144px;        /* every plate; the keys are 157-159 px apart */
  --key-w-first: 104px;  /* key 1's, cut by the screen's left edge */
  --key-h: 48px;
  --key-r: 16px;
  --key-pad: 10px;
  --key-pad-first: 6px;
  --key-icon: 32px;
  --key-ring: 4px;       /* inside a pressed plate */
  --key-lamp-w: 28px;
  --key-lamp-h: 4px;
  --key-fill: var(--control-fill);
  --key-edge: var(--control-edge);
  --key-text: var(--text);
  --key-lamp: var(--text-3);
  --key-press-fill: var(--control-press);
  --key-on-fill: var(--text);            /* the app on screen */
  --key-on-text: var(--text-on-light);
  --key-off-fill: transparent;           /* nothing to do just now */
  --key-off-edge: var(--control-off-edge);
  --key-off-text: var(--control-off-text);

  /* Selected (what the app keys point at): a ring, not a tint. */
  --ring-width: 4px;
  --ring: var(--ring-width) solid var(--accent-mark);

  /* Apps' ground: a faint glow in the middle of --bg. */
  --apps-glow: #1f1c14;

  /* The alarm (chrome.css): the loudest thing on screen in any theme.
     On dark, black inside a throbbing amber frame; a light theme floods
     the screen amber instead, framed and written in ink. */
  --alarm-bg: var(--bg);
  --alarm-glow: color-mix(in srgb, var(--accent) 16%, transparent);
  --alarm-frame: var(--accent);
  --alarm-text: var(--text);
  --alarm-text-2: var(--text-2);
  --alarm-button: var(--accent);
  --alarm-button-text: var(--text-on-accent);

  /* Motion: opacity and transform only, snappy, nothing that loops while
     idle (see Motion below) but the Christmas tree's twinkling stars.
     Things arrive in --dur-2 on --ease, eased out, and leave faster, in
     --dur-1 (on --ease-in only what slides away); a press goes down and
     comes back in --dur-1. --dur-3 is for a layout that moves out of
     the way (the clock making room for Marv) and the hourglass settling. */
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.9, 0.6);
  --ease-pop: cubic-bezier(0.3, 1.5, 0.5, 1); /* the games' own pops only */
  --press: 0.95;   /* a pressed thing's scale */
  --rise: 12px;    /* how far an arriving thing travels */
  --settle: 0.96;  /* a modal panel's scale as it arrives */

  /* Apps keep their content out of these strips; the system layer owns
     them: the key bar on top, the player's pill (Home) or tray below. */
  --safe-top: 56px;
  --safe-bottom: 120px;
  --safe-tray: 56px;

  /* Older names, kept for the rules that still use them. */
  --fg: var(--text);
  --dim: var(--text-2);
  --quiet: var(--text-3);
  --faint: #3a3833;
  --panel: var(--surface-1);
}

* {
  box-sizing: border-box;
  cursor: none !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  touch-action: none;
  overscroll-behavior: none;
}

#screens, .screen, #system {
  position: absolute;
  inset: 0;
}
/* Its own stack, so a screen fading out beneath the next (Motion) stays
   above the page's black. */
#screens { z-index: 0; }

[hidden] { display: none !important; }

.icon svg { width: 100%; height: 100%; display: block; }

/* The weather icons and the moon (js/icons.js, js/moon.js): each shape
   takes its colour, and in a light theme its edge, from the tokens. */
.wx-sun { fill: var(--wx-sun); }
.wx-ray { stroke: var(--wx-ray); }
.wx-cloud { fill: var(--wx-cloud); }
.wx-cloud-dark { fill: var(--wx-cloud-dark); }
.wx-moon { fill: var(--wx-moon); }
.wx-snow { fill: var(--wx-snow); }
/* A snowflake is lines in the snow's colour; a mark cut into a cloud (the
   "?" of a condition with no drawing) is the ground's colour. */
.wx-flake { stroke: var(--wx-snow); }
.wx-cut { stroke: var(--bg); }
.wx-cut-dot { fill: var(--bg); }
.wx-fog { stroke: var(--wx-fog); }
.wx-rain { stroke: var(--rain); }
:is(.wx-sun, .wx-cloud, .wx-cloud-dark, .wx-moon, .wx-moon-lit) { stroke: var(--wx-edge); stroke-width: var(--wx-edge-w); stroke-linejoin: round; }
.wx-moon-lit { fill: var(--wx-moon); }
.wx-sun { stroke: var(--wx-sun-edge); }
.wx-moon-disc {
  fill: var(--wx-moon-disc);
  fill-opacity: var(--wx-moon-disc-fill-a);
  stroke: var(--wx-moon-disc);
  stroke-opacity: var(--wx-moon-disc-edge-a);
  stroke-width: 3;
}

/* ---- Shared components ---- */

/* Buttons: the key bar's plate, in the page. Secondary by default,
   .primary for the one main action on a screen. One edge (--edge-w), no
   shadow, the words semibold like the keys'. Pressing scales them down a
   touch and steps them lighter; nothing is colour only. */
.btn {
  font: inherit;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--control-text);
  height: var(--control);
  min-width: var(--touch);
  padding: 0 var(--s4);
  border-radius: var(--r-m);
  border: var(--edge-w) solid var(--control-edge);
  background: var(--control-fill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  white-space: nowrap;
}
.btn:active { background: var(--control-press); }
.btn .icon { width: 1.1em; height: 1.1em; flex: none; }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent-edge);
  color: var(--text-on-accent);
  font-weight: var(--fw-bold);
}
.btn.primary:active { background: var(--accent-strong); border-color: var(--accent-edge-press); }
.btn.compact { height: var(--touch); padding: 0 var(--s3); font-size: var(--fs-label); border-radius: var(--r-pill); }
.btn.round { width: var(--touch); height: var(--touch); padding: 0; border-radius: 50%; }
.btn.capsule { border-radius: var(--r-pill); }
/* Nothing to do just now, the main action included: what a key's plate
   shows for it in the bar -- hollow, an empty outline, the words dimmed
   and lighter. A change of shape, not a fade. The outline stays solid:
   a dashed one is an app's "add one here" (Dinner's Add a meal card,
   Music's Add account tile), which is there to be tapped. */
.btn:disabled {
  background: transparent;
  border-color: var(--control-off-edge);
  color: var(--control-off-text);
  font-weight: var(--fw-medium);
}

/* Something that scrolls by touch, with no scroll bar: the kiosk's
   Chromium draws one otherwise, a thin grey bar across a touch screen.
   Whatever wears this must show it has more some other way (a fade at
   the edge, a part of the next item showing). */
.scroll-quiet { scrollbar-width: none; }
.scroll-quiet::-webkit-scrollbar { display: none; }

/* A number and its unit ("10 min", "1 hr 30 min"): .tl-n then .tl-u,
   one run of words until a screen sizes them, the number large and the
   unit small on its baseline (Timers' display and large keys). */
.tl-u, .tl-u + .tl-n { margin-left: 0.25em; }
.btn .tl-u { margin-left: 0; } /* a button's own gap parts them */

/* A card or tile: raised a step off the background. */
.surface {
  background: var(--surface-1);
  border: var(--edge-w) solid var(--line);
  border-radius: var(--r-l);
}

/* A panel over a photo or another screen. */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
}

/* What the app keys point at: the Weather day and the games launcher
   tile. Scoped, because the key bar's answer chips use .picked for a
   question's taken answer and draw it their own way. */
:is(.weather .day, .game-tile).picked { outline: var(--ring); outline-offset: calc(var(--ring-width) / -2); }

/* ---- Shared controls ----
   One of each, for every app that opens inside Apps (the games, Music,
   Dinner, Changes, the Bulletin), so they read as one product. An area
   places them; it doesn't restyle them. */

/* Back: the same round button in the same corner of every app, on the
   content edge, 24 px under the key bar. Each app's content starts right
   of its rail (--rail: the edge, the button, a gap). A web app's Back
   sits in its own strip instead (apps.css): the page takes the screen. */
.games {
  --rail: calc(var(--edge) + 80px + var(--s3));
}
.games .game-back {
  position: absolute;
  left: var(--edge);
  top: var(--s3);
  width: 80px;
  height: 80px;
  z-index: 6; /* above the end-of-round card */
}
/* Its chevron in the key bar's weight (the same 4.5 px line as the
   chevrons on the keys). */
.game-back .icon { width: 40px; height: 40px; }
.game-back .icon svg { stroke-width: 2.8; }

/* An app's heading, on the back button's line, and a quieter line
   after it (what the screen is waiting for, or what to do). */
.app-heading {
  display: inline-block;
  margin: 0;
  font-size: var(--fs-title);
  font-weight: var(--fw-semibold);
  line-height: 80px; /* on the back button's line */
  color: var(--text);
}
.app-sub {
  display: inline-block;
  margin: 0;
  font-size: var(--fs-body);
  color: var(--text-2);
}

/* "Remove Sam?": a card over the app, under the veil, with the safe
   choice first (Keep) and the one that changes something second, in
   amber with its icon (Music's accounts, Dinner's meals; Music's
   YouTube Music how-to too). The key bar says the same: Keep on the
   first key, Remove on the last. */
.confirm-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--veil);
  z-index: 7; /* over the back button too */
}
.confirm-layer[hidden] { display: none; }
/* The veil carried on over the foot strip (--veil-foot: only a light
   theme has anything to dim there). */
.games:has(.confirm-layer:not([hidden]))::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--safe-tray);
  background: var(--veil-foot);
  pointer-events: none;
}
.confirm-card {
  width: 640px;
  padding: var(--s5) var(--s6);
  border-radius: var(--r-xl);
  border-color: var(--line-strong); /* over the veil: the stronger line */
  box-shadow: var(--shadow-float);
  text-align: center;
}
.confirm-art { display: grid; place-items: center; margin-bottom: var(--s2); }
.confirm-art:empty { display: none; }
.confirm-art > svg { width: 96px; height: 96px; }
.confirm-card h2 {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.confirm-card p { margin: var(--s2) 0 var(--s4); font-size: var(--fs-body); line-height: 1.35; color: var(--text-2); }
.confirm-buttons { display: flex; justify-content: center; gap: var(--s3); }
.confirm-buttons .btn { min-width: 200px; }

/* A remove mode (Music's "Remove an account", Dinner's "Remove a meal"):
   the button that starts it is a compact one with a minus, and becomes
   an amber Done; each thing that can go wears this tag, in words, and
   is itself the target (a tap asks first, on the card above). */
.remove-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  padding: 0 var(--s2) 0 var(--s1);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}
.remove-tag .icon { width: 24px; height: 24px; flex: none; }

/* An on/off setting: a switch drawn as one, last in the .btn that sets
   it, with On or Off written in its track (.switch-state). Off, the track
   is hollow and the knob at its left; on (the button aria-pressed), the
   track is filled amber and the knob, in ink, at its right. The button
   stays a plate: amber is the main action's, and this is a setting. */
.switch {
  flex: none;
  width: 84px;
  height: 40px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--r-pill);
  border: var(--edge-w) solid var(--control-off-text);
  color: var(--text-2);
  font-weight: var(--fw-medium);
}
.switch::before {
  content: "";
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--control-off-text);
}
.switch-state { flex: 1; text-align: center; }
[aria-pressed="true"] > .switch {
  flex-direction: row-reverse;
  background: var(--accent);
  border-color: var(--accent-edge);
  color: var(--text-on-accent);
  font-weight: var(--fw-bold);
}
[aria-pressed="true"] > .switch::before { background: var(--text-on-accent); }

/* A tap that didn't go through: the warning mark and a line that says
   what failed and what to do ("Couldn't remove Sam. Try again."). */
.alert-note {
  display: flex;
  align-items: center;
  gap: var(--s1);
  margin: 0;
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  line-height: 1.25;
  color: var(--text);
}
.alert-note .icon { width: 28px; height: 28px; flex: none; color: var(--accent-mark); }

/* Nothing here (js/empty-art.js, emptyBlock): a drawing from Marv's
   workshop, what there is not, and how to get some, in the middle of the
   screen (not of the page), clear of the head; it takes no taps. */
.ls-empty {
  position: absolute;
  inset: var(--s6) var(--edge) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  text-align: center;
  pointer-events: none;
}
.ls-empty[hidden] { display: none; }
.ls-empty-art { width: 176px; height: 176px; margin-bottom: var(--s1); color: var(--text-2); }
.ls-empty-art svg { display: block; width: 100%; height: 100%; }
.ls-empty-title {
  display: flex;
  align-items: center;
  gap: var(--s1);
  margin: 0;
  font-size: var(--fs-title);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  color: var(--text);
}
.ls-empty-title .icon { width: 40px; height: 40px; flex: none; color: var(--accent-mark); }
.ls-empty-how { margin: 0; max-width: 820px; text-wrap: balance; font-size: var(--fs-body); line-height: 1.35; color: var(--text-2); }
.ls-empty-how:empty { display: none; }

/* The drawings (js/empty-art.js): one line weight, the ground's own
   tones, one thing in the accent. */
.ea-line { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ea-fill { fill: var(--surface-2); stroke: currentColor; stroke-width: 2.6; stroke-linejoin: round; }
.ea-mark { fill: none; stroke: var(--accent-mark); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ea-dot { fill: var(--accent); stroke: var(--accent-edge); stroke-width: 2.6; }

/* ---- Motion ----
   One family, from the tokens. Only transform-type properties (translate,
   scale, transform) and opacity move, so the compositor does it without
   a repaint, and nothing here loops. The exceptions are Home's
   Christmas tree, whose ornaments twinkle (.xmas-glint, below) and whose
   star for today pulses, its rays turning (.xmas-star.today), and its
   Thanksgiving turkey, whose head gobbles now and then (.tg-head):
   opacity and transform only, in 100 ms steps, paused while hidden, and
   off under reduced motion.

   Press: whatever takes a tap scales down to --press the moment it is
   touched and springs back in --dur-1 when let go; most also step a
   shade lighter (their own :active rules), so the press is never colour
   alone. The scale is the separate `scale` property, so it stacks on
   an element's own transform (a pill centred by translateX(-50%)). A
   physical key shows the same press on its chip (.key.pressed,
   js/system/keybar.js).
   Every tappable thing in every app is on this one list, so they all
   press alike; an area adds its own :active background at most. Nothing
   disabled presses. */
:where(.btn, .weather .day, .game-tile, .game-page, .mcard, .pbtn, .diag-card, .music-app-tile, .music-app-channel,
  .music-app-recent-row, .ml-card.removable, .ml-new, .ch-row, .ls-row, .ch-asked, .ch-side, .ch-flip-side,
  .change-notice, button.bl-note, .bl-shot, .bl-change, .bl-link,
  .clock-weather, .home-tap, .key .cap, .alarm-hint) {
  transition: scale var(--dur-1) var(--ease);
}
:where(.btn, .weather .day, .game-tile, .game-page, .mcard, .pbtn, .diag-card, .music-app-tile, .music-app-channel,
  .music-app-recent-row, .ml-card.removable, .ml-new, .ch-row, .ls-row, .ch-asked, .ch-side, .ch-flip-side,
  .change-notice, button.bl-note, .bl-shot, .bl-change, .bl-link,
  .clock-weather, .home-tap, .toast, .pill, .card, .tray, .timer-pill):active:not(:disabled),
:where(.key:active, .key.pressed, .alarm-layer:active) :where(.cap, .alarm-hint) {
  scale: var(--press);
}
/* ... and the glass ones step lighter; the cream ones (the app on screen,
   an answer) a shade darker (chrome.css, Key bar). */
/* :is, not :where: it must outweigh their own backgrounds, which come later. */
:is(.pill, .card, .tray, .timer-pill):active { background: var(--glass-press); }

/* Arrive and leave. Whatever comes and goes by the hidden attribute
   arrives from its @starting-style (faded, --rise away from where it
   rests) in --dur-2 and leaves faster, in --dur-1, both on --ease (a
   fade eased in lingers half-seen over what comes next; --ease-in is
   only for what slides away, like the pill into its tray):
   `display` is held through the fade (allow-discrete), and it takes no
   taps from the moment it starts to go, so a second tap reaches what is
   beneath. Taps work on an arriving thing from its first frame. */
:where(.screen, .game-tiles, .game, .music-app, .webapp,
  .toast, .volume, .timer-pill, .pill, .card, .tray, .hold,
  .pmenu-layer, .alarm-layer, .timer-view, .canvas-layer, .shutdown) {
  transition: opacity var(--dur-2) var(--ease), translate var(--dur-2) var(--ease),
    scale var(--dur-1) var(--ease), display var(--dur-2) allow-discrete;
}
:where(.screen, .game-tiles, .toast, .volume, .timer-pill, .pill, .card, .tray, .hold,
  .pmenu-layer, .alarm-layer, .timer-view, .canvas-layer, .shutdown)[hidden] {
  opacity: 0;
  pointer-events: none;
  transition-duration: var(--dur-1);
}
@starting-style {
  :where(.screen, .game-tiles, .game, .music-app, .webapp,
    .toast, .volume, .timer-pill, .pill, .card, .tray, .hold,
    .pmenu-layer, .alarm-layer, .timer-view, .canvas-layer, .shutdown) { opacity: 0; }
  /* Hung under the key bar or over it: down from it. */
  :where(.volume, .timer-pill, .toast) { translate: 0 calc(-1 * var(--rise)); }
  /* On the bottom edge: up from it. */
  :where(.pill, .card, .tray) { translate: 0 var(--rise); }
}
/* They go back the way they came. */
:where(.volume, .timer-pill, .toast)[hidden] { translate: 0 calc(-0.5 * var(--rise)); }
:where(.pill, .card, .tray)[hidden] { translate: 0 calc(0.5 * var(--rise)); }

/* A screen change: the new screen fades up over the old, which drops
   beneath it and fades out; the key bar, in the system layer, stays
   still. A game, the Music app or a web app opening inside Apps arrives
   the same way, and so does the launcher coming back. */
.screen[hidden] { z-index: -1; }
@starting-style {
  :where(.screen, .game-tiles, .game, .music-app, .webapp) { translate: 0 calc(0.5 * var(--rise)); }
}

/* A modal panel settles into place over its veil, which only fades. */
:where(.pmenu, .ptitle, .alarm-mark, .alarm-text, .alarm-hint, .canvas-photo, .canvas-drawing) {
  transition: opacity var(--dur-2) var(--ease), scale var(--dur-2) var(--ease), translate var(--dur-2) var(--ease);
}
@starting-style {
  :where(.pmenu, .alarm-mark, .canvas-photo, .canvas-drawing) { scale: var(--settle); }
  :where(.ptitle, .alarm-text, .alarm-hint) { translate: 0 calc(0.5 * var(--rise)); }
  .hold { scale: var(--settle); }
}

@media (prefers-reduced-motion: reduce) {
  /* Nothing travels or scales: whatever moved now jumps, and what faded
     still fades. */
  :root { --press: 1; --rise: 0px; --settle: 1; }
  *:not(.marv *), *::before, *::after { transition-property: opacity, display !important; }
}

/* ---- Clock (Home) ----
   The backdrop is the screen and the time is the biggest thing on it,
   always, at one size and in one place whatever else Home says (Home
   arrangements, below). One set of type for everything written on the
   backdrop: numerals light at the big sizes and regular at the headline
   size (a light 64 px digit is a hair over a busy photo), and every word
   beside a numeral medium or semibold and as bright as the numeral, never
   grey: the bar's words are semibold, and grey over a bright sky is not
   read. Nothing Home says sits in a box: no panel, border, shadow box or
   pill; words read over any backdrop by their shadow (--shadow-text) and,
   over a world, by the world dimming or lifting itself under them
   (js/screens/clock.js hands it their boxes; theme.css, fortgalgs.css).

   Where things go is the arrangement's (A, B, C below); the split -- two
   portraits side by side -- keeps its own place for the clock in all of
   them: the clock and date centred in the left column, over the left
   photo, clear of the seam. Blocks are placed from their font size by
   the line-height-1 rule that a Noto Sans line puts its baseline 0.888
   of the size down. */
.clock {
  --home-col: 568px;          /* each column; 48 px edges, a 48 px gutter */
  --home-baseline: 340px;     /* the digits' baseline in the split */
  --home-sub: 64px;           /* digits' baseline to the date's / length's */
  --home-line: calc(var(--safe-top) + var(--s3)); /* the weather's 64 px line, 80-144 px down */
}

.clock-face {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-shadow: var(--shadow-text);
}

.clock-time {
  font-size: var(--fs-hero);
  font-weight: var(--fw-light);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
}
/* A clock's colon sits half way up its digits; the font's sits on the
   baseline, for a sentence. Raised by half the difference between a
   digit's height (0.714 em) and the colon's (0.536 em). */
.clock-colon { position: relative; top: -0.09em; }

/* AM or PM: a quarter of the digits' size, semibold like the bar's
   words, so its strokes weigh what the light digits' do. */
.clock-ampm {
  font-size: var(--fs-headline);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  color: var(--text);
  margin-left: var(--s3);
}


.clock-date {
  margin-top: var(--s1);
  font-size: var(--fs-title);
  font-weight: var(--fw-medium);
  line-height: 1.2;
  color: var(--text);
}

/* The split: two portraits. js/wallpaper.js sets .pair half way through
   the photos' cross-fade, while the words are faded out (below). */
.clock:has(.wallpaper.pair) .clock-face {
  top: calc(var(--home-baseline) - 0.888 * var(--fs-display));
  left: var(--edge);
  right: auto;
  width: var(--home-col);
}
.clock:has(.wallpaper.pair) .clock-time { font-size: var(--fs-display); }
.clock:has(.wallpaper.pair) .clock-ampm {
  font-size: var(--fs-title);
  margin-left: var(--s2);
}
.clock:has(.wallpaper.pair) .clock-date {
  font-size: var(--fs-title);
  /* Baseline --home-sub under the digits': a 1.2 line of the title size
     puts its baseline 4 + 35.5 px down, the digits' box ends 0.112 of
     the display size under theirs. */
  margin-top: calc(var(--home-sub) - 39.5px - 0.112 * var(--fs-display));
}

/* A cross-fade between a single photo and a pair (.reshape, js/wallpaper.js):
   the words that change place or size fade out over the first half of
   the photos' 1500 ms, take their new place, and fade in over the rest. */
.clock:has(.wallpaper.reshape) :is(.clock-face, .clock-sky) { transition: opacity 750ms ease-in-out; }
.clock:has(.wallpaper.reshape-out) :is(.clock-face, .clock-sky) { opacity: 0; }
/* A change notice hangs under the key bar to 184 px down (changes.css)
   and spans at most 280-1000 px across the weather's line: what of that
   line lies there (the sunset or the moon; the land line) steps out
   while it is up. The temperature stays. */
.clock-sky, .home-land { transition: opacity var(--dur-2) var(--ease); }
body:has(.change-notice:not([hidden])) .clock :is(.clock-sky, .home-land) { opacity: 0; }
/* ... and a moon that isn't there opens nothing: a tap falls to the
   corner, Weather. */
body:has(.change-notice:not([hidden])) .clock .clock-sky { pointer-events: none; }

/* Marv up (body.marv-up, js/system/voice.js): the clock makes room for
   him and his words. Time and date ease, by transform only, to the top
   of the left column, the time at half its size (in A at 0.35 of it,
   84 px) and the date at 0.7 of it, the time's box centred at (332, 210), the date's at (332, 291).
   Marv, his work order and his bubble then have the band under it and
   the right (marv.css: .at-home); Home's lines and the land line step
   out of his way. Each arrangement moves its own boxes there (below); in
   the split the time's box is centred at (332, 275) and the date's at
   (332, 389). */
.clock-time, .clock-date { transition: transform var(--dur-3) var(--ease), opacity var(--dur-2) var(--ease); }
.marv-up .clock:has(.wallpaper.pair) .clock-time {
  transform: translateY(-65px) scale(calc(120 / 168));
}
.marv-up .clock:has(.wallpaper.pair) .clock-date {
  transform: translateY(-98px) scale(0.7);
}

/* Top left: the weather now; a tap opens Weather, or on the moon the
   Moon (js/moon-app.js). At the headline size
   on a line-height of 1 it keeps its 64 px box (80-144 px down), clear
   of the clock that rises to 150 px when Marv is up. The temperature is
   the line's numeral. */
.clock-weather {
  position: absolute;
  top: var(--home-line);
  left: var(--edge);
  min-width: var(--touch);
  min-height: var(--touch);
  z-index: 1; /* above .clock-face, which spans the screen and would take its taps */
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-headline);
  line-height: 1;
  color: var(--text);
  text-shadow: var(--shadow-text);
}

.clock-weather > .icon { width: 64px; height: 64px; flex: none; filter: var(--shadow-icon); }
.clock-temp { font-variant-numeric: tabular-nums; }
/* After the temperature, past a short rule (the one edge, upright):
   today's sunset, or after dark the moon's phase. A picture as tall as
   the words (the sun on the horizon, the moon as it looks tonight),
   then the words in the date's type; the sunset's time is set like the
   clock's, semibold digits and a small PM. */
.clock-sky {
  display: flex;
  align-items: center;
  gap: 12px; /* the picture's own margin inside its box makes it 16 */
  margin-left: var(--s1);
  padding-left: var(--s3);
  border-left: var(--edge-w) solid color-mix(in srgb, var(--text) 45%, transparent);
  font-size: var(--fs-title);
  font-weight: var(--fw-medium);
  line-height: 1.2;
  white-space: nowrap;
  color: var(--text);
}
.clock-sky b { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.clock-sky small { font-size: 0.55em; font-weight: var(--fw-semibold); letter-spacing: 0.02em; margin-left: 0.2em; }
.clock-sky-art { width: 1.1em; height: 1.1em; flex: none; filter: var(--shadow-icon); }
/* The moon's tap target: the touch size tall at either type size, its
   own width wide; it draws nothing. */
.clock-sky.moon { position: relative; }
.clock-sky.moon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - var(--touch) / 2);
  bottom: calc(50% - var(--touch) / 2);
}
/* In the split the line has only the left photo: at the body size the
   longest of them ("Waxing gibbous") ends short of the seam. */
.clock:has(.wallpaper.pair) .clock-sky { font-size: var(--fs-body); }


/* ---- Home's lines (js/widgets.js, js/screens/home-widgets.js) ----
   What the widgets say, as bare text and small glyphs on the backdrop,
   set like the weather line: no panel, no border, no box shadow, no pill
   around any of it. A group per kind (.hl-group[data-widget]) of a line
   or two each (.home-line), at most six in all, the last "+N more" when
   there are more (.home-more). Each line, or each part of the changes
   line, is a tap target (.home-tap) at least --touch tall, whatever its
   type size. What needs someone stands out by weight and a sign, the
   colour only helps: "to approve" bold with its star filled (and amber);
   "Now" bold; the calendar unreachable, the warning sign; Marv needing
   a person to hear again, bold with the warning sign. Where the lines go and
   their size are the arrangement's (Home arrangements, below). */
.home-lines {
  position: absolute;
  z-index: 1; /* above .clock-face, like .clock-weather */
  color: var(--text);
  text-shadow: var(--shadow-text);
  pointer-events: none; /* its box spans; its lines take the taps */
  transition: opacity var(--dur-2) var(--ease);
}
.home-line {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
  max-width: 100%;
  min-height: var(--touch);
  font-weight: var(--fw-medium);
  line-height: 1.2;
  white-space: nowrap;
}
.home-tap { pointer-events: auto; touch-action: manipulation; }
.hl-glyph { flex: none; display: inline-grid; place-items: center; filter: var(--shadow-icon); }
.home-lines .hl-glyph :is(.icon, svg) { width: 0.8em; height: 0.8em; }
/* Cut short with an ellipsis when it must be; the clip is drawn clear of
   the words by the shadow's reach, so it never shows as a box's edge. */
.hl-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: var(--s3); margin: calc(-1 * var(--s3)); }
.hl-sep { flex: none; }

/* A timer: its digits as the clock's are, tabular; the newest at the
   headline size. Its announce glyph: the speaker with waves (on) or with
   a cross (off), a 64 px target of its own. */
.hl-digits { font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); }
.hl-timer.big .hl-digits {
  font-size: var(--fs-headline);
  font-weight: var(--fw-regular);
  line-height: 1;
  letter-spacing: -0.015em;
}
.hl-word { margin-left: calc(-1 * var(--s1)); }
/* The length gives way first where the line is short of room (B's
   column, an hour-long timer): cut short, as .hl-text is, never the
   time or the announce glyph. */
.hl-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: var(--s3); margin: calc(-1 * var(--s3)); }
.home-announce {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: var(--touch);
  min-height: var(--touch);
  margin-inline: calc(-1 * var(--s1)) calc(-1 * var(--s2));
  filter: var(--shadow-icon);
}
.home-announce .icon { width: 0.8em; height: 0.8em; }
.home-announce.on .ha-off, .home-announce:not(.on) .ha-on { display: none; }

/* The changes line: a part per group, each its own target. */
.hl-changes { gap: var(--s3); }
.hl-part { display: inline-flex; align-items: center; gap: var(--s1); min-height: var(--touch); }
.hl-part:not(.ask) { font-weight: var(--fw-regular); }
/* The words in the clock's own colour, which every backdrop is made to
   carry; the amber is the star's alone (amber words fell to 3.2:1 over
   Fort Galgs' siege). */
.hl-part.ask { font-weight: var(--fw-bold); }
.hl-part.ask .ch-icon { color: var(--accent-mark); }
.hl-part.ask .ch-icon path { fill: currentColor; }

/* The calendar: the time semibold, then the title. */
.hl-time { flex: none; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.hl-cal.now .hl-time { font-weight: var(--fw-bold); }
.hl-cal.quiet, .hl-cal.quiet .hl-time { font-weight: var(--fw-regular); }
.hl-cal.alert .hl-glyph { color: var(--accent-mark); }
.hl-asof { flex: none; margin-left: calc(-1 * var(--s1)); font-size: var(--fs-label); font-weight: var(--fw-regular); }

/* Marv can't hear (js/widgets/hearing.js): quiet, regular, with the
   struck-through microphone; when he needs a person, bold with the
   warning sign (amber), the words in the clock's colour. */
.hl-hearing:not(.ask) { font-weight: var(--fw-regular); }
.hl-hearing.ask { font-weight: var(--fw-bold); }
.hl-hearing.ask .hl-glyph { color: var(--accent-mark); }
/* After a power cut (js/widgets/outage.js): quiet, with the bolt; short
   of room, "back at" gives way before "I lost power at". */
.hl-outage { gap: var(--s1); font-weight: var(--fw-regular); }
.hl-outage > .hl-text { flex-shrink: 0; max-width: calc(100% - 1.5em); }
/* The days until Christmas (js/widgets/christmas.js): quiet, with a tree;
   the number semibold, as a timer's digits are. */
.hl-christmas { font-weight: var(--fw-regular); }

/* While Home says anything, the photo's caption steps out: lifted over
   the player it would run into the lines. The days until Christmas alone
   keep to the top of the lines' band, clear of it, so it stays. */
.clock:has(.home-lines:not([hidden]) > :not([hidden], .hl-group[data-widget="christmas"])) .wall-caption-layer { opacity: 0; }

/* "+N more": a chevron after it says it opens them. */
.home-more { font-weight: var(--fw-semibold); }

/* Marv up, the lines and the land line step out of his way; asking, he
   grows over the screen under his veil, and they step out faster rather
   than show through it in pieces (and then stop). */
.marv-up .clock :is(.home-lines, .home-land) { opacity: 0; }
.marv-up .clock .home-tap { pointer-events: none; }
.marv-asking .home-lines { opacity: 0; transition-duration: var(--dur-1); }

/* The land line (js/land-line.js): field notes on the land behind Home,
   the quietest words on it, at the label size and regular weight, as
   bright as the weather's words; only while a land speaks on it
   (js/land-speaker.js: the backdrop's land, or Line Land's over a photo
   or none), which Home's data-land names. */
.home-land {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  height: var(--touch);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  text-shadow: var(--shadow-text);
  pointer-events: none;
}
.clock:not([data-land]) .home-land { display: none; }

/* The days to Christmas as a row of trees along Home's foot
   (js/widgets/christmas.js, from 48 days out): the count first, so the
   number reads from across the room, then a solid tree for each day
   left (a star for each gone in the big tree, below). Above the
   tray's tab (52 px) and over the caption's line, so it runs the whole
   width clear of both; in every arrangement the lines end by 584.
   The row is a .home-tap that opens Countdowns, as wide as its count
   and trees (not the empty rest of the foot, so a swipe there still
   turns the photo), --touch tall. It steps out wherever the land line does, and under
   the player's pill or card, which takes 600-696. In B, while the
   lines leave room (.shape, js/screens/clock.js), the same slots are
   one big tree instead (below). */
.home-trees {
  position: absolute;
  z-index: 1;
  left: var(--edge);
  right: var(--edge);
  bottom: var(--s6);
  height: var(--touch);
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  text-shadow: var(--shadow-text);
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease);
}
.xmas-label { display: flex; align-items: baseline; gap: var(--s1); flex: none; font-size: var(--fs-body); }
.xmas-days { font-size: var(--fs-label); font-weight: var(--fw-medium); }
.xmas-trees { display: flex; flex: none; filter: var(--shadow-icon); }
.xmas-row { display: contents; }
/* Drawn art's green, edged in its ink (--art-*), the trunk ink; a day
   gone an ornament (js/widgets/christmas.js), edged the same, red with
   steel, paper and blue parts, so the tree is red and green; today's
   star its amber. The candy cane is strokes: an ink edge, paper inside,
   red stripes dashed over it. */
.xmas-tree, .xmas-star { width: 22px; height: 29px; overflow: visible; }
.xmas-tree path { fill: var(--art-green); stroke: var(--art-ink); stroke-width: 1.1; stroke-linejoin: round; }
.xmas-tree path + path { fill: var(--art-ink); }
.xmas-star path { fill: var(--art-red); stroke: var(--art-ink); stroke-width: 1.1; stroke-linejoin: round; }
.xmas-star .orn-steel { fill: var(--art-steel); }
.xmas-star .orn-paper { fill: var(--art-paper); }
.xmas-star .orn-blue { fill: var(--art-blue); }
.xmas-star .orn-hook { fill: none; }
.xmas-star :is(.orn-cane, .orn-cane-in, .orn-stripe) { fill: none; stroke-linecap: round; stroke-width: 4.8; }
.xmas-star .orn-cane-in { stroke: var(--art-paper); stroke-width: 2.6; }
.xmas-star .orn-stripe { stroke: var(--art-red); stroke-width: 2.6; stroke-linecap: butt; stroke-dasharray: 1.6 1.6; }
.xmas-star.today > svg:not(.xmas-glint, .xmas-halo) path { fill: var(--art-amber); }
/* The row keeps only the trees, a tree for each day left, so it fits
   the foot after "Merry Christmas!" as after "46 days"; the ornaments
   and stars are the big tree's. */
.home-trees:not(.shape) .xmas-star,
.clock:not([data-arrange="b"]) .xmas-star { display: none; }
/* The big tree: B's right column (832 px to the edge), its rows 1 to 9
   slots and a trunk of 3, centred and set 26 px apart so the slots
   read as one tree; 263 px tall, from 313 down to 576, under three
   lines (to 272). The count sits at the foot, left of the outline's
   lower-left corner (107 px out, its glow 6 px more), clear of it. */
.clock[data-arrange="b"] .home-trees.shape {
  left: 832px;
  height: auto;
  bottom: calc(var(--s7) + var(--s5));
  display: block;
  overflow: visible;
}
.clock[data-arrange="b"] .shape .xmas-trees { flex-direction: column; align-items: center; }
.clock[data-arrange="b"] .shape .xmas-row { display: flex; justify-content: center; }
.clock[data-arrange="b"] .shape .xmas-row + .xmas-row { margin-top: -3px; }
.clock[data-arrange="b"] .shape .xmas-label { position: absolute; right: calc(50% + 113px + var(--s2)); bottom: 0; }
/* The big tree's outline (js/widgets/christmas.js): a soft line of
   light round its whole shape, today's star's paler amber edged in
   ink as it is, thin over a wide faint glow of the amber, behind the slots (the trees' filter makes them their
   own stack). Still; it fades with the tree. Not on the row, nor in
   Countdowns. */
.xmas-outline { display: none; }
.clock[data-arrange="b"] .home-trees.shape .xmas-trees { position: relative; }
.clock[data-arrange="b"] .home-trees.shape .xmas-outline {
  display: block;
  position: absolute;
  z-index: -1;
  left: calc(50% - 120px);
  top: -14px;
  width: 240px;
  height: 296px;
  overflow: visible;
  pointer-events: none;
}
.xmas-outline path {
  fill: none;
  stroke: color-mix(in srgb, var(--art-amber) 70%, var(--art-paper));
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.xmas-outline .xmas-edge { stroke: var(--art-ink); stroke-width: 4.5; }
.xmas-outline .xmas-glow { stroke: var(--art-amber); stroke-width: 12; opacity: 0.3; }
.marv-up .clock .home-trees,
body:has(.player:not(.tucked) :is(.pill, .card):not([hidden])) .clock:not([data-arrange="b"]) .home-trees,
body:has(.player:not(.tucked) :is(.pill, .card):not([hidden])) .clock .home-trees:not(.shape) { opacity: 0; pointer-events: none; }
/* The big tree's ornaments twinkle: now and then a glint flares on one
   and fades, each on its own beat (--tw, js/widgets/christmas.js),
   so a few light at a time, never together. Home's one ambient loop
   (Motion, above): the glint is its own <svg>, outside the star's, so
   the compositor moves it without a repaint, and it moves in 100 ms
   steps, all on one beat (the delays are multiples of it), so the
   compositor draws 10 frames a second, not 60 (measure.py,
   perf-home-stars and perf-home-christmas-day). Paused while the tree
   is faded out (Marv up) or Home is hidden, and off under reduced
   motion, where the stars stay as they are. */
.xmas-star { position: relative; flex: none; }
.xmas-star svg { display: block; width: 100%; height: 100%; overflow: visible; }
.xmas-star .xmas-glint { position: absolute; inset: 0; opacity: 0; }
.xmas-star .xmas-glint path { fill: var(--art-paper); stroke: none; }
.clock[data-arrange="b"] .home-trees.shape .xmas-glint {
  will-change: opacity, transform;
  animation: xmas-twinkle 4.4s infinite;
  animation-delay: calc(var(--tw) * -0.4s);
}
.clock[hidden] .xmas-glint, .marv-up .clock .xmas-glint { animation-play-state: paused; }
/* Lit from 3.6 s to 3.9 s of the 4.4, out by its end. */
@keyframes xmas-twinkle {
  0%, 81.8182% { opacity: 0; scale: 0.4; animation-timing-function: steps(3); }
  88.6364% { opacity: 0.9; scale: 1; animation-timing-function: steps(5); }
  100% { opacity: 0; scale: 0.4; }
}
/* Today's star (.today, js/widgets/christmas.js) stands out on the big
   tree only: bigger than the rest (the separate `scale`, so its
   neighbours stay put), a paler amber (the amber mixed with paper, so
   lighter on either theme, where --accent-strong is darker on light)
   with a thicker ink edge, and a ring of eight rays behind it in drawn
   art's amber, centred on the star (a square 160% of its width; an
   <svg> does not stretch to its insets). Its size and rays,
   not its colour, tell it apart. It pulses (scale) and the rays turn
   (rotate, 45 degrees, one ray to the next, so the loop is seamless),
   each in 100 ms steps on the twinkle's beat; paused (as specific as
   the animation rules, or their shorthand wins) and off as it is.
   On Christmas Day it is the apex (.christmas), the tree's last star,
   and the big glorious one: over twice the size, pulsing on its own
   keyframes (the pulse's `scale` would override a plain one), grown
   from its foot so it rises into the free space above the tree.
   Elsewhere (Countdowns) it is a star like the others, but amber. */
.xmas-star .xmas-halo { display: none; }
.clock[data-arrange="b"] .home-trees.shape .xmas-star.today { z-index: 1; scale: 1.35; }
.clock[data-arrange="b"] .home-trees.shape .today > svg:not(.xmas-glint, .xmas-halo) { position: relative; }
.clock[data-arrange="b"] .home-trees.shape .today > svg:not(.xmas-glint, .xmas-halo) path {
  fill: color-mix(in srgb, var(--art-amber) 70%, var(--art-paper));
  stroke-width: 1.5;
}
.clock[data-arrange="b"] .home-trees.shape .xmas-halo {
  display: block;
  position: absolute;
  left: -30%;
  top: 50%;
  width: 160%;
  height: auto;
  aspect-ratio: 1;
  margin-top: -80%;
}
.xmas-star .xmas-halo path { fill: var(--art-amber); stroke: var(--art-ink); stroke-width: 0.9; stroke-linejoin: round; }
.clock[data-arrange="b"] .home-trees.shape :is(.xmas-star.today, .xmas-halo) { will-change: transform; }
.clock[data-arrange="b"] .home-trees.shape .xmas-star.today { animation: xmas-today-pulse 1.6s infinite; }
.clock[data-arrange="b"] .home-trees.shape .xmas-halo { animation: xmas-today-turn 4s steps(40) infinite; }
.clock[data-arrange="b"][hidden] .home-trees.shape :is(.xmas-star.today, .xmas-halo),
.marv-up .clock[data-arrange="b"] .home-trees.shape :is(.xmas-star.today, .xmas-halo) {
  animation-play-state: paused;
}
.clock[data-arrange="b"] .home-trees.shape .xmas-star.today.christmas {
  z-index: 2;
  scale: 2.2;
  transform-origin: 50% 100%;
  animation-name: xmas-christmas-pulse;
}
@keyframes xmas-christmas-pulse {
  0% { scale: 2.1; animation-timing-function: steps(8); }
  50% { scale: 2.35; animation-timing-function: steps(8); }
  100% { scale: 2.1; }
}
@keyframes xmas-today-pulse {
  0% { scale: 1.25; animation-timing-function: steps(8); }
  50% { scale: 1.45; animation-timing-function: steps(8); }
  100% { scale: 1.25; }
}
@keyframes xmas-today-turn {
  from { rotate: 0deg; }
  to { rotate: 45deg; }
}
@media (prefers-reduced-motion: reduce) {
  .clock[data-arrange="b"] .home-trees.shape :is(.xmas-glint, .xmas-star.today.christmas, .xmas-star.today, .xmas-halo) { animation: none; }
}

/* The days to Thanksgiving (js/widgets/thanksgiving.js, from 21 days
   out), in the tree's place while the tree yields: as a row along Home's
   foot, the count then a small turkey for each day left, placed, and
   stepping out, as the trees' row is; in B, while the lines leave room
   (.shape), one big turkey in the right column, 312 x 260 from 316 down
   to 576, whose tail fans out a feather a day. A feather is drawn art's
   red or amber, edged in its ink; a day left is its slot's outline
   only, in the words' colour so it reads on either theme's ground, so
   filled or empty reads without the colour. The count sits
   left of the turkey's feet, as the tree's left of its trunk. */
.home-turkey {
  position: absolute;
  z-index: 1;
  left: var(--edge);
  right: var(--edge);
  bottom: var(--s6);
  height: var(--touch);
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  text-shadow: var(--shadow-text);
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease);
}
.tg-label { display: flex; align-items: baseline; gap: var(--s1); flex: none; font-size: var(--fs-body); }
.tg-days { font-size: var(--fs-label); font-weight: var(--fw-medium); }
.tg-row { display: flex; flex: none; filter: var(--shadow-icon); }
.tg-mini { width: 29px; height: 29px; overflow: visible; }
.home-turkey :is(.tg-red, .tg-amber, .tg-body, .tg-face, .tg-neck, .tg-beak, .tg-wattle) {
  stroke: var(--art-ink);
  stroke-width: 1.1;
  stroke-linejoin: round;
}
.tg-big .tg-art :is(.tg-red, .tg-amber, .tg-slot, .tg-body) { stroke-width: 2.4; }
.tg-red, .tg-wattle { fill: var(--art-red); }
.tg-amber, .tg-beak, .tg-legs { fill: var(--art-amber); }
.tg-body, .tg-eye { fill: var(--art-ink); }
.tg-face, .tg-neck { fill: var(--art-blue); }
.tg-slot { fill: none; stroke: var(--text); stroke-dasharray: 6 5; }
.tg-wing { fill: none; stroke: var(--art-steel); stroke-width: 3; stroke-linecap: round; }
.tg-legs { fill: none; stroke: var(--art-amber); stroke-width: 4; stroke-linecap: round; }
.tg-big { display: none; }
.clock[data-arrange="b"] .home-turkey.shape {
  left: 832px;
  height: auto;
  bottom: calc(var(--s7) + var(--s5));
  display: block;
  overflow: visible;
}
.clock[data-arrange="b"] .home-turkey.shape .tg-row { display: none; }
.clock[data-arrange="b"] .home-turkey.shape .tg-big {
  display: block;
  position: relative;
  width: 312px;
  height: 260px;
  margin: 0 auto;
  filter: var(--shadow-icon);
}
.tg-big svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.clock[data-arrange="b"] .shape .tg-label { position: absolute; right: calc(50% + 60px + var(--s2)); bottom: 0; }
.marv-up .clock .home-turkey,
body:has(.player:not(.tucked) :is(.pill, .card):not([hidden])) .clock:not([data-arrange="b"]) .home-turkey,
body:has(.player:not(.tucked) :is(.pill, .card):not([hidden])) .clock .home-turkey:not(.shape) { opacity: 0; pointer-events: none; }
/* The tree and the turkey are tapped (js/screens/clock.js): the row
   only as wide as it is drawn (left-aligned, it looks the same), the
   big one its column. Faded out (above), it takes no touches, so a
   swipe there still turns the photo. */
:is(.home-trees, .home-turkey).home-tap { pointer-events: auto; }
.clock:not([data-arrange="b"]) :is(.home-trees, .home-turkey),
:is(.home-trees, .home-turkey):not(.shape) { right: auto; max-width: calc(100% - 2 * var(--edge)); }
/* The big turkey gobbles: every 20 s its head bobs for a second and a
   half, still between. The head is its own <svg> (js/widgets/
   thanksgiving.js), turned about its neck on the compositor, in 100 ms
   steps and one step for the still 18.5 s, as the stars' glints move
   (above). Paused while it is faded out (Marv up) or Home is hidden,
   and off under reduced motion. */
.clock[data-arrange="b"] .home-turkey.shape .tg-head {
  transform-origin: 50% 52%;
  will-change: transform;
  animation: tg-gobble 20s infinite;
  animation-delay: -15s;
}
.clock[hidden] .tg-head, .marv-up .clock .tg-head { animation-play-state: paused; }
@keyframes tg-gobble {
  0%, 92.5% { transform: none; animation-timing-function: steps(1); }
  94% { transform: rotate(-9deg) translateY(3px); animation-timing-function: steps(3); }
  95.5% { transform: rotate(7deg); animation-timing-function: steps(3); }
  97% { transform: rotate(-7deg) translateY(3px); animation-timing-function: steps(3); }
  98.5% { transform: rotate(4deg); animation-timing-function: steps(3); }
  100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .clock[data-arrange="b"] .home-turkey.shape .tg-head { animation: none; }
}

/* ---- Home arrangements ----
   Three ways to set the same elements, chosen by one attribute on Home's
   root (section.screen.clock[data-arrange]): Marv sets "b"
   (js/screens/clock.js); the preview may set "a" or "c" over it. None,
   or anything but "b" or "c", is A. Each block is whole: the
   clock's place and size, Marv's moves from it, the lines, the land line
   and the shade behind the clock. The player's pill takes 600-696
   px down (player.css), so every arrangement keeps its lines above 576. */

/* ==== Home arrangement A: the clock in the middle, a band below ====
   The clock at the hero size, centred, its box 112-352 px down, the
   date tucked under it (342-390, its glyphs ending by 384); the lines in
   a quiet band of three 64 px rows below it (384-576), the calendar's on
   the left, left-aligned, and the rest on the right, right-aligned, at
   the body size; the land line at the far end of the weather's line, top
   right. In the split the clock
   keeps its column and the lines take the right photo's, from 192 down. */
.clock:not([data-arrange="b"], [data-arrange="c"]) .clock-face { top: 112px; }
.clock:not([data-arrange="b"], [data-arrange="c"]) .clock-time { font-size: var(--fs-hero); }
.clock:not([data-arrange="b"], [data-arrange="c"]) .clock-ampm { font-size: var(--fs-headline); margin-left: var(--s3); }
/* Baseline 56 px under the digits', in their unused descender room, so the
   date still ends above the lines' band (the split's rule below wins). */
.clock:not([data-arrange="b"], [data-arrange="c"]) .clock-date { margin-top: calc(56px - 39.5px - 0.112 * var(--fs-hero)); }
.clock:not([data-arrange="b"], [data-arrange="c"]) .home-lines {
  top: 384px;
  left: var(--edge);
  right: var(--edge);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: repeat(3, var(--touch));
  grid-auto-flow: column dense;
  column-gap: var(--s5);
  font-size: var(--fs-body);
  /* Two columns of three rows hold the six lines Home ever shows, and end
     at 576, above the pill. The grid runs right to left (its first column
     is the right one) so the rest, filled down the columns, fill the right
     one first and spill under the calendar's when there are more than
     three (a fourth kind, no calendar); its words stay left to right. */
  direction: rtl;
}
.clock:not([data-arrange="b"], [data-arrange="c"]) .hl-group { display: contents; }
.clock:not([data-arrange="b"], [data-arrange="c"]) .home-lines .home-line { direction: ltr; justify-self: right; }
.clock:not([data-arrange="b"], [data-arrange="c"]) .hl-group[data-widget="calendar"] > .home-line { grid-column: 2; justify-self: left; }
.clock:not([data-arrange="b"], [data-arrange="c"]) .home-land { top: var(--home-line); right: var(--edge); max-width: 560px; }
.clock:not([data-arrange="b"], [data-arrange="c"]):has(.wallpaper.pair) .home-lines {
  top: 192px;
  left: calc(var(--edge) + var(--home-col) + var(--s5));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  direction: ltr;
}
/* Marv up: the time's box from (640, 232) to (332, 210), the date's from (640, 366) to (332, 291). */
.marv-up .clock:not([data-arrange="b"], [data-arrange="c"]) .clock-time { transform: translate(-308px, -22px) scale(0.35); }
.marv-up .clock:not([data-arrange="b"], [data-arrange="c"]) .clock-date { transform: translate(-308px, -75px) scale(0.7); }
.clock:not([data-arrange="b"], [data-arrange="c"]) .scrim::before {
  background: radial-gradient(ellipse 50% 44% at 50% 37%, rgba(var(--shade-rgb), 0.5), rgba(var(--shade-rgb), 0) 80%);
}
/* ==== end A ==== */

/* ==== Home arrangement B: the clock on the left, a column on the right ====
   The clock at the hero size, centred in the left column (x 48-808, the
   widest time, "12:42 PM", fits it), its box 212-452 px down, the date
   under it (460-508): centred between the weather's line and the pill.
   The lines in one column down the right (x 832-1232) from the weather's
   line, at the body size, a little closer set; the changes line's two
   parts a row each. The land line under the date, centred on the
   clock's column. */
.clock[data-arrange="b"] .clock-face { top: 212px; left: var(--edge); right: auto; width: 760px; }
.clock[data-arrange="b"] .clock-time { font-size: var(--fs-hero); }
.clock[data-arrange="b"] .clock-ampm { font-size: var(--fs-headline); margin-left: var(--s3); }
.clock[data-arrange="b"] .home-lines {
  top: var(--home-line);
  left: 832px;
  right: var(--edge);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: var(--fs-body);
}
.clock[data-arrange="b"] .hl-group { display: contents; }
.clock[data-arrange="b"] .home-line { gap: var(--s1); }
.clock[data-arrange="b"] .hl-word { margin-left: 0; }
.clock[data-arrange="b"] .hl-changes { flex-direction: column; align-items: flex-start; }
.clock[data-arrange="b"] .hl-changes .hl-sep { display: none; }
.clock[data-arrange="b"] .home-land { top: 520px; left: var(--edge); width: 760px; justify-content: center; }
/* A change notice (to 184 px down, at most 280-1000 across) hangs over
   the column's first lines: the column steps out while it is up, as the
   sky does, and its taps fall to nothing under it. */
body:has(.change-notice:not([hidden])) .clock[data-arrange="b"] .home-lines { opacity: 0; }
body:has(.change-notice:not([hidden])) .clock[data-arrange="b"] .home-tap { pointer-events: none; }
/* The turkey and the tree stand below it (from 316 px down) and stay. */
body:has(.change-notice:not([hidden])) .clock[data-arrange="b"] :is(.home-trees, .home-turkey).home-tap { pointer-events: auto; }
/* Marv up: the time's box from (428, 332) to (332, 210), the date's from (428, 484) to (332, 291). */
.marv-up .clock[data-arrange="b"] .clock-time { transform: translate(-96px, -122px) scale(0.5); }
.marv-up .clock[data-arrange="b"] .clock-date { transform: translate(-96px, -193px) scale(0.7); }
.clock[data-arrange="b"] .scrim::before {
  background: radial-gradient(ellipse 40% 44% at 35% 50%, rgba(var(--shade-rgb), 0.5), rgba(var(--shade-rgb), 0) 80%);
}
/* B with a timer running (.hl-timer.big, js/widgets/timer.js): the
   timer's panel takes the right half (x 664-1232, 80-576 px down), the
   newest timer's hourglass over its countdown at the numeral size,
   "left" after it, then its length and the announce glyph; a second
   timer, or "+N more timers", under them. The clock keeps the left half,
   at the size and place it has in the split (above), the other kinds'
   lines under the date in two 64 px rows (424-552; js/screens/
   home-widgets.js keeps them to two). The land line has no room and
   steps out; the tree and the turkey take the foot row (js/screens/
   clock.js, fit). */
.clock[data-arrange="b"]:has(.hl-timer.big) .clock-face {
  top: calc(var(--home-baseline) - 0.888 * var(--fs-display));
  width: var(--home-col);
}
.clock[data-arrange="b"]:has(.hl-timer.big) .clock-time { font-size: var(--fs-display); }
.clock[data-arrange="b"]:has(.hl-timer.big) .clock-ampm { font-size: var(--fs-title); margin-left: var(--s2); }
.clock[data-arrange="b"]:has(.hl-timer.big) .clock-date { margin-top: calc(var(--home-sub) - 39.5px - 0.112 * var(--fs-display)); }
.clock[data-arrange="b"]:has(.hl-timer.big) .home-lines {
  left: var(--edge);
  right: auto;
  width: var(--home-col);
  height: calc(576px - var(--home-line));
  padding-top: calc(424px - var(--home-line));
}
.clock[data-arrange="b"]:has(.hl-timer.big) .hl-changes { flex-direction: row; align-items: center; }
.clock[data-arrange="b"]:has(.hl-timer.big) .hl-changes .hl-sep { display: inline; }
.clock[data-arrange="b"]:has(.hl-timer.big) .home-land { visibility: hidden; }
.clock[data-arrange="b"] .hl-group[data-widget="timer"]:has(.big) {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% + var(--s5));
  width: var(--home-col);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
/* The newest's line in three rows, centred: the glass, the countdown,
   the length; its glyph and "·" give way to the glass. */
.clock[data-arrange="b"] .hl-timer.big {
  width: 100%;
  flex-wrap: wrap;
  row-gap: 0;
  justify-content: center;
  align-items: baseline;
}
.clock[data-arrange="b"] .hl-timer.big::before,
.clock[data-arrange="b"] .hl-timer.big::after { content: ""; flex-basis: 100%; height: 0; }
.clock[data-arrange="b"] .hl-timer.big::before { order: 1; }
.clock[data-arrange="b"] .hl-timer.big :is(.hl-digits, .hl-word) { order: 2; }
.clock[data-arrange="b"] .hl-timer.big::after { order: 3; }
.clock[data-arrange="b"] .hl-timer.big :is(.hl-sub, .home-announce) { order: 4; font-size: var(--fs-title); }
.clock[data-arrange="b"] .hl-timer.big :is(.hl-glyph, .hl-sep) { display: none; }
.clock[data-arrange="b"] .hl-timer.big .home-announce { align-self: center; }
.clock[data-arrange="b"] .hl-timer.big .hourglass { height: 272px; margin-bottom: var(--s2); filter: var(--shadow-icon); }
.clock[data-arrange="b"] .hl-group:has(.big + .home-line) .hourglass { height: 224px; }
.clock[data-arrange="b"] .hl-timer.big .hl-digits { font-size: var(--fs-numeral); }
.clock[data-arrange="b"] .hl-timer.big .hl-word { font-size: var(--fs-title); }
/* Marv up: as in the split. */
.marv-up .clock[data-arrange="b"]:has(.hl-timer.big) .clock-time { transform: translateY(-65px) scale(calc(120 / 168)); }
.marv-up .clock[data-arrange="b"]:has(.hl-timer.big) .clock-date { transform: translateY(-98px) scale(0.7); }
/* ... and while he is up, the panel coming or going (.repanel, a frame,
   js/screens/clock.js) puts the time and date at their new place at
   once, unseen, and they fade in there: not eased from the old place at
   the new size. */
.marv-up .clock.repanel[data-arrange="b"] :is(.clock-time, .clock-date) { transition: none; opacity: 0; }
/* A second lobe of shade behind the panel. */
.clock[data-arrange="b"]:has(.hl-timer.big) .scrim::before {
  background:
    radial-gradient(ellipse 32% 40% at 26% 48%, rgba(var(--shade-rgb), 0.6), rgba(var(--shade-rgb), 0) 85%),
    radial-gradient(ellipse 30% 46% at 75% 45%, rgba(var(--shade-rgb), 0.5), rgba(var(--shade-rgb), 0) 85%);
}
/* ==== end B ==== */

/* ==== Home arrangement C: the clock and two sentences under it ====
   The clock at the hero size, centred, its box 120-360 px down, the date
   under it (368-416); then what Home has to say in two centred rows set
   like the weather line, each a run of short phrases (432-496, 496-560):
   the timers and changes, then what has happened to Marv (he can't hear,
   a power cut) and today's calendar, its events a "·" apart.
   Nothing at the sides: the world keeps the screen but for two thin
   rows. The land line at the far end of the weather's line, top right. */
.clock[data-arrange="c"] .clock-face { top: 120px; }
.clock[data-arrange="c"] .clock-time { font-size: var(--fs-hero); }
.clock[data-arrange="c"] .clock-ampm { font-size: var(--fs-headline); margin-left: var(--s3); }
.clock[data-arrange="c"] .home-lines {
  top: 432px;
  left: var(--edge);
  right: var(--edge);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: safe center;
  column-gap: var(--s4);
  font-size: var(--fs-body);
}
/* Two rows and never a third, so they end at 560, above the pill. The
   first holds the timers, the changes and Home's "+N more"; a break
   (::after, a whole row wide and no height), then the second: the
   microphone, the power cut and the calendar, in that order; with
   nothing before the break the second is the first. Each run is set
   from its kinds' least widths (flex-basis 0), so it is placed on its
   row before it grows, and grows no wider than its words (max-content):
   where a row is short of room its words give way, cut short with an
   ellipsis as B's column cuts them; a line gives way no further than its
   times and signs (min-width auto, its least width), so a timer keeps its
   time and its announce glyph. What needs someone, and Home's "+N more",
   are never the words cut. */
.clock[data-arrange="c"] .home-lines::after { content: ""; flex: 0 0 100%; height: 0; order: 1; }
.clock[data-arrange="c"] .home-lines > * { flex: 1 1 0; max-width: max-content; }
.clock[data-arrange="c"] .home-lines > :is(.hl-group[data-widget="hearing"], .hl-group[data-widget="outage"], .hl-group[data-widget="calendar"]) { order: 2; }
.clock[data-arrange="c"] .hl-group { display: flex; justify-content: safe center; column-gap: var(--s4); }
.clock[data-arrange="c"] .home-lines :is(.hl-group, .home-line) { min-width: auto; }
.clock[data-arrange="c"] .home-lines .home-line { flex: 0 1 auto; }
.clock[data-arrange="c"] .home-lines > :is(.hl-group[data-widget="changes"], .home-more) { flex-shrink: 0; min-width: max-content; }
.clock[data-arrange="c"] .hl-hearing.ask { min-width: max-content; }
.clock[data-arrange="c"] .home-lines :not(.home-more, .hl-part, .hl-hearing.ask) > :is(.hl-sub, .hl-text) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  white-space: normal;
  overflow-wrap: anywhere;
  /* One line, tall enough to hold its shadow, and no padding under it
     for a wrapped second line to show through. */
  line-height: 2;
  padding-block: 0;
  margin-block: 0;
}
.clock[data-arrange="c"] .hl-group[data-widget="calendar"] { column-gap: var(--s2); }
.clock[data-arrange="c"] .hl-group[data-widget="calendar"] > .home-line + .home-line::before { content: "·"; }
.clock[data-arrange="c"] .home-land { top: var(--home-line); right: var(--edge); max-width: 560px; }
/* Marv up: the time's box from (640, 240) to (332, 210), the date's from (640, 392) to (332, 291). */
.marv-up .clock[data-arrange="c"] .clock-time { transform: translate(-308px, -30px) scale(0.5); }
.marv-up .clock[data-arrange="c"] .clock-date { transform: translate(-308px, -101px) scale(0.7); }
.clock[data-arrange="c"] .scrim::before {
  background: radial-gradient(ellipse 58% 44% at 50% 37%, rgba(var(--shade-rgb), 0.5), rgba(var(--shade-rgb), 0) 80%);
}
/* ==== end C ==== */

/* ---- Wallpaper (layer 0, clock only) ---- */

.wallpaper, .wall-photos, .wall-slide, .scrim, .wall-caption-layer {
  position: absolute;
  inset: 0;
}

.wall-slide {
  display: flex;
  opacity: 0;
  transition: opacity 1500ms ease;
}

.wall-slide.shown { opacity: 1; }

/* Landscape: cover the screen. Portraits: two halves, each covered. */
.wall-slide img {
  flex: 1;
  min-width: 0;
  height: 100%;
  object-fit: cover;
}

.wall-slide.pair img + img { border-left: 4px solid rgb(var(--shade-rgb)); }

/* Home settings (js/wallpaper.js, apply()): the part of a cropped photo
   kept, or where a whole or framed one hangs (pos-center is the default
   50% 50%), and the style. Whole shows all of the photo on the shade;
   Framed hangs it in a paper mat edged in ink, the tile art's line,
   inset clear of the key bar and the caption; its img keeps its own
   aspect (width: auto), so the mat hugs the picture (contain is a
   guard). The grounds are the photos' slides only: the captions'
   (.wall-captions) are slides too. */
.wallpaper.pos-top .wall-slide img { object-position: 50% 0; }
.wallpaper.pos-bottom .wall-slide img { object-position: 50% 100%; }

.wallpaper:is(.style-whole, .style-framed) .wall-photos > .wall-slide { background: rgb(var(--shade-rgb)); }
.wallpaper.style-whole .wall-slide img { object-fit: contain; }

.wallpaper.style-framed .wall-photos > .wall-slide {
  padding: var(--s6) var(--s5);
  justify-content: space-evenly;
  align-items: center;
}
.wallpaper.style-framed.pos-top .wall-photos > .wall-slide { align-items: flex-start; }
.wallpaper.style-framed.pos-bottom .wall-photos > .wall-slide { align-items: flex-end; }
.wallpaper.style-framed .wall-slide img,
.wallpaper.style-framed .wall-slide.pair img + img {
  flex: none;
  box-sizing: border-box;
  width: auto;
  height: 88%;
  max-width: 100%;
  object-fit: contain;
  padding: var(--s2);
  background: var(--art-paper);
  border: var(--art-line) solid var(--art-ink);
}
.wallpaper.style-framed .wall-slide.pair img { max-width: calc(50% - var(--s2)); }

/* A static shade over the photo, darkest where the words are: under the
   key bar and the weather's line, behind the clock (or the left column
   in the split; each arrangement puts it where its clock is) and
   along the bottom for the caption and the player. No blur: gradients
   cost the Pi nothing once drawn. The shade behind the clock is its own
   layer (::before), so it fades with the clock when a pair comes or goes. */
.scrim {
  background:
    linear-gradient(to bottom, rgba(var(--shade-rgb), 0.6) 0, rgba(var(--shade-rgb), 0) 170px),
    linear-gradient(to top, rgba(var(--shade-rgb), 0.7) 0, rgba(var(--shade-rgb), 0) 220px),
    rgba(var(--shade-rgb), 0.3);
}
.scrim::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 58% 50% at 50% 47%, rgba(var(--shade-rgb), 0.5), rgba(var(--shade-rgb), 0) 80%);
}
.wallpaper.reshape .scrim::before { transition: opacity 750ms ease-in-out; }
.wallpaper.reshape-out .scrim::before { opacity: 0; }
.clock:has(.wallpaper.pair) .scrim::before {
  background: radial-gradient(ellipse 32% 40% at 26% 48%, rgba(var(--shade-rgb), 0.6), rgba(var(--shade-rgb), 0) 85%);
}
/* Marv up: a shade behind the clock in its compact place (above). */
.scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 28% 26% at 26% 32%, rgba(var(--shade-rgb), 0.45), rgba(var(--shade-rgb), 0) 85%);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
}
.marv-up .scrim::after { opacity: 1; }

/* Date and place, bottom left of each photo, clear of the diagnostics
   card's 288px column on the right while it is up; lifted over the player's pill or card
   while either is up. Over the scrim, so it fades with the slide but is
   not dimmed. In the clock's type for words on the photo: medium, and
   bright (a faded caption is lost on a pale beach). */
.wall-caption-layer, .wall-captions { pointer-events: none; }

.wall-cap-cell {
  flex: 1;
  min-width: 0;
  position: relative;
}

.wall-caption {
  position: absolute;
  left: var(--edge);
  bottom: var(--s3);
  max-width: calc(100% - 2 * var(--edge));
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  line-height: 1.3;
  color: var(--text);
  text-shadow: var(--shadow-text);
  transition: bottom var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease);
}
/* While Marv is up his words take the band the caption is lifted into
   over the player: the caption steps out. */
.marv-up .wall-caption { opacity: 0; }
/* The player's pill or card takes the foot: the caption steps up over it. */
body:has(.player:not(.tucked) :is(.pill, .card):not([hidden])) .wall-caption {
  bottom: calc(var(--safe-bottom) + var(--s1));
}

.wall-caption span { white-space: nowrap; }
.wall-captions.pair .wall-cap-cell + .wall-cap-cell .wall-caption {
  left: calc(var(--edge) + 4px); /* past the 4px seam */
  max-width: calc(100% - 2 * var(--edge) - 4px);
}
/* Only while the diagnostics card is up do the right-hand captions keep
   its column clear (they wrap at a " · "); otherwise they run whole. */
body:has(.diagnostics:not([hidden])) .wall-captions.single .wall-caption {
  max-width: calc(100% - var(--edge) - 288px - 16px);
}
body:has(.diagnostics:not([hidden])) .wall-captions.pair .wall-cap-cell + .wall-cap-cell .wall-caption {
  max-width: calc(100% - var(--edge) - 4px - 288px - 16px);
}

/* ---- Placeholders ---- */

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.placeholder h1 { margin: 0; font-size: var(--fs-numeral); font-weight: var(--fw-light); }
.placeholder p { margin: 0; font-size: var(--fs-title); color: var(--text-2); }

/* ---- Games and the Apps launcher: apps.css ---- */

/* The Music app (js/music-app.js). One grid, and one question: whose
   music? The answer is the first thing on the screen: a record for each
   person's Spotify, their letters or picture on its label, then YouTube
   Music, Marv's channels and Add Spotify account, three to a row. Down
   the right, on the same top line, Recently played: the covers, to pick
   one up again. Along the foot, on the grid's two edges, the settings:
   the accounts' on the left under the tiles, DJ mode's switch on the
   right under the list. The records and the covers are player.css's
   (Records and sleeves), the same ones the player's pill carries.
   Everything starts on one left line, right of the back button's rail,
   and fits one screen: only the tile grid (past six tiles), the recent
   list and the channel grid scroll, each on its own, with no scroll bar. */
.music-app {
  --recent-w: 336px;
  --foot: var(--touch);
  position: absolute;
  inset: var(--safe-top) 0 var(--safe-tray);
  overflow: hidden;
}

/* This app mounts inside .games; its button rules are scoped under
   .music-app to outrank the reset below. */
:where(.music-app) button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  text-align: inherit;
}

.music-app-home, .music-app-channels {
  position: absolute;
  /* A step clear of the player's strip. The step is the pages', not the
     app's, so a confirm layer's veil still reaches the strip. */
  inset: 0 0 var(--s2);
}
.music-app-home[hidden], .music-app-channels[hidden] { display: none; }

/* -- the tiles -- */
.music-app-tiles {
  /* Up to six tiles: two rows that fill the grid's height, the records
     at 104 px. */
  --tile-h: 228px;
  --vinyl-d: 104px;
  position: absolute;
  top: 0;
  left: var(--rail);
  right: calc(var(--edge) + var(--recent-w) + var(--s4));
  bottom: calc(var(--foot) + var(--s3));
  padding-top: var(--s3);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: var(--tile-h);
  gap: var(--s3);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* A seventh: shorter rows, so a third of the third row (64 of its
   184 px: its edge and its records' tops) shows above a short fade
   (.more-after, below). Less reads as a stray line. A tile on its way out
   (data-leaving, js/list-motion.js) is not counted. */
.music-app-tiles:has(> :nth-child(7 of .music-app-tile:not([data-leaving]))) { --tile-h: 184px; --vinyl-d: 64px; }

.music-app .music-app-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s1);
  padding: 12px var(--s2);
  min-width: 0;
  text-align: center;
  background: var(--surface-1);
  border: var(--edge-w) solid var(--line);
  border-radius: var(--r-l);
}
.music-app-tiles:has(> :nth-child(7 of .music-app-tile:not([data-leaving]))) .music-app-tile { gap: 4px; padding-block: 12px; }
.music-app .music-app-tile:active { background: var(--surface-3); }
.music-app .music-app-tile:disabled { opacity: 0.45; }

.music-app-tile-art { flex: none; width: var(--vinyl-d); height: var(--vinyl-d); display: grid; place-items: center; }
/* A player's own mark (YouTube Music's) sits in the record's box, a
   size down: the people's records lead. */
.music-app-tile-art > svg { width: 77%; height: 77%; display: block; }
/* Marv's channels: his records, a stack of them. The one behind shows
   at the right of the one in front. */
.music-app-stack { position: relative; width: 100%; height: 100%; --vinyl-d: 86%; }
.music-app-stack > .vinyl { position: absolute; top: 7%; left: 0; }
.music-app-stack > .vinyl:first-child { left: 18%; }
.music-app-stack > .vinyl:last-child { left: -4%; }
.music-app-stack > .vinyl:first-child > .vinyl-label { visibility: hidden; }

/* A name gets two lines, then wraps anywhere rather than run off; it
   never gives up height to the art or the status line (flex: none), so
   the tile is sized to hold two lines of it. */
.music-app-tile-name {
  flex: none;
  max-width: 100%;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: 1.1;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* A tile's status line: what it is at rest, an icon and a word
   (Playing, Paused, Starting...) when it is the one on. */
.music-app-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-label);
  line-height: 1.3;
  color: var(--text-2);
}
.music-app-status .icon { width: 20px; height: 20px; flex: none; }
.music-app-status.on { color: var(--accent-mark); font-weight: var(--fw-bold); }
.music-app-tile .music-app-status { margin-top: auto; max-width: 100%; white-space: nowrap; }
/* The words end in "..." rather than run past the tile. */
.music-app-status > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* The one whose music is on (a tile, a channel, a recent cover): an
   amber edge, as well as its words. */
.music-app .is-on:is(.music-app-tile, .music-app-channel, .music-app-recent-row) { border-color: var(--accent-mark); }

/* The app keys' highlight (◀ ▶ Select): the ring the Apps grid uses. */
/* Drawn inside the tile's edge: its grid scrolls, and would clip it. */
.music-app .picked { outline: var(--ring); outline-offset: calc(var(--ring-width) / -2); }

/* A person: their record (.vinyl, player.css). On its label their
   picture when Spotify has one, else their letters on a colour of their
   own (js/music-app.js). */
.music-app-person-art { position: relative; }
.music-app-avatar { font-size: calc(var(--vinyl-d) * 0.27); }
/* The Spotify mark on the record's lower right: whose Spotify it is. */
.music-app-mark {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--surface-1);
}
.music-app-mark svg { width: 100%; height: 100%; display: block; }

/* Add an account: the dashed outline of a record not there yet. */
.music-app-add .music-app-tile-art .icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-2);
  border: 3px dashed var(--line-strong);
}
.music-app-add .music-app-tile-art .icon svg { width: 44%; height: 44%; }
.music-app .music-app-add { background: transparent; border-style: dashed; border-color: var(--line-strong); }

/* Removing an account (the settings row's "Remove an account", or a
   long press on a person's tile): each person's tile wears a Remove tag,
   the other tiles step back and take no taps, and a tap asks first.
   Naming one ("Name an account") is the same mode with a Name tag, and a
   tap opens the name card. */
.music-app-remove, .music-app-rename-tag { display: none; }
/* It takes the status line's place, under the name, clear of the record.
   The tag is taller than that line, so the name keeps to one line while
   it is worn: a second would run under it. */
.music-app.editing .music-app-person .music-app-status { visibility: hidden; }
.music-app.editing .music-app-person .music-app-tile-name { -webkit-line-clamp: 1; }
.music-app.editing:not(.renaming) .music-app-remove,
.music-app.renaming .music-app-rename-tag {
  position: absolute;
  bottom: var(--s1);
  left: 50%;
  translate: -50% 0;
  display: inline-flex;
}
.music-app.editing .music-app-tile:not(.music-app-person) { opacity: 0.35; pointer-events: none; }
.music-app.editing .music-app-recent { opacity: 0.35; pointer-events: none; }
/* The record on the "Remove Sam?" card. */
.music-app-card .confirm-art { --vinyl-d: 104px; }

/* Nobody added yet: what an account brings, under the tiles. */
.music-app-hint {
  grid-column: 1 / -1;
  align-self: start;
  margin: 0;
  max-width: 640px;
  font-size: var(--fs-body);
  line-height: 1.4;
  color: var(--text-2);
}
.music-app-hint b { color: var(--text); font-weight: var(--fw-semibold); }

/* -- Recently played: the covers, newest first -- */
.music-app-recent {
  position: absolute;
  top: var(--s3);
  right: var(--edge);
  bottom: calc(var(--foot) + var(--s3));
  width: var(--recent-w);
  display: flex;
  flex-direction: column;
}
/* The timer pill takes the top-right corner: the list starts under it. */
body.with-timer-pill .music-app-recent { top: calc(var(--s2) + var(--touch) + var(--s2)); }

/* The heading sits on the first tile's top edge and over the covers'
   left edge. */
.music-app-recent h2 {
  margin: 0 0 var(--s1) calc(var(--s1) + var(--edge-w));
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  color: var(--text-2);
}
.music-app-recent-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* A row: the cover in its frame (a channel: its record; YouTube Music:
   its mark), the name, and whose it is. Each keeps the room for an edge,
   so the one that is on takes its amber edge without a shift. */
.music-app .music-app-recent-row {
  --sleeve: 64px;
  --vinyl-d: 64px;
  flex: none;
  width: 100%;
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s1);
  border: var(--edge-w) solid transparent;
  border-radius: var(--r-m);
}
.music-app .music-app-recent-row:active { background: var(--surface-3); }
.music-app .music-app-recent-row.is-on { background: var(--surface-1); }
.music-app-recent-art {
  flex: none;
  width: 64px;
  height: 64px;
  margin: 0;
  display: grid;
  place-items: center;
}
/* In the list a cover is its frame alone: no record beside it. */
.music-app .music-app-recent-art.sleeve { margin-right: 0; }
.music-app-recent-art > svg { width: 56px; height: 56px; display: block; }
.music-app-recent-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.music-app-recent-title {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
/* A long second line ("Paused · Bartholomew's Spotify") wraps once, then
   ends in "...", inside the row. */
.music-app-recent-words .music-app-status { max-width: 100%; line-height: 1.2; align-items: flex-start; }
.music-app-recent-words .music-app-status > span:last-child {
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.music-app-recent-words .music-app-status .icon { margin-top: 3px; }
/* Nothing played yet: a record with a blank label, and what will be here. */
.music-app-recent-empty {
  margin: var(--s1) 0 0 calc(var(--s1) + var(--edge-w));
  font-size: var(--fs-label);
  line-height: 1.4;
  color: var(--text-2);
}
.music-app-recent-empty .vinyl { --vinyl-d: 64px; margin-bottom: var(--s2); }
.music-app-recent-empty .vinyl-label { width: 36%; }

/* -- the settings row, along the foot: the accounts' buttons from the
   tiles' left edge, DJ mode's switch at the list's right edge -- */
.music-app-foot {
  position: absolute;
  left: var(--rail);
  right: var(--edge);
  bottom: 0;
  height: var(--foot);
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.music-app :is(.music-app-edit, .music-app-rename):is([hidden], .stepped-aside) { display: none; }
/* The settings keep their width; a note (and its wrapping) takes what is
   left. A note says what to do now, so for its few seconds it takes the
   account buttons' place too: beside them it had too little room to read. */
.music-app-foot > .btn { flex: none; }
.music-app:not(.editing) .music-app-foot:has(> .music-app-note.shown) > :is(.music-app-edit, .music-app-rename) { display: none; }
/* DJ mode's switch (js/dj-state.js): the microphone and "DJ", as on the
   player's chip, then the drawn switch (.switch, Shared controls). */
.music-app .music-app-dj { order: 9; margin-left: auto; gap: var(--s1); padding: 0 var(--s2) 0 20px; }
.music-app-dj .icon { width: 26px; height: 26px; }
.music-app-dj-name { font-weight: var(--fw-bold); letter-spacing: 0.06em; }
.music-app-dj .switch { margin-left: 4px; }
/* The accounts' and the cast button a little closer in, so the four
   fit the grid's width with the gap the tiles have between them. */
.music-app-foot > :is(.music-app-edit, .music-app-rename, .music-app-cast-help) { padding: 0 20px; }
.music-app.editing .music-app-dj { display: none; }
/* Removing: what to do, beside Done, as on Dinner's heading line. */
.music-app-edit-hint { display: none; white-space: nowrap; }
.music-app.editing .music-app-edit-hint { display: block; }
.music-app-note { display: none; flex: 1 1 0; min-width: 0; } /* .alert-note (Shared controls) */
/* It ends where the tiles do, a column's gap clear of DJ's switch, and
   is cut with "..." after two lines. */
.music-app-note { max-width: calc(100% - var(--recent-w) - var(--s4)); }
.music-app-note > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.music-app-note.shown { display: flex; }

/* -- naming an account: the name card (js/music-app.js) --
   The shared confirm card, wider, with the shared letter board in it
   (letter-board.css): the field, then phone-like rows of 64 px keys,
   then Cancel, the space bar and Save. Sized to fit between the key bar
   and the tray. */
.music-app .music-app-name-card { width: 860px; padding: var(--s4) var(--s5); }
.music-app-name-card h2 { font-size: var(--fs-body); color: var(--text-2); font-weight: var(--fw-medium); }

/* -- Marv's channels: a grid of their own. Each is one of Marv's
   records, its glyph on his paper label, with its name under it -- */
.music-app-channels h2 {
  position: absolute;
  top: var(--s3);
  left: var(--rail);
  height: 80px;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  font-size: var(--fs-title);
  font-weight: var(--fw-semibold);
  line-height: 80px;
}
.music-app-channels h2 span { font-size: var(--fs-body); font-weight: var(--fw-regular); color: var(--text-2); }
.music-app-channel-grid {
  position: absolute;
  top: calc(var(--s3) + 80px + var(--s2));
  left: var(--rail);
  right: var(--edge);
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* Three rows fill the grid (3 x 146 + 2 x 16 = 470), each tall enough
     for the record, the name and "Playing"; a two-line name grows its
     row rather than be clipped. */
  grid-auto-rows: minmax(146px, auto);
  align-content: start;
  gap: var(--s2);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* None: .ls-empty, its drawing one of Marv's records at the drawing's size. */
.music-app-channels-empty .vinyl { --vinyl-d: 176px; }
.music-app .music-app-channel {
  --vinyl-d: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  /* 11 and 10, not 12: the status keeps line-height 1.2 (its word's box
     clips at overflow: hidden, and 1.1 cuts the descenders). */
  padding: 11px var(--s2) 10px;
  min-height: 146px;
  height: auto;
  min-width: 0;
  background: var(--surface-1);
  border: var(--edge-w) solid var(--line);
  border-radius: var(--r-l);
}
.music-app .music-app-channel:active { background: var(--surface-3); }
.music-app-channel .music-app-status { line-height: 1.2; }
/* Marv's records carry a wide label, so its glyph reads at this size. */
.music-app-channel-record > .vinyl-label { width: 75%; }
.music-app-channel .music-app-status:empty { display: none; }

/* A scrolling area with more beyond an edge fades out toward it. The
   tile grid's fade is shorter, under the peek of its next row. */
.music-app :is(.music-app-tiles, .music-app-recent-list, .music-app-channel-grid).more-after {
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--s6)), transparent);
}
.music-app :is(.music-app-tiles, .music-app-recent-list, .music-app-channel-grid).more-before {
  mask-image: linear-gradient(to bottom, transparent, #000 var(--s5));
}
.music-app :is(.music-app-tiles, .music-app-recent-list, .music-app-channel-grid).more-before.more-after {
  mask-image: linear-gradient(to bottom, transparent, #000 var(--s5), #000 calc(100% - var(--s6)), transparent);
}
.music-app .music-app-tiles.more-after {
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--s4)), transparent);
}
.music-app .music-app-tiles.more-before.more-after {
  mask-image: linear-gradient(to bottom, transparent, #000 var(--s5), #000 calc(100% - var(--s4)), transparent);
}

/* -- cards over the app: YouTube Music's how-to and removing an account
   are the shared confirm card (style.css, Shared controls); the pairing
   code has a layout of its own, on the same veil -- */

/* The pairing code, big enough to read from across the kitchen. */
.music-app-pairing-box {
  display: flex;
  align-items: center;
  gap: var(--s6);
  min-width: 640px;
  padding: var(--s5) var(--s6);
  border-radius: var(--r-xl);
  text-align: center;
}

.music-app-pairing-qr { flex: none; width: 280px; height: 280px; border-radius: var(--r-s); overflow: hidden; }
.music-app-pairing-qr svg { display: block; width: 100%; height: 100%; }
.music-app-pairing-words { max-width: 520px; }

.music-app-pairing-box p { margin: 0 0 var(--s3); font-size: var(--fs-body); color: var(--text-2); }
.music-app-pairing-box p b { color: var(--text); font-weight: var(--fw-semibold); }
.music-app-pairing-code {
  font-size: var(--fs-numeral);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.music-app-pairing-timer { margin-top: var(--s2); font-size: var(--fs-body); color: var(--text-2); font-variant-numeric: tabular-nums; }

.music-app .music-app-cancel { margin-top: var(--s4); padding: 0 var(--s5); }

/* ---- System layer (layer 2) ---- */

#system { pointer-events: none; z-index: 10; }
