/* Cache Pal: Watch Pet, watch.cachepal.com. The site is the Pal's own world: the Home scene behind the header, in the light of
   the visitor's own hour; the park's grass underfoot; and the game's framed windows for everything you read. The windows, ribbons,
   menu and next-step technique are copied from Guidlands Watch's site and redrawn with Cache Pal's art (art/own-service/ui,
   written here by service/scripts/build-site-art.mjs and listed in service/art-manifest.json) and palette. The lettering is
   Guidlands' own: Kenney Mini, uppercase, for titles, ribbons, buttons and the menu; plain text for everything that is read.
   --u is one art pixel of a frame and --g one of the scenery, so every piece of pixel art draws at a whole-number scale.

   A new page gets the whole skin from this one file and the shared markup:
     <link rel="stylesheet" href="/style.css">
     <link rel="preload" href="/fonts/kenney-mini.woff2" as="font" type="font/woff2" crossorigin>
     <script type="module" src="/menu.js"></script>   (or any module that imports site.js)
     <body> <a class="skip-link"> <header> brand, nav[aria-label=Main] </header> <main id="main-content"> ... </main> <footer>
   Windows:  .sheet or .reading (a page's main window; .reading is the narrow one for long text), .panel (a note; inside another
             window it draws as an inset slot), .stage (a showcase, gold frame), .plaque (a signboard, as the header is),
             .says (a Pal's line beside its portrait in a slot).
   Titles:   h1.ribbon as the first thing in a window sits over its top edge; add .free for a ribbon standing on the grass.
             h2.ribbon is a section's banner. Any short label can wear .ribbon (a <p> where the page's h1 is a sentence).
             Colours: coral for a title (the default), sky for h2.ribbon, and .gold or .mint by hand. A plain h2 is a text
             heading in the accent colour over a divider; h3 and h4 are text headings.
   Controls: button and a.button (mint, the one main action), .quiet or .pick (the paper or slate button;
             aria-pressed="true" is the chosen one), .danger, a.store (a tall store button), .textbutton (a link that is a button).
             Old names still work: .button-primary, .button-secondary, .quiet-button, .text-link.
   Type:     the roles written out under "Type". Text is var(--sans) at var(--size-small), var(--size-body) or var(--size-sub),
             weight 400 or 600. Pixel type is class="px" (or "num" for a number): uppercase, at var(--size-label) or
             var(--size-title) (var(--size-mid) on a phone's title and Play's calls). Kenney Mini sits on an 8 px grid, so only
             16, 24 and 32 px. Use a role; never name the pixel font or set a size by hand.
   Layout:   one column (header, main and footer share its edges), --gutter from the screen's edge, --gap between blocks, and
             --inset from a window's outer edge to its text, the same in every kind of window.
   Sprites:  site.js animated(name, alt, box) for a Pal strip from /art/pals/ (idle, happy, sleep or egg loops), palCanvas() for a
             Pal drawn from its card, sprite() and scaled() for stills, slot(child, size) or .slot for anything in an item slot,
             icon(name) or <i class="i16 name"> for the icon sheet (play, boards, park, guide, get, sound-on, sound-off, menu,
             pal, music; add .x2 for 32 px).
   Colours:  the custom properties on :root (--text, --muted, --link, --accent, --line, --well, --ink, --good, --warn). Put text
             on a window, never straight on the grass: the light setting picks the window art and the text colours together, so
             they always contrast.
   Scene:    site.js sets <html data-time="morning|afternoon|evening|night"> from the visitor's clock (?t= overrides it for
             checking). It picks the band behind the header and the ground. Before the script runs, night goes with a dark
             setting and afternoon with a light one.
   Next:     every page ends with one next step: <p class="next-step"><a class="button big" href="...">Get the game</a></p>. */
@font-face { font-family: "Kenney Mini"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/kenney-mini.woff2") format("woff2"); }
:root {
  color-scheme: dark; --u: 2px; --g: 3px; --g-n: 3;
  --pixel: "Kenney Mini", "Trebuchet MS", "Verdana", system-ui, sans-serif; --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --size-small: .875rem; --size-body: 1rem; --size-sub: 1.125rem; --size-label: 1rem; --size-mid: 1.5rem; --size-title: 2rem; --line-pixel: 1.125; --pixel-smoothing: auto;
  --gutter: 8px; --gap: 16px; --inset: calc(10 * var(--u));
  --sp-h: 4px; --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  /* The scene: night until the script or the light setting says otherwise. */
  --sky: #050714; --ground: #22363c;
  --band: url("/art/scene/scene_v2_night.png"); --band-far: url("/assets/scene/band_night_far.png");
  --band-m0: url("/art/scene/scene_v2_night_motion_0.png"); --band-m1: url("/art/scene/scene_v2_night_motion_1.png");
  --ground-art: url("/assets/scene/ground_night.png");
  /* Windows and controls by night: slate frames around a deep blue fill. */
  --sheet: url("/assets/ui/frame_night.png"); --plaque: url("/assets/ui/frame_night.png"); --stage: url("/assets/ui/stage_night.png"); --slot: url("/assets/ui/slot_night.png");
  --btn2: url("/assets/ui/btn_night.png"); --btn2-down: url("/assets/ui/btn_night_down.png"); --divider: url("/assets/ui/divider_night.png");
  --text: #e8ecf8; --muted: #aab2cc; --link: #6ee7b7; --link-hover: #b8f6dc; --accent: #f5d76e; --line: #2f3757; --well: #141830; --fill: #1b2036;
  --good: #6ee7b7; --warn: #ff7b8a; --rare: #5ac8fa; --slot-fill: #141830; --btn2-ink: #e8ecf8;
  /* The same in both lights: ink for art edges, and the inks that sit on each button and ribbon. */
  --ink: #07080f; --on-primary: #10231d; --on-coral: #3a0f1c; --on-sky: #0b2540; --on-gold: #3f2214; --off-ink: #252b44;
  --mint: #6ee7b7; --mint-hi: #c2f8e2; --mint-lo: #36b486; --gold: #f5c451; --gold-hi: #ffe79a; --gold-lo: #c8902e; --coral: #ff7b8a; --focus-ring: #f5d76e;
  /* Names the park's own stylesheet and the pages carried from the 2026-11-18 site still use. */
  --font-body: var(--sans); --font-mono: var(--mono); --text-2: var(--muted); --positive: var(--good); --alert: var(--warn);
  --focus: var(--focus-ring); --edge: var(--ink); --rim: var(--line); --card-fill: var(--fill); --plate-fill: var(--well); --scene-bg: var(--sky);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light; --sky: #1f5fb8; --ground: #56a648;
    --band: url("/art/scene/scene_v2_afternoon.png"); --band-far: url("/assets/scene/band_afternoon_far.png");
    --band-m0: url("/art/scene/scene_v2_afternoon_motion_0.png"); --band-m1: url("/art/scene/scene_v2_afternoon_motion_1.png");
    --ground-art: url("/assets/scene/ground_afternoon.png");
    /* By day: wooden frames around paper. Every text colour here passes AA on the paper (#ebd3ae) and the stage (#f2d3a7). */
    --sheet: url("/assets/ui/frame_day.png"); --plaque: url("/assets/ui/frame_day.png"); --stage: url("/assets/ui/stage_day.png"); --slot: url("/assets/ui/slot_day.png");
    --btn2: url("/assets/ui/btn_day.png"); --btn2-down: url("/assets/ui/btn_day_down.png"); --divider: url("/assets/ui/divider_day.png");
    --text: #2a2233; --muted: #544a5e; --link: #0e5540; --link-hover: #0e3b2c; --accent: #6b4314; --line: #c9a97e; --well: #fff1da; --fill: #ebd3ae;
    --good: #135c45; --warn: #8f1d30; --rare: #1d4e7a; --slot-fill: #fff1da; --btn2-ink: #2a2233; --focus-ring: #8f1d30;
  }
}
/* The visitor's hour, set by site.js. It changes the scenery only; the light setting above still picks the windows and text. */
:root[data-time="morning"] { --sky: #2b3a6b; --ground: #5c9e4e; --band: url("/art/scene/scene_v2_morning.png"); --band-far: url("/assets/scene/band_morning_far.png"); --band-m0: url("/art/scene/scene_v2_morning_motion_0.png"); --band-m1: url("/art/scene/scene_v2_morning_motion_1.png"); --ground-art: url("/assets/scene/ground_morning.png"); }
:root[data-time="afternoon"] { --sky: #1f5fb8; --ground: #56a648; --band: url("/art/scene/scene_v2_afternoon.png"); --band-far: url("/assets/scene/band_afternoon_far.png"); --band-m0: url("/art/scene/scene_v2_afternoon_motion_0.png"); --band-m1: url("/art/scene/scene_v2_afternoon_motion_1.png"); --ground-art: url("/assets/scene/ground_afternoon.png"); }
:root[data-time="evening"] { --sky: #2a1e4f; --ground: #4e5a46; --band: url("/art/scene/scene_v2_evening.png"); --band-far: url("/assets/scene/band_evening_far.png"); --band-m0: url("/art/scene/scene_v2_evening_motion_0.png"); --band-m1: url("/art/scene/scene_v2_evening_motion_1.png"); --ground-art: url("/assets/scene/ground_evening.png"); }
:root[data-time="night"] { --sky: #050714; --ground: #22363c; --band: url("/art/scene/scene_v2_night.png"); --band-far: url("/assets/scene/band_night_far.png"); --band-m0: url("/art/scene/scene_v2_night_motion_0.png"); --band-m1: url("/art/scene/scene_v2_night_motion_1.png"); --ground-art: url("/assets/scene/ground_night.png"); }
@media (min-width: 481px) { :root { --inset: calc(12 * var(--u)); } }
@media (min-width: 1000px) { :root { --u: 3px; --g: 4px; --g-n: 4; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); }
body { position: relative; margin: 0; min-width: 320px; background: var(--ground) var(--ground-art) center top / calc(96 * var(--g)) auto; color: var(--text); font: 400 var(--size-body)/1.5 var(--sans); font-synthesis: none; image-rendering: pixelated; overflow-wrap: break-word; }
/* The Home scene, behind the header on every page. The true band is drawn once, left of centre, over a far band that has no sun
   and repeats without a seam; a strip of the sky's top colour fills in behind the band's dithered top edge. Its ground is the
   same green as the grass below, so the page grows out of it. */
body::before, body::after { content: ""; position: absolute; inset: 0 0 auto; height: calc(44 * var(--g)); pointer-events: none; }
body::before { background: var(--band) calc(50% - 48 * var(--g)) top / calc(96 * var(--g)) calc(44 * var(--g)) no-repeat, var(--band-far) center top / calc(192 * var(--g)) calc(44 * var(--g)) repeat-x, linear-gradient(var(--sky), var(--sky)) center top / 100% 50% no-repeat; }
/* The band's two motion frames (stars, clouds, birds), swapped every second and a half. Reduced motion keeps the first. */
body::after { background: var(--band-m0) calc(50% - 48 * var(--g)) top / calc(96 * var(--g)) calc(44 * var(--g)) repeat-x; animation: band-motion 3s steps(1, end) infinite; }
@keyframes band-motion { 0% { background-image: var(--band-m0); } 50% { background-image: var(--band-m1); } }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 4px; }
a:hover { color: var(--link-hover); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.skip-link, .skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 16px; background: var(--mint); color: var(--on-primary); font-weight: 600; }
.skip-link:focus, .skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shell { width: 100%; margin-inline: auto; }
code { font-family: var(--mono); }

/* Type. Two families and nothing else: the pixel font for short labels, and one system sans for everything you read. The lettering
   is watch.guidlands.com's: Kenney Mini, the same uppercase treatment and sizes, in Cache Pal's colours.
   The pixel font (--pixel) is always uppercase, never bold, and only at 16 or 32 px (24 for a phone's page title and Play's calls),
   whole multiples of its 8 px grid, on an 18, 27 or 36 px line: the wordmark, the menu, page titles, ribbons, buttons, a name on its
   tag, chips and numbers. Nothing longer than about four words, and no arrows or en dashes (it has none).
   Text (--sans) is 14, 16 or 18 px at weight 400 or 600, on a line of 1.5. Section and card headings are text: 18 px at 600.

   The roles, and all there are. A page picks one of these and never sets a size, weight or colour of its own:
     Title    pixel 32/36 (24/27 on a phone)   h1, a big number (.num.big), the Field guide's open page.
     Label    pixel 16/18   ribbons, buttons, the menu, a short name (.px), a number (.num), a chip (.chip), a name tag.
     Heading  sans 18/27, 600   h2 (accent, over a divider), h3 and h4 (text), .sub.
     Lead     sans 18/27, 400   .lead (and the older .page-lede): a page's opening paragraph, once.
     Body     sans 16/24, 400   everything read. <b> and <strong> are the same size at 600.
     Small    sans 14/21, 400, muted   .small and .fine, and .eyebrow for a label over something.
   Colours for text: --text on any window, --muted for small print, --accent for an h2, --link for a link, --on-primary on a mint
   button, --on-coral, --on-sky and --on-gold on a ribbon. Each passes AA on what it sits on.

   The pixel font is named in this one rule and nowhere else (tests/site-pages.test.mjs holds that): to letter something in it, add
   its selector here, so it always gets the uppercase, the weight and the edges together. Its edges, and why they are set this way:
   a pixel font is only clean when each of its pixels covers a whole number of screen pixels. The sizes are snapped to the 8 px grid
   whatever the visitor's own text size is (a 20 px default gives 24 and 40, never 20), so a font pixel is always 2, 3, 4 or 5 CSS
   pixels. Where a CSS pixel is also a whole number of screen pixels (a 1x, 2x or 3x screen at 100% zoom) the letters are drawn
   hard-edged, each font pixel a clean square (--pixel-smoothing: none). At any other zoom or screen ratio a hard edge would round
   every stem to a different thickness, the lumpy lettering of 2026-11-26, so there the browser smooths it as it smooths all text
   (--pixel-smoothing: auto): softer edges, even strokes. Only macOS and iOS browsers honour the property; elsewhere text is always
   smoothed. Plain text inside a pixel element (a text button, a note in a button) takes the browser's own smoothing back and its
   own case. */
@supports (width: round(nearest, 1rem, 8px)) {
  :root { --size-label: round(nearest, 1rem, 8px); --size-mid: round(nearest, 1.5rem, 8px); --size-title: round(nearest, 2rem, 8px); }
  @media (resolution: 1dppx), (resolution: 2dppx), (resolution: 3dppx), (resolution: 4dppx) { :root { --pixel-smoothing: none; } }
}
h1, .ribbon, .px, .num, button, .button, nav[aria-label=Main] a, .brand, .store, .chip, .name-tag, .fg-page h2, .fg-yours, .pd-val, .park-crumbs { font-family: var(--pixel); font-weight: 400; font-synthesis: none; font-style: normal; font-size: var(--size-label); line-height: var(--line-pixel); letter-spacing: 0; text-transform: uppercase; text-wrap-style: balance; -webkit-font-smoothing: var(--pixel-smoothing); }
h1, h1.ribbon, .num.big, .fg-page h2 { font-size: var(--size-title); }
h2, h3, h4, .sub { font: 600 var(--size-sub)/1.5 var(--sans); letter-spacing: 0; text-transform: none; }
h1, h2, h3, h4 { margin: 0 0 8px; text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }
h2 { color: var(--accent); margin-top: 32px; }
h2::after { content: ""; display: block; width: calc(48 * var(--u)); max-width: 100%; height: calc(5 * var(--u)); margin-top: 4px; background: var(--divider) 0 0 / 100% 100% no-repeat; }
h3 small, h2 small { font: 400 var(--size-small)/1.5 var(--sans); color: var(--muted); }
p { margin: 0 0 16px; }
b, strong, th { font-weight: 600; }
strong { color: var(--text); }
.lead, .page-lede, .home-lede { font-size: var(--size-sub); }
.small, .fine, .eyebrow { font-size: var(--size-small); }
.fine, .eyebrow, .muted { color: var(--muted); }
.eyebrow { margin: 0 0 4px; font-weight: 400; }
@media (max-width: 480px) { h1 { font-size: var(--size-mid); } }

/* Windows. Each is a nine-slice frame whose middle is a flat fill, so text always sits on one plain colour. The frame is 6 art
   pixels of edge inside an 8 pixel corner; the stage is the gold frame with its mint corner gems, in a 10 pixel corner. */
.sheet, .reading { border: calc(6 * var(--u)) solid transparent; border-image: var(--sheet) 8 fill / calc(8 * var(--u)); padding: calc(4 * var(--u)) calc(var(--inset) - 6 * var(--u)) calc(5 * var(--u)); }
.panel, .card, .plaque, .says { border: calc(6 * var(--u)) solid transparent; border-image: var(--sheet) 8 fill / calc(8 * var(--u)); padding: calc(3 * var(--u)) calc(var(--inset) - 6 * var(--u)); }
.stage { border: calc(6 * var(--u)) solid transparent; border-image: var(--stage) 10 fill / calc(10 * var(--u)); padding: calc(4 * var(--u)) calc(var(--inset) - 6 * var(--u)); }
/* A note inside another window is an inset slot, not a second wooden frame. */
:is(.sheet, .reading, .stage, .panel, .card, .window, .section) :is(.panel, .card, .says) { border-width: calc(2 * var(--u)); border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(3 * var(--u)) calc(5 * var(--u)); --well: var(--fill); }
.panel > h2:first-child, .panel > .eyebrow + h2, .stage > h2:first-child, .card > h2:first-child, .sheet > h2:first-child { margin-top: 0; }
.sheet > :last-child, .reading > :last-child, .panel > :last-child, .card > :last-child, .stage > :last-child, .plaque > :last-child { margin-bottom: 0; }
.reading, main > .sheet { margin: calc(12 * var(--u)) auto calc(10 * var(--u)); }
.reading { max-width: 900px; }
.reading.wide { max-width: none; }
.reading > h1:not(.ribbon), .sheet > h1:not(.ribbon) { color: var(--accent); }

/* A title on a ribbon. As the first thing in a window it is laid over the window's top edge. The ribbon's text band is its rows 3
   to 10 of 16, between 12 pixel ends that keep their shape. */
.ribbon { display: table; justify-self: center; margin: 0 auto calc(4 * var(--u)); max-width: 100%; border-style: solid; border-color: transparent; border-width: calc(3 * var(--u)) calc(12 * var(--u)) calc(6 * var(--u)); border-image: url("/assets/ui/ribbon_coral.png") 3 12 6 12 fill / calc(3 * var(--u)) calc(12 * var(--u)) calc(6 * var(--u)); padding: 0 calc(2 * var(--u)); color: var(--on-coral); text-align: center; }
h1.ribbon, h2.ribbon, p.ribbon { color: var(--on-coral); }
h2.ribbon, .ribbon.sky { border-image-source: url("/assets/ui/ribbon_sky.png"); color: var(--on-sky); }
.ribbon.gold { border-image-source: url("/assets/ui/ribbon_gold.png"); color: var(--on-gold); }
.ribbon.mint { border-image-source: url("/assets/ui/ribbon_mint.png"); color: var(--on-primary); }
.ribbon::after { display: none; }
:is(.sheet, .reading, .stage, .panel, .card) > .ribbon:first-child { margin-top: calc(-12 * var(--u)); }
h2.ribbon { margin-top: calc(8 * var(--u)); font-size: var(--size-label); }
h1.ribbon { font-size: var(--size-title); }
@media (max-width: 480px) { h1.ribbon { font-size: var(--size-mid); } }
/* A title of five words keeps to one line on a phone at the label's size, so the ribbon's ends keep their shape. */
@media (max-width: 480px) { h1.ribbon.long { font-size: var(--size-label); } }
.ribbon.free { margin: 0 auto calc(4 * var(--u)); }

/* Header: the signboard. The menu is a game menu, with the cursor on the place you're in. */
body > header, main, body > footer { position: relative; z-index: 1; max-width: 1232px; margin: 0 auto; padding: 0 var(--gutter); }
body > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; margin-top: 8px; border: calc(6 * var(--u)) solid transparent; border-image: var(--plaque) 8 fill / calc(8 * var(--u)); max-width: 1216px; width: calc(100% - 2 * var(--gutter)); padding: 0 calc(var(--inset) - 6 * var(--u)); }
/* The mark (assets/ui/mark-2.png, scripts/site-art/mark.mjs) is today's Voltpup and Bitto, 55 x 31 art pixels at one to one: at
   2x it would stand 62 px tall and push the signboard's row past the 44 px every other part of it keeps. "Watch Pet" is said in
   mint beside the name where there's room, and is always part of the link's name. */
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand img { flex: none; width: 55px; height: 31px; image-rendering: pixelated; }
.brand span { color: var(--link); }
nav[aria-label=Main] { display: flex; flex-wrap: wrap; gap: 0 16px; }
nav[aria-label=Main] a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px; color: var(--text); text-decoration: none; white-space: nowrap; box-shadow: inset 0 -4px 0 transparent; }
nav[aria-label=Main] a::before { content: ""; flex: none; --ics: 2; --icx: 0; width: calc(16px * var(--ics)); height: calc(16px * var(--ics)); background: url("/assets/ui/icons16-2.png") calc(var(--icx) * var(--ics) * -1px) 0 / calc(176px * var(--ics)) calc(16px * var(--ics)) no-repeat; }
nav[aria-label=Main] a[href="/"]::before { --icx: 0; }
nav[aria-label=Main] a[href="/boards/"]::before { --icx: 16; }
nav[aria-label=Main] a[href="/park/"]::before { --icx: 32; }
nav[aria-label=Main] a[href="/games/"]::before { --icx: 160; }
nav[aria-label=Main] a[href="/pals/"]::before { --icx: 48; }
nav[aria-label=Main] a[href="/#get"]::before { --icx: 64; }
nav[aria-label=Main] a[href="/link/"]::before { --icx: 128; }
nav[aria-label=Main] a:hover, nav[aria-label=Main] a:focus-visible { box-shadow: inset 0 -4px 0 var(--line); }
/* Boards and Park are in every page's markup, holding their places unseen until menu.js hears they're on, so the bar never shifts
   once drawn. Switched off they leave the menu. */
nav[aria-label=Main] a[data-switch][hidden] { display: inline-flex !important; visibility: hidden; }
nav[aria-label=Main] a[aria-current=page] { color: var(--accent); box-shadow: inset 0 -4px 0 var(--accent); }
/* From 720 px the signboard is one row: the mark, the six places and Get the game in the middle, then Sound and Music as two small
   slots. A tablet shows the places as words and the mark alone; from 1040 px the name stands beside the mark, and from 1200 px each
   place gets its icon back. */
@media (min-width: 720px) {
  body > header { gap: var(--sp-h) var(--sp-2); }
  nav[aria-label=Main] { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; gap: 0 var(--sp-1); justify-content: center; }
}
/* As words alone "Play" and "Park" are 32 and 36 px wide: every place is at least a 44 px thing to tap (the row has the room from 720 px). */
@media (min-width: 720px) and (max-width: 1199px) { nav[aria-label=Main] a::before { display: none; } nav[aria-label=Main] a { min-width: 44px; justify-content: center; } }
@media (min-width: 880px) { nav[aria-label=Main] { gap: 0 var(--sp-2); } }
@media (min-width: 1040px) and (max-width: 1199px) { nav[aria-label=Main] { gap: 0 var(--sp-3); } }
/* With seven places (Games joined in u16) the row of icons and words fits the 1216 px signboard beside "Watch Pet" only on tighter
   steps: 8 px between places, 4 px between an icon and its word, no side padding (measured at 1200, 1280 and 1920: nothing left
   over the edge), and from 1200 to 1279 px the signboard's own gaps are 8 px. From 720 to 879 px the words alone fit once the
   signboard's own gaps are 4 px (the places keep 12 px between them, and 6 px below 768 px, where they lose their side padding). */
@media (min-width: 1200px) { nav[aria-label=Main] { gap: 0 var(--sp-1); } nav[aria-label=Main] a { gap: var(--sp-h); padding: 0; } }
@media (min-width: 1200px) and (max-width: 1279px) { body > header { gap: var(--sp-h) var(--sp-1); } }
@media (min-width: 720px) and (max-width: 879px) { body > header { gap: var(--sp-h); } }
@media (min-width: 720px) and (max-width: 767px) { nav[aria-label=Main] { gap: 0 6px; } nav[aria-label=Main] a { padding: 0; } }
/* On a phone the header is one row, the wordmark and a Menu button (menu.js adds it). Menu opens the places below it as a board of
   item slots, three to a row, each icon over its name, the place you're in on the gold slot, with Sound and Music in a row of their
   own under the places; Menu again, Escape or a tap outside closes it. Without JavaScript the board is simply always open. */
.menu-toggle { display: none; }
@media (max-width: 719px) {
  body > header { justify-content: space-between; gap: 0 var(--sp-1); }
  .menu-toggle { display: inline-flex; gap: var(--sp-1); }
  .menu-toggle .bars { display: block; width: 14px; height: 2px; background: currentColor; box-shadow: 0 -5px currentColor, 0 5px currentColor; }
  .menu-toggle[aria-expanded=true] .bars { height: 2px; box-shadow: none; rotate: 45deg; position: relative; }
  .menu-toggle[aria-expanded=true] .bars::after { content: ""; position: absolute; inset: 0; background: currentColor; rotate: 90deg; }
  nav[aria-label=Main] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-1); width: 100%; padding: var(--sp-1) 0 var(--sp-h); }
  nav[aria-label=Main] a { flex-direction: column; justify-content: center; gap: var(--sp-h); min-height: 72px; padding: var(--sp-h); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); box-shadow: none; text-align: center; white-space: normal; line-height: 1; }
  nav[aria-label=Main] a:hover, nav[aria-label=Main] a:focus-visible { box-shadow: none; filter: brightness(1.08); }
  nav[aria-label=Main] a[aria-current=page] { border-image-source: url("/assets/ui/slot_gold.png"); color: var(--on-gold); box-shadow: none; }
  body > header.menu-ready nav[aria-label=Main]:not(.open) { display: none; }
}
@media (max-width: 719px) and (scripting: enabled) { body > header nav[aria-label=Main]:not(.open) { display: none; } }
/* Under 360 px a third of the board is narrower than "Field guide" in its frame, so the board goes two across. Six places fill two
   rows of three (three of two under 360 px), and Get the game, which isn't a place, takes the row under them, its icon beside its
   words, so no tile is ever left alone on a row. */
