/* Camera Simulator: layout and components. Every color, font family, font size, radius, duration and layout size
   comes from tokens.css; the only literals here are small fixed geometry (tick lengths, hairline offsets) and 0, 1, %. Sections in BLUEPRINT 10.1 order; a builder edits only its own sections.
   Desktop (min-width 1024 and min-height 600): one fixed screen, picture left, rail right. Phone: picture pinned on
   top, the deck scrolls inside itself, the shutter row pinned at the bottom (BLUEPRINT 1.5). */

/* ================================================================ base (builder 1) */
*, *::before, *::after { box-sizing: border-box; }
/* Dec 1, 2026 (SEO): the simulator fills the first screen (100svh) and never scrolls inside itself while you shoot;
   the guide (#guide: the three dials, the FAQ, the sign-up) sits below it, so the page scrolls to it. */
html, body.sim-app { margin: 0; }
body.sim-app { overflow-x: hidden; }
body.sim-app {
  background: var(--ground); color: var(--text);
  font-family: var(--font-sans); font-size: var(--t-body); line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
/* Audit 2 (Nov 19, 2026): :where() keeps this reset at (0,0,1), so a single class such as .pk-chip or .bar-btn sets the
   size it asks for. At (0,1,1) it reset every classed button to the 16 px body size (ui-audit P2-1). */
:where(.sim-app) button, :where(.sim-app) input, :where(.sim-app) select { font: inherit; color: inherit; }
:where(.sim-app) button { cursor: pointer; }
.sim-app :focus-visible { outline: var(--focus-w) solid var(--focus-c); outline-offset: var(--focus-off); }
.sim-app [hidden] { display: none !important; }
.label {
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--text-3); font-weight: 450; margin: 0;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.skip { position: absolute; left: var(--s2); top: -100px; z-index: 100; padding: var(--s2) var(--s3); background: var(--silver); color: var(--ink); border-radius: var(--r); text-decoration: none; font-size: var(--t-sm); }
.skip:focus { top: var(--s2); }

.app {
  position: relative; height: 100vh; height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--dock-w, var(--rail-w));
  grid-template-rows: var(--bar-h) minmax(0, 1fr);
  grid-template-areas: "bar bar" "stage rail";
}

/* ================================================================ .bar- top bar (builder 1) */
.bar { grid-area: bar; display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s2) 0 var(--s4); border-bottom: var(--hair) solid var(--line); background: var(--ground); min-width: 0; position: relative; z-index: 30; }
.bar-mark { display: inline-grid; place-items: center; width: var(--tap-min); height: var(--tap-min); margin-left: calc(-1 * var(--s2)); color: var(--text); border-radius: var(--r); }
.bar-mark svg { width: 28px; height: 28px; transition: transform var(--d-ui) var(--ease); }
.bar-mark:hover svg { transform: rotate(30deg); }
.bar-dot { fill: var(--signal); }
.bar-title { margin: 0; font-size: var(--t-body); font-weight: 500; letter-spacing: var(--track-tight); white-space: nowrap; padding-right: var(--s4); border-right: var(--hair) solid var(--line); line-height: 28px; }
.seg { display: inline-flex; border: var(--hair) solid var(--line); border-radius: var(--r); padding: 3px; height: 40px; }
.seg button { min-width: 112px; border: 0; background: transparent; padding: 0 var(--s3); font-size: var(--t-sm); color: var(--text-2); border-radius: var(--r-tag); }
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--raised); color: var(--text); box-shadow: inset 0 calc(-1 * var(--index-w)) 0 var(--signal); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: var(--s1); }
.bar-btn { height: 40px; min-width: var(--tap-min); padding: 0 var(--s3); font-size: var(--t-sm); background: transparent; border: var(--hair) solid transparent; border-radius: var(--r); color: var(--text-2); white-space: nowrap; transition: color var(--d-ui) var(--ease), border-color var(--d-ui) var(--ease), background-color var(--d-ui) var(--ease); }
.bar-btn:hover, .bar-btn[aria-expanded="true"] { color: var(--text); border-color: var(--line); background: var(--raised); }
.bar-btn:active { transform: translateY(1px); }
.bar-menu { display: none; padding: 0; width: var(--tap-min); height: var(--tap-min); }
.bar-menu svg { display: block; margin: auto; }

/* ================================================================ .stage- .pic- .hud- (builder 1; builder 2 adds overlays) */
.stage { grid-area: stage; display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 0; background: var(--stage); padding: var(--pic-top) var(--stage-pad) 0; overflow: hidden; }
.frame { flex: none; width: var(--frame-w, 100%); height: var(--frame-h, 60vh); display: grid; place-items: center; }
.pic { position: relative; width: var(--pic-w, 100%); height: var(--pic-h, 100%); overflow: hidden; background: var(--black); user-select: none; -webkit-user-select: none; touch-action: pinch-zoom; cursor: crosshair; }
.pic:focus-visible { outline-offset: calc(-1 * var(--focus-w)); }
.pic-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pic-grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; clip-path: inset(var(--hud-h) 0 var(--hud-bot-h) 0); }   /* the grid stays off the camera text (review fix) */
.pic-grid .g-under { stroke: var(--grid-shadow); stroke-width: 2px; fill: none; vector-effect: non-scaling-stroke; }
.pic-grid .g-over { stroke: var(--grid-line); stroke-width: 1px; fill: none; vector-effect: non-scaling-stroke; }
.pic-af { position: absolute; border: var(--hair) solid var(--hud-text); box-shadow: 0 0 0 var(--hair) var(--grid-shadow); transform: translate(-50%, -50%); pointer-events: none; transition: border-color var(--d-click) linear; }
.pic-af.lock { border-color: var(--signal); }
/* A lens wider than the photograph: the photograph shows inside a hairline box and the rest of the frame is masked. */
.pic-wide { position: absolute; box-shadow: 0 0 0 100vmax var(--mask, rgba(10, 10, 11, 0.94)); outline: var(--hair) solid var(--hud-dim); pointer-events: none; }
.pic-wide-t { position: absolute; left: 0; right: 0; bottom: 100%; margin: 0 0 var(--s1); font-size: var(--t-xs); color: var(--hud-text); text-align: center; text-shadow: var(--hud-shadow); }
.pic-blink { position: absolute; inset: 0; background: var(--black); opacity: 0; pointer-events: none; }
.pic-blink.on { animation: pic-shut var(--d-blink) steps(1, end); }
@keyframes pic-shut { 0% { opacity: 1; } 100% { opacity: 0; } }
/* Change 1 of 6 (Nov 20, 2026): while a place's photographs load, a soft 64 px preview of it covers the canvas (never a
   black box), with a quiet note at the bottom; it fades out when the full picture is drawn. */
.pic-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(10px) saturate(0.9); opacity: 0; pointer-events: none; transition: opacity 380ms ease-out; }
.pic-preview.is-on { opacity: 1; transition: none; }
.pic-preview:not([src]) { display: none; }
@media (prefers-reduced-motion: reduce) { .pic-preview { transition: none; } }
.pic.is-loading::after { content: 'Loading the picture'; position: absolute; left: 50%; bottom: calc(var(--hud-bot-h) + var(--s5)); transform: translateX(-50%); padding: 3px 10px; background: var(--tag-bg); color: var(--hud-text); font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; pointer-events: none; }
.pic.is-loading .pic-grid, .pic.is-loading .pic-af, .pic.is-loading .pic-cursor { visibility: hidden; }
.pic-nopic { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: var(--s5); text-align: center; color: var(--text-2); }

.hud-top, .hud-bot { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s3); color: var(--hud-text); text-shadow: var(--hud-shadow); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--t-md); letter-spacing: 0.02em; pointer-events: none; }
.hud-top { top: 0; height: var(--hud-h); background: var(--scrim-top); }
.hud-bot { bottom: 0; height: var(--hud-bot-h); background: var(--scrim-bot); }
.hud-mode { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 4px; border: var(--hair) solid var(--hud-dim); font-size: var(--t-label); letter-spacing: 0.06em; }
.hud-sp { flex: 1; }
.hud-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 4px; border: var(--hair) solid var(--hud-dim); font-size: var(--t-micro); letter-spacing: 0.04em; }
.hud-scale { position: relative; width: var(--scale-w); flex: none; padding-top: 2px; }
.hud-scale .ev-scale { display: block; }
.ev-scale {
  --tick: var(--hud-dim);
  height: 10px;
  background:
    linear-gradient(var(--tick), var(--tick)) center bottom / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px calc((100% - 1px) / 18)) left bottom / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px calc((100% - 1px) / 6)) left bottom / 100% 10px no-repeat;
}
.hud-nums { display: flex; justify-content: space-between; font-size: var(--t-micro); margin: 2px -3px 0; color: var(--hud-text); }
.hud-caret { position: absolute; top: -4px; left: 50%; width: var(--index-w); height: 16px; margin-left: -1px; background: var(--signal); box-shadow: 0 0 0 var(--hair) var(--grid-shadow); transition: left var(--d-click) steps(2, end); }
.hud-caret.over { animation: hud-blink 0.6s steps(2, end) infinite; }
@keyframes hud-blink { 50% { opacity: 0; } }
.hud-dof { margin-left: auto; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.readout { flex: none; width: var(--frame-w, 100%); height: var(--readout-h); margin-top: var(--s2); display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.readout-text { flex: 1; min-width: 0; margin: 0; font-size: var(--t-md); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readout-text.note { color: var(--text); }
.readout-act { flex: none; display: flex; }
.act-btn { position: relative; height: 32px; padding: 0 var(--s3); font-size: var(--t-sm); background: var(--silver); color: var(--ink); border: var(--hair) solid var(--silver); border-radius: var(--r); white-space: nowrap; }
.act-btn::after { content: ""; position: absolute; inset: -4px 0; }
.act-btn:hover { background: var(--silver-hi); border-color: var(--silver-hi); }
.act-btn:active { transform: translateY(1px); }

/* ================================================================ .strip- filmstrip (builder 1; builder 3 extends) */
.strip { flex: none; width: var(--frame-w, 100%); height: var(--strip-h); margin-top: var(--s2); display: flex; align-items: center; gap: var(--s3); min-width: 0; border-top: var(--hair) solid var(--line); }
.strip-k { writing-mode: vertical-rl; transform: rotate(180deg); flex: none; }
.strip-empty { margin: 0; flex: 1; display: flex; align-items: center; height: calc(var(--strip-h) - var(--s3)); padding: 0 var(--s4); border: var(--hair) dashed var(--line-strong); color: var(--text-3); font-size: var(--t-sm); }
.strip-list { list-style: none; margin: 0; padding: 0 2px; flex: 1; min-width: 0; display: flex; gap: var(--s2); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; height: 100%; align-items: center; }
.strip-list li { flex: none; }
.thumb { display: block; width: var(--thumb-w); height: var(--thumb-h); padding: 0; border: 0; background: var(--black) center / cover no-repeat; outline: var(--hair) solid var(--line); outline-offset: 0; position: relative; }
.thumb:hover { outline-color: var(--text-2); }
.thumb.new { outline: var(--index-w) solid var(--signal); }
.thumb[aria-selected="true"] { outline: var(--index-w) solid var(--text); }
.thumb:focus-visible { outline: var(--focus-w) solid var(--focus-c); outline-offset: 2px; }
.thumb-n { position: absolute; left: 3px; bottom: 2px; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--hud-text); text-shadow: var(--hud-shadow); }

/* ================================================================ .rail- .dial- .mode- .gear- .shoot- (builder 1) */
.rail { grid-area: rail; position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: var(--hair) solid var(--line); }
.deck { display: flex; flex-direction: column; gap: var(--rail-gap); padding: var(--rail-pad) var(--rail-pad) 0; min-height: 0; overflow: hidden; }

.mode-sw { display: grid; grid-template-columns: 112fr 64fr 64fr 64fr; height: var(--mode-h); border: var(--hair) solid var(--line); border-radius: var(--r); flex: none; }
.mode-sw button { border: 0; background: transparent; font-family: var(--font-mono); font-size: var(--t-sm); color: var(--text-2); border-radius: var(--r-tag); letter-spacing: 0.04em; }
.mode-sw button + button { border-left: var(--hair) solid var(--line); }
.mode-sw .mode-auto { font-family: var(--font-sans); letter-spacing: 0; }
.mode-sw button:hover { color: var(--text); background: var(--raised); }
.mode-sw button[aria-checked="true"] { background: var(--raised); color: var(--text); box-shadow: inset 0 calc(-1 * var(--index-w)) 0 var(--signal), inset 0 0 0 var(--hair) var(--line); }
.mode-sw button[aria-disabled="true"] { color: var(--text-3); cursor: not-allowed; background: transparent; text-decoration: line-through; }
.why { margin: 0; height: var(--why-h); flex: none; font-size: var(--t-sm); line-height: 1.35; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.dial { position: relative; height: var(--dial-h); flex: none; display: flex; flex-direction: column; justify-content: center; border-top: var(--hair) solid var(--line); }
.dial:has(.tape:focus-visible) { outline: var(--focus-w) solid var(--focus-c); outline-offset: 3px; }   /* audit 2: clear of the label and the value */
.dial-head { display: flex; align-items: center; gap: var(--s2); height: 26px; }
.dial-label { flex: 1; }
.dial-tag { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: 0.08em; color: var(--text-3); border: var(--hair) solid var(--line-strong); padding: 0 4px; line-height: 16px; border-radius: var(--r-tag); }
.dial-tag:empty { display: none; }
.dial-val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--t-val); letter-spacing: -0.01em; color: var(--text); min-width: 5ch; text-align: right; line-height: 1; }
.dial.ro .dial-val { color: var(--text-2); }
/* Change 3 of 6 (Nov 20, 2026): the value being changed (turned, held) is larger and brighter; dial.js sets .on and
   clears it 1.2 s after the last change. The head keeps its height, so nothing below moves. */
.dial-val { transition: font-size var(--d-click) var(--ease), color var(--d-click) linear; }
.dial.on .dial-val, .dial.held .dial-val { font-size: var(--t-val-on); color: var(--val-on); }
.hud-top > span { transition: font-size var(--d-click) var(--ease); }
.hud-top > .on { font-size: var(--t-hud-on); font-weight: 600; color: var(--val-on); }
@media (prefers-reduced-motion: reduce) { .dial-val, .hud-top > span { transition: none; } }
.dial-row { display: flex; align-items: center; gap: var(--s1); }
.dial-step { flex: none; width: var(--step-btn); height: var(--step-btn); display: grid; place-items: center; padding: 0; background: transparent; border: var(--hair) solid var(--line); border-radius: var(--r); color: var(--text-2); font-family: var(--font-mono); font-size: var(--t-body); line-height: 1; }
.dial-step:hover:not(:disabled) { color: var(--text); border-color: var(--line-strong); background: var(--raised); }
.dial-step:active:not(:disabled) { transform: scale(0.97); background: var(--raised); }
.dial-step:disabled { opacity: 1; color: var(--text-3); border-style: dashed; cursor: default; }   /* audit 2: unavailable, not broken */
/* Review fix (Nov 19): on a desktop with a mouse the minus and plus buttons stay out of sight until the dial is hovered
   or focused (drag, wheel, arrow keys and a click on a printed number already turn it), so the first screen shows at
   most 14 controls. Touch keeps them. Exp. comp is hidden where it does nothing (Auto, and M without Auto ISO). */
@media (min-width: 1024px) and (min-height: 600px) and (hover: hover) and (pointer: fine), (pointer: fine) and (hover: hover) and (min-width: 700px) and (min-aspect-ratio: 5/4) {
  .dial .dial-step { visibility: hidden; }
  .dial:hover .dial-step, .dial:focus-within .dial-step, .dial.held .dial-step { visibility: visible; }
  /* Audit 2: Exp. comp's minus and plus behave the same (its value takes arrows), so A, S and M add one control, not three. */
  .comp .comp-step { visibility: hidden; }
  .comp:hover .comp-step, .comp:focus-within .comp-step { visibility: visible; }
}
.comp.off { display: none; }
.tape { position: relative; flex: 1; min-width: 0; height: var(--tape-h); overflow: hidden; cursor: ew-resize; touch-action: pan-y; outline: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, var(--black) 10%, var(--black) 90%, transparent); mask-image: linear-gradient(90deg, transparent, var(--black) 10%, var(--black) 90%, transparent); }
.tape-in { position: absolute; left: 50%; top: 0; height: 100%; width: 0; will-change: transform; transition: transform var(--d-click) var(--ease); }
.tape.drag .tape-in, .tape.now .tape-in { transition: none; }
.tape.slow .tape-in { transition-duration: var(--d-ui); }
.tk { position: absolute; top: 0; width: 1px; height: 7px; background: var(--line-strong); }
.tk.maj { height: 12px; background: var(--text-3); }
.tk.out { opacity: 0.35; }
.tk-n { position: absolute; top: 13px; transform: translateX(-50%); font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-3); white-space: nowrap; cursor: pointer; padding: 6px 4px; margin: -6px 0 0; line-height: 14px; }   /* audit 2: a 26 px tall hit area, same look */
.tk-n.edge { visibility: hidden; }   /* a number half under the tape's fade is not printed (audit 2) */
.tk-n.out { cursor: default; text-decoration: line-through; text-decoration-thickness: 1px; }   /* review fix: no dimming below 3:1 */
.tk-n.end { transform: translateX(calc(-100% - 4px)); }
.tk-n.end.out { text-decoration: none; color: var(--text-3); }   /* AUTO is a setting, never struck through (audit 2) */
.tk-n:hover:not(.out) { color: var(--text); }
.tape-index { position: absolute; left: 50%; top: 0; width: var(--index-w); height: 14px; margin-left: -1px; background: var(--signal); pointer-events: none; }
.dial.ro .tape-index { background: var(--text-3); }
.tape-bubble { display: none; }
.tape-probe { position: absolute; left: 0; top: 0; width: var(--dial-px); height: 0; visibility: hidden; pointer-events: none; }
.dial.held .tape-bubble { display: block; position: fixed; z-index: 50; transform: translate(-50%, -100%); padding: 2px 8px; font-family: var(--font-mono); font-size: var(--t-body); font-variant-numeric: tabular-nums; color: var(--text); background: var(--raised); border: var(--hair) solid var(--line-strong); border-radius: var(--r); pointer-events: none; white-space: nowrap; }

