@font-face {
  font-family: 'Bona Nova';
  src: url('./assets/fonts/BonaNova-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: 'Bona Nova', serif;
  color: #e9dfcc;
  background: #101310;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid #edc796;
  outline-offset: 5px;
}
[hidden] {
  display: none !important;
}
#experience,
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
#world {
  touch-action: none;
}
#veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #080b09;
  opacity: 0;
  transition: opacity 0.35s;
}
header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 38px;
  z-index: 3;
  pointer-events: none;
  text-shadow: 0 1px 8px #000;
}
.wordmark {
  font-size: 18px;
  letter-spacing: 0.19em;
  text-decoration: none;
  color: #e9dfcc;
  pointer-events: auto;
}
.wordmark span {
  display: block;
  letter-spacing: 0.55em;
  font-size: 8px;
  padding: 7px 1px;
}
.edition,
.eyebrow,
#keys,
#loading,
.motion,
#build-label,
nav {
  font-family: system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
}
.edition {
  color: #b9b3a7;
}
nav {
  display: flex;
  gap: 18px;
  pointer-events: auto;
}
nav button {
  border: 0;
  background: #101510aa;
  padding: 8px 10px;
  letter-spacing: 0.06em;
  font:
    11px system-ui,
    sans-serif;
}
.panel {
  position: absolute;
  top: 50%;
  left: 9%;
  transform: translateY(-45%);
  max-width: 560px;
  z-index: 2;
}
.panel:before {
  content: '';
  position: absolute;
  inset: -80px -90px;
  z-index: -1;
  background: radial-gradient(ellipse, #080c09e8 15%, #080c0970 55%, transparent 73%);
  pointer-events: none;
}
h1,
h2 {
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: -0.035em;
  margin: 25px 0;
  font-size: clamp(40px, 5vw, 78px);
}
h2 {
  font-size: clamp(38px, 4.4vw, 68px);
}
.eyebrow {
  color: #c5a578;
  line-height: 1.8;
}
.intro,
.panel > p:not(.eyebrow) {
  line-height: 1.8;
  color: #c6c1b7;
  font-size: 16px;
}
.primary {
  border: 1px solid #b1966b77;
  background: #161b13dc;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 16px 25px;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.primary:hover {
  background: #302b1de8;
  border-color: #c7aa78;
}
.can-pull #action {
  min-height: 44px;
  min-width: 108px;
  padding: 8px 14px;
  font:
    11px system-ui,
    sans-serif;
  background: #101510c9;
}
.can-pull #hint {
  font-size: 16px;
}
.can-pull #tension {
  max-width: 108px;
}
#journey-hud {
  position: absolute;
  left: 32px;
  bottom: 30px;
  z-index: 2;
  max-width: min(440px, calc(100vw - 48px));
  text-shadow: 0 2px 12px #000;
}
#journey-hud::before {
  content: '';
  position: absolute;
  inset: -25px -35px;
  background: radial-gradient(ellipse at bottom left, #090d0af0, #090d0a66 65%, transparent 85%);
  z-index: -1;
  pointer-events: none;
}
#journey-hint {
  font-size: 21px;
  margin: 8px 0 16px;
}
.journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.journey-actions button {
  min-height: 44px;
  padding: 9px 14px;
  font:
    12px system-ui,
    sans-serif;
}
#journey-keys {
  font:
    10px system-ui,
    sans-serif;
  color: #c6c1b7;
  line-height: 1.7;
}
#journey-progress {
  width: 160px;
  height: 2px;
  background: #fff3;
  margin-top: 12px;
}
#journey-progress span {
  display: block;
  height: 100%;
  background: #d9b474;
}
@media (pointer: coarse) {
  #journey-hud {
    left: 24px;
    bottom: 145px;
  }
  #journey-hint {
    font-size: 18px;
  }
}
@media (max-height: 540px) {
  #journey-hud {
    left: 180px;
    bottom: 20px;
  }
}
.primary[href] {
  display: inline-block;
  text-decoration: none;
  color: #e9e3d4;
}
.secondary {
  display: block;
  margin: 18px auto 0;
  padding: 10px;
  background: transparent;
  border: 0;
  color: #c6c1b7;
  font-size: 13px;
}
#walk-controls {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 4;
  display: none;
  grid-template-columns: repeat(3, 44px);
  gap: 6px;
}
#walk-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid #b1966b77;
  background: #101510e8;
  font-size: 20px;
  touch-action: none;
}
#walk-forward {
  grid-column: 2;
}
#walk-left {
  grid-column: 1;
}
#walk-controls.flight #walk-back {
  grid-column: 2;
}
#passage {
  left: 50%;
  transform: translate(-50%, -40%);
  text-align: center;
  width: 90vw;
}
body.walking #guidance {
  bottom: 150px;
}
body.playing #world {
  cursor: grab;
}
body.playing #world:active {
  cursor: grabbing;
}
@media (pointer: coarse) {
  #walk-controls:not([hidden]) {
    display: grid;
  }
}
.motion {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b9b3a7;
  letter-spacing: 0.04em;
  margin-top: 22px;
}
input {
  accent-color: #b58a52;
}
#loading {
  font-size: 10px;
  letter-spacing: 0.06em;
  min-height: 20px;
}
#guidance {
  position: absolute;
  bottom: max(40px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: min(580px, 90vw);
  padding: 10px 24px 6px;
  background: radial-gradient(ellipse, #080c09dc, transparent 75%);
  pointer-events: none;
}
#guidance button {
  pointer-events: auto;
}
#chapter {
  margin: 0 0 5px;
}
#hint {
  font-size: 20px;
  line-height: 1.4;
  margin: 8px 0 16px;
  text-shadow: 0 2px 10px #000;
}
#keys {
  font-size: 9px;
  color: #bcb7ad;
  letter-spacing: 0.05em;
  margin: 14px 0 0;
}
#tension {
  height: 2px;
  background: #75674d55;
  width: 220px;
  margin: 18px auto;
}
#tension span {
  height: 100%;
  display: block;
  width: 0;
  background: #d7ae71;
  box-shadow: 0 0 12px #c58a3e44;
}
#build-label {
  position: absolute;
  bottom: 14px;
  left: 38px;
  font-size: 8px;
  color: #bcb7ad99;
  letter-spacing: 0.12em;
  pointer-events: none;
}
#ending {
  left: 50%;
  transform: translate(-50%, -40%);
  text-align: center;
  width: 90vw;
}
#paused {
  z-index: 4;
}
#error {
  z-index: 5;
}
body.playing .edition {
  opacity: 0;
}
body.playing .wordmark {
  opacity: 0.7;
}
body.holding #world {
  cursor: grabbing;
}
body.can-pull #world {
  cursor: grab;
}
@media (max-width: 600px) {
  header {
    padding: 20px;
    gap: 10px;
  }
  .wordmark {
    font-size: 13px;
  }
  .edition {
    display: none;
  }
  nav {
    gap: 3px;
  }
  nav button {
    font-size: 10px;
    padding: 8px;
  }
  .panel {
    left: 8%;
    right: 8%;
    max-width: none;
  }
  .panel:before {
    inset: -80px -20px;
  }
  h1 {
    font-size: 45px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.13em;
  }
  .intro {
    font-size: 14px !important;
  }
  #guidance {
    bottom: 36px;
    padding: 10px 8px;
  }
  #hint {
    font-size: 17px;
  }
  #build-label {
    left: 20px;
    font-size: 7px;
  }
  #keys {
    max-width: 250px;
    margin: 14px auto 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
