:root {
  --midnight: #101114;
  --slate: #1a1c21;
  --gold: #e9b64a;
  --dawn: #f7d28a;
  --linen: #f4efe4;
  --bg: #101114;
  --bg-rgb: 16, 17, 20;
  --surface: #17191d;
  --raised: #1d2025;
  --text: #f4efe4;
  --muted: #aaa9a4;
  --faint: #8c8d87;
  --accent: #e9b64a;
  --line: rgba(244, 239, 228, 0.13);
  --line-strong: rgba(233, 182, 74, 0.42);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  --font: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

html[data-theme="light"] {
  --bg: #f4efe4;
  --bg-rgb: 244, 239, 228;
  --surface: #fbf7ef;
  --raised: #fffaf2;
  --text: #1a1c21;
  --muted: #65635d;
  --faint: #6c685f;
  --accent: #8b5c08;
  --line: rgba(26, 28, 33, 0.15);
  --line-strong: rgba(139, 92, 8, 0.4);
  --shadow: 0 30px 90px rgba(74, 54, 20, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
  transition: background-color 300ms ease, color 300ms ease;
}

button,
textarea,
input {
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
  outline-offset: 5px;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

button:not(:disabled),
a,
label {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

svg,
picture,
img {
  display: block;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
}

::selection {
  background: var(--gold);
  color: var(--midnight);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--midnight);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: linear-gradient(rgba(var(--bg-rgb), 0.45), rgba(var(--bg-rgb), 0.95)), url("/assets/background.avif");
  background-size: cover;
  background-position: center;
}

html[data-theme="light"] .ambient {
  background-image: radial-gradient(circle at 80% 15%, rgba(233, 182, 74, 0.2), transparent 40%), linear-gradient(rgba(var(--bg-rgb), 0.86), rgba(var(--bg-rgb), 0.96)), url("/assets/background.avif");
}

.chapter-header {
  position: relative;
  z-index: 20;
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: min(1280px, calc(100% - 64px));
  margin-inline: auto;
  border-bottom: 1px solid var(--line);
}

.chapter-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  text-decoration: none;
}

.chapter-brand > svg {
  width: 30px;
  height: 36px;
  color: var(--gold);
}

.chapter-brand > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chapter-brand strong {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.chapter-brand small {
  color: var(--accent);
  font-size: 6px;
  font-weight: 600;
  letter-spacing: 0.25em;
}

.chapter-label {
  color: var(--faint);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.chapter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.round-button {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(var(--bg-rgb), 0.25);
  transition: border-color 200ms ease, background-color 200ms ease;
}

.round-button:hover {
  border-color: var(--line-strong);
  background: var(--raised);
}

.round-button svg {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: opacity 200ms ease, transform 200ms ease;
}

.sun-icon,
.sound-on-icon {
  opacity: 0;
  transform: scale(0.75);
}

html[data-theme="light"] .sun-icon,
.sound-enabled .sound-on-icon {
  opacity: 1;
  transform: scale(1);
}

html[data-theme="light"] .moon-icon,
.sound-enabled .sound-off-icon {
  opacity: 0;
  transform: scale(0.75);
}

.chapter-main {
  position: relative;
  min-height: calc(100svh - 154px);
}

.chapter-main:focus {
  outline: none;
}

.scene {
  position: relative;
  min-height: calc(100svh - 154px);
}

.scene.is-active {
  animation: scene-in 600ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.scene-shell {
  width: min(1100px, calc(100% - 64px));
  margin-inline: auto;
  padding-block: 64px 90px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 26px;
  height: 1px;
  flex: none;
  background: currentColor;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 15px 21px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 200ms ease, background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.primary-button {
  background: var(--gold);
  color: var(--midnight);
  box-shadow: 0 10px 32px rgba(233, 182, 74, 0.14);
}

.primary-button:hover {
  background: var(--dawn);
  box-shadow: 0 14px 38px rgba(233, 182, 74, 0.22);
  transform: translateY(-2px);
}

.primary-button svg,
.secondary-button svg {
  width: 18px;
  height: 18px;
}

.secondary-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.secondary-button:hover {
  border-color: var(--line-strong);
  background: var(--raised);
  transform: translateY(-2px);
}

.danger-button {
  border-color: rgba(210, 105, 90, 0.4);
  background: rgba(210, 105, 90, 0.1);
  color: #eaa398;
}

.text-button,
.back-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
}

.text-button:hover,
.back-button:hover {
  color: var(--accent);
}

.back-button {
  gap: 10px;
  text-decoration: none;
}

.back-button svg {
  width: 18px;
  height: 18px;
}

.intro-scene {
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px max(32px, calc((100vw - 1180px) / 2)) 90px;
}

.intro-art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 61%;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 30%);
}

.intro-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.1), rgba(var(--bg-rgb), 0.38));
  box-shadow: inset 40px 0 100px var(--bg);
}

.intro-art picture,
.intro-art img {
  width: 100%;
  height: 100%;
}

