/* ===== Design Tokens ===== */
:root {
    --bg-deep: #060b18;
    --bg-surface: #0d1424;
    --bg-card: rgba(15, 23, 42, 0.65);
    --text-color: #e8edf5;
    --text-muted: #c7c7c7;
    --text-dim: #999999;
    --primary: #a78bfa;
    --primary-vivid: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.35);
    --accent: #f472b6;
    --accent-glow: rgba(244, 114, 182, 0.3);
    --gold: #fbbf24;
    --gold-bg: rgba(251, 191, 36, 0.08);
    --gold-border: rgba(251, 191, 36, 0.25);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --success-border: rgba(52, 211, 153, 0.3);
    --error: #fb7185;
    --glass-bg: rgba(15, 23, 42, 0.55);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 255, 255, 0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-color);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== Forest Background (static, bottom-anchored) ===== */
.site-bg,
.site-bg-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -3;
}

.site-bg {
    background-image: url("../img/hc-bg.webp");
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
    background-color: var(--bg-deep);
    background-attachment: fixed;
    opacity: 0.8;
}

.site-bg-overlay {
    z-index: -2;
    background:
        linear-gradient(180deg,
            rgba(13, 14, 26, 0.78) 0%,
            rgba(13, 14, 26, 0.55) 45%,
            rgba(13, 14, 26, 0.35) 80%,
            rgba(13, 14, 26, 0.55) 100%);
}

/* ===== Animated Background ===== */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse 600px 600px at 15% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 85% 75%, rgba(244, 114, 182, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 400px 400px at 50% 50%, rgba(52, 211, 153, 0.05) 0%, transparent 70%);
    animation: bgDrift 25s ease-in-out infinite alternate;
    z-index: -1;
    pointer-events: none;
}

@keyframes bgDrift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-2%, 3%) rotate(1deg);
    }

    100% {
        transform: translate(2%, -2%) rotate(-1deg);
    }
}

/* Noise overlay for texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}

/* ===== Layout ===== */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

main {
    flex: 1;
}

/* ===== Navbar ===== */
header.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    filter: brightness(1.2);
}

.logo-icon {
    max-width: 45px;
    height: auto;
    object-fit: contain;
}

/* Wordmark: "Howling" + vertical gold "Cookie" (matches brand logo) */
.logo-wordmark {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

.logo-text-howling {
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text-cookie {
    display: inline-block;
    background: linear-gradient(180deg, #5c4420 0%, #e1c28c 16%, #b8892e 34%, #cdac02 50%, #e0bc3c 62%, #a67c28 82%, #6b4e18 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #c9a227;
}

.invite-accept-title .logo-text-howling {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
}

.hero-logo {
    max-width: 100px;
    height: auto;
    object-fit: contain;
    margin-bottom: -20px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-vivid), var(--accent));
    color: white;
    box-shadow: 0 2px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border-color: var(--glass-border-hover);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ===== Hero Section ===== */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 55vh;
    text-align: center;
    padding-top: 60px;
    padding-bottom: 20px;
    position: relative;
}

.hero-content {
    max-width: 720px;
    width: 100%;
    animation: heroFadeIn 0.8s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}

.hero-badge .pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 14px;
    line-height: 1.1;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero: "Howling" keeps the diagonal brand gradient; "Cookie" uses .logo-text-cookie */
.hero-title-howling {
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title .icon-cookie {
    -webkit-text-fill-color: initial;
    color: var(--gold);
    font-size: 0.85em;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4));
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

/* ===== Prediction Input Box ===== */
.prediction-box {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.prediction-box:focus-within {
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(139, 92, 246, 0.15);
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1.1rem;
    transition: var(--transition);
}

.input-group input:focus~.input-icon,
.input-group:focus-within .input-icon {
    color: var(--primary);
}

.input-group input {
    width: 100%;
    padding: 18px 18px 18px 48px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(6, 11, 24, 0.7);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
}

.input-group input::placeholder {
    color: var(--text-dim);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-vivid);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(6, 11, 24, 0.9);
}

.prediction-tip-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
    margin-bottom: 12px;
}

.prediction-tips-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(139, 92, 246, 0.45);
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.prediction-tips-trigger:hover {
    color: var(--primary-vivid);
    text-decoration-color: var(--primary-vivid);
}

.prediction-tips-trigger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.prediction-tips-modal-content {
    max-width: 520px;
    text-align: left;
}

.prediction-tips-modal-content h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.prediction-tips-icon-wrap {
    text-align: center;
    margin-bottom: 0.75rem;
}

.prediction-tips-icon-wrap i {
    font-size: 2.25rem;
    color: var(--accent);
    opacity: 0.95;
}

.prediction-tips-body {
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.prediction-tips-body p {
    margin-bottom: 1rem;
}

.prediction-tips-body ul {
    margin: 0 0 1rem 1.1rem;
    padding: 0;
}

.prediction-tips-body li {
    margin-bottom: 0.65rem;
}

.prediction-tips-body li strong {
    color: var(--text-light);
}

.prediction-tips-note {
    font-size: 0.92rem;
    padding: 12px 14px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
    margin-bottom: 0 !important;
}

/* ===== Advanced prediction form (home hero) ===== */
.prediction-advanced-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin: 0;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.45);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.advanced-toggle:hover {
    color: var(--primary);
    border-color: rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.08);
}

.advanced-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.advanced-toggle-caret {
    font-size: 0.7rem;
    opacity: 0.85;
    transition: transform 0.25s ease;
}

.advanced-toggle[aria-expanded="true"] .advanced-toggle-caret {
    transform: rotate(180deg);
}

.advanced-panel {
    margin-bottom: 16px;
    padding: 18px 18px 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.advanced-panel .form-group {
    margin-bottom: 16px;
}

.advanced-panel .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

.advanced-panel .form-group label small {
    font-weight: 500;
    color: var(--text-muted);
}

.advanced-panel textarea,
.advanced-panel select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(6, 11, 24, 0.75);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 96px;
}

