:root {
  --bordeaux: #7A1F2B;
  --bordeaux-dark: #5C1620;
  --bordeaux-deep: #3D0E15;
  --gold: #B8923A;
  --gold-light: #D4B85C;
  --gold-pale: #E8D9A8;
  --pieck-groen: #5E7548;
  --parchment: #F7F1E3;
  --parchment-warm: #EFE5CC;
  --text-dark: #2A1810;
  --text-muted: #6B5644;
  --shadow: rgba(61, 14, 21, .32);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Crimson Pro', Georgia, serif;
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
  /* Pagina's binnen opdracht1 reserveren onderaan ruimte voor de
     home-bar. Op pagina's zonder home-bar staat dit op 0. */
  --home-bar-h: 0px;
}

body.has-home-bar {
  --home-bar-h: 56px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--bordeaux-deep);
  color: var(--parchment);
  font-family: var(--font-body);
}

button,
input,
textarea {
  font: inherit;
}

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(at 20% 20%, rgba(212,184,92,.16), transparent 32%),
    linear-gradient(160deg, #142119 0%, #23351f 42%, #4a241d 100%);
}

.app::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .28;
  background-image: radial-gradient(circle, rgba(255,231,166,.55) 0 1px, transparent 1.8px);
  background-size: 86px 86px;
  animation: drift 30s linear infinite;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-86px); }
}

.page {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(18px, env(safe-area-inset-top))
    clamp(14px, 4vw, 28px)
    max(18px, env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transform: translateY(22px) scale(.985);
  transition: opacity .38s ease, transform .38s var(--ease-soft);
}

.page.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.page-home {
  padding: 0;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  animation: kenburns 20s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1.06) translate(0,0); }
  to { transform: scale(1.16) translate(-2%,-1%); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(61,14,21,.45) 0%, rgba(61,14,21,.35) 42%, rgba(61,14,21,.85) 100%),
    radial-gradient(ellipse at center, transparent 0%, rgba(61,14,21,.45) 100%);
}

.stars-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.stars-layer span {
  position: absolute;
  color: var(--gold-light);
  font-size: 1.35rem;
  opacity: 0;
  animation: floatStar 7s ease-in-out infinite;
  text-shadow: 0 0 12px rgba(212,184,92,.85);
}

@keyframes floatStar {
  0%,100% { opacity: 0; transform: translateY(0) rotate(0deg); }
  25% { opacity: 1; }
  55% { transform: translateY(-26px) rotate(180deg); opacity: .85; }
  80% { opacity: .25; }
}

.home-content {
  position: relative;
  z-index: 3;
  width: min(100%, 850px);
  padding: 24px;
}

.home-eyebrow,
.eyebrow {
  font-family: var(--font-body);
  letter-spacing: .34em;
  text-transform: uppercase;
  font-size: clamp(.78rem, 2.9vw, .9rem);
  color: var(--gold-light);
  margin: 0 0 18px;
}

.home-content h1 {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(3.2rem, 13vw, 7rem);
  line-height: .95;
  color: var(--parchment);
  text-shadow: 0 4px 30px rgba(0,0,0,.52);
}

.home-content h1 span,
.home-content h1 em {
  display: block;
}

.home-content h1 em {
  margin: .3em 0;
  font-size: .43em;
  color: var(--gold-light);
  font-weight: 400;
}

.hero-rule {
  width: min(48%, 230px);
  height: 1px;
  margin: 28px auto 22px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 26px;
  color: var(--gold-pale);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.2vw, 1.55rem);
  font-style: italic;
  line-height: 1.45;
}

.card,
.scroll-wrap {
  width: min(100%, 620px);
}

.scroll-wrap {
  max-height: 100%;
  overflow: auto;
  padding: 2px 2px 12px;
  scrollbar-width: none;
}

.scroll-wrap::-webkit-scrollbar,
.card::-webkit-scrollbar {
  display: none;
}

.card {
  position: relative;
  max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  padding: clamp(22px, 5vw, 36px);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(70,39,27,.92), rgba(37,57,34,.92));
  border: 2px solid rgba(241,196,91,.78);
  box-shadow: 0 24px 70px rgba(0,0,0,.38), inset 0 0 0 1px rgba(255,255,255,.12);
  backdrop-filter: blur(14px);
}

.card::before,
.card::after {
  content: "✦";
  position: absolute;
  top: 14px;
  color: var(--gold-light);
  opacity: .9;
  font-size: 18px;
}

.card::before { left: 18px; }
.card::after { right: 18px; }

.card.compact {
  padding: clamp(18px, 4vw, 28px);
  margin-bottom: 16px;
}

