/* Minimal splash and quiet incomplete-progress itch. */

.drift-splash {
  cursor: default;
}

.splash-inner {
  gap: 18px;
  width: min(100%, 520px);
  pointer-events: auto;
}

.splash-mark {
  max-width: 100%;
  margin: 0;
  font-size: clamp(8px, 2.5vw, 14px);
  line-height: 1.12;
  letter-spacing: 0;
  white-space: pre;
}

.splash-tagline {
  margin: 0;
  color: rgba(239,246,238,.48);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: center;
  animation: splashStartDrift 19s ease-in-out -6s infinite;
}

.splash-choices {
  display: grid;
  width: min(100%, 430px);
  border-top: 1px solid rgba(239,246,238,.12);
  border-bottom: 1px solid rgba(239,246,238,.12);
}

.splash-choice {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 16px 12px;
  border: 0;
  border-bottom: 1px solid rgba(239,246,238,.08);
  border-radius: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
  animation: none;
}

.splash-choice:last-child {
  border-bottom: 0;
}

.splash-choice:hover,
.splash-choice:focus-visible {
  background: rgba(239,246,238,.025);
}

.splash-choice-title {
  color: rgba(239,246,238,.82);
  font-size: 10px;
  letter-spacing: .18em;
}

.splash-choice-copy {
  color: rgba(239,246,238,.38);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: none;
}

.splash-version-note {
  margin: 0;
  color: rgba(239,246,238,.28);
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
}

.memory-position,
.memory-progress,
.memory-retained,
.memory-total,
.memory-slash,
.memory-separator {
  display: inline-block;
}

.memory-retained-breathing {
  animation: retainedNumberBreathe 5.4s ease-in-out infinite;
}

/* If an earlier story moment still contains unretained authored language,
   the existing back affordance inherits the same quiet breathing signal. */
body.drift-started .story-nav-prev.story-nav-incomplete-behind:not(:disabled) {
  animation:
    ambientDriftB 29s ease-in-out -9s infinite,
    retainedNumberBreathe 5.4s ease-in-out infinite;
}

/* Room completion pauses on the solved moment. After a short delay the normal
   forward affordance becomes an explicit continuation choice in the same place. */
.story-nav.story-nav-next-room {
  width: 96px;
  justify-self: end;
  white-space: nowrap;
  color: rgba(239,246,238,.68);
  font-size: 9px;
  line-height: 1.25;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: translateX(8px) scale(.98);
}

.has-story-history .story-nav.story-nav-next-room {
  opacity: .82;
}

.story-nav.story-nav-next-room:not(:disabled):hover,
.story-nav.story-nav-next-room:not(:disabled):focus-visible {
  color: rgba(239,246,238,.96);
  transform: translateX(8px) scale(1.03);
}

.trophy-notice {
  min-height: 18px;
  margin: 5px 48px 0;
  color: rgba(239,246,238,.66);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 520ms ease, transform 520ms ease;
  pointer-events: none;
}

.trophy-notice.visible {
  opacity: 1;
  transform: translateY(0);
}

.trophy-toggle {
  border: 0;
  background: transparent;
  padding: 7px 0;
  cursor: pointer;
  color: rgba(217,228,216,.33);
  font-size: 9px;
  letter-spacing: .12em;
  transition: color 240ms ease, opacity 700ms cubic-bezier(.2,.72,.2,1);
}

/* Trophy discovery is progressive: no affordance at all until at least one trophy exists. */
.trophy-toggle[hidden] {
  display: none;
}

.trophy-toggle:not([hidden]) {
  display: inline-block;
  visibility: visible;
  opacity: 1;
}

.trophy-toggle:hover,
.trophy-toggle:focus-visible {
  color: rgba(217,228,216,.8);
  outline: none;
}

.trophy-dialog {
  width: min(560px, calc(100% - 28px));
}

.trophy-list {
  display: grid;
  gap: 10px;
}

.trophy-entry {
  padding: 13px 0;
  border-top: 1px solid rgba(83,97,89,.24);
}

.trophy-entry:first-child {
  border-top: 0;
}

.trophy-kind {
  margin-bottom: 6px;
  color: rgba(217,228,216,.34);
  font-size: 8px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.trophy-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  color: rgba(239,246,238,.82);
  font-size: 12px;
}

.trophy-row strong {
  font-weight: 500;
  letter-spacing: .04em;
}

.trophy-tier {
  color: rgba(239,246,238,.52);
  font-size: 9px;
  letter-spacing: .14em;
}

.trophy-empty {
  margin: 0;
  color: rgba(217,228,216,.35);
  font-size: 12px;
}

@keyframes retainedNumberBreathe {
  0%, 100% {
    color: rgba(217,228,216,.22);
    text-shadow: 0 0 0 rgba(239,246,238,0);
    opacity: .72;
  }
  50% {
    color: rgba(239,246,238,.82);
    text-shadow: 0 0 8px rgba(239,246,238,.08);
    opacity: 1;
  }
}

@media (max-width: 520px) {
  .splash-inner {
    gap: 16px;
    padding-inline: 14px;
  }

  .splash-mark {
    font-size: 8px;
    line-height: 1.14;
  }

  .splash-tagline {
    font-size: 8px;
    letter-spacing: .16em;
    max-width: 30ch;
  }

  .splash-choice {
    padding: 14px 10px;
  }

  .splash-choice-title {
    font-size: 9px;
  }

  .splash-choice-copy {
    font-size: 8px;
  }

  .story-nav.story-nav-next-room {
    width: 76px;
    font-size: 7px;
    letter-spacing: .08em;
    transform: translateX(5px) scale(.98);
  }

  .story-nav.story-nav-next-room:not(:disabled):hover,
  .story-nav.story-nav-next-room:not(:disabled):focus-visible {
    transform: translateX(5px) scale(1.02);
  }

  .trophy-notice {
    margin-inline: 34px;
  }

  .mind-meta {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .memory-retained-breathing,
  .story-nav-incomplete-behind,
  .splash-tagline {
    animation: none;
  }
}