.intro-art img {
  object-fit: cover;
  object-position: 36% center;
  animation: doorway-breathe 10s ease-in-out infinite;
}

html[data-theme="light"] .intro-art {
  opacity: 0.78;
}

.intro-copy {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.chapter-overline {
  margin: 27px 0 20px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.26em;
}

.chapter-overline span {
  margin-inline: 10px;
  color: var(--line-strong);
}

.intro-copy h1 {
  margin: 0;
  font-size: clamp(5.5rem, 10vw, 9rem);
  font-weight: 300;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.intro-copy h1 em {
  color: var(--accent);
  font-style: normal;
}

.intro-lede {
  max-width: 470px;
  margin: 34px 0 30px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.intro-copy .primary-button {
  min-width: 212px;
}

.intro-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 27px;
  color: var(--faint);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.intro-details > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.intro-details svg {
  width: 12px;
  height: 12px;
}

.intro-note {
  position: absolute;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 25px;
  z-index: 2;
  margin: 0;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.map-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 45px;
}

.map-heading h2,
.door-heading h2,
.commitment-heading h2,
.completion-copy h2 {
  margin: 20px 0 13px;
  font-size: clamp(2.8rem, 5.4vw, 4.8rem);
  font-weight: 300;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.map-heading p:not(.eyebrow),
.door-heading > p:not(.eyebrow),
.commitment-heading > p:not(.eyebrow),
.completion-copy > p:not(.eyebrow):not(.card-privacy) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.chapter-progress {
  width: 190px;
  flex: none;
  padding-bottom: 5px;
}

.chapter-progress > span {
  color: var(--accent);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.progress-track {
  height: 2px;
  margin-top: 12px;
  overflow: hidden;
  background: var(--line);
}

.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(233, 182, 74, 0.45);
  transition: width 700ms ease;
}

.door-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.door-card {
  position: relative;
  min-width: 0;
  min-height: 355px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 25px 25px 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color 250ms ease, background-color 250ms ease, transform 250ms ease, box-shadow 250ms ease;
}

.door-card::before {
  content: "";
  position: absolute;
  top: -90px;
  left: 50%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(233, 182, 74, 0.08);
  filter: blur(45px);
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 300ms ease;
}

.door-card:hover {
  border-color: var(--line-strong);
  background: var(--raised);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.door-card:hover::before,
.door-card.is-complete::before {
  opacity: 1;
}

.door-number {
  position: relative;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.door-icon {
  position: relative;
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  align-self: center;
  margin: 30px 0 27px;
  color: var(--accent);
  transition: filter 250ms ease, transform 350ms ease;
}

.door-icon::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.door-icon svg {
  width: 66px;
  height: 66px;
}

.door-card:hover .door-icon {
  filter: drop-shadow(0 0 18px rgba(233, 182, 74, 0.32));
  transform: translateY(-3px);
}

.door-card-copy {
  position: relative;
  display: flex;
  flex-direction: column;
}

.door-maxim {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.door-card-copy strong {
  font-size: 23px;
  font-weight: 450;
  letter-spacing: -0.04em;
}

.door-card-copy > span:last-child {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.door-card-state {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 500;
}

.door-card-state svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.door-card.is-complete {
  border-color: var(--line-strong);
}

.door-card.is-complete .door-card-state {
  color: var(--accent);
}

.map-continuation {
  margin-top: 44px;
  padding: 28px 30px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(233, 182, 74, 0.08), transparent 70%), var(--surface);
  text-align: center;
}

.map-continuation p {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 350;
  letter-spacing: -0.02em;
}

.map-note {
  margin: 27px 0 0;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.7;
  text-align: center;
}

.door-shell {
  max-width: 940px;
  padding-top: 34px;
}

.door-heading {
  max-width: 680px;
  margin: 13px auto 33px;
  text-align: center;
}

.door-heading .eyebrow {
  justify-content: center;
}

.door-heading h2 {
  margin-bottom: 12px;
}

.door-stage {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.1);
}

.door-stage.is-complete {
  border-color: var(--line-strong);
  box-shadow: 0 0 70px rgba(233, 182, 74, 0.12);
}

.door-complete {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 17px;
  background: rgba(16, 17, 20, 0.87);
  color: var(--dawn);
  backdrop-filter: blur(12px);
  animation: completion-in 450ms ease both;
}

.door-complete svg {
  width: 48px;
  height: 48px;
  padding: 10px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.door-complete span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.door-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-top: 16px;
}

.door-footer > p {
  margin: 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.7;
}

.door-footer .text-button {
  flex: none;
}

.guided-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 24px;
  padding: 26px 28px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
}

.guided-panel h3 {
  margin: 12px 0 8px;
  font-size: 21px;
  font-weight: 450;
  letter-spacing: -0.03em;
}

.guided-panel p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.guided-panel .secondary-button {
  flex: none;
}

.spirit-space {
  --settle: 0;
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 52%, rgba(233, 182, 74, calc(0.05 + var(--settle) * 0.14)), transparent 37%), linear-gradient(135deg, rgba(255, 255, 255, 0.015), transparent);
}

.static-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--dawn);
  opacity: calc(0.45 * (1 - var(--settle)));
  animation: static-drift var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.breath-wrap {
  position: relative;
  z-index: 2;
  padding: 35px 20px;
  text-align: center;
}

.breath-orb {
  position: relative;
  width: 230px;
  height: 230px;
  display: grid;
  place-items: center;
  margin-inline: auto;
}

.breath-orb::before,
.breath-orb::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  opacity: calc(0.35 + var(--settle) * 0.65);
}

.breath-orb::before {
  inset: 0;
}

.breath-orb::after {
  inset: 23px;
  border-style: dashed;
  opacity: calc(0.2 + var(--settle) * 0.6);
}

.breath-core {
  position: relative;
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 35%, var(--dawn), var(--gold) 62%, #b88022);
  color: #17130a;
  box-shadow: 0 0 calc(35px + var(--settle) * 60px) rgba(233, 182, 74, calc(0.17 + var(--settle) * 0.28));
}

.breath-label {
  max-width: 100px;
  padding: 10px;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
  text-align: center;
}

.spirit-space.is-running .breath-core {
  animation: breathe 8s ease-in-out infinite;
}

.spirit-space.is-paused .breath-core {
  animation-play-state: paused;
}

.breath-caption {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.spirit-progress {
  width: 190px;
  height: 2px;
  margin: 21px auto 0;
  overflow: hidden;
  background: var(--line);
}

.spirit-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
}

.spirit-actions {
  min-height: 48px;
  margin-top: 17px;
}

.spirit-actions .secondary-button {
  min-height: 46px;
  padding-block: 11px;
}

.community-field {
  position: relative;
  height: 430px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(233, 182, 74, 0.06), transparent 33%), linear-gradient(120deg, rgba(255, 255, 255, 0.015), transparent);
  touch-action: pan-y;
}

.community-field::before,
.community-field::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(transparent, var(--line), transparent);
}

