:root {
  color-scheme: light;
  --ink: #222;
  --muted: #777;
  --line: #e5e5e5;
  --surface: #f7f7f7;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #555; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { max-width: 1024px; padding: 0 36px; margin: auto; }
header { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 650; letter-spacing: -.5px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.lab-tag { font-size: 12px; color: var(--muted); }
.header-tools { display: flex; align-items: center; gap: 22px; }
.language-switch { display: flex; gap: 3px; }
.language-switch button { padding: 5px 8px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 12px; }
.language-switch button[aria-pressed=true] { background: #f0f0f0; color: var(--ink); }
.language-switch button:hover { color: var(--ink); }
.intro { padding: 44px 0 34px; }
h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); line-height: 1.2; font-weight: 600; letter-spacing: -1.5px; }
.subtitle { margin: 14px 0 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
.experiment { display: grid; grid-template-columns: 1.12fr 1fr; gap: 36px; align-items: start; }
.viewer { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.view-top, .view-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 41px; padding: 0 15px; font-size: 12px; color: var(--muted); }
.view-top { border-bottom: 1px solid var(--line); }
.view-bottom { border-top: 1px solid var(--line); }
.view-bottom > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.view-bottom a { flex-shrink: 0; text-decoration: none; }
.view-bottom a:hover { color: var(--ink); text-decoration: underline; }
.photo-stage { position: relative; aspect-ratio: 1.35; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--surface); }
.photo-stage > img { width: 100%; height: 100%; object-fit: contain; }
.result-banner { position: absolute; bottom: 0; left: 0; width: 100%; display: none; align-items: center; justify-content: center; height: 76px; font-size: 34px; font-weight: 600; letter-spacing: -1px; color: #fff; }
.viewer.positive .result-banner { display: flex; background: #22843c; }
.viewer.negative .result-banner { display: flex; background: #cd3d35; }
.viewer.busy .photo-stage > img { opacity: .6; }
.scan-line { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: #888; }
.busy .scan-line { display: block; animation: scan 1.8s linear infinite; }
.drop-overlay { display: none; position: absolute; inset: 0; background: #fffffff0; color: var(--ink); font-size: 18px; align-items: center; justify-content: center; border: 2px dashed #888; }
.dragover .drop-overlay { display: flex; }
.section-heading { margin: 0 0 14px; }
.section-heading h2 { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 500; }
.examples { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.sample { min-width: 0; padding: 0; background: none; border: 0; color: var(--muted); text-align: center; }
.sample-image { display: block; width: 100%; aspect-ratio: 1; border-radius: 4px; outline: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.sample img { width: 100%; height: 100%; object-fit: cover; }
.sample:first-child img { object-fit: contain; }
.sample > span:last-child { display: block; margin-top: 10px; font-size: 11px; white-space: nowrap; }
.sample:hover .sample-image { outline-color: #aaa; }
.sample[aria-pressed=true] .sample-image { outline: 2px solid var(--ink); outline-offset: 3px; }
.sample[aria-pressed=true] { color: var(--ink); }
.separator { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: #999; font-size: 12px; }
.separator:before, .separator:after { content: ''; height: 1px; background: var(--line); flex: 1; }
.upload { width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); font-size: 14px; text-align: center; }
.upload:hover { background: var(--surface); border-color: #bbb; }
.upload small { display: block; margin-top: 7px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.decide { width: 100%; margin-top: 16px; padding: 15px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: #fff; text-align: center; font-size: 14px; font-weight: 500; }
.decide:hover { background: #444; border-color: #444; }
.status-line { min-height: 22px; margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.status-line.error { color: #b3322c; }
.quota-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.metrics { display: flex; justify-content: space-between; gap: 12px; margin-top: 15px; padding-top: 16px; border-top: 1px solid var(--line); }
.metrics span { display: block; font-size: 11px; color: var(--muted); }
.metrics strong { display: block; margin-top: 8px; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.about { margin-top: 36px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 20px 0; cursor: pointer; font-size: 14px; }
.about summary::-webkit-details-marker { display: none; }
.about summary > span:first-child { display: flex; align-items: baseline; gap: 14px; }
.about summary small { color: var(--muted); font-size: 12px; }
.expand-icon { color: var(--muted); font-size: 20px; font-weight: 300; }
.about[open] .expand-icon { transform: rotate(45deg); }
.about-content { padding: 10px 0 24px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.about h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.about p { font-size: 12px; color: var(--muted); line-height: 1.9; }
.about a { font-size: 12px; color: #555; }
.link-divider { color: #aaa; }
.about code { font: 11px var(--mono); color: #555; }
.prompt-block { margin-top: 26px; padding: 18px; background: var(--surface); border-radius: 4px; }
.prompt-block p { font-size: 12px; }
.prompt-block small { font-size: 11px; line-height: 1.8; color: var(--muted); }
.payload-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 26px 0 12px; }
.payload-heading h3 { margin: 0; }
.payload-heading > span { min-width: 0; overflow-wrap: anywhere; font-size: 10px; color: var(--muted); text-align: right; }
.payload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.payload-grid > div { min-width: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.code-label { display: block; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
pre { margin: 0; padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 370px; overflow-y: auto; color: #666; font: 11px/1.8 var(--mono); }
.about p.privacy, .about p.credits { margin: 20px 0 0; font-size: 11px; }
.about p.credits { margin-top: 10px; }
.credits a { font-size: 11px; }
footer { padding: 22px 0 32px; color: #999; font-size: 11px; }
@keyframes scan { from { top: 0; } to { top: 100%; } }
@media (max-width: 700px) {
  .shell { max-width: 480px; padding: 0 24px; }
  header { height: 72px; }
  .brand { font-size: 18px; }
  .lab-tag { font-size: 10px; }
  .header-tools { gap: 12px; }
  .header-tools .lab-tag { display: none; }
  .intro { padding: 32px 0 28px; }
  h1 { font-size: 30px; letter-spacing: -1px; }
  .subtitle { font-size: 12px; margin-top: 12px; }
  .experiment { grid-template-columns: 1fr; gap: 26px; }
  .photo-stage { aspect-ratio: 1.3; }
  .view-top, .view-bottom { height: 36px; font-size: 11px; }
  .result-banner { height: 66px; font-size: 30px; }
  .about { margin-top: 28px; }
  .about-grid, .payload-grid { grid-template-columns: 1fr; gap: 24px; }
  .payload-grid { gap: 12px; }
  .payload-heading { align-items: start; }
  footer { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; }
}