.advanced-panel textarea:focus,
.advanced-panel select:focus {
    outline: none;
    border-color: var(--primary-vivid);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.advanced-panel select {
    min-height: auto;
    cursor: pointer;
}

.advanced-char-counter {
    display: block;
    text-align: right;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.advanced-toggle-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.advanced-toggle-hint {
    display: block;
    margin-left: 50px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.advanced-disclaimer {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    background: var(--gold-bg);
    border: 1px solid var(--gold-border);
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.advanced-disclaimer i {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--gold);
}

.advanced-disclaimer p {
    margin: 0;
}

.prediction-private-row {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.private-disabled-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-style: italic;
}

.switch input:disabled + .slider {
    opacity: 0.45;
    cursor: not-allowed;
}

.switch input:disabled {
    cursor: not-allowed;
}

/* ===== Prediction submit loading overlay (AJAX; avoids blank screen during generate) ===== */
.prediction-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 8, 18, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.prediction-loading-overlay.is-visible {
    display: flex;
}

.prediction-loading-card {
    max-width: 440px;
    width: 100%;
    text-align: center;
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(139, 92, 246, 0.22);
    box-shadow: var(--shadow-md), 0 0 60px rgba(139, 92, 246, 0.08);
}

.prediction-loading-swarm {
    display: block;
    width: min(240px, 72vw);
    height: auto;
    margin: 0 auto 18px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.prediction-loading-spinner {
    width: 38px;
    height: 38px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-top-color: var(--primary-vivid);
    animation: prediction-loading-spin 0.85s linear infinite;
}

.prediction-loading-message {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.55;
    color: var(--text-light);
}

@keyframes prediction-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .prediction-loading-spinner {
        animation: none;
        border-top-color: var(--primary-vivid);
        opacity: 0.9;
    }
}

.prediction-options {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.btn-predict {
    background: linear-gradient(135deg, var(--primary-vivid), var(--accent));
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 16px 28px;
    border-radius: var(--radius-md);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

.btn-predict::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.12) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-predict:hover::before {
    transform: translateX(100%);
}

.btn-predict:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow), 0 4px 15px var(--primary-glow);
}

.btn-predict:active {
    transform: translateY(0) scale(0.98);
}

.cost-notice {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.82rem;
    margin-top: 12px;
}

.cost-notice i {
    margin-right: 4px;
}

.cost-notice-detail {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    line-height: 1.35;
    opacity: 0.92;
}

/* ===== Toggle Switch ===== */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    transition: var(--transition);
}

input:checked+.slider {
    background: var(--primary-vivid);
    border-color: transparent;
}

input:checked+.slider:before {
    transform: translateX(18px);
    background: white;
}

.slider.round {
    border-radius: 22px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== User Info ===== */
.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.credits {
    background: var(--gold-bg);
    color: var(--gold);
    padding: 7px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--gold-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== Section Titles ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary);
    font-size: 1rem;
}

/* ===== Predictions Feed ===== */
.latest-predictions {
    padding: 50px 0 40px;
}

.recent-predictions-more {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.recent-predictions-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-weight: 600;
}

.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.prediction-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.prediction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-vivid), var(--accent), var(--primary-vivid));
    opacity: 0;
    transition: var(--transition);
}

.prediction-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.prediction-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.completed {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.badge.pending {
    background: rgba(251, 191, 36, 0.1);
    color: var(--gold);
    border: 1px solid var(--gold-border);
}

.badge.failed {
    background: rgba(251, 113, 133, 0.12);
    color: var(--error);
    border: 1px solid rgba(251, 113, 133, 0.35);
}

.card-header .date {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.card-header-solo-date {
    justify-content: flex-end;
}

.prediction-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.prediction-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

.prediction-meta-pill i {
    font-size: 0.68rem;
    opacity: 0.85;
}

.prediction-meta-label {
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prediction-meta-value {
    font-weight: 700;
}

.prediction-meta-confidence {
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: var(--primary);
}

.prediction-meta-confidence .prediction-meta-value {
    color: var(--primary-vivid);
}

.prediction-meta-probability {
    background: var(--gold-bg);
    border: 1px solid var(--gold-border);
    color: var(--gold);
}

.prediction-meta-probability .prediction-meta-value {
    color: var(--gold);
}

.prediction-meta-advanced {
    background: rgba(244, 114, 182, 0.14);
    border: 1px solid rgba(244, 114, 182, 0.4);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.prediction-meta-advanced .prediction-meta-value {
    color: var(--accent);
}

/* Prediction detail: confidence + probability row */
.prediction-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.prediction-stat-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius);
}

.prediction-stat-box-confidence {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.prediction-stat-box-probability {
    background: var(--gold-bg);
    border: 1px solid var(--gold-border);
}

.prediction-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prediction-stat-value-confidence {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.prediction-stat-value-probability {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
}

/* ===== Prediction detail/article page ===== */
.prediction-article {
    max-width: 880px;
    margin: 32px auto 80px;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.prediction-breadcrumb {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.prediction-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.prediction-breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.prediction-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.prediction-breadcrumb a:hover {
    color: var(--primary);
}

.prediction-breadcrumb [aria-current="page"] {
    color: var(--text-light);
    font-weight: 600;
}

/* Hero */
.prediction-article-hero {
    padding: 32px 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.prediction-article-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(251, 191, 36, 0.10), transparent 55%);
    z-index: 0;
}

.prediction-article-hero > * {
    position: relative;
    z-index: 1;
}

.prediction-article-eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.prediction-article-id,
.prediction-article-status,
.prediction-article-private,
.prediction-article-advanced {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.prediction-article-id {
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: var(--primary);
}

.prediction-article-id strong {
    color: var(--primary-vivid);
    font-weight: 800;
}

.prediction-article-status {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
}

.prediction-article-private {
    background: var(--gold-bg);
    border: 1px solid var(--gold-border);
    color: var(--gold);
}

.prediction-article-advanced {
    background: rgba(244, 114, 182, 0.14);
    border: 1px solid rgba(244, 114, 182, 0.4);
    color: var(--accent);
}

.prediction-article-title {
    font-size: clamp(1.6rem, 3.2vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-light);
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

.prediction-article-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.prediction-article-byline-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prediction-article-byline-divider {
    color: var(--text-dim);
}

/* Stats grid */
.prediction-article-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.prediction-stat-tile {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
}

.prediction-stat-tile-confidence {
    border-color: rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.08);
}

.prediction-stat-tile-probability {
    border-color: var(--gold-border);
    background: var(--gold-bg);
}

.prediction-stat-tile-community {
    border-color: var(--success-border);
    background: var(--success-bg);
}

.prediction-stat-tile-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    font-size: 1rem;
}

.prediction-stat-tile-confidence .prediction-stat-tile-icon { color: var(--primary); }
.prediction-stat-tile-probability .prediction-stat-tile-icon { color: var(--gold); }
.prediction-stat-tile-community .prediction-stat-tile-icon { color: var(--success); }

.prediction-stat-tile-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.prediction-stat-tile-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.prediction-stat-tile-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-light);
    letter-spacing: -0.02em;
}

.prediction-stat-tile-confidence .prediction-stat-tile-value { color: var(--primary); }
.prediction-stat-tile-probability .prediction-stat-tile-value { color: var(--gold); }
.prediction-stat-tile-community .prediction-stat-tile-value { color: var(--success); }

.prediction-stat-tile-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 4px;
}

.prediction-stat-meter {
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
    margin-top: 8px;
}

.prediction-stat-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #f7d57a);
    border-radius: 999px;
    transition: width 0.6s ease;
}

.prediction-stat-meter-community .prediction-stat-meter-fill {
    background: linear-gradient(90deg, var(--success), #8be9c4);
}

/* Generic article section */
.prediction-article-section {
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.prediction-article-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.prediction-article-section-eyebrow-gold {
    color: var(--gold);
}

.prediction-article-section-eyebrow-advanced {
    color: var(--accent);
}

.prediction-article-advanced-section {
    border: 1px solid rgba(244, 114, 182, 0.28);
}

.prediction-article-advanced-intro {
    margin: 0 0 18px;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.prediction-article-advanced-intro strong {
    color: var(--text-light);
}

.prediction-article-advanced-meta {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.prediction-article-advanced-meta li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(244, 114, 182, 0.06);
}

.prediction-article-advanced-meta-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.prediction-article-advanced-meta-value {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
}

.prediction-article-advanced-context {
    margin-top: 4px;
}

.prediction-article-advanced-context-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0 0 10px;
}

.prediction-article-advanced-context-title i {
    color: var(--accent);
}

.prediction-article-advanced-context-body {
    margin: 0 0 10px;
    padding: 14px 18px;
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: rgba(244, 114, 182, 0.08);
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.prediction-article-advanced-context-note {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.82rem;
    line-height: 1.5;
}

.prediction-article-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-light);
    margin: 0 0 16px;
    letter-spacing: -0.3px;
}

.prediction-article-prompt {
    margin: 0;
    padding: 18px 22px;
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: rgba(0, 0, 0, 0.25);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light);
    font-style: italic;
}

.prediction-article-forecast {
    border-color: var(--gold-border);
}

.prediction-article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Share */
.prediction-share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.prediction-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.prediction-share-btn i {
    font-size: 1rem;
}

.prediction-share-btn:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md);
}

