#controls[hidden],
.passage-title[hidden] {
  display: none !important;
}

.passage-title {
  position: fixed;
  inset: 0;
  z-index: 2;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(max-content, 1fr);
  place-items: center;
  padding-block: max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-bottom));
  padding-inline: max(16px, env(safe-area-inset-left))
    max(16px, env(safe-area-inset-right));
  background: radial-gradient(ellipse at 50% 45%, #221e1b45, #171513c9);
  container-type: inline-size;
}

.passage-title__content {
  grid-row: 2;
  display: grid;
  justify-items: center;
  gap: clamp(7px, 2.9vh, 26px);
}

.passage-title h1 {
  position: relative;
  width: min(91cqi, 790px);
  margin: 0;
  color: #dfd9c9;
}

.passage-title h1 span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.passage-title h1 svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 0 #201913) drop-shadow(0 4px 9px #171513);
}

@media (forced-colors: active) {
  .passage-title h1 {
    color: CanvasText;
  }
}

.passage-title__start {
  appearance: none;
  min-width: 132px;
  min-height: 52px;
  padding: 10px 24px;
  border: 1px solid #b5decc;
  border-radius: 2px;
  background: #b5decc;
  box-shadow: 0 3px #121c1e, 0 5px 20px #121c1e96;
  color: #192926;
  font: 700 17px / 1.2 system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

.passage-title__start:disabled {
  opacity: .72;
  cursor: default;
}

.passage-title__start:focus-visible {
  outline: 2px solid #f2eee2;
  outline-offset: 5px;
}

@media (hover: hover) {
  .passage-title__start:enabled:hover {
    background: #d0eddf;
  }
}

.passage-title__start:enabled:active {
  background: #98bfaf;
  box-shadow: 0 1px #121c1e;
}

.passage-title__escape {
  grid-row: 3;
  place-self: end start;
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #7e9d90;
  border-radius: 2px;
  background: #221e1b;
  color: #dfd9c9;
  font: 650 14px / 1.2 system-ui, sans-serif;
  text-decoration: none;
  touch-action: manipulation;
}

.passage-title__escape:focus-visible {
  outline: 2px solid #f2eee2;
  outline-offset: 4px;
}

@media (hover: hover) {
  .passage-title__escape:hover {
    border-color: #b5decc;
    color: #b5decc;
  }
}

.passage-title__escape:active {
  background: #34433c;
}

.stage-picker {
  display: grid;
  grid-template-columns: 44px auto 44px;
  align-items: center;
  gap: clamp(6px, 2vw, 22px);
}

.stage-picker__display {
  min-width: 108px;
  touch-action: pan-y;
}

.stage-picker__map {
  display: block;
  width: clamp(124px, 32vw, 224px);
  height: clamp(60px, 16vh, 150px);
  margin-inline: auto;
  filter: drop-shadow(0 2px 3px #171513);
}

.stage-picker__outer-wall {
  fill: #c4b59c;
}

.stage-picker__inner-wall {
  fill: #252c29;
}

.stage-picker__floor-joints {
  fill: none;
  stroke: #857764;
  stroke-width: .14;
}

.stage-picker__outer-cut,
.stage-picker__inner-cut {
  fill: none;
  stroke: #dae0c9;
  stroke-width: .88;
  stroke-linejoin: miter;
  paint-order: stroke;
}

.stage-picker__panel {
  position: relative;
  background-color: #202823d9;
  background-image:
    linear-gradient(#a3b5a117 1px, transparent 1px),
    linear-gradient(90deg, #a3b5a117 1px, transparent 1px);
  background-size: 11px 11px;
  background-position: center;
}

.stage-picker__announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage-picker button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #7e9d90;
  border-radius: 2px;
  background: #221e1be8;
  color: #b5decc;
  cursor: pointer;
  touch-action: manipulation;
}

.stage-picker button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.stage-picker button:focus-visible {
  outline: 2px solid #f2eee2;
  outline-offset: 3px;
}

@media (hover: hover) {
  .stage-picker button:hover {
    background: #34433c;
  }
}

.stage-picker button:active {
  background: #45594e;
}

@media (max-height: 360px) {
  .stage-picker__map {
    height: 48px;
  }

  .passage-title h1 {
    width: min(82cqi, 520px);
  }
}

.passage-title__start {
  display: grid;
  place-items: center;
}

.passage-title__control-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.passage-title__control-stencil {
  display: block;
  width: auto;
  height: 23px;
}

.passage-title__escape .passage-title__control-stencil {
  height: 15px;
}
