/* VoxaParty secondary pages: legal, Extended License showcase, checkout.
   Loads after home.css, which owns tokens, type, buttons, nav and footer. */

/* Older token names used below, mapped onto the home.css palette. */
:root {
    --bg-card: var(--surface);
    --bg-subtle: var(--surface-2);
    --purple: #8B5CF6;
    --purple-light: var(--violet-soft);
    --text-muted: var(--text-2);
    --text-dim: var(--text-3);
    --border: var(--line);
}

/* Secondary pages always show the solid nav bar. */
.nav { background: rgba(10, 10, 12, 0.86); border-bottom-color: var(--line); }

/* ── LEGAL PAGES ── */
.legal {
    position: relative;
    padding: 148px var(--gutter) 112px;
}

.legal-head {
    max-width: 720px;
    margin: 0 auto 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.legal-title {
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 660;
    font-stretch: 112%;
    line-height: 1.02;
    letter-spacing: -0.038em;
    margin-bottom: 16px;
}

.legal-updated {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.legal-body {
    max-width: 720px;
    margin: 0 auto;
}

.legal-intro {
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1.7;
    padding-bottom: 8px;
}

.legal-body h2 {
    font-size: 1.3rem;
    font-weight: 600;
    font-stretch: 108%;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--text);
    margin: 48px 0 14px;
}

.legal-body p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 14px;
}

.legal-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.legal-body ul li {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    padding-left: 20px;
    position: relative;
}

.legal-body ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--violet-soft);
}

.legal-body strong { color: var(--text); font-weight: 600; }

.legal-body a {
    color: var(--violet-soft);
    text-decoration: underline;
    text-decoration-color: rgba(167, 139, 250, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.legal-body a:hover { text-decoration-color: currentColor; }

.legal-note {
    margin-top: 48px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.9rem !important;
    color: var(--text-dim) !important;
    line-height: 1.7 !important;
    margin-bottom: 0 !important;
}

/* ═══════════════════════════ EXTENDED LICENSE / PACK SHOWCASE ═══════════════════════════ */
.xl-page {
    position: relative;
    padding: 140px var(--gutter) 96px;
}

.xl-head {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.xl-title {
    font-size: clamp(2.4rem, 5vw, 3.75rem);
    font-weight: 660;
    font-stretch: 112%;
    line-height: 1.02;
    letter-spacing: -0.038em;
    margin: 0 0 18px;
}

.xl-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.65;
    max-width: 56ch;
    margin: 0 auto;
}

/* ── tabs ── */
.xl-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    position: sticky;
    top: 68px;
    z-index: 30;
    margin: 0 calc(var(--gutter) * -1) 8px;
    padding: 14px var(--gutter);
    background: rgba(10, 10, 12, 0.88);
    -webkit-backdrop-filter: saturate(140%) blur(16px);
    backdrop-filter: saturate(140%) blur(16px);
    border-bottom: 1px solid var(--line);
}

.xl-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.xl-tab:hover:not([disabled]):not([aria-selected="true"]) {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.xl-tab[aria-selected="true"] {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

.xl-tab[aria-selected="true"] .xl-tab-count { color: #5B5B66; }

.xl-tab[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.xl-tab-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.xl-tab-soon {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--violet-soft);
    border: 1px solid var(--line-2);
    border-radius: 999px;
    padding: 2px 8px;
}

.xl-meta {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.82rem;
    margin-bottom: 44px;
    position: relative;
    z-index: 2;
}

/* ── stacked category sections ── */
.xl-cats {
    position: relative;
    z-index: 2;
}

.xl-cat {
    position: relative;
    z-index: 2;
    scroll-margin-top: 150px;
    padding-top: 40px;
}

.xl-cat + .xl-cat {
    margin-top: 24px;
    border-top: 1px solid var(--border);
}

.xl-cat-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 34px;
}

.xl-cat-title {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    font-size: clamp(1.6rem, 2.8vw, 2.25rem);
    font-weight: 640;
    font-stretch: 112%;
    letter-spacing: -0.03em;
}

.xl-cat-title span {
    font-size: 0.9rem;
    font-weight: 500;
    font-stretch: 100%;
    letter-spacing: 0;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.xl-cat-meta {
    color: var(--text-dim);
    font-size: 0.82rem;
    margin-top: 10px;
}

/* ── grid ── */
.xl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    max-width: 1180px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.xl-cell {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: transform 0.3s var(--ease-out), border-color 0.25s, background-color 0.25s, box-shadow 0.3s;
}

.xl-cell:hover {
    transform: translateY(-3px);
    border-color: var(--line-2);
    background: var(--surface-2);
    box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.8);
}

.xl-cell:focus-visible {
    outline: 2px solid var(--purple-light);
    outline-offset: 2px;
}

.xl-cell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.xl-cell-num {
    position: absolute;
    left: 11px;
    bottom: 8px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    z-index: 2;
}

.xl-cell-tag {
    position: absolute;
    right: 9px;
    top: 9px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--violet-tint);
    color: var(--violet-soft);
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 2;
}

.xl-cell:hover .xl-cell-tag { opacity: 1; }

/* ── entrance-animation grid (video previews) ── */
.xl-grid--v {
    grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
    gap: 14px;
}

.xl-cell--v {
    aspect-ratio: 3 / 4;
    padding: 0;
    overflow: hidden;
}

.xl-cell--v img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transition: transform 0.35s ease;
}

.xl-cell--v:hover img { transform: scale(1.05); }

.xl-cell-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(10, 10, 12, 0.82) 0%, rgba(10, 10, 12, 0.12) 40%, transparent 62%);
    pointer-events: none;
}