@media (max-width: 359px) { nav[aria-label=Main] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px) {
  nav[aria-label=Main] a[href="/#get"] { grid-column: 1 / -1; flex-direction: row; min-height: 56px; }
}
/* Sound and Music are off until the player turns them on (sound.js). Each is an item slot holding its icon from the sheet: in the
   header's row from 720 px (the words stay in the button for a screen reader and as its tooltip) and with their words in the phone
   board's own row. The slot turns gold while its switch is on or its row is open. */
body > header button.music-toggle, body > header button.sound-toggle { position: relative; gap: var(--sp-1); min-width: 44px; min-height: 44px; margin: 0; padding: 0 var(--sp-1); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); color: var(--text); white-space: nowrap; }
body > header button.sound-toggle:active, body > header button.music-toggle:active { border-image-source: var(--slot); padding-top: 0; }
body > header button.sound-toggle[aria-pressed=true], body > header button.music-toggle[aria-expanded=true] { border-image-source: url("/assets/ui/slot_gold.png"); color: var(--on-gold); }
body > header button.sound-toggle::before, body > header button.music-toggle::before { content: ""; flex: none; width: 32px; height: 32px; background: url("/assets/ui/icons16-2.png") -192px 0 / 352px 32px no-repeat; }
body > header button.sound-toggle[aria-pressed=true]::before { background-position: -160px 0; }
body > header button.music-toggle::before { background-position: -288px 0; }
body > header > button.sound-toggle, body > header > button.music-toggle { flex: none; width: 44px; padding: 0; }
body > header > button.sound-toggle .label, body > header > button.music-toggle .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body > header > button.music-toggle { margin-left: calc(-1 * var(--sp-1)); }
nav[aria-label=Main] .menu-row { display: none; }
@media (max-width: 719px) {
  body > header > .sound-toggle, body > header > .music-toggle { display: none; }
  nav[aria-label=Main] .menu-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-1); margin-top: var(--sp-h); padding-top: var(--sp-1); border-top: calc(2 * var(--u)) solid var(--line); }
  nav[aria-label=Main] .menu-row button { flex: 1 1 0; max-width: 180px; min-height: 44px; margin: 0; }
}
/* Music opens a row along the bottom of the header: the music's own switch ("Effects only" when off) and its volume (menu.js). */
.music-panel { display: flex; flex-basis: 100%; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--sp-1) var(--sp-2); padding: var(--sp-1) 0; }
.music-panel p { margin: 0; }
.music-panel label { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 44px; font-size: var(--size-small); color: var(--muted); white-space: nowrap; }
.music-panel input[type=range] { width: 160px; max-width: 55vw; min-height: 44px; margin: 0; accent-color: var(--mint-lo); }
.music-panel input[type=range]:disabled { opacity: .5; }
@media (max-width: 719px) { .music-panel { justify-content: flex-start; } }
/* The narrowest phones and a tablet's one row keep the mark and drop the words beside it (still the link's name). */
@media (max-width: 379px), (min-width: 720px) and (max-width: 1039px) { .brand { font-size: 0; gap: 0; } }
@media (max-width: 1199px) { .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
main { padding-bottom: 8px; }
body > footer { margin: calc(10 * var(--u)) auto var(--sp-2); border: calc(6 * var(--u)) solid transparent; border-image: var(--plaque) 8 fill / calc(8 * var(--u)); max-width: 1216px; width: calc(100% - 2 * var(--gutter)); padding: calc(2 * var(--u)) calc(var(--inset) - 6 * var(--u)); }
body > footer p { margin: 0 0 var(--sp-1); }
body > footer p:last-child { margin: 0; }
/* Rows of links wrap whole links, with space between them and no " · " to strand at a line's end. */
.links { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-h) var(--sp-2); }
.links a, .more a { display: inline-flex; align-items: center; min-height: 44px; }

/* Buttons. The mint one is the game's own main action; pressed is its pressed art, one pixel lower, and the label follows it.
   The quiet one is the paper button by day and the slate one by night. */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-style: solid; border-color: transparent; border-width: calc(5 * var(--u)) calc(5 * var(--u)) calc(6 * var(--u)); border-image: url("/assets/ui/btn_primary.png") 5 5 6 5 fill / calc(5 * var(--u)) calc(5 * var(--u)) calc(6 * var(--u)); padding: 0 8px; background: none; color: var(--on-primary); text-align: center; text-decoration: none; cursor: url("/assets/ui/hand.png") 9 1, pointer; }
button:hover, .button:hover { color: var(--on-primary); filter: brightness(1.06); }
button:active, .button:active { border-image-source: url("/assets/ui/btn_primary_down.png"); padding-top: var(--u); }
/* Switched off (the owner, 2026-11-26): the button's own working art, frame and label dimmed together, with no hover or press. The
   pale _off art read brighter than a live button on a dark page. */
button:disabled, button[aria-disabled=true]:not(.pd-tile), .button[aria-disabled=true] { opacity: .45; filter: none; cursor: not-allowed; }
button.quiet, .button.quiet, .button-secondary, .tabs button, .filters button, .pick, .menu-toggle { border-image-source: var(--btn2); color: var(--btn2-ink); }
button.quiet:hover, .button.quiet:hover, .button-secondary:hover, .pick:hover, .menu-toggle:hover { color: var(--btn2-ink); }
button.quiet:active, .button.quiet:active, .button-secondary:active, .tabs button:active, .filters button:active, .pick:active, .menu-toggle:active, .menu-toggle[aria-expanded=true] { border-image-source: var(--btn2-down); }
.tabs button[aria-selected=true], .pick[aria-pressed=true], .pick[aria-checked=true] { border-image-source: url("/assets/ui/btn_primary.png"); color: var(--on-primary); }
button.danger, .button.danger { border-image-source: url("/assets/ui/btn_danger.png"); color: var(--on-coral); }
button.danger:active, .button.danger:active { border-image-source: url("/assets/ui/btn_danger_down.png"); }
/* Off, a press changes nothing: each kind keeps its working art and the label stays put. */
button:disabled:active, button[aria-disabled=true]:not(.pd-tile):active, .button[aria-disabled=true]:active { border-image-source: url("/assets/ui/btn_primary.png"); padding-top: 0; }
:is(button.quiet, .button.quiet, .button-secondary, .tabs button, .filters button, .pick):is(:disabled, [aria-disabled=true]):active { border-image-source: var(--btn2); }
:is(button.danger, .button.danger):is(:disabled, [aria-disabled=true]):active { border-image-source: url("/assets/ui/btn_danger.png"); }
@media (min-width: 1000px) { button, .button { min-height: 48px; } }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
/* Store buttons are the main button at a store badge's height, side by side where they fit. */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.store { display: flex; align-items: center; justify-content: center; flex: 1 1 160px; min-height: 56px; border-style: solid; border-color: transparent; border-width: calc(5 * var(--u)) calc(5 * var(--u)) calc(6 * var(--u)); border-image: url("/assets/ui/btn_primary.png") 5 5 6 5 fill / calc(5 * var(--u)) calc(5 * var(--u)) calc(6 * var(--u)); padding: 0 8px; color: var(--on-primary); text-align: center; text-decoration: none; cursor: url("/assets/ui/hand.png") 9 1, pointer; }
.store:hover { color: var(--on-primary); filter: brightness(1.06); }
.store:active { border-image-source: url("/assets/ui/btn_primary_down.png"); }
@media (min-width: 481px) { .store { max-width: 260px; } }
/* A link that is a button, and the older quiet button: text, not art, still a full-size thing to tap. */
.textbutton, .quiet-button { display: inline-flex; align-items: center; min-height: 44px; border: 0; border-image: none; padding: 0 4px; background: none; color: var(--link); font: 400 var(--size-small)/1.5 var(--sans); text-transform: none; -webkit-font-smoothing: auto; text-decoration: underline; text-underline-offset: 4px; cursor: url("/assets/ui/hand.png") 9 1, pointer; }
.textbutton:hover, .quiet-button:hover { color: var(--link-hover); filter: none; }
.textbutton:active, .quiet-button:active { padding-top: 0; }
.text-link { text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Forms. Fields are game slots, never a bright white web form: the slot's own frame, its fill as a colour (so a select can draw its
   arrow on it), the window's ink and the reading font. */
select, input[type=text], input[type=search], input[type=number], textarea, .text-input { min-height: 44px; margin: 0; padding: var(--sp-1); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 / calc(4 * var(--u)); border-radius: 0; background: var(--slot-fill) padding-box; color: var(--text); font: inherit; box-shadow: none; }
select { -webkit-appearance: none; appearance: none; padding-right: var(--sp-4); background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--mint-lo); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 2px solid var(--line); }
th { color: var(--muted); font-size: var(--size-small); }

/* Sprites. A Pal strip is one PNG of 32 x 32 frames, left to right; .pal shows one frame at a time and replays the watch's own
   sequences (sprite v2 contract): IDLE blinks about every 5 s, and no frame lasts under 333 ms. --cell is the whole-number scale
   (classes .c2 to .c6, because the content security policy allows no inline style) and --frames the strip's length (.f2). */
.sprite { flex: none; image-rendering: pixelated; }
.pal { --fw: calc(32px * var(--cell, 4)); position: relative; display: inline-block; flex: none; width: var(--fw); height: var(--fw); overflow: hidden; vertical-align: bottom; }
.pal img { position: absolute; top: 0; left: 0; width: calc(var(--fw) * var(--frames, 4)); max-width: none; height: var(--fw); image-rendering: pixelated; user-select: none; }
.pal-idle img { animation: pal-idle 5133ms steps(1, end) infinite; }
.pal-happy img { animation: pal-happy 700ms steps(1, end) infinite; }
.pal-sleep img { animation: pal-two 2000ms steps(1, end) infinite; }
.pal-egg { animation: egg-wobble 1000ms steps(1, end) infinite; }
.pal-egg img { animation: pal-two 1000ms steps(1, end) infinite; }
.pal-still img { animation: none; }
.pal.flip { scale: -1 1; }
@keyframes pal-idle { 0% { transform: translateX(0); } 15.585% { transform: translateX(calc(var(--fw) * -1)); } 31.171% { transform: translateX(0); } 46.756% { transform: translateX(calc(var(--fw) * -1)); } 62.342% { transform: translateX(calc(var(--fw) * -2)); } 68.829% { transform: translateX(0); } 84.415% { transform: translateX(calc(var(--fw) * -1)); } 100% { transform: translateX(calc(var(--fw) * -1)); } }
@keyframes pal-happy { 0% { transform: translateX(0); } 50% { transform: translateX(calc(var(--fw) * -3)); } 100% { transform: translateX(calc(var(--fw) * -3)); } }
@keyframes pal-two { 0% { transform: translateX(0); } 50% { transform: translateX(calc(var(--fw) * -1)); } 100% { transform: translateX(calc(var(--fw) * -1)); } }
/* The egg wobbles -5 degrees on frame 0 and +5 on frame 1, as on the watch. */
@keyframes egg-wobble { 0% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } 100% { transform: rotate(5deg); } }
.c1 { --cell: 1; }
.c2 { --cell: 2; }
.c3 { --cell: 3; }
.c4 { --cell: 4; }
.c5 { --cell: 5; }
.c6 { --cell: 6; }
.f2 { --frames: 2; }
/* A Pal drawn live from its card by assets/pal.js: 32 x 32 art pixels at the class's scale. */
.pal-canvas { display: inline-block; flex: none; width: calc(32px * var(--cell, 3)); height: calc(32px * var(--cell, 3)); image-rendering: pixelated; vertical-align: bottom; }
.shade { filter: brightness(0); opacity: .7; }
/* An item slot. It fits what stands in it; site.js slot(child, size) gives it a least size. */
.slot { display: inline-grid; place-items: center; flex: none; min-width: calc(var(--slot-size, 0) * 1px); min-height: calc(var(--slot-size, 0) * 1px); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(1 * var(--u)); }
.slot.gold { border-image-source: url("/assets/ui/slot_gold.png"); }
.icon { display: block; width: calc(16 * var(--u)); height: calc(16 * var(--u)); image-rendering: pixelated; }
.icon16 { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; }
.mark8 { width: 16px; height: 16px; image-rendering: pixelated; vertical-align: middle; }
/* The one 16 px icon sheet (assets/ui/icons16-2.png, icons16.png plus Games at x 160; scripts/site-art/park-arcade.mjs): the places,
   Sound, Menu, Your Pal, Music and Games. Always beside words, so each is decoration (aria-hidden) unless it stands alone with a label. */
.i16 { --ics: 1; display: inline-block; flex: none; width: calc(16px * var(--ics)); height: calc(16px * var(--ics)); background: url("/assets/ui/icons16-2.png") calc(var(--icx, 0) * var(--ics) * -1px) 0 / calc(176px * var(--ics)) calc(16px * var(--ics)) no-repeat; vertical-align: -3px; image-rendering: pixelated; }
.i16.x2 { --ics: 2; vertical-align: middle; }
.i16.play { --icx: 0; }
.i16.boards { --icx: 16; }
.i16.park { --icx: 32; }
.i16.guide { --icx: 48; }
.i16.get { --icx: 64; }
.i16.sound-on { --icx: 80; }
.i16.sound-off { --icx: 96; }
.i16.menu { --icx: 112; }
.i16.pal { --icx: 128; }
.i16.games { --icx: 160; }
.i16.music { --icx: 144; }

/* Meters: a bar in a dark track that fills in steps. A page's script sets the fill's width. */
.meter, .race-bar { display: block; height: calc(6 * var(--u)); margin: 8px 0; background: var(--well); box-shadow: inset 0 0 0 2px var(--ink); }
.meter span, .race-bar span { display: block; height: 100%; width: 0; background: linear-gradient(var(--mint-hi) 0 34%, var(--mint) 34% 78%, var(--mint-lo) 78%); box-shadow: inset 0 0 0 2px var(--ink); }
.race-bar span, .meter.gold span { background: linear-gradient(var(--gold-hi) 0 34%, var(--gold) 34% 78%, var(--gold-lo) 78%); }
.chip { display: inline-block; flex: none; margin: 0; border: 2px solid var(--gold); padding: 1px 8px; background: var(--ink); color: var(--gold-hi); }
.notice { padding: calc(3 * var(--u)) calc(5 * var(--u)); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); }

/* The parts every page shares. */
/* One clear next step at the foot of every page: a big button, with at most a line or a link under it. */
.next-step { display: grid; justify-items: center; gap: var(--sp-1); margin: var(--sp-3) 0 var(--sp-1); text-align: center; }
.next-step p { margin: 0; }
.next-step .button, .next-step .big { min-width: min(100%, 280px); min-height: 64px; padding: 0 var(--sp-3); }
.next-step .badges { justify-content: center; width: 100%; max-width: 540px; margin: 0; }
.next-step .more { justify-content: center; }
.reading > .next-step:last-child, .sheet > .next-step:last-child { margin-top: var(--sp-3); }
main > .next-step { margin: var(--sp-2) 0 calc(4 * var(--u)); }
/* A Pal has the page's one line of dialogue: its portrait in an item slot, the line, and its name under it. */
.says { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
.says .portrait { display: grid; place-items: center; flex: none; border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: var(--u); }
.says p { margin: 0 0 var(--sp-h); }
.says .who { margin: 0; font-size: var(--size-small); color: var(--muted); }
/* Onward links at the foot of a section: whole links that wrap, with space between them. */
.more { display: flex; flex-wrap: wrap; gap: var(--sp-h) var(--sp-2); margin-top: var(--sp-2); }
/* A tally: counts down the left in bold, what each one counts beside it, a dotted rule between rows. */
.tally { margin: 0 0 8px; padding: 0; list-style: none; }
.tally li { display: flex; align-items: baseline; gap: var(--sp-1); padding: var(--sp-h) 0; border-bottom: 2px dotted var(--line); }
.tally li:last-child { border-bottom: 0; }
.tally b { flex: none; min-width: 2.5em; text-align: right; }
/* Lists of cards, and a row of framed features or steps. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; margin: 0 0 16px; padding: 0; list-style: none; }
.cards > .card { display: flex; align-items: flex-start; gap: 16px; }
.cards > .card > div { min-width: 0; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin: 0 0 16px; padding: 0; list-style: none; }
.features > * { border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(3 * var(--u)) calc(5 * var(--u)); }
.features h3, .features p { margin: 0 0 8px; }
.steps { counter-reset: step; }
.steps > li { counter-increment: step; }
.steps h3::before { content: counter(step) ". "; color: var(--accent); }
/* The notice board: notes pinned side by side, each a signboard with a heading, a few lines and a way onward at its foot. */
.notice-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; margin: 0 0 calc(10 * var(--u)); padding: 0; list-style: none; }
.notice-board > * { display: flex; flex-direction: column; }
.notice-board h3 { margin: 0 0 4px; color: var(--accent); }
.notice-board p { margin: 0 0 8px; }
.notice-board .more { margin-top: auto; }
/* The live strip: one signboard of tiles, each a picture, a small label, a name and a line, and each a whole link. */
.live { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.live > * { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-h) var(--sp-2); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(3 * var(--u)) calc(4 * var(--u)); color: var(--text); text-decoration: none; }
.live p { margin: 0; }
/* A scene in a frame with its caption on a plate along the bottom edge: one object. */
.scene-frame { border: var(--u) solid var(--ink); background: var(--ink); }
.caption { display: grid; gap: var(--sp-h); margin-top: var(--u); padding: var(--sp-1) calc(var(--inset) - var(--u)); background: var(--fill); }
.caption p { display: flex; align-items: flex-start; gap: var(--sp-1); margin: 0; }
/* Folded answers (support): a question is a full-size thing to tap, and its answer opens under it. */
details.fold { border-bottom: 2px solid var(--line); }
details.fold > summary { display: flex; align-items: center; min-height: 44px; font-weight: 600; cursor: url("/assets/ui/hand.png") 9 1, pointer; }
details.fold[open] > summary { color: var(--accent); }
/* A linked browser's Today bar: a signboard of chips, each an icon and what waits, each a way there. */
.today-bar { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0 0 var(--sp-2); padding: 0; list-style: none; }
.today-bar a { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 44px; border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: 0 var(--sp-1); color: var(--text); text-decoration: none; }
/* A link to copy by hand when there's no share sheet and no clipboard (site.js shareButton). */
.copy-field { width: min(100%, 26em); }

/* ================================================================================================================================
   The pages as they stand today, sitting in the new windows. Each block below belongs to one page and goes when that page's own
   slice rebuilds it; nothing above this line depends on anything below it.
   ================================================================================================================================ */

/* Older frames. On the grass each is a window; inside a window each is an inset slot. */
.page-hero, .legal-section, .policy-summary, .support-start, .support-tip-help, .support-card, .report-card, .tip-details, .share-card, .feature-card, .platform-card, .start-card, .door-card, .tip-strip, .catch-card, .live-tile, .pal-portrait { border: calc(6 * var(--u)) solid transparent; border-image: var(--sheet) 8 fill / calc(8 * var(--u)); padding: calc(3 * var(--u)) calc(var(--inset) - 6 * var(--u)); }
:is(.sheet, .reading, .stage, .panel, .card, .window, .section) :is(.support-start, .support-tip-help, .support-card, .report-card, .feature-card, .platform-card, .start-card, .door-card, .tip-strip, .catch-card, .live-tile, .pal-portrait, .policy-summary) { border-width: calc(2 * var(--u)); border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(3 * var(--u)) calc(5 * var(--u)); }
/* A page's opening lines, a policy's sections and a tip's details are plain text inside their window. */
:is(.sheet, .reading, .card, .window, .section) :is(.page-hero, .legal-section, .tip-details) { border: 0; border-image: none; padding: 0; }
.page-hero > :last-child, .legal-section > :last-child, .support-card > :last-child, .support-tip-help > :last-child > :last-child, .feature-card > :last-child, .live-tile > :last-child { margin-bottom: 0; }
.card-focus, .do-not-delete { border: calc(2 * var(--u)) solid transparent; border-image: url("/assets/ui/slot_gold.png") 4 fill / calc(4 * var(--u)); padding: calc(3 * var(--u)) calc(5 * var(--u)); --text: #3f2214; --muted: #3f2214; color: #3f2214; }
.do-not-delete strong { color: #3f2214; }
/* The slot keeps its own fill in both lights, so text set on one takes the slot's ink. */
.code-panel, .pal-traits div { border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); }

/* Play, until its own pass: the old hero, sections and cards. Each section is a window, so no words stand on the grass. */
.home-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(8 * var(--u)); margin: calc(6 * var(--u)) 0 0; }
.home-page > .section, .window { border: calc(6 * var(--u)) solid transparent; border-image: var(--sheet) 8 fill / calc(8 * var(--u)); padding: calc(4 * var(--u)) calc(var(--inset) - 6 * var(--u)) calc(5 * var(--u)); }
.section-heading { max-width: 44em; margin-bottom: 16px; }
.section-heading h2, .start-card h2, .catch-card h2, .door-card h2 { margin-top: 0; }
/* The Home scene band, 96 x 44 art pixels, at a whole-number scale. Its ground line (band row 38) is a Pal's row 30, so a Pal's
   grid top sits 8 cells below the band's top. */
