/* Courtsmith FM — a compact, audio-synchronized transport. */
.cs-radio {
  --radio-blue: #b5cbff;
  position: fixed; right: max(20px, env(safe-area-inset-right));
  top: max(96px, calc(env(safe-area-inset-top) + 88px)); z-index: 50;
  scale: .6; transform-origin: top right;
  width: min(348px, calc(100vw - 24px)); padding: 10px 12px 7px;
  border: 1px solid #a7c2ff3b; border-radius: 12px;
  background: linear-gradient(135deg, rgb(24 35 55 / 20%), rgb(8 13 22 / 20%));
  box-shadow: 0 10px 32px #0004, inset 0 1px #ffffff0a;
  color: #f3f5fa; font: 500 12px Barlow, Arial, sans-serif;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  isolation: isolate;
}
.cs-radio[hidden] { display: none; }
.cs-radio audio { display: none; }
.cs-radio-main { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.cs-radio-identity { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.cs-radio-spectrum { display: flex; align-items: flex-end; gap: 2px; height: 27px; width: 34px; flex-shrink: 0; }
.cs-radio-spectrum i {
  display: block; width: 2.4px; flex: 0 0 2.4px; height: 27px; border-radius: 1px;
  color: #bf8cff; background: currentColor;
  transform: scaleY(.12); transform-origin: center bottom;
}
.cs-radio-spectrum i:nth-child(3) { color: #ff666d; }
.cs-radio-spectrum i:nth-child(4), .cs-radio-spectrum i:nth-child(5) { color: #ffe16a; }
.cs-radio-spectrum i:nth-child(6) { color: #73e9a2; }
.cs-radio-spectrum i:nth-child(7), .cs-radio-spectrum i:nth-child(8) { color: #78d9ff; }
.cs-radio[data-state="playing"] .cs-radio-spectrum i { box-shadow: 0 0 5px color-mix(in srgb, currentColor 40%, transparent); }
.cs-radio-title { min-width: 0; }
.cs-radio-title small { display: block; color: #a9b8cf; font-size: 8px; font-weight: 600; letter-spacing: 1.2px; white-space: nowrap; }
.cs-radio-title strong { display: block; margin-top: 5px; font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: .8px; white-space: nowrap; }
.cs-radio-controls { display: flex; align-items: center; gap: 1px; }
.cs-radio button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 40px; min-width: 0; padding: 0;
  color: #c4cee0; background: transparent; border: 0; border-radius: 7px;
  transition: background-color 160ms ease, color 160ms ease, transform 140ms cubic-bezier(.23,1,.32,1);
}
.cs-radio button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cs-radio .cs-radio-play { width: 38px; height: 38px; margin-inline: 2px; border-radius: 50%; border: 1.5px solid #bf8cff; background: transparent; color: #cda5ff; }
.cs-radio .cs-radio-play:focus-visible { outline-color: #dfc6ff; }
.cs-radio .cs-radio-play svg { width: 15px; height: 15px; fill: currentColor; stroke-width: 0; }
.cs-radio .cs-radio-collapse { width: 24px; }
.cs-radio .cs-radio-collapse svg { width: 13px; height: 13px; }
.cs-radio .cs-radio-stop svg { width: 12px; height: 12px; fill: currentColor; stroke-width: 0; }
.cs-radio button:focus-visible, .cs-radio input:focus-visible { outline: 2px solid #d5e2ff; outline-offset: 2px; }
.cs-radio button:active { transform: scale(.95); }
.cs-radio-bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; margin-top: 2px; }
.cs-radio-seek { grid-column: 1 / -1; display: block; appearance: none; -webkit-appearance: none; width: 100%; height: 14px; margin: 0; padding: 0; cursor: pointer; background: transparent; }
.cs-radio-seek::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(to right, #b5cbff var(--played, 0%), #ffffff29 var(--played, 0%)); }
.cs-radio-seek::-moz-range-track { height: 2px; border-radius: 2px; background: #ffffff29; }
.cs-radio-seek::-moz-range-progress { height: 2px; background: #b5cbff; }
.cs-radio-seek::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 8px; height: 8px; margin-top: -3px; border: 0; border-radius: 50%; background: #e0eaff; }
.cs-radio-seek::-moz-range-thumb { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #e0eaff; }
.cs-radio-seek:disabled { opacity: .5; cursor: default; }
.cs-radio-status { color: #aabbd5; font-size: 8px; letter-spacing: 1px; line-height: 1.5; text-transform: uppercase; }
.cs-radio-time { color: #b9c7dc; font: 9px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; }
.cs-radio .cs-radio-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.cs-radio.is-compact { width: 136px; padding: 6px 8px; }
.cs-radio.is-compact .cs-radio-main { min-height: 34px; }
.cs-radio.is-compact .cs-radio-bottom, .cs-radio.is-compact .cs-radio-secondary, .cs-radio.is-compact .cs-radio-title { display: none; }
.cs-radio.is-compact button { height: 34px; }
.cs-radio.is-compact .cs-radio-play { width: 34px; height: 34px; }
.cs-radio.is-compact .cs-radio-spectrum { width: 27px; gap: 1px; height: 20px; }
.cs-radio.is-compact .cs-radio-spectrum i { height: 20px; }
.cs-radio.is-compact .cs-radio-identity { gap: 8px; }
.cs-radio.is-compact .cs-radio-collapse svg { transform: rotate(180deg); }
html.nav-expanded .cs-radio { visibility: hidden; }
@media (hover: hover) and (pointer: fine) {
  .cs-radio button:hover { color: #fff; background: #ffffff12; }
  .cs-radio .cs-radio-play:hover { background: transparent; color: #e4d0ff; border-color: #e4d0ff; }
}
@media (max-width: 600px) {
  .cs-radio { right: max(12px, env(safe-area-inset-right)); top: max(88px, calc(env(safe-area-inset-top) + 80px)); padding: 8px 10px 6px; }
  .cs-radio-identity { gap: 7px; }
  .cs-radio-title small { font-size: 7px; letter-spacing: .8px; }
  .cs-radio-title strong { font-size: 11px; }
}
@media (max-width: 350px) {
  .cs-radio-controls { gap: 0; }
  .cs-radio button { width: 29px; }
  .cs-radio .cs-radio-collapse { width: 21px; }
  .cs-radio-spectrum { width: 30px; gap: 1px; }
  .cs-radio-title small { font-size: 6px; }
  .cs-radio-title strong { font-size: 10px; }
}
html[data-input="keyboard"] .cs-radio button { transition: none; }
html[data-input="keyboard"] .cs-radio button:active { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .cs-radio button { transition: none; }
  .cs-radio button:active { transform: none; }
}