.community-field::before {
  left: 33.333%;
}

.community-field::after {
  right: 33.333%;
}

.shared-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: background-color 500ms ease, box-shadow 500ms ease;
}

.shared-halo::before,
.shared-halo::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.shared-halo::before {
  inset: 27px;
}

.shared-halo::after {
  inset: 56px;
  background: rgba(233, 182, 74, 0.05);
}

.shared-halo > span {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  width: 180px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-align: center;
  transform: translateX(-50%);
}

.connection-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.connection-lines line {
  stroke: var(--gold);
  stroke-width: 1;
  stroke-dasharray: 3 7;
  opacity: 0.35;
  transition: opacity 200ms ease;
}

.light-node {
  position: absolute;
  z-index: 4;
  width: 74px;
  height: 74px;
  padding: 0;
  border: 1px solid var(--dawn);
  border-radius: 50%;
  background: radial-gradient(circle at 42% 35%, #fff4ce, var(--gold) 55%, #b37816);
  box-shadow: 0 0 35px rgba(233, 182, 74, 0.3);
  transform: translate(-50%, -50%);
  touch-action: none;
  cursor: grab;
  transition: box-shadow 200ms ease;
}

.light-node:active {
  cursor: grabbing;
}

.light-node:hover,
.light-node:focus-visible {
  box-shadow: 0 0 55px rgba(233, 182, 74, 0.5);
}

.light-node > span {
  position: absolute;
  top: calc(100% + 11px);
  left: 50%;
  width: 110px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: center;
  transform: translateX(-50%);
}

.community-field.is-near .shared-halo {
  background: rgba(233, 182, 74, 0.12);
  box-shadow: 0 0 70px rgba(233, 182, 74, 0.16);
}

.community-field.is-near .connection-lines line {
  opacity: 0.9;
}

.field-hint-bottom {
  position: absolute;
  right: 20px;
  bottom: 15px;
  left: 20px;
  margin: 0;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
}

.creation-field {
  position: relative;
  height: 440px;
  overflow: hidden;
  background: radial-gradient(circle at 58% 48%, rgba(233, 182, 74, 0.07), transparent 38%), linear-gradient(135deg, rgba(255, 255, 255, 0.015), transparent);
}

.creation-field::before {
  content: "";
  position: absolute;
  top: 24px;
  right: 24px;
  bottom: 24px;
  left: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  pointer-events: none;
}

.creation-piece,
.creation-slot {
  position: absolute;
  width: clamp(90px, 16vw, 145px);
  aspect-ratio: 1.6;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
}

.creation-piece {
  z-index: 5;
  color: var(--gold);
  touch-action: none;
  cursor: grab;
  transition: color 180ms ease, filter 180ms ease;
}

.creation-piece:active {
  cursor: grabbing;
}

.creation-piece:hover,
.creation-piece.is-selected {
  color: var(--dawn);
  filter: drop-shadow(0 0 13px rgba(233, 182, 74, 0.5));
}

.creation-piece.is-placed {
  pointer-events: none;
}

.creation-slot {
  z-index: 2;
  border-radius: 10px;
  color: var(--faint);
  opacity: 0.32;
  transition: opacity 180ms ease, color 180ms ease, filter 180ms ease;
}

.creation-slot svg path {
  stroke-dasharray: 4 5;
}

.creation-slot.is-awaiting {
  color: var(--dawn);
  opacity: 0.9;
  filter: drop-shadow(0 0 12px rgba(233, 182, 74, 0.4));
}

.creation-piece svg,
.creation-slot svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.creation-piece path,
.creation-slot path {
  fill: none;
  stroke: currentColor;
  stroke-width: 13;
  stroke-linejoin: miter;
}

.creation-field.is-complete .creation-piece {
  color: var(--dawn);
  filter: drop-shadow(0 0 18px rgba(233, 182, 74, 0.55));
}

.commitment-shell {
  max-width: 830px;
  padding-top: 40px;
}

.commitment-light {
  position: relative;
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  margin: 0 auto 25px;
  color: var(--gold);
}

.commitment-light > span {
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  animation: quiet-ring 5s ease-in-out infinite;
}

.commitment-light > span:nth-child(1) {
  inset: 0;
}

.commitment-light > span:nth-child(2) {
  inset: 15px;
  animation-delay: -1.6s;
}

.commitment-light > span:nth-child(3) {
  inset: 30px;
  animation-delay: -3.2s;
}

.commitment-light svg {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 0 16px rgba(233, 182, 74, 0.35));
}

