/* ================================================================
 * FantasyCricketQuiz — Public CSS
 * Mobile-first. Per-category accents via --accent CSS variable.
 * ================================================================ */

:root {
    /* Neutral palette */
    --c-bg:          #ffffff;
    --c-surface:     #ffffff;
    --c-surface-2:   #f7f8f9;
    --c-border:      #e5e7eb;
    --c-border-2:    #d1d5db;
    --c-text:        #111827;
    --c-text-2:      #4b5563;
    --c-text-3:      #6b7280;

    /* Brand (admin green) — used for buttons, links */
    --c-primary:      #0d6645;
    --c-primary-soft: #e8f4ee;
    --c-primary-hover:#0a5236;

    /* Accent (per-category, default = primary) */
    --accent:      var(--c-primary);
    --accent-soft: var(--c-primary-soft);

    /* Difficulty colors */
    --c-easy:   #10b981;
    --c-medium: #f59e0b;
    --c-hard:   #ef4444;

    /* Layout */
    --container-max: 1080px;
    --radius:        8px;
    --radius-lg:     12px;
    --shadow-sm:     0 1px 2px rgba(0,0,0,0.05);
    --shadow:        0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg:     0 20px 25px rgba(0,0,0,0.10), 0 10px 10px rgba(0,0,0,0.04);

    /* Typography */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ================================================================
 * RESET
 * ================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.5;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5 { margin: 0 0 0.5em; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ================================================================
 * LAYOUT
 * ================================================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
}
.main { min-height: 60vh; }

.section { padding: 40px 0; }
.section--alt { background: var(--c-surface-2); }
.section__head { text-align: center; margin-bottom: 28px; }
.section__title { font-size: 26px; }
.section__lede  { color: var(--c-text-3); font-size: 15px; margin: 0; }

@media (min-width: 640px) {
    .container { padding: 0 24px; }
    .section { padding: 56px 0; }
    .section__title { font-size: 30px; }
}

/* ================================================================
 * HEADER + NAV
 * ================================================================ */
.site-header {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 40;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
}
.site-header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--c-text);
    font-weight: 600;
    font-size: 17px;
}
.site-header__brand:hover { text-decoration: none; }
.site-header__logo { font-size: 22px; }
.site-header__name { letter-spacing: -0.01em; }

.site-header__toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
.site-header__toggle span {
    display: block;
    height: 2px;
    background: var(--c-text);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
.site-header__toggle.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.site-header__toggle.is-active span:nth-child(2) { opacity: 0; }
.site-header__toggle.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow);
}
.site-nav.is-open { display: block; }
.site-nav__list {
    list-style: none;
    margin: 0; padding: 8px 0;
}
.site-nav__link {
    display: block;
    padding: 12px 20px;
    color: var(--c-text);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}
.site-nav__link:hover {
    background: var(--c-primary-soft);
    color: var(--c-primary);
    text-decoration: none;
}

@media (min-width: 768px) {
    .site-header__toggle { display: none; }
    .site-nav {
        display: flex !important;
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    .site-nav__list {
        display: flex;
        gap: 2px;
        padding: 0;
        align-items: center;
    }
    .site-nav__link {
        padding: 8px 12px;
        border-radius: var(--radius);
        font-size: 14.5px;
    }
}

/* ================================================================
 * FOOTER
 * ================================================================ */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 40px 0 28px;
    margin-top: 60px;
}
.site-footer a { color: #fff; }
.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}
.site-footer__name { font-size: 18px; color: #fff; font-weight: 600; margin-bottom: 4px; }
.site-footer__tag  { font-size: 14px; color: #94a3b8; }
.site-footer__nav {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 20px;
    font-size: 14px;
}
.site-footer__copy { font-size: 13px; color: #94a3b8; }

@media (min-width: 768px) {
    .site-footer__inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    .site-footer__nav { gap: 28px; }
}

/* ================================================================
 * HERO
 * ================================================================ */
.hero {
    padding: 40px 0 32px;
    background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%);
}
.hero__inner {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}
.hero__label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    margin-bottom: 16px;
}
.hero__title {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--c-text);
}
.hero__title a { color: inherit; }
.hero__title a:hover { color: var(--accent); text-decoration: none; }
.hero__desc {
    color: var(--c-text-2);
    font-size: 16px;
    max-width: 540px;
    margin: 0 auto 20px;
}
.hero__meta { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; }

@media (min-width: 768px) {
    .hero { padding: 72px 0 64px; }
    .hero__title { font-size: 42px; letter-spacing: -0.03em; }
    .hero__desc { font-size: 18px; }
}