#entry h1 {
  font-size: clamp(38px, 4.5vw, 68px);
  line-height: 1.09;
  letter-spacing: -0.025em;
}
#entry .intro {
  max-width: 370px;
}
@media (max-width: 600px) {
  #entry h1 {
    font-size: clamp(32px, 9.7vw, 44px);
    line-height: 1.1;
  }
}
.site-nav {
  align-items: center;
  gap: 26px;
  letter-spacing: 0.08em;
}
.site-nav a,
.site-nav summary,
.direct-link {
  color: #e9dfcc;
  text-decoration: none;
  font:
    11px system-ui,
    sans-serif;
  letter-spacing: 0.06em;
}
.site-nav > a,
.site-nav summary {
  padding: 10px 0;
  cursor: pointer;
}
.site-nav a:hover,
.direct-link:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.site-nav details {
  position: relative;
}
.site-nav summary {
  list-style: none;
}
.site-nav summary::-webkit-details-marker {
  display: none;
}
.site-nav summary::after {
  content: '+';
  margin-left: 8px;
  color: #c5a578;
}
.site-nav details[open] summary::after {
  content: '−';
}
.index-links {
  position: absolute;
  top: calc(100% + 10px);
  left: -20px;
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 12px;
  background: #121610f5;
  border: 1px solid #b1966b55;
  box-shadow: 0 14px 45px #0007;
  backdrop-filter: blur(12px);
}
.index-links a {
  padding: 10px;
}
.site-nav summary:focus-visible {
  outline: 2px solid #edc796;
  outline-offset: 5px;
}
@media (max-width: 760px) {
  header {
    flex-wrap: wrap;
    row-gap: 12px;
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
    gap: 16px;
  }
  .site-nav a,
  .site-nav summary {
    font-size: 10px;
  }
  .experience-controls {
    margin-left: auto;
  }
  .index-links {
    left: 0;
  }
  .site-nav > a,
  .site-nav summary {
    padding: 8px 0;
  }
}
@media (max-height: 540px) {
  header {
    padding: 14px 22px;
    row-gap: 0;
  }
  .panel {
    transform: translateY(-35%);
  }
  #entry h1 {
    font-size: 34px;
    margin: 12px 0;
  }
  #entry .intro {
    font-size: 13px !important;
    line-height: 1.45;
  }
  .motion {
    margin-top: 8px;
  }
  #loading {
    margin: 6px 0;
  }
}
@media (max-height: 540px) {
  #entry {
    top: 53%;
    transform: translateY(-50%);
  }
  #entry .eyebrow {
    margin: 0;
  }
  #entry h1 {
    font-size: 30px;
    line-height: 1.05;
    margin: 10px 0;
  }
  #entry .intro {
    margin: 10px 0;
    line-height: 1.4;
  }
  #entry .primary {
    padding: 12px 20px;
  }
  #entry #loading {
    min-height: 16px;
    font-size: 9px;
    margin: 5px 0;
  }
  #entry .motion {
    margin-top: 5px;
    font-size: 9px;
  }
}
/* The front door: quiet typography, two deliberate routes, no live 3D behind it. */
#entry,
#labyrinth-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: radial-gradient(ellipse at 50% 30%, #1d201c 0%, #0d100e 52%, #080b09 100%);
}
#entry {
  display: grid;
  place-items: center;
  padding: 110px 28px 90px;
  overflow: auto;
}
.entry-content {
  text-align: center;
  width: min(940px, 100%);
}
#entry .eyebrow {
  letter-spacing: 0.24em;
  font-size: 10px;
  margin-bottom: 30px;
}
#entry h1 {
  font-size: clamp(56px, 7.9vw, 112px);
  line-height: 0.99;
  letter-spacing: -0.045em;
  margin: 0;
}
#entry h1 em {
  font-weight: 400;
  color: #c6ae85;
}
.entry-note {
  color: #a4a89e;
  font-size: 17px;
  margin: 30px auto 36px;
  line-height: 1.7;
  max-width: 440px;
}
.entry-choices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
#entry .primary {
  min-width: 212px;
  min-height: 56px;
  background: #c6ae85;
  border-color: #c6ae85;
  color: #10130f;
  text-align: left;
}
#entry .primary:hover {
  background: #e0cca8;
}
.entry-choices span {
  margin-left: 30px;
}
.main-page-link {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  min-height: 48px;
  color: #d3cdbf;
  text-decoration: none;
  border-bottom: 1px solid #726b5766;
  font:
    12px system-ui,
    sans-serif;
  letter-spacing: 0.055em;
}
.main-page-link:hover {
  color: #fff0d5;
  border-color: #c6ae85;
}
#entry .motion {
  justify-content: center;
  margin-top: 38px;
  color: #909789;
  letter-spacing: 0.04em;
}
.entry-colophon {
  position: absolute;
  bottom: 24px;
  left: 38px;
  right: 38px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font:
    9px system-ui,
    sans-serif;
  letter-spacing: 0.18em;
  color: #8c9487;
}
.at-start header {
  z-index: 6;
}
.at-start .site-nav,
.at-start .experience-controls {
  display: none;
}
.at-start #world {
  opacity: 0;
  pointer-events: none;
}
.playing .site-nav {
  display: none;
}
#labyrinth-loading {
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 35px;
  text-align: center;
}
#loading-maze {
  width: min(32vh, 280px);
  height: min(32vh, 280px);
  margin-bottom: 18px;
}
#maze-walls {
  stroke: #76765d;
  stroke-width: 1.2;
}
#maze-thread {
  stroke: #dabb80;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.2s ease;
}
#loading-title {
  font-size: clamp(29px, 3.5vw, 46px);
  margin: 8px 0 12px;
}
#loading {
  font-size: 11px;
  letter-spacing: 0.07em;
  color: #a9ad9e;
  min-height: 26px;
}
#labyrinth-loading .main-page-link {
  margin-top: 25px;
}
#paused {
  background: #0c100e;
  padding: 40px;
  border: 1px solid #69634a55;
}
#paused .main-page-link {
  margin: 18px 0 0 22px;
}
#reticle {
  position: fixed;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  margin: -2px;
  border: 1px solid #e9dfccbb;
  border-radius: 50%;
  pointer-events: none;
}
@media (max-width: 600px) {
  #entry {
    padding: 110px 24px 90px;
  }
  #entry h1 {
    font-size: clamp(46px, 12.6vw, 70px);
  }
  #entry .eyebrow {
    font-size: 8px;
    letter-spacing: 0.16em;
  }
  .entry-note {
    font-size: 15px;
    max-width: 260px;
    margin: 26px auto 30px;
  }
  .entry-choices {
    flex-direction: column;
    gap: 13px;
  }
  #entry .motion {
    margin-top: 27px;
  }
  .entry-colophon {
    left: 24px;
    right: 24px;
    font-size: 7px;
    letter-spacing: 0.12em;
  }
  #paused {
    padding: 24px;
  }
  #paused .main-page-link {
    margin-left: 0;
  }
}
@media (max-height: 560px) and (min-width: 601px) {
  #entry {
    padding-top: 80px;
    padding-bottom: 55px;
  }
  #entry h1 {
    font-size: 54px;
  }
  #entry .eyebrow {
    margin-bottom: 16px;
  }
  .entry-note {
    margin: 16px auto;
  }
  #entry .motion {
    margin-top: 14px;
  }
  #labyrinth-loading {
    padding-top: 50px;
  }
}
