  /* Desktop-idle layout (the genre's convention): the game is a strip along the bottom of the screen; everything above
     it is your desktop. Single committed look. */
  /* palette tokens: design.css now (violet --accent, --progress for teal/progress/done states) -- the
     page's own :root removed, so there's one source, not two that can drift apart (Jon's design-language
     brief, 2026-10-03). */
  [hidden] { display: none !important; }
  html, body { height: 100%; background: var(--ground); color: var(--ink); overflow: hidden; }
  body { margin: 0; font: 14px/1.5 "Atkinson Hyperlegible", system-ui, sans-serif; display: flex; flex-direction: column; }
  /* FONT (Jon, 2026-10-01: picked Silkscreen to replace Pixelify Sans -- see Thriller's
     .scratch/thriller/look/fonts_sheet.png). Silkscreen only ships weight 400 (see the Google Fonts link
     below); every rule here asks for 400. It reads ~1/3 wider than Pixelify Sans at the same pixel size, so
     every size that was tuned for Pixelify Sans is scaled by Thriller's x0.78 factor below. The OLD
     font-synthesis fix (Planner, Jon: "Ohiha"/"80/180" misreads -- a SYNTHETIC bold blurring Pixelify
     Sans's thin pixel strokes into misreadable glyphs) stays in place regardless of which font loads: emphasis
     is by size or colour, never weight. */
  * { font-synthesis: none; }
  /* .desktop is dead CSS (Jon/games-41's old "desktop-idle" layout -- the game as a bottom strip, a
     decorative "desktop" above it); no element with this class exists in the markup any more. Left
     harmless, not removed here -- out of scope for the fill-the-window fix below. */
  .desktop { flex: 1; min-height: 160px; background: linear-gradient(160deg, #26314a, #1a2030 60%, #151a26); position: relative; padding-inline: 16px; padding-block: 20px; }
  .desktop .note { max-width: 520px; background: #0008; border: 1px solid #fff2; padding: 12px 14px; color: #d8dce8; font-size: 13px; }
  .desktop .note b { font-family: "Silkscreen", monospace; color: var(--accent); font-size: 12px; }
  /* UI REDESIGN (Dispatcher, 2026-10-01): "the game view should fill the whole window... with the bar
     overlaid" -- .strip (the actual playable game: canvas + HUD) now takes the FULL body height (flex: 1,
     not flex-shrink: 0 pinned to the canvas's own content size), and #farm fills .strip exactly
     (width/height: 100%, not width: 100% with an auto height that only ever matched the canvas's own
     fixed cols:rows aspect ratio -- the real cause of the ~90px empty band below the game at 1440x900:
     WORLD_VIEW_ROWS/COLS stayed a fixed ~16:9 pair while the actual window was a different ratio).
     WORLD_VIEW_ROWS is now derived from the real viewport aspect ratio (resizeWorldViewport, below) instead
     of a fixed per-zoom-step table value, so the canvas's own intrinsic pixel size always matches what CSS
     stretches it to -- no distortion, no gap, any aspect ratio, live on resize. */
  .strip { position: relative; background: transparent; flex: 1; min-height: 0; overflow: hidden; }
  #farm { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; cursor: pointer; }
  /* UI REDESIGN (AUDIT_UI.txt/UI_REDESIGN.html, approved 2026-10-01): bare text on the picture, no boxes,
     no borders; the open panel underlined; everything else at 78% until hovered. Numbers-without-labels,
     one speed control, the "..." menu -- see .moremenu/.adminword below. */
  .hud { position: absolute; left: 8px; right: 8px; top: 6px; display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
  /* PHONES (audit_2026_10_04 #1): at narrow widths the bar's own gap/padding leaves no room for every pill
     plus every button on one row -- shrink both so two wrapped rows still fit a 375px viewport without the
     canvas showing through underneath. */
  @media (max-width: 480px) {
    .hud { gap: 5px 7px; }
    .hud button, .hud .pill { padding: 3px 6px; font-size: 11px; }
  }
  /* PURPLE BAR (Jon, 2026-10-01: "we used to have a purplish background behind those buttons at the top,
     and I liked that"): restored from the pre-redesign look (df91798's own .pill/button rules -- var(--panel)
     behind a button, #0009 behind a pill, both with a 1px/2px line border) -- same layout, gap and text as
     today, just a background chip under each item again. */
  .hud button, .hud .pill { font: 400 12px "Silkscreen", monospace; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; color: var(--ink); padding: 4px 8px; cursor: pointer; text-shadow: 0 1px 0 #000c, 0 0 6px #0008; opacity: 0.78; }
  .hud button:hover { opacity: 1; }
  .hud button[aria-expanded="true"], .hud button.active { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
  .hud .pill { opacity: 1; background: #0009; font-variant-numeric: tabular-nums; cursor: default; display: inline-flex; align-items: center; gap: 4px; }
  .hud .pill.bad { color: var(--bad); }
  .counterIcon { width: 16px; height: 16px; image-rendering: pixelated; filter: drop-shadow(0 1px 0 #000c) drop-shadow(0 0 3px #0008); }
  .counterGlyph { font: 400 11px "Silkscreen", monospace; text-shadow: 0 1px 0 #000c, 0 0 6px #0008; }
  .hud button:focus-visible { outline: 2px solid var(--warm); outline-offset: 2px; }
  #speedbtn { min-width: 26px; text-align: center; }
  button { font: 400 10px "Silkscreen", monospace; background: var(--panel); color: var(--ink); border: 2px solid var(--line); padding: 4px 10px; cursor: pointer; }
  button:hover:not(:disabled) { border-color: var(--accent); }
  button:disabled { color: #6c6478; cursor: default; }
  button:focus-visible { outline: 2px solid var(--warm); outline-offset: 2px; }
  /* the "..." menu: a quiet glyph on the bar, a small dropdown of rows a player rarely needs */
  .moremenu { position: absolute; right: 8px; top: 38px; background: var(--panel); border: 1px solid var(--line); padding: 4px 0; min-width: 150px; box-shadow: 0 8px 24px #0008; z-index: 5; }
  .moremenu button { display: flex; width: 100%; box-sizing: border-box; justify-content: space-between; gap: 18px; font: 400 11px "Silkscreen", monospace; background: transparent; border: 0; color: var(--ink); padding: 5px 14px; cursor: pointer; text-align: left; }
  .moremenu button:hover { background: #ffffff14; }
  .moremenu .k { opacity: 0.45; }
  .moremenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
  .moremenu button.bad { color: var(--bad); }
  .moremenu button.bad.confirming { background: var(--bad); color: var(--on-solid); }
  /* SUGGEST TO THE COUNCIL (player_suggestions.txt, Jon, 2026-10-03): a right-click/long-press popup,
     positioned at the cursor (left/top set in JS) -- same look as .moremenu, violet-accented title. */
  .suggestmenu { position: fixed; background: var(--panel); border: 1px solid var(--accent); padding: 6px 0; min-width: 170px; box-shadow: 0 8px 24px #0008; z-index: 20; }
  .suggesttitle { font: 400 11px "Silkscreen", monospace; color: var(--accent); padding: 3px 14px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .suggestmenu button { display: block; width: 100%; box-sizing: border-box; font: 400 11px "Silkscreen", monospace; background: transparent; border: 0; color: var(--ink); padding: 6px 14px; cursor: pointer; text-align: left; }
  .suggestmenu button:hover { background: #ffffff14; }
  .suggestmenu button.withdraw { color: var(--bad); }
  /* ADMIN MENU (Jon via Dispatcher, 2026-10-01: "the bottom-left ADMIN word becomes a small collapsible
     menu -- click to expand upward"): the word itself keeps its exact collapsed look; .adminmenu grows
     UP from it (bottom-anchored, same convention .moremenu uses top-anchored from the bar). */
  .adminword { font: 400 9px "Silkscreen", monospace; color: var(--ink); opacity: 0.45; background: transparent; border: 0; letter-spacing: 1px; z-index: 4; cursor: pointer; padding: 0; }
  .adminword:hover { opacity: 1; }
  .adminmenu { position: fixed; left: 14px; bottom: 34px; background: var(--panel); border: 1px solid var(--line); padding: 4px 0; min-width: 150px; box-shadow: 0 8px 24px #0008; z-index: 5; }
  .adminmenu a, .adminmenu button { display: flex; width: 100%; box-sizing: border-box; justify-content: space-between; gap: 18px; font: 400 10px "Silkscreen", monospace; background: transparent; border: 0; color: var(--ink); padding: 5px 14px; cursor: pointer; text-align: left; text-decoration: none; }
  .adminmenu a:hover, .adminmenu button:hover { background: #ffffff14; }
  .adminmenu .k { opacity: 0.45; }
  .adminmenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
  .adminmenu button.bad { color: var(--bad); }
  .adminmenu button.bad.confirming { background: var(--bad); color: var(--on-solid); }
  .storytellerReadout { position: fixed; right: 8px; bottom: 8px; font: 11px/1.4 "Atkinson Hyperlegible", monospace; color: var(--ink); background: #0009; padding: 6px 8px; white-space: pre; z-index: 4; pointer-events: none; }
  /* Jon: the panel could extend above the top of the viewport with no clamp when .strip doesn't sit near
     the top of the page (e.g. the .desktop filler squeezed short) -- position:fixed with real top/bottom
     anchors guarantees it always fits the viewport regardless of where .strip actually is; .buildgrid's
     existing overflow-y:auto scrolls internally when the grid itself is taller than the space between them. */
  /* UI REDESIGN (decision 9, 2026-10-01): the Council panel (this element, repurposed by renderShop() --
     see THE COUNCIL comment below) sized to the FULL viewport height always, empty ideas or not. Sizes to
     its content now (max-height, not a bottom anchor); .buildgrid's own overflow-y:auto still scrolls
     internally on the rare day there really are more ideas than fit. */
  .shop { position: fixed; right: 8px; top: 60px; max-height: calc(100vh - 68px); width: min(360px, calc(100vw - 32px)); background: var(--panel); border: 2px solid var(--line); padding: 10px; display: grid; grid-template-rows: auto 1fr; gap: 6px; box-shadow: 0 8px 24px #0008; }
  .shop h2 { font: 400 12px "Silkscreen", monospace; margin: 0; color: var(--warm); }
  /* Crew roster (Jon, via games-41): same fixed-position pattern as .shop above -- always fits the
     viewport regardless of where .strip sits, its list scrolls internally when it's taller than the space. */
  /* Jon: "The crew panel should only expand as far as needed" -- same fix as #shop (DESIGN_CHRONICLE's
     fixed-panel pattern): size to its rows, max-height caps it at the viewport (not a fixed bottom:8px that
     always spans full height regardless of crew size), .rosterlist's own overflow-y:auto scrolls beyond that. */
  .roster { position: fixed; right: 8px; top: 60px; max-height: calc(100vh - 68px); width: min(260px, calc(100vw - 32px)); background: var(--panel); border: 2px solid var(--line); padding: 10px; display: grid; grid-template-rows: auto 1fr; gap: 6px; box-shadow: 0 8px 24px #0008; font-size: 12px; }
  .roster .row { display: flex; gap: 4px; align-items: center; }
  .rosterlist { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
  .rosterrow { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; background: #0004; border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; }
  .rosterrow:hover { background: #0006; }
  .rline1 { display: flex; align-items: baseline; gap: 6px; }
  .rosterrow .rname { font: 400 9px "Silkscreen", monospace; color: var(--ink); }
  .rosterrow .rrole { font-size: 10px; font-weight: 400; color: var(--soft); }
  .rosterrow .rstatus { font-size: 10px; color: var(--soft); }
  .rosterrow.following { border-color: var(--accent); background: var(--accent-wash); }
  .rosterrow.following .rname::before { content: '\25CF'; color: var(--accent); margin-right: 6px; }
  /* LOG + CHRONICLE (DESIGN_CHRONICLE.txt § 5, Builder2's part): same fixed-panel pattern as .roster. */
  .chronlog, .chronbook { width: min(320px, calc(100vw - 32px)); }
  .chronchips { display: flex; flex-wrap: wrap; gap: 4px; }   /* layout only -- the chips themselves are .ctab (Dispatcher, 2026-10-03: shared tab style) */
  .chronlist { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
  .chronline { padding: 4px 6px; background: #0004; border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; font: 10px/1.4 monospace; color: var(--ink); }
  .chronline:hover { background: #0006; }
  .chronbody { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
  .chronday h3 { font: 400 10px "Silkscreen", monospace; margin: 0 0 2px; color: var(--warm); }
  .chronday p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--ink); white-space: pre-line; }
  .chronday .keeper { font-size: 10px; color: var(--soft); margin-top: 2px; }
  /* CHRONICLE unread marker (games-ad, Jon: "a big part of how the player knows what the game is doing"
     -- lit whenever entries.length > st.chronicleRead, cleared on open). Jon's revision: a pulsing glow,
     not a static badge -- 4 baked pixel-art frames (chronicleGlowFrame, topdown.html) swapped by a plain
     setInterval, not CSS animation/transition and not the canvas render loop. */
  #chroniclebtn, #buildbtn { position: relative; }
  /* NEW-THING GLOW v3 (Thriller, 2026-10-05) -- the LOOK half of new_glow.txt. Jon: "when we have a new button, to have it
     light up until the player has touched it", "that should also be our indicator for new things in the council menu".
     CONTRACT for the mechanism (Builder 2): add class `isnew` to the element; remove it when the player touches it. That is
     all. Works on: a top-bar button or pill, a council row (.cidea, .congoingrow), a Log line (.chronline) and a Chronicle
     day entry (.chronday). Replaces the council ember dot and the chronicle pixel-glow dot (one language for "new").
     The colour is the palette's lamplight warm, NOT the violet accent (violet = selected) and NOT red (= problem).
     Day and night: the ring + face wash carry it on a bright ground, the halo carries it on a dark one; nothing is retuned. */
  :root { --new: #f4c05a; --new-ring: #f4c05ad9; --new-wash: #f4c05a2e; }
  .isnew { border-color: var(--new) !important; background-image: linear-gradient(var(--new-wash), var(--new-wash)) !important;
           box-shadow: 0 0 0 2px var(--new), 0 0 8px 3px #f4c05a99, 0 0 22px 8px #f4c05a40; animation: newbreath 2.8s ease-in-out infinite; position: relative; z-index: 1; }
  .hud .isnew, .hud .isnew.pill { opacity: 1; }   /* a pill normally sits dimmed; a new one is fully lit */
  @keyframes newbreath {
    0%, 100% { box-shadow: 0 0 0 2px var(--new), 0 0 8px 3px #f4c05a99, 0 0 22px 8px #f4c05a40; }
    50%      { box-shadow: 0 0 0 2px #f4c05ab3, 0 0 4px 1px #f4c05a55, 0 0 12px 4px #f4c05a1f; } }
  /* a Chronicle day has no box of its own: the glow gets a carrier -- a warm left rule, the wash, a soft halo, the day heading
     lit. Same breath, half strength (it is a reading surface). */
  .chronday.isnew { padding: 6px 10px 6px 10px; border-left: 3px solid var(--new) !important; background: #f4c05a1f; box-shadow: 0 0 10px 2px #f4c05a40, inset 0 0 14px #f4c05a1a; animation: newbreath-soft 2.8s ease-in-out infinite; }
  .chronday.isnew h3 { color: var(--new); }
  @keyframes newbreath-soft {
    0%, 100% { box-shadow: 0 0 10px 2px #f4c05a40, inset 0 0 14px #f4c05a1a; }
    50%      { box-shadow: 0 0 5px 1px #f4c05a26, inset 0 0 8px #f4c05a10; } }
  /* reduced motion: no breath, the halo holds at three-quarter strength */
  @media (prefers-reduced-motion: reduce) {
    .isnew { animation: none; box-shadow: 0 0 0 2px var(--new-ring), 0 0 6px 2px #f4c05a80, 0 0 17px 6px #f4c05a30; }
    .chronday.isnew { animation: none; box-shadow: 0 0 8px 2px #f4c05a33, inset 0 0 12px #f4c05a14; } }
  .buildgrid { overflow-y: auto; display: grid; grid-template-columns: 1fr; gap: 6px; align-content: start; }
  /* THE COUNCIL (DESIGN_COUNCIL.txt § 3, 4, 8): the Ideas/Approved tabs replace .shop's build grid content
     when a council is running (#shop stays the same fixed panel; only what renderShop() writes into it
     changes). No help text (spec item 8) -- names, kinds and numbers only. */
  .ccouncilbody { display: grid; grid-template-rows: auto auto 1fr; gap: 6px; min-height: 0; }
  .ctabs { display: flex; gap: 4px; }
  .ctab { padding: 3px 10px; font: 400 9px "Silkscreen", monospace; background: #0004; border: 1px solid var(--line); color: var(--soft); cursor: pointer; }
  .ctab.on { color: var(--ink); border-color: var(--accent); background: var(--accent-wash); }
  /* ONGOING (SITES spec, Jon: "a little ONGOING section with their progress, and you can click them and go
     there"): compact rows, a thin progress bar along each row's OWN bottom edge (Jon's exact ask -- not
     beside the text), full width. */
  .congoing { display: flex; flex-direction: column; gap: 4px; max-height: 120px; overflow-y: auto; }
  .congoingrow { position: relative; padding: 5px 8px 7px; background: #0004; border: 1px solid var(--line); cursor: pointer; overflow: hidden; }
  .congoingrow:hover { border-color: var(--accent); }
  .congoingrow .cname { font: 400 9px "Silkscreen", monospace; color: var(--ink); display: block; }
  .congoingrow .sub { color: var(--soft); }
  .congoingrow .cbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #ffffff1a; display: block; }
  .congoingrow .cbarfill { display: block; height: 100%; background: var(--progress); }
  .cidea { display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 6px 8px; text-align: left; background: #0004; border: 1px solid var(--line); }
  .cidea .info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
  .cidea .name { font: 400 9px "Silkscreen", monospace; color: var(--ink); }
  .cidea .desc { font-size: 10px; color: var(--soft); line-height: 1.3; }
  .cidea .icon-wrap { position: relative; width: 28px; height: 28px; flex-shrink: 0; }
  .cidea .icon-wrap img.icon { position: absolute; inset: 0; width: 28px; height: 28px; image-rendering: pixelated; }
  .cidea .reorder { display: flex; flex-direction: column; gap: 2px; }
  .cidea .reorder button { padding: 1px 5px; font-size: 10px; line-height: 1; }
  .cidea.started { opacity: .55; }
  /* COUNCIL CLARITY (Planner's brief, C): the queue row's action side -- a Place/Go button beside the
     existing up/down reorder, so "the player decides where, and then it starts" reads as one control. */
  .cidea .cactions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .cidea .cplace, .cidea .cgo { padding: 3px 9px; font: 400 9px "Silkscreen", monospace; background: var(--accent-wash); border: 2px solid var(--accent); color: var(--ink); cursor: pointer; }
  .cidea .cplace:hover, .cidea .cgo:hover { background: var(--accent); color: var(--on-solid); }
  .cidea .cstatus { font-size: 10px; color: var(--soft); white-space: nowrap; }
  /* THE COUNCIL CARD: appears only while a ring is gathered (DESIGN_COUNCIL § 2, § 8). */
  .councilcard { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); background: var(--panel); border: 2px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 8px 24px #0008; z-index: 6; }
  .councilcard h2 { font: 400 11px "Silkscreen", monospace; margin: 0; color: var(--warm); display: flex; align-items: center; gap: 8px; }
  .councilpie { width: 16px; height: 16px; border-radius: 50%; background: #0009; flex-shrink: 0; }
  /* COUNCIL CLARITY (Planner's brief, C: "I need to know what they're standing for"): stacked, left-
     aligned cards replace the old small centered name/backers chips -- there's a real title/cost/why/
     For/Against to read now, not just a name. */
  .councilcards { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
  .councilidea { display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 2px; padding: 7px 9px; background: #0004; border: 2px solid var(--line); cursor: pointer; }
  .councilidea:hover { background: #0006; }
  .councilidea.picked { border-color: var(--accent); background: var(--accent-wash); }
  .councilidea .ctitle { font: 400 9px "Silkscreen", monospace; color: var(--ink); }
  .councilidea .ccost { font-size: 10px; color: var(--warm); }
  .councilidea .cwhy { font-size: 10px; color: var(--soft); }
  .councilidea .csupport { font-size: 10px; color: var(--progress); }
  .councilidea .cagainst { font-size: 10px; color: var(--bad); }
  .councilconduct { display: flex; gap: 6px; margin-top: 6px; justify-content: center; }
  .councilconductbtn { padding: 6px 12px; font: 400 9px "Silkscreen", monospace; background: #0004; border: 2px solid var(--line); cursor: pointer; }
  .councilconductbtn.picked { border-color: var(--accent); background: var(--accent-wash); }
  .tile { display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 6px 8px; position: relative; text-align: left; }
  .tile .info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
  .tile .name { font: 400 9px "Silkscreen", monospace; color: var(--ink); }
  .tile .desc { font-size: 10px; color: var(--soft); line-height: 1.3; }
  .tile .bottom-row { display: flex; align-items: center; gap: 8px; }
  .tile:disabled { opacity: .4; }
  .tile .icon-wrap { position: relative; width: 32px; height: 32px; }
  .tile .icon-wrap img.icon { position: absolute; inset: 0; width: 32px; height: 32px; image-rendering: pixelated; }
  .tile .pie { position: absolute; right: -4px; bottom: -4px; width: 12px; height: 12px; border-radius: 50%; background: #0009; }
  .tile .dur { font-size: 10px; color: var(--soft); }
  .tile .cost { display: flex; gap: 6px; font-size: 11px; font-variant-numeric: tabular-nums; }
  .tile .cost span { display: inline-flex; align-items: center; gap: 2px; }
  .tile .cost img { width: 12px; height: 12px; image-rendering: pixelated; }
  .tile .cost .short { color: var(--bad); }
  /* POP-UP LANE (Jon: a transient message must never overlap open UI -- cards, panels, the opening line,
     Roo): toasts now live bottom-centre, in their own fixed band ABOVE the opening-line lane (which sits at
     bottom:36px) -- two lanes stacked, never the same vertical space, queued one at a time rather than one
     new message silently cutting off whatever was already showing. */
  .toast { position: absolute; left: 16px; right: 16px; bottom: 64px; text-align: center; pointer-events: none; font: 400 10px "Silkscreen", monospace; color: var(--accent); text-shadow: 0 1px 0 #000c, 0 0 6px #0008; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
  @media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
  /* THE OPENING LINE (UI_REDESIGN.html decision 8): the archivist's first entry, once, across the bottom. */
  .openingLine { position: absolute; left: 16px; right: 16px; bottom: 36px; text-align: center; pointer-events: none; font: 400 12px "Silkscreen", monospace; color: #fff; text-shadow: 0 1px 0 #000c, 0 0 6px #0008; letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 2s linear; }
  @media (prefers-reduced-motion: reduce) { .openingLine { transition: none; } }
  /* CARDS IN ONE REGISTER (UI_REDESIGN.html decision 7, approved 2026-10-01): a dark translucent panel,
     white text, red only for a problem -- the plot card's own register, made the model for every card and
     drawer. Overrides each panel's own background/border/shadow below; their position/size/layout rules
     are untouched. */
  .botcard, .plotcard, .councilcard, .roster, .chronbook, .chronlog, .shop, #accountcard, .sparescard {
    background: #14101acc; border: 1px solid #ffffff22; color: #fff; box-shadow: 0 2px 18px #0008; backdrop-filter: blur(2px);
  }
  /* SCROLLABLE PANELS (Jon: "Can't scroll down in the Council window... an ongoing issue with windows"):
     every panel/card gets a max-height within the viewport plus its own overflow-y:auto, so content that
     doesn't fit scrolls INSIDE the panel instead of running off-screen with no way to reach it. .shop/
     .roster (.chronlog/.chronbook share it)/.infoCard (.reportCard shares it) already had this; these
     didn't. */
  .sparescard, .councilcard, .moremenu, .adminmenu { max-height: calc(100vh - 20px); overflow-y: auto; }
  /* STANDARD CARD SIZE (Jon, 2026-10-05: "the vertical space on cards sometimes changes due to the length of sentences.
     Things sometimes become invisible at the bottom of the card. We should probably just have a standard size."): one
     fixed height per card type, never grown by text. Three parts (cards.js frameCard): .cardHead and .cardFoot never
     shrink (the title, and the buttons / tabs, so they are always visible); .cardBody takes the rest and scrolls on its
     own, its bottom edge fading while there is more below (.more). The heights come from the longest real content
     (2026-10-05: the Parts tab with a Better row on every slot; a site card with every status line; a 4-line
     description), so almost no card scrolls; the viewport clamp (calc(100vh - 20px) here, clampCard's max-height)
     still wins on a short screen. TRIP-WIRE: a new card type or a much longer description re-measures these. */
  :root { --card-bot-h: 374px; --card-obj-h: 196px; }
  .botcard, .plotcard { overflow: hidden; }
  .botcard { height: min(var(--card-bot-h), calc(100vh - 20px)); }
  .plotcard { height: min(var(--card-obj-h), calc(100vh - 20px)); }
  .botcard .cardHead, .plotcard .cardHead, .botcard .cardFoot, .plotcard .cardFoot { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; }
  .botcard .cardBody, .plotcard .cardBody { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
  .botcard .cardBody.more, .plotcard .cardBody.more { -webkit-mask-image: linear-gradient(#000 calc(100% - 18px), transparent); mask-image: linear-gradient(#000 calc(100% - 18px), transparent); }
  .botcard .cardFoot, .plotcard .cardFoot { padding-top: 6px; border-top: 1px solid #ffffff14; }
  .botcard b, .plotcard b, .councilcard h2, .roster b, #accountcard b, .shop h2 { color: #fff; }
  .botcard button, .plotcard button, .councilcard button, .roster button, #accountcard button, .shop button { background: transparent; border: 1px solid #ffffff33; color: #fff; }
  .rd-bad, .botcard .bad, .plotcard .bad, .councilcard .bad { color: var(--bad) !important; }
  /* DESIGN_BOTS "making them yours": a tiny popover, name + paint swatches only, never stats */
  /* CARD CLAMP (Dispatcher/Jon 2026-10-04): `bottom: calc(100% + 6px)` used to sit here alongside `left` --
     dead weight now that anchorPopoverNear/clampCard (cards.js) fully own this card's position every time
     it opens, and actively harmful: with BOTH an inline `top` (from JS) and this CSS `bottom` set at once,
     the browser sizes the box from the TOP/BOTTOM SPAN instead of its real content, which is what let a
     tall card collapse to the wrong height before ever being measured for the clamp. `position: absolute`
     stays -- it's still what lets JS's own left/top mean anything at all on a frame the clamp decides not
     to intervene on (the common case, a card that already fits). */
  .botcard { position: absolute; left: 8px; width: min(260px, calc(100vw - 32px)); background: var(--panel); border: 2px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 8px 24px #0008; }
  /* Thriller (2026-10-01): the name field was cut ("Gathers for t|") -- grows to fill the row, "another"
     and close stay their natural size (min-width: 0 is what lets a flex child actually shrink/grow past
     its content size instead of the row just overflowing). */
  .botcard input[type=text] { font: 400 10px "Silkscreen", monospace; background: #1a1420; color: var(--ink); border: 1px solid var(--line); padding: 4px 6px; flex: 1; min-width: 0; box-sizing: border-box; }
  /* NICKNAMES (Jon, 2026-10-01): the nickname is the card's real title -- big, un-editable (derived from
     the name); the full name stays the editable field underneath, smaller/dimmer. */
  .botcard .botNick { font: 400 13px "Silkscreen", monospace; color: #fff; }
  .botcard #botNameInput { font-size: 11px; opacity: 0.75; }
  .botcard .row { display: flex; gap: 4px; align-items: center; }
  .botcard .lbl { font-size: 11px; color: var(--soft); width: 32px; flex-shrink: 0; }
  .botcard .swatch { width: 20px; height: 20px; border: 2px solid transparent; cursor: pointer; border-radius: 3px; }
  .botcard .swatch.sel { border-color: var(--warm); }
  /* PARTS TAB CRAMPING FIX (Dispatcher, 2026-10-04): a single flex .row forced the slot word, part name,
     condition bar and description onto one line at the card's 260px width -- the slot word itself wrapped
     ("Moves / on") and the card ran off-screen. Each slot is now its own two-line .partRow: a .head line
     (slot word, fixed-width + nowrap so it never wraps; icon; name; bar) and a full-width .desc line below
     it. The card's body scrolls on its own (.cardBody) so the card itself never exceeds the viewport. */
    /* (.cardBody / the card's height: the STANDARD CARD SIZE block above) */
  .botcard .partRow { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; border-top: 1px solid #ffffff14; }
  .botcard .partRow:first-child { padding-top: 0; border-top: none; }
  .botcard .partRow .head { display: flex; gap: 4px; align-items: center; }
  .botcard .slotw { font: 400 8px "Silkscreen", monospace; text-transform: uppercase; letter-spacing: .03em; color: var(--soft); width: 56px; flex-shrink: 0; white-space: nowrap; }
  .botcard .partRow .desc { font-size: 11px; color: var(--soft); }
  /* a plot's info + crop-choice popover (Jon: clicking a plot must never destroy a growing plant) */
  /* CARD CLAMP (Dispatcher/Jon 2026-10-04): same dead/harmful `bottom: calc(100% + 6px)` removed here as
     .botcard's own rule just above -- this class also backs #objectcard/#crittercard/#sitecard. */
  .plotcard { position: absolute; left: 8px; width: min(220px, calc(100vw - 32px)); background: var(--panel); border: 2px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 8px 24px #0008; font-size: 12px; }
  .plotcard .row { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
  /* scrap spares list (Dispatcher/Jon: "click the scrap counter... turn spare parts into scrap") -- a
     small HUD popover, not world-anchored, so it sits fixed under the pill row rather than using
     anchorPopoverNear (which needs a world-space subject). */
  .sparescard { position: absolute; right: 8px; top: 34px; width: min(200px, calc(100vw - 32px)); background: var(--panel); border: 2px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 8px 24px #0008; font-size: 12px; z-index: 5; }
  /* PASSWORD FIELDS (Jon's next-update ask): a show/hide toggle beside every password input, a confirm
     field whenever one is SETTING a new password. feedback_no_rainbow_text: the inline rule line is soft
     by default, red only once the current value actually fails it. */
  #accountcard input[type=password], #accountcard input[type=text] { font: 12px "Atkinson Hyperlegible", sans-serif; background: #1a1420; color: var(--ink); border: 1px solid var(--line); padding: 4px 6px; box-sizing: border-box; flex: 1; min-width: 0; }
  #accountcard .pwRow { display: flex; gap: 4px; align-items: center; }
  #accountcard .pwToggle { font-size: 10px; padding: 2px 6px; flex-shrink: 0; }
  #accountcard .pwRule { font-size: 10px; margin-top: -2px; }
  #accountcard .pwRule.bad { color: var(--bad); }
  .sparescard .row { display: flex; gap: 6px; align-items: center; }
  .sparescard .row img { width: 16px; height: 16px; image-rendering: pixelated; }
  .sparescard .row .grow { flex: 1; }
  .sparescard button { padding: 2px 6px; font-size: 11px; }
  .pauseMark { position: absolute; left: 8px; top: 6px; font: 400 10px "Silkscreen", monospace; color: var(--warm); background: #0009; padding: 3px 8px; letter-spacing: .05em; text-transform: uppercase; }
  /* OPEN ELSEWHERE (Jon: "confused me" -- not a shouty uppercase label any more, a plain sentence plus a
     real way out). A small panel, not a one-line badge, since it now carries both the explanation and the
     button. */
  .openElsewhereMark { position: absolute; left: 8px; top: 32px; font: 13px "Atkinson Hyperlegible", sans-serif; color: var(--ink); background: #1a1420ee; border: 1px solid #ffffff33; padding: 8px 10px; max-width: 260px; display: flex; flex-direction: column; gap: 6px; }
  /* OPEN ELSEWHERE, centred notice (Jon, 2026-10-03): same .playerAlert panel look, its own row for the
     two buttons. z-index above .playerAlert (55) -- it's a protocol-level lock, not site content, and must
     stay on top of (or at least never be hidden behind) any alert the account also has queued. */
  .openElsewhereModal { z-index: 56; }
  .openElsewhereModal .row { display: flex; gap: 10px; justify-content: center; }
  /* "Not here": the game stays visible but dimmed, a quiet reminder it's paused and not the active tab. */
  body.openElsewhereDimmed .strip, body.openElsewhereDimmed #editorPanel { filter: brightness(0.45) saturate(0.6); }
  /* OUT OF DATE (Jon: "the page knows what it loaded"): same quiet corner-note look as the open-elsewhere
     mark above, its own corner (bottom-left) so the two never stack if both are ever true at once. */
  .outOfDateMark { top: auto; bottom: 8px; }
  /* LOGGED OUT (Jon via Dispatcher, 2026-10-03): its own corner (top-right) so it never stacks with the
     open-elsewhere/out-of-date marks, which both sit on the left. */
  .loggedOutMark { left: auto; right: 8px; top: 32px; }
  .openElsewhereMark button { font: 400 9px "Silkscreen", monospace; background: var(--panel); color: var(--ink); border: 1px solid #ffffff33; padding: 4px 9px; cursor: pointer; align-self: flex-start; }
  .openElsewhereMark button:hover { border-color: var(--accent); }
  /* THE TITLE SCREEN (Dispatcher's brief, 2026-10-01): a first-visit-only overlay over the ALREADY-RUNNING
     world (never a loading gate -- the colony behind it is real and moving, same as every later visit). A
     dim backdrop keeps it readable without hiding that the world is alive underneath. */
  .titleScreen { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: #0d0a12b0; }
  .titleScreen .panel { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: min(420px, calc(100vw - 32px)); padding: 28px 24px; background: #1c1624dd; border: 2px solid var(--line); }
  .titleScreen h1 { font: 400 27px "Silkscreen", monospace; color: var(--accent); margin: 0; letter-spacing: 1px; }
  .titleScreen .blurb { font: 14px/1.5 "Atkinson Hyperlegible", sans-serif; color: var(--ink); margin: 0; }
  .titleScreen .startbtn { font: 400 12px "Silkscreen", monospace; background: var(--accent); color: var(--on-solid); border: none; padding: 10px 28px; cursor: pointer; }
  .titleScreen .startbtn:hover { filter: brightness(1.1); }
  .titleScreen .loginlink { font: 12px "Atkinson Hyperlegible", sans-serif; color: var(--soft); background: none; border: none; cursor: pointer; text-decoration: underline; padding: 0; }
  .titleScreen .loginlink:hover { color: var(--ink); }
  .titleScreen .mark { width: 28px; height: 28px; opacity: .8; margin-top: 4px; }
  /* WORLD UPDATE PROMPT close X (Jon, 2026-10-03): scoped to #worldUpdatePrompt specifically -- .titleScreen
     is shared with the REAL title screen (#titleScreen), which must never get a close X. */
  #worldUpdatePrompt .panel { position: relative; }
  /* PLAYER ALERT (player_alert.txt, Jon, 2026-10-03): same full-screen-dim-plus-centred-panel shape as
     .titleScreen, its own id so a title-screen change never touches this -- NOT closed by a backdrop
     click alone (Jon: "has to be clicked away"), only the X or the OK button. */
  .playerAlert { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; background: #0d0a12cc; }
  .playerAlert .panel { position: relative; display: flex; flex-direction: column; gap: 14px; text-align: center; max-width: min(440px, calc(100vw - 32px)); padding: 28px 24px; background: #1c1624dd; border: 2px solid var(--accent); box-shadow: 0 8px 32px #000a; }
  .playerAlert #playerAlertText { font: 15px/1.6 "Atkinson Hyperlegible", sans-serif; color: var(--ink); white-space: pre-line; }
  .playerAlert blockquote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: #00000033; color: var(--soft); font: 13px/1.5 "Atkinson Hyperlegible", sans-serif; text-align: left; white-space: pre-line; }
  .playerAlert .sig { display: flex; align-items: center; justify-content: center; gap: 6px; font: 400 12px "Silkscreen", monospace; color: var(--accent); }
  .playerAlert .sig canvas { image-rendering: pixelated; width: 24px; height: 24px; }
  .playerAlert .acctbtn { align-self: center; font: 400 12px "Silkscreen", monospace; background: transparent; color: var(--accent); border: 1px solid var(--accent); padding: 8px 24px; cursor: pointer; }
  .playerAlert .acctbtn:hover { background: var(--accent-wash); }
  .playerAlert .okbtn { align-self: center; font: 400 12px "Silkscreen", monospace; background: var(--accent); color: var(--on-solid); border: none; padding: 10px 32px; cursor: pointer; }
  .playerAlert .okbtn:hover { filter: brightness(1.1); }
  .infoCard { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 45; width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 480px); overflow-y: auto; background: var(--panel); border: 2px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 8px 24px #0008; }
  .infoCard h2 { font: 400 12px "Silkscreen", monospace; margin: 0; color: var(--accent); }
  .infoCard .entry { border-top: 1px solid var(--line); padding-top: 8px; }
  .infoCard .entry:first-of-type { border-top: none; padding-top: 0; }
  .infoCard .entry .when { font-size: 10px; color: var(--soft); }
  .infoCard .entry .body { font: 13px/1.5 "Atkinson Hyperlegible", sans-serif; color: var(--ink); margin-top: 2px; }
  /* REPORT A PROBLEM: reuses .infoCard's panel (title/padding/scroll), adds plain form controls. */
  .reportCard select, .reportCard textarea { font: 13px "Atkinson Hyperlegible", sans-serif; background: var(--ground); color: var(--ink); border: 1px solid var(--line); padding: 6px 8px; width: 100%; box-sizing: border-box; }
  .reportCard textarea { resize: vertical; min-height: 70px; }
  .reportCard label.row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--soft); }
  .reportCard .err { color: var(--bad); font-size: 12px; min-height: 1.2em; }
  .reportCard .ok { color: var(--progress); font-size: 12px; }
  .reportCard .actions { display: flex; gap: 8px; justify-content: flex-end; }
  .reportCard .actions button[type=submit] { background: var(--accent-wash); border: 2px solid var(--accent); color: var(--ink); font: 400 9px "Silkscreen", monospace; padding: 5px 12px; cursor: pointer; }
  .reportCard .actions button[type=submit]:hover { background: var(--accent); color: var(--on-solid); }
  .reportCard .actions button[type=submit]:disabled { opacity: .5; cursor: default; }