.xl-cell-name {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 2;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xl-cell-play {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 2px;
    border-radius: 50%;
    background: rgba(10, 10, 12, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    transition: background 0.25s, transform 0.25s, border-color 0.25s;
}

.xl-cell--v:hover .xl-cell-play,
.xl-cell--g:hover .xl-cell-play {
    background: #fff;
    border-color: #fff;
    color: var(--violet);
    transform: scale(1.08);
}

/* ── virtual-gift grid (icon thumbnail, video preview) ── */
.xl-grid--g {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.xl-cell--g {
    overflow: hidden;
}

.xl-cell--g img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px 10px 26px;
    transition: transform 0.35s ease;
}

.xl-cell--g:hover img { transform: scale(1.06); }

.xl-cell--g .xl-cell-scrim {
    background: linear-gradient(to top, rgba(10, 10, 12, 0.9) 0%, rgba(10, 10, 12, 0.25) 26%, transparent 46%);
}

/* ── decoration grids (entrance badges, chat bubbles — static preview) ── */
.xl-grid--wide {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.xl-grid--bubble {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.xl-cell--d {
    overflow: hidden;
}

.xl-cell--wide { aspect-ratio: 27 / 10; }
.xl-cell--bubble { aspect-ratio: 1 / 1; }

.xl-cell--d img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.xl-cell--wide img { padding: 20px 22px 28px; }
.xl-cell--bubble img { padding: 16px 16px 24px; }

.xl-cell--d:hover img { transform: scale(1.045); }

.xl-cell--d .xl-cell-scrim {
    background: linear-gradient(to top, rgba(10, 10, 12, 0.82) 0%, rgba(10, 10, 12, 0.15) 30%, transparent 48%);
}

.xl-cell--d .xl-cell-play {
    opacity: 0;
    transition: opacity 0.25s, background 0.25s, transform 0.25s, border-color 0.25s;
}
.xl-cell--d:hover .xl-cell-play {
    opacity: 1;
    background: #fff;
    border-color: #fff;
    color: var(--violet);
    transform: scale(1.06);
}

/* ── shared CTA button ── */
.xl-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 22px;
    background: var(--violet);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 20px -8px rgba(124, 58, 237, 0.7);
    transition: background-color 0.2s, transform 0.2s var(--ease-out);
}

.xl-cta:hover {
    background: var(--violet-hover);
}

.xl-cta:active { transform: scale(0.98); }

.xl-cta:focus-visible {
    outline: 2px solid var(--purple-light);
    outline-offset: 3px;
}

.xl-cta-note {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 12px;
}

/* ── header CTA ── */
.xl-head-cta {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ═══════════ LICENSE MODAL ═══════════ */
.xl-modal[hidden] { display: none; }

.xl-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vh 5vw;
    background: rgba(8, 8, 10, 0.82);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.xl-modal.open { opacity: 1; }

.xl-modal-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 384px;
    width: 100%;
    max-width: 968px;
    max-height: 88vh;
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform: scale(0.965) translateY(14px);
    filter: blur(6px);
    transition: transform 0.44s cubic-bezier(0.16, 1, 0.3, 1), filter 0.44s ease;
    box-shadow: 0 44px 100px -24px rgba(0, 0, 0, 0.85);
}

.xl-modal.open .xl-modal-panel {
    transform: none;
    filter: none;
}

/* stage */
.xl-modal-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
    min-height: 400px;
    overflow: hidden;
    background:
        radial-gradient(60% 55% at 50% 42%, rgba(124, 58, 237, 0.14) 0%, transparent 70%),
        var(--bg);
}

.xl-modal-ghost {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -53%);
    font-size: clamp(9rem, 21vw, 15rem);
    font-weight: 700;
    font-stretch: 112%;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.035);
    user-select: none;
    pointer-events: none;
    z-index: 0;
}

