.workspace:not([data-cinematic]) .era-timeline {
  grid-template-columns: auto auto auto minmax(0, 1fr) auto;
}

#audio-tours-open {
  display: grid;
  place-items: center;
  align-self: stretch;
  align-content: center;
  gap: 5px;
  padding-inline: 12px;
  border: solid var(--chrome-edge);
  border-width: 0 1px 0 0;
  background: linear-gradient(var(--chrome-raised), var(--chrome-panel));
  color: var(--chrome-accent);
  font: 600 10px var(--title);
}

#audio-tours-open:is(:hover, :focus-visible, [aria-expanded="true"]) {
  color: var(--chrome-text);
  background: var(--chrome-hover);
}

#audio-tours-open:focus-visible { outline-offset: -4px; }

.workspace[data-cinematic] :is(#audio-tours-open, #audio-tours-panel, #audio-tour-beacon) {
  display: none;
}

#audio-tour-beacon {
  position: absolute;
  z-index: 4;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: min(460px, calc(100% - 28px));
  padding: 7px 14px;
  border: 1px solid #efc98eb5;
  border-radius: 999px;
  background: #171222eb;
  color: var(--chrome-text);
  box-shadow: 0 10px 28px #07040eb5, 0 0 0 3px #efc98e26;
  pointer-events: none;
  font-size: 12px;
}

.audio-tour-beacon-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #efc98e;
  box-shadow: 0 0 0 0 #efc98eb0;
  flex: none;
}

#audio-tour-beacon[data-playing="true"] .audio-tour-beacon-dot {
  animation: audio-tour-pulse 1.8s ease-out infinite;
}

.audio-tour-beacon-step {
  color: #efc98e;
  font-weight: 750;
  white-space: nowrap;
}

.audio-tour-beacon-place {
  font-weight: 700;
  white-space: nowrap;
}

