:root {
  color-scheme: dark;
  --bg:#080b10; --surface:#111720; --surface-2:#171f2b; --line:#263142;
  --text:#f2f6fb; --muted:#8e9bad; --blue:#5b8cff; --blue-2:#7ca5ff;
  --green:#45d09b; --orange:#f3ad55; --red:#f16f7e;
}
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:radial-gradient(circle at 70% -10%,#17223a 0,transparent 34%),var(--bg); color:var(--text); font:14px/1.5 Inter,Pretendard,"Noto Sans KR",system-ui,sans-serif; }
button,input { font:inherit; }
button { cursor:pointer; }
.hidden { display:none!important; }
.eyebrow { margin:0 0 5px; color:#86a7ff; font-size:10px; font-weight:700; letter-spacing:1.6px; }
.brand-mark { display:grid; place-items:center; width:40px; height:40px; border-radius:12px; background:linear-gradient(145deg,#77a4ff,#4268de); color:white; font-weight:800; box-shadow:0 9px 28px rgba(91,140,255,.28); }
.login-view { min-height:100vh; display:grid; place-items:center; padding:20px; }
.login-card { width:min(420px,100%); padding:38px; border:1px solid var(--line); border-radius:22px; background:rgba(17,23,32,.94); box-shadow:0 30px 90px rgba(0,0,0,.42); }
.login-card .eyebrow { margin-top:20px; }
.login-card h1 { margin:0 0 8px; font-size:30px; letter-spacing:-1px; }
.login-copy { margin:0 0 28px; color:var(--muted); }
.quiet-link { display:block; margin-top:20px; color:var(--muted); text-align:center; text-decoration:none; font-size:12px; }
.capture-app { min-height:100vh; }
.topbar { position:sticky; top:0; z-index:20; min-height:72px; padding:14px max(24px,calc((100vw - 1440px)/2)); display:flex; align-items:center; justify-content:space-between; gap:18px; border-bottom:1px solid rgba(38,49,66,.9); background:rgba(8,11,16,.88); backdrop-filter:blur(18px); }
.brand-row,.top-actions { display:flex; align-items:center; gap:12px; }
.brand-row strong,.brand-row small { display:block; }
.brand-row strong { font-size:16px; }
.brand-row small { color:var(--muted); font-size:10px; }
.connection { display:flex; align-items:center; gap:7px; color:var(--muted); font-size:12px; }
.connection i { width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 12px var(--green); }
.connection.off i { background:var(--red); box-shadow:0 0 12px var(--red); }
main { width:min(1440px,100%); margin:auto; padding:34px 24px 70px; }
.hero { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:24px; }
.hero h1 { margin:0; font-size:30px; letter-spacing:-1px; }
.hero > div > p:last-child { margin:7px 0 0; color:var(--muted); }
.device-chip { min-width:190px; padding:11px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.device-chip span,.device-chip strong { display:block; }
.device-chip span { color:var(--muted); font-size:10px; }
.device-chip strong { margin-top:3px; font-size:13px; }
.stepper { margin:0 0 18px; padding:0; display:grid; grid-template-columns:repeat(4,1fr); list-style:none; border:1px solid var(--line); border-radius:15px; overflow:hidden; background:var(--surface); }
.stepper li { position:relative; min-width:0; display:flex; align-items:center; gap:11px; padding:14px 17px; color:var(--muted); border-right:1px solid var(--line); }
.stepper li:last-child { border:0; }
.stepper li > span { flex:0 0 auto; display:grid; place-items:center; width:27px; height:27px; border-radius:50%; background:#222b38; font-size:11px; font-weight:700; }
.stepper strong,.stepper small { display:block; }
.stepper strong { color:#b6c0cd; font-size:12px; }
.stepper small { font-size:10px; }
.stepper li.active { background:rgba(91,140,255,.09); }
.stepper li.active > span,.stepper li.done > span { background:var(--blue); color:white; }
.stepper li.active strong,.stepper li.done strong { color:white; }
.stepper li.done > span { background:var(--green); }
.workspace { display:grid; grid-template-columns:minmax(310px,.7fr) minmax(520px,1.3fr); gap:18px; align-items:start; }
.card { min-width:0; padding:22px; border:1px solid var(--line); border-radius:16px; background:rgba(17,23,32,.96); box-shadow:0 12px 35px rgba(0,0,0,.12); }
.card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:20px; }
.card-head h2 { margin:0; font-size:19px; letter-spacing:-.4px; }
.card-head p:last-child { margin:4px 0 0; color:var(--muted); font-size:12px; }
.pill { display:inline-flex; padding:5px 9px; border-radius:999px; font-size:10px; white-space:nowrap; }
.pill.neutral { color:#b8c2d0; background:#202936; }
.pill.blue { color:#a9bfff; background:rgba(91,140,255,.14); }
.pill.green { color:var(--green); background:rgba(69,208,155,.12); }
.pill.orange { color:var(--orange); background:rgba(243,173,85,.12); }
.pill.red { color:var(--red); background:rgba(241,111,126,.12); }
.mode-tabs { display:grid; grid-template-columns:1fr 1fr; gap:5px; padding:4px; margin-bottom:18px; border-radius:11px; background:#0b1017; }
.mode-tabs button { padding:10px; border:0; border-radius:8px; color:var(--muted); background:transparent; }
.mode-tabs button.active { color:white; background:var(--surface-2); box-shadow:0 2px 8px rgba(0,0,0,.25); }
label { display:grid; gap:7px; margin-bottom:15px; color:#bec8d4; font-size:12px; }
input { width:100%; padding:12px 13px; border:1px solid var(--line); border-radius:9px; outline:none; background:#0b1017; color:var(--text); }
input:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(91,140,255,.13); }
.nfc-zone { width:100%; min-height:180px; display:grid; place-items:center; align-content:center; gap:6px; padding:20px; border:1px dashed #3c4b61; border-radius:13px; color:var(--text); background:radial-gradient(circle,rgba(91,140,255,.15),transparent 68%); }
.nfc-zone:hover,.nfc-zone:focus { border-color:var(--blue); outline:none; }
.nfc-zone.scanning { border-color:var(--blue); box-shadow:inset 0 0 30px rgba(91,140,255,.08); }
.nfc-zone.received { border-color:var(--green); background:rgba(69,208,155,.09); }
.nfc-symbol { display:grid; place-items:center; width:58px; height:58px; border-radius:50%; color:#a9beff; background:rgba(91,140,255,.15); font-size:30px; animation:pulse 1.8s infinite; }
.nfc-zone strong { margin-top:6px; font-size:17px; }
.nfc-zone small { color:var(--muted); }
.nfc-zone em { margin-top:5px; color:#9db8ff; font-size:11px; font-style:normal; }
.bridge-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; }
.bridge-row a { color:#9eb8ff; font-size:10px; text-decoration:none; }
.bridge-row a:hover { text-decoration:underline; }
.bridge-downloads { display:flex; gap:10px; }
.hardware-note code { color:#b3c4ef; }
@keyframes pulse { 50% { transform:scale(1.06); box-shadow:0 0 0 13px rgba(91,140,255,0); } }
.divider { display:flex; align-items:center; gap:10px; margin:17px 0; color:var(--muted); font-size:10px; }
.divider::before,.divider::after { content:""; flex:1; height:1px; background:var(--line); }
.hardware-note { margin:0 0 17px; padding:10px 12px; border-radius:9px; color:var(--muted); background:#0c1118; font-size:10px; }
.button { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:9px 14px; border:1px solid transparent; border-radius:9px; color:white; text-decoration:none; white-space:nowrap; }
.button.primary { background:linear-gradient(135deg,var(--blue),#496fdf); box-shadow:0 7px 20px rgba(91,140,255,.17); }
.button.secondary { border-color:#344156; background:#1a2330; }
.button.ghost { min-height:35px; padding:7px 10px; border-color:var(--line); background:transparent; color:#c2cbd6; }
.button.danger { color:#f5a2ac; }
.button:disabled { opacity:.4; cursor:not-allowed; box-shadow:none; }
.identity-card > .button.primary { width:100%; }
.message { min-height:19px; margin:11px 0 0; color:var(--muted); font-size:11px; }
.message.success { color:var(--green); }
.message.error { color:var(--red); }
.session-card.empty { min-height:545px; display:grid; place-items:center; }
.empty-state { text-align:center; }
.empty-state > span { display:grid; place-items:center; width:62px; height:62px; margin:0 auto 16px; border-radius:50%; color:#9cb5f5; background:rgba(91,140,255,.12); font-size:28px; }
.empty-state h2 { margin:0 0 5px; font-size:18px; }
.empty-state p { margin:0; color:var(--muted); }
.session-head h2 { font-size:25px; }
.camera-area { margin-bottom:16px; overflow:hidden; border:1px solid var(--line); border-radius:13px; background:#05070a; }
.camera-area video { width:100%; max-height:430px; display:block; object-fit:contain; }
.camera-actions { display:flex; gap:8px; padding:12px; }
.camera-actions .primary { flex:1; }
.drop-zone { padding:26px 18px; border:1px dashed #3b485c; border-radius:13px; text-align:center; background:#0c1118; transition:.15s; }
.drop-zone.dragging { border-color:var(--blue); background:rgba(91,140,255,.08); }
.drop-icon { width:38px; height:38px; margin:0 auto 9px; display:grid; place-items:center; border-radius:10px; background:var(--surface-2); color:#9cb7ff; font-size:22px; }
.drop-zone strong,.drop-zone small { display:block; }
.drop-zone small { margin-top:3px; color:var(--muted); font-size:10px; }
.capture-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin-top:15px; }
.file-button { position:relative; cursor:pointer; }
.file-button input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.queue-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:18px 0 9px; }
.queue-head strong,.queue-head small { display:block; }
.queue-head small { color:var(--muted); font-size:10px; }
.text-button { padding:0; border:0; color:#9eb6f7; background:transparent; font-size:10px; }
.photo-queue { max-height:260px; overflow:auto; display:grid; gap:8px; }
.queue-empty { padding:17px; border-radius:9px; color:var(--muted); background:#0c1118; text-align:center; font-size:11px; }
.photo-item { display:grid; grid-template-columns:56px minmax(0,1fr) auto; align-items:center; gap:11px; padding:8px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.photo-thumb { width:56px; height:48px; object-fit:cover; border-radius:7px; background:#080b10; }
.photo-meta { min-width:0; }
.photo-meta strong,.photo-meta small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.photo-meta strong { font-size:11px; }
.photo-meta small { color:var(--muted); font-size:9px; }
.photo-status { display:flex; align-items:center; gap:8px; }
.remove-photo { width:25px; height:25px; border:0; border-radius:7px; color:var(--muted); background:#222c39; }
.session-actions { display:grid; grid-template-columns:1fr; gap:9px; margin-top:16px; }
.processing-card { margin-top:18px; }
.job-flow { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.job-card { padding:15px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); }
.job-title { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.job-title strong { font-size:12px; }
.job-card p { min-height:18px; margin:8px 0 0; color:var(--muted); font-size:10px; }
.progress { height:6px; margin-top:11px; overflow:hidden; border-radius:6px; background:#252e3b; }
.progress i { display:block; height:100%; background:linear-gradient(90deg,var(--blue),var(--blue-2)); transition:width .25s; }
.result-assets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.result-card { display:grid; grid-template-columns:90px minmax(0,1fr); gap:13px; align-items:center; padding:11px; border:1px solid var(--line); border-radius:11px; background:#0c1118; }
.result-card img,.result-placeholder { width:90px; height:84px; object-fit:contain; border-radius:8px; background:#080b10; }
.result-placeholder { display:grid; place-items:center; color:#7991c9; font-size:30px; }
.result-card strong,.result-card small { display:block; }
.result-card small { margin:5px 0 9px; color:var(--muted); font-size:10px; }
.result-card a { color:#a9beff; font-size:11px; }
.processing-actions { display:flex; gap:9px; margin-top:16px; }
.processing-actions .primary { min-width:200px; }
dialog { width:min(440px,calc(100% - 30px)); padding:0; border:1px solid var(--line); border-radius:16px; color:var(--text); background:var(--surface); box-shadow:0 25px 80px rgba(0,0,0,.55); }
dialog::backdrop { background:rgba(3,5,8,.72); backdrop-filter:blur(4px); }
dialog form { padding:22px; }
.dialog-close { width:32px; height:32px; border:1px solid var(--line); border-radius:8px; color:var(--text); background:transparent; font-size:20px; }
#toast { position:fixed; right:22px; bottom:22px; z-index:50; max-width:min(420px,calc(100% - 44px)); padding:12px 16px; border-radius:10px; color:#10151d; background:#edf3ff; box-shadow:0 15px 45px rgba(0,0,0,.38); opacity:0; transform:translateY(10px); pointer-events:none; transition:.2s; }
#toast.show { opacity:1; transform:none; }
@media (max-width:900px) {
  .workspace { grid-template-columns:1fr; }
  .stepper { grid-template-columns:1fr 1fr; }
  .stepper li:nth-child(2) { border-right:0; }
  .stepper li:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .session-card.empty { min-height:300px; }
}
@media (max-width:620px) {
  .topbar { align-items:flex-start; padding:12px 15px; }
  .top-actions { justify-content:flex-end; flex-wrap:wrap; }
  .connection { width:100%; justify-content:flex-end; }
  main { padding:24px 14px 55px; }
  .hero { align-items:flex-start; flex-direction:column; }
  .hero h1 { font-size:26px; }
  .device-chip { width:100%; }
  .stepper li { padding:11px; }
  .stepper small { display:none; }
  .card { padding:17px; }
  .session-actions,.job-flow,.result-assets { grid-template-columns:1fr; }
  .processing-actions { flex-direction:column; }
  .processing-actions .primary { min-width:0; }
}
