/* Landing homepage — modals, module cards, v1/v2 staging */

.landing-module-card--action {
    cursor: pointer;
    border: none;
    font: inherit;
    text-align: left;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}

.landing-module-card--action:hover {
    transform: translateY(-4px);
    border-color: rgba(103, 232, 249, .3);
    box-shadow: 0 18px 40px rgba(2, 6, 23, .35);
    color: inherit;
}

.landing-module-card--action:focus-visible {
    outline: 2px solid rgba(103, 232, 249, 0.65);
    outline-offset: 3px;
}

.landing-module-card--link {
    text-decoration: none;
    color: inherit;
}

/* Modals */
.landing-modal-root {
    position: fixed;
    inset: 0;
    z-index: 14000;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-modal-root.is-open {
    opacity: 1;
    pointer-events: auto;
}

.landing-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 14, 0.78);
    backdrop-filter: blur(12px);
}

.landing-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: min(88vh, 820px);
    overflow: auto;
    border-radius: 24px;
    border: 1px solid var(--stroke-strong);
    background: linear-gradient(165deg, rgba(18, 24, 42, 0.98), rgba(8, 12, 24, 0.96));
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
    transform: translateY(16px) scale(0.97);
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing-modal-root.is-open .landing-modal-dialog {
    transform: translateY(0) scale(1);
}

.landing-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 0;
}

.landing-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    background: rgba(139, 92, 246, 0.18);
    color: #c4b5fd;
    flex-shrink: 0;
}

.landing-modal-head h2 {
    margin: 4px 0 0;
    font-size: 1.45rem;
}

.landing-modal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #67e8f9;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
    font-weight: 900;
}

.landing-modal-close {
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.landing-modal-close:hover {
    color: #fff;
    border-color: rgba(148, 163, 184, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.landing-modal-body {
    padding: 20px 24px 24px;
    color: #cbd5e1;
    line-height: 1.65;
}

.landing-modal-body p {
    margin: 0 0 14px;
}

.landing-modal-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.landing-modal-feature {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(15, 23, 42, 0.55);
}

.landing-modal-feature strong {
    display: block;
    margin-bottom: 6px;
    color: #f8fafc;
    font-size: 0.92rem;
}

.landing-modal-feature span {
    font-size: 0.86rem;
    color: var(--muted);
}

.landing-modal-list {
    margin: 12px 0 0;
    padding-left: 1.15rem;
    display: grid;
    gap: 8px;
}

.landing-modal-foot {
    padding: 0 24px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.landing-modal-root.is-membership .landing-modal-dialog {
    width: min(920px, 100%);
    border-color: rgba(251, 113, 133, 0.35);
    box-shadow:
        0 28px 80px rgba(2, 6, 23, 0.55),
        0 0 0 1px rgba(251, 113, 133, 0.12);
    background:
        linear-gradient(180deg, rgba(251, 113, 133, 0.08), transparent 120px),
        linear-gradient(165deg, rgba(18, 24, 42, 0.98), rgba(8, 12, 24, 0.96));
}

.landing-modal-root.is-membership .landing-modal-icon {
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.28), rgba(190, 24, 93, 0.18));
    color: #fecdd3;
}

.landing-modal-root.is-membership .landing-modal-kicker {
    color: #fda4af;
}

.landing-modal-root.is-membership .landing-modal-foot {
    border-top: 1px solid rgba(251, 113, 133, 0.14);
    padding-top: 18px;
    margin-top: 4px;
}

.landing-modal-root.is-membership .landing-modal-foot .btn-patreon {
    flex: 1 1 220px;
}

.landing-modal-root.is-membership .landing-modal-foot .btn-glass {
    flex: 1 1 180px;
}

.landing-modal-foot .btn {
    justify-content: center;
}

/* Web Leaderboard embed preview modal */
.landing-modal-root.is-leaderboard-embed .landing-modal-dialog {
    width: min(1180px, calc(100vw - 28px));
    max-height: min(92vh, 960px);
}

.landing-modal-root.is-leaderboard-embed .landing-modal-icon {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(99, 102, 241, 0.18));
    color: #a5f3fc;
}

.landing-modal-root.is-leaderboard-embed .landing-modal-kicker {
    color: #67e8f9;
}

.landing-leaderboard-embed-shell {
    position: relative;
    margin: 16px 0 18px;
    border-radius: 20px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background:
        linear-gradient(180deg, rgba(34, 211, 238, 0.06), transparent 40%),
        rgba(4, 8, 18, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 24px 60px rgba(2, 6, 23, 0.45);
    overflow: hidden;
}

.landing-leaderboard-embed-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.landing-leaderboard-embed-frame {
    display: block;
    width: 100%;
    height: min(62vh, 620px);
    min-height: 420px;
    border: 0;
    background: #04060d;
}

.landing-leaderboard-embed-features {
    margin-bottom: 0;
}

.landing-modal-root.is-leaderboard-embed .landing-modal-foot {
    border-top: 1px solid rgba(34, 211, 238, 0.14);
    padding-top: 18px;
    margin-top: 4px;
}

.landing-modal-root.is-leaderboard-embed .landing-modal-foot .btn-patreon {
    flex: 1 1 240px;
}

@media (max-width: 768px) {
    .landing-leaderboard-embed-frame {
        height: min(56vh, 520px);
        min-height: 360px;
    }

    .landing-modal-root.is-leaderboard-embed .landing-modal-foot .btn {
        width: 100%;
        flex: 1 1 100%;
    }
}

@media (max-width: 640px) {
    .landing-modal-root.is-membership .landing-modal-foot .btn {
        width: 100%;
        flex: 1 1 100%;
    }
}

.membership-grace-countdown {
    margin: 18px 0;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(251, 113, 133, 0.28);
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.12), rgba(15, 23, 42, 0.45));
}

