/* ═══════════════════════════════════════════
   PRESENTATION LIGHT THEME v1.4
   Self-contained — no dependency on global.css
   Claude-like warm/cream aesthetic
   ═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --p-bg: #e8e5e0;
    --p-bg-card: #ffffff;
    --p-bg-sidebar: #f5f3ef;
    --p-bg-code: #1e1e2e;
    --p-text: #1a1a2e;
    --p-text-secondary: #4a4a5e;
    --p-text-muted: #8b8b9e;
    --p-accent: #c77b3f;
    --p-accent-hover: #a96832;
    --p-accent-light: rgba(199, 123, 63, 0.10);
    --p-accent-blue: #4a7fc4;
    --p-border: #ddd9d2;
    --p-border-light: #eae7e2;
    --p-code-text: #d4d4d8;
    --p-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --p-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --p-radius: 10px;
    --p-header-h: 52px;
    --p-sidebar-w: 260px;
    /* v1.8 micro-learning motion tokens */
    --ml-fast: 140ms;
    --ml-normal: 200ms;
    --ml-emphasis: 300ms;
    --ml-easing: cubic-bezier(0.2, 0, 0, 1);
}

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

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

/* Theme tokens: dark mode for presentation page */
body.presentation-shell.presentation-dark {
    --p-bg: #10131d;
    --p-bg-card: #171b27;
    --p-bg-sidebar: #141926;
    --p-bg-code: #0f1320;
    --p-text: #edf2ff;
    --p-text-secondary: #c2cadb;
    --p-text-muted: #95a0b8;
    --p-accent: #d79a66;
    --p-accent-hover: #bf7d46;
    --p-accent-light: rgba(215, 154, 102, 0.16);
    --p-accent-blue: #7ea4df;
    --p-border: #2c3448;
    --p-border-light: #22293a;
    --p-code-text: #e2e8f0;
}

/* ── Top Bar ── */
.pres-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--p-header-h);
    padding: 0 20px;
    background: var(--p-bg-card);
    border-bottom: 1px solid var(--p-border);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 12px;
}

.pres-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.pres-back-link {
    color: var(--p-text-muted);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}

.pres-back-link:hover {
    color: var(--p-accent);
}

.pres-topbar-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--p-text);
    white-space: nowrap;
}

.pres-topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* v1.6: Center section for Continuous button — centered relative to content area */
.pres-topbar-center {
    position: absolute;
    left: calc(50% + var(--p-sidebar-w) / 2);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.p-lang-btn {
    background: transparent;
    color: var(--p-text-muted);
    border: 1px solid var(--p-border);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--p-font);
}

.p-lang-btn:hover {
    border-color: var(--p-accent);
    color: var(--p-accent);
}

.p-lang-btn.active {
    background: var(--p-accent);
    color: #fff;
    border-color: var(--p-accent);
}

.p-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent;
    color: var(--p-text-muted);
    border: 1px solid var(--p-border);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 14px;
    line-height: 1;
    min-height: 32px;
    min-width: 36px;
    transition: all .15s;
}

.p-home-btn:hover {
    border-color: var(--p-accent);
    color: var(--p-accent);
}

.p-theme-btn {
    background: transparent;
    color: var(--p-text-muted);
    border: 1px solid var(--p-border);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--p-font);
    line-height: 1;
}

.p-theme-btn:hover {
    border-color: var(--p-accent);
    color: var(--p-accent);
}

.p-nav-btn {
    background: transparent;
    color: var(--p-text-muted);
    border: 1px solid var(--p-border);
    border-radius: 8px;
    padding: 6px 14px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--p-font);
}

.p-nav-btn:hover:not(:disabled) {
    background: var(--p-accent);
    color: #fff;
    border-color: var(--p-accent);
}

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

.p-outline-toggle {
    display: none;
}

/* ── Body Layout ── */
.pres-body {
    display: flex;
    flex: 1;
}

/* ── Sidebar (v1.5: fixed, open by default, edge toggle) ── */
.pres-sidebar {
    width: var(--p-sidebar-w);
    min-width: var(--p-sidebar-w);
    background: var(--p-bg-sidebar);
    border-right: 1px solid var(--p-border);
    position: sticky;
    top: var(--p-header-h);
    height: calc(100vh - var(--p-header-h));
    overflow-y: auto;
    padding: 16px 0;
    flex-shrink: 0;
    transition: width .22s ease, min-width .22s ease, padding .22s ease;
    z-index: 40;
}

.pres-sidebar.collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border-right: none;
}