.commitment-heading {
  text-align: center;
}

.commitment-heading .eyebrow {
  justify-content: center;
}

.commitment-heading h2 {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
}

.commitment-heading h2 em,
.completion-copy h2 em {
  color: var(--accent);
  font-style: normal;
}

.commitment-heading > p:not(.eyebrow) {
  max-width: 570px;
  margin-inline: auto;
}

.commitment-form {
  max-width: 650px;
  margin: 35px auto 0;
}

.commitment-form fieldset {
  padding: 0;
  margin: 0 0 28px;
  border: 0;
}

.commitment-form legend,
.promise-label-row label {
  margin-bottom: 11px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.maxim-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.maxim-options label {
  position: relative;
}

.maxim-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.maxim-options label > span {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}

.maxim-options svg {
  width: 23px;
  height: 23px;
}

.maxim-options input:checked + span {
  border-color: var(--line-strong);
  background: rgba(233, 182, 74, 0.08);
  color: var(--accent);
}

.maxim-options input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.promise-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.promise-label-row label {
  margin: 0;
}

.promise-label-row > span {
  color: var(--faint);
  font-size: 9px;
}

.commitment-form textarea {
  width: 100%;
  min-height: 125px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.commitment-form textarea:focus {
  border-color: var(--accent);
  background: var(--raised);
}

.commitment-form textarea::placeholder {
  color: var(--faint);
  opacity: 0.75;
}

.commitment-form textarea[aria-invalid="true"] {
  border-color: #d78575;
}

.field-hint,
.field-error {
  margin: 9px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.6;
}

.field-error {
  color: #eaa398;
}

.promise-examples {
  margin-top: 24px;
}

.promise-examples > span {
  color: var(--faint);
  font-size: 9px;
}

.promise-examples > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.promise-examples button {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}

.promise-examples button:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--accent);
}

.remember-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-block: 26px;
}

.remember-option input {
  width: 20px;
  height: 20px;
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--gold);
}

.remember-option > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.remember-option strong {
  font-size: 11px;
  font-weight: 550;
}

.remember-option small {
  color: var(--faint);
  font-size: 9px;
  line-height: 1.5;
}

.commitment-form > .primary-button {
  width: 100%;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.privacy-note svg {
  width: 13px;
  height: 13px;
}

.complete-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  align-items: center;
  gap: clamp(45px, 7vw, 95px);
  max-width: 1050px;
}

.completion-copy h2 {
  font-size: clamp(3rem, 5vw, 4.7rem);
}

.completion-copy > p:not(.eyebrow):not(.card-privacy) {
  max-width: 450px;
}

.completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.card-privacy {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.6;
}

.hope-invitation {
  margin-block: 28px 15px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.hope-invitation p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 350;
  line-height: 1.5;
}

.hope-invitation strong {
  color: var(--text);
  font-weight: 450;
}

.hope-invitation a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.hope-invitation a svg {
  width: 17px;
  height: 17px;
  transition: transform 200ms ease;
}

.hope-invitation a:hover svg {
  transform: translateX(3px);
}

.light-card {
  position: relative;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 410px;
  padding: 38px 35px 30px;
  overflow: hidden;
  border: 1px solid rgba(233, 182, 74, 0.55);
  border-radius: 6px;
  background: #101114;
  color: #f4efe4;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.35), 0 0 70px rgba(233, 182, 74, 0.1);
  text-align: center;
}

