:root{color-scheme:dark;--ink:#f4e6cb;--muted:#c7bba8;--gold:#f6ca85;--ground:#171923;--line:#605047}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 45% 0,#302737,#171923 70%);color:var(--ink);font:1rem/1.5 system-ui,sans-serif;min-height:100vh}
.game{width:min(100% - 2rem,1080px);margin:auto;padding:1.2rem 0 2rem}.mast{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-bottom:1rem}h1,h2,p{margin:0}h1,h2{font-family:Georgia,serif;font-weight:400}h1{font-size:clamp(2.45rem,6vw,4.3rem);line-height:1.05;letter-spacing:-.04em}h2{font-size:clamp(1.65rem,3vw,2.4rem);line-height:1.16;margin:.32rem 0 .7rem}h2:focus{outline:none}.eyebrow{font-size:.875rem;color:var(--gold);letter-spacing:.15em;font-weight:650}.mast .eyebrow{margin-bottom:.38rem}
.landscape{position:relative;overflow:hidden;aspect-ratio:3.05;min-height:220px;border-radius:15px;border:1px solid #756355;background:#3b3045;isolation:isolate}.panorama{display:flex;width:510%;height:100%;will-change:transform;transition:transform var(--walk-duration, 5s) linear}.painting{width:33.33333%;height:100%;flex:none;background-size:100% 100%}.dunes{background-image:url(dunes.jpg)}.wadi{background-image:url(wadi.jpg)}.hills{background-image:url(hills.jpg)}.shade{position:absolute;inset:0;background:linear-gradient(180deg,#11132280 0%,transparent 33%,transparent 72%,#11132262 100%);pointer-events:none}
.scene-label{position:absolute;left:1rem;top:1rem;display:grid;gap:.08rem;padding:.45rem .72rem;border-radius:6px;background:#171923de}.scene-label span:first-child{font:1.3rem Georgia,serif}.scene-label span:last-child{font-size:.875rem;color:#efcd9b}
.route{margin:.75rem 0 1rem}.route-labels{display:flex;justify-content:space-between;color:var(--muted);font-size:.875rem;margin-bottom:.3rem}progress{display:block;width:100%;height:.3rem;border:0;border-radius:8px;overflow:hidden;appearance:none;background:#524653}progress::-webkit-progress-bar{background:#524653}progress::-webkit-progress-value{background:var(--gold)}progress::-moz-progress-bar{background:var(--gold)}
.panel{background:#24232e;border:1px solid #51444d;border-radius:15px;padding:clamp(1rem,3vw,1.65rem)}#intro{color:var(--muted);max-width:62ch;margin-bottom:1rem}.answers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}.answers:empty,.feedback:empty{display:none}button{font:inherit;cursor:pointer;border-radius:7px}button:focus-visible,a:focus-visible{outline:3px solid #f7cc8d;outline-offset:3px}.choice{display:flex;align-items:center;gap:.75rem;text-align:left;padding:.58rem .75rem;color:var(--ink);background:#302e3b;border:1px solid #5c5262;min-height:46px}.choice:not(:disabled):hover,.quiet:hover{background:#454052}.choice:disabled{cursor:default}.choice.wrong{border-color:#eb907d}.choice.right{border-color:#abce9b;background:#303d35}.primary{padding:.65rem 1rem;background:var(--gold);color:#261b24;border:0;font-weight:700}.primary:hover{background:#ffda9f}.quiet{background:#302e3b;color:var(--ink);border:1px solid #5c5262;padding:.43rem .75rem;min-height:44px}.feedback{margin-top:.75rem;color:#eedac1}.feedback a{color:var(--gold)}.feedback:not(:empty)+.primary{margin-top:.8rem}[hidden]{display:none!important}
@media(max-width:550px){.game{width:calc(100% - 1.25rem);padding-top:.9rem}.answers{grid-template-columns:1fr}.landscape{min-height:220px}.panorama{width:675%}.mast .eyebrow{letter-spacing:.09em}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Atmospheric layers travel with each painted backdrop. */
.painting { position: relative; overflow: hidden; }
.painting::before, .painting::after {
  position: absolute;
  content: "";
  pointer-events: none;
}
.dunes::after {
  inset: 68% -16% 4%;
  background:
    radial-gradient(ellipse at 22% 57%, #f6c28677, transparent 46%),
    radial-gradient(ellipse at 64% 69%, #ffdfa44a, transparent 38%),
    radial-gradient(ellipse at 89% 43%, #edac674a, transparent 34%);
  animation: sand-drift 9s ease-in-out infinite alternate;
}
.wadi::before, .wadi::after {
  inset: 0 0 68%;
  background:
    radial-gradient(circle at 7% 38%, #e5f2ff 0 1px, #d7ecff55 2px, transparent 4px),
    radial-gradient(circle at 18% 64%, #d7ecff 0 .8px, transparent 2.4px),
    radial-gradient(circle at 27% 22%, #fff2cb 0 1.2px, #fff2cb55 2px, transparent 4px),
    radial-gradient(circle at 38% 48%, #e5f2ff 0 1px, transparent 2.8px),
    radial-gradient(circle at 52% 34%, #d7ecff 0 1px, transparent 2.6px),
    radial-gradient(circle at 64% 59%, #f6e6c6 0 .9px, transparent 2.6px);
  animation: star-glimmer 2.7s ease-in-out infinite alternate;
}
.wadi::after {
  transform: translateX(7%) scaleY(.74);
  animation-duration: 3.9s;
  animation-delay: -1.7s;
}
.shooting-star {
  position: absolute;
  top: 8%;
  left: 25%;
  width: clamp(44px, 7vw, 115px);
  height: 2px;
  border-radius: 100%;
  background: linear-gradient(90deg, transparent, #c3dcff70 65%, #fff5df);
  filter: drop-shadow(0 0 3px #c7e0ff);
  opacity: 0;
  pointer-events: none;
}
.night-sky .shooting-star {
  animation: shooting-star 8s linear .8s infinite;
}
@keyframes shooting-star {
  0% { opacity: 0; transform: translate(0, 0) rotate(18deg); }
  2% { opacity: .95; }
  10%, 100% { opacity: 0; transform: translate(105%, 32px) rotate(18deg); }
}
.hills::before {
  inset: 4% -14% 50%;
  background:
    radial-gradient(ellipse at 21% 48%, #f6dcbe72, transparent 33%),
    radial-gradient(ellipse at 66% 24%, #ffe5c96a, transparent 26%);
  animation: cloud-drift 19s ease-in-out infinite alternate;
}
@keyframes sand-drift {
  from { transform: translateX(-8%) skewX(-8deg); opacity: .24; }
  to { transform: translateX(15%) skewX(5deg); opacity: .72; }
}
@keyframes star-glimmer {
  from { opacity: .18; }
  to { opacity: .85; }
}
@keyframes cloud-drift {
  from { transform: translateX(-6%); opacity: .35; }
  to { transform: translateX(12%); opacity: .75; }
}

.arrival-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.arrival-camera {
  width: 166.667%;
  height: 100%;
  background: url(mecca-arrival.jpg) center / 100% 100% no-repeat;
}
.arriving .arrival-scene {
  opacity: 1;
  transition: opacity .65s ease;
}
.arriving .party .camel { visibility: hidden; }
.arriving .arrival-camera {
  transform: translateX(-40%);
  transition: transform calc(var(--walk-duration, 5s) - .65s) linear .65s;
}

.arrival-camera {
  position: relative;
}
.arrival-camera::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 36% 32%, #ffe0ac55, transparent 42%);
  animation: morning-light 9s ease-in-out infinite alternate;
}
@keyframes morning-light {
  from { opacity: .22; transform: translateX(-3%); }
  to { opacity: .65; transform: translateX(5%); }
}

.wadi-view {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility 0s linear .4s;
  pointer-events: none;
  background: #14243d;
}
.wadi-3d .wadi-view {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
  pointer-events: auto;
}
.wadi-reveal {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s ease;
}
.wadi-reveal-active .wadi-reveal { opacity: 1; }
.wadi-view canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: grab;
}
.wadi-view canvas[hidden] { display: none; }
.wadi-view canvas:active { cursor: grabbing; }
.wadi-view canvas:focus-visible { outline: 2px solid #e6ca9c; outline-offset: -3px; }
.wadi-hint {
  position: absolute;
  right: 1rem;
  bottom: .8rem;
  padding: .24rem .6rem;
  border-radius: 5px;
  color: #f4e6cb;
  background: #171923de;
  font-size: .875rem;
  pointer-events: none;
}


@font-face {
  font-family: Barlow;
  src: url('/fonts/barlow-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url('/fonts/barlow-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

body:has(.title-screen:not([hidden], .title-departing)) { min-height: 100svh; }
.title-screen {
  --home-midnight: #0B1424;
  --home-navy: #151F30;
  --home-gold: #EAB65E;
  --home-ivory: #F5E7CF;
  --home-silver: #BFC2CC;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: end;
  justify-items: center;
  min-height: 100svh;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(clamp(1rem, 4svh, 2.5rem), env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  text-align: center;
  color: var(--home-ivory);
  background: var(--home-midnight);
  font-family: Barlow, system-ui, sans-serif;
}
.title-sound {
  position: absolute;
  z-index: 1;
  top: max(.65rem, env(safe-area-inset-top));
  left: max(.65rem, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding-inline: .65rem;
  color: var(--home-ivory);
  background: #0b1424d9;
  border-color: #eab65e55;
  font-size: .875rem;
}
.title-sound svg { width: 1rem; height: 1rem; color: var(--home-gold); }
.title-language {
  position: absolute;
  z-index: 1;
  top: max(.65rem, env(safe-area-inset-top));
  right: max(.65rem, env(safe-area-inset-right));
  width: auto;
  color: var(--home-ivory);
  background: #0b1424d9;
  border-color: #eab65e55;
  font: inherit;
  font-size: .875rem;
  border-radius: 7px;
}
.title-departing :is(.title-sound, .title-language) { visibility: hidden; }
[dir="rtl"] .title-screen { font-family: system-ui, sans-serif; }
[dir="rtl"] .title-begin svg { transform: scaleX(-1); }
[dir="rtl"] .choice { text-align: start; }
.title-screen.title-departing {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}
.title-world, .title-world::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.title-world {
  --camera-crop: 25%;
  z-index: -1;
  overflow: hidden;
  container-type: size;
}
.title-take { position: absolute; inset: 0; }
.title-take-blend { display: none; }
.title-plane {
  position: absolute;
  left: 50%;
  top: var(--camera-crop);
  translate: -50% calc(-1 * var(--camera-crop));
  width: max(100cqw, 66.667cqh);
  height: max(150cqw, 100cqh);
  transform-origin: 51% 38%;
}
.title-plane img { display: block; width: 100%; height: 100%; }
/* The inner contour follows the arch and hanging lantern in the approved artwork. */
.title-arch-plane {
  mask-image: linear-gradient(#000 0 54%, transparent 71%);
  clip-path: polygon(evenodd,
    0% 0%, 100% 0%, 100% 70%, 0% 70%, 0% 0%,
    49.5% 4.2%, 42% 6.2%, 35% 8%, 27% 11%, 21% 15%, 16% 20%, 14% 25%,
    13.6% 31%, 14.8% 32.7%, 11.5% 35.3%, 11.5% 52%, 11.8% 61%,
    12% 70.2%, 88% 70.2%, 86% 63%, 86.3% 53%, 87.2% 44%, 87.2% 30%,
    86% 27%, 84% 25%, 82.2% 23.8%, 79.5% 21.8%, 78.4% 18%, 78.8% 14%,
    76% 12%, 71% 9.5%, 65% 7.3%, 58% 5.7%, 49.5% 4.2%
  );
}
.title-world::after {
  content: "";
  background: linear-gradient(180deg, #0b142414, #0b142420 28%, #0b142480 55%, #0b1424f7 94%),
    radial-gradient(ellipse at 50% 35%, transparent 34%, #0b142468 100%);
}
.title-starfield, .title-particles {
  position: absolute;
  inset: 0;
}
.title-starfield {
  background:
    radial-gradient(circle at 29% 10%, #fff1ca 0 1px, transparent 2px),
    radial-gradient(circle at 45% 13%, #c9d3e2 0 1px, transparent 2px),
    radial-gradient(circle at 61% 6%, #ffebc1 0 1px, transparent 2px),
    radial-gradient(circle at 73% 18%, #e8ecf2 0 1px, transparent 2px);
  animation: home-twinkle 5s ease-in-out infinite alternate;
}
.title-particles {
  background:
    radial-gradient(circle at 18% 63%, #eab65ea0 0 1px, transparent 2.5px),
    radial-gradient(circle at 79% 71%, #eab65e90 0 1px, transparent 2.5px),
    radial-gradient(circle at 25% 79%, #eab65e80 0 1px, transparent 2px),
    radial-gradient(circle at 84% 53%, #eab65e70 0 1px, transparent 2px);
  animation: home-drift 13s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: no-preference) {
  .title-city-plane { --camera-depth: 1.04; }
  .title-arch-plane { --camera-depth: 1.17; }
  .title-plane { animation: home-camera-push 30s linear infinite; }
  .title-take-blend { display: block; animation: home-take-blend 30s ease-in-out infinite; }
  .title-take-blend .title-plane { animation-delay: -15s; }
}
.title-lantern-glow,
.title-city-glimmer {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
}
.title-lantern-glow {
  background: radial-gradient(ellipse 7% 6% at 85.3% 17.4%, #ffd07c72, #e99b3738 53%, transparent);
  animation: home-lantern 4.8s linear infinite;
}
.title-city-glimmer {
  background:
    radial-gradient(ellipse 1.15% .9% at 54.3% 39.2%, #ffdc92bb, transparent),
    radial-gradient(ellipse 1.15% .9% at 64.3% 39.4%, #ffd58caa, transparent),
    radial-gradient(ellipse 2.1% 1.1% at 59% 44.5%, #ffe4a485, transparent),
    radial-gradient(ellipse 1.1% .55% at 72% 44.3%, #ffe1a0a0, transparent),
    radial-gradient(ellipse .8% .55% at 33% 43%, #ffd58c95, transparent);
  animation: home-twinkle 6s ease-in-out -3s infinite alternate;
}
.title-shooting-star {
  position: absolute;
  top: 15%;
  left: 42%;
  width: clamp(2.5rem, 10vw, 8rem);
  height: 2px;
  border-radius: 50%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #a8c6e970 60%, #fff3d7);
  box-shadow: 7px 0 12px #a5cbf05a;
  animation: home-meteor 13s linear 2s infinite;
}
.title-shooting-star-late { top: 22%; left: 28%; width: clamp(2rem, 7vw, 6rem); animation-delay: 8s; }
@keyframes home-meteor {
  0% { opacity: 0; transform: translate(-60%, -8px) rotate(18deg); }
  2.5% { opacity: .93; }
  9%, 100% { opacity: 0; transform: translate(160%, 26px) rotate(18deg); }
}
@keyframes home-lantern {
  0%, 100% { opacity: .53; }
  18%, 63% { opacity: .7; }
  32%, 75% { opacity: .44; }
  42%, 84% { opacity: .62; }
}
/* Each layer restarts only while the other take fully covers it. */
@keyframes home-take-blend {
  0%, 34%, 100% { opacity: 1; }
  46%, 86% { opacity: 0; }
}
@keyframes home-camera-push {
  from { transform: scale(1); }
  to { transform: scale(var(--camera-depth)); }
}
@keyframes home-twinkle { from { opacity: .35; } to { opacity: .8; } }
@keyframes home-drift { from { transform: translateY(10px); opacity: .45; } to { transform: translateY(-18px); opacity: .85; } }
@keyframes home-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.title-content { width: min(100%, 29rem); display: grid; gap: clamp(.65rem, 1.9svh, 1.15rem); position: relative; }
.title-content > * { animation: home-enter .65s ease-out both; }
.title-copy { animation-delay: .08s; }
.title-actions { animation-delay: .2s; }
.title-emblem { width: 2rem; height: 2rem; stroke: var(--home-gold); stroke-width: 1; }
.title-screen h1 { font-size: clamp(2.5rem, 8.5vw, 5rem); line-height: 1.02; font-weight: 400; letter-spacing: -.05em; text-wrap: balance; text-shadow: 0 2px 22px #0b1424; }
.title-actions svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.title-card svg { color: var(--home-gold); }
.title-actions { display: grid; justify-items: center; gap: .45rem; }
.title-actions > button { max-inline-size: 100%; }
.title-invitation { margin: .35rem auto 0; max-inline-size: 34ch; color: var(--home-ivory); font-size: .95rem; }
.title-actions button { transition: background-color .18s, border-color .18s, transform .18s; border-radius: 14px; }
.title-actions button:active { transform: translateY(1px); }
.title-begin { display: flex; justify-content: center; align-items: center; gap: .6rem; min-height: 48px; background: var(--home-gold); color: var(--home-midnight); box-shadow: 0 5px 22px #eab65e24; font-weight: 600; }
.title-begin:hover { background: #f4c77b; }
.title-secondary { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .65rem; }
.title-actions .title-alternate {
  justify-self: center;
  background: transparent;
  border-color: transparent;
  color: var(--home-ivory);
  font-size: .95rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.title-actions .title-alternate:hover { background: var(--home-navy); }
.title-secondary .title-card { background: transparent; border-color: transparent; padding-inline: .5rem; }
.title-secondary .title-card:hover { background: var(--home-navy); border-color: #eab65e55; }
.title-card { display: flex; align-items: center; justify-content: center; gap: .4rem; padding: .45rem 1rem; min-height: 44px; background: #151f30d9; color: var(--home-ivory); border-color: #eab65e55; font-size: .95rem; backdrop-filter: blur(5px); }
.title-card:hover { background: var(--home-navy); border-color: var(--home-gold); }
.title-read-quran {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  min-block-size: 44px;
  padding-inline: .5rem;
  color: var(--home-ivory);
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.title-read-quran:hover { color: var(--home-gold); }
.title-new { justify-self: center; background: transparent; border-color: transparent; color: var(--home-silver); font-size: .875rem; }
@media (min-width: 700px) {
  .title-screen { padding-top: min(12svh, 5rem); }
  .title-world { --camera-crop: 33%; }
  .title-content { width: min(100%, 42rem); justify-items: center; }
  .title-actions { width: min(100%, 29rem); justify-items: stretch; gap: .55rem; }
  .title-actions button { border-radius: 9px; }
  .title-actions .title-card { min-height: 48px; }
  .title-actions .title-begin { min-height: 50px; }
}
@media (max-width: 500px) {
  .title-world { --camera-crop: 22%; }
  .title-screen { padding-top: max(3.5rem, env(safe-area-inset-top)); }
  .title-world::after { background: linear-gradient(180deg, #0b142414 6%, #0b142422 32%, #0b142483 60%, #0b1424 100%); }
}
@media (max-height: 540px) {
  .title-content { gap: .5rem; }
  .title-emblem { width: 1.5rem; height: 1.5rem; }
}
/* Shared title, reflection, and arrival layout. */
:root { --ground: #10141c; --gold: #f8b643; }
.game { width: min(100% - 2rem, 960px); container-type: inline-size; }
.mast { align-items: center; border-bottom: 1px solid #b88132; margin-bottom: 0; padding: .4rem .35rem .7rem; }
.mast h1 { font-size: clamp(1.25rem, 3vw, 1.85rem); letter-spacing: -.025em; }
.mast .quiet { font-size: .875rem; }
.landscape { width: 100%; aspect-ratio: 3.5; min-height: 150px; border-radius: 0 0 10px 10px; }
.scene-label { inset: auto auto .75rem .75rem; }
.scene-label span:first-child { font-size: 1.15rem; }
.wadi-help, .scene-reflection { color: var(--muted); padding: .55rem .35rem 0; font-size: .875rem; }
.scene-reflection:empty, #retry:empty { display: none; }
.route { display: flex; gap: .8rem; align-items: center; font-size: .875rem; }
.route > span { white-space: nowrap; }
#next-stop { color: var(--sand, #f7cc8d); font-size: .78rem; order: 1; text-align: end; }
.route-track { position: relative; flex: 1; min-width: 0; }
.route progress { height: .5rem; }
.route-marker {
  position: absolute;
  inset-block: -2px;
  inline-size: 2px;
  border-radius: 1px;
  background: #f5e7cf;
  pointer-events: none;
}
.route-marker-wadi { inset-inline-start: 40%; }
.route-marker-hills { inset-inline-start: 70%; }
.panel { background: #171b24; border-color: #45434c; }
.choice { min-width: 0; overflow-wrap: anywhere; }
.choice-wording { position: relative; min-inline-size: 0; }
.choice-state { margin-left: auto; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.choice-state:empty { display: none; }
.choice.right .choice-state { color: #c3ffd1; }
.choice.wrong .choice-state { color: #ffd0c4; }
.choice.right { background: #213a2e; border-color: #9cd6ab; }
.choice.wrong { background: #39282a; }
#retry, #hint { margin-top: .6rem; color: var(--muted); }
#hint-button { margin-top: .6rem; }
.question-actions { display: flex; gap: .8rem; align-items: end; margin-top: .8rem; }
.question-actions:has(> :not([hidden]):only-child) { justify-content: start; }
.question-actions .feedback { flex: 1; margin: 0; border: 1px solid #bd863e; border-radius: 9px; padding: .65rem .8rem; background: #211f26; }
.feedback h3 { margin: 0 0 .2rem; font-size: 1rem; color: #f5db9e; }
#reflection:focus-visible, #prompt:focus-visible, #review-heading:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#lesson-actions { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-top: .25rem; }
#review-list a { color: var(--gold); text-decoration: underline; }
.primary { min-height: 44px; }
.journey-complete .landscape { height: calc(100cqw / 2.4); }
.journey-complete .arrival-camera { width: 100%; transform: none; background-size: cover; background-position: 69% 50%; }
.journey-complete .scene-label, .journey-complete .mast { display: none; }
.journey-complete .party { bottom: 10%; }
.journey-complete .panel { text-align: center; padding: clamp(1rem, 4vw, 2rem); }
.journey-complete .question-actions { justify-content: center; align-items: stretch; }
.journey-complete #review { border-color: var(--gold); }
dialog { color: var(--ink); background: #1c212b; border: 1px solid #a67d43; border-radius: 12px; width: min(32rem, calc(100% - 2rem)); max-height: 85dvh; padding: 1.25rem; }
dialog::backdrop { background: #0a0d15b8; }
.dialog-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
#review-list { padding-inline-start: 1.4rem; }
#review-list li { margin-bottom: .9rem; }
#review-list p { margin: .2rem 0; }
@media (max-width: 620px) {
  .game { width: calc(100% - 1rem); padding-top: .5rem; }
  .answers { grid-template-columns: 1fr; }
  .question-actions { flex-direction: column; align-items: stretch; }
  .question-actions > button { width: 100%; }
  .journey-complete .landscape { height: calc(100cqw / 1.35); }
  .journey-complete .arrival-camera { background-position: 94% 50%; }
  .scene-label { inset: auto auto .55rem .55rem; }
}

.landscape {
  height: calc(100cqw / 3.5);
  transition: height 420ms cubic-bezier(.22, .7, .25, 1);
}

.landscape.walk-expanded { height: clamp(260px, 68svh, 680px); }
.walk-view .landscape { outline-offset: 3px; }

.walk-view .panel,
.walk-view .wadi-help,
.walk-view .scene-reflection {
  display: none;
}

.game:not(.journey-complete, .walk-view) {
  padding-bottom: .5rem;
  --scene-height: max(150px, calc(50svh - 115px));
  .landscape { height: var(--scene-height); }
  .scene-reflection, .wadi-help { display: none; }
  .panel { height: max(180px, calc(100svh - var(--scene-height) - 140px)); overflow-y: auto; }
}
.lesson-view .question-actions { margin-top: 0; }

@media (max-width: 620px) {
  .game:not(.journey-complete, .walk-view) {
    --scene-height: max(92px, calc(50svh - 100px));

    .landscape:not(.walk-expanded) {
      min-height: 0;
    }

    .landscape:not(.walk-expanded) .scene-label {
      inset: auto auto .35rem .35rem;
      padding: .2rem .45rem;
      gap: 0;
    }

    .scene-reflection, .wadi-help { display: none; }
    .route { margin-block: .45rem; }
    .panel { height: max(180px, calc(100svh - var(--scene-height) - 108px)); padding: .65rem; }
    #prompt { font-size: clamp(1.125rem, 4.8vw, 1.45rem); margin: 0 0 .5rem; }
    .answers { gap: .35rem; }
    .choice {
      min-height: 44px;
      padding: .35rem .5rem;
      font-size: .9375rem;
      line-height: 1.25;
    }
  }
}

@media (max-width: 620px) and (max-height: 620px) {
  .game:not(.journey-complete, .walk-view) {
    --scene-height: clamp(78px, calc(100svh - 470px), 150px);
  }
}

#topic-intro { margin: .5rem 0 .75rem; color: var(--muted); }
.topic-choices { display: grid; gap: .45rem; margin-bottom: .8rem; }
.topic-choices button { text-align: left; font-weight: 650; }

.question-scroll {
  position: relative;
  display: flow-root;
  max-inline-size: 40rem;
  margin-inline: auto;
}
#prompt { position: relative; text-align: center; text-wrap: balance; }
.prompt-reveal-mask { opacity: 0; }
.prompt-typed { position: absolute; inset: 0; pointer-events: none; }
#answers .choice { text-align: start; }
.journey-opening .panel { visibility: hidden; }

.daily-view .route { display: none; }
.daily-view .question-actions { align-items: stretch; }
#daily-practice { margin-top: .45rem; color: var(--muted); }
#daily-tools { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
#daily-tools button { padding-inline: .55rem; font-size: .875rem; }
#share-status { margin-top: .25rem; font-size: .875rem; }
#share-status a { color: var(--gold); }
#saved-list { margin: .8rem 0; }
#saved-list a { color: var(--gold); }

@media (max-width: 620px) {
  .game.daily-view {
    --scene-height: max(78px, min(50svh - 100px, 100svh - 435px));
  }
  .game.daily-view .panel { height: max(180px, calc(100svh - var(--scene-height) - 83px)); }
  .daily-view .question-actions { gap: .4rem; }
  .daily-view .question-actions .feedback { padding: .5rem; line-height: 1.3; font-size: .9375rem; }
  .daily-view .feedback:not(:empty) + .primary { margin-top: 0; padding-block: .4rem; }
  #daily-tools { gap: .25rem; }
  #daily-tools button { padding-inline: .4rem; }
}

/* The scenery uses fixed left-to-right coordinates in every locale. */
[dir="rtl"] .landscape { direction: ltr; }

#prayer-settings > label, #prayer-city-form > label { display: block; margin-block: .65rem .25rem; }
#prayer-dialog select, #prayer-city { width: 100%; }
#prayer-city { min-width: 0; border: 1px solid #5c5262; border-radius: 7px; padding: .45rem; background: #302e3b; color: var(--ink); font: inherit; }
#prayer-results { display: grid; gap: .25rem; list-style: none; padding: 0; margin: .4rem 0; }
#prayer-results button { width: 100%; text-align: start; }
#prayer-dialog { width: min(25rem, calc(100% - 2rem)); }
#prayer-place { color: var(--muted); margin-block: .15rem .6rem; }
#prayer-settings { border-block: 1px solid #45434c; margin-block: .15rem .85rem; }
#prayer-settings summary { padding-block: .65rem; cursor: pointer; }
#prayer-settings[open] { padding-block-end: .65rem; }
#prayer-clear-location { margin-block-start: .55rem; }
#prayer-close { display: block; margin-inline-start: auto; min-height: 44px; }
#prayer-status:empty { display: none; }
#prayer-status, .prayer-note { color: var(--muted); font-size: .875rem; margin-block-start: .4rem; }
.prayer-note a { color: var(--gold); }

#prayer-reminders { margin-block-end: .85rem; }
#prayer-reminders-heading { font-size: 1rem; margin-block: 0 .2rem; }
#prayer-reminders-note, #prayer-reminders-status { color: var(--muted); font-size: .875rem; }
#prayer-reminders-toggle { margin-block-start: .45rem; }


#lesson-practice {
  width: min(31rem, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: clamp(.875rem, 4vw, 1.25rem);
  line-height: 1.45;
}
#practice-count { margin: 0 0 .5rem; color: var(--muted); font-size: .875rem; }
#practice-heading { margin-block: 0 .65rem; font-size: clamp(1.25rem, 4.5vw, 1.75rem); }
#practice-answer p { margin-block: .45rem; }
#practice-answer a { display: inline-block; padding-block: .3rem; }
#lesson-practice .dialog-actions { margin-block-start: 1rem; }
#lesson-actions { align-items: center; }
.verse-save { margin-inline-start: auto; font-size: .85rem; }
.review-verse-header { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .75rem; }
.review-verse-actions { display: flex; align-items: stretch; gap: .35rem; max-inline-size: 100%; }


#review-share-status { margin-block-start: .55rem; overflow-wrap: anywhere; }
.review-verse-actions button { min-inline-size: 0; padding-inline: .55rem; font-size: .85rem; overflow-wrap: anywhere; }
.review-verse-actions .verse-save { margin-inline-start: 0; }

.explore-tabs,.story-filters,.story-navigation,.story-tools,.story-verse-actions,.story-verse-header {
  display:flex; align-items:center; flex-wrap:wrap; gap:.6rem;
}
.explore-tabs { margin-block-end:.8rem; }
.explore-tabs button[aria-pressed="true"] { border-color:var(--gold); color:var(--gold); }
.story-filters { margin-block:.65rem; }
.story-filters > * { flex:1 1 8rem; min-width:0; }
#story-search { min-height:44px; border:1px solid #5c5262; border-radius:7px; background:#302e3b; color:var(--ink); font:inherit; padding:.5rem; }
#story-list,.story-choices { display:grid; gap:.42rem; }
.story-card { display:flex; align-items:center; justify-content:space-between; gap:.6rem; text-align:start; }
.story-card bdi,.story-verse-header { color:var(--muted); font-size:.87rem; }
#story-saved,#close-topics { margin-block-start:.65rem; }
#story-reader { width:min(34rem,calc(100% - 1.25rem)); padding:0; max-height:calc(100dvh - 1.25rem); }
.story-reader-inner { padding:clamp(.8rem,4vw,1.25rem); }
.story-heading h2 { font-size:clamp(1.35rem,5vw,2rem); margin-block:.15rem .4rem; }
.story-verse-header { justify-content:space-between; }
#story-content { margin-block:.65rem; line-height:1.5; }
#story-content h3 { margin-block:.4rem; }
#story-content a { color:var(--gold); }
#story-content p { margin-block:.35rem; }
.story-verse-actions,.story-navigation,.story-tools { margin-block-start:.55rem; }
.story-navigation .primary { margin-inline-start:auto; }
.story-navigation .primary:disabled { opacity:.5; }
.story-tools { justify-content:space-between; border-block-start:1px solid #5c5262; padding-block-start:.55rem; }
.story-choices .choice { text-align:start; }
#story-content [role="status"] > * { display:block; margin-block:.35rem; }
#story-share-status { overflow-wrap:anywhere; }
#story-scene { position:relative; height:clamp(4.75rem,17svh,9rem); overflow:hidden; background:#17223a; }
#story-scene div,#story-scene span { position:absolute; inset:0; }
#story-scene div { background:center 46% / cover no-repeat url(wadi.jpg); animation:story-drift 19s ease-in-out infinite alternate; }
#story-scene[data-scene="dunes"] div { background-image:url(dunes.jpg); }
#story-scene[data-scene="dawn"] div { background-image:url(hills.jpg); }
#story-scene span {
  background:radial-gradient(ellipse at 32% 65%,#b8d7ff40,transparent 48%),
    radial-gradient(circle at 59% 20%,#fff9cf 0 1px,transparent 2px),
    radial-gradient(circle at 70% 29%,#fff4cf 0 1px,transparent 2px);
  animation:story-light 7s ease-in-out infinite alternate;
}
#story-scene[data-scene="dunes"] span,#story-scene[data-scene="dawn"] span {
  background:linear-gradient(101deg,transparent 16%,#fdd59738 48%,transparent 76%);
}
@keyframes story-drift { from { transform:scale(1.05) translateX(0); } to { transform:scale(1.12) translateX(-1.5%); } }
@keyframes story-light { from { opacity:.24; transform:translateX(-2%); } to { opacity:.74; transform:translateX(3%); } }
@media (prefers-reduced-motion: reduce) {
  #story-scene div,#story-scene span { animation:none; }
}
#story-scene[data-scene="night"]::after {
  content:""; position:absolute; inset:57% 7% 0; pointer-events:none;
  background:repeating-linear-gradient(174deg,transparent 0 7px,#b7dcff42 9px,transparent 12px);
  mask-image:radial-gradient(ellipse at 42% 60%,#000,transparent 58%);
  animation:story-ripples 8s ease-in-out infinite alternate;
}
@keyframes story-ripples {
  from { transform:translateX(-4%); opacity:.16; }
  to { transform:translateX(6%); opacity:.54; }
}
@media (prefers-reduced-motion: reduce) {
  #story-scene[data-scene="night"]::after { animation:none; }
}
#story-reader[open] { display:flex; flex-direction:column; overflow:hidden; }
#story-scene { flex:none; }
#story-reader:not(.story-narrative) #story-scene div,
#story-reader:not(.story-narrative) #story-scene span,
#story-reader:not(.story-narrative) #story-scene::after { animation-play-state: paused; }
/* Yaqub’s narrative moves from a quiet, shaded valley to an open search at first light. */
#story-reader[data-story="yaqub-hope"].story-narrative #story-scene {
  height: clamp(8rem, 27svh, 14rem);
}
#story-reader[data-story="yaqub-hope"].story-narrative #story-scene div {
  background-image: url(dunes.jpg);
  background-position: 61% 52%;
  animation: yaqub-valley 10s ease-in-out both;
}
#story-reader[data-story="yaqub-hope"].story-narrative #story-scene span {
  background: radial-gradient(ellipse at 79% 48%, #ffc77e55, transparent 46%);
  animation: yaqub-first-light 10s ease-in-out both;
}
#story-reader[data-story="yaqub-hope"].story-narrative #story-scene::after {
  content: none;
}
#story-reader[data-story="yaqub-hope"].story-narrative #story-scene span::before,
#story-reader[data-story="yaqub-hope"].story-narrative #story-scene span::after {
  content: "";
  position: absolute;
  width: .85rem;
  height: .85rem;
  border-radius: 50%;
  background: radial-gradient(circle, #fff1c5 0 9%, #ffbe63b8 18%, #f6a75e38 46%, transparent 72%);
  animation: yaqub-search-light 6.5s .75s ease-in-out both;
}
#story-reader[data-story="yaqub-hope"].story-narrative #story-scene span::before {
  --search-start: 36%;
  --search-end: 59%;
  --search-horizon: 55%;
}
#story-reader[data-story="yaqub-hope"].story-narrative #story-scene span::after {
  --search-start: 49%;
  --search-end: 76%;
  --search-horizon: 59%;
  animation-delay: 1.2s;
}
@keyframes yaqub-valley {
  from { transform: scale(1.20) translateX(3%); filter: brightness(.51) saturate(.52) hue-rotate(10deg); }
  28% { filter: brightness(.57) saturate(.58); }
  to { transform: scale(1.04) translateX(0); filter: brightness(.97) saturate(.88); }
}
@keyframes yaqub-first-light {
  0%, 27% { opacity: 0; }
  52% { opacity: .58; }
  100% { opacity: .85; }
}
@keyframes yaqub-search-light {
  0%, 16% { left: var(--search-start); top: 84%; opacity: 0; transform: scale(1.12); }
  38% { opacity: 1; }
  82% { opacity: .85; }
  100% { left: var(--search-end); top: var(--search-horizon); opacity: 0; transform: scale(.35); }
}
@media (prefers-reduced-motion: reduce) {
  #story-reader[data-story="yaqub-hope"].story-narrative #story-scene div,
  #story-reader[data-story="yaqub-hope"].story-narrative #story-scene span,
  #story-reader[data-story="yaqub-hope"].story-narrative #story-scene span::before,
  #story-reader[data-story="yaqub-hope"].story-narrative #story-scene span::after { animation: none; }
  #story-reader[data-story="yaqub-hope"].story-narrative #story-scene span::before,
  #story-reader[data-story="yaqub-hope"].story-narrative #story-scene span::after { content: none; }
}
.story-reader-inner { display:flex; flex-direction:column; min-height:0; }
.story-heading,.story-navigation,.story-tools { flex:none; }
#story-content { min-height:0; overflow:auto; overscroll-behavior:contain; outline:none; }
#story-content > a { font-size:.84rem; }

.story-references { margin-block-start:.8rem; font-size:.87rem; color:var(--muted); }
.story-save-options { margin-block:.45rem; }
.story-save-options .story-verse-actions { justify-content:space-between; }

#open-daily { margin-block-start: .75rem; }
.journey-audio-control { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; }

/* Each landscape uses an environmental detail from its passage as the focal point. */
#story-reader[data-story="yusuf-forgives"] {
  --story-wash: linear-gradient(105deg, #7893c43d, transparent 42%, #ffcb896b);
  --story-wash-motion: story-opening-light;
}
#story-reader[data-story="yusuf-reunion"] {
  --story-wash: radial-gradient(ellipse at 30% 58%, #ffbd715c, transparent 47%),
    radial-gradient(ellipse at 73% 55%, #ffdf9a63, transparent 46%);
  --story-wash-motion: story-converging-light;
}
#story-reader[data-story="musa-madyan"] {
  --story-wash: repeating-radial-gradient(ellipse at 54% 78%, transparent 0 12px, #a8e0df65 14px, transparent 17px 25px);
  --story-mask: radial-gradient(ellipse at 54% 80%, #000 9%, transparent 53%);
  --story-wash-motion: story-rings;
}
#story-reader[data-story="musa-trust"] {
  --story-wash: radial-gradient(ellipse at 71% 69%, #ffc77fb3, #e2a05635 23%, transparent 53%);
  --story-wash-motion: story-steady-light;
}
#story-reader[data-story="maryam-palm"] {
  --story-position: 15% 58%;
  --story-wash: radial-gradient(circle at 23% 38%, #e2a95d 0 2px, transparent 3px),
    radial-gradient(circle at 27% 31%, #e2a95d 0 2px, transparent 3px),
    radial-gradient(ellipse at 24% 24%, #ffca7c84, transparent 52%);
  --story-wash-motion: story-falling-light;
}
#story-reader[data-story="people-of-the-cave"] {
  --story-wash: radial-gradient(ellipse at 57% 59%, #ffefba43 0 18%, #0c1226c7 61%, #080d1a 87%);
  --story-wash-motion: story-shelter;
}
#story-reader[data-story="ayyub-prays"] {
  --story-wash: linear-gradient(165deg, #4b5d9444 18%, transparent 43%, #edd09b87 79%);
  --story-wash-motion: story-clearing;
}
#story-reader[data-story="yunus-prays"] {
  --story-position: 50% 74%;
  --story-wash: radial-gradient(ellipse at 60% 63%, #87e0d466, transparent 43%),
    repeating-linear-gradient(169deg, #172a5566 0 13px, #6ac1ce42 16px, transparent 22px 32px);
  --story-wash-motion: story-water-surface;
}
#story-reader[data-story="luqman-advises"] {
  --story-wash: radial-gradient(circle at 43% 64%, #fff4b8 0 2px, #ffe4a044 4px 8px, transparent 26%);
  --story-wash-motion: story-small-light;
}
#story-reader[data-story="sulayman-gratitude"] {
  --story-position: 42% 74%;
  --story-wash: radial-gradient(circle at 42% 78%, #221a19 0 2px, transparent 3px),
    radial-gradient(circle at 46% 74%, #221a19 0 2px, transparent 3px),
    radial-gradient(circle at 50% 70%, #221a19 0 2px, transparent 3px),
    radial-gradient(ellipse at 53% 79%, #f5c56c80, transparent 39%);
  --story-wash-motion: story-sheltering-trail;
}
#story-reader[data-story="gentle-speech"] {
  --story-wash: linear-gradient(105deg, transparent 12%, #ffe5ad5e 51%, transparent 83%);
  --story-wash-motion: story-gentle-wind;
}
#story-reader:is(.story-narrative, .story-takeaway):not([data-story="yaqub-hope"]) #story-scene div {
  background-position: var(--story-position, center 46%);
}
#story-reader:is(.story-narrative, .story-takeaway):not([data-story="yaqub-hope"]) #story-scene span {
  background: var(--story-wash);
  mask-image: var(--story-mask, none);
  animation: var(--story-wash-motion) 9s ease-in-out both;
}
#story-reader.story-narrative:not([data-story="yaqub-hope"]) #story-scene {
  height: clamp(8rem, 25svh, 13rem);
}
#story-reader.story-takeaway #story-scene div,
#story-reader.story-takeaway #story-scene span,
#story-reader.story-takeaway #story-scene::after { animation-play-state: running; }
#story-reader.story-takeaway[data-story="yaqub-hope"] #story-scene div {
  background-image: url(dunes.jpg);
  background-position: 61% 52%;
}
#story-reader.story-takeaway[data-story] #story-scene span {
  animation: story-takeaway-light 6s ease-in-out both;
}
#story-reader.story-takeaway[data-story="yaqub-hope"] #story-scene span {
  background: radial-gradient(ellipse at 79% 48%, #ffc77e55, transparent 46%);
}
@keyframes story-takeaway-light { from { opacity: .42; } to { opacity: .72; } }
@keyframes story-sheltering-trail {
  from { opacity: .28; transform: translate(-9%, 5%); }
  to { opacity: .88; transform: translate(3%, -2%); }
}
#story-reader.story-takeaway:is([data-story="yaqub-hope"], [data-story="yunus-prays"]) #story-scene::after { content: none; }
#story-reader.story-takeaway #story-content > p:first-of-type,
.lesson-view #feedback,
#practice-answer:not([hidden]) > p { animation: lesson-appear .55s ease-out both; }
@keyframes lesson-appear { from { opacity: .35; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes story-opening-light { from { opacity: .15; transform: translateX(-16%); } to { opacity: .88; transform: none; } }
@keyframes story-converging-light { from { opacity: .16; transform: scaleX(1.38); } to { opacity: .9; transform: scaleX(.92); } }
@keyframes story-rings { from { opacity: .16; transform: scale(.55); } 65% { opacity: .9; } to { opacity: .45; transform: scale(1.24); } }
@keyframes story-steady-light { 0% { opacity: .15; } 50% { opacity: .95; } 62% { opacity: .7; } to { opacity: .85; } }
@keyframes story-falling-light { from { opacity: .35; transform: translateY(-12%); } 57% { opacity: .8; } to { opacity: .72; transform: translateY(10%); } }
@keyframes story-shelter { from { opacity: .48; transform: scale(1.24); } to { opacity: .95; transform: scale(.96); } }
@keyframes story-clearing { from { opacity: .2; transform: translateY(16%); } to { opacity: .9; transform: none; } }
@keyframes story-water-surface { from { opacity: .15; transform: translateY(12%); } to { opacity: .85; transform: translateY(-5%); } }
@keyframes story-small-light { from { opacity: .16; transform: scale(.85); } 65% { opacity: .94; } to { opacity: .75; transform: scale(1.06); } }
@keyframes story-gentle-wind { from { opacity: .2; transform: translateX(-24%); } to { opacity: .86; transform: translateX(9%); } }
@media (prefers-reduced-motion: reduce) {
  #story-reader:is(.story-narrative, .story-takeaway):not([data-story="yaqub-hope"]) #story-scene span,
  #story-reader.story-takeaway[data-story] #story-scene span,
  #story-reader.story-takeaway #story-content > p:first-of-type,
  .lesson-view #feedback,
  #practice-answer:not([hidden]) > p { animation: none; }
}

#topic-reader {
  width: min(34rem, calc(100% - 1.25rem));
  max-height: calc(100dvh - 1.25rem);
  padding: 0;
}
#topic-reader[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#topic-reader .topic-scene {
  position: relative;
  flex: none;
  height: clamp(6rem, 24svh, 12rem);
  overflow: hidden;
  background: #17223a;
}
.topic-scene::before, .topic-scene::after {
  content: "";
  position: absolute;
  inset: 0;
}
.topic-scene::before {
  background: var(--topic-image) var(--topic-position, center) / cover no-repeat;
  filter: var(--topic-tone, none);
}
.topic-scene::after {
  background: var(--topic-light);
  animation: var(--topic-motion, topic-light) var(--topic-duration, 9s) ease-in-out infinite alternate;
}
#topic-reader[data-topic="mercy"] {
  --topic-image: url(dunes.jpg);
  --topic-position: center 49%;
  --topic-light: radial-gradient(ellipse at 77% 51%, #ffd89a76, transparent 45%);
  --topic-duration: 13s;
}
#topic-reader[data-topic="resilience"] {
  --topic-image: url(wadi.jpg);
  --topic-position: center 66%;
  --topic-light: repeating-linear-gradient(177deg, transparent 0 8px, #a9def642 10px, transparent 13px);
  --topic-motion: topic-water;
  --topic-duration: 6s;
}
#topic-reader[data-topic="prayer"] {
  --topic-image: url(lantern-arch.jpg);
  --topic-position: center 40%;
  --topic-tone: brightness(.82);
  --topic-light: radial-gradient(ellipse at 77% 26%, #ffd48762, transparent 48%);
  --topic-duration: 5s;
}
#topic-reader[data-topic="generosity"] {
  --topic-image: url(hills.jpg);
  --topic-position: center 60%;
  --topic-light: linear-gradient(100deg, transparent 24%, #ffdc8a55 63%, transparent 89%);
}
#topic-reader[data-topic="relationships"] {
  --topic-image: url(lantern-arch-city.jpg);
  --topic-position: center 65%;
  --topic-light: radial-gradient(ellipse at 52% 64%, #ffca855a, transparent 50%);
  --topic-duration: 12s;
}
@keyframes topic-light {
  from { opacity: .30; }
  to { opacity: .86; }
}
@keyframes topic-water {
  from { opacity: .20; transform: translateX(-2%); }
  to { opacity: .62; transform: translateX(2%); }
}
#topic-reader[data-topic="resilience"] .topic-scene::after {
  mask-image: radial-gradient(ellipse at 52% 79%, #000, transparent 56%);
}
#topic-reader-progress {
  margin-block: .3rem 0;
  color: var(--muted);
  font-size: .85rem;
}
#topic-reader-content {
  min-height: 0;
  margin-block-start: .7rem;
  overflow: auto;
  overscroll-behavior: contain;
  line-height: 1.55;
}
#topic-reader-content:focus { outline: none; }
#topic-reader-content details, .topic-previous-run { margin-block-start: .6rem; }
#earlier-journey-list { display: grid; gap: .5rem; list-style: none; padding: 0; }
#earlier-journey-list button { inline-size: 100%; text-align: start; }
#weekly-complete { margin: 0 auto; }
#home-review { justify-self: center; }
.topic-closing-prompt { color: var(--home-ivory); }
.topic-related-story { display: inline-block; margin-inline-start: .5rem; }
.topic-featured-label { color: var(--gold); font-size: .85rem; }
.topic-more-reflections { margin-block: .6rem; }
.topic-more-reflections summary { cursor: pointer; }
.topic-more-reflections button {
  display: block;
  margin-block-start: .4rem;
  text-align: start;
}
.topic-passages {
  display: grid;
  gap: .25rem;
  margin-block: .55rem 0;
  padding-inline-start: 1.25rem;
}
.topic-passages a { color: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  .topic-scene::after { animation: none; opacity: .45; }
}

.topic-group h3 {
  margin-block: .7rem .35rem;
  color: var(--muted);
  font-size: .91rem;
}
.topic-group .topic-choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block-end: .45rem;
}
.topic-group .topic-choices button { text-align: start; overflow-wrap: anywhere; }
#toggle-all-topics { margin-block-start: .3rem; }

#topic-reader[data-topic="marriage"] {
  --topic-image: url(mosque-title.jpg);
  --topic-position: center 58%;
  --topic-light: radial-gradient(ellipse at 48% 62%, #ffd59b67, transparent 57%);
  --topic-duration: 8s;
}
#topic-reader[data-topic="children"] {
  --topic-image: url(wadi.jpg);
  --topic-position: 19% 43%;
  --topic-tone: saturate(.78) brightness(1.1);
  --topic-light: linear-gradient(117deg, transparent 17%, #e8edb94c 49%, transparent 76%);
  --topic-motion: topic-breeze;
  --topic-duration: 11s;
}
#topic-reader[data-topic="parents"] {
  --topic-image: url(lantern-arch.jpg);
  --topic-position: 28% 60%;
  --topic-tone: saturate(.78);
  --topic-light: radial-gradient(ellipse at 24% 42%, #ffd8987a, transparent 43%);
  --topic-duration: 7s;
}
#topic-reader[data-topic="money"] {
  --topic-image: url(dunes.jpg);
  --topic-position: 24% 72%;
  --topic-tone: saturate(.63) brightness(.9);
  --topic-light: linear-gradient(160deg, transparent 32%, #f5c99752 68%, transparent 90%);
  --topic-motion: topic-breeze;
  --topic-duration: 14s;
}
#topic-reader[data-topic="grief"] {
  --topic-image: url(hills.jpg);
  --topic-position: 72% 47%;
  --topic-tone: brightness(.72) saturate(.68);
  --topic-light: radial-gradient(ellipse at 70% 37%, #aec8f257, transparent 53%);
  --topic-duration: 16s;
}
#topic-reader[data-topic="friendship"] {
  --topic-image: url(lantern-arch-city.jpg);
  --topic-position: center 77%;
  --topic-light: radial-gradient(ellipse at 38% 69%, #ffd48961, transparent 36%),
    radial-gradient(ellipse at 64% 73%, #e6ad6e4d, transparent 35%);
  --topic-duration: 10s;
}
@keyframes topic-breeze {
  from { opacity: .25; transform: translateX(-6%); }
  to { opacity: .71; transform: translateX(5%); }
}

.topic-save-lesson { margin-block-start: .65rem; }
#saved-topic-lessons { margin-block-start: 1rem; }
#saved-topic-heading { margin-block-end: .45rem; font-size: 1rem; }
#saved-topic-list { display: grid; gap: .35rem; padding: 0; list-style: none; }
#saved-topic-list button { inline-size: 100%; text-align: start; }

#topic-share-status { overflow-wrap: anywhere; margin-block-start: .6rem; }