.prediction-share-x:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.prediction-share-reddit:hover { color: #ff4500; border-color: rgba(255, 69, 0, 0.5); }
.prediction-share-fb:hover { color: #4f8df1; border-color: rgba(79, 141, 241, 0.5); }
.prediction-share-li:hover { color: #4ea0e6; border-color: rgba(78, 160, 230, 0.5); }
.prediction-share-copy:hover { color: var(--primary); border-color: rgba(139, 92, 246, 0.5); }

.prediction-share-copy.is-copied {
    color: var(--success);
    border-color: var(--success-border);
    background: var(--success-bg);
}

/* Footer CTA */
.prediction-article-footer {
    margin-top: 8px;
}

.prediction-article-footer-card {
    text-align: center;
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.prediction-article-footer-card h3 {
    font-size: 1.3rem;
    color: var(--text-light);
    margin: 0 0 8px;
    font-weight: 800;
}

.prediction-article-footer-card p {
    color: var(--text-muted);
    margin: 0 0 18px;
}

.prediction-article-footer-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

@media (max-width: 640px) {
    .prediction-article-hero,
    .prediction-article-section {
        padding: 22px 20px;
    }
}

/* ===== Pending / Failed status pages ===== */
.prediction-status-page {
    max-width: 720px;
    margin: 40px auto 80px;
    padding: 0 16px;
}

.prediction-status-card {
    text-align: center;
    padding: 56px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.prediction-status-card-failed {
    border-color: rgba(239, 68, 68, 0.35);
}

.prediction-status-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
}

.prediction-status-icon-pending { color: var(--primary); }
.prediction-status-icon-failed {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
}

.prediction-status-icon-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bounching-swarm-models {
    animation: bounching-swarm-y 1.15s ease-in-out infinite;
    will-change: transform;
}

@keyframes bounching-swarm-y {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bounching-swarm-models {
        animation: none;
    }
}

.prediction-status-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-light);
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}

.prediction-status-title-failed {
    color: var(--error);
}

.prediction-status-text {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 14px;
}

.prediction-status-text-strong {
    color: var(--text-light);
    font-weight: 600;
}

.prediction-status-prompt {
    margin: 28px auto 0;
    padding: 18px 22px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    text-align: left;
    max-width: 580px;
}

.prediction-status-prompt-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.prediction-status-prompt p {
    margin: 8px 0 0;
    color: var(--text-light);
    font-style: italic;
    line-height: 1.5;
}

.prediction-status-eta {
    margin: 22px auto 0;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 580px;
    text-align: left;
    border-radius: var(--radius-md);
    border: 1px solid rgba(139, 92, 246, 0.22);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(15, 23, 42, 0.55) 100%);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.prediction-status-eta-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--primary);
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.28);
    margin-top: 2px;
}

.prediction-status-eta-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.prediction-card .prompt {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.prediction-card .summary {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Markdown-rendered prediction bodies */
.prediction-markdown {
    font-size: inherit;
    color: inherit;
    line-height: 1.65;
}

.prediction-markdown > :first-child {
    margin-top: 0;
}

.prediction-markdown > :last-child {
    margin-bottom: 0;
}

.prediction-markdown h1,
.prediction-markdown h2,
.prediction-markdown h3,
.prediction-markdown h4,
.prediction-markdown h5,
.prediction-markdown h6 {
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.35;
    margin: 1.1em 0 0.5em;
}

.prediction-markdown h1 { font-size: 1.35rem; }
.prediction-markdown h2 { font-size: 1.2rem; }
.prediction-markdown h3 { font-size: 1.08rem; }
.prediction-markdown h4 { font-size: 1rem; opacity: 0.95; }

.prediction-card .prediction-markdown h1 { font-size: 1.05rem; }
.prediction-card .prediction-markdown h2 { font-size: 1rem; }
.prediction-card .prediction-markdown h3 { font-size: 0.95rem; }
.prediction-card .prediction-markdown h4 { font-size: 0.9rem; }

.prediction-markdown p {
    margin: 0 0 0.85em;
}

.prediction-markdown ul,
.prediction-markdown ol {
    margin: 0 0 0.85em 1.15rem;
    padding: 0;
}

.prediction-markdown li {
    margin-bottom: 0.35em;
}

.prediction-markdown blockquote {
    margin: 0.75em 0;
    padding: 10px 14px;
    border-left: 3px solid var(--primary);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
}

.prediction-markdown hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 1.25em 0;
}

.prediction-markdown code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.88em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.12);
    color: var(--text-light);
}

.prediction-markdown pre {
    overflow-x: auto;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    margin: 0.85em 0;
}

.prediction-markdown pre code {
    background: transparent;
    padding: 0;
    font-size: 0.82rem;
}

.prediction-markdown strong {
    color: var(--text-light);
    font-weight: 700;
}

.prediction-markdown a {
    color: var(--primary-vivid);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prediction-ellipsis {
    font-weight: 700;
    color: var(--primary);
    margin-left: 2px;
}

.formatted-prediction strong {
    color: var(--text-light);
    font-weight: 700;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-dim);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 14px;
    display: block;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ===== Home: Stats strip ===== */
.home-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 32px 0 56px;
}

.home-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    transition: var(--transition);
}

.home-stat:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.home-stat-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    font-size: 1.05rem;
}

.home-stat-icon-purple { color: var(--primary); background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.3); }
.home-stat-icon-gold   { color: var(--gold);    background: var(--gold-bg);          border-color: var(--gold-border); }
.home-stat-icon-pink   { color: var(--accent);  background: rgba(244, 114, 182, 0.12); border-color: rgba(244, 114, 182, 0.3); }
.home-stat-icon-green  { color: var(--success); background: var(--success-bg);       border-color: var(--success-border); }

.home-stat-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.home-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-light);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--gold), #f7d57a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* ===== Home: Section header / shared ===== */
.home-section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 28px;
    padding: 0 8px;
}

.home-section-header-left {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.home-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.home-section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text-light);
    line-height: 1.2;
    letter-spacing: -0.4px;
    margin: 0 0 12px;
}

.home-section-lead {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

/* ===== Home: Features grid ===== */
.home-features {
    margin: 56px 0;
}

.home-features-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.home-feature {
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.home-feature:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.home-feature-image {
    display: block;
    width: 90%; 
    height: auto;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    margin-left: auto;
    margin-right: auto;
}
.home-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    margin-bottom: 14px;
    border: 1px solid var(--glass-border);
}

.home-feature-icon-purple { color: var(--primary); background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.3); }
.home-feature-icon-gold   { color: var(--gold);    background: var(--gold-bg);          border-color: var(--gold-border); }
.home-feature-icon-pink   { color: var(--accent);  background: rgba(244, 114, 182, 0.12); border-color: rgba(244, 114, 182, 0.3); }
.home-feature-icon-green  { color: var(--success); background: var(--success-bg);       border-color: var(--success-border); }

