:root {
    color-scheme: dark;
    --navy-950: #041020;
    --navy-900: #07172d;
    --navy-800: #0b2340;
    --green: #9bd52b;
    --green-bright: #b9ed43;
    --cyan: #37c8db;
    --white: #f7fbff;
    --muted: #a9b7c8;
    --danger: #ff6e6e;
    font-family: Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--navy-950); color: var(--white); }
body { min-height: 100svh; letter-spacing: 0; }
button, a { font: inherit; }
button { cursor: pointer; }

.scanner-page {
    background:
        linear-gradient(180deg, rgba(4, 16, 32, .72) 0%, rgba(4, 16, 32, .94) 35%, #041020 100%),
        url('../visual.jpg') center top / auto 38vh no-repeat,
        var(--navy-950);
}

.scanner-shell { width: min(100%, 520px); min-height: 100svh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); }
.event-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.event-mark { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; width: max-content; line-height: .86; text-transform: uppercase; }
.event-mark__mki { grid-row: 1 / 3; align-self: center; color: var(--green); font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 700; transform: rotate(-8deg); }
.event-mark__name { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 700; }
.event-mark__year { color: var(--cyan); font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 700; }
.live-badge { display: flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.22); background: rgba(5,17,33,.72); padding: 7px 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.live-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--green-bright); box-shadow: 0 0 12px var(--green); }

