:root {
  color-scheme: dark;
  --night: #101210;
  --linen: #f1e9d9;
  --smoke: #d1c5b5;
  --ember: #f0be85;
  --edge: clamp(18px, 5.5vw, 80px);
  --base: max(16px, env(safe-area-inset-bottom));
}
body { margin: 0; background: var(--night); color: var(--linen); }
::selection { background: var(--ember); color: var(--night); }
body:not([data-screen=studio]) #studio, body[data-screen=studio] .chamber-shell { display: none; }
body:not([data-screen=studio]) #transport-dock { display: none !important; }
#chamber-transport-slot { display: contents; }
[data-screen=threshold] #transport-primary, [data-screen=threshold] .journey-panel,
[data-screen=threshold] .room-controls, .chamber-help { display: none; }

[data-screen=threshold] .chamber-shell, body[data-screen=room][data-immersed=true] .chamber-shell {
  display: block;
  height: 100svh;
  min-height: 0;
  color: var(--linen);
  background: #171d20;
}
[data-screen=threshold] .listening-chamber, [data-screen=threshold] .listening-stage,
body[data-screen=room][data-immersed=true] .listening-stage {
  position: absolute;
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
}
.chamber-vignette {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,#080b10c4,transparent 16%),
    linear-gradient(0deg,#080a0df2 0%,#080a0daa 20%,transparent 55%);
}
body[data-screen=room][data-immersed=true] .chamber-vignette {
  background: linear-gradient(180deg,#080b10e0,transparent 37%,transparent 66%,#080a0dde);
}
[data-screen=threshold] .studio-header {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  padding: max(16px,env(safe-area-inset-top)) var(--edge) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.studio-header .identity { font-size: clamp(1.1rem,3.5vw,1.35rem); font-weight: 500; letter-spacing: -.025em; }
.studio-header .view-actions { display: flex; gap: 0; }
.studio-header #studio-open {
  display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0 4px 12px;
  color: var(--linen); background: none; border: 0; text-underline-offset: .28em;
}
[data-screen=threshold] .chamber-invitation {
  position: absolute;
  display: grid;
  justify-items: start;
  z-index: 3;
  inset: auto max(var(--edge),env(safe-area-inset-right)) max(32px,calc(env(safe-area-inset-bottom) + 18px)) max(var(--edge),env(safe-area-inset-left));
  width: auto;
  max-width: 44rem;
  margin: 0;
  padding: 0;
  color: var(--linen);
  opacity: 1;
  visibility: visible;
  transform: none;
  text-align: left;
}
[data-screen=threshold] .invitation-title {
  max-width: 100%;
  margin: 0 0 17px;
  font-size: clamp(3.25rem,9.4vw,8.75rem);
  line-height: .91;
  font-stretch: 76%;
  font-weight: 425;
  letter-spacing: -.062em;
  overflow-wrap: normal;
}
.invitation-title span, .invitation-title em { display: block; }
.invitation-title em {
  color: var(--linen);
  font-family: Georgia,'Times New Roman',serif;
  font-size: 1.03em;
  font-style: italic;
  font-synthesis: style;
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.08em;
}
[data-screen=threshold] .invitation-note {
  max-width: 30ch;
  margin: 0 0 19px;
  padding: 0;
  background: none;
  color: var(--linen);
  font-size: .96rem;
  line-height: 1.45;
  text-wrap: pretty;
}
[data-screen=threshold] #entry-play, body[data-screen=room][data-immersed=true] #journey-action {
  border: 1px solid var(--linen);
  border-radius: 2px;
  background: var(--linen);
  color: var(--night);
  min-height: 52px;
  padding: 11px 16px;
  font-size: .94rem;
  font-weight: 550;
  text-align: left;
  box-shadow: none;
}
#entry-play::after, #journey-action[data-kind=approach]:not(:disabled)::after, #journey-action[data-kind=gate]:not(:disabled)::after {
  content: '';
  display: inline-block;
  width: .44em;
  height: .44em;
  margin-inline: .7em 0;
  border: solid currentColor;
  border-width: 1px 1px 0 0;
  transform: translateY(-.08em) rotate(45deg);
}
[data-screen=threshold] #entry-play {
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  max-width: 100%;
  padding-inline: 0 8px;
  border: 0;
  border-bottom: 1px solid #f1e9d9b3;
  border-radius: 0;
  background: transparent;
  color: var(--linen);
}
@media (hover: hover) and (pointer: fine) {
  [data-screen=threshold] #entry-play:hover:not(:disabled) { color: var(--ember); border-color: var(--ember); }
}
[data-screen=threshold] #entry-play:active:not(:disabled) { color: var(--ember); }
body[data-screen=room][data-immersed=true] #journey-action:disabled { background: #1b2225; border-color: #9f9480; color: var(--linen); }
.invitation-sound { color: var(--smoke); margin-top: 12px; font-size: .75rem; }
[data-world=loading] .world-status { display: none; }
.world-status { color: var(--linen); background: #151a1c; }
body[data-screen=room][data-immersed=true] .journey-panel {
  top: max(22px,calc(env(safe-area-inset-top) + 14px));
  left: var(--edge);
  max-width: min(28rem,calc(100% - 2 * var(--edge) - 46px));
  width: auto;
  min-width: 0;
  max-height: 32svh;
  padding: 0;
  border: 0;
  margin: 0;
  background: transparent;
  color: var(--linen);
  overflow: visible;
  pointer-events: none;
}
body[data-screen=room][data-immersed=true] .journey-heading {
  min-height: 0;
  max-width: calc(100vw - var(--edge) - 114px);
  margin: 0 0 8px;
}
body[data-screen=room][data-immersed=true] .journey-chapter { color: var(--ember); letter-spacing: .04em; font-size: .76rem; }
body[data-screen=room][data-immersed=true] #journey-stage-count, body[data-screen=room][data-immersed=true] .journey-counter,
body[data-screen=room][data-immersed=true] .journey-action-feedback {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
.journey-story {
  margin: 12px 0;
  max-width: 26ch;
  color: var(--linen);
  font-size: clamp(1.16rem,3vw,1.7rem);
  line-height: 1.18;
  font-weight: 400;
  letter-spacing: -.025em;
  text-wrap: pretty;
}
.journey-cue {
  max-width: 32ch;
  margin: .55em 0 0;
  color: var(--linen);
  font-size: .875rem;
  line-height: 1.45;
  text-wrap: pretty;
}
body[data-screen=room][data-immersed=true] .journey-pattern {
  align-items: center;
  gap: 4px;
  max-width: 11rem;
  margin: 12px 0 0;
}
body[data-screen=room][data-immersed=true] .journey-pattern span { width: 3px; height: 5px; border: 0; background: #e4cbaa66; border-radius: 3px; }
body[data-screen=room][data-immersed=true] .journey-pattern span.is-note { height: 12px; background: var(--ember); }
body[data-screen=room][data-immersed=true] .journey-pattern span.is-current { background: var(--linen); }
body[data-screen=room][data-immersed=true] .journey-panel progress { max-width: 9rem; height: 2px; margin-top: 9px; accent-color: var(--ember); }
body[data-screen=room][data-immersed=true] #journey-audible { background: var(--night); border-color: var(--ember); color: var(--linen); }
body[data-screen=room][data-immersed=true] #journey-action {
  position: fixed;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
  left: auto;
  right: var(--edge);
  bottom: var(--base);
  width: max-content;
  max-width: min(24rem,calc(100% - 2 * var(--edge) - 92px));
  min-width: min(10.5rem,calc(100% - 2 * var(--edge) - 92px));
  overflow-wrap: anywhere;
}
#journey-action::after { flex: 0 0 auto; margin-inline: auto 0; }
.wayfinding-defs { position: absolute; pointer-events: none; }
.wayfinding-icon {
  flex: 0 0 auto;
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body[data-screen=room][data-immersed=true] .journey-choices {
  position: fixed;
  z-index: 4;
  inset: auto var(--edge) calc(var(--base) + max(var(--thumb-action-height,52px),var(--thumb-control-height,110px)) + 13px) auto;
  width: min(21rem,calc(100% - 2 * var(--edge)));
  padding: 0;
  margin: 0;
  border: 0;
  background: #121718;
}
body[data-screen=room][data-immersed=true] .journey-auditions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; }
body[data-screen=room][data-immersed=true] .journey-auditions button {
  min-height: 49px;
  padding: 8px 11px;
  border: 1px solid #8b8374;
  border-radius: 0;
  background: transparent;
  color: var(--linen);
  overflow-wrap: anywhere;
}
body[data-screen=room][data-immersed=true] .journey-auditions button[aria-pressed=true] { border-color: var(--ember); background: #2e231b; }
body[data-screen=room][data-immersed=true] .journey-auditions small { color: var(--smoke); }
body[data-screen=room][data-immersed=true] .room-target {
  min-height: 44px;
  min-width: 44px;
  padding: 6px 12px;
  border: 1px solid #b99573;
  border-radius: 30px;
  background: #141817;
  color: var(--linen);
  box-shadow: none;
}
body[data-screen=room][data-immersed=true] .room-target span { color: var(--ember); }
.room-target .wayfinding-icon { display: none; }
body[data-screen=room][data-immersed=true][data-journey=story] .room-target {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ember);
  border-radius: 50%;
  background: #171b1a;
  color: var(--linen);
}
body[data-screen=room][data-immersed=true][data-journey=story] .room-target .wayfinding-icon {
  display: block;
  width: 22px;
  height: 22px;
}
body[data-screen=room][data-immersed=true][data-journey=story] .room-target:disabled {
  opacity: .72;
}
body[data-screen=room][data-immersed=true][data-journey=story] .room-target.is-struck:not(:disabled) {
  border-color: var(--linen);
  background: var(--linen);
  color: var(--night);
}
body[data-screen=room][data-immersed=true][data-journey=story] .room-target span,
body[data-screen=room][data-immersed=true][data-journey=story] .room-target strong {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
body[data-screen=room][data-immersed=true] .room-target.is-struck { border-color: var(--linen); background: #3d2c21; }
body[data-screen=room][data-immersed=true] .world-navigation {
  position: static;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
body[data-screen=room][data-immersed=true] .world-options-open, body[data-screen=room][data-immersed=true] .transport-bar {
  position: fixed;
  z-index: 6;
  top: max(12px,env(safe-area-inset-top));
  bottom: auto;
  margin: 0;
}
body[data-screen=room][data-immersed=true] .world-options-open {
  display: grid;
  place-items: center;
  right: max(12px,env(safe-area-inset-right));
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid #b4a38c;
  border-radius: 50%;
  background: #141817;
  color: var(--linen);
}
body[data-screen=room][data-immersed=true] .transport-bar {
  left: auto;
  right: max(60px,calc(env(safe-area-inset-right) + 48px));
  width: auto;
  max-width: none;
}
body[data-screen=room][data-immersed=true] .transport-bar .transport { gap: 0; }
body[data-screen=room][data-immersed=true] #play {
  min-width: 44px; min-height: 44px; justify-content: center; padding: 0;
  border: 1px solid #b4a38c; border-radius: 50%; background: #141817; color: var(--linen);
}
body[data-screen=room][data-immersed=true] #play-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
body[data-screen=room][data-immersed=true] .transport-bar .stop-button, body[data-screen=room][data-immersed=true] .transport-bar .tempo-note { display: none; }
body[data-screen=room][data-immersed=true] .thumb-control {
  z-index: 4;
  left: var(--edge);
  bottom: var(--base);
  width: 80px;
  gap: 3px;
}
body[data-screen=room][data-immersed=true] .thumb-pad {
  width: 80px; height: 80px;
  border-radius: 50%; border: 1px solid #e5cbb29e; background: #101210a8;
}
body[data-screen=room][data-immersed=true] .thumb-knob {
  left: 27px; top: 27px; width: 24px; height: 24px;
  border: 1px solid #e5cbb2; border-radius: 50%; background: #e0b488; box-shadow: none;
}
body[data-screen=room][data-immersed=true] .thumb-cross::before { left: 39px; top: 8px; bottom: 8px; }
body[data-screen=room][data-immersed=true] .thumb-cross::after { top: 39px; left: 8px; right: 8px; }
body[data-screen=room][data-immersed=true] .thumb-cross::before, body[data-screen=room][data-immersed=true] .thumb-cross::after { background: #e5cbb251; }
body[data-screen=room][data-immersed=true] .thumb-label { color: var(--linen); background: transparent; font-size: .75rem; }
body[data-screen=room][data-immersed=true] .world-walk {
  position: fixed; z-index: 4; left: var(--edge); bottom: var(--base);
  display: flex; gap: 4px; width: auto;
}
body[data-screen=room][data-immersed=true] .world-walk button { min-width: 44px; background: #151a1c; border-color: #b4a38c; color: var(--linen); }
body[data-screen=room][data-immersed=true][data-thumb=true] .world-walk { display: none; }
body[data-screen=room][data-immersed=true] .journey-panel { max-width: min(28rem,calc(100% - 2 * var(--edge))); }
body[data-screen=room][data-immersed=true] .crossing-caption { color: var(--linen); }
body[data-screen=room][data-immersed=true] .crossing-caption span { color: var(--ember); }
body[data-screen=room][data-immersed=true] .chamber-messages { bottom: calc(var(--base) + 110px); }

#about, #touch-options {
  --ink: var(--linen);
  --surface: #171b1a;
  --accent: var(--ember);
  --line: #8b8273;
  color: var(--linen);
  background: #171b1a;
  border: 1px solid #8b8273;
  border-radius: 2px;
}
#about::backdrop, #touch-options::backdrop { background: #070909b8; }
#touch-options .world-tools { gap: 0 16px; grid-template-columns: repeat(2,minmax(0,1fr)); }
#touch-options .world-tools button, #touch-options .world-tools a {
  justify-content: flex-start;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #49473e;
  color: var(--linen);
  text-decoration: none;
  font-size: .86rem;
  min-height: 44px;
}
#room-volume-slot .master-control { width: 100%; margin: 14px 0 0; }
#touch-options .journey-details { margin-top: 12px; color: var(--linen); }
#touch-options summary, #about summary { min-height: 44px; padding-block: 9px; cursor: pointer; }
#touch-options .campaign-narrative { color: var(--linen); }
[data-screen=studio] #studio #transport-primary {
  position: static;
  width: auto;
  max-width: none;
  margin: 0 0 24px;
  padding: 8px 0;
}
[data-screen=studio] #studio .tempo-note, [data-screen=studio] #studio .track-position { display: none; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; }
@media (max-width: 460px) {
  [data-screen=threshold] .invitation-title { font-size: min(17.5vw,4.875rem); }
  body[data-screen=room][data-immersed=true] .journey-story { font-size: clamp(1rem,4vw,1.26rem); }
  body[data-screen=room][data-immersed=true] .journey-chapter { font-size: .75rem; }
}
@media (min-width: 850px) {
  [data-screen=threshold] .chamber-vignette {
    background: linear-gradient(90deg,#080a0dcc,transparent 60%),
      linear-gradient(0deg,#080a0dd4 0%,transparent 46%),
      linear-gradient(180deg,#080b107a,transparent 17%);
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  [data-screen=threshold] .chamber-invitation { inset-block-end: max(12px,env(safe-area-inset-bottom)); }
  [data-screen=threshold] .invitation-title { font-size: clamp(40px,11vh,61px); }
  [data-screen=threshold] .invitation-note { margin-bottom: 10px; }
  .invitation-sound { margin-top: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .chamber-invitation, .room-target, .thumb-knob { transition: none; }
}
body[data-screen=threshold], body[data-screen=room] { padding-bottom: 0; }

#motion-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; }
