/* ---------- kotouče ---------- */
.plate {
  --pc: var(--red);
  --ink: rgba(255, 255, 255, 0.92);
  --size: 44px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: radial-gradient(
    circle,
    transparent 0 17%,
    color-mix(in oklab, var(--pc) 62%, #000) 17% 20.5%,
    var(--pc) 20.5% 57%,
    color-mix(in oklab, var(--pc) 72%, #000) 57% 59.5%,
    var(--pc) 59.5% 90%,
    color-mix(in oklab, var(--pc) 55%, #000) 90% 100%
  );
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    inset 0 -4px 8px rgba(0, 0, 0, 0.35),
    0 12px 26px -10px rgba(0, 0, 0, 0.75);
}

.plate-blue { --pc: var(--blue); }
.plate-yellow { --pc: var(--yellow); --ink: rgba(20, 16, 6, 0.85); }
.plate-green { --pc: var(--green); }
.plate-white { --pc: var(--white); --ink: rgba(20, 18, 15, 0.8); }
.plate-steel { --pc: var(--steel); }

.plate.is-sm { --size: 36px; }
.plate.is-md { --size: 54px; }
.plate.is-lg { --size: 92px; }
.plate.is-xl { --size: 136px; }

.plate-hub {
  position: absolute;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #0a0a0a 0 36%, #d4d7db 38% 58%, #858b92 60% 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 1px 2px rgba(0, 0, 0, 0.6);
}

.plate-kg {
  position: absolute;
  top: 7%;
  font: 900 calc(var(--size) * 0.15) / 1 var(--f-display);
  letter-spacing: 0.02em;
  color: var(--ink);
  opacity: 0.85;
}

.plate.is-sm .plate-kg {
  display: none;
}

/* ---------- horní lišta a kroky ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-title {
  font: 600 11px/1.3 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--chalk-2);
  text-align: center;
}

.rail {
  display: flex;
  gap: 4px;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  list-style: none;
}

.rail-step {
  flex: 1;
  min-width: 0;
}

.rail-dot {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--line-strong);
}

.rail-step.is-done .rail-dot {
  background: var(--chalk-2);
}

.rail-step.is-now .rail-dot {
  background: var(--red);
  box-shadow: 0 0 12px rgba(224, 54, 44, 0.6);
}

.rail-label {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  font: 600 10px/1.2 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--chalk-3);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rail-step.is-now .rail-label {
  color: var(--chalk);
}

/* ---------- zadání ---------- */
.prompt {
  position: relative;
  padding: 20px 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-high), var(--bg-raise));
  box-shadow: inset 0 0 0 1px var(--line);
}

.prompt > * + * {
  margin-top: 14px;
}

.prompt-setup {
  color: var(--chalk-2);
  font-size: 16px;
}

.prompt-line {
  margin: 0;
}

.prompt-line blockquote {
  position: relative;
  padding-left: 22px;
  font: 700 clamp(26px, 7.4vw, 34px) / 1.05 var(--f-display);
  color: var(--chalk);
}

.prompt-line blockquote::before {
  content: '„';
  position: absolute;
  left: -2px;
  top: -6px;
  font-size: 1.6em;
  line-height: 1;
  color: var(--red);
}

.prompt-line .voice-btn {
  margin-top: 12px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font: 600 11px/1 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--chalk-2);
}

.role-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.prompt-task {
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  font-weight: 600;
}

/* povel trenéra jako křídou na tabuli */
.order {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: #1d1b17;
  box-shadow: inset 4px 0 0 var(--yellow), inset 0 0 0 1px var(--line);
}

.order > * + * {
  margin-top: 10px;
}

.order-text {
  font: 700 clamp(22px, 6vw, 28px) / 1.08 var(--f-display);
  color: var(--chalk);
}

.hint {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hint p + p {
  margin-top: 10px;
}

.hint-version {
  padding-left: 12px;
  border-left: 2px solid var(--blue);
  color: var(--chalk-2);
}

.shuffle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- hlas ---------- */
.voice-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  background: var(--bg-sunk);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  font: 600 14px/1 var(--f-body);
}