.card-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(233, 182, 74, 0.12);
  filter: blur(65px);
  transform: translateX(-50%);
}

.card-mark {
  position: relative;
  width: 60px;
  height: 66px;
  margin-bottom: 25px;
  color: var(--gold);
}

.card-overline {
  position: relative;
  margin: 0;
  color: #b7aa8a;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.card-maxim {
  position: relative;
  margin: 14px 0 0;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.27em;
}

.light-card blockquote {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  width: 100%;
  margin: 20px 0;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  font-weight: 350;
  letter-spacing: -0.035em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.card-rule {
  width: 42px;
  height: 1px;
  margin-bottom: 19px;
  background: var(--gold);
}

.card-closing {
  margin: 0;
  color: var(--dawn);
  font-size: 18px;
  font-weight: 350;
  letter-spacing: -0.03em;
}

.card-url {
  margin: 13px 0 0;
  color: #928972;
  font-size: 6px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.chapter-footer {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, calc(100% - 64px));
  margin-inline: auto;
  border-top: 1px solid var(--line);
}

.chapter-footer > span {
  color: var(--faint);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.chapter-footer .text-button {
  font-size: 9px;
}

.reset-dialog {
  width: min(470px, calc(100% - 32px));
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--raised);
  color: var(--text);
  box-shadow: var(--shadow);
}

.reset-dialog::backdrop {
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(6px);
}

.reset-dialog h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 350;
  letter-spacing: -0.04em;
}

.reset-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.reset-dialog > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 100;
  max-width: calc(100% - 32px);
  padding: 13px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--raised);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 11px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript-message {
  position: fixed;
  inset: 20% 20px auto;
  z-index: 200;
  max-width: 500px;
  margin-inline: auto;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--raised);
  box-shadow: var(--shadow);
  text-align: center;
}

.noscript-message h2 {
  font-weight: 350;
}

.noscript-message p,
.noscript-message a {
  color: var(--muted);
  line-height: 1.7;
}

@keyframes scene-in {
  from { transform: translateY(12px); }
  to { transform: translateY(0); }
}

@keyframes completion-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes doorway-breathe {
  0%, 100% { transform: scale(1.015); }
  50% { transform: scale(1.035); }
}

@keyframes static-drift {
  from { transform: translate3d(0, -15px, 0); }
  to { transform: translate3d(22px, 45px, 0); }
}

@keyframes breathe {
  0%, 100% { transform: scale(0.88); }
  50% { transform: scale(1.08); }
}

@keyframes quiet-ring {
  0%, 100% { opacity: 0.3; transform: scale(0.96); }
  50% { opacity: 0.8; transform: scale(1.04); }
}

@media (max-width: 900px) {
  .intro-art {
    width: 72%;
    opacity: 0.72;
  }

  .intro-copy h1 {
    font-size: clamp(5rem, 12vw, 7rem);
  }

  .door-card {
    min-height: 335px;
    padding-inline: 20px;
  }

  .complete-shell {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
  }

  .light-card {
    padding-inline: 28px;
  }
}

@media (max-width: 700px) {
  .chapter-header,
  .chapter-footer {
    width: calc(100% - 32px);
  }

  .chapter-header {
    min-height: 74px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .chapter-label {
    display: none;
  }

  .chapter-main,
  .scene {
    min-height: calc(100svh - 138px);
  }

  .scene-shell {
    width: calc(100% - 32px);
    padding-block: 42px 64px;
  }

  .intro-scene {
    min-height: calc(100svh - 138px);
    padding: 54px 24px 100px;
  }

  .intro-art {
    width: 100%;
    opacity: 0.47;
    mask-image: none;
  }

  .intro-art::after {
    background: linear-gradient(90deg, rgba(var(--bg-rgb), 0.76), rgba(var(--bg-rgb), 0.12)), linear-gradient(180deg, transparent, rgba(var(--bg-rgb), 0.6));
    box-shadow: none;
  }

  .intro-copy h1 {
    font-size: clamp(4.7rem, 23vw, 7rem);
  }

  .intro-lede {
    max-width: 390px;
    font-size: 15px;
  }

  .intro-note {
    right: 24px;
    left: 24px;
    line-height: 1.6;
  }

  .map-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
  }

  .chapter-progress {
    width: 100%;
  }

  .door-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .door-card {
    min-height: 190px;
    padding: 24px 22px 19px;
  }

  .door-icon {
    position: absolute;
    top: 48px;
    left: 24px;
    width: 62px;
    height: 62px;
    margin: 0;
  }

  .door-icon svg {
    width: 48px;
    height: 48px;
  }

  .door-card-copy {
    margin-left: 79px;
  }

  .door-card-copy strong {
    font-size: 21px;
  }

  .door-card-copy > span:last-child {
    font-size: 11px;
  }

  .door-card-state {
    margin: auto 0 0 79px;
    padding-top: 13px;
  }

  .door-shell {
    padding-top: 22px;
  }

  .door-heading {
    margin-top: 8px;
  }

  .door-stage {
    min-height: 440px;
    border-radius: 20px;
  }

  .door-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .guided-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
    padding: 22px;
  }

  .spirit-space {
    min-height: 440px;
  }

  .community-field,
  .creation-field {
    height: 440px;
  }

  .shared-halo {
    width: 145px;
    height: 145px;
  }

  .light-node {
    width: 66px;
    height: 66px;
  }

  .creation-field::before {
    inset: 14px;
  }

  .commitment-shell {
    padding-top: 32px;
  }

  .maxim-options label > span {
    flex-direction: column;
    gap: 6px;
    padding-inline: 8px;
  }

  .complete-shell {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .light-card {
    width: min(100%, 390px);
    justify-self: center;
  }

  .chapter-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding-block: 14px;
  }

  .chapter-footer > span {
    line-height: 1.7;
  }

  .chapter-footer .text-button {
    min-height: 38px;
  }
}