.membership-grace-countdown strong {
    display: block;
    color: #fecdd3;
    margin-bottom: 8px;
}

.membership-grace-timer {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff7ed;
    margin: 0 0 8px;
}

.membership-grace-delete {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.membership-modal-preview-wrap {
    margin: 20px 0 8px;
}

.membership-modal-preview-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.membership-modal-preview-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #fda4af;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.membership-modal-preview-hint {
    margin: 0;
    flex: 1 1 220px;
    max-width: 480px;
    color: #94a3b8;
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: right;
}

.membership-modal-script-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.membership-modal-lead {
    font-size: 1.02rem;
    color: #e2e8f0;
}

.membership-modal-hook {
    color: #cbd5e1;
    font-size: 0.96rem;
}

.membership-modal-value-grid {
    margin-top: 8px;
}

.membership-grace-ended-banner {
    margin: 0 0 16px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(15, 23, 42, 0.5));
}

.membership-grace-ended-banner strong {
    display: block;
    color: #fecaca;
    margin-bottom: 8px;
}

.membership-grace-ended-banner p {
    margin: 0;
    color: #e2e8f0;
}

.membership-inline-grace {
    margin: 18px 0 22px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(251, 113, 133, 0.28);
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.1), rgba(15, 23, 42, 0.45));
    display: grid;
    gap: 6px;
}

.membership-inline-grace strong {
    color: #fecdd3;
}

.membership-inline-grace-timer {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff7ed;
    letter-spacing: 0.02em;
}

.membership-inline-grace small {
    color: #94a3b8;
}

.membership-inline-grace.is-expired .membership-inline-grace-timer {
    color: #fca5a5;
}

.membership-inline-grace-ended {
    border-color: rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(15, 23, 42, 0.45));
}

.membership-inline-grace-ended strong {
    color: #fecaca;
}

.membership-inline-grace-ended span {
    color: #e2e8f0;
}

.membership-modal-preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(210px, 0.72fr);
    gap: 16px;
    align-items: start;
}

.membership-modal-preview-mount {
    min-width: 0;
}

.membership-modal-script-info {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.55);
}

.membership-modal-script-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(251, 113, 133, 0.28);
    background: rgba(251, 113, 133, 0.1);
    color: #fda4af;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.membership-modal-script-info h4 {
    margin: 10px 0 8px;
    font-size: 1.02rem;
    line-height: 1.35;
    color: #f8fafc;
}

.membership-modal-script-info > p {
    margin: 0 0 12px;
    font-size: 0.84rem;
    color: #94a3b8;
    line-height: 1.5;
}

.membership-modal-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.membership-modal-feature-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 9px 11px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.35);
}

.membership-modal-feature-list li i {
    margin-top: 3px;
    color: #34d399;
    font-size: 0.72rem;
}

.membership-modal-feature-list li strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.8rem;
    color: #f1f5f9;
}

.membership-modal-feature-list li span {
    display: block;
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.45;
}

.membership-modal-script-preview {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.membership-modal-script-preview .script-sim-viewport {
    min-height: 420px;
    max-height: none;
    border: none;
    border-radius: 18px;
}

@media (max-width: 760px) {
    .membership-modal-preview-head .membership-modal-preview-hint {
        max-width: none;
        text-align: left;
    }

    .membership-modal-preview-layout {
        grid-template-columns: 1fr;
    }

    .membership-modal-script-preview .script-sim-viewport {
        min-height: 380px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-modal-root,
    .landing-modal-dialog {
        transition: none;
    }
}

/* V1 / V2 comparison */
.script-gen-section {
    margin-top: 48px;
}

.script-gen-switch {
    display: inline-flex;
    padding: 5px;
    border-radius: 999px;
    border: 1px solid var(--stroke-strong);
    background: rgba(8, 12, 24, 0.72);
    margin-top: 18px;
}

.script-gen-switch button {
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    font-size: 0.88rem;
    padding: 10px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.script-gen-switch button.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.32);
}

.script-gen-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.script-gen-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    gap: 22px;
    margin-top: 24px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.45));
}

