/* Foundation Up · journey additions on top of the shared shell (fullscreen.css) and the design tokens (shared.css).
   Targets are at least 44px (the engine's TOUCH_TARGET_MIN), focus is always visible, and motion stops under reduced motion. */
[data-surface="journey"] .game-top { gap: 12px; }
[data-surface="journey"] .game-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.back-link { color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; font-size: 12px; }
.back-link:hover { background: #ffffff19; }
.back-link:focus-visible { outline: 2px solid hsl(var(--vf-ring)); outline-offset: var(--vf-ring-offset); }

.game-board .layer.chosen-target { box-shadow: inset 0 0 0 2px var(--gold); }
.game-board .target-button { min-height: 32px; }
.game-board .layer > img { object-fit: contain; }

/* Inspector sections */
.four-states { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #ffffff06; }
.four-states dl { margin: 6px 0 0; display: grid; gap: 8px; }
.four-states dt { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.four-states dd { margin: 2px 0 0; font-size: 13px; line-height: 1.45; }
.next-task-line { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; }
.next-task-line .text-link { text-align: left; min-height: 44px; display: inline-flex !important; align-items: center; }
.blocked-list { margin: 8px 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.blocked-list li { margin: 4px 0; }
.blocked-list button { margin-left: 4px; min-height: 36px; }
.journey-task .target { font-size: 13px; }
.journey-task .price, .claim-group + .muted { font-size: 12px; }
.unit-prompt { font-weight: 600; margin-top: 8px; }
.task-choices { display: grid; gap: 8px; margin-top: 8px; }
.task-choices button { text-align: left; min-height: 44px; line-height: 1.4; }
.evidence { margin: 8px 0; font-size: 12px; }
.evidence summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.evidence-table { border-collapse: collapse; margin: 6px 0; width: 100%; display: block; overflow-x: auto; }
.evidence-table caption { text-align: left; font-weight: 700; padding: 2px 0; }
.evidence-table th, .evidence-table td { border: 1px solid var(--line); padding: 3px 6px; text-align: left; white-space: nowrap; }
.claim-group h4 { margin: 10px 0 4px; text-transform: capitalize; font-family: Georgia, serif; font-weight: 500; }
.ledger { padding-left: 18px; }
.ledger li { margin: 6px 0; display: flex; flex-direction: column; }
.log li.journey-entry strong { color: var(--mint); }
.pill.danger { color: var(--danger); border-color: #efad9155; }
.journey-result ul { padding-left: 18px; font-size: 13px; line-height: 1.5; }
#modalbody fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; padding: 8px 12px; }
#modalbody .check { display: flex; gap: 8px; align-items: flex-start; min-height: 44px; }

/* Connections: five states, each with its own word, its own mark and its own status token, so no state is told by
   colour alone. Undiscovered is a dashed hollow ring; discovered (seen, ready for Operations) a half-filled ring;
   blocked (seen, waiting on a card or path) a barred ring; broken by an event a triangle; working a full disc.
   Colours are the design engine's status tokens; nothing here is a new colour. */
.conn-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 9px 3px 7px; border: 1px solid currentColor; }
.conn-pill::before { content: ""; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; }
.conn-undiscovered { color: var(--muted); border-style: dashed; border-color: hsl(var(--vf-status-neutral)); }
.conn-undiscovered::before { border: 1.5px dashed currentColor; }
.conn-discovered { color: hsl(var(--vf-status-info)); border-color: hsl(var(--vf-status-info) / .6); }
.conn-discovered::before { border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.conn-blocked { color: hsl(var(--vf-status-warning)); border-color: hsl(var(--vf-status-warning) / .6); }
.conn-blocked::before { border: 1.5px solid currentColor; background: linear-gradient(135deg, transparent 40%, currentColor 40% 60%, transparent 60%); }
/* The danger token measures 4.0:1 as 11px text on the dialog ground, so Broken's WORD is set in the ink and the
   token carries the mark, the edge and the tint (each a non-text mark, which needs 3:1). */
.conn-broken { color: var(--ink); border-color: hsl(var(--vf-status-danger)); background: hsl(var(--vf-status-danger) / .16); }
.conn-broken::before { width: 11px; border-radius: 0; background: hsl(var(--vf-status-danger)); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.conn-working { color: hsl(var(--vf-status-success)); border-color: hsl(var(--vf-status-success) / .65); background: hsl(var(--vf-status-success) / .12); }
.conn-working::before { background: currentColor; }
.conn-item { border-left: 3px solid var(--line); }
.conn-item[data-conn-state="undiscovered"] { border-left-style: dashed; border-left-color: hsl(var(--vf-status-neutral)); }
.conn-item[data-conn-state="discovered"] { border-left-color: hsl(var(--vf-status-info)); }
.conn-item[data-conn-state="blocked"] { border-left-color: hsl(var(--vf-status-warning)); }
.conn-item[data-conn-state="broken"] { border-left-color: hsl(var(--vf-status-danger)); }
.conn-item[data-conn-state="working"] { border-left-color: hsl(var(--vf-status-success)); }

/* A full board (38 homes) fits a 1440x900 table: rows hug their cards, and a finished run with an empty hand
   gives the hand's height back to the board. The layer list stands whole (`Strata whole`, @vf/game-kit 0.110.0): where
   it would not, the kit's frame goes short and the bars travel, so the list never scrolls inside the board, and the
   board's own more-below fade (`fu-more-below`, 2026-10-20) is retired with it (2026-11-16). */
@media (min-width: 1081px) { [data-surface="journey"] .game-board .layer { grid-template-columns: 42px 166px minmax(0, 1fr) auto; column-gap: 8px; } }
[data-surface="journey"] .game-orgs button { min-height: 44px; }
[data-surface="journey"] .game-shell.table-ended:not(:has(.vfg-hand__card)) { --game-tray-height: 52px; }

/* The rail toggle exists for the phone's sheet only; on a wider table the rail is always in view. */
.rail-toggle { display: none; }
.rail-toggle[aria-expanded="true"] { border-color: var(--gold); background: #e3bc7520; }
[data-surface="journey"] .back-link { display: block; flex: 0 1 auto; min-width: 0; line-height: 22px; overflow: hidden; text-overflow: ellipsis; }

/* Tablet portrait: the hand gets the height the board does not need, so the fan stays under "Shared hand". */
@media (min-width: 601px) and (max-width: 850px) and (min-height: 700px) {
  :root { --game-tray-height: clamp(200px, 27vh, 290px); }
}
@media (max-width: 760px) {
  [data-surface="journey"] .game-top { display: flex; justify-content: space-between; }
  [data-surface="journey"] .game-brand { flex: 1 1 auto; min-width: 0; }
  [data-surface="journey"] .game-top nav { flex: 0 0 auto; min-width: 0; overflow: visible; }
  [data-surface="journey"] .game-top nav button { flex: 0 0 auto; }
  [data-surface="journey"] .game-brand .eyebrow { display: none; }
  [data-surface="journey"] .game-brand h1 { font-size: 16px; white-space: nowrap; }
}

/* A touch screen at any width, and every phone: each target is at least 44px (TOUCH_TARGET_MIN). The hand's cards keep
   the kit's trim. The key line is shown or hidden by the device alone, never by width (the engine's one query on
   data-vf-when="keys"; Threshold's ruling k112 section 2), so it has no rule here. */
@media (pointer: coarse), (max-width: 600px) {
  [data-surface="journey"] .game-shell button:not(.vfg-hand__card), [data-surface="journey"] .back-link,
  #modal button, #binder-modal .binder-heading button, .binder-inspect button { min-height: 44px; }
  [data-surface="journey"] .game-board .node, [data-surface="journey"] .game-board .target-button { min-height: 44px; }
  [data-surface="journey"] .game-tray { grid-template-rows: 46px minmax(0, 1fr); }
  [data-surface="journey"] .tray-head { height: 46px; }
  .blocked-list button { min-height: 44px; }
  #modal .close, [data-surface="journey"] .inspection-head button { min-width: 44px; }
}
@media (pointer: coarse) and (min-width: 601px) and (max-width: 850px) {
  :root, [data-surface="journey"] .game-shell { --game-header-height: 52px; --game-hud-height: 104px; }
  [data-surface="journey"] .game-hud { grid-template-rows: 44px 44px; }
}

/* Phones (390 and down to 320): one screen still. Header in two rows (the game's name, then the six controls in
   reach), the HUD in two (counters, then phases), the board full width, the shared hand always at the foot.
   The rail becomes a sheet over the layers, opened by "Details" in the board's top row and closed by the same
   control or Esc; the layers under it are hidden, not just covered, so focus cannot wander behind it.
   The hand's tray is about 262px tall on a 390x844 phone (31dvh; Threshold: the picked-up card needs the room to show
   its picture and name whole), never under 261px on a short phone (the phone hand, below); the board takes what is left
   and scrolls inside. */
@media (max-width: 600px) {
  :root, [data-surface="journey"] .game-shell { --game-header-height: 98px; --game-hud-height: 102px; --game-tray-height: clamp(261px, 31dvh, 290px); }
  [data-surface="journey"] .game-top { flex-wrap: wrap; align-content: center; gap: 2px 8px; padding: 3px 8px; }
  [data-surface="journey"] .game-brand { flex: 1 1 100%; min-height: 44px; gap: 10px; }
  /* The card games' control and the game's name share the first row; the nav keeps the second. */
  [data-surface="journey"] .game-top:has(.fu-finder) .game-brand { flex: 1 1 0; }
  [data-surface="journey"] .game-brand h1 { font-size: 19px; }
  [data-surface="journey"] .game-top nav { flex: 1 1 100%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 0; }
  [data-surface="journey"] .game-top nav button { min-width: 0; padding: 4px 2px; font-size: 11px; line-height: 1.15; white-space: normal; }
  [data-surface="journey"] .back-link { padding: 8px 10px; font-size: 12px; }

  [data-surface="journey"] .game-hud { grid-template-columns: minmax(0, 1fr); grid-template-rows: 44px 44px; gap: 4px; padding: 4px 8px 5px; align-content: center; }
  [data-surface="journey"] .game-hud .game-goal { display: none; }
  [data-surface="journey"] .game-counters { grid-row: 1; grid-column: 1; display: flex; justify-content: space-between; align-items: center; gap: 6px; min-width: 0; }
  [data-surface="journey"] .game-counters span { font-size: 11px; }
  [data-surface="journey"] .game-counters b { font-size: 15px; }
  [data-surface="journey"] .game-counters button { font-size: 12px; padding: 4px 10px; }
  [data-surface="journey"] .game-phases { grid-row: 2; grid-column: 1; }
  [data-surface="journey"] .game-phases button { padding: 4px; font-size: 12px; }

  [data-surface="journey"] .game-main { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 6px; position: relative; }
  [data-surface="journey"] .game-inspector { display: none; }
  [data-surface="journey"] .rail-open .game-inspector { display: block; position: absolute; inset: 62px 6px 6px; z-index: 9; box-shadow: 0 -10px 28px #000a; }
  [data-surface="journey"] .rail-open .game-board > .board-layers, [data-surface="journey"] .rail-open .game-board > .game-orgs { visibility: hidden; }
  [data-surface="journey"] .rail-toggle { display: inline-flex; align-items: center; }

  [data-surface="journey"] .game-board { padding: 5px; grid-template-columns: max-content minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "tools head" "layers layers" "orgs orgs"; row-gap: 5px; column-gap: 6px; }
  [data-surface="journey"] .board-heading { justify-content: flex-end; margin: 0; }
  [data-surface="journey"] .board-heading > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [data-surface="journey"] .board-heading .board-actions { gap: 4px; }
  [data-surface="journey"] .board-tools { flex-wrap: nowrap; gap: 4px; }
  [data-surface="journey"] .board-tools [data-action="tasks"] { display: none; }
  [data-surface="journey"] .board-tools button, [data-surface="journey"] .board-heading button { font-size: 11px; padding: 4px 8px; line-height: 1.1; white-space: normal; }
  [data-surface="journey"] .board-tools [data-action="gaps"] { max-width: 76px; }

  [data-surface="journey"] .game-board .layer { grid-template-columns: 24px minmax(0, 1fr) auto; grid-template-rows: auto auto; grid-template-areas: "art label target" "nodes nodes nodes"; gap: 3px 6px; padding: 2px 6px; margin: 0; min-height: 44px; align-items: center; }
  [data-surface="journey"] .game-board .board-layers { gap: 4px; }
  [data-surface="journey"] .game-board .layer > img { grid-area: art; width: 24px; height: 24px; }
  [data-surface="journey"] .game-board .layer .layer-label { grid-area: label; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
  [data-surface="journey"] .game-board .layer .layer-label small { display: inline; font-size: 9px; white-space: nowrap; }
  [data-surface="journey"] .game-board .layer h3 { font-size: 13px; margin: 0; }
  [data-surface="journey"] .game-board .nodes { grid-area: nodes; padding: 0; gap: 4px; }
  [data-surface="journey"] .game-board .nodes:has(> .empty) { display: none; }
  [data-surface="journey"] .game-board .node { font-size: 11px; padding: 4px 9px; max-width: 100%; }
  [data-surface="journey"] .game-board .layer .target-button { grid-area: target; grid-column: auto; grid-row: auto; font-size: 11px; padding: 4px 10px; }
  [data-surface="journey"] .game-board > .game-orgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  [data-surface="journey"] .org-chip { justify-content: space-between; padding: 3px 7px; font-size: 10px; white-space: normal; text-align: left; }
  [data-surface="journey"] .game-orgs .org-chip span strong { font-size: 11px; }
  [data-surface="journey"] .game-orgs .org-chip span small { font-size: 11px; }
  [data-surface="journey"] .org-chip b { font-size: 14px; }

  [data-surface="journey"] .game-tray { padding: 0 6px 4px; }
  [data-surface="journey"] .tray-head { padding: 0 2px; }
  [data-surface="journey"] .tray-head > span:first-child { font-size: 12px; white-space: nowrap; min-width: 0; }
  [data-surface="journey"] .tray-head strong { font: 15px Georgia, serif; }
  [data-surface="journey"] .tray-head button { font-size: 12px; padding: 4px 12px; }
}
/* THE BOARD ON THE KIT'S STRATA (@vf/game-kit 0.98.0+). The kit draws each layer (its ordinal, mark, name and the cards
   placed on it), the held card's line and each layer's home control. The board gives the strata its layers cell: the
   held card's line above, and the list below it, which stands whole (the kit's frame, 0.110.0). */
.game-board > .board-strata { grid-area: layers; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.game-board .board-strata .vfg-strata { flex: 1 1 auto; min-height: 0; margin: 0; gap: 6px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #8db299aa transparent; scrollbar-gutter: stable; }
.game-board .board-strata .vfg-strata-holding { margin: 0 2px 4px; font-size: 12px; line-height: 1.3; }
/* Empty, the line takes no room but stays mounted: it is the live region a screen reader hears when a card is picked up. */
.game-board .board-strata .vfg-strata-holding[data-vfg-strata-holding="empty"] { margin: 0; }
.game-board .board-strata .vfg-stratum-court .node { max-width: min(100%, 290px); }
/* A stratum's inside (two columns, the home beside the name, no empty description row; tighter with a 32px mark at phone
   width) is the kit's compact density from @vf/game-kit 0.100.0, which promoted this board's two host rules. */
@media (max-width: 600px) {
  [data-surface="journey"] .rail-open .game-board > .board-strata { visibility: hidden; }
  [data-surface="journey"] .game-board .board-strata .vfg-strata { gap: 4px; }
  /* This board's own words at phone width: the name a step smaller and the state words hidden, as the old phone rows hid
     "Ready for context", so five layers hold the cell as one row each; a placed card still shows on its layer. */
  [data-surface="journey"] .game-board .board-strata .vfg-stratum-name { font-size: 14px; line-height: 1.2; }
  [data-surface="journey"] .game-board .board-strata .vfg-stratum-state { display: none; }
}

/* THE PHASES BESIDE THE NAME. The header carries a second copy of the three phase controls for a short phone (below);
   everywhere else it is not drawn, so the page shows one set. */
[data-surface="journey"] .game-top .game-phases--top { display: none; }

/* THE PHONE HAND (Threshold, 2026-11-14, Ludus's shelf-of-three run). At rest the hand gets the room its cards need. Since
   @vf/game-kit 0.106.0 no card lies over another and every name must read at the kit's floor (96px across): nine cards on
   a phone lie in one row that scrolls sideways inside the hand, so the hand needs 210px of its own to draw them at the
   floor (in 185px they came out 83px and the hand said it was too short). The tray is that plus its 46px head, its 4px
   foot and its 1px top edge: 261px. With a card held, the room goes to what the player is choosing among: the board's top edge
   stays where it is and what yields is below it. The tray's head steps out, and since @vf/game-kit 0.107.0 the held card
   rises in its own seat of the hand's row while the rest of the hand recedes behind it, every card keeping its name; the
   org strip under the board steps out; and each layer steps down to its name and its home (the cards placed on it step
   out with the card held, and come back when it is put down), so the five homes stand as one row each however far the
   run has gone. Nothing here travels: the change is a re-layout, instant with or without reduced motion.
   THE HELD TRAY IS SIZED FOR WHOLE WORDS (Lathe, 2026-11-15, from Threshold's finding with 0.107.0). At 151px every card
   behind the held one came out under 72px across and a long name broke inside a word ("Knowledg / e"). The held tray is
   172px on every phone: the cards behind the held one are 72px or more across (73 at 375x667, read locally), where every
   word of these names fits whole on its line at the kit's 12px. 208px (the kit's 96px read floor) was tried at 390x844
   and put layer 1's home under the tray's edge, so it would need the board's held line or its rows to yield as they do
   on a short phone (Threshold's call); 172px keeps the board exactly as it was designed and every home answering.
   THE HELD HAND SHOWS ITS PICTURES (Lathe, 2026-11-16, @vf/game-kit 0.109.0; Threshold's k109 ruling from Motif's gate of
   0.107.0). The kit now gives every card at rest one picture band, the room the longest name leaves, and none at all under
   29px (HAND_BAND_MIN). The held tray is 175px so the hand's own box is 170px tall (Threshold: at least 170): the cards
   behind the held one are 75px across with a 37px band, every one drawing its picture over its whole name (read locally
   at 390x844, 375x667 and 320x568; at 172px the box was 167 and the band 34). 178px and up widen the band to 54px but put
   layer 1's home under the tray's edge at 375x667, so a taller tray waits on what the board yields (Threshold's call).
   THE HELD TRAY IS 208PX (Lathe, 2026-11-16, @vf/game-kit 0.110.0; Threshold's small-frame ruling). The board now yields by
   the frame: on a short frame the bars travel and the kit brings the five homes into view above the pinned tray when a
   card is picked up. Read locally at 375x667, 390x844 and 320x568 (lathe/foundation-up/tray-probe-k110): every height
   from 175 to 220px kept all five homes answering; the cards behind the held one draw 37px pictures at 175, 54 at 178,
   70 at 208 and 80 at 220. 208px nearly doubles the pictures and keeps the cards behind a step smaller than the hand at
   rest (its band 76px), so they still read as receding behind the held card. */
@media (max-width: 600px) {
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) { --game-tray-height: 208px; }
  /* The held card stands at the top of its tray, so the kit's light around it (drawn 8px out, scaled with the card) reaches
     above the tray's edge; the tray lets it, rather than cutting the light off in a straight line. It takes no press. */
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .game-tray { grid-template-rows: minmax(0, 1fr); overflow: visible; }
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .tray-head { display: none; }
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .game-board > .game-orgs { display: none; }
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .board-strata .vfg-stratum-court { display: none; }
}
/* A SHORT PHONE (under 820px tall): five homes and a held card do not fit under a header of four rows, so the band above
   the board is compacted at rest, and stays so while a card is held (never folded on pick-up). The phases move beside the
   game's name (the current one named, the others by number, each still named to a screen reader), the HUD keeps one row,
   and the public-test badge stands beside its line. With a card held the layers close up to their homes (one pixel
   either side of each 44px home, three between layers) and the line about the held card is spoken but not drawn: the
   held card shows its own name below and each home says what it does ("Choose layer 5"). */
@media (max-width: 600px) and (max-height: 819px) {
  :root, [data-surface="journey"] .game-shell { --game-header-height: 92px; --game-hud-height: 50px; }
  [data-surface="journey"] .game-top { padding-block: 2px; row-gap: 0; }
  [data-surface="journey"] .game-hud { grid-template-rows: 44px; padding-block: 2px 3px; }
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .board-strata .vfg-strata { gap: 3px; }
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .board-strata .vfg-stratum { padding-block: 1px; }
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .board-strata .vfg-strata-holding { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  [data-surface="journey"] .game-hud .game-phases--hud { display: none; }
  [data-surface="journey"] .game-top .game-phases--top { display: flex; flex: 0 0 auto; gap: 4px; margin-left: auto; }
  [data-surface="journey"] .game-top .game-phases--top button { min-width: 44px; min-height: 44px; padding: 4px 6px; font-size: 11px; line-height: 1.15; white-space: nowrap; }
  [data-surface="journey"] .game-top .game-phases--top button:not(.active) .phase-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [data-surface="journey"] .game-brand h1 { font-size: 16px; }
  [data-surface="journey"] .game-brand .back-link { min-width: 44px; }
  /* On a short phone the first row carries the card games' control, the game's name and its three phases, so the
     control keeps its doorways and its 44px box and lets its words go (the kit's knob; its accessible name keeps them). */
  [data-surface="journey"] .fu-finder { --vfg-finder-name-display: none; }
}

/* WORDS A PLAYER READS ARE 11PX OR MORE, AND EVERY CONTROL IS A 44PX TARGET, AT A DESK TOO (Lathe, 2026-11-15, Task
   121174455935, from Mirror's walk of the card games: at 1440 the scenario title, "Build · use · hand on", the counters'
   labels and the org buttons drew at 8 and 9px, the goal ended in an ellipsis, and ten controls stood 26 to 36px tall).
   The type floor is the engine's 11px; the target floor is TOUCH_TARGET_MIN (44px), already the rule on a phone and a
   touch screen (above), now at every width. A card's own face keeps its recipe's type (Motif's). */
[data-surface="journey"] .game-top .eyebrow { font-size: 11px; letter-spacing: .08em; }
[data-surface="journey"] .game-goal .eyebrow { font-size: 11px; }
[data-surface="journey"] .game-counters span { font-size: 11px; }
[data-surface="journey"] .org-chip { font-size: 11px; }
[data-surface="journey"] .board-heading small, [data-surface="journey"] .board-heading button { font-size: 11px; }
[data-surface="journey"] .game-sidepanel .eyebrow, [data-surface="journey"] .game-sidepanel .actions button, [data-surface="journey"] .four-states dt { font-size: 11px; }
[data-surface="journey"] .tray-head button, [data-surface="journey"] .game-board .node { font-size: 11px; }
[data-surface="journey"] .game-shell button:not(.vfg-hand__card) { min-height: 44px; }
/* AND 44PX ACROSS, AND THE TOP BAR'S AND THE RAIL'S WORDS 11PX AT EVERY WIDTH (Lathe, 2026-11-16, read live by the size
   list on dpl_qVgqLHVj): held sideways (844x390) the top bar's six buttons drew at 10px and Tasks, Cards and Guide stood
   39 to 42px across (the tablet rules at 850px wide), the rail's lines at 10px (the short-landscape rule at 680px tall);
   and at a desk with a card held the rail's "Put the card down" stood 41 x 48, read so in every size list since
   2026-11-15 and not reported until now. */
[data-surface="journey"] .game-shell button:not(.vfg-hand__card) { min-width: 44px; }
[data-surface="journey"] .game-top nav button, [data-surface="journey"] .game-sidepanel p { font-size: 11px; }
/* THE BARS WRAP RATHER THAN CUT (Threshold's small-frame ruling, section 2.3). On a short frame the bars travel and hold
   their own height, so the scenario's line in the top bar and the goal in the HUD wrap rather than end in an ellipsis:
   held sideways both were cut ("...a capability other", "...choose and demonst"). A tall frame keeps its fixed bars. */
.vfg-viewport[data-vfg-frame='short'] .game-top .eyebrow { white-space: normal; overflow: visible; text-overflow: clip; }
/* The top bar's buttons take their own row where they do not fit beside the game's name: held sideways (844 wide) they
   stood in one row with it and, right-aligned and wider than the room left, ran out leftward over the scenario's line
   (the Tasks button over "...CAPABILITY O"). As on a phone: the corner control and the name share the first row, the
   buttons the second. At a desk they fit on the one row; a phone already has its two. */
@media (min-width: 601px) and (max-width: 850px) {
  .vfg-viewport[data-vfg-frame='short'] .game-top { flex-wrap: wrap; }
  .vfg-viewport[data-vfg-frame='short'] .game-top:has(.fu-finder) .game-brand { flex: 1 1 0; }
  .vfg-viewport[data-vfg-frame='short'] .game-top nav { flex: 1 1 100%; }
}
.vfg-viewport[data-vfg-frame='short'] .game-goal { height: auto; }
.vfg-viewport[data-vfg-frame='short'] .game-goal strong { white-space: normal; overflow: visible; text-overflow: clip; }
/* THE GOAL IS WHOLE AT A DESK. It is the sentence the run is for, so it is never cut: it wraps to a second line at 13px,
   the HUD gives it the row's width the phases and the counters do not need (each phase is as wide as its words), and the
   HUD is 76px tall to hold it (was 68). Above 850px, where the HUD is one row; a tablet keeps its two-row HUD. */
@media (min-width: 851px) {
  :root, [data-surface="journey"] .game-shell { --game-hud-height: 76px; }
  [data-surface="journey"] .game-hud { grid-template-columns: minmax(0, 1fr) auto auto; padding-block: 6px; }
  [data-surface="journey"] .game-hud .game-phases { grid-template-columns: repeat(3, max-content); }
  [data-surface="journey"] .game-goal { height: auto; min-height: 44px; padding: 5px 10px; }
  [data-surface="journey"] .game-goal strong { white-space: normal; overflow: visible; text-overflow: clip; font-size: 13px; line-height: 1.25; }
}
/* A HELD CARD IS PLACED ON ANY LAYER WITHOUT SCROLLING, AT A DESK TOO (Threshold's finding, 2026-11-15: at 1440x900 with a
   card held, layer 1's home stood under the board's foot and answered only once the board scrolled). As on a phone,
   while a card is held the board gives its room to the five homes: the tools and the org strip under the layers step
   out, and each layer steps down to its mark, its name and its home, one 44px row (its state words and the cards placed
   on it step out, and come back when the card is put down). */
@media (min-width: 601px) {
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .game-board > .board-tools,
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .game-board > .game-orgs,
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .board-strata .vfg-stratum-court,
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .board-strata .vfg-stratum-state { display: none; }
  [data-surface="journey"] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .board-strata .vfg-stratum { padding-block: 4px; align-items: center; }
}
/* THE CARDS PANEL'S STATUS LINE IS WHOLE ON A PHONE: "Learning reference · no ownership score" is wider than the panel's
   foot at 390, where the kit's pager cuts a line wider than the foot itself; in this panel it wraps instead. */
#binder-modal .vfg-pager__state { white-space: normal; min-inline-size: 0; overflow: visible; }
/* A PANEL THAT SCROLLS SAYS SO (Threshold's small-frame ruling; the kit's edge). The kit marks the panel's words
   (#modalbody, `watchMoreBelow`), the Details sheet (#rail, `useMoreBelow`) and the Cards panel's binder (the Binder marks
   itself) with `data-vfg-more` while words lie below, and the kit's one rule draws the fade on the mark (@vf/game-kit
   0.111.0, `:where([data-vfg-more])`), so nothing here copies it.
   THE PANEL'S WORDS SCROLL, NOT THE PANEL (fixed forward, read live on dpl_qVgqLHVj): the fade first stood on the dialog
   itself, and a mask hides everything outside the masked box, so the kit's corner control, which stands in the screen's
   corner above the panel's top, no longer answered at any size. The panel holds still and its words scroll and fade. */
#modal[open] { display: flex; flex-direction: column; overflow: hidden; }
#modal > #modalbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #9ab69c66 transparent; }

@media (prefers-reduced-motion: reduce) {
  [data-surface="journey"] *, [data-surface="journey"] *::before, [data-surface="journey"] *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

/* THE PLACE FIRST ON A SHORT FRAME (Threshold's small-frame ruling, 2026-11-16; @vf/game-kit 0.110.0's frame).
   What a person must see and reach on any screen, from 320x568 up and held sideways, and what gives way when the height
   will not hold it all. The kit decides whether the frame is short (its bars hold more than half of it, or the layer
   list or the hand cannot stand whole in what is left) and, when it is, makes the frame the one scroll, keeps the hand
   at the frame's foot while the hand holds half the frame or less, and brings the five homes into view above it when a
   card is picked up. This is the game's half: its shell lets go of its own heights, so the band, the top bar and the
   HUD travel with the board and the board stands whole.
   Markup that goes with it (journey-app / shared-runtime): the public-test band is the frame's FIRST child (inside
   GameViewport, before .game-shell), marked data-vfg-bar; .game-top and .game-hud carry data-vfg-bar; .game-tray
   carries data-vfg-foot; <Strata whole> and <Hand whole>. */

/* The frame is a column: the band, then the shell. In a tall frame nothing else changes. */
#app > .vfg-viewport { display: flex; flex-direction: column; }
#app > .vfg-viewport > .fu-public-test { flex: none; }
#app > .vfg-viewport > .game-shell { flex: 1 1 auto; height: auto; min-height: 0; }

/* A SHORT FRAME: the bars travel with the board; the board stands whole; the hand keeps its own height. */
/* (Lathe, 2026-11-16: this one line is written at `#app > ` weight. As Threshold wrote it, `.vfg-viewport[data-vfg-frame=
   'short'] > .game-shell`, the id-weighted `#app > .vfg-viewport > .game-shell` three lines up outweighed its `flex` and
   `min-height`: read on a short frame the shell computed `1 1 auto` and `0px`, stood one frame tall (505px at 320x568)
   with its content 870px, so the tray's parent did not span the scroll as the kit's foot asks and the shell's ground
   stopped at its box. lathe/foundation-up/fu-shell-cascade-probe.mjs.) */
#app > .vfg-viewport[data-vfg-frame='short'] > .game-shell { flex: none; display: flex; flex-direction: column; min-height: 100%; overflow: visible; }
.vfg-viewport[data-vfg-frame='short'] .game-top { flex: none; height: auto; min-height: var(--game-header-height); }
.vfg-viewport[data-vfg-frame='short'] .game-hud { flex: none; height: auto; min-height: var(--game-hud-height); grid-template-rows: auto; }
.vfg-viewport[data-vfg-frame='short'] .game-main { flex: 1 0 auto; overflow: visible; }
.vfg-viewport[data-vfg-frame='short'] .game-board { overflow: visible; }
.vfg-viewport[data-vfg-frame='short'] .game-board .board-strata .vfg-strata { flex: none; overflow: visible; animation: none; -webkit-mask-image: none; mask-image: none; }
/* The rail beside the board (wider than a phone) takes the board's height and scrolls inside itself. */
.vfg-viewport[data-vfg-frame='short'] .game-inspector { contain: size; }
.vfg-viewport[data-vfg-frame='short'] .game-tray { flex: none; height: var(--game-tray-height); }
/* The hand at its reading floor wherever the frame is short: a short window gave it a 144px tray, where nine cards
   came out 20px across with their names broken. The rest tray is the phone's own, 261px. */
@media (max-height: 560px) {
  .vfg-viewport[data-vfg-frame='short'] .game-shell { --game-tray-height: 261px; }
}
/* Held sideways: the five homes and the held hand share the screen. Each home is one 44px row; the held tray takes what
   the homes leave (the frame less the homes, the board's padding and its edges), never more than the phone's 175px. */
@media (min-width: 601px) and (max-height: 560px) {
  .vfg-viewport[data-vfg-frame='short'] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) { --game-tray-height: clamp(140px, calc(var(--vfg-frame-h) - 5 * 44px - 4 * 3px - 24px), 175px); }
  .vfg-viewport[data-vfg-frame='short'] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .game-tray { grid-template-rows: minmax(0, 1fr); overflow: visible; }
  .vfg-viewport[data-vfg-frame='short'] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .tray-head { display: none; }
  .vfg-viewport[data-vfg-frame='short'] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .board-strata .vfg-strata { gap: 3px; }
  .vfg-viewport[data-vfg-frame='short'] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .board-strata .vfg-stratum { padding-block: 0; min-block-size: 44px; }
  .vfg-viewport[data-vfg-frame='short'] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .board-strata .vfg-strata-holding { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .vfg-viewport[data-vfg-frame='short'] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .game-main { padding-block: 4px; }
  .vfg-viewport[data-vfg-frame='short'] .game-shell:has(.vfg-strata-holding[data-vfg-strata-holding="held"]) .game-board { padding-block: 4px; }
}

/* THE SMALLEST PHONE'S TOP ROWS (320 to 359 wide). The game's name stands whole beside the corner control and the three
   phases: the current phase is drawn by its number like the others (its name still spoken), and the name may break
   between its words. The round's line wraps so "Next round" stands inside the screen, and the board's two rows of tools
   stack so "Details" does. */
@media (max-width: 359.98px) {
  [data-surface="journey"] .game-top .game-phases--top button.active .phase-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [data-surface="journey"] .game-brand h1 { white-space: normal; line-height: 1.1; }
  [data-surface="journey"] .game-counters { flex-wrap: wrap; row-gap: 4px; }
  [data-surface="journey"] .game-board { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tools" "head" "layers" "orgs"; }
  [data-surface="journey"] .board-heading { justify-content: flex-start; }
}

/* The band on a short phone keeps its badge beside its line: the rule that drew it so read `body > .fu-public-test`,
   and the band is now the frame's first child. */
@media (max-width: 600px) and (max-height: 819px) {
  [data-surface="journey"] .fu-public-test { display: flex; align-items: center; gap: 8px; }
  [data-surface="journey"] .fu-public-test .vfg-test-mark--badge { flex: none; }
}

/* THE OPEN SHEET CLEARS DETAILS ON THE NARROWEST PHONES (Lathe, 2026-11-16, fixed forward from the live place gate on
   dpl_qVgqLHVj). The sheet stands 62px into the main area: the area's 6px padding, the board's 1px edge and 5px padding,
   the board's one 44px row of tools and heading, and 6px. Under 360px wide the heading's row (Connections, Details)
   stacks under the tools' row (Threshold's rule above), one 5px row gap and 44px lower, so the open sheet covered
   Details, the control that closes it. The sheet stands below both rows, by the same 6px. */
@media (max-width: 359.98px) {
  [data-surface="journey"] .rail-open .game-inspector { top: calc(62px + 5px + 44px); }
}

/* EVERY BUTTON AND COUNTER LABEL ON THE ENGINE'S TEXT STEP (Threshold's ruling k114, section 3: a led room is the browser's
   own zoom, and the floor is what turns "bigger" into "readable"; a game's controls and words read at 14px or more). Read
   at 1920x1080 by Lathe (notes-cold-walk.md) and Mirror: the top bar's and the round bar's buttons, the board's tools,
   the org chips, the rail's buttons, "Draw context" and the counters' labels at 11px at every size. Each takes the
   engine's --vf-text-sm (14px), at every width, after every rule above. The corner control's 11px is the kit's. */
[data-surface="journey"] .game-shell .game-top nav button,
[data-surface="journey"] .game-shell .game-top .game-phases--top button,
[data-surface="journey"] .game-shell .game-hud button,
[data-surface="journey"] .game-shell .game-hud .game-phases button,
[data-surface="journey"] .game-shell .game-counters span,
[data-surface="journey"] .game-shell .game-counters button,
[data-surface="journey"] .game-shell .board-heading button,
[data-surface="journey"] .game-shell .board-tools button,
[data-surface="journey"] .game-shell .game-orgs .org-chip,
[data-surface="journey"] .game-shell .game-orgs .org-chip span strong,
[data-surface="journey"] .game-shell .game-orgs .org-chip span small,
[data-surface="journey"] .game-shell .game-sidepanel button,
[data-surface="journey"] .game-shell .game-sidepanel .actions button,
[data-surface="journey"] .game-shell .tray-head button { font-size: var(--vf-text-sm); }
/* "Build the inspection workflow" and the rail's other next-task lines: a text link inherits its line's type, so the
   line takes the step. */
[data-surface="journey"] .game-shell .game-sidepanel .next-task-line { font-size: var(--vf-text-sm); }
/* THE 14PX STEP, MADE TO FIT (read locally before the deploy, lathe/foundation-up/k114-local/, ten sizes): at 14px "Next
   round" ran past the right edge at 375 and 390 (the counters' row is one fixed 44px row there), "Connections" overflowed
   its box at 375, "Operations Org" its chip at 320, the phase names their buttons at 667x375, and at 960x540 the one-row
   top bar overlapped its own buttons and the one-row round bar squeezed the goal into a column that ran over the hand.
   Each now wraps where it must, and nothing scrolls sideways. */
[data-surface="journey"] .game-shell .game-phases button { white-space: normal; }
@media (max-width: 600px) {
  [data-surface="journey"] .game-hud { grid-template-rows: auto auto; }
  [data-surface="journey"] .game-counters { flex-wrap: wrap; row-gap: 4px; }
}
@media (max-width: 600px) and (max-height: 819px) {
  [data-surface="journey"] .game-hud { grid-template-rows: auto; }
}
/* The board's two rows of tools stack under 390px wide (was under 360), and the open sheet stands below both rows. */
@media (max-width: 389.98px) {
  [data-surface="journey"] .game-board { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tools" "head" "layers" "orgs"; }
  [data-surface="journey"] .board-heading { justify-content: flex-start; }
  [data-surface="journey"] .rail-open .game-inspector { top: calc(62px + 5px + 44px); }
}
@media (max-width: 359.98px) {
  [data-surface="journey"] .game-board > .game-orgs { grid-template-columns: minmax(0, 1fr); }
}
/* From 601 to 760px wide (667x375 held sideways) the round bar's phases stood in a narrow first column under the counters,
   each name wider than its button at 14px: the counters and the phases each take the bar's full width, one row each. */
@media (min-width: 601px) and (max-width: 760px) {
  [data-surface="journey"] .game-hud { grid-template-columns: minmax(0, 1fr); }
  [data-surface="journey"] .game-hud .game-counters { grid-column: 1; grid-row: 1; }
  [data-surface="journey"] .game-hud .game-phases { grid-column: 1; grid-row: 2; }
}
/* From 851 to 1279px wide (a small laptop window, and 1920x1080 at 200% zoom, 960x540): the top bar's buttons take their
   own row, and the round bar puts the goal on its own row above the phases and the counters. */
@media (min-width: 851px) and (max-width: 1279.98px) {
  :root, [data-surface="journey"] .game-shell { --game-header-height: auto; --game-hud-height: auto; }
  [data-surface="journey"] .game-top { flex-wrap: wrap; row-gap: 4px; }
  [data-surface="journey"] .game-top:has(.fu-finder) .game-brand { flex: 1 1 0; min-width: 0; }
  [data-surface="journey"] .game-top nav { flex: 1 1 100%; justify-content: flex-end; }
  [data-surface="journey"] .game-hud { grid-template-columns: auto minmax(0, 1fr); row-gap: 6px; }
  [data-surface="journey"] .game-hud .game-goal { grid-column: 1 / -1; }
}
/* THE KIT'S "MORE BELOW" BAND KEEPS ITS HEIGHT (fixed forward, read live on dpl_CdZcBicc: drawn, 0px tall at 1280x720,
   1366x768 and 960x540). This game makes its frame a flex column (#app > .vfg-viewport, above), and the kit's band is one
   of its children: as the column overflows, the band shrank to nothing. It does not shrink. */
#app > .vfg-viewport > .vfg-viewport__more { flex: none; }
/* A correction seen where the press was (ruling k114, 6b): the message bar's words in the layer pressed. */
[data-surface="journey"] .fu-layer-note { margin: 4px 0 0; padding: 6px 10px; border-radius: 8px; background: #ead9af; color: #1c3536; font-size: var(--vf-text-sm); line-height: 1.35; max-width: 100%; overflow-wrap: anywhere; }
