﻿/* ============================================================================
   FILE: pod-play.css
   PURPOSE: Styles for Pod Play student-facing view
   EXTRACTED FROM: Play.cshtml
============================================================================ */

:root {
    --primary-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    /* Cockpit palette (matches Present.cshtml) */
    --cockpit-bg: #0f172a;
    --cockpit-surface: #1e293b;
    --cockpit-surface-hover: #334155;
    --cockpit-border: #334155;
    --cockpit-text: #f1f5f9;
    --cockpit-text-muted: #94a3b8;
    --cockpit-accent: #6366f1;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #f6f9f5 0%, #ebf0e9 100%);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Dark mode — Cockpit aesthetic matching Present view */
[data-theme="dark"] body {
    background: var(--cockpit-bg);
    color: var(--cockpit-text);
}

[data-theme="dark"] .pod-header {
    background: var(--cockpit-surface);
    border-bottom: 1px solid var(--cockpit-border);
    box-shadow: none;
}

[data-theme="dark"] .pod-title {
    color: var(--cockpit-text);
}

[data-theme="dark"] .progress {
    background: var(--cockpit-bg);
}

[data-theme="dark"] .content-card {
    background: var(--cockpit-surface);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    color: var(--cockpit-text);
    border: 1px solid var(--cockpit-border);
}

[data-theme="dark"] .pod-nav {
    background: var(--cockpit-surface);
    border-top: 1px solid var(--cockpit-border);
    box-shadow: none;
}

[data-theme="dark"] .locked-message {
    background: #2b2b2b;
    color: #e9e9e9;
}

[data-theme="dark"] .feedback-card {
    background: #2b2b2b;
    color: #e9e9e9;
}

[data-theme="dark"] .remediation-box {
    background: #78350f;
    color: #fef3c7;
}

[data-theme="dark"] .mnemonic-box {
    background: #0c4a6e;
    color: #e0f2fe;
}

[data-theme="dark"] .text-muted {
    color: var(--cockpit-text-muted) !important;
}

[data-theme="dark"] .badge.bg-primary {
    background-color: var(--cockpit-accent) !important;
}

[data-theme="dark"] .badge.bg-info {
    background-color: #0891b2 !important;
}

[data-theme="dark"] .badge.bg-success {
    background-color: #10b981 !important;
}

[data-theme="dark"] .badge.bg-warning {
    background-color: #f59e0b !important;
    color: #2b2b2b !important;
}

[data-theme="dark"] .btn-outline-secondary {
    color: var(--cockpit-text-muted);
    border-color: var(--cockpit-border);
    background: var(--cockpit-bg);
}

    [data-theme="dark"] .btn-outline-secondary:hover {
        background: var(--cockpit-surface-hover);
        color: var(--cockpit-text);
        border-color: var(--cockpit-accent);
    }

[data-theme="dark"] .btn-primary {
    background-color: var(--cockpit-accent);
    border-color: var(--cockpit-accent);
}

    [data-theme="dark"] .btn-primary:hover {
        background-color: #7c3aed;
        border-color: #7c3aed;
    }

[data-theme="dark"] .alert-success {
    background: rgba(16,185,129,0.15);
    border-color: rgba(16,185,129,0.3);
    color: #6ee7b7;
}

[data-theme="dark"] .alert-warning {
    background: rgba(245,158,11,0.15);
    border-color: rgba(245,158,11,0.3);
    color: #fcd34d;
}

[data-theme="dark"] .alert-danger {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
    color: #fca5a5;
}

[data-theme="dark"] .alert-info {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.3);
    color: #93c5fd;
}

/* A test's "Answer saved." note (pod-play-assessment.js + BuildExitAssessmentHtml)
   is .alert-secondary; without this it kept Bootstrap's light grey box. */
[data-theme="dark"] .alert-secondary {
    background: rgba(165, 165, 165,0.14);
    border-color: rgba(165, 165, 165,0.32);
    color: #e9e9e9;
}

/* ============================================ */
/* DARK MODE: Activity element overrides — Cockpit style */
/* ============================================ */

[data-theme="dark"] .multiselect-option,
[data-theme="dark"] .matching-item,
[data-theme="dark"] .sorting-item {
    background: var(--cockpit-bg) !important;
    border-color: var(--cockpit-border) !important;
    color: var(--cockpit-text) !important;
}

    [data-theme="dark"] .multiselect-option:hover,
    [data-theme="dark"] .matching-item:hover,
    [data-theme="dark"] .sorting-item:hover {
        border-color: var(--cockpit-accent) !important;
        background: rgba(99,102,241,0.08) !important;
    }

    [data-theme="dark"] .multiselect-option > div > span:first-child {
        background: var(--cockpit-surface-hover) !important;
        color: var(--cockpit-text-muted) !important;
    }

    [data-theme="dark"] .multiselect-option > div > span:nth-child(2) {
        color: var(--cockpit-text) !important;
    }

    [data-theme="dark"] .multiselect-option > div > span:last-child {
        color: #747474 !important;
    }

/* Two-Part options: same inline-white card as multiselect. Selection and the
   verdict are painted inline, which the !important above would bury — so
   selection reads from aria-checked and the verdict from the tp-* classes the
   reveal adds (placed after :hover to win the tie). Play's Nebula overrides
   live in pod-nebula-dark.css §14b; this block serves Present. */
[data-theme="dark"] .two-part-option {
    background: var(--cockpit-bg) !important;
    border-color: var(--cockpit-border) !important;
    color: var(--cockpit-text) !important;
}

    [data-theme="dark"] .two-part-option:hover {
        border-color: var(--cockpit-accent) !important;
        background: rgba(99,102,241,0.08) !important;
    }

    [data-theme="dark"] .two-part-option > div > span:first-child {
        background: var(--cockpit-surface-hover) !important;
        color: var(--cockpit-text-muted) !important;
    }

    [data-theme="dark"] .two-part-option .option-text {
        color: var(--cockpit-text) !important;
    }

    [data-theme="dark"] .two-part-option > div > span:last-child {
        color: #747474 !important;
    }

    [data-theme="dark"] .two-part-option[aria-checked="true"] {
        border-color: var(--cockpit-accent) !important;
        background: rgba(99,102,241,0.18) !important;
    }

    [data-theme="dark"] .two-part-option.tp-correct {
        border-color: #10b981 !important;
        background: rgba(16,185,129,0.18) !important;
    }

    [data-theme="dark"] .two-part-option.tp-wrong {
        border-color: #ef4444 !important;
        background: rgba(239,68,68,0.18) !important;
    }

    [data-theme="dark"] .two-part-option.tp-missed {
        border-color: #f59e0b !important;
        background: rgba(245,158,11,0.16) !important;
    }

[data-theme="dark"] .matching-area .col-md-5 > div {
    background: var(--cockpit-bg) !important;
}

/* Inline-choice <select> blanks. The native control defaults to a white
   background; in dark mode the page's light text then sits on white and the
   dropdown is unreadable. Pin explicit colors for both themes (including the
   <option> list, which some browsers paint from the control's own colors). */
.inline-choice-select {
    background-color: #ffffff;
    color: #111827;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 6px;
}

[data-theme="dark"] .inline-choice-select {
    background-color: var(--cockpit-surface) !important;
    color: var(--cockpit-text) !important;
    border-color: var(--cockpit-border) !important;
}

    [data-theme="dark"] .inline-choice-select option {
        background-color: var(--cockpit-surface);
        color: var(--cockpit-text);
    }

    [data-theme="dark"] .matching-area .col-md-5 > div > h5 {
        color: var(--cockpit-text-muted) !important;
        border-bottom-color: var(--cockpit-border) !important;
    }

[data-theme="dark"] .matching-item > span:not(.match-indicator) {
    color: var(--cockpit-text) !important;
}

[data-theme="dark"] .match-indicator {
    background: var(--cockpit-surface) !important;
    color: #747474 !important;
}

[data-theme="dark"] .matching-area .col-md-2 i {
    color: #767676 !important;
}

[data-theme="dark"] .matching-item.selected {
    border-color: var(--cockpit-accent) !important;
    background: rgba(99,102,241,0.15) !important;
}

[data-theme="dark"] .matching-item.matched-correct {
    border-color: #10b981 !important;
    background: rgba(16,185,129,0.15) !important;
}

[data-theme="dark"] .matching-item.matched-incorrect {
    border-color: #ef4444 !important;
    background: rgba(239,68,68,0.15) !important;
}

[data-theme="dark"] .vocab-section {
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(59,130,246,0.05)) !important;
    border-left-color: var(--cockpit-accent) !important;
}

    [data-theme="dark"] .vocab-section h6.text-primary {
        color: #a5b4fc !important;
    }

[data-theme="dark"] .vocab-card {
    background: var(--cockpit-bg) !important;
    border: 1px solid var(--cockpit-border);
}

    [data-theme="dark"] .vocab-card strong.text-dark {
        color: #a5b4fc !important;
    }

    [data-theme="dark"] .vocab-card .text-muted {
        color: var(--cockpit-text-muted) !important;
    }

[data-theme="dark"] .activity-header h3 {
    color: var(--cockpit-text) !important;
}

[data-theme="dark"] .sorting-instructions {
    background: var(--cockpit-bg) !important;
}

[data-theme="dark"] .checkpoint-title,
[data-theme="dark"] .assessment-title {
    color: var(--cockpit-text) !important;
}

[data-theme="dark"] .matching-column {
    background: var(--cockpit-bg) !important;
}

[data-theme="dark"] .column-header {
    color: var(--cockpit-text-muted) !important;
    border-bottom-color: var(--cockpit-border) !important;
}

[data-theme="dark"] .hint-text .text-muted {
    color: var(--cockpit-text-muted) !important;
}

[data-theme="dark"] .form-check-label {
    color: var(--cockpit-text);
}

[data-theme="dark"] .position-indicator {
    color: var(--cockpit-text-muted);
}

.pod-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* dvh tracks the *visible* viewport on phones — keeps the bottom nav
       reachable when the mobile browser URL bar is showing */
    height: 100dvh;
}

/* Header */
.pod-header {
    background: white;
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

[data-theme="dark"] .pod-header {
    background: var(--cockpit-surface);
    border-bottom: 1px solid var(--cockpit-border);
    box-shadow: none;
}

.pod-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-theme="dark"] .pod-title {
    color: var(--cockpit-text);
}

.pod-title i {
    color: var(--primary-color);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar-wrapper {
    width: 200px;
}

.progress {
    height: 10px;
    border-radius: 5px;
    background: #e2e8f0;
}

[data-theme="dark"] .progress {
    background: var(--cockpit-bg);
}

/* Main Content */
.pod-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

.content-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    /* One cap for EVERY card — slides, checkpoint/exit questions, media.
       Slides used to sit at 1100/1200 while media screens got 1400, so
       cards visibly changed width as students advanced. */
    max-width: 1400px;
    width: 100%;
    padding: 40px 48px;
    margin: 0 auto;
    animation: slideIn 0.4s ease;
    font-size: 1.1rem;
}

    /* EXPANDED content card for media/video content */
    .content-card.media-expanded {
        max-width: 1400px;
        padding: 30px;
    }

/* Chromebook-landscape & wider desktops: bump caps so the reading
   measure isn't cramped at 1280-1366px viewports. */
@media (min-width: 1280px) {
    .ixl-questions-panel { max-width: 560px; }
    .ixl-image-section { flex: 0 0 50%; }
}

[data-theme="dark"] .content-card {
    background: var(--cockpit-surface, #2b2b2b);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    color: var(--cockpit-text, #f5f5f5);
    border: 1px solid var(--cockpit-border, #434343);
}

    /* ============================================
   COCKPIT DARK MODE — Content overrides
   Matches Present.cshtml cockpit-content-inner
   ============================================ */
    [data-theme="dark"] .content-card h2,
    [data-theme="dark"] .content-card h3,
    [data-theme="dark"] .content-card h5,
    [data-theme="dark"] .content-card h6,
    [data-theme="dark"] .content-card strong {
        color: var(--cockpit-text) !important;
    }

    [data-theme="dark"] .content-card .slide-title {
        font-size: 2rem !important;
    }

    [data-theme="dark"] .content-card p,
    [data-theme="dark"] .content-card span,
    [data-theme="dark"] .content-card label,
    [data-theme="dark"] .content-card li {
        color: #d6d6d6 !important;
    }

    [data-theme="dark"] .content-card .text-muted {
        color: var(--cockpit-text-muted) !important;
    }

    [data-theme="dark"] .content-card .text-dark {
        color: var(--cockpit-text) !important;
    }

    [data-theme="dark"] .content-card .content-point {
        border-bottom-color: var(--cockpit-border) !important;
        padding: 18px 0 !important;
    }

        [data-theme="dark"] .content-card .content-point span {
            font-size: 1.25rem !important;
            line-height: 1.7 !important;
        }

    /* Solid accent fill needs dark ink — pod-nebula-dark.css sets green TEXT
       on .badge.bg-primary/.bg-success (for its translucent pills), and this
       more-specific solid-fill override was inheriting it: green-on-green
       badges rendered as blank pills ("Slide 1", the Image panel badge). */
    [data-theme="dark"] .content-card .badge.bg-primary {
        background: var(--cockpit-accent) !important;
        color: #111111 !important;
    }

    [data-theme="dark"] .content-card .badge.bg-success {
        background: #10b981 !important;
        color: #111111 !important;
    }

    [data-theme="dark"] .content-card .badge.bg-secondary {
        background: var(--cockpit-surface-hover) !important;
        color: var(--cockpit-text-muted) !important;
    }

    [data-theme="dark"] .content-card .btn-outline-secondary {
        border-color: var(--cockpit-border) !important;
        color: var(--cockpit-text-muted) !important;
    }

        [data-theme="dark"] .content-card .btn-outline-secondary:hover {
            background: var(--cockpit-surface-hover) !important;
            color: var(--cockpit-text) !important;
        }

    [data-theme="dark"] .content-card .activity-actions .btn-success {
        background: #10b981 !important;
        border-color: #10b981 !important;
    }

    [data-theme="dark"] .content-card div[style*="background: #f9fafb"],
    [data-theme="dark"] .content-card div[style*="background: #f8f9fa"] {
        background: var(--cockpit-bg) !important;
        border: 1px solid var(--cockpit-border);
    }

    [data-theme="dark"] .content-card div[style*="background: #f0fdf4"] {
        background: rgba(16,185,129,0.1) !important;
    }

    [data-theme="dark"] .content-card .form-check {
        background: var(--cockpit-bg) !important;
    }

/* Dark mode nav buttons — match cockpit btn-nav style */
[data-theme="dark"] .nav-btn {
    border: 1px solid var(--cockpit-border);
    background: var(--cockpit-bg);
    color: var(--cockpit-text);
}

    [data-theme="dark"] .nav-btn:hover:not(:disabled) {
        background: var(--cockpit-surface-hover);
        border-color: var(--cockpit-accent);
    }

    [data-theme="dark"] .nav-btn:disabled {
        opacity: 0.35;
    }

[data-theme="dark"] .btn-primary.nav-btn {
    background: var(--cockpit-accent);
    border-color: var(--cockpit-accent);
    color: white;
}

    [data-theme="dark"] .btn-primary.nav-btn:hover:not(:disabled) {
        background: #7c3aed;
    }

/* Dark mode badge overrides */
[data-theme="dark"] .mode-live {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .mode-self-paced {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

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

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

/* Navigation Footer */
.pod-nav {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

/* Prev / Next clusters flank the breadcrumb. Equal flex (basis 0, grow 1) on
   both sides means the centered breadcrumb-track stays centered no matter how
   much wider "Previous" is than "Next". */
.nav-side {
    flex: 1 1 0;
    min-width: 0;
}

.nav-side-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

/* Test My Memory sits beside Next, so the right cluster is a row and
   .next-btn-wrapper (a column, for its tooltip) is nested inside it rather
   than being the cluster itself. */
.nav-side-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

[data-theme="dark"] .pod-nav {
    background: var(--cockpit-surface);
    border-top: 1px solid var(--cockpit-border);
    box-shadow: none;
}

.nav-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
}

    .nav-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.position-indicator {
    font-size: 1.1rem;
    color: #64748b;
}

/* ============================================ */
/* 🧭 UX-01: Visual Progress Breadcrumb        */
/* ============================================ */

.breadcrumb-track {
    flex: 0 1 auto;
    max-width: 560px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 4px 12px;
    display: flex;
    align-items: center;
    /* `safe center`: centers the chapters when they fit, but falls back to
       START alignment the moment they overflow the capped track — so a longer
       pod stays fully scrollable from the first chapter instead of having its
       leading (and trailing) chapters clipped unreachably. Plain `center` or
       auto-margins center the OVERFLOW, which pins scrollLeft above 0 and hides
       the early chapters with no way to scroll back to them. */
    justify-content: safe center;
}

    .breadcrumb-track::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    /* Edge fades = the scroll affordance. When the chapters overflow the
       capped track the scrollbar is hidden, so the last chapter (Apply / Exit)
       otherwise looks abruptly cut off. updateBreadcrumbEdgeFades() toggles
       these by scroll position so a soft fade only shows on the side that has
       more content. */
    .breadcrumb-track.bc-fade-right {
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%);
                mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%);
    }

    .breadcrumb-track.bc-fade-left {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26px);
                mask-image: linear-gradient(to right, transparent 0, #000 26px);
    }

    .breadcrumb-track.bc-fade-left.bc-fade-right {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
                mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
    }

.breadcrumb-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 2px 0;
    /* Centering is handled by the track's `justify-content: safe center`. An
       `auto` margin here would re-introduce the centered-overflow clipping. */
    margin: 0;
}

.bc-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: transparent;
    cursor: default;
    position: relative;
    flex-shrink: 0;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* Content-type ring colors (unvisited = border only) */
    .bc-dot[data-ctype="slide"] {
        border-color: #60a5fa;
    }

    .bc-dot[data-ctype="engage"] {
        border-color: #a78bfa;
    }

    .bc-dot[data-ctype="media"] {
        border-color: #22d3ee;
    }

    .bc-dot[data-ctype="checkpoint"] {
        border-color: #fbbf24;
    }

    .bc-dot[data-ctype="exit"] {
        border-color: #34d399;
    }

    /* Visited: filled with type color */
    .bc-dot.bc-visited[data-ctype="slide"] {
        background: #60a5fa;
        border-color: #60a5fa;
    }

    .bc-dot.bc-visited[data-ctype="engage"] {
        background: #a78bfa;
        border-color: #a78bfa;
    }

    .bc-dot.bc-visited[data-ctype="media"] {
        background: #22d3ee;
        border-color: #22d3ee;
    }

    .bc-dot.bc-visited[data-ctype="checkpoint"] {
        background: #fbbf24;
        border-color: #fbbf24;
    }

    .bc-dot.bc-visited[data-ctype="exit"] {
        background: #34d399;
        border-color: #34d399;
    }

    /* Current: larger + pulse ring */
    .bc-dot.bc-current {
        width: 22px;
        height: 22px;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
        animation: bcPulse 1.6s ease-in-out infinite;
        z-index: 2;
    }

        .bc-dot.bc-current[data-ctype="slide"] {
            background: #3b82f6;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59,130,246,0.35);
        }

        .bc-dot.bc-current[data-ctype="engage"] {
            background: #8b5cf6;
            border-color: #8b5cf6;
            box-shadow: 0 0 0 3px rgba(139,92,246,0.35);
        }

        .bc-dot.bc-current[data-ctype="media"] {
            background: #06b6d4;
            border-color: #06b6d4;
            box-shadow: 0 0 0 3px rgba(6,182,212,0.35);
        }

        .bc-dot.bc-current[data-ctype="checkpoint"] {
            background: #f59e0b;
            border-color: #f59e0b;
            box-shadow: 0 0 0 3px rgba(245,158,11,0.35);
        }

        .bc-dot.bc-current[data-ctype="exit"] {
            background: #10b981;
            border-color: #10b981;
            box-shadow: 0 0 0 3px rgba(16,185,129,0.35);
        }

    /* Answered checkmark overlay */
    .bc-dot.bc-answered::after {
        content: '\f00c'; /* fa-check */
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 0.5rem;
        color: white;
        position: absolute;
    }

    /* Clickable visited dots */
    .bc-dot.bc-clickable {
        cursor: pointer;
    }

        .bc-dot.bc-clickable:hover {
            transform: scale(1.25);
            filter: brightness(1.15);
        }

    /* Review mode: dim non-review dots */
    .bc-dot.bc-review-dimmed {
        opacity: 0.25;
        pointer-events: none;
    }

@keyframes bcPulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(99,102,241,0.35);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(99,102,241,0.10);
    }
}

/* Simulator items (Apply-Mode / practice sims) — pink, distinct from the
   amber checkpoint dots they sit between. */
.bc-dot[data-ctype="simulator"] {
    border-color: #f472b6;
}

.bc-dot.bc-visited[data-ctype="simulator"] {
    background: #f472b6;
    border-color: #f472b6;
}

.bc-dot.bc-current[data-ctype="simulator"] {
    background: #ec4899;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236,72,153,0.35);
}

/* ============================================ */
/* 🧭 CHAPTER-BAR: section-grouped breadcrumb   */
/* Dots live inside labeled chapter segments    */
/* (Engage | Learn | Video | Guided | Solo |    */
/*  Apply | Exit) built from podContentSequence */
/* ============================================ */

.bc-seg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 2px 7px 3px;
    border-radius: 10px;
    flex-shrink: 0;
    transition: opacity 0.25s ease;
}

    /* Divider between chapters */
    .bc-seg + .bc-seg {
        border-left: 1px solid #e2e8f0;
        border-radius: 0 10px 10px 0;
    }

.bc-seg-label {
    border: 0;
    background: none;
    padding: 0 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
    white-space: nowrap;
    cursor: default;
    line-height: 1.2;
}

    .bc-seg-label i {
        font-size: 0.6rem;
    }

.bc-seg-active .bc-seg-label {
    color: #6366f1;
}

