/* Kagu — mockup ui-ux-pro-max
   Identité : le mètre à ruban de chantier. Jaune ruban, encre noire, aiguille rouge.
   Trois « lumières » : jaune (mesurer), papier (lire), encre (voir la pièce). */

:root {
  --yellow: #F3D21B;
  --yellow-2: #F7E57E;
  --yellow-3: #FBF2B8;
  --ink: #15140F;
  --paper: #EFEBDD;
  --paper-2: #F7F4EA;
  --red: #D6280F;
  --px: 12px;                       /* largeur d'un centimètre sur le ruban */
  --f-disp: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --dock-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body[data-screen="mesurer"] {
  --ground: var(--yellow); --fg: var(--ink); --fg2: #453D00; --line: var(--ink);
  --surface: #F8E55C; --focus: var(--red); --hatch: rgba(21,20,15,.28);
}
body[data-screen="champ"] {
  --ground: var(--paper); --fg: var(--ink); --fg2: #524D3C; --line: var(--ink);
  --surface: var(--paper-2); --focus: var(--red); --hatch: rgba(21,20,15,.30);
}
body[data-screen="photo"] {
  --ground: #17160F; --fg: #F1EDDC; --fg2: #C9C4AB; --line: #F1EDDC;
  --surface: #23211A; --focus: var(--yellow); --hatch: rgba(241,237,220,.30);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--fg);
  font: 400 16px/1.5 var(--f-body);
  transition: background-color .25s var(--ease), color .25s var(--ease);
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px) + 16px);
}
b, strong { font-weight: 600; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--yellow); padding: 10px 14px; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }
[hidden] { display: none !important; }

/* ---------- en-tête : un ruban qui défile ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--ground); transition: background-color .25s; border-bottom: 3px solid var(--line); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px 6px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.wordmark { font: 900 30px/1 var(--f-disp); letter-spacing: .06em; }
.tagline { font: 400 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--fg2); }
.slot-recap { margin: 0; font: 600 13px/1.2 var(--f-mono); letter-spacing: .02em; white-space: nowrap; }
.ribbon {
  height: 10px;
  background:
    linear-gradient(90deg, var(--line) 0 2px, transparent 2px) 0 0 / 50px 10px repeat-x,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10px) 0 100% / 50px 5px repeat-x;
  animation: crawl 20s linear infinite;
}
@keyframes crawl { to { background-position-x: 500px, 500px; } }

/* ---------- squelette commun ---------- */
.screen { animation: enter .35s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.wrap { max-width: 1120px; margin: 0 auto; padding: 14px 16px 24px; }
.kicker { margin: 0 0 2px; font: 600 12px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg2); }
.display { margin: 0; font: 900 clamp(46px, 14.5vw, 96px)/.86 var(--f-disp); text-transform: uppercase; letter-spacing: .005em; }
.lede { margin: 12px 0 0; max-width: 46ch; color: var(--fg); }
.lede b { background: var(--ink); color: var(--yellow); padding: 0 .3em; font-weight: 600; }
body[data-screen="champ"] .lede b { background: var(--yellow); color: var(--ink); }
body[data-screen="photo"] .lede b { background: var(--yellow); color: var(--ink); }
.sub { margin: 26px 0 8px; font: 800 13px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.sub::after { content: ""; flex: 1; height: 3px; background: var(--line); }
.note { font: 400 12px/1.4 var(--f-mono); color: var(--fg2); }

@media (max-width: 899px) {
  #s-mesurer .wrap.two { display: flex; flex-direction: column; }
  #s-mesurer .col-visual { display: contents; }
  #s-mesurer .col-tools { order: 4; }
  #s-mesurer .iso { order: 5; margin-top: 26px; }
}
#s-champ .col-tools { display: flex; flex-direction: column; }
#s-champ .detail { order: -1; }
@media (min-width: 900px) {
  .wrap.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding-top: 28px; }
  .col-visual { position: sticky; top: 74px; align-self: start; }
}

