:root {
    color-scheme: dark;
    --page: #0c0c0d;
    --surface: #151516;
    --surface-raised: #1d1d1e;
    --line: rgba(255, 255, 255, 0.09);
    --text: #f5f1e8;
    --muted: #9c9992;
    --gold: #d7b76b;
    --gold-bright: #f1d58f;
}

* {
    box-sizing: border-box;
}

body.site-shell {
    min-height: 100vh;
    margin: 0;
    padding: 104px 24px 48px;
    display: grid;
    grid-template-columns: minmax(0, 620px);
    align-content: center;
    justify-content: center;
    align-items: start;
    gap: 28px;
    color: var(--text);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(181, 145, 71, 0.13), transparent 38rem),
        radial-gradient(ellipse at 100% 100%, rgba(94, 74, 37, 0.1), transparent 32rem),
        var(--page);
    font-family: "Segoe UI", Tahoma, sans-serif;
}

.hidden {
    display: none !important;
}

.booking-content > #step-selection:not(.hidden),
.booking-content > #step-payment:not(.hidden),
.booking-content > #step-tickets:not(.hidden) {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.booking-content > #step-selection > div:first-child,
.booking-content > #step-payment > .payment-content,
.booking-content > #step-tickets > div:first-child {
    display: grid;
    align-content: start;
    gap: 18px;
}

.booking-content > #step-selection > div:first-child > #concert-list {
    display: grid;
    gap: 14px;
}

.booking-content > #step-selection {
    padding-bottom: 150px;
}

.booking-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(21, 21, 22, 0.96);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #d0cdc5;
    background: rgba(0, 0, 0, 0.2);
    font-size: 11px;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.admin-link:hover {
    border-color: rgba(215, 183, 107, 0.45);
    background: rgba(215, 183, 107, 0.08);
}

.admin-link i,
.admin-link span {
    color: var(--gold-bright);
}

.member-button,
.member-google-button,
.member-text-button {
    border: 1px solid rgba(215, 183, 107, 0.35);
    border-radius: 999px;
    color: var(--gold-bright);
    background: rgba(0, 0, 0, 0.3);
    font: inherit;
    cursor: pointer;
}

.member-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 8px 0 0 6px;
    padding: 6px 10px;
    font-size: 11px;
}

