/* mengin., KAISAR's platform game (quest.html). Loaded after styles.css and sections.css, which give it the site's
   type and colours. The game is drawn by the scripts on one canvas inside .quest__view; what is laid out here is
   the words and controls over it. While playing almost nothing is: eight pips for the lights at the bottom, a
   count of threads that shows for a moment, and words that float in the world with no box round them.
   On a phone held upright the view takes the top of the screen and the thumb controls the space below; on its
   side, and on a desk, the view takes everything and the thumb controls lie over its lower corners. */

.quest-page { background: #170611; color-scheme: dark; height: 100%; overflow: hidden; }

.quest {
  --night: #170611;
  --rule: rgb(213 196 222 / 0.18);
  --pad: clamp(1rem, 3.2vw, 3rem);
  margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--on-ink);
  overscroll-behavior: none; -webkit-tap-highlight-color: transparent;
}
.quest [hidden] { display: none !important; }      /* the site shows every img as a block, which would undo the attribute */
.quest :focus-visible { outline: 2px solid var(--on-ink); outline-offset: 3px; border-radius: 4px; }
.quest ::selection { background: var(--copper-lit); color: var(--night); }

.quest__shell { position: fixed; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }      /* no scroll, zoom, selection or long-press menu of the browser's own */
.quest__view { position: relative; min-height: 0; overflow: hidden; outline: none; background: var(--night); }
.quest__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.quest__nojs { position: absolute; inset: 0; display: grid; place-content: center; margin: 0; padding: 2rem; text-align: center; color: var(--on-ink-soft); }
.quest__nojs a { color: var(--copper-lit); }
.quest__live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- While playing ---------- */

.quest__pips { position: absolute; left: 50%; bottom: max(0.7rem, env(safe-area-inset-bottom)); translate: -50% 0; display: flex; gap: 0.42rem; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.quest__pips li { --tone: var(--copper-lit); width: 0.44rem; height: 0.44rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(251 250 251 / 0.42); transition: background-color 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out); }
.quest__pips li.is-lit { background: var(--tone); box-shadow: 0 0 0.55rem 0.05rem var(--tone); }
.quest__pips span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.quest__count {
  position: absolute; top: max(0.75rem, env(safe-area-inset-top)); right: max(0.9rem, env(safe-area-inset-right)); margin: 0;
  font: 600 1.0625rem/1 var(--display); font-variant-numeric: tabular-nums; color: var(--copper-lit); text-shadow: 0 0 0.9rem rgb(232 146 104 / 0.55), 0 1px 2px rgb(10 3 8 / 0.9);
  opacity: 0; translate: 0 -0.3rem; transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out); pointer-events: none;
}
.quest__count.is-shown { opacity: 1; translate: 0 0; transition-duration: 0.15s; }
.quest__count-of { font: 400 0.75rem/1 var(--text); color: var(--on-ink-soft); }

.quest__pause {
  position: absolute; top: max(0.4rem, env(safe-area-inset-top)); left: max(0.4rem, env(safe-area-inset-left)); display: none; place-items: center;
  width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--on-ink); opacity: 0.45; cursor: pointer;
}
.quest__shell[data-touch] .quest__pause { display: grid; }

/* Words in the world: no box, only a soft shadow so they read against anything. */
.quest__hint, .quest__banner { text-shadow: 0 1px 2px rgb(10 3 8 / 0.95), 0 0 1.1rem rgb(10 3 8 / 0.85); pointer-events: none; }
.quest__hint { position: absolute; left: 0; top: 0; margin: 0; white-space: nowrap; font: 400 0.875rem/1.2 var(--text); letter-spacing: 0.02em; color: rgb(251 250 251 / 0.82); will-change: transform; }
.quest__hint kbd { font: 600 0.9375rem/1 var(--display); color: var(--copper-lit); }
.quest__banner { position: absolute; left: 50%; top: 13%; translate: -50% 0; width: min(92%, 40rem); text-align: center; }
.quest__banner-title { margin: 0; font: 800 1rem/0.98 var(--display); font-size: clamp(2rem, 5.6vw, 3.9rem); letter-spacing: -0.02em; text-wrap: balance; }
.quest__banner-line { margin: 0.6rem 0 0; font: 400 clamp(0.9375rem, 1.5vw, 1.125rem)/1.4 var(--text); color: var(--on-ink-soft); text-wrap: balance; }
.quest__banner-line kbd { font: 600 1em/1 var(--display); color: var(--copper-lit); }
.quest__eyebrow { margin: 0 0 0.6rem; font: 500 0.75rem/1.2 var(--text); letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper-lit); }

