/* Full-viewport looping video behind pre-game screens (see index.html + main.js pause while in-world) */
#zephyria-atmosphere-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 99;
    pointer-events: none;
    background: #000000;
}

/* Screen Management */
.screen {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
}

.screen.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Loading Screen */
.loading-screen {
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loading-screen[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
}

.loading-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.loading-content h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--ui-accent-cool) 0%, var(--ui-accent-cool-mid) 50%, var(--ui-accent-cool-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(var(--ui-cool-rgb), 0.5);
}

.loading-spinner {
    border: 4px solid rgba(var(--ui-cool-rgb), 0.3);
    border-top: 4px solid var(--ui-accent-cool);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: zephyria-spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Zone Loading Screen — cinematic (matches character select) */
.zone-loading-screen {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.zone-loading-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.55s ease;
}

.zone-loading-video.playing {
    opacity: 1;
}

.zone-loading-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 85% 65% at 50% 38%, transparent 28%, rgba(4, 0, 12, 0.58) 100%),
        linear-gradient(180deg, rgba(4, 0, 12, 0.42) 0%, transparent 32%, rgba(4, 0, 12, 0.78) 100%);
}

.zone-loading-stage {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(42rem, 94vw);
    padding: clamp(2rem, 5vh, 3.5rem) clamp(1rem, 3vw, 2rem);
    box-sizing: border-box;
}

.zone-loading-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1.75rem clamp(1.25rem, 3vw, 2rem) 1.45rem;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.2);
    border-radius: 16px;
    background: var(--ui-glass-bg);
    backdrop-filter: var(--ui-glass-backdrop);
    -webkit-backdrop-filter: var(--ui-glass-backdrop);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

/* Per-letter outline — readable over video + airy glass */
.zone-loading-content :is(
    .zone-loading-kicker,
    .zone-loading-zone-description,
    .zone-loading-step,
    .zone-loading-progress-label,
    .zone-loading-tip-label,
    .zone-loading-tip,
    .zone-loading-reassurance,
    .zone-loading-estimate,
    .zone-loading-download
) {
    text-shadow: var(--ui-text-outline);
}

.zone-loading-glow {
    position: absolute;
    inset: -35% -15% auto;
    height: 60%;
    background: radial-gradient(ellipse at 50% 0%, rgba(var(--ui-cool-rgb), 0.18), transparent 68%);
    pointer-events: none;
}

.zone-loading-frame {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: min(22rem, 78%);
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
}

.zone-loading-ornament {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--ui-cool-rgb), 0.5), transparent);
    box-shadow: 0 0 12px rgba(var(--ui-cool-rgb), 0.22);
}

.zone-loading-kicker {
    margin: 0 0 0.45rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
}

.zone-loading-title,
.zone-loading-content h2 {
    margin: 0 0 0.65rem;
    font-family: 'Cinzel', serif;
    font-size: clamp(1.35rem, 3.2vw, 2rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--ui-accent-cool) 0%, var(--ui-accent-cool-mid) 52%, var(--ui-accent-cool-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--ui-text-outline), 0 0 28px rgba(var(--ui-cool-rgb), 0.45);
}

.zone-loading-step,
.zone-loading-estimate,
.zone-loading-download,
.zone-loading-reassurance {
    display: none !important;
    margin: 0;
    min-height: 0;
}

.zone-loading-step {
    color: #8a9fd4;
    font-size: 0.9rem;
    margin: -0.5rem 0 0.5rem;
    font-weight: 500;
}

.zone-loading-zone-description {
    margin: -0.15rem 0 1.1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
}

.zone-loading-zone-description[hidden] {
    display: none !important;
    margin: 0;
}

.zone-loading-progress-block {
    margin: 0 0 1.15rem;
    text-align: left;
}

.zone-loading-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.zone-loading-progress-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.zone-loading-progress-value {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: var(--ui-text-outline), 0 0 12px rgba(var(--ui-cool-rgb), 0.28);
    min-width: 2.75rem;
    text-align: right;
}

.zone-loading-progress-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(var(--ui-cool-rgb), 0.2);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

@keyframes zone-loading-shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}

.zone-loading-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(var(--ui-cool-rgb), 0.88), rgba(240, 147, 251, 0.78));
    box-shadow: 0 0 12px rgba(var(--ui-cool-rgb), 0.35);
    transition: width 0.35s ease;
    animation: zone-loading-shimmer 2.4s ease-in-out infinite;
}

.zone-loading-tip-wrap {
    margin: 0 0 1.15rem;
    text-align: left;
}

.zone-loading-tip-wrap[hidden] {
    display: none !important;
}

.zone-loading-tip-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.52rem;
    font-weight: 600;
    color: rgba(var(--ui-cool-rgb), 0.85);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.4rem;
}

.zone-loading-tip {
    margin: 0;
    padding: 0.85rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-style: italic;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
    background: var(--ui-glass-bg-chat);
    border: 1px solid rgba(var(--ui-cool-rgb), 0.22);
    border-radius: 10px;
    max-width: 100%;
    min-height: 2.75em;
    transition: opacity 0.35s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.zone-loading-tip:empty {
    display: none;
}

.zone-loading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.65rem, 2vw, 1rem);
    justify-content: center;
    margin: 0.35rem auto 0;
}

.zone-loading-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    min-width: clamp(8rem, 18vw, 10rem);
    padding: 0.75rem clamp(1rem, 2.4vw, 1.45rem);
    border: 1px solid rgba(var(--ui-cool-rgb), 0.2);
    border-radius: 10px;
    background: var(--ui-glass-bg);
    color: #ffffff;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.68rem, 1.4vw, 0.78rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease,
        background 0.28s ease,
        opacity 0.28s ease;
    backdrop-filter: var(--ui-glass-backdrop);
    -webkit-backdrop-filter: var(--ui-glass-backdrop);
    text-shadow: var(--ui-text-outline);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.zone-loading-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    transform: translate(-50%, -50%);
    transition: width 0.55s ease, height 0.55s ease;
    pointer-events: none;
}

.zone-loading-btn:hover::before {
    width: 260px;
    height: 260px;
}

.zone-loading-btn-primary {
    border-color: rgba(var(--ui-cool-rgb), 0.65);
    background: linear-gradient(
        135deg,
        rgba(var(--ui-cool-rgb), 0.32) 0%,
        rgba(var(--ui-cool-mid-rgb), 0.28) 52%,
        rgba(240, 147, 251, 0.22) 100%
    );
    box-shadow:
        0 6px 22px rgba(var(--ui-cool-rgb), 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.zone-loading-btn-secondary {
    border-color: rgba(255, 255, 255, 0.28);
    background: var(--ui-glass-bg);
}

.zone-loading-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--ui-cool-rgb), 0.85);
    box-shadow:
        0 8px 24px rgba(var(--ui-cool-rgb), 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.zone-loading-btn-primary:hover {
    background: linear-gradient(135deg, #7a8ef5 0%, #8555b8 50%, #f5a5ff 100%);
}

.zone-loading-btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.48);
    background: var(--ui-glass-bg-hover);
}

.zone-loading-btn:active {
    transform: translateY(-1px);
}

.zone-loading-reassurance {
    margin: 1rem 0 0;
    font-size: 0.9rem;
    color: #9a9fd4;
    font-style: italic;
}

.zone-loading-estimate {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #888;
}

@keyframes zone-loading-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zone-loading-screen.active .zone-loading-content {
    animation: zone-loading-rise 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.zone-loading-screen.active .zone-loading-frame {
    animation: zone-loading-rise 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.zone-loading-screen.active .zone-loading-kicker {
    animation: zone-loading-rise 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.zone-loading-screen.active .zone-loading-title {
    animation: zone-loading-rise 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

.zone-loading-screen.active .zone-loading-zone-description:not([hidden]) {
    animation: zone-loading-rise 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.zone-loading-screen.active .zone-loading-progress-block {
    animation: zone-loading-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}

.zone-loading-screen.active .zone-loading-tip-wrap:not([hidden]) {
    animation: zone-loading-rise 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.zone-loading-screen.active .zone-loading-actions {
    animation: zone-loading-rise 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.36s both;
}

/* Shared spinner utility (zone loading screen, character details, creation finalize) */
.zone-loading-spinner {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: conic-gradient(
        from -90deg,
        transparent 0deg 42deg,
        rgba(var(--ui-cool-rgb), 0.12) 42deg 52deg,
        var(--ui-accent-cool) 52deg 128deg,
        rgba(240, 147, 251, 0.62) 128deg 205deg,
        transparent 205deg 282deg,
        rgba(var(--ui-cool-mid-rgb), 0.42) 282deg 332deg,
        transparent 332deg 360deg
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    animation:
        zephyria-spin 2.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite,
        zone-loading-halo-pulse 2.8s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(var(--ui-cool-rgb), 0.42));
}

.zone-loading-frame .zone-loading-spinner {
    margin: 0;
    width: 46px;
    height: 46px;
}

.zone-loading-spinner::before {
    content: '✦';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    color: rgba(var(--ui-cool-rgb), 0.94);
    text-shadow:
        var(--ui-text-outline),
        0 0 10px rgba(var(--ui-cool-rgb), 0.72),
        0 0 22px rgba(240, 147, 251, 0.38);
    letter-spacing: 0.12em;
    animation: zone-loading-gem-pulse 2.2s ease-in-out infinite;
    z-index: 2;
}

.zone-loading-frame .zone-loading-spinner::before {
    font-size: 0.5rem;
}

.zone-loading-spinner::after {
    content: '';
    position: absolute;
    inset: 11px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(240, 147, 251, 0.88);
    border-left-color: rgba(var(--ui-cool-mid-rgb), 0.58);
    border-bottom-color: rgba(var(--ui-cool-rgb), 0.34);
    filter: drop-shadow(0 0 5px rgba(240, 147, 251, 0.42));
    animation: zephyria-spin 1s cubic-bezier(0.5, 0.15, 0.5, 0.85) infinite reverse;
    z-index: 1;
}

.zone-loading-frame .zone-loading-spinner::after {
    inset: 9px;
}

@media (prefers-reduced-motion: reduce) {
    .zone-loading-spinner {
        animation: zone-loading-halo-pulse 2.8s ease-in-out infinite;
    }

    .zone-loading-spinner::after {
        animation: none;
        border-top-color: rgba(240, 147, 251, 0.55);
        border-left-color: rgba(var(--ui-cool-mid-rgb), 0.4);
    }

    .zone-loading-spinner::before {
        animation: none;
        opacity: 0.9;
        transform: none;
    }
}

/* Login Screen — cinematic (matches character select / zone loading) */
#login-screen {
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

#login-screen::before {
    display: none;
}

#login-screen.active {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
}

.login-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 85% 65% at 50% 38%, transparent 28%, rgba(4, 0, 12, 0.58) 100%),
        linear-gradient(180deg, rgba(4, 0, 12, 0.42) 0%, transparent 32%, rgba(4, 0, 12, 0.78) 100%);
}

.login-stage {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: min(24rem, 92vw);
    padding: clamp(2rem, 5vh, 3.5rem) clamp(1rem, 3vw, 2rem);
    box-sizing: border-box;
}

.login-container {
    width: 100%;
    padding: 0;
    margin: 0;
    position: relative;
    transform: none;
    left: auto;
    bottom: auto;
    min-width: 0;
    max-width: none;
}

.login-panel {
    position: relative;
    padding: 1.65rem clamp(1.25rem, 3vw, 1.85rem) 1.45rem;
    border: 2px solid rgba(var(--ui-cool-rgb), 0.38);
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(10, 0, 20, 0.62) 0%, rgba(10, 0, 20, 0.28) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 10px 36px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.login-glow {
    position: absolute;
    inset: -35% -15% auto;
    height: 60%;
    background: radial-gradient(ellipse at 50% 0%, rgba(var(--ui-cool-rgb), 0.18), transparent 68%);
    pointer-events: none;
}

.login-frame {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: min(18rem, 78%);
    margin: 0 auto 0.85rem;
    position: relative;
    z-index: 1;
}

.login-ornament {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--ui-cool-rgb), 0.5), transparent);
    box-shadow: 0 0 12px rgba(var(--ui-cool-rgb), 0.22);
}

