:root { color-scheme: dark; --bg:#101827; --panel:#192538; --muted:#a8b5c8; --accent:#70d6b2; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:#f4f7fb; font-family:system-ui,-apple-system,"Segoe UI",sans-serif; }
.app { width:min(760px,100%); margin:0 auto; padding:28px 16px 48px; }
header { margin-bottom:22px; }
.eyebrow { color:var(--accent); letter-spacing:.16em; font-size:11px; font-weight:700; }
h1 { font-size:clamp(27px,6vw,38px); margin:8px 0; }
.subtitle,.hint,footer { color:var(--muted); line-height:1.6; font-size:14px; }
.panel { background:var(--panel); border:1px solid #2a3a52; border-radius:18px; padding:18px; margin:16px 0; }
h2 { font-size:18px; margin:0 0 15px; }
.upload { display:flex; flex-direction:column; gap:7px; align-items:center; justify-content:center; min-height:110px; border:1px dashed #61738c; border-radius:13px; cursor:pointer; text-align:center; }
.upload input { max-width:90%; }
.upload span { color:var(--accent); font-weight:700; }
.upload small { color:var(--muted); }
.preview-wrap { position:relative; margin-top:14px; overflow:hidden; border-radius:12px; background:#080d15; }
.preview-wrap img { display:block; width:100%; height:auto; }
.preview-wrap canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.hidden { display:none !important; }
button { border:0; border-radius:11px; padding:13px 17px; margin-top:14px; background:var(--accent); color:#102019; font-weight:800; font-size:15px; cursor:pointer; }
button:disabled { opacity:.4; cursor:not-allowed; }
button.secondary { background:#35465e; color:#fff; }
.status { color:var(--muted); font-size:13px; min-height:20px; }
.analysis-text { font-size:13px; line-height:1.7; color:#dce6f3; }
.camera-wrap { position:relative; width:100%; aspect-ratio:4/3; background:#05080d; border-radius:13px; overflow:hidden; }
.camera-wrap video { width:100%; height:100%; object-fit:contain; display:block; }
.camera-wrap canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.camera-placeholder { position:absolute; inset:0; display:grid; place-items:center; color:#9aa9bd; font-size:14px; pointer-events:none; }
.button-row { display:flex; gap:10px; flex-wrap:wrap; }
.button-row button { flex:1; }
footer { text-align:center; padding-top:12px; font-size:12px; }
@media (max-width:420px) { .panel { padding:14px; } .button-row button { width:100%; } }

.guide-controls { display:flex; flex-wrap:wrap; gap:8px 16px; margin:16px 0; padding:12px; border:1px solid #61738c; border-radius:11px; }
.guide-controls legend { padding:0 5px; color:var(--muted); font-size:13px; }
.guide-controls label { display:flex; align-items:center; gap:7px; min-height:40px; cursor:pointer; font-size:14px; }
.guide-controls input { width:18px; height:18px; accent-color:var(--accent); }
.guide-controls input:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.confidence-warning { padding:10px 12px; border-left:3px solid #ffcc55; border-radius:5px; color:#ffe6a3; background:#3b321e; }