/* Edge toggle arrow */
.pres-sidebar-edge-toggle {
    position: fixed;
    top: calc(var(--p-header-h) + 16px);
    left: var(--p-sidebar-w);
    width: 20px;
    height: 40px;
    background: var(--p-bg-sidebar);
    border: 1px solid var(--p-border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--p-text-muted);
    z-index: 41;
    transition: left .22s ease, background .12s;
}

.pres-sidebar-edge-toggle:hover {
    background: var(--p-border);
    color: var(--p-accent);
}

.pres-sidebar.collapsed~.pres-sidebar-edge-toggle,
.pres-sidebar-edge-toggle.collapsed {
    left: 0;
}

.pres-sidebar-overlay {
    display: none;
}

.pres-sidebar::-webkit-scrollbar {
    width: 4px;
}

.pres-sidebar::-webkit-scrollbar-thumb {
    background: var(--p-border);
    border-radius: 2px;
}

.pres-ol-head {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--p-text-muted);
    padding: 4px 16px 10px;
}

/* ── Section headers (collapsible) ── */
.pres-ol-section {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px 7px;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--p-text-muted);
    cursor: pointer;
    transition: all .12s;
    user-select: none;
    border-top: 1px solid var(--p-border-light);
}

.pres-ol-section:first-child {
    border-top: none;
    margin-top: 0;
}

.pres-ol-section:hover {
    color: var(--p-text);
}

.pres-ol-section.active-section {
    color: var(--p-accent);
}

.pres-ol-arrow {
    font-size: 10px;
    flex-shrink: 0;
    width: 10px;
    text-align: center;
    transition: transform .15s;
}

.pres-ol-children {
    padding-left: 6px;
}

.pres-ol-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--p-text-secondary);
    transition: all .12s;
    border-left: 3px solid transparent;
    line-height: 1.4;
    text-decoration: none;
}

.pres-ol-item:hover {
    background: var(--p-accent-light);
    color: var(--p-text);
}

.pres-ol-item.active {
    background: var(--p-accent-light);
    color: var(--p-accent);
    border-left-color: var(--p-accent);
    font-weight: 600;
}

.pres-ol-page {
    font-family: var(--p-mono);
    font-size: 10px;
    color: var(--p-text-muted);
    flex-shrink: 0;
    min-width: 22px;
}

.pres-ol-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Main (v1.4: centered, bright card on dark bg) ── */
.pres-main {
    flex: 1;
    min-width: 0;
    padding: 32px 60px 80px;
    max-width: 900px;
    margin-inline: auto;
}

/* ── Slide Card (bright content on dark background) ── */
.pres-slide-card {
    background: #fff;
    border-radius: 16px;
    padding: 48px 56px 56px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .08), 0 0 0 1px rgba(0, 0, 0, .04);
    min-height: 480px;
    position: relative;
}

/* ── Inline Nav (above slide card) ── */
.pres-inline-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 4px;
}

.pres-inline-nav .p-page-tag {
    margin-bottom: 0;
}

.pres-inline-nav-btns {
    display: flex;
    gap: 6px;
}

.p-inline-nav-btn {
    background: rgba(0, 0, 0, .04);
    color: var(--p-text-muted);
    border: 1px solid var(--p-border);
    border-radius: 8px;
    padding: 6px 16px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--p-font);
}

.p-inline-nav-btn:hover:not(:disabled) {
    background: var(--p-accent);
    color: #fff;
    border-color: var(--p-accent);
}

.p-inline-nav-btn:disabled {
    opacity: .2;
    cursor: not-allowed;
}

.pres-page-counter {
    font-size: 12px;
    font-family: var(--p-mono);
    color: var(--p-text-muted);
    font-weight: 500;
}

/* ── Slide Typography ── */
.p-page-tag {
    font-size: 12px;
    font-family: var(--p-mono);
    color: var(--p-accent);
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: 10px;
}

.p-slide-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 28px;
    color: var(--p-text);
}

.p-slide-title.hero-title {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 12px;
}

.p-slide-hero-sub {
    text-align: center;
    font-size: 1.08rem;
    color: var(--p-text-secondary);
    margin-bottom: 32px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.p-section {
    margin-bottom: 24px;
}

.p-section-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--p-accent);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--p-accent-light);
    display: inline-block;
}

.p-body {
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--p-text-secondary);
}

.p-body strong {
    color: var(--p-text);
    font-weight: 600;
}

.p-bullets {
    list-style: none;
    padding: 0;
}

.p-bullets li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: .98rem;
    line-height: 1.7;
    color: var(--p-text-secondary);
}

.p-bullets li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--p-accent);
    font-weight: 700;
}

