/* THE SHEETS: the frame every menu stands in (`the frame`, below) and the sheet the HUD's pages are written into (ui/sheets/); the bug report's and the playtest's own parts are report.css. Read after credits.css (index.html). */

/* ── screens ─────────────────────────────────────────────────────────────────────────────────── */
.screen { position: absolute; inset: 0; display: none; pointer-events: auto; }

/* ── the frame (#318, ui/sheet.js makeSheet, data/sheet.js) ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   Every sheet is the title screen's own wall: THE SIDE at the left (the label, the title, a rule, one short line, the list), THE BODY at the right, THE FOOT across the bottom. The ground is the dark, strongest at
   the left and thinning to the right so that the world shows faintly behind it. No corner is rounded. Nothing here is a length, a colour or a time of its own: the HUD's tokens (data/hud.js) and the rows of
   data/sheet.js `look`, which makeSheet sets on the sheet as custom properties (tests/sheets.test.mjs holds this rule: no number with a unit is written between the two lines that mark the frame). A reader who
   asks for less motion gets none from it: base.css cuts every transition and animation to nothing for them.
   A narrow window is one width, 760px (data/sheet.js `narrow`; a media query cannot read a property): the side stands over the body and the list becomes a row that scrolls sideways. */
.panel-screen:not([hidden]) { display: grid; }
/* The screen the sheet stands on is the whole window, with no veil of its own (a screen's own padding and veil, which the older sheets stood on, are put away). */
.screen:has(> .sheet[data-frame]) { padding: 0; background: none; place-items: stretch; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.screen > .sheet[data-frame] {
  box-sizing: border-box; width: 100%; height: 100%;
  display: grid; grid-template-columns: var(--sheet-side) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 0 var(--sheet-gap);
  padding: var(--sheet-pad-y) var(--sheet-pad-x) 0;
  border: 0; border-radius: 0; outline: none;
  /* the ground is a colour, and a picture over it that thickens it to the left (data/sheet.js GROUND): two declarations and no shorthand, so that the colour stands whatever becomes of the picture (#364) */
  background-color: var(--sheet-ground-floor);
  background-image: linear-gradient(90deg, var(--sheet-ground-over-left) 0, var(--sheet-ground-over-mid) var(--sheet-ground-mid-at), transparent 100%);
}
/* A child that is none of the three (the journal's tabs, which stand between the side and the body in its markup) stands over the body, in the row above it. */
.sheet[data-frame] > :not(.sheet-head):not(.sheet-body):not(.sheet-foot) { grid-column: 2; grid-row: 1; min-width: 0; }

/* the side */
.sheet[data-frame] > .sheet-head { grid-column: 1; grid-row: 1 / 3; display: flex; flex-direction: column; gap: var(--sheet-side-gap); min-width: 0; min-height: 0; }
.sheet[data-frame] .sheet-head .titles { min-width: 0; }
.sheet[data-frame] .sheet-head .tag { font-weight: var(--weight-label); font-size: var(--size-label); line-height: var(--sheet-label-lead); letter-spacing: var(--track-label); color: var(--ink-dim); }
.sheet[data-frame] .sheet-head h2 {
  margin: var(--sheet-title-top) 0 0; overflow-wrap: anywhere; text-wrap: balance;
  font: var(--weight-title) var(--size-title) / var(--sheet-title-lead) var(--font-display); font-stretch: condensed; letter-spacing: var(--track-title); text-transform: uppercase;
}
.sheet[data-frame] .sheet-head .titles::after { content: ''; display: block; height: var(--sheet-rule); margin-top: var(--sheet-side-gap); background: linear-gradient(90deg, var(--ink), transparent); }
.sheet[data-frame] .sheet-note { margin: 0; max-width: var(--sheet-line-note-w); font: var(--weight-read) var(--size-read) / var(--sheet-read-lead) var(--font-text); color: var(--ink-dim); }
.sheet-note:empty, .sheet-hint:empty { display: none; }
.sheet[data-frame] .sheet-entry:empty { display: none; }
.sheet[data-frame] .sheet-list { display: grid; grid-auto-rows: max-content; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--ink-faint) transparent; }   /* (a row is as tall as its line's words: a list too long for the side scrolls, and a row of it is never pressed down to the line's least height with a second row of a name over the next line, #382) */
.sheet[data-frame] .sheet-list[hidden] { display: none; }
.sheet[data-frame] .sheet-aside { display: grid; gap: var(--sheet-side-gap); min-width: 0; }
.sheet[data-frame] .sheet-aside[hidden] { display: none; }
.sheet[data-frame] .sheet-line {
  display: flex; align-items: center; gap: var(--sheet-line-gap); box-sizing: border-box; min-height: var(--sheet-line-h); margin: 0; padding: var(--sheet-line-wrap) 0 var(--sheet-line-wrap) var(--sheet-line-pad);
  border: 0; border-left: var(--sheet-rule) solid transparent; border-radius: 0; background: none;
  font: var(--weight-say) var(--size-say) / var(--sheet-label-lead) var(--font-text); letter-spacing: normal; text-transform: none; text-align: left; overflow-wrap: anywhere; color: var(--ink-dim);   /* (a name too long for the side takes another row: none is cut, #331) */
  transition: color var(--warm), background var(--warm), border-color var(--warm);
}
.sheet[data-frame] .sheet-line:hover:not(:disabled), .sheet[data-frame] .sheet-line:focus-visible:not(:disabled) { color: var(--ink); }
.sheet[data-frame] .sheet-line:focus-visible { outline: var(--sheet-rule) solid var(--ink-dim); outline-offset: calc(-1 * var(--sheet-rule)); }
.sheet[data-frame] .sheet-line[aria-current] { border-left-color: var(--lamp); color: var(--ink); background: linear-gradient(90deg, var(--sheet-line-wash), transparent var(--sheet-line-wash-end)); }
.sheet[data-frame] .sheet-line-key { display: inline-flex; align-items: center; gap: var(--sheet-line-key-gap); margin-left: auto; font-size: calc(var(--sheet-line-key) * 1em); color: var(--ink-faint); }

