/* Layout: a dark chrome bar, then the lesson as a classroom screen beside its story card,
   with "Teach it" sheets below. Year, Church setup and Brand are their own views. */
:root {
  --bg: #f2f6f9;
  --surface: #ffffff;
  --surface-2: #e9f0f5;
  --ink: #0d1722;
  --muted: #536274;
  --line: rgba(13, 23, 34, 0.1);
  --brand: #5bc2f7;
  --on-brand: #04263a;
  --brand-strong: var(--bs-l, #0f7dbd);
  --brand-soft: color-mix(in srgb, var(--brand) 16%, transparent);
  --gold: #e2b04a;
  --gold-soft: color-mix(in srgb, var(--gold) 20%, transparent);
  --gold-ink: #7a5410;
  --chrome: var(--chrome-c, #05090e);
  --chrome-2: color-mix(in srgb, var(--chrome) 82%, #fff 18%);
  --chrome-ink: #eef5fa;
  --chrome-muted: #93a7b9;
  --stage: #08131d;
  --paper: #ffffff;
  --paper-ink: #151515;
  --ok: #2e8a57;
  --warn: #b86e12;
  --disp: var(--disp-c, 'Poppins'), 'Segoe UI', system-ui, sans-serif;
  --body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
  --verse: 'EB Garamond', 'Iowan Old Style', Georgia, serif;
  --r: 18px;
  --r-sm: 12px;
  --wrap: 1320px;
  --gut: clamp(16px, 3vw, 32px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #091017;
    --surface: #101a23;
    --surface-2: #17232e;
    --ink: #e8f0f6;
    --muted: #98a8b8;
    --line: rgba(232, 240, 246, 0.1);
    --brand-strong: var(--bs-d, #82d3fb);
    --gold-ink: #f0c66c;
    --stage: #050c13;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #091017;
  --surface: #101a23;
  --surface-2: #17232e;
  --ink: #e8f0f6;
  --muted: #98a8b8;
  --line: rgba(232, 240, 246, 0.1);
  --brand-strong: var(--bs-d, #82d3fb);
  --gold-ink: #f0c66c;
  --stage: #050c13;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16.5px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--disp);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 8px;
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gut);
}
.wrap.noscript-msg {
  padding: 32px 0;
}
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.eyebrow {
  font: 700 12px/1.3 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.num {
  font-variant-numeric: tabular-nums;
}

/* Chrome bar */
.chrome {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--chrome);
  color: var(--chrome-ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.chrome-in {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding-block: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: none;
}
.brand-logo {
  height: 48px;
  width: auto;
  display: block;
}
/* The one-line Heart Turn Kids logo is wide (4.5 : 1), so it stands shorter than the old stacked one. */
.brand-logo:has(> svg.htg-logo) {
  height: 38px;
}
.brand-logo img {
  height: 42px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}
.brand-sub {
  font: 700 11px/1.2 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chrome-muted);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding-left: 12px;
}
.tabs-top {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.chrome-pop {
  flex: none;
  color: var(--chrome-ink);
  font: 700 14px/1 var(--body);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--chrome-ink) 25%, transparent);
}
.chrome-pop:hover {
  background: var(--chrome-2);
}
.tabs-top::-webkit-scrollbar {
  display: none;
}
.tab-top {
  border: 0;
  background: transparent;
  color: var(--chrome-muted);
  font: 600 15px/1 var(--body);
  padding: 11px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.tab-top:hover {
  color: var(--chrome-ink);
  background: rgba(255, 255, 255, 0.06);
}
.tab-top[aria-current='page'] {
  color: var(--on-brand);
  background: var(--brand);
}
.class-pick {
  flex: none;
}
.class-pick select {
  background: var(--chrome-2);
  color: var(--chrome-ink);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 14px;
}

/* Lesson bar */
.lessonbar {
  padding-block: 22px 8px;
  display: grid;
  gap: 14px;
}
.lb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.lb-date {
  font: 700 13px/1.2 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.lb-kind {
  font: 700 12px/1 var(--body);
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-ink);
}
.picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 420px;
  min-width: 0;
}
.select {
  position: relative;
  flex: 1;
  min-width: 0;
}
.select select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 44px 12px 16px;
  font: 600 16px/1.2 var(--body);
  box-shadow: 0 1px 0 var(--line);
  text-overflow: ellipsis;
}
.select::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2.5px solid var(--muted);
  border-bottom: 2.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.iconbtn {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
}
.iconbtn:hover {
  border-color: var(--brand);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: 700 15px/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--brand);
}
.btn-brand {
  background: var(--brand);
  color: var(--on-brand);
  border-color: transparent;
}
.btn-brand:hover {
  filter: brightness(1.05);
}
.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 11px;
}

/* The year ribbon: where this lesson sits in the church year */
.ribbon {
  position: relative;
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: visible;
  gap: 2px;
}
.rib-seg {
  height: 100%;
  border-radius: 3px;
  opacity: 0.85;
}
.rib-seg:first-child {
  border-radius: 999px 3px 3px 999px;
}
.rib-seg:last-child {
  border-radius: 3px 999px 999px 3px;
}
.rib-mark {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 4px solid var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: left 0.5s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.rib-labels {
  position: relative;
  height: 18px;
  margin-top: 6px;
  font: 700 11px/1 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rib-labels span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.rib-labels span:first-child {
  transform: translateX(-8px);
}
.rib-labels span:last-child {
  transform: translateX(calc(-100% + 8px));
}
.lessonbar {
  overflow-x: clip;
}
.rib-labels span::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -12px;
  width: 2px;
  height: 6px;
  background: var(--muted);
  opacity: 0.6;
}

/* Lesson stage + story card */
.lesson {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  padding-block: 18px 8px;
  align-items: start;
}
.player {
  background: var(--stage);
  border-radius: 24px;
  overflow: hidden;
  color: #eef4f8;
  box-shadow: 0 30px 60px -36px rgba(4, 14, 24, 0.7);
}
.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  overflow: hidden;
  background: linear-gradient(#0b1e33, #15302a 70%, #10261a);
}
.screen > svg,
.still svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.still {
  position: absolute;
  inset: 0;
  animation: drift 40s ease-in-out infinite alternate;
  transform-origin: 60% 70%;
}
.still::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(transparent, rgba(4, 10, 16, 0.72));
}
@keyframes drift {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08) translate(-1%, -1%);
  }
}
.twinkle {
  animation: tw 3.2s ease-in-out infinite;
}
@keyframes tw {
  50% {
    opacity: 0.2;
  }
}
.sway {
  transform-origin: 50% 100%;
  animation: sw 6s ease-in-out infinite;
}
@keyframes sw {
  50% {
    transform: skewX(-2.2deg);
  }
}
.still-card {
  position: absolute;
  left: clamp(14px, 3%, 28px);
  bottom: clamp(14px, 4%, 30px);
  right: clamp(14px, 3%, 28px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}
.still-num {
  font: 700 12px/1 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.still-title {
  margin-top: 8px;
  font: 800 clamp(22px, 3.2vw, 44px)/1.04 var(--disp);
  color: #fff;
  max-width: 18ch;
}
.still-pill {
  font: 700 12px/1 var(--body);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(5, 12, 19, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #dce7ef;
  text-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.screen.pano-stage {
  position: relative;
}
.pano-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.season-sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.player-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: start;
  padding: 16px clamp(16px, 2.2vw, 24px) 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.story-cap {
  min-height: 6.4em;
  transition: opacity 0.38s ease;
  min-width: 0;
}
.story-cap.is-changing {
  opacity: 0;
}
.story-eyebrow {
  font: 700 11.5px/1.3 var(--body);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}
.story-verse {
  margin-top: 6px;
  font: italic 400 clamp(18px, 1.55vw, 22px)/1.4 var(--verse);
  color: #f4f0e6;
  text-wrap: pretty;
}
.story-verse.story-brand {
  font: 700 22px/1.3 var(--disp);
  font-style: normal;
}
.story-verse.story-brand .serif {
  font-family: var(--verse);
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}
.story-ref {
  margin-top: 6px;
  font: 700 12px/1.2 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9fb2c2;
}
.story-ctrl {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  grid-column: 1 / -1;
}
.story-ctrl[hidden] {
  display: none;
}
.story-btn {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
}
.story-btn:hover {
  border-color: var(--brand);
  background: rgba(255, 255, 255, 0.08);
}
.story-play .i-play,
.story-play.is-paused .i-pause {
  display: none;
}
.story-play.is-paused .i-play {
  display: block;
}
.story-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-left: 4px;
}
.story-dot {
  width: 20px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
}
.story-dot::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  transition:
    width 0.3s,
    background 0.3s;
}
.story-dot[aria-current='true']::after {
  width: 18px;
  background: var(--brand);
}
.player-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ptool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #e6eef4;
  font: 700 13.5px/1 var(--body);
}
.ptool:hover {
  border-color: var(--brand);
}
.ptool[aria-pressed='true'] {
  background: var(--brand);
  color: var(--on-brand);
  border-color: transparent;
}
.trseg {
  display: inline-flex;
  height: 38px;
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}
.trbtn {
  padding: 0 10px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: #b9c6d0;
  font: 800 12px/1 var(--body);
  letter-spacing: 0.06em;
}
.trbtn:hover {
  color: #ffffff;
}
.trbtn[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.tr-notice {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 4px 0 0;
  max-width: 80ch;
}
input[type='range'] {
  accent-color: var(--brand);
  width: 180px;
  height: 44px;
}
/* Present: the film fills the screen and the verse always fits below it (app.js fitPresent sizes both). */
.player:fullscreen,
.player.is-present {
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 12px 16px 8px;
  overflow: hidden;
  box-sizing: border-box;
}
.player.is-present {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.player:fullscreen .screen,
.player.is-present .screen {
  width: var(--present-w, min(100%, (100vh - 240px) * 16 / 9));
  max-width: 100%;
  flex: none;
  margin: 0 auto;
  border-radius: 14px;
}
.player:fullscreen .player-foot,
.player.is-present .player-foot {
  width: min(100%, 1500px);
  flex: none;
  margin: 0 auto;
  border: 0;
  padding: 8px 8px 2px;
}
.player:fullscreen .story-verse,
.player.is-present .story-verse {
  font-size: var(--present-verse, clamp(18px, min(2.1vw, 3.4vh), 34px));
}
body.presenting {
  overflow: hidden;
}
@media (max-height: 520px) {
  /* a phone on its side: room for the picture first */
  .player:fullscreen .player-tools > :not([data-present]),
  .player.is-present .player-tools > :not([data-present]) {
    display: none;
  }
  .player:fullscreen .story-eyebrow,
  .player.is-present .story-eyebrow {
    display: none;
  }
  .player:fullscreen .player-foot,
  .player.is-present .player-foot {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-top: 4px;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.storycard {
  padding: clamp(20px, 2.4vw, 30px);
  display: grid;
  gap: 18px;
}
.sc-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 700 12.5px/1 var(--body);
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
}
.chip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.sc-title {
  font: 800 clamp(30px, 3.1vw, 44px)/1.04 var(--disp);
}
.passages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.passage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: 700 14px/1.2 var(--body);
}
.passage b {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font: 800 12px/1 var(--disp);
  color: #fff;
  flex: none;
}
/* "Read it in the Bible": opens God's Word in the Bible sheet (bible-pop.js) */
button.passage.passage-bible {
  padding: 6px 12px;
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
}
button.passage.passage-bible::after {
  display: none;
}
.passage-bible svg {
  width: 17px;
  height: 17px;
}
/* Passages open the Bible reading box */
button.passage {
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
button.passage:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}
button.passage::after {
  content: '';
  width: 14px;
  height: 14px;
  margin-left: 2px;
  opacity: 0.55;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5h7a3 3 0 0 1 3 3v12a2 2 0 0 0-2-2H2zM22 5h-7a3 3 0 0 0-3 3v12a2 2 0 0 1 2-2h8z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5h7a3 3 0 0 1 3 3v12a2 2 0 0 0-2-2H2zM22 5h-7a3 3 0 0 0-3 3v12a2 2 0 0 1 2-2h8z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.cite-read {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
body.reading {
  overflow: hidden;
}
.reader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
}
.reader[hidden] {
  display: none;
}
.reader-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 16, 0.62);
  backdrop-filter: blur(3px);
}
.reader-box {
  position: relative;
  width: min(820px, 100%);
  max-height: min(88vh, 980px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--r);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 6px;
}
.reader-head h2 {
  margin: 4px 0 0;
  font: 800 clamp(22px, 3vw, 30px)/1.1 var(--disp);
}
.reader-x {
  font: 700 18px/1 var(--body);
  color: var(--ink);
  cursor: pointer;
}
.reader-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 8px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.reader-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}
.chip-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font: 700 13px/1 var(--body);
  cursor: pointer;
}
.chip-btn[aria-pressed='true'] {
  background: var(--ink);
  color: var(--surface);
  border-color: transparent;
}
.reader-tools .trseg {
  border-color: var(--line);
  background: var(--surface-2);
}
.reader-tools .trbtn {
  color: var(--muted);
}
.reader-tools .trbtn:hover {
  color: var(--ink);
}
.reader-tools .trbtn[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.reader-size {
  display: inline-flex;
  gap: 6px;
}
.reader-size .iconbtn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font: 800 14px/1 var(--body);
  color: var(--ink);
  cursor: pointer;
}
.reader-text {
  overflow: auto;
  padding: 18px 26px 22px;
  font: 400 calc(21px * var(--rs, 1))/1.62 var(--verse);
  outline: none;
}
.reader-text p {
  margin: 0 0 0.9em;
  max-width: 64ch;
}
.reader-text sup {
  font: 700 0.55em/1 var(--body);
  color: var(--brand-strong);
  margin: 0 0.25em 0 0.1em;
  vertical-align: 0.55em;
}
/* the whole chapter: verse numbers start the reading there; the lesson's passage is marked, the verse being read glows */
.reader-text .r-n {
  border: 0;
  background: none;
  padding: 0 0.1em;
  margin: 0 0.2em 0 0.05em;
  font: 700 0.55em/1 var(--body);
  color: var(--brand-strong);
  vertical-align: 0.55em;
  cursor: pointer;
  border-radius: 4px;
}
.reader-text .r-n:hover,
.reader-text .r-n:focus-visible {
  background: var(--brand-soft);
  outline: none;
}
.reader-text .r-v {
  border-radius: 6px;
  transition:
    background-color 0.3s,
    box-shadow 0.3s;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.reader-text .r-hl {
  background: var(--brand-soft);
  box-shadow: 0 0 0 2px var(--brand-soft);
}
.reader-text .r-now {
  background: rgba(226, 176, 74, 0.28);
  box-shadow: 0 0 0 2px rgba(226, 176, 74, 0.28);
}
.reader-text .r-h {
  margin: 1.1em 0 0.45em;
  font: 800 0.8em/1.25 var(--body);
  letter-spacing: 0.02em;
  color: var(--muted);
}
.reader-text .r-h:first-child {
  margin-top: 0;
}
.reader-text .r-sub {
  font-style: italic;
  color: var(--muted);
}
.reader-why {
  font: 600 14px/1.45 var(--body);
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px 12px;
}
.reader-nav {
  display: inline-flex;
  gap: 6px;
}
.reader-nav .iconbtn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--ink);
  cursor: pointer;
}
.reader-nav .iconbtn:disabled {
  opacity: 0.35;
  cursor: default;
}
/* more Bibles: a list beside the three built in */
.trmore {
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  color: #b9c6d0;
}
.trmore-l {
  padding: 0 22px 0 10px;
  font: 800 12px/1 var(--body);
  letter-spacing: 0.06em;
  white-space: nowrap;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trmore select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  font: 600 16px/1.2 var(--body);
}
.trmore::after {
  content: '';
  position: absolute;
  right: 9px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.trmore:hover,
.trmore.on {
  color: #ffffff;
}
.trmore.on {
  background: rgba(255, 255, 255, 0.14);
}
.trmore:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.trmore select option {
  color: #0d1722;
  background: #ffffff;
}
.reader-tools .trmore {
  color: var(--muted);
}
.reader-tools .trmore:hover {
  color: var(--ink);
}
.reader-tools .trmore.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
/* the tools wrap beside the verse rather than squeezing it */
.player-tools {
  max-width: 384px;
  justify-content: flex-end;
}
@media (max-width: 720px) {
  .player-tools {
    max-width: none;
    justify-content: flex-start;
  }
}
.tr-more-field {
  margin: 12px 0 4px;
  max-width: 520px;
}
.player .story-cap {
  cursor: pointer;
}
.player .story-cap:hover .story-ref {
  color: #dce6ee;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reader-text .r-ch {
  float: left;
  font: 800 2.4em/0.9 var(--disp);
  color: var(--brand-strong);
  margin: 0.06em 0.18em 0 0;
}
.reader .tr-notice {
  max-width: none;
  padding: 12px 22px 16px;
  margin: 0;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}
@media (max-width: 640px) {
  .reader {
    padding: 0;
  }
  .reader-box {
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
  .reader-text {
    padding: 16px 18px;
  }
}
.harmony {
  font-size: 14.5px;
  color: var(--muted);
}
.sc-sum {
  font-size: 17.5px;
  line-height: 1.65;
}
.bigidea {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--brand-soft);
  display: grid;
  gap: 4px;
}
.bigidea .eyebrow {
  color: var(--brand-strong);
}
.bigidea p:not(.eyebrow) {
  font: 700 20px/1.3 var(--disp);
}
.verse {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--gold-soft), transparent 70%);
  display: grid;
  gap: 8px;
}
.verse blockquote {
  margin: 0;
  font: italic 400 21px/1.45 var(--verse);
}
.verse cite {
  font: 700 12.5px/1 var(--body);
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.verse-tools {
  display: flex;
  gap: 8px;
}

/* Teach it */
.teach {
  padding-block: 30px 72px;
}
.teach-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.teach-head h2 {
  font-size: clamp(26px, 2.6vw, 34px);
}
.subtabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--surface-2);
  border-radius: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.subtab {
  border: 0;
  background: transparent;
  padding: 10px 16px;
  border-radius: 12px;
  font: 700 15px/1 var(--body);
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.subtab[aria-selected='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.panel {
  display: grid;
  gap: 18px;
}
.qa {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.q {
  padding: 22px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.q-n {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font: 800 15px/1 var(--disp);
}
.q h3 {
  font-size: 19px;
  line-height: 1.3;
}
.q-a {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 16px;
}
.q-a[hidden] {
  display: none;
}
.linkbtn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand-strong);
  font: 700 15px/1.2 var(--body);
  justify-self: start;
}
.talk {
  padding: 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: var(--gold-soft);
  border-color: transparent;
}
.talk h3 {
  font-size: 19px;
}
.sheetwrap {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(220px, 1fr);
  gap: 24px;
  align-items: start;
}
.sheet-side {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 92px;
}
.sheet-side .card {
  padding: 20px;
  display: grid;
  gap: 10px;
}
.sheet-side h3 {
  font-size: 18px;
}
.paper {
  width: 100%;
  aspect-ratio: 8.5 / 11;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 6px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 24px 50px -30px rgba(10, 20, 30, 0.45);
  container-type: inline-size;
  overflow: hidden;
  position: relative;
}
.pg {
  position: absolute;
  inset: 0;
  padding: 5.5cqw 6cqw;
  display: flex;
  flex-direction: column;
  gap: 2.4cqw;
  font-family: var(--body);
}
.pg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3cqw;
  font: 700 2.1cqw/1.2 var(--body);
}
.pg-head .line {
  flex: 1;
  border-bottom: 0.3cqw solid #222;
  height: 3cqw;
}
.pg-brand {
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  font: 800 2cqw/1.1 var(--disp);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pg-brand {
  flex: none;
}
.pg-brand img,
.pg-brand svg {
  height: 6cqw !important;
  width: auto !important;
  max-width: 26cqw;
}
.pg-title {
  font: 800 6.6cqw/1.02 var(--disp);
  text-align: center;
  letter-spacing: -0.01em;
}
.pg-title.outline {
  color: #fff;
  -webkit-text-stroke: 0.32cqw #111;
  paint-order: stroke fill;
}
/* Coloring page: decorative outlined title, a double-ruled square frame, then the story notes. */
.pg-color {
  gap: 1.7cqw;
  padding-top: 4.6cqw;
  padding-bottom: 4.4cqw;
}
.pg-color .pg-title.outline {
  font:
    400 7.2cqw/1.06 'Berkshire Swash',
    'Fraunces',
    Georgia,
    serif;
  letter-spacing: 0.005em;
  -webkit-text-stroke: 0.36cqw #111;
  text-wrap: balance;
  margin: 0.2cqw 0 0.9cqw;
}
.pg-art.frame {
  border: 0.42cqw solid #111;
  border-radius: 0;
  margin: 0 0.95cqw;
  box-shadow:
    0 0 0 0.62cqw #fff,
    0 0 0 0.9cqw #111;
  background: #fff;
}
.pg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  opacity: 0;
}
.pg-img.ok {
  opacity: 1;
}
.pg-notes {
  display: grid;
  gap: 0.55cqw;
  margin-top: 0.9cqw;
  font: 500 2.3cqw/1.36 var(--body);
}
.pg-notes b {
  font-weight: 800;
}
.pg-mem {
  text-align: center;
  font: italic 500 2.3cqw/1.3 var(--verse);
  padding-top: 1.1cqw;
  border-top: 0.18cqw solid #222;
}
.pg-mem b {
  font: 800 1.6cqw/1 var(--body);
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 0.8cqw;
}
.pg-mem cite {
  font: 800 1.6cqw/1 var(--body);
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: 0.6cqw;
  white-space: nowrap;
}
.pg-art {
  flex: 1;
  min-height: 0;
  border: 0.45cqw solid #111;
  border-radius: 3cqw;
  overflow: hidden;
  position: relative;
}
.pg-art svg {
  width: 100%;
  height: 100%;
  display: block;
}
.pg-verse {
  text-align: center;
  font: italic 500 2.9cqw/1.35 var(--verse);
}
.pg-verse cite {
  display: block;
  margin-top: 0.8cqw;
  font: 800 1.9cqw/1 var(--body);
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pg-foot {
  display: flex;
  justify-content: space-between;
  font: 700 1.6cqw/1 var(--body);
  color: #666;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* The lesson sheet: front (coloring page) and back (the lesson), after the sample sheet */
.sheetpair .pages {
  display: grid;
  gap: 10px;
  align-content: start;
}
.pg-label {
  margin: 6px 0 0;
  font: 800 12px/1 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
/* the label above the coloring page, with Color it here beside it (23-color-it.js) */
.pg-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.pg-label-row p {
  margin: 0;
}
.pg-label-row .btn {
  letter-spacing: normal;
  text-transform: none;
}
.pg-front,
.pg-back {
  color: #111;
}
.pg-front::after,
.pg-back::after {
  content: '';
  position: absolute;
  inset: 2.2cqw;
  border: 0.3cqw solid #111;
  border-radius: 1.4cqw;
  pointer-events: none;
  z-index: 4;
}
.pg-front {
  padding: 0;
}
.pf-art {
  position: absolute;
  left: 4.4cqw;
  right: 4.4cqw;
  top: 31cqw;
  bottom: 4.4cqw;
  overflow: hidden;
  background: #fff;
}
.pf-art svg {
  width: 100%;
  height: 100%;
  display: block;
}
.pf-img,
.pb-spot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
  opacity: 0;
}
.pf-img.ok,
.pb-spot-img.ok {
  opacity: 1;
}
.pg-front.has-pic .pf-art {
  inset: 2.5cqw;
  border-radius: 1.2cqw;
}
.pf-head {
  position: absolute;
  left: 6cqw;
  right: 6cqw;
  top: 5cqw;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 1.1cqw;
  text-align: center;
}
.pf-title,
.pb-title {
  margin: 0;
  font-family: 'Baloo 2', var(--disp);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.005em;
  color: #fff;
  -webkit-text-stroke: 0.62cqw #111;
  paint-order: stroke fill;
  text-wrap: balance;
  filter: drop-shadow(0 0 0.45cqw #fff) drop-shadow(0 0 0.45cqw #fff);
}
.pf-theme,
.pg-back .pb-tag {
  margin: 0;
  font:
    700 4.7cqw/1.08 'Baloo 2',
    var(--disp);
  color: #111;
  -webkit-text-stroke: 0.9cqw #fff;
  paint-order: stroke fill;
  text-wrap: balance;
}
.pg-back .pb-tag {
  font-size: 3.6cqw;
}
.pf-ref,
.pg-back .pf-ref {
  margin: 0;
  font: 800 2.2cqw/1.2 var(--body);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #111;
  -webkit-text-stroke: 0.6cqw #fff;
  paint-order: stroke fill;
}
.pg-back {
  --k: 1;
  padding: 4.4cqw 4.8cqw 3.6cqw;
  gap: 1.8cqw;
}
.pb-head {
  display: flex;
  align-items: center;
  gap: 2.4cqw;
  flex: none;
}
.pb-titles {
  flex: 1;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0.8cqw;
  text-align: center;
}
.pb-title {
  -webkit-text-stroke: 0.5cqw #111;
}
.pb-spot {
  flex: none;
  width: 29cqw;
  height: 18cqw;
  position: relative;
  overflow: hidden;
  border-radius: 1.2cqw;
}
.pb-spot svg {
  width: 100%;
  height: 100%;
  display: block;
}
.pb-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.2cqw;
}
.pb-col {
  display: flex;
  flex-direction: column;
  gap: 2cqw;
  min-height: 0;
  overflow: hidden;
}
.pb-box {
  border: 0.3cqw solid #111;
  border-radius: 1.6cqw;
  padding: calc(1.9cqw * var(--k)) calc(2.2cqw * var(--k));
  display: flex;
  flex-direction: column;
  gap: calc(1.05cqw * var(--k));
}
.pb-grow {
  flex: 1 0 auto;
}
.pb-h {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1.4cqw;
  font:
    800 calc(3cqw * var(--k))/1 'Baloo 2',
    var(--disp);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pb-h svg {
  width: calc(4.6cqw * var(--k));
  height: calc(4.6cqw * var(--k));
  flex: none;
}
.pb-h span {
  border-bottom: 0.3cqw solid #111;
  padding-bottom: 0.3cqw;
}
.pg-back p,
.pg-back li {
  margin: 0;
  font: 500 calc(1.98cqw * var(--k))/1.42 var(--body);
}
.pg-back hr {
  border: 0;
  border-top: 0.25cqw solid #111;
  margin: calc(0.5cqw * var(--k)) 0;
  width: 100%;
}
.pb-list,
.pb-qa {
  margin: 0;
  padding-left: 3.2cqw;
  display: grid;
  gap: calc(0.55cqw * var(--k));
}
.pb-qa {
  gap: calc(1cqw * var(--k));
}
.pb-qa b,
.pg-back li::marker {
  font-weight: 800;
}
.pb-qa b {
  display: block;
}
.pg-back .pb-verse {
  font: italic 500 calc(2.3cqw * var(--k))/1.38 var(--verse);
  text-align: center;
}
.pg-back .pb-cite {
  font: 800 calc(1.55cqw * var(--k))/1.2 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}
.pb-jesus {
  flex-direction: row;
  align-items: center;
  gap: 2.2cqw;
  border-width: 0.55cqw;
  border-radius: 3.2cqw 1.6cqw 3.4cqw 1.8cqw / 2.4cqw 3.2cqw 1.8cqw 3cqw;
}
.pb-jesus > svg {
  width: calc(5.4cqw * var(--k));
  height: calc(7.6cqw * var(--k));
  flex: none;
}
.pb-jesus > div {
  display: grid;
  gap: calc(0.7cqw * var(--k));
  text-align: center;
  flex: 1;
}
.pb-jesus h3 {
  margin: 0;
  font:
    800 calc(3.3cqw * var(--k))/1 'Baloo 2',
    var(--disp);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.pb-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  margin: 0;
  font: 800 1.45cqw/1 var(--body);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.pb-foot .pb-brand {
  letter-spacing: 0.1em;
  color: #444;
}
.pb-rule {
  flex: 1;
  border-top: 0.2cqw solid #111;
}
.pg h4 {
  font: 800 2.5cqw/1.1 var(--disp);
  display: flex;
  align-items: center;
  gap: 1.4cqw;
}
.pg h4 b {
  width: 4cqw;
  height: 4cqw;
  border-radius: 1cqw;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2.1cqw;
}
.pg-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3cqw;
  flex: 1;
  min-height: 0;
}
.pg-box {
  border: 0.3cqw solid #222;
  border-radius: 2cqw;
  padding: 2.2cqw;
  display: flex;
  flex-direction: column;
  gap: 1.4cqw;
  min-height: 0;
}
.fill {
  font: 600 2.3cqw/2.1 var(--body);
}
.fill .blank {
  display: inline-block;
  min-width: 12cqw;
  border-bottom: 0.3cqw solid #222;
  margin: 0 0.5cqw;
}
.bank {
  display: flex;
  flex-wrap: wrap;
  gap: 1cqw;
}
.bank span {
  border: 0.25cqw dashed #444;
  border-radius: 1cqw;
  padding: 0.4cqw 1.2cqw;
  font: 700 2cqw/1.4 var(--body);
}
.ws {
  display: grid;
  gap: 0;
  border: 0.3cqw solid #222;
  border-radius: 1cqw;
  overflow: hidden;
  align-self: center;
  width: min(100%, 27cqw);
}
.ws span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font: 800 1.9cqw/1 var(--disp);
  border-right: 0.1cqw solid #ddd;
  border-bottom: 0.1cqw solid #ddd;
}
.ws-words {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6cqw 1.6cqw;
  font: 700 1.9cqw/1.3 var(--body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.wline {
  border-bottom: 0.25cqw solid #999;
  height: 3.4cqw;
}
.qline {
  font: 700 2.1cqw/1.3 var(--body);
}
.guide {
  padding: clamp(20px, 3vw, 36px);
  display: grid;
  gap: 26px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.gcell {
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  display: grid;
  gap: 6px;
  align-content: start;
}
.gcell p {
  font-size: 16px;
}
.guide h3 {
  font-size: 21px;
}
.plan {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.plan-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}
.plan-row:first-child {
  border-top: 0;
}
.plan-t {
  font: 800 15px/1.2 var(--disp);
  color: var(--brand-strong);
}
.plan-t small {
  display: block;
  font: 700 12px/1.3 var(--body);
  color: var(--muted);
  margin-top: 3px;
}
.plan-row h4 {
  font: 700 17px/1.3 var(--disp);
}
.plan-row p {
  font-size: 15.5px;
  color: var(--muted);
  margin-top: 4px;
}
.ages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.age {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
}
.age.on {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.age h4 {
  font: 700 16px/1.2 var(--disp);
}
.age p {
  font-size: 15px;
  color: var(--muted);
}

/* Year */
.view-head {
  padding-block: 30px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: end;
  justify-content: space-between;
}
.view-head h1 {
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.05;
}
.view-head p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 640px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stat {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 112px;
}
.stat b {
  display: block;
  font: 800 24px/1 var(--disp);
}
.stat span {
  font: 700 12px/1.2 var(--body);
  color: var(--muted);
  letter-spacing: 0.04em;
}
.months {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding-bottom: 60px;
}
.month {
  padding: 18px 18px 8px;
}
.month h3 {
  font-size: 18px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.month h3 small {
  font: 700 12px/1 var(--body);
  color: var(--muted);
}
.srow {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px 6px;
  border-top: 1px solid var(--line);
  width: 100%;
  text-align: left;
  border-radius: 0;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}
.srow:hover {
  background: var(--surface-2);
}
.srow.is-today {
  background: var(--brand-soft);
  border-radius: 10px;
}
.sdate {
  font: 800 15px/1 var(--disp);
  text-align: center;
}
.sdate small {
  display: block;
  font: 700 10.5px/1.2 var(--body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.stitle {
  font: 700 15px/1.3 var(--body);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.stitle .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.tag {
  font: 800 10.5px/1 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
}
.tag.anchor {
  background: var(--gold-soft);
  color: var(--gold-ink);
}
.tag.closed {
  background: transparent;
  border: 1px dashed var(--line);
}
.srow.closed .stitle {
  color: var(--muted);
}
.bonus {
  padding: 20px;
  margin-bottom: 60px;
}
.bonus-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.bonus-list button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 8px 12px;
  font: 700 14px/1.2 var(--body);
}

/* Setup + Brand */
.setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  padding-bottom: 72px;
}
.fs {
  padding: clamp(20px, 2.4vw, 28px);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  margin: 0 0 16px;
  min-width: 0;
}
.fs legend {
  float: left;
  width: 100%;
  padding: 0;
  font: 700 20px/1.2 var(--disp);
}
.fs legend + * {
  clear: both;
}
.fs .hint {
  color: var(--muted);
  font-size: 15px;
  margin-top: -6px;
}
.daychips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.daychip input,
.seg input,
.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.daychip span {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  font: 700 15px/1 var(--body);
  background: var(--surface);
}
.daychip input:checked + span {
  background: var(--brand);
  color: var(--on-brand);
  border-color: transparent;
}
.daychip input:focus-visible + span,
.seg input:focus-visible + span,
.radio-card input:focus-visible + div {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
.radios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.radio-card {
  position: relative;
  display: block;
}
.radio-card div {
  height: 100%;
  padding: 16px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  display: grid;
  gap: 6px;
  align-content: start;
}
.radio-card b {
  font: 700 16px/1.25 var(--disp);
}
.radio-card span {
  font-size: 14.5px;
  color: var(--muted);
}
.radio-card input:checked + div {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
  gap: 4px;
  flex-wrap: wrap;
}
.seg label {
  position: relative;
}
.seg span {
  display: block;
  padding: 10px 16px;
  border-radius: 10px;
  font: 700 15px/1 var(--body);
  color: var(--muted);
}
.seg input:checked + span {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 4px 16px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-weight: 600;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-strong);
  flex: none;
}
.check small {
  color: var(--muted);
  font-weight: 600;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field label {
  font: 700 14px/1.2 var(--body);
}
.input {
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  padding: 0 14px;
  min-width: 0;
}
.input:focus {
  border-color: var(--brand);
  outline: none;
}
.closedlist {
  display: grid;
  gap: 6px;
}
.closedlist div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  font-weight: 600;
}
.closedlist button {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 700;
}
.summary {
  position: sticky;
  top: 92px;
  padding: 22px;
  display: grid;
  gap: 14px;
}
.summary h3 {
  font-size: 19px;
}
.sum-n {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sum-n div {
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
}
.sum-n b {
  display: block;
  font: 800 24px/1 var(--disp);
}
.sum-n span {
  font: 700 12px/1.2 var(--body);
  color: var(--muted);
}
.anchors {
  display: grid;
  gap: 0;
}
.anchors div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.anchors b {
  font-weight: 700;
}
.note {
  font-size: 14.5px;
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed var(--line);
}
.note a {
  color: var(--brand-strong);
  font-weight: 700;
}
.brandgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 72px;
}
.logo-drop {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  border-radius: 16px;
  border: 2px dashed var(--line);
  background: var(--chrome);
  color: var(--chrome-ink);
  text-align: center;
  min-height: 140px;
}
.logo-drop.over {
  border-color: var(--brand);
}
.logo-drop img,
.logo-drop svg {
  max-height: 70px;
  max-width: 100%;
}
.colors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.color {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
}
.color input[type='color'] {
  width: 40px;
  height: 40px;
  border: 0;
  padding: 0;
  background: none;
  border-radius: 10px;
}
.color span {
  font: 700 14px/1.2 var(--body);
}
.color small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.preset {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font: 700 14.5px/1.2 var(--body);
}
.preset i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: block;
}
.preview {
  padding: 0;
  overflow: hidden;
}
.preview-bar {
  background: var(--chrome);
  color: var(--chrome-ink);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.preview-body {
  padding: 22px;
  display: grid;
  gap: 14px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  opacity: 0;
  transition: 0.3s;
  pointer-events: none;
  z-index: 50;
}
.toast.on {
  opacity: 1;
  transform: translateX(-50%);
}

/* Courses and the course map */
.sec-h {
  font-size: clamp(22px, 2.2vw, 28px);
  margin-top: 8px;
}
.sec-p {
  margin: 6px 0 16px;
  max-width: 720px;
}
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(214px, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}
.preset-plan {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.preset-plan.on {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.pp-band {
  height: 8px;
  background: linear-gradient(90deg, var(--p1), var(--p2));
}
.pp-body {
  padding: 18px;
  display: grid;
  gap: 10px;
  flex: 1;
  align-content: start;
}
.pp-body h3 {
  font-size: 19px;
  line-height: 1.2;
}
.pp-body > .muted {
  font-size: 15px;
}
.pp-dates {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 14px/1.2 var(--body);
  margin-top: 4px;
}
.pp-dates i {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--p1), var(--p2));
  border-radius: 2px;
  position: relative;
}
.pp-dates i::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--p2);
}
.pp-dates b {
  color: var(--gold-ink);
}
.pp-body .row {
  margin-top: auto;
  padding-top: 6px;
}
.pp-body .row .muted {
  font-size: 13.5px;
}
.courses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  align-content: start;
}
.course {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.course:first-child {
  grid-column: 1 / -1;
}
.course:first-child .course-art {
  aspect-ratio: 16 / 5.2;
}
.course-art {
  position: relative;
  aspect-ratio: 16 / 8.4;
  max-width: 100%;
  overflow: hidden;
  background: var(--stage);
}
.course-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.course-art::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 60%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}
.course-title {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 16px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}
.course-title .eyebrow {
  color: #fff;
  opacity: 0.92;
}
.course-title h2 {
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.05;
  margin-top: 4px;
}
.course-body {
  padding: 18px;
  display: grid;
  gap: 14px;
  flex: 1;
  align-content: space-between;
  border-top: 4px solid var(--cc);
}
.course-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stepper .iconbtn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font: 800 18px/1 var(--body);
}
.stepper output {
  min-width: 34px;
  text-align: center;
  font: 800 20px/1 var(--disp);
}
.stepper.sm .iconbtn {
  width: 32px;
  height: 32px;
  font-size: 15px;
}
.stepper.sm output {
  min-width: 26px;
  font-size: 16px;
}
.plist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pq {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-2);
  border-left: 4px solid var(--cc);
}
.pq-n {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--cc);
  color: #fff;
  font: 800 13px/1 var(--disp);
}
.pq-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.pq-main b {
  font: 700 15px/1.2 var(--disp);
}
.pq-main span {
  font-size: 13px;
}
.pq-move {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.pq-move .iconbtn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 14px;
}
.pq-move .iconbtn:disabled {
  opacity: 0.35;
  cursor: default;
}
.journey {
  display: grid;
  gap: 8px;
}
.j-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  font-size: 14.5px;
}
.j-head b {
  font: 800 16px/1.2 var(--disp);
  color: var(--ink);
}
.j-head .num {
  font-weight: 800;
  color: var(--jc);
}
.j-track {
  position: relative;
  height: 26px;
  margin: 30px 0 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--jc) 18%, var(--surface-2));
}
.j-road .j-track {
  background: #2c3238;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.2);
}
.j-road .j-track::before {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: repeating-linear-gradient(90deg, #f2c14e 0 14px, transparent 14px 26px);
}
.j-vine .j-track {
  height: 12px;
  margin-top: 36px;
  background: repeating-linear-gradient(90deg, #3e7a3a 0 30px, #4e9a4a 30px 34px);
}
.j-desert .j-track {
  background: repeating-linear-gradient(90deg, #e6c894 0 10px, #d9b67a 10px 20px);
}
.j-done {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--jc) 45%, transparent);
}
.j-road .j-done {
  background: color-mix(in srgb, var(--jc) 30%, transparent);
}
.j-stop {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2.5px solid var(--surface);
  background: color-mix(in srgb, var(--jc) 55%, #888);
  padding: 0;
}
.j-stop.done {
  background: var(--jc);
}
.j-stop.on {
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  background: var(--jc);
  border-color: var(--surface);
  box-shadow: 0 0 0 3px var(--jc);
  z-index: 2;
}
.j-pin {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font: 800 12.5px/1 var(--body);
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
}
.j-pin::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--ink);
}
.j-ends {
  display: flex;
  justify-content: space-between;
  font: 700 12px/1 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Small layout pieces used across the views */
svg.htg-logo {
  height: 100%;
  width: auto;
  display: block;
}
svg.htg-logo-v {
  display: none;
}
.push-end {
  margin-left: auto;
}
.row.row-split {
  justify-content: space-between;
}
.btn.btn-end {
  align-self: end;
}
.field.field-grow {
  flex: 1;
}

/* Teach it: Q&A, game, class sheet and teacher guide */
.q-n.q-n-talk {
  background: var(--gold);
  color: #241800;
}
.pg-brand .logo-ink {
  filter: brightness(0);
}
.pg-head .line-date {
  flex: 0.45;
}
.pg-title.pg-title-sm {
  font-size: 5.4cqw;
}
.pg .pg-refs {
  text-align: center;
  font: 700 2cqw/1 var(--body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: -1cqw;
}
.pg .fill .fill-ref {
  font-size: 1.9cqw;
  letter-spacing: 0.08em;
}
.pg-box.pg-draw {
  flex: 0.9;
}
.pg-box.pg-jesus {
  flex: none;
  gap: 0.8cqw;
  padding: 1.6cqw 2.2cqw;
  border-width: 0.45cqw;
}
/* the Jesus box takes its room from the drawing space, not the word search */
.pg-jesus + .pg-draw {
  flex: 0.4;
}
.pg-jesus h4 svg {
  width: 2.6cqw;
  height: 3.6cqw;
  flex: none;
}
.pg-jesus p {
  font: 500 2cqw/1.35 var(--body);
  margin: 0;
}
.row.guide-top {
  justify-content: space-between;
  align-items: end;
}
.guide .guide-title {
  font-size: clamp(24px, 2.4vw, 32px);
  margin-top: 6px;
}
.guide-sec {
  display: grid;
  gap: 8px;
}
.guide-sec-lg {
  display: grid;
  gap: 10px;
}
.ages .age-pick {
  text-align: left;
  background: var(--surface);
}

/* Year, Church setup and Brand */
.bonus .bonus-h {
  font-size: 19px;
}
.bonus .bonus-p {
  margin-top: 6px;
}
.fs .hint.hint-gap {
  margin-top: 8px;
}
.checks.checks-summer {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.tr-notice.tr-notice-flush {
  margin: 0;
}
.voice-note {
  font-size: 14.5px;
}
.plan-start-note {
  font-size: 14px;
}
.acct-invite .field-invite {
  flex: 1;
  min-width: 200px;
}
.logo-drop .logo-drop-l {
  font-weight: 700;
}
.seg .font-opt {
  font-weight: 700;
}
.preset .preset-htg {
  background: #5bc2f7;
}
.preview-body .preview-date {
  color: var(--brand-strong);
}
.preview-body .preview-h {
  font-size: 32px;
}

/* First-time setup walkthrough: one question per step, in a dialog */
.wiz {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    0 40px 90px -30px rgba(2, 8, 14, 0.6),
    0 0 0 1px var(--line);
  overflow: hidden;
}
.wiz::backdrop {
  background: rgba(3, 9, 15, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
html:has(.wiz[open]) {
  overflow: hidden;
}
.wiz [hidden] {
  display: none !important;
}
.wiz-in {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
}
.wiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 0 24px;
}
.wiz-count {
  margin-left: auto;
  font: 700 14px/1.2 var(--body);
  color: var(--muted);
}
.wiz-x {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.wiz-prog {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: calc(100% - 48px);
  height: 6px;
  margin: 12px 24px 0;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.wiz-prog::-webkit-progress-bar {
  background: var(--surface-2);
}
.wiz-prog::-webkit-progress-value {
  background: var(--brand);
  border-radius: 999px;
}
.wiz-prog::-moz-progress-bar {
  background: var(--brand);
  border-radius: 999px;
}
.wiz-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px 24px 8px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.wiz-q {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  gap: 14px;
}
.wiz-q legend {
  float: left;
  width: 100%;
  padding: 0;
}
.wiz-q legend + * {
  clear: both;
}
.wiz-h {
  font-size: clamp(22px, 3.2vw, 28px);
  line-height: 1.15;
}
.wiz-h:focus {
  outline: none;
}
.wiz-why,
.wiz-lead {
  color: var(--muted);
  font-size: 15.5px;
}
.wiz-lead {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}
.wiz-opts {
  display: grid;
  gap: 10px;
}
.wiz-card div {
  min-height: 64px;
  padding: 14px 52px 14px 16px;
  align-content: center;
}
.wiz-card div::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  border: 2px solid var(--line);
  box-sizing: border-box;
}
.wiz-card input[type='checkbox'] + div::after {
  border-radius: 7px;
}
.wiz-card input:checked + div::after {
  border: 0;
  background: var(--brand)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304263a' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 15px no-repeat;
}
.wiz-sub {
  font: 700 14px/1.2 var(--body);
  margin-top: 4px;
}
.wiz-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 16px;
}
.wiz-sum {
  margin-top: 2px;
}
.wiz-sum li {
  grid-template-columns: 112px minmax(0, 1fr);
}
.wiz-err {
  margin: 0 24px;
  color: var(--warn);
  font-weight: 700;
  font-size: 15px;
}
.wiz-err:empty {
  display: none;
}
.wiz-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.wiz-foot .linkbtn {
  color: var(--muted);
  padding: 10px 0;
}
.wiz-nav {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
@media (max-width: 560px) {
  .wiz {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }
  .wiz,
  .wiz-in {
    max-height: 94dvh;
  }
  .wiz-top {
    padding: 16px 12px 0 16px;
  }
  .wiz-prog {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }
  .wiz-body {
    padding: 18px 16px 6px;
  }
  .wiz-err {
    margin-inline: 16px;
  }
  .wiz-foot {
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 1080px) {
  .lesson {
    grid-template-columns: 1fr;
  }
  .sheetwrap {
    grid-template-columns: 1fr;
  }
  .sheet-side {
    position: static;
  }
  .setup,
  .brandgrid {
    grid-template-columns: 1fr;
  }
  .summary {
    position: static;
  }
}
@media (max-width: 720px) {
  .brand-sub {
    display: none;
  }
  .chrome-in {
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .tabs-top {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
  .class-pick {
    margin-left: auto;
  }
  .player {
    border-radius: 18px;
  }
  .player-foot {
    grid-template-columns: 1fr;
  }
  .rib-labels span:nth-child(even) {
    display: none;
  }
  .talk {
    grid-template-columns: 1fr;
  }
  .paper {
    container-type: inline-size;
  }
}
@media (prefers-reduced-motion: reduce) {
  .still,
  .twinkle,
  .sway {
    animation: none;
  }
  .rib-mark {
    transition: none;
  }
}

/* Printing: only the chosen sheet, on letter paper */
#print-root {
  display: none;
}
/* A sheet laid out off screen at its printed size while it is made into a PDF (print-pdf.js) */
.pdf-stage {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 7.8in;
  pointer-events: none;
}
.pdf-stage .paper {
  width: 7.8in;
  height: 10.3in;
  aspect-ratio: auto;
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 24px;
}
/* The hidden frame that opens the print window for a PDF */
.pdf-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border: 0;
  visibility: hidden;
}
@media print {
  @page {
    size: letter;
    margin: 0.35in;
  }
  body {
    background: #fff;
  }
  body.printing > *:not(#print-root) {
    display: none !important;
  }
  body.printing #print-root {
    display: block;
  }
  #print-root .paper {
    width: 7.8in;
    aspect-ratio: auto;
    height: 10.3in;
    box-shadow: none;
    border-radius: 0;
  }
  #print-root .paper {
    break-inside: avoid;
  }
  #print-root .paper + .paper {
    break-before: page;
  }
  #print-root .guide {
    border: 0;
  }
  #print-root .guide .btn {
    display: none;
  }
}

