/* Just Climb v2 — modern dark theme aligned with Flutter app
 * Palette: navy #2D3566 base, coral #E7866A primary, lavender #AC9FFF accent.
 * Fonts: League Spartan (display) + Inter (body).
 */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--primary); color: #000; }

/* ---------- Tokens ---------- */
:root {
    --bg: #1a1f3a;
    --bg-elev: #2D3566;
    --bg-elev-2: #3D4576;
    --primary: #E7866A;
    --primary-dark: #cb6b4b;
    --primary-glow: rgba(231, 134, 106, 0.4);
    --secondary: #AC9FFF;
    --secondary-dark: #8d7ee0;
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.7);
    --text-faint: rgba(255, 255, 255, 0.5);
    --border: rgba(172, 159, 255, 0.15);
    --border-strong: rgba(172, 159, 255, 0.35);
    --error: #CF6679;
    --success: #5DD39E;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 8px 32px var(--primary-glow);

    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    --container: min(1200px, calc(100% - 48px));
    --section-pad: clamp(64px, 10vw, 120px);
    --font-display: 'League Spartan', 'Inter', sans-serif;
}

/* ---------- Layout ---------- */
.container { width: var(--container); margin: 0 auto; }
section { padding-block: var(--section-pad); position: relative; }
.section-narrow { padding-block: clamp(48px, 7vw, 80px); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Backgrounds ---------- */
.bg-glow {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(231,134,106,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 90% 70%, rgba(172,159,255,0.10) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 10% 100%, rgba(231,134,106,0.08) 0%, transparent 50%);
}
.bg-grid {
    position: absolute; inset: 0; opacity: 0.4; pointer-events: none;
    background-image:
        linear-gradient(rgba(172,159,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(172,159,255,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black, transparent);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
.eyebrow {
    display: inline-block;
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--secondary);
    padding: 6px 14px; border-radius: var(--radius-pill);
    background: rgba(172,159,255,0.1);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.lead { font-size: clamp(1rem, 1.5vw, 1.25rem); color: var(--text-dim); max-width: 60ch; }

/* ---------- Navbar ---------- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 16px 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: padding var(--transition), background var(--transition), backdrop-filter var(--transition);
}
.navbar.scrolled {
    padding: 10px 0;
    background: rgba(26, 31, 58, 0.8);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    width: var(--container); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { width: 36px; height: 36px; border-radius: 9px; box-shadow: var(--shadow-glow); }
.nav-logo .brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.nav-links {
    display: flex; align-items: center; gap: 8px;
    list-style: none;
}
.nav-link {
    padding: 8px 14px; border-radius: var(--radius-pill);
    color: var(--text-dim); font-size: 0.9rem; font-weight: 500;
    transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Burger */
.burger {
    display: none;
    width: 40px; height: 40px;
    flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    border-radius: var(--radius-md);
    transition: background var(--transition);
}
.burger:hover { background: rgba(255,255,255,0.05); }
.burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Lang switcher */
.lang-switch {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 10px; border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    font-size: 0.8rem; font-weight: 600;
    transition: background var(--transition);
}
.lang-switch:hover { background: rgba(255,255,255,0.1); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.95rem;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}
.btn-primary {
    background: var(--primary); color: #1a1f3a;
    box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px var(--primary-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
    background: transparent; color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: var(--secondary); }
.btn-ghost { background: transparent; color: var(--text-dim); padding: 10px 16px; }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.btn-lg { padding: 18px 32px; font-size: 1rem; }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }

/* Store badges */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badges a {
    display: inline-block;
    transition: transform var(--transition);
}
.store-badges a:hover { transform: translateY(-3px); }
.store-badges img { height: 50px; width: auto; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 80px;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    gap: 64px;
    grid-template-columns: 1fr;
    align-items: center;
}
@media (min-width: 960px) {
    .hero-grid { grid-template-columns: 1.3fr 1fr; }
    /* Na desktopie nie wymuszaj pełnego 100vh — to zostawiało dużo pustej
       przestrzeni nad i pod treścią (hero był centrowany w kadrze). Zamiast
       tego treść siada tuż pod navbarem, a rozpiska statystyk wjeżdża od razu
       pod hero, wypełniając kadr. (Mobile bez zmian — tam layout jest OK.) */
    .hero { min-height: auto; padding-top: 116px; padding-bottom: 40px; }
    .hero + .section-narrow { padding-top: 0; }
}
.hero h1 .underline {
    background: linear-gradient(180deg, transparent 60%, var(--primary-glow) 60%);
    padding: 0 4px;
}
.hero p.lead { margin-top: 24px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero .badge-row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 32px; align-items: center; }
.rating {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-dim); font-size: 0.9rem;
}
.rating .stars { color: var(--primary); letter-spacing: 2px; font-size: 1.1rem; }

/* Phone mockup */
.hero-phone { text-align: center; }
.eyebrow-phone { margin-bottom: 24px; }
/* Ramka w stylu Samsung Galaxy S25 Ultra: kanciaste rogi, wąskie równe
   ramki, a zamiast szerokiego wcięcia (notch) tylko mały, centralny
   punch-hole aparatu — bez brzydkiej „luki" na górze. */
.phone-frame {
    position: relative;
    margin: 0 auto;
    width: min(280px, 80vw);
    aspect-ratio: 280 / 600;
    border-radius: 30px;
    background: linear-gradient(145deg, #1a1f3a, #0a0d1c);
    padding: 8px;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.5),
        0 0 0 2px rgba(172,159,255,0.2),
        inset 0 0 0 3px #0a0d1c;
}
.phone-frame::before {
    /* punch-hole aparatu (mała kropka na środku u góry ekranu) */
    content: ""; position: absolute;
    top: 18px; left: 50%; transform: translateX(-50%);
    width: 9px; height: 9px;
    background: #04050c;
    border-radius: 50%;
    box-shadow: 0 0 0 1.5px rgba(255,255,255,0.05);
    z-index: 3;
}
.phone-screen {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: #2D3566;
}
.phone-screen img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0; transition: opacity 600ms ease;
}
.phone-screen img.active { opacity: 1; }
.phone-dots {
    display: flex; justify-content: center; gap: 8px;
    margin-top: 24px;
}
.phone-dots button {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(172,159,255,0.3);
    transition: width var(--transition), background var(--transition);
}
.phone-dots button.active { width: 24px; background: var(--primary); border-radius: 4px; }

/* ---------- Stats strip ---------- */
.stats {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    padding: 32px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(231,134,106,0.08), rgba(172,159,255,0.08));
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.stat { text-align: center; }
.stat-num {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem); font-weight: 700;
    color: var(--primary);
    line-height: 1;
}
.stat-label { color: var(--text-dim); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 8px; }

/* ---------- Feature grid ---------- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .lead { margin: 16px auto 0; }

.feature-grid {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature-card {
    padding: 28px;
    background: rgba(45, 53, 102, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    background: rgba(45, 53, 102, 0.6);
}
.feature-icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(231,134,106,0.2), rgba(172,159,255,0.2));
    color: var(--primary);
    margin-bottom: 16px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h4 { margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Contact cards ---------- */
/* Cała karta jest linkiem mailto — stąd reset dekoracji i koloru tekstu,
   reszta wyglądu dziedziczy się z .feature-card. */
.contact-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.contact-card h4 { color: var(--text); }
.contact-card .contact-action {
    margin-top: auto;
    padding-top: 16px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.contact-card .contact-action svg {
    width: 15px; height: 15px;
    transition: transform var(--transition);
}
.contact-card:hover .contact-action svg { transform: translateX(3px); }
.contact-note {
    margin-top: 32px;
    padding: 22px 26px;
    background: rgba(45, 53, 102, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 18px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.95rem;
}
.contact-note a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.contact-note a:hover { text-decoration: underline; }

/* ---------- Split section (For Gyms) ---------- */
.split {
    display: grid; gap: 56px;
    grid-template-columns: 1fr;
    align-items: center;
}
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.split-visual {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #2D3566, #3D4576);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.split-visual img { width: 100%; height: 100%; object-fit: cover; }
.split-visual::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(231,134,106,0.15) 100%);
    pointer-events: none;
}

/* Variant when split-visual hosts a phone-frame carousel instead of a flat image. */
.split-visual.split-visual-phone {
    aspect-ratio: auto;
    background: none;
    border: none;
    box-shadow: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}
.split-visual.split-visual-phone::after { content: none; }

.bullet-list { list-style: none; padding: 0; margin-top: 24px; display: grid; gap: 16px; }
.bullet-list li { display: flex; gap: 14px; align-items: flex-start; }
.bullet-list .check {
    flex: 0 0 28px; height: 28px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(93, 211, 158, 0.15);
    color: var(--success);
}
.bullet-list strong { display: block; margin-bottom: 2px; }
.bullet-list span { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 12px; max-width: 800px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(45, 53, 102, 0.4);
    overflow: hidden;
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 24px;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    font-weight: 600;
    transition: background var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: rgba(255,255,255,0.03); }
.faq-item summary::after {
    content: "+";
    font-size: 1.5rem; line-height: 1;
    color: var(--secondary);
    transition: transform var(--transition);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 24px 20px; color: var(--text-dim); }

/* ---------- Newsletter ---------- */
.newsletter-card {
    padding: clamp(32px, 5vw, 56px);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(231,134,106,0.15), rgba(172,159,255,0.10)),
        rgba(45, 53, 102, 0.7);
    border: 1px solid var(--border-strong);
    text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.newsletter-form {
    display: flex; flex-wrap: wrap; gap: 10px;
    max-width: 480px; margin: 24px auto 0;
}
.newsletter-form input[type="email"] {
    flex: 1 1 240px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: rgba(0,0,0,0.25);
    color: var(--text);
    font-family: inherit; font-size: 0.95rem;
    transition: border-color var(--transition);
}
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--primary); }
.newsletter-form input[type="email"]::placeholder { color: var(--text-faint); }
.newsletter-form .honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.newsletter-msg { margin-top: 14px; font-size: 0.9rem; min-height: 1.2em; }
.newsletter-msg.success { color: var(--success); }
.newsletter-msg.error { color: var(--error); }