.scene { --s: 3; --bw: calc(96px * var(--s)); --bh: calc(44px * var(--s)); position: relative; height: var(--bh); overflow: hidden; border: var(--u) solid var(--ink); background: var(--sky) var(--band-far) center top / calc(2 * var(--bw)) var(--bh) repeat-x; image-rendering: pixelated; }
.scene-band { display: none; }
.scene-motion { position: absolute; inset: 0; background: var(--band-m0) center top / var(--bw) var(--bh) repeat-x; animation: scene-first 3000ms steps(1, end) infinite; }
.scene-motion-1 { background-image: var(--band-m1); animation-name: scene-second; }
@keyframes scene-first { 0% { visibility: visible; } 50% { visibility: hidden; } 100% { visibility: hidden; } }
@keyframes scene-second { 0% { visibility: hidden; } 50% { visibility: visible; } 100% { visibility: visible; } }
.scene-cast { position: absolute; inset: 0; }
.scene-spot { position: absolute; top: calc(8px * var(--s)); left: calc(50% + var(--x) * var(--s) * 1px); }
.scene .pal { --cell: var(--s) !important; }
.spot-l { --x: -46; }
.spot-m { --x: -16; }
.spot-r { --x: 14; }
@media (min-width: 420px) { .scene { --s: 4; } }
@media (min-width: 640px) { .scene { --s: 6; } }
@media (min-width: 900px) { .scene { --s: 8; } }
.home-hero, .guide-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(8 * var(--u)); }
.hero-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px 40px; align-items: end; }
.hero-card h1 { color: var(--accent); }
.hero-card h1 span { color: var(--link); }
.home-release { display: grid; gap: 10px; }
.store-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.store-row strong { font-weight: 600; }
@media (max-width: 820px) { .hero-card { grid-template-columns: 1fr; } }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-card h3 { margin-top: 12px; }
.feature-card p { margin: 0; color: var(--muted); }
@media (max-width: 820px) { .feature-grid { grid-template-columns: 1fr; } }
.meet-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.meet-grid li { display: grid; justify-items: center; gap: 6px; text-align: center; }
.meet-grid .slot { width: 100%; aspect-ratio: 1; }
@media (max-width: 900px) { .meet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .meet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.platform-card h3 { margin-bottom: 14px; }
.screen-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.screen-row figure { margin: 0; }
.screen-art { display: grid; place-items: center; overflow: hidden; background: #000; border: var(--u) solid var(--ink); box-shadow: 0 0 0 var(--u) var(--line); }
.screen-art img { display: block; width: 100%; height: auto; image-rendering: auto; }
.home-wear .screen-art { border-radius: 50%; }
.home-apple .screen-art { border-radius: 18%; }
.screen-row figcaption { margin-top: 8px; font-size: var(--size-small); line-height: 1.35; }
.screen-row figcaption strong { display: block; font-weight: 600; }
.screen-row figcaption p { margin: 2px 0 0; color: var(--muted); }
@media (max-width: 900px) { .platform-grid { grid-template-columns: 1fr; } }
.start-card ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 8px 0 16px; padding: 0; list-style: none; counter-reset: step; }
.start-card li { counter-increment: step; color: var(--muted); }
.start-card li::before { content: counter(step); display: grid; width: 40px; height: 40px; place-items: center; margin-bottom: 8px; color: var(--on-gold); border: calc(2 * var(--u)) solid transparent; border-image: url("/assets/ui/slot_gold.png") 4 fill / calc(4 * var(--u)); font-weight: 600; line-height: 1; }
.start-card li strong { color: var(--text); }
@media (max-width: 820px) { .start-card ol { grid-template-columns: 1fr; } }
.door-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 24px; align-items: center; }
.door-card p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .door-card { grid-template-columns: 1fr; } }
.home-privacy { margin: 20px 0 0; color: var(--muted); text-align: center; }
.tip-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 20px; }
.tip-strip p { margin: 0; font-weight: 600; }
.tip-strip span { color: var(--muted); }
/* Cache Catch on Play. */
.catch-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 32px; align-items: center; }
.catch-stage { display: grid; justify-items: center; gap: 14px; padding: 16px 8px; text-align: center; }
.catch-dish { display: grid; width: 96px; height: 96px; place-items: center; }
.catch-board { --k: 4px; position: relative; width: calc(62 * var(--k)); height: calc(18 * var(--k)); }
.catch-board img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.catch-board .catch-lamp { top: calc(5 * var(--k)); width: calc(8 * var(--k)); height: calc(8 * var(--k)); }
@media (max-width: 400px) { .catch-board { --k: 3px; } }
.catch-round { margin: 0; color: var(--muted); font-weight: 600; }
.strip { position: relative; display: block; overflow: hidden; }
.strip img { position: absolute; top: 0; left: 0; max-width: none; image-rendering: pixelated; }
.catch-sub { display: block; color: var(--muted); font: 400 var(--size-body)/1.5 var(--sans); }
.catch-status { min-height: 3em; margin: 0; font: 600 var(--size-sub)/1.5 var(--sans); }
.catch-note { margin: 0; color: var(--muted); font-size: var(--size-small); }
.catch-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.catch-choice { min-width: 104px; min-height: 64px; font-size: var(--size-title); line-height: 1; }
@media (max-width: 820px) { .catch-card { grid-template-columns: 1fr; } }
/* The live strip's tiles on Play. */
.live-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.live-tile h3 { color: var(--accent); }
.race { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.race li { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; }
.race-bar { grid-column: 1 / -1; margin: 0; }
.new-pals { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

/* Pals in lists (boards, newest Pals, friends): the picture, the name on its tag, the species under it. */
.pal-link { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
a.pal-link:hover .name-tag { text-decoration: underline; }
.pal-who { display: grid; line-height: 1.2; }
.name-tag { display: inline-block; width: fit-content; max-width: 16ch; overflow: hidden; padding: 0 6px; color: var(--text); background: var(--well); border: 2px solid var(--line); text-overflow: ellipsis; white-space: nowrap; }
/* The watch-shop name tags: 48 x 16 nine-slices (6 px caps, tiled middle), drawn at 2x. */
.name-tag.tag_gingham, .name-tag.tag_gold { padding: 0 2px; color: #2a2233; background: none; border: 12px solid transparent; border-block-width: 10px; border-image: url("/assets/catalog/ps_tag_gingham_48x16.png") 6 fill / 12px 12px round; line-height: 1; }
.name-tag.tag_gold { border-image-source: url("/assets/catalog/ps_tag_gold_48x16.png"); }

/* A choice: a box or a dot with its words beside it, a full-size thing to tap. */
.choice { display: inline-flex; gap: 10px; align-items: center; min-height: 44px; cursor: url("/assets/ui/hand.png") 9 1, pointer; }
.choice input { width: 22px; height: 22px; margin: 0; }

/* The park's pages keep their own stylesheet (park/park.css); these few lines seat its parts in the new windows. */
.park-page { margin-top: calc(12 * var(--u)); }
.park-page > .card:first-child { margin-top: 0; }
.park-page button.card, .park-page a.card { color: var(--text); }
.park-page button.card:active { padding-top: calc(3 * var(--u)); }
.park-page .row-list > li { border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); background: none; }
.park-page .park-section h2, .park-page .park-closed h2, .park-page .park-starters h2 { margin-top: 0; }

/* Motion and contrast. Reduced motion stops every animation here; forced colours swap the art frames for plain borders. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after { animation: none; }
  .pal, .pal img { animation: none !important; transform: none !important; }
  .scene-motion { animation: none !important; }
  .scene-motion-1 { visibility: hidden; }
  .race-bar span, .meter span { transition: none; }
}
/* ==== 1.3.0 slice sections. Each site slice writes its page rules inside its own section only, so the slices merge cleanly. ==== */

/* ---- Play (home): its rules go below this line. ---- */
/* Play is Guidlands' home, in Cache Pal's world: the title on a ribbon, the pitch beside the Home scene, one live strip, a
   playable demo, how to play, the notice board and the stores. The older Play rules above ("Play, until its own pass") are no
   longer used by index.html and can go when the site lane prunes. */
.yard { display: grid; gap: var(--gap); margin: calc(10 * var(--u)) 0 calc(12 * var(--u)); }
.yard > h1 { justify-self: center; margin: 0; }
/* The title stands over the yard as a banner, a clear step narrower than the windows under it. */
.yard .ribbon { margin: 0 auto; max-width: calc(100% - 2 * var(--sp-2)); }
.yard > .says { margin: 0; }
.pitch { display: flex; flex-direction: column; justify-content: center; }
.pitch .lead { margin-bottom: var(--sp-2); }
/* The pitch's buttons: the two stores, then "Feed one now" (the owner's O6) beside them where all three fit and under them where
   they don't, at the stores' height. It is the quiet button: the stores are the page's main action. */
.pitch-go { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-bottom: var(--sp-2); }
.pitch-go .badges { flex: 1 1 auto; margin: 0; }
.feed-now { flex: 1 0 auto; min-height: 56px; white-space: nowrap; }
/* The Home scene in its frame, with the caption on a plate along the bottom edge: one object. The band is 96 x 44 art pixels at a
   whole-number scale (--s) that grows with the column; the far band fills in beside it. Its ground line (band row 38) is a Pal's
   row 30, so a Pal's grid top sits 8 cells below the band's top. */
.homestead, .homestead .scene-frame { display: flex; flex-direction: column; min-width: 0; }
.homestead .scene-frame { flex: 1 0 auto; }
.homestead .caption { flex: 1 0 auto; align-content: center; }
.caption .i16 { margin-top: 4px; }
.home-scene { --s: 3; position: relative; height: calc(44px * var(--s)); overflow: hidden; background: var(--band) center top / calc(96px * var(--s)) calc(44px * var(--s)) no-repeat, var(--band-far) center top / calc(192px * var(--s)) calc(44px * var(--s)) repeat-x, var(--sky); image-rendering: pixelated; }
.home-scene .motion { position: absolute; inset: 0; background: var(--band-m0) center top / calc(96px * var(--s)) calc(44px * var(--s)) repeat-x; animation: band-motion 3s steps(1, end) infinite; }
.home-scene .spot { position: absolute; top: calc((8 + var(--y, 0)) * var(--s) * 1px); left: calc(50% + var(--x) * var(--s) * 1px); }
.home-scene .pal { --cell: var(--s); }
/* The three stand at slightly different depths on the grass (--y, art pixels below the ground line; the lower one is in front),
   so they read as a group, not a row of stamps, and the sun or moon keeps a patch of sky to itself. */
.home-scene .spot-l { --x: -46; --y: 2; z-index: 1; }
.home-scene .spot-m { --x: -16; --y: 0; }
.home-scene .spot-r { --x: 14; --y: 3; z-index: 2; }
.paused, .paused * { animation-play-state: paused !important; }
@media (min-width: 420px) { .home-scene { --s: 4; } }
@media (min-width: 520px) { .home-scene { --s: 5; } }
@media (min-width: 620px) { .home-scene { --s: 6; } }
/* From 720 px the title hangs over two columns, the pitch beside the scene, with the live strip under both; from 1000 px the
   Pal's line moves up under the pitch. Both columns end on one line: the pitch's window and the caption plate stretch. */
@media (min-width: 720px) {
  .yard { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "title title" "pitch site" "live live" "says says"; column-gap: var(--sp-3); }
  .yard > h1 { grid-area: title; } .pitch { grid-area: pitch; } .live-wrap { grid-area: live; } .homestead { grid-area: site; } .yard > .says { grid-area: says; }
  .home-scene { --s: 3; }
}
@media (min-width: 860px) { .home-scene { --s: 4; } }
@media (min-width: 1000px) {
  .yard { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "title title" "pitch site" "says site" "live live"; grid-template-rows: auto auto 1fr; column-gap: var(--sp-4); }
  .home-scene { --s: 5; }
  .home-scene .spot-l { --x: -54; }
  .home-scene .spot-r { --x: 22; }
}
/* The scene stops at 6x: at 7x three 32-pixel Pals filled the band edge to edge, the outer two cut by the frame. At 5x and 6x
   the column is wider than the band, so they keep a gutter each side and the far hills fill in beside. */
@media (min-width: 1240px) { .home-scene { --s: 6; } }
/* On a phone the Pals come first: the scene stands between the title and the pitch, so the first screen shows the pet. */
@media (max-width: 719px) { .homestead { order: 1; } .pitch { order: 2; } .live-wrap { order: 3; } .yard > .says { order: 4; } }
/* The live strip: one signboard of tiles, each a picture, a small label, a name and a line, and each a whole link. A tile with
   nothing to say is not there. */
.live-wrap { min-width: 0; container-type: inline-size; }
.live.plaque { padding-top: calc(3 * var(--u)); padding-bottom: calc(3 * var(--u)); }
/* Four tiles stand in one row only where four fit; otherwise two by two (never three and one), and one column on a narrow phone. */
@container (min-width: 440px) and (max-width: 919px) { .live { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { min-width: 0; }
.tile-art { display: grid; place-items: center; flex: none; width: 66px; height: 66px; }
.tile-text { display: grid; gap: 2px; min-width: 0; }
.tile-text > * { display: block; margin: 0; }
.tile-line:empty { display: none; }
.tile-name { color: var(--accent); }
.tile:hover .tile-name, .tile:focus-visible .tile-name { text-decoration: underline; text-underline-offset: 4px; }
.tile .meter { max-width: 280px; margin: 2px 0; }
.tile .race { display: grid; gap: 2px; max-width: 280px; }
.tile .race .race-bar { height: calc(3 * var(--u)); margin: 0; }
.i16.x4 { --ics: 4; }
.meter span { transition: width .3s steps(4, end); }
/* Try it here, after Guidlands' practice fight. Three levels, each its own shape: the two games are a row of tabs, the six Pals one
   row of slots (and Quick tap or No Timer a small pressed-in pair); the stage is the play; the care actions are icon tiles in the
   gold slot frame directly under it. A result takes the controls' place in the same box (.pd-area stacks both in one cell, so the
   page under it never moves). On a phone the stage and its controls fit one 320 x 568 screen. --s is the scene's scale (art pixels
   to screen pixels), shared by the Pal, its emote bubble, the rest effect and the signal; all whole numbers. */
.lead-in { margin: 0 0 var(--sp-2); text-align: center; text-wrap: balance; }
.demo > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.pd { --s: 2; --emotes: url("/assets/ui/emote_bubbles_night.png"); }
@media (prefers-color-scheme: light) { .pd { --emotes: url("/assets/ui/emote_bubbles_day.png"); } }
/* The bubble follows the scene's hour, as the band does, not the light setting. */
:root[data-time=morning] .pd, :root[data-time=afternoon] .pd { --emotes: url("/assets/ui/emote_bubbles_day.png"); }
:root[data-time=evening] .pd, :root[data-time=night] .pd { --emotes: url("/assets/ui/emote_bubbles_night.png"); }
@media (min-width: 480px) { .pd { --s: 3; } }
@media (min-width: 900px) { .pd { --s: 4; } }
/* A phone on its side: the scene stays small so the stage and its controls still share the screen. */
@media (min-width: 620px) and (max-height: 500px) { .pd { --s: 2; } }
.pd-intro { margin-bottom: var(--sp-1); color: var(--muted); font-size: var(--size-small); }
/* The two games: tabs on one rule, the chosen one lit and underlined in gold. */
.pd-tabs { display: flex; justify-content: center; gap: var(--sp-2); max-width: 820px; margin: 0 auto var(--sp-1); box-shadow: inset 0 -2px 0 var(--line); }
.pd-tab, .pd-tab:hover, .pd-tab:active { gap: 6px; min-height: 44px; margin: 0; padding: 0 var(--sp-1); border: 0; border-bottom: 4px solid transparent; border-image: none; background: none; color: var(--muted); filter: none; }
.pd-tab img { width: 16px; height: 16px; }
.pd-tab:hover { color: var(--text); }
.pd-tab[aria-pressed=true] { border-bottom-color: var(--gold); color: var(--accent); }
.pd-tab:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -3px; }
/* The Pals: one row of six slots, the chosen one in gold. */
.pd-cast { display: flex; justify-content: center; margin: 0 auto var(--sp-1); }
.pd-slot, .pd-slot:hover, .pd-slot:active { display: block; min-height: 0; margin: 0; padding: 2px; border: 0; border-image: none; background: none; color: inherit; box-shadow: none; filter: none; transform: none; }
.pd-slot .slot { display: grid; padding: 0; }
.pd-slot[aria-pressed=true] .slot { border-image-source: url("/assets/ui/slot_gold.png"); }
.pd-slot[aria-pressed=false] .pal { opacity: .72; }
.pd-slot:hover .pal, .pd-slot:focus-visible .pal { opacity: 1; }
.pd-slot:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -1px; }
@media (max-width: 559px) { .pd-slot .pal { --cell: 1; } }
/* Quick tap or No Timer: a small pair, the chosen one pressed in. */
.pd-modes { display: flex; align-items: center; justify-content: center; gap: var(--sp-h); min-height: 44px; margin: 0 auto var(--sp-h); }
.pd-controls .pd-modes { margin-top: var(--sp-1); }
.pd-mode, .pd-mode:hover, .pd-mode:active { flex: 0 1 7.5em; min-width: 0; padding-top: 0; border-image-source: var(--btn2); color: var(--muted); filter: none; }
.pd-mode[aria-pressed=true] { border-image-source: var(--btn2-down); padding-top: var(--u); color: var(--accent); }
.pd-mode[aria-pressed=true]::before { content: ""; width: 18px; height: 18px; background: url("/art/ui/ui_v2_glyph_check.png") 0 0 / 100% no-repeat; image-rendering: pixelated; }
/* During a run the pair steps aside for a quiet line naming the mode being played, in the same room. */
.pd-mode[hidden], .pd-playing[hidden] { display: none; }
.pd-playing { margin: 0; color: var(--muted); font-size: var(--size-small); font-weight: 600; }
.pd-rule { min-height: 1.5em; margin: 0 auto var(--sp-1); color: var(--muted); font-size: var(--size-small); text-align: center; text-wrap: balance; }
/* The stage. On a phone it reaches into the window's margin so the scene gets the width. */
.demo > .pd-stage { margin-bottom: var(--sp-1); }
@media (max-width: 479px) { .demo > .pd-stage { margin-left: calc(6 * var(--u) - var(--inset)); margin-right: calc(6 * var(--u) - var(--inset)); padding-left: var(--sp-h); padding-right: var(--sp-h); } }
.pd-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--sp-1); margin: 0; }
.pd-title .px { color: var(--accent); }
.pd-title .pd-par, .pd-title .pd-score { color: var(--text); }
.pd-goal { margin: 0 0 var(--sp-1); color: var(--muted); font-size: var(--size-small); }
.pd-mark { display: inline-block; width: 2px; height: 1em; margin: 0 3px 0 1px; vertical-align: -2px; background: var(--accent); }
.pd-grid { display: grid; gap: var(--sp-1); }
/* Care: the stage stands beside its meters only from 900 px. From 600 to 899 px the meters stack under a full-width stage, two or
   three to a row, and the scene takes the largest whole scale that fits that width; a short screen keeps the small scene (2x, a
   64 px Pal) so the stage and its controls share it. */
@media (min-width: 900px) {
  #care .pd-grid { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-3); }
  #care .pd-scene { width: calc(96px * var(--s)); }
}
@media (min-width: 620px) and (max-width: 899px) { #care .pd-needs { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-1) var(--sp-3); } }
@media (min-width: 600px) and (max-width: 899px) and (min-height: 501px) { #care { --s: 5; } }
@media (min-width: 690px) and (max-width: 899px) and (min-height: 501px) { #care { --s: 6; } }
@media (min-width: 786px) and (max-width: 899px) and (min-height: 501px) { #care { --s: 7; } }
@media (min-width: 882px) and (max-width: 899px) and (min-height: 501px) { #care { --s: 8; } }
/* The Pal's own piece of the Home scene, in the light of the visitor's hour, with the same twinkles as the hill above. */
.pd-scene { position: relative; width: 100%; max-width: 100%; height: calc(44px * var(--s)); overflow: hidden; border: var(--u) solid var(--ink); background: var(--band) center top / calc(96px * var(--s)) calc(44px * var(--s)) no-repeat, var(--band-far) center top / calc(192px * var(--s)) calc(44px * var(--s)) repeat-x, var(--sky); image-rendering: pixelated; }
.pd-motion { position: absolute; inset: 0; background: var(--band-m0) center top / calc(96px * var(--s)) calc(44px * var(--s)) repeat-x; }
.pd-pose { position: absolute; top: calc(8px * var(--s)); left: calc(50% - 16px * var(--s)); }
.pd-pose .pal { --cell: var(--s); }
.pd-emote { position: absolute; z-index: 1; top: calc(-2px * var(--s)); left: calc(50% + 9px * var(--s)); width: calc(24px * var(--s)); height: calc(24px * var(--s)); background: var(--emotes) 0 0 / calc(288px * var(--s)) calc(24px * var(--s)) no-repeat; background-position-x: calc(var(--i, 0) * -24px * var(--s)); image-rendering: pixelated; }
.pd-emote[hidden], .pd-rest[hidden] { display: none; }
.pd-emote[data-e=heart] { --i: 0; } .pd-emote[data-e=wave] { --i: 1; } .pd-emote[data-e=snack] { --i: 2; } .pd-emote[data-e=nap] { --i: 3; }
.pd-emote[data-e=sparkle] { --i: 4; } .pd-emote[data-e=laugh] { --i: 5; } .pd-emote[data-e=sad] { --i: 6; } .pd-emote[data-e=surprised] { --i: 7; }
.pd-emote[data-e=music] { --i: 8; } .pd-emote[data-e=gift] { --i: 9; } .pd-emote[data-e=thumbs_up] { --i: 10; } .pd-emote[data-e=question] { --i: 11; }
/* Asleep: the watch's rest effect, three frames of 16 art pixels, over the Pal's other shoulder. */
.pd-rest { position: absolute; z-index: 1; top: calc(2px * var(--s)); left: calc(50% - 20px * var(--s)); width: calc(16px * var(--s)); height: calc(16px * var(--s)); background: url("/art/fx/fx_v2_care_rest.png") 0 0 / calc(48px * var(--s)) calc(16px * var(--s)) no-repeat; image-rendering: pixelated; }
.pd-mood, .pd-left { position: absolute; z-index: 1; left: 0; bottom: 0; margin: 0; padding: 0 6px; background: var(--ink); color: var(--gold-hi); font: 400 var(--size-small)/1.5 var(--sans); }
.pd-left { top: 0; bottom: auto; color: #e8ecf8; }
/* Needs, filled as the watch's ten-pip meters: a pip per tenth, any value above 0 lights one, low in gold, empty as coral rings,
   and the goal's gold line at 80. On a phone the five sit side by side under the scene. */
.pd-needs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-h); margin: 0; padding: 0; list-style: none; }
.pd-needs li { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.pd-icon { position: relative; display: block; width: 32px; height: 32px; }
.pd-icon img { display: block; }
.pd-needs li.low .pd-icon::after, .pd-needs li.empty .pd-icon::after { content: ""; position: absolute; left: 14px; top: 14px; width: 18px; height: 18px; background: url("/art/ui/ui_v2_mark_low.png") 0 0 / 100% no-repeat; image-rendering: pixelated; }
.pd-needs li.empty .pd-icon::after { left: 16px; top: 16px; width: 16px; height: 16px; background-image: url("/art/ui/ui_v2_mark_empty.png"); }
.pd-need-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pd-pips { position: relative; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 1px; width: 100%; max-width: 54px; height: 8px; }
.pd-pips i { background: linear-gradient(#171b30 0 25%, #262c45 25%); box-shadow: 0 0 0 1px var(--ink); }
.pd-pips i.on { background: linear-gradient(var(--mint-hi) 0 25%, var(--mint) 25% 75%, var(--mint-lo) 75%); }
.pd-needs li.low .pd-pips i.on { background: linear-gradient(var(--gold-hi) 0 25%, var(--gold) 25% 75%, var(--gold-lo) 75%); }
.pd-needs li.empty .pd-pips i { background: var(--ink); box-shadow: inset 0 0 0 1px var(--coral), 0 0 0 1px var(--ink); }
.pd-pips::after { content: ""; position: absolute; top: -3px; bottom: -3px; left: calc(80% - 1px); width: 2px; background: var(--accent); }
.pd-val { display: flex; align-items: baseline; justify-content: center; gap: 2px; min-width: 0; line-height: 1; white-space: nowrap; }
.pd-needs li.met .num { color: var(--accent); }
.pd-needs li.low .num, .pd-needs li.empty .num { color: var(--warn); }
.pd-delta { color: var(--good); visibility: hidden; }
.pd-delta:empty { display: none; }
.pd-delta.down { color: var(--warn); }
.pd-delta.show { visibility: visible; }
/* On a phone each number sits centred in its column, so the change beside it stands out of the flow and the number never moves. */
@media (max-width: 619px) { .pd-val { position: relative; } .pd-delta { position: absolute; left: calc(100% + 2px); } }
@media (min-width: 620px) {
  .pd-needs { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
  .pd-needs li { grid-template-columns: 32px 4.2em minmax(0, 1fr) 4.6em; align-items: center; justify-items: stretch; gap: var(--sp-1); }
  .pd-need-name { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .pd-pips { max-width: none; height: 12px; gap: 2px; }
  .pd-val { justify-content: flex-start; gap: 6px; }
  .pd-val .num { min-width: 1.4em; text-align: right; }
}
/* What just happened, and what to try next, on an inset slot: under the care tiles, and inside the Cache Catch stage. */
.pd-say { min-height: calc(3em + 2 * var(--sp-h) + 4 * var(--u)); margin: 0 0 var(--sp-1); padding: var(--sp-h) var(--sp-1); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); color: var(--text); font-weight: 600; line-height: 1.5; }
.pd-stage .pd-say { margin: var(--sp-1) 0 0; }
/* Cache Catch's line holds three lines on a phone (a judgement and its timing), so the stage never changes height mid-run. */
.pd-catch .pd-say { min-height: calc(4.3em + 2 * var(--sp-h) + 4 * var(--u)); }
@media (min-width: 480px) { .pd-catch .pd-say { min-height: calc(2.8em + 2 * var(--sp-h) + 4 * var(--u)); } }
/* On a phone the care line holds the longest thing it says (an hour's five changes and a hint), so what's under it never moves. */
@media (max-width: 359px) { #care .pd-say { min-height: 9.6rem; } }
@media (min-width: 360px) and (max-width: 479px) { #care .pd-say { min-height: 8.1rem; } }
.pd-sub { display: block; color: var(--muted); font-weight: 400; font-size: var(--size-small); line-height: 1.45; }
/* The controls and the result share one cell: the taller sets its height, the other waits out of sight. */
.pd-area { display: grid; margin: 0 auto var(--sp-1); }
.pd-area > * { grid-area: 1 / 1; min-width: 0; }
.pd-area > [hidden] { display: block !important; visibility: hidden; }
/* The care actions: icon tiles, the icon over its word, in the gold slot frame. */
.pd-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-h); margin: 0 0 var(--sp-1); }
.pd-tile, .pd-tile:hover, .pd-tile:active { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 72px; padding: 2px 0; border: calc(2 * var(--u)) solid transparent; border-image: url("/assets/ui/slot_gold.png") 4 fill / calc(4 * var(--u)); color: var(--on-gold); }
.pd-tile:active { padding: calc(2px + var(--u)) 0 calc(2px - var(--u)); }
.pd-tile:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.pd-tile[aria-disabled=true] { border-image-source: var(--slot); color: var(--muted); cursor: default; filter: none; }
.pd-tile[aria-disabled=true] img { opacity: .45; }
@media (min-width: 620px) { .pd-tile, .pd-tile:hover, .pd-tile:active { flex-direction: row; gap: var(--sp-1); min-height: 56px; } }
/* On a phone the five tiles reach into the window's margin, as the stage over them does, so CLEAN and TEACH keep clear of their
   frames at the label size; under 360 px the gaps between them narrow to 2 px as well. */
@media (max-width: 479px) { .pd-actions { margin-left: calc(6 * var(--u) - var(--inset)); margin-right: calc(6 * var(--u) - var(--inset)); } }
/* Under 360 px five tiles in a row leave CLEAN and TEACH touching their frames: three over two, each word with room. */
@media (max-width: 359px) { .pd-actions { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; } .pd-tile { grid-column: span 2; } .pd-tile:nth-child(n+4) { grid-column: span 3; } }
/* The clock: the hours left as pips, and the quiet way to spend one. */
.pd-clock { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); margin: 0 0 var(--sp-1); }
.pd-hours { display: inline-flex; gap: 3px; }
.pd-hours i { width: 12px; height: 12px; background: var(--well); box-shadow: inset 0 0 0 2px var(--muted); }
.pd-hours i.on { background: linear-gradient(var(--gold-hi) 0 25%, var(--gold) 25% 75%, var(--gold-lo) 75%); box-shadow: inset 0 0 0 2px var(--ink); }
.pd-under { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--sp-2); margin: 0; }
/* A result: one panel on the inset slot, a medal and a ribbon, the one sentence, then the buttons. */
.pd-result { display: grid; align-content: start; justify-items: center; gap: var(--sp-1); padding: var(--sp-1) var(--sp-1) 0; border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); text-align: center; }
.pd-result:focus { outline: none; }
.pd-result:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.pd-result p { margin: 0; }
.pd-medal-row { display: flex; align-items: center; justify-content: center; gap: var(--sp-1); max-width: 100%; }
.pd-medal img { display: block; width: 48px; height: 48px; image-rendering: pixelated; }
.pd-medal.dim img { opacity: .4; filter: grayscale(1); }
@media (min-width: 620px) { .pd-medal img { width: 64px; height: 64px; } }
.pd-result .pd-head { margin: 0; font-size: var(--size-label); }
/* A run with some catches: a plain ribbon, not the coral one a run with none wears. */
.pd-result .pd-head.plain { border-image-source: url("/assets/ui/ribbon_sky.png"); color: var(--on-sky); }
.pd-line { font-weight: 600; }
.pd-best { color: var(--muted); }
.pd-next { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-1); }
.pd-get { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: var(--size-small); }
/* Cache Catch: the score and the lamps over a full-width scene, the Pal on the left and the signal on the right, the tap under it. */
/* (.demo: the Field guide has a part with the same id, and its windows are not to be capped.) */
.demo#cache-catch > * { max-width: 600px; }
.pd-catch .catch-board { --k: 3px; margin: var(--sp-h) auto var(--sp-1); }
@media (min-width: 620px) { .pd-catch .catch-board { --k: 4px; } }
@media (min-width: 620px) and (max-height: 500px) { .pd-catch .catch-board { --k: 3px; } }
.pd-catch .pd-pose { left: calc(24% - 16px * var(--s)); }
.pd-catch .pd-emote { left: calc(24% + 9px * var(--s)); }
/* The signal's box is always one 32-pixel cell, so a 24-pixel effect sits in its middle and nothing around it moves. */
.pd-fx { --k: var(--s); --sz: 24; --in: calc((32 - var(--sz)) * var(--k) * .5px); position: absolute; top: calc(10px * var(--s)); left: calc(70% - 16px * var(--k)); display: block; width: calc(32px * var(--k)); height: calc(32px * var(--k)); overflow: hidden; clip-path: inset(var(--in)); }
.pd-fx.s32 { --sz: 32; }
.pd-fx img { display: block; width: auto; max-width: none; height: calc(var(--sz) * var(--k) * 1px); image-rendering: pixelated; transform: translate(calc(var(--in) - var(--frame, 0) * var(--sz) * var(--k) * 1px), var(--in)); }
.pd-fx.dim { opacity: .3; }
/* The result's burst sits at the foot of the scene, so its sparkles stay under the score. */
.pd-fx.result { top: calc(11px * var(--s)); }
/* The judgement and the result's score stand at the scene's right edge, clear of the moon in the band and of the signal's sparkle. */
.pd .pd-judge { position: absolute; z-index: 2; top: calc(1px * var(--s)); left: 50%; right: calc(3px * var(--s)); margin: 0; color: var(--gold-hi); font-size: var(--size-mid); line-height: 1; text-align: right; text-shadow: 2px 0 var(--ink), -2px 0 var(--ink), 0 2px var(--ink), 0 -2px var(--ink); }
@media (min-width: 480px) { .pd .pd-judge { font-size: var(--size-title); } }
.pd-judge.perfect { color: var(--gold-hi); } .pd-judge.hit { color: var(--mint-hi); } .pd-judge.miss { color: #ffc2c9; }
.pd .pd-judge.cue { color: #b8e6ff; font-size: var(--size-title); }
.pd-catch-actions { display: grid; justify-items: center; min-height: 80px; margin: 0 0 var(--sp-1); }
.pd-tap, .pd-start { width: min(100%, 360px); min-height: 80px; font-size: var(--size-title); touch-action: manipulation; }
.pd-tap:not(.lit) { border-image-source: var(--btn2); color: var(--btn2-ink); }
/* A finger held on the button shows it pressed, as a mouse press does. */
.pd-tap.down { border-image-source: url("/assets/ui/btn_primary_down.png"); padding-top: var(--u); }
.pd-tap.down:not(.lit) { border-image-source: var(--btn2-down); }
.pd-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); width: min(100%, 420px); }
.pd-choices[hidden], .pd-tap[hidden], .pd-start[hidden] { display: none; }
.pd-choices .pick { min-height: 80px; font-size: var(--size-mid); }
.practice .catch-note { margin: 0 auto; color: var(--muted); text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .pd-motion { animation: band-motion 3s steps(1, end) infinite; }
  .pd-rest { animation: pd-rest 1.5s steps(3, end) infinite; }
  .pd-emote.pop { animation: pd-pop .2s steps(2, end); }
  .pd-judge.pop { animation: pd-pop .2s steps(2, end); }
  .pd-delta.show { animation: pd-blink 1.6s steps(1, end) forwards; }
  .pd-scene.flash::after { content: ""; position: absolute; z-index: 3; inset: 0; background: #fff; opacity: 0; animation: pd-flash .24s steps(3, end); }
  .pd-catch.lit .pd-fx { animation: pd-pop .2s steps(2, end); }
}
@keyframes pd-rest { from { background-position-x: 0; } to { background-position-x: calc(-48px * var(--s)); } }
@keyframes pd-pop { from { transform: translateY(calc(2px * var(--s))); } to { transform: none; } }
@keyframes pd-flash { from { opacity: .6; } to { opacity: 0; } }
@keyframes pd-blink { 0% { visibility: visible; } 100% { visibility: hidden; } }
@media (forced-colors: active) { .pd-scene, .pd-emote, .pd-fx, .pd-pips, .pd-hours { forced-color-adjust: none; } .pd-say, .pd-result, .pd-tile { border: 2px solid CanvasText; } .pd-tab[aria-pressed=true] { border-bottom: 4px solid Highlight; } }
/* How to play: each step's art stands on one line over its words. */
.steps .art { display: flex; align-items: flex-end; gap: var(--sp-1); height: 64px; margin-bottom: var(--sp-1); }
/* The three steps stand three across from 720 px and in one column below, never two and one. */
#quick-start .steps { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { #quick-start .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* The notice board, standing on the grass under its own banner. Each note is its own height, pinned at the top. */
.nest { margin: calc(12 * var(--u)) 0 calc(10 * var(--u)); }
.nest > .ribbon { margin-bottom: calc(6 * var(--u)); }
.nest .notice-board { align-items: start; margin-bottom: 0; }
/* The board stays even: two to four notes show (the Arcade note always, the stand-in or up to three news notes, home.js), so it
   stands in one column on a phone, two across from 600 px and one row of all of them from 1100 px. With three notes in two
   columns, the Arcade note (last) takes the bottom row whole. Counted with :has(), so nothing waits on a script. */
.nest .notice-board { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .nest .notice-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 600px) and (max-width: 1099px) {
  .nest .notice-board:has(> li:not([hidden]) ~ li:not([hidden]) ~ li:not([hidden])):not(:has(> li:not([hidden]) ~ li:not([hidden]) ~ li:not([hidden]) ~ li:not([hidden]))) > #note-arcade { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .nest .notice-board:has(> li:not([hidden]) ~ li:not([hidden]) ~ li:not([hidden])) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nest .notice-board:has(> li:not([hidden]) ~ li:not([hidden]) ~ li:not([hidden]) ~ li:not([hidden])) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.arcade-note { display: flex; align-items: center; gap: var(--sp-2); }
.arcade-note img { width: 64px; height: 64px; }
.new-pals { display: grid; gap: 2px; margin: 0 0 var(--sp-1); padding: 0; list-style: none; }
.finds { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); margin: 0 0 var(--sp-1); }
.find { display: grid; justify-items: center; align-content: start; gap: var(--sp-h); width: 84px; text-align: center; line-height: 1.3; }
.find .slot { padding: calc(2 * var(--u)); }
/* Get the game: the game on three wrists, then the page's one next step. A round face is a square capture behind a dark rim. */
.faces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; justify-items: center; gap: var(--sp-2); max-width: 760px; margin: var(--sp-2) auto; padding: 0; list-style: none; }
.faces li { display: grid; justify-items: center; gap: var(--sp-1); width: 100%; min-width: 0; text-align: center; }
.face { position: relative; display: block; width: 100%; max-width: 200px; aspect-ratio: 1; border: 4px solid var(--ink); border-radius: 50%; overflow: hidden; background: #000; box-shadow: 0 0 0 4px var(--line), 0 6px 0 4px var(--ink); }
.face img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.face.tall { max-width: 164px; aspect-ratio: 422 / 514; border-radius: 22% / 18%; }
@media (max-width: 479px) { .faces { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .faces li:nth-child(2) { order: 3; grid-column: 1 / -1; } .face.tall { max-width: 112px; } }
.get .next-step { margin-top: var(--sp-2); }
.get .next-step .small { display: block; }
/* The store buttons keep each label on one line at every width (a button grows to its words); a phone's one big store button
   says it at the label size so it stays one line, no taller than 64 px. */
#release .store, #get-step .store { flex: 1 0 auto; gap: var(--sp-1); max-width: none; white-space: nowrap; }
#get-step > .button.big { white-space: nowrap; }
/* Each store button's own watch (the owner's option c; scripts/site-art/store-icons.mjs): 16 art pixels at 2x before the words,
   which say the rest. No store's logo or badge. */
.store-icon { flex: none; width: 32px; height: 32px; image-rendering: pixelated; }
@media (max-width: 479px) { #get-step > .button.big { font-size: var(--size-label); } }
.small-print { display: grid; gap: var(--sp-2) var(--sp-3); margin: var(--sp-3) auto 0; padding-top: var(--sp-2); border-top: 2px dotted var(--line); }
.small-print h3 { margin: 0 0 var(--sp-h); }
.small-print p { margin: 0; }
@media (min-width: 860px) { .small-print { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* The browser game's note stands at the page's foot (the owner, 2026-11-26), clear of the store buttons: a small plaque, its words as approved. */
.web-note { max-width: 720px; margin: calc(10 * var(--u)) auto 0; }
.web-note h3 { margin: 0 0 var(--sp-h); }
.web-note p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .home-scene .motion { animation: none; } }
@media (forced-colors: active) { .home-scene, .face { forced-color-adjust: none; } }

/* ---- end Play ---- */


/* ---- Boards and Pal pages: their rules go below this line. ---- */
/* Copied from Guidlands Watch's "Leaderboard", "Rankings", "Hero pages" and "The wardrobe and a hero's camp" blocks and redrawn with
   Cache Pal's art and palette. Renamed where a Guidlands name collides here: .board-tabs for .tabs, .standing for .character,
   .week-race for .week, .pal-home for .den, .pal-stats for .stats, .pal-plate for .plate, .shelf-detail for .detail. */

/* Boards: Guidlands' rankings. Every board in one picker: the three groups with their icons, the chosen group's boards as one row of
   picks that wraps whole, and the board's name with its period switch (All time, This month, This week) beside it; on the Level
   board's This week view Pal of the week, a framed race; the filters, status and Refresh on one row; then the rows, More Pals, and
   Find a Pal. */
/* The Boards window is narrower than the reading window, so a name and its number are never a screen apart. */
.reading.boards-page { max-width: 720px; }
.board-tabs { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0 0 var(--sp-2); }
/* Until the switches answer, the empty group row holds the height its three groups take: one row at every width. */
.board-tabs:empty { min-height: 44px; }
@media (min-width: 1000px) { .board-tabs:empty { min-height: 55px; } }
.board-tabs button { flex: 1 1 0; gap: var(--sp-1); min-width: max-content; border-image-source: var(--btn2); color: var(--btn2-ink); }
.board-tabs button:hover { color: var(--btn2-ink); }
.board-tabs button:active { border-image-source: var(--btn2-down); }
.board-tabs button[aria-selected=true] { border-image-source: url("/assets/ui/btn_primary.png"); color: var(--on-primary); }
.board-tabs .tab-icon { width: 16px; height: 16px; }
@media (max-width: 479px) { .board-tabs { gap: 6px; } .board-tabs button { flex: 1 1 auto; min-width: 0; gap: 4px; padding: 0 2px; } }
/* The narrowest phones: the three groups keep one row by dropping their icons (the names in capitals need the room). */
@media (max-width: 359px) { .board-tabs .tab-icon { display: none; } }
/* The chosen group's boards: the shell's .pick (slate, the chosen one filled mint, as every chosen option on the site is), drawn
   smaller than the groups (their frame art at 1x) so they don't read as a second row of them. They wrap whole, each name on one line
   and the row's picks stretching to fill it, so the Games group's ten never need a sideways scroll. A group of one board has none. */
.board-picks { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0 0 var(--sp-2); }
.board-picks:empty { min-height: 44px; }
.board-picks .pick, .board-periods .pick { --u: 1px; min-height: 44px; padding: 0 var(--sp-1); font-size: var(--size-label); }
.board-picks .pick { flex: 1 1 auto; white-space: nowrap; }
/* The board's name, and beside it its period switch: three segments, the chosen one mint. On a phone the switch takes its own row
   under the name and shares it evenly. */
.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-1) var(--sp-2); margin: 0 0 var(--sp-1); }
.board-title { flex: 1 1 auto; min-width: 0; margin: 0; }
.board-title::after { display: none; }
.board-periods { display: flex; flex: 0 1 auto; gap: 4px; min-height: 44px; }
.board-periods .pick { flex: 1 1 0; white-space: nowrap; }
@media (max-width: 599px) {
  .board-periods { flex: 1 1 100%; }
  /* A segment too narrow for its words breaks them at the space (THIS / MONTH), never inside one, and stays inside the window. */
  .board-periods .pick { min-width: 0; padding: 0 4px; white-space: normal; line-height: 1.1; }
}
/* A board the service keeps in one view only (before periods) shows that view as one segment at its own width, not a long bar. */
.board-periods:has(> .pick:only-child) { flex: 0 1 auto; }
.board-periods .pick:only-child { flex: none; padding: 0 var(--sp-2); }
/* A board's controls are one row, as Guidlands' are: the Friends filter, what the board says (where your Pal stands, then the
   board's own line), and Refresh. On a phone what it says takes a line of its own under them. */
.board-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); min-height: 48px; margin: 0 0 var(--sp-1); }
.board-say { flex: 1 1 12em; min-width: 0; }
.board-say #status { margin: 0; font-weight: 600; }
.board-say #status:empty { display: none; }
.board-line { margin: 0; }
.board-filters #refresh { margin-left: auto; }
@media (max-width: 599px) {
  .board-say { order: 1; flex-basis: 100%; }
}
.check { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 44px; margin: 0; }
.check input { width: 22px; height: 22px; margin: 0; }
.boards-page #more { margin-top: var(--sp-2); }
/* Pal of the week: five lanes in the gold frame, each Pal standing as far along its track as the levels it gained this week, the
   leader at the flag, and one line about whoever is chasing. The runners are the rows' size (2x) at every width; the gain column is
   one fixed width, so the flags make one straight line. A phone gives each lane two lines; from 600 px it is one. A quiet week is a
   short frame (.quiet): the label, the quiet line, and the top five standing in one line-up, each with its name under it. Before the
   week answers the frame is the short one and the board under it waits out of the page (#board.wk-wait), so nothing on screen moves
   whichever week it turns out to be. */
.week-race { display: grid; gap: var(--sp-h); margin: 0 0 var(--sp-2); --cell: 2; }
.week-race h2 { margin: 0; font: 400 var(--size-small)/1.5 var(--sans); color: var(--muted); }
.week-race h2::after { display: none; }
.race-head { display: grid; gap: 0; }
/* Two lines held for the week's line (a quiet week's runs to two), so the frame doesn't grow when it arrives. */
.race-gap { min-height: 3em; margin: 0; font-weight: 600; }
.week-quiet { margin: 0 0 var(--sp-h); }
/* The quiet line's lines are held while the week loads (one wide, two on a phone, three on the narrowest), so the line-up under it stays put. */
.week-race.quiet .race-gap { min-height: 1.5em; font-size: var(--size-small); }
@media (max-width: 699px) { .week-race.quiet .race-gap { min-height: 3em; } }
@media (max-width: 359px) { .week-race.quiet .race-gap { min-height: 4.5em; } }
.wk-line { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-1) 0; margin: 0; padding: 0; list-style: none; }
.wk-line li { display: grid; justify-items: center; align-content: start; gap: 2px; min-width: 0; }
.wk-line .pal-canvas, .wk-pal { display: block; width: 64px; height: 64px; }
.wk-name { display: inline-block; min-width: 44px; max-width: 100%; padding-block: 4px; text-align: center; overflow: hidden; font-size: var(--size-small); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.wk-line .mine .wk-name { box-shadow: inset 0 -2px 0 var(--gold); }
@media (max-width: 359px) { .wk-line { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (scripting: enabled) {
  #board.wk-wait { min-height: 150vh; }
  #board.wk-wait > :is(.board-filters, .standings, .board-state, #more) { display: none; }
}
.lanes { display: grid; gap: var(--sp-h); margin: 0; padding: 0; list-style: none; }
.lane { display: grid; grid-template-columns: 20px minmax(0, 1fr) 6.5em; grid-template-areas: "place name line" "track track track"; align-items: center; gap: 0 var(--sp-1); }
.lane .place { grid-area: place; text-align: right; color: var(--muted); }
.lane.ahead .place { color: var(--accent); }
.lane-name { grid-area: name; justify-self: start; max-width: 100%; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.lane-line { grid-area: line; color: var(--muted); font-size: var(--size-small); text-align: right; white-space: nowrap; }
.lane.blank .lane-track::after { opacity: .35; }
.lane-line span { display: none; }
.lane-track { grid-area: track; position: relative; display: block; overflow: hidden; height: calc(32px * var(--cell) + 8px); background: linear-gradient(var(--line), var(--line)) 0 100% / 100% 4px no-repeat; }
.lane-track::after { content: ""; position: absolute; right: 0; bottom: 0; width: 12px; height: 100%; background: conic-gradient(var(--ink) 25%, #e8ecf8 0 50%, var(--ink) 0 75%, #e8ecf8 0) 0 0 / 8px 8px; box-shadow: inset 2px 0 0 var(--ink); }
.lane-runner { position: absolute; bottom: 4px; left: calc(var(--at, 0) * (100% - 12px - 32px * var(--cell))); display: block; line-height: 0; }
.lane-runner::before { content: ""; position: absolute; right: 50%; bottom: -4px; width: 100vw; height: 4px; background: var(--gold); }
.lane .pal-canvas.c1 { --cell: inherit; position: relative; }
.lane.mine .lane-name { box-shadow: inset 0 -2px 0 var(--gold); }
/* A Pal filling a short race (fewer than five gainers) stands at the start line: no gold run behind it. */
.lane.still .lane-runner::before { display: none; }
@media (min-width: 600px) {
  .lane { grid-template-columns: 20px minmax(0, 11em) minmax(0, 1fr) 9em; grid-template-areas: "place name track line"; gap: 0 var(--sp-2); }
  .lane-line span { display: inline; }
}
/* Every board draws the same row: place, the Pal drawn from its card and idling, its name (a plain link to its page) over a line of
   details, and on the right the number it ranks by with its unit under it. The top three wear gold numbers, and a linked browser's
   own Pals a gold edge. A phone narrows the place and keeps the number beside the name with its unit under it, as Guidlands' does. */
.standings { margin: 0; padding: 0; list-style: none; }
.standing { display: grid; grid-template-columns: 20px 64px minmax(0, 1fr) auto; grid-template-areas: "place art name score" "place art meta unit"; align-items: center; gap: 0 var(--sp-1); min-height: 84px; padding: var(--sp-1) 0; border-bottom: 2px solid var(--line); }
.standing .place { grid-area: place; text-align: right; color: var(--muted); }
.standing .pic { grid-area: art; display: grid; place-items: center; }
.standing .who, .standing .score { display: contents; }
.standing .name { grid-area: name; align-self: end; min-width: 0; }
.standing .pal-name { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; overflow-wrap: anywhere; }
/* A worn name tag keeps its own art and ink. */
.standing .pal-name.tagged { display: inline-flex; align-items: center; min-height: 32px; max-width: 100%; }
.standing .meta { grid-area: meta; align-self: start; margin: 0; color: var(--muted); font-size: var(--size-small); }
.standing .score .num { grid-area: score; align-self: end; text-align: right; }
.standing .score .unit { grid-area: unit; align-self: start; text-align: right; color: var(--muted); font-size: var(--size-small); }
.standing.top .place, .standing.top .score .num { color: var(--accent); }
.standing.mine { box-shadow: inset 4px 0 0 var(--gold); }
/* The whole row opens its Pal: the name's link reaches over its row (a race lane and a line-up's Pal too), so a thumb needn't find
   an 18 px word. The name is each row's only link, so nothing else is covered. */
.standing, .lane, .wk-line > li { position: relative; }
.standing a.pal-name::after, .lane a.lane-name::after, .wk-line a.wk-name::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.standing.blank { border-bottom-color: transparent; }
@media (min-width: 600px) { .standing { grid-template-columns: 32px 64px minmax(0, 1fr) minmax(64px, auto); gap: 0 var(--sp-2); } }
/* The narrowest phones: the name takes the whole line beside the Pal, so a long one ("Zipdwipchipship") stays whole, and the number
   with its unit stands under it at the right, beside the details. */
@media (max-width: 359px) {
  .standing { grid-template-areas: "place art name name" "place art meta score" "place art meta unit"; }
  .standing .pal-name { overflow-wrap: normal; }
}
/* An empty board: a Pal of its own beside the board's line. A board that didn't answer: Try again. */
.board-state { margin: var(--sp-2) 0 0; }
.board-says { align-items: center; margin: 0; }
.board-says p, .board-down { margin: 0; }
/* Find a Pal: a slot for the name and a button, then what it found, drawn as rows at their places on the board. */
.find-pal { margin: var(--sp-3) 0 var(--sp-2); }
.find-pal h2 { margin-top: 0; }
.find-pal form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin: 0 0 var(--sp-1); }
.find-pal form label { flex-basis: 100%; }
.find-pal input { flex: 1 1 12em; max-width: 24em; }
.find-pal p { margin: 0 0 var(--sp-1); }
.find-said.says { align-items: center; margin: var(--sp-1) 0 0; }
.find-said.says p { margin: 0; }
.find-said p:empty { display: none; }

/* A Pal's page: a character sheet, after Guidlands' hero page. The Pal's name is the page's ribbon on the sheet's top edge, as on
   every page. The head: its Home scene, and beside it (under it on a phone) who it is, its level, how fresh it is, Share and a quiet
   way to the boards, then its ranks, so the column beside the scene is never empty. Then since you last looked, its stats on one
   grid, the treasure shelf and still to do. */
.pal-sheet > h1.ribbon .icon16 { vertical-align: 0; }
/* While the Pal loads, the sheet holds a screen's height, so the foot doesn't jump down as the page fills in. */
.pal-sheet[aria-busy=true] { min-height: 100vh; }
.pal-sheet[aria-busy=true] .next-step { visibility: hidden; }
.pp-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); margin-bottom: var(--sp-1); }
@media (min-width: 800px) { .pp-head { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); gap: var(--sp-3); align-items: start; } }
/* pal.js sets --s to the largest whole number at which the 96 art pixel band fits this column; these hold its place until then. */
.pp-plate { --s: 3; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; min-width: 0; }
@media (min-width: 560px) { .pp-plate { --s: 5; } }
.pp-id { min-width: 0; }
.pp-id p { margin: 0 0 var(--sp-h); }
.pp-tag .name-tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.pal-kind { color: var(--accent); font-weight: 600; }
.pp-level { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--sp-1); }
.pp-id .pp-level { margin: var(--sp-1) 0; }
.pp-level .px { color: var(--muted); }
.pp-level .num.big { color: var(--accent); line-height: 1; }
.pal-actions { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: var(--sp-1) 0 var(--sp-h); }
.pal-actions:not(:has(:not([hidden]))) { display: none; }
.pp-report .links { gap: 0 var(--sp-2); }
.pp-id .pp-report p { margin: 0; }
.pp-ranks { margin: var(--sp-2) 0 0; }
.pp-ranks h2 { margin: 0 0 var(--sp-1); font-size: var(--size-body); }
.pp-ranks .rank-row { margin: 0; }
/* The chips are one size, so two ranks never read as one big and one small: every chip in the row as tall as the tallest. */
.pp-ranks .rank-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8em), 1fr)); grid-auto-rows: 1fr; flex-basis: 100%; }
/* The Home scene, as the watch's Home draws it (HomeSceneBand.kt): the band of the visitor's hour at a whole-number scale (--s),
   the Pal on its grid with its row 30 on the band's ground row 38, the décor to its right and the touch to its left at half its scale,
   both standing on that ground. The title sits on a plate along the foot. */
.pal-home { position: relative; width: calc(96px * var(--s) + 2 * var(--u)); max-width: 100%; height: calc(44px * var(--s) + 2 * var(--u)); margin: 0 auto; overflow: hidden; border: var(--u) solid var(--ink); background: var(--band) center top / calc(96px * var(--s)) calc(44px * var(--s)) no-repeat, var(--band-far) center top / calc(192px * var(--s)) calc(44px * var(--s)) repeat-x, var(--sky); image-rendering: pixelated; }
.pal-home > * { position: absolute; }
.home-motion { inset: 0; background: var(--band-m0) center top / calc(96px * var(--s)) calc(44px * var(--s)) no-repeat; animation: band-motion 3s steps(1, end) infinite; }
.pal-home .pal-canvas { --cell: var(--s); left: calc(50% - 16px * var(--s)); top: calc(8px * var(--s)); }
.home-decor, .home-touch { width: var(--d, calc(16px * var(--s))); height: var(--d, calc(16px * var(--s))); top: calc(38px * var(--s) - var(--d, calc(16px * var(--s)))); image-rendering: pixelated; }
.home-decor { left: calc(50% + 6px * var(--s)); }
.home-touch { left: calc(50% - 22px * var(--s)); }
.home-title { left: 0; right: 0; bottom: 0; margin: 0; padding: 1px var(--sp-1); background: var(--ink); color: var(--gold-hi); font-size: var(--size-small); font-weight: 600; text-align: center; }
/* A Pal that isn't there, or a page that couldn't load: the heading on a ribbon, a line, and a way on. */
.pp-stop { max-width: 40em; margin: var(--sp-2) auto 0; }
.pp-stop .button-row { margin: var(--sp-2) 0 0; }
/* "Since you last looked": what moved since this browser's last visit, on a showcase of its own; each gain glows once where it lives. */
.since-board { margin: var(--sp-2) 0; }
.since-board h2 { margin: 0 0 var(--sp-h); }
.since-board h2::after { display: none; }
.since-board ul { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.since-board li { display: flex; align-items: center; min-height: 36px; padding: 2px var(--sp-1); background: var(--ink); color: var(--gold-hi); box-shadow: 0 0 0 2px var(--gold); font-weight: 600; }
.since-board li.down { color: #c9d0e6; box-shadow: 0 0 0 2px #5e6789; font-weight: 400; }
.pal-sheet .fresh { animation: pp-fresh 1.6s steps(8) 1; }
@keyframes pp-fresh { 50% { filter: drop-shadow(0 0 6px var(--gold)) brightness(1.15); } }
/* The ranks, one row: the best one big on its own card, the rest as chips, each a way to its board. Each sits in the shell's inset
   slot (the same window art as the shelf's label and the Field guide's strip), and goes gold under a pointer. */
.rank-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); margin: 0 0 var(--sp-2); }
.rank-best, .rank-chips a { display: flex; align-items: center; border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); color: var(--text); text-decoration: none; white-space: nowrap; }
.rank-best { gap: var(--sp-1) var(--sp-2); min-height: 64px; padding: var(--sp-h) var(--sp-2); }
.rank-best .num { font-size: var(--size-title); color: var(--accent); }
.rank-what { font-weight: 600; }
.rank-chips { display: flex; flex: 1 1 280px; flex-wrap: wrap; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.rank-chips li { display: grid; }
.rank-chips a { gap: var(--sp-1); min-height: 48px; padding: 0 var(--sp-1); font-weight: 600; }
.rank-chips a:hover, .rank-best:hover { color: var(--text); border-image-source: url("/assets/ui/slot_gold.png"); }
.rank-chips .num { color: var(--accent); }
/* Stats and records: three groups (the Pal, its games, its company), side by side from 768 px and stacked on a phone, each in an inset
   slot. Each stat is a row: its name at the left edge, its value at the right edge, and under both a bar where the number has a true
   top (a Cache Catch best out of 100%, species met out of 14). */
.pp-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
@media (min-width: 768px) { .pp-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pp-group { min-width: 0; border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(2 * var(--u)) calc(5 * var(--u)) calc(3 * var(--u)); }
.pal-stats { display: grid; margin: 0; }
.pal-stats div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 var(--sp-1); min-height: 36px; padding: var(--sp-h) 0; border-bottom: 2px dotted var(--line); }
.pal-stats div:last-child { border-bottom: 0; }
.pal-stats dt { min-width: 0; }
.pal-stats dd { margin: 0; }
.pal-stats .num { text-align: right; white-space: nowrap; }
.pal-stats .meter-cell { grid-column: 1 / -1; }
.pal-stats .meter { margin: 2px 0 var(--sp-h); }
.stats-group { margin: 0; font: 400 var(--size-small)/1.5 var(--sans); color: var(--muted); }
.friend-pals { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); margin: 0 0 var(--sp-2); padding: 0; list-style: none; }
/* The treasure shelf: everything on wooden boards, a press reading its label under it. An empty one is the Pal's word about it. */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, 76px); gap: 12px var(--sp-1); margin: 0 0 var(--sp-h); padding: var(--sp-1) var(--sp-1) var(--sp-2); list-style: none; background: repeating-linear-gradient(transparent 0 76px, #b9784a 76px 80px, #8a5232 80px 84px, #3f2214 84px 86px, transparent 86px 88px); }
.shelf li { display: grid; }
.shelf button { position: relative; display: grid; place-items: center; width: 76px; height: 76px; min-height: 0; border: 0; border-image: none; padding: 0; background: none; }
.shelf button:active { padding: 0; }
.shelf button[aria-pressed=true] { box-shadow: inset 0 0 0 3px var(--gold-hi); }
.shelf-art { width: 64px; height: 64px; image-rendering: pixelated; }
.shelf-mark { position: absolute; right: 2px; bottom: 10px; line-height: 0; }
.shelf-mark img { width: 16px; height: 16px; }
.shelf-detail { min-height: 4.6em; margin: 0 0 var(--sp-2); padding: var(--sp-1) var(--sp-2); background: var(--well); box-shadow: inset 0 0 0 2px var(--ink); }
.shelf-detail p { margin: 0 0 2px; }
.shelf-name { font-weight: 600; }
.pp-bare { margin: var(--sp-1) 0 0; }
/* Still to do, and the keeper's own panel: framed notes inside the sheet. */
.pp-todo, .pp-manage { margin: var(--sp-3) 0 0; }
.pp-todo > h2, .pp-manage > h2 { margin-top: 0; }
.pp-todo-list { margin: 0; padding-left: 24px; }
.pp-todo-list li { margin: var(--sp-h) 0; }
.pp-manage .button-row { margin: var(--sp-2) 0 var(--sp-1); }
.onward { margin: var(--sp-3) 0 0; }

/* The park stall's picture of the Supporter Pack: the pack, and a Pal wearing it, its badge by its name and confetti behind it. */
.stall-picture { display: grid; justify-items: center; gap: var(--sp-1); margin: 0 0 var(--sp-2); }
.stall-show { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-2) var(--sp-3); }
.stall-show .slot { padding: var(--sp-1); }
.stall-show .icon48 { width: 48px; height: 48px; image-rendering: pixelated; }
.stall-show .who { display: grid; justify-items: center; gap: var(--sp-h); }
.stall-show .icon16 { vertical-align: -6px; }
.stall-picture figcaption { margin: 0; text-align: center; }