/* ---------- dock : trois segments de mètre pliant ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); padding-bottom: env(safe-area-inset-bottom, 0px); border-top: 3px solid var(--ink); }
.dock-in { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); height: var(--dock-h); }
.dock button {
  position: relative; border: 0; background: transparent; color: #EFEBDD; border-right: 2px solid #3a382e;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 4px 14px;
  transition: background-color .1s, color .1s;
}
.dock button:last-child { border-right: 0; }
.dock button b { font: 800 12px/1 var(--f-mono); letter-spacing: .1em; opacity: .85; }
.dock button span { font: 900 24px/1 var(--f-disp); text-transform: uppercase; letter-spacing: .04em; }
.dock button[aria-current="step"] { background: var(--yellow); color: var(--ink); }
.dock button:hover:not([aria-current="step"]) { background: #2a2820; }
.dock button:focus-visible { outline-offset: -5px; outline-color: var(--yellow); }
.dock button[aria-current="step"]:focus-visible { outline-color: var(--ink); }
.dock em {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 800 14px/1 var(--f-mono); font-style: normal;
  background: var(--yellow); color: var(--ink); min-width: 28px; padding: 5px 6px; text-align: center;
}
.dock button[aria-current="step"] em { background: var(--ink); color: var(--yellow); }

/* ====================================================== 01 MESURER */
.iso { margin: 18px 0 0; }
.iso svg { width: 100%; max-width: 440px; height: auto; display: block; }
.iso figcaption { font: 400 12px/1.6 var(--f-mono); color: var(--fg2); display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.key { display: inline-block; width: 22px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.key-slot { border: 3px solid var(--ink); }
.key-min { border: 2px dashed var(--ink); background: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 5px); }

.tapes { display: flex; flex-direction: column; gap: 0; margin-top: 18px; }
.tape { border-top: 3px solid var(--ink); padding: 10px 0 14px; }
.tape-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tape-head label { font: 800 14px/1.1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; padding-bottom: 12px; }
.tape-head label small { display: block; font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--fg2); font-size: 12px; margin-top: 2px; }
.numline { display: flex; align-items: center; gap: 6px; }
.numline input {
  width: 3.1ch; text-align: center; font: 900 76px/.9 var(--f-disp); background: transparent; border: 0; border-bottom: 4px solid var(--ink);
  padding: 0 0 2px; border-radius: 0; -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums;
}
.numline input::-webkit-outer-spin-button, .numline input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.numline input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.numline .unit { font: 800 16px/1 var(--f-mono); align-self: flex-end; padding-bottom: 12px; }
.pm {
  width: 48px; height: 48px; border: 3px solid var(--ink); background: transparent; display: grid; place-items: center; padding: 0;
  transition: background-color .1s, color .1s; touch-action: manipulation;
}
.pm:hover, .pm:active { background: var(--ink); color: var(--yellow); }
.pm svg { pointer-events: none; }