.member-dialog {
    width: min(440px, calc(100vw - 28px));
    max-width: none;
    max-height: min(85vh, 760px);
    padding: 0;
    overflow: visible;
    border: 1px solid rgba(215, 183, 107, 0.3);
    border-radius: 20px;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.member-dialog[open] {
    display: block;
}

.member-dialog::backdrop {
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(4px);
}

.member-dialog-card {
    position: relative;
    max-height: min(85vh, 760px);
    padding: 25px;
    overflow-y: auto;
}

.member-dialog-card h2 {
    margin: 0;
    color: var(--gold-bright);
    font-size: 20px;
}

.member-description {
    margin: 7px 0 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.member-close {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 25px;
    cursor: pointer;
}

.member-field {
    display: grid;
    gap: 6px;
    margin: 12px 0;
    color: #d3c9b3;
    font-size: 11px;
    font-weight: 700;
}

.member-field input,
.member-select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    color: var(--text);
    background: #101011;
    font: inherit;
    font-size: 13px;
}

.member-field input:focus,
.member-select:focus {
    border-color: var(--gold);
}

.member-dialog .primary-button {
    width: 100%;
    margin-top: 6px;
}

.member-text-button,
.member-google-button {
    width: 100%;
    min-height: 40px;
    margin-top: 10px;
    padding: 9px 12px;
    font-size: 12px;
}

.member-google-button {
    border-color: var(--line);
    color: var(--text);
    background: #222223;
}

.member-message {
    min-height: 18px;
    margin: 10px 0 0;
    color: #f0b3a5;
    font-size: 11px;
    line-height: 1.5;
}

.member-points-card {
    display: grid;
    gap: 4px;
    margin: 16px 0;
    padding: 14px;
    border: 1px solid rgba(215, 183, 107, 0.35);
    border-radius: 14px;
    background: rgba(215, 183, 107, 0.08);
    font-size: 11px;
}

.member-points-card strong {
    color: var(--gold-bright);
    font-size: 22px;
}

.member-points-card small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.member-points-control {
    display: flex;
    align-items: center;
    gap: 9px;
}

.member-points-control label {
    flex: 0 0 auto;
    color: #d3c9b3;
    font-size: 11px;
    font-weight: 700;
}

.member-points-control .member-select {
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 11px;
}

.member-history-title {
    margin: 20px 0 8px;
    font-size: 13px;
}

.member-booking-history {
    display: grid;
    gap: 8px;
    max-height: 210px;
    overflow-y: auto;
}

.member-booking {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #d8d4ca;
    font-size: 10px;
}

.member-booking strong {
    color: var(--text);
    font-size: 11px;
}

.member-watch-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 5px;
    padding: 7px 10px;
    border: 1px solid rgba(215, 183, 107, 0.35);
    border-radius: 9px;
    color: var(--gold-bright);
    background: rgba(215, 183, 107, 0.08);
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.member-watch-button:hover {
    background: rgba(215, 183, 107, 0.16);
}

.booking-content {
    display: flex;
    min-height: 550px;
    flex-direction: column;
    padding: 30px 38px 34px;
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 19px;
    color: var(--text);
    font-size: 20px;
    font-weight: 750;
    line-height: 1.35;
}

.section-kicker {
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.discount-highlight {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: -12px;
    padding: 6px 9px;
    border: 1px solid rgba(215, 183, 107, 0.48);
    border-radius: 13px;
    color: var(--gold-bright);
    background: linear-gradient(110deg, rgba(215, 183, 107, 0.2), rgba(215, 183, 107, 0.06));
    box-shadow: inset 3px 0 0 var(--gold);
}

.discount-highlight-icon {
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    border-radius: 5px;
    color: #211b10;
    background: var(--gold-bright);
    font-size: 9px;
}

.discount-highlight > span:last-child {
    font-size: 10px;
    line-height: 1.35;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .discount-highlight > span:last-child {
        font-size: 9px;
    }
}

.concert-list {
    display: grid;
    gap: 22px;
}

.concert-month {
    display: grid;
    gap: 10px;
}

.concert-month-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    color: var(--gold-bright);
    font-size: 13px;
    font-weight: 750;
}

.concert-month-heading span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.concert-month-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.concert-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    align-items: start;
    gap: 12px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #171718;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.concert-card:hover,
.concert-card:has(input:checked) {
    border-color: rgba(215, 183, 107, 0.58);
    background: linear-gradient(115deg, rgba(215, 183, 107, 0.1), rgba(255, 255, 255, 0.02));
}

.concert-card:hover {
    transform: translateY(-1px);
}

.concert-poster-wrap {
    position: relative;
    grid-column: 1;
    grid-row: 1 / span 2;
    display: block;
    width: 92px;
    height: 124px;
    overflow: hidden;
    border: 1px solid rgba(215, 183, 107, 0.18);
    border-radius: 8px;
    background: #292419;
}

.concert-poster,
.concert-poster-placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.concert-poster {
    object-fit: cover;
    object-position: center;
}

.concert-poster-placeholder {
    display: grid;
    place-items: center;
    color: var(--gold);
    font-size: 19px;
}

.concert-status-badge {
    position: absolute;
    top: 5px;
    z-index: 1;
    padding: 3px 5px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    color: #d3d0c9;
    background: rgba(15, 15, 16, 0.88);
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.04em;
    pointer-events: none;
}

.concert-live-badge {
    left: 5px;
}

.concert-replay-badge {
    right: 5px;
}

.concert-status-badge.is-active {
    border-color: #ff6b6b;
    color: #fff;
    background: #dc2626;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
    animation: concert-status-pulse 1s ease-in-out infinite;
}

@keyframes concert-status-pulse {
    50% {
        opacity: 0.38;
        box-shadow: 0 0 3px rgba(239, 68, 68, 0.2);
    }
}

.concert-status-message {
    margin: -4px 0 0;
    color: #f0b3a5;
    font-size: 11px;
}

.concert-details {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    align-content: start;
    gap: 7px;
}

.concert-details > strong {
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
}

.concert-meta {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 10px;
}

.concert-meta i {
    margin-right: 3px;
    color: var(--gold);
}

.concert-actions {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.concert-price {
    color: var(--gold-bright);
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

.concert-price small {
    font-size: 10px;
}

.concert-select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 10px;
}

.concert-select input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--gold);
    cursor: pointer;
}

.selection-footer {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 4;
    width: min(620px, calc(100vw - 32px));
    margin: 0;
    padding: 16px 38px 24px;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    background: rgba(21, 21, 22, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.3);
    transform: translateX(-50%);
}

.price-summary {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.discount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border: 1px solid rgba(106, 197, 138, 0.28);
    border-radius: 9px;
    color: #a9e5bc;
    background: rgba(57, 134, 83, 0.13);
    font-size: 11px;
}

.discount-row strong {
    font-size: 12px;
}

.price-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 13px;
}

.summary-label small {
    color: var(--gold);
    font-size: 10px;
}

#total-price {
    color: var(--gold-bright);
    font-size: 27px;
    font-weight: 800;
}