/* ── Code Block ── */
.p-code-wrap {
    position: relative;
    margin: 16px 0;
    border-radius: var(--p-radius);
    overflow: hidden;
    border: 1px solid #2d2d3f;
}

.p-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #16161e;
    padding: 5px 12px;
    border-bottom: 1px solid #2d2d3f;
}

.p-code-lang {
    font-size: 10px;
    font-family: var(--p-mono);
    font-weight: 600;
    color: #a0a0b8;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.p-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    color: #888;
    border: 1px solid #3a3a50;
    border-radius: 5px;
    padding: 2px 10px;
    font-size: 11px;
    font-family: var(--p-mono);
    cursor: pointer;
    transition: all .2s;
}

.p-copy-btn:hover {
    color: #ddd;
    border-color: #666;
    background: rgba(255, 255, 255, .05);
}

.p-copy-btn.copying {
    color: #fbbf24;
    border-color: #fbbf24;
}

.p-copy-btn.copied {
    color: #4ade80;
    border-color: #4ade80;
}

.p-copy-btn.failed {
    color: #f87171;
    border-color: #f87171;
}

.p-code-block {
    background: var(--p-bg-code);
    padding: 14px 16px;
    overflow-x: auto;
    font-family: var(--p-mono);
    font-size: 13px;
    line-height: 1.65;
    color: var(--p-code-text);
    white-space: pre;
    margin: 0;
    display: block;
}

.p-note {
    background: var(--p-accent-light);
    border-left: 3px solid var(--p-accent);
    padding: 10px 16px;
    font-size: .88rem;
    color: var(--p-text-secondary);
    font-style: italic;
    border-radius: 0 8px 8px 0;
    margin: 14px 0;
}

/* ── Bottom Bar ── */
.pres-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    height: 36px;
    background: #fff;
    border-top: 1px solid var(--p-border);
    font-size: 11px;
    color: var(--p-text-muted);
    flex-shrink: 0;
}

.p-kbd {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.p-kbd kbd {
    background: var(--p-bg);
    border: 1px solid var(--p-border);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 10px;
    font-family: var(--p-mono);
    color: var(--p-text-muted);
}

/* ── Mobile Drawer ── */
.pres-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .25);
    z-index: 90;
    backdrop-filter: blur(2px);
}

.pres-drawer-overlay.open {
    display: block;
}

.pres-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 55vh;
    background: var(--p-bg-card);
    border-top: 1px solid var(--p-border);
    border-radius: 16px 16px 0 0;
    z-index: 100;
    transform: translateY(100%);
    transition: transform .25s ease;
    overflow-y: auto;
    padding: 12px 0 28px;
}

.pres-drawer.open {
    transform: translateY(0);
}

.pres-drawer-handle {
    width: 36px;
    height: 4px;
    background: var(--p-border);
    border-radius: 2px;
    margin: 0 auto 12px;
}

/* ═══════════════════════════════════
   INTERACTIVE QUIZ PANEL v1.3
   ═══════════════════════════════════ */

/* ── Toggle Button ── */
.p-interactive-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    color: var(--p-text-muted);
    border: 1px solid var(--p-border);
    border-radius: 8px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--p-font);
}

.p-interactive-btn:hover {
    border-color: var(--p-accent);
    color: var(--p-accent);
}

.p-interactive-btn.active {
    background: var(--p-accent);
    color: #fff;
    border-color: var(--p-accent);
}

/* ── Quiz Panel (light theme) ── */
.pres-quiz-panel {
    width: 0;
    min-width: 0;
    overflow: hidden;
    opacity: 0;
    background: #fff;
    border-left: 1px solid var(--p-border);
    position: sticky;
    top: var(--p-header-h);
    height: calc(100vh - var(--p-header-h));
    overflow-y: auto;
    flex-shrink: 0;
    transition: width .25s ease, min-width .25s ease, opacity .2s ease .05s;
    display: flex;
    flex-direction: column;
}

.pres-quiz-panel.open {
    width: 32%;
    min-width: 290px;
    opacity: 1;
}

.pres-quiz-panel::-webkit-scrollbar {
    width: 4px;
}

.pres-quiz-panel::-webkit-scrollbar-thumb {
    background: var(--p-border);
    border-radius: 2px;
}

/* Panel header */
.quiz-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--p-border-light);
    flex-shrink: 0;
}

.quiz-panel-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--p-accent);
}

.quiz-panel-actions {
    display: flex;
    gap: 6px;
}

.quiz-nav-btn {
    font-weight: 700;
    font-size: 13px;
}

.quiz-nav-btn+.quiz-panel-btn:not(.quiz-nav-btn) {
    margin-left: 6px;
}