.login-gem {
    flex-shrink: 0;
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    color: rgba(var(--ui-cool-rgb), 0.82);
    text-shadow: 0 0 14px rgba(var(--ui-cool-rgb), 0.5);
    letter-spacing: 0.18em;
    opacity: 0.9;
}

.login-kicker {
    margin: 0 0 0.35rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
    text-align: center;
}

.login-title,
.login-container h1 {
    margin: 0 0 1.15rem;
    font-family: 'Cinzel', serif;
    font-size: clamp(1.55rem, 4vw, 2.15rem);
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.15;
    text-align: center;
    background: linear-gradient(135deg, var(--ui-accent-cool) 0%, var(--ui-accent-cool-mid) 52%, var(--ui-accent-cool-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 28px rgba(var(--ui-cool-rgb), 0.45);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-form .input-label {
    margin-bottom: 0.35rem;
}

.login-form .input-label + input,
.login-form .input-label + .password-input-wrapper {
    margin-bottom: 1rem;
}

.login-form-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    width: 100%;
}

.login-section-title {
    margin: 0 0 0.55rem;
    font-family: 'Cinzel', serif;
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-align: center;
    background: linear-gradient(135deg, var(--ui-accent-cool) 0%, var(--ui-accent-cool-mid) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-section-description {
    margin: 0 0 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    line-height: 1.45;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
}

.login-form-section .input-label {
    margin-bottom: 0.35rem;
}

.login-form-section .input-label + input,
.login-form-section .input-label + .password-input-wrapper {
    margin-bottom: 1rem;
}

.login-section-button {
    margin-top: 0.25rem;
}

.login-section-button + .login-section-button {
    margin-top: 0.55rem;
}

.verification-code-input {
    text-align: center !important;
    font-size: 1.5em !important;
    letter-spacing: 0.5em !important;
}

#verify-email-link {
    display: block;
    margin-top: 6px;
}

.forgot-password-link {
    display: block;
    text-align: center;
    margin-top: 0.85rem;
    color: rgba(var(--ui-cool-rgb), 0.82);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    transition: color 0.28s ease, text-shadow 0.28s ease;
}

.forgot-password-link:hover {
    color: rgba(240, 147, 251, 0.92);
    text-shadow: 0 0 12px rgba(var(--ui-cool-rgb), 0.35);
    text-decoration: underline;
}

.input-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.52rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    text-align: left;
    margin-bottom: 0.35rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    width: 100%;
}

.login-form input {
    padding: 0.72rem 0.85rem;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.28);
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(10, 0, 20, 0.42) 0%, rgba(10, 0, 20, 0.22) 100%) !important;
    background-color: rgba(10, 0, 20, 0.28) !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    transition:
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        transform 0.28s ease;
    width: 100%;
    max-width: 100%;
    box-shadow:
        inset 0 0 0 1000px rgba(10, 0, 20, 0.22),
        inset 0 1px 2px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
    -webkit-appearance: none;
    appearance: none;
}

.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus,
.login-form input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(10, 0, 20, 0.35) inset !important;
    box-shadow: inset 0 0 0 1000px rgba(10, 0, 20, 0.35) !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: transparent !important;
    background: transparent !important;
    caret-color: #ffffff !important;
}

.login-form input:-moz-autofill {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: inset 0 0 0 1000px rgba(10, 0, 20, 0.35) !important;
    color: #ffffff !important;
}

@-moz-document url-prefix() {
    .login-form input {
        background: transparent !important;
        background-color: transparent !important;
    }
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="text"]:not(:focus),
.login-form input[type="password"]:not(:focus),
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

.login-form input::placeholder,
.login-form input::-webkit-input-placeholder,
.login-form input::-moz-placeholder,
.login-form input:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.32) !important;
    opacity: 1 !important;
    -webkit-opacity: 1 !important;
    transition: color 0.28s;
    font-weight: 400;
}

.login-form input:focus {
    outline: none;
    border-color: rgba(var(--ui-cool-rgb), 0.62);
    background: transparent !important;
    background-color: transparent !important;
    box-shadow:
        inset 0 0 0 1000px rgba(10, 0, 20, 0.38),
        inset 0 1px 2px rgba(0, 0, 0, 0.32),
        0 0 0 2px rgba(var(--ui-cool-rgb), 0.22),
        0 0 18px rgba(var(--ui-cool-rgb), 0.28);
    transform: translateY(-1px);
}

.login-form input:focus::placeholder,
.login-form input:focus::-webkit-input-placeholder,
.login-form input:focus::-moz-placeholder,
.login-form input:focus:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.42) !important;
    opacity: 1 !important;
    -webkit-opacity: 1 !important;
}

.password-input-wrapper {
    position: relative !important;
    display: block;
    width: 100%;
}

.password-input-wrapper input {
    padding-right: 2.5rem !important;
    width: 100%;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute !important;
    right: 0.65rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: auto !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 4px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.48);
    transition: color 0.28s ease;
    z-index: 100 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    line-height: 1;
    box-sizing: border-box !important;
}

.password-toggle:hover {
    color: var(--ui-accent-cool);
}

.password-toggle:focus {
    outline: none;
    color: var(--ui-accent-cool);
}

.eye-icon {
    font-size: 1.1rem;
    user-select: none;
    display: inline-block;
    transition: transform 0.2s;
}

.password-toggle:hover .eye-icon {
    transform: scale(1.12);
    filter: drop-shadow(0 0 8px rgba(var(--ui-cool-rgb), 0.55));
}

.remember-me-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
    transition: color 0.28s ease;
    margin-top: 0.15rem;
    margin-bottom: 0.85rem;
    width: 100%;
    justify-content: flex-start;
}

.remember-me-checkbox:hover {
    color: rgba(255, 255, 255, 0.88);
}

.remember-me-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.38);
    border-radius: 4px;
    background: rgba(10, 0, 20, 0.45);
    position: relative;
    transition: all 0.28s ease;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.remember-me-checkbox input[type="checkbox"]:hover {
    border-color: rgba(var(--ui-cool-rgb), 0.62);
    background: rgba(10, 0, 20, 0.58);
}

.remember-me-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, rgba(var(--ui-cool-rgb), 0.85) 0%, rgba(var(--ui-cool-mid-rgb), 0.75) 100%);
    border-color: rgba(var(--ui-cool-rgb), 0.75);
    box-shadow:
        0 0 10px rgba(var(--ui-cool-rgb), 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.remember-me-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
}

.remember-me-checkbox input[type="checkbox"]:focus {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(var(--ui-cool-rgb), 0.22),
        0 0 10px rgba(var(--ui-cool-rgb), 0.35);
}

.remember-me-checkbox span {
    line-height: 1.2;
}

.login-btn,
.login-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 0.78rem 1.15rem;
    border-radius: 10px;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.68rem, 1.4vw, 0.78rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease,
        background 0.28s ease,
        opacity 0.28s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
    margin-bottom: 0;
}

.login-btn + .login-btn,
.login-form button + button {
    margin-top: 0.55rem;
}

.login-btn::before,
.login-form button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    transform: translate(-50%, -50%);
    transition: width 0.55s ease, height 0.55s ease;
    pointer-events: none;
}

.login-btn:hover::before,
.login-form button:hover::before {
    width: 280px;
    height: 280px;
}