@media (prefers-reduced-motion: reduce) { .home-motion, .pal-sheet .fresh { animation: none; } }
@media (forced-colors: active) {
  .board-tabs button, .shelf button, .rank-best, .rank-chips a, .shelf-detail, .pp-group { border: 2px solid CanvasText; border-image: none; background: Canvas; color: CanvasText; }
  .board-tabs button[aria-selected=true] { border-color: Highlight; color: LinkText; }
  .pal-home, .shelf { forced-color-adjust: none; }
}
/* ---- end Boards and Pal pages ---- */


/* ---- Park doors, exchange, Well and Field guide: their rules go below this line. ---- */
/* The park's front step (from Guidlands' commons.css, "the front step"): three doors, each a signboard with its own corner of the
   park in today's light, then signs of life, and the map off the page until it's opened (park/doors.js). Each door's scene is a
   crop of the park's own render (scripts/site-art/park-guide.mjs), 128 x 80 art pixels drawn at 2x, in the light that follows the
   visitor's hour like the scene behind the header: dawn in the morning, day in the afternoon, dusk in the evening, night at night. */
.park-body main > h1.ribbon.free { margin-top: calc(6 * var(--u)); }
/* Below 720 px a door is a row (its scene beside its name and line), so the doors stand one to a row: side by side they left
   the words a column 33 to 60 px wide between 450 and 719 px. From 720 px a door is a column and they stand side by side. */