/* Preset-accurate HUD simulation (structure mirrors hosted presets) */
.script-sim-viewport {
    position: relative;
    min-height: 440px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: radial-gradient(circle at 50% 12%, rgba(30, 41, 59, 0.35), transparent 50%), #020617;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 38px 18px 32px;
}

.script-sim-live-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.script-sim-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: scriptSimPulse 2s ease-in-out infinite;
}

@keyframes scriptSimPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.script-hud {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    z-index: 2;
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    color: #e2e8f0;
    flex-shrink: 0;
}

.script-sim-msgs-wrap {
    position: relative;
    z-index: 3;
    width: min(320px, 92%);
    margin-top: 32px;
    padding-top: 8px;
    min-height: 44px;
}

.script-hud[hidden] { display: none !important; }

/* ScoreScript v1 */
.script-hud--score-v1 {
    width: min(340px, 94%);
    padding: 10px;
    background: rgba(32, 32, 32, 0.35);
    border-radius: 10px;
    display: grid;
    gap: 6px;
}

.sh-v1-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
}

.sh-v1-header-wrap {
    position: relative;
    min-width: 0;
}

.sh-v1-header-img {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    border-radius: 4px;
    object-fit: contain;
}

.sh-v1-online {
    display: block;
    text-align: center;
    margin-bottom: 3px;
    font-size: 0.62rem;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.sh-v1-side-col {
    display: grid;
    gap: 6px;
    width: 88px;
    flex-shrink: 0;
}

.sh-v1-side {
    width: 100%;
    padding: 6px;
    border: 1px solid rgba(128, 51, 128, 0.6);
    border-radius: 5px;
    background: rgba(51, 51, 51, 0.9);
    text-align: center;
}

.sh-v1-side small { display: block; color: #fff; font-size: 0.58rem; }
.sh-v1-side strong { display: block; font-size: 0.95rem; color: #fff; margin-top: 4px; }

.sh-v1-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 4px 0;
    font-size: 0.65rem;
    color: #fb923c;
}

.sh-v1-multis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.sh-v1-box {
    padding: 6px 4px;
    border: 1px solid rgba(128, 51, 128, 0.6);
    border-radius: 5px;
    background: rgba(51, 51, 51, 0.92);
    text-align: center;
}

.sh-v1-box small { display: block; color: #fff; font-size: 0.55rem; }
.sh-v1-box strong { display: block; font-size: 0.88rem; margin-top: 4px; color: #a5f3fc; }
.sh-v1-box:nth-child(1) strong { color: #c4b5fd; }
.sh-v1-box:nth-child(3) strong { color: #4ade80; }

.sh-v1-score-box {
    padding: 8px;
    border: 1px solid rgba(128, 51, 128, 0.6);
    border-radius: 5px;
    background: rgba(51, 51, 51, 0.92);
    text-align: center;
}

.sh-v1-score-box small { display: block; font-size: 0.58rem; }
.sh-v1-score-box strong { display: block; font-size: 1.2rem; margin-top: 4px; color: #fff; }
.sh-v1-score-box strong.is-pulse { color: #67e8f9; }

.sh-v1-speed small { display: block; text-align: center; font-size: 0.58rem; margin-bottom: 4px; }
.sh-v1-speed-track {
    position: relative;
    height: 12px;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 5px;
    overflow: hidden;
}

.sh-v1-speed-track span {
    display: block;
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: inherit;
    transition: width 0.3s ease;
}

.sh-v1-speed-track i {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ef4444;
    left: 6%;
}

.sh-v1-speed > span:last-child { display: block; text-align: center; margin-top: 4px; font-size: 0.58rem; }

.sh-v1-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.sh-v1-scale button {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 5px;
    background: rgba(51, 51, 51, 0.95);
    color: #fff;
    font-weight: 900;
}

/* Aperture Flux v2 shared */
.script-hud--score-v2,
.script-hud--lap-v2 {
    width: min(340px, 94%);
    padding: 12px;
    background: rgba(18, 20, 28, 0.96);
    border: 1px solid rgba(255, 115, 30, 0.35);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    position: relative;
}

.sh-v2-rail {
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #ff7300, #22d3ee, transparent);
    margin-bottom: 8px;
    animation: shV2Flow 2.4s linear infinite;
    background-size: 200% 100%;
}

@keyframes shV2Flow {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

.sh-v2-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 8px;
}

.sh-v2-tabs button {
    appearance: none;
    border: 0;
    text-align: center;
    padding: 5px 8px;
    border-radius: 6px;
    background: transparent;
    font-size: 0.62rem;
    font-weight: 800;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.sh-v2-tabs button:hover,
.sh-v2-tabs button:focus-visible {
    color: #e2e8f0;
    outline: none;
    box-shadow: 0 0 0 1px rgba(255, 115, 30, 0.24);
}

.sh-v2-tabs button.is-active {
    background: rgba(255, 115, 30, 0.2);
    color: #fff;
}

.sh-v2-head, .lt-v2-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.58rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.sh-v2-head span:nth-child(1), .lt-v2-head span:nth-child(1) { flex: 1; }
.sh-v2-head span:nth-child(2), .lt-v2-head span:nth-child(2) { color: #f8fafc; font-size: 0.68rem; font-weight: 800; text-align: center; }
.sh-v2-head span:nth-child(3), .lt-v2-head span:nth-child(3) { flex: 1; text-align: right; }

.sh-v2-hero, .lt-v2-hero {
    position: relative;
    min-height: 76px;
    padding: 16px 12px;
    border-radius: 10px;
    background: rgba(15, 18, 28, 0.95);
    border: 1px solid rgba(255, 115, 30, 0.25);
    margin-bottom: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sh-v2-hero-prism {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.sh-v2-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 115, 30, 0.28);
    animation: shV2RingIdle 2.8s ease-in-out infinite;
}

.sh-v2-ring--core {
    width: 52px;
    height: 52px;
    border-width: 2px;
    border-color: rgba(255, 115, 30, 0.42);
}

.sh-v2-ring--mid {
    width: 68px;
    height: 68px;
    border-color: rgba(34, 211, 238, 0.22);
    animation-delay: 0.35s;
}

.sh-v2-ring--outer {
    width: 84px;
    height: 84px;
    border-color: rgba(255, 115, 30, 0.14);
    opacity: 0.65;
    animation-delay: 0.7s;
}

@keyframes shV2RingIdle {
    0%, 100% { transform: scale(1); opacity: 0.75; }
    50% { transform: scale(1.06); opacity: 1; }
}

.sh-v2-hero-prism.is-burst .sh-v2-ring--core {
    animation: shV2RingBurst 0.55s ease;
}

.sh-v2-hero-prism.is-burst .sh-v2-ring--mid {
    animation: shV2RingBurstMid 0.65s ease;
}

.sh-v2-hero-prism.is-burst .sh-v2-ring--outer {
    animation: shV2RingBurstOuter 0.75s ease;
}

@keyframes shV2RingBurst {
    0% { transform: scale(1); border-color: rgba(255, 115, 30, 0.42); }
    45% { transform: scale(1.22); border-color: rgba(34, 211, 238, 0.85); }
    100% { transform: scale(1); border-color: rgba(255, 115, 30, 0.42); }
}

@keyframes shV2RingBurstMid {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.18); opacity: 1; }
    100% { transform: scale(1); opacity: 0.5; }
}

@keyframes shV2RingBurstOuter {
    0% { transform: scale(1); opacity: 0.35; }
    50% { transform: scale(1.12); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.35; }
}

.sh-v2-hero-content {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.sh-v2-hero strong, .lt-v2-hero strong {
    font-size: 1.45rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.sh-v2-hero strong.is-pulse, .lt-v2-hero strong.is-pulse { color: #67e8f9; }
.sh-v2-hero small, .lt-v2-hero small {
    font-size: 0.62rem;
    color: #94a3b8;
    letter-spacing: 0.04em;
}

.sh-v2-telem {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px 4px;
    background: rgba(18, 20, 30, 0.94);
    border-radius: 8px;
    margin-bottom: 8px;
}

.sh-v2-telem > div {
    text-align: center;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2px;
}

.sh-v2-telem > div:first-child { border-left: none; }
.sh-v2-telem small { display: block; font-size: 0.5rem; color: #94a3b8; }
.sh-v2-telem strong { display: block; font-size: 0.72rem; margin-top: 2px; }
.sh-v2-telem > div.is-pulse { background: rgba(255, 115, 30, 0.12); border-radius: 4px; }

.sh-v2-bottom {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.sh-v2-vel {
    height: 14px;
    background: rgba(13, 15, 23, 0.9);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.sh-v2-vel span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff7300, #22d3ee);
    transition: width 0.3s ease;
}

.sh-v2-lives { text-align: center; min-width: 56px; }
.sh-v2-lives small { display: block; font-size: 0.5rem; color: #94a3b8; }
.sh-v2-lives span { color: #f87171; font-size: 0.72rem; }
.sh-v2-lives.is-pulse span { color: #fca5a5; animation: shLifePulse 0.5s ease; }

@keyframes shLifePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.sh-v2-grip {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 14px;
    height: 14px;
    border-right: 2px solid rgba(255, 115, 30, 0.7);
    border-bottom: 2px solid rgba(255, 115, 30, 0.7);
    border-radius: 0 0 4px 0;
}

.sh-v2-lb {
    padding: 8px;
    background: rgba(12, 14, 22, 0.95);
    border-radius: 8px;
    font-size: 0.62rem;
}

.sh-v2-lb table { width: 100%; border-collapse: collapse; }
.sh-v2-lb th { color: #94a3b8; text-align: left; padding: 4px; font-size: 0.55rem; }
.sh-v2-lb td { padding: 4px; border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* Laptime v1 */
.script-hud--lap-v1 {
    width: min(340px, 94%);
    padding: 10px;
    background: rgba(32, 32, 32, 0.35);
    border-radius: 10px;
}

.lt-v1-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: start;
    margin-bottom: 6px;
}

.lt-v1-header-wrap {
    min-width: 0;
}

.lt-v1-header-img {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    border-radius: 4px;
    object-fit: contain;
}

.lt-v1-side-col {
    display: grid;
    gap: 6px;
    width: 88px;
}

.lt-v1-side {
    width: 100%;
    padding: 6px;
    border: 1px solid rgba(128, 51, 128, 0.5);
    border-radius: 5px;
    background: rgba(51, 51, 51, 0.9);
}

.lt-v1-side small { display: block; font-size: 0.55rem; }
.lt-v1-side strong { display: block; font-size: 0.82rem; margin-top: 4px; }
.lt-v1-side span { display: block; font-size: 0.55rem; color: #94a3b8; margin-top: 2px; }

.lt-v1-bests {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 6px 0;
}

.lt-v1-bests > div {
    padding: 5px 3px;
    border: 1px solid rgba(128, 51, 128, 0.5);
    border-radius: 5px;
    background: rgba(51, 51, 51, 0.9);
    text-align: center;
}

.lt-v1-bests small { display: block; font-size: 0.48rem; }
.lt-v1-bests strong { display: block; font-size: 0.68rem; margin-top: 2px; }

.lt-v1-current {
    padding: 8px;
    border: 1px solid rgba(128, 51, 128, 0.5);
    border-radius: 5px;
    background: rgba(51, 51, 51, 0.9);
    text-align: center;
    margin-bottom: 6px;
}

.lt-v1-current small { display: block; font-size: 0.55rem; }
.lt-v1-current strong { display: block; font-size: 1.1rem; margin-top: 4px; }
.lt-v1-current strong.is-error { color: #f87171; }

.lt-v1-dist small { display: block; text-align: center; font-size: 0.55rem; margin-bottom: 4px; }
.lt-v1-dist-track {
    height: 12px;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 5px;
    overflow: hidden;
}

.lt-v1-dist-track span {
    display: block;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 128, 0.6);
    transition: width 0.35s ease;
}

.lt-v1-dist > span:last-child { display: block; text-align: center; margin-top: 4px; font-size: 0.55rem; }
.lt-v1-scale { display: flex; justify-content: space-between; margin-top: 6px; }
.lt-v1-scale button { width: 26px; height: 26px; border: none; border-radius: 5px; background: rgba(51, 51, 51, 0.95); color: #fff; }

.lt-v2-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 8px;
    font-size: 0.62rem;
    text-align: center;
}

.lt-v2-meta span:nth-child(1) { color: #22d3ee; }
.lt-v2-meta span:nth-child(2) { color: #ff7300; }
.lt-v2-meta span:nth-child(3) { color: #fbbf24; }

/* Challengescript preview */
.script-hud--challenge-v1 {
    width: min(360px, 96%);
    padding: 10px;
    border-radius: 10px;
    background: rgba(15, 15, 17, 0.92);
    border: 1px solid rgba(128, 51, 128, 0.6);
    display: grid;
    gap: 6px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}

.ch-v1-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 24px;
    color: #ffb347;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9);
}

.ch-v1-title strong {
    color: #fff;
    font-size: 0.76rem;
}

.ch-v1-title span {
    color: #fbbf24;
    font-size: 0.62rem;
    font-weight: 800;
}

.ch-v1-section {
    display: grid;
    gap: 5px;
}

.ch-tabbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 6px;
}

.ch-tabbar--v2 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ch-tabbar button {
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.56rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
}

.ch-tabbar button.is-active {
    border-color: rgba(59, 130, 246, 0.72);
    background: rgba(59, 130, 246, 0.22);
    color: #fff;
}

.ch-v1-section-head {
    appearance: none;
    width: 100%;
    border: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 7px;
    min-height: 26px;
    border-radius: 5px;
    background: rgba(64, 64, 64, 0.92);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 850;
}

.ch-v1-section-head strong {
    flex: 1;
    text-align: left;
}

.ch-v1-section-head span {
    width: 16px;
    text-align: left;
}

.ch-v1-section-head em {
    color: #fbbf24;
    font-style: normal;
}

.ch-v1-section-body,
.ch-v2-section-body {
    display: grid;
    gap: 5px;
}

[data-sim-ch-tab-pane][hidden] {
    display: none;
}

.ch-v1-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.ch-v1-card,
.ch-v1-full {
    min-height: 38px;
    padding: 5px 7px;
    border-radius: 5px;
    border: 1px solid rgba(128, 51, 128, 0.48);
    background: rgba(38, 38, 42, 0.94);
    text-align: center;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.28);
}

.ch-v1-card.is-own {
    border-color: rgba(34, 197, 94, 0.45);
}

.ch-v1-card.is-opp {
    border-color: rgba(239, 68, 68, 0.45);
}

.ch-v1-card small,
.ch-v1-full small {
    display: block;
    color: #e2e8f0;
    font-size: 0.5rem;
    font-weight: 850;
}

.ch-v1-card strong,
.ch-v1-full strong {
    display: block;
    color: #fff;
    font-size: 0.72rem;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ch-v1-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.ch-v1-status span:first-child {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    font-size: 0.6rem;
    font-weight: 850;
}

.ch-v1-status span:first-child.is-trailing {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
}

.ch-v1-status span:last-child {
    color: #fbbf24;
    font-size: 0.68rem;
    font-weight: 900;
}

.script-hud--challenge-v1 .lt-v1-scale {
    margin-top: 0;
}

.membership-modal-test-server {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.membership-modal-test-server-btn {
    width: 100%;
    justify-content: center;
    gap: 8px;
    font-size: 0.82rem;
}

.script-hud--challenge-v2 {
    width: min(352px, 96%);
    padding: 12px;
    background:
        linear-gradient(180deg, rgba(7, 10, 18, 0.95), rgba(15, 18, 28, 0.92)),
        rgba(7, 10, 18, 0.95);
    border: 1px solid rgba(255, 115, 30, 0.28);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    position: relative;
    display: grid;
    gap: 7px;
    box-sizing: border-box;
}

.ch-v2-flow {
    height: 2px;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.92);
    overflow: hidden;
}

.ch-v2-flow span {
    display: block;
    width: 64px;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, #ff7300, #22d3ee, transparent);
    animation: chV2Flow 2.1s linear infinite;
}

@keyframes chV2Flow {
    from { transform: translateX(-72px); }
    to { transform: translateX(352px); }
}

.ch-v2-title {
    display: grid;
    justify-items: center;
    gap: 2px;
    color: #f8fafc;
}

.ch-v2-title strong {
    font-size: 0.74rem;
    font-weight: 900;
}

.ch-v2-title span {
    color: #94a3b8;
    font-size: 0.56rem;
    font-weight: 800;
}

.ch-v2-section {
    display: grid;
    gap: 5px;
}

.ch-v2-section-head {
    appearance: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 22px;
    padding: 4px 7px;
    border-radius: 6px;
    border: 1px solid rgba(255, 115, 30, 0.25);
    background: linear-gradient(90deg, rgba(255, 115, 30, 0.14), rgba(17, 24, 39, 0.82));
    color: #f8fafc;
    font-size: 0.62rem;
    font-weight: 900;
    cursor: pointer;
}

.ch-v2-section-head strong {
    flex: 1;
    text-align: left;
}

.ch-v2-section-head span {
    width: 16px;
    text-align: left;
}

.ch-v2-section-head.is-team {
    border-color: rgba(59, 130, 246, 0.28);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.14), rgba(17, 24, 39, 0.82));
}

.ch-v2-section-head.is-invite {
    border-color: rgba(245, 158, 11, 0.32);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.16), rgba(17, 24, 39, 0.82));
}

.ch-v2-section[hidden] {
    display: none !important;
}

.ch-v2-section-head em {
    color: #fbbf24;
    font-style: normal;
}

.ch-v2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.ch-v2-card,
.ch-v2-wide {
    min-height: 32px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
        rgba(15, 23, 42, 0.82);
    text-align: center;
}

.ch-v2-card.is-own {
    border-color: rgba(34, 197, 94, 0.35);
}

.ch-v2-card.is-opp {
    border-color: rgba(239, 68, 68, 0.3);
}

button.ch-v2-card {
    appearance: none;
    width: 100%;
    color: inherit;
    cursor: pointer;
}

.ch-v2-action-card:hover {
    border-color: rgba(94, 234, 212, 0.62);
    background: rgba(94, 234, 212, 0.13);
}

.ch-v2-card small,
.ch-v2-wide small {
    display: block;
    color: #94a3b8;
    font-size: 0.48rem;
    font-weight: 850;
    text-transform: none;
}

.ch-v2-card strong {
    display: block;
    color: #f8fafc;
    font-size: 0.66rem;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ch-v2-wide {
    min-height: 32px;
}

.ch-v2-wide strong {
    display: block;
    color: #f8fafc;
    font-size: 0.64rem;
    margin-top: 3px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ch-v2-grid--invite {
    grid-template-columns: 1fr;
}

.ch-v2-footer-hint {
    margin: 2px 0 0;
    text-align: center;
    color: #64748b;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.ch-v2-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.ch-v2-status span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 6px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
    font-size: 0.58rem;
    font-weight: 850;
}

.ch-v2-status [data-sim-challenge-lead] {
    border-color: rgba(34, 197, 94, 0.28);
    color: #86efac;
}

.ch-v2-status [data-sim-challenge-lead].is-trailing {
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

/* Floating messages (preset message strings) */
.script-sim-msgs {
    display: grid;
    gap: 8px;
    width: 100%;
    pointer-events: none;
}

.script-sim-msg {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    animation: scriptSimMsgIn 0.4s ease both;
}

.script-sim-msg.is-positive { background: rgba(34, 197, 94, 0.9); color: #052e16; }
.script-sim-msg.is-close { background: rgba(250, 204, 21, 0.9); color: #422006; }
.script-sim-msg.is-crash { background: rgba(239, 68, 68, 0.9); color: #fff; }
.script-sim-msg.is-lap { background: rgba(34, 211, 238, 0.88); color: #0f172a; }

@keyframes scriptSimMsgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.script-gen-copy h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.script-gen-copy p {
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 14px;
}

.script-gen-features {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
}

.script-gen-feature {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: rgba(15, 23, 42, 0.55);
}

.script-gen-feature strong {
    display: block;
    font-size: 0.88rem;
    color: #f8fafc;
    margin-bottom: 4px;
}

.script-gen-feature span {
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.5;
}

.script-gen-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-top: 16px;
}

.script-gen-compare-table th,
.script-gen-compare-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--stroke);
    text-align: left;
}

.script-gen-compare-table th {
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.script-gen-compare-table td.is-highlight {
    color: #f8fafc;
    font-weight: 700;
}

.script-gen-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

/* v2 Preview servers */
.preview-servers-section {
    margin-top: 56px;
}

.preview-servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.preview-server-card {
    display: grid;
    gap: 14px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--stroke);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.5));
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.preview-server-card:hover {
    transform: translateY(-3px);
    border-color: rgba(103, 232, 249, 0.28);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
}

.preview-server-card.is-purple {
    background:
        radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.14), transparent 42%),
        linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.5));
}

.preview-server-card.is-cyan {
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.14), transparent 42%),
        linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.5));
}

.preview-server-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.preview-server-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    background: rgba(139, 92, 246, 0.18);
    color: #c4b5fd;
}

.preview-server-card.is-cyan .preview-server-icon {
    background: rgba(34, 211, 238, 0.16);
    color: #67e8f9;
}

.preview-server-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.preview-server-card h3 {
    margin: 8px 0 6px;
    font-size: 1.2rem;
}

.preview-server-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

.preview-server-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-server-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.78rem;
    color: #cbd5e1;
}

.preview-server-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Join gameserver page */
.join-gameserver-body .join-gameserver-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}

.join-gameserver-nav {
    margin-bottom: 28px;
}

.join-gameserver-hero {
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
}

.join-gameserver-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.08;
}

.join-gameserver-lead {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 1.02rem;
}

.join-gameserver-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.join-gameserver-card {
    display: grid;
    gap: 16px;
}

.join-gameserver-card--error {
    max-width: 640px;
    margin: 48px auto 0;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid var(--stroke);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.5));
}

.join-gameserver-card--error h1 {
    margin: 0;
    font-size: 1.6rem;
}

.join-gameserver-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.join-gameserver-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.8rem;
    font-weight: 700;
    color: #cbd5e1;
}

.join-gameserver-status-pill.is-online {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
}

.join-gameserver-status-pill.is-online .fa-circle {
    font-size: 0.55rem;
}

.join-gameserver-status-pill.is-offline,
.preview-server-badge.is-offline {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

.join-gameserver-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.join-gameserver-meta-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.03);
}

.join-gameserver-meta-item small {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
}

.join-gameserver-meta-item strong {
    font-size: 0.92rem;
    color: #e2e8f0;
    word-break: break-word;
}

.join-gameserver-scripts {
    display: grid;
    gap: 8px;
}

.join-gameserver-scripts small {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
}

.join-gameserver-script-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.join-gameserver-script-pills span {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(103, 232, 249, 0.22);
    background: rgba(34, 211, 238, 0.08);
    color: #a5f3fc;
    font-size: 0.78rem;
    font-weight: 700;
}

.join-gameserver-version-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(139, 92, 246, 0.22);
    background: rgba(139, 92, 246, 0.08);
    color: #ddd6fe;
    line-height: 1.6;
    font-size: 0.9rem;
}

.join-gameserver-redirect-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.join-gameserver-redirect-note a {
    color: #67e8f9;
    text-decoration: none;
    font-weight: 700;
}

.join-gameserver-redirect-note a:hover {
    text-decoration: underline;
}

.join-gameserver-side {
    display: grid;
    gap: 14px;
}

.join-gameserver-panel {
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--stroke);
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.42));
}