.login-btn-primary,
.login-form button.primary,
#login-button,
.login-section-button:not(.secondary) {
    border: 2px solid rgba(var(--ui-cool-rgb), 0.65);
    background: linear-gradient(
        135deg,
        rgba(var(--ui-cool-rgb), 0.32) 0%,
        rgba(var(--ui-cool-mid-rgb), 0.28) 52%,
        rgba(240, 147, 251, 0.22) 100%
    );
    color: #ffffff;
    box-shadow:
        0 6px 22px rgba(var(--ui-cool-rgb), 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.login-btn-primary:hover,
.login-form button.primary:hover,
#login-button:hover,
.login-section-button:not(.secondary):hover {
    transform: translateY(-2px);
    border-color: rgba(var(--ui-cool-rgb), 0.85);
    background: linear-gradient(135deg, #7a8ef5 0%, #8555b8 50%, #f5a5ff 100%);
    box-shadow:
        0 8px 24px rgba(var(--ui-cool-rgb), 0.38),
        0 0 28px rgba(240, 147, 251, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.login-btn-secondary,
.login-form button.secondary,
.login-section-button.secondary {
    border: 2px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(10, 0, 20, 0.22) 100%);
    color: #ffffff;
}

.login-btn-secondary:hover,
.login-form button.secondary:hover,
.login-section-button.secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.48);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.1) 0%, rgba(10, 0, 20, 0.3) 100%);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-btn:active,
.login-form button:active {
    transform: translateY(-1px);
}

.login-form button:disabled,
.login-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none !important;
}

.error-message {
    background: linear-gradient(160deg, rgba(239, 68, 68, 0.16) 0%, rgba(10, 0, 20, 0.28) 100%);
    border: 1px solid rgba(239, 68, 68, 0.42);
    color: rgba(255, 200, 200, 0.95);
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    line-height: 1.4;
    box-shadow:
        0 4px 16px rgba(239, 68, 68, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: shake 0.5s ease-in-out;
    margin-bottom: 1rem;
    width: 100%;
    backdrop-filter: blur(6px);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.success-message {
    background: linear-gradient(160deg, rgba(34, 197, 94, 0.14) 0%, rgba(10, 0, 20, 0.28) 100%);
    border: 1px solid rgba(34, 197, 94, 0.38);
    color: rgba(180, 255, 200, 0.95);
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    box-shadow:
        0 4px 16px rgba(34, 197, 94, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: fadeIn 0.3s ease-out;
    margin-bottom: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes login-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#login-screen.active .login-panel {
    animation: login-rise 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#login-screen.active .login-frame {
    animation: login-rise 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

#login-screen.active .login-kicker {
    animation: login-rise 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

#login-screen.active .login-title {
    animation: login-rise 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

#login-screen.active .login-form {
    animation: login-rise 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Landing Page / Download Gate — dense single-viewport layout
   ═══════════════════════════════════════════════════════════════════════════ */

#download-screen {
    background-color: transparent;
    position: relative;
}

#download-screen.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden;
}

#download-screen.landing-home.active {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: 100%;
}

.landing-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(var(--ui-cool-rgb), 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(10, 0, 18, 0.85) 0%, transparent 60%),
        linear-gradient(
            180deg,
            rgba(10, 0, 18, 0.25) 0%,
            rgba(10, 0, 18, 0.5) 35%,
            rgba(10, 0, 18, 0.72) 70%,
            rgba(10, 0, 18, 0.88) 100%
        );
    z-index: 1;
    pointer-events: none;
}

/* Public homepage (index.html) — lighter veil so atmosphere video reads through */
#download-screen.landing-home > .landing-overlay {
    background:
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(var(--ui-cool-rgb), 0.06) 0%, transparent 62%),
        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(10, 0, 18, 0.14) 0%, transparent 72%),
        linear-gradient(
            180deg,
            rgba(10, 0, 18, 0.02) 0%,
            rgba(10, 0, 18, 0.08) 42%,
            rgba(10, 0, 18, 0.16) 78%,
            rgba(10, 0, 18, 0.24) 100%
        );
}

html:has(#download-screen.landing-home.active) #zephyria-atmosphere-video {
    filter: brightness(1.26) contrast(1.06) saturate(1.18);
}

/* ── Viewport-filling content column ──────────────────────────────────── */

.landing-scroll {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    height: 100dvh;
    height: 100vh; /* fallback when dvh unsupported */
    margin: 0 auto;
    padding: 0.8vh 2rem 0.5vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

/* Public homepage (index.html) — single viewport, flex + optional scale */
#download-screen.landing-home .landing-fit-shell {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
}

/* Flex row centering — stage stays centered regardless of pre-scale layout width */
#download-screen.landing-home .landing-fit-track {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

#download-screen.landing-home .landing-fit-stage {
    flex: 0 0 auto;
    box-sizing: border-box;
}

#download-screen.landing-home .landing-scroll {
    width: 100%;
    max-width: none;
    padding: clamp(0.3rem, 0.75dvh, 0.65rem) clamp(0.5rem, 1.5vw, 1.25rem);
    gap: clamp(0.14rem, 0.28dvh, 0.22rem);
    justify-content: flex-start;
    overflow: visible;
    height: auto;
    max-height: none;
    box-sizing: border-box;
}

/* Ziggurat — full column width; tiers step from narrow apex to full base */
#download-screen.landing-home .landing-ziggurat {
    --zig-max: 100%;
    --z0: 52;
    --z1: 64;
    --z2: 74;
    --z3: 82;
    --z4: 89;
    --z5: 94;
    --z6: 97;
    --z7: 100;
    --zig-0: calc(var(--z0) * 1%);
    --zig-1: calc(var(--z1) * 1%);
    --zig-2: calc(var(--z2) * 1%);
    --zig-3: calc(var(--z3) * 1%);
    --zig-4: calc(var(--z4) * 1%);
    --zig-5: calc(var(--z5) * 1%);
    --zig-6: calc(var(--z6) * 1%);
    --zig-7: calc(var(--z7) * 1%);
    --zig-face-top: rgba(54, 34, 82, 0.52);
    --zig-face-bottom: rgba(16, 6, 28, 0.46);
    --zig-edge: rgba(var(--ui-cool-mid-rgb), 0.42);
    --zig-tread-h: clamp(5px, 0.55dvh, 8px);
    --zig-gap: clamp(0.22rem, 0.42dvh, 0.36rem);
}

#download-screen.landing-home .landing-ziggurat > .landing-hero,
#download-screen.landing-home .landing-ziggurat .landing-body > * {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--zig-gap);
    box-sizing: border-box;
    position: relative;
    z-index: 0;
    overflow: visible;
    padding: clamp(0.28rem, 0.6dvh, 0.5rem) clamp(0.7rem, 2vw, 1.4rem);
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* Trapezoid stone face (background only — content stays readable) */
#download-screen.landing-home .landing-ziggurat > .landing-hero::before,
#download-screen.landing-home .landing-ziggurat .landing-body > *::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        repeating-linear-gradient(
            180deg,
            transparent 0,
            transparent 3px,
            rgba(0, 0, 0, 0.07) 3px,
            rgba(0, 0, 0, 0.07) 4px
        ),
        radial-gradient(120% 140% at 50% 0%, rgba(var(--ui-cool-rgb), 0.14) 0%, transparent 58%),
        linear-gradient(180deg, var(--zig-face-top) 0%, var(--zig-face-bottom) 100%);
    border-left: 1px solid var(--zig-edge);
    border-right: 1px solid var(--zig-edge);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 3px 0 10px -4px rgba(255, 255, 255, 0.1),
        inset -3px 0 10px -4px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -14px 26px rgba(0, 0, 0, 0.38),
        0 6px 18px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

/* Exposed tread ledge — spans the next tier's width, centered */
#download-screen.landing-home .landing-ziggurat > .landing-hero::after,
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-highlights::after,
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-systems::after,
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-section-features::after,
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-body-mid::after,
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-section-mechanics::after,
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-body-footer::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(-1 * var(--zig-gap));
    width: var(--zig-tread, 100%);
    height: var(--zig-tread-h);
    pointer-events: none;
    z-index: 1;
    border-radius: 1px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.24) 0%,
        rgba(var(--ui-cool-mid-rgb), 0.65) 16%,
        rgba(var(--ui-cool-rgb), 0.38) 58%,
        rgba(8, 0, 16, 0.68) 100%
    );
    box-shadow:
        0 0 14px rgba(var(--ui-cool-rgb), 0.3),
        0 4px 14px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

#download-screen.landing-home .landing-ziggurat > .landing-hero {
    max-width: var(--zig-0);
    padding-top: clamp(0.3rem, 0.6dvh, 0.5rem);
    padding-bottom: clamp(0.4rem, 0.7dvh, 0.6rem);
}
#download-screen.landing-home .landing-ziggurat > .landing-hero::after {
    width: calc(var(--z1) / var(--z0) * 100%);
}

#download-screen.landing-home .landing-ziggurat > .landing-hero::before {
    clip-path: polygon(15% 0, 85% 0, 100% 100%, 0% 100%);
    background:
        repeating-linear-gradient(
            180deg,
            transparent 0,
            transparent 3px,
            rgba(0, 0, 0, 0.07) 3px,
            rgba(0, 0, 0, 0.07) 4px
        ),
        radial-gradient(120% 140% at 50% 0%, rgba(var(--ui-cool-rgb), 0.18) 0%, transparent 58%),
        linear-gradient(180deg, var(--zig-face-top) 0%, var(--zig-face-bottom) 100%);
}

