:root {
  color-scheme: light;
  --color-primary: #0369a1;
  --color-on-primary: #ffffff;
  --color-secondary: #0ea5e9;
  --color-success: #15803d;
  --color-destructive: #b4232a;
  --color-ring: #0369a1;
  --bg: #f0f7fb;
  --panel: #ffffff;
  --ink: #102f44;
  --muted: #526b7a;
  --muted-strong: #344f60;
  --line: #cfe1eb;
  --line-soft: #e7eff4;
  --accent: var(--color-primary);
  --accent-dark: #075985;
  --accent-soft: #e0f2fe;
  --indigo: var(--color-secondary);
  --danger: var(--color-destructive);
  --warning: #925b0b;
  --ok: var(--color-success);
  --radius: 16px;
  --shadow: 0 18px 48px rgba(12, 74, 110, 0.08), 0 2px 8px rgba(12, 74, 110, 0.04);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease-out;
}

.skip-link:focus { transform: translateY(0); }

.app-bg {
  position: fixed;
  inset: 0 0 auto;
  z-index: -1;
  height: 460px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(186, 230, 253, .52), rgba(240, 247, 251, 0) 62%);
}

.app-bg::before,
.app-bg::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  filter: blur(1px);
}

.app-bg::before { width: 360px; height: 360px; top: -210px; right: 6%; background: rgba(14, 165, 233, .12); }
.app-bg::after { width: 240px; height: 240px; top: 70px; left: -150px; border: 45px solid rgba(3, 105, 161, .05); }

button, input, select { font: inherit; }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1240px, calc(100% - 48px));
  height: 88px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(189, 207, 203, .65);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: var(--ink); color: #fff; box-shadow: 0 8px 18px rgba(16, 42, 42, .16); }
.brand-mark svg { width: 25px; height: 25px; }
.brand > span:last-child { display: grid; gap: 2px; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }

.api-status { display: inline-flex; align-items: center; gap: 11px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.62); }
.api-status > span:last-child { display: grid; gap: 1px; }
.api-status strong { font-size: 13px; }
.api-status small { color: var(--muted); font-size: 11px; }
.status-pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #18a676; box-shadow: 0 0 0 4px rgba(24, 166, 118, .11); }
.status-pulse::after { position: absolute; inset: -4px; border: 1px solid #18a676; border-radius: inherit; content: ""; animation: pulse 2s infinite; }
.api-status.checking .status-pulse { background: #ca8a04; box-shadow: 0 0 0 4px rgba(202, 138, 4, .12); }
.api-status.checking .status-pulse::after { border-color: #ca8a04; }
.api-status.offline { border-color: #f2c6ca; background: #fff7f7; }
.api-status.offline .status-pulse { background: var(--danger); box-shadow: 0 0 0 4px rgba(180, 35, 42, .1); }
.api-status.offline .status-pulse::after { display: none; }

.shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 64px; }
.welcome { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(430px, .85fr); align-items: end; gap: 60px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(35px, 4vw, 56px); font-weight: 690; letter-spacing: -.045em; line-height: 1.04; }
h1 span { color: #78908d; font-weight: 520; }
h2 { margin-bottom: 0; font-size: 22px; letter-spacing: -.025em; line-height: 1.25; }
.subcopy { max-width: 600px; margin: 17px 0 0; color: var(--muted-strong); font-size: 16px; line-height: 1.65; }

.quick-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-card { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 13px 15px; border: 1px solid rgba(213,225,223,.85); border-radius: 16px; background: rgba(255,255,255,.72); backdrop-filter: blur(8px); }
.stat-card-wide { grid-column: 1 / -1; }
.stat-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 12px; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.people { background: #dcfce7; color: var(--ok); }
.stat-icon.scan { background: var(--accent-soft); color: var(--accent); }
.stat-icon.shield { background: #fff3df; color: #b8731b; }
.stat-card > span:last-child { display: grid; gap: 3px; min-width: 0; }
.stat-card small { overflow: hidden; color: var(--muted-strong); font-size: 11px; font-weight: 700; letter-spacing: .025em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.stat-card strong { font-size: 20px; letter-spacing: -.02em; }
.stat-value.loading { display: block; width: 54px; height: 20px; overflow: hidden; border-radius: 6px; background: linear-gradient(90deg, #e6eef2 25%, #f7fafb 50%, #e6eef2 75%); background-size: 200% 100%; color: transparent; animation: skeleton 1.2s ease-in-out infinite; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(330px, .72fr); align-items: start; gap: 18px; }
.panel { border: 1px solid rgba(214, 227, 224, .92); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.operation-panel { min-width: 0; padding: 28px; }
.panel-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.panel-copy { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.mode-chip { display: inline-flex; align-items: center; min-height: 32px; flex: 0 0 auto; padding: 0 11px; border: 1px solid #bae6fd; border-radius: 9px; background: #f0f9ff; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-bottom: 25px; padding: 5px; border: 1px solid var(--line-soft); border-radius: 13px; background: #f5f8f7; }
.tab { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 48px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted-strong); cursor: pointer; font-size: 13px; font-weight: 730; transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.tab svg { width: 17px; height: 17px; flex: 0 0 auto; }
.tab:hover { color: var(--ink); background: rgba(255,255,255,.72); }
.tab.active { background: #fff; color: var(--accent); box-shadow: 0 3px 10px rgba(31, 68, 64, .08), 0 0 0 1px rgba(214,226,223,.8); }
.tab-live.active { color: #c33c43; }
.live-dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: #d94d53; }
.tab-live.active .live-dot { display: block; animation: blink 1.5s infinite; }

.form { display: grid; gap: 18px; }
.identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field > span { display: block; margin: 0 0 7px; color: var(--muted-strong); font-size: 13px; font-weight: 720; }
.required-mark { color: var(--danger); font-size: 14px; }
.input-shell { position: relative; }
.input-shell svg { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; color: #8a9997; transform: translateY(-50%); }
input[type="text"], input[type="number"], select { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: #fbfcfc; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s; }
input[type="text"] { padding: 0 13px 0 43px; }
input::placeholder { color: #a2afad; }
input:focus, select:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(3,105,161,.1); }
.field-error { display: block; margin: 7px 0 0; color: var(--danger); font-size: 12px; font-weight: 650; line-height: 1.4; }
.field.has-error input, .dropzone.has-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 42, .08); }
.upload-error { padding-left: 2px; }

.dropzone { display: flex; min-height: 278px; flex-direction: column; align-items: center; justify-content: center; padding: 28px; border: 1.5px dashed #a9cbdc; border-radius: 15px; background: linear-gradient(145deg, #fbfdff, #f4f9fc); color: var(--muted); cursor: pointer; text-align: center; transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: #f0f9ff; }
.dropzone:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(3,105,161,.12); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { display: grid; width: 54px; height: 54px; margin-bottom: 14px; place-items: center; border-radius: 16px; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(3,105,161,.08); }
.upload-icon svg { width: 24px; height: 24px; }
.dropzone strong { color: var(--ink); font-size: 16px; }
.dropzone small { margin-top: 7px; color: var(--muted); font-size: 14px; }
.dropzone small b { color: var(--accent); }
.file-requirement { margin-top: 16px; padding: 6px 9px; border-radius: 7px; background: #eaf2f6; color: var(--muted-strong); font-size: 11px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.dropzone-compact { min-height: 205px; }

.preview-wrap { display: grid; gap: 11px; }
.preview-media { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #eef3f2; }
.preview-media img { display: block; width: 100%; max-height: 390px; object-fit: contain; }
.preview-ready { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 8px; background: rgba(8, 47, 73, .9); color: #fff; font-size: 12px; font-weight: 700; }
.preview-ready i { width: 6px; height: 6px; border-radius: 50%; background: #4ee2a6; }
.hidden { display: none !important; }

.primary, .danger, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; border: 0; border-radius: 11px; cursor: pointer; font-weight: 760; transition: transform .18s, background .18s, box-shadow .18s; }
.primary { padding: 0 18px; background: var(--accent); color: #fff; box-shadow: 0 7px 18px rgba(3, 105, 161, .18); }
.primary > svg:last-child { width: 18px; height: 18px; margin-left: auto; }
.primary:hover { background: var(--accent-dark); box-shadow: 0 9px 22px rgba(3, 105, 161, .24); }
.primary:active, .ghost:active, .danger:active, .action-button:active, .tab:active { transform: scale(.985); }
.danger { padding: 0 18px; background: #fff0f0; color: var(--danger); }
.danger svg, .ghost svg { width: 17px; height: 17px; }
.ghost { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: #fff; color: var(--muted-strong); font-size: 13px; }
.ghost:hover { border-color: #a9cbdc; background: #f4f9fc; color: var(--ink); }
button:focus-visible, input:focus-visible, select:focus-visible, pre:focus-visible { outline: 3px solid rgba(3,105,161,.24); outline-offset: 2px; }
button:disabled { cursor: wait; opacity: .55; transform: none !important; }
.button-spinner { display: none; width: 17px; height: 17px; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.primary.is-loading .button-spinner { display: block; }
.primary.is-loading > svg:last-child { visibility: hidden; }

.photo-tips { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; padding: 12px 14px; border: 1px solid #d8e8e5; border-radius: 12px; background: #f4faf8; }
.tip-icon { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: #e3f2ef; color: var(--accent); }
.tip-icon svg { width: 18px; height: 18px; }
.photo-tips p { display: grid; gap: 2px; margin: 0; }
.photo-tips strong { font-size: 13px; }
.photo-tips small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.multi-preview-wrap { display: grid; gap: 11px; margin-top: 14px; }
.preview-summary { display: flex; justify-content: space-between; font-size: 13px; }
.preview-summary span { color: var(--ok); }
.multi-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.multi-preview-grid img { width: 100%; height: 100px; border: 1px solid var(--line); border-radius: 10px; background: #eef3f2; object-fit: cover; }

.side-column { position: sticky; top: 18px; display: grid; min-width: 0; gap: 18px; }
.result-panel { padding: 24px; }
.result-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; flex: 0 0 auto; padding: 0 10px; border-radius: 8px; font-size: 11px; font-weight: 820; letter-spacing: .04em; text-transform: uppercase; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.idle { background: #edf2f1; color: #71827f; }
.badge.success { background: #e5f5ee; color: var(--ok); }
.badge.warning { background: #fff2dc; color: var(--warning); }
.badge.error { background: #ffebeb; color: var(--danger); }
.result-helper { margin: 8px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.code-window { overflow: hidden; border: 1px solid #243f3e; border-radius: 13px; background: #102b2b; }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 13px; border-bottom: 1px solid rgba(255,255,255,.07); background: #173333; }
.code-toolbar > span { display: flex; gap: 5px; }
.code-toolbar i { width: 6px; height: 6px; border-radius: 50%; background: #59706e; }
.code-toolbar i:first-child { background: #d76363; }
.code-toolbar i:nth-child(2) { background: #daa954; }
.code-toolbar i:nth-child(3) { background: #58af83; }
.code-toolbar small { color: #9eb7c4; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { min-height: 210px; max-height: 360px; overflow: auto; margin: 0; padding: 16px; color: #d5e6ed; font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }

.maintenance-panel { overflow: hidden; padding: 20px 22px 10px; }
.maintenance-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.maintenance-heading > span:last-child { display: grid; gap: 2px; }
.maintenance-heading strong { font-size: 14px; }
.maintenance-heading small { color: var(--muted); font-size: 12px; }
.maintenance-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #eef3f2; color: #647775; }
.maintenance-icon svg { width: 17px; height: 17px; }
.maintenance { display: grid; }
.action-button { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0; border: 0; border-top: 1px solid var(--line-soft); background: transparent; color: var(--muted-strong); cursor: pointer; font-size: 13px; font-weight: 670; text-align: left; transition: color 180ms ease, background 180ms ease, transform 120ms ease; }
.action-button > span { display: flex; align-items: center; gap: 9px; }
.action-button svg { width: 16px; height: 16px; }
.action-button .action-arrow { width: 14px; color: #a5b2b0; }
.action-button:hover { color: var(--accent); }
.action-danger:hover { color: var(--danger); }
.maintenance-note { margin: 3px 0 8px; padding: 10px 0 2px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; line-height: 1.5; }

.live-container { display: grid; gap: 17px; }
.live-video-wrap { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 15px; background: #0a2020; }
.live-video-wrap video { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.camera-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #d8e5e3; background: radial-gradient(circle at center, #173d3c, #0d2929 70%); }
.camera-placeholder > span { display: grid; width: 52px; height: 52px; margin-bottom: 13px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.06); }
.camera-placeholder svg { width: 24px; }
.camera-placeholder strong { font-size: 14px; }
.camera-placeholder small { margin-top: 5px; color: #a7bcc4; font-size: 13px; }
.live-video-wrap.camera-active .camera-placeholder { display: none; }
.camera-frame { position: absolute; inset: 13%; z-index: 2; opacity: .42; pointer-events: none; }
.camera-frame i { position: absolute; width: 30px; height: 30px; border-color: #90d9ca; border-style: solid; }
.camera-frame i:nth-child(1) { top: 0; left: 0; border-width: 2px 0 0 2px; border-radius: 8px 0 0; }
.camera-frame i:nth-child(2) { top: 0; right: 0; border-width: 2px 2px 0 0; border-radius: 0 8px 0 0; }
.camera-frame i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 2px 2px; border-radius: 0 0 0 8px; }
.camera-frame i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; border-radius: 0 0 8px; }
.live-overlay { position: absolute; right: 0; bottom: 0; left: 0; z-index: 3; padding: 15px; pointer-events: none; }
.live-overlay-content { padding: 12px 14px; border-radius: 11px; backdrop-filter: blur(12px); }
.live-overlay-content:empty { display: none; }
.live-overlay-content.matched { background: rgba(14,128,88,.88); color: #fff; animation: overlay-pop .3s ease-out; }
.live-overlay-content.no-face { background: rgba(15,37,37,.75); color: rgba(255,255,255,.72); }
.overlay-name { font-size: 17px; font-weight: 800; }
.overlay-nip, .overlay-score { margin-top: 3px; font-size: 13px; opacity: .9; }
.live-controls { display: flex; align-items: flex-end; gap: 11px; }
.live-controls > .primary, .live-controls > .danger { min-width: 150px; }
.live-controls .primary > svg { width: 18px; height: 18px; margin: 0; }
.live-settings { display: flex; flex: 1; gap: 10px; }
.live-settings .field { flex: 1; min-width: 0; }
.select-shell { position: relative; }
.select-shell::after { position: absolute; top: 50%; right: 13px; width: 6px; height: 6px; border-right: 1.5px solid #748481; border-bottom: 1.5px solid #748481; content: ""; pointer-events: none; transform: translateY(-65%) rotate(45deg); }
select { padding: 0 34px 0 12px; appearance: none; font-size: 14px; }
.activity-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.activity-heading strong { font-size: 14px; }
.activity-heading span { color: var(--muted); font-size: 12px; }
.live-log { max-height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #fafcfc; padding: 8px 12px; }
.live-log-placeholder { margin: 0; padding: 16px 0; color: var(--muted); font-size: 13px; text-align: center; }
.live-log-entry { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; line-height: 1.45; }
.live-log-entry:last-child { border-bottom: 0; }
.live-log-time { margin-right: 7px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.live-log-success { color: var(--ok); font-weight: 650; }
.live-log-warning { color: var(--warning); }
.live-log-error { color: var(--danger); }
.live-log-muted { color: var(--muted); }

footer { display: flex; justify-content: space-between; width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 22px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

@keyframes pulse { 0%, 100% { opacity: 0; transform: scale(.7); } 50% { opacity: .55; transform: scale(1.25); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes overlay-pop { from { opacity: .5; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes skeleton { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (max-width: 1020px) {
  .welcome { grid-template-columns: 1fr; gap: 28px; }
  .quick-stats { grid-template-columns: repeat(3, 1fr); }
  .stat-card-wide { grid-column: auto; }
  .workspace { grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); }
  .tab { flex-direction: column; gap: 3px; padding: 5px; }
  .live-controls { align-items: stretch; flex-direction: column; }
  .live-controls > .primary, .live-controls > .danger { width: 100%; }
}

@media (max-width: 790px) {
  .topbar, .shell, footer { width: min(100% - 28px, 650px); }
  .topbar { height: 75px; }
  .api-status small { display: none; }
  .shell { padding-top: 36px; }
  .welcome { margin-bottom: 24px; }
  .quick-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-card-wide { grid-column: 1 / -1; }
  .workspace { grid-template-columns: 1fr; }
  .side-column { position: static; }
  .operation-panel { padding: 21px; }
  .tabs { overflow-x: auto; grid-template-columns: repeat(4, minmax(92px, 1fr)); }
  .tab { flex-direction: row; }
}

@media (max-width: 520px) {
  .topbar, .shell, footer { width: min(100% - 22px, 480px); }
  .brand small { display: none; }
  .api-status { padding: 8px 10px; }
  .api-status strong { font-size: 12px; }
  h1 { font-size: 34px; }
  .subcopy { font-size: 13px; }
  .quick-stats { gap: 7px; }
  .stat-card { min-height: 74px; padding: 10px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-card small { overflow: visible; font-size: 11px; line-height: 1.25; text-overflow: clip; white-space: normal; }
  .stat-card strong { font-size: 17px; }
  .panel-topline { display: grid; }
  .mode-chip { width: fit-content; }
  .tabs { overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-right: 0; margin-left: 0; padding: 5px; border: 1px solid var(--line-soft); border-radius: 13px; }
  .identity-grid, .live-settings { grid-template-columns: 1fr; flex-direction: column; }
  .identity-grid { display: grid; }
  .dropzone { min-height: 230px; padding: 20px; }
  .result-panel { padding: 21px; }
  pre { min-height: 180px; }
  input[type="text"], input[type="number"], select { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