.home-feature h3 {
    font-size: 1.04rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0 0 6px;
}

.home-feature p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.home-features-footer {
    text-align: center;
}

/* ===== Home: FAQ ===== */
.home-faq {
    margin: 56px 0;
}

.home-faq-list {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-faq-item {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0 22px;
    transition: var(--transition);
}

.home-faq-item[open] {
    border-color: rgba(139, 92, 246, 0.4);
}

.home-faq-question {
    list-style: none;
    cursor: pointer;
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-light);
}

.home-faq-question::-webkit-details-marker {
    display: none;
}

.home-faq-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: var(--primary);
    transition: var(--transition);
}

.home-faq-item[open] .home-faq-toggle {
    transform: rotate(45deg);
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
}

.home-faq-answer {
    padding-bottom: 18px;
}

.home-faq-answer p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* ===== Home: Final CTA ===== */
.home-cta {
    margin: 32px 0 16px;
}

.home-cta-card {
    text-align: center;
    padding: 40px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.home-cta-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(251, 191, 36, 0.10), transparent 55%);
}

.home-cta-card > * {
    position: relative;
    z-index: 1;
}

.home-cta-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary-vivid), var(--accent));
    color: #fff;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px var(--primary-glow);
}

.home-cta-card h2 {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    color: var(--text-light);
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.home-cta-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 22px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.home-cta-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

@media (max-width: 640px) {
    .home-stats { margin: 28px 0 40px; }
    .home-features { margin: 40px 0; }
    .home-faq { margin: 40px 0; }
    .home-cta-card { padding: 30px 22px; }
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-dim);
    font-size: 0.82rem;
    border-top: 1px solid var(--glass-border);
}

/* ===== Modals ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px 0;
}

#auth-modal .modal-content.glass {
    max-width: 460px;
}

.modal-content.glass {
    background: var(--bg-surface);
    margin: 4vh auto;
    padding: 32px;
    border: 1px solid var(--glass-border);
    width: 92%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.close {
    color: var(--text-dim);
    float: right;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    line-height: 1;
}

.close:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
}

.auth-invite-banner {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.22);
}

.auth-explainer {
    margin: 6px 0 4px;
    color: var(--text-dim);
}

.auth-explainer small {
    line-height: 1.45;
}

.auth-checkbox-row {
    margin-bottom: 16px;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-muted);
    cursor: pointer;
    margin: 0;
}

.auth-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: var(--primary-vivid);
    cursor: pointer;
}

.auth-checkbox-label span {
    flex: 1;
    min-width: 0;
}

.auth-checkbox-label a {
    color: var(--primary-vivid);
    text-decoration: underline;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(6, 11, 24, 0.7);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-vivid);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(6, 11, 24, 0.7);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-vivid);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.page-form-section {
    padding-bottom: 48px;
}

.page-form-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 28px 26px 24px;
    border-radius: var(--radius-lg);
}

.page-form-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    line-height: 1.45;
    margin-bottom: 20px;
}

.page-form-alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

.page-form-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.page-form-alert-error {
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.35);
    color: var(--error);
}

.turnstile-wrap {
    margin-bottom: 8px;
}

.turnstile-wrap .cf-turnstile {
    margin-left: auto;
    margin-right: auto;
}

.page-form-footnote {
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.page-form-footnote a {
    color: var(--primary-vivid);
    text-decoration: none;
    font-weight: 600;
}

.page-form-footnote a:hover {
    text-decoration: underline;
}

.label-optional {
    font-weight: 400;
    color: var(--text-dim);
    font-size: 0.85em;
}

.toggle-auth {
    text-align: center;
    margin-top: 18px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.toggle-auth a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.toggle-auth a:hover {
    color: var(--accent);
}

/* Field validation hints */
.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.78rem;
    min-height: 16px;
}

.field-hint.error {
    color: var(--error);
}

.field-hint.success {
    color: var(--success);
}

/* Password strength bar */
.pw-strength {
    margin-top: 8px;
}

.pw-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.pw-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
}

.pw-strength small {
    font-size: 0.76rem;
    color: var(--text-dim);
}

/* ===== Toast Notifications ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px 22px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    animation: toastIn 0.4s ease, toastOut 0.4s ease 3.6s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--error);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(10px);
        pointer-events: none;
    }
}

/* ===== Utilities ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* ===== Typography ===== */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

/* ===== Header Nav Right ===== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-nav-cta {
    font-size: 0.85rem;
    padding: 8px 18px;
}

/* ===== Hamburger ===== */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger:hover span {
    background: var(--text-color);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Nav Panel ===== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-panel {
    position: fixed;
    top: 0;
    right: -340px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    background: var(--bg-surface);
    border-left: 1px solid var(--glass-border);
    z-index: 1100;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
}

.nav-panel.active {
    right: 0;
}

.nav-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.nav-panel-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.nav-panel-close:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
}

.nav-links {
    list-style: none;
    padding: 16px 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.nav-links li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-links li a:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.04);
}

.nav-links li a i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary);
}

.nav-panel-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

/* ===== Footer ===== */
.site-footer {
    border-top: 1px solid var(--glass-border);
    margin-top: 40px;
    padding-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
}

.footer-brand .logo {
    margin-bottom: 10px;
    display: inline-flex;
}

.footer-tagline {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.5;
}

.footer-col h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 14px;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-disclaimer {
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 18px 0;
    margin-bottom: 20px;
}

.footer-disclaimer p {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.6;
    text-align: center;
}

.footer-disclaimer i {
    color: var(--gold);
    margin-right: 6px;
}

.footer-bottom {
    text-align: center;
    padding-bottom: 24px;
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* ===== Legal / Content Pages ===== */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 0 60px;
}

.page-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.page-content .page-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.page-content h2 {
    font-size: 1.3rem;
    margin: 32px 0 12px;
    color: var(--primary);
} 

.page-content h3 {
    font-size: 1.1rem;
    margin: 24px 0 8px;
}

.page-content p,
.page-content li {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.75;
    margin-bottom: 12px;
}

.page-content ul,
.page-content ol {
    padding-left: 20px;
    margin-bottom: 16px;
}

.page-content a {
    color: var(--primary);
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content .contact-info {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 20px 0;
}

/* 404 */
.error-404 {
    padding: 48px 16px 72px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.error-404-card {
    max-width: 520px;
    width: 100%;
    text-align: center;
    padding: 40px 32px 44px;
    border-radius: var(--radius-lg);
}

.error-404-image-wrap {
    display: flex;
    justify-content: center;
    margin: -8px 0 18px;
}

.error-404-image {
    width: clamp(200px, 60%, 320px);
    height: auto;
    display: block;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.error-404-code {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #f5c454, var(--gold, #d4a04a));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-404-heading {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 14px;
    color: var(--gold, #f5c454);
    letter-spacing: -0.02em;
}

.error-404-heading-strong {
    color: var(--text-light);
}

.error-404-text {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 28px;
    font-size: 1rem;
}

.error-404-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 520px) {
    .error-404-card {
        padding: 32px 22px 36px;
    }

    .error-404-code {
        font-size: 4rem;
    }

    .error-404-heading {
        font-size: 1.6rem;
    }
}

/* ===== Dashboard ===== */
.dashboard-page {
    padding: 28px 0 80px;
}

/* Welcome banner */
.dashboard-welcome {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 28px 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.dashboard-welcome::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(251, 191, 36, 0.08), transparent 55%);
}

.dashboard-welcome > * {
    position: relative;
    z-index: 1;
}

.dashboard-welcome-avatar {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-vivid), var(--accent));
    color: #fff;
    font-weight: 800;
    font-size: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px var(--primary-glow);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.dashboard-welcome-body {
    flex: 1;
    min-width: 0;
}

.dashboard-welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.dashboard-welcome-title {
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 800;
    color: var(--text-light);
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -0.4px;
}

.dashboard-welcome-name {
    background: linear-gradient(135deg, var(--gold), #f7d57a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gold);
}

.dashboard-welcome-text {
    color: var(--text-muted);
    margin: 0 0 16px;
    line-height: 1.6;
    font-size: 0.96rem;
}

.dashboard-welcome-text strong {
    color: var(--text-light);
}

.dashboard-welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 640px) {
    .dashboard-welcome {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px;
    }
    .dashboard-welcome-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Stats strip */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 40px;
}

.dashboard-stat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    transition: var(--transition);
}