.comp { height: var(--comp-h); flex: none; display: grid; grid-template-columns: 1fr auto 6ch auto; grid-template-rows: 1fr auto; align-items: center; column-gap: var(--s1); border-top: var(--hair) solid var(--line); padding-top: 2px; }
.comp-label { grid-row: 1; }
.comp-step { grid-row: 1; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; background: transparent; border: var(--hair) solid var(--line); border-radius: var(--r); color: var(--text-2); font-family: var(--font-mono); }
.comp-step:hover:not(:disabled) { color: var(--text); background: var(--raised); }
.comp-step:disabled { opacity: 1; color: var(--text-3); border-style: dashed; cursor: default; }
.comp-val { grid-row: 1; text-align: center; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--t-body); color: var(--text); }
.comp-note { grid-row: 2; grid-column: 1 / -1; line-height: 1.3; font-size: var(--t-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comp.off .comp-val { color: var(--text-3); }

.gear-k { margin-top: var(--s1); flex: none; }
.gear { display: flex; flex-direction: column; flex: none; border-top: var(--hair) solid var(--line); }
.gear-btn { display: flex; align-items: center; gap: var(--s2); height: var(--gear-h); padding: 0; background: transparent; border: 0; border-bottom: var(--hair) solid var(--line); text-align: left; min-width: 0; position: relative; transition: background-color var(--d-ui) var(--ease); }
.gear-btn:hover { background: var(--raised); }
.gear-btn:active { transform: scale(0.99); }
.gear-btn[aria-expanded="true"] { background: var(--raised); box-shadow: inset var(--index-w) 0 0 var(--signal); }
.gear-l { flex: none; padding-left: 0; }   /* audit 2: on the dial labels' left edge */
.gear-v { flex: 1; min-width: 0; text-align: right; font-size: var(--t-sm); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gear-v.dim { color: var(--text-3); }
.gl-short { display: none; }
/* Fix pass (Nov 20, 2026; critic P2): a value too long to sit beside its label in the narrow dock ("Sidewalk · Golden
   hour · 4 m" at 304 px) goes under the label, on the row's full width (rail.js adds .stack only when it does not fit
   and the row is at least 34 px tall). */
.gear-btn.stack { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto; align-content: center; row-gap: 1px; column-gap: var(--s2); }
.gear-btn.stack .gear-l { grid-row: 1; grid-column: 1; line-height: 1.15; }
.gear-btn.stack .gear-v { grid-row: 2; grid-column: 1; text-align: left; line-height: 1.2; font-size: var(--t-xs); }
.gear-btn.stack .gear-key { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.gear-btn.stack .dk-chev { grid-row: 1 / span 2; grid-column: 3; align-self: center; }
.gear-key { flex: none; width: 18px; text-align: center; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-3); border: var(--hair) solid var(--line); border-radius: var(--r-tag); line-height: 16px; }

.shoot { margin-top: auto; flex: none; height: var(--shoot-h); display: flex; align-items: center; gap: var(--s3); padding: 0 var(--rail-pad); border-top: var(--hair) solid var(--line); background: var(--ground); }
.shoot-last { display: none; }
.shoot-btn { display: flex; align-items: center; gap: var(--s4); padding: 0; background: transparent; border: 0; text-align: left; border-radius: var(--round); }
.shoot-btn:focus-visible { outline-offset: 4px; border-radius: var(--r); }
.shutter { flex: none; width: var(--shutter-d); height: var(--shutter-d); border-radius: var(--round); border: var(--index-w) solid var(--signal); background: var(--ground); position: relative; }
.shutter::after { content: ""; position: absolute; inset: 6px; border-radius: var(--round); background: var(--silver); transition: transform var(--d-click) var(--ease), background-color var(--d-click) linear; }
.shoot-btn:hover .shutter::after { background: var(--silver-hi); }
.shoot-btn:active .shutter::after, .shoot-btn.press .shutter::after { transform: scale(0.86); }
.shoot-k { display: grid; gap: 2px; }
.shoot-t { font-size: var(--t-body); font-weight: 500; }
.shoot-n { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-3); }

/* ================================================================ .gpanel- panel host (builder 1 shell; builder 2 fills) */
/* Review fix (Nov 19): on desktop a panel stops above the shutter block, so Take the shot stays in reach. */
.gpanel { position: absolute; z-index: 25; top: var(--bar-h); right: 0; bottom: var(--shoot-h); width: var(--rail-w); display: flex; flex-direction: column; background: var(--panel); border-left: var(--hair) solid var(--line-strong); animation: gp-in var(--d-ui) var(--ease); }
@keyframes gp-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.gpanel-head { flex: none; height: var(--gp-head); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--s2) 0 var(--s4); border-bottom: var(--hair) solid var(--line); }
.gpanel-h { margin: 0; font-size: var(--t-body); font-weight: 500; letter-spacing: var(--track-tight); }
.gpanel-done { height: 40px; min-width: var(--tap-min); padding: 0 var(--s3); font-size: var(--t-sm); background: transparent; border: var(--hair) solid var(--line); border-radius: var(--r); color: var(--text); }
.gpanel-done:hover { background: var(--raised); border-color: var(--line-strong); }
.gpanel-esc { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-3); margin-left: var(--s1); }
.gpanel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--s4); scrollbar-width: thin; }
.gp-now { margin: 0 0 var(--s3); font-size: var(--t-body); color: var(--text); }
.gp-soon { margin: 0; font-size: var(--t-sm); color: var(--text-2); }
.gp-list { list-style: none; margin: 0; padding: 0; }
.gp-row { display: block; width: 100%; min-height: 48px; padding: var(--s2) var(--s3); text-align: left; background: transparent; border: 0; border-bottom: var(--hair) solid var(--line); position: relative; }
.gp-row:hover { background: var(--raised); }
.gp-row b { display: block; font-weight: 500; font-size: var(--t-md); }
.gp-row span { display: block; font-size: var(--t-xs); color: var(--text-2); }
.gp-k { margin: var(--s4) 0 var(--s2); }

/* ================================================================ .menu- View menu (builder 1 grid items; builder 2 adds) */
.menu { position: absolute; z-index: 40; top: calc(var(--bar-h) - var(--s1)); right: var(--menu-right, var(--s4)); width: var(--menu-w); padding: var(--s2) 0; background: var(--panel); border: var(--hair) solid var(--line-strong); border-radius: var(--r); box-shadow: var(--shadow-pop); }
.menu-k { padding: var(--s2) var(--s4) var(--s1); display: flex; justify-content: space-between; }
.menu-key { color: var(--text-3); }
.menu-item { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 40px; padding: 0 var(--s4); background: transparent; border: 0; text-align: left; font-size: var(--t-sm); color: var(--text-2); }
.menu-item::before { content: ""; flex: none; width: 10px; height: 10px; border: var(--hair) solid var(--line-strong); border-radius: var(--round); }
.menu-item[role="menuitemcheckbox"]::before { border-radius: var(--r-tag); }
.menu-item[role="menuitem"]::before { display: none; }
.menu-item[aria-checked="true"] { color: var(--text); }
.menu-item[aria-checked="true"]::before { background: var(--text); border-color: var(--text); box-shadow: inset 0 0 0 2px var(--panel); }
.menu-item:hover, .menu-item:focus-visible { background: var(--raised); color: var(--text); outline-offset: -2px; }
.share-pop { position: absolute; z-index: 40; top: calc(var(--bar-h) - var(--s1)); right: var(--s4); width: 360px; padding: var(--s3); background: var(--panel); border: var(--hair) solid var(--line-strong); border-radius: var(--r); box-shadow: var(--shadow-pop); display: grid; gap: var(--s2); }
.share-pop input { width: 100%; height: 40px; padding: 0 var(--s2); background: var(--ground); border: var(--hair) solid var(--line-strong); border-radius: var(--r); font-family: var(--font-mono); font-size: var(--t-xs); }