h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.25rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.04;
  color: #ffe7a6;
  text-shadow: 0 3px 0 rgba(0,0,0,.22);
}

p,
li {
  font-size: clamp(1.05rem, 4.2vw, 1.25rem);
  line-height: 1.5;
}

.muted,
.status {
  color: rgba(248,237,210,.82);
}

.counter {
  margin-top: 12px;
  color: var(--gold-pale);
}

.twinkle {
  margin: 22px 0;
  text-align: center;
  color: var(--gold-light);
  letter-spacing: .35em;
}

.callout,
.example-box,
.question-box {
  margin: 18px 0;
  padding: 18px;
  background: rgba(255,255,255,.07);
  border-left: 4px solid var(--gold-light);
  border-radius: 16px;
}

.callout strong,
.label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.25rem;
}

.label::before {
  content: "✧ ";
}

.star-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.star-list li {
  position: relative;
  padding-left: 1.55rem;
  margin-bottom: .45rem;
}

.star-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: .12rem;
  color: var(--gold-light);
  font-size: .82em;
}

.attraction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 3vw, 16px);
  margin-bottom: 16px;
}

.attraction-card {
  min-height: clamp(118px, 22dvh, 154px);
  padding: clamp(14px, 4vw, 20px);
  border: 2px solid rgba(241,196,91,.72);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(109,50,35,.92), rgba(41,78,50,.92));
  color: #ffe7a6;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  font-style: italic;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(0,0,0,.30), inset 0 0 0 1px rgba(255,255,255,.12);
}

.attraction-card::before {
  content: "❧";
  display: block;
  font-size: 1.2rem;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.attraction-card.completed {
  background: linear-gradient(145deg, rgba(35,86,58,.95), rgba(91,68,31,.95));
  outline: 3px solid rgba(255,231,166,.28);
}

.status-label {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: clamp(.88rem, 3.4vw, 1rem);
  font-style: normal;
  line-height: 1.2;
  color: rgba(248,237,210,.85);
}

.progress-track {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.14);
  margin-bottom: 18px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffe28b, #d99a2b);
  transition: width .32s var(--ease-soft);
}

.section-number {
  display: inline-block;
  position: relative;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(3.4rem, 15vw, 4.8rem);
  line-height: .85;
  color: var(--gold-light);
}

.section-number::after {
  content: "";
  position: absolute;
  right: -2.7rem;
  top: 50%;
  width: 2rem;
  height: 1px;
  background: var(--gold-light);
}

.question-box {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  font-style: italic;
  line-height: 1.25;
  color: #fff2d7;
}

.question-box::before {
  content: "✦  ";
  color: var(--gold-light);
}

.current-attraction {
  margin-top: -4px;
  color: var(--gold-pale);
  font-style: italic;
}

textarea,
input {
  width: 100%;
  border: 2px solid rgba(241,196,91,.45);
  border-radius: 18px;
  background: rgba(255,244,217,.96);
  color: var(--text-dark);
  font-family: Arial, sans-serif;
  font-size: clamp(1rem, 4vw, 1.13rem);
  line-height: 1.45;
  padding: 15px 16px;
  margin: 10px 0;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.12);
}

textarea {
  min-height: clamp(150px, 30dvh, 300px);
  resize: none;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 15px 20px;
  margin-top: 10px;
  font-family: Arial, sans-serif;
  font-size: clamp(1rem, 4vw, 1.1rem);
  font-weight: 900;
  letter-spacing: .02em;
}

