/* Ekran startowy (ETAP 7 story-v2) — nagłówek, dwie kolumny (~/rejestr +
   ~/tryb-gry po lewej, ~/fabuła po prawej), nakładka "fragmenty fabuły" i
   odtwarzacz scen (współdzielony z /play, patrz play.html). Mobile-first:
   kolumny jedna pod drugą do ok. 860px (dobrane po treści — mapa SVG + dwa
   okna terminala potrzebują osobnej kolumny dopiero od tej szerokości), nie
   odpowiada żadnemu konkretnemu urządzeniu. */

.start-app { max-width: min(96vw, 72rem); }

.start-header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-2);
  font-family: var(--mono); font-size: var(--font-sm); margin-bottom: var(--space-4);
  padding-bottom: var(--space-2); border-bottom: 1px solid var(--border);
}
.start-prompt-line { color: var(--text); }
.start-cursor { color: var(--accent); animation: start-blink 1.1s steps(1) infinite; }
@keyframes start-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .start-cursor { animation: none; } }
.start-mode-badge { color: var(--muted); }

.start-columns { display: flex; flex-direction: column; gap: var(--space-4); }
.start-col { display: flex; flex-direction: column; gap: var(--space-3); flex: 1 1 0; min-width: 0; }
@media (min-width: 860px) {
  .start-columns { flex-direction: row; }
}

/* ── ~/rejestr ── */
.start-registry-count { font-family: var(--mono); font-size: var(--font-sm); color: var(--text); margin-bottom: var(--space-2); }
.start-recent-row { display: flex; justify-content: space-between; gap: var(--space-2); font-family: var(--mono); font-size: var(--font-xs); color: var(--text); padding: 3px 0; }
.start-recent-row.muted { color: var(--muted); }
.start-new-tag { font-size: var(--font-xs); color: var(--bg); background: var(--accent); font-weight: 700; border-radius: var(--radius); padding: 0 var(--space-1); }

/* ── ~/tryb-gry ── */
.start-mode-cards { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.start-mode-card {
  flex: 1 1 8rem; min-height: calc(var(--tap) * 1.4); padding: var(--space-3);
  background: var(--bg3); border: 1.5px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-family: var(--mono); font-size: var(--font-md); font-weight: 700; cursor: pointer;
}
.start-mode-card.active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg3)); }
.start-mode-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── ~/fabuła ── */
.start-story-header { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-weight: 700; color: var(--accent); margin-bottom: var(--space-2); }
.start-story-header span:last-child { color: var(--muted); font-weight: 400; font-size: var(--font-xs); }

.start-map-wrap { margin-bottom: var(--space-3); }
.start-map-svg { width: 100%; height: auto; max-height: 11rem; }
.start-map-edge { stroke: var(--border); stroke-width: 0.6; stroke-dasharray: 2 1.5; }
.start-map-edge.on { stroke: var(--accent); stroke-dasharray: none; }
.start-map-node circle { fill: var(--bg3); stroke: var(--border); stroke-width: 0.8; stroke-dasharray: 2 1.5; }
.start-map-node.on circle { fill: color-mix(in srgb, var(--accent) 18%, var(--bg3)); stroke: var(--accent); stroke-dasharray: none; }
.start-map-label { font: 2.6px var(--mono); fill: var(--muted); text-anchor: middle; }
.start-map-node.on .start-map-label { fill: var(--text); }
.start-map-q { font: 4px var(--mono); font-weight: 700; fill: var(--muted); text-anchor: middle; dominant-baseline: middle; }

.start-quote { font-family: var(--mono); font-size: var(--font-sm); color: var(--text); font-style: italic; margin-bottom: var(--space-3); line-height: 1.5; }
.start-quote-mark { color: var(--accent); font-style: normal; }

.start-block { margin-bottom: var(--space-3); font-family: var(--mono); }
.start-block-title { font-size: var(--font-xs); color: var(--muted); text-transform: lowercase; margin-bottom: 2px; }
.start-block-line { font-size: var(--font-sm); color: var(--text); }
.start-block-meta { font-size: var(--font-xs); color: var(--muted); }

.start-recent { margin-bottom: var(--space-3); }

.start-story-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ── nakładka: fragmenty fabuły ── */
.fragments-card { max-width: min(100%, 36rem); max-height: 80dvh; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-3); }
.fragments-top { display: flex; justify-content: space-between; align-items: baseline; }
.fragments-top h2 { font-family: var(--mono); font-size: var(--font-md); color: var(--accent); }
.fragments-list { display: flex; flex-direction: column; gap: var(--space-2); overflow-y: auto; }
.fragments-section { display: flex; flex-direction: column; gap: var(--space-2); }
.fragments-section-title { font-family: var(--mono); font-size: var(--font-xs); color: var(--muted); border-top: 1px solid var(--border); padding-top: var(--space-2); margin-top: var(--space-1); }
.fragments-row { font-family: var(--mono); font-size: var(--font-sm); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-2) var(--space-3); }
.fragments-row.muted { color: var(--muted); }
.fragments-row-title { font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.fragments-row-text { font-size: var(--font-xs); color: var(--text); line-height: 1.5; }
.fragments-diary-locked { font-size: var(--font-xs); color: var(--muted); font-style: italic; margin-top: 2px; }
.fragments-play-btn { margin-top: var(--space-2); font-size: var(--font-xs); }

/* ── odtwarzacz scen (współdzielony: /start i /play) ── */
.scene-player-card {
  max-width: min(94vw, 40rem); width: 100%; display: flex; flex-direction: column; gap: var(--space-3);
  align-items: center; text-align: center;
}
.scene-player-frame {
  font-family: var(--mono); font-size: var(--font-md); color: var(--text); white-space: pre;
  line-height: 1.6; min-height: 6rem; display: flex; align-items: center; justify-content: center;
}
.scene-player-hint { font-family: var(--mono); font-size: var(--font-xs); color: var(--muted); }
