.nkd-zachran-app {
  --bg: #fafafa;
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #525252;
  --ink-mute: #999999;
  --line: #ebebeb;
  --line-soft: #f3f3f3;
}

.nkd-zachran-app, .nkd-zachran-app *, .nkd-zachran-app *::before, .nkd-zachran-app *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Když je hra aktivní, skryjeme zbytek stránky (téma, header, footer) */
html.nkd-zachran-active,
body.nkd-zachran-active {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  width: 100%;
}
body.nkd-zachran-active > *:not(.nkd-zachran-app) {
  display: none !important;
}

.nkd-zachran-app {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  /* Fullscreen - přes celé okno prohlížeče */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 99999;
}

/* Floating tlačítko Zavřít hru, fixní v rohu okna */
.nkd-zachran-app .nkd-zachran-close {
  position: fixed;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  z-index: 100000;
  transition: all 0.15s;
}
.nkd-zachran-app .nkd-zachran-close:hover {
  color: var(--ink);
  border-color: var(--ink-mute);
}
.nkd-zachran-app .nkd-zachran-close span:first-child {
  font-size: 18px;
  line-height: 1;
}
@media (max-width: 600px) {
  .nkd-zachran-app .nkd-zachran-close {
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    font-size: 12px;
  }
}

:where(.nkd-zachran-app) button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:where(.nkd-zachran-app) input { font: inherit; }

:where(.nkd-zachran-app) .hidden { display: none !important; }

/* topbar */
.topbar {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  gap: 16px;
}