/* ---------- CTA banner ---------- */
.cta-banner {
    text-align: center;
    padding: clamp(48px, 7vw, 96px) clamp(24px, 5vw, 64px);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(231,134,106,0.20), rgba(172,159,255,0.15));
    border: 1px solid var(--border-strong);
    overflow: hidden;
    position: relative;
}
.cta-banner::before {
    content: ""; position: absolute;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    top: -200px; right: -200px; pointer-events: none;
    filter: blur(40px);
}
.cta-banner h2 { position: relative; }
.cta-banner .store-badges { justify-content: center; margin-top: 24px; position: relative; }

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
    margin-top: 80px;
    background: rgba(0,0,0,0.2);
}
.footer-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 2fr repeat(3, 1fr);
}
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; max-width: 32ch; margin-top: 12px; }
.footer-brand .nav-logo { margin-bottom: 4px; }
.footer h5 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer ul a {
    color: var(--text-dim); font-size: 0.9rem;
    transition: color var(--transition);
}
.footer ul a:hover { color: var(--text); }
.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    color: var(--text-faint); font-size: 0.85rem;
}
.social-row { display: flex; gap: 10px; }
.social-row a {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    transition: background var(--transition), color var(--transition);
}
.social-row a:hover { background: var(--primary); color: #1a1f3a; }
.social-row svg { width: 16px; height: 16px; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed; bottom: 16px; left: 16px; right: 16px;
    z-index: 200;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    background: rgba(26, 31, 58, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
    max-width: 720px; margin: 0 auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(120%);
    transition: transform 400ms cubic-bezier(0.4,0,0.2,1);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { font-size: 0.85rem; color: var(--text-dim); margin: 0; flex: 1 1 280px; }
.cookie-banner .cookie-actions { display: flex; gap: 8px; }

/* ---------- Mobile nav (burger kicks in below 880px) ---------- */
@media (max-width: 880px) {
    .burger { display: flex; }
    /* .nav-actions is pinned right in the later @880 block (after the base
       ".nav-actions{margin-left:0}" rule), so it actually wins the cascade. */
    .nav-links {
        position: fixed;
        top: 64px; left: 16px; right: 16px;
        flex-direction: column;
        gap: 4px;
        padding: 16px;
        border-radius: var(--radius-lg);
        background: rgba(26, 31, 58, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--border);
        opacity: 0; pointer-events: none;
        transform: translateY(-12px);
        transition: opacity var(--transition), transform var(--transition);
    }
    .nav-links.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
    .nav-link { padding: 12px 14px; }
}

/* Auth nav helpers: a Sign-in button on desktop, a Sign-in menu item on mobile. */
/* Download CTA: the pill button on wide desktop (>=1081), the plain link inside
   the burger on phones (<880); nothing in the tightened tablet bar in between. */
@media (max-width: 1080px) { .hide-mobile { display: none !important; } }
@media (min-width: 881px) { .show-mobile { display: none !important; } }

/* Plain text link row for footers (NOT the circular .social-row icon buttons). */
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.footer-links a { color: var(--text-dim); font-size: 0.88rem; text-decoration: none; transition: color var(--transition); white-space: nowrap; }
.footer-links a:hover { color: var(--text); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Mini-page (deeplink, league, invitation) ---------- */
.mini-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 48px 24px;
}
.mini-card {
    width: 100%; max-width: 460px;
    text-align: center;
    padding: 48px 32px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(45,53,102,0.6), rgba(45,53,102,0.4));
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}
.mini-card .logo {
    width: 88px; height: 88px;
    border-radius: 22px;
    box-shadow: var(--shadow-glow);
    margin: 0 auto 24px;
}
.mini-card .preview-image {
    width: 100%; max-height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.mini-card h1 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 8px;
}
.mini-card .subtitle { color: var(--text-dim); margin-bottom: 28px; line-height: 1.5; }
.entity-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.entity-detail { font-size: 0.9rem; color: var(--text-faint); margin-bottom: 4px; }

.spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status { font-size: 0.85rem; color: var(--text-faint); }
.divider {
    width: 40px; height: 2px;
    background: rgba(255,255,255,0.1);
    margin: 24px auto;
    border-radius: 1px;
}
.cta-text { font-size: 0.85rem; color: var(--text-faint); }

/* Hide outline on mouse, keep on keyboard */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Competition sign-up (competition-reg.js) ---------- */
.reg-signin { text-align: center; padding: 10px 0 4px; }
.reg-signin-ico {
    width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px;
    display: grid; place-items: center;
    background: rgba(231,134,106,.14); border: 1px solid rgba(231,134,106,.3);
    color: var(--primary);
}
.reg-signin-ico svg { width: 22px; height: 22px; }
.reg-signin h3 { margin-bottom: 10px; font-size: 1.25rem; }
.reg-signin > p { color: var(--text-dim); font-size: 0.93rem; line-height: 1.6; margin: 0 auto 22px; max-width: 48ch; }
.reg-signin .btn { width: 100%; }
/* The headline action, with its own explanatory line right underneath. */
.reg-signin-main { margin-bottom: 8px; }
.reg-signin-sub { display: block; color: var(--text-faint); font-size: 0.83rem; }
.reg-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--text-faint); font-size: 0.82rem; }
.reg-or::before, .reg-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
/* Providers side by side on a desktop, stacked with real gaps on a phone. */
/* Fits as many providers per row as the box allows — three side by side on a
   wide card, stacked on a narrow one, with real gaps either way. */
