/* ==========================================================================
   Tvynex Verification — Design System
   Trust-neutral. Navy + single accent. No gradients, no CDN dependencies.
   ========================================================================== */

/* --- Reset --------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--navy-900);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button { background: none; border: none; cursor: pointer; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* --- Tokens -------------------------------------------------------------- */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
                 "Liberation Mono", monospace;

    /* Neutrals */
    --navy-900: #0A2540;
    --navy-800: #12314F;
    --slate-600: #425466;
    --slate-500: #5A6B80;
    --slate-400: #8898AA;
    --line: #E3E8EF;
    --line-strong: #CFD7E3;
    --surface: #FFFFFF;
    --surface-muted: #F6F9FC;
    --surface-sunken: #EDF2F8;

    /* Accent */
    --accent: #0B6BCB;
    --accent-hover: #095AAD;
    --accent-active: #07497F;
    --accent-soft: #E8F1FB;
    --accent-ring: rgba(11, 107, 203, 0.15);

    /* Status */
    --success: #0E7C5A;
    --success-soft: #E3F4EE;
    --warning: #9C5209;
    --warning-soft: #FCF0E2;
    --danger: #C0322B;
    --danger-hover: #A32922;
    --danger-soft: #FBEAE9;

    /* Radii */
    --r-sm: 6px;
    --r: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-full: 999px;

    /* Elevation — used sparingly */
    --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.05);
    --shadow-md: 0 4px 12px rgba(10, 37, 64, 0.08);
    --shadow-lg: 0 16px 48px rgba(10, 37, 64, 0.16);

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 160ms;
}

/* --- Typography ---------------------------------------------------------- */

h1, h2, h3, h4 {
    font-weight: 640;
    line-height: 1.25;
    letter-spacing: -0.014em;
    color: var(--navy-900);
}

.t-display { font-size: 30px; font-weight: 680; letter-spacing: -0.02em; }
.t-title   { font-size: 22px; font-weight: 640; letter-spacing: -0.016em; }
.t-heading { font-size: 17px; font-weight: 620; letter-spacing: -0.008em; }
.t-body    { font-size: 15px; color: var(--slate-600); }
.t-sm      { font-size: 13.5px; color: var(--slate-600); }
.t-xs      { font-size: 12.5px; color: var(--slate-500); }

.t-label {
    font-size: 11.5px;
    font-weight: 620;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--slate-500);
}

.t-mono { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.t-muted { color: var(--slate-500); }
.t-center { text-align: center; }

/* --- Layout -------------------------------------------------------------- */

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell > main { flex: 1; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-narrow { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 20px; }

.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 24px; }
.stack-sm > * + * { margin-top: 8px; }

.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.spacer { flex: 1; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 560px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* --- App bar ------------------------------------------------------------- */

.appbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
}

.appbar-inner {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 660;
    letter-spacing: -0.015em;
    color: var(--navy-900);
    text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--navy-900);
    display: grid;
    place-items: center;
    color: #fff;
    flex: none;
}

.brand-mark svg { width: 15px; height: 15px; }

/* --- Buttons ------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--r);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease),
                color var(--dur) var(--ease);
}

.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled) { background: var(--accent-active); }

.btn-secondary {
    background: var(--surface);
    color: var(--navy-900);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover:not(:disabled) { background: var(--surface-muted); border-color: var(--slate-400); }

.btn-ghost { background: transparent; color: var(--slate-600); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-muted); color: var(--navy-900); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #0B6349; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }

.btn-danger-quiet { background: var(--surface); color: var(--danger); border-color: var(--line-strong); }
.btn-danger-quiet:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }

.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { min-height: 50px; font-size: 15.5px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Form fields --------------------------------------------------------- */

.field { display: block; }

.field-label {
    display: block;
    font-size: 13.5px;
    font-weight: 580;
    color: var(--navy-900);
    margin-bottom: 6px;
}

.field-optional { font-weight: 400; color: var(--slate-400); }

.input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r);
    font-size: 15px;
    color: var(--navy-900);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.input::placeholder { color: var(--slate-400); }

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.input:disabled { background: var(--surface-muted); color: var(--slate-500); cursor: not-allowed; }