#download-screen.landing-home .landing-ziggurat .landing-body > .landing-highlights {
    max-width: var(--zig-1);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-highlights::after {
    width: calc(var(--z2) / var(--z1) * 100%);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-highlights::before {
    clip-path: polygon(12% 0, 88% 0, 100% 100%, 0% 100%);
}

#download-screen.landing-home .landing-ziggurat .landing-body > .landing-systems {
    max-width: var(--zig-2);
    justify-content: center;
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-systems::after {
    width: calc(var(--z3) / var(--z2) * 100%);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-systems::before {
    clip-path: polygon(10% 0, 90% 0, 100% 100%, 0% 100%);
}

#download-screen.landing-home .landing-ziggurat .landing-body > .landing-section-features {
    max-width: var(--zig-3);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-section-features::after {
    width: calc(var(--z4) / var(--z3) * 100%);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-section-features::before {
    clip-path: polygon(8% 0, 92% 0, 100% 100%, 0% 100%);
}

#download-screen.landing-home .landing-ziggurat .landing-body > .landing-body-mid {
    max-width: var(--zig-4);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-body-mid::after {
    width: calc(var(--z5) / var(--z4) * 100%);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-body-mid::before {
    clip-path: polygon(6% 0, 94% 0, 100% 100%, 0% 100%);
}

#download-screen.landing-home .landing-ziggurat .landing-body > .landing-section-mechanics {
    max-width: var(--zig-5);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-section-mechanics::after {
    width: calc(var(--z6) / var(--z5) * 100%);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-section-mechanics::before {
    clip-path: polygon(5% 0, 95% 0, 100% 100%, 0% 100%);
}

#download-screen.landing-home .landing-ziggurat .landing-body > .landing-body-footer {
    max-width: var(--zig-6);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-body-footer::after {
    width: calc(var(--z7) / var(--z6) * 100%);
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-body-footer::before {
    clip-path: polygon(4% 0, 96% 0, 100% 100%, 0% 100%);
}

#download-screen.landing-home .landing-ziggurat .landing-body > .landing-section-faq {
    max-width: var(--zig-7);
    margin-bottom: 0;
}
#download-screen.landing-home .landing-ziggurat .landing-body > .landing-section-faq::before {
    clip-path: polygon(2% 0, 98% 0, 100% 100%, 0% 100%);
    border-bottom: 1px solid rgba(var(--ui-cool-rgb), 0.38);
    box-shadow:
        inset 3px 0 10px -4px rgba(255, 255, 255, 0.1),
        inset -3px 0 10px -4px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -18px 32px rgba(0, 0, 0, 0.42),
        0 8px 22px rgba(0, 0, 0, 0.32);
}

#download-screen.landing-home .landing-ziggurat .landing-body {
    width: 100%;
    max-width: var(--zig-max);
    margin: 0 auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

#download-screen.landing-home.landing-fits-loose .landing-fit-shell {
    justify-content: center;
}

#download-screen.landing-home.landing-fits-loose .landing-scroll {
    justify-content: center;
}

#download-screen.landing-home .landing-fit-stage.landing-fit-applied {
    transition: transform 0.18s ease-out;
}

#download-screen.landing-home .landing-hero {
    flex-shrink: 0;
    padding: 0;
    gap: clamp(0.2rem, 0.45dvh, 0.4rem);
}

#download-screen.landing-home .landing-title {
    font-size: clamp(1.7rem, 5.2dvh, 2.85rem);
    margin: 0;
    line-height: 1.1;
}

#download-screen.landing-home .landing-tagline {
    font-size: clamp(0.72rem, 1.85dvh, 0.95rem);
    margin: 0;
    max-width: min(42rem, 92%);
    text-wrap: balance;
}

#download-screen.landing-home .landing-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 2vw, 1.25rem);
    width: 100%;
}

#download-screen.landing-home .landing-title-ornament {
    flex: 1;
    max-width: 5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--ui-cool-rgb), 0.55), transparent);
    box-shadow: 0 0 12px rgba(var(--ui-cool-rgb), 0.25);
}

#download-screen.landing-home .landing-hero-zone {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.55rem, 1.2dvh, 0.65rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(var(--ui-cool-rgb), 0.65);
}

#download-screen.landing-home .landing-sparkles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 30% 65%, rgba(var(--ui-cool-rgb), 0.4), transparent),
        radial-gradient(1px 1px at 55% 15%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1px 1px at 70% 45%, rgba(240, 147, 251, 0.35), transparent),
        radial-gradient(1px 1px at 85% 75%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1.5px 1.5px at 20% 80%, rgba(var(--ui-cool-rgb), 0.3), transparent),
        radial-gradient(1px 1px at 92% 30%, rgba(255, 255, 255, 0.3), transparent);
    background-size: 100% 100%;
    opacity: 0.16;
}

#download-screen.landing-home .landing-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.25rem, 0.5vw, 0.4rem);
    width: 100%;
    max-width: min(52rem, 98%);
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

#download-screen.landing-home .landing-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.35em;
    padding: clamp(0.25rem, 0.45dvh, 0.35rem) clamp(0.35rem, 0.7vw, 0.5rem);
    border-radius: 6px;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.12);
    background: rgba(10, 0, 20, 0.35);
    text-align: left;
}

#download-screen.landing-home .landing-step-num {
    flex-shrink: 0;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.55rem, 1.1dvh, 0.62rem);
    font-weight: 700;
    color: rgba(var(--ui-cool-rgb), 0.9);
}

#download-screen.landing-home .landing-step-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.48rem, 1.02dvh, 0.56rem);
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.48);
}

#download-screen.landing-home .landing-step-text strong {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.52rem, 1.08dvh, 0.6rem);
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}

#download-screen.landing-home .landing-systems {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(0.2rem, 0.45vw, 0.35rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

#download-screen.landing-home .landing-systems li {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.48rem, 1dvh, 0.55rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    padding: 0.2em 0.55em;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.22);
}

#download-screen.landing-home .landing-system-icon {
    font-size: 0.9em;
    opacity: 0.85;
}

#download-screen.landing-home .landing-feature-card {
    position: relative;
}

#download-screen.landing-home .landing-feature-tag {
    position: absolute;
    top: clamp(0.2rem, 0.35dvh, 0.28rem);
    right: clamp(0.25rem, 0.5vw, 0.35rem);
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.42rem, 0.9dvh, 0.48rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(var(--ui-cool-rgb), 0.75);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.2);
    background: rgba(var(--ui-cool-rgb), 0.08);
}

#download-screen.landing-home .landing-body-mid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(0.35rem, 0.75vw, 0.6rem);
    align-items: start;
    min-height: 0;
}

#download-screen.landing-home .landing-session-list {
    margin: 0;
    padding: 0 0 0 1.1em;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.5rem, 1.05dvh, 0.58rem);
    line-height: 1.38;
    color: rgba(255, 255, 255, 0.48);
}

#download-screen.landing-home .landing-session-list li {
    margin-bottom: 0.2em;
}

#download-screen.landing-home .landing-session-list strong {
    color: rgba(255, 255, 255, 0.72);
}

#download-screen.landing-home .landing-req-list {
    margin: 0;
    display: grid;
    gap: clamp(0.15rem, 0.28dvh, 0.22rem);
}

#download-screen.landing-home .landing-req-list > div {
    display: grid;
    grid-template-columns: 4.5em 1fr;
    gap: 0.35em 0.5em;
    padding: clamp(0.15rem, 0.28dvh, 0.2rem) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#download-screen.landing-home .landing-req-list dt {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.48rem, 1dvh, 0.54rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(var(--ui-cool-rgb), 0.6);
}

#download-screen.landing-home .landing-req-list dd {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.5rem, 1.05dvh, 0.58rem);
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.48);
}

#download-screen.landing-home .landing-mechanics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.2rem, 0.4dvh, 0.3rem) clamp(0.35rem, 0.7vw, 0.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

#download-screen.landing-home .landing-mechanics li {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.48rem, 1dvh, 0.55rem);
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.45);
    padding: clamp(0.2rem, 0.38dvh, 0.28rem) clamp(0.3rem, 0.6vw, 0.4rem);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 0, 20, 0.3);
}

#download-screen.landing-home .landing-mechanics strong {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.5rem, 1.02dvh, 0.56rem);
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.08em;
}

#download-screen.landing-home .landing-faq {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.25rem, 0.45dvh, 0.35rem) clamp(0.4rem, 0.9vw, 0.55rem);
    margin: 0;
}

#download-screen.landing-home .landing-faq-item {
    padding: clamp(0.25rem, 0.45dvh, 0.35rem) clamp(0.35rem, 0.75vw, 0.5rem);
    border-radius: 6px;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.1);
    background: rgba(10, 0, 20, 0.32);
}

#download-screen.landing-home .landing-faq dt {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.52rem, 1.08dvh, 0.6rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.15em;
}

#download-screen.landing-home .landing-faq dd {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.48rem, 1dvh, 0.55rem);
    line-height: 1.38;
    color: rgba(255, 255, 255, 0.44);
}

#download-screen.landing-home .landing-body-footer {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(0.35rem, 0.8vw, 0.65rem);
    align-items: start;
    min-height: 0;
}

#download-screen.landing-home .landing-lore-points {
    margin: clamp(0.2rem, 0.35dvh, 0.3rem) 0 0;
    padding: 0 0 0 1em;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.5rem, 1.05dvh, 0.58rem);
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.42);
}

#download-screen.landing-home .landing-lore-points li {
    margin-bottom: 0.15em;
}

#download-screen.landing-home .landing-lore-points strong {
    color: rgba(255, 255, 255, 0.62);
}

#download-screen.landing-home .landing-glance-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.35em;
    align-items: start;
}

#download-screen.landing-home .landing-glance-icon {
    grid-row: 1 / span 2;
    font-size: clamp(0.75rem, 1.4dvh, 0.9rem);
    line-height: 1;
    opacity: 0.75;
    filter: drop-shadow(0 0 6px rgba(var(--ui-cool-rgb), 0.3));
}

#download-screen.landing-home .landing-glance-label {
    grid-column: 2;
}

#download-screen.landing-home .landing-glance-value {
    grid-column: 2;
}

#download-screen.landing-home .landing-screenshot-placeholder {
    flex-direction: column;
    gap: 0.15em;
}

#download-screen.landing-home .landing-shot-glyph {
    font-size: clamp(1rem, 2.2dvh, 1.35rem);
    opacity: 0.35;
    filter: drop-shadow(0 0 10px rgba(var(--ui-cool-rgb), 0.4));
}

#download-screen.landing-home .landing-shot-label {
    font-size: clamp(0.42rem, 0.9dvh, 0.48rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
}