.dashboard-stat:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.dashboard-stat-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
}

.dashboard-stat-credits   .dashboard-stat-icon { color: var(--gold);    background: var(--gold-bg);          border-color: var(--gold-border); }
.dashboard-stat-total     .dashboard-stat-icon { color: var(--primary); background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.30); }
.dashboard-stat-completed .dashboard-stat-icon { color: var(--success); background: var(--success-bg);       border-color: var(--success-border); }
.dashboard-stat-pending   .dashboard-stat-icon { color: var(--accent);  background: rgba(244, 114, 182, 0.12); border-color: rgba(244, 114, 182, 0.30); }
.dashboard-stat-invites   .dashboard-stat-icon { color: var(--primary); background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.30); }

.dashboard-stat-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.dashboard-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text-light);
}

.dashboard-stat-credits   .dashboard-stat-value { color: var(--gold); }
.dashboard-stat-total     .dashboard-stat-value { color: var(--primary); }
.dashboard-stat-completed .dashboard-stat-value { color: var(--success); }
.dashboard-stat-pending   .dashboard-stat-value { color: var(--accent); }
.dashboard-stat-invites   .dashboard-stat-value { color: var(--primary); }

.dashboard-stat-label {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.dashboard-stat-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.dashboard-stat-sub a {
    color: var(--primary);
    text-decoration: none;
}

.dashboard-stat-sub a:hover {
    color: var(--primary-vivid);
    text-decoration: underline;
}

/* Section header */
.dashboard-section {
    margin-top: 12px;
}

.dashboard-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.dashboard-section-title {
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    font-weight: 800;
    color: var(--text-light);
    margin: 0 0 6px;
    letter-spacing: -0.4px;
}

.dashboard-section-lead {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.dashboard-section-cta {
    align-self: flex-end;
}

/* Filter pills */
.dashboard-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 6px;
}

.dashboard-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.dashboard-filter:hover {
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--text-light);
}

.dashboard-filter.is-active {
    background: linear-gradient(135deg, var(--primary-vivid), var(--accent));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.dashboard-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: inherit;
    font-size: 0.72rem;
    font-weight: 700;
}

.dashboard-filter.is-active .dashboard-filter-count {
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
}

/* Dashboard prediction grid */
.dashboard-predictions-grid {
    margin-top: 4px;
}

.dashboard-prediction-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.dashboard-prediction-link .prediction-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dashboard-private-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.28);
}

.dashboard-status-note {
    font-size: 0.88rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 0 !important;
}

.dashboard-status-note i {
    margin-right: 6px;
    color: var(--primary);
}

.dashboard-status-error {
    color: var(--error) !important;
}

.dashboard-status-error i {
    color: var(--error);
}

/* Empty states */
.dashboard-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 52px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    margin-top: 8px;
}

.dashboard-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
}

.dashboard-empty h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 800;
}