/* ================================================================ .about- drawer (builder 1 shell; builder 3 owns) */
.veil { position: fixed; inset: 0; z-index: 60; background: var(--veil); }
.about { position: fixed; z-index: 70; top: var(--bar-h); right: 0; bottom: 0; width: min(var(--about-w), 100vw); display: flex; flex-direction: column; background: var(--panel); border-left: var(--hair) solid var(--line-strong); box-shadow: var(--shadow-pop); animation: gp-in var(--d-ui) var(--ease); }
.about-head { flex: none; height: var(--gp-head); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--s2) 0 var(--s5); border-bottom: var(--hair) solid var(--line); }
.about-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--s5) var(--s5) var(--s7); font-size: var(--t-md); color: var(--text-2); }
.about-body h2 { margin: var(--s6) 0 var(--s2); font-size: var(--t-h2); font-weight: 350; letter-spacing: -0.03em; line-height: 1.15; color: var(--text); }
.about-body h2:first-child { margin-top: 0; }
.about-body h3 { margin: var(--s4) 0 var(--s1); font-size: var(--t-body); font-weight: 500; color: var(--text); }
.about-body p { margin: 0 0 var(--s3); }
.about-lede { font-size: var(--t-body); color: var(--text); }
.about-body .faq-item { border-top: var(--hair) solid var(--line); padding-top: var(--s2); }
.about-body form { display: grid; gap: var(--s3); margin-top: var(--s4); padding: var(--s4); border: var(--hair) solid var(--line); border-radius: var(--r); }
.about-body .panel-head { margin: 0; font-weight: 500; color: var(--text); }
.about-body .panel-why, .about-body .fine { margin: 0; font-size: var(--t-xs); }
.about-body .about-foot { margin-top: var(--s5); color: var(--text-3); }
.guide { background: var(--ground); border-top: var(--hair) solid var(--line); }
.guide-body { overflow: visible; max-width: 46rem; margin: 0 auto; padding: var(--s7) var(--s5); }
.about-guide { color: var(--text); }
.about-body .field { display: grid; gap: var(--s1); font-size: var(--t-sm); color: var(--text); }
.about-body .field input, .about-body .field select { height: var(--tap-min); padding: 0 var(--s3); background: var(--ground); border: var(--hair) solid var(--line-strong); border-radius: var(--r); }
.about-body .field .err { display: none; color: var(--warn); font-size: var(--t-xs); }
.about-body .field.bad .err { display: block; }
.about-body .go { height: var(--tap-min); background: var(--silver); color: var(--ink); border: 0; border-radius: var(--r); font-weight: 500; }
.about-body .form-msg { margin: 0; font-size: var(--t-sm); color: var(--text); }

.pic.no-hud .pic-grid { clip-path: none; }
/* ================================================================ phone and small tablet (builder 1 base; builder 3 polishes) */
@media (max-width: 699px), (max-width: 1023px) and (pointer: coarse), (max-height: 599px) and (pointer: coarse), (max-width: 1023px) and (pointer: none), (max-height: 599px) and (pointer: none), (max-width: 1023px) and (max-aspect-ratio: 1249/1000), (max-height: 599px) and (max-aspect-ratio: 1249/1000) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--bar-h) auto minmax(0, 1fr); grid-template-areas: "bar" "stage" "rail"; }
  .bar { gap: var(--s2); padding: 0 var(--s1) 0 var(--s3); }
  .bar-mark { width: 36px; height: var(--tap-min); margin-left: calc(-1 * var(--s1)); }
  .bar-mark svg { width: 24px; height: 24px; }
  .bar-title { font-size: var(--t-title-s); border-right: 0; padding-right: 0; }
  .seg { height: var(--tap-min); margin-left: auto; padding: 0; border: 0; gap: 0; }
  .seg button { min-width: 0; width: 76px; height: var(--tap-min); padding: 0; font-size: var(--t-xs); box-shadow: inset 0 0 0 var(--hair) var(--line); }
  .mode-sw { border: 0; }
  .mode-sw button { height: var(--mode-h); box-shadow: inset 0 0 0 var(--hair) var(--line); }
  .mode-sw button + button { border-left: 0; }
  .tape { height: var(--tape-h); }
  .tk-n { top: 16px; }
  .comp { grid-template-rows: 1fr 1fr; padding-top: 0; }
  .comp-step { grid-row: 1 / span 2; width: var(--tap-min); height: var(--tap-min); }
  .comp-val { grid-row: 1 / span 2; min-height: var(--tap-min); display: grid; place-items: center; }
  .comp-note { grid-column: 1; }
  .bar-end { margin-left: 0; }
  .bar-wide { display: none; }
  .bar-menu { display: inline-block; }
  .stage { padding: 0; flex: none; }
  .frame { width: var(--frame-w, 100vw); height: var(--frame-h, 66.67vw); }
  .readout { width: 100%; height: var(--readout-h); margin: 0; padding: 0 var(--s4); border-bottom: var(--hair) solid var(--line); background: var(--ground); }
  .readout-text { font-size: var(--t-sm); white-space: normal; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .act-btn { height: var(--tap-min); }
  .strip { display: none; }
  .hud-top { gap: var(--s2); font-size: var(--t-label); padding: 0 var(--s2); }
  .hud-bot { gap: var(--s2); font-size: var(--t-micro); padding: 0 var(--s2); }
  .hud-nums { display: none; }
  .hud-dof { font-size: var(--t-micro); }
  /* Review fix (Nov 19): the credit sits at the top right under the camera text, off the exposure scale. */
  .readout { flex-wrap: wrap; align-content: center; row-gap: 0; height: auto; min-height: var(--readout-h); padding-top: var(--s1); padding-bottom: var(--s1); }
  .rail { border-left: 0; min-height: 0; }
  .deck { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px var(--s4) var(--s1); gap: 1px; }
  .why { font-size: var(--t-xs); }
  .dial-head { height: 22px; }
  .gear-k { display: none; }
  .gear { flex-direction: row; border-top: var(--hair) solid var(--line); border-bottom: var(--hair) solid var(--line); margin-top: var(--s1); }
  .gear-btn { flex: 1 1 0; flex-direction: column; justify-content: center; align-items: stretch; gap: 2px; height: var(--gear-h); padding: 0 var(--s1); border-bottom: 0; text-align: center; }
  .dk-h + .dk-h > .gear-btn { border-left: var(--hair) solid var(--line); }
  .gear-l { padding: 0; font-size: var(--t-nano); letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gear-v { text-align: center; font-size: var(--t-nano); line-height: 1.25; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-height: 2.5em; }
  .gear-key { display: none; }
  .gear-btn[aria-expanded="true"] { box-shadow: inset 0 calc(-1 * var(--index-w)) 0 var(--signal); }
  /* Fix pass (Nov 20, 2026; critic P2): the phone tiles cut "LIGHT...", "Sidewalk · Golde..." and "Sony A7R III ·...".
     The tile says Scene (the full name stays for screen readers); a value shows its first two parts, each on its own
     line and wrapped between words, no dots and no ellipsis (rail.js wraps each part in .gv-p with data-i). The Scene
     tile shows the light ("Golden hour"): the place is in the picture above it. */
  .gl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .gl-short { display: inline; }
  .gear-v { display: block; -webkit-line-clamp: none; max-height: 2.5em; overflow: hidden; }
  .gear-v .gv-sep { display: none; }
  .gear-v .gv-p { display: block; white-space: normal; overflow-wrap: normal; }
  /* Audit 3 (Nov 25, 2026): "16mm / 16-" in the Lens tile and "Day, / lamps" in Scene (the rest cut off). Words never
     break inside (rail.js .gv-w), and a value may take a third line: 12 px label + 3 x 15 px fits the 64 px tile. */
  .gear-v { max-height: 3.75em; }
  .gear-v .gv-w { white-space: nowrap; }
  .gear-btn { padding: 0 2px; }      /* "24-70mm" needs about 52 px of a 60 px tile */
  .gear-v .gv-p[data-i]:not([data-i="0"]):not([data-i="1"]), #gv-scene .gv-p[data-i="0"] { display: none; }
  .shoot { margin-top: 0; justify-content: center; position: relative; padding: 0 var(--s4); }
  .shoot-last { display: block; position: absolute; left: var(--s4); top: 50%; transform: translateY(-50%); width: 56px; height: 56px; padding: 0; background: var(--raised) center / cover no-repeat; border: var(--hair) solid var(--line); border-radius: var(--r); }
  .shoot-last:disabled { opacity: 0.5; cursor: default; visibility: hidden; }   /* fix pass, Nov 20, 2026: no empty square before the first shot */
  .shoot-last-img { display: block; width: 100%; height: 100%; background: center / cover no-repeat; }
  .shoot-k { display: none; }
  .shoot-btn { border-radius: var(--round); }
  .gpanel { position: fixed; top: var(--sheet-top, 50vh); left: 0; right: 0; bottom: 0; width: auto; border-left: 0; border-top: var(--hair) solid var(--line-strong); animation-name: gp-up; }
  .gpanel-head { height: var(--tap-min); }
  @keyframes gp-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
  .menu { right: var(--s2); width: min(var(--menu-w), calc(100vw - 16px)); }
  .menu-item { min-height: var(--tap-min); }
  .share-pop { left: var(--s2); right: var(--s2); width: auto; }
  .about { top: 0; width: 100vw; border-left: 0; }
}

/* Short desktop screens (1280 x 720): the gear label goes and the why line gets smaller so the rail fits exactly. */
@media (min-width: 1024px) and (min-height: 600px) and (max-height: 799px) {
  .gear-k { display: none; }
  .why { font-size: var(--t-xs); line-height: 1.3; margin-top: var(--s1); }
  /* Audit 2: the View menu in two columns, so nothing sits below the fold at 720. */
  #view-menu { columns: 2; column-gap: 0; width: calc(var(--menu-w) * 2 - 40px); }
  #view-menu .menu-k, #view-menu .menu-item, #view-menu .menu-group { break-inside: avoid; }
  #view-menu .menu-k:not(:first-child) { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .pic-blink.on, .hud-caret.over { animation: none; }
}

/* ================================================================ .pk- panel parts (builder 2) */
.gpanel-body { padding: var(--s3) var(--s4) var(--s6); }
.pk-sec { padding: var(--s3) 0 var(--s2); border-top: var(--hair) solid var(--line); margin-top: var(--s2); }
.pk-sec:first-child, .pk-search + .pk-sec { border-top: 0; margin-top: 0; }
.pk-sh { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2); }
.pk-k { font-size: var(--t-label); }
.pk-sv { font-family: var(--font-mono); font-size: var(--t-sm); color: var(--text); }
.pk-note { margin: var(--s2) 0 0; font-size: var(--t-xs); line-height: 1.45; color: var(--text-2); }
.pk-note a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.pk-note a:hover { text-decoration-color: var(--text); }
.pk-note-top { margin: var(--s2) 0 var(--s3); font-size: var(--t-sm); }
.pk-warn { color: var(--warn); }
/* Pose tips (Nov 25, 2026): three short lines under the pose choice */
.pose-tip { margin-top: var(--s3); padding: var(--s3); border: var(--hair) solid var(--line); border-radius: 2px; }
.pose-line { margin: 0 0 var(--s2); font-size: var(--t-sm); line-height: 1.45; color: var(--text); }
.pose-k { color: var(--text-2); }
.pose-tip .pk-note:first-of-type { margin-top: var(--s2); }
.pose-warn { color: var(--warn); }
/* Nov 26, 2026: Camera height chips carry the lens height on a second line; the live lines in the pose tip */
[data-rg="stance"] .pk-chip { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: var(--s1) var(--s3); line-height: 1.25; }
[data-rg="stance"] .pk-chip .pk-s { font-size: var(--t-xs); color: var(--text-3); }
.pose-live { color: var(--text); }
.pk-total { margin: var(--s4) 0 0; padding-top: var(--s3); border-top: var(--hair) solid var(--line); font-family: var(--font-mono); font-size: var(--t-sm); color: var(--text); }

