/* === monstrance-base.css ===
   Base palettes, typography, paper grain, topbar, monstrance hero, sky scene, parts modal, prayer modal, hotspots.
   Auto-extracted from catholic-monstrance-for-kids.html
*/

/* ===== Catholic Kids, What Is a Monstrance? =====
 Storybook hand-drawn aesthetic for 5-7 year olds. */

:root {
  /* GOLDEN HOUR, default */
  --bg: #fbefd4;
  --paper: #fff8e6;
  --paper-deep: #f4dfb1;
  --ink: #2a1a0e;
  --ink-soft: #6b4226;
  --ink-faint: #b7926a;
  --gold: #e8a93c;
  --gold-deep: #b97417;
  --gold-light: #ffe9a8;
  --halo: #fff1b8;
  --sky: #c9ddea;
  --sky-deep: #6fa4c2;
  --accent: #c84b31;
  --accent-deep: #8e2d17;
  --leaf: #5c7b3a;

  --rad-sm: 12px;
  --rad-md: 18px;
  --rad-lg: 28px;
  --rad-xl: 44px;

  --shadow-soft:
    0 2px 0 rgba(42, 26, 14, 0.06),
    0 10px 24px -10px rgba(42, 26, 14, 0.18);
  --shadow-paper:
    0 1px 0 rgba(42, 26, 14, 0.05),
    0 18px 40px -22px rgba(42, 26, 14, 0.35);
  --shadow-ink: 0 3px 0 var(--ink);
}

[data-palette="glass"] {
  --bg: #1a1140;
  --paper: #fff1de;
  --paper-deep: #f0d8b0;
  --ink: #1a1140;
  --ink-soft: #3c2a6e;
  --ink-faint: #8c7bb6;
  --gold: #e6b644;
  --gold-deep: #b27a1a;
  --gold-light: #ffe4a1;
  --halo: #ffe08c;
  --sky: #2e4dbe;
  --sky-deep: #1b2e80;
  --accent: #b91c3c;
  --accent-deep: #6e0d24;
  --leaf: #2e7d5b;
}

[data-palette="dawn"] {
  --bg: #ffe8d6;
  --paper: #fff3e4;
  --paper-deep: #fad3b9;
  --ink: #3d2a4f;
  --ink-soft: #6e4f7a;
  --ink-faint: #c1a5c6;
  --gold: #f3d582;
  --gold-deep: #d49a4a;
  --gold-light: #ffefc5;
  --halo: #ffe9c6;
  --sky: #e8c7e5;
  --sky-deep: #c4a8e0;
  --accent: #e47a6a;
  --accent-deep: #a8453a;
  --leaf: #8fb378;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: 20px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss03";
  transition:
    background 350ms ease,
    color 350ms ease;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.10  0 0 0 0 0.06  0 0 0 0.07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

.fancy {
  font-family: "Sentient", "Newsreader", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hand {
  font-family: "Caveat", cursive;
  font-weight: 600;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: "Sentient", "Newsreader", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.015em;
}
p {
  margin: 0;
}

.app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.sky-scene {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(140% 90% at 50% 38%, var(--halo) 0%, transparent 55%),
    radial-gradient(
      90% 60% at 50% 95%,
      var(--paper-deep) 0%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      var(--sky) 0%,
      var(--paper) 65%,
      var(--paper-deep) 100%
    );
  overflow: hidden;
}

.sky-scene::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  width: min(80vw, 1100px);
  height: min(80vw, 1100px);
  background: conic-gradient(
    from -45deg,
    transparent 0deg,
    rgba(255, 240, 180, 0.55) 8deg,
    transparent 16deg,
    transparent 30deg,
    rgba(255, 240, 180, 0.4) 38deg,
    transparent 46deg,
    transparent 70deg,
    rgba(255, 240, 180, 0.5) 78deg,
    transparent 86deg,
    transparent 110deg,
    rgba(255, 240, 180, 0.35) 118deg,
    transparent 126deg,
    transparent 160deg,
    rgba(255, 240, 180, 0.5) 168deg,
    transparent 176deg,
    transparent 200deg,
    rgba(255, 240, 180, 0.4) 208deg,
    transparent 216deg,
    transparent 250deg,
    rgba(255, 240, 180, 0.55) 258deg,
    transparent 266deg,
    transparent 300deg,
    rgba(255, 240, 180, 0.35) 308deg,
    transparent 316deg,
    transparent 340deg,
    rgba(255, 240, 180, 0.5) 348deg,
    transparent 356deg
  );
  mask: radial-gradient(circle, black 10%, transparent 65%);
  -webkit-mask: radial-gradient(circle, black 10%, transparent 65%);
  pointer-events: none;
  animation: slowSpin 90s linear infinite;
  opacity: 0.7;
  z-index: 1;
}
@keyframes slowSpin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.page-frame {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  padding: 24px clamp(16px, 3vw, 40px) 40px;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
}
.brand .dot {
  width: 22px;
  height: 22px;
  background: var(--gold);
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.topbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}
.pill-btn:hover {
  transform: translateY(-1px);
}
.pill-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}
.pill-btn.is-on {
  background: var(--gold);
}