.reg-idps { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.reg-idp { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.reg-idp svg { flex: none; }
@media (max-width: 420px) {
    .reg-idps { grid-template-columns: 1fr; }
}
.reg-signin > p.reg-signin-note {
    /* Exactly the sub-line under the main button: same size, weight, colour. */
    color: var(--text-faint); font-size: 0.83rem; line-height: 1.5;
    margin: 12px auto 0; max-width: 46ch;
}

.reg-wrap { display: flex; flex-direction: column; gap: 18px; }
.reg-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; background: rgba(45,53,102,0.28); }
.reg-cardhead { display: flex; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 14px; }
.reg-del { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.06); color: var(--text-dim); font-size: 20px; line-height: 1; }
.reg-del:hover { background: rgba(207,102,121,0.2); color: #fff; }
/* Two fixed columns rather than auto-fit: with auto-fit the number of columns
   changed with the card's width, so fields paired up differently on every
   screen and the phone row could end up in a 160px sliver. */
.reg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: start; }
@media (max-width: 560px) { .reg-grid { grid-template-columns: 1fr; } }
.reg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.reg-field-wide { grid-column: 1 / -1; }
/* Organiser's own fields hang below the grid, not inside it — they need the
   spacing the grid gap would otherwise have given them. */
.reg-card > .reg-field-wide { margin-top: 12px; }
.reg-field label { font-size: 0.8rem; color: var(--text-dim); font-weight: 600; }
.reg-field input, .reg-field select {
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text);
    padding: 11px 12px; font: inherit; font-size: 0.95rem; width: 100%;
}
.reg-field input:focus, .reg-field select:focus { outline: none; border-color: var(--primary); }
.reg-hint { font-size: 0.78rem; color: var(--text-faint); }
.reg-hint.err { color: var(--error); }
.reg-hint.warn { color: #E7B96A; }

.reg-seg { display: flex; gap: 8px; }
.reg-segbtn { flex: 1; padding: 11px 8px; border-radius: var(--radius-md);
    border: 1px solid var(--border); background: var(--bg-elev);
    color: var(--text-dim); font-weight: 600; font-size: 0.9rem; }
.reg-segbtn.on { border-color: var(--primary); background: rgba(231,134,106,0.16); color: var(--text); }

.reg-addrow { display: flex; flex-wrap: wrap; gap: 10px; }
/* Adding people is the step everyone looks for next, so these read as real
   buttons rather than hairlines. */
.reg-addbtn { border-width: 2px; }
/* Signing yourself up is the primary of the two — same edge as the confirm
   button at the bottom of the form. */
.reg-addbtn-self { border-color: var(--primary); color: var(--text); }
.reg-addbtn-self:hover { border-color: var(--primary); background: rgba(231,134,106,0.12); }
.reg-secttl { font-weight: 700; font-size: 0.9rem; margin: 16px 0 10px; }
.reg-addons { margin-top: 4px; }
.reg-addon { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.reg-addon.off { opacity: 0.5; }
.reg-addon img, .reg-addon-noimg { width: 52px; height: 52px; border-radius: var(--radius-md); object-fit: contain; flex: none; background: var(--bg-elev); padding: 3px; }
.reg-addon-main { flex: 1; min-width: 0; }
.reg-addon-name { font-weight: 600; font-size: 0.95rem; }
.reg-addon-desc { color: var(--text-dim); font-size: 0.85rem; margin-top: 2px; }
.reg-addon-price { color: var(--primary); font-weight: 700; font-size: 0.9rem; margin-top: 3px; }
.reg-chip { display: inline-block; margin-top: 5px; margin-right: 6px; padding: 2px 9px; border-radius: var(--radius-pill);
    background: rgba(172,159,255,0.14); color: var(--secondary); font-size: 0.74rem; font-weight: 600; }
.reg-chip.warn { background: rgba(231,185,106,0.16); color: #E7B96A; }
.reg-chip.off { background: rgba(207,102,121,0.16); color: var(--error); }

.reg-line, .reg-subtotal, .reg-total { display: flex; justify-content: space-between; gap: 12px; }
.reg-line { padding: 10px 0; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.92rem; }
.reg-cartline { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--border); }
.reg-cartline > div:first-child { flex: 1; min-width: 0; }
.reg-cartname { font-size: 0.92rem; font-weight: 600; }
.reg-cartopt { color: var(--text-dim); font-size: 0.82rem; }
.reg-cartsum { font-weight: 700; font-size: 0.92rem; white-space: nowrap; }
.reg-cartqty { display: flex; align-items: center; gap: 8px; }
.reg-cartqty button { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); font-size: 16px; line-height: 1; }
.reg-cartqty button:hover { border-color: var(--primary); }
.reg-subtotal { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-strong); font-size: 0.95rem; }
.reg-total { padding: 16px 18px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
    background: rgba(45,53,102,0.4); font-size: 1.05rem; }