#download-screen.landing-home .landing-shot-combat .landing-screenshot-slot {
    background: linear-gradient(145deg, rgba(40, 10, 50, 0.9) 0%, rgba(90, 30, 120, 0.55) 50%, rgba(20, 5, 30, 0.95) 100%);
    border-color: rgba(180, 80, 200, 0.25);
}

#download-screen.landing-home .landing-shot-world .landing-screenshot-slot {
    background: linear-gradient(145deg, rgba(15, 35, 55, 0.9) 0%, rgba(40, 90, 110, 0.5) 45%, rgba(10, 20, 35, 0.95) 100%);
    border-color: rgba(80, 160, 200, 0.22);
}

#download-screen.landing-home .landing-shot-multi .landing-screenshot-slot {
    background: linear-gradient(145deg, rgba(20, 45, 30, 0.9) 0%, rgba(50, 120, 80, 0.45) 50%, rgba(8, 25, 18, 0.95) 100%);
    border-color: rgba(80, 180, 120, 0.22);
}

#download-screen.landing-home .landing-shot-quest .landing-screenshot-slot {
    background: linear-gradient(145deg, rgba(45, 35, 15, 0.9) 0%, rgba(140, 100, 40, 0.45) 50%, rgba(25, 18, 8, 0.95) 100%);
    border-color: rgba(200, 160, 80, 0.22);
}

#download-screen.landing-home .landing-cta-grid .landing-cta-link:first-child {
    border-color: rgba(var(--ui-cool-rgb), 0.85);
    background: linear-gradient(145deg, rgba(var(--ui-cool-rgb), 0.32) 0%, rgba(var(--ui-cool-mid-rgb), 0.22) 100%);
    box-shadow: 0 4px 18px rgba(var(--ui-cool-rgb), 0.2);
}

#download-screen.landing-home .landing-hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(0.3rem, 0.6vw, 0.45rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

#download-screen.landing-home .landing-hero-badges li {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.52rem, 1.1dvh, 0.6rem);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    padding: 0.2em 0.65em;
    border-radius: 999px;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.28);
    background: rgba(var(--ui-cool-rgb), 0.12);
    box-shadow: 0 0 18px rgba(var(--ui-cool-rgb), 0.08);
}

#download-screen.landing-home .landing-hero-lede {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.58rem, 1.35dvh, 0.7rem);
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.58);
    max-width: min(52rem, 96%);
    margin: 0;
    text-wrap: balance;
}

#download-screen.landing-home .landing-hero-lede strong {
    color: rgba(var(--ui-cool-rgb), 0.95);
    font-weight: 600;
}

#download-screen.landing-home .landing-download-panel {
    width: 100%;
    max-width: min(54rem, 98%);
    padding: clamp(0.35rem, 0.7dvh, 0.5rem) clamp(0.55rem, 1.2vw, 0.75rem);
    border-radius: 10px;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.16);
    background: linear-gradient(145deg, rgba(10, 0, 22, 0.28) 0%, rgba(10, 0, 18, 0.16) 100%);
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

#download-screen.landing-home .landing-download-heading {
    margin: 0 0 clamp(0.25rem, 0.4dvh, 0.35rem);
    font-family: 'Cinzel', serif;
    font-size: clamp(0.55rem, 1.15dvh, 0.62rem);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    color: rgba(var(--ui-cool-rgb), 0.75);
}

#download-screen.landing-home .landing-download-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.25rem, 0.5vw, 0.4rem);
}

#download-screen.landing-home .landing-download-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.1em;
    padding: clamp(0.25rem, 0.45dvh, 0.35rem) clamp(0.2rem, 0.5vw, 0.35rem);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

#download-screen.landing-home .landing-download-chip-platform {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.55rem, 1.1dvh, 0.62rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

#download-screen.landing-home .landing-download-chip-size {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.58rem, 1.2dvh, 0.66rem);
    font-weight: 600;
    color: rgba(var(--ui-cool-rgb), 0.95);
}

#download-screen.landing-home .landing-download-chip-type {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.48rem, 1dvh, 0.54rem);
    color: rgba(255, 255, 255, 0.38);
}

#download-screen.landing-home .landing-download-foot {
    margin: clamp(0.25rem, 0.4dvh, 0.35rem) 0 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.48rem, 1dvh, 0.56rem);
    line-height: 1.45;
    text-align: left;
    color: rgba(255, 255, 255, 0.42);
    text-wrap: balance;
}

#download-screen.landing-home .landing-download-foot strong {
    color: rgba(var(--ui-cool-rgb), 0.75);
    font-weight: 600;
}

#download-screen.landing-home .landing-cta-label {
    line-height: 1.2;
}

#download-screen.landing-home .landing-cta-size {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.48rem, 1dvh, 0.54rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(255, 255, 255, 0.55);
    opacity: 0.9;
}

#download-screen.landing-home .landing-highlights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.25rem, 0.5vw, 0.4rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

#download-screen.landing-home .landing-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.15em;
    padding: clamp(0.28rem, 0.5dvh, 0.38rem) clamp(0.3rem, 0.6vw, 0.4rem);
    border-radius: 8px;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.14);
    background: rgba(10, 0, 20, 0.4);
    backdrop-filter: blur(4px);
}

#download-screen.landing-home .landing-highlight-icon {
    font-size: clamp(0.85rem, 1.6dvh, 1rem);
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(var(--ui-cool-rgb), 0.35));
}

#download-screen.landing-home .landing-highlight-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.5rem, 1.05dvh, 0.58rem);
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.48);
}

#download-screen.landing-home .landing-highlight-text strong {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.55rem, 1.1dvh, 0.62rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 0.1em;
}

#download-screen.landing-home .landing-cta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.35rem, 0.75vw, 0.55rem);
    width: 100%;
    max-width: min(56rem, 98%);
    margin: 0 auto;
}

#download-screen.landing-home .landing-cta-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12em;
    width: 100%;
    text-align: center;
    text-decoration: none;
    padding: clamp(0.4rem, 1.1dvh, 0.55rem) clamp(0.35rem, 1vw, 0.65rem);
    font-size: clamp(0.62rem, 1.45dvh, 0.74rem);
    letter-spacing: 0.07em;
    box-sizing: border-box;
}

#download-screen.landing-home .landing-platform-note {
    margin: 0;
    opacity: 0.45;
    font-size: clamp(0.55rem, 1.2dvh, 0.62rem);
}

#download-screen.landing-home .landing-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(0.1rem, 0.28dvh, 0.22rem);
}

#download-screen.landing-home .landing-section {
    flex-shrink: 1;
    min-height: 0;
}

#download-screen.landing-home .landing-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0 0 clamp(0.2rem, 0.4dvh, 0.35rem);
    font-size: clamp(0.62rem, 1.35dvh, 0.78rem);
}

#download-screen.landing-home .landing-section-title::before,
#download-screen.landing-home .landing-section-title::after {
    content: '';
    flex: 1;
    max-width: 4rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--ui-cool-rgb), 0.35), transparent);
}

#download-screen.landing-home .landing-features-grid {
    gap: clamp(0.25rem, 0.45dvh, 0.45rem) clamp(0.35rem, 0.8vw, 0.55rem);
}

#download-screen.landing-home .landing-feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: clamp(0.3rem, 0.55dvh, 0.45rem) clamp(0.4rem, 0.9vw, 0.55rem);
    border-top: 2px solid rgba(var(--ui-cool-rgb), 0.2);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

#download-screen.landing-home .landing-feature-card:hover {
    border-top-color: rgba(var(--ui-cool-rgb), 0.55);
    transform: translateY(-1px);
}

#download-screen.landing-home .landing-feature-icon {
    display: block;
    margin: 0 0 0.15em;
    font-size: clamp(0.8rem, 1.5dvh, 0.95rem);
}

#download-screen.landing-home .landing-feature-card h3 {
    display: block;
    font-size: clamp(0.6rem, 1.25dvh, 0.68rem);
}

#download-screen.landing-home .landing-feature-card p {
    font-size: clamp(0.55rem, 1.15dvh, 0.62rem);
    line-height: 1.35;
    margin-top: clamp(0.15rem, 0.25dvh, 0.2rem);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

#download-screen.landing-home .landing-screenshot-slot {
    height: clamp(3.25rem, 7.5dvh, 5.5rem);
    max-height: clamp(3.25rem, 7.5dvh, 5.5rem);
    aspect-ratio: 16 / 9;
}

#download-screen.landing-home .landing-screenshots {
    gap: clamp(0.3rem, 0.6vw, 0.45rem);
}

#download-screen.landing-home .landing-screenshot-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    min-width: 0;
}

#download-screen.landing-home .landing-screenshot-caption {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.48rem, 1dvh, 0.54rem);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: center;
    color: rgba(var(--ui-cool-rgb), 0.55);
    text-transform: uppercase;
}

#download-screen.landing-home .landing-lore strong {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

#download-screen.landing-home .landing-glance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.2rem, 0.4dvh, 0.35rem) clamp(0.35rem, 0.75vw, 0.55rem);
}

#download-screen.landing-home .landing-glance-card {
    padding: clamp(0.22rem, 0.4dvh, 0.32rem) clamp(0.35rem, 0.8vw, 0.5rem);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 0, 20, 0.35);
}

#download-screen.landing-home .landing-glance-card-accent {
    border-color: rgba(var(--ui-cool-rgb), 0.28);
    background: linear-gradient(135deg, rgba(var(--ui-cool-rgb), 0.14) 0%, rgba(10, 0, 20, 0.4) 100%);
}

#download-screen.landing-home .landing-glance-label {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.48rem, 1dvh, 0.54rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(var(--ui-cool-rgb), 0.55);
}

#download-screen.landing-home .landing-glance-value {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.52rem, 1.08dvh, 0.6rem);
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.5);
}

/* When scaled to fit, tighten gaps slightly — all sections stay visible */
#download-screen.landing-home .landing-fit-stage.landing-fit-applied .landing-ziggurat {
    gap: 0.08rem;
}