.audio-tour-beacon-title {
  color: var(--chrome-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes audio-tour-pulse {
  0% { box-shadow: 0 0 0 0 #efc98eb5; }
  75% { box-shadow: 0 0 0 9px #efc98e00; }
  100% { box-shadow: 0 0 0 0 #efc98e00; }
}

.map-shell[data-audio-tour="playing"] #globe-view::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px #efc98e40, inset 0 0 42px #efc98e1a;
}

#audio-tours-panel {
  position: absolute;
  z-index: 6;
  left: 18px;
  bottom: 18px;
  width: min(440px, calc(100% - 36px));
  max-height: min(72vh, 540px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px 18px 18px;
  border: 1px solid var(--chrome-edge);
  border-radius: 11px;
  background: linear-gradient(155deg, #211b31f5, #14101ef7 68%);
  color: var(--chrome-text);
  box-shadow: 0 22px 54px #06030ec9;
  scrollbar-color: var(--chrome-scroll) var(--chrome-ink);
  scrollbar-width: thin;
}

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

.audio-tours-kicker {
  margin: 0 0 3px;
  color: #efc98e;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.audio-tours-header h2 {
  margin: 0;
  font: 600 20px/1.2 var(--title);
  color: #fff2db;
}

.audio-tours-voice {
  margin: 3px 0 0;
  color: var(--chrome-muted);
  font-size: 11px;
}

.audio-tours-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audio-tour-card {
  padding: 12px 13px;
  border: 1px solid var(--chrome-subtle-edge);
  border-radius: 8px;
  background: #1b1628;
}

.audio-tour-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
}

.audio-tour-region {
  color: #efc98e;
  font-weight: 700;
}

.audio-tour-meta {
  color: var(--chrome-muted);
}

.audio-tour-card h3 {
  margin: 0 0 4px;
  font: 650 15px/1.25 var(--title);
  color: var(--chrome-text);
}

.audio-tour-card p {
  margin: 0 0 10px;
  color: var(--chrome-muted);
  font-size: 12px;
  line-height: 1.45;
}

.audio-tour-start {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid #efc98e99;
  border-radius: 6px;
  background: #efc98e;
  color: #1f1423;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.audio-tour-start:is(:hover, :focus-visible) {
  background: #ffe0aa;
}

.audio-tour-player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.audio-tour-back {
  min-height: 30px;
  padding: 3px 9px;
  border: 1px solid var(--chrome-subtle-edge);
  border-radius: 5px;
  background: var(--chrome-raised);
  color: var(--chrome-accent);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.audio-tour-back:hover {
  border-color: var(--chrome-focus);
  background: var(--chrome-hover);
}

.audio-tour-progress {
  color: #efc98e;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.audio-tour-title {
  margin: 0 0 10px;
  font: 600 17px/1.2 var(--title);
  color: #fff2db;
}

.audio-tour-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.audio-tour-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--chrome-subtle-edge);
  border-radius: 999px;
  background: #1b1628;
  color: var(--chrome-muted);
  font-size: 11px;
  cursor: pointer;
}

.audio-tour-step span:first-child {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #2c233f;
  color: var(--chrome-text);
  font-weight: 700;
  font-size: 10px;
}

.audio-tour-step[aria-current="step"] {
  border-color: #efc98e;
  background: #362742;
  color: #fff2db;
}

.audio-tour-step[aria-current="step"] span:first-child {
  background: #efc98e;
  color: #1f1423;
}

.audio-tour-stop-heading {
  margin-bottom: 8px;
}

.audio-tour-stop-place {
  margin: 0;
  color: var(--chrome-accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.audio-tour-stop-title {
  margin: 2px 0 0;
  font: 600 16px/1.25 var(--title);
  color: var(--chrome-text);
}

.audio-tour-captions {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--chrome-subtle-edge);
  border-radius: 8px;
  background: #130f1e;
  line-height: 1.55;
  font-size: 13px;
}

.audio-caption-segment {
  display: inline;
  padding: 1px 2px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--chrome-muted);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}

.audio-caption-segment:hover {
  color: var(--chrome-text);
}

.audio-caption-segment.is-spoken {
  color: #c9bfd7;
}

.audio-caption-segment.is-active {
  background: #efc98e29;
  color: #fff6e6;
}

.audio-tour-scrubber-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--chrome-muted);
  font-variant-numeric: tabular-nums;
}

.audio-tour-scrubber {
  width: 100%;
  accent-color: #efc98e;
  cursor: pointer;
}

.audio-tour-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.audio-tour-controls button {
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--chrome-edge);
  border-radius: 6px;
  background: var(--chrome-raised);
  color: var(--chrome-text);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.audio-tour-controls button:enabled:is(:hover, :focus-visible) {
  border-color: var(--chrome-focus);
  background: var(--chrome-hover);
}

.audio-tour-controls button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.audio-tour-controls button[data-audio-tour="play"] {
  min-width: 78px;
  border-color: #efc98e99;
  background: #efc98e;
  color: #1f1423;
  font-weight: 750;
}

.audio-tour-controls button[data-audio-tour="play"]:is(:hover, :focus-visible) {
  background: #ffe0aa;
  color: #1f1423;
}

.audio-tour-auto {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-inline-start: auto;
  color: var(--chrome-muted);
  font-size: 12px;
  cursor: pointer;
}

.audio-tour-auto input {
  accent-color: #efc98e;
}

.audio-tour-status {
  margin: 8px 0 0;
  color: #efc98e;
  font-size: 12px;
}

.audio-tour-status:empty { display: none; }

@media (max-width: 680px) {
  #audio-tours-open { min-width: 40px; padding-inline: 8px; }
  #audio-tours-open span { display: none; }
  #audio-tours-panel { left: 10px; bottom: 10px; width: calc(100% - 20px); max-height: 62vh; }
  #audio-tour-beacon { top: 58px; font-size: 11px; padding: 6px 11px; }
  .audio-tour-beacon-title { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #audio-tour-beacon[data-playing="true"] .audio-tour-beacon-dot { animation: none; }
  .audio-caption-segment { transition: none; }
}