.dashboard-empty p {
    margin: 0 0 18px;
    color: var(--text-muted);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .dashboard-stat-value {
        font-size: 1.4rem;
    }

    .dashboard-section-cta {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Invitations (dashboard + accept flow) ===== */
.dashboard-invitation-page {
    padding: 28px 0 80px;
}

.dashboard-invitation-page .dashboard-header,
.dashboard-invitation-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.dashboard-invitation-page .dashboard-title {
    font-size: clamp(1.5rem, 2.4vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text-light);
    margin: 0 0 6px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.dashboard-invitation-page .dashboard-title i {
    color: var(--primary);
}

.dashboard-invitation-page .dashboard-subtitle {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 0.95rem;
    max-width: 60ch;
}

.dashboard-invitation-back {
    white-space: nowrap;
}

/* Stat cards */
.dashboard-invitation-page .dashboard-card {
    padding: 22px 22px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition);
}

.dashboard-invitation-page .dashboard-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.dashboard-invitation-page .dashboard-card-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.dashboard-invitation-page .dashboard-card-label i {
    color: var(--primary);
}

.dashboard-invitation-page .dashboard-card-hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.dashboard-invitation-page .dashboard-credits-value,
.dashboard-invitation-page .invites-stat-number {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--gold);
    background: linear-gradient(135deg, var(--gold), #f7d57a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.invites-stat-card {
    min-height: 100%;
}

/* Two-column main grid: keep grid items from overflowing */
.invite-column-left,
.invite-column-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Section heads (form / list) */
.dashboard-section-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.dashboard-section-head .section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dashboard-section-head .section-title i {
    color: var(--primary);
}

.dashboard-section-desc {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* "How invites work" panel: re-style heading to match section heads */
.invite-how-panel .section-title {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.invite-how-panel .section-title i {
    color: var(--primary);
}

.invite-flash {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 22px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.invite-flash-success {
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: var(--success);
}

.invite-flash-error {
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: var(--error);
}

.invites-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}

@media (max-width: 960px) {
    .invites-stat-grid {
        grid-template-columns: 1fr;
    }
}

.invites-stat-number-muted {
    font-size: 2.75rem;
    opacity: 0.85;
}

.invites-stat-number-accent {
    font-size: 2.75rem;
    color: var(--primary-vivid);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.dashboard-invite-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 28px;
    align-items: start;
}

@media (max-width: 1100px) {
    .dashboard-invite-main-grid {
        grid-template-columns: 1fr;
    }
}

.invite-how-panel {
    padding: 24px 22px;
    border-radius: var(--radius-lg);
}

.invite-how-list {
    margin: 12px 0 0;
    padding-left: 1.15rem;
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 0.92rem;
}

.invite-how-list li {
    margin-bottom: 10px;
}

.invite-form {
    padding: 22px;
    border-radius: var(--radius-lg);
}

.invite-form .form-group {
    margin-bottom: 18px;
}

.invite-form-actions {
    margin-top: 8px;
}

.invite-list-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.invite-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.invite-list th,
.invite-list td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.invite-list th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

.invite-list tbody tr:last-child td {
    border-bottom: none;
}

.invite-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invite-status-pill.pending {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #eab308;
}

.invite-status-pill.accepted {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: var(--success);
}

.invite-status-pill.expired {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: var(--text-muted);
}

.dashboard-invite-card .invites-dashboard-inline {
    font-size: 2.6rem;
}

.auth-invite-note {
    margin: 14px 0 0;
    text-align: center;
    color: var(--text-dim);
    line-height: 1.45;
}

.invite-accept-page {
    padding: 48px 16px 72px;
    min-height: 60vh;
}

.invite-accept-inner {
    max-width: 520px;
    margin: 0 auto;
}

.invite-accept-card {
    padding: 36px 28px 32px;
    border-radius: var(--radius-lg);
}

.invite-accept-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 14px;
}

.invite-accept-title {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 12px;
    color: var(--text-light);
}

.invite-accept-lead {
    margin: 0 0 24px;
    color: var(--text-muted);
    line-height: 1.55;
}

.invite-readonly-email {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-muted);
    cursor: not-allowed;
}

.invite-accept-footnote {
    margin: 22px 0 0;
    text-align: center;
    font-size: 0.9rem;
}

.invite-invalid-page {
    padding: 72px 16px;
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.invite-invalid-inner {
    max-width: 460px;
    text-align: center;
    padding: 44px 32px;
    border-radius: var(--radius-lg);
}

.invite-invalid-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.invite-invalid-title {
    margin: 0 0 12px;
    font-size: 1.5rem;
    color: var(--text-light);
}

.invite-invalid-text {
    margin: 0 0 24px;
    color: var(--text-muted);
    line-height: 1.6;
}

.invite-empty-list {
    margin-top: 8px;
}

/* ===== Prediction agree/disagree votes ===== */
.prediction-votes {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.prediction-votes-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin: 0 0 14px;
}

.prediction-votes-cta {
    margin: 0 0 14px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.prediction-votes-cta a {
    color: var(--primary-vivid);
    text-decoration: underline;
}

.prediction-vote-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.prediction-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-light);
    font: 600 0.95rem 'Outfit', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.prediction-vote-btn:hover:not([disabled]) {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.prediction-vote-btn[disabled] {
    cursor: not-allowed;
    opacity: 0.7;
}

.prediction-vote-agree {
    border: 1px solid var(--gold);
}

.prediction-vote-disagree {
    border: 1px solid var(--error);
}

.prediction-vote-emoji {
    font-size: 1.25rem;
    line-height: 1;
}

.prediction-vote-label {
    letter-spacing: 0.02em;
}

.prediction-vote-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    transition: var(--transition);
}

.prediction-vote-agree.is-active {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.5);
    color: var(--gold);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.prediction-vote-agree.is-active .prediction-vote-count {
    background: rgba(251, 191, 36, 0.2);
    color: var(--gold);
}

.prediction-vote-disagree.is-active {
    background: rgba(251, 113, 133, 0.12);
    border-color: rgba(251, 113, 133, 0.5);
    color: var(--error);
    box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.1);
}

.prediction-vote-disagree.is-active .prediction-vote-count {
    background: rgba(251, 113, 133, 0.2);
    color: var(--error);
}

.prediction-vote-btn.is-busy {
    opacity: 0.7;
    pointer-events: none;
}

.prediction-vote-hint {
    margin: 12px 0 0;
    font-size: 0.78rem;
    color: var(--text-dim);
    min-height: 1em;
}

/* ===== About Page ===== */
.about-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 0 80px;
}

.about-hero {
    text-align: center;
    padding: 48px 16px 56px;
    position: relative;
}

.about-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.about-hero-badge .pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.about-hero-title {
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin: 0 0 18px;
    color: var(--text-light);
}

.about-hero-lead {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 760px;
    margin: 0 auto 26px;
}

.about-hero-lead strong {
    color: var(--text-light);
}

.about-hero-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.about-section {
    margin: 56px 0;
    padding: 0 16px;
}

.about-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.about-section-title {
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 12px;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

.about-section-lead {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 820px;
    margin: 0 0 28px;
}

/* Feature grid */
.about-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 8px;
}

.about-feature {
    padding: 22px 22px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.about-feature::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(167, 139, 250, 0.08), transparent 60%);
    opacity: 0;
    transition: var(--transition);
}

.about-feature:hover {
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-md);
}

.about-feature:hover::before {
    opacity: 1;
}

.about-feature h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 14px 0 6px;
    color: var(--text-light);
}

.about-feature p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

.about-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.1rem;
    border: 1px solid var(--glass-border);
}

.about-feature-icon-primary {
    color: var(--primary);
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.25);
}

.about-feature-icon-gold {
    color: var(--gold);
    background: var(--gold-bg);
    border-color: var(--gold-border);
}

.about-feature-icon-accent {
    color: var(--accent);
    background: rgba(244, 114, 182, 0.12);
    border-color: rgba(244, 114, 182, 0.25);
}

.about-feature-icon-success {
    color: var(--success);
    background: var(--success-bg);
    border-color: var(--success-border);
}

/* Spotlight */
.about-spotlight {
    padding: 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.about-spotlight::after {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(251, 191, 36, 0.12), transparent 55%);
    z-index: 0;
}

.about-spotlight-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

@media (max-width: 820px) {
    .about-spotlight-grid {
        grid-template-columns: 1fr;
    }
}

.about-spotlight-text p {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 14px;
}

.about-spotlight-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
}

.about-spotlight-list li {
    position: relative;
    padding-left: 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.about-spotlight-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.about-spotlight-list li strong {
    color: var(--text-light);
}

.about-spotlight-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.about-stat {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    text-align: left;
}

.about-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--gold), #f7d57a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gold);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.about-stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Smarter loop */
.about-loop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.about-loop-card {
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    position: relative;
}

.about-loop-step {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--primary);
    margin-bottom: 8px;
}

.about-loop-card h3 {
    font-size: 1.02rem;
    color: var(--text-light);
    margin: 0 0 6px;
}

.about-loop-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}

/* Philosophy */
.about-philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.about-philosophy-card {
    padding: 26px 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.about-philosophy-card h3 {
    font-size: 1.05rem;
    color: var(--text-light);
    margin: 14px 0 6px;
}

.about-philosophy-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Disclaimer */
.about-disclaimer {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 22px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gold-border);
    background: var(--gold-bg);
}

.about-disclaimer-icon {
    color: var(--gold);
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 4px;
}

.about-disclaimer-body h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0 0 6px;
}

.about-disclaimer-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Closing CTA */
.about-cta {
    text-align: center;
    padding: 36px 16px 24px;
}

.about-cta .about-section-lead {
    margin-left: auto;
    margin-right: auto;
    max-width: 580px;
}

@media (max-width: 640px) {
    .about-section {
        margin: 40px 0;
    }

    .about-spotlight {
        padding: 24px;
    }
}

/* ===== How It Works Page ===== */
.howitworks-page .hiw-highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 768px) {
    .howitworks-page .hiw-highlight-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.hiw-timeline {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hiw-timeline::before {
    content: "";
    position: absolute;
    left: 28px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 50%, var(--gold) 100%);
    opacity: 0.35;
    border-radius: 2px;
}

.hiw-step {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px;
    padding: 22px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    align-items: flex-start;
    position: relative;
    transition: var(--transition);
}

.hiw-step:hover {
    border-color: var(--glass-border-hover);
    transform: translateX(2px);
    box-shadow: var(--shadow-md);
}

.hiw-step-num {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--text-light);
    background:
        radial-gradient(circle at 30% 30%, rgba(167, 139, 250, 0.35), rgba(244, 114, 182, 0.15) 60%, transparent 80%),
        rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.45);
    position: relative;
    z-index: 1;
}