/* the body: what the chosen line holds, scrolling inside itself */
.sheet[data-frame] > .sheet-body {
  grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; overflow-y: auto; padding: var(--sheet-body-top) var(--sheet-body-air) 0 0;
  scrollbar-width: thin; scrollbar-color: var(--ink-faint) transparent;
}

/* A body that goes on past an edge says so there (ui/sheet.js moreOf writes the edges into the sheet's `data-more`): the sheet's own cover fades in over the cut edge, for the height of a row and a half, and takes no press. The two fades are the sheet's own
   pseudo-elements, laid over the body's cell (a body is a grid or a column in some pages, and a pseudo-element inside it would be one more item and one more gap). Nothing shows where all of a page is in view. */
.screen > .sheet[data-frame]::before, .screen > .sheet[data-frame]::after {
  content: ''; grid-column: 2; grid-row: 2; z-index: 1; height: var(--sheet-fade); margin-right: var(--sheet-body-air); pointer-events: none;
  opacity: 0; transition: opacity var(--warm);
}
.screen > .sheet[data-frame]::before { align-self: start; background-image: linear-gradient(180deg, var(--sheet-cover), transparent); }
.screen > .sheet[data-frame]::after { align-self: end; background-image: linear-gradient(0deg, var(--sheet-cover), transparent); }
.screen > .sheet[data-frame][data-more~='above']::before { opacity: 1; }
.screen > .sheet[data-frame][data-more~='below']::after { opacity: 1; }
/* The page's one action stands at the foot of the body whatever the page's length: it sticks to the body's lower edge while its place in the page is under that edge, on the cover (a row that scrolls under it is not seen through it), and
   is where it is where the page fits. It is a page's `.sheet-action` (the trade's deal, the report's Send) or the button of a blueprint (`.btns`: the workbench, making by hand, the plans, the armory; not a row of buttons that heads a page, which
   is the first thing in it and is no action at its foot). With more past the lower edge, it stands on the cover and the cover fades in above it as it does over a cut edge, and the sheet's own fade there (which would lie over the button) is not
   drawn; with no more below (a page that fits, or one scrolled to its end) it is in its own place with nothing under it, and has no ground of its own: nothing of a page that fits is changed. */
