/* ==========================================================================
   APP SHELL — the parts of the old landing stylesheets (landing.css,
   landing-v2.css) that belong to the app, not to the landing page:
   design tokens used by the Hangar, the licence Hangar itself, cookie
   banner, screenshot lightbox, hard-lock guard, auth modal and TOS gate.
   Rules are copied verbatim and in their original order; everything that
   styled the old landing (.ln-*, .lp-*, #landing-overlay ...) is gone.
   The landing page itself lives in landing/ (landing/css/landing.css).
   ========================================================================== */

/* ======== from landing.css ======== */
/* ==========================================================================
   EMAROX LANDING PAGE - PHASE 1 & 2
   Deep Space Logistics Command Theme
   ========================================================================== */

:root {
    --obsidian: #020617;
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --nav-bg: rgba(2, 6, 23, 0.8);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --warning-red: #ef4444;
    --warning-bg: rgba(239, 68, 68, 0.1);
    /* Emil Kowalski easing tokens (named from existing curves) */
    --lp-ease: cubic-bezier(0.4, 0, 0.2, 1);            /* standard */
    --lp-ease-out: cubic-bezier(0.16, 1, 0.3, 1);       /* strong ease-out */
    --lp-ease-back: cubic-bezier(0.175, 0.885, 0.32, 1.275); /* playful overshoot */
}

@media (max-width: 768px) {

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

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

}

/* 🔍 LIGHTBOX STYLING */
.showcase-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(15px);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: zoom-out;
}

.showcase-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.showcase-lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    border: 1px solid rgba(0, 219, 255, 0.3);
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

.showcase-lightbox.active img {
    transform: scale(1);
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.lightbox-close:hover {
    color: var(--cyan);
    transform: rotate(90deg);
}

/* 🍪 COOKIE BANNER STYLING */
.cookie-banner {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translate(-50%, 0);
    width: 90%;
    max-width: 800px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: bottom 0.6s var(--lp-ease-back), opacity 0.6s var(--lp-ease-back), visibility 0.6s var(--lp-ease-back);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
}

.cookie-banner.active {
    bottom: 30px;
    visibility: visible;
    opacity: 1;
}

.cookie-banner.hidden {
    bottom: -100px;
    opacity: 0;
    pointer-events: none;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.cookie-icon {
    font-size: 2rem;
    color: var(--cyan);
}

.cookie-text p {
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.5;
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 15px;
}

.cookie-btn {
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.cookie-btn.primary {
    background: var(--cyan);
    color: #000;
}

.cookie-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--cyan-glow);
}

.cookie-btn.secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

.cookie-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {

    .cookie-banner {
        flex-direction: column;
        text-align: center;
        width: 95%;
    }

    .cookie-content {
        flex-direction: column;
        margin-bottom: 20px;
    }

    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
}

/* 🔒 SECURITY HARD-LOCK (F12 BYPASS PREVENTION) */
body.system-hard-locked #sidebar,
body.system-hard-locked #map,
body.system-hard-locked #main-header,
body.system-hard-locked #emarox-tools-panel,
body.system-hard-locked #mission-bar,
body.system-hard-locked #feedback-widget,
body.system-hard-locked #map-context-menu,
body.system-hard-locked #map-trash-zone {
    display: none !important;
}

body.system-hard-locked {
    background: #020617 !important;
    overflow: hidden !important;
}

/* ==========================================================================
   🛰️ ACCOUNT HANGAR (GLASSMORPHISM 2.0)
   ========================================================================== */
.hangar-overlay {
    position: fixed;
    inset: 0;
    z-index: 210000;
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.4) 0%, #020617 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--lp-ease-out), visibility 0.6s var(--lp-ease-out), transform 0.6s var(--lp-ease-out);
}

.hangar-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.05);
}

.hangar-container {
    width: 95%;
    max-width: 1100px;
    padding: 20px;
}

.hangar-ui-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    padding: 60px;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.8),
        inset 0 0 80px rgba(255, 255, 255, 0.02);
    text-align: center;
    animation: hangarEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.hangar-header {
    margin-bottom: 50px;
}

.hangar-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 8px 16px;
    border-radius: 100px;
    color: var(--cyan);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hangar-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.hangar-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.hangar-identity-card {
    margin-bottom: 50px;
}