.reg-total strong { color: var(--primary); }

.reg-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 0.92rem; cursor: pointer; }
.reg-check.err { border-color: var(--error); }
.reg-check input { margin-top: 3px; flex: none; }
.reg-rules { margin-top: -8px; font-size: 0.88rem; color: var(--text-dim); }
.reg-rules summary { cursor: pointer; color: var(--secondary); }
.reg-rules div { margin-top: 8px; max-height: 260px; overflow-y: auto; white-space: pre-wrap; }

.reg-minor { border: 1px solid rgba(231,185,106,0.4); background: rgba(231,185,106,0.1);
    border-radius: var(--radius-md); padding: 14px 16px; font-size: 0.9rem; }
.reg-minor p { color: var(--text-dim); margin: 6px 0 8px; }
.reg-minor a { color: #E7B96A; font-weight: 600; }
.reg-err { color: var(--error); font-size: 0.9rem; padding: 10px 14px;
    border: 1px solid var(--error); border-radius: var(--radius-md); background: rgba(207,102,121,0.1); }
.reg-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.reg-actions .btn { flex: 1; min-width: 180px; }

/* add-on option sheet */
.reg-sheet-back { position: fixed; inset: 0; z-index: 300; background: rgba(10,12,24,0.7);
    backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; }
.reg-sheet { width: min(560px, 100%); max-height: 88vh; display: flex; flex-direction: column;
    background: var(--bg); border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
@media (min-width: 640px) { .reg-sheet-back { align-items: center; } .reg-sheet { border-radius: var(--radius-xl); } }
.reg-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 20px; border-bottom: 1px solid var(--border); }
.reg-sheet-body { padding: 18px 20px; overflow-y: auto; }
.reg-sheet-body p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }
.reg-sheet-foot { padding: 16px 20px; border-top: 1px solid var(--border); }
.reg-sheet-foot .btn { width: 100%; }
.reg-optgroup { margin-bottom: 16px; }
.reg-optgroup.err .reg-optname { color: var(--error); }
.reg-optname { font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; }
.reg-optnote { color: var(--text-faint); font-weight: 400; }
.reg-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.reg-opt { padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border);
    background: var(--bg-elev); color: var(--text-dim); font-size: 0.88rem; font-weight: 600; }