.primary {
  background: linear-gradient(180deg, #ffe28b, #d99a2b);
  color: #2b1c10;
  box-shadow: 0 8px 0 rgba(73,39,18,.65), 0 16px 28px rgba(0,0,0,.22);
}

.secondary {
  background: rgba(28,42,31,.95);
  color: #ffe7a6;
  border: 1px solid rgba(241,196,91,.55);
}

.full { width: 100%; }

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.button-stack {
  display: grid;
  gap: 2px;
}

.hidden { display: none; }

@media (max-width: 460px) {
  .page:not(.page-home) {
    align-items: stretch;
  }

  .card {
    align-self: center;
    max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 20px;
    border-radius: 24px;
  }

  .home-content {
    padding: 20px;
  }

  .home-content h1 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  .hero-sub {
    font-size: 1.12rem;
  }

  .attraction-grid {
    grid-template-columns: 1fr 1fr;
  }

  textarea {
    min-height: 145px;
  }
}

@media (max-height: 700px) {
  .card {
    padding: 20px;
  }

  p, li {
    line-height: 1.38;
  }

  .twinkle {
    margin: 12px 0;
  }

  textarea {
    min-height: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* ============================================================
   TRACK SLIDER FINAL
   Simpele betrouwbare carousel-architectuur:
   - alle pages staan naast elkaar in één brede track
   - vooruit = track schuift naar links
   - terug = track schuift naar rechts
   - geen fade, geen losse pagina-conflicten
   ============================================================ */

html,
body,
.app {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
}

.app {
  position: fixed;
  inset: 0;
}

.page-track {
  position: relative;
  z-index: 2;
  width: 800vw;
  height: 100dvh;
  display: flex;
  flex-direction: row;
  transform: translate3d(0,0,0);
  transition: transform .45s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}

.page {
  position: relative !important;
  inset: auto !important;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  transition: none !important;
  overflow: hidden !important;
  padding:
    max(12px, env(safe-area-inset-top))
    14px
    max(12px, env(safe-area-inset-bottom));
}

.page:not(.page-home) {
  align-items: center;
  justify-content: center;
}

.page.active {
  opacity: 1 !important;
}

/* Tijdens een hack-animatie (via een tussenliggend slot) verbergen we
   alle pagina's behalve de start (.from) en het doel (.active), zodat
   het tussenslot niet kort in beeld flitst. */
.page-track.animating .page:not(.active):not(.from) {
  visibility: hidden !important;
}

/* geen scroll op kaarten */
.scroll-wrap,
.card {
  overflow: hidden !important;
  scrollbar-width: none;
}

.scroll-wrap::-webkit-scrollbar,
.card::-webkit-scrollbar {
  display: none;
}

.scroll-wrap {
  height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  width: min(100%, 620px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, 1.5dvh, 14px);
}

.card {
  width: min(100%, 620px);
  height: auto;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(16px, 3.2dvh, 32px);
}

.step-card {
  height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  justify-content: flex-start;
}

.home-content {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding:
    max(18px, env(safe-area-inset-top))
    22px
    max(18px, env(safe-area-inset-bottom));
}

.attraction-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.5dvh, 14px);
  margin: 0;
}

.attraction-card {
  min-height: 0;
  height: 100%;
  padding: clamp(10px, 2dvh, 18px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.attraction-card::before {
  margin-bottom: auto;
}

.progress-track {
  flex: 0 0 9px;
  margin-bottom: clamp(8px, 1.4dvh, 16px);
}

.section-number {
  flex: 0 0 auto;
  font-size: clamp(3rem, 8dvh, 4.8rem);
  margin-bottom: clamp(4px, .8dvh, 8px);
}

#explainBody {
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: clamp(8px, 1.4dvh, 14px);
}

.example-box {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden !important;
  margin: 0 0 clamp(8px, 1.4dvh, 14px);
  padding: clamp(12px, 2dvh, 18px);
  display: flex;
  flex-direction: column;
}

.star-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.star-list li {
  margin-bottom: 0;
}

.question-box {
  flex: 0 0 auto;
  margin: 0 0 clamp(8px, 1.4dvh, 14px);
  padding: clamp(12px, 2dvh, 18px);
}

.current-attraction {
  flex: 0 0 auto;
  margin: 0 0 clamp(6px, 1dvh, 10px);
}

textarea {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  resize: none;
  margin: 0 0 clamp(8px, 1.5dvh, 14px);
}

.button-row,
.button-stack {
  flex: 0 0 auto;
}

button {
  margin-top: clamp(6px, 1dvh, 10px);
  padding: clamp(12px, 2dvh, 15px) 18px;
}

@media (max-height: 700px) {
  .card {
    padding: 14px;
    border-radius: 20px;
  }

  .home-content {
    padding: 14px;
  }

  .hero-rule {
    margin: 14px auto;
  }

  .twinkle,
  .card::before,
  .card::after {
    display: none;
  }

  .section-number {
    font-size: clamp(2.7rem, 7dvh, 3.6rem);
  }

  .example-box,
  .question-box {
    padding: 10px 12px;
  }

  button {
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

@media (max-height: 590px) {
  .page {
    padding: 8px 10px;
  }

  .card,
  .step-card,
  .scroll-wrap {
    max-height: calc(100dvh - 16px);
    height: calc(100dvh - 16px);
  }

  .card:not(.step-card) {
    justify-content: center;
  }

  .star-list li {
    line-height: 1.18;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-track {
    transition: none;
  }
}

/* Tijdelijke dev-knop op homepage om alle ingevulde antwoorden te
   wissen. Verwijder zowel deze regel als de knop in index.html en de
   handler in app.js wanneer de app live gaat. */
.dev-reset {
  margin-top: 18px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.7);
  font-size: 12px;
  letter-spacing: .02em;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.dev-reset:hover,
.dev-reset:focus {
  background: rgba(255,255,255,.08);
  color: #fff;
}

/* Sub-track binnen het step-frame: twee panelen (uitleg + vraag)
   die horizontaal naast elkaar staan en geswiped worden binnen het
   stilstaande kader. Frame + progressbar bewegen niet mee. */
.sub-viewport {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.sub-track {
  display: flex;
  flex-direction: row;
  width: 200%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.sub-track.to-question {
  transform: translate3d(-50%, 0, 0);
}

.sub-panel {
  flex: 0 0 50%;
  width: 50%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Box-sizing zodat de padding binnen de 50% paneel-breedte blijft
     en de track-wiskunde (translateX -50% = 1 paneel) intact blijft. */
  box-sizing: border-box;
}

/* Horizontale padding aan beide kanten van beide panelen, zodat er
   tijdens elke swipe-richting (uitleg<->vraag binnen een stap, en
   stap-wissels via crossStepSwipe) een visuele kloof tussen ze zit. */
.sub-panel {
  padding-left: 10px;
  padding-right: 10px;
}

/* Niet-actief paneel onzichtbaar voor screenreaders en focus. */
.sub-panel[aria-hidden="true"] {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .sub-track {
    transition: none;
  }
}

/* ============================================================
   SPLASH PAGINA (index.html)
   ============================================================ */
.splash-app {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.splash-content {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: splash-fade-in 1.2s var(--ease-soft);
}

@keyframes splash-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.splash-eyebrow {
  color: var(--gold-light);
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: .3em;
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.splash-title {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--parchment);
  font-size: clamp(2.6rem, 12vw, 5rem);
  line-height: 1.05;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.splash-title em {
  color: var(--gold-light);
  font-style: italic;
  font-size: .6em;
  font-weight: 400;
}

/* ============================================================
   MENU PAGINA (home.html)
   ============================================================ */
.menu-app {
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(24px, env(safe-area-inset-top))
    20px
    max(24px, env(safe-area-inset-bottom));
}

.menu-content {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  text-align: center;
}

.menu-eyebrow {
  color: var(--gold-light);
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: .15em;
  font-size: 1rem;
  margin: 0 0 8px;
}

.menu-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  margin: 0 0 8px;
  color: var(--parchment);
}

.menu-grid {
  margin-top: clamp(24px, 5dvh, 40px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2.5dvh, 18px);
}

.menu-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(110px, 18dvh, 160px);
  padding: 18px 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(70,39,27,.92), rgba(37,57,34,.92));
  border: 2px solid rgba(241,196,91,.78);
  color: var(--parchment);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4.5vw, 1.7rem);
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.1);
  transition: transform .2s var(--ease-soft), border-color .2s;
}

.menu-card:hover,
.menu-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold-light);
  outline: none;
}

/* ============================================================
   PLACEHOLDER PAGINA'S (programma, opdracht2, contact)
   ============================================================ */
.sub-page-app {
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(24px, env(safe-area-inset-top))
    20px
    calc(max(24px, env(safe-area-inset-bottom)) + 80px);
}

.sub-page-content {
  position: relative;
  z-index: 2;
  width: min(100%, 560px);
  text-align: center;
}

.sub-page-eyebrow {
  color: var(--gold-light);
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: .15em;
  font-size: 1rem;
  margin: 0 0 6px;
}

.sub-page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 8vw, 3.2rem);
  margin: 0 0 8px;
  color: var(--parchment);
}

