:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0d7094;
    color: #fff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100dvh;
    background: linear-gradient(180deg, #0d6d90 0%, #1499c5 45%, #43c8ef 100%);
    background-attachment: fixed;
}

button, input {
    font: inherit;
}

main {
    min-height: 100dvh;
}

.scanner-shell {
    width: min(100%, 520px);
    min-height: 100dvh;
    margin: auto;
    padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-height: 70px;
    margin-bottom: 12px;
}

.brand-copy {
    min-width: 0;
    padding-top: 4px;
}

.skyline-logo {
    width: clamp(116px, 34vw, 150px);
    height: auto;
    margin: -2px -5px 0 0;
    mix-blend-mode: normal;
    filter: drop-shadow(0 3px 5px rgba(0, 33, 55, .25));
}

.eyebrow {
    color: #b9edff;
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .16em;
}

h1 {
    margin: 2px 0 0;
    font-size: clamp(1.75rem, 7vw, 2.3rem);
    line-height: 1.05;
}

.instruction {
    margin: 10px 0 22px;
    color: #e2f7ff;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 44, 68, .25);
}

.scanner-card {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255,255,255,.72);
    border-radius: 20px;
    background: rgba(4, 40, 64, .9);
    box-shadow: 0 18px 45px rgba(0, 48, 76, .32);
}

.reader {
    width: 100%;
    min-height: 330px;
}

    .reader video {
        object-fit: cover;
        min-height: 330px;
    }

#ticket-reader__scan_region {
    min-height: 330px;
}

#ticket-reader__dashboard {
    display: none;
}

.camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #b9dce9;
}

    .camera-placeholder strong {
        color: #eaf6fb;
        font-size: 1.15rem;
    }

.barcode-icon {
    color: #43c8ef;
    font-size: 72px;
    line-height: 1;
    transform: rotate(90deg);
}

.status-panel {
    position: absolute;
    inset: 0;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #0a2131;
}

    .status-panel.valid {
        background: linear-gradient(155deg, #087b72, #064d54);
    }

    .status-panel.invalid {
        background: linear-gradient(155deg, #7f1930, #3a1020);
    }

.result-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 10px;
    border: 2px solid currentColor;
    border-radius: 50%;
    color: #63e2bd;
    font-size: 2.7rem;
    line-height: 1;
}

.invalid .result-icon {
    color: #ff8d8d;
}

.status-panel h2 {
    margin: 8px 0 4px;
    font-size: 1.65rem;
}

.status-panel p {
    max-width: 340px;
    margin: 6px 0;
    color: #bdd0da;
}

.status-panel small {
    margin-top: 14px;
    color: #8eabb8;
}

.amount {
    margin: 10px 0 2px;
    font-size: 2rem;
    font-weight: 800;
}

.spinner {
    width: 54px;
    height: 54px;
    margin-bottom: 22px;
    border: 4px solid #315b76;
    border-top-color: #43c8ef;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.primary-button, .secondary-button {
    width: 100%;
    min-height: 58px;
    margin-top: 18px;
    border: 0;
    border-radius: 17px;
    font-weight: 800;
    cursor: pointer;
}

.primary-button {
    color: #fff;
    border: 1px solid rgba(255,255,255,.45);
    background: linear-gradient(180deg, #123f68, #082b50);
    box-shadow: 0 10px 25px rgba(0, 42, 71, .3);
}

.secondary-button {
    color: #fff;
    border: 1px solid rgba(255,255,255,.45);
    background: linear-gradient(180deg, #174b73, #092f55);
}

.redemption-actions {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 20px;
    background: rgba(5, 51, 79, .82);
    text-align: center;
}

    .redemption-actions p {
        margin: 0 0 14px;
        color: #d8e8ee;
        font-weight: 650;
    }

.redeem-button {
    width: 100%;
    min-height: 58px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(180deg, #f02a48, #c70e31);
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(104, 0, 28, .25);
}

    .redeem-button:disabled, .secondary-button:disabled {
        opacity: .55;
        cursor: wait;
    }

.no-margin {
    margin-top: 10px;
}

.primary-button:active, .secondary-button:active {
    transform: translateY(1px);
}

.manual-entry {
    margin-top: 18px;
    color: #e4f7ff;
    text-align: center;
}

    .manual-entry summary {
        padding: 10px;
        cursor: pointer;
        font-weight: 650;
    }

.manual-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 8px;
}

    .manual-controls input {
        min-width: 0;
        padding: 13px 14px;
        color: #fff;
        border: 1px solid rgba(255,255,255,.55);
        border-radius: 12px;
        outline: none;
        background: #0a3659;
    }

        .manual-controls input:focus {
            border-color: #bcefff;
            box-shadow: 0 0 0 3px rgba(255,255,255,.2);
        }

    .manual-controls button {
        padding: 0 18px;
        border: 1px solid rgba(255,255,255,.45);
        border-radius: 12px;
        color: #fff;
        background: #0b355a;
        font-weight: 800;
    }

.privacy-note {
    margin: auto 8px 0;
    padding-top: 24px;
    color: #e0f5fc;
    font-size: .78rem;
    line-height: 1.45;
    text-align: center;
}

@media (max-width: 390px) {
    .skyline-logo {
        width: 108px;
    }

    .eyebrow {
        font-size: .6rem;
    }
}

@media (max-height: 700px) {
    .scanner-card, .reader, .reader video, #ticket-reader__scan_region {
        min-height: 270px;
    }

    .privacy-note {
        display: none;
    }
}