@media (max-width: 420px) {
  .chapter-brand strong {
    font-size: 14px;
  }

  .chapter-actions {
    gap: 5px;
  }

  .intro-copy h1 {
    font-size: clamp(4.25rem, 22vw, 5.6rem);
  }

  .intro-details {
    max-width: 300px;
  }

  .door-card-copy > span:last-child {
    max-width: 210px;
  }

  .completion-actions {
    flex-direction: column;
  }

  .completion-actions > * {
    width: 100%;
  }

  .reset-dialog > div {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .static-particle {
    display: none;
  }

  .spirit-space.is-running .breath-core {
    animation: none !important;
  }
}

@media (max-width: 700px) {
  html[data-theme="light"] .intro-art {
    opacity: 0.32;
  }
}

#character-count.is-over-limit {
  color: #eaa398;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.intro-invite {
  margin-top: 13px;
  font-size: 10px;
}

.intro-invite svg,
.map-utilities svg,
.completion-links svg {
  width: 15px;
  height: 15px;
}

.map-chapter-label {
  margin: 0 0 17px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.map-chapter-second {
  margin-top: 50px;
}

.door-grid-secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.door-grid-secondary .door-card {
  min-height: 345px;
}

.map-utilities {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 30px;
}

.map-utilities .text-button {
  font-size: 10px;
}

.finale-shell,
.daily-complete-shell {
  max-width: 760px;
  text-align: center;
}

.finale-shell .eyebrow,
.daily-complete-shell .eyebrow {
  justify-content: center;
}

.finale-shell h2,
.daily-complete-shell h2 {
  margin: 22px 0 15px;
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 300;
  letter-spacing: -0.065em;
  line-height: 1.04;
}

.finale-shell > p:not(.eyebrow),
.daily-complete-shell > p:not(.eyebrow) {
  max-width: 570px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.seven-constellation {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 38px;
}

.seven-constellation::before,
.seven-constellation::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.seven-constellation::before {
  inset: 45px;
}

.seven-constellation::after {
  inset: 90px;
  background: rgba(233, 182, 74, 0.06);
  box-shadow: 0 0 70px rgba(233, 182, 74, 0.14);
}

.seven-constellation > span {
  position: absolute;
  top: calc(50% - 23px);
  left: calc(50% - 23px);
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  transform: rotate(calc(var(--i) * 51.428deg)) translateY(-130px) rotate(calc(var(--i) * -51.428deg));
}

.seven-constellation > span svg {
  width: 28px;
  height: 28px;
}

.constellation-mark {
  position: absolute;
  top: 112px;
  left: 112px;
  z-index: 2;
  width: 76px;
  height: 76px;
  color: var(--gold);
  filter: drop-shadow(0 0 18px rgba(233, 182, 74, 0.42));
}

.daily-complete-mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 25px;
  color: var(--gold);
  filter: drop-shadow(0 0 20px rgba(233, 182, 74, 0.35));
}

.daily-complete-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-bottom: 15px;
}

.journal-shell {
  max-width: 850px;
}

.journal-heading {
  margin: 15px 0 25px;
}

.journal-heading h2 {
  margin: 18px 0 12px;
  font-size: clamp(3rem, 5vw, 4.6rem);
  font-weight: 300;
  letter-spacing: -0.06em;
}

.journal-heading > p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.journal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.journal-empty {
  margin-top: 30px;
  padding: 46px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  text-align: center;
}

.journal-empty > svg {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  color: var(--gold);
}

