/* ============================================================
   2date.fun — app.css
   Dark-first, high contrast, minimal. Mobile-first.
   No external fonts (CSP: 'self' only).
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ─────────────────────────────────────────────── */
:root {
    --bg:            #0b0b0d;
    --bg-2:          #131316;
    --surface:       #17171b;
    --surface-2:     #1f1f24;
    --border:        #2d2d34;
    --border-2:      #3d3d46;

    --field-bg:      #101013;
    --field-border:  #3d3d46;
    --field-text:    #f2f2f4;

    --text:          #f5f5f7;
    --text-2:        #b6b6bf;
    --text-3:        #7c7c88;

    --accent:        #e0245e;
    --accent-hover:  #f4386f;
    --accent-dim:    rgba(224, 36, 94, 0.16);
    --on-accent:     #ffffff;

    --success:       #22c55e;
    --warning:       #f59e0b;
    --danger:        #ef4444;
    --gold:          #d4a843;

    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif;

    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;

    --container: 1180px;
    --nav-h:     56px;
    --tabbar-h:  58px;

    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
    --dur:  160ms;
    --ease: cubic-bezier(.4,0,.2,1);
}

/* Light theme */
[data-theme="light"] {
    --bg:            #faf9fb;
    --bg-2:          #f2f1f5;
    --surface:       #ffffff;
    --surface-2:     #f5f4f7;
    --border:        #e2e0e7;
    --border-2:      #cfccd6;

    --field-bg:      #ffffff;
    --field-border:  #cfccd6;
    --field-text:    #17171b;

    --text:          #17171b;
    --text-2:        #56545e;
    --text-3:        #86838f;

    --accent:        #c2185b;
    --accent-hover:  #a8154f;
    --accent-dim:    rgba(194, 24, 91, 0.10);
    --on-accent:     #ffffff;

    --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.06);
}

@media (prefers-color-scheme: light) {
    [data-theme="auto"] {
        --bg: #faf9fb; --bg-2: #f2f1f5; --surface: #ffffff; --surface-2: #f5f4f7;
        --border: #e2e0e7; --border-2: #cfccd6;
        --field-bg: #ffffff; --field-border: #cfccd6; --field-text: #17171b;
        --text: #17171b; --text-2: #56545e; --text-3: #86838f;
        --accent: #c2185b; --accent-hover: #a8154f; --accent-dim: rgba(194,24,91,.10);
        --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.06);
    }
}

/* ── Base ───────────────────────────────────────────────── */
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