.user-id-strip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 24px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.hangar-paths {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.hangar-path-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    cursor: pointer;
    transition: background-color 0.4s var(--lp-ease-out), border-color 0.4s var(--lp-ease-out), transform 0.4s var(--lp-ease-out), box-shadow 0.4s var(--lp-ease-out);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.hangar-path-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.hangar-path-card.join-path:hover {
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}

.hangar-path-card.fleet-path:hover {
    box-shadow: 0 0 50px rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.4);
}

.path-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    transition: transform 0.3s ease;
}

.join-path .path-icon { color: #22c55e; }
.fleet-path .path-icon { color: #eab308; }

.hangar-path-card:hover .path-icon {
    transform: rotate(-5deg) scale(1.1);
}

.path-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.path-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.path-arrow {
    margin-left: auto;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, color 0.3s ease;
}

.hangar-path-card:hover .path-arrow {
    transform: translateX(5px);
    color: #fff;
}

/* Action Blocks (Sub-views) */
.hangar-action-block {
    animation: fadeIn 0.4s ease forwards;
}

.action-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#hangar-license-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#hangar-license-input:focus {
    border-color: var(--cyan);
}

.hangar-btn-primary {
    background: #22c55e;
    color: #020617;
    border: none;
    padding: 0 32px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hangar-btn-primary:hover {
    background: #4ade80;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
    transform: translateY(-2px);
}

.hangar-btn-back {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.hangar-btn-back:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.hangar-footer {
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
}

.hangar-logout-btn {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 12px 30px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hangar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}

.hangar-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-bottom: 20px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .hangar-ui-block {
        padding: 40px 24px;
        border-radius: 30px;
    }
    .hangar-title {
        font-size: 2.2rem;
    }
    .action-input-wrapper {
        flex-direction: column;
    }
    .hangar-btn-primary {
        padding: 16px;
        justify-content: center;
    }
}

/* ==========================================================================
   ✨ EMIL KOWALSKI POLISH — press feedback · reduced-motion · touch hover
   ========================================================================== */

/* Press feedback: instant tactile response on click (scale 0.97).
   Excludes elements that use transform for positioning (lightbox-nav, scroll-top). */

.cookie-btn:active,
.hangar-path-card:active,
.hangar-btn-primary:active,
.hangar-btn-back:active,
.hangar-logout-btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

/* Touch devices: drop lift/scale hovers so they don't stick after a tap. */
@media (hover: none) {

    .cookie-btn.primary:hover,
    .hangar-path-card:hover {
        transform: none;
    }
}

/* Respect reduced-motion: keep content visible, strip movement. */
@media (prefers-reduced-motion: reduce) {

    .hangar-overlay *,
    .cookie-banner,
    .showcase-lightbox * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

}

/* ======== from landing-v2.css ======== */
/* ==========================================================================
   AUTH MODAL — the landing's look (landing/css/landing.css): neutral black
   surfaces, deep-cyan accent, Plus Jakarta headings, the metal pill button.
   Visual only: markup, forms and the login/register flip are untouched.
   Follows the landing's theme (html[data-theme]).
   ========================================================================== */
#auth-modal {
    --am-bg: #0a0a0b;
    --am-surface: #141417;
    --am-line: rgba(255, 255, 255, .08);
    --am-line-2: rgba(255, 255, 255, .14);
    --am-text: #f4f3f0;
    --am-text-2: #a3a3a7;
    --am-text-3: #8a8a90;
    --am-accent: #3cbfda;
    --am-accent-base: #1fa4c2;
    --am-accent-ink: #02151b;
    --am-tint: rgba(31, 164, 194, .08);
    --am-tint-2: rgba(31, 164, 194, .14);
    --am-btn-fill: linear-gradient(180deg, #63d4e7 0%, #27abc8 55%, #1689a7 100%);
    --am-btn-shine: rgba(225, 250, 255, .55);
    --am-btn-shadow: rgba(31, 164, 194, .5);
    --am-shadow: 0 30px 80px rgba(0, 0, 0, .55);
    --am-backdrop: rgba(5, 5, 6, .72);
    --am-ease: cubic-bezier(.22, 1, .36, 1);
    --am-head: 'EMX Jakarta', 'Plus Jakarta Sans', system-ui, sans-serif;
    --am-body: 'EMX Inter', 'Inter', system-ui, 'Segoe UI', Arial, sans-serif;
}
:root[data-theme="light"] #auth-modal {
    --am-bg: #f5f5f3;
    --am-surface: #ffffff;
    --am-line: rgba(12, 12, 14, .09);
    --am-line-2: rgba(12, 12, 14, .17);
    --am-text: #0e0e10;
    --am-text-2: #55555a;
    --am-text-3: #68686d;
    --am-accent: #0a6479;
    --am-accent-base: #13849f;
    --am-tint: rgba(19, 132, 159, .08);
    --am-tint-2: rgba(19, 132, 159, .15);
    --am-btn-fill: linear-gradient(180deg, #3fc2dc 0%, #1c9bb9 55%, #11809c 100%);
    --am-btn-shine: rgba(225, 250, 255, .6);
    --am-btn-shadow: rgba(19, 132, 159, .45);
    --am-shadow: 0 30px 70px rgba(20, 20, 24, .14), 0 4px 14px rgba(20, 20, 24, .06);
    --am-backdrop: rgba(20, 20, 24, .32);
}
#auth-modal.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--am-backdrop);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    font-family: var(--am-body);
    -webkit-font-smoothing: antialiased;
}
#auth-modal.modal-overlay.active { display: flex; }
#auth-modal .auth-card-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: auto !important;
    overflow: visible !important;
    /* Parent must not flex-shrink the 3D container below its set height. */
    display: block !important;
    height: auto !important;
    max-height: none !important;
}
/* the × is drawn from two lines: the &times; glyph sits off-centre in the circle */
#auth-modal .close-btn {
    width: 32px; height: 32px; box-sizing: border-box;
    background: transparent;
    border: 1px solid var(--am-line);
    border-radius: 50%;
    color: var(--am-text-2);
    font-size: 0; cursor: pointer;
    right: 18px !important; top: 18px !important;
    transition: background-color .2s, border-color .2s, color .2s;
}
#auth-modal .close-btn::before,
#auth-modal .close-btn::after {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: 12px; height: 1.5px; border-radius: 1px; background: currentColor;
}
#auth-modal .close-btn::before { transform: translate(-50%, -50%) rotate(45deg); }
#auth-modal .close-btn::after { transform: translate(-50%, -50%) rotate(-45deg); }
#auth-modal .close-btn:hover { background: var(--am-tint-2); border-color: var(--am-line-2); color: var(--am-accent); }
#auth-modal #auth-modal-content.auth-3d-container {
    perspective: 2200px;
    width: min(420px, 92vw);
    height: 500px !important;
    flex-shrink: 0 !important;
    margin: auto;
    position: relative;
    transition: height .55s var(--am-ease);
}
#auth-modal.active #auth-modal-content.auth-3d-container { animation: amIn .5s var(--am-ease); }
@keyframes amIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
#auth-modal #auth-modal-content.auth-3d-container.mode-register { height: 750px !important; }
#auth-modal .auth-card-wrapper {
    width: 100% !important; height: 100%;
    position: absolute; inset: 0;
    transform-style: preserve-3d;
    transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}
