@charset "UTF-8";

:root {
  color-scheme: dark;
  --ink: #f1ebdc;
  --muted: #d0ccbc;
  --copper: #d6a47a;
  --border: rgb(244 232 205 / 18%);
  --glass: rgb(21 28 25 / 72%);
  --edge: clamp(22px, 3.3vw, 56px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: #171b19;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { -webkit-font-smoothing: antialiased; }
button, select, summary, a { -webkit-tap-highlight-color: transparent; }
button, select { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button { border: 1px solid var(--border); }
button:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid #f4c39d; outline-offset: 5px; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }
svg { flex: 0 0 auto; }

.world { position: relative; isolation: isolate; width: 100%; height: 100%; height: 100dvh; min-height: 300px; }
#scene { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#scene:active { cursor: grabbing; }
.scene-vignette { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(10 18 15 / 34%), transparent 24%, transparent 53%, rgb(11 16 14 / 22%) 77%, rgb(11 16 14 / 75%)), linear-gradient(90deg, rgb(12 21 17 / 13%), transparent 48%); }
.interface, .photo-control { position: absolute; z-index: 2; }
.interface { transition: opacity 240ms ease, visibility 240ms; }
.clean-view .interface { opacity: 0; visibility: hidden; pointer-events: none; }
.clean-view .scene-vignette { opacity: .45; }

.masthead { top: max(30px, env(safe-area-inset-top)); left: var(--edge); right: var(--edge); display: flex; align-items: center; gap: 29px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { color: var(--copper); }
.brand-name { font: 14px/1.38 Georgia, "Times New Roman", serif; letter-spacing: 3px; text-transform: uppercase; }
.prototype-label { display: inline-flex; align-items: center; gap: 8px; padding-left: 27px; border-left: 1px solid var(--border); color: #ece7d9; font-size: 9px; line-height: 1.7; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }
.label-dot { opacity: .55; }
.status-dot { width: 4px; height: 4px; background: var(--copper); border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 12px rgb(239 183 117 / 32%); }
.performance { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 10px; }
.performance-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1.8px; color: #d7d3c4; }
#fps { color: var(--ink); font-variant-numeric: tabular-nums; }

.settings { top: 109px; right: var(--edge); width: 222px; }
.settings details { border: 1px solid var(--border); border-radius: 4px; background: var(--glass); box-shadow: 0 8px 30px rgb(0 0 0 / 6%); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.settings summary { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 13px 15px; list-style: none; font-size: 11px; letter-spacing: .2px; user-select: none; }
.settings summary::-webkit-details-marker { display: none; }
.details-chevron { margin-left: auto; color: var(--muted); transition: transform 180ms ease; }
.settings details[open] .details-chevron { transform: rotate(180deg); }
.settings-body { padding: 4px 15px 15px; }
.field + .field { margin-top: 15px; }
.field label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.field select { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 2px; background-color: #293029; font-size: 11px; }
.field option { background: #242d27; }
.reset-button { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; min-height: 36px; margin-top: 17px; background: transparent; border-radius: 2px; font-size: 11px; }
.reset-button:hover { background: rgb(255 255 255 / 6%); }

.place { bottom: 157px; left: var(--edge); pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--copper); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 2.2px; }
.eyebrow > span:first-child:not(.chapter) { width: 24px; height: 1px; background: var(--copper); opacity: .75; }
.chapter { margin-left: 3px; color: #d7d0bd; font-size: 9px; font-weight: 400; letter-spacing: 1px; }
h1 { margin: 0; font: 400 clamp(37px, 4vw, 64px)/1.02 Georgia, "Times New Roman", serif; letter-spacing: -2px; text-shadow: 0 3px 28px rgb(6 15 12 / 35%); }
h1 > span { color: var(--copper); }
.place-description { margin: 19px 0 0; color: #e6e0d0; font: italic 13px/1.6 Georgia, "Times New Roman", serif; text-shadow: 0 2px 12px #17221e; }
.world-status { display: flex; align-items: center; gap: 8px; margin: 24px 0 0; color: #d3d5c9; font-size: 10px; letter-spacing: .25px; text-shadow: 0 2px 12px #17221e; max-width: 330px; line-height: 1.5; }

.exploration-controls { bottom: 88px; left: var(--edge); right: calc(var(--edge) + 60px); display: flex; align-items: center; gap: 14px; }
.view-switch { display: flex; padding: 4px; background: rgb(23 30 26 / 77%); border: 1px solid var(--border); border-radius: 4px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.view-switch button { min-height: 36px; padding: 8px 17px; background: transparent; border: 1px solid transparent; border-radius: 2px; color: #c6cabe; font-size: 11px; transition: background 180ms, color 180ms; }
.view-switch button:hover { color: var(--ink); background: rgb(247 232 207 / 7%); }
.view-switch button.active, .view-switch button[aria-pressed="true"] { background: #e7deca; border-color: #e7deca; color: #293027; }
.tour-button { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 10px 17px; border-radius: 4px; background: rgb(23 30 26 / 67%); font-size: 11px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: background 180ms; }
.tour-button:hover, .tour-button[aria-pressed="true"] { border-color: rgb(228 175 130 / 70%); background: rgb(120 87 56 / 70%); }
.tour-icon { color: var(--copper); }

.help-bar { display: flex; align-items: center; justify-content: space-between; left: var(--edge); right: var(--edge); bottom: max(30px, env(safe-area-inset-bottom)); gap: 18px; color: #c3c8bc; font-size: 10px; }
.desktop-help { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 33px); }
.desktop-help > span { white-space: nowrap; }
.desktop-help i { padding: 0 3px; font-style: normal; color: #a58b6d; }
kbd { font: inherit; color: #ebe6d8; }
.prototype-note { flex-shrink: 0; font-size: 9px; color: #aeb4a8; letter-spacing: .5px; }
.prototype-note span { margin: 0 7px; opacity: .5; }
.touch-help { display: none; line-height: 1.6; }
.touch-help span { padding: 0 4px; color: var(--copper); }
.photo-control { bottom: 88px; right: var(--edge); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 4px; color: #e3decf; background: rgb(23 30 26 / 65%); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.photo-control:hover, .photo-control[aria-pressed="true"] { background: rgb(85 83 65 / 75%); border-color: var(--copper); }

.mobile-movement { display: none; }
.mobile-movement button { display: grid; place-items: center; width: 42px; height: 42px; padding: 9px; color: #eee7d6; background: rgb(23 30 26 / 63%); border-radius: 4px; touch-action: none; user-select: none; -webkit-user-select: none; }
.mobile-movement button:active { background: rgb(167 131 91 / 70%); }
.mobile-movement svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; }
[data-move="forward"] { grid-column: 2; }
[data-move="left"] { grid-column: 1; grid-row: 2; }
[data-move="back"] { grid-column: 2; grid-row: 2; }
[data-move="right"] { grid-column: 3; grid-row: 2; }

.loading-screen, .error-screen { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 30px; background: #19201b; background-image: radial-gradient(ellipse at 50% 32%, rgb(99 98 67 / 16%), transparent 65%); }
.loading-screen { transition: opacity 700ms ease; }
.loading-screen.fade-out, .loading-screen.done { opacity: 0; pointer-events: none; }
.loading-content { width: min(100%, 345px); text-align: center; }
.loading-sigil { margin: 0 auto 36px; color: var(--copper); font: 44px/1 Georgia, serif; }
.loading-content .eyebrow { display: block; margin: 0 0 22px; font-size: 9px; }
.loading-content h2 { margin: 0 0 36px; font: 400 38px/1.15 Georgia, serif; letter-spacing: -.7px; }
#loading-label { display: block; min-height: 32px; color: #cecdbc; font-size: 11px; line-height: 1.5; }
#loading-progress { display: block; width: 100%; height: 2px; border: none; margin: 9px 0 18px; background: #454a3b; accent-color: var(--copper); }
#loading-progress::-webkit-progress-bar { background: #454a3b; }
#loading-progress::-webkit-progress-value { background: var(--copper); transition: width 300ms; }
#loading-progress::-moz-progress-bar { background: var(--copper); }
.loading-note { color: #8e998b; font-size: 9px; letter-spacing: .5px; }
.error-screen { z-index: 11; }
.error-content { width: min(100%, 450px); }
.error-content h2 { font: 400 34px/1.2 Georgia, serif; }
.error-content > p:not(.eyebrow) { font-size: 13px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.error-content button { margin-top: 15px; padding: 12px 22px; border-radius: 3px; background: #dfcfb0; color: #20291f; font-size: 12px; }

@media (max-width: 1050px) {
  .prototype-note { display: none; }
  .desktop-help { gap: 18px; }
  .place { bottom: 155px; }
  h1 { font-size: 48px; }
}

@media (max-width: 720px) {
  :root { --edge: 22px; }
  .masthead { top: max(23px, env(safe-area-inset-top)); gap: 18px; }
  .brand-name { font-size: 10px; letter-spacing: 2.2px; }
  .brand-mark { width: 27px; height: 36px; }
  .brand { gap: 9px; }
  .prototype-label { font-size: 8px; padding-left: 17px; gap: 6px; letter-spacing: 1px; }
  .prototype-label .status-dot { display: none; }
  .performance { display: none; }
  .settings { top: 87px; width: 194px; }
  .settings summary { padding: 11px 13px; font-size: 10px; }
  .place { bottom: 191px; }
  .eyebrow { margin-bottom: 15px; font-size: 8px; letter-spacing: 1.8px; }
  h1 { font-size: 43px; letter-spacing: -1.5px; }
  .place-description { font-size: 12px; max-width: 250px; margin-top: 14px; }
  .world-status { margin-top: 14px; max-width: 240px; font-size: 9px; }
  .exploration-controls { bottom: 69px; right: var(--edge); display: grid; gap: 9px; justify-items: start; }
  .view-switch { width: min(100%, 354px); }
  .view-switch button { flex: 1; min-height: 35px; padding: 8px 12px; font-size: 10px; }
  .tour-button { min-height: 39px; padding: 8px 13px; font-size: 10px; }
  .photo-control { bottom: 69px; width: 39px; height: 39px; }
  .help-bar { bottom: max(21px, env(safe-area-inset-bottom)); font-size: 9px; }
  .desktop-help { flex-wrap: wrap; gap: 5px 14px; }
  .desktop-help > span:last-child { display: none; }
}

@media (pointer: coarse) {
  .desktop-help { display: none; }
  .touch-help { display: block; }
  .mobile-movement { display: grid; grid-template-columns: repeat(3, 42px); gap: 5px; right: var(--edge); bottom: 172px; }
}

@media (max-width: 480px) {
  .prototype-label { align-items: flex-start; flex-wrap: wrap; max-width: 135px; gap: 0 6px; line-height: 1.9; }
  .settings { width: 167px; }
  .place { bottom: 203px; }
  h1 { font-size: 35px; }
  .place .eyebrow { gap: 7px; font-size: 7px; letter-spacing: 1.2px; }
  .place .eyebrow > span:first-child { width: 17px; }
  .place-description { max-width: 200px; font-size: 11px; }
  .world-status { max-width: 170px; }
  .mobile-movement { right: var(--edge); bottom: 198px; grid-template-columns: repeat(3, 42px); gap: 4px; }
  .mobile-movement button { width: 42px; height: 42px; padding: 7px; }
  .touch-help { max-width: 270px; font-size: 9px; }
  .mobile-movement { display: grid; }
}

@media (max-height: 560px) and (min-width: 600px) {
  .masthead { top: 18px; }
  .settings { top: 80px; }
  .place { bottom: 121px; }
  h1 { font-size: 33px; }
  .place .eyebrow { margin-bottom: 10px; }
  .place-description, .world-status { display: none; }
  .exploration-controls, .photo-control { bottom: 55px; }
  .help-bar { bottom: 18px; }
  .mobile-movement { bottom: 117px; }
  .settings-body { padding-top: 0; }
  .field + .field { margin-top: 8px; }
  .reset-button { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