h1 { font-size: 1.35rem; line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; line-height: 1.3; }
h1, h2, h3 { margin-bottom: 0.6rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 16px;
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.text-muted { color: var(--text-2); }
.num { text-align: end; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header--admin { border-bottom: 1px solid var(--accent); }

.header-inner {
    height: var(--nav-h);
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.brand:hover { color: var(--text); }

.badge-admin {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--accent);
    color: var(--on-accent);
    border-radius: 4px;
    padding: 2px 6px;
}

/* Desktop nav */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-inline-start: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
    background: none;
    border: none;
    white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }

/* First-login gate: top nav is locked until the profile is completed. */
.nav-link--locked {
    color: var(--text-3);
    cursor: not-allowed;
    opacity: .55;
}
.nav-link--locked:hover { background: none; color: var(--text-3); }
.nav-lock { font-size: .7em; opacity: .8; }

.nav-link--cta {
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    padding: 5px 14px;
    font-size: .82rem;
    border-radius: var(--radius-sm);
}
.nav-link--cta:hover { background: var(--accent-hover); color: var(--on-accent); }

.nav-link--switch {
    border: 1px solid var(--border-2);
    color: var(--text);
}

.nav-badge {
    display: inline-block;
    min-width: 17px;
    padding: 0 5px;
    font-size: .68rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    border-radius: 9px;
    background: var(--accent);
    color: var(--on-accent);
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: 6px;
}

.lang-form select,
.theme-toggle {
    background: var(--surface);
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 7px;
    font-size: .78rem;
    line-height: 1.2;
}
.theme-toggle { width: 30px; height: 30px; display: grid; place-items: center; }
.lang-form select:hover, .theme-toggle:hover { border-color: var(--border-2); color: var(--text); }

.inline-form { display: inline; margin: 0; }

/* ── Main / Footer ──────────────────────────────────────── */
main.container {
    flex: 1;
    padding-block: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.site-footer {
    border-top: 1px solid var(--border);
    padding-block: 14px;
    color: var(--text-3);
    font-size: .8rem;
}
.footer-inner {
    display: flex; flex-wrap: wrap; gap: 10px;
    align-items: center; justify-content: space-between;
}
.footer-nav { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-nav a { color: var(--text-3); }
.footer-nav a:hover { color: var(--text-2); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}
.card h2:first-child, .card h1:first-child { margin-top: 0; }

.table-card { overflow-x: auto; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--on-accent);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background var(--dur) var(--ease);
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--block { display: flex; width: 100%; }
.btn--small { padding: 6px 12px; font-size: .82rem; }
.btn--danger { background: var(--danger); }
.btn--danger:hover { background: #dc2626; }

/* ── Forms ──────────────────────────────────────────────── */
.form-field { margin-bottom: 10px; }
.form-field > label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 4px;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="datetime-local"],
input[type="search"], input[type="url"], input[type="file"],
input[type="tel"],
select, textarea {
    width: 100%;
    padding: 8px 11px;
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: var(--radius-sm);
    color: var(--field-text);
    font-size: .9rem;
    transition: border-color var(--dur) var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.55; }
input[type="checkbox"] { accent-color: var(--accent); width: auto; }

.form-error { color: var(--danger); font-size: .8rem; margin-top: 4px; }

/* Live signup hints (display-name availability). */
.field-status { font-size: .8rem; margin-top: 4px; }
.field-status--checking { color: var(--text-3); }
.field-status--ok { color: var(--success); }
.field-status--taken { color: var(--danger); }
.form-error--global {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 14px;
}

/* ── Tables ─────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th, .data-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    text-align: start;
}
.data-table th {
    color: var(--text-3);
    font-weight: 600;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.data-table tr:last-child td { border-bottom: none; }

.amount-pos { color: var(--success); }
.amount-neg { color: var(--danger); }

.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; padding-top: 12px;
}

/* ── Hero / Auth / Errors ───────────────────────────────── */
.hero { text-align: center; padding-block: 56px 40px; }
.hero-title { font-size: clamp(1.9rem, 6vw, 3rem); margin-bottom: 6px; }
.hero-tagline { font-size: clamp(1rem, 3vw, 1.25rem); font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.hero-intro { color: var(--text-2); margin: 0; }

.auth-page { display: flex; justify-content: center; padding-block: 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-alt { margin-top: 14px; font-size: .85rem; color: var(--text-2); text-align: center; }

.error-page { text-align: center; padding-block: 56px; }

/* ── Wallet ─────────────────────────────────────────────── */
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.wallet-card-title { font-size: .95rem; color: var(--text-2); margin: 0; }
.wallet-balance {
    font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em;
    margin: 2px 0 10px;
}
.wallet-min-note { font-size: .78rem; margin-top: 6px; }
.topup-steps { padding-inline-start: 18px; margin-bottom: 14px; color: var(--text-2); font-size: .875rem; }
.topup-steps li { margin-bottom: 7px; }

/* ── Membership / admin tiles ───────────────────────────── */
.plan-grid, .admin-grid, .event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.plan-card { text-align: center; margin-bottom: 0; }
.plan-card--premium { border-color: var(--accent); }
.plan-name { font-size: 1rem; margin: 0; }
.plan-period { color: var(--text-3); font-size: .82rem; margin-bottom: 6px; }
.plan-price { font-size: 1.6rem; font-weight: 700; margin-bottom: 14px; }
.plan-note { font-size: .78rem; margin-top: 8px; }
.membership-current { border-color: var(--accent); }

.admin-tile { display: block; color: var(--text); margin-bottom: 0; }
.admin-tile:hover { border-color: var(--accent); color: var(--text); }
.admin-tile h2 { font-size: .98rem; margin: 0 0 4px; }

/* ── Access checklist ───────────────────────────────────── */
.access-steps { list-style: none; }
.access-steps li { padding: 7px 0 7px 26px; position: relative; font-size: .9rem; }
.access-steps li::before { position: absolute; inset-inline-start: 0; font-weight: 700; }
.step-done::before { content: "✓"; color: var(--success); }
.step-open::before { content: "○"; color: var(--text-3); }
.access-granted { color: var(--success); font-weight: 600; }

/* ── Events ─────────────────────────────────────────────── */
.event-card { display: block; color: var(--text); margin-bottom: 0; padding: 14px; }
.event-card:hover { border-color: var(--accent); color: var(--text); }
.event-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 10px; }
.event-title { font-size: 1rem; margin: 0 0 4px; }
.event-meta { font-size: .8rem; margin-bottom: 6px; }
.event-price { font-weight: 700; margin-bottom: 4px; }

.teaser-list { list-style: none; }
.teaser-list li {
    display: flex; gap: 14px; align-items: baseline;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.teaser-list li:last-child { border-bottom: none; }
.teaser-date { font-weight: 600; min-width: 120px; font-size: .875rem; }
.teaser-cat { color: var(--text-3); font-size: .875rem; }

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
}
.filter-form .form-field { margin-bottom: 0; }

.search-heading {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--text-3); margin: 14px 0 8px;
}
.search-heading:first-child { margin-top: 0; }

.progress { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin: 12px 0 6px; }
.progress-bar { height: 100%; background: var(--accent); }

.participant-list { list-style: none; }
.participant-list li {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .875rem;
}
.participant-list li:last-child { border-bottom: none; }

.application { padding: 12px 0; border-bottom: 1px solid var(--border); }
.application:last-child { border-bottom: none; }

.scheme-roles { margin-bottom: 14px; }
.scheme-roles input[type="number"] { width: 76px; }

.decision-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.report-heading { font-size: 1rem; margin: 0 0 4px; }

/* ── Profile & galleries ────────────────────────────────── */
.profile-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .profile-grid { grid-template-columns: 3fr 2fr; align-items: start; } }
.profile-grid h2 { font-size: .98rem; }

.profile-avatar {
    width: 128px; height: 128px; object-fit: cover;
    border-radius: 50%; margin-bottom: 12px;
    border: 2px solid var(--border);
}
.profile-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.gallery-item img, .gallery-item video {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: var(--radius-sm); margin-bottom: 5px;
    background: #000;
}
.gallery-actions { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }

.consent-box {
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 12px;
    font-size: .85rem;
}
.consent-revoke { margin-top: 12px; }

.kyc-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kyc-photo { margin-bottom: 0; }
.kyc-photo img { border-radius: var(--radius-sm); }
.kyc-photo figcaption { font-weight: 600; font-size: .82rem; margin-bottom: 8px; }
.kyc-rejected { border-color: var(--danger); }

/* ── Messaging ──────────────────────────────────────────── */
.thread-list { list-style: none; }
.thread-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.thread-list li:last-child { border-bottom: none; }
.thread-link { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; }
.thread-link:hover { color: var(--accent); }
.thread-title { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-date { margin-inline-start: auto; font-size: .78rem; flex-shrink: 0; }

.message-log { max-height: 58vh; overflow-y: auto; }
.message { padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 9px; max-width: 82%; font-size: .875rem; }
.message p { margin: 3px 0; }
.message-sender { font-weight: 600; font-size: .78rem; color: var(--text-2); }
.message-date { font-size: .72rem; }
.message-report { font-size: .72rem; margin-inline-start: 8px; }
.message--mine { margin-inline-start: auto; background: var(--accent-dim); }
.message--theirs { background: var(--surface-2); }
.message--system { max-width: 100%; background: var(--bg-2); border: 1px dashed var(--border); }

.notification-list { list-style: none; }
.notification-list li { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.notification-list li:last-child { border-bottom: none; }
.notification-list li.is-unread { border-inline-start: 2px solid var(--accent); padding-inline-start: 10px; }
.notification-list p { margin: 3px 0; color: var(--text-2); }

/* ── Legal / cookie ─────────────────────────────────────── */
.legal-page { max-width: 720px; }
.legal-body { line-height: 1.75; color: var(--text-2); }
.legal-langs { list-style: none; }
.legal-langs li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.legal-langs li:last-child { border-bottom: none; }

.cookie-banner {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.cookie-inner {
    display: flex; flex-wrap: wrap; gap: 10px;
    align-items: center; justify-content: space-between;
    padding-block: 11px;
}
.cookie-inner p { margin: 0; font-size: .82rem; color: var(--text-2); }

code {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: .85em;
}

/* ── Mobile tab bar (members only) ──────────────────────── */
.tabbar { display: none; }

@media (max-width: 760px) {
    /* Header keeps: brand · [badge] · tools. Nav moves to the tab bar. */
    .main-nav--members { display: none; }

    .tabbar {
        display: flex;
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 95;
        height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: color-mix(in srgb, var(--bg) 96%, transparent);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border);
    }
    .tabbar a, .tabbar button, .tabbar-locked {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        background: none;
        border: none;
        color: var(--text-3);
        font-size: .62rem;
        font-weight: 600;
        letter-spacing: .01em;
        padding: 6px 2px;
        position: relative;
    }
    .tabbar a:hover, .tabbar a.is-active { color: var(--accent); }
    .tabbar-locked { opacity: .45; cursor: not-allowed; }
    .tabbar-icon { font-size: 1.05rem; line-height: 1; }
    .tabbar .nav-badge {
        position: absolute;
        top: 3px;
        inset-inline-end: 22%;
        min-width: 15px;
        line-height: 15px;
        font-size: .6rem;
    }

    body.has-tabbar main.container {
        padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
    }
    body.has-tabbar .cookie-banner { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

    .card { padding: 15px; }
    h1 { font-size: 1.3rem; }
    .hero { padding-block: 36px 28px; }

    .wallet-grid, .plan-grid, .admin-grid, .event-grid { grid-template-columns: 1fr; }
    .decision-buttons .btn { flex: 1; }
    .message { max-width: 92%; }
    .teaser-date { min-width: 100px; }
    .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 400px) {
    .brand { font-size: 1.05rem; }
    /* keep the language switcher reachable on narrow phones */
    .header-tools .lang-form select { padding: 4px 6px; }
}

/* Dashboard quick links */
.dashboard-links { display: flex; flex-wrap: wrap; gap: 8px; }
.dashboard-links .btn {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}
.dashboard-links .btn:hover { border-color: var(--accent); color: var(--text); }



/* ── Entry gate (age + terms) ───────────────────────────── */
.gate-body {
    background: var(--bg);
    min-height: 100vh;
    margin: 0;
    display: block;
    overflow: hidden;
}

/* Blurred backdrop behind the gate */
.gate-backdrop {
    position: fixed;
    inset: 0;
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    display: grid;
    place-items: center;
    background:
        radial-gradient(90% 60% at 50% 0%, rgba(224,36,94,.14), transparent 65%),
        linear-gradient(160deg, var(--surface) 0%, var(--bg) 100%);
}
.gate-backdrop__brand {
    font-size: clamp(2.5rem, 12vw, 6rem);
    font-weight: 900;
    letter-spacing: -.03em;
    color: rgba(255,255,255,.05);
}

.gate {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    overflow-y: auto;
}

.gate__box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    margin: auto;
}
.gate__box--terms { text-align: start; }

.gate__icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: .75rem;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.gate__title {
    font-size: clamp(1.05rem, 5.2vw, 1.75rem);
    font-weight: 800;
    margin-bottom: .5rem;
    line-height: 1.2;
    text-wrap: balance;
    hyphens: none;
    word-break: normal;
}

.gate__sub { color: var(--text-2); font-size: .9rem; margin-bottom: 1.25rem; }

.gate__warning {
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.2);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: start;
}
.gate__warning p { font-size: .85rem; color: var(--text-2); margin: .2rem 0; line-height: 1.55; }

.gate__actions { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.gate__actions form { margin: 0; }

.btn--lg { padding: .95rem 1.35rem; font-size: 1rem; font-weight: 700; }

.btn--ghost {
    background: transparent;
    border: 1px solid var(--border-2);
    color: var(--text-2);
    font-weight: 500;
}
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.gate__hint { font-size: .72rem; color: var(--text-3); line-height: 1.5; }

.gate__terms-list { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }
.gate__check {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    cursor: pointer;
    font-size: .85rem;
    color: var(--text-2);
    line-height: 1.5;
}
.gate__check input { margin-top: .2rem; flex-shrink: 0; accent-color: var(--accent); }
.gate__check a { color: var(--accent); }

.gate__submit { margin-bottom: .75rem; }
.gate__submit:disabled { opacity: .45; cursor: not-allowed; }
.gate__submit:disabled:hover { background: var(--accent); }

.gate__logout { margin-top: 1rem; text-align: center; }
.gate__link {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: .8rem;
}
.gate__link:hover { color: var(--text-2); }

@media (max-width: 480px) {
    .gate__box { padding: 1.75rem 1.25rem; border-radius: var(--radius); }
    .gate__icon { font-size: 2.5rem; }
}

/* ── PWA install ────────────────────────────────────────── */
.pwa-install { font-size: 1rem; }

.pwa-hint {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 96;
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.pwa-hint__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding-block: 12px;
}
.pwa-hint p { margin: 0; font-size: .84rem; color: var(--text-2); }

body.has-tabbar .pwa-hint { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

/* ── Email verification ─────────────────────────────────── */
.verify-notice {
    background: color-mix(in srgb, var(--success) 12%, transparent);
    border: 1px solid var(--success);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: .85rem;
}

.verify-email {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 18px;
    word-break: break-all;
}

.verify-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 22px 0 14px;
}

.verify-hint { font-size: .82rem; margin-bottom: 10px; }

.verify-resend {
    background: none;
    border: none;
    color: var(--text-2);
    font-size: .85rem;
    text-decoration: underline;
    padding: 0;
}
.verify-resend:hover:not(:disabled) { color: var(--accent); }
.verify-resend:disabled { color: var(--text-3); cursor: not-allowed; text-decoration: none; }

/* ── Place picker ───────────────────────────────────────── */
.place-picker {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
@media (min-width: 620px) {
    .place-picker { grid-template-columns: 1fr 1.4fr; gap: 12px; }
}

.place-input { position: relative; }

.place-results {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 4px);
    z-index: 60;
    list-style: none;
    margin: 0;
    padding: 4px;
    max-height: 260px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.place-results li {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    cursor: pointer;
}
.place-results li:hover,
.place-results li:focus {
    background: var(--accent-dim);
    color: var(--text);
    outline: none;
}

.place-hint { font-size: .78rem; color: var(--warning); margin-top: 4px; }

/* ── Phase 9: full profiles ─────────────────────────────── */
.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.field-grid .form-field { margin-bottom: 2px; }

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface-2);
    color: var(--text);
    font-size: .82rem;
    cursor: pointer;
    user-select: none;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.chip:hover { border-color: var(--border-2); }
.chip input { margin: 0; }
.chip:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--text);
}

.chip--static { cursor: default; padding: 5px 11px; }
.chip--static:hover { border-color: var(--border); }

/* Profile header */
.profile-header {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.profile-header .profile-avatar { width: 96px; height: 96px; margin-bottom: 0; }
.profile-header h1 { margin-bottom: 2px; }
.profile-headline {
    font-weight: 600;
    color: var(--accent);
    margin: 6px 0 0;
    font-size: .95rem;
}

/* Fact list (profile details, event details) */
.fact-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 20px;
    margin: 0;
}
.fact {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}
.fact dt {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-3);
}
.fact dd { margin: 0; font-size: .9rem; }

.fact-heading {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-3);
    margin: 18px 0 6px;
}

