.experience-controls {
  position: fixed;
  z-index: 1500;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 7px;
  align-items: center;
}

.experience-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg2) 88%, transparent);
  color: var(--fg-mid);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.experience-button:hover,
.experience-button:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  outline: none;
  transform: translateY(-1px);
}

.experience-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

html[data-theme="dark"] [data-theme-sun],
html[data-theme="light"] [data-theme-moon] {
  display: none;
}

.music-pulse {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--bg);
  border-radius: 50%;
  background: var(--fg-dim);
}

.music-toggle.is-playing {
  border-color: color-mix(in srgb, var(--gold) 65%, var(--border));
  color: var(--gold);
}

.music-toggle.is-playing .music-pulse {
  background: #6ee7c7;
  box-shadow: 0 0 10px #6ee7c7;
  animation: music-pulse 1.3s ease-in-out infinite;
}

@keyframes music-pulse {
  50% { opacity: .35; transform: scale(.72); }
}

.music-panel {
  position: absolute;
  top: 48px;
  right: 0;
  width: min(320px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 17px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--gold) 11%, transparent), transparent 42%),
    color-mix(in srgb, var(--bg2) 96%, transparent);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  backdrop-filter: blur(20px);
}

.music-panel[hidden] {
  display: none;
}

.music-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 13px;
}

.music-panel-head span {
  display: block;
  color: var(--gold);
  font-size: 8px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.music-panel-head strong {
  display: block;
  margin-top: 5px;
  color: var(--accent);
  font: 500 19px/1.2 var(--font-serif);
}

.music-panel-head button {
  border: 0;
  padding: 3px;
  background: transparent;
  color: var(--fg-mid);
  font: 500 10px/1 var(--font-sans);
  cursor: pointer;
}

.music-tracks {
  display: grid;
  gap: 6px;
}

.music-tracks button {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 11px;
  background: transparent;
  color: var(--fg-mid);
  text-align: left;
  cursor: pointer;
}

.music-tracks button.active {
  border-color: color-mix(in srgb, var(--gold) 50%, var(--border));
  background: color-mix(in srgb, var(--gold) 7%, transparent);
  color: var(--accent);
}

.music-tracks span {
  color: var(--gold);
  font-size: 8px;
  letter-spacing: .1em;
}

.music-tracks strong {
  font: 400 11px/1.2 var(--font-sans);
}

.music-stop {
  width: 100%;
  min-height: 37px;
  margin-top: 9px;
  border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--border));
  border-radius: 9px;
  background: color-mix(in srgb, var(--gold) 7%, transparent);
  color: var(--gold);
  font: 500 8px/1 var(--font-sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.music-panel > p {
  margin-top: 10px;
  color: var(--fg-dim);
  font-size: 8px;
  line-height: 1.55;
}

html[data-theme="light"] .learn-search input,
html[data-theme="light"] .assistant-form input,
html[data-theme="light"] .museum-search input,
html[data-theme="light"] .assistant-message,
html[data-theme="light"] .museum-stats {
  background: color-mix(in srgb, var(--bg2) 92%, transparent);
}

html[data-theme="light"] .lesson-text-preview {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--domain-color) 13%, transparent), transparent 58%),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(0, 0, 0, .025) 32px),
    var(--bg2);
}

html[data-theme="light"] .lesson-number {
  border-color: color-mix(in srgb, var(--accent) 15%, transparent);
  background: color-mix(in srgb, var(--bg2) 86%, transparent);
  color: var(--fg-mid);
}

html[data-theme="light"] .assistant-message.is-user {
  background: color-mix(in srgb, var(--domain-color) 7%, var(--bg2));
}

html[data-theme="light"] .collection-card:hover,
html[data-theme="light"] .artwork-card:hover,
html[data-theme="light"] .lesson-card:hover {
  box-shadow: 0 22px 50px rgba(71, 57, 38, .13);
}

@media (max-width: 720px) {
  .experience-controls {
    top: auto;
    right: 12px;
    bottom: 12px;
  }

  .music-panel {
    top: auto;
    right: 0;
    bottom: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .music-toggle.is-playing .music-pulse {
    animation: none;
  }
}