.pk-doors { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-1) var(--gap); margin: 0 0 var(--gap); }
.pk-door { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--sp-2); row-gap: var(--sp-h); align-items: start; color: var(--text); text-decoration: none; cursor: url("/assets/ui/hand.png") 9 1, pointer; }
.pk-door[hidden] { display: none; }
.pk-door:hover { color: var(--text); filter: brightness(1.08); }
.pk-door:active { translate: 0 2px; }
/* On a phone each door is a window onto its scene's middle: the path the Pals walk, the stall, the Well. */
.pk-art { grid-row: 1 / -1; position: relative; display: block; width: 120px; height: 96px; overflow: hidden; border: var(--u) solid var(--ink); background: var(--ground) var(--door) var(--door-at, center bottom) / 256px 160px no-repeat; image-rendering: pixelated; }
.pk-art-exchange { --door-at: -52px -34px; }
.pk-art-well { --door-at: -100px -14px; }
.pk-art-park { --door: url("/assets/park/door_park_night.png"); }
.pk-art-exchange { --door: url("/assets/park/door_exchange_night.png"); }
.pk-art-well { --door: url("/assets/park/door_well_night.png"); }
@media (prefers-color-scheme: light) {
  .pk-art-park { --door: url("/assets/park/door_park_day.png"); }
  .pk-art-exchange { --door: url("/assets/park/door_exchange_day.png"); }
  .pk-art-well { --door: url("/assets/park/door_well_day.png"); }
}
:root[data-time="morning"] .pk-art-park { --door: url("/assets/park/door_park_dawn.png"); }
:root[data-time="morning"] .pk-art-exchange { --door: url("/assets/park/door_exchange_dawn.png"); }
:root[data-time="morning"] .pk-art-well { --door: url("/assets/park/door_well_dawn.png"); }
:root[data-time="afternoon"] .pk-art-park { --door: url("/assets/park/door_park_day.png"); }
:root[data-time="afternoon"] .pk-art-exchange { --door: url("/assets/park/door_exchange_day.png"); }
:root[data-time="afternoon"] .pk-art-well { --door: url("/assets/park/door_well_day.png"); }
:root[data-time="evening"] .pk-art-park { --door: url("/assets/park/door_park_dusk.png"); }
:root[data-time="evening"] .pk-art-exchange { --door: url("/assets/park/door_exchange_dusk.png"); }
:root[data-time="evening"] .pk-art-well { --door: url("/assets/park/door_well_dusk.png"); }
:root[data-time="night"] .pk-art-park { --door: url("/assets/park/door_park_night.png"); }
:root[data-time="night"] .pk-art-exchange { --door: url("/assets/park/door_exchange_night.png"); }
:root[data-time="night"] .pk-art-well { --door: url("/assets/park/door_well_night.png"); }
.pk-name { justify-self: start; min-height: 36px; margin: var(--sp-h) 0 0; padding: 0 var(--sp-1); }
.pk-hint { font-size: var(--size-small); }
/* The Pals on the park door's path, in the scene's own pixels: the layer is the 256 x 160 scene, centred like the art, so a phone's
   narrower window onto it shows the middle of their stroll. Each walks one pixel step at a time and turns round at the end. */
.pk-walkers { position: absolute; left: 50%; bottom: 0; width: 256px; height: 160px; translate: -50% 0; }
.pk-walk, .pk-nap { position: absolute; bottom: 4px; left: var(--x0, 112px); line-height: 0; }
.pk-walk { animation: pk-stroll var(--t, 16s) infinite var(--d, 0s); }
.pk-walk.w1 { --x0: 18px; --far: 80px; --t: 15s; }
.pk-walk.w2 { --x0: 132px; --far: -64px; --t: 18s; --d: -6s; bottom: 12px; }
.pk-walk.w3 { --x0: 206px; --far: -96px; --t: 21s; --d: -11s; }
@keyframes pk-stroll {
  0% { transform: translateX(0); animation-timing-function: steps(40, end); }
  40% { transform: translateX(var(--far)); animation-timing-function: steps(1, end); }
  50% { transform: translateX(var(--far)) scaleX(-1); animation-timing-function: steps(40, end); }
  90% { transform: translateX(0) scaleX(-1); animation-timing-function: steps(1, end); }
  100% { transform: translateX(0); }
}
@media (min-width: 720px) {
  .pk-doors { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
  /* Three columns from the first paint, so the first door doesn't jump when the other two open. */
  .pk-doors:not(.settled) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pk-door { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; justify-items: center; row-gap: var(--sp-1); text-align: center; }
  .pk-art { grid-row: auto; width: min(100%, 256px); height: 160px; --door-at: center bottom; }
  .pk-name { justify-self: center; margin: 0; padding: 0 var(--sp-2); }
}
/* Signs of life: who's about, the Well's goal and what's moving at the exchange, each a note on one window. */
.pk-life { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--gap); }
.pk-life[hidden], .pk-card[hidden] { display: none; }
.pk-card { display: block; min-width: 0; color: var(--text); text-decoration: none; }
a.pk-card:hover { color: var(--text); }
a.pk-card:hover .pk-strong { text-decoration: underline; }
.pk-card h3 { margin: 0 0 var(--sp-h); color: var(--accent); }
.pk-card p { margin: 0 0 var(--sp-h); }
.pk-card .meter { margin: var(--sp-1) 0 var(--sp-h); }
.pk-strong { font-weight: 600; }
.pk-wares { display: grid; gap: var(--sp-h); }
.pk-ware { display: flex; align-items: center; gap: var(--sp-1); min-height: 32px; }
/* The map, once opened: its parts keep park/park.css; the status line under the title is a small signboard. */
.pk-map { margin-top: 0; }
.pk-map > .park-who { margin: 0; }
.park-body main > .reading.park-how { margin-top: calc(14 * var(--u)); }
/* Things in item slots: a 16 px icon at a whole-number scale, or an empty slot where there's no picture. */
.thing-slot { padding: var(--u); line-height: 0; }
.thing-art { display: block; image-rendering: pixelated; }
@media (prefers-reduced-motion: reduce) { .pk-walk { animation: none; } }
@media (forced-colors: active) { .pk-art { forced-color-adjust: none; border-color: CanvasText; } }

/* The exchange (park/exchange/exchange.js), from Guidlands' "The Haggle House" block: a stall in a reading window. A linked keeper's
   wallet as slots, the tabs, then the screen: a board of prices as cards, rows of things on offer with their numbers, or one thing
   with its going price, the two sides of its book, a try-on and its last 30 days. Every card, row, level and offer is a dark well
   with an ink rim; each thing's icon sits in an item slot; prices are pixel numbers beside a crumb. The offer form is an inset note. */
.ex-stall { display: grid; gap: var(--sp-2); }
.ex-stall > * { min-width: 0; }
.ex-stall h2, .ex-stall h3 { margin-top: 0; }
.ex-stall h2 { font-size: var(--size-body); }
.ex-keeper { align-items: center; }
.ex-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); }
.ex-link { margin: 0; font-weight: 600; }
.ex-wallet { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--sp-1); width: 100%; margin: 0; padding: 0; list-style: none; }
.ex-wallet li { display: flex; align-items: center; gap: var(--sp-1); min-height: 40px; padding: var(--sp-h) var(--sp-1); background: var(--well); box-shadow: inset 0 0 0 2px var(--ink); font-weight: 600; }
.ex-fee { width: 100%; margin: 0; }
.ex-tabs { display: flex; flex-wrap: nowrap; gap: var(--sp-1); }
.ex-tabs button { flex: none; }
/* The tabs and the filters are each one row. Where a row can't fit it scrolls sideways, and the side with more to see fades, as the
   Boards' pick strip does (exchange.js strip()). The padding keeps a focus ring inside the row's clip. */
.ex-strip-row { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: -4px; padding: 4px; }
.ex-strip-row::-webkit-scrollbar { display: none; }
.ex-strip-row.more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent calc(100% - 8px)); mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent calc(100% - 8px)); }
.ex-strip-row.more-left { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 64px), transparent calc(100% - 8px)); mask-image: linear-gradient(270deg, #000 calc(100% - 64px), transparent calc(100% - 8px)); }
.ex-strip-row.more-left.more-right { -webkit-mask-image: linear-gradient(90deg, transparent 8px, #000 64px, #000 calc(100% - 64px), transparent calc(100% - 8px)); mask-image: linear-gradient(90deg, transparent 8px, #000 64px, #000 calc(100% - 64px), transparent calc(100% - 8px)); }
/* On a phone the tabs are smaller buttons, still a full step bigger than the thin-rimmed filters under them. */
@media (max-width: 559px) { .ex-tabs { gap: var(--sp-h); } .ex-tabs button { padding: 0 var(--sp-h); } }
.ex-about { margin: 0 0 var(--sp-1); }
.ex-about p { margin: 0 0 var(--sp-1); }
.ex-tabs button[aria-selected="true"] { border-image-source: url("/assets/ui/btn_primary.png"); color: var(--on-primary); }
.ex-filter { display: flex; flex-wrap: nowrap; gap: var(--sp-h) var(--sp-1); margin: -4px -4px var(--sp-1); }
/* The filters are smaller picks than the tabs above them (a thin rim, a shorter button), as the Boards' picks are; the chosen one is mint. */
.ex-filter .pick { --u: 1px; flex: none; min-height: 44px; padding: 0 var(--sp-1); }
/* The filters wrap onto more rows, each pick whole, rather than scroll. Below 480 px the tabs stand two by two in equal halves and
   every tab and pick is a full 44 px. Neither row overflows, so strip() never sets a side fade. */
.ex-filter.ex-strip-row { flex-wrap: wrap; overflow-x: visible; }
@media (max-width: 479px) {
  .ex-tabs.ex-strip-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-x: visible; }
  .ex-tabs button { min-width: 0; min-height: 44px; }
  .ex-filter .pick { min-width: 44px; min-height: 44px; }
}
.ex-wait { color: var(--muted); }
.ex-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: var(--sp-1); margin: 0 0 var(--sp-2); padding: 0; list-style: none; }
.ex-rows, .ex-offers { display: grid; gap: var(--sp-1); margin: 0 0 var(--sp-2); padding: 0; list-style: none; }
.ex-card, .ex-row, .ex-offer { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-1) var(--sp-2); height: 100%; padding: var(--sp-1); background: var(--well); box-shadow: inset 0 0 0 2px var(--ink); color: var(--text); text-decoration: none; }
.ex-card:hover, .ex-row:hover { color: var(--text); box-shadow: inset 0 0 0 2px var(--gold); }
.ex-name { display: grid; gap: 2px; min-width: 0; }
.ex-name strong { overflow-wrap: anywhere; }
.ex-from { display: inline-flex; align-items: center; gap: var(--sp-h); color: var(--muted); font-size: var(--size-small); }
.ex-pair:hover { box-shadow: inset 0 0 0 2px var(--ink); }
/* A price on a card: the crumb first, in the same place on every card, then how many sold. */
.ex-price { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-h) var(--sp-1); min-height: 36px; }
.ex-sold { color: var(--muted); }
/* A Well and Pond pair at one price: the price once, then a small link to each one's own page, each with its mark. */
.ex-where { display: flex; flex-wrap: wrap; gap: var(--sp-h); margin-left: auto; }
/* The board's cards are wide enough for a pair's price and both links on one line, so a pair is as tall as a single card where they
   sit side by side. In one column each card is only as tall as what it holds. */
