/* Inflation Ghost glade. Full-bleed stage. Colours from tokens.css. */

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

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

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

.ghost-root .harbor-tut-banner {
  top: 100px;
}

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

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

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

.ghost-hud {
  top: 8px;
  justify-content: flex-end;
}

.ghost-dock {
  bottom: 8px;
  z-index: 7;
  justify-content: center;
}

.ghost-chip,
.ghost-leave,
.ghost-help,
.ghost-year-btn {
  pointer-events: auto;
  letter-spacing: 0;
}

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

.ghost-word:last-child {
  margin-right: 0;
}

.ghost-num {
  letter-spacing: 0;
  font-family: var(--font-num);
}

.ghost-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  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;
}

.ghost-chip .num,
.ghost-tag .num,
.ghost-key .num,
.ghost-key .ghost-num {
  font-family: var(--font-num);
}

.ghost-help,
.ghost-leave,
.ghost-year-btn {
  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-weight: 700;
}

.ghost-help,
.ghost-year-btn {
  width: 44px;
  padding: 0;
}

.ghost-leave {
  padding: 8px 16px;
}

.ghost-leave:disabled,
.ghost-year-btn:disabled {
  opacity: 1;
  background: var(--surface-solid);
  color: var(--text-1);
}

.ghost-story {
  position: absolute;
  top: 52px;
  left: 12px;
  z-index: 5;
  width: max-content;
  max-width: calc(100% - 72px);
  margin: 0;
  overflow: hidden;
  padding: 6px 10px;
  border-radius: var(--r-12);
  background: var(--surface-solid);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
}

.ghost-tag {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -100%);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
}

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

.ghost-why-line,
.ghost-key,
.ghost-note {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.4;
}

.ghost-note { color: var(--text-2); }

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

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

@media (prefers-reduced-motion: reduce) {
  .ghost-leave,
  .ghost-why { transition: none; }
}