.palette-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: linear-gradient(135deg, var(--gold) 0%, var(--accent) 70%);
}

.hero-center {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: 8px 0 16px;
}

.title-block {
  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-ink);
  transform: rotate(-1.5deg);
}
.kicker .spark {
  width: 22px;
  height: 22px;
  background: var(--gold);
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.title {
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-align: center;
  max-width: 14ch;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.4);
}
.title .squiggle-wrap {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.title .squiggle {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.12em;
  width: 104%;
  height: 0.28em;
  color: var(--accent);
  pointer-events: none;
}

.lede {
  font-size: clamp(18px, 1.5vw, 22px);
  max-width: 40ch;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.lede-card {
  position: absolute;
  z-index: 7;
  left: clamp(20px, 4vw, 60px);
  bottom: clamp(20px, 6vh, 80px);
  max-width: 320px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--rad-lg);
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-ink);
  transform: rotate(-1.2deg);
  text-align: left;
  cursor: pointer;
}
.lede-card .lede-eyebrow {
  font-family: "Caveat", cursive;
  font-size: 22px;
  color: var(--accent-deep);
  line-height: 1;
  margin-bottom: 4px;
}
.lede-card p {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.45;
}
@media (max-width: 880px) {
  .lede-card {
    position: static;
    transform: none;
    margin: 0 auto;
    max-width: 90%;
  }
}

.tip {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px 10px 12px;
  background: var(--gold-light);
  border: 2px dashed var(--ink);
  border-radius: 999px;
  font-size: 15px;
  position: relative;
  box-shadow: 0 2px 0 rgba(42, 26, 14, 0.1);
}
.tip-emoji {
  width: 28px;
  height: 28px;
  background: var(--gold);
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  font-size: 14px;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 8;
}
.stop-links {
  position: relative;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  max-width: 760px;
  margin: 2px auto 0;
}
.stop-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 2px 0 var(--ink);
}
.stop-link span {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--gold);
  display: grid;
  place-items: center;
  font-size: 13px;
}
.btn {
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-ink);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn:hover {
  transform: translateY(-1.5px);
}
.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}
.btn-primary {
  background: var(--accent);
  color: var(--paper);
}
.btn-secondary {
  background: var(--paper);
  color: var(--ink);
}

.stage {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  z-index: 6;
  align-self: stretch;
  isolation: isolate;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 4% -10% 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 245, 176, 0.86), rgba(255, 232, 141, 0.18) 36%, transparent 62%),
    radial-gradient(ellipse at 20% 70%, rgba(255, 255, 255, 0.74), transparent 32%),
    radial-gradient(ellipse at 82% 66%, rgba(255, 255, 255, 0.72), transparent 34%);
  filter: blur(0.5px);
}