/* Completed chapter: green check after the label */
.bc-seg-complete .bc-seg-label::after {
    content: '\f00c'; /* fa-check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.55rem;
    color: #10b981;
}

.bc-seg-clickable .bc-seg-label {
    cursor: pointer;
}

    .bc-seg-clickable .bc-seg-label:hover {
        color: #6366f1;
        text-decoration: underline;
    }

/* Review mode: chapter has no review items */
.bc-seg-dimmed {
    opacity: 0.25;
    pointer-events: none;
}

.bc-seg-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .bc-seg + .bc-seg {
    border-left-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bc-seg-label {
    color: rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .bc-seg-active .bc-seg-label {
    color: #a5b4fc;
}

[data-theme="dark"] .bc-seg-clickable .bc-seg-label:hover {
    color: #a5b4fc;
}

/* ── Dark Mode ── */
[data-theme="dark"] .bc-dot {
    border-color: #575757;
}

    [data-theme="dark"] .bc-dot[data-ctype="slide"] {
        border-color: #3b82f6;
    }

    [data-theme="dark"] .bc-dot[data-ctype="engage"] {
        border-color: #8b5cf6;
    }

    [data-theme="dark"] .bc-dot[data-ctype="media"] {
        border-color: #06b6d4;
    }

    [data-theme="dark"] .bc-dot[data-ctype="checkpoint"] {
        border-color: #d97706;
    }

    [data-theme="dark"] .bc-dot[data-ctype="exit"] {
        border-color: #059669;
    }

    [data-theme="dark"] .bc-dot.bc-visited[data-ctype="slide"] {
        background: #3b82f6;
        border-color: #3b82f6;
    }

    [data-theme="dark"] .bc-dot.bc-visited[data-ctype="engage"] {
        background: #8b5cf6;
        border-color: #8b5cf6;
    }

    [data-theme="dark"] .bc-dot.bc-visited[data-ctype="media"] {
        background: #06b6d4;
        border-color: #06b6d4;
    }

    [data-theme="dark"] .bc-dot.bc-visited[data-ctype="checkpoint"] {
        background: #d97706;
        border-color: #d97706;
    }

    [data-theme="dark"] .bc-dot.bc-visited[data-ctype="exit"] {
        background: #059669;
        border-color: #059669;
    }

    [data-theme="dark"] .bc-dot.bc-current[data-ctype="slide"] {
        background: #60a5fa;
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96,165,250,0.35);
    }

    [data-theme="dark"] .bc-dot.bc-current[data-ctype="engage"] {
        background: #a78bfa;
        border-color: #a78bfa;
        box-shadow: 0 0 0 3px rgba(167,139,250,0.35);
    }

    [data-theme="dark"] .bc-dot.bc-current[data-ctype="media"] {
        background: #22d3ee;
        border-color: #22d3ee;
        box-shadow: 0 0 0 3px rgba(34,211,238,0.35);
    }

    [data-theme="dark"] .bc-dot.bc-current[data-ctype="checkpoint"] {
        background: #fbbf24;
        border-color: #fbbf24;
        box-shadow: 0 0 0 3px rgba(251,191,36,0.35);
    }

    [data-theme="dark"] .bc-dot.bc-current[data-ctype="exit"] {
        background: #34d399;
        border-color: #34d399;
        box-shadow: 0 0 0 3px rgba(52,211,153,0.35);
    }

    [data-theme="dark"] .bc-dot[data-ctype="simulator"] {
        border-color: #db2777;
    }

    [data-theme="dark"] .bc-dot.bc-visited[data-ctype="simulator"] {
        background: #db2777;
        border-color: #db2777;
    }

    [data-theme="dark"] .bc-dot.bc-current[data-ctype="simulator"] {
        background: #f472b6;
        border-color: #f472b6;
        box-shadow: 0 0 0 3px rgba(244,114,182,0.35);
    }

/* ── Mobile: smaller dots, tighter gap ── */
@media (max-width: 576px) {
    .breadcrumb-track {
        max-width: 200px;
        padding: 4px 6px;
    }

    .breadcrumb-dots {
        gap: 4px;
    }

    .bc-dot {
        width: 14px;
        height: 14px;
    }

        .bc-dot.bc-current {
            width: 17px;
            height: 17px;
        }

        .bc-dot.bc-answered::after {
            font-size: 0.4rem;
        }

    /* 🧭 CHAPTER-BAR: drop the icon, keep the short label; the track
       scrolls and auto-centers the current dot. */
    .bc-seg {
        padding: 1px 5px 2px;
    }

    .bc-seg-label {
        font-size: 0.52rem;
    }

        .bc-seg-label i {
            display: none;
        }

    .bc-seg-dots {
        gap: 4px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .breadcrumb-track {
        max-width: 320px;
    }
}

/* ============================================ */
/* 🔥 UX-02: Streak Counter                    */
/* ============================================ */

.streak-widget {
    display: none; /* shown by JS */
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    color: #92400e;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

    .streak-widget.streak-visible {
        display: flex;
    }

    .streak-widget.streak-pop {
        animation: streakPop 0.35s ease-out;
    }

.streak-fire {
    font-size: 1.1rem;
    line-height: 1;
}

.streak-count {
    font-variant-numeric: tabular-nums;
    min-width: 14px;
    text-align: center;
}

.streak-label {
    font-weight: 600;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Milestone glow at streak 5, 10, 15... */
.streak-widget.streak-milestone {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #991b1b;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

/* Floating "+1" particle */
.streak-plus-one {
    position: absolute;
    top: -4px;
    right: -2px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #f59e0b;
    pointer-events: none;
    animation: streakPlusOne 0.7s ease-out forwards;
}

.streak-widget.streak-milestone .streak-plus-one {
    color: #ef4444;
}

@keyframes streakPop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.18);
    }

    100% {
        transform: scale(1);
    }
}
@keyframes streakPlusOne {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-18px);
    }
}

/* Reset shake */
.streak-widget.streak-reset {
    animation: streakReset 0.4s ease-out;
}

@keyframes streakReset {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-4px);
    }

    40% {
        transform: translateX(4px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(2px);
    }
}

/* Dark mode */
[data-theme="dark"] .streak-widget {
    background: linear-gradient(135deg, #78350f, #92400e);
    border-color: #f59e0b;
    color: #fef3c7;
}

    [data-theme="dark"] .streak-widget.streak-milestone {
        background: linear-gradient(135deg, #7f1d1d, #991b1b);
        border-color: #ef4444;
        color: #fecaca;
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
    }

[data-theme="dark"] .streak-plus-one {
    color: #fbbf24;
}

[data-theme="dark"] .streak-widget.streak-milestone .streak-plus-one {
    color: #fca5a5;
}

/* Mobile */
@media (max-width: 576px) {
    .streak-widget {
        padding: 4px 10px;
        font-size: 0.75rem;
        gap: 4px;
    }

    .streak-fire {
        font-size: 0.9rem;
    }

    .streak-label {
        display: none;
    }
}

/* Mode indicators */
.mode-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.mode-live {
    background: #fee2e2;
    color: #dc2626;
}

.mode-self-paced {
    background: #d1fae5;
    color: #059669;
}

/* Waiting states */
.waiting-screen {
    text-align: center;
    /* Trimmed from 60px 40px — the launch card stacks an icon, title, stat
       chips and two framing cards, and the old padding pushed "Start
       Learning" below the fold on a laptop. fitSlideToViewport() is the
       safety net, but smaller padding means it rarely has to shrink. */
    padding: 28px 32px;
}

.waiting-icon {
    font-size: 3.4rem;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

/* Launch-screen stat chips — one centered flex cluster (replaces the old
   Bootstrap row/col-auto grid that wrapped the last chip onto its own line).
   The descendant selector outranks Bootstrap's base `.badge` so the pill
   sizing wins regardless of stylesheet order; bg-* colour classes (and the
   dark-mode overrides) are untouched. */
.ws-stat-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 760px;
    margin: 16px auto 14px;
}

    /* Compact pills — small enough that the full set fits one row on desktop
       and wraps to at most two on narrow screens (the long labels were
       shortened in the markup: "Media", "Independent Practice", "Exit"). */
    .ws-stat-row .badge {
        display: inline-flex;
        align-items: center;
        font-size: 0.8rem;
        font-weight: 600;
        line-height: 1.1;
        padding: 6px 12px;
        border-radius: 999px;
        white-space: nowrap;
    }

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

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ── Live answer gate: a Submit the presenter hasn't opened yet ──────────
   Applied by applyLiveLockLabel() in pod-play-navigation.js. This must NOT
   look like a broken button: it reads as "waiting", amber rather than the
   usual green, cursor:wait, and it keeps full contrast so the label is
   legible. Needs !important on the paint properties because
   adapted-cyberpunk.css loads AFTER this file and gives .btn-success a neon
   treatment that would otherwise win the cascade.                        */
.activity-submit-btn.live-answer-locked {
    background: #fffbeb !important;
    background-image: none !important;
    border-color: #f59e0b !important;
    color: #92400e !important;
    box-shadow: none !important;
    text-shadow: none !important;
    cursor: wait;
    /* Bootstrap dims disabled buttons to .65; the whole point here is that the
       student can READ why they're waiting. */
    opacity: 1 !important;
}

.activity-submit-btn.live-answer-locked i {
    color: #b45309 !important;
    animation: podLiveLockPulse 1.8s ease-in-out infinite;
}

@keyframes podLiveLockPulse {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 1; }
}

[data-theme="dark"] .activity-submit-btn.live-answer-locked {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: #b45309 !important;
    color: #fcd34d !important;
}

[data-theme="dark"] .activity-submit-btn.live-answer-locked i {
    color: #fbbf24 !important;
}

@media (prefers-reduced-motion: reduce) {
    .activity-submit-btn.live-answer-locked i { animation: none; opacity: 1; }
}

/* Activity locked overlay */
.locked-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

[data-theme="dark"] .locked-overlay {
    background: rgba(27, 27, 27, 0.75);
    backdrop-filter: blur(8px);
}

.locked-message {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
}

[data-theme="dark"] .locked-message {
    background: var(--cockpit-surface);
    color: var(--cockpit-text);
    border: 1px solid var(--cockpit-border);
}

/* Feedback modal */
.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

[data-theme="dark"] .feedback-overlay {
    background: rgba(27, 27, 27, 0.85);
    backdrop-filter: blur(8px);
}

.feedback-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: popIn 0.3s ease;
}

[data-theme="dark"] .feedback-card {
    background: var(--cockpit-surface);
    color: var(--cockpit-text);
    border: 1px solid var(--cockpit-border);
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

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

.feedback-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.feedback-correct {
    color: var(--success-color);
}

.feedback-incorrect {
    color: var(--danger-color);
}

.remediation-box {
    background: #fef3c7;
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    border-radius: 0 10px 10px 0;
    text-align: left;
    margin: 20px 0;
}

[data-theme="dark"] .remediation-box {
    background: rgba(245,158,11,0.12);
    border-left-color: #f59e0b;
    color: #fcd34d;
}

.mnemonic-box {
    background: #e0f2fe;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    font-style: italic;
}

[data-theme="dark"] .mnemonic-box {
    background: rgba(59,130,246,0.12);
    color: #93c5fd;
}

/* Completion screen */
.completion-screen {
    text-align: center;
    padding: 60px 20px;
}

.trophy-icon {
    font-size: 5rem;
    color: var(--warning-color);
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success-color), #059669);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    color: white;
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Engage slide styles */
.engage-option:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-glow {
    animation: glow 1s ease-in-out 2;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }
}

[data-theme="dark"] .engage-option {
    border-color: var(--cockpit-border) !important;
    color: var(--cockpit-text) !important;
    background: var(--cockpit-bg) !important;
    font-size: 1.15rem !important;
}

    [data-theme="dark"] .engage-option:hover:not(:disabled) {
        border-color: var(--cockpit-accent) !important;
        background: rgba(99,102,241,0.1) !important;
    }

[data-theme="dark"] .engage-image-placeholder {
    background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(245,158,11,0.05)) !important;
    border-color: rgba(245,158,11,0.3) !important;
}

/* ============================================ */
/* ENGAGE REVEAL — pops up as a fixed overlay   */
/* ============================================ */
/* The reveal (verdict + social-proof spread) used to render in-flow below the
   options. That stacked height (a) pushed the engage slide taller than most
   slides and (b) fed fitSlideToViewport an inflated measurement, shrinking the
   whole slide. As a fixed overlay it's out of flow: the slide is sized to its
   pre-reveal height and the reveal simply pops over it. fitSlideToViewport
   also clears any zoom while the overlay is visible so the popup renders at
   true viewport scale (it's a descendant of the zoom-able #slideContent). */
.engage-reveal-overlay {
    display: none;
}

    .engage-reveal-overlay.is-visible {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 1080;
        align-items: center;
        justify-content: center;
        padding: 20px;
        background: rgba(15, 23, 42, 0.55);
        animation: engageOverlayFade 0.2s ease;
    }

[data-theme="dark"] .engage-reveal-overlay.is-visible {
    background: rgba(0, 0, 0, 0.65);
}

.engage-reveal-overlay .engage-reveal-card {
    max-width: 600px;
    width: 100%;
    max-height: 82vh;
    overflow-y: auto;
    background: #fff; /* fallback surface; teaser/spread set their own inline bg */
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    animation: engagePopIn 0.28s cubic-bezier(.22, 1, .36, 1);
}

[data-theme="dark"] .engage-reveal-overlay .engage-reveal-card {
    background: #1b1b1b;
}

.engage-reveal-continue {
    margin-top: 16px;
    text-align: center;
}

@keyframes engageOverlayFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes engagePopIn {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

/* ============================================ */
/* EDPUZZLE-STYLE VIDEO PLAYER (IMPROVED)      */
/* Video fills screen, panel slides in on question */
/* ============================================ */

.edpuzzle-container {
    width: 100%;
}

.ep-header {
    text-align: center;
    margin-bottom: 20px;
}

.ep-title {
    font-weight: 700;
    font-size: 1.75rem;
    color: #1f2937;
    margin-bottom: 5px;
}

[data-theme="dark"] .ep-title {
    color: #f3f4f6;
}

.ep-layout {
    display: flex;
    gap: 24px;
    align-items: stretch;
    min-height: 500px;
    transition: all 0.4s ease;
}

/* Video section takes full width by default */
.ep-video-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: flex 0.4s ease;
}

/* When question panel is visible, video shrinks */
.ep-layout.question-active .ep-video-section {
    flex: 1.2;
}

.ep-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

    .ep-video-wrapper iframe,
    .ep-video-wrapper > div {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

/* Honest states for the video box: spinner until the player is ready,
   error card when the video can never play (deleted/private/blocked).
   Hardcoded hex like the rest of the ep-* chrome — this view has no
   site.css, so --cc-*/--bg-* vars are not defined here. */
.ep-loading-overlay,
.ep-fatal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 20px;
    color: #cbd5e1;
    background: #0f172a;
}

.ep-loading-overlay {
    z-index: 4;
    font-size: 0.95rem;
}

.ep-fatal-error {
    z-index: 6;
    background: rgba(15, 23, 42, 0.97);
}

    .ep-fatal-error i {
        font-size: 2.2rem;
        color: #f87171;
    }

    .ep-fatal-error .ep-fatal-error-msg {
        font-size: 1.05rem;
        font-weight: 700;
        color: #f1f5f9;
        max-width: 420px;
    }

    .ep-fatal-error .ep-fatal-error-sub {
        font-size: 0.9rem;
        color: #94a3b8;
        max-width: 420px;
    }

/* ⌨️ Visible focus for the media-activity controls that just gained
   keyboard access (onclick divs with tabindex). */
.ep-option:focus-visible,
.ixl-option:focus-visible,
.ep-match-item:focus-visible,
.ixl-match-item:focus-visible,
.hotspot-zone:focus-visible {
    outline: 3px solid #6366f1;
    outline-offset: 2px;
}

/* Engage "Picture this…" scenario card — class-based so dark mode gets a
   real variant (was an inline light-only gradient). */
.engage-scenario-card {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 2px solid #c7d2fe;
    border-radius: 16px;
}

    .engage-scenario-card .engage-scenario-title {
        color: #4f46e5;
        letter-spacing: 0.02em;
    }

    .engage-scenario-card .engage-scenario-text {
        font-size: 1.1rem;
        line-height: 1.5;
        color: #1e293b;
    }

[data-theme="dark"] .engage-scenario-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.12));
    border-color: rgba(129, 140, 248, 0.45);
}

    [data-theme="dark"] .engage-scenario-card .engage-scenario-title {
        color: #a5b4fc;
    }

    [data-theme="dark"] .engage-scenario-card .engage-scenario-text {
        color: #e9e9e9;
    }

/* Engage phenomenon (2026-11-30): the astonishing fact students read before
   the question. Amber like the "Wait, What?!" badge above it, so the two read
   as one hook. Same rules in Play and Present (both use this server HTML). */
.engage-phenomenon {
    background: #fffbeb;
    border-left: 4px solid var(--status-yellow, #f59e0b);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

    .engage-phenomenon .engage-phenomenon-text {
        font-size: 1.15rem;
        line-height: 1.5;
        color: #1f2937;
    }

[data-theme="dark"] .engage-phenomenon {
    background: rgba(245, 158, 11, 0.12);
}

    [data-theme="dark"] .engage-phenomenon .engage-phenomenon-text {
        color: #e9e9e9;
    }

/* Practice Round pill above inline image questions — same dark treatment. */
.practice-gate-banner {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    border: 2px solid #6366f1;
}

    .practice-gate-banner .practice-gate-banner-text {
        color: #3730a3;
    }

[data-theme="dark"] .practice-gate-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(99, 102, 241, 0.12));
    border-color: rgba(129, 140, 248, 0.55);
}

    [data-theme="dark"] .practice-gate-banner .practice-gate-banner-text {
        color: #c7d2fe;
    }

/* ============================================ */
/* CUSTOM VIDEO CONTROL BAR                     */
/* ============================================ */

.ep-custom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #1e293b;
    border-radius: 0 0 16px 16px;
    margin-top: -4px;
    position: relative;
    z-index: 5;
}

[data-theme="dark"] .ep-custom-controls {
    background: #1b1b1b;
    border: 1px solid #434343;
    border-top: none;
}

/* Fullscreen: controls stick to bottom */
.ep-fullscreen-active .ep-custom-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
}

.ep-fullscreen-active .ep-video-wrapper {
    border-radius: 0;
    height: calc(100vh - 52px);
    height: calc(100dvh - 52px);
    padding-bottom: 0;
}

    .ep-fullscreen-active .ep-video-wrapper iframe,
    .ep-fullscreen-active .ep-video-wrapper > div {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

.ep-fullscreen-active .ep-question-count-badge {
    display: none;
}

.ep-ctrl-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.15s ease;
    flex-shrink: 0;
    position: relative;
}

    .ep-ctrl-btn:hover {
        background: rgba(148, 163, 184, 0.15);
        color: #e2e8f0;
    }

    .ep-ctrl-btn.ep-ctrl-active {
        color: #60a5fa;
        background: rgba(96, 165, 250, 0.15);
    }

.ep-play-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    color: #e2e8f0;
}

    .ep-play-btn:hover {
        color: #ffffff;
        background: rgba(99, 102, 241, 0.25);
    }

.ep-rewind-btn {
    position: relative;
    font-size: 0.8rem;
}

.ep-rewind-label {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.55rem;
    font-weight: 800;
    color: #94a3b8;
    line-height: 1;
}

.ep-rewind-btn:hover .ep-rewind-label {
    color: #e2e8f0;
}

/* Progress bar in controls */
.ep-ctrl-progress {
    flex: 1;
    min-width: 0;
    padding: 0 4px;
}

/* Time display */
.ep-time-display {
    font-size: 0.78rem;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Volume wrapper with hover-expand slider */
.ep-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.ep-volume-slider-wrap {
    width: 0;
    overflow: hidden;
    transition: width 0.25s ease;
}

.ep-volume-wrapper:hover .ep-volume-slider-wrap {
    width: 70px;
}

.ep-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 65px;
    height: 4px;
    border-radius: 2px;
    background: #475569;
    outline: none;
    cursor: pointer;
    margin: 0 4px;
}

    .ep-volume-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #60a5fa;
        cursor: pointer;
        border: 2px solid #1e293b;
    }

    .ep-volume-slider::-moz-range-thumb {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #60a5fa;
        cursor: pointer;
        border: 2px solid #1e293b;
    }

/* CC button label */
.ep-cc-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Big Play Overlay */
.ep-big-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s;
}

    .ep-big-play-overlay:hover {
        background: rgba(0, 0, 0, 0.25);
    }

        .ep-big-play-overlay:hover .ep-big-play-btn {
            transform: scale(1.1);
            background: rgba(99, 102, 241, 0.95);
        }

.ep-big-play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

    .ep-big-play-btn i {
        margin-left: 4px; /* visual centering for play triangle */
    }

/* Hide old controls (kept for backward compat class names) */
.ep-video-controls {
    display: none;
}

.ep-question-markers {
    display: none;
}

/* Marker styles (kept — these go inside the progress bar) */
.ep-marker {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fbbf24;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid rgba(255,255,255,0.5);
}

    .ep-marker.answered {
        background: #10b981;
    }

    /* Answered but wrong. The question is finished either way now — the video
       moves on after one attempt — so the marker has to read as complete
       without reading as correct. Without this it inherited the green above
       and a missed question looked identical to a right one. */
    .ep-marker.answered.missed {
        background: #ef4444;
    }

    .ep-marker.active {
        background: #3b82f6;
        transform: scale(1.5);
        box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.3);
    }

    .ep-marker:hover {
        transform: scale(1.4);
    }

