/* Bias Spotter. One dirt maze. */

.stage-play:has(.maze-stage-body) {
  display: flex;
  padding: 0;
  overflow: hidden;
}

.stage-play:has(.maze-stage-body) > .stage-play-body,
.maze-stage-body,
.maze-mount {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
}

.stage-play:has(.maze-root) .glossary-row {
  display: none;
}

.maze-root {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--navy);
  outline: none;
}

.maze-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.maze-word {
  margin-right: 0.35em;
}

.maze-line,
.maze-sign,
.maze-choose {
  letter-spacing: 0;
}

.maze-line {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 3;
  max-width: min(460px, calc(100% - 88px));
  margin: 0;
  padding: 8px 14px;
  transform: translateX(-50%);
  border: 1px solid var(--border-card);
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.maze-help {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--border-card);
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  color: var(--text-1);
  cursor: pointer;
}

.maze-signs {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.maze-sign {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
  max-width: 220px;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid var(--border-card);
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.maze-choose {
  position: absolute;
  bottom: 16px;
  left: 50%;
  z-index: 4;
  min-width: 148px;
  min-height: 44px;
  padding: 0 16px;
  transform: translateX(-50%);
  border: 0;
  border-radius: var(--r-14);
  background: var(--play);
  color: var(--on-bright);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.maze-choose:disabled {
  opacity: 1;
  border: 1px solid var(--border-card);
  background: var(--surface-solid);
  color: var(--text-1);
  cursor: default;
}

.maze-why {
  position: absolute;
  right: 12px;
  bottom: 76px;
  left: 12px;
  z-index: 5;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--border-card);
  border-radius: var(--r-18);
  background: var(--surface-solid);
  color: var(--text-1);
}

.maze-why p {
  margin: 0 0 8px;
}

.maze-next {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-14);
  background: var(--blue);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-weight: 700;
  cursor: pointer;
}

.maze-root .harbor-tut-banner {
  top: auto;
  bottom: 76px;
}

.maze-guide {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--navy);
}

.maze-guide[hidden] {
  display: none;
}

.maze-guide-card {
  width: min(420px, 100%);
  padding: 16px;
  border: 1px solid var(--border-card);
  border-radius: var(--r-18);
  background: var(--surface-solid);
  color: var(--text-1);
}

@media (prefers-reduced-motion: reduce) {
  .maze-choose,
  .maze-next,
  .maze-help {
    transition: none;
  }
}