.voice-btn.is-small {
  min-height: 36px;
  font-size: 13px;
}

.voice-btn.is-playing {
  background: var(--chalk);
  color: var(--bg);
  box-shadow: none;
}

.voice-btn.is-playing .icon {
  animation: pulse 0.9s ease-in-out infinite alternate;
}

@keyframes pulse {
  to {
    opacity: 0.4;
  }
}

/* ---------- nahrávací kotouč ---------- */
.rec-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px 0 4px;
}

.rec {
  --level: 0;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.rec-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(74vw, 270px);
  aspect-ratio: 1;
}

.rec-wrap.is-compact .rec-stage {
  width: min(56vw, 200px);
}

.rec-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.rec-track,
.rec-arc {
  fill: none;
  stroke-width: 3;
}

.rec-track {
  stroke: var(--line-strong);
  stroke-dasharray: 0.6 1.4;
}

.rec-arc {
  stroke: var(--chalk);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke 0.3s;
}

.rec.is-final .rec-arc {
  stroke: var(--yellow);
}

.rec-plate {
  --size: 84%;
  width: 84%;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.12s linear;
}

.rec-plate:active {
  transform: scale(0.96);
}

.rec-label {
  position: absolute;
  bottom: 15%;
  font: 900 clamp(18px, 5vw, 24px) / 1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.92);
}

.rec[data-state='recording'] .rec-plate {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    inset 0 -4px 8px rgba(0, 0, 0, 0.35),
    0 0 0 calc(var(--level) * 22px) rgba(224, 54, 44, 0.28),
    0 0 calc(30px + var(--level) * 50px) rgba(224, 54, 44, 0.45);
}

.rec[data-state='busy'] .rec-plate {
  animation: spin 1.6s linear infinite;
  opacity: 0.8;
}

.rec-clock {
  display: grid;
  justify-items: center;
}

.rec-left {
  font: 900 clamp(64px, 20vw, 92px) / 0.85 var(--f-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.rec.is-final .rec-left {
  color: var(--yellow);
}

.rec-sub {
  margin-top: 6px;
  font: 600 11px/1 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--chalk-3);
}

.rec-hint {
  color: var(--chalk-3);
  font-size: 14px;
  text-align: center;
}

.view.is-recording .rec-hint {
  visibility: hidden;
}

/* ---------- přehrávání a časová osa ---------- */
.viz > * + * {
  margin-top: 12px;
}

.viz-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--chalk);
  color: var(--bg);
}

.play-btn.is-playing {
  background: var(--red);
  color: #fff;
}

.viz-meta {
  display: grid;
}

.viz-label {
  font: 600 11px/1.3 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--chalk-3);
}

.viz-dur {
  font: 800 24px/1 var(--f-display);
}

.tl {
  user-select: none;
}

.tl-track {
  position: relative;
  height: 84px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunk);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}

.tl-wave {
  position: absolute;
  inset: 14px 6px;
  display: flex;
  align-items: center;
  gap: 1px;
}

.tl-wave span {
  flex: 1;
  min-height: 2px;
  border-radius: 2px;
  background: rgba(239, 233, 222, 0.38);
}

.tl-words {
  position: absolute;
  inset: 0;
}

.tl-word {
  position: absolute;
  top: 36%;
  height: 28%;
  border-radius: 3px;
  background: rgba(239, 233, 222, 0.34);
}

.tl-word.is-other {
  top: 44%;
  height: 12%;
  background: rgba(239, 233, 222, 0.12);
}

.tl-focus {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 6px;
  background: rgba(47, 107, 216, 0.22);
  box-shadow: inset 0 0 0 1.5px rgba(47, 107, 216, 0.7);
}

.tl-pause {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(239, 233, 222, 0.09) 4px 6px);
  box-shadow: inset 1px 0 0 rgba(239, 233, 222, 0.12), inset -1px 0 0 rgba(239, 233, 222, 0.12);
  pointer-events: none;
}

.tl-pause em {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font: 600 10px/1 var(--f-mono);
  font-style: normal;
  color: var(--chalk-2);
  white-space: nowrap;
}