.crumb {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.back {
  font-size: 13px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.back:hover { color: var(--ink); }
.back.invisible { visibility: hidden; }

.identity {
  font-size: 13px;
  color: var(--ink-soft);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.identity strong {
  color: var(--ink);
  font-weight: 600;
}

.generation-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 2px;
  white-space: nowrap;
}

/* context strip */
.context-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  font-size: 12px;
  color: var(--ink-mute);
  text-align: center;
}

.context-strip strong { color: var(--ink); font-weight: 600; }

/* timeline */
.timeline {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.timeline-step.current .timeline-dot { background: var(--ink); }
.timeline-step.done .timeline-dot { background: var(--ink-mute); }

.timeline-step.current { color: var(--ink); font-weight: 600; }

.timeline-year { font-size: 11px; font-variant-numeric: tabular-nums; }

.timeline-line { flex: 1; height: 1px; background: var(--line); min-width: 20px; }
.timeline-line.done { background: var(--ink-mute); }

/* === KARTA 1: COLD OPEN === */
.cold-open {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 24px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.cold-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeIn 0.6s 0.1s forwards;
}

.cold-hook {
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 28px;
  max-width: 640px;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.cold-hook .accent { font-weight: 700; }

@media (max-width: 600px) {
  .cold-hook { font-size: 36px; line-height: 1.08; }
}

.cold-subhook {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 540px;
  margin-bottom: 56px;
  line-height: 1.5;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

@media (max-width: 600px) {
  .cold-subhook { font-size: 17px; margin-bottom: 40px; }
}

.cold-contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}

@media (max-width: 600px) {
  .cold-contrast { grid-template-columns: 1fr; }
}

.cold-side {
  background: var(--paper);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.cold-side-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cold-side-label::before {
  content: '';
  display: block;
  width: 14px;
  height: 1px;
  background: var(--ink-mute);
}

.cold-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.cold-list li {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  padding-left: 16px;
  position: relative;
}

.cold-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 1px;
  background: var(--ink);
}

.cold-side.dim .cold-list li { color: var(--ink-mute); }
.cold-side.dim .cold-list li::before { background: var(--ink-mute); }

.cold-scope {
  margin-bottom: 56px;
  opacity: 0;
  animation: fadeUp 0.8s 1.2s forwards;
}

.cold-scope-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.cold-scope-text {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 600px;
}

.cold-scope-text strong { color: var(--ink); font-weight: 500; }

.cold-cta {
  opacity: 0;
  animation: fadeUp 0.8s 1.5s forwards;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  padding: 18px 32px;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 360px;
  transition: all 0.2s;
}

.btn-primary:disabled { opacity: 0.25; cursor: not-allowed; }
.btn-primary:not(:disabled):hover { background: #000; }

.btn-primary.compact {
  padding: 14px 24px;
  font-size: 14px;
  width: auto;
  white-space: nowrap;
}

.btn-primary .arrow { margin-left: 16px; transition: transform 0.2s; }
.btn-primary:not(:disabled):hover .arrow { transform: translateX(3px); }

.cold-meta {
  font-size: 13px;
  color: var(--ink-mute);
  max-width: 360px;
  margin-top: 14px;
}

.cold-footer {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: fadeIn 0.8s 1.9s forwards;
}

.cold-footer a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

/* === SDÍLENÉ: stage === */
.stage {
  flex: 1;
  padding: 48px 24px 80px;
  max-width: min(95%, 2400px);
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 600px) {
  .stage { padding: 32px 20px 60px; }
}

.intro {
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s forwards;
}

h1 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  h1 { font-size: 28px; }
}

.lead {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 560px;
}

/* === KARTA 2: ARCHETYPY === */
.archetypes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 40px;
}

@media (max-width: 700px) {
  .archetypes { grid-template-columns: 1fr; }
}

.archetype {
  background: var(--paper);
  padding: 36px 32px 32px;
  text-align: left;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 340px;
  opacity: 0;
  animation: fadeUp 0.5s forwards;
}

.archetype:nth-child(1) { animation-delay: 0.2s; }
.archetype:nth-child(2) { animation-delay: 0.28s; }
.archetype:nth-child(3) { animation-delay: 0.36s; }
.archetype:nth-child(4) { animation-delay: 0.44s; }

.archetype:hover { background: #fcfcfc; }
.archetype.selected { background: var(--ink); color: var(--paper); }
.archetype.selected .archetype-number,
.archetype.selected .archetype-meta,
.archetype.selected .stat-label,
.archetype.selected .archetype-tagline { color: rgba(255,255,255,0.55); }
.archetype.selected .archetype-pitch { color: rgba(255,255,255,0.85); }
.archetype.selected .stat-dot { background: var(--paper); }
.archetype.selected .stat-dot.empty { background: rgba(255,255,255,0.18); }

.archetype-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.archetype-number {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.archetype-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 2px;
  margin-top: 8px;
}

.archetype.selected .archetype-tag {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.25);
}

.archetype-tagline {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.archetype-name {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}

@media (max-width: 600px) {
  .archetype-name { font-size: 22px; }
}

.archetype-meta {
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 16px;
}

.archetype-pitch {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 28px;
  flex: 1;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.archetype.selected .stats { border-top-color: rgba(255,255,255,0.15); }

.stat { display: flex; flex-direction: column; gap: 6px; }

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

.stat-dots { display: flex; gap: 4px; }

.stat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.stat-dot.empty { background: var(--line); }

/* === KARTA 3: TRADICE === */
.section {
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.6s forwards;
}

.section:nth-of-type(1) { animation-delay: 0.3s; }
.section:nth-of-type(2) { animation-delay: 0.5s; }

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  display: block;
  width: 14px;
  height: 1px;
  background: var(--ink-mute);
}

.section-question {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 10px;
}

.section-hint {
  font-size: 14px;
  color: var(--ink-mute);
  margin-bottom: 20px;
  max-width: 540px;
  line-height: 1.55;
}

.tradition-input-wrap {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: border-color 0.2s;
}

.tradition-input-wrap:focus-within { border-color: var(--ink); }

.tradition-input {
  width: 100%;
  padding: 22px 24px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: none;
  background: transparent;
  color: var(--ink);
  outline: none;
}

@media (max-width: 600px) {
  .tradition-input { font-size: 19px; padding: 18px 20px; }
}

.tradition-input::placeholder { color: var(--ink-mute); font-weight: 400; }

.tradition-counter {
  position: absolute;
  right: 18px;
  bottom: 8px;
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.examples {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.example-label { font-size: 11px; color: var(--ink-mute); margin-right: 4px; padding: 6px 0; }

.example {
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 100px;
  transition: all 0.15s;
  cursor: pointer;
}

.example:hover { border-color: var(--ink-soft); color: var(--ink); }

.types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (max-width: 600px) {
  .types { grid-template-columns: 1fr; }
}

.type {
  background: var(--paper);
  padding: 24px 22px;
  text-align: left;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 160px;
}

.type:hover { background: #fcfcfc; }
.type.selected { background: var(--ink); color: var(--paper); }
.type.selected .type-domain, .type.selected .type-desc { color: rgba(255,255,255,0.7); }
.type.selected .type-examples {
  color: rgba(255,255,255,0.55);
  border-top-color: rgba(255,255,255,0.15);
}

.type-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 12px; }

.type-name { font-size: 18px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.2; }

.type-domain {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 4px;
}

.type-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 14px; flex: 1; }

.type-examples {
  font-size: 11px;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  line-height: 1.5;
  font-style: italic;
}

.source-note { margin-top: 12px; font-size: 11px; color: var(--ink-mute); line-height: 1.5; }
.source-note a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }

/* === KARTA 4: PROSTREDÍ === */
.environments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 40px;
}

@media (max-width: 800px) {
  .environments { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .environments { grid-template-columns: 1fr; }
}

.env {
  background: var(--paper);
  padding: 28px 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 220px;
  opacity: 0;
  animation: fadeUp 0.5s forwards;
}

.env:nth-child(1) { animation-delay: 0.2s; }
.env:nth-child(2) { animation-delay: 0.28s; }
.env:nth-child(3) { animation-delay: 0.36s; }
.env:nth-child(4) { animation-delay: 0.44s; }
.env:nth-child(5) { animation-delay: 0.52s; }
.env:nth-child(6) { animation-delay: 0.6s; }

.env:hover { background: #fcfcfc; }
.env.selected { background: var(--ink); color: var(--paper); }
.env.selected .env-tagline, .env.selected .env-desc { color: rgba(255,255,255,0.7); }
.env.selected .env-number { color: rgba(255,255,255,0.5); }

.env-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }

.env-number {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.env-tagline {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.env-name { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 10px; }
@media (max-width: 600px) { .env-name { font-size: 18px; } }

.env-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.5; flex: 1; }

.env.skip { background: var(--line-soft); }
.env.skip .env-tagline, .env.skip .env-number { color: var(--ink-mute); }
.env.skip .env-name { color: var(--ink-soft); font-weight: 500; }
.env.skip:hover { background: var(--paper); }
.env.skip.selected { background: var(--ink-soft); color: var(--paper); }
.env.skip.selected .env-tagline, .env.skip.selected .env-desc, .env.skip.selected .env-number { color: rgba(255,255,255,0.7); }

/* === KARTA 5: TAH HRY === */
.game-stage {
  flex: 1;
  padding: 40px 24px 120px;
  max-width: min(95%, 2400px);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
}

@media (max-width: 900px) {
  .game-stage {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 20px 120px;
  }
}

/* === KONCOVÁ OBRAZOVKA === */
.finale-stage {
  flex: 1;
  padding: 40px 24px 120px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.finale-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.finale-verdict {
  border: 1px solid var(--line);
  padding: 28px 30px;
  background: var(--paper);
  opacity: 0;
  animation: fadeUp 0.6s 0.3s forwards;
}

.finale-verdict.tone-flourish {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.finale-verdict-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.7;
  margin-bottom: 12px;
}

.finale-verdict.tone-flourish .finale-verdict-label { opacity: 0.6; }

.finale-verdict-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.finale-verdict-desc {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.85;
}

.finale-indicators-block {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.finale-indicators-block .indicators-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 14px;
  font-weight: 600;
}

#finale-indicators .indicator {
  margin-bottom: 12px;
}

#finale-history-panel {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.epoch-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s forwards;
}

.epoch-label::before {
  content: '';
  display: block;
  width: 14px;
  height: 1px;
  background: var(--ink-mute);
}

.game-h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

@media (max-width: 600px) { .game-h1 { font-size: 24px; } }

.scene-narrative {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 600px;
  opacity: 0;
  animation: fadeUp 0.6s 0.3s forwards;
}

.actions-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}

.actions-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.actions-budget { font-size: 12px; color: var(--ink-mute); }
.actions-budget strong { color: var(--ink); font-weight: 600; }

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 0.6s 0.5s forwards;
}

@media (max-width: 640px) { .actions { grid-template-columns: 1fr; } }

.history-panel {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 0.6s 0.7s forwards;
}

.history-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 14px;
  font-weight: 600;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.history-turn {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.history-turn:last-child { border-bottom: none; }

.history-turn-label {
  font-size: 11px;
  color: var(--ink-mute);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.history-turn-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-action {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.history-action-mark {
  flex-shrink: 0;
  width: 12px;
  display: inline-block;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

.history-action.pitfall .history-action-mark {
  font-weight: 600;
}

.history-action-name {
  flex: 1;
}

.action {
  background: var(--paper);
  padding: 16px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 96px;
}

.action:hover { background: #fcfcfc; }
.action.selected { background: var(--ink); color: var(--paper); }
.action.selected .action-desc { color: rgba(255,255,255,0.7); }
.action.disabled { opacity: 0.35; cursor: not-allowed; }

.action-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.action-check {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action.selected .action-check { background: var(--paper); border-color: var(--paper); }
.action.selected .action-check::after {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--ink);
  border-radius: 50%;
}

.action-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 28px;
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}

@media (max-width: 900px) { .sidebar { position: static; } }

.indicators { background: var(--paper); border: 1px solid var(--line); padding: 24px; }

.indicators-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.indicator { margin-bottom: 18px; }
.indicator:last-of-type { margin-bottom: 0; }

.indicator-label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.indicator-dots { display: flex; gap: 4px; }
.indicator-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.indicator-dot.empty { background: var(--line); }

.preview-hint {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 12px;
  line-height: 1.5;
  font-style: italic;
}

/* === SDÍLENÉ: bottom bar pevný === */
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  opacity: 0;
  animation: fadeUp 0.6s 0.8s forwards;
}

.bottom-hint { font-size: 13px; color: var(--ink-mute); flex: 1; }
.bottom-hint strong { color: var(--ink); font-weight: 600; }

/* fixed action bar (jen ve hře) */
.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.02);
}

.action-bar-hint { font-size: 13px; color: var(--ink-soft); flex: 1; }
.action-bar-hint strong { color: var(--ink); font-weight: 600; }

@media (max-width: 600px) {
  .action-bar, .bottom-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .action-bar-hint, .bottom-hint { text-align: center; }
  .btn-primary.compact { width: 100%; justify-content: center; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* footer */
.footer {
  padding: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
}

.footer a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

/* === RECAP (vyhodnocení tahu) === */
.recap-stage {
  flex: 1;
  padding: 40px 24px 120px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 600px) {
  .recap-stage { padding: 32px 20px 120px; }
}

.recap-main {
  display: flex;
  flex-direction: column;
}

.recap-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.recap-section-label::before {
  content: '';
  display: block;
  width: 14px;
  height: 1px;
  background: var(--ink-mute);
}

.recap-actions {
  border: 1px solid var(--line);
  background: var(--paper);
}

.recap-action {
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.recap-action:last-child { border-bottom: none; }

.recap-action-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
}

.recap-action-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.recap-action-pitfall-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.recap-action.pitfall .recap-action-pitfall-tag {
  color: var(--ink);
  border-color: var(--ink);
}

.recap-action-outcome {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 12px;
}

.recap-action-impact {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.recap-action-impact-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.recap-action-impact-item.positive { color: var(--ink); }
.recap-action-impact-item.negative { color: var(--ink); }
.recap-action-impact-item.negative .recap-impact-value { font-weight: 600; }

.recap-action-sources {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.recap-sources-label {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink);
  margin-right: 6px;
}

.recap-indicators {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 24px 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 36px;
}

@media (max-width: 600px) {
  .recap-indicators { grid-template-columns: 1fr; gap: 16px; }
}

.recap-indicator {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recap-indicator-label {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recap-indicator-change {
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.recap-indicator-change.up { color: var(--ink); }
.recap-indicator-change.down { color: var(--ink); }
.recap-indicator-change.zero { color: var(--ink-mute); }

.recap-indicator-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.recap-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.recap-dot.filled { background: var(--ink); }
.recap-dot.gained { background: var(--ink); animation: dotPulse 0.6s ease-out; }
.recap-dot.lost { background: var(--line); position: relative; }
.recap-dot.lost::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--ink-mute);
  border-radius: 50%;
}

@keyframes dotPulse {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ink);
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-secondary:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.btn-secondary:disabled { opacity: 0.3; cursor: not-allowed; border-color: var(--line); color: var(--ink-mute); }

/* === CELKOVÝ STAV TRADICE === */
.overall-state {
  border: 1px solid var(--line);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.overall-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.overall-value {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.overall-good { border-color: var(--ink); }
.overall-good .overall-value { color: var(--ink); }

.overall-neutral { border-color: var(--line); }
.overall-neutral .overall-value { color: var(--ink-soft); }

.overall-warning { border-color: var(--ink-mute); background: var(--line-soft); }
.overall-warning .overall-value { color: var(--ink); }

.overall-critical { border-color: var(--ink); background: var(--ink); }
.overall-critical .overall-label { color: rgba(255,255,255,0.6); }
.overall-critical .overall-value { color: var(--paper); }

/* recap varianta - větší karta */
.recap-overall {
  margin-bottom: 28px;
}

.recap-overall-card {
  border: 1px solid var(--line);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recap-overall-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}

.recap-overall-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

.recap-overall-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-top: 6px;
  max-width: 520px;
}

.recap-overall-good { border-color: var(--ink); }
.recap-overall-neutral { border-color: var(--line); }
.recap-overall-warning { border-color: var(--ink-mute); background: var(--line-soft); }

.recap-overall-critical {
  border-color: var(--ink);
  background: var(--ink);
}

.recap-overall-critical .recap-overall-label { color: rgba(255,255,255,0.55); }
.recap-overall-critical .recap-overall-value { color: var(--paper); }
.recap-overall-critical .recap-overall-desc { color: rgba(255,255,255,0.85); }

@media (max-width: 600px) {
  .recap-overall-value { font-size: 26px; }
}

