.radar-chart-shell {
    background: transparent;
}

.radar-chart-area {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}

/* Shared placement for the fullscreen toggle so it sits with the same
   margin/padding on every page that uses it (pre-start join screen,
   results screen, etc.). Avoid hardcoding inline coordinates per page. */
.fullscreen-toggle-anchor {
    position: fixed;
    bottom: var(--fullscreen-toggle-inset, 2rem);
    left: var(--fullscreen-toggle-inset, 2rem);
    z-index: 1500;
}

/* Mirror placement for the small footer text on the join screen so it lines
   up vertically with the fullscreen toggle on the opposite side. */
.fullscreen-toggle-footer-text {
    position: fixed;
    bottom: var(--fullscreen-toggle-inset, 2rem);
    right: var(--fullscreen-toggle-inset, 2rem);
    z-index: 1000;
    text-align: right;
}

/* Mobile adjustments:
   - Hide the fullscreen toggle entirely on mobile; the browser fullscreen API
     is desktop-oriented and the bottom navigation already crowds the corner.
   - Drop the join-screen footer text out of the fixed corner so it doesn't
     collide with the Start Tasting button; it instead flows under the
     content centered horizontally. */
@media (max-width: 960px) {
    .fullscreen-toggle-anchor {
        display: none !important;
    }

    .fullscreen-toggle-footer-text {
        position: static;
        text-align: center;
        padding: 1rem;
    }
}

.radar-chart-area > div {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

.quiz-results-panel {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(245, 230, 168, 0.18);
    border-radius: 24px;
    padding: clamp(20px, 3vw, 36px);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55), 0 0 60px rgba(255, 215, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.quiz-results-panel::before {
    content: "";
    position: absolute;
    inset: -55% -65% -55% -65%;
    background: radial-gradient(ellipse 45% 42% at 50% 50%, rgba(255, 215, 0, 0.14) 0%, rgba(255, 215, 0, 0.05) 35%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    filter: blur(28px);
}

.quiz-results-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(245, 230, 168, 0.14);
}

.quiz-results-panel__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #FFD700;
    text-shadow: 0 0 36px rgba(255, 215, 0, 0.22);
}

.quiz-results-panel__subtitle {
    color: rgba(245, 230, 168, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.82rem;
    font-weight: 600;
}

.quiz-results-panel__responses {
    color: rgba(255, 224, 130, 0.95);
    background: rgba(255, 215, 0, 0.10);
    border: 1px solid rgba(255, 215, 0, 0.28);
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.85rem;
}

.quiz-results-panel__content {
    display: grid;
    grid-template-columns: minmax(240px, 0.45fr) minmax(320px, 1fr);
    gap: clamp(20px, 3vw, 36px);
    align-items: stretch;
}

@media (max-width: 1024px) {
    .quiz-results-panel__content {
        grid-template-columns: 1fr;
    }
}

.quiz-results-summary-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: var(--quiz-chart-height, 280px);
}

.quiz-results-summary-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
}

.quiz-result-card {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(245, 230, 168, 0.14);
    background: rgba(255, 255, 255, 0.025);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-result-card.is-correct {
    border-color: rgba(132, 204, 22, 0.45);
    background: linear-gradient(145deg, rgba(132, 204, 22, 0.08) 0%, rgba(132, 204, 22, 0.02) 100%);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.5), 0 0 30px rgba(132, 204, 22, 0.08);
}

.quiz-result-card.is-incorrect {
    border-color: rgba(245, 230, 168, 0.18);
}

.quiz-result-card__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.quiz-result-card__answer {
    color: rgba(245, 230, 168, 0.95);
    font-weight: 600;
    font-family: 'Inter', 'Montserrat', sans-serif;
}

.quiz-result-card__tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(245, 230, 168, 0.22);
    color: rgba(245, 230, 168, 0.55);
    font-weight: 700;
    flex: 0 0 auto;
}

.quiz-result-card.is-correct .quiz-result-card__tag {
    border-color: rgba(132, 204, 22, 0.5);
    background: rgba(132, 204, 22, 0.12);
    color: #BEF264;
}

.quiz-result-card__metrics {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.quiz-result-card__count {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #FFD700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.quiz-result-card__label {
    color: rgba(245, 230, 168, 0.55);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    font-weight: 700;
}

.quiz-result-card__percent {
    margin-left: auto;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 224, 130, 0.85);
    font-variant-numeric: tabular-nums;
}