.quiz-panel-btn {
    background: transparent;
    border: 1px solid var(--p-border);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--p-text-muted);
    transition: all .12s;
}

.quiz-panel-btn:hover {
    color: var(--p-text);
    border-color: var(--p-text-muted);
}

/* Panel content */
.quiz-panel-content {
    flex: 1;
    padding: 16px 18px 24px;
    overflow-y: auto;
}

/* ── Quiz Card ── */
.quiz-card {
    background: #faf8f5;
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    padding: 18px;
    margin-bottom: 14px;
}

.quiz-card-id {
    font-size: 10px;
    font-family: var(--p-mono);
    color: var(--p-text-muted);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 8px;
}

.quiz-card-question {
    font-size: .95rem;
    font-weight: 600;
    color: var(--p-text);
    line-height: 1.55;
    margin-bottom: 14px;
}

/* Radio options */
.quiz-options {
    list-style: none;
    padding: 0;
}

.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    border: 1.5px solid var(--p-border);
    cursor: pointer;
    transition: all .12s;
    font-size: .92rem;
    color: var(--p-text-secondary);
    line-height: 1.5;
}

.quiz-option:hover:not(.disabled) {
    border-color: var(--p-accent);
    background: var(--p-accent-light);
}

.quiz-option.selected {
    border-color: var(--p-accent);
    background: var(--p-accent-light);
    color: var(--p-text);
    font-weight: 500;
}

.quiz-option.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, .08);
    color: #166534;
}

.quiz-option.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, .06);
    color: #991b1b;
}

.quiz-option.show-correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, .08);
}

.quiz-option.disabled {
    cursor: default;
    opacity: .85;
}

.quiz-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--p-border);
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
    transition: all .12s;
}

.quiz-option.selected .quiz-radio {
    border-color: var(--p-accent);
}

.quiz-option.selected .quiz-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--p-accent);
}

.quiz-option.correct .quiz-radio {
    border-color: #22c55e;
}

.quiz-option.correct .quiz-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.quiz-option.incorrect .quiz-radio {
    border-color: #ef4444;
}

.quiz-option.incorrect .quiz-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
}

.quiz-option-label {
    flex: 1;
}

.quiz-option-prefix {
    font-weight: 700;
    margin-right: 4px;
}

/* Submit & Retry */
.quiz-submit-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    background: var(--p-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--p-font);
}

.quiz-submit-btn:hover {
    background: var(--p-accent-hover);
}

.quiz-submit-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.quiz-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 6px 16px;
    background: transparent;
    color: var(--p-accent);
    border: 1px solid var(--p-accent);
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .12s;
    font-family: var(--p-font);
}

.quiz-retry-btn:hover {
    background: var(--p-accent-light);
}

/* Feedback */
.quiz-feedback {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: .88rem;
    line-height: 1.6;
}

.quiz-feedback.correct {
    background: rgba(34, 197, 94, .08);
    border: 1px solid rgba(34, 197, 94, .25);
    color: #166534;
}

.quiz-feedback.incorrect {
    background: rgba(239, 68, 68, .06);
    border: 1px solid rgba(239, 68, 68, .2);
    color: #991b1b;
}

.quiz-feedback-icon {
    font-size: 1.1rem;
    margin-right: 4px;
}

.quiz-feedback-answer {
    font-weight: 600;
    margin-top: 6px;
    display: block;
}

.quiz-feedback-explain {
    margin-top: 4px;
    font-style: italic;
    color: var(--p-text-secondary);
}

/* ── Empty State ── */
.quiz-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--p-text-muted);
}

.quiz-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.quiz-empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--p-text-secondary);
    margin-bottom: 6px;
}

.quiz-empty-body {
    font-size: .88rem;
    line-height: 1.6;
}

/* ── Mobile Quiz Drawer ── */
.pres-quiz-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .3);
    z-index: 190;
    backdrop-filter: blur(2px);
}

.pres-quiz-drawer-overlay.open {
    display: block;
}

.pres-quiz-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    background: var(--p-bg-card);
    border-top: 1px solid var(--p-border);
    border-radius: 16px 16px 0 0;
    z-index: 200;
    transform: translateY(100%);
    transition: transform .25s ease;
    overflow-y: auto;
    padding: 12px 16px 28px;
}

.pres-quiz-drawer.open {
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1279px) {
    .pres-quiz-panel.open {
        width: 40%;
        min-width: 270px;
    }
}

@media (max-width: 1023px) {
    .pres-main {
        padding: 24px 20px 48px;
    }

    .pres-slide-card {
        padding: 32px 28px 36px;
    }

    .p-slide-title {
        font-size: 1.7rem;
    }

    .p-slide-title.hero-title {
        font-size: 1.9rem;
    }
}