/* Question counter badge */
.ep-question-count-badge {
    text-align: center;
    margin-top: 12px;
}

    .ep-question-count-badge .badge {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

/* ── Mobile: stack controls ── */
@media (max-width: 576px) {
    .ep-custom-controls {
        gap: 4px;
        padding: 8px 8px;
    }

    .ep-ctrl-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .ep-play-btn {
        width: 34px;
        height: 34px;
    }

    .ep-time-display {
        font-size: 0.65rem;
    }

    .ep-volume-wrapper:hover .ep-volume-slider-wrap {
        width: 50px;
    }

    .ep-volume-slider {
        width: 45px;
    }

    .ep-big-play-btn {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }
}

/* Question Panel - Right Side - HIDDEN BY DEFAULT */
.ep-question-panel {
    flex: 0 0 0px;
    width: 0;
    min-width: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px;
    border: 3px solid #fbbf24;
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    transform: translateX(30px);
}

/* When question is active, panel slides in */
.ep-layout.question-active .ep-question-panel {
    flex: 0 0 420px;
    width: 420px;
    min-width: 420px;
    max-width: 420px;
    opacity: 1;
    transform: translateX(0);
}

[data-theme="dark"] .ep-question-panel {
    background: linear-gradient(135deg, #434343 0%, #2a2a2a 100%);
    border-color: #565656;
}

/* ============================================ */
/* EDPUZZLE MATCHING STYLES                     */
/* ============================================ */

.ep-matching-container {
    width: 100%;
}

.ep-matching-hint {
    font-style: italic;
}

.ep-matching-columns {
    display: flex;
    gap: 16px;
}

.ep-matching-col {
    flex: 1;
    min-width: 0;
}

.ep-matching-col-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

[data-theme="dark"] .ep-matching-col-header {
    color: #a5a5a5;
    border-bottom-color: #565656;
}

.ep-match-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

[data-theme="dark"] .ep-match-item {
    background: #2a2a2a;
    border-color: #565656;
    color: #e8e8e8;
}

.ep-match-item:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    transform: translateX(3px);
}

[data-theme="dark"] .ep-match-item:hover {
    background: #434343;
    border-color: #f59e0b;
}

.ep-match-item.selected {
    border-color: #3b82f6;
    background: #dbeafe;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .ep-match-item.selected {
    background: #1e3a5f;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}

.ep-match-item.matched {
    opacity: 0.7;
    pointer-events: none;
}

.ep-match-item.matched-correct {
    border-color: #10b981;
    background: #d1fae5;
}

[data-theme="dark"] .ep-match-item.matched-correct {
    background: #064e3b;
    border-color: #34d399;
}

.ep-match-item.matched-incorrect {
    border-color: #f59e0b;
    background: #fef3c7;
}

[data-theme="dark"] .ep-match-item.matched-incorrect {
    background: #78350f;
    border-color: #fbbf24;
}

.ep-match-counter {
    text-align: center;
}

/* Question card */
.edpuzzle-question-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.ep-question-header {
    margin-bottom: 18px;
}

    .ep-question-header .badge {
        font-size: 0.9rem;
        padding: 10px 16px;
        letter-spacing: 0.5px;
    }

.ep-question-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 24px;
    line-height: 1.6;
}

[data-theme="dark"] .ep-question-number {
    color: #fef3c7;
}

.ep-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
    flex: 1;
}

.ep-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

[data-theme="dark"] .ep-option {
    background: #2a2a2a;
    border-color: #565656;
}

.ep-option:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    transform: translateX(4px);
}

[data-theme="dark"] .ep-option:hover {
    background: #434343;
    border-color: #f59e0b;
}

.ep-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .ep-option.selected {
    background: #1e3a5f;
    border-color: #60a5fa;
}

.ep-option.correct {
    border-color: #10b981;
    background: #d1fae5;
}

[data-theme="dark"] .ep-option.correct {
    background: #064e3b;
    border-color: #34d399;
}

.ep-option.incorrect {
    border-color: #ef4444;
    background: #fee2e2;
}

[data-theme="dark"] .ep-option.incorrect {
    background: #7f1d1d;
    border-color: #f87171;
}

.ep-option-checkbox {
    font-size: 1.5rem;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 2px;
}

.ep-option.selected .ep-option-checkbox {
    color: #3b82f6;
}

.ep-option-text {
    flex: 1;
    font-size: 1.1rem;
    color: #374151;
    line-height: 1.5;
}

[data-theme="dark"] .ep-option-text {
    color: #e8e8e8;
}

.ep-feedback {
    padding: 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 1.05rem;
}

    .ep-feedback.success {
        background: #d1fae5;
        border: 2px solid #10b981;
        color: #065f46;
    }

[data-theme="dark"] .ep-feedback.success {
    background: #064e3b;
    border-color: #34d399;
    color: #d1fae5;
}

.ep-feedback.error {
    background: #fee2e2;
    border: 2px solid #ef4444;
    color: #991b1b;
}

[data-theme="dark"] .ep-feedback.error {
    background: #7f1d1d;
    border-color: #f87171;
    color: #fee2e2;
}

/* Not the student's doing: a question with no answer choices, or an answer
   the server couldn't check. Amber, not the red of a wrong answer. */
.ep-feedback.notice {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    color: #78350f;
}

[data-theme="dark"] .ep-feedback.notice {
    background: #451a03;
    border-color: #fbbf24;
    color: #fef3c7;
}

/* "Pick 1" / "Select N" cue above a video question's choices: the same
   gradient pill the checkpoint and image-panel multiselects use. White on
   violet reads on both themes. */
.ep-ms-cue {
    margin: -8px 0 16px;
}

.ep-ms-cue-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
    text-transform: uppercase;
}

.ep-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-top: 18px;
    border-top: 2px solid rgba(0,0,0,0.1);
    margin-top: auto;
}

[data-theme="dark"] .ep-actions {
    border-top-color: rgba(255,255,255,0.1);
}

.ep-actions .btn {
    flex: 1;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 1.05rem;
}

/* Completed state - shows in panel */
.ep-completed {
    padding: 50px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.ep-completed-icon {
    font-size: 5rem;
    margin-bottom: 25px;
}

.ep-completed strong {
    font-size: 1.5rem;
    color: #065f46;
    display: block;
    margin-bottom: 10px;
}

[data-theme="dark"] .ep-completed strong {
    color: #6ee7b7;
}

/* ============================================ */
/* SIDE-BY-SIDE SLIDE LAYOUT (with images)     */
/* ============================================ */

.slide-with-media {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.slide-text-section {
    flex: 1;
    min-width: 0;
}

.slide-media-section {
    flex: 0 0 45%;
    max-width: 500px;
}

    .slide-media-section img {
        width: 100%;
        height: auto;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    }

/* ============================================ */
/* LARGER IMAGE ACTIVITIES                     */
/* ============================================ */

.image-activity-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.image-display-section {
    flex: 1.3;
    min-width: 0;
}

    .image-display-section img {
        width: 100%;
        max-height: 550px;
        object-fit: contain;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    }

.image-questions-panel {
    flex: 1;
    min-width: 340px;
    max-width: 420px;
}

/* Responsive */
@media (max-width: 1200px) {
    .ep-layout.question-active .ep-question-panel {
        flex: 0 0 380px;
        width: 380px;
        min-width: 380px;
        max-width: 380px;
    }
}

@media (max-width: 992px) {
    .ep-layout {
        flex-direction: column;
    }

        .ep-question-panel,
        .ep-layout.question-active .ep-question-panel {
            flex: none !important;
            width: 100% !important;
            min-width: unset !important;
            max-width: none !important;
            margin-top: 20px;
            transform: translateY(20px);
        }

        .ep-layout.question-active .ep-question-panel {
            opacity: 1;
            transform: translateY(0);
        }

        .ep-video-section,
        .ep-layout.question-active .ep-video-section {
            flex: none !important;
        }

    .slide-with-media {
        flex-direction: column-reverse;
    }

    .slide-media-section {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .image-activity-layout {
        flex-direction: column;
    }

    .image-questions-panel {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    /* 📱 HEADER COMPACT — the old `flex-direction: column` made every
       toolbar button (help, sound, focus, highlighter, theme, overlay,
       text size) its own stacked row and the header ate half the screen.
       Wrap instead: row 1 = title + badges (ellipsized), then progress and
       the tool buttons flow inline across as few rows as they need. */
    .pod-header {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px 8px;
        padding: 8px 10px;
    }

    .pod-title {
        flex: 1 1 100%;
        min-width: 0;
        font-size: 0.95rem;
        gap: 6px;
    }

        /* The title text itself — one line, ellipsized */
        .pod-title > span:first-of-type {
            flex: 1 1 auto;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    .mode-badge {
        flex-shrink: 0;
        padding: 3px 8px;
        font-size: 0.62rem;
    }

    #attemptBadge {
        flex-shrink: 0;
    }

    .progress-container {
        flex: 1 1 140px;
        min-width: 120px;
        gap: 8px;
        order: 1;
    }

    .progress-bar-wrapper {
        width: auto;
        flex: 1 1 auto;
    }

    #progressText {
        font-size: 0.72rem;
    }

    /* Status widgets share the progress row when visible */
    #scoreTracker,
    .mf-mastery-meter,
    .streak-widget {
        order: 1;
    }

    #scoreTracker {
        padding: 4px 10px !important;
        font-size: 0.75rem !important;
    }

    /* Tool buttons: compact circles, after the progress cluster */
    .pod-header .sound-toggle,
    .pod-header .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        order: 2;
    }

    .pod-header .text-size-toggle {
        order: 2;
    }

    /* Help has a text label — pill, not a clipped circle */
    .pod-header #helpFlagBtn {
        width: auto;
        border-radius: 16px;
        padding: 0 10px;
    }

    .pod-content {
        padding: 15px;
    }

    .content-card {
        padding: 20px;
        border-radius: 15px;
    }

    .pod-nav {
        padding: 10px 15px;
    }

    .nav-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .ep-title {
        font-size: 1.4rem;
    }
}

/* ============================================ */
/* DARK MODE: Video/Image Question Cards       */
/* ============================================ */

[data-theme="dark"] .video-question-card,
[data-theme="dark"] .image-question-card {
    background: #2b2b2b !important;
    border-left-color: #60a5fa !important;
    color: #e9e9e9 !important;
}

    [data-theme="dark"] .video-question-card p,
    [data-theme="dark"] .image-question-card p {
        color: #e9e9e9 !important;
    }

    [data-theme="dark"] .video-question-card .form-check,
    [data-theme="dark"] .image-question-card .form-check {
        background: #434343 !important;
        border: 1px solid #565656 !important;
    }

        [data-theme="dark"] .video-question-card .form-check:hover,
        [data-theme="dark"] .image-question-card .form-check:hover {
            background: #454545 !important;
            border-color: #60a5fa !important;
        }

    [data-theme="dark"] .video-question-card .form-check-label,
    [data-theme="dark"] .image-question-card .form-check-label {
        color: #e9e9e9 !important;
    }

/* Context passage (Background Information) */
[data-theme="dark"] .context-passage {
    background: #022c22 !important;
    border-left-color: #34d399 !important;
}

    [data-theme="dark"] .context-passage p,
    [data-theme="dark"] .context-passage * {
        color: #ffffff !important;
    }

    [data-theme="dark"] .context-passage h6.text-success {
        color: #6ee7b7 !important;
    }

/* Card body text in dark mode */
[data-theme="dark"] .card-body,
[data-theme="dark"] .card-body p {
    color: #ffffff !important;
}

/* Matching states */
.matching-item.selected {
    border-color: #3b82f6 !important;
    background: #dbeafe !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

[data-theme="dark"] .matching-item.selected {
    background: #1e3a5f !important;
    border-color: #60a5fa !important;
}

/* Neutral "paired" state (linked, but not yet submitted/graded).
   Must be a real CSS rule — the JS only sets inline styles, which the
   dark-mode base `.matching-item { …!important }` rule silently wipes,
   leaving paired items indistinguishable from un-paired ones. */
.matching-item.matched {
    border-color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.08) !important;
}

.matching-item.matched .match-indicator {
    background: #6366f1 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .matching-item.matched {
    border-color: var(--cockpit-accent) !important;
    background: rgba(99, 102, 241, 0.18) !important;
}

[data-theme="dark"] .matching-item.matched .match-indicator {
    background: var(--cockpit-accent) !important;
    color: #ffffff !important;
}

.matching-item.matched-correct {
    border-color: #10b981 !important;
    background: #d1fae5 !important;
    opacity: 0.85;
}

[data-theme="dark"] .matching-item.matched-correct {
    background: #064e3b !important;
    border-color: #34d399 !important;
}

.matching-item.matched-incorrect {
    border-color: #ef4444 !important;
    background: #fee2e2 !important;
    opacity: 0.85;
}

[data-theme="dark"] .matching-item.matched-incorrect {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
}

/* Post-submit indicator badges (check / ✗). Needed in both themes so the
   dark-mode `.match-indicator` base rule can't leave a graded badge grey. */
.matching-item.matched-correct .match-indicator,
[data-theme="dark"] .matching-item.matched-correct .match-indicator {
    background: #10b981 !important;
    color: #ffffff !important;
}

.matching-item.matched-incorrect .match-indicator,
[data-theme="dark"] .matching-item.matched-incorrect .match-indicator {
    background: #ef4444 !important;
    color: #ffffff !important;
}

/* ============================================ */
/* IXL-STYLE IMAGE ACTIVITY LAYOUT             */
/* Styled to match Video Activity Panel        */
/* ============================================ */

.ixl-image-activity {
    width: 100%;
}

.ixl-header {
    text-align: center;
    margin-bottom: 20px;
}

.ixl-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 5px;
}

[data-theme="dark"] .ixl-title {
    color: #f3f4f6;
}

.ixl-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    min-height: 500px;
}

/* Left side - Large image */
.ixl-image-section {
    flex: 0 0 45%;
    min-width: 0;
}

.ixl-image-wrapper {
    width: 100%;
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

[data-theme="dark"] .ixl-image-wrapper {
    background: #1b1b1b;
}

.ixl-main-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
}

.ixl-image-error {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

    .ixl-image-error i {
        margin-bottom: 15px;
        opacity: 0.5;
    }

/* Right side - Questions panel - MATCHING VIDEO PANEL STYLE */
.ixl-questions-panel {
    flex: 1;
    min-width: 380px;
    max-width: 480px;
    background: white;
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    max-height: 650px;
}

[data-theme="dark"] .ixl-questions-panel {
    background: linear-gradient(135deg, #434343 0%, #2a2a2a 100%);
    border-color: #565656;
}

.ixl-panel-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.ixl-panel-header {
    margin-bottom: 18px;
}

    .ixl-panel-header .badge {
        font-size: 0.9rem;
        padding: 10px 16px;
        letter-spacing: 0.5px;
    }

.ixl-panel-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 20px;
}

[data-theme="dark"] .ixl-panel-subtitle {
    color: #a5a5a5;
}

/* Context box - styled like video panel */
.ixl-context-box {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

[data-theme="dark"] .ixl-context-box {
    background: #2a2a2a;
    border-color: #565656;
}

.ixl-context-header {
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .ixl-context-header i {
        color: #3b82f6;
    }

[data-theme="dark"] .ixl-context-header {
    color: #e8e8e8;
}

    [data-theme="dark"] .ixl-context-header i {
        color: #60a5fa;
    }

.ixl-context-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4b5563;
    max-height: 150px;
    overflow-y: auto;
}

[data-theme="dark"] .ixl-context-text {
    color: #d6d6d6;
}

/* Question cards - no background, integrated look */
.ixl-questions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ixl-question-card {
    background: transparent;
    padding: 0;
}

[data-theme="dark"] .ixl-question-card {
    background: transparent;
}

.ixl-question-badge {
    margin-bottom: 12px;
}

    .ixl-question-badge .badge {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

.ixl-question-text {
    font-weight: 600;
    font-size: 1.15rem;
    color: #1f2937;
    margin-bottom: 20px;
    line-height: 1.6;
}

[data-theme="dark"] .ixl-question-text {
    color: #f3f4f6;
}

/* Options - MATCHING VIDEO PANEL STYLE */
.ixl-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.ixl-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

[data-theme="dark"] .ixl-option {
    background: #2a2a2a;
    border-color: #565656;
}

.ixl-option:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    transform: translateX(4px);
}

[data-theme="dark"] .ixl-option:hover {
    background: #434343;
    border-color: #f59e0b;
}

.ixl-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .ixl-option.selected {
    background: #1e3a5f;
    border-color: #60a5fa;
}

.ixl-option.correct {
    border-color: #10b981;
    background: #d1fae5;
}

[data-theme="dark"] .ixl-option.correct {
    background: #064e3b;
    border-color: #34d399;
}

.ixl-option.incorrect {
    border-color: #ef4444;
    background: #fee2e2;
}

[data-theme="dark"] .ixl-option.incorrect {
    background: #7f1d1d;
    border-color: #f87171;
}

.ixl-option-checkbox {
    font-size: 1.5rem;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 2px;
}

.ixl-option.selected .ixl-option-checkbox {
    color: #3b82f6;
}

    .ixl-option.selected .ixl-option-checkbox i {
        font-weight: 900;
    }

.ixl-option-text {
    flex: 1;
    font-size: 1.05rem;
    color: #374151;
    line-height: 1.5;
}

[data-theme="dark"] .ixl-option-text {
    color: #e8e8e8;
}

/* Feedback - matching video panel style */
.ixl-feedback {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 1rem;
}

    .ixl-feedback.success {
        background: #d1fae5;
        border: 2px solid #10b981;
        color: #065f46;
    }

[data-theme="dark"] .ixl-feedback.success {
    background: #064e3b;
    border-color: #34d399;
    color: #d1fae5;
}

.ixl-feedback.error {
    background: #fee2e2;
    border: 2px solid #ef4444;
    color: #991b1b;
}

[data-theme="dark"] .ixl-feedback.error {
    background: #7f1d1d;
    border-color: #f87171;
    color: #fee2e2;
}

/* Actions - side by side like video panel */
.ixl-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-top: 18px;
    border-top: 2px solid rgba(0,0,0,0.08);
    margin-top: auto;
}

[data-theme="dark"] .ixl-actions {
    border-top-color: rgba(255,255,255,0.1);
}

.ixl-actions .btn {
    flex: 1;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 1.05rem;
}

.ixl-submit-btn {
    padding: 14px 20px;
    font-weight: 600;
}

/* Matching styles - matching video panel */
.ixl-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 12px;
    font-style: italic;
}

[data-theme="dark"] .ixl-hint {
    color: #a5a5a5;
}

.ixl-matching {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.ixl-match-col {
    flex: 1;
    min-width: 0;
}

.ixl-match-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

[data-theme="dark"] .ixl-match-header {
    color: #a5a5a5;
    border-bottom-color: #565656;
}

.ixl-match-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

[data-theme="dark"] .ixl-match-item {
    background: #2a2a2a;
    border-color: #565656;
    color: #e8e8e8;
}

.ixl-match-item:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    transform: translateX(3px);
}

[data-theme="dark"] .ixl-match-item:hover {
    background: #434343;
    border-color: #f59e0b;
}

.ixl-match-item.selected {
    border-color: #3b82f6;
    background: #dbeafe;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .ixl-match-item.selected {
    background: #1e3a5f;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}

.ixl-match-item.matched {
    opacity: 0.7;
    pointer-events: none;
}

.ixl-match-item.matched-correct {
    border-color: #10b981;
    background: #d1fae5;
}

[data-theme="dark"] .ixl-match-item.matched-correct {
    background: #064e3b;
    border-color: #34d399;
}

.ixl-match-item.matched-incorrect {
    border-color: #f59e0b;
    background: #fef3c7;
}

[data-theme="dark"] .ixl-match-item.matched-incorrect {
    background: #78350f;
    border-color: #fbbf24;
}

.ixl-match-counter {
    text-align: center;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 1100px) {
    .ixl-layout {
        flex-direction: column;
    }

    .ixl-questions-panel {
        width: 100%;
        max-width: none;
        min-width: unset;
        max-height: none;
    }

    .ixl-image-section {
        flex: none;
    }

    .ixl-main-image {
        max-height: 450px;
    }
}

@media (max-width: 768px) {
    .ixl-main-image {
        max-height: 350px;
    }

    .ixl-panel-content {
        padding: 16px;
    }
}


/* ============================================ */
/* CONTENT CUE ANIMATIONS                       */
/* ============================================ */

@keyframes cueSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

@keyframes cuePulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(59, 130, 246, 0.7);
    }
}

@keyframes cueFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* ============================================ */
/* CONTENT CUE BADGE - Fixed positioning       */
/* ============================================ */

.ep-content-cue {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
    animation: cueSlideIn 0.4s ease, cuePulse 1.5s ease-in-out 0.4s infinite;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    max-width: 200px;
    white-space: nowrap;
}

    .ep-content-cue i {
        font-size: 1rem;
    }

.ep-cue-fade-out {
    animation: cueFadeOut 0.5s ease forwards !important;
}

[data-theme="dark"] .ep-content-cue {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.5);
}

@keyframes cueSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

@keyframes cuePulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
    }

    50% {
        box-shadow: 0 4px 25px rgba(59, 130, 246, 0.8);
    }
}

@keyframes cueFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}


.ep-marker.content-active {
    background: #60a5fa;
    animation: markerPulse 1.5s ease-in-out infinite;
}

@keyframes markerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.4);
    }

    50% {
        transform: scale(1.2);
        box-shadow: 0 0 0 8px rgba(96, 165, 250, 0);
    }
}

/* ============================================ */
/* EDPUZZLE PROGRESS BAR / TIMELINE            */
/* ============================================ */

.ep-progress-bar-container {
    width: 100%;
    padding: 15px 0;
}

.ep-progress-track {
    position: relative;
    width: 100%;
    height: 6px;
    background: #475569;
    border-radius: 3px;
    cursor: pointer;
    transition: height 0.15s ease;
}

    .ep-progress-track:hover {
        height: 10px;
    }

[data-theme="dark"] .ep-progress-track {
    background: #434343;
}