.xl-modal-stage img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1;
    object-fit: contain;
    filter: drop-shadow(0 22px 44px rgba(0, 0, 0, 0.5));
    transition: opacity 0.26s ease, transform 0.26s ease;
}

.xl-modal-stage img.is-swapping {
    opacity: 0;
    transform: scale(0.97);
}

/* the global `img { display: block }` defeats the hidden attribute — restore it */
.xl-modal-stage img[hidden] { display: none; }

/* video preview (entrance animations) */
.xl-modal-stage.is-video {
    padding: 30px;
    min-height: min(80vh, 660px);
}

.xl-modal-stage.is-video .xl-modal-ghost,
.xl-modal-stage.is-video .xl-modal-track,
.xl-modal-stage.is-deco .xl-modal-ghost,
.xl-modal-stage.is-deco .xl-modal-track { display: none; }

/* static decoration preview (entrance badges, chat bubbles) */
.xl-modal-stage.is-deco {
    padding: 54px 44px 40px;
    min-height: min(70vh, 540px);
}

.xl-modal-stage.is-deco img {
    width: auto;
    height: auto;
    max-width: min(94%, 680px);
    max-height: min(60vh, 460px);
    aspect-ratio: auto;
    object-fit: contain;
    filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.5));
}

/* user-badge emblems: fill more of the stage than their small native size */
.xl-modal-stage.is-deco.is-badge img {
    width: min(78%, 420px);
    max-width: min(78%, 420px);
    max-height: min(52vh, 420px);
}

.xl-modal-stage.is-deco-wide {
    min-height: min(40vh, 300px);
    padding: 48px 40px 34px;
}

.xl-modal-stage.is-deco-wide img {
    max-width: min(90%, 600px);
    max-height: 42vh;
}

.xl-modal-stage video {
    position: relative;
    z-index: 1;
    display: block;
    height: min(70vh, 560px);
    width: auto;
    max-width: 100%;
    aspect-ratio: 704 / 1574;
    object-fit: contain;
    border-radius: 20px;
    background: #000;
    box-shadow: 0 28px 66px rgba(0, 0, 0, 0.55);
}

.xl-modal-stage video[hidden] { display: none; }

.xl-modal-wm {
    position: absolute;
    left: 0; right: 0;
    top: 18px;
    padding: 0 56px;
    text-align: center;
    font-size: 0.66rem;
    line-height: 1.45;
    color: var(--text-dim);
    z-index: 3;
    pointer-events: none;
}

.xl-modal-track {
    position: absolute;
    left: 50%;
    bottom: 42px;
    transform: translateX(-50%);
    width: 132px;
    height: 3px;
    border-radius: 999px;
    background: var(--line-2);
    overflow: hidden;
    z-index: 3;
}

.xl-modal-track-fill {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--purple-light);
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.44s cubic-bezier(0.16, 1, 0.3, 1);
}

.xl-modal-count {
    position: absolute;
    left: 0; right: 0;
    bottom: 18px;
    text-align: center;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-dim);
    z-index: 3;
}

/* sell panel */
.xl-modal-sell {
    display: flex;
    flex-direction: column;
    padding: 40px 36px;
    background: var(--surface);
    border-left: 1px solid var(--line);
    overflow-y: auto;
}