.quest__shell[data-screen="title"] :is(.quest__pips, .quest__count, .quest__pause, .quest__hint, .quest__say, .quest__banner, .quest__pad, .quest__turn) { display: none !important; }
.quest__shell[data-screen="story"] :is(.quest__pips, .quest__count, .quest__pause, .quest__banner, .quest__title, .quest__turn) { display: none !important; }
.quest__shell[data-screen="story"]:not([data-control]) :is(.quest__pad, .quest__hint) { display: none !important; }
.quest__shell:not([data-screen="story"]) :is(.quest__line, .quest__names, .quest__card, .quest__skip) { display: none !important; }
.quest__shell[data-screen="play"] .quest__title { display: none; }

/* ---------- Touch ---------- */

.quest__pad { position: absolute; inset: auto 0 0 0; z-index: 2; height: 74%; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 max(0.9rem, env(safe-area-inset-right)) max(0.8rem, env(safe-area-inset-bottom)) max(0.9rem, env(safe-area-inset-left)); pointer-events: none; user-select: none; -webkit-user-select: none; touch-action: none; }
.quest__stick, .quest__key { pointer-events: auto; touch-action: none; }
.quest__stick { position: relative; align-self: stretch; width: 48%; }
.quest__stick::before { content: ""; position: absolute; left: clamp(3.4rem, 22%, 5rem); bottom: 3.3rem; width: 4.8rem; height: 4.8rem; margin: -2.4rem; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgb(251 250 251 / 0.16); transition: opacity 0.2s; }      /* at rest, a faint mark where a thumb may go */
.quest__stick.is-held::before { opacity: 0; }
.quest__base { position: absolute; left: 0; top: 0; width: 6.6rem; height: 6.6rem; margin: -3.3rem 0 0 -3.3rem; border-radius: 50%; background: rgb(251 250 251 / 0.05); box-shadow: inset 0 0 0 1.5px rgb(251 250 251 / 0.3); opacity: 0; transition: opacity 0.12s; pointer-events: none; }
.quest__stick.is-held .quest__base { opacity: 1; }
.quest__knob { position: absolute; left: 50%; top: 50%; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; border-radius: 50%; background: rgb(232 146 104 / 0.34); box-shadow: inset 0 0 0 1.5px rgb(232 146 104 / 0.8); }
.quest__keys { position: relative; width: 11.6rem; height: 9.5rem; max-height: 100%; }
.quest__key {
  position: absolute; display: grid; place-items: center; width: 4.1rem; height: 4.1rem; padding: 0; border: 0; border-radius: 50%;
  background: rgb(251 250 251 / 0.06); box-shadow: inset 0 0 0 1.5px rgb(251 250 251 / 0.3); color: rgb(251 250 251 / 0.78);
  font: 500 0.6875rem/1 var(--text); letter-spacing: 0.08em; text-transform: uppercase; transition: background-color 0.1s, scale 0.1s, opacity 0.4s;
}
.quest__key.is-held { background: rgb(232 146 104 / 0.4); scale: 0.94; }
.quest__key.is-off { opacity: 0.22; }
.quest__key--jump { right: 0; bottom: 0; width: 5.4rem; height: 5.4rem; box-shadow: inset 0 0 0 1.5px rgb(232 146 104 / 0.8); color: var(--on-ink); font-size: 0.75rem; }
.quest__key--dash { right: 5.9rem; bottom: 0.3rem; }
.quest__key--thread { right: 3.4rem; bottom: 5.2rem; }