/* radio rows: a long list, the current one marked by the signal index line on the left */
.pk-rows { display: flex; flex-direction: column; }
.pk-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--s2); min-height: var(--pk-row-h); padding: var(--s1) var(--s2) var(--s1) var(--s3); background: transparent; border: 0; border-bottom: var(--hair) solid var(--line); text-align: left; color: var(--text-2); transition: background-color var(--d-click) linear; }
.pk-row:first-child { border-top: var(--hair) solid var(--line); }
.pk-row .pk-t { font-size: var(--t-md); color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-row .pk-s { grid-column: 1; font-size: var(--t-xs); color: var(--text-3); }
.pk-row .pk-a { grid-column: 2; grid-row: 1 / span 2; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-2); white-space: nowrap; text-align: right; }
.pk-row:hover { background: var(--raised); }
.pk-row:active { background: var(--raised); transform: scale(0.995); }
.pk-row[aria-checked="true"] { box-shadow: inset var(--index-w) 0 0 var(--signal); }
.pk-row[aria-checked="true"] .pk-t { font-weight: 500; }
.pk-row[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.pk-row:focus-visible { outline-offset: -2px; }

/* chips: a few short choices */
.pk-chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.pk-chip { min-height: var(--pk-chip-h); padding: 0 var(--s3); background: transparent; border: var(--hair) solid var(--line-strong); border-radius: var(--r); font-size: var(--t-sm); color: var(--text-2); white-space: nowrap; transition: color var(--d-click) linear, border-color var(--d-click) linear, background-color var(--d-click) linear; }
.pk-chip:hover { color: var(--text); background: var(--raised); }
.pk-chip:active { transform: scale(0.97); }
.pk-chip[aria-checked="true"] { color: var(--text); background: var(--raised); border-color: var(--text-3); box-shadow: inset 0 calc(-1 * var(--index-w)) 0 var(--signal); }
.pk-chip[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

/* switches */
.pk-switch { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--s3); width: 100%; min-height: var(--pk-row-h); padding: var(--s2) 0; background: transparent; border: 0; text-align: left; color: var(--text); }
.pk-switch + .pk-switch { border-top: var(--hair) solid var(--line); }
.pk-switch .pk-t { font-size: var(--t-md); }
.pk-switch .pk-s { grid-column: 1 / -1; margin-top: 2px; font-size: var(--t-xs); line-height: 1.45; color: var(--text-2); }
.pk-knob { grid-column: 2; grid-row: 1; position: relative; width: var(--pk-switch-w); height: var(--pk-switch-h); border: var(--hair) solid var(--line-strong); border-radius: var(--round); background: var(--ground); transition: background-color var(--d-click) linear, border-color var(--d-click) linear; }
.pk-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(var(--pk-switch-h) - 6px); height: calc(var(--pk-switch-h) - 6px); border-radius: var(--round); background: var(--text-3); transition: transform var(--d-click) var(--ease), background-color var(--d-click) linear; }
.pk-switch[aria-checked="true"] .pk-knob { background: var(--raised); border-color: var(--text-2); }
.pk-switch[aria-checked="true"] .pk-knob::after { transform: translateX(calc(var(--pk-switch-w) - var(--pk-switch-h))); background: var(--signal); }
.pk-switch:focus-visible { outline-offset: 2px; }

/* buttons and tips */
.pk-btn { margin-top: var(--s2); min-height: 40px; padding: 0 var(--s3); background: var(--silver); color: var(--ink); border: 0; border-radius: var(--r); font-size: var(--t-sm); font-weight: 500; }
.pk-btn:hover { background: var(--silver-hi); }
.pk-btn:active { transform: translateY(1px); }
.pk-tip { margin-top: var(--s3); padding: var(--s3); border: var(--hair) solid var(--line); border-radius: var(--r); }
.pk-tip .pk-note { margin: 0; }

/* tape dials inside a panel: the rail's dial, without its top rule */
.pk-dial { height: auto; padding: var(--s1) 0 var(--s2); border-top: 0; }
.pk-dial .dial-val { font-size: var(--t-body); }

/* the camera picker */
.pk-search { position: sticky; top: calc(-1 * var(--s3)); z-index: 3; margin: calc(-1 * var(--s3)) calc(-1 * var(--s4)) 0; padding: var(--s3) var(--s4) var(--s2); background: var(--panel); border-bottom: var(--hair) solid var(--line); }
.pk-input { width: 100%; height: var(--pk-input-h); padding: 0 var(--s3); background: var(--ground); border: var(--hair) solid var(--line-strong); border-radius: var(--r); font-size: var(--t-md); color: var(--text); }
.pk-input::placeholder { color: var(--text-3); }
.pk-input:focus-visible { outline-offset: 0; border-color: var(--text-2); }
.pk-count { margin: var(--s1) 0 0; font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: 0.06em; color: var(--text-3); }
.pk-sec-chips { padding-top: var(--s3); }
.pk-list { outline: none; }
.pk-list:focus-visible { outline: var(--focus-w) solid var(--focus-c); outline-offset: 2px; }
.pk-group { position: relative; }
.pk-gh { position: sticky; top: calc(var(--pk-input-h) + 30px); z-index: 2; display: flex; align-items: center; justify-content: space-between; height: 32px; margin-top: var(--s2); background: var(--panel); border-bottom: var(--hair) solid var(--line-strong); }
.pk-gh .label { color: var(--text); }
.pk-gc { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-3); }
.pk-opt { position: relative; display: flex; align-items: center; gap: var(--s2); min-height: var(--pk-opt-h); padding: 0 var(--s2) 0 var(--s3); border-bottom: var(--hair) solid var(--line); cursor: pointer; }
.pk-opt .pk-t { flex: 1; min-width: 0; font-size: var(--t-md); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-opt .pk-a { flex: none; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-2); white-space: nowrap; }
.pk-opt:hover, .pk-opt.mark { background: var(--raised); }
.pk-opt.mark { outline: var(--hair) solid var(--text-3); outline-offset: -1px; }
.pk-opt[aria-selected="true"] { box-shadow: inset var(--index-w) 0 0 var(--signal); }
.pk-opt[aria-selected="true"] .pk-t { font-weight: 500; }
.pk-empty { padding: var(--s4) 0; font-size: var(--t-sm); }

/* ================================================================ picture overlays (builder 2) */
.pic.over-subject, .pic.dragging { cursor: ns-resize; }
.pic.no-hud .hud-top, .pic.no-hud .hud-bot { display: none; }
.pic-cursor { position: absolute; border: var(--hair) dashed var(--hud-text); box-shadow: 0 0 0 var(--hair) var(--grid-shadow); transform: translate(-50%, -50%); pointer-events: none; }
.pic-hist { position: absolute; z-index: 2; top: calc(var(--hud-h) + var(--s2)); right: var(--s3); width: var(--hist-w); height: var(--hist-h); background: var(--overlay-bg); border: var(--hair) solid var(--grid-shadow); pointer-events: none; }
.pic-hist .h-path { fill: var(--hist-fill); }
.pic-hist .h-clip { fill: var(--warn); opacity: 0; }
.pic-hist .h-clip.on { opacity: 1; }
.pic-map { position: absolute; z-index: 2; left: var(--s3); bottom: calc(var(--hud-bot-h) + 30px); width: var(--map-w); height: var(--map-h); background: var(--overlay-bg); border: var(--hair) solid var(--grid-shadow); pointer-events: none; }
.pic-map svg { display: block; width: 100%; height: 100%; }
.map-svg .m-view { fill: var(--map-view); }
.map-svg .m-sharp { fill: var(--map-sharp); }
.map-svg .m-lamp { fill: var(--map-line); }
.map-svg .m-wall, .map-svg .m-rule { stroke: var(--map-line); stroke-width: 1; fill: none; }
.map-svg .m-focus { stroke: var(--signal); stroke-width: 1.5; fill: none; }
.map-svg .m-flash { stroke: var(--warn); stroke-width: 1.5; fill: none; stroke-dasharray: 3 2; }
.map-svg .m-you { fill: var(--hud-text); }
.map-svg .m-them { fill: var(--signal); }
.map-svg .m-t { fill: var(--hud-text); font-family: var(--font-mono); font-size: var(--t-micro); }

/* ================================================================ .menu- additions (builder 2) */
.menu { max-height: var(--menu-max-h); overflow-y: auto; overscroll-behavior: contain; }
.menu-item .menu-key { margin-left: auto; font-family: var(--font-mono); font-size: var(--t-micro); }
.menu-k + .menu-group, .menu-k + .menu-item { margin-top: 0; }
.menu .menu-k:not(:first-child) { margin-top: var(--s1); border-top: var(--hair) solid var(--line); padding-top: var(--s3); }
.keys-sheet { width: 340px; padding: var(--s2) 0 var(--s3); }
.keys-list { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s3); margin: var(--s2) var(--s4) var(--s3); font-size: var(--t-sm); }
.keys-list dt { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text); white-space: nowrap; }
.keys-list dd { margin: 0; color: var(--text-2); }
.keys-done { margin: 0 var(--s4); }

@media (max-width: 699px), (max-width: 1023px) and (pointer: coarse), (max-height: 599px) and (pointer: coarse), (max-width: 1023px) and (pointer: none), (max-height: 599px) and (pointer: none), (max-width: 1023px) and (max-aspect-ratio: 1249/1000), (max-height: 599px) and (max-aspect-ratio: 1249/1000) {
  .pk-gh { top: calc(var(--pk-input-h) + 30px); }
  .pk-row, .pk-chip, .pk-switch { -webkit-tap-highlight-color: transparent; }
  .pk-chip { min-width: var(--tap-min); }   /* audit 2: the 13 px chip text made short chips narrower than 44 px */
  .gpanel-body { padding-bottom: var(--s5); }
  .gpanel-done { height: var(--tap-min); }
  .pic-map { bottom: calc(var(--hud-bot-h) + 24px); }
}
.pk-bare .dial-head { justify-content: flex-end; height: 22px; }
.pk-bare .dial-label { flex: none; }
/* Builder 2's color patch for .act-btn and .pk-btn is gone (audit 2): with the :where() reset a single class wins, and
   both set ink on silver themselves (13.4:1). */
.pk-wide { --dial-px: var(--dial-px-wide); }

/* ================================================================ .res- the result after each shot (builder 3) */
.res { grid-area: stage; position: relative; z-index: 22; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--stage); padding: 0 var(--stage-pad) var(--s3); overflow: hidden; }
.res:focus { outline: none; }
.res-head { flex: none; height: var(--res-head-h); display: flex; align-items: center; gap: var(--s3); border-bottom: var(--hair) solid var(--line); min-width: 0; }
.res-h { margin: 0; font-size: var(--t-body); font-weight: 500; letter-spacing: var(--track-tight); white-space: nowrap; outline: none; }
.res-h:focus-visible { outline: none; text-decoration: underline var(--focus-w) var(--signal); text-underline-offset: 6px; }   /* audit 2: a heading, not a text field */
.res-set { flex: 1; min-width: 0; margin: 0; font-family: var(--font-mono); font-size: var(--t-sm); color: var(--text-2); white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.res-nav { display: flex; gap: var(--s1); flex: none; }
.res-arrow, .res-quiet { height: 40px; min-width: 40px; padding: 0 var(--s3); background: transparent; border: var(--hair) solid var(--line); border-radius: var(--r); color: var(--text); font-size: var(--t-sm); white-space: nowrap; }
.res-arrow { padding: 0; font-size: var(--t-body); }
.res-arrow:hover:not(:disabled), .res-quiet:hover { background: var(--raised); border-color: var(--line-strong); }
.res-arrow:disabled { opacity: 1; color: var(--text-3); border-style: dashed; cursor: default; }
.res-arrow:active:not(:disabled), .res-quiet:active { transform: scale(0.97); }
.res-quiet[aria-pressed="true"] { background: var(--raised); box-shadow: inset 0 calc(-1 * var(--index-w)) 0 var(--signal); }
.res-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--res-side-w); gap: var(--s5); padding-top: var(--s3); }
.res-left { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; min-height: 0; }
.res-photo { flex: 1 1 auto; min-height: 0; display: flex; gap: var(--s2); align-items: flex-start; justify-content: flex-start; }
.res-fig { margin: 0; flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: var(--s1); }
.res-img { display: block; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; background: var(--black); outline: var(--hair) solid var(--line); }
.res-photo.two .res-img { max-height: calc(100% - 22px); }
.res-cap { display: block; max-width: 100%; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-3); white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.res-cmp { flex: none; border-top: var(--hair) solid var(--line); padding-top: var(--s2); }
.res-cmp-h { display: flex; align-items: center; gap: var(--s3); }
.res-cmp-h .label { flex: none; }
.res-sel { height: 36px; padding: 0 var(--s2); background: var(--ground); color: var(--text); border: var(--hair) solid var(--line-strong); border-radius: var(--r); font-size: var(--t-sm); }
.res-cmp-h .res-quiet { height: 36px; margin-left: auto; }
.res-cmp-row { display: flex; gap: var(--s3); margin-top: var(--s2); align-items: flex-start; min-width: 0; }
.res-tn { margin: 0; flex: none; width: var(--res-tn-w); }
.res-tn img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--black); outline: var(--hair) solid var(--line); }
.res-chg { flex: 1; min-width: 0; list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); color: var(--text-2); line-height: 1.45; }
.res-chg li + li { margin-top: 2px; }
.res-side { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: var(--s1); scrollbar-width: thin; }
.res-k { margin: var(--s3) 0 var(--s1); }
.res-side > .res-k:first-child { margin-top: 0; }
.res-vd { margin: 0; }
.res-row { display: grid; grid-template-columns: var(--res-row-k) minmax(0, 1fr); gap: var(--s2); padding: var(--s2) 0; border-top: var(--hair) solid var(--line); }
.res-row dt { padding-top: 3px; }
.res-row dd { margin: 0; min-width: 0; }
.res-w { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-md); font-weight: 500; color: var(--text); }
.res-mk { flex: none; width: var(--res-mk); height: var(--res-mk); border: var(--hair) solid var(--text-2); }
.res-mk-ok { background: var(--text); border-color: var(--text); }
.res-mk-warn { background: var(--warn); border-color: var(--warn); }
.res-mk-off { background: var(--signal); border-color: var(--signal); }   /* review fix (Nov 19): the one signal color marks what needs attention */
.res-why { display: block; margin-top: 2px; font-size: var(--t-xs); line-height: 1.4; color: var(--text-2); }
.res-try { position: relative; border-top: var(--hair) solid var(--line); padding: var(--s1) 0 var(--s2); }
/* Fix pass (Nov 20, 2026; critic P2): while rows scroll under the pinned Try this, they fade out above it (result.js
   sets .more) instead of being cut through their letters. */
