/* The app carries its own typefaces (app/vendor/fonts, SIL Open Font License) so that it looks
     the same with no connection and never asks another site for anything. */
  @font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-style: normal; font-display: swap; src: url("vendor/fonts/barlow-semi-condensed-500.woff2") format("woff2"); }
  @font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("vendor/fonts/barlow-semi-condensed-600.woff2") format("woff2"); }
  @font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("vendor/fonts/barlow-semi-condensed-700.woff2") format("woff2"); }
  @font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("vendor/fonts/jetbrains-mono-400.woff2") format("woff2"); }
  @font-face { font-family: "JetBrains Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("vendor/fonts/jetbrains-mono-600.woff2") format("woff2"); }
:root {
    color-scheme: dark;
    --bg: #000000; /* pure black, the same as mspaint's black fill, so a copy of the puzzle pastes without a lighter box (ToDo B168) */
    /* Which build these styles belong to: the same stamp as BUILD in js/common.js and the page's
       <meta name="twistthis-build">, changed together with every delivery (test K-05). */
    --styles: "2026-11-22c";
    --panel: rgb(20, 22, 26); /* opaque: the puzzle must never show through words (MF-43, bug B-36) */
    --line: #2b2f37;
    --text: #e8e9ec;
    --muted: #b5bac4;
    --chip: #d4d7dd;     /* the words on timeline chips other than the current one (B36) */
    --accent: #f5c518;
    --accent-ink: #15130a;
    --view: #7fb4ff;
    --warn: #ff8a65;
    --mark: #3ddc84;     /* checkpoints (ToDo E1): used for nothing else */
    --scramble: #e48cff; /* Scramble steps on the timeline (ToDo B29): used for nothing else */
    --clip: #00e5ff;     /* the clip on the timeline (ToDo E7): used for nothing else */
    --ui: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
    /* Every box you type into: a fill a step lighter than the panels and a clear edge, so the box
       stands out from what is around it (Joe, MF-48: the Algorithm box was hard to see). */
    /* One color and one line per kind of thing, the same everywhere (Joe and Grok, MF-51): timelines
       white, checkpoints green (as their flags on the chips), algorithms blue (as the view lane).
       Yellow stays for the step you are on and the main buttons. */
    --kind-line: 3px;
    --kind-timeline: #ffffff;
    --kind-algorithm: var(--view);
    --top-room: calc(env(safe-area-inset-top, 0px) + 60px); /* the top cards (TwistThis, Move) end 52 px down, plus a gap */
    --field: #2a2f38;
    --field-edge: #7b8494;
    /* The frame round the move timeline: white like a saved timeline's line, but thin and softer, so
       it does not shout (Joe, MF-52: a bit too thick and bright). */
    --tl-frame: 1px solid rgba(255, 255, 255, 0.6);
    --searching: #ff4d4d; /* the edge of a search box with words in it (Joe and Grok, MF-52) */
  }
  /* The page itself never scrolls or bounces, so a drag on the puzzle can't move the page or make a
     browser's address bar slide in and out. */
  html, body { height: 100%; overscroll-behavior: none; }
  body { position: fixed; inset: 0; margin: 0; background: var(--bg); color: var(--text); font-family: var(--ui); overflow: hidden; }
  #stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
  #stage.turning { cursor: grabbing; }
  .hud { position: fixed; left: 0; right: 0; display: flex; gap: 8px; padding-inline: 16px; pointer-events: none; }
  .hud > * { pointer-events: auto; }
  /* The controls get their words from the text table when the app starts (js/main.js). Until then
     they are kept out of sight, so nobody sees buttons with nothing on them. A start-up error
     message (#diag) shows regardless. */
  .hud { visibility: hidden; }
  body.ready .hud, #diag { visibility: visible; }
  /* The Puzzle Rose (ToDo B166, B177): a small card under the Move count, at the right, below every panel (it comes before them on the page, and has no z-index). Its line is in full-strength text. */
  /* The readout card (ToDo B12, B89): under the name at the left; fixed in place, with numbers of a fixed width, so nothing moves as they grow. Hidden until a Feel box asks for it. */
  .readout { padding: 6px 10px; display: grid; grid-template-columns: auto auto auto; align-items: center; column-gap: 8px; row-gap: 3px; visibility: hidden; }
  body.ready .readout { visibility: visible; }
  /* The puzzle's name (ToDo B287, Joe 2026-11-10), a line of full-strength text under the name and version at the top left: fixed in place, so
     nothing moves as it changes, and one line, cut short with an ellipsis before it reaches the Puzzle Rose. It has no card, so it takes no room. */
  .tlname { position: fixed; left: 29px; top: calc(env(safe-area-inset-top, 0px) + 54px); max-width: calc(100vw - 215px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; line-height: 20px; color: var(--text); pointer-events: none; visibility: hidden; }
  body.ready .tlname { visibility: visible; }
  .readout[hidden] { display: none; }
  /* Each line is a row of the card's grid (label, number, buttons), so every number stands at the right edge of one column (ToDo B277, Joe 2611091453). */
  .readout .rline { display: contents; }
  .readout .rline[hidden] { display: none; }
  .readout .label { grid-column: 1; }   /* each line's label starts a new row, though a line has fewer than 3 cells */
  .readout .count { text-align: right; justify-self: end; }
  .readout .rbtns { display: flex; gap: 4px; }
  .readout button { min-height: 28px; min-width: 34px; padding: 2px 8px; }
  /* The right column (ToDo B363, Joe 2611191204): under Move, the readout and then the Puzzle Rose, one under the other. */
  .rightstack { position: fixed; right: 16px; top: calc(env(safe-area-inset-top, 0px) + 62px); display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  /* The Move counter merged into the readout (ToDo B371, Joe 2611192330): its card hides and the column starts where the card was. */
  .top .card.stat[hidden] { display: none; }
  body.merged .rightstack { top: calc(env(safe-area-inset-top, 0px) + 14px); }
  .rose { box-sizing: border-box; min-width: 120px; /* as wide as the Move box, so the rolled-up hamburger lines up with it (Joe 2611221330) */ padding: 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; visibility: hidden; }
  /* The hamburger (ToDo B278): two long bars; the menu under it holds the hold line, the flash buttons and the tick boxes, and shows only when opened. */
  .rose #roseMenuBtn { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 100%; min-width: 44px; min-height: 28px; padding: 4px 10px; }   /* closed, the card is only this button: min-width keeps the two lines from shrinking to nothing (Joe 2611221300) */
  .rose #roseMenuBtn i { display: block; height: 2px; border-radius: 1px; background: var(--text); }
  .rose #roseMenu { display: flex; flex-direction: column; align-items: center; gap: 2px; align-self: stretch; }
  .rose #roseMenu[hidden] { display: none; }
  .rose .check { align-self: stretch; padding-left: 6px; }   /* the tick boxes stand at the left edge, one under another (Joe 2611010505) */
  .rose .flashes { display: flex; gap: 4px; }
  .rose .flashes button { min-height: 28px; padding: 3px 8px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
  /* The numbers the flash buttons write over the puzzle (ui/flash.js): laid over the puzzle, under the cards, never takes a press. */
  #flash { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  body.ready .rose { visibility: visible; }
  /* The Feel switches for the hold features (ToDo B178): Show the Rose off hides the card except while Show Rose is held; Show the hold line off hides both lines. */
  body.noRose:not(.roseUp) .rose { display: none; }
  body.noHoldLine #roseLine, body.noHoldLine #algHold { display: none; }
  /* While Show Rose is held (ui/rose.js), the card rises above the panels, next to the button. */
  body.roseUp .rose { position: fixed; z-index: 40; background: var(--panel); }
  /* Hamburger closed (ToDo B363): the button alone. While Show Rose is held the Rose still shows. */
  .rose.closed canvas, .rose.closed #roseMenu { display: none; }
  body.roseUp .rose.closed canvas { display: block; }
  .rose canvas { width: 96px; height: 96px; touch-action: none; cursor: grab; display: block; }
  .rose .sub { color: var(--text); font-size: 12px; white-space: nowrap; }
  /* The two top pieces sit in the corners on one line and never wrap, so nothing up here can change
     the room left for the puzzle. */
  .top { top: 0; padding-top: calc(env(safe-area-inset-top, 0px) + 14px); justify-content: space-between; align-items: stretch; flex-wrap: nowrap; }
  .top .card { display: flex; align-items: baseline; gap: 8px; padding: 7px 12px; white-space: nowrap; }
  .bottom { bottom: 0; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); flex-direction: column; align-items: stretch; }
  .card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
  .wide { max-width: 760px; width: 100%; margin-inline: auto; box-sizing: border-box; }
  h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }
  .sub { color: var(--muted); font-size: 13px; }
  /* Room for "999/999" is kept even when the count is short, so this piece stays the same width. */
  .count { font-family: var(--mono); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 7ch; text-align: right; }
  .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
  #diag { border-color: var(--warn); color: var(--warn); font-family: var(--mono); font-size: 12px; white-space: pre-wrap; }
  #note { border-color: var(--view); font-size: 14px; text-align: center; }
  /* Another tab owns the session (js/tabs.js): this tab is covered, in strong contrast (B36). */
  #away { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.88); display: flex; align-items: center; justify-content: center; padding: 16px; }
  #away[hidden] { display: none; }
  #rosePieces[hidden] { display: none; }
  #away .card { max-width: 440px; text-align: center; border-color: var(--accent); background: #000; }
  #away p { margin: 0 0 14px; font-size: 18px; line-height: 1.4; color: #fff; }

  .timeline { display: flex; align-items: center; gap: 6px; padding: 6px; }
  /* The move timeline is framed in the timelines' white line, as their rows in History are (MF-51). */
  .card.timeline { border: var(--tl-frame); }
  .timeline > button { min-width: 44px; padding-inline: 10px; font-size: 18px; line-height: 1; }
  #tl { flex: 1; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
  #tl::-webkit-scrollbar { display: none; }
  /* With the view lane shown (ToDo B87) the timeline is two rows in one grid, filled a column at a
     time: above each move chip, a strip with a thin blue bar for each look (a turn of the whole
     puzzle) taken after that move. Both rows scroll together; a column is as wide as its chip, or
     its bars if wider. */
  #tl.lane { display: grid; grid-template-rows: auto auto; grid-auto-flow: column; grid-auto-columns: max-content; row-gap: 2px; column-gap: 2px; }
  /* The looks above a move (MF-63): a stack of thin horizontal bars, the first at the bottom, as wide
     as the column. Columns with fewer bars have them at the bottom too, just above their chip. */
  #tl .looks { display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 0; min-height: 36px; } /* room for three bars always (render/scene.js LANE_ROOM): the puzzle does not shrink as looks are added; a taller stack grows up over the black area */
  /* A bar: a 4 px blue line in a 12 px tall target (so a finger can hit it). The look you are at is
     outlined in white, as the move you are at is. */
  .vbar { width: 100%; min-width: 14px; height: 12px; min-height: 0; padding: 0 1px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; gap: 3px; cursor: pointer; position: relative; flex: none; }
  .vbar::before { content: ""; flex: 1; height: 4px; border-radius: 2px; background: var(--view); }
  /* A look with a checkpoint (ToDo B279, decision 0024): its bar is filled with the checkpoint's own color
     (the eight of the chip, below), 6 px high with a 1 px edge so it is heavier than a plain bar, and
     the bar of the "more" count takes the color of the first checkpoint among its looks. The bars are
     seen on the timeline card (--panel), so the contrast is measured against that, not pure black: the
     edge is the color itself where the color reads 7 to 1 there (colors 1, 3, 4 and 6) and a lighter tint of it
     where not (2, 5, 7, 8: 6.5, 6.0, 3.0 and 2.5), so the bar's outline is always 7 to 1 or better. Test V-24.
     Hold View (the .held rules): the fill and the edge go to 70% of their color, never grey; a checkpoint
     bar stays 6 px high with its edge, and the plain bars are 4 px grey, so the two are told apart by shape
     as well as by color (color 6 is itself grey-blue: its shade is only 23 from the grey in RGB). */
  .vbar.marked::before { height: 6px; box-sizing: border-box; border: 1px solid var(--bar-edge); background: var(--bar-fill); }
  .vbar.cp1 { --bar-fill: var(--cp1); --bar-edge: var(--cp1);   --bar-dim: #b36f2f; --bar-dim-edge: #b36f2f; }
  .vbar.cp2 { --bar-fill: var(--cp2); --bar-edge: #ffa0a0;      --bar-dim: #b34b4b; --bar-dim-edge: #b37070; }
  .vbar.cp3 { --bar-fill: var(--cp3); --bar-edge: var(--cp3);   --bar-dim: #b37289; --bar-dim-edge: #b37289; }
  .vbar.cp4 { --bar-fill: var(--cp4); --bar-edge: var(--cp4);   --bar-dim: #ab967b; --bar-dim-edge: #ab967b; }
  .vbar.cp5 { --bar-fill: var(--cp5); --bar-edge: #e8bd96;      --bar-dim: #895f37; --bar-dim-edge: #a28469; }
  .vbar.cp6 { --bar-fill: var(--cp6); --bar-edge: var(--cp6);   --bar-dim: #7b8089; --bar-dim-edge: #7b8089; }
  .vbar.cp7 { --bar-fill: var(--cp7); --bar-edge: #ff9d94;      --bar-dim: #81231d; --bar-dim-edge: #b36e68; }
  .vbar.cp8 { --bar-fill: var(--cp8); --bar-edge: #dba67c;      --bar-dim: #56341d; --bar-dim-edge: #997457; }
  .vbar.cur::before { box-shadow: 0 0 0 2px #fff; }
  /* A look chosen to clear (ToDo B146, B147), here or in the Views list: a thick bar. */
  .vbar.sel::before { height: 10px; border-radius: 3px; }
  .vbar.more .n { font-family: var(--mono); font-size: 11px; line-height: 1; color: var(--view); font-weight: 700; }
  .vbar.more.marked .n { color: var(--bar-edge); }
  /* Hold View: every bar grey, and a click on one does nothing (Joe, MF-64). A bar that carries a
     checkpoint (ToDo B279) is not grey but a dimmed shade of its color, so a checkpoint can still be seen. */
  #tl.held .vbar { cursor: default; }
  #tl.held .vbar::before { background: #6b7280; }
  #tl.held .vbar.marked::before { background: var(--bar-dim); border-color: var(--bar-dim-edge); }
  #tl.held .vbar.more .n { color: #9ca3af; } /* the count is text: 7 to 1 on the card (B36, L-40), so a checkpoint's shade does not color it here */
  /* The timeline's right-click menu (ui/tlmenu.js, ToDo B291): a small card beside the pointer; its × is at its top right (L-31). */
  #tlMenu { position: fixed; z-index: 30; display: flex; flex-wrap: wrap; max-width: calc(100vw - 16px); align-items: center; gap: 8px; padding: 6px 46px 6px 8px; min-height: 44px; box-sizing: border-box; border-color: var(--view); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8); }
  #tlMenu[hidden], #tlMenu button[hidden] { display: none; }
  #tlMenu .x { position: absolute; top: 6px; right: 6px; }
  #uprightMenu { position: fixed; z-index: 30; display: flex; flex-wrap: wrap; max-width: calc(100vw - 16px); align-items: center; gap: 8px; padding: 6px 46px 6px 8px; min-height: 44px; box-sizing: border-box; border-color: var(--view); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8); }
  #uprightMenu[hidden] { display: none; }
  #uprightMenu .x { position: absolute; top: 6px; right: 6px; }
  /* The Edit step card (ui/stepedit.js, ToDo B293): small, beside the pointer where the menu stood, over the page and not a modal box. */
  #stepEdit { position: fixed; z-index: 30; width: min(340px, calc(100vw - 16px)); padding: 10px 46px 10px 12px; box-sizing: border-box; border-color: var(--view); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8); }
  #stepEdit[hidden], #stepEdit [hidden] { display: none; }
  #stepEdit p { margin: 0 0 8px; font-size: 15px; line-height: 1.35; color: var(--text); }
  #stepEdit p.err { color: var(--warn); font-weight: 700; }
  #stepEdit input { width: 100%; box-sizing: border-box; font-family: var(--mono); font-size: 16px; color: #fff; background: var(--field); border: 1px solid var(--field-edge); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
  #stepEdit .algrow { margin-top: 0; }
  #stepEdit .x { position: absolute; top: 6px; right: 6px; }
  .chip { flex: none; font-family: var(--mono); font-size: 13px; padding: 5px 5px; border-radius: 5px; border: 1px dashed #6b7280; cursor: pointer; white-space: nowrap; color: var(--text); background: transparent; min-height: 0; font-weight: 400; }
  /* Steps already played and steps still to come are both easy to read (Joe, 2026-10-13: the grey
     ones were too dim, ToDo B36). Every chip has the dashed edge, on both rows (Joe, MF-61: they look
     more like chips; steps to come are told by being right of the step you are on). */
  .chip.past { color: var(--chip); }
  .chip.future { color: var(--chip); }
  /* The step you are on: a white outline, not a yellow fill (ToDo B66, Joe and Grok): its words keep
     their own color (a rotation blue, a Scramble purple) and stay readable; yellow is for the main
     buttons. Drawn inside the chip (inset), so it never collides with the checkpoint bar on top or
     the clip line under it. The view lane's current chip has the same outline (Joe, B87; it was
     filled blue, B68). */
  .chip.cur { background: transparent; color: #fff; font-weight: 600; box-shadow: inset 0 0 0 2px #fff; }
  .chip.view { color: var(--view); }
  #tl .chip.view.cur { color: var(--view); }
  .chip.snap { font-family: var(--ui); font-weight: 600; letter-spacing: 0.03em; }
  .chip .arr { display: inline-block; margin-right: 3px; }
  .chip.start { color: var(--chip); }
  .chip.start.cur { color: #fff; }
  /* ● can be pressed and held to start a new timeline (ToDo B24): no text selection, no phone menu. */
  .chip.start { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  /* A Scramble step in a color of its own (ToDo B29). */
  .chip.scramble { color: var(--scramble); }
  .chip.scramble.past { color: var(--scramble); }
  .chip.scramble.cur { color: var(--scramble); }
  /* A null step (ToDo B292, decision 0028): the same chip with no text, so it gets the size of a short move chip to be seen and tapped. */
  .chip.null { min-width: 30px; min-height: 28px; box-sizing: border-box; }
  /* A step that carries a checkpoint (ToDo E1): a bold bar across the top and a flag, in a color
     nothing else uses, so it can be seen at a glance (B36: obvious, in strong contrast). */
  .chip.mark { border-top: 5px solid var(--mark); padding-top: 2px; }
  .chip.mark.future { border-top-style: solid; border-top-color: var(--mark); }
  .chip .flag { color: var(--mark); font-family: var(--ui); font-weight: 700; margin-right: 3px; }
  /* A checkpoint's chip is filled with its own color (ToDo B67): eight strong colors kept away from
     the reserved ones (yellow buttons, checkpoint green, rotation blue, white, Scramble purple, clip
     cyan). Each comes with the ink that reads best on it. The green bar stays on top, and the flag
     gets a thin dark edge so it shows on a light fill. Saved as a number, 1 to 8 (1 when absent). */
  :root { --cp1: #ff9f43; --cp1-ink: #000; --cp2: #ff6b6b; --cp2-ink: #000; --cp3: #ffa3c4; --cp3-ink: #000; --cp4: #f4d6b0; --cp4-ink: #000;
          --cp5: #c4874f; --cp5-ink: #000; --cp6: #b0b7c3; --cp6-ink: #000; --cp7: #b8322a; --cp7-ink: #fff; --cp8: #7b4a2a; --cp8-ink: #fff; }
  .chip.mark .flag { text-shadow: 0 0 1px #000, 0 0 1px #000, 0 0 2px #000; }
  .chip.mark.cp1, .swatch.cp1, .hcp.cp1 { background: var(--cp1); color: var(--cp1-ink); }
  .chip.mark.cp2, .swatch.cp2, .hcp.cp2 { background: var(--cp2); color: var(--cp2-ink); }
  .chip.mark.cp3, .swatch.cp3, .hcp.cp3 { background: var(--cp3); color: var(--cp3-ink); }
  .chip.mark.cp4, .swatch.cp4, .hcp.cp4 { background: var(--cp4); color: var(--cp4-ink); }
  .chip.mark.cp5, .swatch.cp5, .hcp.cp5 { background: var(--cp5); color: var(--cp5-ink); }
  .chip.mark.cp6, .swatch.cp6, .hcp.cp6 { background: var(--cp6); color: var(--cp6-ink); }
  .chip.mark.cp7, .swatch.cp7, .hcp.cp7 { background: var(--cp7); color: var(--cp7-ink); }
  .chip.mark.cp8, .swatch.cp8, .hcp.cp8 { background: var(--cp8); color: var(--cp8-ink); }
  /* The current step on a filled chip: the white outline with a black ring inside it, so it shows on
     a light fill as well as a dark one. */
  .chip.mark.cur { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #000; }
  /* A checkpoint's note (B67, MF-60): title, name and buttons on one line, centered top to bottom. */
  /* The Views list's × sits in the box's top right corner, as on every panel (Joe, MF-82 step 8). */
  #note.looks { position: relative; padding-right: 50px; min-height: 52px; display: flex; align-items: center; justify-content: center; }
  #note.looks[hidden] { display: none; }
  #note.looks.withlane { flex-direction: column; gap: 8px; } /* the Views list with the checkpoint lane under it */
  #note .lclose { position: absolute; top: 6px; right: 6px; }
  #note .markline { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px; }
  #note .notetitle { color: var(--text); font-weight: 700; font-size: 12px; }
  #note .notetext { line-height: 1.2; }
  #note .lmsg { flex-basis: 100%; text-align: center; color: #fff; } /* what a Clear did to a checkpoint (B-68) */
  #note .markbtns { display: inline-flex; gap: 6px; }
  #note button[disabled] { opacity: .45; cursor: default; }
  #note .swatches { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
  #note .swatches[hidden] { display: none; }
  .swatch { width: 34px; height: 30px; min-width: 0; padding: 0; border: 2px solid #000; border-radius: 6px; }
  .swatch.on { box-shadow: 0 0 0 2px #fff; }
  /* The clip (ToDo E7): a dashed white line under its steps, and a solid white edge where it begins and
     ends. No fill and no color of its own on the chips (Joe, 2026-10-21: the cyan clip was hard to tell
     from a checkpoint's green; Grok: a checkpoint can be any of eight colors, so any colored clip would
     match one some day). The edges show even when only one mark is set. The clip frame in the
     Algorithm panel keeps its cyan. */
  /* A look chosen in the Views list, to clear with others (2610211321). */
  #note .chip.view.sel { background: var(--view); color: #07101f; }
  .chip.clip, .chip.clipA, .chip.clipB { border-bottom: 3px dashed #fff; padding-bottom: 3px; background-clip: padding-box; } /* the fill (a checkpoint color) must not show between the dashes */
  .chip.clip.future { border-bottom-style: dashed; border-bottom-color: #fff; }
  .chip.clipA { border-left: 3px solid #fff; }
  .chip.clipB { border-right: 3px solid #fff; }


  .bar { position: relative; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; }
  /* Wide screens: the menu's controls are ordinary members of the button row (the layer picker
     first, as before) and there is no Menu button. Phones: see the end of this file. */
  .menu { display: contents; }
  .menu #family { order: -3; }
  .menu #category { order: -2; }
  .menu #order { order: -1; }
  #menuBtn { display: none; }
  /* Wide screen (ToDo B362, decision 0043, Joe 2611191204): the bar in three boxes with a dimmed outline, Puzzle manipulation controls,
     Panel launchers and Advanced features (ui/barlayout.js moves the buttons in). Every button in them is one height: the short ones
     of the row (Scramble, Reset, Hold View, Lock; the ".bar > button" rule below) are no longer direct children. The boxes are empty
     and gone on a phone, a short screen and in tutorial mode. */
  .bgroup { display: none; }
  .bar.grouped .bgroup { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 6px 8px; border: 1px solid var(--bargroup, #3a4a63); border-radius: 8px; }
  .bar.grouped .bgroup:not(:has(> :is(button, select):not([hidden]))) { display: none; }
  .bar.grouped { gap: 10px; }
  .bgroup > button, .bgroup > select { min-height: 32px; box-sizing: border-box; }
  /* A long press on a button must not select its words: on a phone that brings up the copy
     toolbar, which has no way out but Copy (MF-35, 2026-10-12). Screenshots are not affected. */
  button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  button, select { font-family: var(--ui); font-size: 15px; font-weight: 600; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 9px 14px; min-height: 40px; cursor: pointer; }
  button:hover, select:hover { border-color: #444a55; }
  button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  button:disabled { opacity: 0.45; cursor: default; }
  /* The timeline already on screen: Active, grey but plainly readable (B188; strong contrast, B36). */
  button.isactive:disabled { opacity: 1; background: #2a2e35; border-color: #3a3f49; color: #c9ced6; }
  /* Undo and Redo say what they would do, "Undo Scramble (brings back 1)" included: wide enough for
     that whole (MF-32, 0.8.8). Only a longer label than any the app makes is cut short. */
  button.undo { max-width: 24em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  button.small { font-size: 13px; min-height: 32px; padding: 5px 10px; }
  #feel { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; }
  .group { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; }
  .group:first-child { border-top: 0; padding-top: 0; }
  .slider { display: grid; gap: 4px; }
  .slider .row { display: flex; justify-content: space-between; }
  .slider output { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
  .slider .sub { font-size: 12px; color: var(--text); margin-top: -3px; }
  input[type=range] { width: 100%; accent-color: var(--accent); }
  .check { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
  .check[hidden] { display: none; }
  /* Settings tick boxes (ToDo B361, Joe 2611191204): a grid about three across; the words stand level with the box and wrap under
     themselves (the words are plain text after the box, so a second line starts at the box's left edge, as in Joe's picture). */
  #feel .ticks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
  #feel .ticks > .check { display: block; line-height: 1.25; }
  #feel .ticks > .check[hidden] { display: none; }
  #feel .ticks > .check input { vertical-align: middle; margin: 0 6px 0 0; }
  #feel { gap: 8px 18px; }
  #feel .group { padding-top: 6px; }   /* a hidden tick-box row stays hidden (the ?dev Rose boxes) */
  .check input { width: 18px; height: 18px; accent-color: var(--accent); }
  /* The ?dev background color box is a text box, not a tick: wide enough for #rrggbb (it was 18px, Joe 2611011754). */
  .check input#bgColor { width: 9.5em; height: auto; font: inherit; }
  .check select { min-height: 32px; padding: 4px 8px; font-size: 13px; }
  textarea { width: 100%; min-height: 70px; resize: vertical; font-family: var(--mono); font-size: 13px; color: var(--text); background: var(--field); border: 1px solid var(--field-edge); border-radius: 6px; padding: 8px; box-sizing: border-box; }
  .algrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
  /* The clip's Start and End boxes (B82): empty until set, then the step number, in the clip's color. */
  .clipmarks { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-weight: 600; }
  .clipmark { display: flex; gap: 6px; align-items: center; }
  .clipval { display: inline-block; min-width: 3.4em; min-height: 1.35em; padding: 2px 8px; border: 2px solid var(--clip); border-radius: 4px; background: #000; color: #fff; font-family: var(--mono); text-align: center; line-height: 1.35em; box-sizing: border-box; }
  /* The Keys panel (B118): the keys in a column of their own, what they do beside them. */
  #keysCard .note { color: var(--text); margin: 0 0 4px; }
  table.keys { border-collapse: collapse; width: 100%; margin: 2px 0 10px; }
  table.keys th { text-align: left; vertical-align: top; padding: 6px 12px 6px 0; font-weight: 400; width: 34%; }
  table.keys td { padding: 6px 0; color: #fff; line-height: 1.35; vertical-align: top; }
  table.keys tr + tr:not(.khead) { border-top: 1px solid #3a3f47; }
  table.keys tr.khead th { padding: 14px 0 2px; width: auto; }
  table.keys kbd { display: inline-block; margin: 0 2px 3px 0; font-family: var(--mono); font-size: 13px; color: #fff; background: var(--field); border: 1px solid var(--field-edge); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
  #logCount, #logBuild { font-family: var(--mono); font-weight: 400; margin-left: 6px; }
  .note { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 6px; }
  .note code { font-family: var(--mono); color: var(--text); }
  #algMsg { font-family: var(--mono); font-size: 12px; color: var(--muted); }
  #algMsg.err { color: var(--warn); }
  .algbox { border: 1px solid #c9ccd3; border-radius: 6px; padding: 8px 10px 10px; }
  .algbox textarea { margin: 0; }
  .clipbox { border: 1px solid var(--clip); border-radius: 6px; padding: 2px 10px 10px; margin-top: 10px; }
  .clipbox .label { color: var(--clip); font-weight: 700; }
  #clipMsg { font-size: 14px; color: var(--text); margin-top: 6px; }
  /* The test log (ToDo A12): plain lines, white on black, that can be selected. */
  #logLines { font-family: var(--mono); font-size: 12px; line-height: 1.4; color: #fff; background: #000; border: 1px solid #5a606b; border-radius: 6px; padding: 8px; margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
  #logLines { overflow-x: hidden; }
  #logMsg { font-size: 13px; color: var(--text); }
  #logTutPath { flex: 1 1 14em; min-width: 8em; font: inherit; font-size: 13px; padding: 4px 6px; color: var(--text); background: var(--bg); border: 1px solid #5a606b; border-radius: 6px; }
  #logOutline { margin: 8px 0 0; padding-left: 22px; max-height: 30vh; overflow-y: auto; font-size: 13px; color: var(--text); }
  #logOutline li { margin: 2px 0; }
  #logOutline button { text-align: left; }
  #logCard .note { color: var(--text); }
  /* With the view lane shown, the room for three bars sits above the chips, so the chips are lower
     than the middle of the card: the arrow buttons line up with the chips instead (Joe, A14
     screenshots 2026-10-21: chips 19 px low). Chips are 29 px tall; the buttons 44 (40 on phones). */
  .timeline.withLane { align-items: flex-end; }
  .timeline.withLane > button { margin-bottom: -5px; }
  @media (max-width: 520px) { .timeline.withLane > button { margin-bottom: -3px; } }
  .timeline > button.small { font-size: 13px; min-width: 0; }
  /* Hold View: two short lines, "Hold" over "View", so it takes little of the row (Joe, B87). */
  /* ⏮ and ⏭ (ToDo B55) beside ◀ and ▶. On a narrow phone the four are made slimmer so the chips
     between them keep room (a 360-wide phone: about four chips instead of three). */
  @media (max-width: 420px) { .timeline > button { min-width: 36px; padding-inline: 6px; } }
  /* A button whose panel is open is blue, as the toggles are while on (ToDo B321, Joe 2611141110): the panels of the menu, the Puzzle Picker, the checkpoint editor (#ask has data-mark only then). */
  .toggle[aria-pressed="true"], #feelBtn[aria-expanded="true"], #algBtn[aria-expanded="true"], #histBtn[aria-expanded="true"], #keysBtn[aria-expanded="true"], #logBtn[aria-expanded="true"], #menuBtn[aria-expanded="true"],
  body:has(#choose[open]) #pickBtn, body:has(#ask[open][data-mark]) :is(#markBtn, #markQuick, #note [data-mact="rename"]),
  /* Also blue (ToDo B337, B338, Joe 2611160214): Edit outline while the outline editor is open (maximized or folded: folding only adds .min), Play while playing. */
  body:has(#outlineEd:not([hidden])) #lessonEdit, #lessonPlay[aria-pressed="true"] { background: var(--view); color: #07101f; border-color: var(--view); }
  /* Lock: a long press must not select text or open the phone's own menu. While the finger holds
     it, it fills with the accent color, so the wait can be seen. */
  /* ◀ and ▶ of the move timeline are held to run (ToDo B25): a finger that wanders a little while
     holding must not turn the hold into a scroll of the row, which would cancel it. */
  #back, #fwd { touch-action: none; -webkit-touch-callout: none; }
  #holdView { white-space: nowrap; }
  /* Wide screens: Undo and Redo say what they would do, which can be long ("Undo 700 steps (brings
     back 2)"). Cut short with "…" so the bottom row stays one line and the puzzle never jumps (L-08);
     the hover text has all the words. Phones list them in the Menu, where there is room. */
  @media (min-width: 641px) and (min-height: 501px) { #undoBtn, #redoBtn { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
  /* Minimize (ToDo B46): only on a phone on its side. Black until pressed, then blue (.toggle above). On that same
     screen the bottom row is half as tall, about 20 px, so the puzzle has the room (Joe, 2611091632). The Menu's own
     buttons keep their size. */
  #minBtn { display: none; }
  @media (max-height: 500px) and (orientation: landscape) {
    #minBtn { display: inline-block; }
    .bar > button { min-height: 20px; padding-block: 2px; line-height: 1.2; }
  }
  /* A list that goes on (ToDo B60): its last line fades while there is more below (ui/fade.js); not while Minimized. */
  .scroll.more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
  body.minimized .scroll.more { -webkit-mask-image: none; mask-image: none; }
  /* Phones (A14, 360 px): Scramble, Reset, Menu, Hold View and Lock on one line (Joe, MF-65). */
  @media (max-width: 420px) { .bar { gap: 6px; } .bar > button, #holdView { padding-inline: 8px; } }
  /* (MF-68 step 15: with Hold View on and the puzzle Locked, the longer word wrapped Lock to a second line.) */
  #lockBtn { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
  #lockBtn.holding { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transition: background 0.8s linear; }
  /* The how-to-turn sentence (ToDo B364): the TwistThis card's hover and focus, and a long press on a phone (ui/hud.js adds .tip), in large white type. */
  .brand { position: relative; }
  .brandtip { display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 60; width: max-content; max-width: min(34em, calc(100vw - 32px)); padding: 12px 16px; background: #000; color: #fff; border: 2px solid #fff; border-radius: 8px; font-size: 20px; font-weight: 600; line-height: 1.3; white-space: normal; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8); }
  .brand:is(:hover, :focus-visible, .tip) .brandtip { display: block; }
  body:has(.brand:is(:hover, :focus-visible, .tip)) .tlname { visibility: hidden; }
  /* A panel (Feel, Algorithm): a heading with an X at its top right that stays put, and a body
     that scrolls when it is taller than the room it has. */
  .panelhead { display: flex; justify-content: space-between; align-items: center; margin: -4px -6px 6px 0; }
  /* The Include boxes by the Algorithm title (decision 0011, part 1): they wrap under it on a phone. */
  .panelhead .incl { display: flex; flex-wrap: wrap; gap: 4px 14px; flex: 1; margin: 0 8px 0 14px; align-self: center; }
  /* When they wrap to two lines, the title and the × stay at the top (L-12: the × at the top right). */
  #algCard .panelhead { align-items: flex-start; }
  #algCard .panelhead > .label { padding-top: 6px; }
  .panelhead .incl .check { font-size: 13px; }
  /* One look for the panels that stay in place (Settings, Clip, Keys, History; ToDo B360, decision 0043, Joe 2611191204):
     the blue outline of the checkpoint lane (#note) and a heading in its style (white, bold). The panels that move, the
     checkpoint lane and the checkpoint editor, keep their own looks; the active timeline keeps its white edge. */
  .bluepanel { border: 1px solid var(--view); }
  .bluepanel > .panelhead > .label, .bluepanel > .panelhead > .label * { color: var(--text); font-weight: 700; font-size: 12px; }
  /* History's heading: the family it lists, in words and a small picture (B187). */
  .histfam { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 0 12px; font-weight: 700; color: var(--ink, #f2f4f7); }
  .histfam canvas { width: 30px; height: 30px; }
  .x { min-height: 32px; min-width: 32px; padding: 0; font-size: 24px; line-height: 1; font-weight: 500; }
  .scroll { max-height: 45vh; overflow-y: auto; }
  /* The bottom stack never grows past the top of the screen. When a panel and the rows under it are
     taller than the screen (a phone on its side), the panel gives up room: its heading, its X and
     History's tabs stay put, and only its .scroll part gets shorter and scrolls (MF-39 step 5,
     2026-10-13: History's tabs were above the screen and could not be reached). */
  /* The panels and rows never reach the top cards (TwistThis and Move): their height is the screen
     less the top row (Grok, MF-49: History covered them on a PC). A short screen hides the top
     cards while a panel is open instead (below), so there the whole height is used. */
  .bottom { box-sizing: border-box; max-height: calc(100vh - var(--top-room)); max-height: calc(100dvh - var(--top-room)); padding-top: 8px; }
  @media (max-height: 500px) { .bottom { max-height: 100vh; max-height: 100dvh; padding-top: calc(env(safe-area-inset-top, 0px) + 8px); } }
  .bottom > * { flex-shrink: 0; }
  .bottom > .panel { flex-shrink: 1; min-height: 0; display: flex; flex-direction: column; }
  .bottom > .panel[hidden] { display: none; }
  .panel > * { flex-shrink: 0; }
  .panel > .scroll { flex-shrink: 1; min-height: 0; }
  /* A short screen (a phone on its side) has no room for the top cards and a panel too: while a
     panel is open, TwistThis and the move count step aside, so the panel is not drawn over them;
     they come back when it closes (MF-42, 2026-10-13, Joe chose this over starting the panel under
     them, which would leave History about one row). */
  @media (max-height: 500px) { body:has(.bottom > .panel:not([hidden])) .top, body:has(.bottom > .panel:not([hidden])) .tlname { visibility: hidden; } }
  /* The Feel sliders shrink with the panel instead of pushing it wider (MF-42: Bounce was cut off
     behind a sideways scrollbar). */
  #feel > * { min-width: 0; }
  .slider input[type=range] { width: 100%; min-width: 0; box-sizing: border-box; margin-inline: 0; }
  .panel > .scroll { overflow-x: hidden; }
  /* History (ToDo B18): white names, a strong line between rows, buttons big enough for a finger. */
  #histSearch { width: 100%; box-sizing: border-box; margin: 10px 0 6px; font-family: var(--ui); font-size: 16px; color: var(--text); background: var(--field); border: 1px solid var(--field-edge); border-radius: 6px; padding: 8px 10px; }
  .hrow { border-top: 1px solid var(--line); padding: 8px 2px; display: grid; gap: 3px; }
  /* The active timeline at the top (B112, Joe 2610221617): the heavy white box, the eye goes here first. */
  .hrow.now { border: 3px solid #fff; border-radius: 8px; padding: 10px 12px; background: #1c2129; }
  .hrow.now .label { color: #fff; font-weight: 700; font-size: 13px; }
  /* The search and the list below it are one box of their own, apart from the active timeline. */
  .htree { border: 1px solid #8a919c; border-radius: 8px; padding: 2px 10px 6px; margin-top: 12px; }
  .hbox { border: 1px solid #5a606b; border-radius: 6px; margin: 8px 0; overflow: hidden; }
  .hbox .hrow { border-top: 0; padding: 8px 10px; }
  .hrow.hmark { background: #0c1a12; border-left: var(--kind-line) solid var(--mark); border-top: 1px solid #3a4048; padding-left: 14px; }
  .hbox > .hrow:first-child { border-left: var(--kind-line) solid var(--kind-timeline); }
  .hbox.alg > .hrow:first-child { border-left-color: var(--kind-algorithm); }
  /* The picture of where a timeline ends, at the left of its row (ToDo B249 b); smaller on a phone. */
  .hbox { --hpic: 56px; }
  @media (max-width: 480px) { .hbox { --hpic: 44px; } }
  .hbox > .hrow.hpicrow { position: relative; padding-left: calc(var(--kind-line) + 10px + var(--hpic)); min-height: calc(var(--hpic) + 16px); }
  .hpic { position: absolute; left: 10px; top: 8px; width: var(--hpic); height: var(--hpic); }
  .htop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .htop .hname { flex: 1 1 12em; }
  .htop .hbtns { margin-top: 0; }
  #histCard .scroll { max-height: 60vh; }
  .hname { font-size: 16px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
  .hname .flag { color: var(--mark); }
  /* A checkpoint's name in History is filled with its own color, as its chip is (MF-60). */
  .hname .hcp { display: inline-block; padding: 1px 8px; border-radius: 6px; }
  .hname .hcp .flag { color: inherit; text-shadow: 0 0 1px #000, 0 0 1px #000, 0 0 2px #000; }
  .hmeta { font-family: var(--mono); font-size: 12.5px; color: #c9ccd2; }
  .habout { font-size: 14px; color: #e8e9ec; overflow-wrap: anywhere; }
  .hbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
  .hstat { font-size: 13px; font-weight: 700; }
  .hstat.saved { color: var(--mark); }
  /* The active timeline's own row in the list (decision 0011): a quieter frame than the box at the top
     (B112), with the words "Active timeline". The text stays white; only the frame is calmer. */
  .hbox.here { border: 2px solid #7f8fa8; background: #161b22; }
  .hhere { color: #fff; font-weight: 700; }
  .hassist { color: #fff; font-weight: 700; } /* tutorial assisted (ToDo C30, decision 0037) */
  .hgroup > summary { cursor: pointer; font-size: 15px; font-weight: 700; color: #fff; padding: 6px 0; }
  .hgroup .hgroup { margin-left: 10px; }
  .hnote { color: #e8e9ec; font-size: 14px; padding: 8px 2px; }
  .hfilter { color: var(--accent); font-weight: 600; }
  .hfound { font-size: 13.5px; color: var(--mark); font-weight: 600; }
  .hcredit { font-size: 13.5px; color: #e8e9ec; font-style: italic; }
  /* History's two tabs (ToDo E8): the one on screen filled in, as a pressed toggle. */
  .htabs { display: flex; gap: 8px; margin-bottom: 6px; }
  #histNow[hidden] { display: none; }
  /* History's Expand button sits beside its X. */
  .headbtns { display: flex; gap: 8px; align-items: center; }
  /* The History manager (ToDo B52): a screen of its own over everything, opaque, same look as History.
     Its list is the only part that scrolls; the bars above and the pager below stay on screen. */
  .mgr { position: fixed; inset: 0; z-index: 20; background: var(--panel); display: flex; flex-direction: column;
         padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); box-sizing: border-box; }
  .mgr[hidden] { display: none; }
  #mgrNamedRow[hidden] { display: none; }
  .mgr > * { flex-shrink: 0; }
  .mgr > .scroll { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overflow-x: hidden; border-top: 1px solid var(--line); }
  .mgrbar, .mgrsel, .mgrpager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
  .mgrbar label, .mgrsel label { display: flex; gap: 6px; align-items: center; font-size: 15px; font-weight: 600; color: #fff; }
  /* A search with words in it hides rows, so its box is edged in red while it has any (Joe, MF-52:
     the yellow line above the list was too easy to miss). The placeholder shows only when empty. */
  #histSearch:not(:placeholder-shown), #mgrSearch:not(:placeholder-shown) { border-color: var(--searching); box-shadow: 0 0 0 1px var(--searching); }
  #mgrSearch { flex: 1 1 14em; min-width: 10em; font-family: var(--ui); font-size: 16px; color: var(--text); background: var(--field); border: 1px solid var(--field-edge); border-radius: 6px; padding: 8px 10px; }
  .mgrbar input[type=date] { font-family: var(--ui); font-size: 15px; color: var(--text); background: var(--field); border: 1px solid var(--field-edge); border-radius: 6px; padding: 6px 8px; color-scheme: dark; }
  .mgrpager { justify-content: center; margin: 8px 0 0; }
  .mgr .panelhead { gap: 10px; flex-wrap: wrap; margin-right: 0; }
  .mgr .panelhead .htabs { margin: 0; flex: 1; }
  /* A phone on its side: the words before the lists and date boxes go (each still has its spoken
     name), so the bars take one line each and the list keeps some room. */
  @media (max-height: 500px) {
    .mgrbar label > span, .mgrsel label > span { display: none; }
    .mgrbar, .mgrsel { margin: 2px 0 4px; flex-wrap: nowrap; overflow-x: auto; }
    .mgrbar label.mgrinc > span { display: inline; } /* the Include boxes keep their words: a bare box says nothing (B160) */
    #mgrSearch { min-width: 8em; }
    .mgr .mrow { padding: 4px; }
  }
  .mpick input { width: 22px; height: 22px; accent-color: var(--accent); }
  .mrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid #3a4048; padding: 8px 4px; }
  .mrow { border-left: var(--kind-line) solid var(--kind-timeline); }
  .mrow.alg { border-left-color: var(--kind-algorithm); }
  .mrow.on { background: #2a2610; }
  /* The search boxes' two check boxes: what the search looks at. */
  .searchin { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; margin: -2px 0 6px; }
  #histTree .searchin .hfoldall { margin-left: auto; }
  .searchin label, .searchopt { display: flex; gap: 6px; align-items: center; font-size: 15px; font-weight: 600; color: #fff; }
  .searchin input, .searchopt input { width: 20px; height: 20px; accent-color: var(--accent); }
  /* Expand all and Collapse all (B148) at the end of the row of search boxes; ▾ / ▸ on each timeline. */
  #histSortRow[hidden] { display: none; }  /* the sort list is for the Timelines tab only */
  .hfoldall { display: flex; gap: 6px; margin-left: auto; }
  .hmeta .hfold { font-family: var(--mono); font-size: 12.5px; padding: 1px 8px; margin-right: 4px; }
  .mrow .mtext { flex: 1 1 14em; display: grid; gap: 3px; min-width: 0; }
  button.danger { border-color: var(--warn); color: #fff; }
  button.danger:not(:disabled) { background: #5a1d0e; }
  /* A question the app asks (New, Checkpoint, Rename, Delete): black, with a yellow edge. */
  #ask { max-width: min(440px, calc(100vw - 32px)); box-sizing: border-box; background: #000; color: #fff; border: 2px solid var(--accent); border-radius: 8px; padding: 16px; font-family: var(--ui); }
  #ask::backdrop { background: rgba(0, 0, 0, 0.75); }
  #ask p { margin: 0 0 12px; font-size: 17px; line-height: 1.4; }
  #ask .field { display: grid; gap: 4px; margin-bottom: 10px; }
  #ask .field[hidden] { display: none; }
  /* The checkpoint editor (B157): colors, Clear, ◀ ▶ beside Save and Cancel, and the × top right. */
  #ask { position: fixed; }
  #ask .swatches { display: flex; gap: 6px; flex-wrap: wrap; }
  #ask .algrow { align-items: center; flex-wrap: wrap; }
  #ask .askstep { margin-left: auto; display: inline-flex; gap: 6px; }
  #ask button[hidden] { display: none; }
  /* The Graphics checker and Preview (decision 0031): the lines that cannot be read, in the warning color; the pressed Preview is lit. */
  #ask #askGraphicsCheck { color: var(--warn); font-weight: 700; white-space: pre-wrap; }
  #ask #askGraphicsCheck:empty { display: none; }
  #ask #askPreview { justify-self: start; }
  #ask #askPreview[aria-pressed="true"] { background: var(--accent); color: #000; }
  #ask:focus { outline: none; }
  /* With focus on nothing in the checkpoint editor, ← → step the checkpoints: ◀ ▶ are lit to say so
     (B157, Joe 2610271720). A greyed one is not lit. */
  #ask:focus .askstep button:not(:disabled) { outline: 3px solid var(--accent); outline-offset: 2px; }
  #ask .swatch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  #ask #askX { position: absolute; top: 6px; right: 6px; }
  /* Dock (ToDo B286, Joe 2611101300): the checkpoint editor against the right edge of the screen, the page behind it not dimmed,
     so the puzzle and the timeline can be seen while it is open. The box is still a modal one (Escape, focus and the keys as before).
     A modal dialog centers itself with margin: auto; only the left margin stays auto. On a narrow screen the box fills the width
     anyway, so there is nothing to dock and the tick box is not shown. */
  #ask .check { margin-bottom: 10px; }
  #ask .check[hidden] { display: none; }
  #ask.dock { margin: auto 0 auto auto; }
  /* ToDo B297: docked, the box is not modal (ui/shelf.js) and stands beside the puzzle, so a non-modal dialog needs its own place:
     fixed, against the right edge, centered up and down (a modal one is centered by the browser). The Checkpoint button blinks
     Save checkpoint when pressed with a change not yet saved; the blink stops for people who ask for less motion. */
  #ask.dock:not(:modal) { position: fixed; top: 0; bottom: 0; right: 0; left: auto; height: fit-content; max-height: calc(100vh - 16px); overflow-y: auto; }
  #ask #askOk.blink { animation: askblink 0.9s ease-in-out 2; }
  @keyframes askblink { 50% { background: #fff; color: #000; box-shadow: 0 0 0 4px var(--accent); } }
  @media (prefers-reduced-motion: reduce) { #ask #askOk.blink { animation: none; box-shadow: 0 0 0 4px var(--accent); } }
  #ask.dock::backdrop { background: transparent; }
  /* ?dev, beside the puzzle (ToDo B335): a head that drags the box, with ⚌ that folds it to that line (the × stays at the corner). */
  #ask .askhead { margin: -6px 30px 10px 0; cursor: move; touch-action: none; background: #23304a; border-radius: 6px; padding: 2px 6px; }
  #ask .askhead[hidden] { display: none; }
  #ask .askhead::before { content: "⠿"; color: #fff; font-size: 20px; line-height: 1; margin-right: 8px; }
  #ask .askhead .label { flex: 1; }
  #ask.min form > :not(.askhead):not(#askX) { display: none; }
  #ask.min { padding-top: 12px; padding-bottom: 6px; }
  #ask.min .askhead { margin-bottom: 0; }
  @media (max-width: 640px) { #ask.dock { margin: auto; } #ask.dock::backdrop { background: rgba(0, 0, 0, 0.75); } #askDockRow { display: none; } }
  /* The × is 32 px wide and 6 px in from the edge, so it reaches 22 px into the title's line (the box has 16 px of padding);
     the title keeps clear of it, with a gap of 8 px, whenever the × shows (Joe and Grok 2611101034: it covered "empty."). */
  #ask:has(#askX:not([hidden])) #askText { padding-right: 30px; }
  /* The four text boxes can be dragged taller by their corner (ToDo B367); ui/shelf.js keeps the height. */
  #ask input, #ask textarea { resize: vertical; font-family: var(--ui); font-size: 16px; color: #fff; background: var(--field); border: 1px solid var(--field-edge); border-radius: 6px; padding: 8px 10px; }
  @media (max-width: 520px) { button, select { padding: 8px 10px; font-size: 14px; } }
  /* Phones: the layer picker, Algorithm, Feel and Full screen are tucked behind the Menu button, so
     the bottom row is always one line. Pressing Menu shows them as a small panel just above it.
     A phone on its side is wide but short, so a short screen gets the Menu too (MF-35, 2026-10-12:
     without it, New, Checkpoint and History wrapped over the puzzle on both phones). The rest of
     the landscape layout is ToDo B46. */
  @media (max-width: 640px), (max-height: 500px) {
    #menuBtn { display: inline-block; }
    .menu { display: none; }
    .menu.open { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
                 background: #14161a; border: 1px solid var(--line); border-radius: 8px; padding: 10px; z-index: 2; }
    .menu #family, .menu #category, .menu #order { order: 0; }
  }

/* A message in the History manager, which covers the screen and so would hide the note above the controls. */
#mgrMsg { color: var(--text); font-weight: 600; }

/* Backups (ToDo B17): the line in History with Export everything and Import. On iPhone and iPad it is
   stronger, with the 7-day warning under it (decision 0010). */
.hbackup { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 0 0 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
/* History's top row (ToDo B365, Joe 2611191204): Timelines, Algorithms, the backup time, Back up, Import, Recycle Bin on one line (they wrap on a phone). */
.hrow1 { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 6px; }
.hrow1 .htabs { margin: 0; }
.hrow1 .hbackup:not(.apple) { flex: 1 1 22em; margin: 0; padding: 0; border: 0; justify-content: space-between; }
.hrow1 .hbackup.apple { flex: 1 1 100%; }
.hbackup .hbtns { margin-top: 0; }
.hlast { font-size: 15px; font-weight: 700; color: #fff; flex: 1 1 auto; }
.hbackup.apple { border: 2px solid var(--warn); background: #2a160f; }
.happle { flex: 1 1 100%; font-size: 14.5px; font-weight: 600; color: #fff; }
.happle[hidden] { display: none; }
/* The import report: the same black box as the questions; the × in its top right corner (L-31). */
#imp { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); box-sizing: border-box; background: #000; color: #fff; border: 2px solid var(--accent); border-radius: 8px; padding: 10px 10px 16px 16px; font-family: var(--ui); }
#imp[open] { display: flex; flex-direction: column; }
#imp::backdrop { background: rgba(0, 0, 0, 0.75); }
#imp .panelhead { margin: 0 0 6px; }
#imp .scroll { overflow-y: auto; min-height: 0; flex: 1 1 auto; padding-right: 6px; }
#imp p { margin: 0 0 10px; font-size: 16.5px; line-height: 1.4; }
#imp ul { margin: 0 0 10px; padding-left: 22px; font-size: 15.5px; overflow-wrap: anywhere; }
#imp .impbad { color: var(--warn); font-weight: 700; }
#impFeel[hidden] { display: none; }
#impFeelTable { border-collapse: collapse; margin: 0 0 10px; font-size: 15px; width: 100%; }
#impFeelTable th, #impFeelTable td { text-align: left; padding: 3px 8px 3px 0; border-bottom: 1px solid #3a4048; color: #fff; }
#impFeelTable thead th { font-weight: 700; }
#impFeelTable tbody th { font-weight: 600; }
/* A setting the file has otherwise: yellow, as the step you are on is. */
#impFeelTable tr.diff td { color: var(--accent); font-weight: 700; }
#impUseFeel { margin: 0 0 10px; }
#impUseFeel[hidden] { display: none; }
/* Import, step 1 (B136): what the file holds, a tick box beside each new item. The rows are the
   History manager's (.mrow); one here already or bad has no box and says why. */
#impChoose[hidden], #impReport[hidden], #imp .algrow button[hidden] { display: none; }
#imp .impbar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 8px; }
#imp .imphead { font-weight: 700; font-size: 15px; color: #fff; margin: 10px 0 2px; text-transform: uppercase; letter-spacing: 0.04em; }
#imp .mrow { cursor: pointer; }
#imp .mrow.off { cursor: default; }
#imp .mpick { width: 22px; flex: 0 0 22px; }
#imp .impwhy { font-size: 14.5px; font-weight: 600; color: #fff; }
#imp .impwhy.impbad { color: var(--warn); }
/* The Recycle Bin (ToDo B53): the same black box as Import, the × in its top right corner (L-31).
   Each item is a row of the History manager's kind (.mrow, its colored edge says timeline or
   algorithm); items deleted together sit under one heading with "Restore these N". */
#bin { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); box-sizing: border-box; background: #000; color: #fff; border: 2px solid var(--accent); border-radius: 8px; padding: 10px 10px 16px 16px; font-family: var(--ui); }
#bin[open] { display: flex; flex-direction: column; }
#bin::backdrop { background: rgba(0, 0, 0, 0.75); }
#bin .panelhead { margin: 0 0 6px; }
#bin > p { margin: 0 0 8px; font-size: 16px; line-height: 1.4; }
#binMsg { font-weight: 700; color: var(--accent); }
#binMsg:empty { display: none; }
#bin .scroll { overflow-y: auto; min-height: 0; flex: 1 1 auto; padding-right: 6px; }
#bin .binhead { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px; color: #fff; margin: 10px 0 2px; }
#bin .binbatch { border: 1px solid var(--line); border-radius: 6px; padding: 0 6px 4px; margin: 0 0 8px; }
#bin .hbtns { margin-top: 0; }
#bin .algrow { justify-content: space-between; }
#binEmpty[hidden], #binBar[hidden] { display: none; }
#bin .impbar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 8px; }
#bin .mpick { width: 22px; flex: 0 0 22px; }
/* Puzzle Picker (ToDo B228, decision 0018): the same black box as the Recycle Bin and Import, the × in its top right corner (L-31).
   The grid is the Family sheet's for users: a Category heading, a column for each type, a row for each number of layers; each cell is a button with the puzzle's picture. */
#choose { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); box-sizing: border-box; background: #000; color: #fff; border: 2px solid var(--accent); border-radius: 8px; padding: 10px 10px 16px 16px; font-family: var(--ui); }
#choose[open] { display: flex; flex-direction: column; }
#choose::backdrop { background: rgba(0, 0, 0, 0.75); }
#choose .panelhead { margin: 0 0 6px; }
#chooseMsg { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--accent); }
#chooseMsg:empty { display: none; }
#choose .scroll { overflow: auto; min-height: 0; flex: 1 1 auto; max-height: none; padding-right: 6px; }
.pickgrid { border-collapse: collapse; }
.pickgrid thead tr:first-child > * { position: sticky; top: 0; z-index: 2; background: #14181d; height: 30px; box-sizing: border-box; }
.pickgrid thead tr:nth-child(2) > * { position: sticky; top: 30px; z-index: 2; background: #000; height: 30px; box-sizing: border-box; }
.pickgrid th { color: #fff; font-weight: 700; font-size: 15px; padding: 4px 6px; text-align: center; border: 1px solid var(--line); white-space: nowrap; }
.pickgrid thead th.cat { background: #14181d; font-size: 16px; }
.pickgrid tbody th { text-align: right; width: 1%; position: sticky; left: 0; z-index: 1; background: #000; }
.pickgrid thead td { position: sticky; left: 0; z-index: 3; }
@media (max-width: 600px) { .pickcell { width: 104px; font-size: 14px; } .pickcell img { width: 92px; height: 92px; } .pickgrid th { padding: 4px 3px; font-size: 14px; } }
.pickgrid td { padding: 4px; border: 1px solid var(--line); vertical-align: top; text-align: center; }
.pickcell { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 132px; padding: 4px; background: #000; color: #fff; border: 2px solid var(--line); border-radius: 6px; font: inherit; font-size: 15px; cursor: pointer; }
.pickcell:hover, .pickcell:focus-visible { border-color: #fff; }
/* The box round the free puzzles is blue, the one round the locked puzzles reddish (ToDo B366, Joe 2611191204); unlocked, they all join the blue one.
   Drawn on the cells of the rows, as the table's cells collapse their borders and the heading column sticks as it scrolls. */
.pickgrid { --pfree: #7fb4ff; --plock: #ff7a6b; }
.pickgrid tr.pfree > :first-child { border-left: 3px solid var(--pfree); }
.pickgrid tr.pfree > :last-child { border-right: 3px solid var(--pfree); }
.pickgrid tr.pfree.pfirst > * { border-top: 3px solid var(--pfree); }
.pickgrid tr.pfree.plast > * { border-bottom: 3px solid var(--pfree); }
.pickgrid tr.plock > :first-child { border-left: 3px solid var(--plock); }
.pickgrid tr.plock > :last-child { border-right: 3px solid var(--plock); }
.pickgrid tr.plock.pfirst > * { border-top: 3px solid var(--plock); box-shadow: inset 0 3px 0 var(--plock); } /* (the inset line: a collapsed edge shared with the blue box shows only one of the two) */
.pickgrid tr.plock.plast > * { border-bottom: 3px solid var(--plock); }
.pickcell img { width: 120px; height: 120px; display: block; background: #000; }
.pickcell.here { border-color: var(--accent); }
.pickcell .here { color: var(--accent); font-weight: 700; }
.pickcellrow { display: flex; gap: 4px; justify-content: center; }
.plink { color: #8fd0ff; text-decoration: underline; }
.plink:hover, .plink:focus-visible { color: #fff; }
.pickgrid th.cat .plink { font-size: 16px; }
/* The Tutorial Picker (decision 0038): a small list over the Puzzle Picker. */
#lessonAsk { width: min(440px, calc(100vw - 32px)); box-sizing: border-box; background: #000; color: #fff; border: 2px solid var(--accent); border-radius: 8px; padding: 10px 10px 16px 16px; font-family: var(--ui); }
#lessonAsk::backdrop { background: rgba(0, 0, 0, 0.75); }
#lessonAsk .panelhead { margin: 0 0 6px; }
#lessonAsk p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.4; }
#tutPick { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); box-sizing: border-box; background: #000; color: #fff; border: 2px solid var(--accent); border-radius: 8px; padding: 10px 10px 16px 16px; font-family: var(--ui); }
#tutPick[open] { display: flex; flex-direction: column; }
#tutPick::backdrop { background: rgba(0, 0, 0, 0.75); }
#tutPick .panelhead { margin: 0 0 8px; }
#tutPick .scroll { overflow: auto; min-height: 0; flex: 1 1 auto; max-height: none; padding-right: 6px; }
.tutgrid { border-collapse: collapse; width: 100%; font-size: 15px; }
.tutgrid th, .tutgrid td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid #5b6672; vertical-align: middle; }
.tutgrid thead th { color: #fff; font-weight: 700; }
.tutgrid tbody th { font-weight: 400; }
#chooseNote { margin: 8px 0 0; font-size: 13px; color: #d8dde3; }
#chooseInfo { position: fixed; z-index: 5; width: 250px; box-sizing: border-box; padding: 12px 36px 12px 12px; background: #0b0f14; color: #fff; border: 2px solid #fff; border-radius: 8px; font-size: 15px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8); }
#chooseInfo[hidden] { display: none; }
#chooseInfo .x { position: absolute; top: 4px; right: 4px; }
#chooseInfo dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 10px 0; }
#chooseInfo dt { color: #d8dde3; }
#chooseInfo dd { margin: 0; font-weight: 700; }
#chooseInfo button[aria-disabled="true"] { opacity: 0.85; cursor: not-allowed; }
#chooseInfo p { margin: 0; word-break: break-word; }
/* What a backup or an export saved (bug B-62): stays until closed. */
#exp { width: min(480px, calc(100vw - 32px)); box-sizing: border-box; background: #000; color: #fff; border: 2px solid var(--accent); border-radius: 8px; padding: 10px 10px 16px 16px; font-family: var(--ui); }
#exp::backdrop { background: rgba(0, 0, 0, 0.75); }
#exp .panelhead { margin: 0 0 6px; }
#exp p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.4; overflow-wrap: anywhere; }

/* DOWNSIZING (Build 73g, kept by Joe 2611091845): heights only, one block, easy to delete.
   Buttons, the timeline, cards and panel rows lose height; nothing changes in what is shown or saved. */
button, select { min-height: 30px; padding: 4px 12px; font-size: 14px; }
@media (max-width: 520px) { button, select { padding: 4px 9px; font-size: 14px; } }
.bar > button { min-height: 22px; padding-block: 2px; line-height: 1.2; }
.timeline { padding: 4px; gap: 4px; }
.timeline > button { min-width: 36px; min-height: 28px; padding-block: 2px; font-size: 16px; }
@media (max-width: 420px) { .timeline > button { min-width: 32px; } }
.chip { padding: 3px 5px; }
.card { padding: 6px 10px; }
.top .card { padding: 4px 10px; }
.bottom { gap: 6px; }
button.small { min-height: 26px; padding: 3px 9px; }
.hrow { padding: 5px 2px; }
.check { gap: 6px; }
.timeline.withLane > button { margin-bottom: -2px; }
@media (max-width: 520px) { .timeline.withLane > button { margin-bottom: -2px; } }
/* The touch strip along the bottom edge (EDGE_STRIP, 32 px) ignores touches, so a short bottom row must sit above it: 22 px of padding puts the middle of a 22 px button at 33 px. */
.bottom { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); }

/* The tutorial outline (decision 0034, ui/lesson.js): the left half of the screen while a tutorial plays, the puzzle on the right half
   (S.lessonShare makes the camera fit what is left). Above the top cards and the timeline, which stay at the right. */
#lesson { position: fixed; left: 0; top: 0; bottom: 0; width: 50%; box-sizing: border-box; z-index: 30; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--bg); border-right: 2px solid var(--line); }
#lesson[hidden] { display: none; }
/* Tutorial mode is the phone's layout in the right half (ToDo B320, Joe 2611140851): the cards and the bottom row stand in the right half, and the
   bottom row is Scramble, Tutorial, Menu, Hold View, Checkpoint, with everything else behind Menu (as on a phone, where Menu opens a panel above it). */
body.lesson .hud { left: 50%; }
body.lesson .tlname { left: calc(50% + 16px); }
body.lesson #reset, body.lesson #lockBtn, body.lesson #markBtn { display: none; }   /* the menu's Checkpoint: the row has its own (Joe 2611140954) */
body.lesson #scramble { order: 1; } body.lesson #tutorialBtn { order: 2; } body.lesson #menuBtn { order: 3; } body.lesson #holdView { order: 4; } body.lesson #markQuick { order: 5; }
body.lesson #menuBtn { display: inline-block; }
body.lesson .menu { display: none; }
body.lesson .menu.open { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
                         background: #14161a; border: 1px solid var(--line); border-radius: 8px; padding: 10px; z-index: 2; }
body.lesson #menuBtn[aria-expanded="true"] { border-color: var(--accent); }
/* Out of the puzzle's way (ToDo B320, Joe 2611141036): the Log and the other panels, and the checkpoint editor, stand in the outline's half
   (the left), low down above its ◀ Play ▶ row, capped in height so the outline's first lines stay in view; the puzzle's half keeps only
   the puzzle, the cards, the timeline and the bottom row. Both are fixed, so they leave the bottom stack and the right half alone. */
body.lesson .bottom > .panel, body.lesson #ask.dock:not(:modal) { position: fixed; left: 8px; right: auto; top: auto; bottom: 56px; width: calc(50% - 16px); max-width: none;
                         max-height: 55vh; box-sizing: border-box; z-index: 40; margin: 0; overflow-y: auto; }
/* A fixed .hud is a stacking layer of its own, so its panels' z-index counts only inside it: the layer itself must stand above the outline (z-index 30),
   or the Log opens underneath it (Joe's hand test of 2026-11-14e: "no log screen"). */
body.lesson .hud.bottom { z-index: 35; }   /* under the checkpoint editor (40) ... */
body.lesson[data-top="panel"] .hud.bottom { z-index: 45; }   /* ... unless the panel was opened after it (Joe 2611141114: the one chosen last comes to the top) */
#lesson .panelhead { margin: 0; }
/* The small box of Try-it-myself (decision 0037, ui/lesson.js): at the left under the timeline's name, opposite the Puzzle Rose; the tutorial's current line
   (three lines at most), Back to the tutorial and the × that ends the tutorial. The puzzle has the full width. */
#lessonMini { position: fixed; left: 16px; top: calc(env(safe-area-inset-top, 0px) + 82px); width: 16em; max-width: calc(100vw - 32px); box-sizing: border-box; z-index: 30; display: flex; flex-direction: column; gap: 8px;
  padding: 8px 10px 10px; background: var(--panel); border: 2px solid var(--mark); border-radius: 8px; }
#lessonMini[hidden] { display: none; }
#lessonMini .panelhead { margin: 0; }
#lessonMiniText { margin: 0; font-size: 16px; line-height: 1.35; color: #fff; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
#lessonText { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; }
#lessonText p { margin: 0 0 10px; font-size: 20px; line-height: 1.35; color: var(--text); cursor: pointer; }
#lessonText p.h1 { font-size: 30px; font-weight: 700; color: var(--accent); }
#lessonText p.h2 { font-size: 24px; font-weight: 700; color: #fff; }
#lessonText p.h3 { font-size: 21px; font-weight: 600; color: #fff; padding-left: 14px; }
#lessonText p.old { color: var(--muted); }
#lessonText p.cur { color: #fff; border-left: 4px solid var(--mark); padding-left: 10px; margin-left: -14px; }
/* The outline document drawn in play (decision 0036, ToDo B325 and the container rules of B335, ui/lesson.js, OutlineContainerExample.png): each level is a box with
   a 1 px white border, as wide as the panel, inside the box of the level above. The outer boxes keep their height (one h1 line; three h2 lines; three h3 lines,
   blank rows making up the missing ones) and the deepest box takes all the height left over (.fill) and scrolls so its active line is in the middle.
   The active line has the arrow and the yellow of the example picture; past lines dim. */
#lessonText.doc { display: flex; flex-direction: column; overflow: hidden; }
#lessonText .olLevel { display: flex; flex-direction: column; min-height: 0; position: relative; box-sizing: border-box; overflow: hidden; }
#lessonText.doc > .olLevel { flex: none; border: 1px solid #fff; }
#lessonText .olLevel > .olLevel { flex: none; border-top: 1px solid #fff; }   /* the outer box's own border is the frame; a box inside it shows as a band */
/* A box keeps the height of its own lines; only the deepest one (.fill) and the boxes round it take the height that is left, so a tutorial's outline fills its half. */
#lessonText .olLevel:has(.fill), #lessonText .olLevel.fill { flex: 1 1 0; }
#lessonText .olSpacer { flex: none; }
#lessonText .olRow { margin: 0; flex: none; }
#lessonText .olPad { flex: none; visibility: hidden; }
#lessonText .olText { margin: 0; padding: 3px 10px 3px 56px; font-size: 20px; line-height: 1.3; color: var(--text); cursor: pointer; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lessonText .h1 > .olText { font-size: 30px; font-weight: 700; padding-top: 8px; padding-bottom: 8px; }
#lessonText .h2 > .olText { font-size: 24px; font-weight: 700; }
#lessonText .h3 > .olText { font-size: 21px; font-weight: 600; }
#lessonText .h4 > .olText { font-size: 18px; font-weight: 600; }
#lessonText .olPad.h1 > .olText { font-size: 30px; padding-top: 8px; padding-bottom: 8px; } #lessonText .olPad.h2 > .olText { font-size: 24px; } #lessonText .olPad.h3 > .olText { font-size: 21px; } #lessonText .olPad.h4 > .olText { font-size: 18px; }
#lessonText .olRow.past > .olText { color: var(--muted); }
#lessonText .olRow.future > .olText { color: var(--text); }
#lessonText .olRow.active > .olText { color: var(--accent); }
#lessonText .olRow.active > .olText::before { content: "⇨"; position: absolute; left: 12px; color: var(--accent); }   /* the arrow of the example picture */
#lessonText .olStart { color: var(--muted); font-size: 16px; margin: 0 0 8px; }
/* The whole-outline panel: over the tutorial outline, for reading and printing. */
#outlineAll { position: fixed; left: 0; top: 0; bottom: 0; width: 50%; box-sizing: border-box; z-index: 31; display: flex; flex-direction: column; gap: 8px; padding: 12px 10px 12px 14px; background: var(--bg); border-right: 2px solid var(--line); color: var(--text); }
#outlineAll[hidden] { display: none; }
#outlineAll .panelhead { margin: 0; }
.outallbar { display: flex; gap: 12px; align-items: center; }
#outallList { flex: 1; min-height: 0; overflow-y: auto; font-size: 18px; line-height: 1.4; }
#outallList .oaRow { display: flex; gap: 8px; margin: 0 0 6px; }
#outallList .oaMark { color: var(--muted); min-width: 2.2em; text-align: right; flex: none; }
#outallList .d1 { font-size: 24px; font-weight: 700; margin-top: 10px; }
#outallList .d2 { font-size: 20px; font-weight: 700; padding-left: 16px; }
#outallList .d3 { padding-left: 32px; }
#outallList .d4 { padding-left: 48px; }
@media print {
  body.printOutline > *:not(#outlineAll) { display: none !important; }
  body.printOutline #outlineAll { position: static; width: auto; background: #fff; color: #000; border: 0; padding: 0; }
  body.printOutline #outlineAll .panelhead, body.printOutline .outallbar { display: none; }
  body.printOutline #outallList { overflow: visible; color: #000; }
  body.printOutline #outallList .oaMark { color: #000; }
}
/* The outline editor (ToDo B326): a floating panel over the left half, dragged by its head. Above the tutorial outline and the other panels. */
#outlineEd { position: fixed; left: 8px; bottom: 56px; width: calc(50% - 16px); max-height: 60vh; box-sizing: border-box; z-index: 50; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 10px 14px; background: #14161a; border: 2px solid var(--accent); border-radius: 8px; color: var(--text); }
#outlineEd[hidden] { display: none; }
/* A head that drags looks unlike the heads that do not (ToDo B332, Joe 2611151345): a tint and a grip of dots at its left. */
#outlineEd .panelhead { margin: 0; cursor: move; touch-action: none; background: #23304a; border-radius: 6px; padding: 2px 6px; }
#outlineEd .headbtns { display: inline-flex; gap: 4px; }
/* ⚌ (ToDo B335): folds the editor to its head line; the same for the ?dev checkpoint editor (#ask.min). */
#outlineEd.min { max-height: none; padding-bottom: 10px; }
#outlineEd.min > :not(.panelhead) { display: none; }
#outlineEd .panelhead::before { content: "⠿"; color: var(--text); font-size: 20px; line-height: 1; margin-right: 8px; }
.outedbar { display: flex; flex-wrap: wrap; gap: 6px; }
#outedText { font: inherit; font-size: 16px; padding: 6px 8px; background: #000; color: #fff; border: 1px solid var(--line); border-radius: 6px; }
#outedList { flex: 1; min-height: 80px; overflow-y: auto; font-size: 17px; line-height: 1.35; }
/* A row is a gutter, then the line (ToDo B342). The gutter is the only place a click points the checkpoint; the green bar in it marks the line the checkpoint
   stands on, and a hollow bar shows under the mouse. A click on the line itself only selects it, and a selected line is bright blue with a white edge. */
.oeRow { user-select: none; display: flex; gap: 8px; padding: 0 6px 0 0; cursor: pointer; }
.oeGut { flex: none; width: 22px; align-self: stretch; box-sizing: border-box; border-left: 6px solid transparent; cursor: crosshair; }
.oeGut:hover { border-left-color: #fff; background: #1c2a1f; }
.oeRow.at .oeGut { border-left-color: var(--mark); }
.oeMark, .oeText { padding: 3px 0; }
.oeRow.d2 .oeMark { margin-left: 16px; } .oeRow.d3 .oeMark { margin-left: 32px; } .oeRow.d4 .oeMark { margin-left: 48px; }
.oeRow.sel { background: #1d4f9c; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.oeRow.sel .oeMark { color: #fff; }
.oeRow.at { color: #fff; font-weight: 600; }
.oeMark { color: var(--muted); width: 1.2em; flex: none; text-align: center; }
#outedStands { color: #fff; font-size: 16px; border-top: 1px solid var(--line); padding-top: 6px; }
#outedWarn { max-height: 20vh; overflow-y: auto; font-size: 15px; border-top: 1px solid var(--line); padding-top: 6px; color: #fff; }
.oeWarnHead { font-weight: 600; }
.oeWarn { cursor: pointer; padding: 3px 6px; border-left: 4px solid #ffb020; margin-top: 3px; }
.oeWarn:hover { background: #23304a; }
#outedMsg { color: var(--accent); font-size: 15px; min-height: 1.2em; flex: none; max-height: 18vh; overflow-y: auto; }   /* a long message (the Delete ask names every checkpoint) scrolls here instead of running off the panel (Joe 2611160359) */
.lessonbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#lessonStatus { color: var(--muted); font-size: 16px; margin-left: 6px; }

/* The locked note (decision 0039 section 5, ToDo B355): the same box as the export note. */
#lockNote { width: min(480px, calc(100vw - 32px)); box-sizing: border-box; background: #000; color: #fff; border: 2px solid var(--accent); border-radius: 8px; padding: 10px 10px 16px 16px; font-family: var(--ui); }
#lockNote::backdrop { background: rgba(0, 0, 0, 0.75); }
#lockNote .panelhead { margin: 0 0 6px; }
#lockNote p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.4; overflow-wrap: anywhere; }

/* Beta (Joe 2611200006): a white label in the top card beside the version, always shown. */
.top .brand .beta { color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; border: 1px solid #fff; border-radius: 4px; padding: 0 6px; line-height: 1.3; align-self: center; }
@media (max-width: 420px) { .top .brand .beta { font-size: 12px; padding: 0 4px; } }

/* Simple view (Joe 2611200006): body.simpleOn is "Simple view ticked and no tutorial outline open" (ui/barlayout.js, which also moves the
   timeline card under Move and Scramble, Reset, Hold View and Tutorial behind Menu). Only hiding and placing is done here, so unticking puts the screen back. */
body.simpleOn #tl, body.simpleOn #note.withlane:not(.looks), body.simpleOn .bgroup, body.simpleOn #minBtn { display: none; }
body.simpleOn:not(.roseUp) .rose { display: none; }
body.simpleOn .rightstack .card.timeline { width: auto; max-width: none; margin: 0; justify-content: space-between; }
body.simpleOn #bar { justify-content: space-between; }
body.simpleOn #menuBtn { display: inline-block; order: -1; } /* Menu lower left, Lock lower right (Joe 2611221600) */
body.simpleOn #lockBtn { order: 1; }
/* Gone from the screen, the Menu and Settings while Simple simulator view is on (Joe 2611221600). */
body.simpleOn #timelineNameLine, body.simpleOn #feel .noSimple, body.simpleOn #feel .ticks > .noSimple, body.simpleOn #feelCard .noSimple { display: none; }
body.simpleOn .menu #markBtn, body.simpleOn .menu #histBtn, body.simpleOn .menu #algBtn, body.simpleOn .menu #tutorialBtn, body.simpleOn .menu #logBtn,
body.simpleOn .menu #uprightBtn, body.simpleOn .menu #holdView, body.simpleOn .menu #keysBtn, body.simpleOn .menu #newBtn { display: none; }
body.simpleOn .menu { display: none; }
body.simpleOn .menu.open { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
                           background: #14161a; border: 1px solid var(--line); border-radius: 8px; padding: 10px; z-index: 2; }
body.simpleOn .menu #family, body.simpleOn .menu #category, body.simpleOn .menu #order { order: 0; }