.quiz-result-card__progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(214, 198, 140, 0.14);
    overflow: hidden;
}

.quiz-result-card.is-correct .quiz-result-card__progress {
    --mud-palette-success: #BEF264;
}

.quiz-result-card.is-incorrect .quiz-result-card__progress {
    --mud-palette-error: rgba(245, 230, 168, 0.45);
}

.quiz-results-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quiz-results-chart__surface {
    background: rgba(11, 11, 22, 0.5);
    border-radius: 18px;
    padding: 12px 12px 4px;
    border: 1px solid rgba(245, 230, 168, 0.14);
}

.quiz-results-chart__meta {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.quiz-results-chart__meta-label {
    color: rgba(245, 230, 168, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
}

.quiz-results-chart__meta-value {
    color: #ffd700;
    font-weight: 600;
}

.quiz-results-chart__meta-caption {
    color: rgba(245, 230, 168, 0.8);
}

.quiz-results-alert {
    color: rgba(245, 230, 168, 0.9);
    border-radius: 12px;
}

/* ========================================================================
   Quiz view (shared by Join + Host) — question hero, answer cards,
   immediate feedback, reveal frame.
   ======================================================================== */
.quiz-stage {
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(8px, 2vw, 24px) clamp(8px, 2vw, 24px) clamp(20px, 4vh, 40px);
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 3.5vh, 44px);
    animation: quizStageEnter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    max-width: 65ch;
}

.quiz-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 230, 168, 0.55);
    font-family: 'Inter', 'Montserrat', sans-serif;
}

.quiz-hero__eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFD700;
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.55);
    animation: quizDotPulse 2.4s ease-in-out infinite;
}

.quiz-hero__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: -0.025em;
    font-size: clamp(2rem, 4.4vw, 3.6rem);
    line-height: 1.05;
    color: #FFD700;
    margin: 0;
    text-shadow: 0 0 56px rgba(255, 215, 0, 0.22), 0 8px 24px rgba(0, 0, 0, 0.5);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.quiz-hero__accent {
    width: 64px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #FFD700, rgba(255, 215, 0, 0.3));
}

.quiz-hero__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.10);
    border: 1px solid rgba(255, 215, 0, 0.28);
    color: rgba(255, 224, 130, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Inter', 'Montserrat', sans-serif;
}

.quiz-hero__hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(245, 230, 168, 0.75);
    font-size: 0.95rem;
    font-weight: 500;
}

.quiz-locked-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.04) 100%);
    border: 1px solid rgba(239, 68, 68, 0.32);
    border-radius: 14px;
    padding: 12px 20px;
    margin: 0;
    color: #F87171;
    font-weight: 600;
    font-size: 0.95rem;
}

.quiz-answers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(14px, 1.6vw, 20px);
}

.quiz-answer-card {
    position: relative;
    display: grid;
    grid-template-columns: clamp(48px, 5vw, 72px) 1fr auto;
    align-items: center;
    column-gap: clamp(14px, 1.6vw, 22px);
    padding: clamp(18px, 2.2vh, 28px) clamp(20px, 2vw, 28px);
    min-height: clamp(96px, 12vh, 132px);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(245, 230, 168, 0.18);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 22px 48px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    cursor: pointer;
    overflow: hidden;
    transition: transform 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out;
    outline: none;
    /* Container query: text scales to the card's own width. */
    container-type: inline-size;
    container-name: quiz-answer;
}