.join-gameserver-panel h2 {
    margin: 0;
    font-size: 1.15rem;
}

.join-gameserver-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.92rem;
}

.join-gameserver-panel--alt {
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.12), transparent 42%),
        linear-gradient(165deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.42));
}

.join-gameserver-steps {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 12px;
    color: var(--muted);
}

.join-gameserver-steps li {
    display: grid;
    gap: 4px;
}

.join-gameserver-steps strong {
    color: #e2e8f0;
    font-size: 0.95rem;
}

.join-gameserver-steps span {
    line-height: 1.55;
    font-size: 0.9rem;
}

.join-gameserver-footer {
    margin-top: 42px;
}

@media (max-width: 900px) {
    .script-gen-stage {
        grid-template-columns: 1fr;
    }

    .script-sim-viewport {
        min-height: 400px;
        padding: 34px 14px 18px;
    }

    .script-hud {
        width: min(300px, 94%);
    }

    .sh-v1-header-img,
    .lt-v1-header-img {
        width: 160px;
    }

    .sh-v1-side-col,
    .lt-v1-side-col {
        width: 76px;
    }

    .script-sim-msgs-wrap {
        margin-top: 28px;
        padding-top: 6px;
    }

    .join-gameserver-layout {
        grid-template-columns: 1fr;
    }

    .join-gameserver-meta-grid {
        grid-template-columns: 1fr;
    }

}

