/* The Leaky Month room. Full-bleed stage. Colours from tokens.css. */

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

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

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

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

.leak-root .harbor-hud-top {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.leak-root .harbor-hud-chip,
.leak-root .harbor-hud-goal {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  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: 700;
}

.leak-root .harbor-hud-goal {
  margin-left: auto;
}

.leak-root .harbor-hud-lbl {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 650;
}

.leak-root .harbor-hud-actions {
  pointer-events: auto;
}

.leak-story {
  position: absolute;
  top: 52px;
  left: 12px;
  right: 12px;
  z-index: 5;
  right: auto;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0;
  overflow: hidden;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}

.leak-sign {
  position: absolute;
  z-index: 4;
  max-width: 168px;
  transform: translate(-50%, -100%);
  padding: 4px 8px;
  border: 2px solid var(--border-card);
  white-space: nowrap;
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
}

.leak-sign.is-house { border-color: var(--mint); }
.leak-sign.is-stall { border-color: var(--link); }
.leak-sign.is-bakery { border-color: var(--coral); }

.leak-why {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 132px;
  z-index: 8;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  max-height: 46%;
  margin: 0;
  overflow: hidden;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-solid);
  color: var(--text-body);
}

.leak-why-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.leak-why > .harbor-btn {
  flex: none;
  min-height: 44px;
}

.leak-why[hidden] { display: none !important; }

.leak-happened,
.leak-lesson,
.leak-key,
.leak-note {
  margin: 0 0 8px;
  color: var(--text-body);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.leak-key b,
.leak-note .num {
  color: var(--gold);
  font-family: var(--font-num);
}

.leak-choices {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 7;
  display: flex;
  gap: 8px;
}

.leak-choice {
  flex: 1;
  min-height: 44px;
  padding: 8px 10px;
  border: 2px solid var(--border-card);
  border-radius: 14px;
  background: var(--surface-solid);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}

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

.leak-guide {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--scrim);
}

.leak-guide[hidden] { display: none !important; }

.leak-root .harbor-tut-banner {
  position: absolute;
  top: 132px;
  left: 50%;
  z-index: 9;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 24px));
}

@media (prefers-reduced-motion: reduce) {
  .leak-sign,
  .leak-choice,
  .leak-why {
    transition: none;
    animation: none;
  }
}