.ep-progress-played {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.ep-markers-container {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 20px;
    pointer-events: none;
}

.ep-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fbbf24;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transform: translateX(-50%);
    pointer-events: auto;
    z-index: 10;
}

    .ep-marker:hover {
        transform: translateX(-50%) scale(1.3);
    }

    .ep-marker.answered {
        background: #10b981;
    }

    /* Answered but wrong. The question is finished either way now — the video
       moves on after one attempt — so the marker has to read as complete
       without reading as correct. Without this it inherited the green above
       and a missed question looked identical to a right one. */
    .ep-marker.answered.missed {
        background: #ef4444;
    }

    .ep-marker.active {
        background: #3b82f6;
        transform: translateX(-50%) scale(1.4);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
    }

    .ep-marker.content-active {
        background: #60a5fa;
        animation: markerPulse 1.5s ease-in-out infinite;
    }

[data-theme="dark"] .ep-marker {
    border-color: #434343;
}

/* Remove old marker styles from ep-video-controls */
.ep-question-markers {
    display: none; /* Hide old markers row */
}

/* ============================================
   🔒 QUESTION-GATE: Next button tooltip
   ============================================ */
.next-btn-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.next-question-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
    border: 1.5px solid #f59e0b;
    z-index: 10;
    animation: tooltipFadeIn 0.3s ease-out;
}

    .next-question-tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        right: 20px;
        border-width: 6px;
        border-style: solid;
        border-color: #f59e0b transparent transparent transparent;
    }

.tooltip-pulse {
    animation: tooltipPulse 0.4s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

@keyframes tooltipPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Dark mode tooltip */
[data-theme="dark"] .next-question-tooltip {
    background: linear-gradient(135deg, #78350f, #92400e);
    color: #fef3c7;
    border-color: #f59e0b;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

/* Mobile responsive */
@media not (min-width: 577px) {
    .next-question-tooltip {
        font-size: 0.7rem;
        padding: 6px 10px;
        right: -5px;
    }
}

/* Mastery Gate Alert */
.mastery-gate-alert {
    background: linear-gradient(135deg, #fef3c7, #fef9c3);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    color: #92400e;
}

/* ============================================ */
/* 🌙 UX-03: Dark Mode Fixes                   */
/* ============================================ */

/* ── Mastery Gate Alert (was prefers-color-scheme, now [data-theme]) ── */
[data-theme="dark"] .mastery-gate-alert {
    background: linear-gradient(135deg, #78350f, #713f12);
    border-color: #b45309;
    color: #fef3c7;
}

    [data-theme="dark"] .mastery-gate-alert strong {
        color: #fde68a;
    }

/* ── Mastery Gate Screen: headings + labels ── */
[data-theme="dark"] .mastery-gate-screen h1 {
    color: var(--cockpit-text) !important;
}

[data-theme="dark"] .mastery-gate-screen .lead {
    color: var(--cockpit-text-muted) !important;
}

[data-theme="dark"] .mastery-gate-screen .fw-semibold.text-muted {
    color: var(--cockpit-text-muted) !important;
}

[data-theme="dark"] .mastery-gate-screen .small.text-muted {
    color: var(--cockpit-text-muted) !important;
}

/* ── Completion Screen: headings + score label ── */
[data-theme="dark"] .completion-screen h1 {
    color: var(--cockpit-text) !important;
}

[data-theme="dark"] .completion-screen .lead {
    color: var(--cockpit-text-muted) !important;
}

[data-theme="dark"] .completion-screen .btn-outline-primary {
    color: #a5b4fc;
    border-color: #6366f1;
}

    [data-theme="dark"] .completion-screen .btn-outline-primary:hover {
        background: rgba(99, 102, 241, 0.15);
        color: #c7d2fe;
        border-color: #818cf8;
    }

/* ── Waiting Screen: headings ── */
[data-theme="dark"] .waiting-screen h1 {
    color: var(--cockpit-text) !important;
}

[data-theme="dark"] .waiting-screen .lead {
    color: var(--cockpit-text-muted) !important;
}

/* ── Name Entry Screen ── */
[data-theme="dark"] #nameEntryScreen > div {
    background: var(--cockpit-bg) !important;
}

    [data-theme="dark"] #nameEntryScreen > div > div {
        background: var(--cockpit-surface) !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    }

[data-theme="dark"] #nameEntryScreen h2 {
    color: var(--cockpit-text) !important;
}

[data-theme="dark"] #nameEntryScreen p {
    color: var(--cockpit-text-muted) !important;
}

[data-theme="dark"] #nameEntryScreen input[type="text"] {
    background: var(--cockpit-bg) !important;
    border-color: var(--cockpit-border) !important;
    color: var(--cockpit-text) !important;
}

    [data-theme="dark"] #nameEntryScreen input[type="text"]::placeholder {
        color: #767676;
    }

[data-theme="dark"] #nameEntryScreen .badge,
[data-theme="dark"] #nameEntryScreen div[style*="background: #f1f5f9"] {
    background: var(--cockpit-bg) !important;
    color: var(--cockpit-text-muted) !important;
}

/* Login prompt card on name entry */
[data-theme="dark"] #nameEntryScreen div[style*="background: linear-gradient(135deg, #eff6ff"] {
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(16,185,129,0.05)) !important;
    border-color: var(--cockpit-border) !important;
}

[data-theme="dark"] #nameEntryScreen div[style*="background: #f0fdf4"] {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

[data-theme="dark"] #nameEntryScreen div[style*="color: #1e40af"] {
    color: #93c5fd !important;
}

[data-theme="dark"] #nameEntryScreen label {
    color: var(--cockpit-text-muted) !important;
}

/* ── Score Tracker (header) ── */
[data-theme="dark"] #scoreTracker {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.1)) !important;
    border-color: rgba(16,185,129,0.4) !important;
}

    [data-theme="dark"] #scoreTracker #scoreText {
        color: #6ee7b7 !important;
    }

    [data-theme="dark"] #scoreTracker #scorePercent {
        color: #34d399 !important;
    }

    [data-theme="dark"] #scoreTracker #scoreIcon {
        color: #34d399 !important;
    }

/* ── Locked Overlay text ── */
[data-theme="dark"] .locked-message h4 {
    color: var(--cockpit-text);
}

[data-theme="dark"] .locked-message p {
    color: var(--cockpit-text-muted) !important;
}


/* ====================================================================
   📝 GUIDED NOTES — Read → Recall (Word Bank) Styles
   ==================================================================== */

.btn-guided-recall {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

    .btn-guided-recall:hover {
        background: linear-gradient(135deg, #4f46e5, #7c3aed);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
        color: white;
    }

.guided-recall-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.guided-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.guided-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #10b981);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Word Bank Chips */
.guided-word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 8px 0;
}

.guided-chip {
    background: rgba(99, 102, 241, 0.12);
    border: 2px solid rgba(99, 102, 241, 0.4);
    color: #4338ca !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

    .guided-chip:hover {
        background: rgba(99, 102, 241, 0.25);
        border-color: #6366f1;
        transform: translateY(-1px);
    }

    .guided-chip.selected {
        background: rgba(99, 102, 241, 0.3);
        border-color: #818cf8;
        color: #312e81;
        box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
        transform: scale(1.05);
    }

    .guided-chip.placed {
        background: rgba(16, 185, 129, 0.15);
        border-color: rgba(16, 185, 129, 0.3);
        color: rgba(16, 185, 129, 0.5);
        cursor: default;
        text-decoration: line-through;
        opacity: 0.5;
    }

    .guided-chip.wrong-shake {
        animation: guidedWrongShake 0.4s ease;
        border-color: #ef4444;
    }

/* Drop Zones (blanks in content) */
.guided-drop-zone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.06);
    border-radius: 8px;
    padding: 2px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: baseline;
    min-height: 28px;
}

    .guided-drop-zone:hover {
        border-color: #6366f1;
        background: rgba(99, 102, 241, 0.12);
    }

    .guided-drop-zone.selected {
        border-color: #818cf8;
        border-style: solid;
        background: rgba(99, 102, 241, 0.15);
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    }

    .guided-drop-zone.filled.correct {
        border: 2px solid #10b981;
        background: rgba(16, 185, 129, 0.12);
        cursor: default;
        animation: guidedCorrectPulse 0.4s ease;
    }

    .guided-drop-zone.wrong-shake {
        animation: guidedWrongShake 0.4s ease;
        border-color: #ef4444;
    }

.drop-zone-placeholder {
    color: rgba(99, 102, 241, 0.5);
    font-weight: 600;
    font-size: 0.9rem;
}

.drop-zone-text {
    color: #10b981;
    font-weight: 700;
    font-size: 1.05rem;
}

.guided-notes-divider hr {
    opacity: 0.3;
}

@keyframes guidedCorrectPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes guidedWrongShake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-5px);
    }

    40% {
        transform: translateX(5px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }
}


/* 🧠 GAME-03: Guided Recall cooldown — dims word bank during penalty */
.guided-cooldown {
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.guided-cooldown-hint {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f59e0b;
    padding: 6px 12px;
    margin-top: 8px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    display: none;
}

/* Guided Recall — dark mode chip color */
[data-theme="dark"] .guided-chip {
    color: #e9e9e9 !important;
}

    [data-theme="dark"] .guided-chip.selected {
        color: #e9e9e9 !important;
    }



/* ════════════════════════════════════════════════════════════════
   🛡️ FOCUS MODE — Anti-Cheat Overlays & UI
   ════════════════════════════════════════════════════════════════ */

/* Full-screen overlay backdrop */
.focus-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: focusFadeIn 0.3s ease;
}

@keyframes focusFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal card */
.focus-mode-modal {
    background: #1e293b;
    border-radius: 20px;
    padding: 40px;
    max-width: 520px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: focusSlideUp 0.4s ease;
}

@keyframes focusSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

.focus-mode-modal.focus-mode-warning {
    border: 2px solid #ef4444;
    box-shadow: 0 25px 60px rgba(239, 68, 68, 0.3);
}

/* Icon circle */
.focus-mode-modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

    .focus-mode-modal-icon.warning {
        background: linear-gradient(135deg, #ef4444, #dc2626);
        animation: focusPulse 1.5s ease infinite;
    }

@keyframes focusPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }
}

/* Title */
.focus-mode-modal-title {
    color: #f1f5f9;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Description */
.focus-mode-modal-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Rules list */
.focus-mode-rules-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
    text-align: left;
}

    .focus-mode-rules-list li {
        color: #cbd5e1;
        padding: 10px 16px;
        margin-bottom: 8px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px;
        font-size: 0.9rem;
        border-left: 3px solid #3b82f6;
    }

/* Accept button */
.focus-mode-accept-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

    .focus-mode-accept-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    }

/* Violation counter */
.focus-violation-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Shield badge (in pod header) */
.focus-shield-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #60a5fa;
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: 8px;
    transition: all 0.3s ease;
}

    .focus-shield-badge.focus-shield-warning {
        background: rgba(245, 158, 11, 0.15);
        border-color: rgba(245, 158, 11, 0.3);
        color: #fbbf24;
    }

    .focus-shield-badge.focus-shield-danger {
        background: rgba(239, 68, 68, 0.15);
        border-color: rgba(239, 68, 68, 0.3);
        color: #f87171;
        animation: focusPulse 1.5s ease infinite;
    }

/* ── Dark mode overrides (most of Focus Mode is already dark-themed) ── */
[data-theme="light"] .focus-mode-modal {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

[data-theme="light"] .focus-mode-modal-title {
    color: #1e293b;
}

[data-theme="light"] .focus-mode-modal-desc {
    color: #64748b;
}

[data-theme="light"] .focus-mode-rules-list li {
    color: #475569;
    background: #f1f5f9;
}

[data-theme="light"] .focus-violation-counter {
    color: #dc2626;
}

/* ════════════════════════════════════════════════════════════════
   ⏱️ QUESTION TIMER — countdown bar across the top of the question
   ────────────────────────────────────────────────────────────────
   Replaces a 52px ring pinned in the question's top-right corner that
   showed raw seconds in ~15px text; students said they couldn't see
   it. Now a full-width row laid out ABOVE the question (so it covers
   nothing): the time as m:ss in large type plus a draining bar.
   Sticky, so a long question can't scroll it away — which is also why
   every theme gives it an opaque background.
   Dark-theme colours live in pod-nebula-dark.css §38.
   ════════════════════════════════════════════════════════════════ */
.question-timer-widget {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0 0 14px;
    padding: 10px 14px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    animation: timerFadeIn 0.3s ease;
}

@keyframes timerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

    .question-timer-widget .timer-icon {
        font-size: 1.2rem;
    }

    .question-timer-widget .timer-caption {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .question-timer-widget .timer-text {
        display: inline-block;
        font-size: 1.7rem;
        font-weight: 800;
        line-height: 1;
        font-variant-numeric: tabular-nums;
    }

    .question-timer-widget .timer-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-left: auto;
    }

    .question-timer-widget .timer-track {
        flex: 1 0 100%;
        height: 8px;
        border-radius: 999px;
        background: rgba(59, 130, 246, 0.18);
        overflow: hidden;
    }

    .question-timer-widget .timer-fill {
        width: 100%;
        height: 100%;
        border-radius: inherit;
        background: #3b82f6;
        transform-origin: left center;
        transition: transform 1s linear, background-color 0.3s ease;
    }

    /* Warning: last third of the clock, at most 30s */
    .question-timer-widget.timer-warning {
        border-color: #fcd34d;
        background: #fffbeb;
        color: #b45309;
    }

        .question-timer-widget.timer-warning .timer-fill {
            background: #f59e0b;
        }

    /* Danger: last sixth of the clock, at most 10s — red with pulse */
    .question-timer-widget.timer-danger {
        border-color: #fca5a5;
        background: #fef2f2;
        color: #b91c1c;
    }

        .question-timer-widget.timer-danger .timer-fill {
            background: #ef4444;
        }

        .question-timer-widget.timer-danger .timer-text {
            animation: timerPulse 0.8s ease-in-out infinite;
        }

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .question-timer-widget,
    .question-timer-widget.timer-danger .timer-text {
        animation: none;
    }

    .question-timer-widget .timer-fill {
        transition: none;
    }
}

[data-theme="dark"] .question-timer-widget {
    border-color: #1e3a8a;
    background: var(--cockpit-surface);
    color: #93c5fd;
}

