.playback-timeline {
  position: fixed;
  z-index: 35;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 24px);
  color: #eaf1ff;
  font: 750 13px/1.25 Nunito, sans-serif;
  pointer-events: auto;
}
.playback-chip {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #6e88b05e;
  border-radius: 24px;
  background: #112237f5;
  box-shadow: 0 4px 18px #0511264d;
}
.playback-timeline button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
.playback-timeline button:hover { background: #293f5e; }
.playback-timeline button:focus-visible {
  outline: 2px solid #bbcbff;
  outline-offset: -3px;
}
.playback-chip [data-details]::after {
  width: 5px;
  height: 5px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(1px) rotate(-45deg);
  content: '';
}
.playback-chip [data-details][aria-expanded='true']::after {
  transform: translateY(-1px) rotate(135deg);
}
.playback-chip [data-skip] {
  color: #c4d2ed;
  border-left: 1px solid #6e88b053;
}
.playback-progress {
  position: absolute;
  inset: auto 12px 2px;
  height: 2px;
  background: #6480a850;
  border-radius: 4px;
  pointer-events: none;
}
.playback-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #a3b6f1;
  transform: scaleX(var(--playback-progress, 0));
  transform-origin: left;
}
.playback-details {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: min(344px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 13px 14px 12px;
  border: 1px solid #5e78a0;
  border-radius: 16px;
  background: #17283f;
  box-shadow: 0 12px 35px #06122682;
}
.playback-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.playback-label { overflow-wrap: anywhere; }
.playback-meta output { color: #bfcce5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.playback-details input[type='range'] {
  --playback-track: linear-gradient(to right, #a6bafb var(--playback-filled, 0%), #435b80 var(--playback-filled, 0%));
  appearance: none;
  display: block;
  width: 100%;
  height: 32px;
  margin: 2px 0 3px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.playback-details input:focus-visible { outline: 2px solid #bbcbff; outline-offset: 2px; }
.playback-details input::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: var(--playback-track); }
.playback-details input::-moz-range-track { height: 3px; border-radius: 4px; background: var(--playback-track); }
.playback-details input::-webkit-slider-thumb {
  appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 1px solid #dae4ff;
  border-radius: 50%;
  background: #b6c8ff;
}
.playback-details input::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 1px solid #dae4ff;
  border-radius: 50%;
  background: #b6c8ff;
}
.playback-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 6px;
}
.playback-actions button {
  padding-inline: 7px;
  border: 1px solid #5e78a080;
  border-radius: 9px;
  background: #213651;
}
.tour-active .tour-progress { display: none; }
.tour-active .tour-caption { bottom: max(76px, calc(env(safe-area-inset-bottom) + 64px)); }
.tour-active:has(.tour-overlay .playback-details:not([hidden])) .tour-caption {
  bottom: max(205px, calc(env(safe-area-inset-bottom) + 192px));
}
.has-animation-timeline .phase-gate { bottom: 76px; }
.has-animation-timeline .session { bottom: auto !important; top: 90px !important; }
.warmup-dialog .playback-timeline { position: relative; left: auto; bottom: auto; transform: none; margin: 8px auto 14px; }
.warmup-dialog [data-pause] { display: none; }
@media (max-width: 700px) {
  .court-playing:has(.playback-timeline:not(.hidden)) .court-dialogue,
  .train-playing:has(.playback-timeline:not(.hidden)) .train-reading {
    bottom: max(66px, calc(env(safe-area-inset-bottom) + 56px));
  }
}
