:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #eef3f8;
    color: #102a43;
}

* { box-sizing: border-box; }

body {
    min-height: 100svh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.qr-card {
    width: min(100%, 29rem);
    padding: clamp(1.35rem, 6vw, 2.25rem);
    border: 1px solid #d9e2ec;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 1rem 3rem rgb(16 42 67 / 12%);
    text-align: center;
}

.eyebrow {
    margin: 0 0 .7rem;
    color: #627d98;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1 { margin: 0 0 1.25rem; font-size: clamp(1.45rem, 6vw, 2rem); }

.qr-preview {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 1rem;
    background: #102a43;
}

.qr-preview video { width: 100%; height: 100%; display: block; object-fit: cover; opacity: 0; }
.qr-preview.is-active video { opacity: 1; }
.qr-frame { position: absolute; inset: 18%; border: 3px solid #fff; border-radius: 1rem; box-shadow: 0 0 0 999px rgb(16 42 67 / 28%); }

.qr-status { min-height: 1.5rem; margin: 1rem 0; color: #486581; font-weight: 700; }
.qr-status.error { color: #b42318; }
.qr-status.success { color: #18794e; }
.qr-status.pending { color: #486581; }

.qr-primary, .qr-secondary {
    width: 100%;
    padding: .95rem 1rem;
    border: 0;
    border-radius: .85rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    touch-action: manipulation;
}

.qr-primary { margin-bottom: .7rem; background: #0b7285; color: #fff; }
.qr-secondary { background: #d9e2ec; color: #102a43; }
.qr-primary:active, .qr-secondary:active { transform: translateY(1px); }
.qr-primary:disabled { cursor: wait; opacity: .65; }
input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