.quiz-answer-card:hover,
.quiz-answer-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 224, 130, 0.45);
    box-shadow: 0 28px 56px -18px rgba(0, 0, 0, 0.65), 0 0 32px rgba(255, 215, 0, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quiz-answer-card__halo {
    position: absolute;
    inset: -40% -50% -40% -50%;
    background: radial-gradient(ellipse 50% 45% at 50% 50%, rgba(255, 215, 0, 0.14) 0%, rgba(255, 215, 0, 0.05) 35%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    filter: blur(28px);
    opacity: 0;
    transition: opacity 220ms ease-out;
}

.quiz-answer-card:hover .quiz-answer-card__halo,
.quiz-answer-card--selected .quiz-answer-card__halo {
    opacity: 1;
}

/* Big lettered prefix — same DNA as host quiz chips */
.quiz-answer-card__letter {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: -0.04em;
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    line-height: 1;
    color: #FFD700;
    text-shadow: 0 0 24px rgba(255, 215, 0, 0.35);
    font-variant-numeric: tabular-nums;
    text-align: center;
    transition: color 180ms ease-out, text-shadow 180ms ease-out;
}

.quiz-answer-card__text {
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 500;
    /* Container-aware: scales to the card's own width. */
    font-size: clamp(1rem, 6cqi, 1.4rem);
    line-height: 1.3;
    color: rgba(245, 230, 168, 0.95);
    word-wrap: break-word;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

/* Length-based downshifts \u2014 set in Razor based on the longest answer
   so the whole row stays balanced when one option is much longer. */
.quiz-answer-card.quiz-answers--long .quiz-answer-card__text {
    font-size: clamp(0.95rem, 5cqi, 1.2rem);
}

.quiz-answer-card.quiz-answers--xlong .quiz-answer-card__text {
    font-size: clamp(0.9rem, 4.2cqi, 1.05rem);
    line-height: 1.35;
}

.quiz-answer-card.quiz-answers--long .quiz-answer-card__letter {
    font-size: clamp(2rem, 3.4vw, 3rem);
}

.quiz-answer-card.quiz-answers--xlong .quiz-answer-card__letter {
    font-size: clamp(1.7rem, 2.8vw, 2.4rem);
}

/* Selected check chip sits on the right (replaces the marker dot) */
.quiz-answer-card__check {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FFD700;
    color: #0B0B16;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.45);
}

.quiz-answer-card--selected {
    border-color: rgba(255, 215, 0, 0.7);
    box-shadow: 0 28px 56px -18px rgba(0, 0, 0, 0.65), 0 0 36px rgba(255, 215, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.quiz-answer-card--selected .quiz-answer-card__text {
    color: #FFD700;
}

.quiz-answer-card--locked {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-answer-card--locked:hover,
.quiz-answer-card--locked:focus-visible {
    transform: none;
    border-color: rgba(245, 230, 168, 0.18);
    box-shadow: 0 22px 48px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Mobile contrast bump — backdrop-filter on iOS Safari is unreliable and
   the glass tint can collapse to near-transparent against the deep base.
   Drop the blur, lift the surface tint, strengthen borders, and force the
   text to fully opaque cream. Targets phones / narrow tablets. */
@media (max-width: 720px) {
    .quiz-stage {
        padding-left: 0;
        padding-right: 0;
        gap: clamp(18px, 2.4vh, 28px);
    }

    /* Mirror the beverage hero hierarchy on mobile:
       title (Montserrat 900 gold) -> accent bar -> producer-tone subline
       (selection mode) -> tiny accent echo -> eyebrow caption (type label).
       The colorful pill and indented icon row don't belong here -- on a
       phone the screen reads cleaner as a single editorial column. */
    .quiz-hero {
        gap: 0;
    }

    .quiz-hero__title {
        font-size: clamp(2.6rem, 9.5vw, 3.6rem);
        margin: 4px 0 18px;
    }

    .quiz-hero__accent {
        margin-bottom: 16px;
    }

    .quiz-hero__pill {
        background: transparent;
        border: 0;
        padding: 0;
        order: 3;
        color: rgba(245, 230, 168, 0.55);
        text-transform: uppercase;
        letter-spacing: 0.18em;
        font-size: 0.85rem;
        font-weight: 700;
        margin-top: 4px;
    }

    .quiz-hero__hint {
        order: 2;
        font-family: 'Inter', 'Montserrat', sans-serif;
        font-weight: 500;
        font-size: 1.5rem;
        line-height: 1.35;
        color: rgba(255, 224, 130, 0.85);
        margin-bottom: 14px;
        gap: 10px;
    }

    .quiz-hero__hint .mud-icon-root {
        font-size: 1.25rem !important;
        color: rgba(255, 224, 130, 0.65);
    }

    .quiz-answers {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    /* Compact cards: text fills the card instead of swimming in padding.
       Bigger answer text, tighter vertical padding, no fixed min-height. */
    .quiz-answer-card {
        width: 100%;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
        border: 1.5px solid rgba(245, 230, 168, 0.38);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 16px 18px;
        min-height: 0;
        column-gap: 14px;
        grid-template-columns: 44px 1fr auto;
        box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .quiz-answer-card__letter {
        font-size: 2rem;
        text-align: left;
    }

    .quiz-answer-card__text {
        color: #F5E6A8;
        font-weight: 600;
        font-size: 1.25rem;
        line-height: 1.25;
    }

    .quiz-answer-card__check {
        width: 26px;
        height: 26px;
        flex-shrink: 0;
    }

    .quiz-answer-card--selected {
        background: linear-gradient(145deg, rgba(255, 215, 0, 0.22) 0%, rgba(255, 215, 0, 0.10) 100%);
        border-color: #FFD700;
        border-width: 2px;
        box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.55), 0 0 24px rgba(255, 215, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.10);
    }

    .quiz-answer-card--selected .quiz-answer-card__text {
        color: #FFD700;
    }

    .quiz-feedback-card,
    .quiz-discussion-card {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.035) 100%);
        border-color: rgba(245, 230, 168, 0.38);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 22px 22px;
    }

    .quiz-discussion-card__body,
    .quiz-feedback-card__reveal-value {
        color: #F5E6A8;
    }
}

.quiz-feedback-card {
    position: relative;
    padding: 24px 26px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(245, 230, 168, 0.18);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 26px 50px -20px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    animation: quizStageEnter 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quiz-feedback-card__halo {
    position: absolute;
    inset: -55% -65% -55% -65%;
    background: radial-gradient(ellipse 45% 42% at 50% 50%, rgba(255, 215, 0, 0.14) 0%, rgba(255, 215, 0, 0.06) 35%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    filter: blur(28px);
}

.quiz-feedback-card--correct {
    border-color: rgba(132, 204, 22, 0.45);
    box-shadow: 0 26px 50px -20px rgba(0, 0, 0, 0.55), 0 0 40px rgba(132, 204, 22, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quiz-feedback-card--incorrect {
    border-color: rgba(248, 113, 113, 0.4);
    box-shadow: 0 26px 50px -20px rgba(0, 0, 0, 0.55), 0 0 40px rgba(248, 113, 113, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quiz-feedback-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 230, 168, 0.55);
}

.quiz-feedback-card__headline {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.quiz-feedback-card__metric {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    color: #FFD700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.quiz-feedback-card__metric-divider {
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: rgba(245, 230, 168, 0.55);
}

.quiz-feedback-card__metric-label {
    margin-left: 8px;
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: rgba(245, 230, 168, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.quiz-feedback-card__verdict {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 1.6vw, 1.5rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.quiz-feedback-card__verdict--win {
    color: #BEF264;
    text-shadow: 0 0 24px rgba(132, 204, 22, 0.25);
}

.quiz-feedback-card__verdict--miss {
    color: #FCA5A5;
    text-shadow: 0 0 24px rgba(248, 113, 113, 0.20);
}

.quiz-feedback-card__reveal {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
}

.quiz-feedback-card__reveal-label {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 230, 168, 0.55);
}

.quiz-feedback-card__reveal-value {
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    color: rgba(255, 224, 130, 0.95);
    line-height: 1.4;
}

.quiz-discussion-card {
    position: relative;
    padding: 24px 26px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(245, 230, 168, 0.16);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 26px 50px -20px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.quiz-discussion-card__halo {
    position: absolute;
    inset: -55% -65% -55% -65%;
    background: radial-gradient(ellipse 45% 42% at 50% 50%, rgba(255, 215, 0, 0.12) 0%, rgba(255, 215, 0, 0.04) 40%, transparent 75%);
    pointer-events: none;
    z-index: -1;
    filter: blur(28px);
}

.quiz-discussion-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 230, 168, 0.55);
}

.quiz-discussion-card__body {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    color: rgba(245, 230, 168, 0.95);
    line-height: 1.4;
}

.quiz-reveal-wrap {
    animation: quizStageEnter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

@keyframes quizDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 14px rgba(255, 215, 0, 0.55); }
    50%      { transform: scale(1.25); opacity: 0.85; box-shadow: 0 0 22px rgba(255, 215, 0, 0.7); }
}

@media (prefers-reduced-motion: reduce) {
    .quiz-stage,
    .quiz-feedback-card,
    .quiz-reveal-wrap { animation: none; }
    .quiz-hero__eyebrow-dot { animation: none; }
}

.app-bar-title {
    display: flex;
    align-items: center;
}

.app-bar-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

/* Quiz Results Section on Results Page — brand-aligned glass cards */
.quiz-results-showcase {
    padding: clamp(24px, 4vw, 48px);
    max-width: min(1100px, 92vw);
    margin: 0 auto;
}

.quiz-results-list {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 2.6vh, 32px);
}

.quiz-question-result-card {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(245, 230, 168, 0.18);
    border-radius: 22px;
    padding: clamp(20px, 3vw, 32px);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 22px 48px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.quiz-question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    min-width: 0;
}

.quiz-answers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.quiz-answer-result {
    position: relative;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid rgba(245, 230, 168, 0.18);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.012) 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-width: 0;
    overflow: hidden;
}

.quiz-answer-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.6);
    border-color: rgba(245, 230, 168, 0.28);
}

.quiz-answer-result.correct {
    border-color: rgba(190, 242, 100, 0.55);
    background: linear-gradient(145deg, rgba(190, 242, 100, 0.10) 0%, rgba(190, 242, 100, 0.02) 100%);
    box-shadow: 0 0 28px rgba(190, 242, 100, 0.10);
}

.quiz-answer-result.incorrect {
    border-color: rgba(245, 230, 168, 0.14);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.quiz-answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.quiz-answer-stats {
    margin-top: 12px;
}

/* Quiz answer text — brand opacity tiers, never overflow */
.quiz-answer-result .mud-typography-h6 {
    color: #FFD700 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    font-size: clamp(1rem, 1.4vw, 1.2rem) !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    letter-spacing: -0.01em !important;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.quiz-answer-result.incorrect .mud-typography-h6 {
    color: rgba(255, 224, 130, 0.85) !important;
}

.quiz-answer-result .mud-typography-body1 {
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: rgba(245, 230, 168, 0.7) !important;
    font-variant-numeric: tabular-nums;
}

.quiz-answer-result .mud-typography-caption {
    font-size: 0.85rem !important;
    color: rgba(245, 230, 168, 0.55) !important;
}

/* Progress bar in brand gold/cream */
.quiz-answer-result .mud-progress-linear {
    height: 8px !important;
    border-radius: 999px !important;
    background-color: rgba(245, 230, 168, 0.10) !important;
}

.quiz-answer-result.correct .mud-progress-linear-bar {
    background: linear-gradient(90deg, rgba(190, 242, 100, 0.95) 0%, #BEF264 100%) !important;
    box-shadow: 0 0 14px rgba(190, 242, 100, 0.35);
}

.quiz-answer-result.incorrect .mud-progress-linear-bar {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.85) 0%, #FFD700 100%) !important;
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.25);
}

/* Question header chip */
.quiz-question-header .mud-chip {
    font-family: 'Inter', 'Montserrat', sans-serif !important;
    font-size: 0.85rem !important;
    padding: 6px 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    border-radius: 999px !important;
}

/* Quiz question title styling */
.quiz-question-result-card .mud-typography-h4 {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(1.2rem, 2vw, 1.6rem) !important;
    font-weight: 800 !important;
    color: #FFD700 !important;
    letter-spacing: -0.015em !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    overflow-wrap: anywhere;
    text-wrap: balance;
    flex: 1 1 240px;
    min-width: 0;
}

/* Total responses caption */
.quiz-question-result-card > .mud-typography-body1 {
    font-family: 'Inter', 'Montserrat', sans-serif !important;
    font-size: 0.95rem !important;
    color: rgba(245, 230, 168, 0.55) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.16em !important;
    font-weight: 700 !important;
}

@media (max-width: 720px) {
    .quiz-question-result-card,
    .quiz-answer-result {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.035) 100%) !important;
    }
    .quiz-answer-result.correct {
        background: linear-gradient(145deg, rgba(190, 242, 100, 0.18) 0%, rgba(190, 242, 100, 0.04) 100%) !important;
    }
}

/* ===================================
   Account Pages in Landing Layout
   =================================== */

/* Card styling for account pages - straight corners with thin gold border */
.landing-page .mud-paper {
    border-radius: 0 !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
    box-shadow: none !important;
    background: #0F0F1C !important;
}

/* Text color to match header menu options (#F5E6A8) */
.landing-page .mud-typography,
.landing-page .mud-input,
.landing-page .mud-input-slot,
.landing-page .mud-checkbox .mud-typography,
.landing-page .mud-input-label,
.landing-page .mud-input-label-inputcontrol,
.landing-page .mud-input-label-filled,
.landing-page .mud-input-label-outlined,
.landing-page .password-requirement,
.landing-page .password-requirement span {
    color: #F5E6A8 !important;
}

/* Keep headings gold */
.landing-page .mud-typography-h3,
.landing-page .mud-typography-h4 {
    color: #FFD700 !important;
}

/* Links stay gold */
.landing-page .mud-link {
    color: #FFD700 !important;
}

/* Buttons with straight corners */
.landing-page .mud-button {
    border-radius: 0 !important;
}

/* Text fields with straight corners and gold border */
.landing-page .mud-input-control .mud-input-slot {
    border-radius: 0 !important;
}

.landing-page .mud-input-outlined .mud-input-outlined-border {
    border-radius: 0 !important;
    border-color: rgba(255, 215, 0, 0.5) !important;
}

.landing-page .mud-input-control-input-container {
    border-radius: 0 !important;
}

/* ==========================================
   Mobile Bottom Navigation - Hide Side Drawer
   ========================================== */
@media (max-width: 960px) {
    /* Hide the side drawer completely on mobile */
    .mud-drawer {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        visibility: hidden !important;
    }
    
    /* Hide the drawer overlay */
    .mud-drawer-overlay {
        display: none !important;
    }
    
    /* Hide the hamburger menu toggle button */
    .desktop-menu-toggle {
        display: none !important;
    }
    
    /* Ensure main content takes full width and grows to fill available space */
    .mud-main-content {
        margin-left: 0 !important;
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        min-height: 0 !important; /* Allow flex shrinking */
    }
    
    /* Reset any drawer-related margins on the layout */
    .mud-layout {
        --mud-drawer-width: 0px !important;
    }
    
    /* Make layout a flex column container on mobile */
    .layout-with-bottom-nav {
        display: flex !important;
        flex-direction: column !important;
        height: 100vh !important;
        height: 100dvh !important; /* Dynamic viewport height for mobile browsers */
        overflow: hidden !important;
    }
}

/* Blazor error dialog overlay */
#blazor-error-ui {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
}

/* When Blazor shows the error (sets display:block), override to flex for centering */
#blazor-error-ui[style*="block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#blazor-error-ui .blazor-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#blazor-error-ui .blazor-error-dialog {
    position: relative;
    background: #1a1a2e;
    border: 1px solid rgba(214, 198, 140, 0.3);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

#blazor-error-ui .blazor-error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

#blazor-error-ui .blazor-error-dialog h3 {
    color: rgb(214, 198, 140);
    font-size: 1.4rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

#blazor-error-ui .blazor-error-dialog p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

#blazor-error-ui .blazor-error-refresh {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background: rgb(214, 198, 140);
    color: #0F0F1C;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s;
}

#blazor-error-ui .blazor-error-refresh:hover {
    background: rgb(234, 218, 160);
}

/* ========================================================================
   Participant finished waiting room — brand-aligned hero + glass cards.
   Star: "You're all done" headline. Visual rhyme with quiz/beverage views
   (eyebrow dot, accent bar, glass surface w/ halo, donut/progress recipe).
   ======================================================================== */
.done-stage {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(24px, 5vh, 64px) clamp(16px, 3vw, 32px) clamp(32px, 6vh, 80px);
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 3vh, 32px);
    animation: doneStageEnter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* ----- Hero ------------------------------------------------- */
.done-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    text-align: left;
    container-type: inline-size;
    container-name: done-hero;
}

.done-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 230, 168, 0.55);
    font-family: 'Inter', 'Montserrat', sans-serif;
    margin-bottom: 14px;
}