@media (orientation: portrait) {
  /* upright: the view on top, the controls in their own ground below it */
  .quest__shell[data-touch][data-screen="play"] { grid-template-rows: minmax(0, 1fr) auto; }
  .quest__shell[data-touch] .quest__pad { position: relative; inset: auto; height: clamp(11.5rem, 33vh, 17rem); padding-top: 0.9rem; align-items: center; background: linear-gradient(#1d0919, var(--night)); box-shadow: inset 0 1px 0 var(--rule); }
  .quest__shell[data-touch] .quest__keys { height: calc(100% - 0.4rem); max-height: 10.5rem; }
}

/* ---------- The title ---------- */

.quest__title {
  position: absolute; inset: 0; z-index: 3; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 1rem;
  padding: max(1rem, env(safe-area-inset-top)) var(--pad) max(1rem, env(safe-area-inset-bottom)); overflow-y: auto;
  background: linear-gradient(to top, rgb(23 6 17 / 0.94) 0%, rgb(23 6 17 / 0.72) 42%, rgb(23 6 17 / 0.12) 78%);
}
.quest__top { display: flex; align-items: center; justify-content: space-between; }
.quest__mark { display: block; width: 2.3rem; }
.quest__back { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.6rem 0; font: 500 0.8125rem/1 var(--text); letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; color: var(--on-ink-soft); transition: color 0.25s var(--ease-out); }
.quest__back svg { width: 1em; height: 1em; transition: translate 0.35s var(--ease-out); }
.quest__back:hover { color: var(--on-ink); }
.quest__back:hover svg { translate: -0.2em 0; }
@media (max-width: 379px) { .quest__back span { display: none; } }
.quest__words { align-self: end; max-width: 34rem; }
.quest__name { margin: 0; font: 800 1rem/0.86 var(--display); font-size: clamp(4.2rem, 17vw, 11rem); letter-spacing: -0.035em; text-shadow: 0 0 3.2rem rgb(232 146 104 / 0.28); }
.quest__sub { margin: 0.9rem 0 0; font: 500 clamp(1.125rem, 2.3vw, 1.6rem)/1.15 var(--display); color: var(--copper-lit); }
.quest__lede { margin: 0.9rem 0 0; max-width: 30rem; font: 400 clamp(0.9375rem, 1.3vw, 1.0625rem)/1.5 var(--text); color: var(--on-ink-soft); text-wrap: pretty; }
.quest__menu { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.quest__foot { margin: 0; font: 400 0.8125rem/1.4 var(--text); color: #a691b3; }

.quest__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; min-height: 2.9rem; padding: 0 1.15rem;
  border: 1.5px solid rgb(232 146 104 / 0.5); border-radius: 10px; background: rgb(23 6 17 / 0.62); color: var(--copper-lit);
  font: 500 0.8125rem/1 var(--text); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.quest__btn:hover { background: var(--copper-lit); border-color: var(--copper-lit); color: var(--night); }
.quest__btn:active { transform: translateY(1px); }
.quest__btn[aria-pressed="false"] { color: var(--on-ink-soft); border-color: var(--rule); }
.quest__btn--go { min-width: 8.5rem; background: var(--copper); border-color: var(--copper); color: #fff; }
.quest__btn--go:hover { background: var(--copper-lit); border-color: var(--copper-lit); color: var(--night); }

@media (min-width: 900px) {
  .quest__title { background: linear-gradient(90deg, rgb(23 6 17 / 0.93) 0%, rgb(23 6 17 / 0.7) 34%, rgb(23 6 17 / 0) 68%), linear-gradient(to top, rgb(23 6 17 / 0.5), rgb(23 6 17 / 0) 30%); padding-block: clamp(1.2rem, 3.5vh, 2.2rem); }
  .quest__mark { width: 2.9rem; }
  .quest__words { align-self: center; }
}
@media (max-height: 520px) {
  /* a phone on its side: the words in two columns, so the title and the menu both fit */
  .quest__title { gap: 0.3rem; }
  .quest__words { max-width: none; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 2rem; align-items: end; }
  .quest__words > .quest__eyebrow { grid-column: 1 / -1; margin-bottom: 0.2rem; }
  .quest__name { font-size: clamp(3rem, 19vh, 5rem); line-height: 0.95; grid-row: 2 / 4; align-self: end; padding-bottom: 0.25rem; }
  .quest__sub { margin: 0; align-self: end; font-size: 1.125rem; }
  .quest__lede { display: none; }
  .quest__menu { margin-top: 0.5rem; }
  .quest__btn { min-height: 2.6rem; padding: 0 0.85rem; }
  .quest__foot { font-size: 0.75rem; }
}

/* ---------- The sheets: levels, how to play, pause, result ---------- */

.quest__sheet {
  width: min(38rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); padding: clamp(1.25rem, 4vw, 2.25rem); overflow-y: auto;
  border: 1px solid rgb(232 146 104 / 0.4); border-radius: 20px; background: #220b2c; color: var(--on-ink); box-shadow: 0 30px 80px rgb(0 0 0 / 0.55);
}
.quest__sheet--small { width: min(25rem, calc(100vw - 1.5rem)); }
.quest__sheet::backdrop { background: rgb(12 3 9 / 0.62); }
.quest__sheet-title { margin: 0 0 1.1rem; font: 800 1rem/0.96 var(--display); font-size: clamp(2rem, 6.5vw, 3rem); letter-spacing: -0.02em; text-transform: lowercase; text-wrap: balance; outline: none; }
.quest__sheet p { margin: 0 0 1rem; font: 400 1rem/1.5 var(--text); color: var(--on-ink-soft); }
.quest__sheet .quest__small, .quest__ending .quest__small { font-size: 0.875rem; color: #b9a5c6; }
.quest__sheet .quest__eyebrow { margin-bottom: 0.5rem; color: var(--copper-lit); font-size: 0.75rem; }
.quest__sheet-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.quest__stack { display: grid; gap: 0.55rem; }
.quest__volume { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.9rem; padding: 0 0.2rem; font: 500 0.8125rem/1 var(--text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-ink-soft); }
.quest__volume input { flex: 1; max-width: 12rem; accent-color: var(--copper-lit); }

.quest__levels { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.quest__level {
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; align-items: center; gap: 0.1rem 0.9rem; width: 100%; padding: 0.8rem 1rem; text-align: left;
  border: 1px solid var(--rule); border-radius: 14px; background: rgb(23 6 17 / 0.45); color: var(--on-ink); cursor: pointer;
  transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.quest__level:hover:not(:disabled) { border-color: var(--copper-lit); background: rgb(232 146 104 / 0.12); }
.quest__level:disabled { cursor: default; color: #8f7a9c; }
.quest__level-n { grid-row: 1 / 3; font: 800 1.7rem/1 var(--display); color: var(--copper-lit); }
.quest__level:disabled .quest__level-n { color: #6b5578; }
.quest__level-name { font: 700 1.125rem/1.1 var(--display); text-transform: lowercase; }
.quest__level-best { grid-column: 2; font: 400 0.8125rem/1.3 var(--text); color: var(--on-ink-soft); }
.quest__level:disabled .quest__level-best { color: #8f7a9c; }
.quest__level-go { grid-row: 1 / 3; grid-column: 3; font: 500 0.6875rem/1 var(--text); letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper-lit); }
.quest__level:disabled .quest__level-go { color: #6b5578; }

.quest__table { width: 100%; margin: 0 0 1rem; border-collapse: collapse; font: 400 0.9375rem/1.4 var(--text); color: var(--on-ink-soft); }
.quest__table th, .quest__table td { padding: 0.5rem 0.6rem 0.5rem 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.quest__table thead th { border-top: 0; font: 500 0.6875rem/1 var(--text); letter-spacing: 0.1em; text-transform: uppercase; color: #a691b3; }
.quest__table tbody th { font-weight: 600; color: var(--on-ink); }
.quest kbd { font: 600 0.8125em/1 var(--display); color: var(--copper-lit); }
.quest__table kbd, .quest__small kbd { display: inline-block; min-width: 1.5em; padding: 0.22em 0.42em; border: 1px solid rgb(232 146 104 / 0.5); border-radius: 5px; text-align: center; }
@media (max-width: 520px) { .quest__table thead { display: none; } .quest__table tr { display: grid; padding: 0.45rem 0; border-top: 1px solid var(--rule); } .quest__table th, .quest__table td { padding: 0.1rem 0; border: 0; } .quest__table td:last-child { display: none; } }

.quest__stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 0.5rem; margin: 0 0 1rem; padding: 0.8rem 0; border-block: 1px solid var(--rule); }
.quest__stats div { display: grid; gap: 0.35rem; }
.quest__stats dt { font: 500 0.6875rem/1 var(--text); letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-ink-soft); }
.quest__stats dd { margin: 0; font: 600 1.25rem/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.quest__result { margin: auto auto max(1rem, 6vh); }      /* low on the screen, so Kai and the light show above it */
.quest__result::backdrop { background: rgb(12 3 9 / 0.3); }

/* The ending: words at the foot of the picture, nothing over the emblem. */
.quest__ending {
  inset: auto 0 0 0; width: 100%; max-width: none; margin: 0; padding: 5rem var(--pad) max(1.2rem, env(safe-area-inset-bottom)); border: 0;
  background: linear-gradient(to top, rgb(23 6 17 / 0.96) 55%, rgb(23 6 17 / 0)); color: var(--on-ink); text-align: center;
}
.quest__ending::backdrop { background: none; }
.quest__ending-title { max-width: 18ch; margin: 0 auto; font: 800 1rem/0.98 var(--display); font-size: clamp(1.9rem, 5.6vw, 4rem); text-wrap: balance; letter-spacing: -0.03em; text-shadow: 0 0 3rem rgb(232 146 104 / 0.4); outline: none; }
.quest__ending-line { max-width: 40rem; margin: 1rem auto 0.6rem; font: 400 clamp(0.9375rem, 1.5vw, 1.125rem)/1.5 var(--text); color: var(--on-ink-soft); text-wrap: balance; }
.quest__ending .quest__sheet-actions { justify-content: center; }
.quest__ending .quest__foot { margin-top: 1.2rem; }

@media (max-height: 520px) {
  /* a phone on its side: the sheets are wide rather than tall */
  .quest__sheet--small { width: min(40rem, calc(100vw - 1.5rem)); padding: 1rem 1.25rem; }
  .quest__sheet-title { margin-bottom: 0.6rem; font-size: 1.7rem; }
  .quest__stack { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .quest__sheet .quest__btn { min-height: 2.5rem; }
  .quest__stats { padding: 0.5rem 0; margin-bottom: 0.6rem; }
  .quest__result { margin: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .quest__sheet[open] { animation: quest-rise 0.45s var(--ease-out) both; }
  .quest__ending[open] { animation: quest-fade 2.4s var(--ease-out) both; }
  .quest__banner:not([hidden]) { animation: quest-banner 4.4s var(--ease-out) both; }
  .quest__hint:not([hidden]) { animation: quest-fade 0.5s var(--ease-out) both; }
  .quest__title .quest__words > * { animation: quest-rise 0.9s var(--ease-out) both; }
  .quest__title .quest__words > :nth-child(2) { animation-delay: 0.08s; } .quest__title .quest__words > :nth-child(3) { animation-delay: 0.16s; }
  .quest__title .quest__words > :nth-child(4) { animation-delay: 0.24s; } .quest__title .quest__words > :nth-child(5) { animation-delay: 0.32s; }
}
@media (prefers-reduced-motion: reduce) { .quest__banner:not([hidden]) { animation: quest-banner-calm 4.4s linear both; } }
@keyframes quest-rise { from { opacity: 0; translate: 0 1.1rem; } }
@keyframes quest-fade { from { opacity: 0; } }
@keyframes quest-banner { 0% { opacity: 0; letter-spacing: 0.04em; } 14% { opacity: 1; letter-spacing: 0; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes quest-banner-calm { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- The story: two bars, one line at a time, the title at the roof's edge ---------- */

.quest__bar { position: absolute; left: 0; right: 0; z-index: 2; height: 0; background: #0b0309; pointer-events: none; transition: height 1.4s var(--ease-out); }
.quest__bar--top { top: 0; } .quest__bar--foot { bottom: 0; }
.quest__shell[data-bars] .quest__bar { height: clamp(1.5rem, 9.5vh, 5rem); }
.quest__line, .quest__names, .quest__say, .quest__card, .quest__turn { text-shadow: 0 1px 2px rgb(10 3 8 / 0.95), 0 0 1.1rem rgb(10 3 8 / 0.85); pointer-events: none; }
.quest__line {
  position: absolute; left: 50%; bottom: clamp(3.2rem, 17vh, 8rem); z-index: 3; translate: -50% 0; width: min(92%, 46rem); margin: 0; text-align: center; text-wrap: balance;
  font: 400 clamp(1.0625rem, 2.2vw, 1.55rem)/1.36 var(--display); color: var(--on-ink); opacity: 0; transition: opacity 0.9s var(--ease-out);
}
.quest__line.is-shown { opacity: 1; }
.quest__names { position: absolute; left: 50%; bottom: clamp(1.7rem, 11vh, 5.4rem); z-index: 3; translate: -50% 0; width: min(94%, 46rem); margin: 0; text-align: center; font: 500 clamp(0.8125rem, 1.4vw, 1rem)/1.3 var(--display); }
.quest__names span { color: var(--tone, var(--copper-lit)); opacity: 0; transition: opacity 0.6s var(--ease-out); }
.quest__names span.is-shown { opacity: 1; }
.quest__say { position: absolute; left: 0; top: 0; z-index: 1; margin: 0; max-width: min(22rem, 70vw); font: 400 0.9375rem/1.3 var(--display); color: #ffd7b4; text-wrap: balance; text-align: center; will-change: transform; }
.quest__card { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; text-align: center; }
.quest__card-title { margin: 0; font: 800 1rem/0.9 var(--display); font-size: clamp(4rem, 17vw, 11.5rem); letter-spacing: -0.035em; }
.quest__card-sub { margin: 0.9rem 0 0; font: 500 clamp(1.1rem, 2.4vw, 1.7rem)/1.15 var(--display); color: var(--copper-lit); }
.quest__skip { position: absolute; right: max(1rem, env(safe-area-inset-right)); bottom: max(0.5rem, env(safe-area-inset-bottom)); z-index: 4; margin: 0; font: 400 0.75rem/1.2 var(--text); letter-spacing: 0.04em; color: rgb(251 250 251 / 0.55); pointer-events: none; }
.quest__skip::after { content: ""; display: block; height: 2px; margin-top: 0.3rem; background: var(--copper-lit); transform-origin: left; scale: var(--held, 0) 1; }
.quest__turn { position: absolute; left: 50%; top: max(3.2rem, env(safe-area-inset-top)); z-index: 2; translate: -50% 0; margin: 0; white-space: nowrap; font: 400 0.8125rem/1.2 var(--text); color: rgb(251 250 251 / 0.78); }
.quest__next { margin: 0 0 0.8rem; font: 400 1.0625rem/1.4 var(--display); color: var(--on-ink); text-wrap: balance; }

/* ---------- The journey: five places down one road, and the lantern's flames filling in ---------- */

.quest__levels { position: relative; gap: 0.55rem; }
.quest__level-flames { grid-column: 2; display: flex; gap: 0.35rem; margin-top: 0.35rem; }
.quest__level-flames i { --tone: var(--copper-lit); width: 0.5rem; height: 0.5rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(251 250 251 / 0.4); }
.quest__level-flames i.is-lit { background: var(--tone); box-shadow: 0 0 0.5rem 0.05rem var(--tone); }
.quest__levels li + li::before { content: ""; display: block; width: 2px; height: 0.55rem; margin: -0.55rem 0 0 2.05rem; background: rgb(232 146 104 / 0.45); }

@media (prefers-reduced-motion: no-preference) {
  .quest__card:not([hidden]) { animation: quest-fade 2.2s var(--ease-out) both; }
  .quest__say:not([hidden]) { animation: quest-fade 0.6s var(--ease-out) both; }
}