@media (max-width: 767px) {
    .pres-quiz-panel {
        display: none !important;
    }

    /* v1.9: Hide desktop sidebar on mobile — use drawer instead */
    .pres-sidebar,
    .pres-sidebar-edge-toggle {
        display: none !important;
    }

    .pres-main {
        padding: 12px 10px 80px;
    }

    .pres-slide-card {
        padding: 20px 16px 24px;
        border-radius: 10px;
    }

    /* v1.9: Mobile typography — optimized for iPhone 12 Pro Max */
    .p-slide-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .p-slide-title.hero-title {
        font-size: 1.7rem;
        line-height: 1.25;
    }

    .p-body {
        font-size: 15px;
        line-height: 1.6;
    }

    .p-bullets li {
        font-size: 14px;
        line-height: 1.55;
        padding: 3px 0;
    }

    .p-section-heading {
        font-size: 1rem;
    }

    .p-note {
        font-size: 13px;
    }

    .p-code-block {
        font-size: 11px;
        padding: 10px;
    }

    /* v1.9.1: Header compact for mobile — improved touch targets */
    .pres-topbar {
        padding: 6px 8px;
        gap: 6px;
        flex-wrap: nowrap;
        height: auto;
        min-height: 44px;
    }

    .pres-topbar-title {
        font-size: 11px;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* v1.9.1: All topbar buttons min 44px touch target */
    .pres-topbar .p-lang-btn,
    .pres-topbar .p-interactive-btn,
    .pres-topbar .p-continuous-btn,
    .pres-topbar .p-outline-toggle,
    .pres-topbar .p-home-btn,
    .pres-topbar .p-theme-btn {
        min-height: 36px;
        min-width: 44px;
        font-size: 11px;
        padding: 4px 8px;
    }

    .pres-topbar-right {
        gap: 4px;
    }

    .pres-back-link {
        display: none;
    }

    /* v1.9: Center section on mobile */
    .pres-topbar-center {
        position: static;
        transform: none;
    }

    /* v1.9: Progress bar compact */
    .ml-progress-bar {
        padding: 4px 12px;
        font-size: 10px;
        top: 44px;
    }

    /* v1.9: Bottom bar — hide keyboard hints, keep minimal */
    .pres-bottom .p-kbd {
        display: none;
    }

    .pres-bottom {
        padding: 6px 12px;
        font-size: 11px;
    }

    /* v1.9: Inline nav — bottom-aligned for thumb reach */
    .pres-inline-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: var(--p-bg-card);
        border-top: 1px solid var(--p-border);
        padding: 8px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    }

    .p-inline-nav-btn {
        min-width: 48px;
        min-height: 44px;
        font-size: 18px;
    }

    /* v1.9: Drawer outline — larger touch targets */
    .pres-drawer {
        max-height: 60vh;
        padding: 12px 0 env(safe-area-inset-bottom, 28px);
    }

    .pres-drawer .pres-ol-item {
        min-height: 44px;
        padding: 10px 16px 10px 28px;
        font-size: 14px;
        display: flex;
        align-items: center;
    }

    .pres-drawer .pres-ol-section {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 13px;
        font-weight: 700;
        display: flex;
        align-items: center;
    }

    .pres-drawer .pres-ol-page {
        font-size: 12px;
        min-width: 28px;
    }

    .pres-drawer .pres-ol-label {
        font-size: 14px;
    }

    /* v1.9: Recap chips — slightly larger for mobile */
    .ml-recap-chip {
        padding: 7px 14px;
        font-size: 13px;
    }

    /* v1.9: Quiz hint button larger on mobile */
    .quiz-hint-btn {
        padding: 6px 14px;
        font-size: 12px;
    }

    /* v1.9: Continuous mode mobile padding */
    .pres-main.continuous-mode {
        padding-bottom: 16px;
    }

    .pres-main.continuous-mode .pres-inline-nav {
        display: none;
    }
}

