.beach-radio { --record-color: #f1cc74; position: fixed; z-index: 28; right: 22px; bottom: 24px; width: 360px; max-width: calc(100% - 24px); background: #fff8df; border: 2px solid #b6a785; border-radius: 17px; color: #294543; box-shadow: 0 10px 40px #1e3f3e40; }
.beach-radio[hidden] { display: none; }
.beach-radio.expanded { top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: min(1010px, calc(100% - 36px)); max-height: 88dvh; display: flex; flex-direction: column; overflow: hidden; }
.radio-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #d9cfb4; flex-shrink: 0; }
.radio-wordmark { display: flex; align-items: center; gap: 10px; min-width: 0; }
.radio-logo { width: 25px; height: 25px; flex-shrink: 0; background: #5c5cde; mask: url('../logom.png') center / contain no-repeat; }
.radio-header h2 { font: 600 18px/1.1 Fredoka, sans-serif; margin: 0; }
.expanded .radio-header { padding: 20px 26px; }
.expanded .radio-header h2 { font-size: 29px; }
.radio-header-actions { display: flex; gap: 6px; flex-shrink: 0; }
.radio-header-actions button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #ebe9d5; font-size: 24px; color: #294543; }
.radio-body { padding: 14px 16px; min-height: 0; overflow: auto; }
.expanded .radio-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 32px; padding: 25px 26px 28px; }
.radio-deck, .radio-library { min-width: 0; }
.radio-boombox { position: relative; display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: center; gap: 12px; background: #7c78d3; border: 7px solid #5c5cde; border-bottom: 12px solid #4547a0; border-radius: 17px; padding: 18px 10px; margin: 19px 0 25px; box-shadow: 0 6px 0 #c5ac7f; }
.radio-boombox::before { content: ''; position: absolute; width: 42%; height: 24px; left: 29%; top: -30px; border: 7px solid #c49378; border-bottom: 0; border-radius: 12px 12px 0 0; }
.radio-speaker { aspect-ratio: 1; border: 5px solid #eee2ba; border-radius: 50%; background: radial-gradient(circle, #acbab6 0 19%, #617470 20% 28%, #334a4d 29% 42%, #788985 43% 45%, #334a4d 46% 60%, #253d41 61% 100%); box-shadow: 0 2px 5px #263c4755; }
.radio-cassette { border-radius: 5px; text-align: center; background: #eee4c6; padding: 7px 5px; color: #414d47; font: 700 11px/1.5 Nunito, sans-serif; }
.radio-meters { height: 27px; background: #294543; padding: 5px 8px; display: flex; align-items: end; justify-content: center; gap: 4px; margin: 4px 0; border-radius: 3px; }
.radio-meters i { width: 5px; height: 5px; background: #f1cc74; transform-origin: bottom; }
.radio-reels { display: flex; justify-content: space-around; padding: 4px 0; }
.radio-reels i { width: 20px; height: 20px; border: 5px dashed #85857a; border-radius: 50%; background: #fff7df; }
.is-playing .radio-reels i { animation: radio-spin 3s linear infinite; }
.is-playing .radio-meters i { height: 13px; animation: radio-meter .7s ease-in-out infinite alternate; }
.radio-meters i:nth-child(2n) { animation-delay: -.3s; }.radio-meters i:nth-child(3n) { animation-delay: -.5s; }
.radio-now > span { font-size: 12px; color: #646d59; }
.radio-now h3 { font: 600 29px/1.12 Fredoka, sans-serif; margin: 9px 0 6px; overflow-wrap: anywhere; }
.radio-now p { margin: 0; font-size: 13px; color: #596954; }
.radio-transport { display: flex; align-items: center; gap: 9px; margin: 18px 0 12px; }
.radio-transport > button { min-width: 42px; height: 42px; border-radius: 50%; background: #e7e6cd; color: #294543; font-size: 20px; }
.radio-transport #radio-play { width: 55px; height: 55px; background: #5c5cde; color: white; font-size: 22px; }
.radio-transport .radio-wander { margin-left: auto; border-radius: 0; background: none; font-size: 12px; text-align: right; height: auto; }
.radio-local-controls input[type='range'] { width: 100%; accent-color: #5c5cde; cursor: pointer; }
.radio-time-row { display: flex; justify-content: space-between; font-size: 11px; color: #65715c; }
.radio-volume-row { display: flex; align-items: center; gap: 10px; margin: 17px 0; font-size: 12px; }
.radio-volume-row label, .radio-volume-row a { white-space: nowrap; }
.radio-volume-row input { min-width: 40px; }
.radio-volume-row a { color: #4d4cba; text-underline-offset: 3px; }
.radio-description { font-size: 13px; line-height: 1.6; color: #53644e; }
.radio-status { margin: 9px 0 0; font-size: 12px; line-height: 1.5; color: #53644e; }
.radio-status:empty { display: none; }
.radio-library h3 { font: 500 24px/1.2 Fredoka, sans-serif; margin: 0 0 17px; }
.radio-categories { display: flex; flex-wrap: wrap; background: #e9e5cf; border-radius: 9px; padding: 4px; gap: 3px; margin-bottom: 15px; }
.radio-categories button { padding: 10px 8px; min-height: 44px; flex: 1; font-size: 13px; border-radius: 6px; background: transparent; color: #4f614f; }
.radio-categories button[aria-pressed='true'] { background: #fffaf0; box-shadow: 0 1px 4px #5a493222; color: #4440ad; }
.radio-track-list { max-height: 390px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b9b1ca transparent; padding: 4px; margin: -4px; }
.radio-track { display: flex; align-items: center; width: 100%; gap: 12px; padding: 13px 8px; background: none; text-align: left; border-bottom: 1px solid #ddd4bd; color: #294543; border-radius: 5px; }
.radio-track > span:nth-child(2) { min-width: 0; flex: 1; }
.radio-track strong { display: block; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.radio-track small { display: block; font-size: 11px; color: #647059; margin-top: 4px; line-height: 1.4; }
.radio-track[aria-pressed='true'] { background: #e8e4f7; }
.radio-record { flex: 0 0 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle, #fff8df 0 6%, var(--record-color) 7% 30%, #263f42 31% 45%, #4c6261 46% 48%, #263f42 49% 64%, #4c6261 65% 67%, #263f42 68%); }
.radio-track-mark { color: #5c5cde; font-size: 19px; }
.radio-library-note { font-size: 12px; line-height: 1.6; color: #647059; margin: 15px 0 0; }
.radio-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.beach-radio :focus-visible { outline: 3px solid #5c5cde; outline-offset: 3px; }
.beach-radio:not(.expanded) .radio-expanded-only, .beach-radio [hidden] { display: none !important; }
.beach-radio:not(.expanded) .radio-now h3 { font-size: 18px; margin: 0 0 4px; }
.beach-radio:not(.expanded) .radio-now p { font-size: 11px; }
.beach-radio:not(.expanded) .radio-transport { margin: 8px 0; gap: 7px; }
.beach-radio:not(.expanded) .radio-transport button { width: 32px; height: 32px; min-width: 32px; font-size: 16px; }
.beach-radio:not(.expanded) #radio-play { width: 38px; height: 38px; }
.beach-radio:not(.expanded) .radio-status { max-height: 36px; overflow: auto; font-size: 10px; }
@keyframes radio-spin { to { transform: rotate(360deg); } }
@keyframes radio-meter { to { transform: scaleY(.3); } }
@media (max-width: 740px) {
  .beach-radio { right: 12px; bottom: auto; top: 80px; width: 310px; max-width: calc(100% - 24px); }
  .beach-radio.expanded { width: calc(100% - 20px); max-width: none; max-height: 88dvh; }
  .expanded .radio-header { padding: 15px; }.expanded .radio-header h2 { font-size: 22px; }
  .expanded .radio-body { display: block; padding: 24px 16px; }.radio-library { margin-top: 24px; }
  .radio-header-actions { gap: 3px; }.radio-header-actions button { width: 31px; height: 31px; }
  .radio-speaker { border-width: 3px; }.radio-boombox { gap: 8px; padding: 15px 6px; }
  .radio-track-list { max-height: none; overflow: visible; }
  .radio-cassette { font-size: 9px; }.radio-now h3 { font-size: 27px; }
  .radio-transport .radio-wander { max-width: 90px; font-size: 11px; }
  .radio-volume-row { gap: 7px; font-size: 11px; }
}
@media (max-height: 500px) { .beach-radio:not(.expanded) { top: 70px; bottom: auto; max-height: calc(100dvh - 90px); overflow: auto; }.beach-radio.expanded { max-height: 94dvh; } }
@media (prefers-reduced-motion: reduce) { .beach-radio *, .beach-radio *::before { animation: none !important; transition: none !important; } }
body.calm-radio .beach-radio * { animation: none !important; }
