:root {
    color-scheme: dark;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: #f7f7f9;
    background: #10131d;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --muted: #9298a8;
    --accent: #c8fa69;
    --panel: #191d2a;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(68, 79, 108, .23), transparent 40rem),
        #10131d;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    width: min(100% - 40px, 480px);
    margin: 0 auto;
    padding: 28px 0 24px;
}

.topbar,
.brand,
.card-heading,
.qr-meta,
.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    justify-content: flex-start;
    gap: 10px;
    color: #fff;
    font: 700 14px "Trebuchet MS", "Segoe UI", sans-serif;
    letter-spacing: .12em;
    text-decoration: none;
}

.brand-light {
    color: var(--accent);
}

.brand-mark {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(200, 250, 105, .55);
    border-radius: 10px;
    color: var(--accent);
    font-size: 18px;
    letter-spacing: 0;
}

.install-button {
    padding: 9px 13px;
    border: 1px solid rgba(200, 250, 105, .42);
    border-radius: 999px;
    background: rgba(200, 250, 105, .09);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.intro {
    padding: 42px 0 25px;
}

.eyebrow,
.card-kicker,
.detail-label,
.app-footer span:last-child {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 15px;
    color: var(--accent);
}

.live-dot,
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(200, 250, 105, .65);
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font: 600 clamp(32px, 9vw, 42px)/1.08 "Trebuchet MS", "Segoe UI", sans-serif;
    letter-spacing: -.045em;
}

h1 span {
    color: var(--accent);
}

.intro-copy {
    max-width: 390px;
    margin: 0;
    color: #aeb3c0;
    font-size: 14px;
    line-height: 1.65;
}

.ticket-card {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 22px;
    background: linear-gradient(150deg, rgba(32, 37, 52, .98), rgba(23, 27, 39, .98));
    box-shadow: 0 22px 65px rgba(0, 0, 0, .25);
}

.card-heading {
    margin-bottom: 18px;
}

.card-kicker {
    margin: 0 0 5px;
    color: var(--muted);
}

h2 {
    margin: 0;
    font: 600 19px "Trebuchet MS", "Segoe UI", sans-serif;
}

.demo-tag {
    padding: 6px 8px;
    border: 1px solid rgba(200, 250, 105, .3);
    border-radius: 6px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
}

.qr-frame {
    position: relative;
    display: grid;
    width: min(100%, 280px);
    min-height: 280px;
    margin: 0 auto;
    padding: 18px;
    place-items: center;
    border-radius: 18px;
    background: #fff;
}

#qrcode {
    display: grid;
    place-items: center;
    width: 100%;
}

#qrcode img,
#qrcode canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-placeholder {
    position: absolute;
    inset: 18px;
    display: grid;
    padding: 15px;
    place-items: center;
    border-radius: 10px;
    background: #fff;
    color: #414655;
    text-align: center;
    font-size: 13px;
}

.qr-placeholder[hidden] {
    display: none;
}

.qr-meta {
    justify-content: center;
    gap: 8px;
    margin: 16px 0 18px;
    color: #b9becc;
    font-size: 11px;
}

.status-dot {
    width: 6px;
    height: 6px;
}

.refresh-button,
.save-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #171b23;
    font-size: 14px;
    font-weight: 700;
    transition: transform .15s ease, filter .15s ease;
}

.refresh-button:hover,
.save-button:hover {
    filter: brightness(1.06);
}

.refresh-button:active,
.save-button:active {
    transform: scale(.985);
}

.refresh-button span {
    margin-right: 7px;
    font-size: 19px;
    vertical-align: -1px;
}

.refresh-note {
    margin: 10px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

.divider {
    height: 1px;
    margin: 20px 0 16px;
    background: rgba(255, 255, 255, .09);
}

.ticket-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.ticket-details > div {
    min-width: 0;
}

.detail-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 9px;
}

.ticket-details strong {
    display: block;
    overflow: hidden;
    color: #f5f6f8;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-id {
    font-family: "Consolas", "Courier New", monospace;
}

.settings {
    margin-top: 14px;
    padding: 15px 17px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px;
    background: rgba(25, 29, 42, .7);
}

.settings summary {
    color: #d3d6df;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.settings-fields {
    display: grid;
    gap: 9px;
    padding-top: 15px;
}

.settings-fields label {
    color: #b1b6c4;
    font-size: 11px;
}

.settings-fields input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 9px;
    outline: none;
    background: #111520;
    color: #fff;
}

.settings-fields input:focus {
    border-color: var(--accent);
}

.save-button {
    min-height: 42px;
    margin-top: 5px;
    font-size: 12px;
}

.demo-notice {
    display: flex;
    gap: 11px;
    margin-top: 16px;
    padding: 13px;
    border: 1px solid rgba(255, 199, 106, .2);
    border-radius: 12px;
    background: rgba(255, 199, 106, .06);
}

.notice-icon {
    display: grid;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 1px solid #ffca73;
    border-radius: 50%;
    color: #ffca73;
    font-size: 11px;
    font-weight: 700;
}

.demo-notice p {
    margin: 0;
    color: #c4bfaf;
    font-size: 10px;
    line-height: 1.55;
}

.demo-notice strong {
    color: #ffca73;
}

.install-help {
    margin-top: 11px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 11px;
    color: #aeb3c0;
    font-size: 11px;
    line-height: 1.6;
}

.install-help summary {
    color: #d5d8e0;
    cursor: pointer;
    font-weight: 600;
}

.install-help p {
    margin: 9px 0 0;
}

.install-help strong {
    color: #fff;
}

.app-footer {
    gap: 12px;
    margin-top: 22px;
    color: #777e8f;
    font-size: 10px;
}

.app-footer span:last-child {
    font-size: 8px;
}

@media (max-width: 380px) {
    .app-shell {
        width: min(100% - 28px, 480px);
    }

    .ticket-card {
        padding: 17px;
    }

    .qr-frame {
        min-height: 250px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