.tl-mark {
  position: absolute;
  bottom: 6px;
  width: 7px;
  height: 7px;
  margin-left: -3px;
  border-radius: 50%;
  pointer-events: none;
}

.tl-mark.is-hesitation {
  background: var(--yellow);
}

.tl-mark.is-crutch {
  box-shadow: inset 0 0 0 2px var(--yellow);
}

.tl-mark.is-repeat {
  background: var(--blue);
}

.tl-moment {
  position: absolute;
  top: 0;
  bottom: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(224, 54, 44, 0.12);
  box-shadow: inset 0 0 0 1.5px rgba(224, 54, 44, 0.45);
  cursor: pointer;
}

.tl-moment.is-main {
  background: rgba(224, 54, 44, 0.22);
  box-shadow: inset 0 0 0 2px var(--red);
}

.tl-moment b {
  position: absolute;
  top: -9px;
  left: -6px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font: 800 11px/1 var(--f-mono);
}

.tl-point,
.tl-limit,
.tl-head {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  pointer-events: none;
}

.tl-point {
  background: var(--green);
}

.tl-point em,
.tl-limit em {
  position: absolute;
  left: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  font: 600 10px/1.2 var(--f-mono);
  font-style: normal;
  white-space: nowrap;
}

.tl-point em {
  top: 4px;
  background: var(--green);
  color: #061109;
}

.tl-limit {
  background: repeating-linear-gradient(180deg, var(--chalk-3) 0 4px, transparent 4px 8px);
}

.tl-limit em {
  bottom: 16px;
  right: 4px;
  left: auto;
  background: var(--bg-high);
  color: var(--chalk-2);
}

.tl-head {
  display: none;
  background: var(--chalk);
  box-shadow: 0 0 8px rgba(239, 233, 222, 0.6);
}

.tl-head.is-on {
  display: block;
}

.tl-axis {
  position: relative;
  height: 18px;
  margin-top: 4px;
}

.tl-axis span {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  font: 500 10px/1 var(--f-mono);
  color: var(--chalk-3);
}

.tl-axis span:first-child {
  transform: none;
}

/* ---------- přepis ---------- */
.tx {
  font-size: 17px;
  line-height: 1.85;
  color: var(--chalk);
}

.tx-w {
  padding: 1px 2px;
  border-radius: 4px;
  cursor: pointer;
}

.tx-w:hover {
  background: rgba(239, 233, 222, 0.08);
}

.tx-w.is-hesitation {
  background: rgba(240, 191, 42, 0.22);
  color: var(--yellow);
}

.tx-w.is-crutch {
  box-shadow: inset 0 -2px 0 var(--yellow);
}

.tx-w.is-repeat {
  box-shadow: inset 0 -2px 0 var(--blue);
}

.tx-w.in-moment {
  background: rgba(224, 54, 44, 0.12);
}

.tx-w.in-main {
  background: rgba(224, 54, 44, 0.28);
}

.tx-w.is-unsure {
  text-decoration: underline wavy var(--chalk-3) 1px;
  text-underline-offset: 4px;
}

.tx-w.is-event {
  color: var(--chalk-3);
  font-style: italic;
}

.tx-w.is-other {
  color: var(--chalk-3);
}

.tx-pause,
.tx-sp {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  font: 600 10px/1.4 var(--f-mono);
  vertical-align: 2px;
}

.tx-pause {
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--chalk-3);
}

.tx-sp {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tx-sp.is-me {
  background: var(--chalk);
  color: var(--bg);
}

.tx-sp.is-other {
  background: var(--bg-high);
  color: var(--chalk-3);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--chalk-3);
}

.legend .tx-w {
  cursor: default;
}

/* ---------- fakta ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px;
}

.stat {
  display: grid;
  gap: 4px;
  padding: 10px 10px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunk);
}

.stat-v {
  font: 800 21px/1 var(--f-display);
  font-variant-numeric: tabular-nums;
}

.stat-l {
  font: 600 9.5px/1.2 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--chalk-3);
}

.stat.is-good .stat-v { color: var(--green); }
.stat.is-warn .stat-v { color: var(--yellow); }
.stat.is-bad .stat-v { color: #ff7a6e; }