.cloud-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.cloud-layer.behind {
  z-index: 1;
}
.cloud-layer.front {
  z-index: 7;
}

.cloud {
  position: absolute;
  color: var(--paper);
  filter:
    drop-shadow(0 12px 20px rgba(42, 26, 14, 0.16))
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.55));
  animation: drift var(--drift, 14s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}
.cloud.soft {
  filter:
    blur(0.35px)
    drop-shadow(0 18px 28px rgba(42, 26, 14, 0.14));
}
.cloud.soft path {
  stroke-width: 1 !important;
}
.cloud.distant {
  filter: blur(2px);
  opacity: 0.48;
}
.cloud-highlight {
  opacity: 0.78;
  mix-blend-mode: screen;
}
.cloud-warmth {
  opacity: 0.32;
  mix-blend-mode: multiply;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg));
  }
  50% {
    transform: translate3d(var(--dx, 12px), var(--dy, -6px), 0)
      rotate(var(--rot, 0deg));
  }
}

.cloud-pedestal {
  position: absolute;
  left: 50%;
  bottom: 1%;
  width: min(1040px, 96vw);
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
  filter:
    drop-shadow(0 26px 44px rgba(42, 26, 14, 0.2))
    drop-shadow(0 -6px 0 rgba(255, 255, 255, 0.24));
  animation: pedestalBreathe 7s ease-in-out infinite;
}
@keyframes pedestalBreathe {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}

.monstrance-wrap {
  position: relative;
  width: 100%;
  max-width: min(680px, 56vh);
  aspect-ratio: 400 / 640;
  display: grid;
  place-items: center;
  margin: 0 auto;
  z-index: 5;
}
.monstrance-assembly {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 30px 50px rgba(150, 90, 0, 0.35));
  animation: gentlePulse 5s ease-in-out infinite;
}
.part-image {
  position: absolute;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.part-image.rays {
  left: 3%;
  top: 9%;
  width: 94%;
  z-index: 2;
}
.part-image.center {
  left: 31%;
  top: 26%;
  width: 38%;
  z-index: 4;
  filter: drop-shadow(0 0 20px rgba(255, 247, 210, 0.9));
}
.part-image.cross {
  left: 37%;
  top: 0%;
  width: 26%;
  z-index: 5;
}
.part-image.stem {
  left: 42%;
  top: 58%;
  width: 16%;
  height: 25%;
  z-index: 1;
}
.part-image.base {
  left: 26%;
  top: 80%;
  width: 48%;
  z-index: 3;
}
.part-image.is-active {
  filter:
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 26px rgba(255, 213, 91, 0.82));
}
.asset-warning {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(300px, 86%);
  transform: translate(-50%, -50%) rotate(-1deg);
  z-index: 12;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--rad-md);
  box-shadow: var(--shadow-ink);
  color: var(--accent-deep);
  font-weight: 800;
  line-height: 1.25;
  padding: 12px 14px;
  text-align: center;
}
@keyframes gentlePulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.hotspot {
  position: absolute;
  z-index: 10;
  width: 46px;
  height: 46px;
  border: 2.5px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  box-shadow:
    0 3px 0 var(--ink),
    0 0 0 0 rgba(232, 169, 60, 0.5);
  transform: translate(-50%, -50%);
  transition:
    transform 180ms cubic-bezier(0.4, 1.6, 0.5, 1),
    box-shadow 200ms;
}
.hotspot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0.6;
  animation: ringPulse 2.2s ease-out infinite;
}
@keyframes ringPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}
.hotspot:hover {
  transform: translate(-50%, -50%) scale(1.12);
}
.hotspot.is-active {
  background: var(--accent);
  color: var(--paper);
  box-shadow:
    0 3px 0 var(--ink),
    0 0 0 12px rgba(200, 75, 49, 0.18);
}
.hotspot.is-active::after {
  display: none;
}
.hotspot.is-visited {
  background: var(--paper);
}

