:root {
  --pine-950: #102f29;
  --pine-900: #173d35;
  --pine-700: #2e6557;
  --pine-100: #e5efeb;
  --field-700: #8a5d17;
  --field-500: #c18a2b;
  --field-100: #f4ead4;
  --ink-900: #1e2824;
  --ink-700: #42504a;
  --ink-500: #718079;
  --mist-100: #e9eeeb;
  --mist-050: #f5f7f6;
  --white: #fff;
  --danger: #9d3d37;
  --success: #2e704f;
  --line: #cfd8d3;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  color: var(--ink-900);
  background: var(--mist-050);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--pine-950); }
body { margin: 0; min-width: 320px; padding-bottom: calc(76px + var(--safe-bottom)); background: var(--mist-050); color: var(--ink-900); }
body.lightbox-open { overflow: hidden; }
body.session-required { min-height: 100vh; padding-bottom: 0; background: var(--pine-950); }
body.session-required .app-ui { display: none !important; }
body:not(.session-required) .session-setup { display: none; }
button, input, select, textarea { font: inherit; }
button, label[for] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, label[for]:focus-within { outline: 3px solid var(--field-500); outline-offset: 2px; }

.test-flag { min-height: 29px; display: flex; align-items: center; justify-content: center; padding: 6px 10px; background: var(--field-100); border-bottom: 1px solid #ddc695; color: #6b4817; font-size: 10px; font-weight: 700; }

.session-setup { min-height: calc(100vh - 29px); display: flex; flex-direction: column; justify-content: flex-start; padding: 28px 16px 40px; background: linear-gradient(155deg, var(--pine-950) 0 52%, #173d35 52% 100%); color: var(--white); }
.session-setup__mark { width: 92px; height: 92px; display: flex; flex-direction: column; justify-content: center; margin-bottom: 24px; border: 2px solid var(--field-500); border-left-width: 12px; padding: 12px; color: var(--field-100); }.session-setup__mark span { font-size: 9px; letter-spacing: .16em; }.session-setup__mark strong { margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 24px; }
.session-setup__heading { margin-bottom: 18px; }.session-setup__heading > p:first-child { margin: 0 0 5px; color: #c9d9d3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 700; letter-spacing: .14em; }.session-setup__heading h1 { font-size: 28px; }.session-setup__heading > p:last-child { margin: 9px 0 0; color: #c9d9d3; font-size: 12px; line-height: 1.7; }
.session-setup__panel { margin: 0; border-left-color: var(--field-500); color: var(--ink-900); }.session-setup__panel label + label { display: block; margin-top: 10px; }
.session-setup__panel label { min-width: 0; overflow: hidden; }.session-setup__panel input[type="date"] { min-width: 0; max-width: 100%; display: block; font-size: 16px; -webkit-min-logical-width: 0; }.session-setup__panel input[type="date"]::-webkit-date-and-time-value { min-width: 0; text-align: left; }
.session-lock-note { display: grid; gap: 3px; margin: 12px 0; padding: 10px; border-left: 4px solid var(--field-500); background: var(--field-100); }.session-lock-note strong { color: #67420d; font-size: 10px; }.session-lock-note span { color: var(--ink-700); font-size: 9px; line-height: 1.55; }
.start-session-button { width: 100%; min-height: 58px; border: 0; border-radius: 7px; background: var(--pine-900); color: var(--white); font-size: 14px; font-weight: 700; }
.session-history-note { margin: 13px 3px 0; color: #bdcec8; font-size: 9px; line-height: 1.55; }
.session-history { margin-top: 15px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }.session-history__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }.session-history__heading h2 { color: var(--white); font-size: 13px; }.session-history__heading span { color: #bdcec8; font-size: 8px; }.session-history__list { display: grid; gap: 7px; }.session-history__list > p { margin: 0; padding: 12px; border: 1px dashed rgba(255,255,255,.26); color: #bdcec8; font-size: 9px; }.session-history__list button { width: 100%; min-height: 62px; display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; align-items: center; border: 1px solid rgba(255,255,255,.22); border-left: 5px solid var(--field-500); border-radius: 6px; background: rgba(255,255,255,.08); padding: 9px 10px; color: var(--white); text-align: left; }.session-history__list button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.session-history__list button span { grid-column: 1; color: #c9d9d3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; }.session-history__list button small { grid-column: 2; grid-row: 1 / 3; color: #f3d79f; font-size: 8px; font-weight: 700; }

.stack-rail { position: sticky; top: 0; z-index: 30; min-height: 78px; display: grid; grid-template-columns: 70px 1fr; background: var(--pine-900); color: var(--white); border-bottom: 4px solid var(--field-500); }
.stack-index { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--field-500); color: #2f210b; }
.stack-index span { font-size: 8px; }.stack-index strong { font-size: 30px; line-height: 1; }
.stack-identity { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 11px 12px; }
.stack-identity > span { color: #bcd1c9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }.stack-identity strong { margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }.stack-identity small { color: #c2d3cd; font-size: 9px; }
.session-bar { position: sticky; top: 78px; z-index: 25; min-height: 43px; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 7px; padding: 7px 10px; background: var(--field-100); border-bottom: 1px solid #dfc99c; color: var(--ink-700); }
.session-bar span { font-size: 8px; }.session-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }.session-bar button { min-height: 30px; border: 1px solid #c8aa69; border-radius: 5px; background: var(--white); padding: 5px 8px; color: #68440d; font-size: 8px; font-weight: 700; }

main { width: min(100%, 720px); margin: 0 auto; padding: 15px 11px 28px; }
.view { display: none; }.view.is-active { display: block; }
.view-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin: 4px 2px 13px; }
.view-heading p, .panel-title p { margin: 0 0 2px; color: var(--pine-700); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
h1 { margin: 0; font-size: 22px; line-height: 1.2; } h2 { margin: 0; font-size: 15px; }
.state-pill { flex: 0 0 auto; min-height: 28px; display: inline-flex; align-items: center; padding: 5px 8px; border: 1px solid #9ab9ad; border-radius: 999px; background: var(--pine-100); color: var(--pine-900); font-size: 8px; font-weight: 700; }
.state-pill.is-offline { border-color: #d4b873; background: var(--field-100); color: #68440d; }

.panel { margin-bottom: 11px; padding: 13px; border: 1px solid var(--line); border-left: 5px solid var(--pine-900); border-radius: 8px; background: var(--white); }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }.panel-title > span { color: var(--ink-500); font-size: 8px; }.panel-title > strong { color: var(--pine-900); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.field-grid--last { margin-top: 8px; }
.field-grid__wide { grid-column: 1 / -1; }
label > span, .quantity-control > span { display: block; margin-bottom: 4px; color: var(--ink-500); font-size: 9px; font-weight: 700; } label small { color: var(--ink-500); font-size: 8px; font-weight: 400; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); padding: 8px 10px; color: var(--ink-900); font-size: 14px; }
textarea { resize: vertical; line-height: 1.5; }
.bale-field { margin: 9px 0 0; padding: 0; border: 0; }.bale-field legend { margin-bottom: 4px; color: var(--ink-500); font-size: 9px; font-weight: 700; }.bale-field > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.bale-field button { min-height: 46px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink-700); font-size: 11px; font-weight: 700; }.bale-field button.is-selected { border: 2px solid var(--pine-700); background: var(--pine-100); color: var(--pine-900); }
.quantity-control > div { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 5px; }.quantity-control button { min-height: 46px; border: 1px solid var(--pine-700); border-radius: 6px; background: var(--white); color: var(--pine-900); font-size: 20px; font-weight: 700; }.quantity-control output { text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; font-weight: 700; }

.stack-deck { padding-bottom: 10px; border-left-color: var(--field-500); }.stack-sheet-strip { display: flex; gap: 6px; overflow-x: auto; padding: 1px 1px 8px; scroll-snap-type: x proximity; }.stack-sheet-card { flex: 0 0 142px; min-height: 68px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-items: center; gap: 2px 7px; scroll-snap-align: start; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 6px; background: var(--white); padding: 8px; color: var(--ink-700); text-align: left; }.stack-sheet-card > span:first-child { grid-row: 1 / 3; width: 30px; height: 38px; display: grid; place-items: center; background: var(--mist-100); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 800; }.stack-sheet-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-900); font-size: 10px; }.stack-sheet-card small { color: var(--ink-500); font-size: 8px; }.stack-sheet-card.is-current { border: 3px solid var(--pine-700); border-left: 8px solid var(--field-500); background: var(--pine-100); }.stack-sheet-card.is-complete small { color: var(--success); font-weight: 700; }.stack-sheet-add { flex: 0 0 92px; min-height: 68px; border: 1px dashed var(--pine-700); border-radius: 6px; background: var(--white); color: var(--pine-900); font-size: 9px; font-weight: 700; }.stack-prep { border-top: 1px solid var(--line); }.stack-prep > summary { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 2px 0; list-style: none; cursor: pointer; }.stack-prep > summary::-webkit-details-marker { display: none; }.stack-prep > summary > span:first-child { display: grid; gap: 2px; }.stack-prep > summary strong { font-size: 10px; }.stack-prep > summary small { color: var(--ink-500); font-size: 8px; }.stack-prep > summary > span:last-child { color: var(--pine-700); font-size: 18px; font-weight: 800; }.stack-prep[open] > summary > span:last-child { transform: rotate(45deg); }.stack-prep__body { padding-top: 8px; }.stack-prep__body > p { margin: 0 0 8px; color: var(--ink-500); font-size: 8px; line-height: 1.5; }.stack-prep-rows { display: grid; gap: 6px; }.stack-prep-row { display: grid; grid-template-columns: 1fr 94px 34px; gap: 5px; align-items: end; }.stack-prep-row input { min-height: 44px; font-size: 11px; }.stack-prep-row button { min-height: 44px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); color: var(--danger); font-weight: 700; }.stack-prep-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px; margin-top: 8px; }.stack-prep-actions button { min-height: 48px; border: 1px solid var(--pine-700); border-radius: 6px; background: var(--white); color: var(--pine-900); font-size: 9px; font-weight: 700; }.stack-prep-actions button:last-child { border: 0; background: var(--pine-900); color: var(--white); }
.photo-capture-panel { border-left-color: var(--field-500); }.photo-capture-panel--first { margin-top: -2px; }
.analysis-panel { border-left-color: var(--field-500); }.analysis-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.analysis-panel > small { display: block; margin-top: 8px; color: var(--ink-500); font-size: 8px; line-height: 1.5; }.input-with-unit { display: grid; grid-template-columns: 1fr auto; align-items: stretch; }.input-with-unit input { border-radius: 6px 0 0 6px; }.input-with-unit small, .input-with-unit select { min-width: 64px; min-height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-left: 0; border-radius: 0 6px 6px 0; background: var(--mist-050); padding: 7px; color: var(--ink-700); font-size: 9px; font-weight: 700; }.input-with-unit select { width: 74px; }
.recent-stacks-panel, .attention-panel { padding: 0; border-left-color: var(--field-500); }.recent-stacks-panel > summary, .attention-panel > summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; cursor: pointer; list-style: none; }.recent-stacks-panel > summary::-webkit-details-marker, .attention-panel > summary::-webkit-details-marker { display: none; }.recent-stacks-panel > summary span, .attention-panel > summary span { display: grid; gap: 2px; }.recent-stacks-panel > summary strong, .attention-panel > summary strong { font-size: 11px; }.recent-stacks-panel > summary small, .attention-panel > summary small { color: var(--ink-500); font-size: 8px; }.recent-stacks-panel > summary::after, .attention-panel > summary::after { content: "＋"; color: var(--pine-700); font-size: 18px; font-weight: 700; }.recent-stacks-panel[open] > summary::after, .attention-panel[open] > summary::after { content: "−"; }.recent-stacks-panel > summary > strong, .attention-panel > summary > strong { margin-left: auto; color: var(--field-700); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.recent-stack-list { display: grid; gap: 6px; padding: 0 10px 10px; }.recent-stack-card { padding: 9px; border: 1px solid var(--line); border-left: 4px solid var(--pine-700); border-radius: 6px; background: var(--mist-050); }.recent-stack-card > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }.recent-stack-card > div strong { font-size: 10px; }.recent-stack-card > div small { color: var(--ink-500); font-size: 8px; }.recent-stack-card p { margin: 5px 0 0; }.recent-stack-card__scores { color: var(--pine-900); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; font-weight: 700; line-height: 1.5; }.recent-stack-card__analysis { color: var(--field-700); font-size: 8px; font-weight: 700; }.recent-stack-card__comment { color: var(--ink-700); font-size: 8px; line-height: 1.55; }.recent-stack-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 0 10px 10px; }.recent-stack-pager button { min-height: 42px; border: 1px solid var(--pine-700); border-radius: 5px; background: var(--white); color: var(--pine-900); font-size: 9px; font-weight: 700; }.recent-stack-pager button:disabled { border-color: var(--line); color: var(--ink-500); opacity: .55; }.recent-stack-pager output { min-width: 62px; color: var(--ink-500); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; text-align: center; }
.attention-panel__body { padding: 0 10px 10px; }.attention-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 9px; }.attention-options button { min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink-700); font-size: 9px; font-weight: 700; }.attention-options button.is-selected { border: 2px solid var(--danger); background: #f7e9e7; color: var(--danger); }.attention-panel textarea { min-height: 54px; }
.photo-source-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.camera-button, .album-button { min-height: 78px; display: grid; grid-template-columns: 36px 1fr; align-items: center; column-gap: 7px; border: 2px solid var(--pine-700); border-radius: 8px; background: var(--pine-100); padding: 9px; color: var(--pine-900); cursor: pointer; }.album-button { border-color: #c5a35e; background: var(--field-100); color: #68440d; }.camera-button > span, .album-button > span { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--pine-900); color: var(--white); font-size: 20px; }.album-button > span { background: var(--field-700); }.camera-button strong, .camera-button small, .album-button strong, .album-button small { display: block; }.camera-button strong, .album-button strong { font-size: 11px; line-height: 1.35; }.camera-button small, .album-button small { color: var(--ink-700); font-size: 8px; }.photo-save-note { margin: 6px 1px 0; color: var(--ink-500); font-size: 8px; }
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 9px; }.empty-message { grid-column: 1 / -1; margin: 4px 0; padding: 14px; background: var(--mist-050); color: var(--ink-500); font-size: 10px; text-align: center; }
.photo-thumb { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--mist-100); }.photo-thumb img { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; }.photo-thumb footer { padding: 5px; }.photo-thumb strong, .photo-thumb small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.photo-thumb strong { font-size: 8px; }.photo-thumb small { color: var(--ink-500); font-size: 7px; }.photo-thumb button { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: rgba(30,40,36,.76); color: var(--white); font-size: 12px; }

