:root {
  --dc-bg: #171817;
  --dc-bg-deep: #0c0f0d;
  --dc-panel: rgba(31, 33, 30, 0.9);
  --dc-panel-hover: rgba(52, 54, 47, 0.94);
  --dc-paper: #e7e0d5;
  --dc-muted: #9f9b8f;
  --dc-gold: #8b6f45;
  --dc-gold-light: #b89a67;
  --dc-sage: #7e8a72;
  --dc-blue: #5f6f63;
  --dc-line: rgba(184, 154, 103, 0.34);
  --dc-line-soft: rgba(231, 224, 213, 0.14);
  --dc-serif: "Cormorant Garamond", Georgia, serif;
  --dc-sans: "Inter", system-ui, sans-serif;
  --dc-safe-top: max(18px, env(safe-area-inset-top));
  --dc-safe-right: max(18px, env(safe-area-inset-right));
  --dc-safe-bottom: max(18px, env(safe-area-inset-bottom));
  --dc-safe-left: max(18px, env(safe-area-inset-left));
}

html,
body {
  color: var(--dc-paper);
  background: var(--dc-bg-deep);
  font-family: var(--dc-sans);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

#loading-wrapper {
  display: none;
  z-index: 32;
}

#container,
#game-canvas {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

#game-canvas {
  z-index: 1;
  background: var(--dc-bg-deep);
  touch-action: none;
}

.dreamcraft-shell {
  position: fixed;
  inset: 0;
  z-index: 5;
  min-width: 280px;
  min-height: 420px;
  overflow: hidden;
  color: var(--dc-paper);
  pointer-events: none;
  isolation: isolate;
}

.dreamcraft-shell::after {
  position: fixed;
  inset: 0;
  z-index: 80;
  border: 1px solid rgba(184, 154, 103, 0.16);
  pointer-events: none;
  content: "";
}

.dc-screen {
  position: absolute;
  inset: 0;
  display: none;
  box-sizing: border-box;
  min-height: 100%;
  overflow: hidden;
  pointer-events: auto;
  background: var(--dc-bg);
}

.dc-screen.is-active {
  display: block;
  animation: dc-fade-in 680ms ease both;
}

.dc-screen[hidden],
.game-ui[hidden],
.journey-overlay[hidden],
.profile-picker[hidden] {
  display: none !important;
}

.eyebrow,
.chapter-label {
  margin: 0;
  color: var(--dc-gold-light);
  font: 500 0.7rem/1.2 var(--dc-sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.dc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--dc-paper);
  font: 500 1.18rem/1 var(--dc-serif);
  letter-spacing: 0.02em;
}

.dc-brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--dc-line);
  border-radius: 50%;
  color: var(--dc-gold-light);
  font-size: 0.72rem;
}

.dc-nav {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--dc-safe-top) + 12px) calc(var(--dc-safe-right) + 20px) 20px calc(var(--dc-safe-left) + 20px);
}

.dc-button {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--dc-line);
  border-radius: 4px;
  font: 500 0.72rem/1 var(--dc-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.dc-button span {
  display: inline-block;
  margin-left: 12px;
  transition: transform 180ms ease;
}

.dc-button:hover:not(:disabled) span,
.dc-button:focus-visible:not(:disabled) span {
  transform: translateX(4px);
}

.dc-button:hover:not(:disabled),
.dc-button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
}

