/* One-click radio in the bars; the folded panel follows the page palette. */
.radio-control {
  position: relative;
  display: flex;
  align-items: center;
  color: inherit;
  font: 12px var(--sans, sans-serif);
}
.radio-play {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
}
.radio-glyph {
  flex: 0 0 9px;
  width: 9px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.radio-control:is([data-playing="true"], [data-loading="true"]) .radio-glyph {
  clip-path: none;
  background: linear-gradient(90deg, currentColor 0 34%, transparent 34% 66%, currentColor 66%);
}
.radio-name {
  letter-spacing: 0.02em;
}
.radio-now {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  font: italic 15px var(--serif, serif);
  color: var(--muted, currentColor);
}
.radio-wave {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}
.radio-control[data-playing="true"] .radio-wave {
  display: flex;
}
.radio-wave i {
  width: 2px;
  height: 100%;
  background: currentColor;
  transform-origin: bottom;
  animation: radio-wave 1.1s ease-in-out infinite alternate;
}
.radio-wave i:nth-child(2) {
  animation-delay: -0.4s;
}
.radio-wave i:nth-child(3) {
  animation-delay: -0.8s;
}
@keyframes radio-wave {
  from {
    transform: scaleY(0.3);
  }
  to {
    transform: scaleY(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .radio-wave i {
    animation: none;
    transform: scaleY(0.65);
  }
}
.radio-more > summary {
  display: grid;
  place-items: center;
  width: 30px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}
.radio-more > summary::-webkit-details-marker {
  display: none;
}
.radio-more > summary span {
  width: 6px;
  height: 6px;
  margin-top: -4px;
  border-right: 1px solid;
  border-bottom: 1px solid;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.radio-more[open] > summary span {
  margin-top: 3px;
  transform: rotate(225deg);
}
.radio-panel {
  position: absolute;
  z-index: 40;
  top: 100%;
  right: 0;
  width: 260px;
  padding: 18px 20px 14px;
  background: var(--paper, #101a23);
  color: var(--ink, #f3efe7);
  border: 1px solid var(--line, #8883);
  box-shadow: 0 16px 40px #0006;
  text-align: left;
}
.radio-panel p {
  margin: 0 0 10px;
  font: 13px/1.5 var(--sans, sans-serif);
}
.radio-panel .radio-kicker {
  margin: 0 0 6px;
  font: 9px var(--mono, monospace);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, currentColor);
}
.radio-panel [data-radio-track] {
  font: 22px/1.2 var(--serif, serif);
  margin-bottom: 8px;
}
.radio-panel button {
  display: block;
  color: inherit;
  min-height: 44px;
  padding: 5px 0;
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  font: inherit;
}
.radio-panel button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
}
.radio-panel label {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 44px;
}
.radio-panel input {
  width: 160px;
  accent-color: currentColor;
}
.radio-panel [data-radio-status]:empty {
  display: none;
}
.radio-control :focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
@media (max-width: 1000px) {
  .topbar .radio-now {
    display: none;
  }
}
@media (max-width: 700px) {
  .topbar .radio-name {
    display: none;
  }
  .topbar .radio-play {
    justify-content: center;
    min-width: 36px;
  }
}
/* The gallery footer passes gestures to the painting except on its controls. */
.gallery-bottom .radio-control {
  pointer-events: auto;
  color: #eee3d2;
}
/* Over the painting, the title stays in the panel; the bar keeps only the control. */
.gallery-bottom .radio-now {
  display: none;
}
.gallery-bottom .radio-panel {
  top: auto;
  bottom: 100%;
  left: 0;
  right: auto;
  background: #101a23;
  color: #f3efe7;
}
@media (max-width: 600px) {
  .gallery-bottom {
    gap: 12px;
  }
  .gallery-bottom .radio-name,
  .gallery-bottom .radio-now {
    display: none;
  }
  .gallery-bottom .gallery-navigation {
    flex: 1;
    min-width: 0;
    width: auto;
    gap: 2px;
  }
  .gallery-bottom #gallery-index {
    min-width: 38px;
  }
  .gallery-bottom #gallery-pause {
    margin-left: 0;
    min-width: 70px;
    padding: 0 8px;
  }
}