/* ── Role picker (profile) ──────────────────────────────── */
/* Theme groups tile across the full width; roles stack inside each box. */
.role-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 12px;
    margin-top: 10px;
    align-items: start;
}
.role-group {
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 6px 12px 10px;
    margin: 0;
}
.role-group legend {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
    font-weight: 600;
    padding: 0 6px;
}
.role-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
}
.role-item + .role-item { border-top: 1px solid var(--border); }
.role-item__check {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: .875rem;
    cursor: pointer;
    line-height: 1.25;
}
.role-item__check input { margin: 0; flex-shrink: 0; }
.role-item:has(input:checked) .role-item__check { color: var(--accent); font-weight: 600; }
.role-item__exp { flex: 0 0 auto; width: 118px; padding: 4px 6px; font-size: .76rem; }

/* ── Profile editor layout ──────────────────────────────── */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}
@media (min-width: 900px) {
    .profile-layout { grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); }
    .profile-media { position: sticky; top: calc(var(--nav-h) + 16px); }
}

.profile-form > .card:last-child { margin-bottom: 0; }
.profile-save { display: flex; justify-content: flex-end; }

/* Two fields per row, collapsing on narrow screens. */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 560px) {
    .field-row { grid-template-columns: 1fr; }

    /* Structured 2-up tiles on phones instead of one field per row. */
    .field-tiles,
    .profile-form .place-picker {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .field-tile--wide,
    .field-tile--full,
    .profile-form .place-picker .form-field:last-child {
        grid-column: 1 / -1;
    }
    .role-groups { grid-template-columns: 1fr; }
    .card { padding: 14px; }
    .dob-row { gap: 6px; }
}
.field-row .form-field { margin-bottom: 10px; }

.dob-row { display: flex; gap: 8px; }
.dob-row select { flex: 1 1 0; min-width: 0; }

/* Compact field tiles — same clean boxes as the role groups. */
.field-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}
.field-tile,
.profile-form .place-picker .form-field {
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 8px 10px;
    margin: 0;
}
.field-tile > label,
.profile-form .place-picker .form-field > label {
    display: block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-3);
    margin-bottom: 5px;
}
.field-tile select, .field-tile input, .field-tile textarea,
.profile-form .place-picker select,
.profile-form .place-picker input[type="text"] {
    padding: 7px 9px;
    font-size: .85rem;
}
.field-tile--wide { grid-column: span 2; }
.field-tile--full { grid-column: 1 / -1; }