.journal-empty h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.journal-empty p {
  max-width: 430px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.journal-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.journal-entry {
  padding: 23px 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.journal-entry-header,
.journal-entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.journal-entry-maxim {
  color: var(--accent);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.journal-entry-date {
  color: var(--faint);
  font-size: 9px;
}

.journal-entry-promise {
  margin: 17px 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 350;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.journal-entry-footer {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.journal-entry-footer > span {
  color: var(--faint);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journal-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.journal-entry-actions .text-button {
  min-height: 36px;
  padding-block: 4px;
  font-size: 9px;
}

.journal-edit-form textarea {
  width: 100%;
  min-height: 100px;
  margin-block: 15px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--raised);
  color: var(--text);
  line-height: 1.6;
  resize: vertical;
}

.journal-edit-error {
  color: #eaa398;
  font-size: 10px;
}

.completion-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

@media (max-width: 1060px) {
  .door-grid-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .intro-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .intro-actions > * {
    width: 100%;
  }

  .door-grid-secondary {
    grid-template-columns: 1fr;
  }

  .door-grid-secondary .door-card {
    min-height: 190px;
  }

  .seven-constellation {
    width: 250px;
    height: 250px;
  }

  .seven-constellation > span {
    transform: rotate(calc(var(--i) * 51.428deg)) translateY(-105px) rotate(calc(var(--i) * -51.428deg));
  }

  .constellation-mark {
    top: 87px;
    left: 87px;
  }

  .journal-entry {
    padding: 20px;
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}

.health-field {
  position: relative;
  height: 430px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 55%, rgba(233, 182, 74, 0.06), transparent 35%), linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent);
}

.health-landscape {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.health-horizon {
  position: absolute;
  right: 0;
  bottom: 34%;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.health-path {
  position: absolute;
  top: 55%;
  left: 8%;
  width: 84%;
  height: 2px;
  background: linear-gradient(90deg, var(--line), var(--line-strong), var(--line));
}

.rest-pool {
  position: absolute;
  top: calc(55% - 38px);
  z-index: 1;
  width: 76px;
  height: 76px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: background-color 250ms ease, box-shadow 250ms ease;
}

.rest-pool > span {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  color: var(--faint);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.15em;
  transform: translateX(-50%);
}

.rest-pool.is-visited {
  border-style: solid;
  background: rgba(233, 182, 74, 0.1);
  box-shadow: 0 0 45px rgba(233, 182, 74, 0.18);
}

.health-destination {
  position: absolute;
  top: calc(55% - 90px);
  right: 3%;
  color: var(--faint);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
}

.health-orb {
  position: absolute;
  top: calc(55% - 33px);
  z-index: 4;
  width: 66px;
  height: 66px;
  padding: 0;
  border: 1px solid var(--dawn);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #fff0c2, var(--gold) 62%, #a87318);
  box-shadow: 0 0 calc(22px + var(--energy) * 40px) rgba(233, 182, 74, 0.3);
  transform: translateX(-50%);
  filter: brightness(calc(0.55 + var(--energy) * 0.45));
  touch-action: none;
  cursor: grab;
}

.health-orb:active {
  cursor: grabbing;
}

.health-energy {
  position: absolute;
  right: 28px;
  bottom: 105px;
  left: 28px;
  height: 2px;
  background: var(--line);
}

.health-energy > span {
  display: block;
  height: 100%;
  background: var(--gold);
  transition: width 150ms linear;
}

.health-controls {
  position: absolute;
  right: 25px;
  bottom: 20px;
  left: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.health-controls > p {
  margin: 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.6;
}

.health-controls .secondary-button {
  flex: none;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 10px;
}

.health-controls .secondary-button:disabled {
  color: var(--faint);
  opacity: 0.55;
}

.health-field.is-dim .health-landscape {
  opacity: 0.55;
}

.health-field.is-complete {
  background: radial-gradient(circle at 50% 55%, rgba(233, 182, 74, 0.14), transparent 40%);
}

.wealth-field {
  min-height: 430px;
  padding: 27px;
}

.wealth-inventory {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
  color: var(--accent);
}

.wealth-inventory > span {
  font-size: 25px;
  font-weight: 350;
}

.wealth-inventory small {
  color: var(--faint);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.wealth-vessels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.wealth-vessel {
  min-width: 0;
  padding: 22px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(var(--bg-rgb), 0.2);
  text-align: center;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.wealth-vessel:has(.wealth-sparks .is-lit) {
  border-color: var(--line-strong);
  box-shadow: inset 0 0 35px rgba(233, 182, 74, 0.035);
}

.wealth-vessel h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 450;
  letter-spacing: -0.02em;
}

.wealth-vessel > p {
  min-height: 32px;
  margin: 8px 0 18px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.5;
}

.wealth-sparks {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.wealth-sparks > span {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}

.wealth-sparks > span.is-lit {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(233, 182, 74, 0.4);
}

.wealth-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  margin-top: 15px;
}

.wealth-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
}

.wealth-controls button:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--accent);
}

.wealth-controls button:disabled {
  opacity: 0.3;
}

.wealth-controls [data-count] {
  min-width: 18px;
  color: var(--accent);
  font-size: 16px;
  text-align: center;
}

.wealth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 25px;
}

.wealth-footer > p {
  margin: 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.65;
}

.wealth-footer .secondary-button {
  flex: none;
}

.wealth-footer .secondary-button:disabled {
  opacity: 0.45;
}

.happiness-field {
  position: relative;
  height: 430px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 24, 32, 0.2), transparent 65%);
}

.happiness-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-moon {
  position: absolute;
  top: 12%;
  right: 14%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dawn);
  box-shadow: 0 0 45px rgba(247, 210, 138, 0.25);
  opacity: 0.65;
}

.scene-hill {
  position: absolute;
  bottom: 85px;
  width: 75%;
  height: 160px;
  border-radius: 50% 50% 0 0;
  background: rgba(var(--bg-rgb), 0.35);
  transform: rotate(-7deg);
}

.scene-hill-one {
  left: -25%;
}

.scene-hill-two {
  right: -25%;
  transform: rotate(8deg);
}

.scene-window {
  position: absolute;
  right: 22%;
  bottom: 95px;
  width: 40px;
  height: 55px;
  border: 1px solid var(--line-strong);
  background: rgba(233, 182, 74, 0.09);
}

.scene-steam {
  position: absolute;
  bottom: 150px;
  left: 58%;
  width: 2px;
  height: 30px;
  border-left: 1px dashed var(--line-strong);
  transform: skewX(-10deg);
}

.warmth-source {
  position: absolute;
  z-index: 4;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: rgba(var(--bg-rgb), 0.24);
  color: var(--faint);
  transform: translate(-50%, -50%);
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

.warmth-source svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.warmth-source > span {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  color: var(--accent);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.14em;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 200ms ease;
}

.warmth-source:hover,
.happiness-field.show-hints .warmth-source:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--dawn);
  box-shadow: 0 0 28px rgba(233, 182, 74, 0.13);
}