/* Language button (assets/translate.js): a globe; the picker opens over it. Google Translate's own bar is hidden. */
.lang-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: inherit;
  cursor: pointer;
  flex: none;
}
.lang-pick svg {
  display: block;
  width: 18px;
  height: 18px;
}
.lang-code {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.lang-pick select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}
.lang-pick:focus-within {
  outline: 3px solid #5bc2f7;
  outline-offset: 2px;
}
.goog-te-banner-frame,
body > .skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}
body {
  top: 0 !important;
}
font[style*='background-color'] {
  background: none !important;
  box-shadow: none !important;
}

/* Shopping lists (shopping.js): a button on each activity, and one dialog listing what to buy */
.shop-btn {
  gap: 6px;
}
.gt-card .shop-btn,
.v-box .shop-btn {
  justify-self: start;
  margin-top: 4px;
}
.v-shop {
  margin-top: 12px;
}
.v-shop-week {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.shop-dlg {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    0 40px 90px -30px rgba(2, 8, 14, 0.6),
    0 0 0 1px var(--line);
  overflow: auto;
  overscroll-behavior: contain;
}
.shop-dlg::backdrop {
  background: rgba(3, 9, 15, 0.6);
}
.shop-in {
  padding: 20px 24px 22px;
}
.shop-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.shop-top h2 {
  margin: 0;
  font: 800 22px/1.2 var(--disp);
}
.shop-top h2:focus {
  outline: none;
}
.shop-note {
  margin: 6px 0 12px;
  font-size: 14px;
}
.shop-h {
  margin: 16px 0 4px;
  font: 800 15px/1.3 var(--disp);
}
.shop-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.shop-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.shop-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.shop-paper h1 {
  font: 800 20pt/1.2 var(--disp);
}
.shop-paper ul {
  padding: 0;
  list-style: none;
  font-size: 13pt;
  line-height: 2;
}

/* accessibility: a link to skip to the content for keyboards and screen readers, and a clear focus ring */
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: #fff;
  color: #0d1722;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.skip:focus {
  top: 12px;
}
/* The logo in another language (translate.js, kids/logo/<lang>.svg): stacked, heart then three lines */
.brand-logo:has(> svg.htg-logo-l) {
  height: 48px;
}
.brand-logo > svg.htg-logo-l {
  display: block;
  height: 100%;
  width: auto;
}
/* A church's own logo, with Heart Turn Global's beside it (app.js logoHTML) */
.brand-logo:has(> .brand-with) {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-with {
  display: flex;
  align-items: center;
  height: 34px;
  padding-left: 10px;
  border-left: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}
.brand-with svg {
  display: block;
  height: 100%;
  width: auto;
}
.pg-brand .brand-with {
  height: auto;
  padding-left: 1.2cqw;
  border-left-color: #999;
}
.pg-brand .brand-with svg {
  height: 4.5cqw !important;
}
/* the way back to the main site while the setup window is open (the page's top bar can't be reached then) */
.wiz-home {
  margin: 0;
  padding: 0 24px 16px;
  text-align: center;
  font-size: 14px;
}
.wiz-home a {
  color: var(--ink-soft, inherit);
  font-weight: 600;
}