.reg-opt.on { border-color: var(--primary); background: rgba(231,134,106,0.16); color: var(--text); }
.reg-qty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

/* done + app promo */
.reg-done { text-align: center; }
/* The blocks carried over from the form (who is entered, the two add buttons)
   read as forms, not as a banner — keep them left-aligned inside it. */
.reg-done .reg-mine, .reg-done .reg-start { text-align: left; }
.reg-done .reg-mine { margin-top: 22px; }
.reg-done-ico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
    display: grid; place-items: center; font-size: 28px; color: var(--success);
    background: rgba(93,211,158,0.15); }
.reg-done h3 { margin-bottom: 8px; }
.reg-done > p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 18px; }
.reg-warn { color: #E7B96A; font-size: 0.88rem; }
.reg-paylist { text-align: left; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 16px; }
.reg-payrow { font-size: 0.9rem; color: var(--text-dim); padding: 4px 0; }
.reg-app { margin-top: 28px; padding: 22px; text-align: left;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(231,134,106,0.12), rgba(172,159,255,0.12)); }
.reg-app-ttl { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.reg-app-sub { color: var(--text-dim); font-size: 0.92rem; margin-top: 6px; }
.reg-app-list { list-style: none; margin: 16px 0; display: grid; gap: 12px; }
.reg-app-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 22px; position: relative; font-size: 0.9rem; }
.reg-app-list li::before { content: "\2192"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.reg-app-list span { color: var(--text-dim); }
.reg-app-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.reg-app-badges img { height: 44px; width: auto; }

/* ---------- Fingerboard submission (fingerboard.html) ---------- */
.fb-example { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
    background: rgba(45,53,102,0.28); }
.fb-example img { width: 100%; display: block; background: #f2f2f2; }
.fb-example-cap { padding: 14px 16px; color: var(--text-dim); font-size: 0.9rem; }
.fb-needs li span:last-child { display: block; color: var(--text-dim); font-size: 0.9rem; }
.fb-note { color: var(--text-faint); font-size: 0.85rem; margin-top: 14px; }
.fb-form { display: flex; flex-direction: column; gap: 16px;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; background: rgba(45,53,102,0.28); }
.fb-form textarea {
    background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text);
    padding: 12px 14px; font: inherit; font-size: 0.95rem; width: 100%;
    resize: vertical; min-height: 96px; line-height: 1.5;
}
.fb-form textarea:focus { outline: none; border-color: var(--primary); }
.fb-form input[type="file"] { color: var(--text-dim); font-size: 0.9rem; padding: 10px 0; }
.fb-preview { margin-top: 10px; }
.fb-preview img { max-height: 220px; border-radius: var(--radius-md); border: 1px solid var(--border); }

/* ---------- Priority nav: the 3 links that must never hide ---------- */
/* Events, hangboard training and sign-in stay in the bar at every width;
   everything else collapses into the burger below 1080px. */
.nav-primary { display: flex; align-items: center; gap: 4px; }
.nav-primary .nav-link.key { color: var(--text); font-weight: 600; white-space: nowrap; }
/* The key sections (events calendar, holds board) share the same muted colour
   as the other nav links (e.g. "For climbers") — not pure white. */
.nav-primary .nav-link.key:not(.signin) { color: var(--text-dim); position: relative; }
.nav-primary .nav-link.key:not(.signin):hover { color: var(--text); }
/* A small, centered secondary divider sitting in the gap between consecutive
   key sections — a clean line, not an outline. */
.nav-primary .nav-link.key:not(.signin) + .nav-link.key:not(.signin)::before {
    content: "";
    position: absolute;
    left: -8px; top: 50%;
    transform: translateY(-50%);
    width: 2px; height: 15px;
    border-radius: 2px;
    background: var(--secondary);
    opacity: 0.75;
}
.nav-primary .nav-link.signin {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    padding: 7px 16px;
}
.nav-primary .nav-link.signin:hover { border-color: var(--primary); background: rgba(231,134,106,0.12); }
/* language pills inside the burger sheet */
.nav-langs { display: flex; gap: 8px; padding: 8px 14px 2px; }

/* The bar keeps: audience links + Events + Hangboard + Sign in + language.
   Below 900px there is no room for all of it, so the two audience links and
   the language pills move into the burger and only the three essentials stay.
   (`hide-mobile`/`show-mobile` stay tied to the 1080px burger breakpoint.) */
@media (max-width: 900px) { .hide-narrow { display: none !important; } }
@media (min-width: 901px) { .show-narrow { display: none !important; } }

@media (max-width: 1080px) {
    /* tighten so three links + logo + burger fit a phone */
    .nav-inner { gap: 8px; }
    .nav-primary { gap: 2px; }
    .nav-primary .nav-link.key { font-size: 0.82rem; padding: 8px 8px; }
    .nav-primary .nav-link.signin { padding: 6px 12px; }
    .nav-actions { gap: 6px; }
}
@media (max-width: 620px) {
    .nav-primary .nav-link.key { font-size: 0.85rem; }
}
@media (max-width: 420px) {
    /* 360px phones: "Chwytotablica" is a long word — shrink type before it
       forces the bar to wrap. Measured: ~30px of headroom left at 360px. */
    .nav-primary .nav-link.key { font-size: 0.72rem; padding: 8px 4px; letter-spacing: -0.01em; }
    .nav-primary .nav-link.signin { padding: 6px 10px; }
    .nav-logo img { width: 32px; height: 32px; }
}
@media (max-width: 345px) {
    /* iPhone SE 1st gen and similar — last squeeze before anything wraps */
    .nav-primary { gap: 0; }
    .nav-primary .nav-link.key { font-size: 0.68rem; padding: 8px 3px; }
}
@media (max-width: 480px) {
    /* Narrow phones: drop the "Just Climb" wordmark so the logo is icon-only.
       That frees the width the wordmark ate, so the language picker, profile
       and burger sit at the RIGHT edge (space-between) instead of packing next
       to the logo. The icon still links home. */
    .nav-logo .brand { display: none; }
}

/* ---------- Stats: keep the social proof compact on phones ---------- */
/* Six figures at minmax(180px) meant six stacked rows on a phone — a whole
   screen of scrolling before any content. Two columns keeps it to three. */
@media (max-width: 720px) {
    .stats { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; padding: 22px 16px; }
    .stat-num { font-size: clamp(1.5rem, 7vw, 2rem); }
    .stat-label { font-size: 0.78rem; }
}
@media (max-width: 380px) {
    .stats { gap: 14px 8px; padding: 18px 12px; }
}

/* ---------- Nav spacing + language dropdown (v2) ---------- */
/* Links used to sit 4px apart and read as one blob — give them room to
   breathe and a hover surface wide enough to aim at. */
.nav-primary { gap: 14px; }
.nav-primary .nav-link.key { padding: 8px 12px; }
.nav-inner { gap: 20px; }
.nav-actions { gap: 12px; }

/* ---------- Unified top nav (v3) ----------
   One ordered link row after the logo, actions pinned to the right, a small
   modern secondary divider between sections on desktop, and a clean burger
   sheet with hairline dividers on mobile. */
.nav-inner { justify-content: flex-start; }
/* Push the link row to the right so it sits close to the language picker:
   the free space lands between the logo and the first link, and the row ends
   a small gap away from the actions (end nearer the lang than start to logo). */
.nav-links { margin-left: auto; gap: 10px; }
.nav-actions { margin-left: 0; }
.nav-links .nav-link { position: relative; }
/* Inline nav (phones excluded, i.e. >= 880px): a small centered secondary
   divider between each section. */
@media (min-width: 881px) {
    .nav-links .nav-link + .nav-link::before {
        content: "";
        position: absolute; left: -6px; top: 50%;
        transform: translateY(-50%);
        width: 2px; height: 15px; border-radius: 2px;
        background: var(--secondary); opacity: 0.6;
    }
}
/* Tablets / small laptops (down to the 880px burger cutoff): shrink the link
   type + spacing so all six (long, Polish) sections stay on one line. */
@media (min-width: 881px) and (max-width: 1080px) {
    .nav-inner { gap: 12px; }
    .nav-links { margin-left: auto; gap: 3px; }
    .nav-links .nav-link { padding: 8px 8px; font-size: 0.82rem; }
    .nav-links .nav-link + .nav-link::before { left: -2px; height: 13px; }
    .nav-actions { gap: 8px; }
}
/* Phones (< 880px): burger sheet — full-width rows + hairline dividers. */
@media (max-width: 880px) {
    .nav-links { margin-left: 0; gap: 0; padding: 10px; }
    /* nav-links goes position:fixed on phones (out of flow), so the base rule
       ".nav-actions { margin-left: 0 }" (line ~989) leaves the actions packed
       next to the logo. This block comes AFTER that base rule, so re-asserting
       auto here wins — pinning language + profile + burger to the RIGHT edge.
       (The earlier @880 copy loses to the base rule by source order.) */
    .nav-actions { margin-left: auto; }
    .nav-links .nav-link { padding: 15px 16px; border-radius: 10px; font-size: 1rem; }
    .nav-links .nav-link + .nav-link { border-top: 1px solid rgba(255,255,255,0.07); }
    .nav-links .nav-link:hover { background: rgba(255,255,255,0.06); }
    .nav-links .nav-link + .nav-link::before { display: none; }
}

/* Language picker: one flag + code button instead of two pills. */
.lang-drop { position: relative; }
.lang-drop-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 10px 7px 9px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    font-size: 0.8rem; font-weight: 600; color: var(--text);
    transition: background var(--transition), border-color var(--transition);
}
.lang-drop-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--border-strong); }
.lang-drop-btn svg { width: 13px; height: 13px; opacity: 0.7; transition: transform var(--transition); }
.lang-drop.open .lang-drop-btn svg { transform: rotate(180deg); }
.lang-flag { font-size: 1rem; line-height: 1; }
.lang-drop-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 120;
    min-width: 168px; padding: 6px;
    background: rgba(26, 31, 58, 0.98);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.lang-drop-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--text-dim); font-size: 0.9rem; font-weight: 500; text-align: left;
}
.lang-drop-item:hover { background: rgba(255,255,255,0.07); color: var(--text); }
.lang-drop-item[data-active="true"] { color: var(--primary); font-weight: 700; }
/* Flag, code chip, then the language's own name — the flag is recognised
   fastest, the code disambiguates (one flag can serve several languages). */