.done-hero__eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #BEF264;
    box-shadow: 0 0 14px rgba(190, 242, 100, 0.55);
    animation: doneDotPulse 2.4s ease-in-out infinite;
}

@keyframes doneDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.25); opacity: 0.85; }
}

.done-hero__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: -0.035em;
    font-size: clamp(2.6rem, 11cqi, 4.8rem);
    line-height: 0.98;
    color: #FFD700;
    margin: 0 0 18px;
    text-shadow: 0 0 56px rgba(255, 215, 0, 0.28), 0 8px 24px rgba(0, 0, 0, 0.5);
    text-wrap: balance;
}

.done-hero__accent {
    width: 64px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #FFD700, rgba(255, 215, 0, 0.3));
    margin-bottom: 18px;
}

.done-hero__subhead {
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.5;
    color: rgba(207, 199, 181, 0.85);
    max-width: 50ch;
    margin: 0;
}

/* ----- Glass cards (shared base) ---------------------------- */
.done-card {
    position: relative;
    padding: clamp(20px, 2.6vh, 28px) clamp(20px, 2.4vw, 28px);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(245, 230, 168, 0.18);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 22px 48px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.done-card__halo {
    position: absolute;
    inset: -55% -65% -55% -65%;
    background: radial-gradient(ellipse 45% 42% at 50% 50%, rgba(255, 215, 0, 0.14) 0%, rgba(255, 215, 0, 0.05) 35%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    filter: blur(28px);
}

.done-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 230, 168, 0.55);
    font-family: 'Inter', 'Montserrat', sans-serif;
}