.sub-page-body {
  margin-top: clamp(18px, 3dvh, 28px);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--parchment);
  opacity: .85;
}

/* ============================================================
   HOME-BAR (terug naar menu knop, op alle sub-pagina's)
   ============================================================ */
.home-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    14px 20px
    calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(20,33,25,0) 0%, rgba(20,33,25,.85) 40%, rgba(20,33,25,.95) 100%);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: .04em;
  text-decoration: none;
  border-top: 1px solid rgba(241,196,91,.25);
  backdrop-filter: blur(6px);
}

.home-bar:hover,
.home-bar:focus-visible {
  color: var(--parchment);
  outline: none;
}

/* Binnen opdracht 1 (body.has-home-bar) reserveren we onderaan
   ruimte voor de home-bar. We doen dat door alle layout-hoogtes
   te verkleinen met --home-bar-h. De step-card en andere kaarten
   hebben eigen 100dvh-berekeningen, dus we passen die hier
   gericht aan. */
body.has-home-bar .step-card,
body.has-home-bar .scroll-wrap {
  height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom) - var(--home-bar-h));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom) - var(--home-bar-h));
}

body.has-home-bar .card {
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom) - var(--home-bar-h));
}

body.has-home-bar .page {
  padding-bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--home-bar-h)) !important;
}