#auth-modal .auth-card-wrapper.flipped { transform: rotateY(180deg); }
#auth-modal .auth-card-face {
    position: absolute; inset: 0; width: 100%; height: 100%;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    background: radial-gradient(ellipse 80% 55% at 0% 0%, var(--am-tint), transparent 60%), var(--am-surface);
    border: 1px solid var(--am-line-2);
    border-radius: 24px;
    padding: 34px 34px 30px;
    box-shadow: var(--am-shadow);
    display: flex; flex-direction: column; justify-content: center;
    text-align: left;
    overflow: hidden;
    color: var(--am-text);
}
#auth-modal .auth-card-face.card-back { transform: rotateY(180deg); }
#auth-modal .auth-header-visual { margin-bottom: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
#auth-modal .auth-header-visual::before {
    content: 'Emarox Map';
    font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--am-accent); margin-bottom: 12px;
}
#auth-modal .auth-header-visual h3 {
    margin: 0; font-family: var(--am-head); font-size: 1.9rem; font-weight: 700; line-height: 1.1;
    letter-spacing: -.035em; color: var(--am-text); text-transform: none !important;
}
#auth-modal .auth-header-visual h3::after { content: '.'; color: var(--am-accent-base); }
#auth-modal .auth-header-visual .auth-sub {
    margin: 10px 0 0; font-size: .98rem; font-weight: 400; line-height: 1.5;
    color: var(--am-text-2); letter-spacing: 0; text-transform: none;
}
#auth-modal .control-group { margin-bottom: 16px; }
#auth-modal .label-title {
    display: block; font-size: .72rem; font-weight: 600;
    color: var(--am-text-3); margin-bottom: 8px; letter-spacing: .14em;
    text-transform: uppercase;
}
#auth-modal .auth-input, #auth-modal .glass-input {
    width: 100%; font-family: var(--am-body);
    background: var(--am-bg) !important;
    border: 1px solid var(--am-line-2) !important;
    border-radius: 14px !important; padding: 14px 16px !important;
    font-size: 15px !important; font-weight: 400 !important; color: var(--am-text) !important; outline: none;
    transition: border-color .2s ease, box-shadow .2s ease !important;
}
#auth-modal .auth-input::placeholder { color: var(--am-text-3); opacity: .8; }
#auth-modal .auth-input:focus, #auth-modal .glass-input:focus {
    border-color: var(--am-accent-base) !important;
    box-shadow: 0 0 0 3px var(--am-tint-2) !important;
    transform: none !important;
}
#auth-modal .input-wrapper { position: relative; }
#auth-modal .input-wrapper .auth-input { padding-right: 44px !important; }
#auth-modal .eye-toggle {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    color: var(--am-text-3); cursor: pointer; transition: color .2s ease;
}
#auth-modal .eye-toggle:hover { color: var(--am-accent); }
#auth-modal .forgot-link-container { text-align: right; margin-top: 10px; }
#auth-modal .forgot-link { font-size: .78rem; font-weight: 600; letter-spacing: .06em; color: var(--am-text-2); cursor: pointer; transition: color .2s; }
#auth-modal .forgot-link:hover { color: var(--am-accent); }
/* the licence key: a divider above it that follows the theme, a readable hint */
#auth-modal .control-group:has(#register-license) { border-top-color: var(--am-line) !important; }
#auth-modal #register-license + small { font-size: .78rem !important; line-height: 1.45; color: var(--am-text-3) !important; margin-top: 8px !important; }
/* the landing's metal pill button, with its one sheen on hover */
#auth-modal .fx-btn.primary-btn.full-width {
    position: relative; isolation: isolate; overflow: hidden;
    width: 100%; font-family: var(--am-body); margin-top: 18px !important;
    min-height: 52px; padding: 0 26px !important; border-radius: 999px !important;
    background: var(--am-btn-fill) !important; border: none !important; color: var(--am-accent-ink) !important;
    font-weight: 600 !important; font-size: .97rem !important; letter-spacing: -.005em !important;
    text-transform: none !important; cursor: pointer;
    box-shadow: inset 0 1px 0 var(--am-btn-shine), inset 0 -1px 0 rgba(0, 40, 55, .35), 0 10px 30px -12px var(--am-btn-shadow) !important;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    transition: transform .4s var(--am-ease), box-shadow .4s var(--am-ease) !important;
}
#auth-modal .fx-btn.primary-btn.full-width::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(105deg, transparent 30%, rgba(235, 252, 255, .55) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .9s var(--am-ease);
}
#auth-modal .fx-btn.primary-btn.full-width:hover {
    color: var(--am-accent-ink) !important; transform: translateY(-2px);
    box-shadow: inset 0 1px 0 var(--am-btn-shine), inset 0 -1px 0 rgba(0, 40, 55, .35), 0 16px 36px -14px var(--am-btn-shadow) !important;
}
#auth-modal .fx-btn.primary-btn.full-width:hover::after { transform: translateX(120%); }
#auth-modal .fx-btn.primary-btn.full-width:active { transform: scale(.98); }
#auth-modal .fx-btn.primary-btn.full-width i { color: var(--am-accent-ink) !important; }
#auth-modal .auth-switch-trigger {
    margin-top: 20px; text-align: center; font-size: .95rem;
    color: var(--am-accent); font-weight: 600; cursor: pointer;
}
#auth-modal .auth-switch-trigger:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    #auth-modal.active #auth-modal-content.auth-3d-container { animation: none; }
}