.sheet[data-frame] > .sheet-body :is(.sheet-action, .btns:not(:first-child)) { position: sticky; bottom: 0; z-index: 1; justify-self: stretch; }
.sheet[data-frame][data-more~='below'] > .sheet-body :is(.sheet-action, .btns:not(:first-child)) { background-color: var(--sheet-cover); }
.sheet[data-frame] > .sheet-body :is(.sheet-action, .btns:not(:first-child))::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--sheet-fade); pointer-events: none; background-image: linear-gradient(0deg, var(--sheet-cover), transparent); opacity: 0; transition: opacity var(--warm); }
.sheet[data-frame][data-more~='below'] > .sheet-body :is(.sheet-action, .btns:not(:first-child))::before { opacity: 1; }
.screen > .sheet[data-frame][data-more~='below']:has(> .sheet-body :is(.sheet-action, .btns:not(:first-child)))::after { opacity: 0; }

/* the foot: over a thin rule, the way out first, the keys that work here, the page's own words, and at the far end what just happened */
.sheet[data-frame] > .sheet-foot {
  grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sheet-foot-gap-y) var(--sheet-foot-gap-x);
  margin-top: var(--sheet-foot-lift); padding: var(--sheet-foot-top) 0 var(--sheet-foot-bottom); border-top: var(--sheet-foot-line) solid var(--rule);
  font: var(--weight-label) var(--size-label) / var(--sheet-label-lead) var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-dim);
}
.sheet[data-frame] .sheet-foot .sheet-entry, .sheet[data-frame] .sheet-foot .close { display: inline-flex; align-items: center; gap: var(--sheet-entry-gap); }
.sheet[data-frame] .sheet-foot .close { margin: 0; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; transition: color var(--warm); }
.sheet[data-frame] .sheet-foot .close:hover:not(:disabled), .sheet[data-frame] .sheet-foot .close:focus-visible:not(:disabled) { background: none; color: var(--ink); }
.sheet[data-frame] .sheet-foot .close:focus-visible { outline: var(--sheet-rule) solid var(--ink-dim); outline-offset: var(--sheet-entry-gap); }
/* What just happened is a sentence, written as one, at the far end; the keys of the foot are the capitals. */
.sheet[data-frame] .sheet-foot .status { margin-left: auto; font-size: var(--size-label); letter-spacing: normal; text-transform: none; }
.status[data-level='ok'] { color: var(--ink); }
.status[data-level='warn'] { color: var(--lamp); }

/* A finger's sheet: its foot is as tall as a finger needs (touch.css: a button is no shorter than a thumb) and no taller, and what stood over the side and above the foot in the room of a desk is the narrow window's: the body takes that height. */
html[data-device='touch'] .screen > .sheet[data-frame] { padding-top: var(--sheet-touch-pad-y); }
html[data-device='touch'] .sheet[data-frame] > .sheet-foot { margin-top: var(--sheet-touch-foot-lift); padding: var(--sheet-touch-foot-top) 0 var(--sheet-touch-foot-bottom); }

@media (max-width: 760px) {
  .screen > .sheet[data-frame]::before, .screen > .sheet[data-frame]::after { grid-column: 1; grid-row: 3; margin-right: 0; }
  .screen > .sheet[data-frame] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; gap: var(--sheet-narrow-gap) 0; padding: var(--sheet-narrow-pad-y) var(--sheet-narrow-pad-x) 0; }
  .sheet[data-frame] > .sheet-head { grid-row: 1; }
  .sheet[data-frame] > :not(.sheet-head):not(.sheet-body):not(.sheet-foot) { grid-column: 1; grid-row: 2; }
  .sheet[data-frame] > .sheet-body { grid-column: 1; grid-row: 3; padding-right: 0; }
  .sheet[data-frame] > .sheet-foot { grid-row: 4; margin-top: 0; }
  .sheet[data-frame] .sheet-list { display: flex; overflow: auto hidden; }
  .sheet[data-frame] .sheet-line { flex: none; padding-right: var(--sheet-narrow-line-pad); white-space: nowrap; }   /* (side by side in a row that scrolls: each line is as long as its words) */
}
/* ── the end of the frame ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── */