.primary-button {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 17px;
    padding: 13px 18px;
    border: 1px solid #e6ca82;
    border-radius: 13px;
    color: #211b10;
    background: linear-gradient(115deg, #d7b76b, #f1d58f);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: filter 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.primary-button:not(:disabled):hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.primary-button:disabled {
    border-color: var(--line);
    color: #77736b;
    background: #242424;
    cursor: not-allowed;
}

.payment-content {
    text-align: center;
}

.payment-content .section-heading {
    text-align: left;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 24px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: #111112;
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}

.back-button:hover {
    color: var(--gold-bright);
    border-color: rgba(215, 183, 107, 0.36);
}

.payment-total {
    margin: -7px 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.payment-total strong {
    color: var(--gold-bright);
    font-size: 17px;
}

.payment-qr {
    display: inline-flex;
    justify-self: center;
    margin: 2px 0 20px;
    padding: 12px;
    border: 1px solid rgba(215, 183, 107, 0.3);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
}

.payment-qr img {
    display: block;
    width: 190px;
    height: 190px;
    object-fit: contain;
}

.payment-form {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #111112;
    text-align: left;
}

.payment-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #c9c5bc;
    font-size: 11px;
    font-weight: 700;
}

#x-username {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background: #1a1a1b;
    font: inherit;
    font-size: 12px;
}

#x-username:focus {
    border-color: rgba(215, 183, 107, 0.65);
    box-shadow: 0 0 0 3px rgba(215, 183, 107, 0.1);
}

#x-username::placeholder {
    color: #77736b;
}

#slip-file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

#slip-file + div {
    min-height: 78px;
    padding: 13px 10px;
    border: 1px dashed rgba(215, 183, 107, 0.3);
    border-radius: 10px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
}

#slip-file + div i {
    color: var(--gold);
}

.submit-button {
    margin-top: 18px;
}

#step-tickets > div:first-child > div:first-child {
    padding: 8px 0 2px;
}

#step-tickets > div:first-child > div:first-child > div {
    color: #91d6ad;
    background: rgba(80, 175, 115, 0.1);
    box-shadow: none;
}

#step-tickets h2 {
    margin: 0;
}

#tickets-container {
    display: grid;
    gap: 14px;
    max-height: 480px;
    overflow-y: auto;
}

#step-tickets > div:first-child {
    gap: 17px;
}

.ticket-card {
    display: block;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #111112;
}

.ticket-card-header,
.ticket-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ticket-card h3 {
    margin: 0;
    font-size: 15px;
}

.ticket-code {
    color: var(--muted);
    font-family: monospace;
    font-size: 10px;
}

.ticket-name-row {
    margin: 14px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #19191a;
}

.ticket-name-label {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 10px;
}

.ticket-name {
    margin: 0;
    color: #91d6ad;
    font-size: 15px;
    font-weight: 750;
}

.copy-button {
    padding: 8px 10px;
    border: 1px solid rgba(215, 183, 107, 0.28);
    border-radius: 8px;
    color: var(--gold-bright);
    background: rgba(215, 183, 107, 0.08);
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.ticket-qr-info {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.ticket-qr-frame {
    display: grid;
    width: 132px;
    height: 132px;
    justify-self: center;
    place-items: center;
    padding: 6px;
    border-radius: 10px;
    background: white;
}

.ticket-qr-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ticket-qr-pending {
    display: grid;
    min-height: 132px;
    align-content: center;
    justify-items: center;
    gap: 7px;
    padding: 18px;
    border: 1px dashed rgba(215, 183, 107, 0.35);
    border-radius: 10px;
    color: var(--gold-bright);
    text-align: center;
}

.ticket-qr-pending i {
    font-size: 23px;
}

.ticket-qr-pending strong {
    font-size: 11px;
}

.ticket-qr-pending span {
    color: var(--muted);
    font-size: 10px;
}

.ticket-instructions {
    margin: 0;
    padding-left: 20px;
    color: #c9c5bc;
    font-size: 10px;
    line-height: 1.8;
}

.ticket-instructions strong {
    color: var(--gold-bright);
}

#step-tickets a {
    color: var(--gold-bright);
}

#step-tickets > div:last-child > p {
    color: var(--muted);
    font-size: 11px;
}

#step-tickets > div:last-child > button {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: #222223;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 860px) {
    body.site-shell {
        grid-template-columns: minmax(0, 620px);
        padding: 94px 16px 26px;
    }
}

@media (max-width: 520px) {
    body.site-shell {
        padding: 58px 0 0;
        background: var(--page);
    }

    .booking-card {
        min-height: calc(100vh - 58px);
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .booking-content {
        min-height: auto;
        padding: 24px 20px 30px;
    }

    .section-heading {
        font-size: 18px;
    }

    .concert-card {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 12px;
        padding: 13px;
    }

    .concert-poster-wrap {
        grid-column: 1;
        width: 82px;
        height: 112px;
    }

    .concert-details {
        grid-column: 2;
        grid-row: 1;
        gap: 7px;
    }

    .concert-details > strong {
        font-size: 12px;
    }

    .concert-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .concert-month-list {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .selection-footer {
        width: 100%;
        padding: 13px 20px calc(17px + env(safe-area-inset-bottom));
        border-right: 0;
        border-left: 0;
        border-radius: 15px 15px 0 0;
    }

    .payment-qr img {
        width: 170px;
        height: 170px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .concert-status-badge.is-active {
        animation: none;
    }
}