.xl-modal-title {
    font-size: 1.6rem;
    font-weight: 640;
    font-stretch: 112%;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.xl-modal-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.xl-modal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.xl-modal-list li {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.xl-modal-list li svg {
    flex-shrink: 0;
    color: var(--purple-light);
    margin-top: 2px;
}

.xl-modal-sell .xl-cta { margin-top: auto; }

/* controls */
.xl-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(10, 10, 12, 0.72);
    border: 1px solid var(--line-2);
    color: var(--text-muted);
    cursor: pointer;
    z-index: 7;
    transition: background 0.2s, color 0.2s;
}

@supports (top: env(safe-area-inset-top)) {
    .xl-modal-close { top: calc(14px + env(safe-area-inset-top)); }
}

.xl-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.xl-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(10, 10, 12, 0.62);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    z-index: 6;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.xl-modal-nav:hover {
    background: rgba(255, 255, 255, 0.12);
}

.xl-modal-prev { left: max(14px, 3vw); }
.xl-modal-next { right: max(14px, 3vw); }
.xl-modal-prev:hover { transform: translateY(-50%) translateX(-2px); }
.xl-modal-next:hover { transform: translateY(-50%) translateX(2px); }

.xl-modal-close:focus-visible,
.xl-modal-nav:focus-visible {
    outline: 2px solid var(--purple-light);
    outline-offset: 2px;
}

@media (max-width: 860px) {
    .xl-modal {
        display: block;
        padding: 0;
    }
    .xl-modal-panel {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        min-width: 0;
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border: none;
        border-radius: 0;
        transform: translateY(18px);
    }
    .xl-modal.open .xl-modal-panel { transform: none; }
    .xl-modal-stage {
        flex: 0 0 44vh;
        min-height: 0;
        padding: 56px 24px 42px;
    }
    .xl-modal-stage img { max-width: min(54vw, 250px); }
    .xl-modal-ghost { font-size: 34vw; }
    .xl-modal-stage.is-deco { flex-basis: 40vh; padding: 44px 20px 30px; }
    .xl-modal-stage.is-deco img { max-width: 92%; max-height: 34vh; }
    .xl-modal-stage.is-deco-wide { flex-basis: 30vh; padding: 34px 16px 22px; }
    .xl-modal:has(.is-deco) .xl-modal-nav { top: 40vh; }
    .xl-modal:has(.is-deco-wide) .xl-modal-nav { top: 30vh; }
    .xl-modal-stage.is-video {
        flex-basis: 58vh;
        min-height: 0;
        padding: 46px 20px 26px;
    }
    .xl-modal-stage.is-video video { height: 100%; max-height: 52vh; }
    .xl-modal-sell {
        flex: 1 1 auto;
        min-width: 0;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
        -webkit-overflow-scrolling: touch;
    }
    .xl-modal-sell > * {
        width: 100%;
        max-width: 460px;
        margin-left: auto;
        margin-right: auto;
    }
    .xl-modal-sell .xl-cta { margin-top: 24px; }
    .xl-modal-nav {
        top: 44vh;
        width: 42px;
        height: 42px;
        background: rgba(10, 10, 12, 0.9);
    }
    .xl-modal-prev, .xl-modal-next { transform: translateY(-50%); }
    .xl-modal-prev { left: 12px; }
    .xl-modal-next { right: 12px; }
    .xl-modal-prev:hover { transform: translateY(-50%) translateX(-2px); }
    .xl-modal-next:hover { transform: translateY(-50%) translateX(2px); }
}

@media (max-width: 720px) {
    .xl-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .xl-cell { border-radius: 16px; padding: 9px; }
    .xl-grid--v, .xl-grid--g, .xl-grid--bubble { gap: 12px; }
    .xl-grid--v .xl-cell, .xl-grid--g .xl-cell,
    .xl-grid--wide .xl-cell, .xl-grid--bubble .xl-cell { padding: 0; border-radius: 16px; }
    .xl-grid--wide { grid-template-columns: 1fr; gap: 12px; }
    .xl-grid--bubble { grid-template-columns: repeat(2, 1fr); }
    .xl-cell--wide img { padding: 16px 18px 24px; }
}

@media (max-width: 600px) {
    .xl-page { padding-top: 112px; }
    .xl-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-top: 12px; padding-bottom: 12px; }
    .xl-tabs::-webkit-scrollbar { display: none; }
    .xl-tab { flex: none; padding: 8px 14px; font-size: 0.85rem; }
    .xl-cat { scroll-margin-top: 172px; padding-top: 32px; }
}

@media (max-width: 340px) {
    .xl-grid:not(.xl-grid--wide) { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .xl-modal,
    .xl-modal-panel,
    .xl-modal-stage img,
    .xl-modal-track-fill,
    .xl-cell { transition: none; }
    .xl-modal-panel { filter: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   CHECKOUT / INVOICE  (extended-license-checkout-*.html)
   Link-only page. Sealed chrome: the logo is not a link and there is no
   nav, so the only way out of the document is a deliberate one.
   ═══════════════════════════════════════════════════════════════════════ */

.inv-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 var(--gutter);
    height: 64px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 10;
}
.inv-topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.inv-topbar-logo img { width: 30px; height: 30px; }

.inv-topbar-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--line-2);
    border-radius: 999px;
    padding: 5px 12px;
}