/* recipes: the generator's upgrades (ui/hubui.js, the tool wall: #335's). The workbench's blueprints are drawn by `the pack and the bench`, below. */
.recipes { margin: 0; padding: 0; list-style: none; }
.recipe {
  display: grid; grid-template-columns: minmax(11rem, 1.1fr) minmax(0, 2fr) auto; align-items: center; gap: .6rem 1.4rem;
  padding: .9rem .3rem;
  border-bottom: 1px solid var(--rule);
  transition: background var(--fade), opacity var(--fade);
}
.recipe:hover { background: var(--wash); }
.recipe[data-state='short'] { opacity: .6; }
.r-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .8rem; }
.r-name { font-size: 1.05rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.r-made { font-size: 1.05rem; font-weight: 700; }
.r-note { flex-basis: 100%; font-size: .95rem; letter-spacing: .02em; color: var(--ink-dim); }
.r-why { flex-basis: 100%; font-size: .95rem; }
.needs { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin: 0; padding: 0; list-style: none; font-size: .95rem; }
.need { display: flex; gap: .55rem; }
.need .c { color: var(--ink-dim); }
.need[data-ok='0'] .c { color: var(--red); }
.go { min-width: 7.5rem; }
@media (max-width: 760px) {
  .recipe { grid-template-columns: minmax(0, 1fr) auto; }
  .recipe .needs { grid-column: 1 / -1; grid-row: 2; }
}

/* the note and the empty line that the sheets share (the journal, the plan list, the duty board and the tool wall too) */
.help { margin: .4rem 0 0; font-size: .95rem; color: var(--ink-dim); }
.empty { color: var(--ink-dim); }

/* ── the pack and the bench (#331, ui/sheets/pack.js and craft.js; the pictures are design-313's `sheet-inventory` and `sheet-make`) ──────────────────────────────────────────────────────────────────────────────────────────────
   The Inventory's side holds the hotbar (a label, the row of slots and the name of the thing in the slot in focus, in the frame's own place for what a sheet keeps at its side); its body is a page of rows: a section a kind, two
   columns of rows, or the blueprints held for the hand as blocks. The workbench's body is the chosen blueprint: `Makes`, `Needs` and the button. Every row is one look: a picture, a name, a figure; the one the pointer is over or the keys
   are on is the chosen one (the lamp's rule at its left and its faint ground). What the pack is short of is a dashed row in the dim ink, and a button drawn off: red is the body's, and nothing here is red. Nothing here is a length, a
   colour or a time of its own: the HUD's tokens (data/hud.js `HUD.tokens`), the frame's rows (data/sheet.js) and the rows of `HUD.text.inventory.look`, which pack.js and craft.js set on the page that wears them as custom properties
   (tests/sheets.hud.test.mjs holds this rule: no number with a unit and no colour is written between the two lines that mark this part). The recipes of the tool wall (ui/hubui.js) are the rules above. */
/* the side's hotbar: the label, the row of slots (glass.css `.slots` wraps them) and under it the name of the slot in focus */
.sheet-aside .grp { display: grid; gap: var(--strip-gap); margin: 0; }
.sheet-aside .cap { margin: 0; font: var(--weight-label) var(--size-label) / var(--sheet-label-lead) var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-faint); }
.sheet-aside .inhand { padding: 0; color: var(--ink); }
/* A slot of the sheet is the strip's own (glass.css `.hotbar .slot`: the dark with a thin edge, the key top left and the count bottom right, the one in hand ringed with the lamp's foot and not lifted, one the pack has run out of dashed with its
   picture faint and no figure) at the sheet's size, and a button: the pointer on it, or the keys, bring its picture up to full ink and ring it. */