.res-try::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 32px; pointer-events: none; opacity: 0; transition: opacity var(--d-ui) var(--ease); }
.res-try.more::before { opacity: 1; }
.res-try-t { margin: 0 0 var(--s2); font-size: var(--t-sm); color: var(--text); }
.res-apply { height: 40px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.res-load { margin-top: var(--s2); display: block; }
.res-ms { border: var(--hair) solid var(--line-strong); border-radius: var(--r); padding: var(--s3); margin-bottom: var(--s3); }
.res-ms.won { box-shadow: inset var(--index-w) 0 0 var(--signal); }
.res-ms-t { margin: var(--s1) 0 0; font-size: var(--t-body); font-weight: 500; color: var(--text); }
.res-ms-d { margin: var(--s1) 0 var(--s2); font-size: var(--t-sm); color: var(--text-2); }
.res-ms .act-btn { height: 40px; }
.res-det { border-top: var(--hair) solid var(--line); }
.res-det summary { padding: var(--s2) 0; cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: var(--s2); list-style: none; }
.res-det summary::-webkit-details-marker { display: none; }
.res-sum-n { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-3); }
.res-det summary::after { content: "+"; margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; border: var(--hair) solid var(--line-strong); border-radius: var(--r); font-family: var(--font-mono); color: var(--text-2); }
.res-det[open] summary::after { content: "\2212"; }
.res-det summary:hover .label, .res-det summary:hover::after { color: var(--text); }
.res-led { margin: 0 0 var(--s3); }
.res-led-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s2); padding: var(--s1) 0; border-top: var(--hair) solid var(--line); font-size: var(--t-xs); }
.res-led-row dt { color: var(--text-3); }
.res-led-row dd { margin: 0; color: var(--text-2); }
.res-grid { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: var(--s3) 2px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cell-min), 1fr)); gap: var(--s3); align-content: start; }
.res-grid-note { flex: none; margin: 0 0 var(--s2); font-size: var(--t-xs); color: var(--text-3); }
.res-cell { display: block; width: 100%; padding: 0; background: transparent; border: 0; text-align: left; border-radius: var(--r); }
.res-cell img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--black); outline: var(--hair) solid var(--line); }
.res-cell:hover img { outline-color: var(--text-2); }
.res-cell .res-cap { margin-top: var(--s1); }
.res-empty { margin: var(--s5) 0; color: var(--text-2); }
.res-set2 { display: none; }
/* Change 6 of 6 (Nov 20, 2026): the one next step, a single line under the photo (result.js fitNext picks the longest
   wording that fits). A fix carries the signal index; what worked is plain text. */
.res-next { flex: none; margin: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--t-md); line-height: 1.4; font-weight: 500; color: var(--text); padding-left: var(--s2); box-shadow: inset var(--index-w) 0 0 var(--line-strong); }
.res-next-fix, .res-next-cant { box-shadow: inset var(--index-w) 0 0 var(--signal); }
/* Review fix (Nov 19): on desktop (and the wide stack, audit 2) the result is camera playback. It covers the stage and the rail (the rail is idle
   while it is open); the photo sits exactly where the live picture was, at the same size, and the verdict, Try this
   and the head take the rail's column. Compare sits under the photo, one short block, only from the second shot. */
@media (min-width: 1024px) and (min-height: 600px), (pointer: fine) and (min-width: 700px) and (min-aspect-ratio: 5/4) {
  .res { grid-area: 2 / 1 / 3 / 3; display: grid; grid-template-columns: minmax(0, 1fr) var(--dock-w, var(--rail-w)); grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "left head" "left side"; padding: 0; column-gap: 0; }
  .res[data-view="sheet"] { display: flex; padding: 0 var(--stage-pad) var(--s3); }
  .res-body { display: contents; }
  /* Audit 2 (ui-audit P2-6): Back leads the head, the shot's name and All shots under it, then the settings. */
  .res[data-view="shot"] .res-head { grid-area: head; height: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "back card nav" "h h all" "set set set"; align-items: center; column-gap: var(--s2); row-gap: var(--s1); padding: var(--s2) var(--s4) var(--s2); border-left: var(--hair) solid var(--line); background: var(--ground); }
  .res[data-view="shot"] .res-back { grid-area: back; justify-self: start; }
  .res[data-view="shot"] .res-h { grid-area: h; }
  .res[data-view="shot"] .res-nav { grid-area: nav; }
  .res[data-view="shot"] .res-head > .res-quiet { grid-area: all; }
  .res[data-view="shot"] .res-set { grid-area: set; white-space: normal; font-size: var(--t-xs); }
  .res[data-view="shot"] .res-long { display: none; }
  .res-left { grid-area: left; align-items: center; padding: var(--pic-top) var(--s2) var(--s2); gap: var(--s2); overflow: hidden; }   /* 8 px sides as the stage (fix pass, Nov 20, 2026): the photo is as wide as the live picture */
  .res-photo { flex: none; width: var(--pic-w); height: var(--pic-h); max-width: 100%; justify-content: center; }
  .res-photo .res-fig { height: 100%; align-items: center; }
  .res-photo:not(.two) .res-img { width: 100%; height: 100%; max-height: none; }
  .res-photo.two .res-img { max-height: calc(100% - 22px); }
  .res-next { width: var(--pic-w); }
  .res-side .res-next.in-side { width: auto; margin-bottom: var(--s3); }
  .res-cmp { width: var(--pic-w); max-width: 100%; border-top: 0; padding-top: 0; }
  .res-cmp-row { margin-top: var(--s1); }
  .res-tn { width: auto; height: calc(var(--strip-h) - 4px); }
  .res-tn img { height: 100%; width: auto; }
  .res-tn .res-cap { display: none; }
  .res-chg { column-count: 2; column-gap: var(--s5); max-width: 640px; }
  .res-chg li + li { margin-top: 0; }
  .res-chg li:nth-child(n+5) { display: none; }
  .res-cmp-h .res-sel, .res-cmp-h .res-quiet { height: 32px; }
  .res-tn:first-child + .res-tn { display: none; }      /* the big photo is this shot: only the previous one as a thumb */
  .res-side { grid-area: side; padding: var(--s3) var(--s4) var(--s3); border-left: var(--hair) solid var(--line); background: var(--ground); }
  /* Change 5 of 6 (Nov 20, 2026): this column is the dock's width (304 px at 1440 x 900 now); the verdict wraps longer
     there, so Try this stays pinned at the column's foot, Apply always in view (as on the phone); the rows scroll above it. */
  .res-side .res-try { position: sticky; bottom: calc(-1 * var(--s3)); z-index: 1; background: var(--ground); padding-bottom: var(--s3); }
  .res-side .res-try::before { background: linear-gradient(to bottom, transparent, var(--ground)); }
}

/* ================================================================ .ms- Missions mode (builder 3) */
.ms-drawn { display: block; margin-top: 2px; color: var(--text-3); }
.app.in-mission .strip { height: var(--strip-h-ms); }
.app.in-mission .strip-k, .app.in-mission .strip-empty, .app.in-mission .strip-list { display: none; }
.ms-bar { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; grid-template-areas: "head hint btn" "goal hint btn"; column-gap: var(--s4); row-gap: 2px; align-content: center; align-items: start; }
.ms-bar-head { grid-area: head; display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.ms-k { color: var(--text-2); white-space: nowrap; }
.ms-meter { position: relative; display: block; width: var(--ms-meter-w); height: var(--ms-meter-h); background: var(--line-strong); flex: none; }
.ms-meter > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--text); }
.ms-goal-line { grid-area: goal; margin: 0; font-size: var(--t-sm); line-height: 1.35; color: var(--text-2); }
.ms-t { font-size: var(--t-md); font-weight: 500; color: var(--text); }
.ms-hintx { grid-area: hint; margin: 0; align-self: center; font-size: var(--t-sm); line-height: 1.35; color: var(--text); border-left: var(--hair) solid var(--line); padding-left: var(--s3); }
.ms-hint { grid-area: btn; align-self: center; height: 40px; min-width: 96px; padding: 0 var(--s4); background: transparent; border: var(--hair) solid var(--line-strong); border-radius: var(--r); font-size: var(--t-sm); color: var(--text); white-space: nowrap; }
.ms-hint:hover { background: var(--raised); }
.ms-hint:active { transform: scale(0.97); }
.ms-hint[data-step="next"] { background: var(--silver); border-color: var(--silver); }
.sim-app .ms-hint[data-step="next"] { color: var(--ink); }
.ms-top { display: grid; gap: var(--s2); margin-bottom: var(--s2); }
.ms-prog { color: var(--text-2); }
.ms-top .ms-meter { width: 100%; }
.ms-lede { margin: var(--s1) 0 0; }
.ms-go { height: var(--tap-min); width: 100%; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.ms-g { margin-top: var(--s3); }
.ms-list { list-style: none; margin: 0; padding: 0; }
.ms-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 12px; gap: var(--s2); align-items: start; width: 100%; min-height: 52px; padding: var(--s2) var(--s1); text-align: left; background: transparent; border: 0; border-bottom: var(--hair) solid var(--line); }
.ms-row:hover { background: var(--raised); }
.ms-row.cur { box-shadow: inset var(--index-w) 0 0 var(--signal); background: var(--raised); }
.ms-n { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-3); padding-top: 2px; text-align: right; }
.ms-tx b { display: block; font-weight: 500; font-size: var(--t-md); color: var(--text); }
.ms-bl { display: block; font-size: var(--t-xs); color: var(--text-2); line-height: 1.4; }
.ms-mk { width: 10px; height: 10px; margin-top: 4px; border: var(--hair) solid var(--line-strong); }
.ms-row.done .ms-mk { background: var(--text); border-color: var(--text); }

/* ================================================================ .sheet- phone polish (builder 3) */
@media (max-width: 699px), (max-width: 1023px) and (pointer: coarse), (max-height: 599px) and (pointer: coarse), (max-width: 1023px) and (pointer: none), (max-height: 599px) and (pointer: none), (max-width: 1023px) and (max-aspect-ratio: 1249/1000), (max-height: 599px) and (max-aspect-ratio: 1249/1000) {
  .res { position: fixed; z-index: 45; top: var(--bar-h); left: 0; right: 0; bottom: 0; padding: 0 var(--s4) 0; overflow-y: auto; overscroll-behavior: contain; display: block; }
  .res-head { position: sticky; top: 0; z-index: 2; background: var(--stage); gap: var(--s2); padding-top: var(--s2); touch-action: none; }
  .res-head::before { content: ""; position: absolute; left: 50%; top: 4px; width: var(--grab-w); height: var(--grab-h); margin-left: calc(var(--grab-w) / -2); border-radius: var(--round); background: var(--line-strong); }
  .res-set { display: none; }
  .res-arrow, .res-quiet, .res-back, .res-head > .res-card { min-width: var(--tap-min); height: var(--tap-min); }
  .res-nav { margin-left: auto; }
  .res-back .gpanel-esc, .res-long { display: none; }
  .res-body { display: block; padding-top: 0; }
  .res-photo { margin: 0 calc(-1 * var(--s4)); display: block; }
  .res-photo.two { display: flex; }
  .res-fig { height: auto; }
  .res-img { width: 100%; max-height: none; outline: 0; }
  .res-next { margin-top: var(--s3); }
  .res-set2 { display: block; margin: var(--s2) 0 0; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-2); }
  .res-side { overflow: visible; padding: 0; }
  .res-side > .res-k:first-of-type { margin-top: var(--s3); }
  .res-try { position: sticky; bottom: 0; background: var(--stage); padding-bottom: var(--s3); z-index: 1; }
  .res-try::before { background: linear-gradient(to bottom, transparent, var(--stage)); }
  .res-apply, .res-ms .act-btn, .res-sel, .res-cmp-h .res-quiet { height: var(--tap-min); }
  .res-cmp { margin-top: var(--s3); }
  .res-cmp-row { flex-wrap: wrap; }
  .res-tn { width: calc(50% - var(--s3) / 2); }
  .res-chg { flex-basis: 100%; }
  .res-det summary { min-height: var(--tap-min); }
  .res-grid { overflow: visible; }
  .res-cell { min-height: var(--tap-min); }

  .ms-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head btn" "goal goal" "hint hint"; padding: var(--s2) 0 var(--s2); border-bottom: var(--hair) solid var(--line); row-gap: var(--s1); }
  .ms-hint { height: var(--tap-min); }
  .ms-hintx { border-left: 0; padding-left: 0; }
  .ms-meter { width: 64px; }
  .ms-row { min-height: var(--tap-min); }

  /* Bottom sheets: a grab bar, swipe down on the head to close (sheets.js), a visible press state (UX-18). */
  .gpanel-head { position: relative; }
  .gpanel-head::before { content: ""; position: absolute; left: 50%; top: 4px; width: var(--grab-w); height: var(--grab-h); margin-left: calc(var(--grab-w) / -2); border-radius: var(--round); background: var(--line-strong); }
  .gpanel.dragging { animation: none; transition: none; }
  .sim-app button:active:not(:disabled) { background-color: var(--raised); }
  .gear-btn:active, .ms-row:active, .res-cell:active { transform: scale(0.97); }
  .act-btn:active { background: var(--silver); transform: scale(0.97); }
}
/* Touch tablet, 768 to 1023 wide: the dials in two columns under a picture capped at 60 percent of the height. */
@media (min-width: 768px) and (max-width: 1023px) and (min-height: 600px) and (pointer: coarse) {
  .deck { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s5); align-content: start; }
  .deck > .ms-bar, .deck .gear { grid-column: 1 / -1; }
  .deck > .why { grid-row: span 1; }
}
/* A phone on its side: the picture on the left at full height, the controls on the right, the shutter bottom right.
   Touch only (audit 2): a short mouse window gets the wide stack instead. */
