.radio-popover {
  position: fixed;
  inset: auto;
  left: var(--radio-left, 12px);
  top: var(--radio-top, 12px);
  margin: 0;
  width: min(272px, calc(100vw - 24px));
  max-height: var(--radio-height, calc(100dvh - 24px));
  overflow: auto;
  padding: 0;
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  background: var(--surface-canvas);
  color: var(--text-primary);
  box-shadow: var(--shadow-popover);
  font: 400 var(--font-size-body-sm)/1.5 var(--site-font-body);
}
.radio-popover, .radio-popover * { box-sizing: border-box; }
.radio-popover:popover-open { animation: radio-popover-enter 200ms ease-out; }
.radio-popover__header, .radio-popover__transport, .radio-popover__volume { display: flex; align-items: center; gap: 8px; }
.radio-popover__header { justify-content: space-between; min-height: 38px; padding: 4px 10px 4px 14px; background: var(--surface-1); border-bottom: 1px solid var(--border-muted); }
.radio-popover__heading { color: var(--text-heading); font: 500 var(--font-size-body)/1.2 var(--site-font-display); }
.radio-popover__body { padding: 12px; }
.radio-popover__close { background: transparent; }
.radio-popover__status { margin: 0; color: var(--text-secondary); font-size: var(--font-size-caption); }
.radio-popover__transport { margin: 12px 0; }
.radio-popover__transport .radio-popover__button { font-size: var(--font-size-body); }
.radio-popover__button { display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; color: var(--text-primary); background: var(--surface-2); font: inherit; cursor: pointer; transition: background 160ms ease, transform 160ms ease; }
.radio-popover__button:hover { background: var(--surface-hover); }
.radio-popover__button:active { transform: scale(.96); }
.radio-popover__button:disabled { opacity: .45; cursor: default; }
.radio-popover__button:focus-visible, .radio-popover input:focus-visible, .radio-popover__song:focus-visible, .radio-popover__tracks:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.radio-popover__play { color: var(--surface-1); background: var(--text-primary); }
.radio-popover__volume { padding-top: 8px; border-top: 1px solid var(--border-muted); color: var(--text-secondary); }
.radio-popover__range { width: 100%; flex: 1; min-width: 0; height: 28px; appearance: none; background: transparent; cursor: pointer; }
.radio-popover__volume output { min-width: 4ch; font-size: var(--font-size-caption); text-align: right; font-variant-numeric: tabular-nums; }
.radio-popover__error { margin: 12px 0 0; color: var(--danger); font-size: var(--font-size-caption); }
.radio-popover [hidden] { display: none; }
/* The popover replaces the small hover label while the receiver is active. */
.atelier-object--radio[aria-expanded="true"] .atelier-object__label { visibility: hidden; }
@keyframes radio-popover-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .radio-popover:popover-open { animation: none; }
  .radio-popover__button { transition: none; }
}
.radio-popover__tracks { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 1; min-width: 0; width: 100%; min-height: 48px; padding: 8px 10px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface-1); color: var(--text-heading); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.radio-popover__tracks > span { display: grid; min-width: 0; }
.radio-popover__tracks small { color: var(--text-secondary); font-size: var(--font-size-caption); font-weight: 400; }
.radio-popover__tracks span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-popover__tracks i { color: var(--text-primary); font-size: var(--font-size-body); }
.radio-popover__tracks[aria-expanded="true"] i { transform: rotate(180deg); }
.radio-popover__list { display: grid; gap: 3px; max-height: 180px; overflow-y: auto; margin: 8px 0 12px; padding: 5px; border: 1px solid var(--border-muted); border-radius: 12px; background: var(--surface-2); scrollbar-width: thin; }
.radio-popover__song { width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-primary); font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.radio-popover__song:hover { background: var(--surface-hover); }
.radio-popover__song[aria-pressed="true"] { background: var(--site-accent-soft); color: var(--site-accent); font-weight: 600; }
.radio-popover__play:hover { background: var(--text-secondary); }
.radio-popover__range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--site-accent) var(--radio-fill, 0%), var(--border-default) var(--radio-fill, 0%)); }
.radio-popover__range::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: var(--site-accent); }
.radio-popover__range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--border-default); }
.radio-popover__range::-moz-range-progress { height: 4px; background: var(--site-accent); }
.radio-popover__range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--site-accent); }
@media (pointer: coarse) {
  .radio-popover__button { flex-basis: 40px; width: 40px; height: 40px; }
  .radio-popover__tracks { height: 40px; }
}
.radio-popover__progress { margin-bottom: 10px; }
.radio-popover__times { display: flex; justify-content: space-between; color: var(--text-secondary); font-size: var(--font-size-caption); font-variant-numeric: tabular-nums; }
.radio-popover__range:disabled { opacity: .45; cursor: default; }