.reveal-card {
  position: absolute;
  z-index: 6;
  width: 280px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--rad-md);
  box-shadow: var(--shadow-ink);
  padding: 16px 18px 18px;
  transform-origin: top left;
  animation: popIn 280ms cubic-bezier(0.3, 1.4, 0.5, 1);
}
@keyframes popIn {
  from {
    transform: scale(0.6) translateY(-6px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
.reveal-card .num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  background: var(--gold-light);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
}
.reveal-card h3 {
  font-size: 24px;
  line-height: 1.05;
  margin: 10px 0 6px;
}
.reveal-card p {
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.reveal-card .verse {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1.5px dashed var(--ink-faint);
  font-family: "Caveat", cursive;
  font-size: 20px;
  color: var(--accent-deep);
  line-height: 1.15;
}
.reveal-card .close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 2px 0 var(--ink);
}
@media (max-width: 720px) {
  .reveal-card {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(26, 17, 64, 0.45);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 50;
  animation: fade 220ms ease;
  padding: 20px;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--rad-lg);
  box-shadow:
    0 12px 0 -6px var(--ink),
    0 30px 80px -20px rgba(0, 0, 0, 0.5);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: modalIn 320ms cubic-bezier(0.3, 1.3, 0.5, 1);
}
@keyframes modalIn {
  from {
    transform: translateY(20px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  background: var(--paper);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  font-size: 18px;
  font-weight: 800;
  z-index: 2;
}
.modal-header {
  padding: 28px 32px 12px;
}
.modal-eyebrow {
  font-family: "Caveat", cursive;
  font-size: 24px;
  color: var(--accent-deep);
  line-height: 1;
}
.modal-title {
  font-size: 38px;
  line-height: 1;
  margin-top: 6px;
}
.modal-body {
  padding: 16px 32px 32px;
  overflow-y: auto;
  flex: 1;
}

.part-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 22px;
  align-items: center;
}
@media (max-width: 580px) {
  .part-card {
    grid-template-columns: 1fr;
  }
}
.part-thumb {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 45%,
    var(--halo) 0%,
    var(--gold-light) 60%,
    var(--paper-deep) 100%
  );
  border: 2.5px solid var(--ink);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-ink);
  position: relative;
  overflow: hidden;
}
.part-thumb-img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 10px rgba(42, 26, 14, 0.18));
}
.part-scene {
  float: right;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  margin: 2px 0 10px 14px;
  object-fit: cover;
  box-shadow: 0 2px 0 var(--ink);
  background: radial-gradient(
    circle at 40% 35%,
    var(--halo),
    var(--gold-light) 70%,
    var(--paper-deep)
  );
  shape-outside: circle();
}
@media (max-width: 580px) {
  .part-scene {
    float: none;
    display: block;
    margin: 0 auto 14px;
  }
}
.part-thumb-img.rays,
.part-thumb-img.center,
.part-thumb-img.cross {
  width: 92%;
  height: 92%;
}
.part-thumb-img.stem {
  width: 50%;
  height: 96%;
}
.part-thumb-img.base {
  width: 96%;
  height: 72%;
}
.part-num {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 38px;
  height: 38px;
  background: var(--accent);
  color: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 2px 0 var(--ink);
}
.part-words {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.part-verse {
  font-family: "Caveat", cursive;
  font-size: 22px;
  color: var(--accent-deep);
  border-left: 3px solid var(--gold);
  padding-left: 12px;
}

.tts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}
.tts-note {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}
.tts-note.warn {
  color: var(--accent-deep);
}

.stepper-controls {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper-deep);
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: transform 160ms;
}
.dot.is-on {
  background: var(--accent);
  transform: scale(1.3);
}