#download-screen.landing-home .landing-fit-stage.landing-fit-applied .landing-ziggurat > .landing-hero,
#download-screen.landing-home .landing-fit-stage.landing-fit-applied .landing-ziggurat .landing-body > * {
    margin-bottom: 0.1rem;
}

#download-screen.landing-home .landing-fit-stage.landing-fit-applied .landing-body {
    gap: 0.12rem;
}

#download-screen.landing-home .landing-fit-stage.landing-fit-applied .landing-feature-card p {
    -webkit-line-clamp: 2;
}

@media (prefers-reduced-motion: no-preference) {
    #download-screen.landing-home .landing-hero,
    #download-screen.landing-home .landing-body > * {
        animation: landingFadeUp 0.55s ease-out both;
    }

    #download-screen.landing-home .landing-body > *:nth-child(2) { animation-delay: 0.04s; }
    #download-screen.landing-home .landing-body > *:nth-child(3) { animation-delay: 0.08s; }
    #download-screen.landing-home .landing-body > *:nth-child(4) { animation-delay: 0.12s; }
    #download-screen.landing-home .landing-body > *:nth-child(5) { animation-delay: 0.16s; }
    #download-screen.landing-home .landing-body > *:nth-child(6) { animation-delay: 0.2s; }
    #download-screen.landing-home .landing-body > *:nth-child(7) { animation-delay: 0.24s; }
    #download-screen.landing-home .landing-body > *:nth-child(8) { animation-delay: 0.28s; }
    #download-screen.landing-home .landing-body > *:nth-child(9) { animation-delay: 0.32s; }
}

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

#download-screen.landing-home .landing-lore {
    padding: clamp(0.3rem, 0.55dvh, 0.45rem) clamp(0.65rem, 1.2vw, 0.85rem);
}

#download-screen.landing-home .landing-lore p {
    font-size: clamp(0.58rem, 1.2dvh, 0.65rem);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}


#download-screen.landing-home .landing-lore-attribution {
    font-size: clamp(0.5rem, 1.05dvh, 0.55rem);
    margin-top: clamp(0.15rem, 0.25dvh, 0.2rem);
}

#download-screen.landing-home .landing-tech-grid {
    gap: clamp(0.15rem, 0.3dvh, 0.25rem) clamp(0.75rem, 2vw, 1.25rem);
}

#download-screen.landing-home .landing-tech-item {
    padding: clamp(0.15rem, 0.28dvh, 0.22rem) 0;
}

#download-screen.landing-home .landing-tech-label {
    font-size: clamp(0.5rem, 1.05dvh, 0.55rem);
}

#download-screen.landing-home .landing-tech-value {
    font-size: clamp(0.55rem, 1.15dvh, 0.62rem);
    line-height: 1.35;
}

@media (max-width: 720px) {
    #download-screen.landing-home .landing-ziggurat {
        --z0: 76;
        --z1: 82;
        --z2: 87;
        --z3: 91;
        --z4: 94;
        --z5: 96;
        --z6: 98;
        --z7: 100;
        --zig-face-top: rgba(54, 34, 82, 0.46);
        --zig-face-bottom: rgba(16, 6, 28, 0.4);
    }

    #download-screen.landing-home .landing-scroll {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    #download-screen.landing-home .landing-download-grid,
    #download-screen.landing-home .landing-cta-grid,
    #download-screen.landing-home .landing-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #download-screen.landing-home .landing-features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #download-screen.landing-home .landing-screenshots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #download-screen.landing-home .landing-glance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #download-screen.landing-home .landing-steps {
        grid-template-columns: 1fr;
    }

    #download-screen.landing-home .landing-body-mid,
    #download-screen.landing-home .landing-body-footer {
        grid-template-columns: 1fr;
    }

    #download-screen.landing-home .landing-mechanics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #download-screen.landing-home .landing-faq {
        grid-template-columns: 1fr;
    }
}


/* ── Hero (compact) ───────────────────────────────────────────────────── */

.landing-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    padding: 0.8vh 0 0;
}

.landing-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--ui-accent-cool) 0%, var(--ui-accent-cool-mid) 40%, var(--ui-accent-cool-bright) 80%, var(--ui-accent-cool) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.15em;
    margin: 0 0 0.3vh;
    animation: landingTitleShimmer 6s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(var(--ui-cool-rgb), 0.6)) drop-shadow(0 0 60px rgba(var(--ui-cool-mid-rgb), 0.3));
}

.landing-title-sm {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

@keyframes landingTitleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.landing-tagline {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.75rem, 1.6vw, 0.95rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.08em;
    margin: 0 0 0.4vh;
}

.landing-size-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.35);
    margin: 0 0 0.6vh;
    letter-spacing: 0.02em;
}

/* ── CTA buttons ──────────────────────────────────────────────────────── */

.landing-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.landing-cta-secondary {
    border-color: rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
}

.landing-cta-secondary:hover {
    border-color: rgba(255, 255, 255, 0.55);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.35),
        0 0 40px rgba(255, 255, 255, 0.06);
}

.landing-cta {
    padding: 10px 36px;
    border: 2px solid rgba(var(--ui-cool-rgb), 0.6);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(var(--ui-cool-rgb), 0.2) 0%, rgba(var(--ui-cool-mid-rgb), 0.2) 100%);
    color: #ffffff;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
    position: relative;
    overflow: hidden;
}

.landing-cta::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(var(--ui-cool-rgb), 0.3), rgba(240, 147, 251, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.landing-cta:hover {
    background: linear-gradient(135deg, rgba(var(--ui-cool-rgb), 0.4) 0%, rgba(var(--ui-cool-mid-rgb), 0.4) 100%);
    border-color: rgba(var(--ui-cool-rgb), 0.9);
    transform: translateY(-2px);
    box-shadow:
        0 6px 24px rgba(var(--ui-cool-rgb), 0.4),
        0 0 40px rgba(var(--ui-cool-mid-rgb), 0.15);
}

.landing-cta:hover::before { opacity: 1; }
.landing-cta:active { transform: translateY(-1px); }

.landing-cta:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
    box-shadow: none;
}

/* ── Dividers (thin) ──────────────────────────────────────────────────── */

.landing-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--ui-cool-rgb), 0.35), transparent);
    margin: 0.8vh auto;
    flex-shrink: 0;
}

/* ── Sections ─────────────────────────────────────────────────────────── */

.landing-section {
    flex-shrink: 0;
    margin-bottom: 0;
}

.landing-section-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(0.7rem, 1.4vw, 0.85rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    letter-spacing: 0.1em;
    margin: 0 0 0.8vh;
    text-transform: uppercase;
}

/* ── Feature cards (4-col dense) ──────────────────────────────────────── */

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6vh 0.6rem;
}

.landing-feature-card {
    background: rgba(10, 0, 20, 0.45);
    border: 1px solid rgba(var(--ui-cool-rgb), 0.12);
    border-radius: 8px;
    padding: 0.6vh 0.6rem;
    backdrop-filter: blur(6px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.landing-feature-card:hover {
    border-color: rgba(var(--ui-cool-rgb), 0.35);
    box-shadow: 0 2px 12px rgba(var(--ui-cool-rgb), 0.08);
}

.landing-feature-icon {
    display: inline;
    font-size: 0.95rem;
    margin-right: 0.4rem;
    vertical-align: middle;
    filter: grayscale(0.2) brightness(1.1);
}

.landing-feature-card h3 {
    display: inline;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.landing-feature-card p {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
    margin: 0.3vh 0 0;
}

/* ── Screenshot gallery (4-across, compact) ───────────────────────────── */

.landing-screenshots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.landing-screenshot-slot {
    position: relative;
    aspect-ratio: 16 / 9;
    border: 1px dashed rgba(var(--ui-cool-rgb), 0.2);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(10, 0, 20, 0.3);
}

.landing-screenshot-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.landing-screenshot-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Lore teaser (compact) ────────────────────────────────────────────── */

.landing-lore {
    border-left: 2px solid rgba(var(--ui-cool-rgb), 0.25);
    padding: 0.6vh 1rem;
    background: rgba(10, 0, 20, 0.25);
    border-radius: 0 6px 6px 0;
}

.landing-lore p {
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 400;
    font-style: italic;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
    margin: 0;
}

.landing-lore-attribution {
    display: block;
    margin-top: 0.3vh;
    font-family: 'Cinzel', serif;
    font-size: 0.55rem;
    font-style: normal;
    color: rgba(var(--ui-cool-rgb), 0.4);
    letter-spacing: 0.06em;
}

/* ── Technical details (3-col, tight) ─────────────────────────────────── */

.landing-tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3vh 1.5rem;
}

.landing-tech-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.3vh 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.landing-tech-label {
    font-family: 'Cinzel', serif;
    font-size: 0.55rem;
    font-weight: 600;
    color: rgba(var(--ui-cool-rgb), 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-tech-value {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
}

/* ── Install instructions (pre-download) ──────────────────────────────── */

.landing-install-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 2.5rem;
    -webkit-overflow-scrolling: touch;
}

.landing-install-back {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.landing-install-back:hover {
    color: rgba(var(--ui-cool-rgb), 0.95);
}

.landing-install-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.landing-install-notice {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(10, 0, 20, 0.55);
    border: 1px solid rgba(var(--ui-cool-rgb), 0.22);
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    margin: 0.6rem 0 1.2rem;
    text-align: left;
}

.landing-install-steps {
    list-style: none;
    margin: 0 0 1.4rem;
    padding: 0;
    width: 100%;
    counter-reset: install-step;
    text-align: left;
}

.landing-install-step {
    counter-increment: install-step;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem 0 0.75rem 2.6rem;
    position: relative;
    border-bottom: 1px solid rgba(var(--ui-cool-rgb), 0.1);
}

.landing-install-step:last-child {
    border-bottom: none;
}

.landing-install-step::before {
    content: counter(install-step);
    position: absolute;
    left: 0;
    top: 0.72rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(var(--ui-cool-rgb), 0.25);
    border: 1px solid rgba(var(--ui-cool-rgb), 0.45);
}

.landing-install-step-title {
    font-family: 'Cinzel', serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.04em;
}

.landing-install-step-body {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.62);
}

.landing-install-step-body strong {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}

.landing-install-cta-row {
    margin-top: 0.2rem;
}

.landing-install-footer {
    margin-top: 1rem;
    max-width: 520px;
    line-height: 1.5;
    opacity: 0.55;
}

/* ── Progress (download active) ───────────────────────────────────────── */

.landing-progress-wrap {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 0, 18, 0.92);
    backdrop-filter: blur(12px);
}

.landing-progress-inner {
    text-align: center;
    width: 90%;
    max-width: 440px;
    animation: fadeInUp 0.5s ease-out;
}

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

.download-status-text {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin: 0 0 1rem;
}

.download-progress-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
}

.download-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.download-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--ui-accent-cool) 0%, var(--ui-accent-cool-mid) 50%, var(--ui-accent-cool-bright) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(var(--ui-cool-rgb), 0.5);
}