.ex-prices .ex-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ex-origins { display: grid; gap: var(--sp-h); margin: 0; padding: 0; list-style: none; }
.ex-origin { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-h); min-height: 44px; padding: 0 var(--sp-1) 0 2px; background: var(--fill); box-shadow: inset 0 0 0 2px var(--line); color: var(--text); font-size: var(--size-small); font-weight: 600; text-decoration: none; }
.ex-origin:hover, .ex-origin:focus-visible { color: var(--text); box-shadow: inset 0 0 0 2px var(--gold); }
.ex-origin-row { display: flex; padding-left: var(--sp-h); }
.ex-origin-row .ex-crumbs { min-width: 5.5em; }
.ex-origin-row .ex-sold { flex-basis: 100%; padding-left: calc(32px + var(--sp-h)); font-weight: 400; }
.ex-failed { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); }
.ex-failed p { margin: 0; }
.ex-crumbs { display: inline-flex; align-items: center; gap: var(--sp-h); }
.ex-crumbs .num { color: var(--accent); font-size: var(--size-label); line-height: 1; }
.ex-crumb, .ex-stall .ex-mark { flex: none; width: 32px; height: 32px; image-rendering: pixelated; }
.ex-nums { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-1); margin: 0; }
.ex-nums div { display: grid; align-content: start; gap: var(--sp-h); }
.ex-nums dt { color: var(--muted); font-size: var(--size-small); }
.ex-nums dd { margin: 0; }
.ex-none { color: var(--muted); font-size: var(--size-small); }
@media (min-width: 720px) { .ex-row { grid-template-columns: auto minmax(0, 1fr) minmax(0, 22em); } .ex-nums { grid-column: auto; } }
.ex-id { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); margin: 0 0 var(--sp-2); }
.ex-id h2 { margin: 0 0 var(--sp-h); color: var(--text); }
@media (max-width: 559px) { .ex-id { display: grid; grid-template-columns: auto minmax(0, 1fr); } .ex-id .ex-back { grid-column: 1 / -1; justify-self: start; } }
.ex-id h2::after { display: none; }
.ex-id p { margin: 0; }
.ex-id { scroll-margin-top: var(--sp-2); }
.ex-tag .ex-from { color: var(--text); font-weight: 600; }
.ex-back { margin-right: var(--sp-1); }
.ex-stall [tabindex="-1"]:focus { outline: none; }
.ex-going p { margin: 0 0 var(--sp-h); }
.ex-price-now { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-h) var(--sp-1); font-weight: 600; }
.ex-price-now .num { font-size: var(--size-title); }
.ex-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); margin: 0 0 var(--sp-2); }
.ex-acts p { margin: 0; }
.ex-book { display: grid; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
@media (min-width: 560px) { .ex-book { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ex-side p { margin: 0; }
.ex-levels { background: var(--well); box-shadow: inset 0 0 0 2px var(--ink); }
.ex-levels th, .ex-levels td { padding: var(--sp-h) var(--sp-1); vertical-align: middle; }
.ex-levels td:last-child { text-align: right; }
.ex-levels tr:last-child td { border-bottom: 0; }
.ex-try { margin: 0 0 var(--sp-2); }
.ex-try-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-1); }
.ex-try figure { display: grid; justify-items: center; gap: var(--sp-h); margin: 0; }
.ex-try p { margin: 0; }
.ex-chart { margin: 0 0 var(--sp-2); }
.ex-plot { padding: var(--sp-1); background: var(--well); box-shadow: inset 0 0 0 2px var(--ink); }
.ex-plot svg { display: block; width: 100%; height: calc(32 * var(--u)); }
.ex-chart figcaption { padding-top: var(--sp-1); }
.ex-bar { fill: var(--accent); }
.ex-base { fill: var(--line); }
.ex-offer { grid-template-columns: auto minmax(0, 1fr) auto; }
.ex-offer > div { display: grid; min-width: 0; }
.ex-offer .ex-acts { margin: 0; }
.ex-offer-name { font-weight: 600; }
@media (max-width: 479px) { .ex-offer { grid-template-columns: auto minmax(0, 1fr); } .ex-offer > :nth-child(3) { grid-column: 1 / -1; justify-self: start; } }
.ex-form { display: grid; gap: var(--sp-1); margin: 0 0 var(--sp-2); }
.ex-form > * { margin: 0; }
.ex-field { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); }
.ex-field label { min-width: 6.5em; font-weight: 600; }
.ex-stall input[type="number"] { width: 7em; }
.ex-nudge { min-width: 44px; }
.ex-preview { font-size: var(--size-sub); font-weight: 600; }
.ex-pct { color: var(--muted); }
.ex-closed { font-weight: 600; }
.ex-swapfilter { max-width: 32em; }
.ex-more { display: flex; justify-content: center; margin: 0 0 var(--sp-2); }
/* By day the cards, rows and boxes are the site's inset window (the slot art), not a paper box with an ink line; gold on hover. */
@media (prefers-color-scheme: light) {
  .ex-card, .ex-row, .ex-offer, .ex-wallet li, .ex-plot, .ex-levels { border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); background: none; box-shadow: none; }
  .ex-levels { border-collapse: separate; border-spacing: 0; }
  .ex-card:hover, .ex-row:hover { border-image-source: url("/assets/ui/slot_gold.png"); box-shadow: none; }
  .ex-pair:hover { border-image-source: var(--slot); }
}
/* The Well (park/well/well.js), from Guidlands' Well page: the goal in a dark well beside the Well itself, in the same light as the
   park's doors, its meter in gold and its numbers in pixel type; then the toss (or the way to link), the latest finds as a grid of
   slotted things, the odds beside the Pond's, and what goes in. A label never repeats the heading above it. */
.wl-body > section { margin: 0 0 var(--sp-3); }
.wl-body h2 { margin-top: 0; }
.wl-goal { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-2) var(--sp-3); align-items: center; margin: 0 0 var(--sp-2); padding: var(--sp-2); background: var(--well); box-shadow: inset 0 0 0 2px var(--ink); }
.wl-art { display: block; width: 96px; height: 96px; background: var(--wl-art) 0 0 / 100% 100% no-repeat; image-rendering: pixelated; --wl-art: url("/assets/park/well_night.png"); }
@media (prefers-color-scheme: light) { .wl-art { --wl-art: url("/assets/park/well_day.png"); } }
:root[data-time="morning"] .wl-art { --wl-art: url("/assets/park/well_dawn.png"); }
:root[data-time="afternoon"] .wl-art { --wl-art: url("/assets/park/well_day.png"); }
:root[data-time="evening"] .wl-art { --wl-art: url("/assets/park/well_dusk.png"); }
:root[data-time="night"] .wl-art { --wl-art: url("/assets/park/well_night.png"); }
@media (min-width: 720px) { .wl-art { width: 128px; height: 128px; } }
.wl-words h2 { margin: 0 0 var(--sp-1); color: var(--accent); }
.wl-words h2::after { display: none; }
.wl-meter { height: calc(9 * var(--u)); margin: 0 0 var(--sp-h); }
.wl-count { margin: 0 0 var(--sp-1); font-weight: 600; }
.wl-count .num { color: var(--accent); font-size: var(--size-label); }
.wl-line { display: flex; align-items: center; gap: var(--sp-1); margin: 0 0 var(--sp-h); }
.wl-done h3 { margin: 0 0 var(--sp-h); color: var(--muted); }
.wl-done ul { display: flex; flex-wrap: wrap; gap: var(--sp-h) var(--sp-2); margin: 0; padding: 0; list-style: none; }
.wl-done li { display: flex; align-items: center; gap: var(--sp-h); font-weight: 600; }
.wl-door { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-1) var(--sp-2); }
.wl-door p { flex: 1 1 14em; margin: 0; font-weight: 600; }
.wl-said:empty { display: none; }
.wl-findlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.wl-findlist li { display: flex; align-items: center; gap: var(--sp-1); padding: var(--sp-1); background: var(--well); box-shadow: inset 0 0 0 2px var(--ink); }
.wl-find { display: grid; min-width: 0; }
.wl-odds table { margin: 0 0 var(--sp-1); }
.wl-odds td.num { text-align: right; }
.wl-odds thead th { text-align: right; }
.wl-odds th[scope="row"] { color: var(--text); font-size: var(--size-body); font-weight: 400; }
.wl-pond p { margin: 0; }
.wish-out li.found { display: flex; align-items: center; gap: var(--sp-1); }
@media (max-width: 480px) { .wl-goal { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } .wl-line { justify-content: center; text-align: left; } }
/* The Field guide (pals/guide.js and pals/tryon.js), from Guidlands' field guide: its parts, "The bestiary" and its web-guide
   block. One part at a time under the part buttons. The Pals are an open book: a strip of the fourteen in item slots, then the
   illustrated book with a page each side from 1140 px, and one inner panel below that. Care, Cache Catch and Looks are each a
   run of windows. */
.fg-author { display: flow-root; margin: 0 0 var(--sp-2); }
.fg-author > .pal { float: left; margin: 0 var(--sp-2) var(--sp-h) 0; }
.fg-author .lead { margin: 0; }
.fg-parts { display: grid; grid-template-columns: repeat(4, minmax(0, max-content)); justify-content: center; gap: var(--sp-1); margin: var(--sp-2) 0; }
@media (max-width: 479px) { .fg-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fg-parts a[aria-current] { border-image-source: url("/assets/ui/btn_primary.png"); color: var(--on-primary); }
/* Without the script, the part an address names shows too. */
.fg-part:not(.open):not(:target) { display: none; }
.fg-part, .fg-parts, .fg-strip { scroll-margin-top: var(--sp-2); }
.fg-run > .sheet { margin: calc(12 * var(--u)) auto calc(10 * var(--u)); }
.fg-share { margin: var(--sp-2) 0 0; text-align: center; }
.fg-kept, .fg-noscript { margin: 0 0 var(--sp-2); font-weight: 600; text-align: center; text-wrap: balance; }
/* While the script loads, the book and the try-on hold about the room they will take, so nothing under them jumps when they
   draw; and an address naming another part doesn't flash the Pals first. Without the script none of this applies. */
@media (scripting: enabled) {
  main:has(.fg-part:target:not(#species)) #species:not(:target) { display: none; }
  .fg-browse[hidden], #try-box[hidden] { display: block !important; visibility: hidden; }
  .fg-browse[hidden] > * { display: none; }
  .fg-browse[hidden] { min-height: 1150px; }
  .fg-try:empty, .fg-try:has(> .fg-try-wait) { min-height: 860px; }
}
@media (scripting: enabled) and (min-width: 560px) { .fg-browse[hidden] { min-height: 950px; } .fg-try:empty, .fg-try:has(> .fg-try-wait) { min-height: 630px; } }
@media (scripting: enabled) and (min-width: 1000px) { .fg-try:empty, .fg-try:has(> .fg-try-wait) { min-height: 470px; } }
@media (scripting: enabled) and (min-width: 1140px) { .fg-browse[hidden] { min-height: 867px; } }

/* The strip: each species in an item slot, the open one gold; a linked keeper's other species dimmed. On a phone it is one row
   that scrolls sideways, faded at its edge so a cut slot reads as "more this way". */
.fg-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-h); margin: 0 0 var(--sp-2); }
.fg-strip .fg-mark { min-width: 0; min-height: 0; border-width: calc(2 * var(--u)); border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: 0; color: var(--text); }
.fg-strip .fg-mark.gold, .fg-strip .fg-mark.gold:active { border-image-source: url("/assets/ui/slot_gold.png"); }
.fg-strip .fg-mark:active { border-image-source: var(--slot); padding: 0; }
.fg-strip .fg-mark.unkept .pal { opacity: .5; filter: grayscale(1); }
@media (max-width: 639px) {
  .fg-strip { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin-inline: calc(-1 * var(--sp-1)); padding: var(--sp-h) var(--sp-3) var(--sp-h) var(--sp-1); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .fg-strip::-webkit-scrollbar { display: none; }
  .fg-strip > * { flex: none; }
}
/* Between a phone and the open book the fourteen stand in two even rows of seven, never eleven and three. */
@media (min-width: 640px) and (max-width: 1139px) { .fg-strip { display: grid; grid-template-columns: repeat(7, max-content); } }

/* The book, as Guidlands' bestiary. Below 1140 px it is one of the site's own inner panels (slate by night, paper by day), the
   species' picture and name heading it and the right page's words running on under them as one entry. */
.fg-book { position: relative; border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(3 * var(--u)) calc(5 * var(--u)); scroll-margin-top: var(--sp-2); }
.fg-leaf { display: none; }
.fg-page { min-width: 0; }
.fg-page > :last-child { margin-bottom: 0; }
.fg-page.left { text-align: center; }
.fg-page + .fg-page { margin-top: var(--sp-2); }
.fg-pose { display: grid; place-items: center; min-height: 140px; }
.fg-pose .slot { padding: 0; }
.fg-page h2 { margin: var(--sp-1) 0 var(--sp-h); color: var(--text); }
.fg-page h2::after { display: none; }
.fg-yours { display: inline-block; margin: 0 0 var(--sp-1); border: 2px solid var(--gold-lo); padding: 1px var(--sp-1); background: var(--ink); color: var(--gold-hi); }
.fg-kind { margin: 0 0 var(--sp-1); font-size: var(--size-sub); font-weight: 600; }
.fg-temper { margin: 0; color: var(--muted); }
.fg-page h3 { margin: var(--sp-2) 0 var(--sp-1); color: var(--accent); }
.fg-page.right h3:first-child { margin-top: 0; }
.fg-page.right { container-type: inline-size; }
/* Growing up: four across where four 64 px stages fit, otherwise two by two, never three and a straggler. */
.fg-stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1) var(--sp-h); margin: 0 0 var(--sp-1); padding: 0; list-style: none; }
@container (min-width: 268px) { .fg-stages { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fg-stages figure { display: grid; justify-items: center; align-content: end; gap: var(--sp-h); height: 100%; margin: 0; color: var(--muted); }
.fg-facts { margin: 0; padding: 0; list-style: none; }
.fg-facts li { padding: var(--sp-h) 0; border-bottom: 2px dotted var(--line); }
.fg-facts li:last-child { border-bottom: 0; }
.fg-nature { margin: 0; font-weight: 600; }
/* From 768 px until the open book, the entry is two columns: the pose, name, kind and temper on the left; Growing up, its needs and
   its nature on the right, the four stages grouped at their own size. */
@media (min-width: 768px) and (max-width: 1139px) {
  .fg-book { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; column-gap: var(--sp-3); }
  .fg-page + .fg-page { margin-top: 0; padding-left: var(--sp-3); border-left: 2px dotted var(--line); }
  .fg-stages { grid-template-columns: repeat(4, max-content); justify-content: start; gap: var(--sp-1) var(--sp-2); }
}
.fg-nav { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--sp-1); margin: var(--sp-2) 0 0; }
.fg-where { grid-column: 1 / -1; order: -1; margin: 0; font-weight: 600; text-align: center; }
@media (min-width: 560px) { .fg-nav { display: flex; flex-wrap: wrap; justify-content: center; } .fg-where { order: 0; min-width: 8em; } }
/* On a narrow phone both page buttons keep their words on one line, at one height: less padding at the sides, never a wrap. */
@media (max-width: 559px) { .fg-nav button { min-width: 0; padding-inline: 2px; white-space: nowrap; } }
/* The open book from 1140 px: Guidlands' illustrated book in Cache Pal's colours (assets/guide/open-book.png, eight 256 x 176 frames
   of a page turning, by site-art/guide.mjs) at 4x, --b to one art pixel. Each page's words sit in its paper exactly where
   Guidlands puts them: 34 art pixels down, 82 wide and 116 tall, the left page 30 in and the right 144. The paper keeps its own
   colours by day and night, so the words on it take the day inks. A page turn plays the strip's seven steps. */
@media (min-width: 1140px) {
  .fg-book { --b: 4px; --text: #2a2233; --muted: #544a5e; --accent: #6b4314; --link: #0e5540; --link-hover: #0e3b2c; --line: #c9a97e; --well: #fff1da; --slot: url("/assets/ui/slot_day.png"); --slot-fill: #fff1da;
    width: calc(256 * var(--b)); height: calc(176 * var(--b)); margin: 0 auto; border: 0; border-image: none; padding: 0; color: var(--text); }
  .fg-leaf { display: block; position: absolute; inset: 0; background: url("/assets/guide/open-book.png") 0 0 / calc(2048 * var(--b)) calc(176 * var(--b)) no-repeat; image-rendering: pixelated; }
  .fg-book.turning .fg-leaf { animation: fg-turn 480ms steps(7, jump-none) forwards; }
  .fg-book.turning.back .fg-leaf { animation-direction: reverse; }
  .fg-book.turning .fg-page > * { visibility: hidden; }
  .fg-page { position: absolute; top: calc(34 * var(--b)); width: calc(82 * var(--b)); height: calc(116 * var(--b)); overflow: hidden; font-size: var(--size-small); }
  .fg-page + .fg-page { margin: 0; }
  .fg-page.left { left: calc(30 * var(--b)); }
  .fg-page.right { left: calc(144 * var(--b)); }
  .fg-pose { min-height: 176px; }
  .fg-page h2 { margin-top: var(--sp-h); }
  .fg-yours, .fg-kind { margin-bottom: var(--sp-h); }
  .fg-kind { font-size: var(--size-body); }
  .fg-page h3 { margin: var(--sp-1) 0 var(--sp-h); }
  .fg-stages { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-h); margin: 0; }
  .fg-facts li { padding: 2px 0; }
}
/* By day the book lies on a window of nearly its own paper colour, so (as Guidlands does) its whole outline is drawn once more in
   the art's own darkest lilac, with a soft step of shadow under it. */
