:root { color-scheme: light; --ink:#28241f; --muted:#746c64; --paper:#f4efe8; --card:#fffdf9; --line:#ded4c9; --accent:#a65b45; --accent-dark:#7c3e30; --good:#3f725c; --bad:#ac4b42; --shadow:0 18px 50px rgba(73,50,31,.11); font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:radial-gradient(circle at 12% 0%, #fffaf4 0 28%, transparent 52%), var(--paper); color:var(--ink); }
button, input, textarea, select { font:inherit; }
button { cursor:pointer; }
.shell { width:min(100% - 28px, 1080px); margin:0 auto; padding:28px 0 52px; }
.brand { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:26px; }
.brand h1 { margin:0; font:700 clamp(24px,5vw,42px)/1.05 Georgia,serif; letter-spacing:.02em; }
.brand p { margin:9px 0 0; color:var(--muted); font-size:14px; }
.brand a { color:var(--muted); text-decoration:none; font-size:13px; }
.card { background:rgba(255,253,249,.9); border:1px solid rgba(222,212,201,.9); border-radius:24px; box-shadow:var(--shadow); padding:clamp(18px,4vw,34px); }
.intro { display:grid; gap:18px; grid-template-columns:1.12fr .88fr; align-items:center; }
.intro h2 { margin:0; font:600 clamp(26px,5vw,46px)/1.12 Georgia,serif; }
.intro .lead { color:var(--muted); line-height:1.8; margin:12px 0 0; }
.steps { display:flex; gap:8px; flex-wrap:wrap; margin:20px 0 0; }
.step-pill { padding:8px 11px; border-radius:999px; background:#f1e7dc; color:#6e5146; font-size:12px; }
.notice { border-left:3px solid var(--accent); padding:12px 14px; background:#fbf5ee; color:#5e4c43; line-height:1.65; font-size:13px; }
.primary, .secondary, .danger { border:0; border-radius:999px; padding:13px 20px; font-weight:700; transition:transform .16s, background .16s; }
.primary { background:var(--accent); color:#fff; box-shadow:0 8px 18px rgba(166,91,69,.25); }
.primary:hover { background:var(--accent-dark); transform:translateY(-1px); }
.secondary { background:#eee4da; color:#5e4439; }
.danger { background:#f6ddda; color:#8a3e38; }
button:disabled { cursor:not-allowed; opacity:.48; transform:none; }
.toolbar { display:flex; justify-content:space-between; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:18px; }
.toolbar h2, .toolbar h3 { margin:0; font:600 24px Georgia,serif; }
.capture-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr); gap:22px; align-items:start; }
.camera-card { position:relative; overflow:hidden; background:#1f211f; border-radius:22px; aspect-ratio:3/4; min-height:390px; display:flex; align-items:center; justify-content:center; }
.camera-card video { position:relative; z-index:0; width:100%; height:100%; object-fit:cover; transform:scaleX(-1); }
.camera-card.rear video { transform:none; }
.camera-card #frame-canvas { display:none; }
.camera-card #overlay-canvas { position:absolute; z-index:2; inset:0; display:block; width:100%; height:100%; pointer-events:none; transform:scaleX(-1); }
.camera-card.rear #overlay-canvas { transform:none; }
.camera-card .guide { position:absolute; z-index:1; inset:10% 10%; border:2px solid rgba(255,248,233,.62); border-radius:46% 46% 42% 42%; pointer-events:none; box-shadow:0 0 0 999px rgba(16,16,14,.12); transition:all .2s ease; }
.camera-card .guide.guide-left_45 { inset:11% 16% 9% 9%; transform:rotate(-5deg); border-radius:50% 44% 48% 52%; }
.camera-card .guide.guide-right_45 { inset:11% 9% 9% 16%; transform:rotate(5deg); border-radius:44% 50% 52% 48%; }
.camera-card .guide.guide-left_90 { inset:14% 25% 12% 11%; transform:rotate(-4deg); border-radius:48% 38% 48% 58%; }
.camera-card .guide.guide-right_90 { inset:14% 11% 12% 25%; transform:rotate(4deg); border-radius:38% 48% 58% 48%; }
.camera-card .guide.guide-front_smile_teeth { border-color:rgba(255,248,233,.82); }
.camera-card .camera-label { position:absolute; z-index:3; top:14px; left:14px; right:14px; display:flex; justify-content:space-between; gap:8px; color:#fff8ed; font-size:12px; text-shadow:0 1px 4px #000; }
.camera-card .camera-status { position:absolute; z-index:3; bottom:14px; left:14px; right:14px; padding:12px 14px; border-radius:14px; background:rgba(20,22,20,.7); color:#fff8ed; line-height:1.5; font-size:13px; }
.camera-card .camera-status.good { background:rgba(36,90,67,.9); }
.camera-card .camera-status.bad { background:rgba(121,45,43,.88); }
.slot-card { border:1px solid var(--line); border-radius:17px; padding:16px; background:#fffdfa; }
.slot-card h3 { margin:0 0 5px; font-size:18px; }
.slot-card p { margin:0; color:var(--muted); font-size:13px; line-height:1.55; }
.slot-card.active { border-color:var(--accent); box-shadow:0 8px 24px rgba(166,91,69,.12); }
.slot-card.done { border-color:#92b9a3; background:#f3faf4; }
.slot-list { display:grid; gap:10px; }
.slot-actions { display:flex; gap:9px; flex-wrap:wrap; margin-top:12px; }
.progress-line { height:9px; border-radius:99px; background:#e8ddd2; overflow:hidden; margin:14px 0 18px; }
.progress-line > span { display:block; height:100%; width:0; background:var(--accent); transition:width .25s; }
.quality-list { display:grid; gap:8px; margin:15px 0; padding:0; list-style:none; }
.quality-list li { display:flex; gap:8px; align-items:flex-start; color:var(--muted); font-size:13px; line-height:1.45; }
.quality-list li::before { content:"○"; color:#a89284; font-weight:700; }
.quality-list li.ok { color:var(--good); }
.quality-list li.ok::before { content:"✓"; color:var(--good); }
.quality-list li.fail { color:var(--bad); }
.quality-list li.fail::before { content:"!"; color:var(--bad); }
.reference-box { border:1px dashed #bda999; border-radius:17px; padding:16px; background:#fffaf4; }
.reference-preview { display:none; width:100%; max-height:210px; object-fit:contain; border-radius:12px; margin-top:12px; background:#eaded1; }
.reference-box.has-file .reference-preview { display:block; }
.reference-box.has-file .reference-empty { display:none; }
.reference-empty { color:var(--muted); font-size:13px; line-height:1.6; }
.chips { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0; }
.chip { position:relative; }
.chip input { position:absolute; opacity:0; }
.chip span { display:block; border:1px solid var(--line); padding:8px 11px; border-radius:999px; color:#6d584d; font-size:12px; }
.chip input:checked + span { color:#fff; background:var(--accent); border-color:var(--accent); }
textarea, input[type=password], input[type=text], select { width:100%; border:1px solid var(--line); border-radius:12px; background:#fff; padding:11px 12px; color:var(--ink); }
textarea { min-height:76px; resize:vertical; }
.submit-bar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-top:22px; padding-top:18px; border-top:1px solid var(--line); }
.fine { color:var(--muted); font-size:12px; line-height:1.6; }
.success { text-align:center; padding:42px 16px; }
.success .mark { width:64px; height:64px; border-radius:50%; display:grid; place-items:center; margin:0 auto 15px; background:#e1f1e5; color:var(--good); font-size:32px; }
.admin-grid { display:grid; grid-template-columns:330px 1fr; gap:20px; align-items:start; }
.form-stack { display:grid; gap:12px; }
.submission { border:1px solid var(--line); border-radius:16px; padding:15px; background:#fffdfa; margin-bottom:10px; }
.submission-head { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.submission-head strong { font-size:15px; }
.muted { color:var(--muted); }
.file-links { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.file-links a { padding:7px 9px; border-radius:999px; background:#f1e7dc; color:#65483c; text-decoration:none; font-size:12px; }
.empty { border:1px dashed var(--line); border-radius:15px; padding:28px; color:var(--muted); text-align:center; }
#toast { position:fixed; z-index:10; left:50%; bottom:20px; transform:translate(-50%,20px); opacity:0; pointer-events:none; background:#25211e; color:#fff; padding:11px 15px; border-radius:999px; transition:all .2s; font-size:13px; max-width:calc(100% - 32px); text-align:center; }
#toast.show { opacity:1; transform:translate(-50%,0); }
@media (max-width:760px) { .shell { width:min(100% - 18px, 620px); padding-top:18px; } .intro, .capture-grid, .admin-grid { grid-template-columns:1fr; } .camera-card { aspect-ratio:4/5; min-height:0; } .brand { align-items:flex-start; } .brand a { padding-top:8px; } .submit-bar { align-items:stretch; flex-direction:column; } .submit-bar button { width:100%; } }
