/* Krokování */
.game-header { padding: 28px 0 18px; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.game-header h1 { font-size: clamp(34px, 4.6vw, 52px); margin-top: 10px; }
.game-header .lead { font-size: 18px; max-width: 520px; margin-top: 8px; }

/* ---- Jeviště s pásem ---- */
.stage { padding: 0; overflow: hidden; }
.stage-scroll { overflow-x: auto; padding: 16px 16px 20px; }
.stage-inner { position: relative; padding-top: 118px; min-width: min-content; margin: 0 auto; width: max-content; --field: clamp(36px, 4.5vw, 58px); }

.strip { display: flex; gap: 6px; }
.field {
  width: var(--field, 64px); height: var(--field, 64px);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: calc(var(--field, 64px) * 0.34);
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
  user-select: none;
  flex: none;
}
.field .paw { opacity: .3; font-size: calc(var(--field, 64px) * 0.36); }
.field:hover { background: var(--brand-secondary-soft); border-color: var(--teal-300); }
.field.zero { border-color: var(--teal-300); background: var(--brand-secondary-soft); }

/* ---- Kočky ---- */
.walker {
  position: absolute; bottom: calc(var(--field, 64px) + 8px);
  width: calc(var(--field, 64px) * 1.5);
  transition: left .34s cubic-bezier(.34,1.2,.64,1);
  cursor: pointer;
}
/* Kočičí kresby koukají doleva — „dopředu" (doprava) je proto zrcadlené */
.walker .flip { transition: transform .35s ease; transform-origin: 50% 80%; transform: scaleX(-1); }
.walker.facing-left .flip { transform: scaleX(1); }
.walker .body { height: calc(var(--field, 64px) * 1.45); }
.walker .body .cat { width: 100%; height: 100%; }
.walker.hopping .body { animation: hop .3s ease; }
.walker.wobbling .body { animation: wobble .45s ease; }
.walker .name {
  text-align: center; margin-top: 2px;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--text-muted);
  background: var(--surface-card); border: 2px solid var(--border-soft);
  border-radius: var(--radius-pill); padding: 0 8px; width: max-content;
  margin-left: auto; margin-right: auto;
  transition: background .15s, color .15s, border-color .15s;
}
.walker.active .name { background: var(--brand-secondary); border-color: var(--brand-secondary); color: var(--cream-50); }
.walker.mate-2 { z-index: 2; }

@keyframes hop {
  0% { transform: translateY(0); }
  45% { transform: translateY(calc(var(--field, 64px) * -0.38)) rotate(-2deg); }
  100% { transform: translateY(0); }
}
@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-7deg); }
  60% { transform: rotate(5deg); }
}
@keyframes spadl {
  0% { transform: translateY(0) rotate(0); }
  100% { transform: translateY(6px) rotate(3deg); }
}

/* Bublina */
.bubble {
  position: absolute; z-index: 5;
  background: var(--surface-card); border: 2px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 6px 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text-strong);
  box-shadow: var(--shadow-sm);
  transform: translate(-50%, 6px); opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none; white-space: nowrap;
}
.bubble.show { opacity: 1; transform: translate(-50%, 0); }
.bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -5px;
  width: 10px; height: 10px; background: inherit;
  border-right: 2px solid var(--border-strong); border-bottom: 2px solid var(--border-strong);
  transform: rotate(45deg);
}

/* ---- Ovládání ---- */
.controls { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin-top: 20px; }
.controls h3 { font-size: 18px; margin-bottom: 12px; }

.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  min-width: 54px; height: 54px; padding: 0 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  background: var(--surface-card); color: var(--text-strong);
  border: 2px solid var(--border-strong); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.pill:hover { background: var(--surface-sunken); }
.pill:active { transform: translateY(2px); }
.pill.on { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--text-on-primary); }
.pill.dir { font-size: 17px; }
.pill.dir.on { background: var(--brand-secondary); border-color: var(--brand-secondary); }

.cmd-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.cmd-row .btn { flex: none; }

.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 2px dashed var(--border-soft); flex-wrap: wrap; }
.opt-row:last-child { border-bottom: none; }
.opt-label { font-weight: 700; color: var(--text-strong); font-size: 15px; }
.seg { display: inline-flex; background: var(--surface-sunken); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.seg button {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  padding: 6px 12px; border-radius: var(--radius-pill); color: var(--text-body);
  transition: background .15s, color .15s;
}
.seg button.on { background: var(--brand-secondary); color: var(--cream-50); }

.switch {
  position: relative; width: 52px; height: 30px; border-radius: var(--radius-pill);
  background: var(--surface-sunken); border: 2px solid var(--border-strong);
  cursor: pointer; transition: background .15s, border-color .15s; flex: none;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--surface-card); box-shadow: var(--shadow-sm);
  transition: left .18s ease;
}
.switch.on { background: var(--brand-secondary); border-color: var(--brand-secondary); }
.switch.on::after { left: 24px; }

.hint { font-size: 13px; color: var(--text-muted); margin-top: 10px; }

/* ---- Zápis ---- */
.zapis { margin-top: 20px; }
.zapis-head { display: flex; align-items: center; justify-content: space-between; }
.zapis-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; min-height: 36px; }
.chip {
  font-family: var(--font-mono); font-weight: 700; font-size: 15px;
  background: var(--surface-card); border: 2px solid var(--border-strong);
  border-radius: var(--radius-pill); padding: 4px 13px; color: var(--text-strong);
  animation: chip-in .25s ease;
}
.chip.obrat { background: var(--brand-secondary-soft); border-color: var(--teal-300); font-family: var(--font-body); font-weight: 800; }
.chip.m2 { background: var(--brand-secondary-soft); }
@keyframes chip-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.zapis-empty { font-size: 14px; color: var(--text-muted); align-self: center; }

/* Návod */
.navod { margin: 24px 0 48px; }
.navod summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--text-strong);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.navod summary::before { content: '🐱'; }
.navod ul { margin: 12px 0 0; padding-left: 22px; }
.navod li { margin-bottom: 8px; font-size: 15px; }

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