/* Country / city as tiles too, on the profile page only. */
.profile-form .place-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}
.profile-form .place-picker .form-field:last-child { grid-column: span 2; }

.field-note {
    font-size: .78rem;
    color: var(--text-3);
    margin: -4px 0 14px;
    line-height: 1.45;
}
.field-note--warn { color: var(--warning); }

input:disabled, select:disabled, textarea:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Phase 14: onboarding ───────────────────────────────── */
.notice-success {
    border-color: var(--success);
    background: color-mix(in srgb, var(--success) 8%, transparent);
}
.notice-success h2 { color: var(--success); }

.stats-card { text-align: center; }
.stats-line { margin: 0; font-size: 1.05rem; }
.stats-line strong { color: var(--accent); font-size: 1.35rem; }

.plan-features { list-style: none; margin: 0 0 16px; text-align: start; }
.plan-features li {
    padding: 7px 0 7px 22px;
    border-bottom: 1px solid var(--border);
    font-size: .875rem;
    position: relative;
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li::before { content: "•"; position: absolute; inset-inline-start: 4px; color: var(--text-3); }
.feature-yes::before { content: "✓" !important; color: var(--success) !important; }
.feature-no::before  { content: "✕" !important; color: var(--danger) !important; }
.feature-no { color: var(--text-3); }

.plan-buy { text-align: start; }
.teaser-title { color: var(--text); font-size: .875rem; }

/* Purpose of a payment proof */
.badge-purpose {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-2);
}