.field.has-error .input { border-color: var(--danger); }
.field.has-error .input:focus { box-shadow: 0 0 0 3px rgba(192, 50, 43, 0.14); }

.field-error {
    display: none;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--danger);
}

.field-error svg { width: 13px; height: 13px; flex: none; }
.field.has-error .field-error { display: flex; }

.field-hint { margin-top: 6px; font-size: 12.5px; color: var(--slate-500); }

/* --- Cards --------------------------------------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.card-body { padding: 24px; }

/* --- Stepper ------------------------------------------------------------- */

.stepper {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 32px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: none;
    width: 76px;
}

.step-dot {
    width: 24px;
    height: 24px;
    border-radius: var(--r-full);
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    color: var(--slate-400);
    font-size: 12px;
    font-weight: 640;
    transition: all var(--dur) var(--ease);
}

.step-dot svg { width: 13px; height: 13px; }

.step-label {
    font-size: 12.5px;
    font-weight: 540;
    color: var(--slate-400);
    text-align: center;
    transition: color var(--dur) var(--ease);
}

.step-line {
    flex: 1;
    height: 1.5px;
    background: var(--line-strong);
    margin-top: 11.25px;
    position: relative;
    overflow: hidden;
}

.step-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 400ms var(--ease);
}

.step-line.is-filled::after { transform: scaleX(1); }

.step.is-active .step-dot {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.step.is-active .step-label { color: var(--navy-900); font-weight: 600; }

.step.is-done .step-dot {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.step.is-done .step-label { color: var(--slate-600); }

/* --- Capture tile -------------------------------------------------------- */

.capture {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0;
    background: var(--surface-muted);
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.capture:hover { border-color: var(--accent); background: var(--accent-soft); }

.capture-media {
    position: relative;
    aspect-ratio: 1.586;
    display: grid;
    place-items: center;
    background: var(--surface-sunken);
}

.capture.is-selfie .capture-media { aspect-ratio: 1.2; }

.capture-media img,
.capture-media video { width: 100%; height: 100%; object-fit: cover; }

.capture-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--slate-400);
    transition: color var(--dur) var(--ease);
}

.capture:hover .capture-placeholder { color: var(--accent); }
.capture-placeholder svg { width: 30px; height: 30px; stroke-width: 1.4; }
.capture-placeholder span { font-size: 12.5px; font-weight: 540; }

.capture-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.capture-name { font-size: 13.5px; font-weight: 580; color: var(--navy-900); }
.capture-action { font-size: 12.5px; font-weight: 600; color: var(--accent); }

.capture.is-captured { border-style: solid; border-color: var(--success); background: var(--surface); }
.capture.is-captured .capture-action { color: var(--slate-500); }

.capture-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: var(--r-full);
    background: var(--success);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-md);
}

.capture-check svg { width: 14px; height: 14px; stroke-width: 2.5; }

/* --- Badges & status ----------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.003em;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: var(--r-full);
    background: currentColor;
    flex: none;
}

.badge-pending  { background: var(--warning-soft); color: var(--warning); }
.badge-approved { background: var(--success-soft); color: var(--success); }
.badge-rejected { background: var(--danger-soft);  color: var(--danger); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: var(--r-full);
    background: var(--surface-muted);
    border: 1px solid var(--line);
    font-size: 12.5px;
    font-weight: 560;
    color: var(--slate-600);
}

.chip svg { width: 13px; height: 13px; }

/* Flags a submission that skipped the liveness check. */
.chip-warn {
    background: var(--warning-soft);
    border-color: #F0D9BC;
    color: var(--warning);
}

/* --- Notice -------------------------------------------------------------- */

.notice {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: var(--surface-muted);
    font-size: 13.5px;
    color: var(--slate-600);
}

.notice svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--slate-500); }
.notice strong { display: block; color: var(--navy-900); font-weight: 600; margin-bottom: 2px; }