.hiw-step-body {
    min-width: 0;
}

.hiw-step-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.hiw-step-icon {
    color: var(--primary);
    font-size: 1rem;
}

.hiw-step h3 {
    font-size: 1.08rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
}

.hiw-step p {
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.65;
    margin: 0 0 8px;
}

.hiw-step p:last-child {
    margin-bottom: 0;
}

.hiw-step strong {
    color: var(--text-light);
}

.about-credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.about-credits-card {
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.about-credits-card h3 {
    font-size: 1.05rem;
    color: var(--text-light);
    margin: 14px 0 6px;
}

.about-credits-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 0;
}

.about-credits-card strong {
    color: var(--text-light);
}

@media (max-width: 640px) {
    .hiw-timeline::before {
        left: 22px;
    }

    .hiw-step {
        padding: 18px;
        grid-template-columns: 48px 1fr;
        gap: 12px;
    }

    .hiw-step-num {
        width: 44px;
        height: 44px;
        font-size: 0.95rem;
    }
}

/* ===== Predictions Page ===== */
.predictions-page {
    padding: 32px 0 80px;
}

/* Hero */
.predictions-hero {
    text-align: center;
    padding: 24px 16px 36px;
    margin-bottom: 24px;
}

.predictions-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.predictions-hero-badge .pulse-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.predictions-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: var(--text-light);
    margin: 0 0 14px;
}

.predictions-hero-lead {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 720px;
    margin: 0 auto 24px;
}

.predictions-hero-stats {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.predictions-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    padding: 4px 14px;
    border-right: 1px solid var(--glass-border);
}

.predictions-hero-stat:last-child {
    border-right: none;
}

.predictions-hero-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--gold), #f7d57a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--gold);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.predictions-hero-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
}

@media (max-width: 540px) {
    .predictions-hero-stat {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        width: 100%;
        padding-bottom: 12px;
    }
    .predictions-hero-stat:last-child { border-bottom: none; padding-bottom: 4px; }
}

/* Search v2 */
.predictions-search {
    position: relative;
    max-width: 720px;
    margin: 0 auto 28px;
}

.predictions-search-v2 {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 6px 6px 6px 48px;
    transition: var(--transition);
}

.predictions-search-v2:focus-within {
    border-color: var(--primary-vivid);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.predictions-search-v2 > i.fa-magnifying-glass {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}

.predictions-search-v2 input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 8px;
    font-size: 0.98rem;
    color: var(--text-light);
    font-family: inherit;
    min-width: 0;
}

.predictions-search-v2 input:focus {
    outline: none;
}

.predictions-search-v2 input::placeholder {
    color: var(--text-dim);
}

.predictions-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-dim);
    text-decoration: none;
    transition: var(--transition);
    margin-right: 4px;
}

.predictions-search-clear:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.06);
}

.predictions-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--primary-vivid), var(--accent));
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.predictions-search-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

/* Result info bar */
.predictions-result-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 0 4px;
}

.predictions-result-info-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.predictions-result-info-text strong {
    color: var(--text-light);
}

.predictions-clear-link {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.predictions-clear-link:hover {
    color: var(--primary-vivid);
    text-decoration: underline;
}

/* Card link wrapper + read CTA */
.prediction-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.prediction-card-link .prediction-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.prediction-card-prompt {
    margin: 0 0 10px;
}

.prediction-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 14px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(4px);
    transition: var(--transition);
}

.prediction-card-link:hover .prediction-card-cta {
    opacity: 1;
    transform: translateY(0);
}

.prediction-card-link:hover .prediction-card-cta i {
    transform: translateX(2px);
}

/* Empty state */
.predictions-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.predictions-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
}

.predictions-empty h3 {
    font-size: 1.25rem;
    color: var(--text-light);
    margin: 0 0 8px;
    font-weight: 800;
}

.predictions-empty p {
    color: var(--text-muted);
    margin: 0 0 18px;
    line-height: 1.6;
}

/* Pagination v2 */
.predictions-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 36px;
}

.predictions-pagination-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.predictions-pagination-arrow:hover {
    color: var(--primary);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

.predictions-pagination-arrow.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.predictions-pagination-pages {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.predictions-pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.predictions-pagination-page:hover {
    color: var(--primary);
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
}

.predictions-pagination-page.is-active {
    background: linear-gradient(135deg, var(--primary-vivid), var(--accent));
    color: #fff;
    border-color: transparent;
    cursor: default;
}

.predictions-pagination-ellipsis {
    color: var(--text-dim);
    padding: 0 4px;
    user-select: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: 45vh;
        padding-top: 40px;
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }

    .prediction-box {
        padding: 18px;
    }

    .input-group input {
        padding: 15px 15px 15px 44px;
        font-size: 0.95rem;
    }

    .btn-predict {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .predictions-grid {
        grid-template-columns: 1fr;
    }

    .home-features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .home-stats {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.2rem;
    }

    header.navbar {
        padding: 16px 0;
    }

    .logo {
        font-size: 1.15rem;
    }

    .btn-nav-cta {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .credits {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

/* ===== System admin (/system-admin/*) ===== */
.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;
}

.admin-body {
    min-height: 100vh;
    background: var(--bg-deep);
}

.admin-body.admin-nav-open {
    overflow: hidden;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

/* Mobile drawer chrome hidden on desktop */
.admin-mobile-bar,
.admin-nav-backdrop,
.admin-sidebar-close {
    display: none;
}

.admin-nav-toggle-close {
    display: none;
}

.admin-shell.is-admin-nav-open .admin-nav-toggle-bars {
    display: none;
}

.admin-shell.is-admin-nav-open .admin-nav-toggle-close {
    display: inline;
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--glass-border);
    position: relative;
}

.admin-sidebar-brand {
    margin-bottom: 4px;
}

.admin-sidebar-logo.logo {
    align-items: flex-start;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--primary);
}

.admin-sidebar-logo .logo-icon {
    max-width: 40px;
    margin-top: 2px;
}

.logo-wordmark-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    line-height: 1.15;
}

.admin-sidebar-logo .admin-sidebar-badge {
    margin: 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.68rem;
}

.admin-sidebar-badge {
    font-weight: 600;
    opacity: 0.75;
    font-size: 0.75rem;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 28px;
    flex: 1;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background var(--transition), color var(--transition);
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
}

.admin-sidebar-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--glass-border);
}

.admin-sidebar-meta {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    word-break: break-all;
}

.admin-logout-form {
    margin-top: 8px;
}

.admin-main {
    flex: 1;
    padding: 28px 32px 48px;
    overflow-x: auto;
}

.admin-page-inner {
    max-width: 1100px;
}

.admin-h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.admin-h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 20px 0 12px;
    color: var(--text-muted);
}

.admin-back {
    margin-bottom: 12px;
}

.admin-back a {
    color: var(--primary);
    text-decoration: none;
}

.admin-back a:hover {
    text-decoration: underline;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.admin-stat {
    padding: 18px 16px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}

.admin-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-toolbar,
.admin-toolbar-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.admin-toolbar-wrap {
    align-items: flex-end;
}

.admin-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--bg-surface);
    color: var(--text-color);
}

.admin-select {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--bg-surface);
    color: var(--text-color);
}