[data-theme="dark"] .question-timer-widget .timer-track {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .question-timer-widget .timer-fill {
    background: #60a5fa;
}

[data-theme="dark"] .question-timer-widget.timer-warning {
    border-color: #92400e;
    color: #fbbf24;
}

    [data-theme="dark"] .question-timer-widget.timer-warning .timer-fill {
        background: #fbbf24;
    }

[data-theme="dark"] .question-timer-widget.timer-danger {
    border-color: #991b1b;
    color: #f87171;
}

    [data-theme="dark"] .question-timer-widget.timer-danger .timer-fill {
        background: #f87171;
    }

@media (max-width: 576px) {
    .question-timer-widget {
        padding: 8px 12px 10px;
    }

        .question-timer-widget .timer-caption {
            font-size: 0.85rem;
        }

        .question-timer-widget .timer-text {
            font-size: 1.45rem;
        }
}

/* ════════════════════════════════════════════════════════════════
   🧩 MULTISELECT-WITH-IMAGE — Two-column landscape split (≥1024px)
   ────────────────────────────────────────────────────────────────
   When the controller wraps a multiselect activity into .split-left
   (image + stem) and .split-right (counter + options + actions), the
   outer .activity-container gets data-can-split="true" and we lay it
   out as a 2-column grid. Below 1024px the children stack naturally
   in source order, preserving the original mobile/portrait layout.
   ════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
    .activity-container.multiselect-activity[data-can-split="true"] {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
        gap: 24px;
        align-items: start;
    }
}

/* ════════════════════════════════════════════════════════════════
   🖥️ DESKTOP VIEWPORT-FIT LAYOUT
   ────────────────────────────────────────────────────────────────
   Ensures all Pod Play content fits between header and nav bar
   without page-level scrolling on PCs and Chromebooks.

   Breakpoints:
   • ≥993px wide  → viewport-fit (side-by-side video + questions)
   • ≤992px wide  → existing stacked/mobile layout (untouched)
   • ≤800px tall  → extra-compact for 11" Chromebooks (768px)

   SAFE: CSS-only, all rules scoped to desktop media queries.
   No changes to controller, JS, or data. Mobile layout untouched.
   ════════════════════════════════════════════════════════════════ */

@media (min-width: 993px) {

    /* ── 0. Lock viewport — no page scroll on desktop ── */
    body {
        height: 100vh;
        overflow: hidden;
    }

    .pod-header {
        flex-shrink: 0;
    }

    .pod-nav {
        flex-shrink: 0;
    }

    /* ── 1. Core: Content area fills viewport, no outer scroll ── */
    .pod-content {
        overflow: hidden;
        padding: 10px 16px;
        align-items: stretch;
        min-height: 0; /* critical: lets flex child shrink below intrinsic content size */
    }

    .content-card {
        max-height: 100%;
        overflow-y: auto;
        padding: 24px 32px;
        min-height: 0;
    }

        /* ── 2. Video (EdPuzzle) layout: fit everything in viewport ── */
        /* overflow-y:auto, NOT hidden: image slides/questions taller than the
           viewport (image + question list) were clipping their bottom rows
           with no way to reach them. Only the video layout below keeps the
           hard clamp — it sizes the player to the viewport and scrolls its
           own question panel instead. */
        .content-card.media-expanded {
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            padding: 14px 20px;
        }

        .content-card.media-expanded:has(.edpuzzle-container) {
            overflow: hidden;
        }

            /* EdPuzzle container becomes a flex child that fills the card */
            .content-card.media-expanded .edpuzzle-container {
                flex: 1;
                min-height: 0;
                display: flex;
                flex-direction: column;
            }

            .content-card.media-expanded .ep-header {
                flex-shrink: 0;
                margin-bottom: 6px;
            }

                .content-card.media-expanded .ep-header .ep-title {
                    font-size: 1.25rem;
                    margin-bottom: 2px;
                }

                .content-card.media-expanded .ep-header p {
                    font-size: 0.82rem;
                    margin-bottom: 0;
                }

            /* Layout row fills remaining space */
            .content-card.media-expanded .ep-layout {
                flex: 1;
                min-height: 0;
                overflow: hidden;
            }

            /* Video section: flex column so video + controls stack */
            .content-card.media-expanded .ep-video-section {
                min-height: 0;
                overflow: hidden;
                display: flex;
                flex-direction: column;
            }

            /* Video wrapper: switch from padding-bottom trick to aspect-ratio
       so max-height can actually constrain the video size.
       YouTube handles any container size gracefully with letterboxing. */
            .content-card.media-expanded .ep-video-wrapper {
                padding-bottom: 0 !important;
                aspect-ratio: 16 / 9;
                max-height: calc(100vh - 300px);
                flex: 1 1 auto;
                min-height: 0;
            }

            /* Controls and badge: don't shrink */
            .content-card.media-expanded .ep-custom-controls {
                flex-shrink: 0;
            }

            .content-card.media-expanded .ep-question-count-badge {
                flex-shrink: 0;
                margin-top: 4px;
            }

    /* Question panel: scroll internally when content is tall.
       The .edpuzzle-question-card inside already has flex:1 + overflow-y:auto
       so submit button stays pinned at bottom, options scroll above. */
    .ep-layout.question-active .ep-question-panel {
        overflow-y: auto;
    }

    /* ── 3. IXL Image Activity layout: fit in viewport ── */
    .content-card.media-expanded .ixl-image-activity {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .content-card.media-expanded .ixl-header {
        flex-shrink: 0;
        margin-bottom: 6px;
    }

    .content-card.media-expanded .ixl-layout {
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    .content-card.media-expanded .ixl-image-wrapper {
        min-height: 0;
    }

    .content-card.media-expanded .ixl-main-image {
        max-height: calc(100vh - 320px);
    }

    .content-card.media-expanded .ixl-questions-panel {
        max-height: 100%;
        overflow-y: auto;
    }

    /* ── 4. Engage slide: Quizizz-compact layout ── */

    /* Shrink "Let's Think!" badge */
    .engage-header .badge {
        font-size: 0.75rem !important;
        padding: 4px 12px !important;
        margin-bottom: 4px !important;
    }

    /* Compact title — hide emoji, shrink text */
    .engage-slide .engage-header h2 {
        font-size: 1.25rem !important;
        margin-bottom: 2px !important;
    }

    /* Hide "Take your best guess..." subtitle */
    .engage-header > p.text-muted {
        display: none !important;
    }

    /* Reduce header bottom margin (mb-4 = 24px → 8px) */
    .engage-header.mb-4,
    .engage-slide .engage-header {
        margin-bottom: 8px !important;
    }

    /* Reduce the bottom margin; cap through the frame's one knob.
       Qualified with .engage-slide on purpose: the base cap lives with the
       frame docs LOWER in this file, and a media query adds no specificity —
       a bare .engage-image-container here would lose to it on source order. */
    .engage-slide .engage-image-container {
        --hero-img-cap: 28vh;
        margin-bottom: 10px !important;
    }

    /* Tighter question text */
    .engage-question p.fw-bold {
        font-size: 1.05rem !important;
        margin-bottom: 10px !important;
        line-height: 1.4 !important;
    }

    /* Compact engage options */
    .engage-option {
        padding: 10px 16px !important;
        margin-bottom: 8px !important;
        font-size: 0.95rem !important;
        border-radius: 10px !important;
    }

    /* ── 5. Checkpoint / regular activity: Quizizz-style compact layout ── */
    /* EdTech pattern: kill decorative chrome, question IS the content.
       Quizizz/Nearpod show: question text + options + submit. That's it. */

    /* Hide the big decorative icon circle — students know it's a question */
    .checkpoint-header .mb-3:has(span[style*="80px"]),
    .checkpoint-header > .mb-3:first-child {
        display: none !important;
    }

    /* Compact checkpoint header */
    .checkpoint-header {
        margin-bottom: 12px !important;
    }

        .checkpoint-header h2 {
            font-size: 1.2rem !important;
            margin-bottom: 2px !important;
        }

        /* Hide "Answer the following questions..." subtitle */
        .checkpoint-header > p.text-muted {
            display: none !important;
        }

        /* Compact "Question X of Y" badge */
        .checkpoint-header .badge.bg-success {
            font-size: 0.78rem !important;
            padding: 4px 12px !important;
        }

        .checkpoint-header .mt-3 {
            margin-top: 6px !important;
        }

    /* ── Activity header: slim down question chrome ── */
    .activity-header {
        margin-bottom: 12px !important;
    }

        /* "Select All That Apply" badge — inline, smaller */
        .activity-header > .badge:first-child {
            font-size: 0.72rem !important;
            padding: 3px 10px !important;
            margin-bottom: 6px !important;
        }

        /* Question text — tighter */
        .activity-header h3 {
            font-size: 1.15rem !important;
            margin-bottom: 4px !important;
            line-height: 1.4 !important;
        }

        /* Hide "Click all the correct answers..." instruction */
        .activity-header > p.text-muted {
            display: none !important;
        }

    /* Hide or compact "0 selected" counter */
    .selection-counter {
        margin-bottom: 8px !important;
    }

        .selection-counter .badge {
            font-size: 0.72rem !important;
            padding: 3px 10px !important;
        }

    /* ── Multiselect options: tighter padding ── */
    .multiselect-option {
        margin-bottom: 8px !important;
    }

        .multiselect-option > div {
            padding: 12px 16px !important;
            gap: 12px !important;
        }

            /* Smaller letter circle */
            .multiselect-option > div > span:first-child {
                width: 30px !important;
                height: 30px !important;
                font-size: 0.85rem !important;
            }

            /* Option text slightly smaller */
            .multiselect-option > div > span:nth-child(2) {
                font-size: 0.95rem !important;
            }

            /* Checkbox icon smaller */
            .multiselect-option > div > span:last-child {
                font-size: 1.2rem !important;
            }

    /* ── Submit button area: less margin ── */
    .activity-actions {
        margin-top: 16px !important;
    }

        .activity-actions .btn-lg {
            padding: 10px 24px !important;
            font-size: 0.95rem !important;
        }

    /* ── Video question panel: more compact ── */
    .ep-question-header {
        margin-bottom: 10px !important;
    }

        .ep-question-header .badge {
            font-size: 0.78rem !important;
            padding: 6px 12px !important;
        }

    .ep-question-number {
        font-size: 1.05rem !important;
        margin-bottom: 16px !important;
        line-height: 1.4 !important;
    }

    .ep-option {
        padding: 14px 16px !important;
        gap: 10px !important;
    }

    .ep-option-text {
        font-size: 0.92rem !important;
    }

    .ep-option-letter {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem !important;
    }

    .ep-options {
        gap: 10px !important;
        margin-bottom: 16px !important;
    }

    .ep-actions .btn {
        padding: 10px 16px !important;
        font-size: 0.92rem !important;
    }

    /* ── Matching activity: tighter ── */
    .matching-item {
        padding: 10px 13px !important;
        margin-bottom: 8px !important;
    }

    /* ── Sorting activity: tighter ── */
    .sorting-item {
        padding: 10px 14px !important;
        margin-bottom: 6px !important;
    }
}

/* ════════════════════════════════════════════════════════════════
   📏 SMALL LAPTOP / 11-12" CHROMEBOOK OVERRIDES (≤800px tall)
   ────────────────────────────────────────────────────────────────
   Extra-compact spacing for 768px-tall screens.
   These students see ~658px of usable space (768 - header - nav).
   ════════════════════════════════════════════════════════════════ */

@media (min-width: 993px) and (max-height: 800px) {

    /* ── Compact header and nav ── */
    .pod-header {
        padding: 6px 14px;
    }

    .pod-title {
        font-size: 1rem;
        gap: 6px;
    }

    .progress-bar-wrapper {
        width: 140px;
    }

    .progress {
        height: 7px;
    }

    .pod-nav {
        padding: 6px 14px;
    }

    .nav-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    /* ── Tighter content card ── */
    .pod-content {
        padding: 6px 10px;
    }

    .content-card {
        padding: 14px 20px;
        border-radius: 12px;
    }

        .content-card.media-expanded {
            padding: 8px 12px;
        }

            /* ── Smaller video header ── */
            .content-card.media-expanded .ep-header .ep-title {
                font-size: 1.05rem;
            }

            .content-card.media-expanded .ep-header p {
                font-size: 0.72rem;
                display: none; /* hide subtitle on tiny screens to save space */
            }

            /* ── Video constrained tighter ── */
            .content-card.media-expanded .ep-video-wrapper {
                max-height: calc(100vh - 240px);
            }

    /* ── Compact video controls ── */
    .ep-custom-controls {
        padding: 6px 10px !important;
        gap: 4px !important;
    }

    .ep-ctrl-btn {
        width: 30px !important;
        height: 30px !important;
    }

    .ep-play-btn {
        width: 32px !important;
        height: 32px !important;
    }

    .ep-question-count-badge .badge {
        font-size: 0.72rem !important;
        padding: 4px 10px !important;
    }

    /* ── Narrower question panel ── */
    .ep-layout.question-active .ep-question-panel {
        flex: 0 0 340px !important;
        width: 340px !important;
        min-width: 340px !important;
        max-width: 340px !important;
    }

    /* ── Compact question card content ── */
    .edpuzzle-question-card {
        padding: 16px !important;
    }

    .ep-question-number {
        font-size: 1.05rem !important;
        margin-bottom: 14px !important;
        line-height: 1.4 !important;
    }

    .ep-option {
        padding: 12px 14px !important;
        gap: 10px !important;
        border-radius: 10px !important;
    }

    .ep-option-text {
        font-size: 0.92rem !important;
    }

    .ep-option-letter {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.78rem !important;
    }

    .ep-actions {
        padding-top: 12px !important;
        gap: 10px !important;
    }

        .ep-actions .btn {
            padding: 10px 16px !important;
            font-size: 0.9rem !important;
        }

    .ep-feedback {
        padding: 12px !important;
        font-size: 0.9rem !important;
    }

    /* ── IXL image constrained tighter ── */
    .content-card.media-expanded .ixl-main-image {
        max-height: calc(100vh - 260px);
    }

    .ixl-questions-panel {
        min-width: 320px !important;
        max-width: 400px !important;
    }

    /* ── Engage: extra compact for small Chromebooks ── */
    /* .engage-slide qualifier: see the 993px block above. */
    .engage-slide .engage-image-container {
        --hero-img-cap: 22vh;
        margin-bottom: 6px !important;
    }

    .engage-header.mb-4,
    .engage-slide .engage-header {
        margin-bottom: 4px !important;
    }

        .engage-slide .engage-header h2 {
            font-size: 1.05rem !important;
        }

    .engage-header .badge {
        font-size: 0.68rem !important;
        padding: 3px 8px !important;
    }

    .engage-question p.fw-bold {
        font-size: 0.95rem !important;
        margin-bottom: 8px !important;
    }

    .engage-option {
        padding: 8px 12px !important;
        font-size: 0.88rem !important;
        margin-bottom: 6px !important;
    }

    /* ── Score tracker and streak compact ── */
    #scoreTracker {
        padding: 4px 10px !important;
        font-size: 0.78rem !important;
        border-radius: 14px !important;
    }

    .streak-widget {
        transform: scale(0.85);
        transform-origin: center;
    }

    /* ── Breadcrumb dots smaller ── */
    .bc-dot {
        width: 14px;
        height: 14px;
    }

    .breadcrumb-track {
        max-width: 360px;
    }

    /* ── Regular slide content compact ── */
    .content-card .slide-title {
        font-size: 1.4rem !important;
    }

    /* Tighten checkpoint question spacing */
    .multiselect-option {
        margin-bottom: 6px !important;
    }

        .multiselect-option > div {
            padding: 10px 12px !important;
            gap: 10px !important;
        }

            /* Even smaller letter circles */
            .multiselect-option > div > span:first-child {
                width: 26px !important;
                height: 26px !important;
                font-size: 0.78rem !important;
            }

    /* Hide checkpoint icon entirely on small screens */
    .checkpoint-header .mb-3:first-child {
        display: none !important;
    }

    /* Extra compact checkpoint header */
    .checkpoint-header h2 {
        font-size: 1rem !important;
    }

    .activity-header h3 {
        font-size: 1rem !important;
    }
}


/* ════════════════════════════════════════════════════════════════
   🖥️ DESKTOP SLIDE FIT (≤1000px tall)
   ────────────────────────────────────────────────────────────────
   Desktop locks the page (body overflow hidden) and scrolls INSIDE
   the content card. The server slide HTML ships roomy inline spacing
   (14px point padding, 1.6rem title), so a standard 3-5 point DI slide
   overflowed the card on 1080p/laptop screens unless the browser was
   zoomed out. Tighten the vertical rhythm so typical slides fit at
   100% zoom; taller content still scrolls in the card as before.
   !important beats the inline styles. Big monitors (>1000px tall)
   untouched.

   This block used to shrink .point-text to 1rem/1.5 as well, and to
   compact a Key Terms card grid and a Test My Memory block that are no
   longer part of a slide. Both of those were the height problem this
   media query existed to absorb — about 260px of it — so the type size
   no longer has to pay for them. What is left compacts SPACING only:
   padding and margins give up their room, letters keep theirs. A slide
   that still does not fit is caught by fitCardToViewport(), which was
   added after this block and is the real backstop.
   ════════════════════════════════════════════════════════════════ */
@media (min-width: 993px) and (max-height: 1000px) {
    .content-card .slide-title {
        font-size: 1.35rem !important;
    }

    .content-card .slide-header.mb-3 {
        margin-bottom: 8px !important;
    }

    .content-card .content-point {
        padding: 8px 0 !important;
    }
}


/* ════════════════════════════════════════════════════════════════
   📱 PHONE PORTRAIT SAFETY NET (≤576px)
   ────────────────────────────────────────────────────────────────
   Explicitly restore scroll behavior on phones so the desktop
   viewport-fit rules never accidentally apply.
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 576px) {
    .pod-content {
        overflow-y: auto !important;
        align-items: flex-start !important;
    }

    .content-card {
        max-height: none !important;
        overflow-y: visible !important;
    }

    .focus-mode-modal {
        max-height: 90vh;
        max-height: 90dvh;
        overflow-y: auto;
        padding: 24px 20px;
    }

    /* .engage-slide qualifier: see the 993px block above. */
    .engage-slide .engage-image-container {
        --hero-img-cap: 200px;
    }

    .edpuzzle-question-card {
        padding: 14px !important;
    }

    .ep-option {
        padding: 12px 14px !important;
    }
}


/* ============================================================================
   SLIDE HERO IMAGE — ONE STANDARD FRAME
   Emitted as <div class="slide-hero-image"><img class="slide-hero-img"></div>
   from PodsController.Play.cs, for both #slideContent (Play) and #contentHtml
   (Present).

   The frame is a fixed box and the image is scaled to fit inside it, so the
   slot a teacher's image occupies no longer depends on that image's own
   dimensions. Before this, sizing lived in an inline style (max-height 350px,
   width 100%) which each layout then overrode differently — 45vh on DI mobile,
   uncapped on DI desktop, 320px in the activity column — and because the box
   took its height from the image, a wide banner sat in a short frame while a
   square photo sat in a tall one. Same slide, image somewhere else. On DI
   desktop, where nothing capped it, a portrait image inflated the whole grid
   row and pushed the teaching points out of the card.

   Never cover — a cropped label on a STAAR diagram is lost information. So
   the frame does not impose a shape either: it used to be a fixed 16/9 box
   capped at 320px, and since most teacher uploads are diagrams or screenshots
   nearer 4/3, contain scaled them down to fit the SHORT axis and painted the
   remainder as frame fill. On a wide DI column that was a ~420px image
   floating in a ~940px box — the reason a teacher had to click every image to
   read it. The chrome (radius, shadow, fill) now sits on the <img> itself, so
   the frame outlines the image exactly at any aspect ratio: same look when an
   image fills it, hugs instead of padding when it does not.

   --hero-img-cap is the one height cap and the only thing a layout should
   override (Present raises it). A cap is REQUIRED, not optional: with nothing
   capping height, a portrait image sets the height of the whole
   "image | bullets" grid row and pushes the teaching points out of the card.
   Matches the hotspot image cap below so the two stop disagreeing.
   ============================================================================ */
.slide-hero-image {
    --hero-img-cap: min(62vh, 520px);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    overflow: visible; /* chrome is on the img now — hidden would clip its shadow */
    cursor: zoom-in;
}

.slide-hero-image > img,
.slide-hero-image .slide-hero-img {
    display: block;
    /* Intrinsic sizing: the image is as large as the column or the cap allows,
       whichever binds first, and never distorted or letterboxed. */
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: var(--hero-img-cap);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.04);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .slide-hero-image > img,
[data-theme="dark"] .slide-hero-image .slide-hero-img {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* Attribution under a free image picked in the editor (Wikimedia, Pixabay,
   Pexels). Sits in the hero's mb-4 gap so it reads as the picture's caption;
   text colour is inherited, so it follows the theme in both modes. */
.slide-image-credit {
    margin: -1.25rem auto 1rem;
    max-width: 100%;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.3;
    opacity: 0.7;
    overflow-wrap: anywhere;
}

/* Click-to-enlarge: release the cap so a dense diagram can be read at its own
   height. Toggled by the wrapper's own onclick — no script needed, which
   matters because slide HTML arrives via jQuery .html() (strips <script>). */
.slide-hero-image.hero-zoomed {
    cursor: zoom-out;
}

.slide-hero-image.hero-zoomed > img,
.slide-hero-image.hero-zoomed .slide-hero-img {
    max-height: none;
}

/* The full-screen viewer (pod-image-zoom.js) the click opens where the page
   loads it; the in-place toggle above is only its fallback. Appended to
   <body>, so no card zoom or backdrop-filter shrinks or traps it. Literal
   colours on purpose: it is a dark photo-viewer layer in both themes. */
.pod-image-zoom {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.88);
    cursor: zoom-out;
    animation: engageOverlayFade 0.15s ease;
}

.pod-image-zoom > img {
    display: block;
    max-width: 94vw;
    max-height: 90vh;
    border-radius: 10px;
    /* A transparent diagram's dark lines would vanish on the dark layer. */
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.pod-image-zoom-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

    .pod-image-zoom-close:hover,
    .pod-image-zoom-close:focus-visible {
        background: rgba(255, 255, 255, 0.3);
    }

/* The engage slide's image is the same frame, capped lower.

   It was the one image left on the old pattern: an inline max-height:400px
   with its own radius and a heavier shadow, plus four !important caps
   overriding it per breakpoint (28vh / 22vh / 200px / 30vh in Present) — the
   exact "competing caps" tangle the frame above exists to replace, and the
   reason the engage image read as a different product from the slide before
   it. It now emits .slide-hero-image like every other slide image and gets
   the shared chrome, dark-mode variant and click-to-enlarge for free.

   Lower than the default because an engage image never has the stage to
   itself: a question and four full-width option buttons sit under it, and
   letting the picture run to 62vh makes the fitter shrink the options to
   compensate — the same trade the DI two-column cap below is making. The
   per-breakpoint values live with their media queries, qualified with
   .engage-slide so they outrank this base rule no matter where it sits — a
   media query adds no specificity, and this block is below all of them. */
.engage-image-container {
    --hero-img-cap: min(38vh, 400px);
}

/* ============================================================================
   DIRECT INSTRUCTION 2-COLUMN LAYOUT (slide + decorative image)
   Activated by the wrapper <div class="di-image-layout" data-di-two-col="1">
   emitted from PodsController.Play.cs only when:
     - slide.SectionTag == "direct_instruction"
     - the slide carries a teacher-uploaded decorative image

   Structure (all direct children of .di-image-layout — required because
   pod-play.js inserts .guided-recall-header as a sibling-before .slide-points
   when recall mode starts; making everyone a grid item lets the inserted
   header land in the full-width "wordbank" area):

     .di-image-layout (CSS grid)
       .di-image-col          → "image" area
       .slide-points          → "bullets" area (.guided-recall-header inserts before it)
       .guided-recall-header  → "wordbank" area (added at runtime)

   Key Terms used to hold a full-width "vocab" row down here. They are marked
   inline in the teaching points now (BuildInlineVocabPointHtml), and any term
   the points never say rides in a one-line chip strip INSIDE .slide-points —
   so the row is deleted rather than left empty: an unoccupied grid row still
   charges the layout one 20px gap, and on a slide the view shrinks to fit,
   every gap is paid for in type size.

   Layout:
     Desktop (≥640px):   [ wordbank wordbank ] / [ image | bullets ]
     Mobile  (<640px):   wordbank → image → bullets (single column)

   Lives here (not as an inline <style>) because jQuery's .html() injection
   strips <style> tags from dynamically-loaded slide HTML.
   ============================================================================ */
/* Selectors include both #slideContent (self-paced Play view) and #contentHtml
   (teacher Present view) so the same DI 2-col layout renders identically in both. */
#slideContent .di-image-layout[data-di-two-col="1"],
#contentHtml .di-image-layout[data-di-two-col="1"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
        "image"
        "bullets" !important;
    gap: 20px !important;
    width: 100% !important;
}

/* Recall mode active — pod-play.js has injected .guided-recall-header.
   Add a "wordbank" row at the top so the chips UI spans full width. */
#slideContent .di-image-layout[data-di-two-col="1"]:has(.guided-recall-header),
#contentHtml .di-image-layout[data-di-two-col="1"]:has(.guided-recall-header) {
    grid-template-areas:
        "wordbank"
        "image"
        "bullets" !important;
}

#slideContent .di-image-layout[data-di-two-col="1"] > .di-image-col,
#contentHtml .di-image-layout[data-di-two-col="1"] > .di-image-col {
    grid-area: image !important;
    min-width: 0 !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    /* Center the image column vertically within its grid cell so the image
       sits between the word bank above and key terms below, instead of
       top-aligning against the bullets column. */
    align-self: center !important;
}

#slideContent .di-image-layout[data-di-two-col="1"] > .slide-points,
#contentHtml .di-image-layout[data-di-two-col="1"] > .slide-points {
    grid-area: bullets !important;
    min-width: 0 !important;
    float: none !important;
}

#slideContent .di-image-layout[data-di-two-col="1"] > .guided-recall-header,
#contentHtml .di-image-layout[data-di-two-col="1"] > .guided-recall-header {
    grid-area: wordbank !important;
    min-width: 0 !important;
}

/* The frame itself is defined once, above — this only removes the stacked
   layout's bottom margin, since the grid gap provides that spacing here. */
#slideContent .di-image-layout[data-di-two-col="1"] .slide-hero-image,
#contentHtml .di-image-layout[data-di-two-col="1"] .slide-hero-image {
    margin-bottom: 0 !important;
    max-width: 100% !important;
}

@media (min-width: 640px) {
    /* Desktop: image+bullets share a row 50/50, wordbank spans full width */
    #slideContent .di-image-layout[data-di-two-col="1"],
    #contentHtml .di-image-layout[data-di-two-col="1"] {
        grid-template-columns: 1fr 1fr !important;
        grid-template-areas:
            "image bullets" !important;
    }

    #slideContent .di-image-layout[data-di-two-col="1"]:has(.guided-recall-header),
    #contentHtml .di-image-layout[data-di-two-col="1"]:has(.guided-recall-header) {
        grid-template-areas:
            "wordbank wordbank"
            "image    bullets" !important;
    }

    /* Desktop keeps the standard frame. It used to set height:100% on the
       wrapper and max-height:none / height:auto on the image "so it stays
       prominent" — with nothing capping it, a tall image set the height of the
       whole image|bullets row and shoved the teaching points below the card. */
}

/* ============================================================================
   INTERACTIVE-IMAGE SLIDE 2-COLUMN LAYOUT (content | image activity)
   Activated by <div class="slide-activity-layout" data-activity-two-col="1">
   emitted from PodsController.Play.cs whenever a content slide carries an
   inline image activity (hotspot zones or image + practice questions).

   Same direct-grid-children contract as .di-image-layout above: pod-play.js
   inserts .guided-recall-header as a sibling-before .slide-points, so every
   piece is a direct grid item and the header lands in a full-width
   "wordbank" area.

     .slide-activity-layout (CSS grid)
       .slide-points          → "bullets"  (teaching points)
       .sal-activity-col      → "activity" (hero image and/or .inline-image-activity)
       .guided-recall-header  → "wordbank" (added at runtime)

   The "vocab" and "trigger" rows are gone. Key Terms are marked inline in the
   teaching points, and Test My Memory moved to the nav bar beside Next — no
   arrangement of a row under a two-column grid was ever going to be right for
   a button, and as slide content it made the words smaller for the whole time
   the student was reading them.

   Layout:
     Desktop (≥992px):  [ wordbank wordbank ] / [ bullets | activity ]
     Mobile  (<992px):  wordbank → bullets → activity
   ============================================================================ */
#slideContent .slide-activity-layout[data-activity-two-col="1"],
#contentHtml .slide-activity-layout[data-activity-two-col="1"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
        "bullets"
        "activity" !important;
    gap: 20px !important;
    width: 100% !important;
    align-items: start !important;
}

#slideContent .slide-activity-layout[data-activity-two-col="1"]:has(.guided-recall-header),
#contentHtml .slide-activity-layout[data-activity-two-col="1"]:has(.guided-recall-header) {
    grid-template-areas:
        "wordbank"
        "bullets"
        "activity" !important;
}

#slideContent .slide-activity-layout[data-activity-two-col="1"] > .slide-points,
#contentHtml .slide-activity-layout[data-activity-two-col="1"] > .slide-points {
    grid-area: bullets !important;
    min-width: 0 !important;
    float: none !important;
}

#slideContent .slide-activity-layout[data-activity-two-col="1"] > .sal-activity-col,
#contentHtml .slide-activity-layout[data-activity-two-col="1"] > .sal-activity-col {
    grid-area: activity !important;
    min-width: 0 !important;
}