.welcome { padding: clamp(34px, 7vh, 60px) 2px 20px; }
.eyebrow { margin: 0 0 8px; color: var(--green-bright); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.welcome h1 { max-width: 420px; margin: 0; font-family: 'Barlow Condensed', sans-serif; font-size: clamp(34px, 8vw, 48px); line-height: .96; text-transform: uppercase; overflow-wrap: anywhere; }
.booth-label { display: inline-block; margin-top: 12px; border-left: 3px solid var(--green); padding-left: 9px; color: #dce7f2; font-size: 13px; font-weight: 600; }

.camera-panel { position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: 56svh; overflow: hidden; border: 1px solid rgba(154, 213, 43, .55); background: #020912; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.camera-preview, .camera-preview > div, .camera-preview video { width: 100% !important; height: 100% !important; }
.camera-preview video { object-fit: cover !important; }
.camera-preview img, #reader__dashboard, #reader__header_message { display: none !important; }
.camera-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(2,9,18,.28), transparent 25%, transparent 75%, rgba(2,9,18,.48)); }
.scan-frame { position: absolute; top: 50%; left: 50%; width: min(68%, 280px); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.scan-frame i { position: absolute; width: 36px; height: 36px; border-color: var(--green-bright); border-style: solid; filter: drop-shadow(0 0 5px rgba(185,237,67,.5)); }
.scan-frame i:nth-child(1) { top: 0; left: 0; border-width: 3px 0 0 3px; }
.scan-frame i:nth-child(2) { top: 0; right: 0; border-width: 3px 3px 0 0; }
.scan-frame i:nth-child(3) { bottom: 0; right: 0; border-width: 0 3px 3px 0; }
.scan-frame i:nth-child(4) { bottom: 0; left: 0; border-width: 0 0 3px 3px; }
.scan-line { position: absolute; left: 5%; right: 5%; top: 10%; height: 1px; background: var(--green-bright); box-shadow: 0 0 9px var(--green-bright); animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { 0%, 100% { top: 10%; opacity: .35; } 50% { top: 90%; opacity: 1; } }
.camera-topbar { position: absolute; z-index: 2; top: 12px; left: 14px; right: 12px; display: flex; align-items: center; justify-content: space-between; color: #eaf0f6; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(3,13,26,.72); color: white; }
.icon-button svg { width: 19px; height: 19px; fill: currentColor; }
.camera-prompt { position: absolute; z-index: 2; bottom: 18px; left: 24px; right: 24px; text-align: center; color: #e8f0f8; font-size: 12px; }
.camera-start { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); min-width: 154px; border: 0; background: var(--green); color: #071426; padding: 13px 18px; font-size: 13px; font-weight: 700; }
.camera-start[hidden] { display: none; }

.status-panel { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; min-height: 76px; margin-top: 12px; border-left: 3px solid var(--cyan); background: rgba(11,35,64,.76); padding: 13px 14px; }
.status-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(55,200,219,.12); color: var(--cyan); }
.status-icon svg { width: 21px; fill: currentColor; }
.status-panel strong { display: block; margin-bottom: 4px; font-size: 13px; }
.status-panel p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.status-panel[data-state="success"] { border-color: var(--green); }
.status-panel[data-state="success"] .status-icon { color: var(--green); background: rgba(155,213,43,.12); }
.status-panel[data-state="error"] { border-color: var(--danger); }
.status-panel[data-state="error"] .status-icon { color: var(--danger); background: rgba(255,110,110,.12); }
.event-footer { display: flex; justify-content: space-between; gap: 12px; padding: 20px 2px 0; color: #72869c; font-size: 9px; font-weight: 600; text-transform: uppercase; }

.result-overlay { position: fixed; z-index: 20; inset: 0; display: grid; place-items: end center; background: rgba(1,7,14,.78); backdrop-filter: blur(8px); }
.result-overlay[hidden] { display: none; }
.result-dialog { width: min(100%, 520px); background: #f7fbff; color: #07172d; padding: 30px 24px max(28px, env(safe-area-inset-bottom)); text-align: center; }
.result-symbol { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 20px; border-radius: 50%; background: var(--green); color: #07172d; font-size: 30px; font-weight: 700; }
.result-symbol.is-error { background: #ffd8d8; color: #b52929; }
.result-kicker { margin: 0 0 7px; color: #4c6a28; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.result-dialog h2 { margin: 0; font-family: 'Barlow Condensed', sans-serif; font-size: 34px; line-height: 1; text-transform: uppercase; }
.result-dialog > p:not(.result-kicker) { margin: 12px auto; max-width: 330px; color: #657080; font-size: 13px; line-height: 1.5; }
.attendee-number { margin: 18px 0; border: 1px solid #dbe3e9; background: #edf3f6; padding: 13px; font-family: monospace; font-size: 15px; overflow-wrap: anywhere; }
.result-dialog button { width: 100%; border: 0; background: #07172d; color: white; padding: 15px; font-weight: 700; }

.directory-page { background: #eef3f4; color: #07172d; }
.directory-shell { min-height: 100svh; }
.directory-hero { position: relative; min-height: min(480px, 58svh); overflow: hidden; background: var(--navy-900); }
.directory-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,14,29,.9), rgba(3,14,29,.22)), linear-gradient(0deg, rgba(3,14,29,.62), transparent 55%); }
.directory-hero img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.directory-hero__content { position: relative; z-index: 1; width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding-top: clamp(110px, 24vh, 210px); color: white; }
.directory-hero h1 { margin: 0; font-family: 'Barlow Condensed', sans-serif; font-size: clamp(54px, 9vw, 92px); line-height: .82; text-transform: uppercase; }
.directory-hero__content > p:last-child { max-width: 420px; margin: 20px 0 0; color: #d0dae5; font-size: 14px; line-height: 1.6; }
.directory-content { width: min(920px, calc(100% - 36px)); margin: 0 auto; padding: 40px 0 70px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-family: 'Barlow Condensed', sans-serif; font-size: 38px; text-transform: uppercase; }
.section-heading > span { color: #61717c; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.exhibitor-list { border-top: 1px solid #c9d5da; }
.exhibitor-list a { display: grid; grid-template-columns: minmax(72px, auto) 1fr 24px; align-items: center; gap: 18px; min-height: 78px; border-bottom: 1px solid #c9d5da; color: #07172d; text-decoration: none; transition: background .2s, padding .2s; }
.exhibitor-list a:hover { background: white; padding-inline: 12px; }
.booth-number { color: #608013; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.exhibitor-name { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.exhibitor-list svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.empty-state { border: 1px solid #c9d5da; border-left: 4px solid var(--green); background: white; padding: 24px; }
.empty-state strong { font-size: 16px; }
.empty-state p { margin: 7px 0 0; color: #61717c; font-size: 13px; }

@media (min-width: 680px) {
    .result-overlay { place-items: center; }
    .result-dialog { width: 430px; padding: 34px; }
}

@media (max-height: 760px) and (orientation: portrait) {
    .welcome { padding: 22px 2px 15px; }
    .welcome h1 { font-size: 32px; }
    .camera-panel { max-height: 52svh; }
    .event-footer { padding-top: 12px; }
}

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