.sheet .slot {
  flex: none; display: grid; grid-template-rows: var(--slot-sheet); align-items: center; justify-items: center;
  width: var(--slot-sheet); margin: 0; padding: 0;
  border: 0; border-radius: 0; background: var(--dark-veil); box-shadow: inset 0 0 0 var(--slot-line) var(--ink-faint);
  color: var(--ink-dim); font-size: var(--size-label); line-height: 1; letter-spacing: normal; text-transform: none; cursor: pointer;
}
.sheet .slot .icon { grid-area: 1 / 1; width: var(--icon-sheet); height: var(--icon-sheet); }
.sheet .slot .n { grid-area: 1 / 1; align-self: start; justify-self: start; padding: var(--slot-mark) 0 0 var(--slot-mark); font-weight: var(--weight-label); color: var(--ink-faint); text-shadow: var(--pack-glow); }
.sheet .slot .ct { grid-area: 1 / 1; align-self: end; justify-self: end; padding: 0 var(--slot-mark) var(--slot-mark) 0; font-weight: var(--weight-label); color: var(--ink); white-space: nowrap; text-shadow: var(--pack-glow); }
.sheet .slot[data-sel='1'] { color: var(--ink); box-shadow: inset 0 0 0 var(--slot-line) var(--ink), inset 0 calc(-1 * var(--slot-foot)) 0 var(--lamp); }
.sheet .slot[data-state='spent'] { color: var(--ink-faint); box-shadow: none; outline: var(--slot-dash) dashed var(--ink-faint); outline-offset: calc(-1 * var(--slot-dash)); }
.sheet .slot[data-state='spent'] .ct { display: none; }
.sheet .slot[data-sel='1'][data-state='spent'] { box-shadow: inset 0 calc(-1 * var(--slot-foot)) 0 var(--lamp); }
.sheet .slot:hover:not(:disabled), .sheet .slot:focus-visible:not(:disabled) { background: var(--dark-veil); color: var(--ink); outline: var(--slot-line) solid var(--ink); outline-offset: var(--slot-line); }
/* the page */
.pack { display: grid; gap: var(--pack-gap); align-content: start; min-width: 0; }
.pack .grp { display: grid; gap: var(--pack-cap-gap); margin: 0; }
.pack .cap { margin: 0; font: var(--weight-label) var(--size-label) / var(--sheet-label-lead) var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-faint); }
.pack .cols { display: grid; grid-template-columns: repeat(var(--pack-cols), minmax(0, 1fr)); gap: 0 var(--pack-cols-gap); }
.pack .empty { margin: 0; }
/* a row: a picture, a name (and what stands small under it or beside it) and a figure; a thing of the pack is a button, a row of a blueprint is not */
.pack .item, .pack .mk-row, .pack .mk-line {
  display: grid; grid-template-columns: var(--icon-row) minmax(0, 1fr) auto; align-items: center; gap: 0 var(--pack-row-gap);
  box-sizing: border-box; width: 100%; min-height: var(--pack-row-h); margin: 0; padding: var(--pack-row-pad-y) var(--pack-row-pad-r) var(--pack-row-pad-y) var(--pack-row-pad-l);
  border: 0; border-bottom: var(--pack-edge) solid var(--rule); border-left: var(--sheet-rule) solid transparent; border-radius: 0; background-color: transparent;
  font: var(--weight-say) var(--size-read) / var(--sheet-label-lead) var(--font-text); letter-spacing: normal; text-transform: none; text-align: left; color: var(--ink);
  transition: color var(--warm), background-color var(--warm), border-color var(--warm);
}
.pack .mk-plain, .pack .mk-line { grid-template-columns: minmax(0, 1fr) auto; }
.pack .nm { min-width: 0; overflow-wrap: anywhere; }
.pack .sub { display: block; font: var(--weight-read) var(--size-label) / var(--pack-sub-lead) var(--font-text); letter-spacing: normal; text-transform: none; color: var(--ink-dim); }
.pack .sub[hidden] { display: none; }
.pack .fig, .pack .c { font: var(--weight-label) var(--size-say) / 1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* the chosen row: the lamp's rule at its left and its faint ground, under the pointer or the keys; a line of making by hand's list is chosen as a line of the frame's list is (`aria-current`) */
.pack .item:hover:not(:disabled), .pack .item:focus-visible:not(:disabled) { border-left-color: var(--lamp); background-color: var(--pack-wash); color: var(--ink); outline: none; }
.pack .mk-line:hover:not(:disabled), .pack .mk-line:focus-visible:not(:disabled), .pack .mk-line[aria-current] { border-left-color: var(--lamp); background-color: var(--pack-wash); color: var(--ink); outline: none; }
.pack .mk-line { cursor: pointer; }
/* a line of a list of things to make (the frame's list at the bench, making by hand's own): the picture and the name of the thing and nothing of its cost; where the pack cannot make it the line is dim and says `Short` small at its right */
.mk-pick { display: flex; align-items: center; gap: var(--sheet-line-gap); min-width: 0; width: 100%; text-align: left; }
.mk-pick .n { min-width: 0; overflow-wrap: anywhere; }
.mk-pick[data-short='1'] { color: var(--ink-dim); }
.mk-flag { margin-left: auto; font: var(--weight-label) var(--size-label) / 1 var(--font-text); letter-spacing: normal; text-transform: none; white-space: nowrap; color: var(--ink-dim); }
.sheet-line-label:has(> .mk-pick) { flex: 1 1 auto; min-width: 0; }
/* a thing on the hotbar wears its slot's number in a small plain tag beside its name; the head lamp its charge, one mark filled by the share that is left of the battery in it */
.pack .on-bar { display: inline-block; margin-left: var(--pack-mark-gap); padding: var(--pack-tag-pad-y) var(--pack-tag-pad-x); vertical-align: middle; font: var(--weight-label) var(--size-label) / var(--sheet-label-lead) var(--font-text); letter-spacing: var(--track-label); color: var(--ink-dim); box-shadow: inset 0 0 0 var(--pack-edge) var(--ink-faint); }
.pack .on-bar[hidden] { display: none; }
.pack .charge { display: inline-block; box-sizing: border-box; width: var(--pack-charge-w); height: var(--pack-charge-h); margin-left: var(--pack-mark-gap); vertical-align: middle; border: var(--pack-edge) solid var(--ink-dim); }
.pack .charge i { display: block; height: 100%; width: calc(var(--share) * 100%); background: var(--ink); }
/* what the pack is short of: a dashed row in the dim ink, and by how much at its end. `It takes` is one grid, a row of it a subgrid, so that the figures stand under the two heads (the first column is as wide as the row's picture and its left padding and rule: a subgrid's padding comes out of its tracks). The columns size themselves, no width is named: the name's column is never narrower than its longest word (`min-content`) and no more than the longest name; the two heads' columns likewise, so a head wraps between its words before a name gives way; what is left over is the empty column before the figures (`1fr`), so that the figures stand at the right edge at any width */
.pack .mk-need[data-short='1'] { border-bottom-style: dashed; border-bottom-color: var(--ink-dim); color: var(--ink-dim); }
.pack .mk-takes { grid-template-columns: calc(var(--icon-row) + var(--pack-row-pad-l) + var(--sheet-rule)) minmax(min-content, max-content) minmax(0, 1fr) minmax(min-content, max-content) minmax(min-content, max-content) auto; column-gap: var(--pack-row-gap); }
.pack .mk-takes > .cap { grid-column: 1 / -1; }
.pack .mk-takes .mk-need, .pack .mk-heads { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; column-gap: var(--pack-row-gap); }
.pack .mk-takes .nm { overflow-wrap: normal; }
.pack .mk-heads { box-sizing: border-box; padding: 0 var(--pack-row-pad-r) 0 var(--pack-row-pad-l); border-left: var(--sheet-rule) solid transparent; }
.pack .col-head { justify-self: end; font: var(--weight-label) var(--size-label) / var(--sheet-label-lead) var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; text-align: right; color: var(--ink-faint); }
.pack .col-need { grid-column: 4; }
.pack .col-have { grid-column: 5; }
.pack .mk-takes .fig-need { grid-column: 4; }
.pack .mk-takes .fig-have { grid-column: 5; }
.pack .mk-takes .mk-short { grid-column: 6; }
.pack .fig-need, .pack .fig-have { justify-self: end; }
.pack .mk-short { justify-self: end; font: var(--weight-label) var(--size-label) / 1 var(--font-text); white-space: nowrap; color: var(--ink-dim); }
/* making by hand: the list at the left and the chosen thing's two places at the right; where the body is not as wide as both need (the probe is as wide as both and the gap between) the places stand under the chosen line */
.pack .mk-page { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(var(--make-list-min), max-content) minmax(var(--make-place-min), 1fr); gap: 0 var(--pack-cols-gap); align-items: start; }
.pack .mk-page[data-narrow='1'] { grid-template-columns: minmax(0, 1fr); }
.pack .mk-probe { position: absolute; visibility: hidden; height: 0; pointer-events: none; width: calc(var(--make-list-min) + var(--pack-cols-gap) + var(--make-place-min)); }
.pack .mk-ruler { position: absolute; left: 0; right: 0; height: 0; visibility: hidden; pointer-events: none; }
.pack .mk-list { display: grid; align-content: start; min-width: 0; }
.pack .mk-place { display: grid; align-content: start; gap: var(--pack-gap); min-width: 0; }
.pack .mk-cost { display: grid; align-content: start; min-width: 0; }
/* beside a list longer than the body the chosen thing's places stay in sight while the list scrolls (the body's own lift is where they stand at rest) */
.pack .mk-page:not([data-narrow='1']) > .mk-place { position: sticky; top: var(--sheet-body-top); }
.pack .mk-page[data-narrow='1'] .mk-place { padding: var(--pack-cap-gap) 0 var(--pack-gap) var(--pack-row-pad-l); }
/* the button that makes: its key drawn on it, the lamp's rule and faint ground; drawn off (dashed and dim) where the pack is short, and then it says what is missing when it is pressed */
.pack .btns { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--pack-btn-gap); margin-top: var(--pack-btn-top); }
.pack .mk-why { color: var(--ink-dim); }
.pack .mk-why[hidden] { display: none; }
.pack .make {
  display: inline-flex; align-items: center; gap: var(--pack-btn-gap); box-sizing: border-box; height: var(--pack-btn-h); margin: 0; padding: 0 var(--pack-btn-pad);
  border: var(--pack-edge) solid var(--lamp); border-radius: 0; background-color: var(--pack-go); box-shadow: inset var(--sheet-rule) 0 0 var(--lamp);
  font: var(--weight-say) var(--size-say) / 1 var(--font-text); letter-spacing: normal; text-transform: none; white-space: nowrap; color: var(--ink);
}
.pack .make:hover:not(:disabled), .pack .make:focus-visible:not(:disabled) { background-color: var(--pack-go); color: var(--ink); }
.pack .make:focus-visible { outline: var(--sheet-rule) solid var(--ink); outline-offset: var(--sheet-rule); }
.pack .make[aria-disabled='true'], .pack .make[aria-disabled='true']:hover:not(:disabled), .pack .make[aria-disabled='true']:focus-visible:not(:disabled) {
  border-style: dashed; border-color: var(--ink-faint); background-color: transparent; box-shadow: none; color: var(--ink-faint); cursor: default;
}
@media (max-width: 760px) {
  .pack .cols { grid-template-columns: minmax(0, 1fr); }
}
/* ── the end of the pack and the bench ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── */