/* ── Onboarding: one step at a time ─────────────────────── */
.step-card { border-color: var(--accent); }
.step-progress {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-3);
    margin-bottom: 6px;
}
.stats-card .text-muted { font-size: .82rem; margin-top: 4px; }

/* ══════════════════════════════════════════════════════════════
   Landing page — ticker on top, then community · brand · events.
   Tuned to fit one screen with minimal scrolling on PC and mobile.
   ══════════════════════════════════════════════════════════════ */
/* Home page: let the landing fill the space the header/footer leave, so the
   ticker sits right under the header and nothing overflows the first screen. */
body.is-home main.container {
    display: flex;
    flex-direction: column;
    padding-top: 0;
}
.landing {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vh, 36px);
}

/* ── Live ticker (top, full width of the column) ─────────────── */
.ticker {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    overflow: hidden;
}
.ticker__label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-inline: 12px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    box-shadow: 8px 0 18px rgba(0,0,0,.35);
    z-index: 2;
}
.ticker__viewport {
    position: relative;
    flex: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker__track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding-block: 5px;
    will-change: transform;
    animation: ticker-scroll 42s linear infinite;
}
.ticker__track-dup { display: inline-flex; align-items: center; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-inline: 14px;
    font-size: .78rem;
    border-inline-end: 1px solid var(--border);
}
.ticker__date { font-weight: 600; color: var(--text); }
.ticker__cat { color: var(--accent); font-weight: 600; }
.ticker__dot { color: var(--text-3); }
.ticker__title { color: var(--text-2); }
.ticker--bar { margin: 0; }
.ticker-bar-wrap { margin: 10px auto 0; }
.ticker__empty { display: flex; align-items: center; padding: 6px 14px; margin: 0; color: var(--text-3); font-size: .875rem; }