/* v1.9: iPhone 12 Pro Max fine-tune (428px) */
@media (max-width: 428px) {
    .p-slide-title {
        font-size: 1.35rem;
    }

    .p-slide-title.hero-title {
        font-size: 1.55rem;
    }

    .p-body {
        font-size: 14px;
    }

    .p-bullets li {
        font-size: 13.5px;
    }

    .pres-topbar-title {
        font-size: 11px;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ── Floating Back-to-Top (v1.9.3) ── */
.pres-backtop {
    position: fixed;
    right: 16px;
    bottom: 18px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid var(--p-border);
    background: var(--p-bg-card);
    color: var(--p-text);
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity var(--ml-fast) var(--ml-easing), transform var(--ml-fast) var(--ml-easing), border-color .15s;
}

.pres-backtop:hover {
    border-color: var(--p-accent);
    color: var(--p-accent);
}

.pres-backtop.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 767px) {
    .pres-backtop {
        right: 12px;
        bottom: 92px;
        /* above mobile inline nav */
    }

    .pres-main.continuous-mode~.pres-backtop {
        bottom: 20px;
    }
}

/* ═══════════════════════════════════
   CONTINUOUS VIEW v1.5
   ═══════════════════════════════════ */

/* ── Toggle Button (header) ── */
.p-continuous-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    color: var(--p-text-muted);
    border: 1px solid var(--p-border);
    border-radius: 8px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--p-font);
}

.p-continuous-btn:hover {
    border-color: var(--p-accent-blue);
    color: var(--p-accent-blue);
}

.p-continuous-btn.active {
    background: var(--p-accent-blue);
    color: #fff;
    border-color: var(--p-accent-blue);
}

/* ── Continuous Mode Layout ── */
.pres-main.continuous-mode {
    max-width: 960px;
}

.pres-main.continuous-mode .pres-inline-nav {
    display: none;
}

.pres-main.continuous-mode .pres-slide-card {
    min-height: auto;
}

/* Container for all slide cards in continuous mode */
.continuous-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Individual slide card wrapper in continuous mode */
.continuous-slide-wrap {
    position: relative;
}

.continuous-slide-wrap .pres-slide-card {
    min-height: auto;
}

/* Page label on each card */
.continuous-page-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
}

.continuous-page-label .p-page-tag {
    margin-bottom: 0;
}

.continuous-page-counter {
    font-size: 11px;
    font-family: var(--p-mono);
    color: var(--p-text-muted);
}

/* Divider between sections in continuous */
.continuous-section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}

.continuous-section-divider::before,
.continuous-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--p-border);
}

.continuous-section-divider span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--p-accent);
    white-space: nowrap;
}

/* ── Navigation hidden in continuous mode ── */
.pres-main.continuous-mode~.pres-bottom {
    display: none;
}

/* ── Quiz Panel in Continuous Mode ── */
.quiz-continuous-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--p-border-light);
}

.quiz-continuous-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.quiz-section-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--p-accent-blue);
    padding: 8px 0 10px;
    border-bottom: 1px dashed var(--p-border-light);
    margin-bottom: 12px;
}

/* ── Responsive for continuous ── */
@media (max-width: 767px) {
    .continuous-container {
        gap: 16px;
    }

    .p-continuous-btn span.continuous-label {
        display: none;
    }
}

/* ═══════════════════════════════════
   v1.6: CLICK-HOLD QUIZ HIGHLIGHT
   ═══════════════════════════════════ */
/* v1.8: Smooth highlight — transition-based instead of infinite animation */
.quiz-highlight-active {
    border: 2px solid var(--p-accent) !important;
    border-radius: 10px;
    box-shadow: 0 0 14px rgba(199, 123, 63, 0.4);
    transition: border-color var(--ml-fast) var(--ml-easing),
        box-shadow var(--ml-fast) var(--ml-easing),
        opacity var(--ml-normal) var(--ml-easing);
}

.quiz-continuous-section.quiz-highlight-active {
    padding: 12px;
    margin: -4px;
}

.quiz-card.quiz-highlight-active {
    border: 2px solid var(--p-accent) !important;
}

/* ═══════════════════════════════════
   v1.8: SECTION PROGRESS BAR
   ═══════════════════════════════════ */
.ml-progress-bar {
    position: sticky;
    top: var(--p-header-h);
    z-index: 40;
    background: var(--p-bg-sidebar);
    border-bottom: 1px solid var(--p-border-light);
    padding: 6px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--p-text-muted);
    letter-spacing: 0.3px;
}

.ml-progress-bar .ml-progress-label {
    white-space: nowrap;
    min-width: 140px;
}

.ml-progress-bar .ml-progress-track {
    flex: 1;
    height: 4px;
    background: var(--p-border-light);
    border-radius: 2px;
    overflow: hidden;
}

.ml-progress-bar .ml-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--p-accent), var(--p-accent-hover));
    border-radius: 2px;
    transition: width var(--ml-normal) var(--ml-easing);
}

/* ═══════════════════════════════════
   v1.8: PROGRESSIVE REVEAL BULLETS
   ═══════════════════════════════════ */
.reveal-bullet {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--ml-normal) var(--ml-easing),
        transform var(--ml-normal) var(--ml-easing);
}