/* ── shell ── */
.inv-wrap {
    position: relative;
    padding: 56px var(--gutter) 88px;
}

.inv-doc {
    position: relative;
    z-index: 1;
    max-width: 880px;
    margin: 0 auto;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 48px 48px 44px;
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}

/* ── document head ── */
.inv-doc-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 36px;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--border);
}
.inv-doc-head-text { flex: 1 1 auto; min-width: 0; }

.inv-title {
    font-size: clamp(2rem, 4.2vw, 2.9rem);
    font-weight: 660;
    font-stretch: 112%;
    line-height: 1.02;
    letter-spacing: -0.038em;
    margin-bottom: 16px;
}
.inv-sub {
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.65;
    max-width: 46ch;
}

.inv-doc-price {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.inv-doc-price-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
}
.inv-doc-price-fig {
    font-size: 2.6rem;
    font-weight: 660;
    font-stretch: 112%;
    line-height: 1.1;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.inv-doc-price-cur {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
}

/* ── section headings ── */
.inv-sec-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 40px 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--text);
}
.inv-sec-title--alt { color: var(--gold); margin-top: 34px; }
.inv-sec-rule {
    flex: 1 1 auto;
    height: 1px;
    background: var(--line);
}
.inv-sec-title--alt .inv-sec-rule {
    background: rgba(245, 181, 68, 0.25);
}
.inv-sec-col {
    color: var(--text-dim);
    font-weight: 500;
}

/* ── ledger ── */
.inv-ledger { list-style: none; }

.inv-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}
.inv-ledger .inv-row:last-child { border-bottom: none; }

.inv-row-body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}
.inv-row-ic {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--violet-tint);
    border: 1px solid rgba(139, 92, 246, 0.22);
    color: var(--violet-soft);
}
.inv-row-text { min-width: 0; }
.inv-row-text h3 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 5px;
}
.inv-row-text p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.62;
    max-width: 56ch;
}

.inv-row-amt {
    flex: 0 0 auto;
    align-self: flex-start;
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── proof: admin dashboard shot ── */
.inv-proof { margin-top: 14px; max-width: 520px; }
.inv-proof img {
    border-radius: 12px;
    border: 1px solid var(--border);
}
.inv-proof figcaption {
    margin-top: 8px;
    font-size: 0.74rem;
    color: var(--text-dim);
}

/* ── proof: drifting cosmetic strip ── */
.inv-marquee {
    margin-top: 15px;
    max-width: 100%;
    overflow: hidden;
    padding: 4px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.inv-marquee-track {
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    animation: inv-drift 70s linear infinite;
}
.inv-marquee-track img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    padding: 4px;
}
@keyframes inv-drift {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.inv-packs {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 14px;
    margin-top: 15px;
    max-width: 520px;
}
.inv-packs li {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.inv-packs b {
    color: var(--text);
    font-weight: 650;
    margin-right: 3px;
    font-variant-numeric: tabular-nums;
}

.inv-verify {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 15px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--violet-soft);
    text-underline-offset: 4px;
}
.inv-verify:hover { text-decoration: underline; }

/* ── available separately ── */
.inv-row--addon {
    align-items: center;
    margin-top: 4px;
    padding: 20px 22px;
    background: rgba(245, 181, 68, 0.04);
    border: 1px solid rgba(245, 181, 68, 0.25);
    border-radius: var(--radius);
}
.inv-row--addon .inv-row-ic {
    color: var(--gold);
    background: rgba(245, 181, 68, 0.08);
    border-color: rgba(245, 181, 68, 0.28);
}
.inv-row-quote {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid rgba(245, 181, 68, 0.35);
    border-radius: 999px;
    padding: 9px 16px;
    white-space: nowrap;
    transition: background 0.2s;
}
.inv-row-quote:hover { background: rgba(245, 181, 68, 0.1); }

/* ── totals ── */
.inv-total {
    margin-top: 32px;
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.inv-total-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 4px 0;
}
.inv-total-line--muted { color: var(--text-dim); }
.inv-total-grand {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}
.inv-total-grand b {
    font-size: 2rem;
    font-weight: 660;
    font-stretch: 112%;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

/* ── payment ── */
.inv-pay { margin-top: 34px; }

.inv-pay-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    height: 56px;
    background: var(--violet);
    color: #fff;
    padding: 0 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 10px 24px -10px rgba(124, 58, 237, 0.8);
    transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.inv-pay-primary:hover {
    background: var(--violet-hover);
}
.inv-pay-primary:focus-visible {
    outline: 2px solid var(--purple-light);
    outline-offset: 3px;
}

/* Long label on roomy screens, short one once the button gets tight. */
.inv-pay-short { display: none; }

.inv-pay-note {
    margin-top: 12px;
    text-align: center;
    font-size: 0.76rem;
    line-height: 1.7;
    color: var(--text-dim);
}

.inv-pay-note a {
    color: var(--violet-soft);
    font-weight: 600;
    text-underline-offset: 3px;
}
.inv-pay-note a:hover { text-decoration: underline; }

.inv-or {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 30px 0 20px;
}
.inv-or::before,
.inv-or::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--border);
}
.inv-or span {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-dim);
    white-space: nowrap;
}