/* ------------------------------------------------------------------
   Landing 29.09.2026 (Claude-CLI): Member-Login als zweiter Weg,
   Hinweis unter den Stufen, Telefonbreite ohne waagerechten Überlauf.
   ------------------------------------------------------------------ */
.hero-member-login {
    margin: -12px 0 26px;
    color: var(--muted);
    font-size: 0.95rem;
}

.hero-member-login a {
    color: #e2e8f0;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.35);
}

.hero-member-login a:hover {
    border-bottom-color: #fff;
}

.landing-access-plans {
    display: block;
    margin-top: 6px;
    text-align: center;
    color: #c4b5fd;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}

.landing-access-plans:hover {
    color: #fff;
}

.tier-billing-note {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 900px) {
    .section-heading {
        grid-template-columns: minmax(0, 1fr);
    }

    .script-gen-stage {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .script-gen-switch {
        display: flex;
        flex-wrap: wrap;
        max-width: 100%;
    }

    .script-gen-switch button {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .script-gen-stage {
        padding: 14px;
    }

    .script-gen-compare-table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 640px) {
    /* Navigation als eine wischbare Zeile statt drei Umbruchzeilen */
    .landing-body .landing-nav {
        gap: 10px;
        padding: 12px 14px;
    }

    .landing-body .landing-nav-actions {
        flex-wrap: nowrap;
        overflow-x: auto;
        max-width: 100%;
        gap: 4px;
        padding-bottom: 2px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .landing-body .landing-nav-actions::-webkit-scrollbar {
        display: none;
    }

    /* Wisch-Hinweis am rechten Rand; der Patreon-Knopf steht vorn, damit er bei 390 px sichtbar ist */
    .landing-body .landing-nav-actions {
        padding-right: 26px;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
    }

    .landing-body .nav-link-pill.nav-link-accent {
        order: -1;
    }

    .landing-body .nav-link-pill {
        flex: 0 0 auto;
        padding: 7px 11px;
        font-size: 0.84rem;
    }

    .landing-body .hero-copy .eyebrow-pill {
        display: none;
    }

    .landing-body .hero-copy h1 {
        font-size: 2.45rem;
        line-height: 0.95;
        margin: 14px 0 12px;
    }

    .landing-body .hero-actions {
        margin: 20px 0 22px;
    }

    .landing-body .hero-actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/* Vier Stufen: 4 Spalten auf breiten Bildschirmen, 2 auf Tablets, 1 am Telefon */
.landing-body .tier-showcase {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {
    .landing-body .tier-showcase {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .landing-body .tier-showcase {
        grid-template-columns: minmax(0, 1fr);
    }
}