.prayer {
  text-align: center;
  padding: 8px 0 8px;
}
.prayer-step {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  margin: 8px 0 8px;
}
.prayer-instruction {
  font-family: "Caveat", cursive;
  font-size: 28px;
  color: var(--accent-deep);
}
.prayer-icon {
  width: 110px;
  height: 110px;
  margin: 6px auto 14px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--halo),
    var(--gold-light) 70%,
    transparent
  );
  display: grid;
  place-items: center;
  animation: gentlePulse 3s ease-in-out infinite;
}
.prayer-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 22px;
}
.prayer-progress > span {
  height: 6px;
  flex: 1;
  max-width: 64px;
  background: var(--paper-deep);
  border-radius: 999px;
  border: 1px solid var(--ink);
}
.prayer-progress > span.is-on {
  background: var(--accent);
}

.prayer-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.prayer-card {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--rad-md);
  padding: 20px 16px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-ink);
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease;
  font: inherit;
  color: var(--ink);
}
.prayer-card:hover { transform: translateY(-3px); }
.prayer-card:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.prayer-card-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--halo), var(--gold-light) 70%, transparent);
  display: grid;
  place-items: center;
  font-size: 32px;
  border: 2px solid var(--ink);
  overflow: hidden;
  position: relative;
}
.prayer-card-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prayer-card-name {
  font-family: 'Sentient', 'Newsreader', Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
  margin-bottom: 4px;
}
.prayer-card-meta {
  font-family: 'Caveat', cursive;
  font-size: 18px;
  color: var(--accent-deep);
}
.prayer-switch {
  margin: 18px auto 0;
  background: none;
  border: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline dashed;
  text-underline-offset: 4px;
  padding: 6px 4px;
  display: block;
}
.prayer-switch:hover { color: var(--accent-deep); }

.foot {
  position: absolute;
  right: clamp(20px, 4vw, 60px);
  bottom: clamp(20px, 6vh, 80px);
  z-index: 7;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 15px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  box-shadow: var(--shadow-ink);
  transform: rotate(1.2deg);
}
.foot .pips {
  display: inline-flex;
  gap: 4px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
}
.foot .pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper-deep);
  border: 1.5px solid var(--ink);
}
.foot .pip.on {
  background: var(--gold);
}

.sparkle {
  position: absolute;
  width: 18px;
  height: 18px;
  color: var(--gold-deep);
  opacity: 0.7;
  animation: twinkle 3s ease-in-out infinite;
  z-index: 4;
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.9) rotate(0);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.15) rotate(40deg);
  }
}

.doodle-bird {
  position: absolute;
  top: 12%;
  right: 8%;
  width: 80px;
  color: var(--ink);
  opacity: 0.55;
  transform: rotate(-8deg);
  z-index: 9;
}

.caption {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
  z-index: 60;
  max-width: min(680px, 90vw);
  text-align: center;
  animation: fade 200ms ease;
}

.audio-setup {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px));
  background: var(--paper);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: var(--rad-md);
  box-shadow: var(--shadow-ink);
  padding: 14px 18px;
  z-index: 61;
  font-size: 15px;
  line-height: 1.35;
}
.audio-setup code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background: var(--paper-deep);
  border-radius: 8px;
  padding: 2px 5px;
}