.dc-button--primary {
  border-color: rgba(184, 154, 103, 0.72);
  color: #f1eadf;
  background: linear-gradient(135deg, #6d5635, #8b6f45);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 8px 28px rgba(0, 0, 0, 0.24);
}

.dc-button--primary:hover:not(:disabled),
.dc-button--primary:focus-visible:not(:disabled) {
  background: linear-gradient(135deg, #826a45, #a08350);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.34), 0 0 24px rgba(184, 154, 103, 0.12);
}

.dc-button--secondary {
  color: var(--dc-paper);
  background: rgba(23, 24, 23, 0.62);
}

.dc-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.dc-button--wide {
  width: 100%;
}

.icon-button,
.menu-symbol,
.sound-toggle,
.carousel-arrow {
  display: grid;
  place-items: center;
  border: 1px solid var(--dc-line);
  color: var(--dc-paper);
  background: rgba(16, 18, 16, 0.62);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-button:hover,
.menu-symbol:hover,
.sound-toggle:hover,
.carousel-arrow:hover,
.icon-button:focus-visible,
.menu-symbol:focus-visible,
.sound-toggle:focus-visible,
.carousel-arrow:focus-visible {
  border-color: var(--dc-gold-light);
  color: var(--dc-gold-light);
  background: rgba(47, 43, 34, 0.86);
}

.icon-button,
.menu-symbol {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.1rem;
}

.menu-symbol {
  border-color: transparent;
  background: transparent;
}

.sound-toggle {
  position: fixed;
  right: var(--dc-safe-right);
  bottom: var(--dc-safe-bottom);
  z-index: 70;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  pointer-events: auto;
}

.sound-toggle[aria-pressed="true"] span {
  opacity: 0.45;
  text-decoration: line-through;
}

/* Landing */
.landing-screen {
  background: #111410;
}

.forest-backdrop,
.intro-image {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(7, 10, 8, 0.84) 0%, rgba(12, 14, 11, 0.46) 48%, rgba(7, 9, 7, 0.34) 100%), url("images/dreamcraft/wood-oak.jpg");
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
  animation: dc-forest-breathe 18s ease-in-out infinite alternate;
}

.forest-backdrop::after,
.intro-image::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 58% 42%, transparent 0, rgba(5, 7, 5, 0.14) 42%, rgba(3, 5, 3, 0.78) 100%), linear-gradient(180deg, rgba(8, 10, 8, 0.12), rgba(8, 10, 8, 0.58));
  content: "";
}

.dc-brand--landing {
  position: absolute;
  top: calc(var(--dc-safe-top) + 16px);
  left: calc(var(--dc-safe-left) + 22px);
  z-index: 2;
}

.landing-enter {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  padding: 8vh clamp(44px, 10vw, 160px);
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.landing-crest {
  position: absolute;
  top: 50%;
  right: clamp(8vw, 14vw, 240px);
  width: min(36vw, 430px);
  aspect-ratio: 0.72;
  transform: translateY(-50%);
  filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.44));
}

.crest-ring {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 76%;
  aspect-ratio: 1;
  border: clamp(3px, 0.5vw, 7px) double rgba(184, 154, 103, 0.72);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: inset 0 0 40px rgba(184, 154, 103, 0.06), 0 0 38px rgba(0, 0, 0, 0.42);
}

.crest-ring::before,
.crest-ring::after {
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(184, 154, 103, 0.48);
  border-radius: 50%;
  content: "";
}

.crest-ring::after {
  inset: 31%;
}

.crest-web {
  position: absolute;
  top: 29%;
  left: 50%;
  color: rgba(231, 224, 213, 0.78);
  font: 400 clamp(3rem, 8vw, 7rem)/1 var(--dc-serif);
  transform: translate(-50%, -50%);
}

.crest-feather {
  position: absolute;
  top: 54%;
  width: 21%;
  height: 38%;
  border-left: 2px solid rgba(184, 154, 103, 0.62);
  border-radius: 50%;
  transform-origin: top;
}

.crest-feather::after {
  position: absolute;
  inset: 5% 10% 0 0;
  background: repeating-linear-gradient(155deg, transparent 0 8%, rgba(231, 224, 213, 0.35) 9% 11%, transparent 12% 18%);
  content: "";
}

.crest-feather--left {
  left: 30%;
  transform: rotate(12deg);
}

.crest-feather--right {
  right: 22%;
  transform: rotate(-17deg) scale(0.84);
}

.landing-title {
  display: block;
  max-width: 600px;
  font: 500 clamp(4.6rem, 9vw, 8.8rem)/0.78 var(--dc-serif);
  letter-spacing: -0.035em;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.58);
}