@media (orientation: landscape) and (max-height: 599px) and (pointer: coarse) {
  .app { grid-template-columns: var(--frame-w, 60vw) minmax(0, 1fr); grid-template-rows: var(--bar-h) minmax(0, 1fr); grid-template-areas: "bar bar" "stage rail"; }
  .stage { height: 100%; }
  .readout { height: auto; min-height: var(--readout-h); }
  .rail { border-left: var(--hair) solid var(--line); }
  .gpanel { top: var(--bar-h); left: var(--frame-w, 60vw); }
  .res-photo { margin: 0; }
  .res-img { max-height: 70vh; width: auto; margin: 0 auto; }
  .gear-v { overflow-wrap: normal; word-break: normal; }   /* audit 2: break between words, never inside "Sidewalk" */
}

/* Review fix (Nov 19): under 380 px wide the title is read by screen readers only and the mode switch narrows, so the
   menu button stays on screen at 320 and 360 px. */
@media (max-width: 379px) {
  .bar-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
  .seg button { width: 72px; }
}

/* ================================================================ stacks (audit 2, Nov 19, 2026; BLUEPRINT 1.5 amended) */
/* The wide stack: the desktop rail, compact, for a mouse at 700 to 1023 px wide or under 600 px tall (800 x 567: the
   picture about 40 percent of the window, all three dials and the five gear rows on screen). The why line is read by
   screen readers only here; its words are on the mode switch's tooltip. */
@media (pointer: fine) and (min-width: 700px) and (max-width: 1023px) and (min-aspect-ratio: 5/4), (pointer: fine) and (min-width: 700px) and (max-height: 599px) and (min-aspect-ratio: 5/4) {
  .bar { gap: var(--s3); }
  .bar-title { font-size: var(--t-md); padding-right: var(--s3); }
  .seg button { min-width: 92px; }
  .why { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
  .gear-k, .gear-key { display: none; }
  .deck { overflow-y: auto; scrollbar-width: thin; }
  .dial-head { height: 20px; }
  .gear-v { font-size: var(--t-xs); }
  .mode-sw button { font-size: var(--t-xs); }
  .hud-top { font-size: var(--t-xs); gap: var(--s2); padding: 0 var(--s2); }
  .hud-bot { font-size: var(--t-micro); gap: var(--s2); padding: 0 var(--s2); }
  .hud-nums { display: none; }
  .hud-dof { font-size: var(--t-micro); }
  .readout-text { font-size: var(--t-sm); }
  .shoot-t { font-size: var(--t-md); }
  .strip-empty { padding: 0 var(--s3); font-size: var(--t-xs); }
}
@media (pointer: fine) and (min-width: 700px) and (max-width: 899px) and (min-aspect-ratio: 5/4) {
  .bar-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
}
/* The tall stack: a mouse at 700 to 1023 px in a window narrower than 5:4 (800 x 900). The picture on top takes what is
   left (ui-core.js layout), then the dials in the left column and the five gear rows in the right one. A panel opens as a
   sheet over the right column only, so the dials stay in view. */
@media (pointer: fine) and (min-width: 600px) and (max-width: 1023px) and (max-aspect-ratio: 1249/1000), (pointer: fine) and (min-width: 600px) and (max-width: 699px) {
  .deck { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s4); row-gap: 0; align-content: start; padding: var(--s2) var(--s4); }
  .deck > *, .dk-exp-body > * { grid-column: 1; }
  .deck .gear { grid-column: 2; grid-row: 1 / span 5; align-self: start; }
  .deck > .ms-bar { grid-column: 1 / -1; }
  .why { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
  .gear { flex-direction: column; margin-top: 0; border-bottom: 0; }
  .gear-btn { flex: none; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--s2); height: 40px; padding: 0 var(--s2); text-align: left; border-bottom: var(--hair) solid var(--line); }   /* 40 (was 44): six rows beside the dials (ui:dock slice) */
  .dk-h + .dk-h > .gear-btn { border-left: 0; }
  .gear-l { flex: none; font-size: var(--t-label); letter-spacing: var(--track-label); overflow: visible; }
  .gl-long { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
  .gl-short { display: none; }
  .gear-v { white-space: nowrap; text-overflow: ellipsis; }
  .gear-v .gv-sep, .gear-v .gv-p, .gear-v .gv-p[data-i], #gv-scene .gv-p[data-i="0"] { display: inline; white-space: nowrap; }
  .gear-v { flex: 1; display: block; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: none; }
  .gear-btn[aria-expanded="true"] { box-shadow: inset var(--index-w) 0 0 var(--signal); }
  .gpanel { left: 50%; bottom: var(--shoot-h); border-left: var(--hair) solid var(--line-strong); }   /* the shutter stays in reach */
}

/* Audit 2 (ui-audit P2-3): the rail never re-flows between modes. Exp. comp keeps its slot (hidden where it does
   nothing) and the gear list sits on the shutter block, so a mode change moves nothing. */
@media (min-width: 1024px) and (min-height: 600px), (pointer: fine) and (min-width: 700px) and (min-aspect-ratio: 5/4) {
  .deck { flex: 1; }
  .comp.off { display: grid; visibility: hidden; }
  .gear-k { margin-top: auto; }
}
@media (min-width: 1024px) and (min-height: 600px) and (max-height: 799px) {
  .gear { margin-top: auto; }
}
@media (pointer: fine) and (min-width: 700px) and (max-width: 1023px) and (min-aspect-ratio: 5/4), (pointer: fine) and (min-width: 700px) and (max-height: 599px) and (min-aspect-ratio: 5/4) {
  .gear { margin-top: auto; }
}

/* ================================================================ audit 2 additions (Nov 19, 2026) */
/* Light and scene: lights that move you to another place sit under a heading that names it. */
.pk-away-k { margin: var(--s3) 0 var(--s1); color: var(--text-3); text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: var(--t-xs); }
.pk-away-k::before { content: "\2192\00a0"; color: var(--text-3); }
.pk-chip.pk-away { border-style: dashed; }
/* Camera panel: a camera that is not here, and the nearest one that is. */
.pk-miss { margin: var(--s3) 0 0; padding: var(--s3); border: var(--hair) solid var(--line-strong); border-radius: var(--r); }
.pk-miss-t { margin: 0 0 var(--s2); font-size: var(--t-sm); color: var(--text); }
.pk-current .pk-gh .label { color: var(--text-2); }
/* The camera text explains itself on hover (titles); clicks still reach the picture underneath. */
.hud-top > span, .hud-scale, .hud-dof { pointer-events: auto; cursor: help; }

/* ================================================================ .dk- .ov- the workspace (ui:dock slice, Nov 19, 2026) */
/* audit-2/workspace-layout.md 3 to 7. One right-hand dock on the rail and the wide stack: the Exposure section (mode, the
   three dials, Exp. comp) on top, folding to one line; the six gear panels below as headers that open IN the dock, so the
   dials never hide; the shutter pinned at the bottom. The overlay toggles sit in the top bar. The phone and the tall
   stack keep their sheets: there the dock's wrappers are display: contents and change nothing. */
.dk-h, .dk-exp-hh { margin: 0; font: inherit; }
.dk-exp-hh, .dk-grip, .ov, .gpanel-max { display: none; }
.dk-chev { display: none; flex: none; width: 6px; height: 6px; margin: 0 3px 2px var(--s1); border-right: var(--hair) solid var(--text-3); border-bottom: var(--hair) solid var(--text-3); transform: rotate(-45deg); transition: transform var(--d-ui) var(--ease); }
[aria-expanded="true"] > .dk-chev { transform: rotate(45deg); margin-bottom: 4px; }
@media (max-width: 699px), (max-width: 1023px) and (pointer: coarse), (max-height: 599px) and (pointer: coarse), (max-width: 1023px) and (pointer: none), (max-height: 599px) and (pointer: none), (max-width: 1023px) and (max-aspect-ratio: 1249/1000), (max-height: 599px) and (max-aspect-ratio: 1249/1000) {
  .dk-exp, .dk-exp-body, .dk-scroll, .dk-h { display: contents; }
  .dk-pill { display: none; }
}

@media (min-width: 1024px) and (min-height: 600px), (pointer: fine) and (min-width: 700px) and (min-aspect-ratio: 5/4) {
  /* ---- the top bar's overlay toolbar ---- */
  .ov { display: flex; align-items: center; gap: 2px; height: var(--ov-h); padding: 0 2px; margin-left: var(--s2); border: var(--hair) solid var(--line); border-radius: var(--r); flex: none; }
  .ov-grp { display: flex; align-items: center; }
  .ov-btn { position: relative; display: grid; place-items: center; width: var(--ov-btn); height: calc(var(--ov-h) - 6px); padding: 0; background: transparent; border: 0; border-radius: var(--r-tag); color: var(--text-3); transition: color var(--d-click) linear, background-color var(--d-click) linear; }
  .ov-btn svg { display: block; }
  .ov-btn:hover { color: var(--text); background: var(--raised); }
  .ov-btn[aria-pressed="true"] { color: var(--text); background: var(--raised); }   /* on: lit and raised; the red stays for the one current mode */
  .ov-btn:active { transform: translateY(1px); }
  .ov-btn:focus-visible { outline-offset: 1px; }
  .ov-caret { width: 18px; margin-left: -1px; }
  .ov-caret[aria-pressed], .ov-caret { box-shadow: none; }
  .ov-caret[aria-expanded="true"] { color: var(--text); background: var(--raised); }
  .ov-sep { width: var(--hair); height: 16px; margin: 0 3px; background: var(--line-strong); }
  /* Tooltips name the key (layout 6): shown on hover and on keyboard focus, never covering the button itself. */
  .ov-btn[data-tip]:hover::after, .ov-btn[data-tip]:focus-visible::after, .gpanel-max[data-tip]:hover::after, .gpanel-max[data-tip]:focus-visible::after {
    content: attr(data-tip); position: absolute; z-index: 45; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    padding: 3px 8px; white-space: nowrap; background: var(--raised); color: var(--text); border: var(--hair) solid var(--line-strong); border-radius: var(--r);
    font-family: var(--font-sans); font-size: var(--t-xs); letter-spacing: 0; text-transform: none; line-height: 1.4; pointer-events: none; box-shadow: var(--shadow-pop); }
  .gpanel-max[data-tip]:hover::after, .gpanel-max[data-tip]:focus-visible::after { left: auto; right: 0; transform: none; }
  .grid-menu { width: 240px; }

  /* ---- the dock ---- */
  .deck { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0; padding: 0; min-height: 0; overflow: hidden; }
  .dk-exp { flex: none; display: flex; flex-direction: column; padding: 0 var(--rail-pad); }
  .dk-exp-body { display: flex; flex-direction: column; gap: var(--rail-gap); padding: var(--rail-pad) 0 var(--rail-gap); }
  .dk-scroll { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .gear { flex: none; margin-top: auto; border-top: var(--hair) solid var(--line); }
  .dk-h { flex: none; display: flex; align-items: center; padding: 0 var(--rail-pad); border-bottom: var(--hair) solid var(--line); transition: background-color var(--d-ui) var(--ease); }
  .dk-h:hover { background: var(--raised); }
  .dk-h .gear-btn { flex: 1 1 auto; min-width: 0; border-bottom: 0; background: transparent; }
  .dk-h .gear-btn:hover { background: transparent; }
  .dk-h .gear-btn[aria-expanded="true"] { background: transparent; box-shadow: none; }
  .dk-h.open { background: var(--raised); box-shadow: inset var(--index-w) 0 0 var(--signal); }
  .dk-h .dk-chev, .dk-exp-h .dk-chev { display: inline-block; }
  .dk-h:hover .dk-chev, .dk-h.open .dk-chev { border-color: var(--text); }
  /* Key hints only while the pointer or the keyboard is in the dock: the resting screen stays quiet (layout 4.1). */
  .dk-h .gear-key { visibility: hidden; }
  .rail:hover .dk-h .gear-key, .rail:focus-within .dk-h .gear-key { visibility: visible; }
  .dk-h .gear-v { padding-left: var(--s2); }
  .dk-h.open .gear-v, .dk-h.open .gear-key { display: none; }   /* the open header carries its tools instead */

  /* the Exposure header (the rail only; the wide stack is too short for one more row) */
  html[data-layout="rail"] .dk-exp-hh { display: block; }
  html[data-layout="rail"] .dk-exp-body { padding-top: var(--rail-gap); }
  .dk-exp-h { display: flex; align-items: center; gap: var(--s2); width: 100%; height: var(--dk-head); padding: 0; background: transparent; border: 0; border-bottom: var(--hair) solid var(--line); text-align: left; }
  .dk-exp-l { flex: none; }
  .dk-exp-sum { flex: 1 1 auto; min-width: 0; text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--t-xs); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; visibility: hidden; }
  .dk-exp-h:hover .dk-exp-l { color: var(--text); }
  .dk-exp-h:hover .dk-chev { border-color: var(--text); }
  .dk-exp-h:focus-visible { outline-offset: -2px; }
  html[data-layout="rail"] .dk-exp.folded .dk-exp-body { display: none; }
  .dk-exp.folded .dk-exp-sum { visibility: visible; color: var(--text); }
  .dk-exp.folded .dk-exp-h { border-bottom-color: var(--line); }

  /* the grip on the dock's left edge (the rail only) */
  html[data-layout="rail"] .dk-grip { display: block; position: absolute; z-index: 27; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; touch-action: none; }
  .dk-grip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background-color var(--d-ui) var(--ease); }
  .dk-grip:hover::after, .dk-grip.drag::after { background: var(--line-strong); }
  .dk-grip:focus-visible { outline-offset: -2px; }
  .app.dk-resizing, .app.dk-resizing * { cursor: col-resize !important; user-select: none; }

  /* a panel open in the dock (panels.js place()): the panel fills the room between the headers above and below it */
  .rail.dk-open .gear { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-top: var(--s2); }
  .rail.dk-open .dk-h .gear-btn { height: var(--gear-h-open); }
  .gpanel.docked { position: relative; z-index: auto; top: auto; right: auto; bottom: auto; width: auto; flex: 0 1 auto; min-height: 132px; border: 0; border-bottom: var(--hair) solid var(--line); background: var(--ground); animation: dk-in var(--d-ui) var(--ease); }
  @keyframes dk-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
  .gpanel.docked .gpanel-head { display: none; }
  .gpanel.docked .gpanel-body { padding: var(--s3) var(--rail-pad) var(--s5); }
  .gpanel.docked .pk-search { margin-left: calc(-1 * var(--rail-pad)); margin-right: calc(-1 * var(--rail-pad)); padding-left: var(--rail-pad); padding-right: var(--rail-pad); background: var(--ground); }
  .gpanel.docked .pk-gh { background: var(--ground); }
  .dk-h .gpanel-tools { display: flex; align-items: center; gap: var(--s1); flex: none; margin-left: var(--s2); }
  .dk-h .gpanel-max { position: relative; display: grid; place-items: center; width: var(--dk-tool); height: var(--dk-tool); padding: 0; background: transparent; border: var(--hair) solid var(--line-strong); border-radius: var(--r); color: var(--text-2); }
  .dk-h .gpanel-max:hover, .dk-h .gpanel-max[aria-pressed="true"] { color: var(--text); background: var(--panel); }
  .dk-h .gpanel-max[aria-pressed="true"] svg { transform: rotate(180deg); }
  .rail.dk-auto-max .dk-h .gpanel-max { display: none; }
  .dk-h .gpanel-done { height: var(--dk-tool); min-width: 0; padding: 0 var(--s2); font-size: var(--t-xs); }
  .dk-h .gpanel-done:hover { background: var(--panel); }
  .dk-h .gpanel-esc { display: none; }
  /* the mission list has no header of its own: it opens tall at the top of the dock with its title and Done */
  .gpanel.docked[data-panel="missions"] .gpanel-head { display: flex; height: var(--gp-head); background: var(--panel); }
  .rail.dk-open .gear:not(:has(.dk-h.open)) { display: none; }
  /* tall (maximize): the other headers step aside */
  .rail.dk-max .dk-h:not(.open) { display: none; }
  .rail.dk-max .gear { margin-top: 0; }
  .rail.dk-max .gpanel.docked { flex: 1 1 0; }
  /* a short panel (Focus in AF) is as tall as its content (.gpanel.docked flex 0 1 auto above); the headers below follow
     it. A panel registered fit: true whose content does not fit opens tall instead (panels.js fitCheck, fix pass). */

  /* compact density while a panel is open: every dial one 40 px row, the why line on the Exposure header's tooltip */
  .deck.compact { --dial-px: var(--dial-px-compact); }
  .deck.compact .dk-exp-body { gap: 0; padding-bottom: var(--s1); }
  .deck.compact .why { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
  .deck.compact .mode-sw { height: var(--dk-tool); margin-bottom: var(--s1); }
  .deck.compact .dial { height: var(--dial-h-compact); flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--s2); }
  .deck.compact .dial-head { display: contents; }
  .deck.compact .dial-label { flex: none; width: var(--dk-label-w); order: 0; }
  .deck.compact .dial-row { order: 1; flex: 1 1 auto; min-width: 0; }
  .deck.compact .dial-tag { display: none; }   /* AUTO shows as the dimmed value (.dial.ro); the tape gets the room */
  .deck.compact .dial-val { order: 3; flex: none; min-width: 60px; font-size: var(--t-body); }
  .deck.compact .dial.on .dial-val, .deck.compact .dial.held .dial-val { font-size: var(--t-val); }
  .deck.compact .dial-step { width: 22px; height: 22px; }
  .deck.compact .comp { height: 32px; grid-template-rows: 1fr; padding-top: 0; }
  .deck.compact .comp-note { display: none; }
  .deck.compact .comp.off { display: none; }

  /* ---- hide panels (key 0): the picture takes the whole stage ---- */
  .app.panels-hidden { grid-template-columns: minmax(0, 1fr) 0; }
  .app.panels-hidden .rail { position: fixed; z-index: 35; top: var(--bar-h); right: 0; bottom: 0; width: var(--dock-w, var(--rail-w)); transform: translateX(100%); transition: transform var(--d-ui) var(--ease); border-left: var(--hair) solid var(--line-strong); box-shadow: var(--shadow-pop); visibility: hidden; }
  .app.panels-hidden.dk-reveal .rail { transform: none; visibility: visible; }
  .app.panels-hidden .dk-grip { display: none; }
  .app.panels-hidden .strip { display: none; }
  /* Change 5 of 6 (Nov 20, 2026): no empty "Your shots land here" box before the first shot; the picture takes the room.
     The strip comes in with the first shot (shoot.js clears .no-shots). A mission's bar still holds this place. */
  /* Fix pass (Nov 20, 2026; critic P2): the strip's place is kept (invisible) so the picture is the same size and in the
     same place before and after the first shot; it no longer jumps when the strip comes in. */
  .app.no-shots:not(.in-mission) .strip { visibility: hidden; }
  /* Less dead space: 8 px sides (was 16, 12 on the wide stack), and when the window's shape leaves height over (the
     picture is as wide as it can be), the picture and its readout line sit in the middle of the stage, not on top of an
     empty band (ui-core.js layout() sets --frame-mt to half the height left over, in whole pixels so the photo stays
     sharp). dock.js lets the automatic dock go down to 304 px (was 320) so the picture gets that width first. */
  .stage { padding-left: var(--s2); padding-right: var(--s2); }
  .frame { margin-top: var(--frame-mt, 0px); }
  .app.panels-hidden .stage { position: relative; }
  /* the readout line becomes a pill over the picture, and only while it has something new to say */
  .app.panels-hidden .readout { position: absolute; z-index: 5; left: 50%; bottom: calc(var(--pic-top) + var(--hud-bot-h) + var(--s3)); transform: translateX(-50%); width: auto; max-width: min(760px, calc(100% - 64px)); height: auto; min-height: 32px; margin: 0; padding: var(--s1) var(--s3); background: var(--tag-bg); border: var(--hair) solid var(--line-strong); border-radius: var(--r); visibility: hidden; }
  .app.panels-hidden .readout:has(.readout-text.note) { visibility: visible; }
  .app.panels-hidden .readout-text { color: var(--hud-text); }
  .dk-pill { position: fixed; z-index: 34; right: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: var(--s2); height: var(--dk-pill-h); padding: 0 var(--s2) 0 var(--s3); background: var(--panel); color: var(--text-2); border: var(--hair) solid var(--line-strong); border-right: 0; border-radius: var(--r) 0 0 var(--r); font-size: var(--t-xs); white-space: nowrap; }
  .dk-pill:hover { color: var(--text); background: var(--raised); }
  .dk-pill-k { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-3); border: var(--hair) solid var(--line); border-radius: var(--r-tag); padding: 0 4px; line-height: 16px; }
}
/* Compact rows with a mouse: the minus and plus go (drag, wheel, arrows and a click on a number turn the dial), so the
   tape keeps its room. Touch keeps them. */
