/* Debt Spiral swamp. Full-bleed stage. Colours from tokens.css. */

.swamp-mount {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.swamp-stage-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  max-width: none !important;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.game-stage .stage-play:has(.swamp-stage-body) {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.game-stage .stage-play-body:has(.swamp-stage-body) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  max-width: none;
  width: 100%;
  min-height: 0;
  margin: 0;
}

.swamp-root {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--navy);
  outline: none;
}

.swamp-root .harbor-tut-banner {
  top: auto;
  bottom: 88px;
}

.swamp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.swamp-hud {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
}

.swamp-meter,
.swamp-pay,
.swamp-help {
  pointer-events: auto;
  min-height: 44px;
  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;
}

.swamp-meter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
}

.swamp-meter .num { font-family: var(--font-num); }

.swamp-help {
  width: 44px;
  padding: 0;
}

.swamp-dock {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 6;
  display: flex;
  justify-content: center;
}

.swamp-pay {
  min-width: min(280px, 100%);
  min-height: 52px;
  padding: 8px 16px;
  background: var(--blue);
  letter-spacing: 0;
}

.swamp-pay:disabled {
  opacity: 1;
  background: var(--surface-solid);
  color: var(--text-1);
}

.swamp-line,
.swamp-result {
  position: absolute;
  left: 50%;
  z-index: 5;
  max-width: min(520px, calc(100% - 24px));
  margin: 0;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.swamp-line {
  top: 58px;
  white-space: nowrap;
}

.swamp-result { top: 102px; }

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

.swamp-sign {
  position: absolute;
  margin: 0;
  padding: 4px 10px;
  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: 800;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  transform: translate(-50%, -100%);
}

.swamp-word { margin-right: 0.35em; }
.swamp-word:last-child { margin-right: 0; }
.swamp-num { font-family: var(--font-num); }

.swamp-why {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 80px;
  z-index: 7;
  max-height: 36%;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--border-card);
  border-radius: var(--r-18);
  background: var(--surface-solid);
  color: var(--text-1);
}

.swamp-why p { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
.swamp-why .num { font-family: var(--font-num); }

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

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

.swamp-guide[hidden],
.swamp-why[hidden] { display: none; }

.stage-play:has(.swamp-stage-body) .glossary-row { display: none; }