.tape-window { position: relative; height: 92px; background: var(--surface); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); user-select: none; -webkit-user-select: none; }
.tape-scroll {
  height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  cursor: grab; -webkit-overflow-scrolling: touch;
}
.tape-scroll::-webkit-scrollbar { display: none; }
.tape-scroll.drag { scroll-snap-type: none; cursor: grabbing; }
.tape-scroll:focus-visible { outline-offset: 4px; }
.tape-inner { display: flex; width: max-content; height: 100%; padding: 0 calc(50% - var(--px) / 2); }
.c { flex: 0 0 var(--px); height: 100%; scroll-snap-align: center; position: relative; }
.c::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 14px; background: var(--ink); }
.c.t5::before { height: 24px; width: 2px; }
.c.t10::before { height: 38px; width: 3px; margin-left: -1px; }
.c.t10::after {
  content: attr(data-n); position: absolute; left: 50%; top: 42px; transform: translateX(-50%);
  font: 800 14px/1 var(--f-mono); color: var(--ink);
}
.needle { position: absolute; left: 50%; top: -11px; bottom: -11px; width: 4px; margin-left: -2px; background: var(--red); pointer-events: none; z-index: 3; }
.needle::before { content: ""; position: absolute; left: -7px; top: 0; border: 9px solid transparent; border-top: 11px solid var(--red); border-bottom: 0; }
.band {
  position: absolute; top: 0; bottom: 0; z-index: 2; pointer-events: none;
  left: calc(50% - (var(--m) + .5) * var(--px)); width: calc((var(--m) + 1) * var(--px));
  background: repeating-linear-gradient(135deg, rgba(21,20,15,.28) 0 2px, transparent 2px 6px);
  border-left: 3px solid var(--ink);
}
.band-label {
  position: absolute; bottom: 4px; right: calc(50% - var(--px) / 2 + 6px); z-index: 2; pointer-events: none;
  font: 800 12px/1 var(--f-mono); background: var(--ink); color: var(--yellow); padding: 3px 5px; white-space: nowrap;
}
.handle {
  position: absolute; top: 0; bottom: 0; z-index: 4; width: 44px; left: calc(50% - (var(--m) + .5) * var(--px) - 44px);
  background: none; border: 0; padding: 0; cursor: ew-resize; touch-action: none;
}
.handle::after { content: ""; position: absolute; right: 3px; top: 50%; width: 14px; height: 44px; margin-top: -22px; background: var(--ink);
  background-image: linear-gradient(90deg, transparent 4px, var(--yellow) 4px 6px, transparent 6px 8px, var(--yellow) 8px 10px, transparent 10px); }