.landing-tagline {
  display: block;
  margin-top: 36px;
  color: rgba(231, 224, 213, 0.76);
  font: 400 clamp(1rem, 1.5vw, 1.35rem)/1.5 var(--dc-serif);
  letter-spacing: 0.025em;
}

.landing-prompt {
  position: absolute;
  bottom: calc(var(--dc-safe-bottom) + 20px);
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  color: rgba(231, 224, 213, 0.76);
  font: 500 0.68rem/1 var(--dc-sans);
  letter-spacing: 0.19em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.prompt-arrow {
  color: var(--dc-gold-light);
  font-size: 1.4rem;
  animation: dc-prompt 1.8s ease-in-out infinite;
}

.prompt-mobile {
  display: none;
}

/* Introduction */
.intro-screen {
  background: #10130f;
}

.intro-image {
  left: 43%;
  background-image: linear-gradient(90deg, #121511 0%, rgba(14, 17, 13, 0.68) 18%, rgba(8, 10, 8, 0.08) 72%), url("images/dreamcraft/wood-sycamore.jpg");
}

.intro-copy {
  position: absolute;
  top: 50%;
  left: clamp(48px, 8vw, 130px);
  z-index: 2;
  width: min(42vw, 590px);
  transform: translateY(-46%);
}

.intro-copy h1,
.transition-screen h1,
.journey-panel h1 {
  margin: 14px 0 24px;
  font: 500 clamp(3.4rem, 6.8vw, 7rem)/0.87 var(--dc-serif);
  letter-spacing: -0.025em;
}

.intro-copy > p:not(.eyebrow) {
  max-width: 520px;
  margin: 0 0 34px;
  color: rgba(231, 224, 213, 0.68);
  font: 400 clamp(1rem, 1.3vw, 1.17rem)/1.75 var(--dc-sans);
}

.intro-quote {
  position: absolute;
  right: calc(var(--dc-safe-right) + 28px);
  bottom: calc(var(--dc-safe-bottom) + 22px);
  z-index: 2;
  margin: 0;
  color: rgba(231, 224, 213, 0.54);
  font: italic 400 1rem/1.45 var(--dc-serif);
  text-align: right;
}

/* Selection */
.selection-screen,
.profile-screen {
  background: radial-gradient(circle at 50% 22%, #24251f 0, #151815 46%, #0e110f 100%);
}

.selection-screen::before,
.profile-screen::before,
.transition-screen::before {
  position: absolute;
  inset: 0;
  opacity: 0.17;
  pointer-events: none;
  background-image: url("images/dreamcraft/wood-willow.jpg");
  background-position: center;
  background-size: cover;
  filter: grayscale(0.8);
  mix-blend-mode: soft-light;
  content: "";
}

.dc-nav--selection {
  justify-content: flex-start;
  gap: 18px;
  border-bottom: 1px solid var(--dc-line-soft);
  background: linear-gradient(180deg, rgba(11, 13, 11, 0.82), rgba(11, 13, 11, 0));
}

.dc-nav--selection .menu-symbol {
  margin-left: auto;
}

.selection-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.selection-heading h1 {
  margin: 0;
  font: 500 clamp(1.6rem, 2.8vw, 2.6rem)/1 var(--dc-serif);
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.selection-description {
  position: absolute;
  top: clamp(104px, 14vh, 140px);
  left: 50%;
  z-index: 2;
  width: min(88vw, 600px);
  margin: 0;
  color: var(--dc-muted);
  font: 400 0.9rem/1.5 var(--dc-sans);
  text-align: center;
  transform: translateX(-50%);
}

.selection-stage {
  position: absolute;
  top: 52%;
  right: clamp(20px, 4vw, 64px);
  left: clamp(20px, 4vw, 64px);
  z-index: 2;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  transform: translateY(-48%);
}

.carousel-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font: 400 2rem/1 var(--dc-serif);
}

.option-carousel {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 320px));
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 40px);
  min-height: 440px;
  perspective: 1000px;
}