.notice-info { background: var(--accent-soft); border-color: #C7DEF6; }
.notice-info svg { color: var(--accent); }

.notice-danger { background: var(--danger-soft); border-color: #F2C9C6; color: var(--danger); }
.notice-danger svg { color: var(--danger); }
.notice-danger strong { color: var(--danger); }

/* --- Stats --------------------------------------------------------------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 560;
    color: var(--slate-500);
    margin-bottom: 10px;
}

.stat-label .dot { width: 7px; height: 7px; border-radius: var(--r-full); flex: none; }
.dot-pending  { background: var(--warning); }
.dot-approved { background: var(--success); }
.dot-rejected { background: var(--danger); }
.dot-total    { background: var(--slate-400); }

.stat-value {
    font-size: 28px;
    font-weight: 660;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--navy-900);
}

.stat-meta { margin-top: 8px; font-size: 12.5px; color: var(--slate-500); }

/* --- Table --------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; }

.table th {
    padding: 11px 20px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 620;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--slate-500);
    background: var(--surface-muted);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--slate-600);
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table tbody tr { transition: background var(--dur) var(--ease); }
.table tbody tr:hover { background: var(--surface-muted); }
.table tbody tr:last-child td { border-bottom: none; }

.cell-name { color: var(--navy-900); font-weight: 580; }
.cell-id { font-family: var(--font-mono); font-size: 12.5px; color: var(--slate-400); }
.cell-actions { text-align: right; white-space: nowrap; }

/* --- Search -------------------------------------------------------------- */

.search {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 280px;
    max-width: 100%;
}

.search svg {
    position: absolute;
    left: 12px;
    width: 15px;
    height: 15px;
    color: var(--slate-400);
    pointer-events: none;
}

.search .input { min-height: 38px; padding: 8px 12px 8px 34px; font-size: 14px; }

/* --- Segmented filter ---------------------------------------------------- */

.segmented {
    display: inline-flex;
    padding: 3px;
    background: var(--surface-sunken);
    border-radius: var(--r);
    gap: 2px;
}

.segmented button {
    padding: 6px 13px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 560;
    color: var(--slate-600);
    transition: all var(--dur) var(--ease);
}

.segmented button:hover { color: var(--navy-900); }

.segmented button.is-active {
    background: var(--surface);
    color: var(--navy-900);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* --- Modal / drawer ------------------------------------------------------ */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(10, 37, 64, 0.45);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms var(--ease), visibility 200ms;
}

.overlay.is-open { opacity: 1; visibility: visible; }

.sheet {
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(8px) scale(0.99);
    transition: transform 200ms var(--ease);
}

.overlay.is-open .sheet { transform: translateY(0) scale(1); }

.sheet-sm { max-width: 420px; }

.sheet-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex: none;
}

.sheet-body { padding: 24px; overflow-y: auto; flex: 1; }

.sheet-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex: none;
    background: var(--surface-muted);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    display: grid;
    place-items: center;
    color: var(--slate-500);
    flex: none;
    transition: all var(--dur) var(--ease);
}

.icon-btn:hover { background: var(--surface-sunken); color: var(--navy-900); }
.icon-btn svg { width: 17px; height: 17px; }

/* --- Detail list --------------------------------------------------------- */

.dl {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 10px 16px;
    font-size: 14px;
}

.dl dt { color: var(--slate-500); }
.dl dd { color: var(--navy-900); font-weight: 540; word-break: break-word; }

@media (max-width: 480px) {
    .dl { grid-template-columns: 1fr; gap: 2px; }
    .dl dd { margin-bottom: 10px; }
}

.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

@media (max-width: 560px) { .media-grid { grid-template-columns: 1fr; } }

.media-item {
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    background: var(--surface-sunken);
}

.media-item img,
.media-item video { width: 100%; display: block; background: var(--navy-900); }

.media-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    font-weight: 560;
    color: var(--slate-600);
}

/* --- Toast --------------------------------------------------------------- */

.toast-region {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
    width: calc(100% - 32px);
    max-width: 420px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--r);
    background: var(--navy-900);
    color: #fff;
    font-size: 14px;
    font-weight: 540;
    box-shadow: var(--shadow-lg);
    animation: toast-in 220ms var(--ease);
}

.toast svg { width: 17px; height: 17px; flex: none; }
.toast.is-success svg { color: #4ADE9B; }
.toast.is-error svg { color: #FF8B84; }
.toast.is-leaving { animation: toast-out 160ms ease forwards; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(6px); }
}

/* --- Empty state --------------------------------------------------------- */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 64px 24px;
    text-align: center;
}