@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Three-column body ───────────────────────────────────────── */
.landing-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr minmax(0, 1.75fr) 1fr;
    grid-template-areas: "left main right";
    align-items: center;
    gap: clamp(16px, 4vw, 56px);
}

/* Centre column — the loud one */
.landing-main { grid-area: main; text-align: center; }
.landing-main__eyebrow {
    margin: 0 0 12px;
    font-size: .7rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--text-3);
}
.landing-main__brand {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.02;
}
.landing-main__tagline {
    margin: 4px 0 20px;
    font-size: clamp(1.35rem, 3.6vw, 2rem);
    font-weight: 700;
    color: var(--accent);
}
.landing-main__lead {
    margin: 2px auto 6px;
    max-width: none;
    font-size: clamp(.72rem, 2.1vw, 1rem);
    font-weight: 600;
    line-height: 1.3;
}
.landing-main__body {
    margin: 0 auto 24px;
    max-width: 48ch;
    color: var(--text-2);
    line-height: 1.6;
}
.landing-main__cta { display: flex; flex-direction: column; align-items: center; gap: 11px; }
.landing-main__alt { font-size: .875rem; color: var(--text-3); }
.landing-main__note {
    margin: 22px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .78rem;
    color: var(--text-3);
}
.landing-main__note-mark { color: var(--accent); font-weight: 700; line-height: 1; }