.lang-drop-item .lang-flag { flex: none; }
.lang-drop-item .lang-tag { flex: none; }
.lang-drop-menu { max-height: min(70vh, 520px); overflow-y: auto; }

/* Burger sheet: same breathing room as the bar. */
#navLinks .nav-link { padding: 12px 14px; }

@media (max-width: 900px) {
    /* Phones: the bar is just identity + the two things you always need. */
    .nav-inner { gap: 10px; }
    .nav-actions { gap: 8px; }
    .lang-drop-btn { padding: 6px 8px; font-size: 0.75rem; }
    .lang-code { display: none; }          /* flag alone is enough here */
    .lang-drop-btn svg { width: 11px; height: 11px; }
    .nav-primary .nav-link.signin { padding: 7px 14px; font-size: 0.82rem; }
}
@media (max-width: 380px) {
    .nav-logo .brand { display: none; }
    .nav-primary .nav-link.signin { padding: 6px 12px; font-size: 0.78rem; }
}

.reg-ruleslink { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.reg-ruleslink:hover { color: var(--text); }

.lang-tag { display: inline-grid; place-items: center; min-width: 26px;
    padding: 2px 6px; border-radius: 6px; background: rgba(172,159,255,.16);
    color: var(--secondary); font-size: .7rem; font-weight: 700; letter-spacing: .03em; }

/* ---------- Signed-in chrome ---------- */
/* Replaces the navbar's "Sign in" once a session exists: who you are, and —
   one click away, never in your face — the way out. */
.user-drop { position: relative; }
.nav-user {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: var(--radius-pill);
    background: rgba(172,159,255,.12); border: 1px solid var(--border);
    color: var(--text-dim); font-weight: 600; font-size: .86rem;
    max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer; transition: var(--transition);
}
.nav-user:hover, .user-drop.open .nav-user {
    background: rgba(172,159,255,.2); border-color: var(--border-strong); color: var(--text);
}
.nav-user svg { width: 15px; height: 15px; flex: none; color: var(--secondary); }
.user-drop-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 120;
    min-width: 168px; padding: 6px;
    background: rgba(26, 31, 58, 0.98);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}