.empty svg { width: 34px; height: 34px; color: var(--slate-400); stroke-width: 1.3; margin-bottom: 6px; }
.empty p { font-size: 14.5px; font-weight: 580; color: var(--navy-900); }
.empty span { font-size: 13.5px; color: var(--slate-500); }

/* --- Spinner ------------------------------------------------------------- */

.spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-top-color: #fff;
    border-radius: var(--r-full);
    animation: spin 620ms linear infinite;
    flex: none;
}

.spinner-dark { border-color: var(--line-strong); border-top-color: var(--accent); }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Trust footer -------------------------------------------------------- */

.trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    font-size: 12.5px;
    color: var(--slate-500);
    text-align: center;
    flex-wrap: wrap;
}

.trust svg { width: 13px; height: 13px; color: var(--slate-400); flex: none; }
.trust .sep { color: var(--line-strong); }

/* ==========================================================================
   Camera capture — full-screen dark surface
   ========================================================================== */

.camera {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: #000;
    display: none;
    flex-direction: column;
}

.camera.is-open { display: flex; }

.camera-stage {
    position: relative;
    flex: 1;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.camera-stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-stage.is-mirrored video { transform: scaleX(-1); }

/* Guide frames */
.guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.58);
}

.guide-card {
    width: min(86vw, 460px);
    aspect-ratio: 1.586;
    border-radius: var(--r-lg);
}

.guide-face {
    width: min(70vw, 300px);
    aspect-ratio: 0.8;
    border-radius: 50%;
}

.guide-corner {
    position: absolute;
    width: 26px;
    height: 26px;
    border: 2.5px solid #fff;
}

.guide-corner.tl { top: -1px; left: -1px;  border-right: 0; border-bottom: 0; border-radius: var(--r-lg) 0 0 0; }
.guide-corner.tr { top: -1px; right: -1px; border-left: 0;  border-bottom: 0; border-radius: 0 var(--r-lg) 0 0; }
.guide-corner.bl { bottom: -1px; left: -1px;  border-right: 0; border-top: 0; border-radius: 0 0 0 var(--r-lg); }
.guide-corner.br { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; border-radius: 0 0 var(--r-lg) 0; }

.guide-face-ring {
    position: absolute;
    inset: -2px;
    border: 2.5px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

.camera-hint {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 76px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    padding: 9px 16px;
    border-radius: var(--r-full);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13.5px;
    font-weight: 560;
    white-space: nowrap;
    max-width: calc(100vw - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.camera-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 14px;
}

.camera-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    color: #fff;
    display: grid;
    place-items: center;
    transition: background var(--dur) var(--ease);
}

.camera-btn:hover { background: rgba(255, 255, 255, 0.24); }
.camera-btn.is-on { background: #fff; color: var(--navy-900); }
.camera-btn svg { width: 19px; height: 19px; }

.camera-controls {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 32px calc(env(safe-area-inset-bottom, 0px) + 28px);
    background: #000;
}

.shutter {
    width: 68px;
    height: 68px;
    border-radius: var(--r-full);
    background: transparent;
    border: 3px solid #fff;
    padding: 4px;
    flex: none;
    transition: transform 100ms var(--ease);
}

.shutter-core {
    width: 100%;
    height: 100%;
    border-radius: var(--r-full);
    background: #fff;
    transition: transform 100ms var(--ease);
}

.shutter:active .shutter-core { transform: scale(0.86); }

.camera-slot { width: 42px; flex: none; }

/* Recording state */
.rec-pill {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 20px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: var(--r-full);
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13.5px;
    font-weight: 620;
    font-variant-numeric: tabular-nums;
}

.rec-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--r-full);
    background: #FF453A;
    animation: rec-pulse 1.1s ease-in-out infinite;
}

@keyframes rec-pulse { 50% { opacity: 0.25; } }

.camera-countdown {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: none;
    place-items: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 96px;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
}

.camera-countdown.is-open { display: grid; }

/* --- Success ------------------------------------------------------------- */

.success-mark {
    width: 60px;
    height: 60px;
    border-radius: var(--r-full);
    background: var(--success-soft);
    color: var(--success);
    display: grid;
    place-items: center;
    margin: 0 auto;
}

.success-mark svg { width: 28px; height: 28px; stroke-width: 2.2; }

/* --- Utility ------------------------------------------------------------- */

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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