.handle:focus-visible { outline-offset: -4px; }
.tape-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.marge { display: flex; align-items: center; gap: 0; font: 800 13px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.marge .pm { width: 44px; height: 44px; border-width: 2px; }
.marge output { min-width: 5.2ch; text-align: center; font: 900 30px/1 var(--f-disp); letter-spacing: 0; padding: 0 4px; }
.marge span.lab { margin-right: 8px; }
.accept { font: 600 14px/1.3 var(--f-mono); }
.accept b { font-weight: 800; background: var(--ink); color: var(--yellow); padding: 1px 6px; }

.go { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.btn-go {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; background: var(--ink); color: var(--yellow);
  padding: 12px 18px 12px 14px; min-height: 76px; transition: transform .12s var(--ease), box-shadow .12s var(--ease);
  box-shadow: 6px 6px 0 var(--red);
}
.btn-go:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--red); }
.btn-go:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--red); }
.go-n { font: 900 64px/.85 var(--f-disp); min-width: 1.4ch; text-align: center; font-variant-numeric: tabular-nums; }
.go-t { flex: 1; display: flex; flex-direction: column; }
.go-t b { font: 900 24px/1 var(--f-disp); text-transform: uppercase; letter-spacing: .03em; }
.go-t i { font: 400 12px/1.4 var(--f-mono); font-style: normal; color: #E9E3C2; margin-top: 4px; }
.btn-link { background: none; border: 0; text-align: left; padding: 10px 0; min-height: 44px; font: 600 14px/1.3 var(--f-mono); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.btn-link:hover { background: var(--ink); color: var(--yellow); text-decoration: none; padding-left: 8px; }

/* ====================================================== 02 AJUSTER */
.viewswitch { display: inline-flex; margin: 14px 0 10px; border: 3px solid var(--ink); }
.viewswitch button { border: 0; background: transparent; padding: 0 18px; min-height: 44px; font: 800 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.viewswitch button + button { border-left: 3px solid var(--ink); }
.viewswitch button[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }

.field-wrap svg { display: block; width: 100%; height: auto; max-width: 560px; overflow: visible; }
.f-axis { font: 700 11px var(--f-mono); fill: var(--ink); }
.f-axis-t { font: 800 12px var(--f-mono); fill: var(--ink); letter-spacing: .06em; text-transform: uppercase; }
.f-cell { stroke: rgba(21,20,15,.35); stroke-width: 1; }
.z1 { fill: var(--yellow); } .z2 { fill: var(--yellow-2); } .z3 { fill: var(--yellow-3); }
.f-frame { fill: none; stroke: var(--ink); stroke-width: 3; }
.dot { cursor: pointer; }
.dot .d-fill { fill: var(--ink); stroke: var(--paper); stroke-width: 2; transition: fill .1s, r .15s var(--ease); }
.dot:hover .d-fill { fill: var(--red); }
.dot[aria-pressed="true"] .d-fill { fill: var(--paper); stroke: var(--ink); stroke-width: 4; }
.dot .d-hit { fill: transparent; }
.dot:focus-visible { outline: none; }
.dot:focus-visible .d-ring { opacity: 1; }
.d-ring { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 4 3; opacity: 0; }
.f-cross { stroke: var(--red); stroke-width: 2; stroke-dasharray: 5 4; pointer-events: none; }
.f-chip { fill: var(--ink); } .f-chip-t { fill: var(--yellow); font: 800 12px var(--f-mono); }
.f-call { font: 900 20px var(--f-disp); fill: var(--ink); text-transform: uppercase; paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; letter-spacing: .02em; }
.f-corner { font: 800 11px var(--f-mono); fill: var(--ink); letter-spacing: .08em; }
.legend { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font: 400 12px/1.4 var(--f-mono); color: var(--fg2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.lg { display: inline-block; }
.lg-dot-s { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.lg-dot-l { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); }
.lg-z1, .lg-z2, .lg-z3 { width: 16px; height: 12px; border: 1px solid var(--ink); margin-left: 4px; }
.lg-z1 { background: var(--yellow); } .lg-z2 { background: var(--yellow-2); } .lg-z3 { background: var(--yellow-3); }

.pick { margin: 10px 0 0; padding: 8px 10px; border: 3px solid var(--ink); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; background: var(--paper-2); min-height: 52px; }
.pick b { font: 900 24px/1 var(--f-disp); text-transform: uppercase; }
.pick span { font: 600 13px var(--f-mono); }

.tab-wrap { overflow-x: auto; margin-top: 4px; }
.tab { border-collapse: collapse; width: 100%; font: 600 14px/1.3 var(--f-mono); min-width: 420px; }
.tab th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 8px; border-bottom: 3px solid var(--ink); }
.tab td { padding: 0; border-bottom: 1px solid rgba(21,20,15,.35); }
.tab td, .tab th { font-variant-numeric: tabular-nums; }
.tab tr[data-id] { cursor: pointer; }
.tab tr[data-id]:hover td { background: var(--yellow-2); }
.tab tr.sel td { background: var(--yellow); }
.tab td > * { display: block; padding: 10px 8px; }
.tab td button { background: none; border: 0; text-align: left; width: 100%; padding: 10px 8px; min-height: 44px; font: inherit; }
.tab td button em { display: block; font: 400 12px var(--f-mono); font-style: normal; color: var(--fg2); }

.tol { border: 3px solid var(--ink); margin-top: 18px; }
.tol-h { margin: 0; padding: 6px 10px; background: var(--ink); color: var(--yellow); font: 800 12px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.tol-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 4px 10px; border-top: 2px solid var(--ink); }
.tol-row:first-of-type { border-top: 0; }
.tol-row .nm { font: 600 13px/1.25 var(--f-mono); }
.tol-row .nm b { font-weight: 800; }
.tol-row .nm small { display: block; font-weight: 400; font-size: 12px; color: var(--fg2); }
.tol-ctl { display: flex; align-items: center; }
.tol-ctl .pm { width: 44px; height: 44px; border-width: 2px; }
.tol-ctl output { min-width: 4.6ch; text-align: center; font: 900 28px/1 var(--f-disp); }
.tol-edit { margin: 0; padding: 8px 10px; border-top: 2px solid var(--ink); font: 400 13px/1.4 var(--f-mono); }
.tol-edit button { background: none; border: 0; padding: 8px 0; min-height: 44px; font: 600 13px var(--f-mono); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.detail { margin-top: 18px; border-top: 3px solid var(--ink); padding: 12px 0 6px; }
.d-empty { font: 400 14px var(--f-mono); color: var(--fg2); }
.d-top { display: flex; gap: 14px; align-items: flex-start; }
.d-name { margin: 0; font: 900 44px/.9 var(--f-disp); text-transform: uppercase; }
.d-brand { font: 600 12px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg2); margin: 2px 0 0; }
.d-price { font: 900 34px/1 var(--f-disp); margin-left: auto; white-space: nowrap; }
.d-sil { margin: 10px 0 4px; border-bottom: 3px solid var(--ink); display: flex; align-items: flex-end; justify-content: center; padding-top: 4px; }
.d-sil svg { height: 120px; width: auto; max-width: 100%; display: block; }
.d-meta { font: 400 13px/1.5 var(--f-mono); margin: 6px 0 12px; }
.d-meta b { font-weight: 800; }
.gauge { margin: 0 0 12px; }
.g-head { display: flex; align-items: baseline; gap: 8px; font: 600 12px/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; }
.g-head strong { margin-left: auto; font: 900 24px/1 var(--f-disp); letter-spacing: .02em; }
.g-bar { display: flex; height: 26px; margin-top: 4px; border: 2px solid var(--ink); position: relative; background: var(--paper-2); }
.g-bar i { flex: 1; display: block; border-right: 1px solid rgba(239,235,221,.7); }
.g-bar i.on { background: var(--ink); }
.g-bar i.gap { background: repeating-linear-gradient(135deg, var(--ink) 0 2px, var(--yellow) 2px 5px); }
.g-bar i:last-child { border-right: 0; }
.g-bar::after { content: ""; position: absolute; right: -6px; top: -6px; bottom: -6px; width: 4px; background: var(--red); }
.g-scale { display: flex; justify-content: space-between; font: 400 12px/1.4 var(--f-mono); color: var(--fg2); margin-top: 3px; }
.g-scale span:last-child { color: var(--red); font-weight: 700; margin-right: -2px; }
.d-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn { border: 3px solid var(--ink); background: transparent; padding: 0 16px; min-height: 48px; font: 800 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; transition: background-color .1s, color .1s; }
.btn:hover { background: var(--ink); color: var(--yellow); }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.near { margin-top: 18px; }
.near h3 { margin: 0 0 6px; font: 800 12px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.near ul { margin: 0; padding: 0; list-style: none; }
.near li { padding: 8px 0; border-top: 1px solid var(--red); font: 400 13px/1.4 var(--f-mono); }
.near li b { font-weight: 800; }

/* ====================================================== 03 PHOTO */
.photo { position: relative; margin-top: 16px; border: 3px solid var(--line); aspect-ratio: 4 / 5; overflow: hidden; background: #000; max-width: 560px; }
.photo > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: filter .5s var(--ease); }
.photo[data-stage="idle"] #scene { filter: blur(3px) saturate(.6) brightness(.8); }
.viewfinder i { position: absolute; width: 28px; height: 28px; border: 0 solid var(--yellow); pointer-events: none; }
.viewfinder i:nth-child(1) { left: 12px; top: 12px; border-width: 4px 0 0 4px; }
.viewfinder i:nth-child(2) { right: 12px; top: 12px; border-width: 4px 4px 0 0; }
.viewfinder i:nth-child(3) { left: 12px; bottom: 12px; border-width: 0 0 4px 4px; }
.viewfinder i:nth-child(4) { right: 12px; bottom: 12px; border-width: 0 4px 4px 0; }
.exif { position: absolute; left: 14px; bottom: 14px; font: 600 11px/1 var(--f-mono); color: #fff; background: rgba(0,0,0,.55); padding: 4px 6px; letter-spacing: .04em; pointer-events: none; }
.photo[data-stage="idle"] .exif { opacity: 0; }
.shutter-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.photo[data-stage="flash"] .shutter-flash { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--yellow); box-shadow: 0 0 0 1px #000, 0 0 24px 6px rgba(243,210,27,.55); opacity: 0; pointer-events: none; }
.photo[data-stage="scan"] .scanline { opacity: 1; animation: sweep 2.2s linear forwards; }
@keyframes sweep { from { top: 0; } to { top: calc(100% - 4px); } }
.btn-shoot {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px;
  background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); padding: 0 18px 0 14px; min-height: 56px; white-space: nowrap;
  font: 900 20px/1 var(--f-disp); text-transform: uppercase; letter-spacing: .04em; box-shadow: 5px 5px 0 var(--ink);
}
.btn-shoot:hover { background: #fff3a0; }
.btn-shoot:active { transform: translate(calc(-50% + 3px), 3px); box-shadow: 2px 2px 0 var(--ink); }
.photo:not([data-stage="idle"]):not([data-stage="done"]) .btn-shoot { display: none; }
.photo[data-stage="done"] .btn-shoot { left: auto; right: 12px; bottom: 12px; transform: none; min-height: 44px; padding: 0 12px; font-size: 16px; box-shadow: 3px 3px 0 var(--ink); }
.photo[data-stage="done"] .btn-shoot:active { transform: translate(2px, 2px); }
.photo[data-stage="done"] .btn-shoot svg { width: 20px; height: 20px; }
.photo[data-stage="done"] .exif { bottom: 70px; }
.status { position: absolute; left: 0; right: 0; top: 52px; text-align: center; margin: 0; z-index: 3; pointer-events: none; }
.status:not(:empty) { font: 800 13px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--yellow); display: inline-block; left: 50%; right: auto; transform: translateX(-50%); padding: 6px 10px; }
.ov { opacity: 0; visibility: hidden; transition: opacity .5s var(--ease); }
.photo[data-stage="done"] .ov { opacity: 1; visibility: visible; }
.mk { cursor: pointer; }
.mk circle { fill: var(--yellow); stroke: #15140F; stroke-width: 2.5; }
.mk text { font: 800 12px var(--f-mono); fill: #15140F; text-anchor: middle; }
.mk.on circle { fill: #fff; stroke-width: 4; }
.mk:focus-visible { outline: none; }
.mk:focus-visible circle { stroke: var(--red); stroke-width: 4; }
.mk .mk-hit { fill: transparent; stroke: none; }
.cote line, .cote path { stroke: var(--yellow); stroke-width: 2; fill: none; }
.cote rect { fill: #15140F; stroke: var(--yellow); stroke-width: 2; }
.cote text { font: 800 13px var(--f-mono); fill: var(--yellow); text-anchor: middle; }

.ph-idle .lede { color: var(--fg); }
.ph-idle { margin-top: 18px; }
.est { display: grid; gap: 0; border: 3px solid var(--line); }
.est-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 8px 10px; border-top: 2px solid var(--line); }
.est-row:first-child { border-top: 0; }
.est-row .nm { font: 800 13px/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.est-row .nm small { display: block; font: 400 12px/1.3 var(--f-mono); text-transform: none; letter-spacing: 0; color: var(--fg2); margin-top: 2px; }
.est-row .nm small.fixed { color: var(--yellow); }
.est-ctl { display: flex; align-items: center; }
.est-ctl .pm { width: 44px; height: 44px; border-width: 2px; border-color: var(--line); }
.est-ctl .pm:hover, .est-ctl .pm:active { background: var(--yellow); color: var(--ink); }
.est-ctl input { width: 3ch; text-align: center; font: 900 38px/1 var(--f-disp); background: transparent; border: 0; border-bottom: 3px solid var(--yellow); padding: 0; margin: 0 4px; border-radius: 0; -moz-appearance: textfield; appearance: textfield; }
.est-ctl input::-webkit-outer-spin-button, .est-ctl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.est-ctl .u { font: 800 12px var(--f-mono); margin-left: 4px; }
.btn-use { margin-top: 10px; width: 100%; min-height: 52px; border: 3px solid var(--yellow); background: transparent; color: var(--yellow); font: 800 13px/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; padding: 8px 12px; }
.btn-use:hover { background: var(--yellow); color: var(--ink); }
.chips { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); padding: 5px 10px 5px 6px; font: 600 13px/1.2 var(--f-mono); }
.chips .sw { width: 18px; height: 18px; border: 2px solid var(--line); flex: none; }
.obst { list-style: none; margin: 0; padding: 0; counter-reset: o; }
.obst li { margin: 0; }
.obst button { display: grid; grid-template-columns: 34px 1fr; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-top: 2px solid rgba(241,237,220,.35); padding: 10px 0; min-height: 52px; font: 400 14px/1.4 var(--f-body); }
.obst button:hover, .obst button.on { background: #2b2920; }
.obst .n { width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: grid; place-items: center; font: 800 13px var(--f-mono); }
.obst b { font-weight: 600; }
.obst .v { display: block; font: 400 12px/1.4 var(--f-mono); color: var(--fg2); }

.sugg { display: flex; flex-direction: column; }
.sg { border-top: 3px solid var(--line); padding: 0; }
.sg-btn { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 4px 12px; width: 100%; border: 0; background: none; text-align: left; padding: 12px 0 8px; min-height: 64px; }
.sg-btn:hover .sg-name { color: var(--yellow); }
.sg-name { font: 900 36px/.9 var(--f-disp); text-transform: uppercase; }
.sg-sub { grid-column: 1 / 2; font: 400 12px/1.4 var(--f-mono); color: var(--fg2); }
.sg-score { grid-row: 1 / 3; grid-column: 2; text-align: right; font: 400 12px/1.2 var(--f-mono); color: var(--fg2); }
.sg-score b { display: block; font: 900 34px/1 var(--f-disp); color: var(--yellow); }
.sg[data-open="true"] { background: #1f1d16; }
.sg[data-open="true"] .sg-btn { padding-left: 10px; padding-right: 10px; }
.sg-body { padding: 0 10px 14px; }
.sg-body[hidden] { display: none; }
.rs { list-style: none; margin: 0; padding: 0; }
.rs li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 6px 0; font: 400 14px/1.45 var(--f-body); }
.rs .ic { width: 22px; height: 22px; display: grid; place-items: center; font: 800 14px/1 var(--f-mono); background: var(--yellow); color: var(--ink); margin-top: 1px; }
.rs li.warn .ic { background: var(--red); color: #fff; }
.rs li b { font-weight: 600; }
.rs .t { display: block; font: 800 12px/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--fg2); }
.sg-actions { margin-top: 8px; display: flex; gap: 8px; }
.sg-actions .btn { border-color: var(--yellow); color: var(--yellow); }
.sg-actions .btn:hover { background: var(--yellow); color: var(--ink); }
.empty { padding: 14px; border: 3px dashed var(--line); font: 400 14px/1.5 var(--f-mono); }

@media (min-width: 900px) {
  .go-n { font-size: 80px; }
  .numline input { font-size: 88px; }
}
@media (max-width: 520px) {
  .tagline { display: none; }
}
@media (max-width: 380px) {
  .numline input { font-size: 68px; }
  .btn-shoot { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .ribbon { animation: none; }
  .screen { animation: none; }
  .btn-go, .btn-go:hover, .btn-go:active { transition: none; }
  .photo[data-stage="scan"] .scanline { animation: none; top: 50%; }
  .photo[data-stage="flash"] .shutter-flash { animation: none; }
  body, .ov, .photo > svg { transition: none; }
}