.warmth-source:hover > span,
.happiness-field.show-hints .warmth-source:not(:disabled) > span {
  opacity: 1;
}

.warmth-source.is-found {
  border-color: var(--line-strong);
  background: rgba(233, 182, 74, 0.1);
  color: var(--gold);
  box-shadow: 0 0 40px rgba(233, 182, 74, 0.2);
}

.warmth-source.is-found > span {
  opacity: 0;
}

.happiness-note {
  position: absolute;
  right: 22px;
  bottom: 19px;
  left: 22px;
  z-index: 4;
  text-align: center;
}

.happiness-note > p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.happiness-note > span {
  color: var(--accent);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.happiness-hint {
  position: absolute;
  top: 14px;
  left: 17px;
  z-index: 5;
  font-size: 9px;
}

.happiness-field.is-complete {
  background: radial-gradient(circle at 50% 45%, rgba(233, 182, 74, 0.12), transparent 46%);
}

.development-field {
  min-height: 430px;
  padding: 32px 28px 25px;
}

.development-path {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto 35px;
  padding: 30px 0;
}

.development-path::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 4%;
  left: 4%;
  height: 1px;
  background: var(--line-strong);
}

.development-stone {
  position: relative;
  z-index: 2;
  width: 85px;
  min-height: 65px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--faint);
  font-size: 9px;
  text-align: center;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

.development-stone.is-current {
  border-color: var(--line-strong);
  color: var(--accent);
}

.development-stone.is-complete {
  border-color: var(--line-strong);
  background: rgba(233, 182, 74, 0.1);
  color: var(--dawn);
  box-shadow: 0 0 24px rgba(233, 182, 74, 0.1);
}

.development-choice {
  max-width: 650px;
  margin-inline: auto;
  text-align: center;
}

.development-step-label {
  margin: 0;
  color: var(--accent);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.development-reflection {
  min-height: 42px;
  margin: 12px auto 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.development-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.development-option {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 200ms ease, background-color 200ms ease, transform 200ms ease;
}

.development-option:hover {
  border-color: var(--line-strong);
  background: var(--raised);
  transform: translateY(-2px);
}

.development-option strong {
  font-size: 13px;
  font-weight: 500;
}

.development-option span {
  color: var(--faint);
  font-size: 9px;
  line-height: 1.5;
}

.development-field.is-complete .development-path {
  filter: drop-shadow(0 0 20px rgba(233, 182, 74, 0.18));
}

@media (max-width: 700px) {
  .health-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .health-controls .secondary-button {
    align-self: center;
  }

  .health-energy {
    bottom: 145px;
  }

  .rest-pool {
    width: 62px;
    height: 62px;
    top: calc(55% - 31px);
  }

  .wealth-field {
    padding: 20px 16px;
  }

  .wealth-vessels {
    grid-template-columns: 1fr;
  }

  .wealth-vessel {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 15px;
    text-align: left;
  }

  .wealth-vessel > p {
    min-height: 0;
    margin-bottom: 8px;
  }

  .wealth-sparks {
    grid-column: 1;
    justify-content: flex-start;
    min-height: 30px;
  }

  .wealth-controls {
    grid-column: 2;
    grid-row: 1 / 4;
    margin: 0;
  }

  .wealth-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .development-field {
    padding-inline: 14px;
  }

  .development-path {
    gap: 4px;
  }

  .development-stone {
    width: 52px;
    min-height: 52px;
    padding: 4px;
    font-size: 7px;
  }

  .development-options {
    grid-template-columns: 1fr;
  }
}