.admin-table-wrap {
    border-radius: var(--radius-md);
    overflow: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.admin-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.admin-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.admin-link:hover {
    text-decoration: underline;
}

.admin-pagination {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.admin-page-num {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.admin-detail-card {
    padding: 22px;
    border-radius: var(--radius-md);
}

.admin-detail-card-wide {
    grid-column: 1 / -1;
}

.admin-dl {
    display: grid;
    grid-template-columns: minmax(100px, 140px) 1fr;
    gap: 8px 16px;
    font-size: 0.92rem;
}

.admin-dl dt {
    color: var(--text-dim);
}

.admin-dl dd {
    margin: 0;
    word-break: break-word;
}

.admin-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.admin-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.admin-stack-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-stack-form textarea,
.admin-stack-form input[type="number"] {
    width: 100%;
}

.admin-num-input {
    width: 120px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--bg-surface);
    color: var(--text-color);
}

.admin-pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.88rem;
    line-height: 1.5;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    max-height: 320px;
    overflow: auto;
}

.admin-code {
    font-size: 0.85rem;
}

.admin-edit-form {
    padding: 22px;
    border-radius: var(--radius-md);
    margin-top: 20px;
}

.admin-textarea-code {
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
}

.admin-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.admin-checkbox-row {
    padding-top: 24px;
}

.admin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
}

.admin-badge-pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--gold);
}

.admin-badge-completed {
    background: var(--success-bg);
    color: var(--success);
}

.admin-badge-failed {
    background: rgba(251, 113, 133, 0.12);
    color: var(--error);
}

.admin-cell-prompt {
    max-width: 360px;
}

.admin-actions-cell {
    white-space: nowrap;
}

.admin-inline-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-login-card {
    width: 100%;
    max-width: 400px;
    padding: 36px 32px;
    border-radius: var(--radius-lg);
}

.admin-login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.admin-login-logo.logo {
    justify-content: center;
    flex-wrap: wrap;
}

.admin-login-logo .logo-icon {
    max-width: 52px;
}

.admin-login-sub {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 22px;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .admin-shell {
        flex-direction: column;
        position: relative;
    }

    .admin-mobile-bar {
        display: flex;
        align-items: center;
        gap: 14px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1320;
        min-height: calc(52px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 12px 0 10px;
        border-bottom: 1px solid var(--glass-border);
        background: linear-gradient(180deg, rgba(14, 12, 28, 0.96) 0%, rgba(12, 16, 32, 0.92) 100%);
        backdrop-filter: blur(14px) saturate(140%);
        -webkit-backdrop-filter: blur(14px) saturate(140%);
    }

    .admin-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: none;
        border-radius: var(--radius-sm);
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-color);
        cursor: pointer;
        transition:
            background var(--transition),
            color var(--transition),
            transform 0.2s ease;
    }

    .admin-nav-toggle:hover {
        background: rgba(255, 255, 255, 0.14);
        color: var(--primary);
    }

    .admin-nav-toggle:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

    .admin-nav-toggle .fa-bars,
    .admin-nav-toggle .fa-xmark {
        font-size: 1.15rem;
        line-height: 1;
    }

    .admin-mobile-bar-title {
        font-weight: 700;
        font-size: 1.05rem;
        letter-spacing: -0.02em;
        color: var(--primary);
        text-decoration: none;
    }

    .admin-mobile-bar-title:hover {
        color: var(--text-color);
    }

    .admin-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1300;
        background: rgba(0, 0, 0, 0.52);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease;
    }

    .admin-shell.is-admin-nav-open .admin-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-sidebar {
        position: fixed;
        top: calc(52px + env(safe-area-inset-top, 0px));
        left: 0;
        width: min(292px, 86vw);
        max-width: 100%;
        height: calc(100vh - 52px - env(safe-area-inset-top, 0px));
        height: calc(100dvh - 52px - env(safe-area-inset-top, 0px));
        margin: 0;
        z-index: 1310;
        transform: translate3d(-100%, 0, 0);
        transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        box-shadow: 16px 0 48px rgba(0, 0, 0, 0.45);
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .admin-shell.is-admin-nav-open .admin-sidebar {
        transform: translate3d(0, 0, 0);
    }

    .admin-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 14px;
        right: 12px;
        width: 42px;
        height: 42px;
        padding: 0;
        border: none;
        border-radius: var(--radius-sm);
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-muted);
        cursor: pointer;
        z-index: 2;
        transition:
            background var(--transition),
            color var(--transition);
    }

    .admin-sidebar-close:hover {
        background: rgba(255, 255, 255, 0.12);
        color: var(--text-color);
    }

    .admin-sidebar-close:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

    .admin-sidebar-close .fa-xmark {
        font-size: 1.1rem;
    }

    .admin-sidebar-brand {
        padding-right: 48px;
    }

    .admin-nav {
        flex-direction: column;
        flex-wrap: nowrap;
        margin-top: 28px;
        width: 100%;
    }

    .admin-sidebar-footer {
        width: 100%;
        margin-top: 24px;
    }

    .admin-main {
        width: 100%;
        padding: calc(20px + 52px + env(safe-area-inset-top, 0px)) 16px 40px;
    }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    .admin-sidebar,
    .admin-nav-backdrop {
        transition: none;
    }
}

/* ===== Invite-only nudge (slide-up bottom-right toast) ===== */
.invite-nudge {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1200;
    width: min(360px, calc(100vw - 32px));
    padding: 18px 18px 16px 18px;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    align-items: start;
    border-radius: var(--radius-lg);
    background: linear-gradient(155deg, rgba(20, 14, 38, 0.96) 0%, rgba(12, 16, 32, 0.96) 100%);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 0 32px var(--primary-glow);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    color: var(--text-color);
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
    transition:
        transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 320ms ease;
}

.invite-nudge::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--primary-vivid), var(--accent));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0.55;
    pointer-events: none;
}

.invite-nudge.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.invite-nudge[hidden] {
    display: none;
}

.invite-nudge-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-vivid), var(--accent));
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 6px 18px var(--primary-glow);
    flex-shrink: 0;
}

.invite-nudge-body {
    min-width: 0;
}

.invite-nudge-eyebrow {
    margin: 0 0 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
}

.invite-nudge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    animation: invite-nudge-pulse 2.4s ease-in-out infinite;
}

@keyframes invite-nudge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
    50%      { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0); }
}

.invite-nudge-title {
    margin: 2px 0 6px 0;
    font-size: 1.04rem;
    line-height: 1.25;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 60%, var(--accent) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}

.invite-nudge-text {
    margin: 0 0 12px 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.invite-nudge-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
}

.invite-nudge-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-vivid), var(--accent));
    box-shadow: 0 6px 18px var(--primary-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.invite-nudge-cta:hover,
.invite-nudge-cta:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px var(--primary-glow);
    filter: brightness(1.05);
    outline: none;
}

.invite-nudge-dismiss {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.invite-nudge-dismiss:hover,
.invite-nudge-dismiss:focus-visible {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.invite-nudge-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.invite-nudge-close:hover,
.invite-nudge-close:focus-visible {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

@media (max-width: 520px) {
    .invite-nudge {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
        grid-template-columns: 38px 1fr;
        padding: 14px 14px 12px 14px;
    }

    .invite-nudge-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .invite-nudge-title { font-size: 1rem; }
    .invite-nudge-text  { font-size: 0.84rem; }
}

@media (prefers-reduced-motion: reduce) {
    .invite-nudge { transition: opacity 0.2s ease; transform: none; }
    .invite-nudge-dot { animation: none; }
}