/* ==========================================================================
   COOKIE BANNER restyle (React floating pill) — keeps #cookie-banner logic
   ========================================================================== */
/* Visual-only restyle — show/hide (bottom/visibility/opacity via .active/.hidden)
   stays owned by landing.css so the banner reliably appears on entry. */
#cookie-banner.cookie-banner {
    width: calc(100% - 32px); max-width: 640px;
    padding: 18px 22px; border-radius: 16px;
    background: rgba(10, 17, 32, 0.9);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    z-index: 20001;
}
/* Deterministic show state (beats the duplicate .cookie-banner rules in style.css
   + landing.css). Excludes .hidden so dismissing still works. */
#cookie-banner.cookie-banner.active:not(.hidden) {
    bottom: 30px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(-50%) !important;
}
/* The landing's look (same tokens as #auth-modal and the onboarding):
   neutral black card, Jakarta title, metal pill for Accept. Both choices
   are the same size — declining must be as easy as accepting. */
#cookie-banner {
    --cb-surface: #141417;
    --cb-line: rgba(255, 255, 255, .14);
    --cb-text: #f4f3f0;
    --cb-text-2: #a3a3a7;
    --cb-accent: #3cbfda;
    --cb-accent-base: #1fa4c2;
    --cb-ghost: rgba(255, 255, 255, .04);
    --cb-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
