/* Personal track picks: the audio element and radio controls stay in place. */
body:has(.radio-picks-actions) { padding-bottom: max(122px, var(--radio-dock-clearance, 122px)); }
html:has(.radio-picks-actions) { scroll-padding-bottom: max(122px, var(--radio-dock-clearance, 122px)); }
.site-radio:has(.radio-picks-actions) { gap: 12px; }
.site-radio:has(.radio-picks-actions) .site-radio__info { line-height: 1.4; }
.radio-picks-actions {
  display: flex; align-items: center; flex: 0 0 auto; gap: 8px;
  min-width: 0;
}
.site-radio .radio-picks-actions button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; margin: 0; padding: 9px 13px; border-radius: 999px;
  border: 1px solid #ffffff2b; background: #ffffff06; color: #f3f5fa;
  font: inherit; font-size: .8rem; font-weight: 700; line-height: 1.25;
  cursor: pointer;
}
.site-radio .radio-picks-actions button:hover { background: #ffffff10; border-color: #a395ff90; }
.site-radio .radio-picks-actions .radio-picks-save { flex: 0 0 auto; }
.site-radio .radio-picks-actions .radio-picks-open {
  min-width: 0; max-width: 190px; color: #c6cede;
  overflow: hidden; text-overflow: ellipsis;
}
.radio-picks-save svg {
  flex: 0 0 18px; width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
}
.site-radio .radio-picks-actions .radio-picks-save[aria-pressed="true"] {
  background: #bdff6514; border-color: #bdff6570; color: #bdff65;
}
.radio-picks-save[aria-pressed="true"] svg,
.radio-picks-save[aria-pressed="true"] svg path { fill: currentColor; }
.radio-picks-count { color: #bdff65; font-variant-numeric: tabular-nums; }
.site-radio .radio-picks-actions button:disabled,
.site-radio .radio-picks-actions button[aria-disabled="true"] {
  opacity: .48; cursor: default;
}
.site-radio .radio-picks-actions button:focus-visible {
  outline: 3px solid #a395ff; outline-offset: 3px;
}

/* Native dialog keeps keyboard focus with the saved list while it is open. */
.radio-picks-dialog {
  box-sizing: border-box; width: min(620px, calc(100vw - 32px));
  max-width: none; max-height: calc(100vh - 40px);
  max-height: min(780px, calc(100dvh - 40px)); margin: auto; padding: 0;
  border: 1px solid #a395ff50; border-radius: 22px;
  background: #10121c; color: #f3f5fa; color-scheme: dark;
  box-shadow: 0 28px 110px #000b;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #50536b #10121c;
}
.radio-picks-dialog::backdrop { background: #05070ccc; backdrop-filter: blur(6px); }
.radio-picks-dialog *, .radio-picks-dialog *::before, .radio-picks-dialog *::after { box-sizing: border-box; }
.radio-picks-header {
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 22px 12px; border: 0;
}
.radio-picks-header h2 {
  margin: 0; color: #f3f5fa; font-size: 1.5rem; font-weight: 800;
  letter-spacing: -.035em; line-height: 1.2;
}
.radio-picks-eyebrow {
  display: block; margin: 0 0 5px; color: #bdff65;
  font-size: .66rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
}
.radio-picks-dialog button, .radio-picks-dialog select {
  min-height: 44px; margin: 0; padding: 9px 13px;
  border: 1px solid #ffffff28; border-radius: 10px;
  background: #1b1e2c; color: #f3f5fa; font: inherit;
  font-size: .85rem; font-weight: 600; line-height: 1.25;
}
.radio-picks-dialog button { cursor: pointer; }
.radio-picks-dialog button:hover { background: #282b3c; border-color: #a395ff80; }
.radio-picks-dialog button:focus-visible, .radio-picks-dialog select:focus-visible,
.radio-picks-dialog a:focus-visible {
  outline: 3px solid #a395ff; outline-offset: 3px;
}
.radio-picks-dialog button:disabled { opacity: .45; cursor: default; }
.radio-picks-dialog .radio-picks-close {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0;
  border-color: transparent; border-radius: 50%; background: #ffffff08;
  color: #c6cede; font-size: 1.4rem;
}
.radio-picks-close svg { width: 20px; height: 20px; }
.radio-picks-intro {
  margin: 0 22px 18px; color: #b2bbcd; font-size: .89rem;
  line-height: 1.55;
}
.radio-picks-storage-info {
  margin: 0 22px 20px; padding: 14px 16px;
  border: 1px solid #a395ff40; border-radius: 12px;
  background: #a395ff09; color: #b2bbcd; font-size: .84rem; line-height: 1.55;
}
.radio-picks-storage-info p { margin: 0 0 12px; }
.radio-picks-storage-info strong { color: #f3f5fa; }
.radio-picks-storage-info summary { cursor: pointer; min-height: 32px; color: #d0c7ff; font-weight: 650; }
.radio-picks-storage-info summary:focus-visible { outline: 3px solid #a395ff; outline-offset: 3px; }
.radio-picks-storage-info details p { margin: 10px 0 0; }
.radio-picks-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; padding: 0 22px 18px;
}
.radio-picks-toolbar label {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  min-width: 0; color: #b2bbcd; font-size: .82rem;
}
.radio-picks-toolbar select { max-width: 100%; cursor: pointer; }
.radio-picks-toolbar button { color: #bdff65; background: #bdff6509; border-color: #bdff653d; }
.radio-picks-toolbar button:hover { background: #bdff6515; border-color: #bdff6580; }
.radio-picks-list {
  display: grid; gap: 10px; margin: 0; padding: 0 22px;
  list-style: none;
}
.radio-picks-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 12px; margin: 0; padding: 14px;
  border: 1px solid #ffffff16; border-radius: 14px;
  background: #191c29;
}
.radio-picks-track { min-width: 0; }
.radio-picks-track h3 {
  margin: 0 0 4px; color: #f3f5fa; font-size: .98rem;
  font-weight: 750; letter-spacing: -.015em; line-height: 1.35;
  overflow-wrap: anywhere;
}
.radio-picks-track p {
  margin: 0 0 7px; color: #bec6d6; font-size: .84rem;
  line-height: 1.4; overflow-wrap: anywhere;
}
.radio-picks-track small { display: block; color: #919bb2; font-size: .71rem; line-height: 1.4; }
.radio-picks-item-controls { display: grid; justify-items: end; gap: 7px; min-width: 0; }
.radio-picks-stars { display: flex; align-items: center; gap: 2px; }
.radio-picks-dialog .radio-picks-star {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 36px; width: 36px; min-height: 40px; padding: 0;
  border-color: transparent; border-radius: 8px; background: transparent;
  color: #858ea5; font-size: 1.4rem; font-weight: 400;
}
.radio-picks-star svg { width: 22px; height: 22px; }
.radio-picks-dialog .radio-picks-star[aria-pressed="true"] { color: #bdff65; background: #bdff650b; }
.radio-picks-dialog .radio-picks-star:hover { color: #d1ff92; background: #bdff6515; }
.radio-picks-dialog .radio-picks-remove {
  min-height: 36px; padding: 7px 10px; border-color: transparent;
  background: transparent; color: #b2bbcd; font-size: .75rem;
}
.radio-picks-dialog .radio-picks-remove:hover { border-color: #ffacbe50; background: #ffacbe0b; color: #ffb5c5; }
.radio-picks-empty {
  margin: 0 22px; padding: 30px 20px; border: 1px dashed #a395ff40;
  border-radius: 14px; color: #b2bbcd; background: #a395ff05;
  text-align: center; font-size: .92rem; line-height: 1.6;
}
.radio-picks-empty strong { display: block; margin-bottom: 6px; color: #f3f5fa; }
.radio-picks-notice {
  min-height: 1.5em; margin: 16px 22px 20px; color: #aeb8ce;
  font-size: .77rem; line-height: 1.5; overflow-wrap: anywhere;
}
.radio-picks-sr, .radio-picks-announcement {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Keep the full-size dock on one line; reflow only when space is tight. */
@media (max-width: 900px) {
  body:has(.radio-picks-actions) { padding-bottom: max(calc(172px + env(safe-area-inset-bottom, 0px)), var(--radio-dock-clearance, 172px)); }
  html:has(.radio-picks-actions) { scroll-padding-bottom: max(calc(172px + env(safe-area-inset-bottom, 0px)), var(--radio-dock-clearance, 172px)); }
  .site-radio:has(.radio-picks-actions) {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) 86px;
    align-items: center; gap: 10px; padding: 12px;
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    width: calc(100% - 16px); border-radius: 14px;
  }
  .site-radio:has(.radio-picks-actions) .site-radio__logo {
    grid-area: 1 / 1; width: 40px; height: 40px;
  }
  .site-radio:has(.radio-picks-actions) .site-radio__info { grid-area: 1 / 2; }
  .site-radio:has(.radio-picks-actions) #radio-toggle {
    grid-area: 2 / 1 / 3 / -1; justify-self: start;
    margin: 0; min-height: 44px; padding: 9px 16px; font-size: .86rem;
  }
  .site-radio:has(.radio-picks-actions) .site-radio__volume {
    grid-area: 1 / 3; justify-self: end; display: grid; gap: 3px;
  }
  .site-radio:has(.radio-picks-actions) .site-radio__volume input { width: 80px; margin: 0; }
  .site-radio .radio-picks-actions {
    grid-area: 2 / 1 / 3 / -1; justify-self: end;
    max-width: calc(100% - 126px);
  }
  body:has(.radio-picks-actions) .radio-route-message { bottom: max(calc(172px + env(safe-area-inset-bottom, 0px)), var(--radio-dock-clearance, 172px)); }
}
@media (max-width: 480px) {
  .radio-picks-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 18px; }
  .radio-picks-header { padding: 16px 16px 10px; }
  .radio-picks-header h2 { font-size: 1.35rem; }
  .radio-picks-intro { margin-inline: 16px; }
  .radio-picks-storage-info { margin-inline: 16px; padding: 12px 14px; }
  .radio-picks-toolbar { padding-inline: 16px; gap: 8px; }
  .radio-picks-toolbar label { gap: 6px; }
  .radio-picks-toolbar select, .radio-picks-toolbar button { padding-inline: 10px; font-size: .8rem; }
  .radio-picks-list { padding-inline: 16px; }
  .radio-picks-item { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
  .radio-picks-item-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
  .radio-picks-empty { margin-inline: 16px; padding-inline: 16px; }
  .radio-picks-notice { margin-inline: 16px; }
}
@media (max-width: 440px) {
  body:has(.radio-picks-actions) { padding-bottom: max(calc(220px + env(safe-area-inset-bottom, 0px)), var(--radio-dock-clearance, 220px)); }
  html:has(.radio-picks-actions) { scroll-padding-bottom: max(calc(220px + env(safe-area-inset-bottom, 0px)), var(--radio-dock-clearance, 220px)); }
  .site-radio:has(.radio-picks-actions) { row-gap: 8px; }
  .site-radio:has(.radio-picks-actions) .site-radio__info { grid-area: 1 / 2 / 2 / -1; }
  .site-radio:has(.radio-picks-actions) .site-radio__volume {
    grid-area: 2 / 2 / 3 / -1; display: flex; align-items: center; gap: 8px;
  }
  .site-radio .radio-picks-actions { grid-area: 3 / 1 / 4 / -1; width: 100%; max-width: none; }
  .site-radio .radio-picks-actions .radio-picks-save,
  .site-radio .radio-picks-actions .radio-picks-open { flex: 1 1 0; max-width: none; min-width: 0; }
  body:has(.radio-picks-actions) .radio-route-message { bottom: max(calc(220px + env(safe-area-inset-bottom, 0px)), var(--radio-dock-clearance, 220px)); }
}
@media (prefers-reduced-transparency: reduce) {
  .radio-picks-dialog::backdrop { backdrop-filter: none; background: #05070cee; }
}
