/* The HUD stays fixed; weekly navigation belongs to the page title. */
html { scroll-padding-top: 84px; }
.game-header { grid-template-columns: auto 1fr auto; grid-template-areas: 'brand status menu'; padding: 12px 30px; gap: 20px; }
.game-header .progress-status { padding: 0; border: 0; gap: 28px; align-items: center; }
.progress-status dd { font-size: 16px; }
.stage-title { min-width: 0; }
.stage-steps { display: flex; flex-wrap: wrap; align-items: center; list-style: none; gap: 7px 15px; padding: 0; margin: 0 0 14px; }
.stage-steps li { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.stage-steps li>span { width: 19px; height: 19px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 9px; }
.stage-steps .icon { width: 12px; height: 12px; }
.stage-steps .current { color: var(--accent); }
.stage-steps .current>span { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.stage-steps .done>span { color: var(--mint); }
.stage-heading { align-items: flex-end; }
.stage-heading h1 { margin-top: 0; }
.stage-heading.steps-only .stage-steps { margin-bottom: 0; }
.stage-heading .context-tools { padding-bottom: 10px; }
.album-caption { margin: 0 0 12px; font-size: 11px; }

/* Memories use the same image-overlay language as the heroine cards. */
.memory-card { position: relative; isolation: isolate; background: #15121b; color: white; }
.memory-card .memory-art { aspect-ratio: 4/5; }
.memory-art>.portrait { height: 100%; object-fit: cover; object-position: center top; }
.memory-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 28%,#15121bd9 76%,#15121b); pointer-events: none; }
.memory-card>.memory-overlay { position: absolute; inset: auto 0 0; z-index: 1; padding: 16px; }
.memory-card .memory-overlay small { color: #ffbad1; font-size: 10px; }
.memory-card .memory-overlay h3 { margin: 4px 0; color: white; }
.memory-card .memory-overlay p { margin: 4px 0 0; color: #f1e8ed; }

/* Final result is a page: the chosen heroine, then the complete roster. */
.ended-stage { padding-top: 36px; }
.love-finale { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.finale-portrait { position: relative; display: block; width: min(300px,70vw); aspect-ratio: 4/5; padding: 0; border: 1px solid var(--accent); border-radius: 20px; overflow: hidden; box-shadow: 0 12px 55px #ff8bae1a; }
.finale-portrait>.portrait { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.finale-portrait>span { position: absolute; inset: auto 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; padding: 45px 16px 20px; background: linear-gradient(transparent,#15121bf0); color: white; font-size: 25px; font-weight: 900; }
.finale-portrait>span>.icon { color: #ff8bae; width: 20px; }
.finale-portrait small { flex-basis: 100%; font-size: 11px; font-weight: 600; }
.love-finale h1 { font-size: clamp(25px,3vw,38px); margin: 8px 0 0; word-break: keep-all; }
.love-finale>p { margin: 0; white-space: pre-line; line-height: 1.9; color: var(--muted); font-size: 14px; }
.finale-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; font-size: 12px; color: var(--muted); }
.finale-roster { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.finale-roster h2 { font-size: 23px; margin-bottom: 20px; }
.end-page-actions { justify-content: center; margin-top: 32px; }
@media(max-width:960px) {
  .game-header { grid-template-columns: auto 1fr auto; grid-template-areas: 'brand status menu'; padding: 12px 22px; gap: 16px; }
  .game-header .progress-status { gap: 14px; }
  .progress-status>div { flex-direction: column; align-items: flex-start; gap: 2px; }
  .progress-status dd { font-size: 13px; }
}
@media(max-width:600px) {
  html { scroll-padding-top: 116px; }
  .game-header { grid-template-columns: 1fr auto; grid-template-areas: 'brand menu' 'status status'; gap: 9px; padding: 10px 20px; }
  .game-header .progress-status { justify-content: space-between; gap: 10px; padding-top: 4px; }
  .progress-status>div { flex-direction: row; align-items: baseline; gap: 5px; }
  .stage-heading { position: relative; align-items: center; }
  .stage-steps { gap: 6px 10px; margin-bottom: 12px; }
  .stage-steps li { font-size: 9px; gap: 4px; }
  .stage-steps li>span { width: 16px; height: 16px; font-size: 8px; }
  .stage-heading .context-tools { align-self: flex-end; padding-bottom: 8px; }
}
@media(max-width:360px) {
  .stage-steps { gap: 6px; }
  .stage-steps li { font-size: 8px; }
  .stage-steps li>span { width: 14px; height: 14px; }
}