:root[data-theme="light"] #cookie-banner {
    --cb-surface: #ffffff;
    --cb-line: rgba(12, 12, 14, .12);
    --cb-text: #0e0e10;
    --cb-text-2: #55555a;
    --cb-accent: #0a6479;
    --cb-accent-base: #13849f;
    --cb-ghost: rgba(12, 12, 14, .03);
    --cb-shadow: 0 24px 60px rgba(12, 12, 14, .14);
}
#cookie-banner.cookie-banner {
    max-width: 720px; padding: 18px 18px 18px 24px; border-radius: 20px;
    background: radial-gradient(ellipse 70% 90% at 0% 0%, rgba(31, 164, 194, .09), transparent 60%), var(--cb-surface);
    border: 1px solid var(--cb-line);
    box-shadow: var(--cb-shadow);
    font-family: 'EMX Inter', 'Inter', system-ui, sans-serif;
}
#cookie-banner .cookie-content { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; justify-content: space-between; margin: 0; }
#cookie-banner .cookie-text { flex: 1 1 300px; text-align: left; }
#cookie-banner .cookie-title {
    margin: 0 0 4px; font-family: 'EMX Jakarta', 'Plus Jakarta Sans', system-ui, sans-serif;
    font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: var(--cb-text);
}
#cookie-banner .cookie-title::after { content: '.'; color: var(--cb-accent-base); }
#cookie-banner .cookie-text p:not(.cookie-title) { margin: 0; font-size: 13px; line-height: 1.55; color: var(--cb-text-2); }
#cookie-banner .cookie-text a { color: var(--cb-accent); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
#cookie-banner .cookie-actions { display: flex; gap: 8px; flex-shrink: 0; width: auto; }
#cookie-banner .cookie-btn {
    position: relative; overflow: hidden; isolation: isolate;
    min-width: 132px; padding: 12px 20px; border-radius: 999px; cursor: pointer;
    font: 600 13px/1 'EMX Inter', 'Inter', system-ui, sans-serif; letter-spacing: -.005em; text-transform: none;
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), border-color .2s, color .2s, box-shadow .3s;
}
#cookie-banner .cookie-btn.secondary { background: var(--cb-ghost); color: var(--cb-text); border: 1px solid var(--cb-line); }
#cookie-banner .cookie-btn.secondary:hover { border-color: var(--cb-accent-base); color: var(--cb-accent); background: var(--cb-ghost); }
#cookie-banner .cookie-btn.primary {
    border: 0; color: #02151b;
    background: linear-gradient(180deg, #63d4e7 0%, #27abc8 55%, #1689a7 100%);
    box-shadow: inset 0 1px 0 rgba(225, 250, 255, .55), inset 0 -1px 0 rgba(0, 40, 55, .35), 0 8px 22px -10px rgba(31, 164, 194, .5);
}
#cookie-banner .cookie-btn.primary::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(105deg, transparent 30%, rgba(235, 252, 255, .55) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .9s cubic-bezier(.22, 1, .36, 1);
}
#cookie-banner .cookie-btn.primary:hover { transform: translateY(-1px); }
#cookie-banner .cookie-btn.primary:hover::after { transform: translateX(120%); }
#cookie-banner .cookie-btn:focus-visible { outline: 2px solid var(--cb-accent); outline-offset: 2px; }
/* below 768px the older rule stacks the content in a column, where the text's
   300px flex-basis would turn into a 300px height */