.download-percent {
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 3em;
    text-align: right;
}

.download-detail {
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    margin: 0.5rem 0 0;
    min-height: 1.2em;
}

.download-speed {
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    margin: 0.25rem 0 0;
    min-height: 1em;
}

.download-error {
    margin-top: 1rem;
    background: rgba(200, 50, 50, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.download-error p {
    color: #ff6b6b;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    margin: 0 0 0.8rem 0;
}

.download-retry-button {
    padding: 8px 24px;
    border: 2px solid rgba(var(--ui-cool-rgb), 0.5);
    border-radius: 8px;
    background: rgba(10, 0, 20, 0.15);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.download-retry-button:hover {
    background: rgba(10, 0, 20, 0.3);
    border-color: rgba(var(--ui-cool-rgb), 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--ui-cool-rgb), 0.4);
}

/* ── Landing page responsive ──────────────────────────────────────────── */

@media (max-width: 640px) {
    .landing-scroll {
        padding: 0.6rem 1rem 0.4rem;
    }
    #download-screen.landing-home .landing-hero {
        padding: 2rem 1rem 2.5rem;
    }
    #download-screen.landing-home .landing-platform-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #download-screen.landing-home .landing-size-list {
        grid-template-columns: 1fr;
    }
    #download-screen.landing-home .landing-main {
        padding: 0 1rem 3rem;
    }
    #download-screen.landing-home .landing-section {
        padding-top: 2.5rem;
    }
    #download-screen.landing-home .landing-features-grid {
        grid-template-columns: 1fr;
    }
    #download-screen.landing-home .landing-tech-grid {
        grid-template-columns: 1fr;
    }
    #download-screen.landing-home .landing-screenshots {
        grid-template-columns: 1fr;
    }
    .landing-features-grid {
        grid-template-columns: 1fr;
    }
    .landing-screenshots {
        grid-template-columns: repeat(2, 1fr);
    }
    .landing-tech-grid {
        grid-template-columns: 1fr;
    }
    .landing-lore {
        padding: 0.75rem 1rem;
    }
    .landing-cta {
        padding: 12px 30px;
        font-size: 0.8rem;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    #download-screen.landing-home .landing-platform-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .landing-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .landing-screenshots {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Character Selection Screen */
#character-select-screen {
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

.character-select-container {
    background: transparent;
    border: none;
    border-radius: 20px;
    padding: 40px;
    min-width: 0;
    max-width: 100vw;
    width: 100vw;
    position: absolute;
    bottom: 1%;
    left: 0;
    transform: none;
    z-index: 10;
    /* Allow the card row to manage its own horizontal scrolling without clipping card edges */
    overflow-x: visible;
    box-sizing: border-box;
}

.character-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.character-select-container h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--ui-accent-cool) 0%, var(--ui-accent-cool-mid) 50%, var(--ui-accent-cool-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin: 0;
    letter-spacing: 0.1em;
    text-shadow: 0 0 40px rgba(var(--ui-cool-rgb), 0.8), 0 0 80px rgba(var(--ui-cool-rgb), 0.4);
    flex: 1;
}

.character-limit-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(10, 0, 20, 0.3);
    border: 1px solid rgba(var(--ui-cool-rgb), 0.3);
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.character-limit-info.limit-reached {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.1);
}

.character-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: clamp(0.75rem, 2vw, 1.15rem);
    margin-bottom: 1.25rem;
    justify-content: center;
    align-items: stretch;
    min-height: 150px;
    overflow-x: visible;
    overflow-y: visible;
    padding: 0.65rem clamp(0.5rem, 2vw, 1rem) 0.25rem;
}

.character-select-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    width: min(28rem, 92vw);
    margin: 1rem auto 0;
    padding: 1.75rem 1.5rem;
    text-align: center;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.22);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(10, 0, 20, 0.5) 0%, rgba(10, 0, 20, 0.22) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

.character-select-empty-ornament {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: min(14rem, 70%);
}

.character-select-empty-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 0 18px rgba(var(--ui-cool-rgb), 0.35);
}

.character-select-empty-sub {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.48);
}

.character-card {
    --card-index: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    min-width: clamp(15rem, 28vw, 17.5rem);
    max-width: 19.5rem;
    padding: 0.95rem 1rem 0.85rem;
    border: 2px solid rgba(var(--ui-cool-rgb), 0.38);
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(10, 0, 20, 0.78) 0%, rgba(10, 0, 20, 0.42) 100%);
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 6px 22px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease;
}

.character-card-glow {
    position: absolute;
    inset: -30% -10% auto;
    height: 55%;
    background: radial-gradient(ellipse at 50% 0%, rgba(var(--ui-cool-rgb), 0.16), transparent 68%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.character-card-frame {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
}

.character-card-ornament {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--ui-cool-rgb), 0.45), transparent);
    box-shadow: 0 0 10px rgba(var(--ui-cool-rgb), 0.2);
}

.character-card-gem {
    flex-shrink: 0;
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    color: rgba(var(--ui-cool-rgb), 0.75);
    text-shadow: 0 0 10px rgba(var(--ui-cool-rgb), 0.45);
    letter-spacing: 0.15em;
    opacity: 0.85;
}

.character-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--ui-cool-rgb), 0.72);
    box-shadow:
        0 12px 30px rgba(var(--ui-cool-rgb), 0.22),
        0 0 28px rgba(var(--ui-cool-rgb), 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.character-card:hover .character-card-glow {
    opacity: 1;
}

.character-card.selected {
    border-color: rgba(240, 147, 251, 0.72);
    padding-bottom: 1.55rem;
    background: linear-gradient(
        165deg,
        rgba(var(--ui-cool-rgb), 0.22) 0%,
        rgba(var(--ui-cool-mid-rgb), 0.16) 48%,
        rgba(10, 0, 20, 0.48) 100%
    );
    box-shadow:
        0 10px 32px rgba(var(--ui-cool-rgb), 0.28),
        0 0 36px rgba(240, 147, 251, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.character-card.selected .character-card-glow {
    opacity: 1;
    background: radial-gradient(ellipse at 50% 0%, rgba(240, 147, 251, 0.22), transparent 70%);
}

.character-card.selected .character-card-selected-mark {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.character-card.selected .character-card-gem {
    color: rgba(240, 147, 251, 0.95);
    text-shadow: 0 0 14px rgba(240, 147, 251, 0.55);
}

@keyframes character-card-selected-pulse {
    0%, 100% {
        box-shadow:
            0 10px 32px rgba(var(--ui-cool-rgb), 0.28),
            0 0 30px rgba(240, 147, 251, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }
    50% {
        box-shadow:
            0 12px 36px rgba(var(--ui-cool-rgb), 0.36),
            0 0 44px rgba(240, 147, 251, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }
}

#character-select-screen.active .character-card {
    animation: character-card-rise 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(0.1s + var(--card-index) * 0.07s);
}

#character-select-screen.active .character-card.selected {
    animation:
        character-card-rise 0.62s cubic-bezier(0.22, 1, 0.36, 1) both,
        character-card-selected-pulse 2.8s ease-in-out infinite;
    animation-delay: calc(0.1s + var(--card-index) * 0.07s), 0.85s;
}

@keyframes character-card-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.character-card-header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.35rem 0.55rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.character-card-identity {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-width: 0;
}

.character-card-name {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.95rem, 2vw, 1.08rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    word-break: break-word;
}

.character-card-epithet {
    margin: 0.28rem 0 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.35;
}

.character-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.45rem;
}

.character-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.45rem;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: middle;
    backdrop-filter: blur(4px);
}

.character-card-badge-downed {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.42);
    color: rgba(255, 220, 220, 0.95);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.18);
}

.character-card-badge-criminal {
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.38);
    color: rgba(255, 150, 150, 0.95);
}

.character-card-badge-wanted {
    background: rgba(251, 191, 36, 0.16);
    border: 1px solid rgba(251, 191, 36, 0.45);
    color: rgba(255, 220, 140, 0.95);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.15);
}

.character-card-badge-prisoner {
    background: rgba(75, 85, 99, 0.35);
    border: 1px solid rgba(156, 163, 175, 0.45);
    color: rgba(210, 214, 220, 0.95);
}

.character-card-level {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    padding: 0.35rem 0.45rem;
    border-radius: 10px;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.45);
    background: linear-gradient(160deg, rgba(var(--ui-cool-rgb), 0.22), rgba(10, 0, 20, 0.35));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.character-card-level-value {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 12px rgba(var(--ui-cool-rgb), 0.35);
}

.character-card-level-label {
    margin-top: 0.12rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.48rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
}

.character-card-actions {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    gap: 0.28rem;
    align-self: end;
}

.character-card-action-btn {
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--ui-cool-rgb), 0.35);
    border-radius: 7px;
    background: rgba(10, 0, 20, 0.35);
    color: rgba(255, 255, 255, 0.72);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.character-card-action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--ui-cool-rgb), 0.7);
    background: rgba(var(--ui-cool-rgb), 0.18);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(var(--ui-cool-rgb), 0.22);
}

