.slideshows-page { max-width: 1440px; }
.slideshows-page .page-heading { align-items: center; justify-content: space-between; }
.deck-layout {
  --deck-sidebar-width: minmax(260px, .83fr);
  --deck-preview-width: minmax(0, 1.65fr);
  display: grid; grid-template-columns: var(--deck-sidebar-width) var(--deck-preview-width);
  gap: clamp(14px, 1.7vw, 26px); align-items: start;
}
.deck-layout:has(> .deck-input[hidden]) { grid-template-columns: minmax(0, 960px); }
.deck-layout:has(> .deck-editor:not([hidden])) { grid-template-columns: var(--deck-preview-width) var(--deck-sidebar-width); }
.slideshows-page .surface { min-width: 0; margin: 0; border-radius: 16px; padding: clamp(17px, 1.6vw, 25px); }
.slideshows-page .surface h2 { font-size: 1.2rem; font-weight: 650; line-height: 1.3; letter-spacing: -.025em; margin: 0; }
.deck-fields { display: grid; min-width: 0; border: 0; padding: 0; margin: 0; }
.deck-fields label { display: block; margin: 18px 0 7px; font-size: 13px; font-weight: 600; }
.deck-fields .field-hint, .deck-fields .form-note, .deck-fields .create-actions span, .editor-actions span, .download-actions span { color: var(--muted); font-size: 12px; font-weight: normal; }
.deck-fields :is(input, textarea, select) { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--background); color: var(--ink); font: inherit; }
.deck-fields select { width: 90px; min-height: 40px; }
.deck-fields textarea { resize: vertical; min-height: 8em; }
.deck-fields :is(input, textarea)::placeholder { color: var(--muted); opacity: .86; }
.example-brief { width: 100%; border: 0; border-radius: 7px; display: flex; align-items: center; gap: 10px; padding: 9px; margin-top: 7px; color: var(--muted); background: transparent; text-align: left; font-size: 11px; line-height: 1.45; }
.example-brief strong { display: block; font-size: 13px; color: var(--ink); font-weight: 560; }
.example-brief:hover { background: var(--purple-light); }
.example-brief .example-arrow { margin-left: auto; font-size: 17px; }
.create-actions, .editor-actions, .download-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 21px; }
.deck-fields .form-note { margin: 10px 0 0; line-height: 1.5; }
.editor-separator { margin-top: 18px; border-top: 1px solid var(--line); }
.knowledge-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.knowledge-pair + .knowledge-pair { margin-top: 16px; border-top: 1px solid var(--line); }
.deck-fields .knowledge-pair textarea { min-height: 0; }
.deck-panel-head, .deck-preview-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.deck-panel-head h2 { overflow-wrap: anywhere; }
.deck-small { font-size: 12px; min-height: 32px; padding: 5px 9px; white-space: nowrap; }
.slide-stage { width: 100%; container-type: inline-size; }
.lesson-slide {
  --slide-ink: #202b24; --slide-body: #405348; --slide-rule: #48633b;
  width: 100%; aspect-ratio: 16 / 9; display: grid; grid-template-rows: minmax(0, 1fr) auto;
  padding: 4% 6% 3.5%; border-radius: 7px; overflow: hidden;
  background: #f6f4eb; color: var(--slide-ink); box-shadow: inset 0 0 0 1px #10180e12;
  font-family: Arial, sans-serif; text-align: left;
}
.lesson-slide.cover { --slide-ink: #f6f4eb; --slide-body: #f6f4eb; --slide-rule: #d8ef7c; background: #202b24; }
.slide-main { display: grid; min-height: 0; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.lesson-slide.illustrated .slide-main { grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: 4%; }
.slide-content { display: flex; flex-direction: column; justify-content: safe center; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.slide-content > * { flex: none; }
.slide-art { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lesson-slide .slide-headline { margin: 0; font: normal 5.1cqw/1.1 Georgia, serif; letter-spacing: -.025em; overflow-wrap: anywhere; color: var(--slide-ink); }
.lesson-slide .slide-copy { margin: 1.8cqw 0 0; font: 2.8cqw/1.34 Arial, sans-serif; white-space: pre-line; color: var(--slide-body); overflow-wrap: anywhere; }
.lesson-slide.dense .slide-headline { font-size: 4.45cqw; }
.lesson-slide.dense .slide-copy { font-size: 2.35cqw; }
.lesson-slide.illustrated .slide-headline { font-size: 4.4cqw; }
.lesson-slide.illustrated .slide-copy { font-size: 2.4cqw; }
.lesson-slide.illustrated.dense .slide-headline { font-size: 3.6cqw; }
.lesson-slide.illustrated.dense .slide-copy { font-size: 2.05cqw; }
.slide-footer { display: flex; justify-content: space-between; align-items: baseline; gap: 3%; margin-top: 2%; padding-top: 1.1%; border-top: max(1px, .17cqw) solid var(--slide-rule); color: var(--slide-body); font: 1.45cqw/1.3 Arial, sans-serif; }
.slide-footer span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.slide-footer span:last-child { flex: none; font-variant-numeric: tabular-nums; }
.deck-preview-controls { flex-wrap: wrap; margin: 15px 0 8px; }
.deck-preview-controls h3 { margin: 0; font-size: 13px; font-weight: 620; }
.slide-controls, .step-controls, .presentation-controls { display: flex; align-items: center; gap: 9px; }
.step-controls { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.step-controls button { width: 30px; height: 29px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); font: 23px/1 Arial, sans-serif; }
.slide-strip { display: flex; overflow-x: auto; align-items: start; gap: 7px; margin: 0 -2px; padding: 2px 2px 5px; list-style: none; scrollbar-width: thin; }
.slide-strip li { flex: 0 0 clamp(70px, 18.5%, 148px); min-width: 0; }
.slide-strip button { width: 100%; display: grid; gap: 5px; text-align: left; background: transparent; border: 0; padding: 0; color: var(--muted); }
.slide-strip .thumb { display: flex; align-items: center; aspect-ratio: 16/9; padding: 8%; border-radius: 5px; background: #f6f4eb; color: #202b24; border: 2px solid transparent; overflow: hidden; font: 500 10px/1.18 Georgia, serif; }
.slide-strip .thumb > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.slide-strip .thumb:has(img) { justify-content: space-between; gap: 5px; }
.slide-strip .thumb img { width: 42%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.slide-strip li:first-child .thumb { background: #202b24; color: #f6f4eb; }
.slide-strip button[aria-current="true"] .thumb { border-color: var(--purple); box-shadow: inset 0 0 0 1px #253220; }
.slide-strip .thumb-number { font-size: 11px; padding-left: 2px; }
.slide-strip button[aria-current="true"] .thumb-number { color: var(--ink); font-weight: 650; }
.download-actions { margin-top: 13px; padding-top: 15px; border-top: 1px solid var(--line); }
.download-actions .button { min-height: 42px; }
.slideshows-page .lesson-tools { margin-top: 20px; }
.student-share { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--background); }
.lesson-tools h3 { font-size: 14px; letter-spacing: normal; margin: 0; }
.student-share p { margin: 7px 0 0; color: var(--muted); font-size: .89rem; line-height: 1.5; }
.lesson-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 13px; }
.lesson-actions .deck-text-action { margin: 0 0 0 4px; }
.lesson-source { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 13px; }
.lesson-source > summary, #unit-details > summary { cursor: pointer; font-size: 14px; font-weight: 650; }
.lesson-source > .button { margin: 10px 0; }
.lesson-source > h3 { margin-top: 14px; }
.source-notes { color: var(--muted); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; }
#source-review-results ul { display: grid; gap: 10px; list-style: none; margin: 12px 0; padding: 0; }
#source-review-results li { border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-wrap: anywhere; }
#source-review-results p { margin: 5px 0; font-size: 13px; }
#source-review-results .source-status { font-size: 12px; font-weight: 650; color: var(--muted); }
#source-review-results blockquote { border-inline-start: 2px solid var(--line); padding-inline-start: 10px; margin: 7px 0 0; font-size: 13px; }
#unit-details > summary h2 { display: inline; margin-left: 3px; }
#unit-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
#unit-list li { display: flex; align-items: center; gap: 10px; }
#unit-list .button { white-space: normal; text-align: left; overflow-wrap: anywhere; }
#unit-list small { color: var(--muted); }
#unit-form { max-width: 650px; margin-top: 12px; border-top: 1px solid var(--line); }
.unit-picker-row { display: flex; flex-wrap: wrap; gap: 8px; }
.unit-picker-row #unit-picker { width: auto; flex: 1 1 220px; min-width: 0; }
#unit-order { display: grid; margin: 0; padding-inline-start: 24px; }
#unit-order:not(:empty) { margin-top: 12px; }
#unit-order li { padding: 5px 0 5px 2px; color: var(--ink); overflow-wrap: anywhere; }
.unit-order-actions { display: inline-flex; gap: 5px; margin: 3px 0 0 9px; }
.unit-order-actions button { width: 30px; height: 29px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); }
.deck-fields .unit-share { display: flex; align-items: center; gap: 7px; }
.deck-fields .unit-share input { width: auto; }
.slideshows-page .saved-decks { margin-top: 20px; }
.saved-decks .deck-panel-head { margin-bottom: 9px; }
#library-state { color: var(--muted); font-size: 13px; }
#deck-list { display: grid; gap: 5px; list-style: none; padding: 0; margin: 0; }
#deck-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 6px; color: var(--ink); font-weight: 560; }
#deck-list a[aria-current], #deck-list a:hover { background: var(--purple-light); }
#deck-list strong { font-weight: inherit; overflow-wrap: anywhere; }
#deck-list small { color: var(--muted); font-weight: 400; white-space: nowrap; }
.deck-text-action { padding: 4px 0; margin-top: 12px; border: 0; color: var(--muted); background: transparent; text-decoration: underline; text-underline-offset: 3px; font-size: 12px; }
#presentation { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; padding: 0; margin: 0; color: #fff; background: #0d100e; border: 0; }
#presentation::backdrop, .deck-confirm::backdrop { background: #000b; }
.presentation-inner { display: grid; justify-items: center; align-content: center; gap: 12px; width: 100%; height: 100%; padding: 10px; }
#presentation-stage { width: min(100%, calc((100dvh - 76px) * 16 / 9)); }
#presentation .lesson-slide { border-radius: 0; }
.presentation-controls { justify-content: center; color: #d5dcd3; font-size: 13px; }
.presentation-controls button { display: grid; place-items: center; color: #f6f4eb; height: 32px; min-width: 32px; border: 1px solid #515853; border-radius: 6px; background: #1c231f; font: 20px/1 Arial, sans-serif; }
.presentation-controls #end-presentation { font-size: 12px; margin-left: 5px; padding: 0 10px; }
.deck-confirm { max-width: min(420px, calc(100% - 32px)); padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.deck-confirm h2 { font-size: 20px; }
.deck-confirm p { margin: 10px 0 18px; color: var(--muted); overflow-wrap: anywhere; }
.deck-confirm form { display: flex; justify-content: end; gap: 8px; }
.slides-notice { margin: 0 0 16px; color: var(--purple); font-size: .9rem; }
.slides-notice[data-error="true"] { color: #952f40; }
@media (max-width: 1080px) and (min-width: 761px) {
  .deck-layout {
    --deck-sidebar-width: minmax(225px, .85fr);
    --deck-preview-width: minmax(0, 1.4fr);
    gap: 12px;
  }
}
@media (max-width: 920px) {
  .deck-layout, .deck-layout:has(> .deck-editor:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .slideshows-page :is(#lesson-brief, #preview-heading, #slide-title, #deck-notice, #knowledge-editor textarea) { scroll-margin-top: 65px; }
}
@media (max-width: 460px) {
  .slideshows-page .page-heading { align-items: start; flex-wrap: wrap; gap: 12px; }
  #deck-list a { align-items: start; flex-direction: column; gap: 2px; }
  .slide-strip li { flex-basis: 75px; }
}
.unit-plan-fields, .lesson-video-tools { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.unit-plan-fields summary, .lesson-video-tools summary { cursor: pointer; font-weight: 650; }
.deck-fields .unit-plan-fields textarea { min-height: 3em; }
.lesson-video-tools label { display: block; margin: 10px 0 4px; font-weight: 600; }