@media (max-width: 768px) {
    #cookie-banner.cookie-banner { padding: 18px; }
    #cookie-banner .cookie-content { flex-direction: column; align-items: stretch; }
    #cookie-banner .cookie-text { flex: none; }
    #cookie-banner .cookie-actions { width: 100%; }
    #cookie-banner .cookie-btn { flex: 1 1 0; min-width: 0; }
}

/* ==========================================================================
   TOS OVERLAY restyle (React TermsModal look) — keeps #tos-overlay logic
   ========================================================================== */
#tos-overlay.tos-overlay {
    position: fixed; inset: 0; z-index: 10010;
    /* NO display here — the head <style>.tos-overlay{display:none} keeps it hidden
       until the app shows it via inline style.display='flex'. Avoids reload flash. */
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(3, 7, 15, 0.7);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
#tos-overlay.tos-overlay.hidden { display: none !important; }
#tos-overlay .tos-modal {
    width: 100%; max-width: 560px; max-height: 88vh;
    display: flex; flex-direction: column;
    padding: 0 !important; gap: 0 !important;   /* sections own their spacing (React) */
    border-radius: 20px; background: #0a1120;
    border: 1px solid rgba(34, 211, 238, 0.18);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}
#tos-overlay .tos-header {
    padding: 22px 26px; border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
#tos-overlay .tos-header-title { font-size: 17px; font-weight: 700; color: #f8fafc; }
#tos-overlay .tos-close-btn {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04);
    color: rgba(248, 250, 252, 0.6); font-size: 16px; line-height: 1;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.2s ease;
}
#tos-overlay .tos-close-btn:hover { background: rgba(255, 255, 255, 0.08); }
#tos-overlay .tos-content-wrapper { padding: 22px 26px; overflow-y: auto; }
#tos-overlay .tos-content-box p { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: rgba(248, 250, 252, 0.75); }
#tos-overlay .tos-content-box strong { color: var(--ln-cyan-bright, #22d3ee); font-size: 12px; letter-spacing: 0.08em; }
#tos-overlay .tos-content-box ul { margin: 0 0 18px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
#tos-overlay .tos-content-box ul li { display: flex; gap: 10px; font-size: 13px; line-height: 1.5; color: rgba(248, 250, 252, 0.7); }
#tos-overlay .tos-content-box ul li::before { content: ""; flex-shrink: 0; margin-top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--ln-cyan-bright, #22d3ee); }
#tos-overlay .tos-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 20px; }
#tos-overlay .tos-links a { color: var(--ln-cyan-bright, #22d3ee); font-size: 13px; text-decoration: none; font-weight: 600; }
#tos-overlay .tos-compliance { display: flex; flex-direction: column; gap: 10px; }
#tos-overlay .tos-checkbox-label {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer; transition: all 0.2s ease;
}
#tos-overlay .tos-checkbox-label:has(input:checked) { background: rgba(34, 211, 238, 0.07); border-color: rgba(34, 211, 238, 0.3); }
#tos-overlay .tos-checkbox-label input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--ln-cyan-bright, #22d3ee); flex-shrink: 0; cursor: pointer; }
#tos-overlay .tos-checkbox-label span { font-size: 13px; line-height: 1.5; color: rgba(248, 250, 252, 0.8); }
#tos-overlay .tos-footer {
    padding: 18px 26px; border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex; flex-direction: row !important; gap: 12px;
    justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 0 !important;
}
#tos-overlay .tos-btn-accept, #tos-overlay .tos-btn-decline {
    text-transform: none; letter-spacing: normal; box-shadow: none; width: auto; flex: 0 0 auto;
}
#tos-overlay .tos-btn-accept {
    padding: 12px 24px; border-radius: 100px; border: none;
    background: var(--ln-cyan-bright, #22d3ee); color: #060b16;
    font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s ease;
}
#tos-overlay .tos-btn-accept:disabled { background: rgba(34, 211, 238, 0.2); color: rgba(248, 250, 252, 0.4); cursor: not-allowed; }
#tos-overlay .tos-btn-decline {
    padding: 12px 22px; border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04);
    color: rgba(248, 250, 252, 0.7); font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s ease;
}