.option-card {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  height: clamp(300px, 48vh, 520px);
  padding: 24px 22px;
  overflow: hidden;
  border: 1px solid var(--dc-line-soft);
  border-radius: 14px;
  color: var(--dc-paper);
  background: var(--dc-panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transform: scale(0.84);
  transition: transform 360ms ease, opacity 360ms ease, border-color 360ms ease, filter 360ms ease;
  opacity: 0.5;
  filter: saturate(0.55) brightness(0.7);
}

.option-card.is-active {
  z-index: 2;
  border-color: rgba(184, 154, 103, 0.78);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(184, 154, 103, 0.12);
  transform: scale(1);
  opacity: 1;
  filter: none;
}

.option-card::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(12, 14, 12, 0.04) 20%, rgba(9, 11, 9, 0.82) 84%, rgba(9, 11, 9, 0.96) 100%);
  content: "";
}

.option-card-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.option-card-image--symbol {
  inset: 14% 15% auto;
  z-index: 0;
  width: 70%;
  height: 48%;
  object-fit: contain;
  filter: sepia(0.5) saturate(0.65) drop-shadow(0 12px 18px rgba(0, 0, 0, 0.44));
}

.option-card-glyph {
  position: absolute;
  top: 19%;
  color: var(--dc-gold-light);
  font: 400 clamp(5rem, 10vw, 9rem)/1 var(--dc-serif);
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.option-card h2 {
  margin: 0;
  font: 500 clamp(1.65rem, 2.8vw, 2.4rem)/1 var(--dc-serif);
}

.option-card p {
  margin: 9px 0 0;
  color: rgba(231, 224, 213, 0.62);
  font: 400 0.73rem/1.4 var(--dc-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.selection-progress {
  position: absolute;
  bottom: clamp(92px, 12vh, 130px);
  left: 50%;
  z-index: 3;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.selection-progress span {
  width: 26px;
  height: 1px;
  background: rgba(231, 224, 213, 0.26);
}

.selection-progress span.is-current {
  background: var(--dc-gold-light);
}

.selection-progress span.is-complete {
  background: rgba(184, 154, 103, 0.56);
}

.selection-actions {
  position: absolute;
  bottom: calc(var(--dc-safe-bottom) + 16px);
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
}

/* Profile */
.profile-screen {
  overflow-y: auto;
}

.profile-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(330px, 520px) minmax(300px, 470px);
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 7vw, 110px);
  box-sizing: border-box;
  min-height: 100%;
  padding: 110px clamp(28px, 6vw, 90px) 42px;
}

.profile-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 0.72;
  min-height: 520px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(184, 154, 103, 0.72);
  border-radius: 18px;
  background-image: url("images/dreamcraft/wood-sycamore.jpg");
  background-position: center;
  background-size: cover;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(231, 224, 213, 0.08);
  transition: background-image 400ms ease;
}

.profile-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 7, 0.52) 0, rgba(9, 11, 9, 0.04) 32%, rgba(8, 10, 8, 0.9) 80%, #0b0e0c 100%);
}

.profile-card-header,
.profile-identity,
.profile-slots {
  position: relative;
  z-index: 1;
}