.reveal-bullet.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════
   v1.8: RECAP CHIPS
   ═══════════════════════════════════ */
.ml-recap-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--p-border);
}

.ml-recap-chips .ml-recap-title {
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--p-text-muted);
    margin-bottom: 4px;
}

.ml-recap-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--p-accent);
    background: var(--p-accent-light);
    border: 1px solid rgba(199, 123, 63, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--ml-fast) var(--ml-easing);
    text-decoration: none;
    white-space: nowrap;
}

.ml-recap-chip:hover {
    background: var(--p-accent);
    color: #fff;
    border-color: var(--p-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(199, 123, 63, 0.25);
}

/* ═══════════════════════════════════
   v1.8: QUIZ HINT
   ═══════════════════════════════════ */
.quiz-hint-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--p-accent-blue);
    background: rgba(74, 127, 196, 0.08);
    border: 1px solid rgba(74, 127, 196, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--ml-fast) var(--ml-easing);
    font-family: var(--p-font);
    margin-top: 8px;
}

.quiz-hint-btn:hover {
    background: rgba(74, 127, 196, 0.15);
    border-color: var(--p-accent-blue);
}

.quiz-hint-text {
    font-size: 12px;
    font-style: italic;
    color: var(--p-text-secondary);
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(74, 127, 196, 0.05);
    border-left: 3px solid var(--p-accent-blue);
    border-radius: 0 6px 6px 0;
    animation: hintReveal var(--ml-normal) var(--ml-easing);
}

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

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

/* ═══════════════════════════════════
   v1.8: LOW-MOTION / REDUCED-MOTION
   ═══════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    :root {
        --ml-fast: 0ms;
        --ml-normal: 0ms;
        --ml-emphasis: 0ms;
    }

    .reveal-bullet {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .quiz-highlight-active {
        animation: none !important;
        transition: none !important;
    }

    .quiz-hint-text {
        animation: none !important;
    }
}

/* ═══════════════════════════════════════════
   v2.1: EXTENSION PANEL & CHATBOT SIDEBAR
   ═══════════════════════════════════════════ */

/* ── Extension Panel ── */
.ext-panel {
    margin-top: 16px;
    background: var(--p-bg-card);
    border-radius: 12px;
    border: 1px solid var(--p-border);
    overflow: hidden;
}

.ext-panel-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    flex-wrap: wrap;
}

.ext-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    color: var(--p-text-muted);
    border: 1px solid var(--p-border);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--p-font);
}

.ext-btn:hover {
    border-color: var(--p-accent);
    color: var(--p-accent);
}

.ext-btn.active {
    background: var(--p-accent);
    color: #fff;
    border-color: var(--p-accent);
}

.ext-mark-done {
    margin-left: auto;
    border-color: #22c55e;
    color: #22c55e;
}

.ext-mark-done:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

.ext-mark-done.done {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

.ext-content {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--p-border-light);
    font-size: .95rem;
    line-height: 1.75;
    color: var(--p-text-secondary);
    max-height: none;
    overflow-y: auto;
}

.ext-content p {
    margin-bottom: 12px;
}

.ext-content strong {
    color: var(--p-text);
}

.ext-rm p {
    margin-bottom: 12px;
}

.ext-example {
    background: var(--p-accent-light);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.ext-example-title {
    font-weight: 700;
    font-size: .95rem;
    color: var(--p-accent);
    margin-bottom: 8px;
}

.ext-fallback {
    text-align: center;
    padding: 24px;
    color: var(--p-text-muted);
    font-style: italic;
}

/* ── Chatbot Sidebar ── */
.chat-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: var(--p-bg-card);
    border-left: 1px solid var(--p-border);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, .06);
}

.chat-sidebar.open {
    transform: translateX(0);
}

.chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .15);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.chat-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--p-border);
    font-weight: 700;
    font-size: 14px;
    color: var(--p-text);
    flex-shrink: 0;
}

