/* Call It marsh. Full-bleed stage. Colours from tokens.css. */

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

.marsh-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(.marsh-stage-body) {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

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

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

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

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

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

.marsh-meter,
.marsh-lock,
.marsh-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;
}

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

.marsh-meter[data-marsh-asset] { min-width: 0; }
.marsh-meter .num {
  font-family: var(--font-num);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .marsh-hud { flex-wrap: wrap; }
  .marsh-meter[data-marsh-asset] { flex: 1 0 auto; }
}

.marsh-help {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  width: 44px;
  padding: 0;
}

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

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

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

.marsh-line {
  position: absolute;
  top: 58px;
  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;
  white-space: nowrap;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-width: 700px) {
  .marsh-line { top: 116px; }
}

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

.marsh-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%);
}

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

.marsh-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);
}

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

.marsh-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;
}

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

.marsh-guide-card {
  max-width: 420px;
  padding: 16px;
  border-radius: var(--r-18);
  background: var(--surface-solid);
  color: var(--text-1);
}

.marsh-guide-card p { margin: 0 0 10px; }

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

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