.inv-alt {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.inv-alt-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color 0.2s, background 0.2s;
}
.inv-alt-card:hover {
    border-color: var(--line-2);
    background: var(--surface-2);
}
.inv-alt-card:focus-visible {
    outline: 2px solid var(--purple-light);
    outline-offset: 3px;
}
.inv-alt-ic {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.05);
}
.inv-alt-ic--binance { color: #F0B90B; }
.inv-alt-ic--paypal  { color: #7BA7E0; }

.inv-alt-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}
.inv-alt-text b {
    font-size: 0.95rem;
    font-weight: 600;
}
.inv-alt-text small {
    font-size: 0.74rem;
    color: var(--text-dim);
    line-height: 1.45;
}
.inv-alt-arrow { flex: 0 0 auto; color: var(--text-dim); }

/* ── after payment ── */
.inv-after {
    margin-top: 38px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.inv-after-title {
    font-size: 1.15rem;
    font-weight: 600;
    font-stretch: 108%;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 20px;
}

.inv-steps {
    list-style: none;
    display: grid;
    gap: 16px;
}
.inv-steps li {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}
.inv-step-n {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.inv-steps b {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.inv-steps p {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 60ch;
}

.inv-stuck {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    height: 40px;
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    border: 1px solid var(--line-2);
    border-radius: 999px;
    transition: background-color 0.2s;
}
.inv-stuck:hover {
    background: rgba(255, 255, 255, 0.06);
}

.inv-legal {
    margin-top: 24px;
    font-size: 0.75rem;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 68ch;
}

/* ── footer ── */
.inv-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 28px var(--gutter);
    background: var(--bg-2);
    border-top: 1px solid var(--line);
}
.inv-footer p {
    color: var(--text-dim);
    font-size: 0.8rem;
}
.inv-footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}
.inv-footer-links a {
    color: var(--text-dim);
    transition: color 0.2s;
}
.inv-footer-links a:hover { color: var(--text); }

/* ── responsive ── */
@media (max-width: 860px) {
    .inv-doc { padding: 36px 30px 34px; }
    .inv-doc-head { flex-direction: column; gap: 24px; }
    .inv-doc-price {
        flex-direction: row;
        align-items: baseline;
        gap: 10px;
        align-self: stretch;
        justify-content: space-between;
    }
    .inv-doc-price-fig { font-size: 2rem; }
    .inv-alt { grid-template-columns: 1fr; }
    .inv-packs { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .inv-wrap { padding-top: 36px; padding-bottom: 60px; }
    .inv-doc { padding: 28px 20px 30px; }
    /* Column flex + align-items:flex-start would size children to max-content,
       which the marquee track (width:max-content) blows past the viewport.
       Stretch keeps every row bound to the card width. */
    .inv-row { flex-direction: column; align-items: stretch; gap: 12px; }
    .inv-row--addon { align-items: stretch; }
    .inv-row-amt { align-self: flex-start; margin-top: 0; margin-left: 48px; }
    .inv-row-quote { align-self: flex-start; margin-left: 48px; }
    .inv-sec-col { display: none; }
    .inv-total-grand b { font-size: 1.55rem; }
    .inv-pay-primary { font-size: 0.95rem; padding: 0 18px; }
    .inv-pay-long { display: none; }
    .inv-pay-short { display: inline; }
    .inv-footer { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .inv-marquee-track { animation: none; }
    .inv-pay-primary,
    .inv-alt-card,
    .inv-row-quote { transition: none; }
}