/* ----- Summary stats --------------------------------------- */
.done-summary {
    display: flex;
    align-items: stretch;
    gap: clamp(18px, 3vw, 32px);
}

.done-summary__stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1 1 0;
    min-width: 0;
}

.done-summary__value {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1;
    color: #FFD700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.done-summary__denom {
    color: rgba(245, 230, 168, 0.45);
    font-weight: 500;
    font-size: 0.55em;
    margin-left: 4px;
}

.done-summary__label {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 230, 168, 0.55);
}

.done-summary__divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent 0%, rgba(245, 230, 168, 0.22) 50%, transparent 100%);
    align-self: stretch;
}

.done-favorite {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(245, 230, 168, 0.14);
}

.done-favorite__label {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 230, 168, 0.55);
}

.done-favorite__value {
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255, 224, 130, 0.95);
    text-align: right;
    overflow-wrap: anywhere;
}

/* ----- Progress -------------------------------------------- */
.done-progress {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.done-progress__readout {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.done-progress__count {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1;
    color: #FFD700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.done-progress__sep,
.done-progress__total {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2rem);
    color: rgba(245, 230, 168, 0.45);
    font-variant-numeric: tabular-nums;
}

.done-progress__caption {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 230, 168, 0.55);
    margin-left: 4px;
}

.done-progress__track {
    height: 10px;
    border-radius: 999px;
    background: rgba(245, 230, 168, 0.10);
    border: 1px solid rgba(245, 230, 168, 0.14);
    overflow: hidden;
}

.done-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.85) 0%, #FFD700 100%);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.35);
    border-radius: 999px;
    transition: width 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.done-progress__hint {
    margin: 0;
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    color: rgba(207, 199, 181, 0.7);
}

/* ----- Fun fact -------------------------------------------- */
.done-fact {
    margin: 0;
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.55;
    color: rgba(207, 199, 181, 0.85);
    text-wrap: balance;
}

/* Drop cap mirrors beverage description */
.done-fact::first-letter {
    color: rgba(255, 224, 130, 0.85);
    font-weight: 600;
    font-size: 1.15em;
    padding-right: 0.04em;
}

/* ----- Back link ------------------------------------------- */
.done-back {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 0;
    padding: 12px 4px;
    margin-top: 8px;
    color: rgba(214, 198, 140, 0.7);
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 180ms ease-out;
}

.done-back:hover,
.done-back:focus-visible {
    color: #FFD700;
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .done-stage { animation: none; }
    .done-hero__eyebrow-dot { animation: none; }
    .done-progress__fill { transition: none; }
}

/* Mobile: bump contrast on glass cards (same trick as quiz cards) */
@media (max-width: 720px) {
    .done-stage {
        padding-left: 16px;
        padding-right: 16px;
    }

    .done-card {
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.035) 100%);
        border-color: rgba(245, 230, 168, 0.32);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .done-summary {
        gap: 16px;
    }

    .done-progress__readout {
        gap: 6px;
    }
}