@media (min-width: 1140px) and (prefers-color-scheme: light) {
  .fg-leaf { filter: drop-shadow(var(--b) 0 0 #36285c) drop-shadow(calc(-1 * var(--b)) 0 0 #36285c) drop-shadow(0 var(--b) 0 #36285c) drop-shadow(0 calc(-1 * var(--b)) 0 #36285c) drop-shadow(0 calc(2 * var(--b)) 0 rgba(54, 40, 92, .3)); }
}
@keyframes fg-turn { to { background-position: calc(-1792 * var(--b)) 0; } }

/* Care and Cache Catch: windows of cards, three across on a wide screen and one on a phone. */
.fg-cards, .fg-features { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .fg-cards, .fg-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .fg-cards, .fg-features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Four facts stand in one row on a wide screen rather than three and a straggler. */
@media (min-width: 1000px) { .fg-features:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fg-cards h3, .fg-features h3 { margin: 0 0 var(--sp-h); }
.fg-cards p { margin: 0 0 var(--sp-1); }
.fg-cards p:last-child { margin: 0; }
.fg-rate { color: var(--accent); font-weight: 600; }
.fg-art { display: flex; align-items: flex-end; gap: var(--sp-1); min-height: 64px; margin: 0 0 var(--sp-1); }
.fg-round { display: grid; gap: var(--sp-2); }
@media (min-width: 900px) { .fg-round { grid-template-columns: minmax(0, 1fr) 220px; align-items: start; } }
/* Beside a watch picture the cards go by the room their own column has, never by the screen's width: the three scores stand in a
   row only where each gets 150 px; the house rules are a list, one rule to a row with its art beside its words from 420 px, and
   three cards in a row from 840 px (as Care's cards are). So no card is ever narrower than its longest word, at any width. */
.fg-round > :first-child { container-type: inline-size; min-width: 0; }
.fg-scores { grid-template-columns: minmax(0, 1fr); }
@container (min-width: 500px) { .fg-scores { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fg-rules { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.fg-rules > li { border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(3 * var(--u)) calc(5 * var(--u)); }
.fg-rules h3 { margin: 0 0 var(--sp-h); }
.fg-rules p { margin: 0; }
.fg-rules .fg-art { justify-content: center; }
@container (min-width: 420px) and (max-width: 839px) {
  .fg-rules > li { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-content: center; column-gap: var(--sp-2); }
  .fg-rules .fg-art { grid-row: 1 / span 2; align-self: center; margin: 0; }
}
@container (min-width: 840px) {
  .fg-rules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fg-rules .fg-art { justify-content: flex-start; }
}
.fg-score { margin: 0 0 var(--sp-h); }
.fg-score .num { color: var(--accent); }
.fg-go { margin: 0; }
.fg-shot { justify-self: center; width: min(100%, 220px); margin: 0; }
.fg-shot.tall { width: min(100%, 190px); }
.fg-shot img { display: block; width: 100%; height: auto; image-rendering: auto; }
.fg-shot .caption p { justify-content: center; }

/* Looks: the colorways, each in a slot over its name and rarity; then the try-on, a Home scene beside rows of picks. */
.fg-colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-1); max-width: 720px; margin: 0 auto; padding: 0; list-style: none; }
.fg-colors li { display: grid; justify-items: center; gap: var(--sp-h); text-align: center; }
.fg-colors .slot { padding: 0; }
/* The night slot in the light setting too, so the pale colorways (the Legendary ones) stand out; the names under them keep the paper's ink. */
@media (prefers-color-scheme: light) { .fg-colors .slot { border-image-source: url("/assets/ui/slot_night.png"); } }
.fg-colors span:last-child { color: var(--muted); }
@media (max-width: 559px) { .fg-colors .pal { --cell: 2; } }
/* From 1100 px the nine colorways stand in one row across the window. */
@media (min-width: 1100px) { .fg-colors { grid-template-columns: repeat(9, minmax(0, 1fr)); max-width: none; } }
.fg-try { display: grid; gap: var(--sp-2); }
@media (min-width: 800px) { .fg-try { grid-template-columns: auto minmax(0, 1fr); align-items: start; } }
.fg-try-wait { margin: 0; color: var(--muted); }
.fg-try-stage { display: grid; justify-items: center; gap: var(--sp-1); min-width: 0; }
/* The scene and, straight under it, the one status line: what is picked and where it comes from. Beside the picks it is only as wide
   as the scene (width 0, min-width 100%), so a long line wraps rather than widening the column. */
.fg-try-top { display: grid; justify-items: center; gap: var(--sp-1); min-width: 0; }
.fg-try-plate { margin: 0; justify-self: center; }
.fg-try-intro { margin: 0 0 var(--sp-2); }
.fg-try-said { width: 0; min-width: 100%; margin: 0; font-weight: 600; text-align: center; }
/* What the scene tries on besides the outfit, large in slots, since a big Pal stands in front of both (as on the watch). */
/* The Wearing row never sets the stage column's width (it would squeeze the picks beside it to nothing): it wraps inside it. */
.fg-try-worn { display: grid; justify-items: center; gap: var(--sp-h); width: 0; min-width: 100%; }
.fg-try-worn:empty { display: none; }
.fg-try-label { margin: 0; font-weight: 600; }
.fg-try-wearing { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-1) var(--sp-2); margin: 0; padding: 0; list-style: none; }
.fg-try-wearing li { display: grid; justify-items: center; gap: var(--sp-h); max-width: 128px; text-align: center; }
.fg-try-wearing .slot { padding: 0; }
.fg-try-wearing img { display: block; image-rendering: pixelated; }
.fg-try-strip { display: block; width: 64px; height: 64px; overflow: hidden; }
.fg-try-strip img { max-width: none; }
/* On a wide screen (a phone on its side too) the scene stands beside the picks and nothing sticks. Below 800 px the column opens up
   (.fg-try-stage lets its parts into the one column), and on a screen held upright only the scene and its status line stay at the top
   while the picks scroll: at most about 40% of the screen (the scene drops to 2x under 400 px, and the line to the small size). The
   name tag and what it is wearing stay in the page under them. */
@media (max-width: 799px) {
  .fg-try-stage { display: contents; }
  .fg-try-said { font-size: var(--size-small); }
}
@media (max-width: 799px) and (min-height: 560px) {
  .fg-try-top { position: sticky; top: 0; z-index: 2; padding: var(--sp-1) 0; background: var(--fill); box-shadow: 0 var(--u) 0 var(--line); }
}
/* The name on its tag is shown whole here (the shared tag cuts at 16 characters for lists). */
.fg-try-plate .name-tag { max-width: none; }
.fg-try-side fieldset { min-width: 0; margin: 0 0 var(--sp-2); padding: 0; border: 0; }
.fg-try-side legend { margin: 0 0 var(--sp-1); padding: 0; font-weight: 600; }
.fg-picks { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.fg-home { --s: 2; position: relative; width: calc(96px * var(--s) + 2 * var(--u)); max-width: 100%; height: calc(44px * var(--s) + 2 * var(--u)); overflow: hidden; border: var(--u) solid var(--ink); background: var(--band) center top / calc(96px * var(--s)) calc(44px * var(--s)) no-repeat, var(--band-far) center top / calc(192px * var(--s)) calc(44px * var(--s)) repeat-x, var(--sky); image-rendering: pixelated; }
/* The try-on's scene: 2x under 360 px, 3x from 360, 4x from 481 (beside the picks from 800 px, the picks keep at least 300 px). */
@media (min-width: 360px) { .fg-home { --s: 3; } }
@media (min-width: 481px) { .fg-home { --s: 4; } }
.fg-home > * { position: absolute; }
.fg-home-motion { inset: 0; background: var(--band-m0) center top / calc(96px * var(--s)) calc(44px * var(--s)) no-repeat; animation: band-motion 3s steps(1, end) infinite; }
.fg-home .pal-canvas { --cell: var(--s); left: calc(50% - 16px * var(--s)); top: calc(8px * var(--s)); }
/* The décor is 32 px art: drawn at 1x while the scene is 2x or 3x and at 2x from 4x, so it is never scaled by half a pixel. */
.fg-home-decor { --d: 32px; top: calc(38px * var(--s) - var(--d)); left: calc(50% + 6px * var(--s)); width: var(--d); height: var(--d); image-rendering: pixelated; }
@media (min-width: 481px) { .fg-home-decor { --d: 64px; } }
@media (prefers-reduced-motion: reduce) { .fg-book.turning .fg-leaf, .fg-home-motion { animation: none; } }
@media (forced-colors: active) { .fg-book { border-image: none; border: 2px solid CanvasText; } .fg-leaf, .fg-home { forced-color-adjust: none; } }
/* ---- end Park and Field guide ---- */

/* ---- Field guide: chapters (/chapters/, chapters/chapters.js): its rules go below this line. ---- */
/* The Field guide's part buttons are five now (the four parts and the Chapters page), so this overrides the Field guide's two
   .fg-parts column rules: one row where five fit, and on a phone three over two, so no button stands alone. */
.fg-parts { grid-template-columns: repeat(5, minmax(0, max-content)); }
@media (max-width: 599px) {
  .fg-parts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .fg-parts > a { grid-column: span 2; }
  .fg-parts > a:nth-child(n + 4) { grid-column: span 3; }
}
/* The page: the head window, then one window per chapter (Guidlands' chapter tracks, as two labelled rows), then How points work. */
.fg-ch-top { margin-bottom: 0; }
.fg-ch-root > .sheet { margin: calc(12 * var(--u)) auto calc(10 * var(--u)); }
.fg-ch-wait { margin: var(--sp-3) 0; text-align: center; font-weight: 600; }
.fg-ch-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-1); margin: var(--sp-3) 0 var(--sp-2); }
.fg-ch-chips { margin: 0 0 var(--sp-1); }
.fg-ch-line { margin: 0 0 var(--sp-h); font-size: var(--size-sub); }
.fg-ch-meta { margin: 0 0 var(--sp-2); }
.fg-ch-slide { margin: 0 0 var(--sp-1); text-align: right; }
.fg-ch-plays { margin: 0 0 var(--sp-2); padding-left: 1.25em; }
.fg-ch-plays li + li { margin-top: var(--sp-h); }
.fg-ch-never { margin: 0; }
/* Under 720 px a chapter folds to its name, line and size over a Show the track button (chapters.js setOpen); the one open at first
   is the address's chapter, else the keeper's own, else the first. From 720 px every track shows and the button isn't drawn. */
.fg-ch-fold { margin: 0 0 var(--sp-2); }
@media (max-width: 719px) {
  .fg-ch.folded .fg-ch-body { display: none; }
  .fg-ch.folded .fg-ch-fold { margin-bottom: 0; }
}
@media (min-width: 720px) { .fg-ch-fold { display: none; } }
/* A linked keeper's chapter: where it is, and the next reward large in a gold slot. */
.fg-ch-next { display: flex; align-items: center; gap: var(--sp-2); }
.fg-ch-next p { margin: 0; }
.fg-ch-next .slot { --slot-size: 88; }
/* The track. On a phone (and anywhere under 720 px) each step is a card, its rewards in a row per track, each row led by its label
   in words (Free, Pass): the watch's own chapter detail. A step with nothing on a track has no row for it. */
.fg-ch-track { display: grid; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.fg-ch-heads { display: none; }
.fg-ch-step { margin: 0; padding: var(--sp-1) var(--sp-2); background: var(--well); box-shadow: inset 0 0 0 2px var(--line); }
.fg-ch-step.got { box-shadow: inset 0 0 0 2px var(--good); }
.fg-ch-at { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--sp-1); margin: 0 0 var(--sp-h); }
.fg-ch-at .small { color: var(--muted); }
.fg-ch-at .fg-ch-got { color: var(--good); font-weight: 600; }
.fg-ch-row { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); align-items: center; gap: var(--sp-1); padding: var(--sp-h) 0; }
/* On the narrowest phones a row's label stands over its rewards, so a long name keeps its words whole. */
@media (max-width: 379px) { .fg-ch-row { grid-template-columns: minmax(0, 1fr); gap: var(--sp-h); } .fg-ch-step { padding-inline: var(--sp-1); } }
.fg-ch-row.empty { display: none; }
.fg-ch-tag { justify-self: start; padding: 2px 6px; background: var(--mint); color: var(--on-primary); }
.fg-ch-tag.pass { background: var(--gold); color: var(--on-gold); }
.fg-ch-things { display: grid; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.fg-ch-thing { display: flex; align-items: center; gap: var(--sp-1); margin: 0; }
.fg-ch-thing .slot { --slot-size: 72; }
.fg-ch-said { display: flex; flex-direction: column; min-width: 0; }
.fg-ch-name { font-weight: 600; line-height: 1.3; }
.fg-ch-strip { object-fit: cover; object-position: 0 0; }
/* From 720 px the steps stand side by side as one track: the step and its points over a Free row and a Pass row that line up
   across the steps (subgrid), the labels standing at the left edge while the track slides sideways under them, a step at a time. */
@media (min-width: 720px) {
  .fg-ch { min-width: 0; }
  .fg-ch-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 7.5rem; padding-bottom: var(--sp-1); }
  .fg-ch-scroll:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .fg-ch-track { grid-template-rows: auto auto; grid-auto-flow: column; grid-auto-columns: max-content; gap: 0 var(--sp-1); width: max-content; }
  .fg-ch-track.two { grid-template-rows: auto auto auto; }
  .fg-ch-step, .fg-ch-heads { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; margin: 0; }
  .fg-ch-step { padding: var(--sp-1); scroll-snap-align: start; }
  .fg-ch-heads { position: sticky; left: 0; z-index: 1; width: 7rem; padding: var(--sp-1); background: var(--well); box-shadow: inset 0 0 0 2px var(--line), 6px 0 0 var(--fill); }
  .fg-ch-head { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--sp-h); border-top: 2px solid var(--line); }
  .fg-ch-at { flex-direction: column; align-items: center; gap: 0; text-align: center; }
  .fg-ch-row, .fg-ch-row.empty { display: block; padding: var(--sp-1) 0; border-top: 2px solid var(--line); }
  .fg-ch-step .fg-ch-tag { display: none; }
  /* A step with two rewards on a track stands them side by side, so its column widens and the row stays one reward tall. */
  .fg-ch-things { display: flex; justify-content: center; gap: var(--sp-1); }
  .fg-ch-thing { flex-direction: column; width: 8rem; text-align: center; }
  .fg-ch-said { align-items: center; }
}
/* ---- end Field guide: chapters ---- */

/* ---- Things: any catalog thing's picture (things.js), wherever a page lists one: rules below this line. ---- */
/* A canvas or icon in an item slot sits on its own line box, so the slot hugs it. */
.thing-slot .pal-canvas { display: block; }
/* A trail: a window one frame wide onto its 4-frame strip (k1 to k4 is the whole-number scale), stepping only where motion is allowed. */
.th-trail { --k: 1; display: block; flex: none; width: calc(32px * var(--k)); height: calc(32px * var(--k)); overflow: hidden; }
.th-trail.k2 { --k: 2; } .th-trail.k3 { --k: 3; } .th-trail.k4 { --k: 4; }
.th-trail img { display: block; width: calc(128px * var(--k)); max-width: none; height: calc(32px * var(--k)); image-rendering: pixelated; }
@media (prefers-reduced-motion: no-preference) { .th-trail.th-moving img { animation: th-trail 800ms steps(4, end) infinite; } }
@keyframes th-trail { to { transform: translateX(-100%); } }
/* A name tag: its plate at 2x with a sample name on it, in the dark ink the tags' own rule uses. */
.th-tag { position: relative; display: block; flex: none; width: 96px; height: 32px; }
.th-tag img { display: block; width: 96px; height: 32px; image-rendering: pixelated; }
/* The sample name is the shell's .px (set in things.js), so it takes whatever the site's pixel lettering is; nothing about type is set here. */
.th-tag-name { position: absolute; inset: 0; display: grid; place-items: center; color: #2a2233; }
/* The two tags sprite lane B added, as the watch-shop tags are drawn (the shell's .name-tag.tag_gingham rule): the cookie in the dark
   ink, the chalkboard in chalk. */
.name-tag.tag_cookie, .name-tag.tag_chalkboard { padding: 0 2px; color: #2a2233; background: none; border: 12px solid transparent; border-block-width: 10px; border-image: url("/assets/catalog/ps_tag_cookie_48x16.png") 6 fill / 12px 12px round; line-height: 1; }
.name-tag.tag_chalkboard { color: #fff1da; border-image-source: url("/assets/catalog/ps_tag_chalkboard_48x16.png"); }
.th-tag.tag_chalkboard .th-tag-name { color: #fff1da; }
/* An emote pack: its emotes side by side. */
.th-row { display: flex; flex: none; gap: var(--u); }
.th-row img { display: block; image-rendering: pixelated; }
/* The try-on's picks: each its picture over its name, at least 44 px, as many to a row as fit and never narrower than a name. */
.th-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.th-pick { flex-direction: column; justify-content: start; gap: var(--sp-h); min-width: 0; padding: var(--sp-h) var(--sp-h) var(--sp-1); white-space: normal; }
.th-pick-pic { display: grid; place-items: center; min-height: 64px; }
.th-pick-pic > * { display: block; }
.th-pick-name { overflow-wrap: normal; hyphens: none; }
.th-picks-line { margin: 0 0 var(--sp-1); }
.fg-try-wearing .slot canvas, .fg-try-wearing .slot img { display: block; }
.fg-try-wearing b { font-weight: 600; }
/* With motion reduced the scene stands the trail's first frame just behind the Pal, at the scene's scale. */
.fg-home > .th-scene-trail { top: calc(8px * var(--s)); left: calc(50% - 44px * var(--s)); }
.th-scene-trail .th-trail { width: calc(32px * var(--s)); height: calc(32px * var(--s)); }
.th-scene-trail .th-trail img { width: calc(128px * var(--s)); height: calc(32px * var(--s)); }
/* The Well's odds: a find's picture beside each kind. */
.th-label { display: inline-flex; align-items: center; gap: var(--sp-1); }
.th-label img { flex: none; image-rendering: pixelated; }
@media (forced-colors: active) { .th-tag, .th-trail, .th-row { forced-color-adjust: none; } }
/* ---- end Things ---- */


/* ---- Your Pal (/link/ once linked; link.js): its rules go below this line. ----
   The Wear OS keeper's equal of the iPhone app's Pal screens, phone first: the Home scene and switcher, then Wearing, Out and about
   and the chapter, then Looks to try across the full width. On a tablet or wider the hero and switcher stand left and the panels right.
   The unlinked view (the link form) keeps the small pages' rules; .yp-on (set by link.js) widens the window only once linked. */
.your-pal.yp-on { max-width: 1180px; }
.yp-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
@media (min-width: 768px) { .yp-top { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); align-items: start; } }
.yp-left, .yp-right { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--gap); min-width: 0; }
.yp-left > *, .yp-right > *, .yp-top .panel { margin: 0; }
.yp-hero { display: grid; justify-items: center; gap: var(--sp-h); min-width: 0; text-align: center; }
.yp-plate { --s: 3; display: grid; justify-items: center; width: 100%; min-width: 0; }
/* The décor and touch stand at half the Pal's scale, as on the watch; at an odd scale that would be 1.5x their 32 px art, so here they
   take the whole-number scale under it (--k) and keep their feet on the same ground row (38 art rows down). Overrides .home-decor. */
.yp-plate .home-decor, .yp-plate .home-touch { --k: max(1, round(down, var(--s) / 2, 1)); width: calc(32px * var(--k)); height: calc(32px * var(--k)); top: calc(38px * var(--s) - 32px * var(--k)); }
.yp-plate .home-touch { left: calc(50% - 6px * var(--s) - 32px * var(--k)); }
.yp-hero .yp-name { margin: var(--sp-1) 0 0; }
.yp-hero .yp-name::after { display: none; }
.yp-name .name-tag { max-width: 100%; }
.yp-stage { margin: 0; color: var(--accent); }
.yp-caption { margin: 0; }
/* The switcher: one slot a Pal in a row that scrolls sideways on its own when there are more than fit; Home's Pal first. */
.yp-slots { display: flex; gap: var(--sp-1); margin: 0; padding: 0 0 var(--sp-h); overflow-x: auto; list-style: none; }
.yp-slots li { flex: none; }
.yp-switch button.yp-slot { display: grid; justify-items: center; align-content: start; gap: var(--sp-h); width: 84px; min-height: 44px; border: 0; border-image: none; padding: var(--sp-h) 0; color: var(--text); white-space: normal; }
.yp-slot .slot { padding: var(--u); }
.yp-slot .slot canvas { display: block; }
.yp-slot-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yp-slot-home { color: var(--muted); }
.yp-slot[aria-current="true"] .yp-slot-name { color: var(--accent); }
.yp-away { margin: var(--sp-1) 0 var(--sp-h); font-weight: 600; }
.yp-switch > p:last-child { margin: var(--sp-h) 0 0; }
/* Wearing: each piece in its slot beside its name. */
.yp-worn { display: grid; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.yp-worn li { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.yp-worn .slot { padding: var(--u); }
.yp-worn .slot canvas, .yp-worn .slot img { display: block; }
.yp-worn b { font-weight: 600; }
.yp-tagslot { min-width: 72px; min-height: 72px; }
.yp-tagslot .name-tag { max-width: 9ch; }
#yp-worn .says { margin: 0; }
/* Out and about: the board places as rows of label and value, the finds as icons, and the two ways on. */
.yp-rows { display: grid; margin: 0; }
.yp-rows div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--sp-2); padding: var(--sp-h) 0; border-bottom: var(--u) dotted var(--line); }
.yp-rows dt { color: var(--muted); }
.yp-rows dd { margin: 0; font-weight: 600; }
.yp-finds { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin: var(--sp-1) 0 0; }
.yp-finds p { margin: 0; }
.yp-finds-label { color: var(--muted); }
.yp-finds-row { display: flex; flex-wrap: wrap; gap: var(--sp-h); margin: 0; padding: 0; list-style: none; }
.yp-finds-row img { display: block; image-rendering: pixelated; }
.yp-out-links { display: flex; flex-wrap: wrap; gap: 0 var(--sp-3); margin: var(--sp-1) 0 0; }
.yp-out-links a { display: inline-flex; align-items: center; min-height: 44px; }
#yp-out-body > p { margin: 0 0 var(--sp-1); }
#yp-out-body > .yp-out-links { margin: var(--sp-1) 0 0; }
/* The chapter: the next free reward's picture beside where the keeper is up to. */
.yp-chapter-row { display: flex; align-items: center; gap: var(--sp-2); min-height: 44px; color: var(--text); text-decoration: none; }
.yp-chapter-row > span:last-child { display: grid; gap: var(--sp-h); }
.yp-chapter-name { color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.yp-chapter-row:hover .yp-chapter-name { color: var(--link-hover); }
.yp-doing { margin: 0; }
/* Looks to try: a jump row (phones), then each section's cards: Pal cards (looks, passes, brushes) two or more to a line, rows for the rest. */
.yp-looks, .yp-tryon, .yp-browser { margin-top: var(--gap); }
.yp-looks > p { margin: 0 0 var(--sp-h); }
.yp-jump { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: var(--sp-2) 0 0; }
.yp-jump[hidden] { display: none; }
@media (min-width: 768px) { .yp-jump { display: none; } }
.yp-shelf { scroll-margin-top: var(--sp-2); }
.yp-shelf h3 { margin: var(--sp-3) 0 var(--sp-1); }
.yp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.yp-palcards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.yp-card { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: var(--sp-1); }
.yp-palcards .yp-card { flex-direction: column; align-items: center; text-align: center; }
.yp-pic { position: relative; display: grid; place-items: center; flex: none; min-width: 96px; min-height: 96px; }
.yp-pic > * { display: block; }
.yp-inset { position: absolute; right: calc(-1 * var(--sp-1)); bottom: 0; image-rendering: pixelated; }
.yp-card-words { display: grid; justify-items: start; gap: var(--sp-h); min-width: 0; }
.yp-palcards .yp-card-words { justify-items: center; }
.yp-card-words p { margin: 0; }
.yp-card-name { font-weight: 600; }
.yp-state.on { color: var(--good); font-weight: 600; }
.yp-tagpic .name-tag { max-width: 10ch; }
.yp-try-button { margin-top: var(--sp-h); }
/* The try-on (the Field guide's, pals/tryon.js) on the chosen Pal: no room held for it before it opens. */
.yp-tryon .fg-try:empty, .yp-tryon .fg-try:has(> .fg-try-wait) { min-height: 0; }
.yp-tryon h2:focus { outline: none; }
/* The panel is narrower than the Field guide's window, so its status line wraps sooner: a tighter sticky top keeps it under a third of a 320 x 568 screen. */
@media (max-width: 799px) and (min-height: 560px) { .yp-tryon .fg-try-top { gap: var(--sp-h); padding: var(--sp-h) 0; } }
.yp-preview { margin: var(--sp-2) 0 0; text-align: center; }
/* This browser is linked: the sigils at text height, and signing out set apart in its quiet style. */
.yp-browser .icon16.yp-sigil { width: 16px; height: 16px; vertical-align: -2px; }
.yp-signout { margin: var(--sp-1) 0 0; padding-top: var(--sp-1); border-top: var(--u) dotted var(--line); }
/* The unlinked page's way back to Play is a plain link, so it doesn't outrank Link this browser. */
.yp-back { display: inline-flex; align-items: center; min-height: 44px; }
/* ---- end Your Pal ---- */

/* ---- A visit from the iPhone app (shell.js sets <html data-from="ios"> for a tab opened with ?from=ios). The App Store's rules
   bar an app from leading to payment outside it, so on such a visit the site offers none: the footer's tip link, Play's tip note
   and the park's Supporter stall step aside on every page, and the tip page and Support show a plain line where the pay button and Stripe's checkout words were. Nothing
   else changes; the park, the boards and every Pal's page stay as they are. ---- */
.from-app-note { display: none; }
:root[data-from="ios"] .from-app-note { display: block; }
:root[data-from="ios"] footer a[href="/tip/"],
:root[data-from="ios"] .tip-ask,
:root[data-from="ios"] .tip-stripe,
:root[data-from="ios"] .stripe-words,
:root[data-from="ios"] #park-stall { display: none; }
/* With Play's tip note gone, its small print is one column, so "Privacy, in short" doesn't stand in half a row. */
@media (min-width: 860px) { :root[data-from="ios"] .small-print { grid-template-columns: minmax(0, 1fr); } }
/* ---- end A visit from the iPhone app ---- */

/* ---- Games (/games/: games/games.js, games/kit.js and each machine): its rules go below this line. ----
   The hall is a .reading window of machine cards (.panel inside it, so inset slots). A machine opens in its own .sheet: its ribbon,
   the stage (Phaser's canvas in .gs-host, with the HUD's two chips and the result laid over it), the live line, then the one control
   and the way back. kit.js sets --gs-w and --gs-h on .gs-host: the canvas's CSS size, a whole number of device pixels per art pixel.
   Stacked on a phone or tablet; side by side (the stage left, everything else right) from 900 px, and on a phone on its side, where
   the window gives up its frame so the stage can take the screen's whole height. games.js SIDE is the same query. */
.gs-cards { display: grid; gap: var(--sp-2); margin: 0 0 var(--sp-2); padding: 0; list-style: none; }
.gs-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-2); align-items: start; }
.gs-card-slot { padding: var(--sp-1); }
.gs-card-art { width: 96px; height: 96px; }
.gs-card h2.gs-card-name { margin: 0 0 var(--sp-1); }
.gs-card-text p { margin: 0 0 var(--sp-1); }
.gs-card-text .button { margin-top: var(--sp-h); }
@media (max-width: 479px) { .gs-card { grid-template-columns: minmax(0, 1fr); justify-items: start; } }
.gs-probe { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; }
.gs-machine { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-1); }
.gs-machine > .ribbon:first-child { margin-bottom: 0; }
.gs-stage { position: relative; justify-self: center; }
.gs-host { display: block; width: var(--gs-w, 288px); height: var(--gs-h, 384px); touch-action: manipulation; user-select: none; }
.gs-host { background: var(--sky); }
/* Phaser writes its canvas's size into the canvas's own style the moment it makes it (one canvas pixel to a CSS pixel, so wider than
   a phone until the kit tidies it); these win over that from the start, so the page never widens for a frame. */
.gs-host > canvas { display: block; width: var(--gs-w, 288px) !important; height: var(--gs-h, 384px) !important; translate: var(--gs-nx, 0) var(--gs-ny, 0); image-rendering: pixelated; }
.gs-hud { position: absolute; top: 2px; left: 2px; right: 2px; display: flex; justify-content: space-between; gap: var(--sp-1); margin: 0; pointer-events: none; }
.gs-result { position: absolute; top: 12%; left: var(--sp-1); right: var(--sp-1); display: grid; justify-items: center; gap: var(--sp-h); padding: var(--sp-1); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); color: var(--text); text-align: center; }
.gs-result p { margin: 0; }
.gs-result .gs-head { margin: 0 auto; }
.gs-say { max-width: 100%; min-height: calc(3em + 2 * var(--sp-h) + 4 * var(--u)); margin: 0; padding: var(--sp-h) var(--sp-1); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); color: var(--text); font-size: var(--size-small); font-weight: 600; }
.gs-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-1); }
/* A machine with more than one control (games.js drawPad): its other buttons in one row before the main one, each at least 44 px. */
.gs-pad { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: var(--sp-1); }
.gs-pad[hidden] { display: none; }
.gs-pad-button { flex: 1 1 0; min-width: 44px; min-height: 44px; touch-action: none; }
.gs-act { flex: 1 1 auto; min-width: 140px; }
/* The line and the controls take the window's width (not the stage's, so a wrapped line never shrinks the stage), up to a reading width. */
.gs-machine > .gs-say, .gs-machine > .gs-controls { justify-self: center; width: 100%; max-width: 520px; }
@media (max-width: 479px) {
  /* A phone: the stage runs edge to edge inside its window. */
  main > .gs-machine.sheet { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: 0; padding-right: 0; row-gap: var(--sp-h); }
  .gs-say, .gs-controls { margin-left: var(--sp-1); margin-right: var(--sp-1); }
}
@media (min-width: 900px), (orientation: landscape) and (max-height: 520px) {
  .gs-machine { grid-template-columns: auto minmax(200px, 280px); grid-template-rows: auto auto 1fr; justify-content: center; column-gap: var(--sp-2); align-items: start; }
  .gs-machine > .ribbon:first-child { grid-column: 2; grid-row: 1; margin: 0 auto 0 0; }
  .gs-stage { grid-column: 1; grid-row: 1 / span 3; }
  .gs-say { grid-column: 2; grid-row: 2; }
  .gs-controls { grid-column: 2; grid-row: 3; flex-direction: column; align-items: stretch; }
  .gs-act { flex: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  main > .gs-machine.sheet { margin-top: 0; margin-bottom: 0; border-top-width: 0; border-bottom-width: 0; padding-top: 0; padding-bottom: 0; }
}
/* -- Games: snack-shower (games/snack-shower.js): its rules go below this line. -- */
/* While a round runs, snack-shower.js marks the stage .ss-host and its window .ss-on. A drag on the stage moves the Pal, never the
   page. Brace is held down, so a long press on it neither selects nor opens a menu. Left, Brace and Right share one row in that
   order (the pad's two buttons and the main one side by side), with the way back under them; stacked or side by side alike. */
.gs-host.ss-host { touch-action: none; }
.gs-machine.ss-on .gs-act { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.gs-machine.ss-on .gs-controls { flex-direction: row; flex-wrap: wrap; align-items: center; }
.gs-machine.ss-on .gs-pad:not([hidden]) { display: contents; }
.gs-machine.ss-on .gs-pad-button[data-name="left"] { order: 1; }
.gs-machine.ss-on .gs-pad:not([hidden]) ~ .gs-act { order: 2; flex: 1 1 0; min-width: 44px; }
.gs-machine.ss-on .gs-pad-button[data-name="right"] { order: 3; }
.gs-machine.ss-on .gs-pad:not([hidden]) ~ .gs-back { order: 4; flex: 1 1 100%; }
/* -- end snack-shower -- */
/* -- Games: crumb-crunch (games/crumb-crunch.js): its rules go below this line. -- */
/* The scene reads the stage's pointer itself (a tap picks a snack); the canvas it marks never pans or zooms the page. */
.gs-host > canvas.cc-stage { touch-action: none; }
/* -- end crumb-crunch -- */
/* -- Games: puddle-hop (games/puddle-hop.js): its rules go below this line. -- */
/* The scene adds .ph-host to the stage while it runs: every tap on it hops, so a thumb that drags a little never scrolls the page. */
.gs-host.ph-host { touch-action: none; }
/* A wide, short stage: the result starts just under the HUD's chips (not 12% down), so all of it stays on the stage and the chips
   don't peek out behind it. Overrides .gs-result's top. */
.gs-host.ph-host ~ .gs-result { top: calc(var(--size-label) + var(--sp-2)); }
/* Know-It-All's question sits near the top of its host: the result covers it from the top, so no half line peeks out. */
.gs-host.kia ~ .gs-result { top: 0; }
/* -- end puddle-hop -- */
/* -- Games: conga-line (games/conga-line.js): its rules go below this line. -- */
/* The scene marks its canvas .cl-stage: a swipe on it turns the line and never pans or zooms the page. The four direction buttons
   (games.js draws them in #gs-pad, named cl-up, cl-left, cl-right and cl-down) stand in a cross of 48 x 44 buttons, each showing an
   arrow from the machine's atlas (conga-line-1.png at 2x: right, left, up and down, 9 x 9, at x 0, 10, 20 and 30); the word stays
   for screen readers and is drawn in no colour. Stacked, the cross sits left of Pause and the way back; side by side, over them. */
.gs-host > canvas.cl-stage { touch-action: none; }
.gs-controls:has(> .gs-pad:not([hidden]) > [data-name="cl-up"]) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-1); }
.gs-pad:not([hidden]):has(> [data-name="cl-up"]) { display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(3, 44px); gap: var(--sp-h); grid-row: 1 / span 2; }
.gs-controls:has(> .gs-pad:not([hidden]) > [data-name="cl-up"]) > .gs-act { grid-column: 2; grid-row: 1; align-self: end; min-width: 0; }
.gs-controls:has(> .gs-pad:not([hidden]) > [data-name="cl-up"]) > .gs-back { grid-column: 2; grid-row: 2; align-self: start; justify-self: center; }
.gs-pad-button[data-name^="cl-"] { position: relative; width: 48px; min-width: 48px; padding: 0; color: transparent; }
.gs-pad-button[data-name^="cl-"]:hover { color: transparent; }
.gs-pad-button[data-name="cl-up"] { grid-area: 1 / 2; }
.gs-pad-button[data-name="cl-left"] { grid-area: 2 / 1; }
.gs-pad-button[data-name="cl-right"] { grid-area: 2 / 3; }
.gs-pad-button[data-name="cl-down"] { grid-area: 3 / 2; }
.gs-pad-button[data-name^="cl-"]::before { content: ""; position: absolute; left: 50%; top: 50%; width: calc(9 * var(--u)); height: calc(9 * var(--u)); translate: -50% -50%; background: url("/assets/games/conga-line-1.png") no-repeat; background-size: calc(284 * var(--u)) calc(261 * var(--u)); image-rendering: pixelated; }
.gs-pad-button[data-name^="cl-"]:active::before { translate: -50% calc(var(--u) - 50%); }
.gs-pad-button[data-name="cl-right"]::before { background-position: 0 0; }
.gs-pad-button[data-name="cl-left"]::before { background-position: calc(-10 * var(--u)) 0; }
.gs-pad-button[data-name="cl-up"]::before { background-position: calc(-20 * var(--u)) 0; }
.gs-pad-button[data-name="cl-down"]::before { background-position: calc(-30 * var(--u)) 0; }
@media (min-width: 900px), (orientation: landscape) and (max-height: 520px) {
  .gs-controls:has(> .gs-pad:not([hidden]) > [data-name="cl-up"]) { grid-template-columns: minmax(0, 1fr); }
  .gs-pad:not([hidden]):has(> [data-name="cl-up"]) { grid-row: auto; justify-self: center; }
  .gs-controls:has(> .gs-pad:not([hidden]) > [data-name="cl-up"]) > .gs-act, .gs-controls:has(> .gs-pad:not([hidden]) > [data-name="cl-up"]) > .gs-back { grid-column: 1; grid-row: auto; align-self: auto; }
}
/* -- end conga-line -- */
/* -- Games: lights-out (games/lights-out.js): its rules go below this line. -- */
/* The scene marks its canvas .lo-stage: a swipe on it steers the Pal and never pans or zooms the page. The four direction buttons
   (games.js draws them in #gs-pad, named lo-up, lo-left, lo-right and lo-down) stand in a cross of 48 x 44 buttons, laid out as
   Conga Line's are, each showing an arrow from the machine's atlas (lights-out-1.png at 2x: right, left, up and down, 9 x 9, at
   x 0, 10, 20 and 30); the word stays for screen readers and is drawn in no colour. Stacked, the cross sits left of Pause and the
   way back; side by side, over them. */