.stop-page {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 42px);
  display: grid;
  gap: 24px;
  align-items: start;
  position: relative;
  z-index: 8;
}
.stop-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(320px, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
}
.stop-art {
  position: relative;
  min-height: 440px;
  display: grid;
  place-items: center;
}
.faith-page .stop-shell {
  align-items: start;
}
.faith-page .stop-art {
  align-items: start;
  align-content: start;
  justify-items: center;
  padding-top: clamp(38px, 8vw, 90px);
  position: sticky;
  top: 18px;
}
.stop-art .monstrance-wrap {
  max-width: min(520px, 78vh);
}
.faith-art {
  width: min(390px, 88vw);
  min-height: 390px;
  position: relative;
  display: grid;
  place-items: center;
}
.faith-art-core {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 25%, #fff8d7 0%, var(--halo) 45%, var(--paper-deep) 100%);
  border: 2px solid rgba(52, 31, 18, 0.24);
  box-shadow: 0 20px 48px rgba(183, 127, 26, 0.24);
  font-size: 82px;
}
.faith-art-chip {
  position: absolute;
  width: 118px;
  min-height: 68px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: var(--rad-sm);
  background: rgba(255, 253, 239, 0.88);
  box-shadow: var(--shadow-soft);
  font-weight: 900;
  font-size: 15px;
  line-height: 1.1;
}
.faith-art-chip:nth-child(2) { top: 0; left: 50%; transform: translateX(-50%) rotate(-2deg); }
.faith-art-chip:nth-child(3) { top: 82px; right: 0; transform: rotate(3deg); }
.faith-art-chip:nth-child(4) { bottom: 82px; right: 8px; transform: rotate(-2deg); }
.faith-art-chip:nth-child(5) { bottom: 0; left: 50%; transform: translateX(-50%) rotate(2deg); }
.faith-art-chip:nth-child(6) { bottom: 82px; left: 0; transform: rotate(2deg); }
.faith-art-chip:nth-child(7) { top: 82px; left: 6px; transform: rotate(-3deg); }
.stop-card {
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--rad-lg);
  box-shadow: var(--shadow-ink);
  padding: clamp(22px, 4vw, 34px);
}
.stop-kicker {
  font-family: "Caveat", cursive;
  font-size: 27px;
  color: var(--accent-deep);
  line-height: 1;
  margin-bottom: 8px;
}
.stop-title {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.95;
  margin-bottom: 14px;
}
.stop-copy {
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.5;
}
.faith-lesson {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}
.big-idea {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  background: rgba(255, 255, 255, 0.48);
  border: 2px solid var(--paper-deep);
  border-radius: var(--rad-md);
  padding: 14px;
}
.big-idea-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--halo);
  border: 2px solid var(--accent-deep);
  font-weight: 900;
  color: var(--accent-deep);
}
.big-idea h3,
.teaching-card h3 {
  font-size: 22px;
  margin-bottom: 4px;
}
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.teaching-card {
  background: var(--paper-soft);
  border: 1.5px solid var(--paper-deep);
  border-radius: var(--rad-sm);
  padding: 12px;
}
.teaching-card p,
.activity-note,
.checkpoint-feedback {
  color: var(--ink-soft);
  line-height: 1.35;
}
.mini-game {
  margin-top: 22px;
  padding: 16px;
  border: 2px dashed var(--ink-faint);
  border-radius: var(--rad-md);
  background: rgba(255, 255, 255, 0.36);
}
.quest-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.quest-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  padding: 7px 11px;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(52, 31, 18, 0.18);
}
.mini-game h3 {
  font-size: 24px;
  margin-bottom: 6px;
}
.mini-progress {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin: 14px 0;
}
.mini-progress span {
  height: 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-deep);
}
.mini-progress span.is-on {
  background: var(--accent);
}
.activity-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.faith-scene {
  min-height: 210px;
  border: 2px solid rgba(52, 31, 18, 0.2);
  border-radius: var(--rad-md);
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 245, 180, 0.9), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,248,222,0.42));
  padding: 16px;
  display: grid;
  align-items: center;
  overflow: hidden;
}
.faith-scene .activity-board {
  margin: 0;
}
.faith-game-mass .activity-board {
  grid-template-columns: repeat(4, 1fr);
}
.faith-game-mass .activity-token {
  text-align: center;
}
.faith-game-sacraments .activity-board,
.faith-game-rosary .activity-board {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}
.faith-game-sacraments .activity-token {
  border-radius: 50%;
  aspect-ratio: 1;
  text-align: center;
}
.faith-game-jesus .activity-token,
.faith-game-mary .activity-token {
  border-radius: 28px 28px 18px 18px;
  text-align: center;
}
.faith-game-trinity .activity-board {
  width: min(360px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(2, 1fr);
}
.faith-game-trinity .activity-token:first-child {
  grid-column: 1 / -1;
  width: 58%;
  justify-self: center;
}
.faith-game-angels .activity-token {
  border-radius: 18px 18px 34px 34px;
}
.activity-token,
.checkpoint-choice {
  appearance: none;
  border: 2px solid var(--ink);
  border-radius: var(--rad-sm);
  background: var(--paper);
  color: var(--ink);
  padding: 12px;
  min-height: 74px;
  text-align: left;
  box-shadow: 0 4px 0 rgba(52, 31, 18, 0.18);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
  font: inherit;
}
.activity-token:hover,
.checkpoint-choice:hover {
  transform: translateY(-2px);
}
.activity-token.is-selected,
.checkpoint-choice.is-correct {
  background: var(--halo);
  border-color: var(--accent-deep);
}
.token-symbol {
  display: block;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 6px;
}
.token-label {
  display: block;
  font-weight: 900;
}
.activity-note {
  min-height: 58px;
  background: rgba(255, 255, 255, 0.54);
  border-radius: var(--rad-sm);
  padding: 12px;
}
.hint-strip {
  margin-top: 10px;
  border-radius: var(--rad-sm);
  background: rgba(255, 248, 213, 0.72);
  border: 1.5px solid var(--paper-deep);
  padding: 10px 12px;
  color: var(--ink-soft);
  font-weight: 700;
  line-height: 1.35;
}
.grownup-bridge {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.bridge-card {
  background: rgba(255, 255, 255, 0.52);
  border: 1.5px solid var(--paper-deep);
  border-radius: var(--rad-sm);
  padding: 12px;
}
.bridge-card strong {
  display: block;
  margin-bottom: 4px;
}
.checkpoint {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1.5px solid var(--paper-deep);
}
.checkpoint h4 {
  margin: 0 0 10px;
  font-size: 18px;
}
.checkpoint-options {
  display: grid;
  gap: 8px;
}
.checkpoint-choice {
  min-height: auto;
  padding: 10px 12px;
}
.checkpoint-choice.is-wrong {
  background: #ffe8df;
  border-color: var(--accent);
}
.checkpoint-feedback {
  margin-top: 8px;
  font-weight: 700;
}
.stop-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }
  .topbar-right {
    flex: 1 1 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 8px;
  }
  .pill-btn {
    padding: 7px 9px;
    font-size: 13px;
  }
  .stop-page {
    padding-left: 10px;
    padding-right: 10px;
  }
  .stop-shell {
    grid-template-columns: 1fr;
  }
  .faith-page .stop-shell {
    width: min(100%, calc(100vw - 20px));
  }
  .stop-card {
    width: 100%;
    padding: 20px;
    overflow: hidden;
  }
  .faith-page .stop-card {
    justify-self: center;
    max-width: calc(100vw - 20px);
  }
  .stop-title {
    font-size: clamp(34px, 12vw, 48px);
    letter-spacing: 0;
    max-width: 8ch;
    overflow-wrap: normal;
  }
  .stop-copy {
    font-size: 16px;
    max-width: 28ch;
  }
  .stop-art {
    min-height: 340px;
  }
  .faith-art {
    width: min(246px, 100%);
    min-height: 0;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-items: stretch;
  }
  .faith-art-core {
    width: 118px;
    height: 118px;
    font-size: 62px;
    grid-column: 1 / -1;
    justify-self: center;
  }
  .faith-art-chip {
    position: static;
    transform: none !important;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    font-size: 10px;
    overflow-wrap: anywhere;
  }
  .teaching-grid {
    grid-template-columns: 1fr;
  }
  .faith-game-mass .activity-board,
  .faith-game-trinity .activity-board {
    grid-template-columns: 1fr;
  }
  .faith-game-trinity .activity-token:first-child {
    width: 100%;
  }
  .grownup-bridge {
    grid-template-columns: 1fr;
  }
}

.hotspot,
.btn,
.pill-btn,
.dot,
.modal-close,
.reveal-card .close {
  user-select: none;
}
