/* The site-wide live radio (js/liveradio.js): a small 📻 player that follows you to every page and game. Lavet af Kevin Buhl Jakobsen. */
.lprd { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 9980; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  max-width: min(320px, calc(100vw - 24px)); padding: 4px; border-radius: 22px; background: rgba(18, 18, 30, .86); color: #f4f4fa; border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 8px 26px rgba(0,0,0,.4); font: 600 13px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lprd[hidden] { display: none; }
.lprd button, .lprd select { font: inherit; color: inherit; }
.lprd-main { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 220px; height: 34px; padding: 0 10px 0 6px; border: 0; border-radius: 17px; background: transparent; cursor: pointer; }
.lprd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lprd-dot { position: relative; font-size: 16px; }
.lprd-dot.live::after { content: ''; position: absolute; right: -3px; top: -1px; width: 7px; height: 7px; border-radius: 50%; background: #ff4d5e; animation: lprdPulse 1.6s infinite; }
@keyframes lprdPulse { 50% { opacity: .3; } }
.lprd-b { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); cursor: pointer; font-size: 14px; flex: none; }
.lprd-b:hover, .lprd-main:hover { background: rgba(255,255,255,.18); }
.lprd-more { flex-basis: 100%; display: grid; gap: 6px; padding: 6px 4px 4px; }
.lprd-row { display: flex; align-items: center; gap: 6px; }
.lprd-row select { flex: 1; min-width: 0; height: 34px; padding: 0 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: #24263b; }
.lprd-row input[type=range] { flex: 1; accent-color: #ff8fa3; height: 28px; cursor: pointer; touch-action: pan-x; }
.lprd-row em { font-style: normal; min-width: 38px; text-align: right; opacity: .8; font-variant-numeric: tabular-nums; }
.lprd-link { flex: 1; color: #ffd36e; text-decoration: none; padding-left: 4px; }
@media (prefers-reduced-motion: reduce) { .lprd-dot.live::after { animation: none; } }
/* games: keep it clear of each game's own buttons */
html[data-gs-game] .lprd { right: auto; left: max(56px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); }
html[data-gs-game="sail"] .lprd, html[data-gs-game="farm"] .lprd, html[data-gs-game="trails"] .lprd { left: 50%; transform: translateX(-50%); bottom: auto; top: max(58px, env(safe-area-inset-top)); }
html[data-gs-game="clash"] .lprd { bottom: calc(66px + env(safe-area-inset-bottom)); }
/* never wider than the screen: the open player keeps its size, long station names are cut off */
.lprd, .lprd * { box-sizing: border-box; }
.lprd.open { width: min(320px, calc(100vw - 24px)); }
.lprd-main { flex: 1 1 auto; }
.lprd-more { min-width: 0; width: 100%; }
.lprd-row { min-width: 0; width: 100%; }
.lprd-row select { width: 100%; max-width: 100%; min-width: 0; flex: 1 1 0; text-overflow: ellipsis; margin: 0; }
.lprd-row input[type=range] { width: 100%; min-width: 0; flex: 1 1 0; margin: 0; }
html[data-gs-game="sail"] .lprd.open, html[data-gs-game="farm"] .lprd.open, html[data-gs-game="trails"] .lprd.open { width: min(320px, calc(100vw - 24px)); }
/* the car-radio display (blue LCD): band + frequency, the station, the song scrolling from right to left */
.lcd { position: relative; display: grid; gap: 1px; padding: 6px 10px 5px; border-radius: 8px; min-width: 0; overflow: hidden;
  background: linear-gradient(180deg, #06182c, #0a2442 60%, #071b33); border: 1px solid #000; box-shadow: inset 0 0 12px rgba(0,0,0,.8), 0 0 0 2px #1b1b1f;
  color: #4fc3ff; font-family: "DejaVu Sans Mono", "Consolas", "Courier New", monospace; text-shadow: 0 0 6px rgba(79,195,255,.75); letter-spacing: .04em; text-align: left; }
.lcd::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); pointer-events: none; }   /* the pixel grid */
.lcd:not(.on) { color: #2d6f96; text-shadow: none; }
.lcd-top { display: flex; gap: 8px; font-size: 9px; font-weight: 700; opacity: .85; line-height: 1; }
.lcd-st, .lcd-rds { border: 1px solid currentColor; border-radius: 3px; padding: 0 3px; }
.lcd-st:empty { display: none; }
.lcd-main { display: flex; align-items: baseline; gap: 8px; min-width: 0; line-height: 1.1; }
.lcd-num { font-size: 18px; font-weight: 800; font-style: italic; letter-spacing: .02em; flex: none; }
.lcd-name { font-size: 11px; font-weight: 700; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lcd-scroll { overflow: hidden; white-space: nowrap; font-size: 12px; font-weight: 700; line-height: 1.3; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.lcd-scroll span { display: inline-block; padding-left: 100%; animation: lcdScroll 12s linear infinite; }
@keyframes lcdScroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .lcd-scroll span { animation: none; padding-left: 0; } }
.lcd-big { padding: 10px 16px 9px; border-radius: 12px; }
.lcd-big .lcd-top { font-size: 12px; }
.lcd-big .lcd-num { font-size: 40px; }
.lcd-big .lcd-name { font-size: 18px; }
.lcd-big .lcd-scroll { font-size: 20px; }
.rd-lcd { margin: 14px 0 4px; }
/* in the little player */
.lprd .lcd { flex: 1; min-width: 0; padding: 4px 8px 3px; }
.lprd .lcd-num { font-size: 13px; }
.lprd .lcd-name { font-size: 9px; }
.lprd .lcd-scroll { font-size: 11px; }
.lprd .lcd-top { display: none; }
.lprd-main:has(.lcd) { padding: 3px 4px 3px 6px; height: auto; max-width: none; }
.lpgs-radio .lcd { margin: 4px 0; }
.lcd-band { font-size: 9px; font-weight: 800; align-self: flex-start; margin-top: 2px; }
.lcd-big .lcd-band { font-size: 14px; margin-top: 6px; }
.rd-ch { flex: none; min-width: 52px; padding: 4px 6px; border-radius: 6px; background: #071b33; color: #4fc3ff; font: 800 14px/1.1 "DejaVu Sans Mono", Consolas, monospace; text-align: center; text-shadow: 0 0 5px rgba(79,195,255,.6); }
.rd-ch small { display: block; font-size: 8px; opacity: .8; }
/* moving it: the grip, and the look while it is being moved */
.lprd-grip { flex: none; width: 16px; display: grid; place-items: center; cursor: grab; opacity: .55; font-size: 14px; touch-action: none; user-select: none; }
.lprd-grip:active { cursor: grabbing; }
.lprd.lprd-moving { outline: 2px dashed #ffd36e; outline-offset: 3px; cursor: move; touch-action: none; animation: lprdWiggle .6s ease-in-out infinite alternate; }
.lprd.lprd-moving * { pointer-events: none; }
@keyframes lprdWiggle { from { box-shadow: 0 8px 26px rgba(0,0,0,.4); } to { box-shadow: 0 8px 26px rgba(255,211,110,.45); } }
@media (prefers-reduced-motion: reduce) { .lprd.lprd-moving { animation: none; } }
.rd-fm { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 2px; font-size: .9rem; }
.rd-fm select { margin-left: 4px; padding: 5px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: inherit; font: inherit; }
.rd-fmbtn { width: auto !important; padding: 0 12px; border-radius: 999px; font-size: .85rem; }
.lprd select { color-scheme: dark; }
.lprd select option { background: #24263b !important; color: #f2f2fa !important; }
.rd-fm select option, .rd-sleep option, #rdSleep option { background: #24263b !important; color: #f2f2fa !important; }