/* Side columns — quieter, smaller than the centre */
.landing-side { text-align: center; }
.landing-side--left  { grid-area: left; }
.landing-side--right { grid-area: right; }
.side__title {
    margin: 0 0 10px;
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-3);
}
.side__num {
    margin: 0;
    font-size: clamp(1.7rem, 4.4vw, 2.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}
.side__num::after {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    margin: 9px auto 0;
    background: var(--accent);
    border-radius: 2px;
}
.side__label {
    margin: 9px 0 0;
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* ── Tablet / mobile: brand on top, then the two counts side by side ── */
@media (max-width: 720px) {
    .landing { flex: 0 0 auto; gap: 20px; }
    .landing-grid {
        flex: 0 0 auto;
        align-content: start;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "main main"
            "left right";
        gap: 20px 16px;
    }
    .landing-side {
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--surface);
        padding: 16px 10px;
    }
    .ticker__label { padding-inline: 12px; font-size: .62rem; }
    .ticker__chip { padding-inline: 13px; }
}

/* ── No motion: every chip static, no scrolling ─────────────── */
@media (prefers-reduced-motion: reduce) {
    .ticker__track { animation: none; flex-wrap: wrap; white-space: normal; }
    .ticker__track-dup { display: none; }
    .ticker__viewport { -webkit-mask-image: none; mask-image: none; }
}

/* ══════════════════════════════════════════════════════════════
   Media page — upload (left) + uploaded thumbnails (right) + lightbox
   ══════════════════════════════════════════════════════════════ */
.media-page__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.media-layout {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.media-upload .card { margin-bottom: 14px; }
.media-upload .card:last-child { margin-bottom: 0; }

.media-shelf__label {
    font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-3); margin: 16px 0 8px;
}
.media-shelf__label:first-of-type { margin-top: 4px; }

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}
.thumb { position: relative; }
.thumb__open {
    display: block; width: 100%; padding: 0; border: none; cursor: pointer;
    background: #000; border-radius: var(--radius-sm); overflow: hidden;
}
.thumb__open img, .thumb__open video {
    width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
}
.thumb__play {
    position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; font-size: 1.5rem; color: #fff;
    pointer-events: none; text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.thumb__del { position: absolute; top: 4px; inset-inline-end: 4px; margin: 0; }
.thumb__del button { padding: 1px 7px; line-height: 1.4; }

/* Link from the profile editor to the media page */
.media-link-card {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; text-decoration: none; color: inherit;
}
.media-link-card:hover { border-color: var(--accent); }
.media-link-card__go { font-size: 1.4rem; color: var(--accent); }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.92);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__stage { max-width: min(1000px, 100%); max-height: 100%; }
.lightbox__stage img, .lightbox__stage video {
    max-width: 100%; max-height: 85vh; display: block; border-radius: var(--radius);
}
.lightbox__close {
    position: absolute; top: 16px; inset-inline-end: 16px;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border-2); background: var(--surface);
    color: var(--text); font-size: 1.1rem; cursor: pointer;
}