.user-drop-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border-radius: var(--radius-sm);
    font-size: .9rem; font-weight: 600; text-align: left; cursor: pointer;
}
.user-drop-item svg { width: 15px; height: 15px; flex: none; }
/* Leaving is a destructive-ish action: muted dark red, not alarm red. */
.user-drop-item.danger { color: #B4544B; }
.user-drop-item.danger:hover { background: rgba(180,84,75,.14); color: #C9635A; }
@media (max-width: 640px) {
    .nav-user span { display: none; }
    .nav-user { padding: 7px 10px; }
}

/* ---------- Generic centred modal (sign-in popup) ---------- */
.jc-modal {
    position: fixed; inset: 0; z-index: 300; display: flex;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(10,13,28,.72); backdrop-filter: blur(4px);
}
.jc-modal-card {
    position: relative; width: min(460px, 100%); max-height: 92vh; overflow-y: auto;
    background: var(--bg-elev); border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl); padding: 30px 26px 24px;
    box-shadow: var(--shadow-lg);
}
.jc-modal-x {
    position: absolute; top: 12px; right: 14px; width: 32px; height: 32px;
    border-radius: 50%; background: rgba(255,255,255,.06); color: var(--text-dim);
    font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.jc-modal-x:hover { background: rgba(255,255,255,.12); color: var(--text); }
/* Language flags (inline SVG — emoji flags do not render on Windows). */
.lang-flag { display: inline-flex; align-items: center; line-height: 0; }
.lang-flag svg, .lang-tag svg { border-radius: 2px; display: block; }
.lang-drop-item .lang-tag {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; line-height: 0; font-size: 0;
}

/* Competitions listed in the account menu, above the way out. */
.user-drop-menu { min-width: 240px; max-width: 320px; }
.user-comps:not(:empty) { padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.user-comps-ttl {
    padding: 8px 12px 6px; font-size: .68rem; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; color: var(--text-faint);
}
.user-comp {
    display: block; padding: 8px 12px; border-radius: var(--radius-sm);
    color: var(--text); text-decoration: none;
}
.user-comp:hover { background: rgba(255,255,255,.07); }
.user-comp .nm { display: block; font-size: .88rem; font-weight: 600; line-height: 1.3; }
.user-comp .mt { display: block; font-size: .76rem; color: var(--text-faint); margin-top: 2px; }
.user-comp em {
    font-style: normal; font-size: .66rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .03em; padding: 2px 6px; border-radius: var(--radius-pill); margin-left: 6px;
}
.user-comp em.todo { background: rgba(231,134,106,.18); color: var(--primary); }
.user-comp em.wait { background: rgba(231,177,106,.16); color: #E7B16A; }

/* ---------- On-page sign-in form ---------- */
.si-panel h3 { margin-bottom: 8px; }
.si-form { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-top: 4px; }
.si-field { display: flex; flex-direction: column; gap: 6px; }
.si-field > span { font-size: .78rem; font-weight: 600; color: var(--text-dim); }
.si-field input {
    width: 100%; padding: 12px 14px; font: inherit; font-size: .95rem;
    color: var(--text); background: rgba(0,0,0,.22);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    transition: var(--transition);
}
.si-field input::placeholder { color: var(--text-faint); }
.si-field input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(231,134,106,.18); background: rgba(0,0,0,.3);
}
.si-form .btn { margin-top: 4px; }
.si-hint { font-size: .78rem; color: var(--text-faint); margin-top: -4px; }
.si-links { margin-top: 14px; font-size: .84rem; color: var(--text-faint); }
.si-link {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--secondary); font: inherit; font-size: .84rem; font-weight: 600;
}
.si-link:hover { color: var(--primary); text-decoration: underline; }
.si-sep { margin: 0 8px; opacity: .5; }
.si-muted { color: var(--text-faint); }
.si-err, .si-ok {
    margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-md);
    font-size: .85rem; text-align: left;
}
.si-err { background: rgba(220,90,90,.14); color: #F1907F; border: 1px solid rgba(220,90,90,.3); }
.si-ok { background: rgba(93,199,140,.14); color: #5DC78C; border: 1px solid rgba(93,199,140,.3); }

/* "Who are you signing up?" — the choice before any form appears. */
.reg-start { display: flex; flex-direction: column; gap: 10px; }
.reg-start .btn { width: 100%; }
@media (min-width: 560px) { .reg-start { flex-direction: row; } }

/* Phone field: country picker + number. The picker is a real, visible <select>
   — an invisible one laid over a chip drifted outside its box and swallowed
   taps meant for the fields next to it. */
.reg-phone { display: flex; gap: 8px; align-items: stretch; }
.reg-phone > input { flex: 1; min-width: 0; }
.reg-phone .reg-dial {
    /* Same vertical padding as the input beside it — with a different padding
       the two boxes lined up only by accident of the browser's default. */
    flex: none; width: 142px; padding: 11px 8px;
    background: rgba(0,0,0,.22); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.reg-phone .reg-dial:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(231,134,106,.18);
}
.reg-phone .reg-dial option { background: #2D3566; color: #fff; }

/* Download section: the app badges lead, the newsletter is the quieter ask
   below a divider — the menu's "Download" jumps here and must land on the
   stores, not on an e-mail form. */
.newsletter-block {
    margin-top: 30px; padding-top: 26px;
    border-top: 1px solid var(--border);
}
.newsletter-block h4 { font-size: 1.05rem; margin-bottom: 6px; }
.newsletter-block > p { color: var(--text-dim); font-size: .9rem; margin-bottom: 16px; }
.newsletter-consent { margin-top: 14px; font-size: .78rem; color: var(--text-faint); }