.character-delete-btn:hover {
    border-color: rgba(255, 107, 107, 0.65) !important;
    background: rgba(255, 107, 107, 0.14) !important;
    box-shadow: 0 0 14px rgba(255, 107, 107, 0.2) !important;
}

.character-card-body {
    cursor: pointer;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.character-card-body .finalize-summary {
    margin-bottom: 0.5rem;
}

.character-card-body .finalize-details {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.character-card-body .finalize-summary h3 {
    cursor: default;
}

.character-card-body .finalize-summary h3::after {
    display: none;
}

.character-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 0.75rem;
    margin-bottom: 0.65rem;
}

.character-card-stat {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.character-card-stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.character-card-stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.25;
    word-break: break-word;
}

.character-card-hp {
    margin-bottom: 0.65rem;
}

.character-card-hp-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.character-card-hp-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.character-card-hp-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

.character-card-hp-bar {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(var(--ui-cool-rgb), 0.18);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.character-card-hp-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(var(--ui-cool-rgb), 0.85), rgba(240, 147, 251, 0.75));
    box-shadow: 0 0 10px rgba(var(--ui-cool-rgb), 0.35);
    transition: width 0.35s ease;
}

.character-card-hp-fill--downed {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.75), rgba(180, 40, 40, 0.85));
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.character-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
}

.info-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.info-value {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.character-card-meta {
    margin-top: auto;
    padding-top: 0.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.character-card-meta-divider {
    height: 1px;
    margin-bottom: 0.35rem;
    background: linear-gradient(90deg, transparent, rgba(var(--ui-cool-rgb), 0.35), transparent);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.64rem;
}

.meta-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.meta-value {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    text-align: right;
}

.character-card-selected-mark {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    padding: 0.14rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(240, 147, 251, 0.55);
    background: rgba(240, 147, 251, 0.14);
    font-family: 'Inter', sans-serif;
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 230, 255, 0.92);
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 2;
}

.character-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin: 0.25rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Deleted Characters Section */
.show-deleted-characters-btn {
    margin: 1.5rem auto;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 165, 0, 0.2);
    border: 2px solid rgba(255, 165, 0, 0.4);
    border-radius: 8px;
    color: #ffa500;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: fit-content;
}

.show-deleted-characters-btn:hover {
    background: rgba(255, 165, 0, 0.3);
    border-color: rgba(255, 165, 0, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.2);
}

.show-deleted-characters-btn:active {
    transform: translateY(0);
}

.deleted-characters-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(10, 0, 20, 0.4);
    border: 2px solid rgba(255, 165, 0, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.deleted-characters-header {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: rgba(255, 165, 0, 0.9);
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.deleted-characters-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.deleted-character-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.deleted-character-card {
    border-color: rgba(255, 165, 0, 0.5) !important;
    opacity: 0.85;
}

.deleted-character-card:hover {
    border-color: rgba(255, 165, 0, 0.7) !important;
    opacity: 1;
}

.character-restore-btn:hover {
    border-color: rgba(0, 255, 0, 0.6) !important;
    background: rgba(0, 255, 0, 0.1) !important;
}

.meta-value.warning {
    color: #ff6b6b;
    font-weight: 700;
}

.character-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    max-width: min(52rem, 96vw);
    margin: 0 auto;
    padding: 1.35rem clamp(1rem, 3vw, 2rem) 0.5rem;
    position: relative;
}

.character-actions::before {
    content: '';
    position: absolute;
    inset: 0 -8vw 0 -8vw;
    background:
        radial-gradient(ellipse 70% 120% at 50% 100%, rgba(var(--ui-cool-rgb), 0.18), transparent 68%),
        linear-gradient(180deg, transparent 0%, rgba(10, 0, 20, 0.42) 38%, rgba(4, 0, 12, 0.62) 100%);
    border-top: 1px solid rgba(var(--ui-cool-rgb), 0.22);
    pointer-events: none;
    z-index: 0;
}

.character-actions-frame {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: min(36rem, 88vw);
    position: relative;
    z-index: 1;
}

.character-actions-ornament {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--ui-cool-rgb), 0.55), transparent);
    box-shadow: 0 0 14px rgba(var(--ui-cool-rgb), 0.28);
}

.character-actions-gem {
    flex-shrink: 0;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    color: rgba(var(--ui-cool-rgb), 0.85);
    text-shadow: 0 0 16px rgba(var(--ui-cool-rgb), 0.55);
    letter-spacing: 0.2em;
    opacity: 0.9;
}

.character-actions-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: clamp(0.65rem, 2vw, 1.1rem);
    width: 100%;
    position: relative;
    z-index: 1;
}

.character-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-width: clamp(8.5rem, 18vw, 10.5rem);
    padding: 0.85rem clamp(1rem, 2.4vw, 1.65rem);
    border: 2px solid rgba(var(--ui-cool-rgb), 0.45);
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(10, 0, 20, 0.55) 0%, rgba(10, 0, 20, 0.28) 100%);
    color: #ffffff;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.72rem, 1.5vw, 0.82rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease,
        background 0.28s ease,
        opacity 0.28s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.character-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    transform: translate(-50%, -50%);
    transition: width 0.55s ease, height 0.55s ease;
    pointer-events: none;
}

.character-action-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--ui-cool-rgb), 0.28), rgba(240, 147, 251, 0.22));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.character-action-btn:hover::before {
    width: 280px;
    height: 280px;
}

.character-action-btn:hover::after {
    opacity: 1;
}

.character-action-label {
    position: relative;
    z-index: 1;
    line-height: 1.15;
}

.character-action-sublabel {
    position: relative;
    z-index: 1;
    font-family: 'Inter', sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
    line-height: 1.2;
}

.character-action-create,
.character-action-logout {
    flex: 0 1 auto;
}

.character-action-enter {
    flex: 1 1 auto;
    min-width: clamp(10.5rem, 24vw, 14rem);
    padding: 1rem clamp(1.35rem, 3vw, 2.25rem);
    font-size: clamp(0.82rem, 1.8vw, 0.95rem);
    letter-spacing: 0.14em;
    border-color: rgba(var(--ui-cool-rgb), 0.65);
    background: linear-gradient(
        135deg,
        rgba(var(--ui-cool-rgb), 0.32) 0%,
        rgba(var(--ui-cool-mid-rgb), 0.28) 52%,
        rgba(240, 147, 251, 0.22) 100%
    );
    box-shadow:
        0 6px 24px rgba(var(--ui-cool-rgb), 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.character-action-enter .character-action-sublabel {
    color: rgba(255, 255, 255, 0.62);
}

.character-action-enter.is-ready {
    animation: character-action-enter-pulse 2.8s ease-in-out infinite;
}

@keyframes character-action-enter-pulse {
    0%, 100% {
        box-shadow:
            0 6px 24px rgba(var(--ui-cool-rgb), 0.28),
            0 0 24px rgba(var(--ui-cool-rgb), 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }
    50% {
        box-shadow:
            0 8px 30px rgba(var(--ui-cool-rgb), 0.42),
            0 0 42px rgba(240, 147, 251, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.22);
    }
}

.character-action-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: rgba(var(--ui-cool-rgb), 0.9);
    box-shadow:
        0 10px 28px rgba(var(--ui-cool-rgb), 0.38),
        0 0 36px rgba(var(--ui-cool-mid-rgb), 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.character-action-enter:hover:not(:disabled) {
    background: linear-gradient(135deg, #7a8ef5 0%, #8555b8 50%, #f5a5ff 100%);
}

.character-action-logout {
    border-color: rgba(255, 255, 255, 0.28);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(10, 0, 20, 0.22) 100%);
}

.character-action-logout:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.1) 0%, rgba(10, 0, 20, 0.3) 100%);
}

.character-action-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.character-action-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none !important;
    animation: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

#character-select-screen.active .character-actions-frame {
    animation: character-actions-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

#character-select-screen.active .character-action-btn {
    animation: character-actions-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#character-select-screen.active .character-action-create {
    animation-delay: 0.28s;
}

#character-select-screen.active .character-action-enter {
    animation-delay: 0.38s;
}

#character-select-screen.active .character-action-logout {
    animation-delay: 0.48s;
}

@keyframes character-actions-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .character-actions-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .character-action-btn,
    .character-action-enter {
        width: 100%;
        min-width: 0;
    }

    .character-actions-frame {
        width: 100%;
    }
}

/* Help, music, fullscreen — landing, login, character select, character creation, zone loading */
.zephyria-out-of-world-chrome {
    position: fixed;
    top: max(12px, env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: 100;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.zephyria-out-of-world-chrome-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid rgba(var(--ui-chrome-rgb), 0.35);
    background: rgba(8, 10, 22, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.zephyria-out-of-world-help-btn {
    font-size: 1.35rem;
    font-weight: 700;
    font-family: inherit;
}

.zephyria-out-of-world-music-btn {
    font-size: 1.35rem;
}

.zephyria-out-of-world-music-btn:not(.active) {
    opacity: 0.55;
}

.zephyria-out-of-world-fullscreen-btn {
    font-size: 1.25rem;
}

.zephyria-out-of-world-chrome-btn:hover:not(:disabled) {
    background: rgba(42, 42, 42, 0.65);
    border-color: rgba(var(--ui-chrome-rgb), 0.75);
    transform: translateY(-1px);
}

.zephyria-out-of-world-chrome-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.zephyria-out-of-world-chrome-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--ui-chrome-rgb), 0.35), 0 2px 10px rgba(0, 0, 0, 0.35);
}

.zephyria-out-of-world-fullscreen-btn.active,
.zephyria-out-of-world-help-btn.active,
.zephyria-out-of-world-music-btn.active {
    background: rgba(var(--ui-chrome-rgb), 0.45);
    border-color: rgba(var(--ui-chrome-rgb), 0.85);
    color: #fff;
}