#slideContent .slide-activity-layout[data-activity-two-col="1"] > .guided-recall-header,
#contentHtml .slide-activity-layout[data-activity-two-col="1"] > .guided-recall-header {
    grid-area: wordbank !important;
    min-width: 0 !important;
}

/* ── Slim the activity down for column life (it was built for a full-width
      screen). The hotspot block's own header repeats the slide title and the
      tap instruction that every question card already shows — drop it. ── */
.sal-activity-col .hotspot-activity .ixl-header {
    display: none !important;
}

.sal-activity-col .inline-image-activity {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Hero image above the practice questions: tighter gap. Size comes from the
   standard frame — a separate max-height here was one of the four competing
   caps that made the same image land differently on different slides. */
.sal-activity-col .slide-hero-image {
    margin-bottom: 12px !important;
}

/* Hotspot image: keep tap targets generous but never taller than the viewport
   allows side-by-side reading */
.sal-activity-col .hotspot-image-container img {
    max-height: min(62vh, 520px) !important;
}

/* Question prompt sizing inside the column */
.sal-activity-col .hotspot-question-prompt h4 {
    font-size: 1.05rem !important;
}

.sal-activity-col .hotspot-question-card {
    margin-bottom: 0 !important;
}

/* The comprehension panel was built as a padded side sheet — in-column the
   grid provides the spacing, so reclaim its padding for question width */
.sal-activity-col .ixl-panel-content {
    padding: 0 !important;
}

@media (min-width: 992px) {
    /* Desktop: content reads on the left while the student works the image on
       the right; activity column gets the wider share for tap accuracy. */
    #slideContent .slide-activity-layout[data-activity-two-col="1"],
    #contentHtml .slide-activity-layout[data-activity-two-col="1"] {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) !important;
        grid-template-areas:
            "bullets activity" !important;
    }

    #slideContent .slide-activity-layout[data-activity-two-col="1"]:has(.guided-recall-header),
    #contentHtml .slide-activity-layout[data-activity-two-col="1"]:has(.guided-recall-header) {
        grid-template-areas:
            "wordbank wordbank"
            "bullets  activity" !important;
    }
}

/* ============================================================================
   ENGAGE SLIDE 2-COLUMN LAYOUT (visual | question + options)
   Activated by <div class="engage-body-layout" data-engage-two-col="1">
   emitted from PodsController.Play.cs whenever the engage slide has a visual
   (a hook image, or the "Picture this…" scenario card on bespoke pods).

     .engage-body-layout (CSS grid)
       .engage-visual-col  → "visual"   (.engage-image-container / .engage-scenario-card)
       .engage-question    → "question" (prompt + the four options + reveal anchor)

   Stacked was the tallest arrangement of the tallest slide in the pod — a
   picture on top of a prompt on top of four full-width buttons — and both
   views shrink the WHOLE slide to fit (CSS zoom in Play, transform: scale in
   Present), so the class read the hook smaller purely to pay for the stack.
   Side by side, it reads like every other slide that carries a picture and
   something to do with it.

   Layout:
     Desktop (≥992px):  [ visual | question ]
     Mobile  (<992px):  visual → question (single column)

   Text-only hooks (odd-one-out) and image-less engage slides never get this
   wrapper — they keep the centered single-column question, since there is
   nothing for the options to sit beside.
   ============================================================================ */
/* Both view roots, same as the DI/activity layouts above: #slideContent is
   self-paced Play, #contentHtml is the teacher Present cockpit. */
#slideContent .engage-body-layout[data-engage-two-col="1"],
#contentHtml .engage-body-layout[data-engage-two-col="1"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
        "visual"
        "question" !important;
    gap: 20px !important;
    width: 100% !important;
    align-items: center !important;
}

#slideContent .engage-body-layout[data-engage-two-col="1"] > .engage-visual-col,
#contentHtml .engage-body-layout[data-engage-two-col="1"] > .engage-visual-col {
    grid-area: visual !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

#slideContent .engage-body-layout[data-engage-two-col="1"] > .engage-question,
#contentHtml .engage-body-layout[data-engage-two-col="1"] > .engage-question {
    grid-area: question !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* The frame is defined once (.slide-hero-image / .engage-image-container
   above) — these only drop the stacked layout's bottom margin, since the
   grid gap provides that spacing here. */
#slideContent .engage-body-layout[data-engage-two-col="1"] .engage-image-container,
#contentHtml .engage-body-layout[data-engage-two-col="1"] .engage-image-container,
#slideContent .engage-body-layout[data-engage-two-col="1"] .engage-scenario-card,
#contentHtml .engage-body-layout[data-engage-two-col="1"] .engage-scenario-card {
    margin-bottom: 0 !important;
    max-width: 100% !important;
}

@media (min-width: 992px) {
    /* Desktop: the picture and the question share the row. The visual takes
       the slightly smaller share — the four option buttons are the tap
       targets and need the width. */
    #slideContent .engage-body-layout[data-engage-two-col="1"],
    #contentHtml .engage-body-layout[data-engage-two-col="1"] {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) !important;
        grid-template-areas:
            "visual question" !important;
    }

    /* Side by side the image no longer shares vertical space with the
       options, so it can use the height the column actually has instead of
       the lowered stacked cap. Still the one knob — never a max-height on
       the <img>. */
    #slideContent .engage-body-layout[data-engage-two-col="1"] .engage-image-container,
    #contentHtml .engage-body-layout[data-engage-two-col="1"] .engage-image-container {
        --hero-img-cap: min(58vh, 520px);
    }
}

/* Short laptops / 11-12" Chromebooks: the column is real estate the stacked
   layout never had, but 58vh of it on a 768px-tall screen still leaves the
   fitter shrinking the type. Mirrors the compact caps the stacked layout
   takes at these heights, one step more generous because nothing is stacked
   under the picture any more. */
@media (min-width: 992px) and (max-height: 800px) {
    #slideContent .engage-body-layout[data-engage-two-col="1"] .engage-image-container,
    #contentHtml .engage-body-layout[data-engage-two-col="1"] .engage-image-container {
        --hero-img-cap: min(46vh, 380px);
    }
}

/* ============================================================================
   HOT SPOT CARD 2-COLUMN LAYOUT (question | clickable image)
   Activated by <div class="hotspot-card-layout" data-hotspot-two-col="1">
   emitted from BuildHotspotWithZonesHtml and BuildHotspotClickToPinHtml.

     .hotspot-card-layout (CSS grid)
       .hs-prompt-col  → "prompt" (question, feedback, hint, Submit in pin mode)
       .hs-image-col   → "image"  (.hotspot-image-container + caption)

   Same reason as the engage slide above: prompt-over-image was the tallest
   arrangement of a slide both views shrink to fit, so the question and the
   picture were each made smaller to stack. Beside each other, the student
   reads the question and looks at the image in one glance — which is the whole
   task on a Hot Spot.

   The grid is on this INNER wrapper, never on .hotspot-question-card /
   .hotspot-pin-card: those cards advance question-to-question through jQuery
   fadeIn/fadeOut (pod-play-activities.js) and inline display:block straight
   onto the card, which would wipe a display:grid set here.

   Zone overlays are positioned in percentages against
   .hotspot-image-container, which keeps width:fit-content — the column only
   changes how wide that container is allowed to get, so zones stay aligned.

   Layout:
     Desktop (≥992px):  [ prompt | image ]
     Mobile  (<992px):  prompt → image (single column, as before)
   ============================================================================ */
#slideContent .hotspot-card-layout[data-hotspot-two-col="1"],
#contentHtml .hotspot-card-layout[data-hotspot-two-col="1"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
        "prompt"
        "image" !important;
    gap: 20px !important;
    width: 100% !important;
    align-items: center !important;
}

#slideContent .hotspot-card-layout[data-hotspot-two-col="1"] > .hs-prompt-col,
#contentHtml .hotspot-card-layout[data-hotspot-two-col="1"] > .hs-prompt-col {
    grid-area: prompt !important;
    min-width: 0 !important;
}

#slideContent .hotspot-card-layout[data-hotspot-two-col="1"] > .hs-image-col,
#contentHtml .hotspot-card-layout[data-hotspot-two-col="1"] > .hs-image-col {
    grid-area: image !important;
    min-width: 0 !important;
}

@media (min-width: 992px) {
    /* Desktop: question left, image right — the image column takes the wider
       share because the zones on it are the tap targets. */
    #slideContent .hotspot-card-layout[data-hotspot-two-col="1"],
    #contentHtml .hotspot-card-layout[data-hotspot-two-col="1"] {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) !important;
        grid-template-areas:
            "prompt image" !important;
    }

    /* The image's own max-height is inline on the <img> (min(80vh, 600px)) —
       written for a full-width stack. In a column it is the width that binds,
       but a tall narrow diagram would still run the card past the fold, so
       cap it here. !important because it is overriding an inline style. */
    #slideContent .hotspot-card-layout[data-hotspot-two-col="1"] .hotspot-image-container img,
    #contentHtml .hotspot-card-layout[data-hotspot-two-col="1"] .hotspot-image-container img {
        max-height: min(62vh, 520px) !important;
    }
}

/* Already living in a column beside the teaching points — splitting it again
   would leave the image about a quarter of the slide. Placed after the media
   query, with an extra class over the ID-qualified rules above, so it wins at
   every width. */
#slideContent .sal-activity-col .hotspot-card-layout[data-hotspot-two-col="1"],
#contentHtml .sal-activity-col .hotspot-card-layout[data-hotspot-two-col="1"] {
    display: block !important;
}

/* ============================================================================
   HOTSPOT ZONES — static home for the zone styles.
   These rules used to travel ONLY inside GetHotspotCss()'s <style> block,
   embedded in the activity HTML — but injected <style> tags don't survive
   the jQuery .html() slide-injection path (see the slide-activity-layout
   note in PodsController.Play.cs). Without position:absolute every zone
   rendered as a static block: all zones stacked vertically under the image
   instead of sitting on their targets — and the .zone-label anti-cheat
   (labels hidden until answered) silently vanished with the same block.
   GetHotspotCss() still emits a duplicate copy for render paths that DO
   keep inline styles; identical rules, so duplication is harmless.
   ============================================================================ */
.hotspot-question-card {
    text-align: center;
}

.hotspot-zone {
    position: absolute;
    border: 7px dashed rgba(16, 185, 129, 0.8);
    background: rgba(16, 185, 129, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

/* Circle-shaped zones for round diagram regions */
.hotspot-zone.zone-circle {
    border-radius: 50%;
}

.hotspot-zone:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 1);
    border-style: solid;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.45);
}

/* Labels hidden until answered — prevents giving away answers */
.hotspot-zone .zone-label {
    display: none !important;
}

/* Only show label AFTER correct answer */
.hotspot-zone.zone-correct .zone-label {
    display: block !important;
    font-size: 0.75rem;
    font-weight: 600;
    color: #065f46;
    background: rgba(209, 250, 229, 0.95);
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
}

.hotspot-zone.zone-correct {
    background: rgba(16, 185, 129, 0.25) !important;
    border: 2px solid #10b981 !important;
    box-shadow: 0 0 16px rgba(16,185,129,0.4);
}

.hotspot-zone.zone-wrong {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    border-style: solid !important;
    animation: hotspotShake 0.4s ease;
}

.hotspot-zone.zone-disabled {
    pointer-events: none;
    cursor: default;
}

.hotspot-zone.zone-revealed {
    border: 3px dashed #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

.hotspot-zone.zone-revealed .zone-label {
    display: block !important;
    font-size: 0.75rem;
    font-weight: 600;
    color: #065f46;
    background: rgba(209, 250, 229, 0.95);
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
    white-space: nowrap;
}

/* Pin mode specific */
.hotspot-pin-mode .hotspot-image-container {
    touch-action: none;
}

.hotspot-pin-marker svg {
    animation: hotspotPinDrop 0.3s ease-out;
}

/* One-line orientation caption under the image */
.hotspot-image-caption {
    max-width: 700px;
    margin: 10px auto 0;
    font-size: 0.85rem;
    font-style: italic;
    color: #6b7280;
    text-align: center;
    line-height: 1.4;
}

[data-theme="dark"] .hotspot-image-caption {
    color: #a5a5a5;
}

@keyframes hotspotShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@keyframes hotspotRippleAnim {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}

/* ═════════════════════════════════════════════════════════════
   👆 TOUCH-TARGET SIZING — coarse pointers only (desktop untouched)
   Floors the real interactive targets so phone/tablet taps land
   reliably (WCAG 2.5.5). Nav buttons are already .btn-lg (≥44px).
   Scoped to (pointer: coarse) so mouse-driven desktop density is
   unchanged; appended after all .bc-dot/option rules so it wins the
   cascade over the two mobile max-width blocks.
   ═════════════════════════════════════════════════════════════ */
@media (pointer: coarse) {
    /* Answer options: guarantee a full 44px-tall tap target. The
       multiselect option wraps its padded body in an inner > div,
       so floor that too. min-height is a floor only — options whose
       base padding is already ≥44px are unaffected. */
    .multiselect-option,
    .multiselect-option > div,
    .ixl-option,
    .matching-item,
    .sorting-item,
    .engage-option,
    .ep-option {
        min-height: 44px;
    }

    /* Breadcrumb dots: the dense, horizontally-scrolling row (fixed-
       height nav) can't give each dot a full 44px without overlapping
       neighbours, so meet the 24px WCAG 2.5.8 minimum and widen
       spacing so taps don't hit the wrong dot. */
    .breadcrumb-dots { gap: 12px; }
    .bc-dot { width: 24px; height: 24px; }
    .bc-dot.bc-current { width: 28px; height: 28px; }
}

@keyframes hotspotPinDrop {
    0% { transform: translateY(-20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Dark mode */
[data-theme="dark"] .hotspot-zone {
    border-color: rgba(129, 140, 248, 0.6);
    background: rgba(129, 140, 248, 0.08);
}

[data-theme="dark"] .hotspot-zone:hover {
    background: rgba(129, 140, 248, 0.22);
    border-color: rgba(129, 140, 248, 0.9);
}

[data-theme="dark"] .hotspot-zone.zone-correct .zone-label,
[data-theme="dark"] .hotspot-zone.zone-revealed .zone-label {
    background: rgba(6, 78, 59, 0.9);
    color: #6ee7b7;
}

[data-theme="dark"] .hotspot-question-prompt h4 {
    color: #e9e9e9 !important;
}

/* ============================================
   🔒 Body scroll-lock while a FIXED modal scrim is open (PodOverlay)
   ============================================ */
/* position:fixed (not just overflow:hidden) is required so iOS Safari
   actually stops the background scrolling under the scrim. JS records the
   scroll offset in body.style.top on lock and restores it on unlock.
   Only applied to fixed inset:0 scrims (feedback / metacognition / boost) —
   never the in-flow .content-card mastery gate. */
body.pod-scroll-locked {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}

/* ============================================ */
/* "Ask my teacher about this" button           */
/* (buildAskTeacherRowHtml in pod-play.js). Was  */
/* styled with hardcoded light-mode inline CSS,  */
/* so in dark mode it rendered as a pale, washed */
/* -out chip on the dark page. Styled here for   */
/* both themes so it reads in each.              */
/* ============================================ */
.ask-teacher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #eef2ff, #ede9fe);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #4338ca;
    font-size: .9rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.18);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}

.ask-teacher-btn:hover {
    background: linear-gradient(135deg, #e0e7ff, #ddd6fe);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.28);
    transform: translateY(-1px);
}

[data-theme="dark"] .ask-teacher-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.22));
    border-color: rgba(139, 92, 246, 0.55);
    color: #c7d2fe;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

    [data-theme="dark"] .ask-teacher-btn:hover {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.34), rgba(139, 92, 246, 0.34));
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
        transform: translateY(-1px);
    }

/* Inside a wrong-answer panel the Ask button is a quiet link, not a second
   call to action competing with the fix (2026-12-01). */