.chat-close {
    background: transparent;
    border: 1px solid var(--p-border);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    color: var(--p-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    font-family: var(--p-font);
}

.chat-close:hover {
    border-color: var(--p-accent);
    color: var(--p-accent);
}

.chat-context {
    padding: 6px 18px;
    font-size: 11px;
    font-weight: 600;
    color: var(--p-accent);
    border-bottom: 1px solid var(--p-border-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-welcome {
    text-align: center;
    color: var(--p-text-muted);
    font-size: .9rem;
    padding: 40px 16px;
}

.chat-msg {
    max-width: 90%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: .9rem;
    line-height: 1.6;
    word-break: break-word;
}

.chat-msg--user {
    align-self: flex-end;
    background: var(--p-accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-msg--assistant,
.chat-msg--system {
    align-self: flex-start;
    background: var(--p-bg);
    color: var(--p-text-secondary);
    border-bottom-left-radius: 4px;
}

.chat-msg--system {
    font-size: .8rem;
    color: var(--p-text-muted);
    font-style: italic;
}

.chat-msg--error {
    align-self: flex-start;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 8px;
    font-size: .85rem;
}

body.presentation-dark .chat-msg--error {
    background: #2d1b1b;
    color: #fca5a5;
}

.chat-quick {
    padding: 6px 18px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chat-quick-btn {
    background: var(--p-accent-light);
    color: var(--p-accent);
    border: 1px solid var(--p-border);
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--p-font);
}

.chat-quick-btn:hover {
    background: var(--p-accent);
    color: #fff;
    border-color: var(--p-accent);
}

.chat-input-area {
    padding: 10px 18px 14px;
    border-top: 1px solid var(--p-border);
    flex-shrink: 0;
}

.chat-typing {
    display: flex;
    gap: 4px;
    padding: 4px 0 6px;
    align-items: center;
    justify-content: center;
}

.chat-typing span {
    width: 6px;
    height: 6px;
    background: var(--p-accent);
    border-radius: 50%;
    animation: chatDot 1.2s infinite;
}

.chat-typing span:nth-child(2) {
    animation-delay: .2s;
}

.chat-typing span:nth-child(3) {
    animation-delay: .4s;
}

@keyframes chatDot {

    0%,
    80%,
    100% {
        opacity: .3;
        transform: scale(0.8);
    }

    40% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.chat-input-row {
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid var(--p-border);
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--p-font);
    background: var(--p-bg);
    color: var(--p-text);
    outline: none;
    transition: border-color .15s;
}

.chat-input:focus {
    border-color: var(--p-accent);
}

.chat-send {
    background: var(--p-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    font-family: var(--p-font);
}

.chat-send:hover {
    background: var(--p-accent-hover);
}

.chat-send:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Mobile responsive for extensions ── */
@media (max-width: 767px) {
    .chat-sidebar {
        width: 100%;
    }

    .ext-panel-bar {
        gap: 6px;
    }

    .ext-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .ext-content {
        max-height: none;
    }
}

/* ═══════════════════════════════════════════
   v2.2: MOBILE RESPONSIVE HARDENING
   ═══════════════════════════════════════════ */

/* ── Extension panel mobile ── */
@media (max-width: 430px) {
    .ext-panel-bar {
        padding: 8px 10px;
        gap: 4px;
    }

    .ext-btn {
        padding: 5px 8px;
        font-size: 11px;
        gap: 3px;
    }

    .ext-content {
        padding: 12px 14px;
        max-height: none;
        font-size: .88rem;
    }

    .ext-mark-done {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
}

@media (max-width: 360px) {
    .ext-btn {
        padding: 4px 6px;
        font-size: 10px;
    }

    .pres-main {
        padding: 12px 12px 60px;
    }

    .pres-slide-card {
        padding: 24px 16px 28px;
        min-height: 320px;
    }
}

@media (max-width: 320px) {
    .ext-panel-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ext-btn {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        /* touch target */
    }

    .chat-sidebar {
        width: 100%;
    }
}

/* ── Chat sidebar mobile optimizations ── */
@media (max-width: 430px) {
    .chat-msg {
        max-width: 95%;
        font-size: .85rem;
    }

    .chat-quick-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .chat-input {
        font-size: 14px;
        /* prevent iOS zoom */
    }

    .chat-header {
        padding: 10px 14px;
    }

    .chat-context {
        padding: 4px 14px;
        font-size: 10px;
    }
}

/* ── Video overlay mobile (v2.2) ── */
@media (max-width: 430px) {
    .vom-layout {
        padding: 8px;
        gap: 8px;
    }

    .vom-player-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .vom-close-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        /* touch target */
    }

    .vom-nav-btn {
        min-height: 44px;
        padding: 8px 16px;
    }

    .vom-player-container {
        min-height: 200px;
    }

    .vom-playlist {
        max-height: 150px;
    }

    .vom-pl-item {
        padding: 10px 8px;
        min-height: 44px;
        /* touch target */
    }
}

@media (max-width: 320px) {
    .vom-player-title {
        font-size: 14px;
    }

    .vom-nav-controls {
        gap: 8px;
    }

    .vom-nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ── Tutorial pages mobile ── */
@media (max-width: 430px) {
    .tutorial-supplementary-bar {
        flex-direction: column;
        gap: 4px;
    }

    .tutorial-return-link {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
}