/* ================================================================
 * BUTTONS
 * ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform 0.06s, background 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 85%, black); color: #fff; }

.btn--hero {
    background: var(--accent);
    color: #fff;
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.btn--hero:hover { color: #fff; background: color-mix(in srgb, var(--accent) 85%, black); }

.btn--ghost {
    background: transparent;
    color: var(--c-text);
    border-color: var(--c-border-2);
}
.btn--ghost:hover { background: var(--c-surface-2); }

/* ================================================================
 * QUIZ CARDS (grid + individual)
 * ================================================================ */
.quiz-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) { .quiz-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1000px){ .quiz-grid { grid-template-columns: repeat(3, 1fr); } }

.quiz-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: var(--c-text);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.quiz-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.quiz-card__image {
    aspect-ratio: 16/9;
    background: var(--c-surface-2);
    overflow: hidden;
}
.quiz-card__image img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.quiz-card__body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.quiz-card__meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.quiz-card__title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--c-text);
    line-height: 1.3;
}
.quiz-card__desc {
    font-size: 14px;
    color: var(--c-text-3);
    margin: 0 0 14px;
    line-height: 1.5;
}
.quiz-card__footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--c-border);
    font-size: 13px;
}
.quiz-card__qcount { color: var(--c-text-3); }
.quiz-card__cta {
    color: var(--accent);
    font-weight: 600;
}

/* ================================================================
 * CATEGORY TILES (homepage grid)
 * ================================================================ */
.cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }

.cat-tile {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    color: var(--c-text);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cat-tile:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.cat-tile__icon { font-size: 32px; margin-bottom: 4px; }
.cat-tile__name { font-weight: 600; font-size: 16px; }
.cat-tile__desc { font-size: 12.5px; color: var(--c-text-3); line-height: 1.4; }
.cat-tile__cta {
    margin-top: auto;
    padding-top: 10px;
    font-size: 13px;
    font-weight: 600;
}

/* Per-category accent colors — applied via slug-matching classes */
.cat-tile--cricket { border-color: #0d6645; } .cat-tile--cricket .cat-tile__cta,
.quiz-card--cricket:hover { border-color: #0d6645; }
.cat-tile--cricket .cat-tile__cta { color: #0d6645; }

.cat-tile--bollywood { border-color: #d63384; } .cat-tile--bollywood .cat-tile__cta { color: #d63384; }
.quiz-card--bollywood:hover { border-color: #d63384; }

.cat-tile--gk, .cat-tile--general-knowledge { border-color: #0047a0; }
.cat-tile--gk .cat-tile__cta, .cat-tile--general-knowledge .cat-tile__cta { color: #0047a0; }
.quiz-card--gk:hover, .quiz-card--general-knowledge:hover { border-color: #0047a0; }

.cat-tile--sports { border-color: #ea580c; } .cat-tile--sports .cat-tile__cta { color: #ea580c; }
.quiz-card--sports:hover { border-color: #ea580c; }

.cat-tile--hollywood, .cat-tile--hollywood-movies, .cat-tile--movies { border-color: #6b21a8; }
.cat-tile--hollywood .cat-tile__cta,
.cat-tile--hollywood-movies .cat-tile__cta,
.cat-tile--movies .cat-tile__cta { color: #6b21a8; }
.quiz-card--hollywood:hover, .quiz-card--hollywood-movies:hover, .quiz-card--movies:hover { border-color: #6b21a8; }

/* ================================================================
 * PILLS / BADGES
 * ================================================================ */
.pill {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: 999px;
    background: var(--c-surface-2);
    color: var(--c-text-2);
    border: 1px solid var(--c-border);
    line-height: 1.5;
}
.pill--cat { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.pill--diff-easy   { background: #d1fae5; color: #064e3b; border-color: #6ee7b7; }
.pill--diff-medium { background: #fef3c7; color: #78350f; border-color: #fcd34d; }
.pill--diff-hard   { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; }

/* ================================================================
 * FORMS (used on contact + category filter)
 * ================================================================ */
.form-field {
    margin-bottom: 14px;
}
.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-2);
    margin-bottom: 4px;
}
.form-field input, .form-field textarea, .form-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    background: var(--c-surface);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ================================================================
 * PROSE (static pages: about/privacy/terms)
 * ================================================================ */
.prose {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 0;
}
.prose h1 { font-size: 32px; margin-bottom: 20px; }
.prose h2 { font-size: 22px; margin: 32px 0 12px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose p, .prose li { font-size: 16px; line-height: 1.65; color: var(--c-text); }
.prose ul, .prose ol { padding-left: 24px; }
.prose a { color: var(--accent); text-decoration: underline; }

/* ================================================================
 * 404 PAGE
 * ================================================================ */
.error-page {
    text-align: center;
    padding: 80px 20px;
    max-width: 520px;
    margin: 0 auto;
}
.error-page__code {
    font-size: 88px;
    font-weight: 800;
    color: var(--accent);
    margin: 0 0 16px;
    letter-spacing: -0.04em;
    line-height: 1;
}
.error-page__title { font-size: 24px; margin-bottom: 12px; }
.error-page__desc { color: var(--c-text-3); margin-bottom: 24px; }

/* ================================================================
 * AD SLOTS
 * ================================================================ */
.ad-slot {
    margin: 24px auto;
    min-height: 90px;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-3);
    font-size: 12px;
    background: var(--c-surface-2);
    border: 1px dashed var(--c-border-2);
    border-radius: var(--radius);
}
.ad-slot--dev::before { content: 'Ad slot'; }

/* ================================================================
 * PHASE 3B ADDITIONS
 * ================================================================ */

/* ========== Breadcrumbs ========== */
.breadcrumbs {
    padding: 14px 0;
    background: var(--c-surface-2);
    border-bottom: 1px solid var(--c-border);
    font-size: 13px;
}
.breadcrumbs ol {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--c-text-3);
}
.breadcrumbs li + li::before {
    content: '›';
    margin-right: 6px;
    color: var(--c-text-3);
}
.breadcrumbs a { color: var(--c-text-2); }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--c-text); font-weight: 500; }

/* ========== Category hero (above quiz grid) ========== */
.cat-hero {
    padding: 40px 0 28px;
    background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%);
    text-align: center;
}
.cat-hero__icon { font-size: 44px; margin-bottom: 8px; }
.cat-hero__title { font-size: 30px; margin-bottom: 10px; color: var(--c-text); }
.cat-hero__desc { color: var(--c-text-2); max-width: 640px; margin: 0 auto 12px; font-size: 16px; }
.cat-hero__meta { color: var(--c-text-3); font-size: 13.5px; }

@media (min-width: 768px) {
    .cat-hero { padding: 56px 0 40px; }
    .cat-hero__title { font-size: 40px; letter-spacing: -0.02em; }
}

/* ========== Category filters ========== */
.cat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 24px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
}
.cat-filters__group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.cat-filters__group label {
    color: var(--c-text-2);
    font-weight: 500;
}
.cat-filters__group select {
    padding: 6px 10px;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    background: var(--c-surface);
    font-family: inherit;
    font-size: 14px;
}
.cat-filters__active {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    font-size: 13px;
}
.cat-filters__clear {
    color: var(--accent);
    font-weight: 700;
    padding: 0 2px;
}
.cat-filters__clear:hover { color: var(--c-text); text-decoration: none; }

/* ========== Quiz landing hero ========== */
.quiz-hero {
    padding: 32px 0;
    background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%);
}
.quiz-hero__inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.quiz-hero__meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}
.quiz-hero__title {
    font-size: 28px;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.quiz-hero__desc {
    color: var(--c-text-2);
    font-size: 16px;
    max-width: 640px;
    margin: 0 auto 24px;
}
.quiz-hero__image {
    max-width: 560px;
    margin: 0 auto 24px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.quiz-hero__note { color: var(--c-text-3); margin-top: 14px; }

@media (min-width: 768px) {
    .quiz-hero { padding: 56px 0; }
    .quiz-hero__title { font-size: 40px; }
}

.btn--disabled {
    opacity: 0.75;
    cursor: not-allowed;
}
.btn--disabled:hover { transform: none; }

/* ========== Section subtitle (smaller than main title) ========== */
.section__subtitle {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--c-text);
}

/* ========== Tag cloud (on quiz landing) ========== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tag-chip-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--c-surface);
    border: 1px solid var(--c-border-2);
    border-radius: 999px;
    color: var(--c-text);
    font-size: 13.5px;
    transition: background 0.12s, border-color 0.12s;
}
.tag-chip-link:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}
.tag-chip-link__name { font-weight: 500; }
.tag-chip-link__type { color: var(--c-text-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ========== Tag landing hero ========== */
.tag-hero {
    padding: 40px 0 24px;
    background: var(--c-surface-2);
    text-align: center;
}
.tag-hero__meta { margin-bottom: 10px; }
.tag-hero__title {
    font-size: 32px;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.tag-hero__thumb {
    width: 120px; height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--c-surface);
    box-shadow: var(--shadow);
}
.tag-hero__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tag-hero__intro {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
    color: var(--c-text);
    font-size: 15.5px;
    line-height: 1.65;
}
.tag-hero__intro p:last-child { margin-bottom: 0; }
.tag-hero__intro h2 { font-size: 20px; margin-top: 20px; }
.tag-hero__intro a { color: var(--accent); text-decoration: underline; }

@media (min-width: 768px) {
    .tag-hero { padding: 56px 0 40px; }
    .tag-hero__title { font-size: 40px; }
}

/* ========== Public pagination ========== */
.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 32px 0 12px;
}
.pager__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 8px 14px;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    color: var(--c-text);
    font-size: 14px;
    background: var(--c-surface);
    transition: background 0.12s, border-color 0.12s;
}
.pager__btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}
.pager__btn.is-current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}
.pager__btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.pager__ellipsis {
    color: var(--c-text-3);
    padding: 0 4px;
}

/* ========== Empty state (public) ========== */
.empty-public {
    text-align: center;
    padding: 48px 20px;
    background: var(--c-surface-2);
    border-radius: var(--radius-lg);
}
.empty-public h2 { font-size: 22px; margin-bottom: 10px; }
.empty-public p { color: var(--c-text-3); margin-bottom: 20px; }

/* ================================================================
 * PHASE 4 — QUIZ PLAYER + RESULTS
 * ================================================================ */

.container--narrow { max-width: 720px; }

/* ========== Player ========== */
.play-wrap {
    padding: 20px 0 60px;
    min-height: 70vh;
}

.play-topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}
.play-quit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--c-border-2);
    border-radius: 999px;
    color: var(--c-text-2);
    font-size: 13px;
    background: var(--c-surface);
}
.play-quit:hover {
    text-decoration: none;
    border-color: var(--c-danger, #ef4444);
    color: var(--c-danger, #ef4444);
}
.play-progress {
    min-width: 0;
}
.play-progress__label {
    font-size: 12.5px;
    color: var(--c-text-3);
    margin-bottom: 4px;
    text-align: center;
}
.play-progress__bar {
    height: 6px;
    background: var(--c-surface-2);
    border-radius: 999px;
    overflow: hidden;
}
.play-progress__fill {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.4s ease-out;
}
.play-timer {
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    color: var(--c-text-3);
    padding: 6px 12px;
    background: var(--c-surface-2);
    border-radius: 999px;
    min-width: 70px;
    text-align: center;
}

.play-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
    .play-card { padding: 36px 32px; }
}

.play-question__text {
    font-size: 20px;
    line-height: 1.4;
    margin: 0 0 20px;
    color: var(--c-text);
}
.play-question__image img {
    max-width: 100%;
    margin: 0 auto 20px;
    border-radius: var(--radius);
}

@media (min-width: 640px) {
    .play-question__text { font-size: 24px; }
}

.play-answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.play-answer {
    display: block;
    width: 100%;
    padding: 14px 18px;
    text-align: left;
    background: var(--c-surface);
    border: 2px solid var(--c-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: var(--c-text);
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, transform 0.08s;
}
.play-answer:hover:not([disabled]) {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}
.play-answer:active:not([disabled]) {
    transform: translateY(0);
}
/* On touch devices (no hover capability), neutralise the hover state so
   the first answer doesn't appear pre-selected after page load. */
@media (hover: none) {
    .play-answer:hover:not([disabled]) {
        border-color: var(--c-border);
        background: var(--c-surface);
        transform: none;
    }
}
.play-answer[disabled] {
    cursor: default;
}

.play-answer.is-correct {
    border-color: var(--c-easy);
    background: #ecfdf5;
    color: #064e3b;
}
.play-answer.is-correct::before {
    content: '✓ ';
    font-weight: 700;
    color: var(--c-easy);
}
.play-answer.is-wrong {
    border-color: var(--c-hard);
    background: #fef2f2;
    color: #7f1d1d;
}
.play-answer.is-wrong::before {
    content: '✗ ';
    font-weight: 700;
    color: var(--c-hard);
}
.play-answer.is-selected:not(.is-correct):not(.is-wrong) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* Feedback panel under answers */
.play-feedback {
    margin-top: 22px;
    padding: 18px;
    background: var(--c-surface-2);
    border-radius: var(--radius);
    border-left: 4px solid var(--c-border-2);
}
.play-feedback__status {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}
.play-feedback__status.is-correct { color: #065f46; }
.play-feedback__status.is-wrong   { color: #991b1b; }

.play-feedback.is-visible,
.play-feedback:not([hidden]) {
    display: block;
}
.play-feedback[hidden] { display: none; }

.play-feedback__explanation {
    color: var(--c-text-2);
    font-size: 14.5px;
    line-height: 1.55;
    margin-bottom: 14px;
}
.play-feedback__next {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.play-feedback__countdown {
    font-size: 13px;
    color: var(--c-text-3);
}

.play-finalising {
    text-align: center;
    padding: 60px 20px;
    color: var(--c-text-2);
}
.play-finalising__spinner {
    width: 40px; height: 40px;
    margin: 0 auto 16px;
    border: 3px solid var(--c-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Results ========== */
.results-hero {
    padding: 32px 0 40px;
    background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%);
    text-align: center;
}
.results-hero__emoji {
    font-size: 56px;
    margin-bottom: 10px;
}
.results-hero__title {
    font-size: 30px;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.results-hero__blurb {
    color: var(--c-text-2);
    max-width: 520px;
    margin: 0 auto 28px;
}

.results-score {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 20px;
    padding: 18px 32px;
    background: var(--c-surface);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.results-score__big { display: inline-flex; align-items: baseline; font-weight: 700; }
.results-score__num   { font-size: 56px; color: var(--accent); line-height: 1; letter-spacing: -0.03em; }
.results-score__sep   { font-size: 40px; color: var(--c-text-3); margin: 0 6px; }
.results-score__total { font-size: 40px; color: var(--c-text-3); }
.results-score__pct   { font-size: 22px; color: var(--c-text-3); font-weight: 600; }

.results-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.results-stat { min-width: 80px; }
.results-stat__label { font-size: 12px; color: var(--c-text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.results-stat__value { font-size: 22px; font-weight: 700; color: var(--c-text); }

.results-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.results-share {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
    padding: 16px;
    background: var(--c-surface);
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    max-width: 520px;
    margin: 0 auto;
}
.results-share__label {
    color: var(--c-text-3);
    font-weight: 500;
}
.results-share__links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.results-share__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    color: var(--c-text);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.results-share__btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* Breakdown (question-by-question review) */
.results-breakdown {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.results-q {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    border-left: 4px solid var(--c-border-2);
}
.results-q.is-correct { border-left-color: var(--c-easy); }
.results-q.is-wrong   { border-left-color: var(--c-hard); }

.results-q__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}
.results-q__index {
    font-size: 12px;
    color: var(--c-text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.results-q__status {
    font-size: 13px;
    font-weight: 600;
}
.results-q.is-correct .results-q__status { color: #065f46; }
.results-q.is-wrong   .results-q__status { color: #991b1b; }

.results-q__text {
    font-size: 16px;
    color: var(--c-text);
    margin-bottom: 12px;
    line-height: 1.45;
}
.results-q__answer {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: var(--radius);
    margin-bottom: 6px;
    line-height: 1.4;
}
.results-q__answer--wrong {
    background: #fef2f2;
    color: #7f1d1d;
}
.results-q__answer--correct {
    background: #ecfdf5;
    color: #064e3b;
}
.results-q__answer-label {
    font-weight: 600;
    display: inline-block;
    margin-right: 4px;
}
.results-q__explanation {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--c-surface-2);
    border-left: 3px solid var(--c-border-2);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 13.5px;
    color: var(--c-text-2);
    line-height: 1.55;
}

/* ================================================================
 * PHASE 5A — AUTH + PROFILE
 * ================================================================ */

/* ========== Auth pages (login, signup) ========== */
.auth-wrap {
    padding: 40px 0 80px;
    min-height: 60vh;
    background: var(--c-surface-2);
}

.auth-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    max-width: 420px;
    margin: 0 auto;
}
.auth-card__title {
    font-size: 26px;
    margin-bottom: 6px;
    text-align: center;
}
.auth-card__lede {
    text-align: center;
    color: var(--c-text-3);
    font-size: 14px;
    margin-bottom: 24px;
}
.auth-card__foot {
    text-align: center;
    color: var(--c-text-3);
    font-size: 14px;
    margin: 20px 0 0;
}
.auth-card__foot a { color: var(--accent); font-weight: 500; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-2);
}
.auth-field__label small {
    font-weight: 400;
    color: var(--c-text-3);
    margin-left: 4px;
}
.auth-field__input {
    padding: 10px 12px;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    background: var(--c-surface);
    color: var(--c-text);
    transition: border-color 0.12s, box-shadow 0.12s;
}
.auth-field__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-field__input.is-err {
    border-color: var(--c-hard);
    background: #fef2f2;
}
.auth-field__err {
    color: #991b1b;
    font-size: 12.5px;
}
.auth-field--inline {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--c-text-2);
}
.auth-field--inline input[type="checkbox"] {
    accent-color: var(--accent);
}

.auth-flash {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
}
.auth-flash--ok  { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.auth-flash--err { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

.auth-divider {
    text-align: center;
    color: var(--c-text-3);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--c-border);
}

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

/* ========== Header auth state ========== */
.site-nav__auth-item {
    /* Marker to visually separate auth links from categories on desktop */
}
.site-nav__auth-item:first-of-type {
    margin-left: 6px;
    padding-left: 10px;
    border-left: 1px solid var(--c-border);
}
.site-nav__link--cta {
    background: var(--c-primary);
    color: #fff !important;
    border-radius: var(--radius);
    padding: 8px 16px !important;
    margin-left: 2px;
    font-weight: 600;
}
.site-nav__link--cta:hover {
    background: var(--c-primary-hover) !important;
    color: #fff !important;
}
.site-nav__link--user {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}
.site-nav__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    /* On mobile, auth items appear below the category list in the dropdown nav */
    .site-nav__auth-item:first-of-type {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--c-border);
        margin-top: 6px;
        padding-top: 6px;
    }
    .site-nav__link--cta {
        margin: 6px 20px 4px !important;
        text-align: center;
        display: block !important;
    }
}

/* ========== Profile page ========== */
.profile-hero {
    padding: 36px 0 28px;
    background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%);
}
.profile-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.profile-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    font-size: 34px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}
.profile-name {
    font-size: 26px;
    margin: 0 0 4px;
}
.profile-meta {
    color: var(--c-text-3);
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pill--admin {
    background: #fef3c7;
    color: #78350f;
    border-color: #fcd34d;
    font-weight: 600;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (min-width: 640px) {
    .profile-stats { grid-template-columns: repeat(5, 1fr); gap: 12px; }
}
.profile-stat {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 12px 14px;
    text-align: center;
}
.profile-stat__label {
    font-size: 11.5px;
    color: var(--c-text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.profile-stat__value {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-text);
}

.profile-attempts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profile-attempt {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
@media (min-width: 640px) {
    .profile-attempt {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }
}
.profile-attempt__meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12.5px;
}
.profile-attempt__date { color: var(--c-text-3); }
.profile-attempt__title {
    font-weight: 600;
    color: var(--c-text);
    font-size: 15px;
    line-height: 1.3;
    flex: 1;
}
.profile-attempt__title:hover { color: var(--accent); text-decoration: underline; }

.profile-attempt__score {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.profile-attempt__pct {
    font-weight: 700;
    font-size: 15px;
}
.profile-attempt__pct span {
    font-size: 12px;
    font-weight: 500;
    color: var(--c-text-3);
    margin-left: 4px;
}
.profile-attempt__pct--good { color: #065f46; }
.profile-attempt__pct--ok   { color: #78350f; }
.profile-attempt__pct--low  { color: #7f1d1d; }

.profile-attempt__link {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}

/* ========== Guest signup prompt on results ========== */
.results-signup-prompt {
    max-width: 480px;
    margin: 0 auto 28px;
    padding: 18px 20px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    text-align: center;
}
.results-signup-prompt strong {
    display: block;
    font-size: 15.5px;
    margin-bottom: 6px;
    color: #78350f;
}
.results-signup-prompt p {
    font-size: 14px;
    color: var(--c-text-2);
    margin: 0 0 12px;
}
.results-signup-prompt__actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.btn--sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* ================================================================
 * PHASE 6A — LEADERBOARDS, STREAKS, BADGES
 * ================================================================ */

/* ========== Leaderboard widget (reusable) ========== */
.lb-widget {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}
.lb-widget__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    gap: 10px;
}
.lb-widget__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}
.lb-widget__see-all {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}
.lb-widget__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lb-widget__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--c-border);
    font-size: 14.5px;
}
.lb-widget__row:last-child { border-bottom: none; }
.lb-widget__rank {
    font-weight: 700;
    min-width: 36px;
    color: var(--c-text-3);
    font-variant-numeric: tabular-nums;
    font-size: 15px;
}
.lb-widget__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-widget__score {
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.lb-widget__empty {
    text-align: center;
    color: var(--c-text-3);
    font-size: 14px;
    padding: 20px 10px;
}

/* ========== Leaderboard full page ========== */
.lb-hero {
    padding: 40px 0 24px;
    background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%);
    text-align: center;
}
.lb-hero__icon { font-size: 48px; margin-bottom: 4px; }
.lb-hero__title {
    font-size: 32px;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.lb-hero__lede {
    color: var(--c-text-2);
    max-width: 480px;
    margin: 0 auto 16px;
    font-size: 15px;
}
.lb-my-rank {
    display: inline-block;
    padding: 8px 18px;
    background: var(--c-surface);
    border: 2px solid var(--accent);
    border-radius: 999px;
    font-size: 14px;
    color: var(--c-text);
}
.lb-my-rank--ghost {
    background: var(--c-surface-2);
    border-style: dashed;
    border-color: var(--c-border-2);
    color: var(--c-text-3);
}
.lb-my-rank--ghost a { color: var(--accent); font-weight: 600; }

.lb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lb-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    transition: box-shadow 0.12s, transform 0.12s;
}
.lb-row--me {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 2px var(--accent-soft);
}
.lb-row__rank {
    font-weight: 700;
    font-size: 17px;
    color: var(--c-text-3);
    min-width: 44px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.lb-row__medal { font-size: 22px; }
.lb-row__avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    text-transform: uppercase;
}
.lb-row__body {
    flex: 1;
    min-width: 0;
}
.lb-row__name {
    font-weight: 600;
    font-size: 15.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-row__meta {
    font-size: 12.5px;
    color: var(--c-text-3);
}
.lb-row__score {
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.lb-row__score span {
    font-size: 11px;
    color: var(--c-text-3);
    font-weight: 500;
    margin-left: 2px;
}

/* ========== Profile streak + rank highlights ========== */
.profile-highlights {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.profile-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    flex: 1 1 180px;
}
.profile-highlight__icon { font-size: 28px; }
.profile-highlight__value {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-text);
    line-height: 1;
}
.profile-highlight__label {
    font-size: 12.5px;
    color: var(--c-text-3);
    margin-top: 2px;
}
.profile-highlight__label a { color: var(--accent); }

/* ========== Profile badges grid ========== */
.profile-badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}
.profile-badge {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 16px 10px;
    text-align: center;
    transition: transform 0.12s, box-shadow 0.12s;
}
.profile-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.profile-badge__icon {
    font-size: 36px;
    margin-bottom: 6px;
}
.profile-badge__name {
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1.3;
    color: var(--c-text);
    margin-bottom: 3px;
}
.profile-badge__earned {
    font-size: 11px;
    color: var(--c-text-3);
}

/* ========== Celebration banner on results page ========== */
.celebration {
    padding: 20px 0 0;
}
.celebration__streak {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 999px;
    font-size: 14px;
    color: #7c2d12;
    margin: 0 auto 14px;
    display: flex;
    max-width: 420px;
    justify-content: center;
    flex-wrap: wrap;
}
.celebration__streak-flame {
    font-size: 20px;
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}
.celebration__streak strong { color: #9a3412; }
.celebration__streak span { color: var(--c-text-3); }

.celebration__badges {
    background: #fffbeb;
    border: 2px solid #fcd34d;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 8px;
}
.celebration__title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #78350f;
    margin-bottom: 14px;
}
.celebration__badge-grid {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.celebration__badge {
    text-align: center;
    min-width: 130px;
    padding: 12px;
    background: var(--c-surface);
    border-radius: var(--radius);
    border: 1px solid #fcd34d;
}
.celebration__badge-icon {
    font-size: 38px;
    margin-bottom: 4px;
    animation: bounce 0.6s ease-out;
}
@keyframes bounce {
    0% { transform: translateY(-20px); opacity: 0; }
    50% { transform: translateY(5px); }
    100% { transform: translateY(0); opacity: 1; }
}
.celebration__badge-name {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--c-text);
    margin-bottom: 2px;
}
.celebration__badge-desc {
    font-size: 11.5px;
    color: var(--c-text-3);
    line-height: 1.4;
}

/* ================================================================
 * PHASE 11 — Error page + Launch checklist
 * ================================================================ */

.error-hero {
    padding: 60px 0 40px;
    text-align: center;
}
.error-hero__code {
    font-size: 56px;
    margin-bottom: 12px;
}
.error-hero__title {
    font-size: 28px;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
.error-hero__lede {
    color: var(--c-text-2);
    max-width: 480px;
    margin: 0 auto 24px;
}
.error-hero__debug {
    background: #1f2937;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: left;
    font-size: 12px;
    overflow: auto;
    margin: 0 auto 24px;
    max-width: 600px;
}
.error-hero__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Launch checklist admin page */
.checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}
.checklist__item {
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid var(--c-border, #e5e7eb);
    border-radius: 8px;
    background: #fff;
    align-items: flex-start;
}
.checklist__item--ok     { border-color: #86efac; background: #f0fdf4; }
.checklist__item--warn   { border-color: #fdba74; background: #fff7ed; }
.checklist__item--fail   { border-color: #fca5a5; background: #fef2f2; }
.checklist__icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
}
.checklist__body { flex: 1; }
.checklist__title {
    font-weight: 600;
    margin: 0 0 4px;
    font-size: 15px;
}
.checklist__desc {
    font-size: 13.5px;
    color: var(--c-text-2, #475569);
    margin: 0;
}
.checklist__hint {
    font-size: 12.5px;
    color: var(--c-text-3, #64748b);
    margin-top: 6px;
}
.checklist__action {
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    align-self: center;
}

/* ================================================================
 * PHASE 10A — Ad slots + lifelines
 * ================================================================ */

/* === Ad slot containers — CLS-safe min-height reservations === */
.ad-slot {
    display: block;
    margin: 16px auto;
    text-align: center;
    overflow: hidden;
    max-width: 100%;
}
/* Mobile defaults — header is 300x250 per admin choice, footer stays small 320x50 */
.ad-slot--header  { min-height: 250px; max-width: 336px; }
.ad-slot--infeed  { min-height: 250px; max-width: 336px; }
.ad-slot--sidebar { min-height: 250px; max-width: 300px; }
.ad-slot--results { min-height: 250px; max-width: 336px; }
.ad-slot--footer  { min-height: 50px;  max-width: 336px; }

/* Tablet + Desktop: header/footer can go wide */
@media (min-width: 768px) {
    .ad-slot--header { min-height: 90px;  max-width: 728px; }
    .ad-slot--footer { min-height: 90px;  max-width: 728px; }
}
@media (min-width: 1024px) {
    .ad-slot--header { max-width: 970px; }
    .ad-slot--footer { max-width: 970px; }
    .ad-slot--sidebar { max-width: 300px; }
}

/* Placeholder (when ads disabled but placeholders enabled) */
.ad-slot--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--c-border-2, #cbd5e1);
    background: repeating-linear-gradient(
        45deg,
        rgba(148, 163, 184, 0.05),
        rgba(148, 163, 184, 0.05) 10px,
        rgba(148, 163, 184, 0.10) 10px,
        rgba(148, 163, 184, 0.10) 20px
    );
    border-radius: 8px;
    color: #94a3b8;
}
.ad-slot__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Hide sidebar slot on mobile entirely */
@media (max-width: 767px) {
    .ad-slot--sidebar { display: none; }
}

/* Excluded page bodies — belt-and-braces hide in case a stray slot renders */
.page-play .ad-slot,
.page-admin .ad-slot {
    display: none !important;
}

/* === Lifeline controls === */
.play-lifelines {
    margin-top: 16px;
    padding: 12px 14px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 12px;
}
.play-lifelines__label {
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    text-align: center;
}
.play-lifelines__buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.lifeline-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #fbbf24;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #78350f;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.lifeline-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(146, 64, 14, 0.15);
}
.lifeline-btn__icon {
    font-size: 15px;
}
.lifeline-btn:disabled,
.lifeline-btn--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* "Used" state = disabled + strikethrough to convey "already spent" */
.lifeline-btn--used {
    opacity: 0.35;
    text-decoration: line-through;
}
.lifeline-btn--used .lifeline-btn__icon {
    text-decoration: none;  /* keep the emoji icon readable */
}

/* Answer button states after lifelines apply */
.play-answer--eliminated {
    opacity: 0.3;
    text-decoration: line-through;
    pointer-events: none;
}
.play-answer--revealed {
    border-color: #16a34a !important;
    background: #dcfce7 !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    animation: revealGlow 1.4s ease-out;
}
@keyframes revealGlow {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* Lifeline confirm modal */
.lifeline-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.lifeline-modal[hidden] { display: none; }
.lifeline-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
}
.lifeline-modal__card {
    position: relative;
    max-width: 440px;
    width: 100%;
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.lifeline-modal__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
}
.lifeline-modal__body {
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--c-text-2, #475569);
    margin: 0 0 10px;
}
.lifeline-modal__hint {
    font-size: 12.5px;
    color: var(--c-text-3, #64748b);
    margin: 0 0 20px;
    font-style: italic;
}
.lifeline-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* While ad is playing, dim the quiz card so user focuses on the ad */
body.is-ad-playing .play-card {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s;
}