.feedback-inline .ask-teacher-row { margin-top: 8px !important; }
.feedback-inline .ask-teacher-btn {
    background: none; border: none; box-shadow: none; padding: 2px 0;
    font-size: .88rem; color: #4338ca; text-decoration: underline;
}
.feedback-inline .ask-teacher-btn:hover { background: none; box-shadow: none; transform: none; }
[data-theme="dark"] .feedback-inline .ask-teacher-btn { background: none; box-shadow: none; color: #c7d2fe; }

/* Practice point earned or not: a chip beside the verdict, not a line. */
.practice-point-chip {
    display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 8px;
    border-radius: 999px; font-size: .78rem; font-weight: 600; vertical-align: middle;
    background: rgba(107, 114, 128, .12); color: #4b5563;
}
.practice-point-chip.earned { background: rgba(245, 158, 11, .16); color: #92400e; }
.practice-point-chip .fa-star { color: #f59e0b; }
[data-theme="dark"] .practice-point-chip { background: rgba(255, 255, 255, .08); color: #d1d5db; }
[data-theme="dark"] .practice-point-chip.earned { background: rgba(245, 158, 11, .2); color: #fcd34d; }

/* ============================================ */
/* "Ask my teacher" modal (openAskTeacherModal) */
/* Was built with hardcoded light-mode inline    */
/* styles → a glaring white card in dark mode.    */
/* Styled here for both themes.                   */
/* ============================================ */
.ask-teacher-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ask-teacher-dialog {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}
.ask-teacher-head {
    padding: 16px 20px;
    border-bottom: 1px solid #eef0f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ask-teacher-title { margin: 0; font-weight: 700; color: #1a1a2e; }
.ask-teacher-title i { color: #6366f1; }
.ask-teacher-close { background: none; border: none; font-size: 1.4rem; color: #888; cursor: pointer; }
.ask-teacher-body { padding: 18px 20px; }
.ask-teacher-note { font-size: .78rem; color: #666; margin-bottom: 10px; }
.ask-teacher-about {
    background: #f5f6fa;
    border-left: 3px solid #6366f1;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: .78rem;
    color: #3a3a4a;
    margin-bottom: 12px;
}
.ask-teacher-about strong {
    font-size: .7rem;
    color: #6366f1;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ask-teacher-label { font-weight: 600; font-size: .82rem; color: #1a1a2e; display: block; margin-bottom: 6px; }
.ask-teacher-input {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: .9rem;
    resize: vertical;
    font-family: inherit;
    background: #fff;
    color: #1a1a2e;
}
.ask-teacher-metarow { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.ask-teacher-meta { font-size: .72rem; color: #888; }
.ask-teacher-foot {
    padding: 14px 20px;
    border-top: 1px solid #eef0f4;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.ask-teacher-send.btn-primary { background: #6366f1; border-color: #6366f1; }

[data-theme="dark"] .ask-teacher-dialog {
    background: #161616;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .ask-teacher-head { border-bottom-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .ask-teacher-title { color: #eeeeee; }
[data-theme="dark"] .ask-teacher-title i { color: #a5b4fc; }
[data-theme="dark"] .ask-teacher-close { color: #a8a8a8; }
    [data-theme="dark"] .ask-teacher-close:hover { color: #ff5252; }
[data-theme="dark"] .ask-teacher-note { color: #a8a8a8; }
[data-theme="dark"] .ask-teacher-about {
    background: rgba(99, 102, 241, 0.12);
    border-left-color: #818cf8;
    color: #cfcfcf;
}
[data-theme="dark"] .ask-teacher-about strong { color: #a5b4fc; }
[data-theme="dark"] .ask-teacher-label { color: #eeeeee; }
[data-theme="dark"] .ask-teacher-input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #eeeeee;
}
    [data-theme="dark"] .ask-teacher-input::placeholder { color: #747474; }
    [data-theme="dark"] .ask-teacher-input:focus {
        border-color: rgba(99, 102, 241, 0.6);
        box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
        outline: none;
    }
[data-theme="dark"] .ask-teacher-meta { color: #a8a8a8; }
[data-theme="dark"] .ask-teacher-foot { border-top-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .ask-teacher-send.btn-primary { background: #6366f1; border-color: #6366f1; color: #fff; }
    [data-theme="dark"] .ask-teacher-send.btn-primary:hover { background: #5457e5; border-color: #5457e5; color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   🔲 VIDEO FULLSCREEN v2 — fullscreen target is now .ep-layout
   (video section + question panel together) so questions appear
   and stay answerable INSIDE fullscreen. Placed at end of file so
   these rules win the cascade against .content-card.media-expanded
   sizing (whose max-height clamp was capping the video at
   100vh-300px inside fullscreen — the "not really fullscreen" bug).
   ═══════════════════════════════════════════════════════════════ */

.ep-layout.ep-fullscreen-active {
    background: #000;
    gap: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

/* Chat fairness guard: only the chat panel remains readable/interactive while
   an active timed question is paused. The opaque tint plus blur prevents the
   chat from becoming free reading time on the assessment prompt. */
body.chat-question-guard::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1140;
    background: rgba(15, 23, 42, .52);
    pointer-events: auto;
}
body.chat-question-guard .pod-wrapper {
    filter: blur(14px);
    user-select: none;
    pointer-events: none;
}
.question-timer-widget.timer-chat-paused {
    opacity: .78;
}
/* Chips in the timer bar's right-hand slot (.timer-chips). */
.timer-paused-label,
.timer-extended-label {
    padding: 3px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
}
.timer-paused-label {
    background: #312e81;
}
.timer-paused-label[hidden] {
    display: none;
}

/* ♿ Extended Time badge — tells the student the longer clock is theirs on
   purpose. */
.timer-extended-label {
    background: #0f766e;
}

/* Video truly fills the screen (minus the 52px control bar).
   The extra .content-card.media-expanded variant out-specifies the
   media-expanded clamp (max-height: calc(100vh - 300px), aspect-ratio,
   flex) that leaked into fullscreen. */
.ep-fullscreen-active .ep-video-wrapper,
.content-card.media-expanded .ep-fullscreen-active .ep-video-wrapper {
    border-radius: 0;
    height: calc(100vh - 52px);
    height: calc(100dvh - 52px);
    max-height: none;
    aspect-ratio: auto;
    flex: none;
    padding-bottom: 0 !important;
}

/* Question panel inside fullscreen: square corners, full height, scrollable,
   leaving room for the fixed control bar at the bottom. */
.ep-layout.ep-fullscreen-active .ep-question-panel {
    border-radius: 0;
}

.ep-layout.ep-fullscreen-active.question-active .ep-question-panel {
    height: calc(100vh - 52px);
    height: calc(100dvh - 52px);
    overflow-y: auto;
}

/* 📱 CSS-only fullscreen fallback for browsers without the Fullscreen API
   (e.g. iPhone Safari): pin the layout over the whole page. */
.ep-layout.ep-fullscreen-fallback {
    position: fixed;
    inset: 0;
    z-index: 99999;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

body.ep-fs-fallback-lock {
    overflow: hidden;
}

/* Small screens: .ep-layout stacks into a column, so a full-height video
   would push the question panel off-screen in fullscreen. Shrink the video
   while a question is up and let the layout scroll. */
@media (max-width: 992px) {
    .ep-layout.ep-fullscreen-active {
        overflow-y: auto;
    }

    .ep-layout.ep-fullscreen-active.question-active .ep-video-wrapper,
    .content-card.media-expanded .ep-fullscreen-active.question-active .ep-video-wrapper {
        height: 38vh;
        height: 38dvh;
    }

    .ep-layout.ep-fullscreen-active.question-active .ep-question-panel {
        height: auto;
        min-height: 0;
        margin-top: 0;
        padding-bottom: 64px; /* keep last controls row clear of the fixed bar */
    }
}

/* ============================================================
   PHASE 4 — ONE CLEAR STUDENT ACTION AT A TIME
   Optional utilities remain available behind Tools; progress,
   help, and the forward action stay visible.
   ============================================================ */
.pod-header {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(320px, auto) auto;
    gap: 10px 16px;
    position: relative;
    padding: 10px 16px;
}

.pod-title {
    min-width: 0;
}

.pod-title > span:first-of-type {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pod-progress-status,
.pod-header-actions {
    display: flex;
    align-items: center;
    min-width: 0;
}

.pod-progress-status {
    justify-content: center;
    gap: 8px;
}

.pod-progress-status .progress-container {
    flex: 1 1 180px;
    min-width: 120px;
    gap: 8px;
}

.pod-progress-status .progress-bar-wrapper {
    width: auto;
    min-width: 90px;
    flex: 1 1 180px;
}

.pod-header-actions {
    justify-content: flex-end;
    gap: 8px;
}

.pod-header-actions #helpFlagBtn,
.pod-header-actions #podReportProblemBtn,
.pod-header-actions #exitPodBtn,
.pod-tools-menu > summary {
    width: auto;
    min-width: 36px;
    height: 36px;
    padding: 0 11px;
    border-radius: 999px;
}

.pod-tools-menu {
    position: relative;
}

.pod-tools-menu > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 2px solid #dbe3ef;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 700;
    list-style: none;
    user-select: none;
}

.pod-tools-menu > summary::-webkit-details-marker {
    display: none;
}

.pod-tools-menu[open] > summary {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
}

.pod-tools-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 500;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(330px, calc(100vw - 24px));
    padding: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.pod-tools-heading,
.pod-tool-row {
    grid-column: 1 / -1;
}

.pod-tools-heading {
    color: #334155;
    font-size: 0.77rem;
    font-weight: 800;
}

.pod-tool-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 9px;
    border-radius: 9px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
}

.pod-tools-panel .sound-toggle,
.pod-tools-panel .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 0.74rem;
    font-weight: 700;
}

.pod-tools-panel .text-size-toggle {
    order: initial;
}

/* Granted reading tools (read-aloud, highlighter, colour overlay) live in the
   header, not the Tools menu: the wrapper vanishes from layout and each button
   is a labelled pill like Report on a wide screen, an icon circle below. */
.pod-granted-tools {
    display: contents;
}

.pod-header-actions .pod-granted-tools .sound-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: 36px;
    height: 36px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* Labels only where the header has room for them; below that each tool is an
   icon circle that keeps its title and aria-label. */
@media (max-width: 1199.98px) {
    .pod-header-actions .pod-granted-tools .sound-toggle {
        width: 36px;
        padding: 0;
    }

    .pod-header-actions .pod-granted-tools .sound-toggle span {
        display: none;
    }
}

/* With granted tools in the header, Report (then Help) give up their labels a
   step earlier than the 900px rule below, so neither wraps onto two lines.
   Both keep their title and aria-label. */
@media (max-width: 1199.98px) {
    .pod-header-actions:has(.pod-granted-tools > .sound-toggle) #podReportProblemLabel {
        display: none;
    }

    .pod-header-actions:has(.pod-granted-tools > .sound-toggle) #podReportProblemBtn {
        width: 36px;
        min-width: 36px;
        padding: 0;
    }
}

@media (max-width: 1023.98px) {
    .pod-header-actions:has(.pod-granted-tools > .sound-toggle) #helpFlagLabel {
        display: none;
    }

    .pod-header-actions:has(.pod-granted-tools > .sound-toggle) #helpFlagBtn {
        width: 36px;
        min-width: 36px;
        padding: 0;
    }
}

.pod-tools-panel #podAvatar {
    grid-column: 1 / -1;
    justify-self: start;
}

.pod-entry-details,
.pod-brief-details,
.completion-evidence-details {
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.86);
}

.pod-entry-details {
    margin: 0 0 22px;
    text-align: left;
}

.pod-entry-details > summary,
.pod-brief-details > summary,
.completion-evidence-details > summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    color: #475569;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 750;
    list-style: none;
}

.pod-entry-details > summary::-webkit-details-marker,
.pod-brief-details > summary::-webkit-details-marker,
.completion-evidence-details > summary::-webkit-details-marker {
    display: none;
}

.pod-entry-details > summary::after,
.pod-brief-details > summary::after,
.completion-evidence-details > summary::after {
    content: '+';
    margin-left: auto;
    color: #6366f1;
    font-size: 1rem;
    font-weight: 800;
}

.pod-entry-details[open] > summary::after,
.pod-brief-details[open] > summary::after,
.completion-evidence-details[open] > summary::after {
    content: '−';
}

.pod-entry-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 12px 12px;
}

.pod-brief-details {
    max-width: 680px;
    margin: 14px auto;
    text-align: left;
}

.pod-brief-details > summary > span,
.completion-evidence-details > summary > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #334155;
}

.pod-brief-details > summary small,
.completion-evidence-details > summary small {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
}

.pod-brief-details-body,
.completion-evidence-body {
    padding: 0 14px 14px;
}

.pod-brief-details .ws-stat-row {
    margin: 4px auto 12px;
}

.pod-brief-details .why-matters-card {
    margin-bottom: 12px !important;
}

.pod-practice-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 9px;
    background: rgba(8, 145, 178, 0.08);
    color: #0e7490;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.pod-practice-link > span {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.completion-evidence-details {
    max-width: 600px;
    margin: 16px auto;
    text-align: left;
}

.completion-evidence-subtitle {
    color: #334155;
    font-size: 0.88rem;
    font-weight: 800;
}

[data-theme="dark"] .pod-tools-menu > summary,
[data-theme="dark"] .pod-tools-panel,
[data-theme="dark"] .pod-entry-details,
[data-theme="dark"] .pod-brief-details,
[data-theme="dark"] .completion-evidence-details {
    border-color: rgba(165, 165, 165, 0.26);
    background: #232323;
    color: #d6d6d6;
}

[data-theme="dark"] .pod-tools-menu[open] > summary {
    border-color: #22d3ee;
    background: rgba(34, 211, 238, 0.1);
    color: #67e8f9;
}

[data-theme="dark"] .pod-tools-heading,
[data-theme="dark"] .pod-brief-details > summary > span,
[data-theme="dark"] .completion-evidence-details > summary > span,
[data-theme="dark"] .completion-evidence-subtitle {
    color: #e9e9e9;
}

[data-theme="dark"] .pod-tool-row {
    background: rgba(27, 27, 27, 0.7);
    color: #d6d6d6;
}

[data-theme="dark"] .pod-brief-details > summary small,
[data-theme="dark"] .completion-evidence-details > summary small {
    color: #a5a5a5;
}

@media (max-width: 900px) {
    .pod-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .pod-progress-status {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .pod-header-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .pod-tools-menu > summary span,
    .pod-header-actions .pod-granted-tools .sound-toggle span,
    .pod-header-actions #exitPodBtn span,
    .pod-header-actions #podReportProblemLabel,
    .pod-header-actions #helpFlagLabel {
        display: none;
    }

    .pod-header-actions #helpFlagBtn,
    .pod-header-actions #podReportProblemBtn,
    .pod-header-actions #exitPodBtn,
    .pod-header-actions .pod-granted-tools .sound-toggle,
    .pod-tools-menu > summary {
        width: 34px;
        min-width: 34px;
        height: 34px;
        padding: 0;
    }
}

@media (max-width: 576px) {
    .pod-header {
        padding: 7px 9px;
    }

    .pod-progress-status {
        gap: 5px;
    }

    .pod-progress-status .progress-container {
        flex-basis: 100%;
    }

    .pod-progress-status #scoreGoalChip,
    .pod-progress-status #scorePercent,
    .pod-progress-status .streak-label {
        display: none !important;
    }

    .pod-tools-panel {
        position: fixed;
        top: 92px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .pod-entry-details > summary,
    .pod-brief-details > summary,
    .completion-evidence-details > summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .pod-entry-details > summary::after,
    .pod-brief-details > summary::after,
    .completion-evidence-details > summary::after {
        position: absolute;
        right: 22px;
    }
}


/* ============================================================================
   INLINE GLOSSARY — Key Terms marked where they are used
   Emitted by BuildInlineVocabPointHtml / BuildVocabInlineSpan in
   PodsController.Play.cs; driven by wwwroot/js/pod-vocab-inline.js.

   Replaces the "Key Terms" card grid that used to sit in a full-width row
   under every content slide. That grid cost ~150px of slide height, and BOTH
   views shrink the whole slide to fit their stage — CSS zoom in Play
   (fitCardToViewport, floor 0.7), transform: scale in Present
   (fitSlideToStage, floor 0.55). So the definitions were charged twice: once
   for the room they took, and again in the type size and image size the
   fitter surrendered to fit them. At the size that left, a projected
   definition was not readable from the back of the room anyway.

   A marked term costs no height at all, and the definition appears at the
   word the student is stuck on instead of in a footer they have to look away
   to read. The popover is drawn into <body> by the JS — outside #slideContent
   and #contentInner, so nothing either fitter measures ever includes it.
   ============================================================================ */
.vocab-inline {
    font-weight: 700;
    color: #1d4ed8;
    border-bottom: 2px dotted rgba(29, 78, 216, 0.55);
    border-radius: 2px;
    padding: 0 1px;
    cursor: help;
    transition: background 0.12s ease, border-color 0.12s ease;
}

    .vocab-inline:hover,
    .vocab-inline.vocab-open {
        background: rgba(59, 130, 246, 0.13);
        border-bottom-color: #1d4ed8;
    }

    .vocab-inline:focus {
        outline: none;
    }

    .vocab-inline:focus-visible {
        outline: 2px solid #1d4ed8;
        outline-offset: 2px;
        background: rgba(59, 130, 246, 0.13);
    }

[data-theme="dark"] .vocab-inline {
    color: #93c5fd;
    border-bottom-color: rgba(147, 197, 253, 0.5);
}

    [data-theme="dark"] .vocab-inline:hover,
    [data-theme="dark"] .vocab-inline.vocab-open {
        background: rgba(147, 197, 253, 0.16);
        border-bottom-color: #bfdbfe;
    }

/* The extra .content-card, and the !important, are both there to outrank one
   rule: [data-theme="dark"] .content-card span (up at ~line 428) paints EVERY
   span in the card #cbd5e1 !important, and a marked term is a span. Beating an
   !important needs another one, and beating (0,2,1) needs the third class —
   the rule above is only (0,2,0) and loses on both counts.

   Scoped to .content-card rather than made global so it stops at the Play
   card's edge: the presenter cockpit is not inside one, which leaves the green
   .cockpit-content-inner treatment below free to win there on source order. */
[data-theme="dark"] .content-card .vocab-inline {
    color: #93c5fd !important;
}

    [data-theme="dark"] .content-card .vocab-inline:hover,
    [data-theme="dark"] .content-card .vocab-inline.vocab-open {
        color: #dbeafe !important;
    }

    [data-theme="dark"] .vocab-inline:focus-visible {
        outline-color: #bfdbfe;
    }

/* The cockpit paints its own dark surface without setting data-theme, so it
   needs the dark treatment addressed by its own wrapper. Green here, matching
   the accent the Key Terms panel used to carry in Present. */
.cockpit-content-inner .vocab-inline {
    color: #6ee7b7;
    border-bottom-color: rgba(110, 231, 183, 0.55);
}

    .cockpit-content-inner .vocab-inline:hover,
    .cockpit-content-inner .vocab-inline.vocab-open {
        background: rgba(16, 185, 129, 0.18);
        border-bottom-color: #6ee7b7;
    }

/* ── Terms the teaching points never happened to say ──
   One line at the foot of .slide-points, inside the bullets column, so it
   never adds a grid row to either two-column layout. */
.vocab-orphan-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(59, 130, 246, 0.3);
}

.vocab-orphan-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #3b82f6;
    white-space: nowrap;
}

.vocab-inline.vocab-inline-chip {
    border: 1px solid rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.08);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.85rem;
    line-height: 1.5;
}

[data-theme="dark"] .vocab-orphan-strip {
    border-top-color: rgba(147, 197, 253, 0.25);
}

[data-theme="dark"] .vocab-orphan-label {
    color: #93c5fd;
}

[data-theme="dark"] .vocab-inline.vocab-inline-chip {
    border-color: rgba(147, 197, 253, 0.4);
    background: rgba(147, 197, 253, 0.1);
}

/* Same blanket-span override as above — the strip's label is a span too. */
[data-theme="dark"] .vocab-orphan-strip .vocab-orphan-label {
    color: #93c5fd !important;
}

.cockpit-content-inner .vocab-orphan-label {
    color: #6ee7b7;
}

.cockpit-content-inner .vocab-inline.vocab-inline-chip {
    border-color: rgba(110, 231, 183, 0.45);
    background: rgba(16, 185, 129, 0.12);
}

/* ── The definition itself ──
   position: fixed and parented to <body>: it cannot be clipped by the card's
   inner scroll, it cannot be scaled by either fitter, and it cannot add a
   single pixel to what they measure. pointer-events: none so a definition
   that opens under the cursor does not then swallow the next click. */
.vocab-popover {
    position: fixed;
    z-index: 20000;
    max-width: min(420px, 88vw);
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #0f172a;
    color: #f1f5f9;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
    font-size: 0.95rem;
    line-height: 1.45;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

    .vocab-popover.is-open {
        opacity: 1;
        transform: translateY(0);
    }

    .vocab-popover .vp-term {
        font-weight: 800;
        color: #7dd3fc;
        margin-bottom: 3px;
        font-size: 1.02em;
    }

    .vocab-popover .vp-def {
        margin: 0;
    }

    .vocab-popover .vp-es {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px dashed rgba(148, 163, 184, 0.35);
        font-style: italic;
        color: #cbd5e1;
    }

        .vocab-popover .vp-es .vp-term {
            color: #a5b4fc;
            font-style: normal;
        }

    /* The word list's picture for the term (PodWordList), small enough that
       the popover never covers the slide. */
    .vocab-popover .vp-img {
        display: block;
        max-width: 100%;
        max-height: 140px;
        margin: 0 auto 4px;
        border-radius: 8px;
        object-fit: contain;
        background: rgba(255, 255, 255, 0.06);
    }

    .vocab-popover .vp-credit {
        margin-bottom: 6px;
        font-size: 0.68rem;
        color: #94a3b8;
        text-align: center;
    }

/* Projector sizing. A definition on the board is read from the back row or it
   is not read at all — which was the whole problem with the 0.78rem card. */
.vocab-popover.vp-stage {
    max-width: min(760px, 82vw);
    padding: 20px 26px;
    font-size: 1.5rem;
    line-height: 1.4;
    border-radius: 16px;
}

    .vocab-popover.vp-stage .vp-img {
        max-height: 260px;
    }

/* ── Test My Memory, now a nav-bar action ── */
.btn-test-memory {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    white-space: nowrap;
}

    .btn-test-memory:hover,
    .btn-test-memory:focus {
        background: linear-gradient(135deg, #4f46e5, #7c3aed);
        color: white;
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    }

/* Narrow screens: the nav bar has three clusters to fit and a full label does
   not survive beside Next. Keep the icon, drop the words. */
@media (max-width: 600px) {
    .btn-test-memory .btn-test-memory-label {
        display: none;
    }

    .btn-test-memory i {
        margin-right: 0 !important;
    }
}

/* Keep one primary progress signal, with optional score detail. */
.pod-progress-label { font-size: .75rem; font-weight: 600; }
.pod-score-details { position: relative; flex: 0 0 auto; font-size: .78rem; }
.pod-score-details > summary { cursor: pointer; padding: 6px 9px; border: 1px solid #94a3b8; border-radius: 12px; }
.pod-score-details-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 1050; padding: 12px; border-radius: 12px; background: #fff; color: #1e293b; box-shadow: 0 6px 24px #0003; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: max-content; max-width: min(340px, 85vw); }
.pod-score-details #scoreTracker { flex-wrap: wrap; }
.pod-progress-status .pod-score-details #scoreGoalChip { display: inline-flex !important; }
.pod-progress-status .pod-score-details #scorePercent { display: inline !important; }
.pod-score-details .streak-widget { position: static; }
.mf-show-mastery-meter .pod-progress-status .progress-container { flex: 0 1 100px; }
.mf-show-mastery-meter .pod-progress-status .progress-bar-wrapper { min-width: 35px; }
.mf-show-mastery-meter .pod-progress-status .mf-mastery-meter { flex: 1 1 auto; min-width: 0; }
.pod-mastery-goal { white-space: nowrap; }
[data-theme="dark"] .pod-score-details-panel { background: #252525; color: #e9e9e9; }
[data-theme="dark"] #saveStatusPill { color: #d1fae5 !important; }
[data-theme="dark"] #saveStatusPill[data-save-state="error"] { color: #fecaca !important; }
[data-theme="dark"] #saveStatusPill[data-save-state="saving"] { color: #bfdbfe !important; }
[data-theme="dark"] #saveStatusPill[data-save-state="unsaved"] { color: #fde68a !important; }
@media (max-width: 600px) {
    .pod-progress-status { flex-wrap: wrap; }
    .pod-progress-status .mf-mastery-meter { max-width: 100%; }
    .pod-progress-status .progress-container { order: 0; }
    .mf-show-mastery-meter .pod-progress-status #mfMasteryMeter { order: 0; flex: 1 1 100%; }
    .mf-show-mastery-meter .pod-progress-status .progress-container { order: 1; flex-basis: 80px; }
    .pod-progress-status #saveStatusPill { order: 2; }
    .pod-progress-status .pod-score-details { order: 3; }
    .pod-score-details-panel { position: fixed; top: 100px; right: 12px; }
}

/* ── Commonly missed ───────────────────────────────────────────────────
   /Pods/Content draws .pod-missed-flag inside a question the pod's earlier
   runs missed most (PodsController_PresentReview.cs, LiveMissFlagHtml), in
   the presenter cockpit, the live room, and self-paced play alike.
   A label, never a rate or a name.
   Literal colors in BOTH themes: a themed foreground on a literal background
   is what breaks in light mode. */
.pod-missed-flag {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-left: 6px solid #f97316;
    color: #7c2d12;
    text-align: left;
    line-height: 1.35;
}
.pod-missed-flag .pmf-icon {
    flex: none;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ea580c;
    color: #fff;
    font-size: 1.05rem;
}
.pod-missed-flag .pmf-body { display: flex; flex-direction: column; min-width: 0; }
.pod-missed-flag .pmf-title {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #c2410c;
}
.pod-missed-flag .pmf-text { font-size: 0.98rem; }
/* The whole question wears the color, not just the strip. Inset so a
   scrolling or overflow-clipped parent can't cut the ring off. */
.question-slide.is-commonly-missed {
    border-radius: 14px;
    padding: 0.75rem;
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.07), rgba(249, 115, 22, 0) 220px);
    box-shadow: inset 0 0 0 2px rgba(249, 115, 22, 0.55);
}
[data-theme="dark"] .pod-missed-flag {
    background: rgba(249, 115, 22, 0.14);
    border-color: rgba(251, 146, 60, 0.5);
    border-left-color: #fb923c;
    color: #fed7aa;
}
/* !important: "[data-theme=dark] .content-card span" forces slate text with
   !important, and both pmf spans sit inside the student's content card. */
[data-theme="dark"] .pod-missed-flag .pmf-title { color: #fdba74 !important; }
[data-theme="dark"] .pod-missed-flag .pmf-text { color: #fed7aa !important; }
[data-theme="dark"] .question-slide.is-commonly-missed {
    background: linear-gradient(180deg, rgba(251, 146, 60, 0.10), rgba(251, 146, 60, 0) 220px);
    box-shadow: inset 0 0 0 2px rgba(251, 146, 60, 0.6);
}
/* Video and image questions on a slide. These cards already paint their own
   background and shadow, so the ring is an inset OUTLINE — it neither
   replaces their shadow nor fights their themed background. */
.edpuzzle-question-card.is-commonly-missed,
.ixl-question-card.is-commonly-missed {
    outline: 2px solid rgba(249, 115, 22, 0.7);
    outline-offset: -2px;
}
[data-theme="dark"] .edpuzzle-question-card.is-commonly-missed,
[data-theme="dark"] .ixl-question-card.is-commonly-missed {
    outline-color: rgba(251, 146, 60, 0.75);
}
/* The video timeline dot: an orange ring around whatever fill its state has
   (yellow upcoming, green / red answered), so the state stays readable. The
   active (playing) dot keeps its own blue ring. */
.ep-marker.is-commonly-missed:not(.active) {
    box-shadow: 0 0 0 3px #f97316, 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ── STAAR performance level on the completion screen ────────────────────
   #performanceBandResult, filled by renderPerformanceBand() in
   pod-play-assessment.js. --pb is the band's seeded colour
   (_PerformanceBands / CompleteSession performanceBand). Meets and Masters
   get .pod-band-celebrate: a bolder card and one pop, so reaching them
   feels like a reward; Approaches and Did Not Meet stay calm. */
.pod-band-result {
    --pb: #64748b;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    max-width: 440px;
    margin: 0 auto 1.25rem;
    padding: 0.8rem 1.1rem;
    border-radius: 14px;
    text-align: left;
    line-height: 1.35;
    background: #f8fafc;
    background: color-mix(in srgb, var(--pb) 9%, #ffffff);
    border: 1px solid #e2e8f0;
    border: 1px solid color-mix(in srgb, var(--pb) 35%, #ffffff);
    border-left: 6px solid var(--pb);
    color: #1e293b;
}
.pod-band-result .pbr-icon {
    flex: none;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pb);
    color: #fff;
    font-size: 1.15rem;
}
.pod-band-result .pbr-body { display: flex; flex-direction: column; min-width: 0; }
.pod-band-result .pbr-eyebrow {
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
    color: #64748b;
}

/* 🎓 Grade line (renderGradeStanding): passing or not, before the STAAR
   level. Its own colour channel — green check / red alert — so a Meets card
   below never reads as the pass/fail answer. */
.pod-grade-standing {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    max-width: 440px;
    margin: 0 auto 0.85rem;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    text-align: left;
    line-height: 1.35;
    font-size: 1rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
}
.pod-grade-standing > i { flex: none; margin-top: 0.15rem; font-size: 1.1rem; }
.pod-grade-standing .gs-body { display: flex; flex-direction: column; min-width: 0; }
.pod-grade-standing .gs-main { font-weight: 800; }
.pod-grade-standing .gs-next { font-size: 0.95rem; color: #334155; }
.pod-grade-standing.is-passing { border-color: #bbf7d0; background: #f0fdf4; }
.pod-grade-standing.is-passing > i { color: #16a34a; }
.pod-grade-standing.is-below { border-color: #fecaca; background: #fef2f2; }
.pod-grade-standing.is-below > i { color: #dc2626; }
[data-theme="dark"] .pod-grade-standing { background: rgba(165, 165, 165, 0.12); border-color: rgba(165, 165, 165, 0.35); }
[data-theme="dark"] .pod-grade-standing.is-passing { background: rgba(22, 163, 74, 0.16); border-color: rgba(34, 197, 94, 0.45); }
[data-theme="dark"] .pod-grade-standing.is-below { background: rgba(220, 38, 38, 0.16); border-color: rgba(248, 113, 113, 0.5); }
[data-theme="dark"] .pod-grade-standing .gs-main { color: #fafafa !important; }
[data-theme="dark"] .pod-grade-standing .gs-next { color: #d6d6d6 !important; }
[data-theme="dark"] .pod-grade-standing.is-passing > i { color: #4ade80 !important; }
[data-theme="dark"] .pod-grade-standing.is-below > i { color: #f87171 !important; }
.pod-band-result .pbr-title { font-weight: 800; font-size: 1.15rem; color: #0f172a; }
.pod-band-result .pbr-text { font-size: 0.98rem; color: #334155; }
.pod-band-result.pod-band-celebrate {
    border-width: 2px;
    border-left-width: 6px;
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.22);
    animation: podBandPop 0.6s cubic-bezier(.2, 1.4, .4, 1) 0.25s both;
}
.pod-band-result.pod-band-celebrate .pbr-icon { width: 3rem; height: 3rem; font-size: 1.35rem; }
.pod-band-result.pod-band-celebrate[data-band="masters"] {
    background: linear-gradient(135deg, #ecfdf5, #fef9c3);
    box-shadow: 0 8px 28px rgba(234, 179, 8, 0.32);
}
.pod-band-result.pod-band-celebrate[data-band="masters"] .pbr-icon {
    background: linear-gradient(135deg, #f59e0b, #059669);
}
@keyframes podBandPop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .pod-band-result.pod-band-celebrate { animation: none; }
}
/* !important: "[data-theme=dark] .content-card span" forces slate text with
   !important, and the pbr spans sit inside the completion content card. */
[data-theme="dark"] .pod-band-result {
    background: rgba(165, 165, 165, 0.12);
    background: color-mix(in srgb, var(--pb) 18%, #1b1b1b);
    border-color: rgba(165, 165, 165, 0.35);
    border-color: color-mix(in srgb, var(--pb) 55%, #1b1b1b);
    border-left-color: var(--pb);
}
[data-theme="dark"] .pod-band-result.pod-band-celebrate[data-band="masters"] {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.28), rgba(234, 179, 8, 0.22));
}
[data-theme="dark"] .pod-band-result .pbr-title { color: #fafafa !important; }
[data-theme="dark"] .pod-band-result .pbr-eyebrow { color: #a5a5a5 !important; }
[data-theme="dark"] .pod-band-result .pbr-text { color: #d6d6d6 !important; }
[data-theme="dark"] .pod-band-result .pbr-icon,
[data-theme="dark"] .pod-band-result .pbr-icon i { color: #fff !important; }

/* ── Full screen (fullscreen-toggle.js) ──────────────────────────────────────
   Optional and ungraded: it hides the browser's tabs and address bar. While
   it is on, <html> carries .is-page-fullscreen and the header thins out — the
   cosmetic banner strip goes, and Report moves into the Tools menu. The chip
   that offers full screen is styled in fullscreen-toggle.css. */
html.is-page-fullscreen .pod-banner-strip,
html.is-page-fullscreen .pod-header-actions > #podReportProblemBtn {
    display: none !important;
}

.pod-tools-panel #podReportProblemToolBtn {
    display: none;
}

html.is-page-fullscreen .pod-tools-panel #podReportProblemToolBtn {
    display: inline-flex;
}

/* 🧪 A test question already answered (Back shows it, read-only): its choices
   can't be clicked again. The "Answer saved" note and its Continue button stay
   live. pod-play-assessment.js testExitStep / BuildExitAssessmentHtml. */
.question-slide.is-saved .activity-container > :not(.feedback-inline) {
    pointer-events: none;
    opacity: .75;
}

/* 📐 EXIT TICKET HEADER = ONE STRIP (2026-11-05). It repeats above every
   question; stacked (icon, pill, title, note, mastery badge, bar, counter)
   it took ~330px before the question began. Title left, status right;
   wraps under 577px. BuildExitAssessmentHtml + the retry headers in
   pod-play-assessment.js. */
.exit-header-strip {
    display: flex;
    align-items: center;
    gap: 14px 18px;
    flex-wrap: wrap;
    text-align: left;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}
.exit-header-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
}
.exit-header-title {
    flex: 1 1 320px;
    min-width: 0;
}
    .exit-header-title h2 {
        font-size: 1.35rem;
        font-weight: 700;
        margin: 4px 0 2px;
    }
.exit-header-note {
    font-size: 0.85rem;
    margin: 0;
}
.exit-header-status {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.exit-header-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
    .exit-header-badges .badge {
        font-size: 0.85rem;
    }
.exit-header-progress {
    width: 240px;
    height: 8px;
}
@media (max-width: 576px) {
    .exit-header-status { align-items: flex-start; width: 100%; }
    .exit-header-badges { justify-content: flex-start; }
    .exit-header-progress { width: 100%; }
}

/* 📐 SHORT CHOICES TWO ACROSS on a wide screen (2026-11-05): an even set of
   short choices (PodsController.UseTwoColumnChoices) used four full-width
   rows of a few words each. Phones and narrow windows keep one per row. */
@media (min-width: 993px) {
    .multiselect-options.ms-two-col {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 14px;
    }
}

/* 📐 SCORE RECEIPT IN TWO COLUMNS on a wide screen (2026-11-05). The finish
   screen was one tall centered column (trophy, score, receipt, what-next,
   then the buttons at the very bottom). Left = the result and the buttons;
   right = the receipt and what is next (Play.cshtml .completion-cols).
   One column under 993px, and when nothing in the right column is showing
   (every block there starts display:none and is shown by id).
   The two sides are matching framed panels of equal height; the right one
   scrolls its own content (2026-11-05, "the sides aren't symmetrical"). */
@media (min-width: 993px) {
    .completion-screen {
        padding: 24px 12px;
    }
    /* Two matching panels, equal width and equal height. The left (result +
       buttons) sets the row height; the right is size-contained so its own
       content never stretches the row: a long receipt scrolls INSIDE its
       panel instead of making the right side taller than the left. */
    .completion-cols {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 24px;
        align-items: stretch;
    }
        .completion-cols > .completion-col {
            border: 1px solid rgba(148, 163, 184, 0.28);
            border-radius: 16px;
            background: rgba(99, 102, 241, 0.04);
            padding: 22px 22px;
        }
    .completion-col-result {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .completion-col-details {
        contain: size;
        min-height: 420px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
    }
    .completion-cols:not(:has(.completion-col-details > :not(style):not([style*="display: none"]):not([style*="display:none"])))  {
        grid-template-columns: minmax(0, 1fr);
        max-width: 640px;
        margin: 0 auto;
    }
        /* Nothing on the right: no empty panel, and no frame on the left. */
        .completion-cols:not(:has(.completion-col-details > :not(style):not([style*="display: none"]):not([style*="display:none"]))) > .completion-col-details {
            display: none;
        }
        .completion-cols:not(:has(.completion-col-details > :not(style):not([style*="display: none"]):not([style*="display:none"]))) > .completion-col-result {
            border: 0;
            background: none;
            padding: 0;
        }
    .completion-col-result .trophy-icon {
        font-size: 3.5rem;
    }
    .completion-col-result h1 {
        margin-top: 0.75rem !important;
    }
    .completion-col-result .score-circle {
        margin: 18px auto;
    }
    /* Buttons side by side (Bootstrap flex-column is !important); the
       notes and the make-up request under them keep a full row. */
    .completion-col-result .completion-actions {
        margin-top: 8px;
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
    }
        .completion-col-result .completion-actions > :not(.btn) {
            flex-basis: 100%;
        }
    /* The blocks were sized for a centered column (inline max-width +
       mx-auto); in their own column they take its full width. */
    .completion-col-details {
        text-align: left;
    }
        .completion-col-details > * {
            max-width: none !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
        }
        .completion-col-details > :first-child {
            margin-top: 0 !important;
        }
}

/* A data table written in a question's stem (Helpers/StemTable): the twin of
   a test item that had a table. Shown as a real table, not run-on text. */
/* A choice can be a table too: SQL "which result…" questions (PodSqlTables). */
.activity-question .stem-table-lead,
.activity-question .stem-table-after,
.option-text .stem-table-lead,
.option-text .stem-table-after { display: block; }
.activity-question .stem-table,
.option-text .stem-table {
    width: auto; max-width: 100%; margin: 10px 0; border-collapse: collapse;
    font-size: 0.95rem; font-weight: 400; line-height: 1.35;
}
/* The question text is centered; its table sits centered under it. Choice
   tables stay left in their card. */
.activity-question .stem-table { margin-left: auto; margin-right: auto; }
.option-text .stem-table { margin: 2px 0; }
/* Question tables (2026-12-02): tighter cells and margins, a bit larger text,
   so two SQL tables fit side by side and read easily. */
.activity-question .stem-table { margin-top: 6px; margin-bottom: 6px; font-size: 1.05rem; }
/* Named tables in a row ("Table: classes", "Table: students", "Your query
   should return:") sit side by side under their names; they wrap on a
   narrow screen (Helpers/StemTable). */
.activity-question .stem-tables {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
    gap: 8px 16px; margin: 6px 0;
}
.activity-question .stem-table-card { display: block; min-width: 0; max-width: 100%; overflow-x: auto; text-align: left; }
.activity-question .stem-tables .stem-table { margin: 0; }
.activity-question .stem-table-name {
    display: block; margin-bottom: 2px; font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .9rem; font-weight: 700; color: #1e3a8a;
}
[data-theme="dark"] .activity-question .stem-table-name { color: #93c5fd; }
/* "Query: SELECT …" under a SQL "which result" stem (PodSqlTables). */
.activity-question .stem-query { display: inline-block; margin: 8px 0 2px; font-weight: 400; }
.activity-question .stem-query-label { font-weight: 700; margin-right: 4px; }
.activity-question .stem-query code {
    font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 0.95em;
    color: #1e293b; background: #f1f5f9; border: 1px solid #cbd5e1;
    border-radius: 6px; padding: 3px 8px; white-space: pre-wrap; word-break: break-word;
}
[data-theme="dark"] .activity-question .stem-query code {
    color: #e5e7eb; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18);
}
.activity-question .stem-table th,
.activity-question .stem-table td,
.option-text .stem-table th,
.option-text .stem-table td {
    border: 1px solid #cbd5e1; padding: 3px 8px; text-align: left; vertical-align: top;
}
.activity-question .stem-table thead th,
.option-text .stem-table thead th { background: #eaf1fb; color: #1e3a8a; font-weight: 700; }
.activity-question .stem-table tbody th,
.option-text .stem-table tbody th { background: #f8fafc; font-weight: 600; }
[data-theme="dark"] .activity-question .stem-table th,
[data-theme="dark"] .activity-question .stem-table td,
[data-theme="dark"] .option-text .stem-table th,
[data-theme="dark"] .option-text .stem-table td { border-color: rgba(255,255,255,.18); }
[data-theme="dark"] .activity-question .stem-table thead th,
[data-theme="dark"] .option-text .stem-table thead th { background: rgba(96,165,250,.18); color: #dbeafe; }
[data-theme="dark"] .activity-question .stem-table tbody th,
[data-theme="dark"] .option-text .stem-table tbody th { background: rgba(255,255,255,.05); }
@media (max-width: 576px) {
    .activity-question .stem-table { display: block; overflow-x: auto; }
}

/* ============================================ */
/* Code in lesson text (Helpers/SlideCode,       */
/* wwwroot/js/slide-code.js — 2026-12-01). A     */
/* query inside a slide bullet, question or      */
/* choice: an inline chip when short, a block    */
/* with one clause per line when long.           */
/* ============================================ */
.slide-code-inline {
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .92em; color: #0f3d2e; background: #ecfdf5;
    border: 1px solid #a7f3d0; border-radius: 6px; padding: 1px 6px;
    white-space: pre-wrap; word-break: break-word;
}
.slide-code-block {
    display: block; margin: 8px 0; padding: 10px 14px;
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .95em; line-height: 1.55; text-align: left; font-weight: 400;
    color: #e5e7eb; background: #1f2937; border-radius: 8px;
    border-left: 4px solid #10b981;
    white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}
.slide-code-block .sc-kw { color: #6ee7b7; font-weight: 700; }
.slide-code-inline .sc-kw { color: #047857; font-weight: 700; }
.activity-question .slide-code-block { margin-left: auto; margin-right: auto; max-width: 100%; width: fit-content; min-width: min(100%, 320px); }
/* A question heading is large; its code reads at body size. */
.activity-question .slide-code-block, .activity-question .slide-code-inline { font-size: 1rem; font-weight: 400; }
[data-theme="dark"] .slide-code-inline { color: #d1fae5; background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .4); }
[data-theme="dark"] .slide-code-inline .sc-kw { color: #6ee7b7; }
[data-theme="dark"] .slide-code-block { background: #111111; border: 1px solid #2a2a2a; border-left: 4px solid #10b981; }

/* ============================================ */
/* Worked example card (Services/              */
/* PodWorkedExamples, 2026-12-01): the table → */
/* the query → "Show what it returns".         */
/* ============================================ */
.worked-example {
    margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px; text-align: left;
    background: #f0fdf4; border: 1px solid #bbf7d0;
}
.worked-example .we-head { font-weight: 700; color: #065f46; margin-bottom: 4px; }
.worked-example .we-caption { font-size: 1.02rem; color: #1f2937; margin-bottom: 8px; }
.worked-example .we-step { margin-top: 8px; }
.worked-example .we-label { font-size: .85rem; font-weight: 700; color: #374151; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.worked-example .we-num {
    display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
    border-radius: 50%; background: #10b981; color: #fff; font-size: .75rem;
}
.worked-example .we-tables { display: flex; flex-wrap: wrap; gap: 12px; }
.worked-example .we-table-wrap { overflow-x: auto; max-width: 100%; }
.worked-example .we-table-name { font-family: Consolas, Menlo, monospace; font-size: .85rem; color: #065f46; font-weight: 700; }
.worked-example table.we-table { border-collapse: collapse; font-size: .95rem; margin: 2px 0; }
.worked-example table.we-table th, .worked-example table.we-table td { border: 1px solid rgba(100, 116, 139, .45); padding: 3px 10px; text-align: left; }
.worked-example table.we-table th { background: rgba(16, 185, 129, .12); }
.worked-example .we-empty { color: #6b7280; font-style: italic; }
.worked-example .slide-code-block { margin: 0; }
/* C# / Python cards (PodCodeLessons): what the program really printed. */
.worked-example pre.we-output {
    margin: 0; padding: 8px 12px; border-radius: 8px; text-align: left;
    font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: .95em; line-height: 1.5;
    color: #111827; background: #ffffff; border: 1px solid #a7f3d0; white-space: pre-wrap; word-break: break-word;
}
[data-theme="dark"] .worked-example pre.we-output { color: #e5e7eb; background: #111111; border-color: rgba(16, 185, 129, .4); }
.worked-example .we-show {
    margin-top: 10px; border: 1px solid #10b981; background: #fff; color: #047857;
    font-weight: 600; font-size: .92rem; padding: 6px 14px; border-radius: 8px; cursor: pointer;
}
.worked-example .we-show:hover { background: #ecfdf5; }
[data-theme="dark"] .worked-example { background: rgba(16, 185, 129, .07); border-color: rgba(16, 185, 129, .35); }
[data-theme="dark"] .worked-example .we-head, [data-theme="dark"] .worked-example .we-table-name { color: #6ee7b7; }
[data-theme="dark"] .worked-example .we-caption, [data-theme="dark"] .worked-example .we-label { color: #e5e7eb; }
[data-theme="dark"] .worked-example .we-show { background: transparent; color: #6ee7b7; }
[data-theme="dark"] .worked-example .we-show:hover { background: rgba(16, 185, 129, .12); }
/* Genetics cards (PodGeneticsCrosses, 2026-12-03): the cross → the Punnett
   square (gametes on the edges, shaded) → "Show the ratios". */
.worked-example.we-cross .we-cross-line { font-family: Consolas, Menlo, monospace; font-size: 1.15rem; font-weight: 700; color: #111827; }
.worked-example.we-cross .we-cross-key, .worked-example.we-cross .we-cross-note { font-size: .9rem; color: #374151; }
.worked-example.we-cross .we-cross-note { margin-top: 4px; }
.worked-example.we-cross table.we-table th, .worked-example.we-cross table.we-table td {
    text-align: center; min-width: 3.2em; padding: 6px 12px; font-family: Consolas, Menlo, monospace; font-size: 1.05rem;
}
.worked-example.we-cross table.we-table tbody td:first-child { background: rgba(16, 185, 129, .12); font-weight: 700; }
.worked-example.we-cross .we-ratio { font-size: 1rem; color: #111827; margin-top: 2px; }
[data-theme="dark"] .worked-example.we-cross .we-cross-line, [data-theme="dark"] .worked-example.we-cross .we-ratio { color: #e5e7eb; }
[data-theme="dark"] .worked-example.we-cross .we-cross-key, [data-theme="dark"] .worked-example.we-cross .we-cross-note { color: #d1d5db; }
/* Biology steps cards (PodProteinSynthesis, PodEnergyFlow, 2026-12-03):
   labeled steps, later ones behind "Show the protein" / "Show the energy". */
.worked-example.we-steps .we-line { font-size: 1rem; color: #111827; margin-top: 2px; font-family: Consolas, Menlo, monospace; }
.worked-example.we-steps table.we-table th, .worked-example.we-steps table.we-table td { text-align: center; }
.worked-example.we-steps table.we-table td:first-child, .worked-example.we-steps table.we-table th:first-child { text-align: left; }
[data-theme="dark"] .worked-example.we-steps .we-line { color: #e5e7eb; }
/* Graphs drawn from a stem table (Helpers/StemChart, 2026-12-03). Colors
   ride on classes so dark mode can re-ink them; the numbers stay in a table
   only screen readers read. */
.activity-question .stem-chart, .option-text .stem-chart { display: block; margin: 6px auto; max-width: 560px; }
.stem-chart .stem-chart-svg { display: block; width: 100%; height: auto; }
.stem-chart-data { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[data-theme="dark"] .stem-chart .sc-text { fill: #e5e7eb; }
[data-theme="dark"] .stem-chart .sc-muted { fill: #cbd5e1; }
[data-theme="dark"] .stem-chart .sc-axis { stroke: #9ca3af; }
[data-theme="dark"] .stem-chart .sc-grid { stroke: rgba(255,255,255,.12); }
[data-theme="dark"] .stem-chart .sc-s0-line { stroke: #60a5fa; }
[data-theme="dark"] .stem-chart .sc-s1-line { stroke: #fbbf24; }
[data-theme="dark"] .stem-chart .sc-s2-line { stroke: #34d399; }
[data-theme="dark"] .stem-chart .sc-s3-line { stroke: #c084fc; }
[data-theme="dark"] .stem-chart .sc-s0-fill { fill: #60a5fa; }
[data-theme="dark"] .stem-chart .sc-s1-fill { fill: #fbbf24; }
[data-theme="dark"] .stem-chart .sc-s2-fill { fill: #34d399; }
[data-theme="dark"] .stem-chart .sc-s3-fill { fill: #c084fc; }
[data-theme="dark"] .stem-chart .sc-point { stroke: #1f2937; }