/* ── the pause (#329, ui/sheets/pause.js; the picture is design-313's `sheet-pause`) ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   Its side holds the counter (in the frame's own place for what a sheet keeps at its side) and the frame's list; its body the settings, one row each: the name, the control, the value in words at the right. The controls are
   the browser's own (a range, a dropdown, a box: a keyboard, a pad's cursor and a screen reader work them as they are) and are drawn here in the design's look: the track a thin line with its filled part in ink and a square ink
   handle, a tick where the setting stood as made; the dropdown a framed box with an arrow; found footage two words side by side, the one that holds in ink. Nothing here is a length, a colour or a time of its own: the
   HUD's tokens (data/hud.js `HUD.tokens`) and the rows of `HUD.settings.drawn`, which pause.js sets on the part that wears them as custom properties (tests/pause.test.mjs holds this rule: no number with a unit and no
   colour is written between the two lines that mark the pause). A row wraps its control under its name where the room is short, so no window needs a rule of its own. */
.since { display: grid; gap: var(--pause-since-gap); margin: 0; }
.since .counter { font: var(--weight-label) var(--size-figure) / 1 var(--font-display); letter-spacing: var(--pause-fig-track); font-variant-numeric: tabular-nums; color: var(--ink); }
.since .words { font: var(--weight-label) var(--size-label) / var(--sheet-label-lead) var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-faint); }
.pause { display: grid; gap: var(--pause-gap); align-content: start; min-width: 0; }
.pause > .cap { margin: 0; font: var(--weight-label) var(--size-label) / var(--sheet-label-lead) var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-faint); }
.settings { margin: 0; padding: 0; list-style: none; }
.setting { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pause-row-air) var(--pause-col-gap); box-sizing: border-box; min-height: var(--pause-row-h); padding: var(--pause-row-air) 0; border-bottom: var(--pause-edge) solid var(--rule); }
.setting .name { flex: 0 0 var(--pause-name-w); font: var(--weight-say) var(--size-say) / 1 var(--font-text); letter-spacing: normal; text-transform: none; }   /* (a plain `.name` of ui2.css is a capitals label) */
.setting .val { flex: 0 0 var(--pause-val-w); text-align: right; font: var(--weight-read) var(--size-read) / 1 var(--font-text); color: var(--ink-dim); }
/* the track: the browser's range, its own look put away. The line (and the tick where the setting stood as made, `--start`, and the filled part up to the handle, `--at`) is drawn in the track's own box, which is as tall as the handle. */
.setting .track {
  --pause-line: linear-gradient(var(--ink-faint), var(--ink-faint)) calc(var(--pause-handle-w) / 2 + (100% - var(--pause-handle-w)) * var(--start, 0) - var(--pause-tick-w) / 2) 50% / var(--pause-tick-w) var(--pause-tick-h) no-repeat,
    linear-gradient(90deg, var(--ink) calc(var(--pause-handle-w) / 2 + (100% - var(--pause-handle-w)) * var(--at, 0)), var(--ink-faint) 0) 0 50% / 100% var(--plate-rule) no-repeat;
  -webkit-appearance: none; appearance: none; box-sizing: border-box; flex: 1 1 var(--pause-track-min); min-width: 0; height: var(--pause-handle-h); margin: 0; padding: 0; background: transparent; cursor: pointer;
}
.setting .track::-webkit-slider-runnable-track { height: var(--pause-handle-h); background: var(--pause-line); }
.setting .track::-moz-range-track { height: var(--pause-handle-h); background: var(--pause-line); }
.setting .track::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: var(--pause-handle-w); height: var(--pause-handle-h); border: 0; border-radius: 0; background: var(--ink); }
.setting .track::-moz-range-thumb { width: var(--pause-handle-w); height: var(--pause-handle-h); border: 0; border-radius: 0; background: var(--ink); }
.setting .track:focus-visible, .setting .seg:has(input:focus-visible), .setting .drop:has(select:focus-visible) { outline: var(--plate-rule) solid var(--ink-dim); outline-offset: var(--pause-focus-air); }
/* found footage: the box is the browser's, laid over the two words and unseen; the word that holds is in ink on the lamp's ground */
.setting .seg { position: relative; display: inline-flex; border: var(--pause-edge) solid var(--ink-faint); cursor: pointer; }
.setting .seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.setting .seg .word { padding: var(--pause-seg-pad); font: var(--weight-say) var(--size-read) / 1 var(--font-text); color: var(--ink-dim); white-space: nowrap; transition: color var(--warm), background var(--warm); }
.setting .seg .word.on { background: var(--ink); color: var(--black); }
/* what the player listens on: the browser's dropdown on the sheet's own ground and ink (color-scheme dark gives the browser's list the same, and each option is told it), in the frame of the design's `.drop` */
.setting .drop { display: inline-flex; align-items: center; justify-content: space-between; gap: var(--pause-drop-gap); box-sizing: border-box; min-width: var(--pause-drop-w); padding: var(--pause-drop-pad); border: var(--pause-edge) solid var(--ink-faint); transition: border-color var(--warm); }
.setting .drop:hover, .setting .drop:has(select:focus-visible) { border-color: var(--ink); }
.setting .drop select { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; outline: none; -webkit-appearance: none; appearance: none; background: transparent; color: var(--ink); color-scheme: dark; font: var(--weight-say) var(--size-read) / 1 var(--font-text); cursor: pointer; }
.setting .drop select option { color: var(--ink); background-color: var(--black); }
.setting .drop i { flex: none; width: var(--pause-arrow); height: var(--pause-arrow); border: solid var(--ink); border-width: 0 var(--key-line) var(--key-line) 0; transform: translateY(calc(var(--pause-arrow) * -.3)) rotate(45deg); pointer-events: none; }
/* the foot: the build stands at its far end, in the faint ink, written as it is (the status line, which stood there, says nothing on this sheet) */
html[data-panel='pause'] .panel-screen .sheet[data-frame] .sheet-foot .sheet-entry:has(+ .sheet-hint) { margin-left: auto; letter-spacing: normal; text-transform: none; color: var(--ink-faint); }
html[data-panel='pause'] .panel-screen .sheet[data-frame] .sheet-foot .status { margin-left: 0; }
/* ── the end of the pause ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── */
