/* Slabbed: dark, matte, one electric green. Display face is Bungee, kept for the
   wordmark and grade numerals; everything else is Chakra Petch. */
:root {
  --bg: #0A0C0B;
  --panel: #121714;
  --panel-2: #19201C;
  --line: #26302A;
  --fg: #EEF3EF;
  --muted: #9AA7A0;
  --accent: #39F58A;
  --accent-ink: #06130B;
  --warn: #FFB547;
  --bad: #FF6B6B;
  --display: 'Bungee', 'Arial Black', sans-serif;
  --body: 'Chakra Petch', 'Arial Narrow', system-ui, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
body { font-family: var(--body); font-size: 15px; line-height: 1.4; overscroll-behavior: none; }
button, input, label { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app {
  display: flex; flex-direction: column;
  height: 100%; max-width: 560px; margin: 0 auto; position: relative;
}

/* top bar */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter-r) 10px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.mark { width: 20px; height: 28px; color: var(--accent); flex: none; }
.wordmark { font-family: var(--display); font-size: 20px; letter-spacing: 1px; transform: skewX(-7deg); text-shadow: 2px 2px 0 var(--accent); }
.topbar-note { margin-left: auto; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }

/* views */
.views { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.view { padding: 14px var(--gutter-r) 24px var(--gutter); display: flex; flex-direction: column; gap: 14px; }
h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .02em; text-wrap: balance; }
h2 { margin: 0; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--panel); font-weight: 600; letter-spacing: .03em;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-wide { width: 100%; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn[disabled] { opacity: .45; }

/* scan */
.side-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; background: var(--panel); border-radius: 16px; border: 1px solid var(--line); }
.side-btn { min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 600; letter-spacing: .06em; }
.side-btn.is-active { background: var(--panel-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--accent); }
.side-btn .opt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-left: 4px; }
.tick { color: var(--accent); margin-left: 4px; }

.stage { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 62vh; background: #000; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.guide { position: absolute; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); }
.guide .corner { position: absolute; width: 26px; height: 26px; border: 4px solid var(--accent); }
.guide .tl { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.guide .tr { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 10px; }
.guide .bl { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 10px; }
.guide .br { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 10px; }
.guide .cross { position: absolute; background: rgba(57, 245, 138, .35); }
.guide .cross.h { left: 0; right: 0; top: 50%; height: 1px; }
.guide .cross.v { top: 0; bottom: 0; left: 50%; width: 1px; }
.stage-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: var(--panel); }
.stage-title { margin: 0; font-family: var(--display); font-size: 22px; letter-spacing: .04em; }
.stage-sub { margin: 0 0 6px; color: var(--muted); max-width: 30ch; }
.stage-hint { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(10, 12, 11, .78); font-size: 13px; text-align: center; }

.actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.actions .btn { min-width: 0; }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid var(--fg); background: transparent; padding: 5px; display: grid; place-items: center; }
.shutter span { width: 100%; height: 100%; border-radius: 50%; background: var(--accent); display: block; }
.shutter:active span { transform: scale(.9); }
.shutter[disabled] { opacity: .35; }
.tips p { margin: 0; color: var(--muted); font-size: 13px; }
.tips b { color: var(--fg); }

