/* Persistent radio. Page colors come from the selected material. */
.radio{position:fixed;z-index:80;left:auto;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));width:min(300px,calc(100vw - 32px));height:auto;display:block;padding:0;border:0;border-radius:0;background:none;box-shadow:none;pointer-events:none;color:var(--ink)}
.radio>*{pointer-events:auto}.radio[data-view=orb]{width:44px}.radio[data-view=orb] .radio-capsule{display:none}.radio:not([data-view=orb]) .radio-orb{display:none}
.radio-orb,.radio-capsule,.radio-popover{border:1px solid var(--edge);background:var(--panel);box-shadow:0 8px 28px color-mix(in srgb,var(--ink) 12%,transparent);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.radio-orb{width:44px;height:44px;position:relative;display:grid;place-items:center;padding:0;border-radius:15px;cursor:pointer;color:var(--ink)}
.radio-wave{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}.radio-playing-indicator{position:absolute;right:6px;bottom:6px;width:4px;height:4px;border-radius:50%;background:var(--accent);opacity:0}.radio.playing .radio-playing-indicator{opacity:1}
.radio-capsule{padding:11px 13px 12px;border-radius:20px;animation:radio-open .18s ease-out both}
.radio-track-head{display:flex;align-items:center;gap:10px;min-height:44px}.radio-track-info{flex:1;min-width:0;display:grid;gap:4px}.radio-status{font-size:9px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.radio .radio-title{display:block;min-width:0;margin:0;font-size:14px;font-weight:650;line-height:1.3;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.radio .radio-action{display:grid;place-items:center;flex:none;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:12px;background:transparent;color:var(--muted);cursor:pointer;transition:background .16s,color .16s}
.radio .radio-action:hover{background:color-mix(in srgb,var(--ink) 7%,transparent);color:var(--ink)}.radio .radio-action:focus-visible,.radio-orb:focus-visible,.radio input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.radio .radio-action svg,.game-top svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.radio .radio-collapse{margin-right:-5px;align-self:flex-start}.radio .radio-collapse svg{width:16px;height:16px}
.radio-transport{display:flex;align-items:center;justify-content:space-between;margin-top:4px}.radio-track-buttons{display:flex;align-items:center;gap:6px}
.radio #radioToggle{background:var(--ink);color:var(--page);border-radius:50%;width:42px;height:42px;min-height:42px}.radio #radioToggle:hover{background:color-mix(in srgb,var(--ink) 85%,var(--accent))}.radio #radioToggle svg{fill:currentColor;stroke:none;width:16px;height:16px}
.radio #radioPrev svg,.radio #radioNext svg{width:17px;height:17px}.radio #volumeOpen{border:1px solid color-mix(in srgb,var(--ink) 10%,transparent)}.radio #volumeOpen[aria-expanded=true]{background:color-mix(in srgb,var(--ink) 8%,transparent);color:var(--ink)}
.radio-progress{display:flex;align-items:center;gap:8px;padding:0;margin:3px 0;color:var(--muted);font-size:9px}.radio-progress span{min-width:26px;font-variant-numeric:tabular-nums}.radio-progress span:last-child{text-align:right}.radio-progress input{flex:1;min-width:0;height:22px;margin:0;accent-color:var(--ink);cursor:pointer}.radio-progress input:disabled{opacity:.4;cursor:default}
.radio-popover{position:absolute;right:0;bottom:calc(100% + 10px);width:min(300px,calc(100vw - 32px));max-height:min(430px,calc(100dvh - 184px));overflow:auto;padding:16px;border-radius:20px;color:var(--ink)}.radio-popover[hidden]{display:none}.radio-popover:not([hidden]){animation:radio-open .18s ease-out both}
.radio-popover-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px;font-size:14px;font-weight:650}.radio-popover-head button{width:44px;height:44px;margin:-8px -8px 0 0;padding:0;border:0;border-radius:12px;background:transparent;color:var(--muted);font-size:22px;cursor:pointer}
.radio-popover .radio-subtitle{display:block;margin:0 0 13px;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.radio-setting{display:flex;align-items:center;gap:10px;min-height:48px;border-top:1px solid var(--edge);font-size:12px}.radio-setting label,.radio-setting span{flex:1;min-width:0}.radio-setting input{width:108px;min-width:0;accent-color:var(--ink)}.radio-setting input:disabled{opacity:.45}
.radio-setting #sfxToggle,.radio-setting #uiSoundsToggle{min-width:78px;min-height:36px;padding:5px 10px;border:1px solid var(--edge);border-radius:10px;background:transparent;color:var(--ink);font-size:11px}.radio-setting button[aria-pressed=true]{background:color-mix(in srgb,var(--accent) 9%,transparent)!important}
body.game-open .radio{bottom:auto;top:max(6px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right))}body.game-open .radio-popover{bottom:auto;top:calc(100% + 10px)}
@keyframes radio-open{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.radio{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:min(290px,calc(100vw - 24px))}.radio-popover{width:min(290px,calc(100vw - 24px))}.radio .radio-title{font-size:13px}}
@media(prefers-reduced-motion:reduce){.radio-capsule,.radio-popover{animation:none}.radio .radio-action{transition:none}}
.game-layer{position:fixed;inset:0;bottom:0;z-index:50;height:100vh;height:100dvh;background:var(--page);overflow:hidden;display:flex;flex-direction:column}
body.game-open{overflow:hidden}
.game-top{height:auto;min-height:54px;padding:max(5px,env(safe-area-inset-top)) clamp(12px,3vw,32px) 5px;background:var(--page);border-bottom:1px solid var(--edge);display:flex;align-items:center;justify-content:flex-start;gap:18px;flex:none}
.game-top #closeGame{display:flex;align-items:center;gap:7px;min-width:84px;min-height:44px;padding:0 11px;border:1px solid var(--edge);border-radius:999px;background:var(--surface);color:var(--ink);font-size:13px;font-weight:700}
.game-top strong{font-size:14px;font-weight:700;color:var(--ink);max-width:calc(100% - 210px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.game-layer iframe{flex:1;min-height:0;width:100%;border:0;background:var(--page);display:block}
@media(max-width:600px){.game-top{min-height:51px}.game-top strong{font-size:13px}}
.game-top{padding-right:max(68px,env(safe-area-inset-right));gap:12px}
.game-top strong{max-width:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.game-top-actions{display:flex;align-items:center;gap:7px;margin-left:auto;flex:none}
.game-top .game-top-actions button{display:flex;align-items:center;gap:6px;min-height:38px;padding:0 10px;border:1px solid var(--edge);border-radius:999px;background:var(--surface);color:var(--ink);font-size:12px;font-weight:650}
.game-top .game-top-actions button[hidden]{display:none}
.game-top .game-top-actions button[aria-pressed=true]{background:var(--accent);color:var(--page)}
.game-top .game-top-actions button:hover,.game-top #closeGame:hover{border-color:var(--accent)}
@media(max-width:600px){.game-top{gap:5px;padding-left:8px;padding-right:64px}.game-top #closeGame{min-width:42px;padding:0 8px}.game-top #closeGame span,.game-top .game-top-actions span{display:none}.game-top .game-top-actions{gap:4px}.game-top .game-top-actions button{width:36px;height:36px;min-height:36px;padding:0;justify-content:center}.game-top strong{font-size:12px}}
.game-top{min-height:56px;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:8px}
.game-top #closeGame,.game-top .game-top-actions button{height:40px;min-height:40px;padding:0 14px;box-sizing:border-box;line-height:1}
.game-top .game-top-actions{gap:8px}
.game-top svg{flex:none;display:block}
@media(max-width:600px){.game-top #closeGame,.game-top .game-top-actions button{width:40px;padding:0;justify-content:center}}
/* A thin seek line with a generous interaction area. */
.radio-progress input{appearance:none;-webkit-appearance:none;background:transparent;border:0;border-radius:0;padding:0}
.radio-progress input::-webkit-slider-runnable-track{height:2px;border-radius:2px;background:linear-gradient(to right,var(--ink) var(--played,0%),color-mix(in srgb,var(--ink) 17%,transparent) 0)}
.radio-progress input::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:8px;height:8px;margin-top:-3px;border:0;border-radius:50%;background:var(--ink);opacity:0}
.radio-progress:hover input::-webkit-slider-thumb,.radio-progress input:focus-visible::-webkit-slider-thumb{opacity:1}
.radio-progress input::-moz-range-track{height:2px;border-radius:2px;background:color-mix(in srgb,var(--ink) 17%,transparent)}
.radio-progress input::-moz-range-progress{height:2px;background:var(--ink)}
.radio-progress input::-moz-range-thumb{width:8px;height:8px;border:0;background:var(--ink)}
.radio .radio-action:disabled{opacity:.3;cursor:default}.radio .radio-action:disabled:hover{background:none}