@media (max-width: 720px) {
    .media-layout { grid-template-columns: 1fr; }
}

/* ── Media pagination, submit/publish flow ──────────────────── */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}
.pager__at { font-size: .85rem; color: var(--text-3); font-variant-numeric: tabular-nums; }

.media-page__next {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.review-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.btn--ghost {
    background: transparent;
    border: 1px solid var(--border-2);
    color: var(--text);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--text-3); }

.publish-card { text-align: center; padding-block: 32px; }
.publish-card h1 { margin: 8px 0 20px; }
#publish-count { font-size: 1.15rem; color: var(--accent); }
.publish-dot {
    width: 42px; height: 42px; margin: 0 auto 16px;
    border-radius: 50%;
    border: 3px solid var(--border-2);
    border-top-color: var(--accent);
    animation: publish-spin 900ms linear infinite;
}
.publish-check {
    width: 56px; height: 56px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem; color: var(--success);
    border: 2px solid var(--success); border-radius: 50%;
}
@keyframes publish-spin { to { transform: rotate(360deg); } }

.admin-plans__title { margin: 16px 0 8px; font-size: .95rem; }

/* ── Membership comparison + unified checkout ───────────────── */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 16px;
    margin-top: 8px;
}
.tier-periods { list-style: none; margin: 10px 0 0; padding: 0; }
.tier-period {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
}
.tier-period + .tier-period { border-top: 1px solid var(--border); }
.tier-period__label { color: var(--text-2); font-size: .9rem; }
.tier-period__price { font-weight: 700; font-variant-numeric: tabular-nums; }

.pay-method {
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 14px;
    margin-top: 12px;
}
.pay-method h2 { font-size: 1rem; margin: 0 0 8px; }
.pay-or { text-align: center; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; margin: 12px 0; }

/* ── Publish confirmation page ──────────────────────────────── */
.publish-page { max-width: 760px; margin-inline: auto; }
.publish-page .publish-card { max-width: 520px; margin-inline: auto; margin-bottom: 18px; }


/* ── Mobile overflow safeguards ─────────────────────────── */
img, video, table { max-width: 100%; }
.app-side-link, .app-side-group { overflow-wrap: anywhere; }
@media (max-width: 720px) {
    /* Dense data tables scroll inside their card instead of widening the page. */
    .data-table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
}