/* review */
.review-head p { margin: 6px 0 0; color: var(--muted); }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.sw { display: inline-block; width: 18px; height: 0; border-top: 3px solid; margin-right: 8px; vertical-align: middle; }
.sw-outer { border-color: #fff; border-top-style: dashed; }
.sw-inner { border-color: var(--accent); }
.canvas-wrap { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: #000; touch-action: none; }
#reviewCanvas { display: block; width: 100%; height: 100%; touch-action: none; }
.loupe { position: absolute; top: 10px; right: 10px; width: 112px; height: 112px; border-radius: 50%; border: 3px solid var(--accent); background: #000; pointer-events: none; }
.readout { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ro-cell { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.ro-k { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ro-v { font-family: var(--display); font-size: 24px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ro-v.ok { color: var(--accent); }
.ro-v.meh { color: var(--warn); }
.ro-v.bad { color: var(--bad); }
.warn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.warn-list li { font-size: 13px; color: var(--warn); padding: 8px 12px; background: rgba(255, 181, 71, .08); border-radius: 10px; }
.row-actions { display: flex; gap: 10px; }
.row-actions .btn { flex: 1; padding: 0 10px; min-width: 0; }
.row-actions .btn-primary { flex: 1.4; }

/* results */
.results-head { display: flex; flex-direction: column; gap: 10px; }
.name-input { min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); width: 100%; }
.name-input::placeholder { color: var(--muted); }
.centering-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cc-title { grid-column: 1 / -1; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.cc-cell { display: flex; flex-direction: column; gap: 2px; }
.cc-k { font-size: 12px; color: var(--muted); }
.cc-v { font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; }
.cc-bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--panel-2); position: relative; overflow: hidden; }
.cc-bar i { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }
.cc-bar b { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--fg); opacity: .6; }

.grades { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; }
.grade { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 12px 8px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.grade .co { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.grade .num { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--accent); text-shadow: 3px 3px 0 rgba(57, 245, 138, .18); font-variant-numeric: tabular-nums; }
.grade .lbl { font-size: 12px; font-weight: 600; min-height: 1.3em; }
.grade .rng { font-size: 11px; color: var(--muted); }
.grade.is-low .num { color: var(--warn); text-shadow: none; }

.subs { display: flex; flex-direction: column; gap: 10px; }
.subs-note { margin: 0; color: var(--muted); font-size: 13px; }
.sub-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 14px; }
.sub-name { display: flex; flex-direction: column; }
.sub-name b { font-weight: 600; }
.sub-name span { font-size: 12px; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); font-size: 20px; line-height: 1; }
.stepper output { min-width: 3.2ch; text-align: center; font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; }
.sub-row.fixed .stepper button { display: none; }
.fine { margin: 0; font-size: 12px; color: var(--muted); }

/* history */
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.h-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.h-item img { width: 64px; height: 88px; object-fit: cover; border-radius: 8px; background: #000; }
.h-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.h-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-meta { font-size: 12px; color: var(--muted); }
.h-grades { display: flex; gap: 8px; font-family: var(--display); font-size: 15px; color: var(--accent); }
.h-grades small { font-family: var(--body); font-size: 10px; letter-spacing: .12em; color: var(--muted); margin-right: 2px; }
.h-del { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--muted); }
.empty { color: var(--muted); margin: 0; }

/* tabbar */
.tabbar { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: var(--bg); padding: 0 var(--gutter-r) env(safe-area-inset-bottom, 0px) var(--gutter); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 8px; min-height: 56px; border: 0; background: transparent; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.tab.is-active { color: var(--accent); }

.toast { position: absolute; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; max-width: 90%; text-align: center; z-index: 5; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .shutter span { transition: transform .08s ease; }
}

/* ---- v2 additions ---- */
.zoom-badge { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 10px; background: rgba(10,12,11,.75); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.canvas-wrap { touch-action: none; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tool-group { display: inline-flex; align-items: center; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 3px; }
.tool { min-width: 44px; min-height: 44px; border: 0; border-radius: 11px; background: transparent; font-size: 18px; line-height: 1; }
.tool:active { background: var(--panel-2); }
.tool-txt { font-size: 14px; font-weight: 600; letter-spacing: .04em; padding: 0 12px; }
.tool-label { min-width: 6.5ch; max-width: 11ch; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.15; }
.tool-accent { margin-left: auto; border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: 14px; }

.borders { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.unit-toggle { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.unit { min-width: 44px; min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; }
.unit.is-active { background: var(--panel-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--accent); }
.b-vals { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.b-vals b { color: var(--fg); font-weight: 600; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.tag.is-on { border-color: var(--accent); color: var(--accent); background: rgba(57,245,138,.08); }

.conf { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 8px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); }
.conf.published, .conf.partial { color: var(--accent); border-color: rgba(57,245,138,.4); }
.conf.estimate { color: var(--warn); border-color: rgba(255,181,71,.45); }

.worth { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.worth-toggle { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; border: 0; background: transparent; text-align: left; }
.worth-toggle b { display: block; font-size: 16px; }
.worth-sub { display: block; font-size: 12px; color: var(--muted); }
.chev { color: var(--muted); font-size: 18px; transition: transform .15s ease; }
.worth-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.worth-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input { min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); width: 100%; font-variant-numeric: tabular-nums; }
.worth-list { display: flex; flex-direction: column; gap: 8px; }
.w-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.w-name { font-weight: 700; }
.w-sub { grid-column: 1 / 2; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.w-gain { grid-row: 1 / 3; grid-column: 2; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.w-gain strong { font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; }
.w-pill { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.w-row.worth .w-gain strong { color: var(--accent); }
.w-row.worth .w-pill { background: rgba(57,245,138,.14); color: var(--accent); }
.w-row.borderline .w-gain strong { color: var(--warn); }
.w-row.borderline .w-pill { background: rgba(255,181,71,.14); color: var(--warn); }
.w-row.skip .w-gain strong { color: var(--bad); }
.w-row.skip .w-pill { background: rgba(255,107,107,.14); color: var(--bad); }

.std { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 10px; overflow: hidden; }
.std summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; cursor: pointer; list-style: none; }
.std summary::-webkit-details-marker { display: none; }
.std-name { font-weight: 700; font-size: 17px; }
.std-body { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.std-note { margin: 0; font-size: 13px; color: var(--muted); }
.std-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.std-table th { text-align: left; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 4px 0; }
.std-table td { padding: 7px 0; border-top: 1px solid var(--line); }
.std-table td:nth-child(n+2), .std-table th:nth-child(n+2) { text-align: right; }
.ref-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tips-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }

.set-block { display: flex; flex-direction: column; gap: 10px; }
.toggle-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; min-height: 52px; padding: 6px 14px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.toggle-row b { display: block; }
.toggle-row small { color: var(--muted); font-size: 12px; }
.switch { position: relative; width: 52px; height: 32px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); transition: background .15s ease; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); transition: transform .15s ease, background .15s ease; }
.switch input:checked + i { background: rgba(57,245,138,.25); border-color: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--accent); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-wide-ghost { width: 100%; }

.h-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.h-tag { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding: 1px 7px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); }
.h-grades { flex-wrap: wrap; row-gap: 2px; }
#subsList { display: flex; flex-direction: column; gap: 8px; }


/* ---- v2.1: fit the phone, no page scroll on scan and review ---- */
#view-scan:not([hidden]), #view-review:not([hidden]) { height: 100%; padding-top: 10px; padding-bottom: 12px; gap: 10px; }
.review-slot { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.review-slot .canvas-wrap { flex: none; }
.review-head h1 { font-size: 19px; }
.review-head p { margin: 2px 0 0; font-size: 13px; }
#view-review .legend { display: none; }
#view-review .toolbar { flex-wrap: nowrap; gap: 6px; }
#view-review .tool { min-width: 40px; min-height: 40px; }
#view-review .tool-label { min-width: 7ch; }
#view-review .tool-accent { min-height: 40px; padding: 0 10px; }
.readout { gap: 8px; }
.ro-cell { padding: 6px 12px; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; }
.ro-k { font-size: 10px; letter-spacing: .12em; }
.ro-v { font-size: 20px; }
.borders { gap: 8px; flex-wrap: nowrap; }
.unit { min-height: 30px; min-width: 38px; }
.b-vals { gap: 2px 10px; font-size: 12px; }
#view-review .warn-list li { font-size: 12px; padding: 5px 10px; }
#view-review .btn { min-height: 46px; }
#view-scan .stage { flex: 1; min-height: 0; aspect-ratio: auto; max-height: none; }
#view-scan .tips { display: none; }
@media (min-height: 820px) { #view-scan .tips { display: block; } }
.row-actions { gap: 8px; }

.toast { bottom: auto; top: calc(58px + env(safe-area-inset-top, 0px)); }
#view-review .tool-group { padding: 2px; }
#view-review .tool-label { min-width: 6ch; font-size: 11px; }
#view-review .tool-accent { margin-left: 0; white-space: nowrap; }
#view-review .toolbar { justify-content: space-between; }
#view-review .ro-cell { flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 12px; }
#view-review .ro-v { white-space: nowrap; font-size: 20px; line-height: 1.15; }
#view-review .ro-k { white-space: nowrap; }
#view-review .review-head p { display: none; }
#view-review.is-framing .review-head p { display: block; }
.tag-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter-r) 0 var(--gutter); }
.tag-row::-webkit-scrollbar { display: none; }
.tag { white-space: nowrap; flex: none; min-height: 34px; }
.results-head { gap: 8px; }
.results-head h1 { font-size: 20px; }
.name-input { min-height: 42px; }
.subs-note { font-size: 12px; margin: 0; }
.centering-card { padding: 10px 14px; gap: 6px 12px; }
.view { gap: 12px; }

/* v2.2 */
.app { height: 100dvh; }
.app.no-tabs .tabbar { display: none; }
body, .app { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
canvas, .canvas-wrap { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
#view-review .review-head p { display: block; font-size: 12px; line-height: 1.3; }
#view-review .btn-primary { flex: 1.6; }
.toast { pointer-events: none; opacity: .94; }

.std-how { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }

/* v2.3: live camera + no double-tap zoom */
html, body, button, .tool, .tag, .tab, .unit, .btn, .step-btn, input, label, summary { touch-action: manipulation; }
.live { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.auto-pill { position: absolute; top: 10px; right: 10px; min-height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line); background: rgba(10,12,11,.72); color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: .04em; }
.auto-pill.is-on { border-color: var(--accent); color: var(--accent); }
.stage-hint.is-ok { color: var(--accent); }
.stage-hint.is-warn { color: var(--warn); }

.co-logo { display: block; max-height: 26px; max-width: 90px; object-fit: contain; margin: 0 auto; }
.co-logo.sm { max-height: 22px; max-width: 60px; margin: 0 10px 0 0; display: inline-block; vertical-align: middle; }
.logo-row { display: flex; align-items: center; gap: 8px; padding: 0 2px 10px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 12px; }
.grade .co { min-height: 26px; display: block; }
.std-name { display: flex; align-items: center; }