.quality-panel { border-left-color: var(--pine-700); }.quality-guidance { margin: 0 0 9px; padding: 9px; background: var(--pine-100); color: var(--ink-700); font-size: 9px; line-height: 1.55; }.quality-guidance strong { color: var(--pine-900); }
.quality-inline-list { display: grid; gap: 5px; }.quality-inline-row { padding: 8px 0 9px; border-bottom: 1px solid var(--line); }.quality-inline-row:first-child { padding-top: 2px; }.quality-inline-row__heading { min-height: 24px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }.quality-inline-row__heading strong { font-size: 12px; }.quality-inline-row__heading output { color: var(--pine-700); font-size: 9px; font-weight: 700; text-align: right; }.quality-inline-row__endpoints { display: flex; justify-content: space-between; margin-bottom: 4px; color: var(--ink-500); font-size: 7px; }.quality-inline-scale { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }.quality-inline-scale button { min-width: 0; min-height: 50px; border: 1px solid var(--line); border-radius: 4px; background: var(--mist-050); padding: 0; color: var(--ink-700); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; font-weight: 800; }.quality-inline-scale button.is-selected { border: 3px solid var(--pine-700); background: var(--pine-900); color: var(--white); }.quality-inline-scale button.is-selected::after { content: "✓"; display: block; margin-top: -2px; font-family: sans-serif; font-size: 8px; }
.grade-comparison-inline { margin-top: 9px; border: 1px solid #d8bd83; border-radius: 6px; background: #fffaf0; }.grade-comparison-inline > summary { min-height: 56px; display: flex; align-items: center; gap: 8px; padding: 10px; list-style: none; cursor: pointer; }.grade-comparison-inline > summary::-webkit-details-marker { display: none; }.grade-comparison-inline > summary span { display: grid; gap: 2px; }.grade-comparison-inline > summary strong { color: #68440d; font-size: 10px; }.grade-comparison-inline > summary small { color: var(--ink-500); font-size: 8px; }.grade-comparison-inline > summary > strong { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }.grade-comparison-inline > summary::after { content: "＋"; color: var(--field-700); font-size: 18px; font-weight: 700; }.grade-comparison-inline[open] > summary::after { content: "−"; }.grade-comparison-list { display: grid; gap: 7px; padding: 0 8px 8px; }.grade-comparison-row { padding: 8px; border: 1px solid #e4d3ad; border-radius: 5px; background: var(--white); }.grade-comparison-row > div:first-child { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }.grade-comparison-row strong { font-size: 10px; }.grade-comparison-row output { color: var(--field-700); font-size: 8px; font-weight: 700; }.grade-comparison-row > div:last-child { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }.grade-comparison-row button { min-height: 42px; border: 1px solid #d8bd83; border-radius: 5px; background: var(--field-100); color: #68440d; font-size: 8px; font-weight: 700; }.grade-comparison-row button.is-selected { border: 3px solid var(--field-700); background: #fff5de; }.grade-comparison-inline > p { margin: 0; padding: 0 10px 10px; color: var(--ink-500); font-size: 8px; line-height: 1.5; }
.text-action { width: 100%; min-height: 43px; margin-top: 8px; border: 1px dashed var(--line); border-radius: 5px; background: var(--white); color: var(--ink-500); font-size: 9px; }
.comment-panel { border-left-color: var(--pine-700); }.comment-panel > small { display: block; color: var(--ink-500); font-size: 8px; line-height: 1.55; }.comment-candidate { min-height: 70px; margin: 0 0 8px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--mist-050); font-size: 12px; line-height: 1.75; }
.grade-assessment-panel { border-left-color: var(--field-500); }.grade-assessment-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 9px; }.grade-assessment-options button { min-height: 46px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink-700); font-size: 9px; font-weight: 700; }.grade-assessment-options button.is-selected { border: 2px solid var(--field-700); background: var(--field-100); color: #67420d; }.grade-assessment-panel > small { display: block; margin-top: 7px; color: var(--ink-500); font-size: 8px; line-height: 1.55; }
.complete-button { width: 100%; min-height: 64px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 0; border-radius: 8px; background: var(--pine-900); color: var(--white); }.complete-button strong { font-size: 15px; }.complete-button small { margin-top: 2px; color: #c1d4cc; font-size: 8px; }

.review-summary { display: grid; grid-template-columns: repeat(2, 1fr); margin-bottom: 10px; border: 1px solid var(--line); background: var(--white); }.review-summary div { padding: 12px 9px; border-right: 1px solid var(--line); }.review-summary div:last-child { border-right: 0; }.review-summary span, .review-summary strong { display: block; }.review-summary span { color: var(--ink-500); font-size: 8px; }.review-summary strong { margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; }
.review-guidance { margin: 0 0 8px; padding: 9px 10px; border-left: 4px solid var(--field-500); background: var(--field-100); color: #68440d; font-size: 9px; line-height: 1.5; }
.review-controls { margin-bottom: 10px; padding: 11px; border: 1px solid var(--line); border-left: 5px solid var(--pine-700); border-radius: 7px; background: var(--white); }.review-controls__heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }.review-controls__heading strong { font-size: 11px; }.review-controls__heading button { min-height: 34px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); color: var(--pine-700); font-size: 8px; font-weight: 700; }.review-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.review-filter-grid input, .review-filter-grid select { min-height: 42px; font-size: 11px; }.review-controls > p { margin: 8px 0 0; color: var(--pine-700); font-size: 8px; font-weight: 700; }
.review-session-heading { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; padding: 9px 10px; border-left: 8px solid var(--field-500); background: var(--pine-900); color: var(--white); }.review-session-heading > div { min-width: 0; display: grid; gap: 2px; }.review-session-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.review-session-heading span, .review-session-heading small { color: #c9d9d3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; }.review-session-heading small { flex: 0 0 auto; }
.review-list { display: grid; gap: 8px; }.review-card { display: grid; grid-template-columns: 65px 1fr auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid var(--line); border-left: 5px solid var(--field-500); border-radius: 7px; background: var(--white); }.review-card-index { width: 58px; height: 58px; display: grid; place-items: center; background: var(--field-100); color: #68440d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px; font-weight: 700; }.review-card h2, .review-card p { margin: 0; }.review-card h2 { font-size: 13px; }.review-card p { margin-top: 3px; color: var(--ink-500); font-size: 8px; }.review-card aside { text-align: right; }.review-card aside strong, .review-card aside small { display: block; }.review-card aside strong { font-size: 13px; }.review-card aside small { color: var(--ink-500); font-size: 8px; }
.review-card .review-card-fingerprint { color: var(--pine-900); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; line-height: 1.5; }.review-card .review-card-comment { max-width: 58ch; color: var(--ink-700); font-size: 10px; font-weight: 700; line-height: 1.5; }.review-photo-strip { display: flex; gap: 5px; margin-top: 8px; overflow-x: auto; padding: 1px 1px 5px; scroll-snap-type: x proximity; }.review-photo-button { position: relative; flex: 0 0 64px; width: 64px; height: 64px; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 5px; background: var(--mist-100); padding: 0; }.review-photo-button img { width: 100%; height: 100%; display: block; object-fit: cover; }.review-photo-button span { position: absolute; right: 3px; bottom: 3px; min-width: 20px; padding: 2px 4px; border-radius: 999px; background: rgba(16,47,41,.8); color: var(--white); font-size: 7px; }.review-memo { margin-top: 8px; }.review-memo span { color: var(--ink-500); font-size: 8px; }.review-memo textarea { min-height: 58px; margin-top: 3px; padding: 8px; background: #fffdf8; font-size: 11px; }

.photo-lightbox { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 18px; }.photo-lightbox__backdrop { position: absolute; inset: 0; border: 0; background: rgba(8,24,21,.88); }.photo-lightbox__panel { position: relative; z-index: 1; width: min(100%, 760px); max-height: 92vh; display: grid; gap: 8px; border-top: 6px solid var(--field-500); border-radius: 8px; background: var(--white); padding: 10px; }.photo-lightbox__panel img { width: 100%; max-height: 78vh; display: block; object-fit: contain; background: var(--pine-950); }.photo-lightbox__panel p { margin: 0; color: var(--ink-700); font-size: 10px; text-align: center; }.photo-lightbox__close { justify-self: end; min-width: 68px; min-height: 42px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); color: var(--ink-900); font-size: 10px; font-weight: 700; }

.diagnostics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }.diagnostics-grid > div { min-height: 80px; display: flex; flex-direction: column; justify-content: center; padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }.diagnostics-grid > div:nth-child(2n) { border-right: 0; }.diagnostics-grid > div:nth-last-child(-n+2) { border-bottom: 0; }.diagnostics-grid span { color: var(--ink-500); font-size: 8px; }.diagnostics-grid strong { margin-top: 3px; font-size: 12px; }
.internal-export-note { display: grid; gap: 3px; margin: 0 0 9px; padding: 10px; border-left: 5px solid var(--danger); background: #f7e9e7; }.internal-export-note strong { color: var(--danger); font-size: 10px; }.internal-export-note span { color: var(--ink-700); font-size: 8px; line-height: 1.55; }
.diagnostic-actions { display: grid; gap: 7px; margin-bottom: 11px; }.diagnostic-actions button, .test-log-panel button { min-height: 48px; border: 1px solid var(--pine-700); border-radius: 7px; background: var(--white); color: var(--pine-900); font-size: 11px; font-weight: 700; }.diagnostic-actions .danger-button { border-color: #d3a29e; color: var(--danger); }
.test-log-panel pre { min-height: 160px; max-height: 320px; overflow: auto; margin: 0; padding: 10px; background: var(--pine-950); color: #d7e4df; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; line-height: 1.6; white-space: pre-wrap; }.test-log-panel .panel-title button { min-height: 34px; padding: 5px 9px; }

.bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; min-height: calc(68px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); padding-bottom: var(--safe-bottom); border-top: 1px solid var(--line); background: var(--white); }.bottom-nav button { min-height: 68px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; border: 0; border-top: 4px solid transparent; background: var(--white); color: var(--ink-500); font-size: 9px; }.bottom-nav button span { font-size: 17px; }.bottom-nav button.is-active { border-top-color: var(--field-500); color: var(--pine-900); font-weight: 700; }
.toast { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(80px + var(--safe-bottom)); transform: translateY(140%); padding: 12px 14px; border-left: 5px solid var(--field-500); border-radius: 7px; background: var(--ink-900); color: var(--white); font-size: 10px; opacity: 0; pointer-events: none; transition: transform .15s ease, opacity .15s ease; }.toast.is-visible { transform: translateY(0); opacity: 1; }

@media (min-width: 680px) {
  .stack-rail, .session-bar { width: min(100%, 720px); margin-left: auto; margin-right: auto; }
  .stack-rail { top: 0; }
  .session-bar { top: 78px; }
}

@media (max-width: 390px) {
  .session-bar { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .field-grid { gap: 6px; }.panel { padding: 11px; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .grade-assessment-options { grid-template-columns: repeat(2, 1fr); }
  .analysis-fields { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