@media (min-width: 1024px) and (min-height: 600px) and (hover: hover) and (pointer: fine), (pointer: fine) and (hover: hover) and (min-width: 700px) and (min-aspect-ratio: 5/4) {
  .deck.compact .dial .dial-step { display: none; }
}
@media (pointer: fine) and (min-width: 700px) and (max-width: 1023px) and (min-aspect-ratio: 5/4), (pointer: fine) and (min-width: 700px) and (max-height: 599px) and (min-aspect-ratio: 5/4) {
  :root { --dk-label-w: 56px; }
  .deck.compact .dial-val { min-width: 48px; font-size: var(--t-sm); }
  .deck.compact .dial.on .dial-val, .deck.compact .dial.held .dial-val { font-size: var(--t-body); }
}
/* The bar has room for the toolbar from 1280 px; below that the title is read by screen readers only (layout 4.3). */
@media (min-width: 1024px) and (max-width: 1279px) and (min-height: 600px) {
  .bar-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
}
/* Under 760 px wide the toolbar does not fit the bar: the View menu has every overlay. */
@media (max-width: 759px) { .ov { display: none !important; } }
.pic.no-af .pic-af { display: none; }

/* ======================================================================================================
   ui:focus slice (Nov 19, 2026): the focus marks, focus peaking, the 100% view and the result's 100% inset.
   The marks are hairlines in the HUD white with the grid shadow; the signal red marks the moment the camera picks
   something (600 ms), a distance AF-S is holding (steady), and a DSLR's lit AF points, as on a Canon viewfinder.
   ====================================================================================================== */