.gs-host > canvas.lo-stage { touch-action: none; }
.gs-controls:has(> .gs-pad:not([hidden]) > [data-name="lo-up"]) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-1); }
.gs-pad:not([hidden]):has(> [data-name="lo-up"]) { display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(3, 44px); gap: var(--sp-h); grid-row: 1 / span 2; }
.gs-controls:has(> .gs-pad:not([hidden]) > [data-name="lo-up"]) > .gs-act { grid-column: 2; grid-row: 1; align-self: end; min-width: 0; }
.gs-controls:has(> .gs-pad:not([hidden]) > [data-name="lo-up"]) > .gs-back { grid-column: 2; grid-row: 2; align-self: start; justify-self: center; }
.gs-pad-button[data-name^="lo-"] { position: relative; width: 48px; min-width: 48px; padding: 0; color: transparent; }
.gs-pad-button[data-name^="lo-"]:hover { color: transparent; }
.gs-pad-button[data-name="lo-up"] { grid-area: 1 / 2; }
.gs-pad-button[data-name="lo-left"] { grid-area: 2 / 1; }
.gs-pad-button[data-name="lo-right"] { grid-area: 2 / 3; }
.gs-pad-button[data-name="lo-down"] { grid-area: 3 / 2; }
.gs-pad-button[data-name^="lo-"]::before { content: ""; position: absolute; left: 50%; top: 50%; width: calc(9 * var(--u)); height: calc(9 * var(--u)); translate: -50% -50%; background: url("/assets/games/lights-out-1.png") no-repeat; background-size: calc(291 * var(--u)) calc(22 * var(--u)); image-rendering: pixelated; }
.gs-pad-button[data-name^="lo-"]:active::before { translate: -50% calc(var(--u) - 50%); }
.gs-pad-button[data-name="lo-right"]::before { background-position: 0 0; }
.gs-pad-button[data-name="lo-left"]::before { background-position: calc(-10 * var(--u)) 0; }
.gs-pad-button[data-name="lo-up"]::before { background-position: calc(-20 * var(--u)) 0; }
.gs-pad-button[data-name="lo-down"]::before { background-position: calc(-30 * var(--u)) 0; }
@media (min-width: 900px), (orientation: landscape) and (max-height: 520px) {
  .gs-controls:has(> .gs-pad:not([hidden]) > [data-name="lo-up"]) { grid-template-columns: minmax(0, 1fr); }
  .gs-pad:not([hidden]):has(> [data-name="lo-up"]) { grid-row: auto; justify-self: center; }
  .gs-controls:has(> .gs-pad:not([hidden]) > [data-name="lo-up"]) > .gs-act, .gs-controls:has(> .gs-pad:not([hidden]) > [data-name="lo-up"]) > .gs-back { grid-column: 1; grid-row: auto; align-self: auto; }
}
/* -- end lights-out -- */
/* -- Games: whos-that-pal (games/whos-that-pal.js): its rules go below this line. -- */
/* A machine of page HTML (no canvas): the stage takes the size of its board instead of --gs-w and --gs-h (this overrides .gs-host's
   width and height, for this machine only). Under the HUD's chips, the cards four across; under them the player's Pal on the grass,
   or beside them on a phone on its side. A card is 64 Pal pixels at 2x inside a frame of 2 --u (3x with .wtp-big, where the screen
   has the height). Face down: the quiet button with the hub's heart; up: an item slot; a found pair: the gold slot. */
.gs-host.wtp { display: grid; justify-items: center; align-content: start; width: auto; height: auto; padding: calc(30px + var(--sp-1)) var(--sp-h) 0; }
.wtp-board { display: grid; grid-template-columns: repeat(4, auto); gap: var(--sp-h); }
.wtp-big .wtp-board { gap: var(--sp-1); }
button.wtp-card { box-sizing: border-box; display: grid; place-items: center; width: calc(64px + 4 * var(--u)); height: calc(64px + 4 * var(--u)); min-width: 0; min-height: 0; margin: 0; padding: 0; }
.wtp-big button.wtp-card { width: calc(96px + 4 * var(--u)); height: calc(96px + 4 * var(--u)); }
.wtp-big .wtp-back { --ics: 3; }
.wtp-card .wtp-face { display: none; }
.wtp-card:is(.is-up, .is-found) .wtp-face { display: block; }
.wtp-card:is(.is-up, .is-found) .wtp-back { display: none; }
button.wtp-card:is(.is-up, .is-found), button.wtp-card:is(.is-up, .is-found):active { border-width: calc(2 * var(--u)); border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: 0; }
button.wtp-card.is-found, button.wtp-card.is-found:active { border-image-source: url("/assets/ui/slot_gold.png"); }
/* A found card is done with (aria-disabled), but it stays bright: it is the board's progress, not a button that's off. */
button.wtp-card[aria-disabled=true] { opacity: 1; filter: none; cursor: default; }
.wtp-card.wtp-turn { animation: wtp-turn 160ms steps(4, end); }
@keyframes wtp-turn { from { transform: scaleX(0.25); } to { transform: scaleX(1); } }
.wtp-floor { justify-self: stretch; display: grid; justify-items: start; margin: var(--sp-1) calc(-1 * var(--sp-h)) 0; }
.wtp-pal { margin-left: var(--sp-2); }
.wtp-grass { justify-self: stretch; height: 16px; background: var(--ground) var(--ground-art) 0 0 / 192px 192px; }
@media (orientation: landscape) and (max-height: 520px) {
  /* A phone on its side: the Pal stands beside the board, so the board keeps the screen's height. */
  .gs-host.wtp { grid-template-columns: auto auto; align-items: end; column-gap: var(--sp-1); padding-right: 0; }
  .wtp-floor { align-self: end; margin: 0; }
  .wtp-pal { margin: 0 var(--sp-1); }
}
@media (prefers-reduced-motion: reduce) { .wtp-card.wtp-turn { animation: none; } }
/* -- end whos-that-pal -- */
/* -- Games: know-it-all (games/know-it-all.js): its rules go below this line. -- */
/* A machine of page HTML (KIND 'dom'): its host takes the window's width up to 480 px and the question's height, on the window's own
   fill rather than the sky (text belongs on a window), with room at the top for the HUD's two chips. The Pal in a slot beside the
   question, the quick bonus's ten pips under it, then one answer to a row, each a whole-width button at least 48 px tall. After a
   pick the right answer turns mint with a tick and a wrong pick coral; the others dim (aria-disabled, so focus stays put). */
.gs-host.kia { width: 100%; max-width: 480px; height: auto; min-height: 420px; padding: 40px var(--sp-1) var(--sp-1); background: none; user-select: none; }
.kia-ask { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-1); align-items: start; margin: 0 0 var(--sp-1); }
.kia-pal { padding: var(--sp-h); }
.kia-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-h) var(--sp-1); margin: 0 0 var(--sp-h); }
.kia-meta .chip[hidden] { display: none; }
.kia-text { margin: 0; font-size: var(--size-sub); font-weight: 600; }
.kia-quick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-h) var(--sp-1); min-height: 24px; margin: 0 0 var(--sp-1); }
.kia-pips { display: grid; grid-template-columns: repeat(10, 8px); gap: 2px; height: 8px; }
.kia-pips i { background: var(--well); box-shadow: 0 0 0 1px var(--ink); }
.kia-pips i.on { background: linear-gradient(var(--gold-hi) 0 25%, var(--gold) 25% 75%, var(--gold-lo) 75%); }
.kia-answers { display: grid; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.kia-answers button { width: 100%; min-height: 48px; justify-content: space-between; padding: var(--sp-h) 12px; text-align: left; }
.kia-answers button > span { min-width: 0; }
.kia-answers button.right { border-image-source: url("/assets/ui/btn_primary.png"); color: var(--on-primary); }
.kia-answers button.right[aria-disabled=true], .kia-answers button.wrong[aria-disabled=true] { opacity: 1; cursor: default; }
.kia-mark { flex: none; width: 18px; height: 18px; image-rendering: pixelated; }
/* -- end know-it-all -- */
/* ---- end Games ---- */

/* ---- The player notice (menu.js, every page but the Custodian): rules below this line. ----
   The Custodian's one plain line (PLAYER_NOTICE) on the shell's inset slot (.notice), just under the header and inside the page's
   column, with Dismiss beside it as a text button. A warning carries the watch's alert bell (ui_v2_hub_alerts, 16 px at 2x). The
   strip exists only while there is a notice, so a page without one keeps no room for it. */
.site-notice { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--sp-h) var(--sp-2); max-width: 1216px; width: calc(100% - 2 * var(--gutter)); margin: var(--sp-1) auto 0; padding-block: 0; color: var(--text); }
.site-notice p { flex: 1 1 auto; min-width: 0; margin: 0; padding: var(--sp-h) 0; }
.site-notice img { flex: none; width: 32px; height: 32px; image-rendering: pixelated; }
.site-notice .textbutton { flex: none; }
/* ---- end The player notice ---- */

/* ---- Pictures: the neutral slot (picture.js), wherever a page shows a picture the site hasn't got: rules below this line. ----
   The site's empty item slot (.slot's frame and fill), sized like the picture it stands for (--pic-w and --pic-h, in CSS pixels, set
   by picture.js). Inside an item slot already, the slot around it is the empty look, so it only keeps the picture's room. */
.pic-none { display: inline-block; flex: none; box-sizing: border-box; width: calc(var(--pic-w, 32) * 1px); height: calc(var(--pic-h, 32) * 1px); max-width: 100%; vertical-align: middle; border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); }
.slot > .pic-none { border: 0; border-image: none; }
@media (forced-colors: active) { .pic-none { border-image: none; border: 2px dashed CanvasText; } .slot > .pic-none { border: 0; } }
/* ---- end Pictures ---- */

/* ---- Sound and the small pages (link, share card, support, privacy, tip, 404, after payment): rules below this line. ---- */
/* The small pages each stand in one reading window, as Guidlands Watch's support, privacy and 404 do, a little narrower than the
   long pages so a line of text stays easy to follow. Their parts below are the shell's windows, slots and ribbons. */
.help, .privacy, .tip, .lost, .your-pal, .receipt-page, .share { max-width: 820px; }
.share { margin-inline: auto; }
.share > .reading { max-width: none; }
.gold-note, .keep-safe, .receipt[data-state="paid"] { border: calc(2 * var(--u)) solid transparent; border-image: url("/assets/ui/slot_gold.png") 4 fill / calc(4 * var(--u)); padding: calc(3 * var(--u)) calc(5 * var(--u)); --text: #3f2214; --muted: #5a3a22; --link: #3f2214; color: #3f2214; }

/* Folded answers (folds.js; Guidlands' .qa): each question is a full-size thing to tap, with a pointer that turns as it opens. The
   heading inside keeps its words and its anchor; it reads as a question in the reading face, not as a pixel banner, since most of
   them run longer than five words. */
details.fold > summary { gap: var(--sp-1); padding: var(--sp-1) 0; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ""; flex: none; width: 0; height: 0; border-block: 6px solid transparent; border-left: 8px solid var(--accent); }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary :is(h2, h3) { margin: 0; color: inherit; font: 600 var(--size-sub)/1.4 var(--sans); }
details.fold > summary h2::after { display: none; }
details.fold > summary:hover :is(h2, h3) { text-decoration: underline; text-underline-offset: 4px; }
details.fold[open] { padding-bottom: var(--sp-1); }
details.fold > :not(summary):first-of-type { margin-top: var(--sp-h); }
details.fold h3 { margin-top: 1.2em; }
details.fold :is(ul, ol) { padding-left: 1.3em; }
details.fold li { margin-bottom: .5em; }
details.fold a { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) { details.fold > summary::before { transition: transform 120ms steps(2, end); } }

/* Support: where to start and how to keep a Pal safe, side by side; then the folds; then the way to email, framed. */
.help-start { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp-2); margin: var(--sp-2) 0 var(--sp-3); }
.help-first { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0; }
.help-first h2 { margin-top: 0; }
.help-first p:last-child, .keep-safe p { margin-bottom: 0; }
.keep-safe strong { display: block; margin-bottom: var(--sp-h); color: inherit; }
.folds { margin: 0 0 var(--sp-2); }
.help-email { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: var(--sp-3) 0 var(--sp-2); }
.help-email > div { flex: 1 1 320px; }
.help-email h2 { margin-top: 0; }
.help-email p:last-child { margin-bottom: 0; }
.help-note { margin: 0 0 var(--sp-2); }
.help > .small { margin-top: var(--sp-2); }
@media (max-width: 760px) { .help-start { grid-template-columns: 1fr; } }
@media (max-width: 400px) { .help-pal { display: none; } }

/* Privacy: the dates, the policy at a glance in three slots, then each section folded under its heading. */
.policy-meta { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0 0 var(--sp-2); }
.policy-meta div { display: flex; gap: 8px; }
.policy-meta dt { color: var(--muted); }
.policy-meta dd { margin: 0; font-weight: 600; }
.privacy-glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-1); margin: 0 0 var(--sp-3); }
.privacy-glance p { display: grid; align-content: start; gap: 2px; margin: 0; border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(3 * var(--u)) calc(5 * var(--u)); }
.privacy-glance strong { color: var(--accent); }
.privacy-glance span { color: var(--muted); font-size: var(--size-small); }
@media (max-width: 760px) { .privacy-glance { grid-template-columns: 1fr; } }

/* Tip: the game's icon in a gold slot beside the hello, the tip jar on the showcase with its art button, then the two watch tips
   in their slots. The words and the one Stripe link are the approved ones. */
.tip-hello { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
.tip-hello p:last-child { margin-bottom: 0; }
.tip-icon img { display: block; width: 96px; height: 96px; image-rendering: auto; }
.tip-jar { margin: 0 0 var(--sp-2); }
.tip-jar h2 { margin-top: 0; }
.tip-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: var(--sp-2) 0; }
.tip-stripe { flex: 0 1 300px; min-height: 64px; }
/* Its arrow is not a letter the pixel font has: it is drawn in the text family, with the browser's own smoothing. */
.tip-stripe span { font-family: var(--sans); text-transform: none; -webkit-font-smoothing: auto; }
.tip-ways { display: grid; gap: var(--sp-1); margin: 0 0 var(--sp-2); padding: 0; list-style: none; }
.tip-ways li { display: flex; align-items: center; gap: var(--sp-2); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(2 * var(--u)) calc(4 * var(--u)); }
.tip-ways img { display: block; width: 32px; height: 32px; image-rendering: pixelated; }
.tip-ways p { margin: 0; }
@media (max-width: 479px) { .tip-hello { grid-template-columns: minmax(0, 1fr); } .tip-icon img { width: 72px; height: 72px; } .tip-stripe { flex-basis: 100%; } }

/* The 404: a Pal with an opinion in its portrait slot. */
.lost .says { margin: var(--sp-2) 0; }
.lost .says p:first-child { font-size: var(--size-sub); }

/* Your Pal (/link): the steps on the watch, the code typed into a game slot, and once linked the Today bar on its signboard, the
   door to the Pal's page, and the link itself. */
.link-box h2, .your-pal .panel h2 { margin-top: 0; }
.watch-steps { margin: 0 0 var(--sp-2); padding-left: 1.4em; }
.watch-steps li { margin-bottom: var(--sp-h); }
.link-form label { display: block; margin: 0; color: var(--accent); font-weight: 600; }
.link-form .small { margin: var(--sp-h) 0 var(--sp-1); }
.code-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--sp-1); }
.link-form .code-slot { flex: 0 1 330px; min-width: 0; min-height: 56px; font: 600 var(--size-sub)/1 var(--mono); letter-spacing: .12em; text-align: center; text-transform: uppercase; }
/* The pattern in the empty slot is a faint hint: at full strength, in the code's own big type, it read as a code already typed in. */
.link-form .code-slot::placeholder { text-transform: none; color: var(--muted); opacity: .4; }
.form-problem { margin: 10px 0 0; color: var(--warn); font-weight: 600; }
.link-box > .small { margin: var(--sp-2) 0 0; }
.today { margin: 0 0 var(--sp-2); }
.today-who { margin: 0 0 var(--sp-1); font-weight: 600; }
.today .today-bar { margin: 0; }
.today-bar a:hover { color: var(--link-hover); }
.pal-door { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
.pal-door .slot { padding: calc(2 * var(--u)); }
.pal-door-name { margin: 0 0 2px; }
.pal-door-name + .small { margin: 0 0 var(--sp-1); color: var(--muted); }
.your-pal .new-pals { margin: 0 0 var(--sp-2); }

/* After payment: the order as a receipt in a slot under the pack's picture, edged in gold once it's paid. */
.receipt-head { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); }
.receipt-head img { display: block; width: 64px; height: 64px; image-rendering: pixelated; }
.receipt-head h1 { margin: 0; color: var(--accent); }
.receipt { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0 0 var(--sp-2); border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(3 * var(--u)) calc(5 * var(--u)); }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* The share card: the Pal hatches on the showcase, standing in today's Home scene, beside its stages and traits; one door onward. */
.share-pal { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-2); }
.hatch { margin: 0; justify-self: center; }
.hatch-scene { --hs: 2px; display: grid; place-items: end center; width: calc(96 * var(--hs)); height: calc(44 * var(--hs)); background: var(--sky) var(--band) 0 0 / 100% 100% no-repeat; image-rendering: pixelated; }
.hatch-scene canvas { width: calc(32 * var(--hs)); height: calc(32 * var(--hs)); margin-bottom: calc(3 * var(--hs)); transform-origin: 50% 90%; }
.hatch.hatching canvas { animation: egg-wobble 1000ms steps(1, end) infinite; }
.hatch.grew canvas { animation: hatch-grow 450ms steps(3, end) 1; }
@keyframes hatch-grow { 0% { transform: translateY(calc(-3 * var(--hs))); } 100% { transform: none; } }
/* The invalid view's quiet help link: a full-height tap target beside the big button. */
.share-help { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--sp-1); }
.share-stages { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0 0 var(--sp-2); }
.share-stages .slot { padding: 0; }
.share-stages figure { display: grid; justify-items: center; gap: 4px; margin: 0; color: var(--muted); font-size: var(--size-small); }
.share-traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-1); margin: 0; }
.share-traits div { border: calc(2 * var(--u)) solid transparent; border-image: var(--slot) 4 fill / calc(4 * var(--u)); padding: calc(2 * var(--u)) calc(4 * var(--u)); }
.share-traits dt { color: var(--muted); font-size: var(--size-small); }
.share-traits dd { margin: 0; font-weight: 600; }
.share-code { display: grid; gap: 4px; margin: 0 0 var(--sp-2); }
.share-code span { color: var(--accent); font-weight: 600; }
/* The code wraps only at its hyphens, between groups, and shrinks to fit when its longest group wouldn't (26 characters and a hyphen). */
.share-code { container-type: inline-size; }
.share-code code { font-size: min(17px, 100cqi / 19); overflow-wrap: normal; word-break: normal; }
/* The four stages stand in one row where four fit, otherwise two by two (under 370 px, and beside the showcase up to about 760 px),
   never three and one. */
.share-facts { container-type: inline-size; }
.share-stages { display: grid; grid-template-columns: repeat(2, max-content); }
/* The fold holds the import steps and what importing does; the DNA link stands clear of its rule, a full tap high. */
#share-valid > .text-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--sp-h); }
@container (min-width: 310px) { .share-stages { grid-template-columns: repeat(4, max-content); } }
/* A link with no Pal in it, or a scrambled one: an egg that won't hatch says so, one way into the game, help as a quiet link. */
.share-lost { align-items: center; }
.share-lost [data-reason] p:last-child { margin: 0; }
#share-invalid .button-row { gap: var(--sp-1) var(--sp-3); }
/* With no Pal to show, Get the game is the card's big button; the page's Back to Play under it steps down to a quiet one. */
#share-invalid .button-row .big { min-height: 64px; padding: 0 var(--sp-3); }
.share #share-invalid ~ .next-step .button { min-width: 0; min-height: 44px; padding: 0 var(--sp-2); border-image-source: var(--btn2); color: var(--btn2-ink); }
.share #share-invalid ~ .next-step .button:active { border-image-source: var(--btn2-down); }
/* On a phone the egg sits above the words, so the words get the card's whole width. */
@media (max-width: 559px) { .share-lost { flex-direction: column; align-items: center; } .share-lost [data-reason] { align-self: stretch; } #share-invalid .button-row .big { flex: 1 1 100%; } }
.share-door { display: grid; justify-items: center; gap: var(--sp-2); margin: var(--sp-3) 0; text-align: center; }
.share-door p { max-width: 34em; margin: 0; }
.share-door .big { min-height: 64px; padding: 0 var(--sp-3); }
@media (min-width: 400px) { .hatch-scene { --hs: 3px; } }
@media (max-width: 640px) { .share-pal { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .hatch canvas { animation: none !important; } }
@media (forced-colors: active) { .gold-note, .keep-safe, .receipt, .privacy-glance p, .tip-ways li, .share-traits div { border-image: none; border: 2px solid CanvasText; background: Canvas; color: CanvasText; } }


/* ---- end Sound and small pages ---- */


@media (forced-colors: active) {
  .sheet, .reading, .panel, .card, .stage, .plaque, .says, .window, body > header, body > footer, button, .button, .store, .slot, .notice, .ribbon, .tabs a, .board-row, .pal-numbers div, .find-list li, .name-tag, .code-panel, .do-not-delete, .pal-traits div, .page-hero, .legal-section, .policy-summary, .support-start, .support-tip-help, .support-card, .report-card, .tip-details, .share-card, .feature-card, .platform-card, .start-card, .door-card, .tip-strip, .catch-card, .live-tile, .pal-portrait, .home-page > .section, nav[aria-label=Main] a { border-image: none; border: 2px solid CanvasText; background: Canvas; color: CanvasText; }
  .tabs a[aria-current=page], nav[aria-label=Main] a[aria-current=page] { border-color: Highlight; color: LinkText; }
  .race-bar span, .meter span { background: Highlight; forced-color-adjust: none; }
  body::before, body::after, .scene, .pal-canvas { forced-color-adjust: none; }
}