.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-card-header p,
.profile-edit {
  margin: 0;
  color: rgba(231, 224, 213, 0.72);
  font: 500 0.65rem/1 var(--dc-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.profile-edit {
  padding: 8px 10px;
  border: 1px solid var(--dc-line);
  border-radius: 3px;
  background: rgba(10, 12, 10, 0.44);
  cursor: pointer;
}

.profile-identity {
  margin-top: auto;
  margin-bottom: 24px;
  text-align: center;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.82);
}

.profile-identity p {
  margin: 0 0 6px;
  color: var(--dc-gold-light);
  font: 500 0.69rem/1 var(--dc-sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.profile-identity h2 {
  margin: 0;
  font: 500 clamp(2.6rem, 5vw, 4.6rem)/0.95 var(--dc-serif);
}

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

.profile-slot {
  display: flex;
  align-items: center;
  flex-direction: column;
  min-width: 0;
  padding: 14px 5px 10px;
  border: 1px solid rgba(184, 154, 103, 0.34);
  border-radius: 8px;
  color: var(--dc-paper);
  background: rgba(14, 16, 14, 0.68);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.profile-slot:hover,
.profile-slot:focus-visible {
  border-color: var(--dc-gold-light);
  background: rgba(45, 42, 34, 0.82);
  transform: translateY(-2px);
}

.slot-visual {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 9px;
  place-items: center;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.slot-visual--feather {
  background-image: url("images/dreamcraft/feather-owl.png");
}

.slot-visual--gem {
  color: #d8ddd5;
  font: 400 3.2rem/1 var(--dc-serif);
  text-shadow: 0 0 18px rgba(213, 232, 231, 0.4);
}

.slot-visual--totem {
  background-image: url("images/dreamcraft/totem_02.png");
}

.slot-category {
  color: var(--dc-muted);
  font-size: 0.58rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.profile-slot strong {
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  font: 500 1.04rem/1 var(--dc-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy h2 {
  margin: 14px 0 18px;
  font: 500 clamp(2.4rem, 4.5vw, 4.5rem)/0.95 var(--dc-serif);
}

.profile-copy > p:not(.eyebrow) {
  margin: 0;
  color: var(--dc-muted);
  line-height: 1.7;
}

.profile-meanings {
  margin: 28px 0;
  border-top: 1px solid var(--dc-line-soft);
}

.profile-meanings > div {
  display: grid;
  grid-template-columns: 86px 1fr;
  padding: 13px 0;
  border-bottom: 1px solid var(--dc-line-soft);
}

.profile-meanings dt {
  color: var(--dc-gold-light);
  font: 500 0.65rem/1.4 var(--dc-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-meanings dd {
  margin: 0;
  color: rgba(231, 224, 213, 0.78);
  font: 400 1rem/1.2 var(--dc-serif);
}

.profile-picker {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.picker-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 7, 5, 0.74);
  backdrop-filter: blur(12px);
}

.picker-sheet {
  position: relative;
  width: min(920px, calc(100vw - 48px));
  max-height: min(720px, calc(100dvh - 48px));
  padding: 28px;
  overflow: auto;
  border: 1px solid var(--dc-line);
  border-radius: 12px;
  background: rgba(22, 25, 21, 0.98);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.6);
}

.picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.picker-heading h2 {
  margin: 6px 0 0;
  font: 500 2.2rem/1 var(--dc-serif);
}

.picker-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.picker-option {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  min-height: 180px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--dc-line-soft);
  border-radius: 8px;
  color: var(--dc-paper);
  background: rgba(36, 38, 33, 0.86);
  cursor: pointer;
}

.picker-option:hover,
.picker-option.is-selected {
  border-color: var(--dc-gold-light);
  background: var(--dc-panel-hover);
}

.picker-option img {
  width: 100%;
  height: 105px;
  margin-bottom: 12px;
  object-fit: contain;
}

.picker-option img.is-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  height: 100%;
  margin: 0;
  object-fit: cover;
  opacity: 0.48;
}

.picker-option span,
.picker-option strong {
  position: relative;
  z-index: 1;
}

.picker-option strong {
  font: 500 1.2rem/1 var(--dc-serif);
}

.picker-option span {
  margin-top: 5px;
  color: var(--dc-muted);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Transition */
.transition-screen {
  display: none;
  place-items: center;
  padding: 32px;
  text-align: center;
  background: #111411;
}

.transition-screen.is-active {
  display: grid;
}

.transition-screen::before {
  opacity: 0.25;
}

.transition-screen > * {
  position: relative;
  z-index: 1;
}

.transition-emblem {
  display: grid;
  width: 104px;
  height: 104px;
  margin: 0 auto 24px;
  place-items: center;
  border: 1px solid var(--dc-line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 14px rgba(184, 154, 103, 0.04), 0 0 40px rgba(184, 154, 103, 0.08);
  animation: dc-spin 12s linear infinite;
}

.transition-emblem span {
  color: var(--dc-gold-light);
  font: 400 3rem/1 var(--dc-serif);
}

.transition-screen h1 {
  margin-top: 12px;
  font-size: clamp(3rem, 7vw, 6.8rem);
}

.transition-screen > p:not(.eyebrow) {
  margin: 0;
  color: var(--dc-muted);
}

.transition-progress {
  width: min(420px, 72vw);
  height: 2px;
  margin: 30px auto 0;
  overflow: hidden;
  background: rgba(231, 224, 213, 0.16);
}

.transition-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--dc-gold-light);
  transition: width 300ms ease;
}

#retry-unity {
  margin-top: 24px;
}

/* In-game web HUD */
.game-ui {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.game-ui button {
  pointer-events: auto;
}

.game-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: calc(var(--dc-safe-top) + 4px) calc(var(--dc-safe-right) + 8px) 16px calc(var(--dc-safe-left) + 8px);
  border-bottom: 1px solid var(--dc-line-soft);
  background: linear-gradient(180deg, rgba(9, 11, 9, 0.86), rgba(9, 11, 9, 0));
  pointer-events: none;
}

.game-header > p {
  margin: 0;
  color: var(--dc-paper);
  font: 500 1rem/1 var(--dc-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game-header > p span:first-child {
  margin-right: 12px;
  color: var(--dc-gold-light);
  font: 500 0.65rem/1 var(--dc-sans);
}

.game-header .menu-symbol {
  justify-self: end;
}

.tool-rail {
  position: absolute;
  top: 50%;
  left: var(--dc-safe-left);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--dc-line-soft);
  border-radius: 5px;
  background: rgba(16, 18, 16, 0.82);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  pointer-events: auto;
}

.tool-rail button {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  width: 66px;
  min-height: 62px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid var(--dc-line-soft);
  color: var(--dc-muted);
  background: transparent;
  font-size: 0.57rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: default;
}

.tool-rail button span {
  color: var(--dc-muted);
  font: 400 1.45rem/1 var(--dc-serif);
}

.tool-rail button.is-active {
  color: var(--dc-paper);
  background: rgba(139, 111, 69, 0.2);
}

.tool-rail button.is-active span {
  color: var(--dc-gold-light);
}

.instruction-card,
.energy-card {
  position: absolute;
  border: 1px solid var(--dc-line-soft);
  border-radius: 6px;
  background: rgba(17, 20, 17, 0.8);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.instruction-card {
  top: 50%;
  right: var(--dc-safe-right);
  width: min(280px, 22vw);
  padding: 22px;
  transform: translateY(-50%);
}

.instruction-card h2 {
  margin: 10px 0 9px;
  font: 500 2rem/1 var(--dc-serif);
}

.instruction-card > p:last-child {
  margin: 0;
  color: var(--dc-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.energy-card {
  bottom: calc(var(--dc-safe-bottom) + 66px);
  left: 50%;
  width: min(370px, 50vw);
  padding: 12px 14px;
  transform: translateX(-50%);
}

.energy-card > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--dc-muted);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.energy-card strong {
  color: var(--dc-paper);
}

.energy-track {
  height: 3px;
  overflow: hidden;
  background: rgba(231, 224, 213, 0.14);
}

.energy-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--dc-gold), var(--dc-gold-light));
  transform-origin: left;
  transition: transform 80ms linear;
}

.game-actions {
  position: absolute;
  bottom: var(--dc-safe-bottom);
  left: 50%;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.game-actions .dc-button {
  min-width: 178px;
}

.game-menu-panel {
  position: absolute;
  top: calc(var(--dc-safe-top) + 54px);
  right: var(--dc-safe-right);
  width: 220px;
  padding: 8px;
  border: 1px solid var(--dc-line);
  border-radius: 5px;
  background: rgba(17, 20, 17, 0.96);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.game-menu-panel button {
  width: 100%;
  padding: 13px;
  border: 0;
  color: var(--dc-paper);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.game-menu-panel button:hover {
  background: rgba(139, 111, 69, 0.18);
}

.journey-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
  padding: 34px;
  pointer-events: none;
}

.journey-panel {
  width: min(450px, calc(100vw - 48px));
  padding: 30px;
  border: 1px solid var(--dc-line);
  border-radius: 8px;
  background: rgba(19, 22, 18, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  pointer-events: auto;
}

.journey-panel h1 {
  margin: 8px 0 12px;
  font-size: 3.7rem;
}

.journey-panel > p:not(.eyebrow, .journey-countdown) {
  margin: 0 0 22px;
  color: var(--dc-muted);
  line-height: 1.6;
}

.journey-countdown {
  margin: 20px 0;
  color: var(--dc-paper);
  font: 400 3.4rem/1 var(--dc-serif);
  letter-spacing: 0.08em;
}

/* Existing network and dream-card overlays inherit the same language. */
#completion-overlay,
#dream-card-overlay {
  font-family: var(--dc-sans);
}

#completion-overlay {
  z-index: 60;
}

#dream-card-overlay {
  z-index: 70;
  background: rgba(7, 9, 7, 0.78);
}

.completion-card {
  border-color: var(--dc-line);
  border-radius: 8px;
  color: var(--dc-paper);
  background: rgba(19, 22, 18, 0.95);
}

.completion-card h1 {
  font-family: var(--dc-serif);
  font-weight: 500;
}

.completion-button {
  border-color: var(--dc-line);
  border-radius: 4px;
  color: var(--dc-paper);
  background: var(--dc-gold);
  font-family: var(--dc-sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dream-card-frame {
  border-color: var(--dc-line);
  border-radius: 7px;
  background: var(--dc-bg);
}

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

@keyframes dc-forest-breathe {
  from { transform: scale(1.03); }
  to { transform: scale(1.08); }
}

@keyframes dc-prompt {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(6px); opacity: 1; }
}

@keyframes dc-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .landing-enter {
    align-items: center;
    justify-content: flex-end;
    padding: 24vh 26px calc(var(--dc-safe-bottom) + 84px);
    text-align: center;
  }

  .dc-brand--landing {
    left: 50%;
    transform: translateX(-50%);
  }

  .landing-crest {
    top: 14%;
    right: auto;
    left: 50%;
    width: min(64vw, 320px);
    transform: translateX(-50%);
  }

  .landing-title {
    max-width: 100%;
    font-size: clamp(2.2rem, 11.5vw, 4.4rem);
    letter-spacing: -0.05em;
    white-space: nowrap;
  }

  .landing-tagline {
    margin-top: 22px;
  }

  .prompt-desktop {
    display: none;
  }

  .prompt-mobile {
    display: inline;
  }

  .intro-image {
    left: 0;
    background-image: linear-gradient(180deg, rgba(9, 11, 9, 0.18), rgba(9, 11, 9, 0.92) 70%, #0c0f0d 100%), url("images/dreamcraft/wood-sycamore.jpg");
  }

  .intro-copy {
    top: auto;
    right: 26px;
    bottom: calc(var(--dc-safe-bottom) + 38px);
    left: 26px;
    width: auto;
    transform: none;
  }

  .intro-copy h1 {
    font-size: clamp(3.4rem, 14vw, 5.8rem);
  }

  .intro-quote,
  .dc-nav .chapter-label {
    display: none;
  }

  .option-carousel {
    grid-template-columns: minmax(190px, 320px);
    min-height: 420px;
  }

  .option-card:not(.is-active) {
    display: none;
  }

  .selection-stage {
    right: 16px;
    left: 16px;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
  }

  .carousel-arrow {
    width: 42px;
    height: 42px;
  }

  .profile-layout {
    grid-template-columns: minmax(280px, 480px);
    gap: 32px;
    padding-top: 110px;
  }

  .profile-copy {
    padding-bottom: 30px;
  }

  .profile-copy h2 {
    font-size: 2.8rem;
  }

  .instruction-card {
    top: calc(var(--dc-safe-top) + 68px);
    right: 16.5%;
    left: 16.5%;
    width: auto;
    padding: 14px 16px;
    transform: none;
  }

  .instruction-card h2 {
    display: inline;
    margin-right: 8px;
    font-size: 1.4rem;
  }

  .instruction-card > p:last-child {
    display: inline;
  }

  .tool-rail {
    top: auto;
    right: 16px;
    bottom: calc(var(--dc-safe-bottom) + 120px);
    left: 16px;
    flex-direction: row;
    justify-content: center;
    transform: none;
  }

  .tool-rail button {
    flex: 1;
    width: auto;
    min-height: 52px;
    border-right: 1px solid var(--dc-line-soft);
    border-bottom: 0;
  }

  .energy-card {
    bottom: calc(var(--dc-safe-bottom) + 63px);
    width: min(460px, calc(100vw - 32px));
  }

  .game-actions {
    right: 16px;
    bottom: var(--dc-safe-bottom);
    left: 16px;
    transform: none;
  }

  .game-actions .dc-button {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 540px) {
  .dc-nav {
    padding-right: var(--dc-safe-right);
    padding-left: var(--dc-safe-left);
  }

  .dc-brand {
    font-size: 1rem;
  }

  .dc-brand-mark {
    width: 24px;
    height: 24px;
  }

  .selection-heading {
    gap: 9px;
  }

  .selection-heading h1 {
    font-size: 1.28rem;
  }

  .selection-description {
    top: 94px;
    font-size: 0.75rem;
  }

  .selection-stage {
    top: 50%;
  }

  .option-carousel,
  .option-card {
    min-height: 0;
  }

  .option-card {
    height: min(55vh, 460px);
  }

  .selection-progress {
    bottom: calc(var(--dc-safe-bottom) + 78px);
  }

  .selection-actions {
    right: 16px;
    bottom: var(--dc-safe-bottom);
    left: 16px;
    transform: none;
  }

  .selection-actions .dc-button {
    width: 100%;
  }

  .profile-layout {
    padding: 92px 16px 24px;
  }

  .profile-card {
    min-height: 0;
    padding: 18px;
  }

  .profile-slots {
    gap: 6px;
  }

  .profile-slot {
    padding: 10px 3px 8px;
  }

  .slot-visual {
    width: 42px;
    height: 42px;
  }

  .picker-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-height: 72dvh;
    padding: 22px 16px calc(var(--dc-safe-bottom) + 8px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }

  .picker-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .picker-option {
    min-height: 150px;
  }

  .game-header {
    grid-template-columns: auto 1fr auto;
  }

  .game-header .dc-brand span:last-child {
    display: none;
  }

  .game-header > p {
    justify-self: center;
    font-size: 0.78rem;
  }

  .instruction-card {
    right: 8px;
    left: 8px;
  }

  .tool-rail {
    right: 8px;
    bottom: calc(var(--dc-safe-bottom) + 114px);
    left: 8px;
  }

  .tool-rail button {
    min-height: 48px;
    font-size: 0.49rem;
  }

  .tool-rail button span {
    font-size: 1.1rem;
  }

  .energy-card {
    bottom: calc(var(--dc-safe-bottom) + 58px);
    width: calc(100vw - 16px);
  }

  .game-actions {
    right: 8px;
    left: 8px;
  }

  .game-actions .dc-button {
    min-height: 44px;
    padding: 0 12px;
    font-size: 0.62rem;
  }

  .journey-overlay {
    align-items: end;
    padding: 12px 12px var(--dc-safe-bottom);
  }

  .journey-panel {
    box-sizing: border-box;
    width: 100%;
    padding: 24px;
  }
}

@media (max-height: 650px) and (orientation: landscape) {
  .landing-enter {
    padding-top: 18vh;
    padding-bottom: 10vh;
  }

  .landing-title {
    font-size: 4rem;
  }

  .landing-tagline {
    margin-top: 14px;
  }

  .option-card {
    height: 62vh;
  }

  .selection-description {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
