@font-face {
  font-family: "Huanqiao Serif";
  src: url("assets/huanqiao-serif.woff2") format("woff2");
  font-weight: 650;
  font-display: swap;
}
:root { --serif: "Huanqiao Serif", "Songti SC", "Noto Serif SC", Georgia, serif; }
[hidden] { display: none !important; }
.slide h1, .slide h2:not(.screen-line h2) { font-family: var(--serif); font-weight: 650; }
.questions, .interlude, .local-proof { position: relative; display: grid; align-items: center; }
.questions, .interlude { color: var(--paper); background-color: var(--ink); }
.questions {
  background: linear-gradient(180deg,#1c17129c,#1c1712c9 52%,#1c1712e8), url("assets/warehouse-scene.webp") center/cover;
}
.intro-inner, .proof-inner {
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: 44px 22px;
}
.questions .intro-inner {
  min-height: 520px;
  display: grid;
  grid-template-rows: 1fr auto auto 1fr auto;
  align-items: center;
  justify-items: center;
  text-align: center;
}
.questions .intro-kicker { grid-row: 2; }
.intro-kicker { color: var(--yellow); font-weight: 750; font-size: 14px; }
.questions h1 {
  grid-row: 3;
  width: min(100%, 820px);
  margin-top: 15px;
  font-size: clamp(30px, 8.5vw, 70px);
  line-height: 1.19;
  text-wrap: balance;
}
.questions h1 span { display: block; }
.question-chips {
  grid-row: 5;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 52px;
  padding: 0;
  margin: 14px 0 16px;
  list-style: none;
}
.question-chips li {
  align-self: start;
  padding: 3px 7px;
  border: 1px solid #b4a382;
  border-radius: 18px;
  color: #f0e7d8;
  background: #1c1712cc;
  font-size: 12px;
}
.question-chips li:last-child { background: var(--yellow); border-color: var(--yellow); color: var(--ink); font-weight: 750; }
.photo-label {
  position: absolute;
  z-index: 1;
  bottom: 10px;
  left: 22px;
  padding: 4px 5px;
  border-radius: 2px;
  font-size: 10px;
  color: #f4ece0;
  background: #1c1712cc;
}
.interlude { background-image: linear-gradient(#c6a86718 1px,transparent 1px),linear-gradient(90deg,#c6a86718 1px,transparent 1px); background-size: 32px 32px; }
.interlude h2 {
  max-width: 900px;
  font-size: clamp(32px, 8.5vw, 65px);
  line-height: 1.22;
  text-wrap: balance;
}
.interlude h2 em { display: block; margin-top: 5px; color: var(--yellow); font-style: normal; }
html[lang="en"] .interlude h2 em { font-style: italic; }
.signature { display: flex; align-items: center; gap: 8px; margin-top: 27px; color: #ddcdb1; font-size: 14px; }
.chapter-copy .day-title { font-size: clamp(34px, 11vw, 63px); line-height: 1.04; }
.step-cues {
  counter-reset: cue;
  list-style: none;
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
}
.step-cues li {
  counter-increment: cue;
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 14px;
  line-height: 1.29;
}
.step-cues li::before {
  content: counter(cue);
  flex: none;
  width: 19px;
  height: 19px;
  border: 1px solid currentColor;
  border-radius: 100%;
  text-align: center;
  font: 700 12px/18px var(--numbers);
}
.deck .step-cues li { color: #5a5042; }
.deck .dark .step-cues li { color: #cbbea8; }
.deck .step-cues .now { color: var(--ink); font-weight: 800; }
.deck .dark .step-cues .now { color: var(--paper); }
.step-cues .now::before { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.deck .step-cues .done::before { background: var(--green); border-color: var(--green); color: white; }
.deck .chapter-copy .narrative { display: none; }
.deck .board-bottom, .deck .camera-photo, .deck .warning, .deck .pass-metric,
.deck .review-actions, .deck #day-reporting .report-row:last-of-type,
.deck #day-handover .screen-row:nth-last-of-type(-n+2) { transition: opacity 320ms ease-out; }
.deck [data-step="0"] :is(.camera-photo,.warning,.pass-metric,.review-actions),
.deck #day-reporting[data-step="0"] .report-row:last-of-type,
.deck #day-handover[data-step="0"] .screen-row:nth-last-of-type(-n+2) { opacity: .35; }

.local-proof { background: var(--warm); }
.proof-inner { text-align: center; }
.proof-inner .intro-kicker { color: #5f4d38; }
.proof-number {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  margin-top: 10px;
}
.proof-number strong { font: 780 clamp(114px, 32vw, 205px)/.9 var(--numbers); letter-spacing: -.07em; }
.proof-number span { font-size: 23px; font-weight: 750; }
.proof-inner h2 { margin: 15px 0 13px; font-size: clamp(28px, 6.2vw, 42px); text-wrap: balance; }
.proof-inner a { font-size: 13px; color: #5e5040; }
.closing { color: var(--paper); background: var(--ink); }
.closing h2 { color: var(--yellow); }
.closing p { color: #e9dfcd; }
.closing-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #695844;
}
.closing-stats dt { color: #ddcfb9; font-size: 11px; }
.closing-stats dd { margin: 3px 0 0; font: 760 24px/1 var(--numbers); }
.closing-stats small { font: 650 11px var(--display); }
.closing .closing-actions { gap: 12px; margin-top: 15px; }
.qr-action {
  display: grid;
  width: min(41%, 145px);
  gap: 6px;
  justify-items: center;
  padding: 6px 6px 7px;
  border: 1px solid #a68f6c;
  border-radius: 4px;
  color: var(--ink);
  background: var(--surface);
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.2;
}
.qr-action img { width: 100%; aspect-ratio: 1; height: auto; }
.qr-action:focus-visible { outline-color: var(--yellow); }
.qr-action:hover { background: #f5e7c8; }
.closing .close-note, .closing .close-credit { margin-top: 10px; color: #dbcbb1; font-size: 11px; }
.closing .close-credit { margin-top: 3px; }

html.deck { scroll-behavior: auto; }
.deck body {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.deck .top { position: relative; }
.deck main { display: grid; min-height: 0; }
.deck .slide { grid-area: 1/1; min-height: 0; overflow: auto; }
.deck .story-footer, .deck .scroll-only { display: none; }
.deck .chapter-inner, .deck .questions .intro-inner { min-height: 100%; }
.deck .questions .intro-inner { padding-bottom: 40px; }
.deck .scene { margin-bottom: 10px; }
.deck .chapter-inner, .deck .opening .chapter-inner { padding: 17px 22px 18px; gap: 13px; }
.deck .stage { padding-block: 9px; }
.deck .chapter-copy h2:not(.day-title) { font-size: clamp(28px, 8vw, 43px); }
.deck .step-cues { margin-top: 10px; }
.deck .closing { display: grid; align-content: center; }
.deck .closing-inner { padding-block: 17px; }
.deck-controls {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 5px;
  align-items: center;
  min-height: 49px;
  padding: 2px 14px max(2px, env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--paper);
}
.deck-progress {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: #625441;
}
.deck-progress span { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--yellow); }
.deck-controls button {
  justify-self: start;
  min-width: 44px;
  min-height: 43px;
  border: 0;
  color: var(--paper);
  background: none;
  font-size: 20px;
}
.deck-controls button:disabled { opacity: .37; cursor: default; }
.deck-controls button:focus-visible { outline-color: var(--yellow); outline-offset: -4px; }
.deck-controls #deck-play { font-size: 14px; }

@media (min-width: 820px) {
  .deck .chapter-inner, .deck .opening .chapter-inner { padding: 23px 46px; gap: 35px; }
  .deck .chapter-copy .day-title { font-size: clamp(55px, 7vw, 88px); }
  html[lang="en"].deck .chapter-copy .day-title { font-size: clamp(46px, 5.1vw, 62px); }
  .deck .chapter-copy h2:not(.day-title) { font-size: clamp(45px, 5vw, 62px); }
  .deck .stage { min-height: 340px; }
  .deck .step-cues { margin-top: 19px; gap: 9px; }
  .step-cues li { font-size: 17px; }
  .questions .intro-inner { padding-bottom: 46px; }
  .deck .closing-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(265px, .64fr);
    align-items: start;
    gap: 0 38px;
  }
  .deck .closing h2, .deck .closing p, .deck .closing-stats { grid-column: 1; }
  .deck .closing .closing-actions { grid-column: 2; grid-row: 1 / span 4; align-self: center; margin-top: 0; }
  .deck .closing-stats { margin-top: 19px; }
  .deck-controls { padding-inline: 46px; }
}
@media (prefers-reduced-motion: no-preference) {
  .deck .slide.reveal > :first-child { animation: deck-enter 410ms ease-out both; }
  .deck .questions h1.question-swap { animation: deck-enter 290ms ease-out both; }
  .deck-progress span { transition: transform 350ms ease-out; }
  @keyframes deck-enter { from { opacity: .45; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .deck .slide * { transition: none !important; animation: none !important; }
}
