:root { color-scheme: light; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #192e51; background: #edf1eb; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
button, select, input, textarea { font: inherit; }
button, select, .toolbar a { min-height: 48px; border: 1px solid #c6d0ce; border-radius: 10px; background: white; color: #192e51; padding: 10px 16px; }
button, select { cursor: pointer; }
button:hover, .toolbar a:hover { background: #e4eee8; }
button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 4px solid #bb790f; outline-offset: 3px; }
.toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; flex-wrap: wrap; }
.toolbar a { text-decoration: none; display: inline-flex; align-items: center; }
.picker { margin-right: auto; }
:is(#slide, .slide-transition) { flex: 1; width: calc(100% - 48px); max-width: 1600px; margin: 8px auto; padding: clamp(24px, 4vw, 64px); background: #fffdf5; border-radius: 24px; box-shadow: 0 10px 35px #192e5110; border-top: 8px solid #467462; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: 16px; font-weight: 750; color: #467462; margin: 0 0 16px; }
h1 { font-size: clamp(36px, 4.5vw, 76px); line-height: 1.1; margin: 0 0 28px; letter-spacing: -.035em; }
.lead { font-size: clamp(24px, 2.6vw, 44px); line-height: 1.4; }
.welcome h1 { max-width: 1000px; font-size: clamp(48px, 6.5vw, 100px); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { border-radius: 16px; padding: 24px; background: #edf2e9; font-size: clamp(22px, 2.1vw, 36px); line-height: 1.4; overflow-wrap: anywhere; }
.card strong { display: block; color: #365e4e; margin-bottom: 8px; }
.prompt { border-left: 5px solid #d5ad59; padding: 12px 24px; margin: 28px 0 0; font-size: clamp(22px, 2.3vw, 38px); }
table { width: 100%; border-collapse: collapse; font-size: clamp(20px, 2.1vw, 36px); }
th, td { text-align: left; padding: 16px; border-bottom: 2px solid #dfe6da; overflow-wrap: anywhere; }
th { color: #365e4e; }
footer { display: flex; justify-content: center; align-items: center; gap: 28px; padding: 16px; }
footer button { font-size: 22px; min-width: 160px; }
#setup { margin: 12px 24px; padding: 24px; background: white; border: 2px solid #467462; border-radius: 16px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
form label { display: flex; flex-direction: column; gap: 6px; }
input, textarea { padding: 12px; border: 1px solid #a0b3aa; border-radius: 6px; width: 100%; }
.room-row { display: grid; grid-template-columns: 130px 1fr 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.room-row label:first-child { flex-direction: row; align-items: center; }
.room-row { grid-template-columns: 130px repeat(3, minmax(0, 1fr)); }
#room-fields { overflow-x: auto; }
#setup .room-editor-table { min-width: 650px; table-layout: fixed; font-size: 15px; }
#setup .room-editor-table th, #setup .room-editor-table td { padding: 8px 6px; border: 0; vertical-align: middle; }
.room-editor-table th:first-child { width: 130px; }
.room-editor-table th label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.room-editor-table select { width: 100%; padding: 8px; }
input[type=checkbox] { width: 24px; height: 24px; }
textarea { margin-bottom: 16px; }
[hidden] { display: none !important; }
@media(max-width: 700px) { .toolbar { padding: 12px; } :is(#slide, .slide-transition) { width: calc(100% - 24px); } .cards { grid-template-columns: 1fr; } .room-row { grid-template-columns: 1fr; } footer { gap: 12px; } footer button { min-width: 0; } th, td { padding: 10px 4px; } .picker { width: 100%; order: 1; } }

/* Vivid illustrated menu and slide layouts. Artwork stays at full colour. */
:root { background: #0b1930; }
body { background: radial-gradient(ellipse at top right, #214b59, transparent 65%), #0b1930; }
.toolbar { color: #fff7df; }
.toolbar button, .toolbar a, .toolbar select, footer button { background: #142b48; color: #fff7df; border-color: #4b6376; font-weight: 650; }
.toolbar button:hover, .toolbar a:hover, footer button:hover { background: #294a66; }
#setup-toggle { margin-left: auto; }
#slide-menu { width: calc(100% - 64px); max-width: 1380px; margin: 20px auto 48px; color: #fff7df; }
#slide-menu h1 { margin-bottom: 12px; }
#slide-menu .eyebrow { color: #e9bc65; }
.menu-intro { font-size: 22px; color: #d6e4e8; margin: 0 0 28px; }
#slide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.slide-choice { display: block; overflow: hidden; border-radius: 17px; border: 2px solid #8b784e; background: #fff2d5; color: #172c47; text-decoration: none; box-shadow: 0 8px 24px #0005; transition: transform .15s; }
.slide-choice:hover { transform: translateY(-4px); border-color: #ffd88b; }
.tile-art, .slide-art { background-image: url('img/class-atlas.png'); background-size: 300% 300%; background-position: var(--art-x) var(--art-y); background-repeat: no-repeat; }
.tile-art { display: block; aspect-ratio: 1; }
.tile-title { display: flex; align-items: center; gap: 12px; padding: 16px; font-size: clamp(18px, 1.65vw, 26px); font-weight: 800; }
.tile-title small { color: #85622d; font-size: 14px; }
.tile-title > span { margin-left: auto; }
:is(#slide, .slide-transition) { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.4fr); align-items: start; padding: 0; overflow: hidden; border: 2px solid #b89954; background: #fff4d9; box-shadow: 0 16px 40px #0005; }
.slide-art { aspect-ratio: 1; width: 100%; border-radius: 0 0 22px 0; }
.slide-content { padding: clamp(24px, 3vw, 46px); min-width: 0; }
:is(#slide, .slide-transition) h1 { font-size: clamp(32px, 3.5vw, 60px); }

.welcome .slide-art { border-radius: 0; }
.welcome .lead { font-size: clamp(24px, 2.5vw, 42px); }
.cards { gap: 14px; }
.card { border: 1px solid #bcceb5; border-top: 5px solid #39756b; background: #dce8d0; padding: 18px; font-size: clamp(20px, 1.7vw, 30px); }
.card:nth-child(4n+2) { background: #f3d79b; border-color: #d5b265; }
.card:nth-child(4n+3) { background: #d3e5ee; border-color: #8db3c5; }
.card:nth-child(4n+4) { background: #efcbb5; border-color: #d3a284; }
.card strong { color: #183f43; }
.prompt { background: #183e4a; color: #fff5db; border-radius: 0 12px 12px 0; font-size: clamp(21px, 1.9vw, 32px); }
.eyebrow { color: #32605a; }
#progress { color: #fff7df; }
:is(#slide, .slide-transition) table { font-size: clamp(19px, 1.8vw, 31px); }
:is(#slide, .slide-transition) th, :is(#slide, .slide-transition) td { border-color: #c9c8ab; }
:is(#slide, .slide-transition) tbody tr:nth-child(odd) { background: #e6e6c9; }
:is(#slide, .slide-transition)[data-slide="times"] .card { min-height: 150px; font-size: clamp(26px, 2.5vw, 44px); }
:is(#slide, .slide-transition)[data-slide="times"] .card strong { font-size: clamp(18px, 1.5vw, 25px); }
:is(#slide, .slide-transition)[data-slide="themes"] .card strong { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #183e4a; color: #fff5db; margin-right: 10px; }

@media(max-width: 900px) { #slide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } :is(#slide, .slide-transition), :is(#slide, .slide-transition).welcome { grid-template-columns: 1fr !important; } .slide-art { width: min(100%, 500px); margin: auto; border-radius: 0; } }
@media(max-width: 550px) { #slide-menu { width: calc(100% - 24px); } #slide-grid { gap: 12px; } .tile-title { font-size: 17px; padding: 12px; } .tile-title small, .tile-title > span { display: none; } }
@media(prefers-reduced-motion: reduce) { .slide-choice { transition: none; } }

/* Welcome is a viewport-sized poster, independent of the slide card layout. */
#welcome-controls { display: none; }
body.welcome-screen { overflow: hidden; }
:is(#slide, .slide-transition).welcome {
  position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh;
  max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none;
  display: block; padding: 0;
  background: url('../site/bck.jpg') center / cover no-repeat !important;
}
.welcome-copy {
  position: absolute; left: 50%; top: 40%;
  width: 88%; transform: translate(-50%, -50%); text-align: center;
  text-shadow: 0 .12vmin .3vmin #fff8, 0 .3vmin 1.2vmin #fff5;
}
.welcome-copy p, :is(#slide, .slide-transition) .welcome-copy h1 { margin: 0; max-width: none; line-height: 1.12; }
.welcome-intro { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 5vmin; color: #715133; }
:is(#slide, .slide-transition) .welcome-copy .welcome-amep { font-family: 'Arial Black', Impact, sans-serif; font-size: 15.5vmin; font-weight: 900; letter-spacing: .035em; color: #172d54; line-height: 1.15; text-shadow: 0 .18vmin 0 #f5e9c8, 0 .45vmin .65vmin #172d541a; }
.welcome-english { padding-top: .8vmin; font-family: 'Trebuchet MS', Arial, sans-serif; font-size: 7vmin; font-weight: 700; color: #315e51; letter-spacing: .015em; }
.welcome-copy .welcome-teacher { font-family: 'Segoe Print', 'Comic Sans MS', cursive; font-size: 4.5vmin; color: #874630; margin-top: 2.5vmin; overflow-wrap: anywhere; }
.welcome-copy .welcome-date { font-family: 'Palatino Linotype', 'Book Antiqua', serif; font-size: 3.3vmin; font-weight: 600; letter-spacing: .035em; color: #4f526f; margin-top: 2.5vmin; }
.welcome-screen .toolbar, .welcome-screen footer { display: none; }
.welcome-screen #welcome-controls { display: block; position: fixed; z-index: 5; top: 1.5vmin; right: 1.5vmin; min-height: 0; padding: 1vmin 1.5vmin; font-size: 2.5vmin; border: 1px solid #fff7; background: #142b48b8; color: #fff7df; }
.welcome-controls-open .toolbar { display: flex; position: fixed; z-index: 4; inset: 0 0 auto; padding-right: 8vmin; background: #102339ed; max-height: 35dvh; overflow: auto; }
.welcome-controls-open footer { display: flex; position: fixed; z-index: 4; inset: auto 0 0; background: #102339ed; }
.welcome-screen footer:not([hidden]) { display: flex; position: fixed; z-index: 4; inset: auto 0 0; background: #102339ed; }
.welcome-screen #menu-button { position: fixed; z-index: 5; top: 1.5vmin; left: 1.5vmin; background: #142b48; color: #fff7df; border-color: #4b6376; font-weight: 650; }
.welcome-controls-open .toolbar { padding-left: 150px; }
.welcome-screen .toolbar #class-back { display: none; }
.slide-preview #menu-button { display: none !important; }
.welcome-screen #setup { position: fixed; z-index: 6; inset: auto; top: 12vh; left: 50%; transform: translateX(-50%); width: min(900px, calc(100vw - 32px)); height: auto; max-height: 80vh; max-height: 80dvh; overflow: auto; margin: 0; box-shadow: 0 16px 48px #10233940; }
.welcome-screen #setup[data-slide="welcome"] { width: min(480px, calc(100vw - 32px)); }
#setup h2 { margin-top: 0; }
#setup-form > button[type="submit"] { margin-top: 18px; }

/* Small brass flourishes frame the greeting without obscuring the sky. */
.welcome-intro { display: flex; align-items: center; justify-content: center; gap: 2vmin; }
.welcome-intro::before, .welcome-intro::after {
  content: ''; width: 7vmin; height: .15vmin;
  background: linear-gradient(90deg, transparent, #9c7847);
}
.welcome-intro::after { transform: rotate(180deg); }
.welcome-copy .welcome-date { font-size: 3.1vmin; letter-spacing: .055em; }


/* The classroom slides share the welcome poster's open-sky composition. */
:is(#slide, .slide-transition):not(.welcome) {
  position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh;
  max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0;
  display: block; box-shadow: none; overflow: auto;
  background: url('../site/bck.jpg') center / cover no-repeat;
  background-attachment: local;
}
:is(#slide, .slide-transition):not(.welcome) .slide-content {
  width: min(82%, 145vmin); margin: 0 auto;
  padding: max(84px, 12vh) 0 max(85px, 12vh); text-align: center;
  color: #172d54; text-shadow: 0 .12vmin .35vmin #fff9;
}
:is(#slide, .slide-transition):not(.welcome) .eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 2vmin;
  font-family: Georgia, 'Times New Roman', serif; font-style: italic;
  font-size: 3.4vmin; font-weight: 400; text-transform: none;
  letter-spacing: 0; color: #715133; margin: 0 0 1.5vmin;
}
:is(#slide, .slide-transition):not(.welcome) .eyebrow::before, :is(#slide, .slide-transition):not(.welcome) .eyebrow::after {
  content: ''; width: 7vmin; height: .15vmin;
  background: linear-gradient(90deg, transparent, #9c7847);
}
:is(#slide, .slide-transition):not(.welcome) .eyebrow::after { transform: rotate(180deg); }
:is(#slide, .slide-transition):not(.welcome) h1 {
  font-family: 'Arial Black', 'Trebuchet MS', sans-serif;
  font-size: 6.3vmin; line-height: 1.12; letter-spacing: -.025em;
  color: #172d54; margin: 0 0 3vmin;
  text-shadow: 0 .16vmin 0 #f5e9c8, 0 .3vmin .5vmin #172d541a;
}
:is(#slide, .slide-transition):not(.welcome) .cards { gap: 2.2vmin 5vmin; }
:is(#slide, .slide-transition):not(.welcome) .card {
  background: transparent; border: 0; border-top: .12vmin solid #9c784760;
  border-radius: 0; padding: 1.8vmin .8vmin; min-height: 0;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-size: 2.9vmin; line-height: 1.35; color: #283e4a;
}
:is(#slide, .slide-transition):not(.welcome) .card strong {
  display: block; font-family: 'Trebuchet MS', Arial, sans-serif;
  font-size: 3.8vmin; font-weight: 700; color: #315e51; margin-bottom: .7vmin;
}
:is(#slide, .slide-transition):not(.welcome) .card:nth-child(even) strong { color: #874630; }
:is(#slide, .slide-transition):not(.welcome) .prompt {
  width: fit-content; max-width: 100%; margin: 2.4vmin auto 0;
  padding: 1vmin 2vmin; border: 0; border-radius: 0; background: transparent;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive;
  font-size: 3vmin; line-height: 1.4; color: #874630;
}
:is(#slide, .slide-transition):not(.welcome) .lead { font-size: 3.8vmin; }
:is(#slide, .slide-transition):not(.welcome) .slide-content > p:not([class]) {
  font-family: Georgia, serif; color: #4f526f; font-size: 2.3vmin;
}
:is(#slide, .slide-transition)[data-slide="locations"] table {
  font-family: 'Trebuchet MS', Arial, sans-serif; font-size: 3.4vmin;
  background: #fff5db66; border-radius: 1vmin; overflow: hidden;
}
:is(#slide, .slide-transition)[data-slide="locations"] th, :is(#slide, .slide-transition)[data-slide="locations"] td {
  text-align: center; padding: 1.7vmin 1vmin; border-color: #9c784750;
}
:is(#slide, .slide-transition)[data-slide="locations"] thead th { color: #715133; font-size: 2.8vmin; }
:is(#slide, .slide-transition)[data-slide="locations"] tbody th { color: #315e51; }
:is(#slide, .slide-transition)[data-slide="locations"] tbody tr:nth-child(odd) { background: #fff5db33; }
.locations-layout.has-map { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: 3vmin; }
:is(#slide, .slide-transition)[data-slide="locations"]:has(.has-map) .slide-content { width: 94%; max-width: 1700px; }
:is(#slide, .slide-transition)[data-slide="locations"] .has-map table { font-size: 2.8vmin; }
.location-map { margin: 0; padding: 1vmin; background: #fffdf2; border-radius: 1vmin; }
.location-map img { display: block; width: 100%; max-height: 62vh; object-fit: contain; }
#location-map-preview { display: block; max-width: 100%; max-height: 220px; margin: 12px 0; object-fit: contain; }
@media(max-width: 700px) { .locations-layout.has-map { grid-template-columns: 1fr; } .location-map img { max-height: 45vh; } }
:is(#slide, .slide-transition)[data-slide="times"] .card { font-family: 'Palatino Linotype', Georgia, serif; font-size: 5.7vmin; font-weight: 700; color: #4f526f; }
:is(#slide, .slide-transition)[data-slide="times"] .card strong { font-size: 3.3vmin; }
:is(#slide, .slide-transition)[data-slide="themes"] .card { display: flex; gap: 1.5vmin; align-items: center; text-align: left; font-size: 3.3vmin; }
:is(#slide, .slide-transition)[data-slide="themes"] .card strong {
  display: grid; flex: 0 0 4.5vmin; width: 4.5vmin; height: 4.5vmin;
  margin: 0; font-family: Georgia, serif; font-size: 3vmin;
  color: #715133; background: transparent; border: .15vmin solid #9c784780;
}
@media (orientation: portrait) {
  :is(#slide, .slide-transition):not(.welcome) .slide-content { width: 88%; }
  :is(#slide, .slide-transition):not(.welcome) .cards { grid-template-columns: 1fr; gap: 1.5vmin; }
  :is(#slide, .slide-transition):not(.welcome) .card { font-size: 3.6vmin; }
  :is(#slide, .slide-transition):not(.welcome) .card strong { font-size: 4.3vmin; }
  :is(#slide, .slide-transition):not(.welcome) .prompt { font-size: 3.7vmin; }
}


.welcome-copy .welcome-class-code { font-family: "Trebuchet MS", Arial, sans-serif; font-size: 3vmin; font-weight: 600; letter-spacing: .08em; color: #715133; margin-top: 1.5vmin; overflow-wrap: anywhere; }
#setup[data-slide="welcome"] .fields { grid-template-columns: 1fr; }

:is(#slide, .slide-transition)[data-slide="times"] .slide-content { width: 90%; }
.time-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3vmin; }
.time-stop { min-width: 0; text-align: center; }
.time-emoji { font-size: 6vmin; line-height: 1.2; margin-bottom: 1.5vmin; }
.time-stop h2 { font-family: 'Trebuchet MS', Arial, sans-serif; font-size: 3.7vmin; line-height: 1.2; color: #315e51; margin: 0; min-height: 2.5em; display: grid; place-items: center; }
.time-stop:nth-child(even) h2 { color: #874630; }
.time-stop .digital-time { font-family: 'Palatino Linotype', Georgia, serif; font-size: 5.7vmin; font-weight: 700; color: #4f526f; margin: 1vmin 0 2vmin; }
.analogue-clock { display: block; width: min(100%, 22vmin); height: auto; margin: auto; filter: drop-shadow(0 .4vmin .5vmin #172d5420); }
.clock-face { fill: #fff9e9; stroke: #a4844e; stroke-width: 3; }
.clock-ticks { stroke: #715133; }
.clock-numbers { font-family: 'Trebuchet MS', Arial, sans-serif; font-size: 18px; font-weight: 700; fill: #172d54; text-anchor: middle; dominant-baseline: central; }
.hour-hand { stroke: #172d54; stroke-width: 7; stroke-linecap: round; }
.minute-hand { stroke: #315e51; stroke-width: 4; stroke-linecap: round; }
.clock-unset { width: min(100%, 22vmin); aspect-ratio: 1; margin: auto; border: .2vmin dashed #a4844e; border-radius: 50%; display: grid; place-content: center; font: 2.4vmin/1.4 'Trebuchet MS', Arial, sans-serif; color: #715133; }

.time-illustration { display: block; width: 13vmin; height: 13vmin; margin: 0 auto 1vmin; background: url("img/time-illustrations.png") var(--image-x) var(--image-y) / 200% 200% no-repeat; }

/* A classroom agreement: one readable point per line on its own board. */
:is(#slide, .slide-transition)[data-slide="expectations"] {
  background: #153e35 url('img/blackboard.jpg') center / cover no-repeat;
}
:is(#slide, .slide-transition)[data-slide="expectations"] .slide-content {
  width: min(76%, 132vmin); padding-top: max(80px, 10vh); padding-bottom: 9vh;
  text-shadow: 0 .15vmin .25vmin #06271d;
}
:is(#slide, .slide-transition)[data-slide="expectations"] .eyebrow { color: #eac88d; font-size: 2.8vmin; margin-bottom: 1vmin; }
:is(#slide, .slide-transition)[data-slide="expectations"] .eyebrow::before, :is(#slide, .slide-transition)[data-slide="expectations"] .eyebrow::after { background: linear-gradient(90deg, transparent, #eac88d); }
:is(#slide, .slide-transition)[data-slide="expectations"] h1 { color: #fff7df; font-size: 6vmin; text-shadow: 0 .2vmin .3vmin #06271d; margin-bottom: 2vmin; }
.expectation-list { list-style: none; padding: 0; margin: 0 auto; text-align: left; }
.expectation-list li { display: grid; grid-template-columns: 7vmin 1fr; gap: 2.4vmin; align-items: center; padding: 1.5vmin 0; border-bottom: .12vmin solid #fff7df30; }
.expectation-list li:last-child { border-bottom: 0; }
.expectation-icon { font-size: 5vmin; text-align: center; text-shadow: none; }
.expectation-list h2 { font: 700 3.7vmin/1.2 'Trebuchet MS', Arial, sans-serif; color: #f3d99d; margin: 0 0 .6vmin; }
.expectation-list p { font: 3vmin/1.3 'Trebuchet MS', Arial, sans-serif; color: #fff9e9; margin: 0; }
:is(#slide, .slide-transition)[data-slide="expectations"] .prompt { color: #e9dab8; font-size: 2.8vmin; margin-top: 1.6vmin; }
@media (orientation: portrait) {
  :is(#slide, .slide-transition)[data-slide="expectations"] .slide-content { width: 84%; }
  .expectation-list h2 { font-size: 4.6vmin; }
  .expectation-list p { font-size: 4vmin; }
  .expectation-list li { padding: 2.5vmin 0; }
}

.rule-editor { display: grid; grid-template-columns: 110px 1fr; gap: 12px; border: 1px solid #c6d0ce; border-radius: 10px; margin: 16px 0; padding: 16px; }
.rule-editor legend { font-weight: 700; padding: 0 8px; }
.rule-editor label:last-child { grid-column: 1 / -1; }
@media(max-width: 500px) { .rule-editor { grid-template-columns: 1fr; } }

:is(#slide, .slide-transition)[data-slide="topics"] { background: #153e35 url('img/blackboard.jpg') center / cover no-repeat; }
:is(#slide, .slide-transition)[data-slide="locations"], :is(#slide, .slide-transition)[data-slide="times"] { background: #153e35 url('img/blackboard.jpg') center / cover no-repeat; }
:is(#slide, .slide-transition)[data-slide="locations"] h1, :is(#slide, .slide-transition)[data-slide="times"] h1 { color: #fff7df; text-shadow: 0 .2vmin .3vmin #06271d; }
:is(#slide, .slide-transition)[data-slide="locations"] .eyebrow, :is(#slide, .slide-transition)[data-slide="times"] .eyebrow { color: #eac88d; text-shadow: 0 .15vmin .25vmin #06271d; }
:is(#slide, .slide-transition)[data-slide="locations"] .eyebrow::before, :is(#slide, .slide-transition)[data-slide="locations"] .eyebrow::after,
:is(#slide, .slide-transition)[data-slide="times"] .eyebrow::before, :is(#slide, .slide-transition)[data-slide="times"] .eyebrow::after { background: linear-gradient(90deg, transparent, #eac88d); }
:is(#slide, .slide-transition)[data-slide="locations"] table { background: #fff5dbe8; text-shadow: none; }
:is(#slide, .slide-transition)[data-slide="locations"] .locations-layout { min-height: 62vh; }
:is(#slide, .slide-transition)[data-slide="locations"] .locations-layout table { height: 62vh; background: #ece8cc; color: #233e31; }
:is(#slide, .slide-transition)[data-slide="locations"] .locations-layout th, :is(#slide, .slide-transition)[data-slide="locations"] .locations-layout td { border-color: #9a906a; }
:is(#slide, .slide-transition)[data-slide="locations"] .locations-layout thead th { background: #725537; color: #fff5dc; }
:is(#slide, .slide-transition)[data-slide="locations"] .locations-layout tbody th { background: #f1ebd0; color: #233e31; }
:is(#slide, .slide-transition)[data-slide="locations"] .locations-layout tbody tr:nth-child(even) th { background: #bccdae; }
:is(#slide, .slide-transition)[data-slide="locations"] .locations-layout tbody td { background: #f1ebd0; }
:is(#slide, .slide-transition)[data-slide="locations"] .locations-layout tbody tr:nth-child(even) td { background: #bccdae; }
:is(#slide, .slide-transition)[data-slide="locations"] .locations-layout.has-map { align-items: stretch; }
:is(#slide, .slide-transition)[data-slide="times"] .time-stop h2 { color: #f3d99d; text-shadow: 0 .15vmin .25vmin #06271d; }
:is(#slide, .slide-transition)[data-slide="times"] .digital-time, :is(#slide, .slide-transition)[data-slide="times"] .clock-unset { color: #fff7df; text-shadow: 0 .15vmin .25vmin #06271d; }
:is(#slide, .slide-transition)[data-slide="times"] .slide-content { width: 72%; max-width: 1400px; padding-top: max(72px, 10vh); padding-bottom: 12vh; }
:is(#slide, .slide-transition)[data-slide="times"] h1 { margin-bottom: 2vmin; }
:is(#slide, .slide-transition)[data-slide="times"] .time-row { gap: 2vmin; }
:is(#slide, .slide-transition)[data-slide="times"] .time-illustration { width: 11vmin; height: 11vmin; margin-bottom: 1vmin; }
:is(#slide, .slide-transition)[data-slide="times"] .time-stop h2 { font-size: 3.2vmin; min-height: 2.5em; }
:is(#slide, .slide-transition)[data-slide="times"] .digital-time { font-size: 4.8vmin; margin: .5vmin 0 1.5vmin; }
:is(#slide, .slide-transition)[data-slide="times"] .analogue-clock { width: min(100%, 19vmin); }
@media(orientation: portrait) { :is(#slide, .slide-transition)[data-slide="times"] .time-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3vmin; } }
:is(#slide, .slide-transition)[data-slide="topics"] .slide-content { width: min(76%, 140vmin); padding-top: max(80px, 10vh); text-shadow: 0 .15vmin .25vmin #06271d; }
:is(#slide, .slide-transition)[data-slide="topics"] .eyebrow { color: #eac88d; font-size: 2.8vmin; }
:is(#slide, .slide-transition)[data-slide="topics"] h1 { color: #fff7df; font-size: 6vmin; text-shadow: 0 .2vmin .3vmin #06271d; }
.weekly-topics { list-style: none; padding: 0; margin: 0; display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--week-rows), auto); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5vmin 5vmin; text-align: left; }
.weekly-topics li { display: grid; grid-template-columns: 12vmin 1fr; gap: 1.5vmin; align-items: baseline; padding: 1.3vmin 0; border-bottom: .12vmin solid #fff7df30; font: 3.1vmin/1.3 'Trebuchet MS', Arial, sans-serif; }
.weekly-topics strong { color: #f3d99d; }
.weekly-topics span { color: #fff9e9; overflow-wrap: anywhere; }
@media(orientation: portrait) { .weekly-topics { grid-auto-flow: row; grid-template-columns: 1fr; grid-template-rows: none; } }

#week-fields { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.week-editor { min-width: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; border: 1px solid #c6d0ce; border-radius: 8px; padding: 12px; margin: 0; }
.week-editor legend { padding: 0 6px; font-weight: 700; }
.topic-emoji { font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; text-shadow: none; }

.week-emoji-field { align-self: end; }
.week-emoji-field input { padding: 8px 4px; text-align: center; font-size: 20px; height: 46px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Topic illustrations stand out from the accompanying text. */
.weekly-topics li { align-items: center; }
.weekly-topics li > span { display: flex; align-items: center; gap: 1.5vmin; min-width: 0; }
.weekly-topics .topic-emoji { flex: 0 0 auto; font-size: 6.5vmin; line-height: 1; }

:is(#slide, .slide-transition).photo-series { background: #0b1930; overflow: hidden; }
.lesson-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-shade { position: absolute; inset: 0; background: linear-gradient(transparent 20%, #07132135 40%, #071321ed 100%); }
.photo-caption { position: absolute; left: 7%; right: 7%; bottom: 18%; max-height: 66%; overflow: auto; text-align: center; color: #fff9e9; }
:is(#slide, .slide-transition).photo-series h1 { font: 700 6vmin/1.25 'Trebuchet MS', Arial, sans-serif; color: #fff9e9; text-shadow: 0 2px 8px #000; margin: 0 0 2vmin; }
.photo-caption a { color: #ffe3a2; font-size: 2.5vmin; }
.photo-controls { position: absolute; bottom: 10%; left: 7%; right: 7%; display: flex; align-items: center; justify-content: center; gap: 16px; color: white; }
.photo-controls a { color: white; background: #071321a0; padding: 8px; font-size: 14px; margin-left: 16px; }
.photo-controls button { font-size: 24px; }
.event-details { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2vmin; background: #071321c9; border-radius: 12px; padding: 2vmin; margin: 2vmin 0; text-shadow: none; }
.event-details dt { font-size: 3vmin; color: #ffe3a2; font-weight: 700; }
.event-details dd { margin: 1vmin 0 0; font-size: 2.8vmin; line-height: 1.35; overflow-wrap: anywhere; }
.photo-error { position: absolute; top: 20%; width: 100%; text-align: center; color: white; }
@media(orientation: portrait) { .event-details { grid-template-columns: 1fr; } .photo-controls { flex-wrap: wrap; } .photo-caption { bottom: 25%; } }
.photo-shade { display: none; }
.photo-caption { padding: 1.5vmin 2.5vmin; background: #07132170; border-radius: 14px; }

.cover-title { position: absolute; left: 50%; top: 43%; transform: translate(-50%, -50%); width: min(84%, 1200px); text-align: center; padding: 3vmin; border-radius: 18px; background: #07132166; }
.cover-title p { font: italic 3.5vmin Georgia, serif; color: #ffe3a2; margin: 0 0 2vmin; }
:is(#slide, .slide-transition).photo-cover h1 { font-size: 9vmin; margin-bottom: 3vmin; }
#photo-start { font-size: 3vmin; padding: 1.3vmin 4vmin; background: #fff4d9; color: #172d54; }
.cover-credit { position: absolute; bottom: 11%; right: 3%; color: white; background: #07132180; padding: 8px; font-size: 14px; }

/* Keep the full group of children in frame. */
:is(#slide, .slide-transition)[data-slide="show"][data-photo="2"] .lesson-photo { object-fit: contain; }

/* Scaled renderings of the actual slides keep menu previews up to date. */
.edit-placeholder { font: inherit; color: inherit; padding: .1em .35em; background: transparent; border: 0; border-bottom: 1px dashed currentColor; border-radius: 3px; cursor: pointer; }
.edit-placeholder:hover { background: #fff9e980; }
.edit-placeholder:focus-visible { outline: 3px solid #b78b31; outline-offset: 3px; }
.slide-thumbnail { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #172d54; }
.slide-thumbnail iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 720px; border: 0; transform-origin: top left; pointer-events: none; }
.slide-preview .toolbar,
.slide-preview #welcome-controls,
.slide-preview footer,
.slide-preview #setup,
.slide-preview .photo-controls,
.slide-preview .cover-credit,
.slide-preview #photo-start { display: none !important; }

/* Attendance uses the same scale for every student, capped at the unit target. */
:is(#slide, .slide-transition)[data-slide="assessment"] { background: #e8e4d4 url('../site/bck.jpg') center / cover no-repeat; background-attachment: fixed; }
:is(#slide, .slide-transition)[data-slide="assessment"] .slide-content { width: 88%; max-width: 1300px; margin: max(80px, 11vh) auto 5vh; padding: 3vmin; background: #fffdf2ed; border: 1px solid #fff8de; border-radius: 22px; box-shadow: 0 12px 45px #172d5433; text-shadow: none; }
:is(#slide, .slide-transition)[data-slide="assessment"] h1 { margin-bottom: 1vmin; }
.assessment-unit { font-size: clamp(18px, 2.7vmin, 30px); margin: 0 0 1.4vmin; font-weight: 700; overflow-wrap: anywhere; }
.assessment-message { font-size: clamp(18px, 3vmin, 34px); margin: 0 0 4vmin; }
.assessment-chart { background: #fffdf8; padding: 3vmin; border: 1px solid #d7dccc; border-radius: 16px; text-align: left; }
.assessment-axis, .assessment-row { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(0, 3fr) minmax(100px, 1.25fr); gap: 2vmin; align-items: center; }
.assessment-axis { font-size: clamp(12px, 2.2vmin, 24px); margin-bottom: 1.5vmin; padding-right: 16px; }
.assessment-axis > div { position: relative; height: 1.5em; border-bottom: 2px solid #677887; }
.assessment-axis > div span { position: absolute; transform: translateX(-50%); }
.assessment-axis > div span:first-child { transform: none; }
.assessment-axis > div span:last-child { transform: translateX(-100%); font-weight: 800; color: #176345; }
.assessment-rows { max-height: 40vh; overflow-y: auto; scrollbar-gutter: stable; }
.assessment-row { min-height: 7vmin; padding: .8vmin 0; font-size: clamp(14px, 2.7vmin, 30px); }
.assessment-row > strong { overflow-wrap: anywhere; }
.assessment-track { height: 3.8vmin; min-height: 18px; background: repeating-linear-gradient(to right, transparent 0, transparent calc(25% - 1px), #a5b6ba66 calc(25% - 1px), #a5b6ba66 25%), #e5eced; border-left: 2px solid #677887; border-right: 2px solid #176345; }
.assessment-bar { height: 100%; background: #2769a5; }
.assessment-ready .assessment-bar { background: #218052; }
.assessment-row small { display: block; font-size: clamp(12px, 2vmin, 22px); }
.assessment-ready small { color: #176345; font-weight: 700; }
.assessment-completed .assessment-bar { background: #d9b342; box-shadow: 0 0 5px #d9b34255; }
.assessment-completed small { color: #805500; font-weight: 700; }
.assessment-axis-label { text-align: center; font-size: clamp(14px, 2.3vmin, 26px); margin: 2vmin 0 0; }
@media (max-width: 700px) {
  .welcome-controls-open :is(#slide, .slide-transition)[data-slide="assessment"] .slide-content { margin-top: 150px; }
}

/* Class setup embedded in the teacher slide picker. */
body.setup-only { overflow: auto; height: auto; min-height: 100vh; }
body.setup-only > :not(#setup) { display: none !important; }
body.setup-only #setup { position: static; transform: none; width: auto; max-height: none; margin: 0; box-sizing: border-box; }

.sequence-actions { display:flex; flex-wrap:wrap; gap:12px; margin:0 0 24px; }
.sequence-actions a { display:inline-block; padding:12px 18px; background:#faf4d8; color:#192e51; border-radius:10px; font-weight:700; text-decoration:none; }
.sequence-actions a:hover { background:#ffe49a; }
.sequence-actions a:focus-visible { outline:3px solid #e8b845; outline-offset:4px; }

/* Single-slide notices preserve the full uploaded poster and its own text. */
:is(#slide, .slide-transition).photo-single {
  top: var(--photo-top, 0px); bottom: var(--photo-bottom, 0px);
  height: auto; display: flex; flex-direction: column;
  background: #fff; overflow: auto;
}
:is(#slide, .slide-transition).photo-single .lesson-photo {
  position: static; min-height: 0; flex: 1 1 0; object-fit: contain;
}
:is(#slide, .slide-transition).photo-single .photo-caption {
  position: static; flex: 0 0 auto; max-height: 45%; overflow: auto;
  border-radius: 0; background: #142b48;
}
:is(#slide, .slide-transition).photo-single .photo-caption h1 { margin: 0; }
:is(#slide, .slide-transition).photo-single .photo-controls {
  position: static; flex: 0 0 auto; padding: 4px; background: #142b48;
}
:is(#slide, .slide-transition).photo-single .photo-controls a { margin: 0; }
:is(#slide, .slide-transition).photo-single .photo-error { color: #192e51; background: white; }
.slide-preview :is(#slide, .slide-transition).photo-single { inset: 0; }

/* Compact previews with independent selection controls. */
#slide-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
#slide-menu > h1 { font-size: clamp(36px, 4vw, 56px); }
.slide-tile { min-width: 0; border: 2px solid transparent; border-radius: 17px; background: #fff2d5; overflow: hidden; }
.slide-tile.selected { border-color: #ffd36f; box-shadow: 0 0 0 2px #ffd36f; }
.slide-tile .slide-choice { border: 0; border-radius: 0; box-shadow: none; }
.slide-tile .slide-choice:hover { transform: none; }
.slide-tile .tile-title { padding: 10px 12px; font-size: 18px; gap: 8px; }
.tile-select { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 12px; color: #192e51; border-top: 1px solid #d9c994; cursor: pointer; }
.tile-select input { margin: 0; accent-color: #192e51; }
.selection-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
#selection-status { flex-basis: 100%; margin: 0; font-size: 16px; color: #fff2d5; }
#sequence-progress { color: #fff7df; }
@media(max-width: 550px) { #slide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .slide-tile .tile-title { font-size: 15px; padding: 8px; } }
@media(max-width: 340px) { #slide-grid { grid-template-columns: 1fr; } }

/* Dim the botanical backdrop while keeping cards and controls at full brightness. */
body:not(.welcome-screen) {
  background: linear-gradient(rgb(0 0 0 / 45%), rgb(0 0 0 / 45%)) center / cover fixed no-repeat,
    #0b1930 url('img/slideshow-background.jpg?v=20260926-bck2') center / cover fixed no-repeat;
}
#slide-menu { color: #fff7df; }
#slide-menu > .eyebrow { color: #e9bc65; }
#slide-menu > h1, #slide-menu > .eyebrow, #slide-menu > .menu-intro {
  text-shadow: 0 2px 8px #071321;
}
#slide-menu .menu-intro { color: #e5e9e7; }
.selection-actions { padding: 14px; border-radius: 12px; background: #101f30e8; border: 1px solid #8b784e; }
#selection-status { color: #fff7df; }
#run-selected { background: #f4dfa6; color: #192e51; border-color: #cfac60; font-weight: 700; }
#run-selected:hover:not(:disabled) { background: #ffe8ae; }
.selection-actions button:disabled { opacity: .65; }
.slide-tile { box-shadow: 0 5px 18px #0005; }
.slide-tile.selected { border-color: #ffd36f; box-shadow: 0 0 0 2px #ffd36f; }

/* Keep the menu header focused on its two main actions. */
.slide-menu-header { text-align: center; margin: 0 auto 24px; }
#slide-menu .slide-menu-header h1 { font-size: clamp(32px, 4vw, 48px); margin: 0 0 18px; text-shadow: 0 2px 8px #071321; }
.slide-menu-header .selection-actions { justify-content: center; padding: 0; margin: 0; border: 0; background: none; }
.slide-menu-header .selection-actions a { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 16px; border: 1px solid #cfac60; border-radius: 10px; background: #fff4d9; color: #192e51; font-weight: 700; text-decoration: none; }
.slide-menu-header .selection-actions a:hover { background: #ffe8ae; }

.tile-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 10px; border-top: 1px solid #d9c994; }
.tile-actions .tile-select { min-width: 0; padding: 0; border: 0; font-size: 14px; gap: 6px; }
.tile-actions .tile-select input { flex-shrink: 0; }
.tile-open { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 44px; padding: 8px 12px; border: 1px solid #b9a66d; border-radius: 8px; background: #192e51; color: #fff7df; font-size: 14px; font-weight: 700; text-decoration: none; }
.tile-open:hover { background: #315e51; }
.tile-edit { margin-left: auto; background: #faf4d8; color: #192e51; }
.tile-edit:hover { background: #ffe8ae; }
.tile-actions:has(.tile-edit) { flex-wrap: wrap; }

.slide-search { display: block; width: min(100%, 440px); margin: 18px auto 0; }
#slide-search { min-height: 48px; border: 1px solid #cfac60; border-radius: 10px; background: #fffaf0; color: #192e51; padding: 12px 16px; }
#slide-search::placeholder { color: #59657a; opacity: 1; }
#search-empty { text-align: center; color: #fff7df; padding: 24px 12px; }

/* Only the back link is needed above the slide picker. */
body:not(.welcome-screen) > .toolbar > :not(#class-back) { display: none; }

/* Category headings span the menu; each category keeps its own responsive cards. */
#slide-grid { display: block; }
.slide-category { margin-bottom: 32px; }
.slide-category h2 { margin: 0 0 16px; font-size: clamp(24px, 2.5vw, 32px); color: #fff7df; }
.slide-category h2:has(select) { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
#private-person { max-width: 100%; min-width: 220px; min-height: 48px; padding: 6px 36px 6px 14px; border: 1px solid #b9a66d; border-radius: 8px; background-color: #192e51; color: #fff7df; font-size: inherit; font-weight: 700; cursor: pointer; }
#private-person:hover { background-color: #294a66; border-color: #e9bc65; }
#private-person option { background: #192e51; color: #fff7df; font-size: 18px; }
#create-private { display: flex; flex-direction: column; overflow: hidden; border: 2px solid #b9a66d; border-radius: 17px; background: #faf4d8; color: #192e51; text-decoration: none; }
.create-slide-art { display: grid; place-items: center; aspect-ratio: 16 / 9; background: #192e51; color: #e9bc65; font-size: 72px; font-weight: 300; }
.create-slide-hint { padding: 12px; border-top: 1px solid #d9c994; font-size: 14px; }
#create-private:hover { border-color: #ffd88b; }
#create-private:hover .create-slide-art { background: #294a66; }
#create-private[aria-disabled="true"] { opacity: .5; cursor: default; }
#slide-ink { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; touch-action: none; }
#drawing-tools { position: fixed; z-index: 5; top: 1.5vmin; right: 1.5vmin; display: flex; gap: 6px; align-items: center; }
#drawing-tools button { min-height: 40px; padding: 8px 12px; background: #142b48e8; color: #fff7df; border-color: #8b784e; font-size: 14px; }
#drawing-options { display: flex; align-items: center; gap: 6px; }
#ink-colour { width: 38px; height: 38px; padding: 3px; cursor: pointer; }
#drawing-tools #welcome-controls { position: static; margin: 0; }
#drawing-options { order: -1; }
:is(#slide, .slide-transition)[data-slide="calendar"] { background:#142b48 url('img/calendar-background.jpg') center / 100% 100% no-repeat; }
:is(#slide, .slide-transition)[data-slide="calendar"] .slide-content { width:72%; max-width:none; padding:12vh 0 0; color:#142b48; text-shadow:none; }
:is(#slide, .slide-transition)[data-slide="calendar"] h1 { color:#142b48; text-shadow:none; font-size:4.6vmin; margin-bottom:1vmin; }
:is(#slide, .slide-transition)[data-slide="calendar"] .eyebrow { display:none; }
.calendar-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:1.5vmin; }
.calendar-heading h2 { font-size:4vmin; margin:0; }
.calendar-heading button { background:#142b48; color:#fff7df; min-width:48px; font-size:24px; padding:0 12px; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.6vmin; }
.calendar-weekday { font-size:2.6vmin; font-weight:700; padding:.7vmin; color:#142b48; }
.calendar-day { min-height:7vmin; padding:.6vmin; background:#fff7df; border-radius:6px; color:#142b48; font-size:3.1vmin; display:flex; flex-direction:column; justify-content:center; }
.calendar-day.empty { background:transparent; }
.calendar-day.holiday { background:#f0ba5b; font-weight:750; }
.calendar-day.class { background:#a9d3ad; color:#173c27; }
.calendar-day.custom,.calendar-legend .custom { background:#bbd4ef; color:#142b48; }
.calendar-day.today { background:#d8c7ed; color:#33224b; font-weight:750; }
.calendar-day { min-height:9vmin; gap:.2vmin; border:1px solid #142b4826; }
.calendar-date { font-size:2.4vmin; line-height:1; }
.calendar-day { position:relative; overflow:hidden; }
.calendar-month-banner { position:absolute; top:0; left:0; right:0; background:#111; color:#fff; font-size:1.8vmin; font-weight:700; line-height:1.3; padding:.3vmin; }
.calendar-day:has(.calendar-month-banner) { padding-top:2.8vmin; }
.calendar-emoji { display:block; font-size:3.5vmin; line-height:1.1; text-align:center; }
.calendar-heading h2 small { display:block; font-size:1.8vmin; font-weight:400; margin-top:.3vmin; }
.calendar-legend { display:flex; justify-content:center; gap:18px; font-size:2.2vmin; margin-bottom:1vmin; }
.calendar-legend span { padding:.5vmin 1.5vmin; border-radius:6px; color:#142b48; }
.calendar-legend .class { background:#a9d3ad; }
.calendar-legend .holiday { background:#f0ba5b; }
.class-calendar.editing .calendar-grid { touch-action:none; user-select:none; }
.class-calendar.editing .calendar-day:not(.empty) { cursor:crosshair; }
.calendar-day.selecting { outline:4px solid #fff; outline-offset:-4px; box-shadow:inset 0 0 0 8px #2875b955; }
.calendar-edit-help { font-size:16px; margin-bottom:8px; }
.calendar-edit-help button,.calendar-holidays button { min-height:32px; padding:4px 10px; font-size:14px; }
.calendar-event-dialog { width:min(540px,calc(100% - 32px)); border:1px solid #b9a66d; border-radius:14px; background:#fff7df; color:#142b48; padding:24px; max-height:90dvh; overflow:auto; }
.calendar-event-dialog::backdrop { background:#07132199; }
.calendar-event-dialog h2 { margin:0 0 16px; }
.calendar-event-dialog label { display:flex; flex-direction:column; gap:6px; margin:12px 0; }
.calendar-event-dates { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.calendar-event-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:18px; }
.calendar-editing #slide-ink { pointer-events:none !important; }
.calendar-day.today { outline:3px solid #68b7dd; outline-offset:-3px; }
.calendar-day small { font-size:1.8vmin; font-weight:600; }
.calendar-holidays p { font-size:2.6vmin; margin:1.2vmin 0 0; }
.calendar-holidays span { display:inline-block; color:#f3d99d; margin-left:1vmin; }
.holiday-editor { display:grid; grid-template-columns:minmax(0,1.2fr) repeat(2,minmax(0,1fr)) auto; gap:12px; align-items:end; margin:16px 0; padding:12px; border:1px solid #a0b3aa; border-radius:8px; }
@media(max-width:700px) { .holiday-editor { grid-template-columns:1fr; } }
:is(#slide, .slide-transition)[data-slide="teams"] { background:#142b48; }
:is(#slide, .slide-transition)[data-slide="teams"] .slide-content { width:82%; max-width:1400px; padding-top:max(80px,10vh); color:#fff7df; text-shadow:none; }
:is(#slide, .slide-transition)[data-slide="teams"] h1 { color:#fff7df; text-shadow:none; margin-bottom:4vmin; }
:is(#slide, .slide-transition)[data-slide="teams"] .eyebrow { color:#eac88d; }
.teams-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:6vmin; align-items:center; text-align:left; }
.teams-purpose { font-size:3.7vmin; margin:0 0 3vmin; }
.teams-instructions ol { padding-left:4vmin; margin:0; font-size:4vmin; }
.teams-instructions li { padding-left:1vmin; margin-bottom:3vmin; }
.teams-instructions li strong { display:block; color:#f3d99d; }
.teams-instructions li span { display:block; font-size:3.3vmin; margin-top:1vmin; }
.teams-absence { font-size:3.3vmin; color:#f3d99d; margin:3vmin 0 0; }
.teams-access { text-align:center; }
.teams-qr { width:min(100%,30vmin); aspect-ratio:1; display:block; margin:auto; border:12px solid white; border-radius:10px; }
.teams-access p { font-size:3vmin; margin:1.5vmin 0; }
.teams-link { display:inline-block; padding:1vmin 2vmin; background:#fff7df; color:#142b48; border-radius:8px; font-size:2.8vmin; font-weight:700; text-decoration:none; }
.teams-online { display:block; color:#fff7df; font-size:2.6vmin; margin-top:2vmin; text-underline-offset:4px; }
@media(orientation:portrait) { .teams-layout { grid-template-columns:1fr; gap:4vmin; } .teams-qr { width:26vmin; } }
#doctor-letter { position:fixed; top:1.5vmin; left:130px; z-index:5; display:inline-flex; align-items:center; min-height:44px; padding:8px 14px; border:1px solid #8b784e; border-radius:8px; background:#142b48; color:#fff7df; font-size:14px; font-weight:650; text-decoration:none; }
.slide-preview #doctor-letter { display:none !important; }
:is(#slide, .slide-transition)[data-slide="attendance"] { padding: clamp(48px, 7vmin, 80px); background: #142b48 url('img/attendance-clipart.jpg') center / contain no-repeat; background-origin: content-box; }
:is(#slide, .slide-transition)[data-slide="attendance"] .slide-content { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
:is(#slide, .slide-transition)[data-slide="attendance"] .eyebrow,
:is(#slide, .slide-transition)[data-slide="attendance"] h1 { display: none; }
.attendance-poster { display: block; width: 100%; height: 100%; max-height: 100dvh; object-fit: contain; }
body:has(footer:not([hidden])) :is(#slide, .slide-transition)[data-slide="attendance"] { bottom: var(--photo-bottom, 80px); height: auto; }
:is(#slide, .slide-transition)[data-slide="coffee"] { background: #18372d url('img/coffee-break.jpg?v=20261009-no-steam') center / cover no-repeat; }
.coffee-steam { position:absolute; pointer-events:none; overflow:hidden; }
.coffee-steam svg { width:100%; height:100%; display:block; }
.steam-wisp { fill:none; stroke:#fff9e2; stroke-width:8; stroke-linecap:round; filter:blur(7px); opacity:0; animation:coffee-steam-rise 6s ease-in-out infinite; transform-box:fill-box; transform-origin:center bottom; }
.steam-wisp-1 { animation-delay:-2s; }
.steam-wisp-2 { animation-delay:-4s; }
@keyframes coffee-steam-rise { 0% { opacity:0; translate:0 18px; scale:.8  .7; } 30% { opacity:.17; } 65% { opacity:.1; } 100% { opacity:0; translate:14px -65px; scale:1.25 1.15; } }
:is(#slide, .slide-transition)[data-slide="coffee"] .slide-content { position:relative; }
@media(prefers-reduced-motion:reduce) { .steam-wisp { animation:none; opacity:.06; } }
:is(#slide, .slide-transition)[data-slide="coffee"] .slide-content { width: 80%; padding-top: max(80px, 12vh); color: #fff7df; text-shadow: 0 2px 8px #071e19; }
:is(#slide, .slide-transition)[data-slide="coffee"] h1 { color: #fff7df; font-size: 9vmin; text-shadow: 0 2px 8px #071e19; margin-bottom: 2vmin; }
:is(#slide, .slide-transition)[data-slide="coffee"] .eyebrow { color: #eac88d; }
.coffee-message { font-size: 4.5vmin; margin: 0 0 2vmin; }
#coffee-timer button { background: #142b48e8; color: #fff7df; border-color: #b9a66d; }
.coffee-return-form { display: flex; align-items: end; justify-content: center; gap: 12px; margin: 12px auto; }
.coffee-return-form label { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.coffee-return-form input { width: 150px; }
:is(#slide, .slide-transition)[data-slide="coffee"] [data-set-return] { position:fixed; top:1.5vmin; right:1.5vmin; z-index:6; min-height:40px; padding:8px 16px; background:#142b48e8; color:#fff7df; border-color:#8b784e; font-size:14px; }
.coffee-return-time { font-size: 5vmin; font-weight: 750; font-variant-numeric: tabular-nums; margin: 1vmin 0; }
.coffee-return-label { font-size: 2.6vmin; font-weight: 400; color: #e3dcc5; margin: 0 0 .4vmin; }
.coffee-return-value { font-size: 4.5vmin; font-weight: 750; margin: 0 0 1vmin; }
.coffee-return-clock { width: 25vmin; margin: 0 auto 1.5vmin; }
.return-hour-hand { stroke: #111; stroke-width: 7; stroke-linecap: round; }
.return-minute-hand { stroke: #111; stroke-width: 4; stroke-linecap: round; }
.coffee-return-clock .current-minute-hand { stroke: #2875b9; stroke-width: 4; }
.coffee-time-wedge { fill: #398dd2; fill-opacity: .28; }
.coffee-return-clock.final-five-minutes .current-minute-hand { stroke: #c92d32; }
.coffee-return-clock.final-five-minutes .coffee-time-wedge { fill: #df363b; }
.topic-range-editor { grid-template-columns: 54px minmax(0, 1fr) 110px; }
.topic-range-editor select { width: 100%; padding: 8px; }
#week-fields:has(.topic-range-editor) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.weekly-topics li { grid-template-columns: 16vmin minmax(0, 1fr); }
@media(max-width: 500px) { .topic-range-editor { grid-template-columns: 48px minmax(0, 1fr); } .topic-range-editor label:last-child { grid-column: 2; } }
@media(max-width: 650px) { #drawing-tools { max-width: calc(100% - 130px); flex-wrap: wrap; justify-content: flex-end; } #drawing-options { order: 1; width: 100%; justify-content: flex-end; } }
.slide-category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
@media(max-width: 550px) { .slide-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
@media(max-width: 340px) { .slide-category-grid { grid-template-columns: 1fr; } }


/* Saved freeform slides use the same 16:9 coordinate system as the editor. */
:is(#slide,.slide-transition).layout-slide{display:grid;place-items:center;overflow:hidden;background:#20252d;top:var(--photo-top,0px);bottom:var(--photo-bottom,0px);height:auto}
.presentation-canvas{position:relative;width:min(100%,calc((100dvh - var(--photo-top,0px) - var(--photo-bottom,0px)) * 16 / 9));aspect-ratio:16/9;container-type:inline-size;overflow:hidden;text-align:left;flex:none}
.presentation-object{position:absolute;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.2}
.presentation-object img{width:100%;height:100%;object-fit:contain;display:block}
:is(#slide,.slide-transition).layout-slide .photo-controls{position:fixed;bottom:8px;z-index:2;background:transparent;border-radius:0}
:is(#slide,.slide-transition).layout-slide .photo-caption{position:absolute;bottom:65px;z-index:2;max-height:40%;overflow:auto}
.slide-preview :is(#slide,.slide-transition).layout-slide{inset:0}.slide-preview .presentation-canvas{width:100%}

:is(#slide,.slide-transition) .worksheet-button{position:absolute;top:12px;right:12px;z-index:4;min-height:36px;padding:6px 10px;border:1px solid #bdd6ce;border-radius:6px;background:#f5faf8;color:#17665e;font:14px system-ui,sans-serif;cursor:pointer}
.playback-worksheets{width:min(480px,calc(100% - 32px));max-height:85dvh;overflow:auto;border:1px solid #bdd6ce;border-radius:10px;padding:24px;background:white;color:#243247;text-align:left;font:16px system-ui,sans-serif}
.playback-worksheets::backdrop{background:#142b4866}.playback-worksheets h2{font-size:22px;margin:0 0 16px}.playback-worksheets a{display:block;color:#17665e;margin:12px 0;overflow-wrap:anywhere}.playback-worksheets button{font-size:14px;padding:8px 12px;margin-top:12px}.slide-preview .worksheet-button{display:none}
:is(#slide,.slide-transition) .worksheet-button{top:64px}

.slide-thumbnail .premade-thumbnail{display:block;width:100%;height:100%;object-fit:cover}

.image-crop-frame{position:relative;width:100%;height:100%;overflow:hidden;pointer-events:none}
:is(#slide,.slide-transition).layout-slide{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}

.tile-worksheets{background:#e5f3ef;color:#17665e;font:700 13px system-ui,sans-serif}
.menu-worksheets{width:min(520px,calc(100% - 32px));max-height:85dvh;overflow:auto;border:1px solid #bdd6ce;border-radius:10px;padding:24px;background:white;color:#243247;font:16px system-ui,sans-serif}
.teacher-lesson-slide #photo-back, .teacher-lesson-slide #photo-forward, .teacher-lesson-slide .photo-controls > span { display:none; }
.teacher-lesson-slide { --photo-bottom:0px !important; }
.teacher-lesson-slide :is(#slide,.slide-transition).layout-slide, .teacher-lesson-slide :is(#slide,.slide-transition).photo-single { bottom:0; }
.teacher-lesson-slide .presentation-canvas { width:min(100%,calc((100dvh - var(--photo-top,0px)) * 16 / 9)); }
body.welcome-screen footer:not([hidden]) { justify-content:space-between; background:transparent; padding:1.5vmin; pointer-events:none; }
body.welcome-screen footer button { pointer-events:auto; }
body.welcome-screen footer #sequence-progress { position:absolute; left:50%; transform:translateX(-50%); padding:6px 10px; border-radius:8px; background:#142b48b8; color:#fff7df; }
.menu-worksheets::backdrop{background:#142b4866}.menu-worksheets h2{margin:0 0 16px;font-size:22px}.worksheet-links{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0}.worksheet-links a{color:#17665e;overflow-wrap:anywhere}.worksheet-links a:last-child{flex:none;font-size:13px}.menu-worksheets button{font-size:14px;margin-top:12px}

/* Playback navigation floats in the viewport corners without a ribbon. */
body .photo-controls,
body :is(#slide, .slide-transition):is(.layout-slide, .photo-single) .photo-controls {
  position: fixed; inset: auto 0 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  padding: 12px; background: transparent; border-radius: 0;
  pointer-events: none;
}
.photo-controls > :is(button, a) { pointer-events: auto; }
.photo-controls > span, body.welcome-screen footer #sequence-progress { display: none; }
#photo-back, #photo-forward { position: fixed; bottom: max(12px, env(safe-area-inset-bottom)); }
#photo-back { left: max(12px, env(safe-area-inset-left)); }
#photo-forward { right: max(12px, env(safe-area-inset-right)); }
body.welcome-screen footer:not([hidden]) { background: transparent; }