.pic-af { z-index: 1; }
.pic-af.k-eye, .pic-af.k-face, .pic-af.k-spot, .pic-af.k-track { border-width: 1.5px; }
.pic-af.held { border-color: var(--signal); }
.pic-af.circle { border-radius: 50%; }
.pic-af.k-spot::after, .pic-af.k-track::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: currentColor; color: var(--hud-text); border-radius: 50%; }
.pic-af.k-mf { border-style: dashed; }
.pic-af.lost { animation: hud-blink 0.5s steps(1) 3; }
.pic-afz { position: absolute; z-index: 1; pointer-events: none; }
.pic-afz .zc { position: absolute; width: 12px; height: 12px; border: 0 solid var(--hud-text); filter: drop-shadow(0 0 1px var(--grid-shadow)); }
.pic-afz.held .zc { border-color: var(--signal); }
.pic-afz .tl { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; }
.pic-afz .tr { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
.pic-afz .bl { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.pic-afz .br { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }
.pic-afpts { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.pic-afpts .afpt { position: absolute; transform: translate(-50%, -50%); border: 1.5px solid var(--signal); box-shadow: 0 0 0 var(--hair) var(--grid-shadow); }
.pic-afpts .afpt.dim { border-width: 1px; opacity: 0.45; box-shadow: none; }
.pic.no-af .pic-afz, .pic.no-af .pic-afpts { display: none; }
.pic.is-loading .pic-afz, .pic.is-loading .pic-afpts, .pic.is-loading .pic-peak, .pic.is-loading .pic-loupe { visibility: hidden; }
.pic-peak { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.pic.loupe-on { cursor: crosshair; }
.pic-loupe { position: absolute; z-index: 3; pointer-events: none; }
.loupe-ring { position: relative; border-radius: 50%; overflow: hidden; background: var(--black); border: var(--hair) solid var(--hud-text); box-shadow: 0 0 0 1px var(--grid-shadow), var(--shadow-pop); }
.loupe-c { display: block; }
.loupe-tick { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: var(--hair) solid var(--hud-text); border-radius: 50%; box-shadow: 0 0 0 var(--hair) var(--grid-shadow); opacity: 0.7; }
.loupe-msg { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: var(--s4); text-align: center; font-size: var(--t-xs); line-height: 1.4; color: var(--hud-text); }
.loupe-cap { margin: var(--s1) auto 0; width: max-content; max-width: 100%; padding: 1px 6px; font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: 0.02em; color: var(--hud-text); background: var(--tag-bg); text-align: center; }
/* Change 4 of 6 (Nov 20, 2026): the toolbar's icons carry a visible name. The label is the button's accessible name (no
   aria-label), so what is seen and what is read always match. On the desktop layout (1024 x 600 and up) it sits under
   the icon; on the narrower wide stack (44 px bar) it is read by screen readers only and the tooltip (which names the
   key) does the naming. Under 760 px the toolbar is hidden and the View menu has every item. */
.ov-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
@media (min-width: 1024px) and (min-height: 600px) {
  :root { --ov-h: 42px; }
  .ov { gap: 1px; }
  .ov-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: auto; min-width: var(--ov-btn); padding: 0 6px; }
  .ov-caret { min-width: 18px; width: 18px; padding: 0; }
  .ov-lbl { position: static; width: auto; height: auto; overflow: visible; clip: auto; margin: 0; white-space: nowrap;
    font-family: var(--font-sans); font-size: var(--t-label); line-height: 14px; letter-spacing: 0; text-transform: none; }
}
/* 1024 to 1279 wide: the same labels with tighter sides, so View, Reset, Share and About stay inside the bar. */
@media (min-width: 1024px) and (max-width: 1279px) and (min-height: 600px) {
  .ov-btn { padding: 0 3px; }
  .ov-caret { padding: 0; }
}
/* fix pass (Nov 19, 2026): on a short docked screen the Focus panel's explanations step aside (they stay as tooltips and
   descriptions) so every choice fits without scrolling; the maker's name and a fall back reason stay. */
@media (max-height: 760px) {
  .gpanel.docked .pk-expl { display: none; }
  .gpanel.docked[data-panel="focus"] .pk-sec { padding-top: var(--s2); padding-bottom: var(--s1); }
  .gpanel.docked[data-panel="focus"] .pk-sh { margin-bottom: var(--s1); }
}
.pk-maker { color: var(--text); }
.gpanel-body.more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
.pk-why { margin: var(--s3) 0 0; padding: var(--s2) var(--s3); border-left: var(--index-w) solid var(--signal); background: var(--raised); color: var(--text); }
.res-inset { margin: var(--s2) 0 0; }
.res-inset img { display: block; width: 128px; height: 128px; border: var(--hair) solid var(--line-strong); image-rendering: auto; }
.res-inset-cap { margin: var(--s1) 0 0; font-size: var(--t-micro); color: var(--text-3); }
@media (prefers-reduced-motion: reduce) { .pic-af.lost { animation: none; border-style: dashed; } }
/* Change 2 of 6 (Nov 20, 2026): eye AF must be obvious. The eye (and face) box is a Sony-style frame: 2 px, a dark ring
   inside and out so it reads on any background, white while the camera acquires (it closes in from a larger frame),
   then green while focus is locked, in AF-C as in AF-S. The other marks keep the hairline and the signal red. */
.pic-af.k-eye, .pic-af.k-face, .pic-af.k-eye.held, .pic-af.k-face.held { border: var(--af-eye-w) solid var(--af-ok); box-shadow: 0 0 0 var(--hair) var(--af-ring), inset 0 0 0 var(--hair) var(--af-ring); }
.pic-af.k-eye.lock, .pic-af.k-face.lock { border-color: var(--af-ok); animation: af-acquire var(--d-acquire) ease-out both; }
.pic-af.k-eye.lost, .pic-af.k-face.lost { border-color: var(--hud-text); }
@keyframes af-acquire {
  0% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; border-color: var(--hud-text); }
  25% { opacity: 1; }
  55% { transform: translate(-50%, -50%) scale(1); border-color: var(--hud-text); }
  70%, 100% { transform: translate(-50%, -50%) scale(1); border-color: var(--af-ok); }
}
@media (prefers-reduced-motion: reduce) { .pic-af.k-eye.lock, .pic-af.k-face.lock { animation: none; border-color: var(--hud-text); } }
/* ui:focus slice: the View menu gained Focus peaking and 100% view, so one column no longer fits under 1080 px tall
   (992 px of items in an 826 px menu at 1440 x 900, the last items scrolled out of reach): two columns there too. */
@media (min-width: 1024px) and (min-height: 600px) and (max-height: 1079px) {
  #view-menu { columns: 2; column-gap: 0; width: calc(var(--menu-w) * 2 - 40px); }
  #view-menu .menu-k, #view-menu .menu-item, #view-menu .menu-group { break-inside: avoid; }
  #view-menu .menu-k:not(:first-child) { margin-top: 0; }
}

/* ================================================================ real estate places (real estate slice, interface half, Nov 22, 2026)
   Tripod (key 7) takes Flash's place in the dock there; the picture has a level, two tags and no focus marks. */
.dk-h[hidden], .gear-btn[hidden] { display: none !important; }
.pic.is-flat { cursor: grab; }
.pic.is-flat.dragging { cursor: grabbing; }
.pic.is-flat .pic-af, .pic.is-flat .pic-afz, .pic.is-flat .pic-afpts, .pic.is-flat .pic-cursor { display: none !important; }
.pic-level { position: absolute; left: 50%; top: 50%; width: 34%; height: 0; transform: translate(-50%, -50%); pointer-events: none; }
.pic-level .lv-ref { position: absolute; top: -1px; width: 14px; height: 2px; background: var(--hud-dim); box-shadow: 0 0 0 var(--hair) var(--grid-shadow); }
.pic-level .lv-ref-l { left: -22px; }
.pic-level .lv-ref-r { right: -22px; }
.pic-level .lv-bar { position: absolute; left: 0; right: 0; top: -1px; height: 2px; transform-origin: 50% 50%; transition: transform var(--d-click) linear; }
.pic-level .lv-line { position: absolute; inset: 0; background: var(--hud-text); box-shadow: 0 0 0 var(--hair) var(--grid-shadow); }
.pic-level .lv-tick { position: absolute; left: 50%; top: -6px; width: 2px; height: 14px; margin-left: -1px; background: var(--hud-text); box-shadow: 0 0 0 var(--hair) var(--grid-shadow); }
.pic-level .lv-t { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); padding: 1px 6px; white-space: nowrap; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--t-xs); color: var(--hud-text); background: var(--tag-bg); text-shadow: var(--hud-shadow); }
.pic-level.ok .lv-line, .pic-level.ok .lv-tick { background: var(--af-ok); }
.pic-level.ok .lv-t { color: var(--af-ok); }
@media (prefers-reduced-motion: reduce) { .pic-level .lv-bar { transition: none; } }
.pic-re-tags { position: absolute; left: var(--s3); top: calc(var(--hud-h) + var(--s2)); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); pointer-events: none; }
.pic.no-hud .pic-re-tags { top: var(--s3); }
.pic-re-tag { margin: 0; padding: 1px 6px; font-family: var(--font-sans); font-size: var(--t-micro); color: var(--hud-text); background: var(--tag-bg); }
.pk-group-k { margin: var(--s4) 0 var(--s1); }
.pk-sub-k::before { content: none; }
.pk-side { display: block; width: 100%; max-width: 320px; height: auto; aspect-ratio: 280 / 120; margin: var(--s3) 0 0; background: var(--ground, transparent); }
.pk-side .sv-floor, .pk-side .sv-wall { stroke: var(--text-2); stroke-width: 1.5; fill: none; }
.pk-side .sv-house { fill: var(--raised); stroke: var(--text-2); stroke-width: 1; }
.pk-side .sv-band { fill: var(--af-ok); fill-opacity: 0.14; }
.pk-side .sv-mark { stroke: var(--af-ok); stroke-opacity: 0.75; stroke-dasharray: 3 3; stroke-width: 1; }
.pk-side .sv-ray { stroke: var(--text); stroke-width: 1; stroke-dasharray: 4 2; }
.pk-side .sv-hit, .pk-side .sv-cam { fill: var(--text); }
.pk-side .sv-tripod { stroke: var(--text-2); stroke-width: 1.5; }
.res-frames { margin: 0 0 var(--s3); }
.res-frames-k { margin: 0 0 var(--s1); }
.res-frames-row { display: flex; flex-wrap: nowrap; gap: 4px; }
.res-frame { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px; background: transparent; border: var(--hair) solid var(--line); color: var(--text-2); font-family: var(--font-mono); font-size: var(--t-micro); cursor: pointer; }
.res-frame:hover { border-color: var(--line-strong); color: var(--text); }
.res-frame[aria-pressed="true"] { border-color: var(--text); color: var(--text); }
.res-frame-im { display: block; width: 100%; max-width: 48px; aspect-ratio: 3 / 2; height: auto; background-size: cover; background-position: center; }
.res-frames-n { margin: var(--s1) 0 0; font-size: var(--t-xs); color: var(--text-2); }

/* Audit 3 (Nov 25, 2026): on a phone a mission's bar pushed the gear tiles (Camera, Lens, Focus...) under the shutter bar,
   48 px out of sight. In a mission the mode line under Auto / A / S / M goes to screen readers only (the mission's own
   goal and hint carry the words), and the bar's padding is halved, so the tiles show without scrolling at 390 x 844. */
html[data-layout="phone"] .app.in-mission #why { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
html[data-layout="phone"] .app.in-mission .ms-bar { padding-top: var(--s1); padding-bottom: var(--s1); }
html[data-layout="phone"] .app.in-mission .ms-bar { flex: none; }   /* sized by its words: it grew into any height the picture gave up */
/* The picture narrower than the screen (a 4:3 phone, or a mission that gave up height): the top line wrapped "ISO / 100"
   and "AF-C · / WIDE" over the picture's top edge. Each part stays on one line, and under 380 px the focus part, which
   the Focus tile below repeats, steps out, and under 330 px the format badge. */
.hud-top > span { white-space: nowrap; }
.pic { container-type: inline-size; }
@container (max-width: 379px) { #hud-focus { display: none; } }
@container (max-width: 329px) { #hud-fmt { display: none; } }   /* the format badge (FF, PHONE) is in the Camera tile too */

/* Nov 27, 2026: the "Esc" key hint on Done and Close means nothing on a touch screen without a keyboard (seen in the
   phone and WebKit pass at 780 x 360); the button keeps its word. */
@media (hover: none) and (pointer: coarse) { .gpanel-esc { display: none; } }

/* Dec 1, 2026: at about 900 px wide in the compact desktop layout the top bar's last button (About) ran 47 px past the
   screen. The page used to clip it (overflow hidden), so it went unseen; the bar's text buttons now sit tighter there. */
@media (max-width: 1023px) { [data-layout="stack-wide"] .bar-btn { padding: 0 var(--s1); min-width: 0; } }

/* ================================================================ next-step card in the result (Dec 1, 2026, sprint 2: funnel.js) */
.res-next-card { border-top: var(--hair) solid var(--line); padding: var(--s2) 0 var(--s3); }
.res-next-t { margin: 0 0 var(--s2); font-size: var(--t-sm); color: var(--text-2); }
.res-next-links { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.res-next-a { font-size: var(--t-sm); color: var(--text); text-decoration: none; border-bottom: var(--hair) solid var(--line-strong); padding-bottom: 1px; }
.res-next-a:hover { border-bottom-color: var(--text); }
.res-next-a.quiet { color: var(--text-2); }

/* Video mode (sprint 3, Dec 1, 2026): an approximate log preview. Lower contrast and saturation, blacks lifted; not a
   real log curve, and the panel says so. */
#photo.log-look { filter: contrast(0.62) saturate(0.55) brightness(1.12); }
/* Dec 1, 2026 (video mode): the video tag ("24p · 180° 1/50") is longer than the FF badge; on a narrow picture it leaves
   the top line (it is also in the Camera panel), so the line stays inside the picture. */
@container (max-width: 479px) { #hud-fmt.is-video { display: none; } }
/* Dec 1, 2026 (sprint 4): the Shot Card button looks like the result's quiet buttons but has its own place, so "All
   shots" keeps its own (.res-quiet is All shots' hook in the grid head). */
.res-card { height: 40px; min-width: 40px; padding: 0 var(--s3); background: transparent; border: var(--hair) solid var(--line); border-radius: var(--r); color: var(--text); font-size: var(--t-sm); white-space: nowrap; }
.res-card:hover { background: var(--raised); border-color: var(--line-strong); }
.res-card:disabled { opacity: 0.5; }
.res[data-view="shot"] .res-head > .res-card { grid-area: card; justify-self: end; }
@media (max-width: 479px) { .res-head > .res-card { padding: 0 var(--s2); } }
