body.alt-slideshow {
    --alt-font: 'Plus Jakarta Sans', sans-serif;
    --alt-ink: #16213a;
    --alt-muted: #4f5b78;
    --alt-line: #dfe4f0;
    --alt-purple: #6239c6;
    margin: 0;
    padding: 0;
    color: var(--alt-ink);
    font-family: var(--alt-font);
    background:
        radial-gradient(ellipse at 0 0, #eae0fb, transparent 45%),
        radial-gradient(ellipse at 100% 0, #dcefff, transparent 45%),
        #f7f8ff !important;
}
.alt-topbar {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--alt-line);
    background: rgba(255, 255, 255, 0.85);
}
#top-navbar.faded { opacity: 1; }
.alt-brand { display: inline-flex; padding: 0; flex-shrink: 0; }
.alt-brand img { width: 200px; height: auto; }
.alt-review-heading { display: grid; gap: 4px; }
.alt-eyebrow { font-size: 0.65rem; letter-spacing: 0.12em; font-weight: 800; text-transform: uppercase; color: var(--alt-purple); }
.alt-review-heading strong { font-size: 0.9rem; }
.alt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.alt-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    font: 700 0.8rem var(--alt-font);
    color: var(--alt-ink);
    background: white;
    border: 1px solid var(--alt-line);
    border-radius: 12px;
    text-decoration: none;
    transition: background 150ms ease, box-shadow 150ms ease;
}
.alt-button:hover { background: #edf3ff; border-color: #b6c6e3; color: var(--alt-ink); }
.alt-icon-button { width: 42px; padding: 8px; font-size: 1rem; flex-shrink: 0; }
.alt-primary { background: #ff7d00; border-color: #ff7d00; color: #16213a; }
.alt-primary:hover { background: #ff9633; border-color: #ff9633; }
.alt-quiet { background: transparent; border-color: transparent; }
.alt-original { color: var(--alt-muted); }
.alt-login-edit { position: relative; }
.alt-free-badge { position: absolute; top: -8px; right: -6px; padding: 3px 6px; border: 2px solid white; border-radius: 99px; background: #ff7d00; color: #16213a; font-size: 0.55rem; font-weight: 800; line-height: 1; }
.alt-slideshow :focus-visible { outline: 3px solid var(--alt-purple); outline-offset: 3px; }
.alt-button:disabled { color: #8390a8; background: #edf0f6; box-shadow: none; cursor: not-allowed; }
.alt-workspace { max-width: 1600px; margin: auto; padding: 16px 32px 8px; }
.alt-stage-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.alt-stage-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 0.8rem; color: var(--alt-muted); }
.alt-preview-badge { display: inline-flex; align-items: center; gap: 6px; background: #eae5fc; color: #58309e; border: 1px solid #dcd2f8; padding: 7px 12px; border-radius: 99px; font-weight: 700; font-size: 0.7rem; }
.alt-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--alt-line);
    border-radius: 24px;
    background: white;
    box-shadow: 0 18px 54px rgba(42, 52, 100, 0.1), 0 2px 6px rgba(42, 52, 100, 0.04);
}
#slideshowContainer { width: 100%; height: max(320px, calc(100dvh - 285px)); border-radius: 24px; }
#slideshowContainer .reveal { border-radius: 24px; }
#altLoadStatus { position: absolute; inset: 45% 0 auto; text-align: center; font-size: 0.9rem; color: var(--alt-muted); }
.alt-slideshow .reveal .progress { height: 4px; color: #8a4fff !important; background: #edeafa; }
.alt-slideshow .reveal .controls { display: none !important; }
.alt-slideshow .reveal section.question-slide,
.alt-slideshow .reveal section.answer-slide,
.alt-slideshow .reveal section.codes-slide,
.alt-slideshow .reveal section.summary-slide { padding: 0; box-sizing: border-box; }
.alt-slideshow .reveal .slides section .scale-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    width: auto;
    padding: 0 !important;
    margin: 0;
    transform-origin: center !important;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}
.alt-slideshow .reveal .scale-wrapper > :first-child { margin-top: 0; }
.alt-slideshow .reveal .scale-wrapper > :last-child { margin-bottom: 0; }
.alt-slideshow .reveal p.question-content { font-size: calc(48px * var(--slide-text-size, 1)); line-height: 1.4; }
.alt-slideshow .reveal p.answer-content { font-size: calc(72px * var(--slide-text-size, 1)); line-height: 1.3; }
.alt-slideshow .reveal div.question-content:not(:has(svg, img, .clock-wrapper, .nl-wrapper)),
.alt-slideshow .reveal .multiplechoice > .question-content:not(:has(svg, img, .clock-wrapper, .nl-wrapper)) { font-size: calc(40px * var(--slide-text-size, 1)); }
.alt-slideshow .reveal .scale-wrapper { font-size: 40px; line-height: 1.4; }
.alt-slideshow .reveal .scale-wrapper img { max-width: 100%; height: auto; margin: 0; }
.alt-slideshow .reveal .scale-wrapper > div.question-content:not(:has(svg, img, .clock-wrapper)) { max-width: 100% !important; }
.alt-slideshow .reveal .nl-label { font-size: 24px; white-space: nowrap; }
.alt-slideshow .reveal .nl-wrapper { height: 160px; }
.alt-slideshow .reveal .scale-wrapper svg { max-width: 100%; height: auto; max-height: none; }
.alt-slideshow .reveal .mc-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.alt-slideshow .reveal .multiplechoice { min-width: 0; }
.alt-slideshow .reveal .codes-slide table { font-size: var(--fit-table-font, 24px) !important; }
.alt-slideshow .reveal .codes-slide .pp-slide-header { font-size: 24px; line-height: 1.2; padding: 8px 12px; margin-bottom: 12px; }
.alt-slideshow .reveal .codes-slide th,
.alt-slideshow .reveal .codes-slide td { font-size: inherit !important; padding: 0.25em 0.5em !important; }
.alt-slideshow .reveal p.question-content { color: #115a88; }
.alt-slideshow .slide-background.answer-slide { background: #effaf3 !important; }
.alt-slideshow .reveal .title-slide { background: transparent; justify-content: center; align-items: center; flex-direction: column; gap: min(24px, calc(var(--alt-slide-height, 700px) * 0.06)); }
.alt-slideshow .reveal .title-slide.present,
.alt-slideshow .reveal.overview .title-slide { display: flex !important; }
.alt-slideshow .slides section.title-slide > div:first-child { padding-top: 0 !important; margin-top: 0; }
.alt-slideshow .slides section.title-slide > div:last-child { position: static !important; }
.alt-slideshow .slides section.title-slide p { margin: 0; }
.alt-slideshow .slide-title-subject {
    font: 800 64px var(--alt-font);
    font-size: min(64px, calc(var(--alt-slide-height, 700px) * 0.12));
    line-height: 1.2 !important;
    letter-spacing: -0.05em;
    color: white;
    text-shadow: none;
}
.alt-slideshow .slide-subtitle {
    font: 800 84px var(--alt-font);
    font-size: min(84px, calc(var(--alt-slide-height, 700px) * 0.16));
    line-height: 1.1 !important;
    letter-spacing: -0.05em;
    color: #ffd93d;
    text-shadow: none;
}
.alt-slideshow .slide-strands { width: auto; max-width: 85%; padding: 14px 28px; font: 600 1.1rem var(--alt-font); border-radius: 99px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.25); box-shadow: none; color: white; }
.alt-slideshow .pp-slide-header { font: 800 1.7rem var(--alt-font); border-radius: 14px; background: #edf3ff !important; color: #115a88; }
.alt-slideshow #response-indicator-global { position: absolute; top: 22px; right: 24px; font-size: 1.5rem; padding: 6px 10px; border-radius: 12px; background: #edf3ff; }
.alt-slideshow #response-indicator-global:empty { display: none; }
.alt-slideshow #flag-toggle-btn { top: auto !important; bottom: 16px; left: 18px !important; border-radius: 99px; font: 700 0.75rem var(--alt-font); background: #fff; box-shadow: 0 4px 16px rgba(22,33,58,0.08); }
.alt-slideshow #flag-toggle-btn.btn-outline-danger {
    color: #a32a34;
    background: #fff;
    border-color: #e6a4ab;
}
.alt-slideshow #flag-toggle-btn.btn-danger {
    color: #fff;
    background: #b52e3d;
    border-color: #b52e3d;
}
.alt-slideshow #flag-toggle-btn.btn-outline-danger:hover { color: #8b1e29; background: #fff0f1; border-color: #b52e3d; }
.alt-slideshow #flag-toggle-btn.btn-danger:hover { color: #fff; background: #922332; border-color: #922332; }
.alt-slideshow #flag-toggle-btn:focus-visible { outline: 3px solid var(--alt-purple); outline-offset: 3px; box-shadow: none; }
#teacher-controls.alt-dock {
    position: static;
    width: 100%;
    max-width: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 16px;
    margin: 16px 0 0;
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--alt-line);
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(42,52,100,0.04);
}
.alt-dock-group { display: flex; align-items: center; gap: 8px; }
.alt-text-tools { gap: 4px; }
.alt-text-tools .alt-button { padding: 8px 10px; min-width: 40px; }
#slideTextStatus { color: var(--alt-muted); font-size: 0.75rem; min-width: 38px; text-align: center; }
.alt-navigation select { max-width: 260px; min-width: 180px; border: 0; border-radius: 10px; padding: 10px 28px 10px 12px; color: var(--alt-ink); background: #f2f4fa; font: 700 0.8rem var(--alt-font); }
.alt-answer { background: #115a88; color: white; border-color: #115a88; min-width: 145px; }
.alt-answer:hover { background: #0b3a58; color: white; border-color: #0b3a58; }
.alt-answer[aria-pressed="true"] { background: #e8f8ed; color: #256d34; border-color: #88bd98; }
.alt-bottomline { display: flex; justify-content: space-between; gap: 16px; padding: 12px 4px 0; color: var(--alt-muted); font-size: 0.7rem; }
.alt-shortcuts { display: flex; align-items: center; gap: 7px; }
.alt-shortcuts kbd { background: white; color: var(--alt-muted); border: 1px solid var(--alt-line); box-shadow: 0 2px 0 #dfe4f0; padding: 2px 5px; border-radius: 4px; }
.alt-action-status { color: #a21c28; font-size: 0.8rem; margin: 8px 0; }
.alt-action-status:empty { display: none; }
.powerpoint-dialog { max-width: min(520px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--alt-line); border-radius: 22px; color: var(--alt-ink); }
.powerpoint-dialog::backdrop { background: rgba(22,33,58,0.6); }
.powerpoint-dialog h2 { font-size: 1.4rem; }
.powerpoint-dialog progress { width: 100%; accent-color: var(--alt-purple); }
.powerpoint-export-frame { position: fixed; left: -10000px; top: 0; width: 1280px; height: 720px; border: 0; pointer-events: none; }
.alt-slideshow .modal-content { border: 1px solid var(--alt-line); border-radius: 22px; box-shadow: 0 24px 80px rgba(22,33,58,0.2); }
.alt-slideshow .modal-header, .alt-slideshow .modal-footer { padding: 20px 24px; }
.alt-slideshow .modal-body { padding: 24px; }
.alt-slideshow .modal-title { font-weight: 800; letter-spacing: -0.025em; }
.alt-slideshow .modal-backdrop { background-color: #16213a; }
.alt-slideshow .modal-backdrop.show { opacity: 0.6; }
.alt-slideshow .form-control { border-radius: 12px; padding: 12px; }
.slideshow-tour {
    position: fixed;
    margin: 0;
    width: min(390px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid var(--alt-line);
    border-radius: 22px;
    color: var(--alt-ink);
    background: #fff;
    font-family: var(--alt-font);
    box-shadow: 0 24px 80px rgba(22,33,58,0.25);
}
.slideshow-tour::backdrop { background: rgba(22,33,58,0.55); }
.slideshow-tour h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.025em; }
#tourDescription { font-size: 0.9rem; line-height: 1.6; color: var(--alt-muted); }
#tourHighlight {
    position: fixed;
    pointer-events: none;
    border: 3px solid #ff9633;
    border-radius: 14px;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.85);
}
.tour-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.tour-actions #tourSkip { margin-right: auto; }
.tour-storage-notice { font-size: 0.75rem; color: #a21c28; }
.alt-focus .alt-topbar, .alt-focus .alt-preview-badge, .alt-focus .alt-bottomline { display: none; }
.alt-focus .alt-workspace { max-width: none; padding: 12px 20px; }
.alt-focus #slideshowContainer { height: max(320px, calc(100dvh - 170px)); }
body.alt-slide-only { background: white !important; overflow: hidden; }
.alt-slide-only > .alt-topbar,
.alt-slide-only > .alt-workspace,
.alt-slide-only > .modal,
.alt-slide-only > .slideshow-tour,
.alt-slide-only #flag-toggle-btn { display: none !important; }
.alt-slide-only > .reveal { width: 100%; height: 100%; border-radius: 0; }
.alt-slide-only .reveal .progress { display: none; }
.print-pdf body.alt-slide-only { overflow: visible; }
.print-pdf .alt-slide-only > .reveal { height: auto; }
.print-pdf .alt-slideshow .reveal .slides section { height: 700px; }
.print-pdf .alt-slideshow .reveal section.title-slide { display: flex !important; }
.print-pdf .alt-slideshow #response-indicator-global { display: none !important; }
@media (max-width: 1100px) {
    .alt-review-heading { display: none; }
    .alt-topbar { gap: 12px; padding: 12px 20px; }
    .alt-original { display: none; }
    .alt-workspace { padding: 12px 20px; }
}
@media (max-width: 700px) {
    .alt-topbar { flex-wrap: wrap; justify-content: center; gap: 12px; }
    .alt-brand img { width: 175px; }
    .alt-toolbar { margin: 0; justify-content: center; gap: 6px; }
    .alt-toolbar .alt-button { font-size: 0.7rem; padding: 8px 10px; }
    .alt-toolbar .alt-icon-button { width: 38px; padding: 8px; }
    .alt-workspace { padding: 12px; }
    .alt-stage-tags { gap: 6px; font-size: 0.7rem; }
    .alt-preview-badge { display: none; }
    .alt-stage { border-radius: 18px; }
    #slideshowContainer { height: max(320px, calc(100dvh - 340px)); border-radius: 18px; }
    #teacher-controls.alt-dock { flex-wrap: wrap; gap: 12px; padding: 12px; border-radius: 16px; }
    .alt-navigation { order: -1; width: 100%; justify-content: space-between; }
    .alt-navigation select { min-width: 0; max-width: none; flex: 1; }
    .alt-dock-group { gap: 5px; }
    .alt-dock .alt-icon-button { width: 36px; min-height: 40px; }
    .alt-answer { min-width: 0; padding: 10px; font-size: 0.7rem; }
    .alt-shortcuts { display: none; }
    .alt-focus #slideshowContainer { height: max(320px, calc(100dvh - 230px)); }
}
@media (prefers-reduced-motion: reduce) {
    .alt-slideshow *, .alt-slideshow *::before, .alt-slideshow *::after { transition: none !important; animation: none !important; }
}
@media print {
    body.alt-slideshow { background: white !important; }
    .alt-topbar, .alt-stage-heading, .alt-dock, .alt-bottomline, .alt-action-status, .slideshow-tour, #altLoadStatus { display: none !important; }
    .alt-workspace { padding: 0; max-width: none; }
    .alt-stage { border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
    #slideshowContainer { height: auto; border-radius: 0; }
    .alt-slideshow #flag-toggle-btn { display: none !important; }
    .alt-slideshow .reveal .title-slide { display: flex !important; }
}
