:root {
  --background: #f8f1e4;
  --foreground: #28261e;
  --card: #fffcf5;
  --muted-foreground: #685e4c;
  --primary: #375342;
  --primary-foreground: #fff;
  --border: #b8ac94;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, sans-serif;
}
main {
  max-width: 1500px;
  margin: auto;
  padding: 24px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
h1 {
  font:
    500 clamp(27px, 4vw, 42px) Georgia,
    serif;
  margin: 4px 0;
}
p {
  line-height: 1.55;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.note {
  color: var(--muted-foreground);
  max-width: 65ch;
  margin: 6px 0 20px;
}
.stage {
  position: relative;
  container-type: inline-size;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #080d13;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px #2d220f22;
}
.stage:fullscreen {
  border-radius: 0;
  width: 100vw;
  height: 100dvh;
  aspect-ratio: auto;
  display: grid;
  place-items: center;
}
.picture {
  position: relative;
  width: 100%;
  aspect-ratio: 1672/940;
  min-height: 0;
  display: grid;
  place-items: center;
}
video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  object-fit: contain;
}
.caption {
  position: absolute;
  bottom: 10%;
  left: 6%;
  right: 6%;
  text-align: center;
  font-size: clamp(20px, 3.15cqw, 58px);
  line-height: 1.25;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
  text-shadow:
    0 2px 3px #000,
    0 0 8px #000,
    1px 0 2px #000,
    -1px 0 2px #000;
  pointer-events: none;
}
.caption:empty {
  display: none;
}
.play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #fff9;
  background: #12263ecf;
  color: white;
  border-radius: 50%;
  width: clamp(88px, 11cqw, 142px);
  height: clamp(88px, 11cqw, 142px);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 35px #0008;
}
.play span {
  font-size: clamp(42px, 5cqw, 68px);
  margin-left: 8px;
}
.play[hidden] {
  display: none;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
}
.toolbar button,
.toolbar a {
  font: inherit;
  font-size: 17px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--foreground);
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}
.status {
  font-size: 15px;
  color: var(--muted-foreground);
}
#error {
  color: #9e201c;
  font-weight: bold;
}
.reflection {
  margin-top: 30px;
  padding: 24px;
  border-left: 4px solid var(--primary);
  background: var(--card);
  border-radius: 4px;
  max-width: 800px;
}
.reflection h2 {
  font:
    500 30px Georgia,
    serif;
}
.reflection p {
  font-size: 21px;
}
.small {
  font-size: 15px;
  color: var(--muted-foreground);
}
@media (max-width: 600px) {
  main {
    padding: 14px 8px;
  }
  header {
    padding: 0 8px;
  }
  .stage {
    border-radius: 6px;
  }
  .caption {
    font-size: clamp(17px, 3.3cqw, 30px);
    bottom: 14%;
  }
  .reflection {
    padding: 18px;
  }
}
html {
  scroll-padding-top: 24px;
}
.close-fullscreen {
  display: none;
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  top: max(12px, env(safe-area-inset-top));
  z-index: 3;
  min-height: 48px;
  border: 1px solid #fff9;
  border-radius: 8px;
  background: #12263ee6;
  color: white;
  font-size: 18px;
  padding: 10px 16px;
  cursor: pointer;
}
.stage.is-expanded .close-fullscreen,
.stage:fullscreen .close-fullscreen {
  display: block;
}
.after-film-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.after-film-links a,
.quiz-action,
.quiz-back {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 20px;
  padding: 14px 18px;
  min-height: 48px;
  text-decoration: none;
  cursor: pointer;
}
.quiz {
  max-width: 900px;
  margin: 32px 0;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 20px;
  line-height: 1.55;
}
.quiz h2 {
  font:
    500 32px Georgia,
    serif;
}
.quiz h3 {
  font-size: 25px;
  line-height: 1.35;
  scroll-margin-top: 20px;
}
.quiz fieldset {
  border: 0;
  padding: 0;
  margin: 20px 0;
}
.quiz legend {
  padding: 0;
  font-weight: bold;
  margin-bottom: 12px;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  min-height: 54px;
  margin-bottom: 12px;
  cursor: pointer;
}
.quiz-option:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
}
.quiz-option input {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin: 4px 0;
  accent-color: var(--primary);
}
.quiz-progress {
  color: var(--muted-foreground);
}
.quiz-actions {
  display: flex;
  justify-content: flex-end;
}
.quiz-actions .quiz-action {
  min-width: min(240px, 100%);
  max-width: 100%;
}
.quiz-feedback:empty {
  display: none;
}
.quiz-feedback {
  padding: 4px 20px;
  margin: 20px 0;
  border-left: 4px solid var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
}
.quiz-back {
  margin: 12px;
}
.quiz button[hidden] {
  display: none;
}
.quiz :focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}
@media (max-width: 600px) {
  header {
    flex-wrap: wrap;
    gap: 6px;
  }
  .caption {
    font-size: clamp(20px, 3.6cqw, 32px);
  }
  .quiz {
    padding: 18px 14px;
  }
  .quiz h3 {
    font-size: 23px;
  }
  .quiz-back {
    margin-left: 0;
  }
  .reflection p {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
.stage.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100vw;
  height: 100dvh;
  aspect-ratio: auto;
  border-radius: 0;
}
html[data-expanded="true"] {
  overflow: hidden;
}
.stage:fullscreen,
.stage.is-expanded {
  align-items: stretch;
  justify-items: stretch;
}
.stage:fullscreen .picture,
.stage.is-expanded .picture {
  height: 100%;
  aspect-ratio: auto;
  overflow: hidden;
}
.reading-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  background: var(--card);
  color: var(--foreground);
  border-top: 1px solid var(--border);
}
.reading-tools button,
.people-dialog button {
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.reading-tools button:disabled {
  cursor: default;
  color: var(--muted-foreground);
  border-style: dashed;
}
.reading-tools button[aria-pressed="true"],
.people-dialog button[aria-pressed="true"] {
  color: var(--primary-foreground);
  background: var(--primary);
  border-color: var(--primary);
}
.reading-tools-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.people-dialog {
  width: min(600px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: clamp(18px, 3vw, 28px);
  color: var(--foreground);
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  font-size: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.people-dialog::backdrop {
  background: color-mix(in srgb, var(--foreground) 65%, transparent);
}
.people-dialog-heading {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  padding: 8px 0;
}
.people-dialog h2 {
  font-size: clamp(24px, 4vw, 30px);
  margin: 0;
}
.people-dialog h3 {
  font-size: 26px;
  margin: 8px 0;
}
.people-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.person-card {
  margin-top: 18px;
  border-block: 1px solid var(--border);
  padding: 14px 0;
}
.person-card a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--primary);
  font-weight: 600;
  text-underline-offset: 3px;
}
.people-paused {
  margin-bottom: 0;
  font-size: 18px;
  font-weight: 600;
}
@media (max-width: 480px) {
  .reading-tools {
    justify-content: stretch;
  }
  .reading-tools button {
    flex: 1 1 100%;
  }
}
html[data-dark="true"] {
  color-scheme: dark;
}
.quiz a {
  color: var(--primary);
}
.reflection,
.quiz {
  scroll-margin-top: 24px;
}
