/*! supertwentyplus licence: (c) 2026 Supertwentyplus Pte. Ltd. All rights reserved. Proprietary, not open source.
   Use only as provided on supertwentyplus.com (free or by subscription, under its Terms). Copying, reuse or hosting elsewhere,
   in whole or in part, needs a written licence: supertwentyplus@gmail.com. See LICENSE.txt at the site root. */
/* Flip Clock Radio: a 1970s-style desk clock radio, built from CSS */
/* Digits: DejaVu Sans Mono Bold with a plain (undotted) zero, renamed FCR Digits as the licence asks for changed fonts; just 0-9 and the colon (1 KB), so the clock looks the same on every device. Licence: fonts/LICENSE-DejaVu.txt */
@font-face { font-family: 'FCR Digits'; src: url('fonts/fcr-digits.woff2') format('woff2'); font-weight: 700; font-display: block; }
#app [hidden] { display: none !important; }
.fr-scene { --glow: 0;
  /* Glow colour (amber by default); the other colours are set with data-glow below */
  --g: 255,120,40; --g2: 255,64,20; --g3: 120,20,0; --gsolid: #FF8A3D; --glight: #FFB06A; --gtext: #FFD0A1; --gtext2: #FFC896; position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 16px 70px; border-radius: var(--card-radius); overflow: hidden; overflow: clip; isolation: isolate;
  background: radial-gradient(120% 70% at 50% 120%, #1A1410 0%, #0A0B0F 60%), #0A0B0F; }
/* the desk surface under the radio */
.fr-scene::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28%; z-index: -1; background: linear-gradient(180deg, rgba(60,40,26,.0), rgba(60,40,26,.35)); border-top: 1px solid rgba(255,255,255,.03); }
/* the little lamp behind the radio */
.fr-backlight { position: absolute; left: 50%; top: 40%; width: 130%; height: 130%; transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--g), .62), rgba(var(--g2), .30) 40%, rgba(var(--g2), .10) 66%, transparent 82%);
  opacity: 0; transition: opacity 1.4s ease; }
.fr-scene[data-on="true"] .fr-backlight { opacity: 1; animation: fr-lamp 7s ease-in-out infinite alternate; }
@keyframes fr-lamp { 0% { filter: brightness(1); } 50% { filter: brightness(.94); } 100% { filter: brightness(1.04); } }

/* ---------- Finishes ---------- */
.fr-scene { --body: linear-gradient(180deg, #7A5233, #5B3B23); --grain: repeating-linear-gradient(97deg, rgba(0,0,0,.10) 0 2px, transparent 2px 7px, rgba(255,255,255,.04) 7px 8px, transparent 8px 15px);
  --panel: linear-gradient(180deg, #E6E8EB, #B9BDC3); --ink: #2B2724; --trim: linear-gradient(180deg, #F2F3F5, #9CA1A8); --key: linear-gradient(180deg, #F5F2EC, #D6D0C6); --keyink: #3A322B; --grillebg: #2E2016; --radius: 22px; }
.fr-scene[data-finish="cream"] { --body: linear-gradient(180deg, #F3EBDA, #E2D6BE); --grain: none; --panel: linear-gradient(180deg, #D8CBAE, #C2B391); --ink: #4A3F2C; --trim: linear-gradient(180deg, #E9D9A6, #B89B55); --key: linear-gradient(180deg, #FFFDF7, #E9E1CF); --keyink: #4A3F2C; --grillebg: #B9AB8D; }
.fr-scene[data-finish="sunset"] { --body: linear-gradient(180deg, #F07A32, #D2541C); --grain: none; --panel: linear-gradient(180deg, #F6EFE2, #E3D7C2); --ink: #3A2416; --trim: linear-gradient(180deg, #FFE7C4, #C98F4A); --key: linear-gradient(180deg, #FFF8EE, #EEDFC8); --keyink: #5A2E12; --grillebg: #A9461A; }
.fr-scene[data-finish="noir"] { --body: linear-gradient(180deg, #2A2C31, #121317); --grain: linear-gradient(180deg, rgba(255,255,255,.07), transparent 40%); --panel: linear-gradient(180deg, #E3E6EA, #8E949C); --ink: #15171A; --trim: linear-gradient(180deg, #FFFFFF, #8A9098); --key: linear-gradient(180deg, #34363C, #1C1D21); --keyink: #E9E3D6; --grillebg: #0D0E11; }
.fr-scene[data-finish="space"] { --body: linear-gradient(180deg, #FBFBF9, #E3E3DF); --grain: none; --panel: linear-gradient(180deg, #ECEDEF, #D3D5D9); --ink: #2F3236; --trim: linear-gradient(180deg, #FFFFFF, #C3C6CB); --key: linear-gradient(180deg, #FF8A3D, #E5621B); --keyink: #FFFFFF; --grillebg: #CFCFCB; --radius: 46px; }

/* ---------- The radio ---------- */
.fr-radio { position: relative; width: min(100%, 640px); container-type: inline-size; border-radius: var(--radius); background: var(--grain), var(--body); padding: 18px 18px 14px;
  box-shadow: 0 28px 40px -18px rgba(0,0,0,.85), 0 2px 0 rgba(255,255,255,.12) inset, 0 -3px 0 rgba(0,0,0,.25) inset; }
/* chrome strip along the top edge */
.fr-radio::before { content: ""; position: absolute; left: 18px; right: 18px; top: 7px; height: 4px; border-radius: 2px; background: var(--trim); opacity: .85; }
/* little feet */
.fr-radio::after { content: ""; position: absolute; left: 9%; right: 9%; bottom: -9px; height: 10px; z-index: -1; background: radial-gradient(closest-side, #000 60%, transparent) left/40px 10px no-repeat, radial-gradient(closest-side, #000 60%, transparent) right/40px 10px no-repeat; }
.fr-snooze { position: absolute; left: 50%; top: -24px; width: 44%; height: 22px; transform: translateX(-50%); display: grid; place-items: center; border-radius: 10px 10px 4px 4px;
  background: var(--trim); color: rgba(0,0,0,.55); font: 800 10px var(--font-mono); letter-spacing: .3em; cursor: pointer; box-shadow: 0 -1px 0 rgba(255,255,255,.5) inset, 0 3px 6px rgba(0,0,0,.35); user-select: none; }
.fr-snooze:active { transform: translateX(-50%) translateY(2px); }
.fr-snooze:focus-visible { outline: 3px solid #FFB25A; outline-offset: 2px; }
.fr-body { display: grid; grid-template-columns: minmax(0, 1.7fr) auto minmax(0, 1fr); gap: 10px; }
/* the three knobs stand in a column beside the clock, on a brushed-metal strip */
.fr-knobs { display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 8px; border-radius: calc(var(--radius) * .5); background: var(--panel); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 2px rgba(0,0,0,.35); }

/* Clock window: smoked glass, lit from inside when the radio is on */
.fr-clock { container-type: size; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; min-height: 176px; padding: 16px 8px 12px; border-radius: calc(var(--radius) * .55); overflow: hidden;
  background: linear-gradient(180deg, #170F0B, #0B0807); box-shadow: inset 0 4px 14px rgba(0,0,0,.9), inset 0 0 0 2px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.15); }
.fr-clock::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(160deg, rgba(255,255,255,.10), transparent 35%); }
.fr-glow { position: absolute; inset: -10%; pointer-events: none; opacity: 0; transition: opacity 1.2s ease;
  background: radial-gradient(60% 55% at 50% 52%, rgba(var(--g), .75), rgba(var(--g2), .30) 55%, rgba(var(--g3), .10) 80%, transparent); }
.fr-scene[data-on="true"] .fr-glow { opacity: 1; animation: fr-warm 4.5s ease-in-out infinite alternate; }
@keyframes fr-warm { from { filter: brightness(1); } to { filter: brightness(1.08); } }
.fr-flip { position: relative; display: flex; align-items: center; gap: 6px; }
.fr-colon { display: flex; flex-direction: column; gap: 14px; padding: 0 2px; }
.fr-colon i { width: 8px; height: 8px; border-radius: 50%; background: #3B2E26; transition: background .8s, box-shadow .8s; }
.fr-scene[data-on="true"] .fr-colon i { background: var(--glight); box-shadow: 0 0 8px rgba(var(--g), .9); }
.fr-group { display: flex; gap: 4px; }
.fr-clockinfo { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; font: 700 10.5px var(--font-mono); letter-spacing: .14em; }
.fr-ind { color: #4A3B31; transition: color .6s, text-shadow .6s; }
.fr-ind.is-lit { color: var(--gsolid); text-shadow: 0 0 6px rgba(var(--g), .8); }
.fr-scene[data-on="false"] .fr-ind.is-lit { color: #C0703A; text-shadow: none; }
.fr-date { color: #8B7A6C; letter-spacing: .08em; }
.fr-scene[data-on="true"] .fr-date { color: var(--gtext2); }

/* Split-flap cards (same mechanism as Countdown Timer) */
/* Hours and minutes as big as the clock window allows: as wide as it fits, then as tall as the window has room for */
.fr-flip { --W: max(22px, min(calc((100cqw - 46px) / 4.8), calc((100cqh - 46px) / 1.45))); --H: min(calc(var(--W) * 1.85), calc(100cqh - 46px)); }
.fr-card { --w: var(--W); --h: var(--H); --fs: calc(var(--W) * 1.32); --top: #241B16; --bot: #1A1310; --r: 7px;
  position: relative; display: block; width: var(--w); height: var(--h); border-radius: var(--r); box-shadow: 0 4px 8px rgba(0,0,0,.6); perspective: calc(var(--h) * 4);
  font: 700 var(--fs)/var(--h) 'FCR Digits', 'DejaVu Sans Mono', 'Menlo', 'Consolas', monospace; font-variant-numeric: tabular-nums; color: #6F6158; text-align: center; transition: color 1s, text-shadow 1s; }
.fr-scene[data-on="true"] .fr-card { color: var(--gtext); text-shadow: 0 0 10px rgba(var(--g), .55); }
.fr-card.fr-seconds { --w: calc(var(--W) * .4); --h: calc(var(--H) * .4); --fs: calc(var(--W) * .4 * 1.32); align-self: flex-end; }
.fr-half, .fr-flap { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fr-half > b, .fr-flap > b { position: absolute; left: 0; right: 0; height: var(--h); font: inherit; }
.fr-up, .fr-flap-top { top: 0; background: var(--top); border-radius: var(--r) var(--r) 0 0; }
.fr-up > b, .fr-flap-top > b { top: 0; }
.fr-down, .fr-flap-bot { bottom: 0; background: var(--bot); border-radius: 0 0 var(--r) var(--r); }
.fr-down > b, .fr-flap-bot > b { bottom: 0; }
.fr-card::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: rgba(0,0,0,.7); z-index: 3; }
.fr-flap { z-index: 2; display: none; }
.fr-flap-top { transform-origin: 50% 100%; }
.fr-flap-bot { transform-origin: 50% 0; }
.fr-flap::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.fr-card.is-flipping .fr-flap { display: block; }
.fr-card.is-flipping .fr-flap-top { animation: fr-fall-top .26s cubic-bezier(.55, 0, .9, .45) forwards; }
.fr-card.is-flipping .fr-flap-top::after { animation: fr-shade-top .26s ease-in forwards; }
.fr-card.is-flipping .fr-flap-bot { transform: rotateX(90deg); animation: fr-fall-bot .24s cubic-bezier(.2, .6, .35, 1.25) .26s forwards; }
.fr-card.is-flipping .fr-flap-bot::after { animation: fr-shade-bot .24s ease-out .26s forwards; }
@keyframes fr-fall-top { from { transform: rotateX(0); } to { transform: rotateX(-90deg); } }
@keyframes fr-fall-bot { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
@keyframes fr-shade-top { from { background: rgba(0,0,0,0); } to { background: rgba(0,0,0,.5); } }
@keyframes fr-shade-bot { from { background: rgba(0,0,0,.55); } to { background: rgba(0,0,0,0); } }
@media (prefers-reduced-motion: reduce) { .fr-card.is-flipping .fr-flap { display: none; } .fr-scene[data-on="true"] .fr-backlight, .fr-scene[data-on="true"] .fr-glow { animation: none; } }

/* Tuning dial, readout and speaker */
.fr-right { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fr-dial { position: relative; height: 54px; border-radius: 8px; overflow: hidden; cursor: pointer; background: linear-gradient(180deg, #1D1712, #120E0B); box-shadow: inset 0 2px 8px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.15); }
.fr-dial-glow { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s; background: linear-gradient(180deg, rgba(var(--g), .45), rgba(var(--g2), .35)); }
.fr-scene[data-on="true"] .fr-dial-glow { opacity: 1; }
.fr-scale { position: absolute; inset: 0 10px; }
.fr-scale .fr-tick { position: absolute; bottom: 6px; width: 1px; height: 8px; background: rgba(255,220,180,.45); }
.fr-scale .fr-tick.is-major { height: 14px; background: rgba(255,230,200,.7); }
.fr-scale .fr-num { position: absolute; top: 6px; transform: translateX(-50%); font: 700 10px var(--font-mono); color: rgba(255,225,190,.75); }
.fr-scale .fr-st { position: absolute; bottom: 22px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: rgba(255,240,220,.35); }
.fr-scene[data-on="true"] .fr-scale .fr-num { color: #3A1A08; }
.fr-scene[data-on="true"] .fr-scale .fr-tick { background: rgba(60,25,8,.6); }
.fr-scene[data-on="true"] .fr-scale .fr-st { background: rgba(60,25,8,.55); }
.fr-needle { position: absolute; top: 3px; bottom: 3px; left: 10px; width: 2px; margin-left: -1px; background: #E8321B; box-shadow: 0 0 6px rgba(232,50,27,.8); transition: left .55s cubic-bezier(.3, .8, .3, 1); }
.fr-readout { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 6px 10px; border-radius: 6px; background: #0F0B09; box-shadow: inset 0 2px 6px rgba(0,0,0,.9); font: 700 13px var(--font-mono); }
.fr-freq { color: #7A5A44; flex: none; }
.fr-station { color: #8B7A6C; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fr-scene[data-on="true"] .fr-freq { color: var(--gsolid); text-shadow: 0 0 6px rgba(var(--g), .7); }
.fr-scene[data-on="true"] .fr-station { color: var(--gtext); }
.fr-grille { position: relative; flex: 1; min-height: 82px; border-radius: 10px; background: radial-gradient(circle, rgba(0,0,0,.65) 1.7px, transparent 2.2px) 0 0 / 9px 9px, var(--grillebg); box-shadow: inset 0 2px 8px rgba(0,0,0,.55); overflow: hidden; }
.fr-grille::after { content: ""; position: absolute; left: 50%; top: 50%; width: 70%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.9); border-radius: 50%; background: radial-gradient(circle, rgba(0,0,0,.35), transparent 70%); opacity: .6; }
.fr-scene.is-playing .fr-grille::after { animation: fr-cone .42s ease-in-out infinite alternate; }
@keyframes fr-cone { from { transform: translate(-50%, -50%) scale(.88); opacity: .45; } to { transform: translate(-50%, -50%) scale(.97); opacity: .75; } }

/* Front panel: knobs and preset keys */
.fr-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 14px; padding: 12px 14px; border-radius: calc(var(--radius) * .55); background: var(--panel); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 2px rgba(0,0,0,.35); }
.fr-knobwrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fr-knob-lab { font: 800 9px var(--font-mono); letter-spacing: .14em; color: var(--ink); opacity: .75; white-space: nowrap; }
.fr-knob { --rot: 0deg; position: relative; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; cursor: grab; touch-action: none; user-select: none;
  background: repeating-conic-gradient(from 0deg, #9DA2A9 0 6deg, #C9CDD2 6deg 12deg); box-shadow: 0 4px 6px rgba(0,0,0,.45), 0 0 0 3px rgba(0,0,0,.25); }
.fr-knob:active { cursor: grabbing; }
.fr-knob-cap { position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F4F5F7, #A9AEB5 70%); transform: rotate(var(--rot)); transition: transform .18s ease-out; }
.fr-knob-cap::after { content: ""; position: absolute; left: 50%; top: 3px; width: 3px; height: 9px; margin-left: -1.5px; border-radius: 2px; background: #2A2B2E; }
.fr-knob:focus-visible { outline: 3px solid #FFB25A; outline-offset: 3px; }
.fr-power .fr-knob-cap::before { content: ""; position: absolute; right: -2px; top: -2px; width: 9px; height: 9px; border-radius: 50%; background: #3A1D12; box-shadow: inset 0 1px 2px rgba(0,0,0,.6); transition: background .4s, box-shadow .4s; }
.fr-scene[data-on="true"] .fr-power .fr-knob-cap::before { background: var(--gsolid); box-shadow: 0 0 8px var(--gsolid); }
.fr-power { cursor: pointer; }
.fr-presets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px 6px; flex: 1 1 100%; min-width: 0; }
.fr-keys-pro { flex: 1 1 100%; margin: 2px 0 0; font: 700 10.5px var(--font-mono); color: var(--ink); opacity: .7; text-align: right; }
.fr-keys-pro a { color: inherit; }
.fr-key { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.fr-key b { display: grid; place-items: center; width: 100%; height: 26px; border-radius: 5px 5px 7px 7px; background: var(--key); color: var(--keyink); font: 800 13px var(--font-mono); box-shadow: 0 3px 0 rgba(0,0,0,.35), 0 4px 6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.6); transition: box-shadow .08s, filter .08s; }
.fr-key small { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 9.5px var(--font-mono); color: var(--ink); opacity: .7; text-align: center; }
/* Pressed: the key stays where it is and its shadow goes, so it looks pushed in rather than loose */
.fr-key:active b, .fr-key.is-on b { box-shadow: inset 0 2px 3px rgba(0,0,0,.28); filter: brightness(.96); }
.fr-key.is-on b { box-shadow: inset 0 2px 3px rgba(0,0,0,.28), inset 0 0 0 2px rgba(var(--g), .85), 0 0 8px rgba(var(--g), .45); }
.fr-key.is-saving b { animation: fr-save .6s ease-out; }
@keyframes fr-save { 0% { box-shadow: 0 0 0 0 rgba(var(--g), .9); } 100% { box-shadow: 0 0 0 12px rgba(var(--g), 0); } }
.fr-key:focus-visible b { outline: 3px solid #FFB25A; outline-offset: 2px; }

/* Under the radio */
.fr-alarmbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: rgba(255,120,40,.95); color: #2A1104; font-weight: 800; animation: fr-ring 1s ease-in-out infinite; }
@keyframes fr-ring { 50% { box-shadow: 0 0 0 8px rgba(255,120,40,.3); } }
.fr-alarmbar-txt { font: 800 18px var(--font-display); }
.fr-snz { background: #2A1104; color: #FFE2C8; border-color: #2A1104; min-height: 46px; }
.fr-stop { border-color: #2A1104; color: #2A1104; background: transparent; min-height: 46px; }
.fr-msg { margin: 0; min-height: 0; color: var(--gtext2); font-size: 14px; text-align: center; max-width: 60ch; }
.fr-msg:empty { display: none; }
.fr-full { position: absolute; right: 12px; bottom: 10px; border: 0; background: transparent; color: rgba(255,220,190,.6); font: 700 12.5px var(--font-display); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }
.fr-full:hover { color: #FFD2A8; }
.fr-scene:fullscreen { justify-content: center; border-radius: 0; padding: 40px 24px; }
.fr-scene:-webkit-full-screen { justify-content: center; border-radius: 0; padding: 40px 24px; }
.fr-scene:fullscreen .fr-radio { width: 50vw; }

/* Settings */
.fr-tabs { align-self: stretch; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; }
.fr-tabs button[aria-pressed="true"], .fr-h24 button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.fr-sec { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.fr-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; align-items: end; }
.fr-sec input[type="search"], .fr-sec input[type="time"], .fr-sec select { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 16px; }
.fr-sec label { font-weight: 600; font-size: 15px; }
.fr-lab { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.fr-status { margin: 0; font-size: 14px; color: var(--ink-2); }
.fr-status:empty { display: none; }
.fr-list { position: relative; list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.fr-list:empty { display: none; }
.fr-li { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-bottom: 1px solid var(--line); }
.fr-li:last-child { border-bottom: 0; }
.fr-li.is-on { background: color-mix(in srgb, #FF8A3D 10%, var(--surface)); }
.fr-li-play { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.fr-li-play:hover { background: var(--bg); }
.fr-li-play:focus-visible { outline: 3px solid var(--focus); }
.fr-logo { flex: none; width: 36px; height: 36px; border-radius: 8px; background: var(--bg) center/cover no-repeat; border: 1px solid var(--line); display: grid; place-items: center; font: 800 13px var(--font-display); color: var(--ink-3); overflow: hidden; }
.fr-li-txt { display: flex; flex-direction: column; min-width: 0; }
.fr-li-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-li-tags { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-li-save { flex: none; }
.fr-li-save select { min-height: 36px; width: auto; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font: 600 13px var(--font-display); }
.fr-days { display: flex; flex-wrap: wrap; gap: 6px; }
.fr-day { min-width: 48px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 700 13.5px var(--font-display); cursor: pointer; }
.fr-day[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.fr-how { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.fr-how legend { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.fr-opt { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 400 !important; line-height: 1.45; }
.fr-opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.fr-opt input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--ink); }
.fr-abtns { display: flex; flex-wrap: wrap; gap: 8px; }
.fr-anext, .fr-sleepinfo { margin: 0; font-weight: 700; color: #1E7A4C; }
.fr-anext:empty, .fr-sleepinfo:empty { display: none; }
.fr-h24 { display: grid; grid-template-columns: 1fr 1fr; align-self: stretch; }
.fr-finishes { display: flex; flex-wrap: wrap; gap: 8px; }
.fr-finishes button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 14px var(--font-display); cursor: pointer; }
.fr-finishes button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.fr-finishes i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.fr-finishes [data-f="walnut"] i { background: linear-gradient(135deg, #7A5233, #5B3B23); }
.fr-finishes [data-f="cream"] i { background: linear-gradient(135deg, #F3EBDA, #D8CBAE); }
.fr-finishes [data-f="sunset"] i { background: linear-gradient(135deg, #F07A32, #D2541C); }
.fr-finishes [data-f="noir"] i { background: linear-gradient(135deg, #3A3C42, #111214); }
.fr-finishes [data-f="space"] i { background: linear-gradient(135deg, #FFFFFF, #DADAD6); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), inset 0 0 0 6px #FF8A3D; }

/* Phones: clock on top, dial and speaker below */
@media (max-width: 640px) {
  .fr-scene { padding: 46px 10px 56px; }
  .fr-radio { padding: 16px 12px 12px; }
  .fr-body { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .fr-knobs { flex-direction: row; justify-content: space-around; padding: 8px; }
  .fr-clock { min-height: 0; height: clamp(170px, 52vw, 240px); }
  .fr-grille { min-height: 54px; }
  .fr-panel { padding: 10px; }
  .fr-knob { width: 40px; height: 40px; }
}
/* Desktop: never wider than half the screen */
@media (min-width: 641px) { .fr-radio { width: min(100%, 50vw); } }

/* Full screen: settings live behind a discreet button and slide in from the side */
.fr-gear, .fr-drawer-head { display: none; }
.fr-scene:fullscreen { width: 100vw !important; max-width: none; margin: 0; }
.fr-scene:-webkit-full-screen { width: 100vw !important; max-width: none; margin: 0; }
.fr-scene:fullscreen .fr-gear { display: block; position: absolute; top: 14px; right: 16px; z-index: 6; min-height: 40px; padding: 0 14px; border: 1px solid rgba(255,220,190,.25); border-radius: 999px; background: rgba(20,14,10,.55); color: rgba(255,225,195,.85); font: 700 13px var(--font-display); cursor: pointer; opacity: 0; transition: opacity .5s; backdrop-filter: blur(6px); }
.fr-scene:fullscreen .fr-full { opacity: 0; transition: opacity .5s; }
.fr-scene:fullscreen.show-ui .fr-gear, .fr-scene:fullscreen.show-ui .fr-full { opacity: 1; }
.fr-scene:fullscreen.drawer-open .fr-gear { opacity: 0; pointer-events: none; }
.fr-scene:fullscreen .fr-gear:focus-visible { opacity: 1; outline: 3px solid #FFB25A; }
.fr-scene:fullscreen .fr-settings { position: absolute; top: 0; right: 0; bottom: 0; z-index: 7; width: min(420px, 92vw); overflow-y: auto; padding: 18px 18px 30px; background: rgba(250,247,242,.97); color: #16233F; box-shadow: -12px 0 30px rgba(0,0,0,.5); transform: translateX(105%); transition: transform .35s ease; text-align: left; }
.fr-scene:fullscreen.drawer-open .fr-settings { transform: none; }
.fr-scene:fullscreen .fr-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.fr-drawer-title { font: 800 18px var(--font-display); }
.fr-drawer-close { min-height: 40px; padding: 0 12px; border: 1px solid #D5D0C6; border-radius: 999px; background: #FFFFFF; color: #16233F; font: 700 13.5px var(--font-display); cursor: pointer; }
.fr-scene:fullscreen .fr-settings .fr-tabs { margin-top: 10px; }
.fr-scene:fullscreen .fr-settings .fr-row { grid-template-columns: 1fr; }
.fr-scene:fullscreen .fr-settings .fr-list { max-height: 46vh; }
/* Full screen on a phone: the radio fills the whole screen, and the clock window takes up the spare height */
@media (max-width: 640px) {
  .fr-scene:fullscreen { padding: 34px 8px 10px; justify-content: stretch; }
  .fr-scene:-webkit-full-screen { padding: 34px 8px 10px; justify-content: stretch; }
  .fr-scene:fullscreen .fr-radio, .fr-scene:-webkit-full-screen .fr-radio { width: 100%; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  .fr-scene:fullscreen .fr-body, .fr-scene:-webkit-full-screen .fr-body { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  .fr-scene:fullscreen .fr-clock, .fr-scene:-webkit-full-screen .fr-clock { flex: 1 1 auto; height: auto; min-height: 200px; }
  .fr-scene:fullscreen .fr-grille, .fr-scene:-webkit-full-screen .fr-grille { flex: 0 0 auto; min-height: 50px; }
  .fr-scene:fullscreen .fr-full { bottom: 2px; }
  .fr-scene:fullscreen .fr-msg:empty, .fr-scene:fullscreen .fr-alarmbar[hidden] { display: none; }
}
/* BBC stations wait for a tap */
.fr-confirm { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 560px; padding: 14px 16px; border-radius: 14px; background: rgba(255,233,163,.97); color: #4A3200; text-align: center; font-weight: 600; font-size: 14.5px; }
.fr-confirm p { margin: 0; }
.fr-confirm-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.fr-cok { background: #4A3200; color: #FFF3D1; border-color: #4A3200; min-height: 44px; }
.fr-cskip { border-color: #4A3200; color: #4A3200; background: transparent; min-height: 44px; }
.fr-bbc { padding: 1px 6px; border-radius: 999px; background: #FFE9A3; color: #4A3200; font-size: 12px; font-weight: 800; }

/* Glow colours */
.fr-scene[data-glow="pink"]   { --g: 255,46,170;  --g2: 210,20,150; --g3: 90,0,70;   --gsolid: #FF4FC0; --glight: #FF8AD6; --gtext: #FFC9EC; --gtext2: #FFB3E2; }
.fr-scene[data-glow="blue"]   { --g: 50,150,255;  --g2: 20,80,255;  --g3: 0,20,90;   --gsolid: #4AA8FF; --glight: #8CC8FF; --gtext: #CFE7FF; --gtext2: #B5DAFF; }
.fr-scene[data-glow="cyan"]   { --g: 0,235,255;   --g2: 0,160,220;  --g3: 0,50,80;   --gsolid: #2BE8FF; --glight: #8AF4FF; --gtext: #C8FBFF; --gtext2: #A8F6FF; }
.fr-scene[data-glow="green"]  { --g: 70,255,120;  --g2: 20,200,80;  --g3: 0,70,20;   --gsolid: #4CFF7E; --glight: #94FFB0; --gtext: #CDFFD9; --gtext2: #B0FFC4; }
.fr-scene[data-glow="purple"] { --g: 170,90,255;  --g2: 120,40,255; --g3: 50,0,110;  --gsolid: #B06CFF; --glight: #CDA0FF; --gtext: #E6D3FF; --gtext2: #D9BFFF; }
.fr-scene[data-glow="red"]    { --g: 255,45,35;   --g2: 210,10,10;  --g3: 90,0,0;    --gsolid: #FF4636; --glight: #FF8577; --gtext: #FFC6BE; --gtext2: #FFB0A6; }
.fr-scene[data-glow="ice"]    { --g: 200,225,255; --g2: 140,180,240; --g3: 40,60,100; --gsolid: #DDEBFF; --glight: #EEF5FF; --gtext: #F4F8FF; --gtext2: #E3EEFF; }
.fr-glows { display: flex; flex-wrap: wrap; gap: 8px; }
.fr-glows button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 700 14px var(--font-display); cursor: pointer; }
.fr-glows button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.fr-glows i { width: 26px; height: 26px; border-radius: 50%; background: #120C09; box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); position: relative; }
.fr-glows i::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px 2px var(--c); }

/* More neon glows */
.fr-scene[data-glow="lime"]    { --g: 190,255,30;  --g2: 140,220,0;  --g3: 50,80,0;   --gsolid: #C6FF1A; --glight: #DDFF7A; --gtext: #F0FFC4; --gtext2: #E6FFA6; }
.fr-scene[data-glow="yellow"]  { --g: 255,232,30;  --g2: 240,190,0;  --g3: 90,70,0;   --gsolid: #FFE81F; --glight: #FFF27A; --gtext: #FFF8C8; --gtext2: #FFF3A8; }
.fr-scene[data-glow="magenta"] { --g: 255,43,240;  --g2: 210,0,210;  --g3: 90,0,90;   --gsolid: #FF2BF0; --glight: #FF85F6; --gtext: #FFD0FB; --gtext2: #FFB6F8; }
.fr-scene[data-glow="mint"]    { --g: 61,255,197;  --g2: 0,210,150;  --g3: 0,80,60;   --gsolid: #3DFFC5; --glight: #8AFFDD; --gtext: #CCFFF0; --gtext2: #B0FFE8; }
.fr-scene[data-glow="coral"]   { --g: 255,92,122;  --g2: 230,40,80;  --g3: 100,10,30; --gsolid: #FF5C7A; --glight: #FF95A8; --gtext: #FFD2DA; --gtext2: #FFBCC8; }
.fr-glows .fr-cyc::after { background: conic-gradient(#FF4FC0, #B06CFF, #4AA8FF, #2BE8FF, #4CFF7E, #FFE81F, #FF8A3D, #FF4FC0); box-shadow: 0 0 8px 2px rgba(255,255,255,.5); }
/* Neon colours glow a little brighter on the clock */
.fr-scene[data-on="true"]:is([data-glow="pink"],[data-glow="cyan"],[data-glow="lime"],[data-glow="yellow"],[data-glow="magenta"],[data-glow="mint"],[data-glow="coral"],[data-glow="purple"]) .fr-card { text-shadow: 0 0 6px rgba(var(--g), .9), 0 0 18px rgba(var(--g), .55); }
.fr-li.is-on { background: color-mix(in srgb, rgb(var(--g)) 12%, var(--surface)); }
/* Resume where you left off */
.fr-resume { position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 12px; max-width: min(92%, 460px); padding: 14px 22px 14px 16px; border: 0; border-radius: 999px; background: rgba(18,12,9,.92); color: #fff; font: 600 16px var(--font-display); box-shadow: 0 0 0 2px rgba(var(--g),.85), 0 0 26px rgba(var(--g),.55), 0 10px 30px rgba(0,0,0,.45); cursor: pointer; text-align: left; }
.fr-resume[hidden] { display: none; }
.fr-resume b { color: var(--gsolid); }
.fr-resume > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-resume-ico { flex: none; width: 38px; height: 38px; border-radius: 50%; background: rgb(var(--g)); position: relative; }
.fr-resume-ico::after { content: ""; position: absolute; left: 14px; top: 10px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #120C09; }
.fr-resume:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Glow picker: a compact row of colour swatches; the chosen colour's name shows next to the label */
.fr-glows { gap: 6px; }
.fr-glows button { width: 38px; height: 38px; min-height: 0; padding: 0; justify-content: center; border-radius: 50%; border: 1px solid var(--line); }
.fr-glows button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.fr-glows i { width: 30px; height: 30px; }
.fr-glows i::after { inset: 8px; }
.fr-glows button:hover i::after { inset: 6px; }
.fr-glow-name { margin-left: 6px; font-weight: 500; color: var(--ink-2); }

/* Tuning dial: a cream scale with dark markings, easy to read with any glow; the glow only tints it lightly */
.fr-dial { background: linear-gradient(180deg, #F6ECD4, #E4D3AE); box-shadow: inset 0 1px 4px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.2); }
.fr-dial-glow { background: linear-gradient(180deg, rgba(var(--g), .16), rgba(var(--g2), .10)); }
.fr-scene[data-on="false"] .fr-dial { filter: brightness(.82) saturate(.8); }
.fr-scale .fr-num, .fr-scene[data-on="true"] .fr-scale .fr-num { color: #3A2A18; }
.fr-scale .fr-tick, .fr-scene[data-on="true"] .fr-scale .fr-tick { background: rgba(58,42,24,.55); }
.fr-scale .fr-tick.is-major, .fr-scene[data-on="true"] .fr-scale .fr-tick.is-major { background: rgba(58,42,24,.85); }
.fr-scale .fr-st, .fr-scene[data-on="true"] .fr-scale .fr-st { background: rgba(58,42,24,.45); }
.fr-needle { background: #D3200E; box-shadow: 0 0 4px rgba(211,32,14,.55); }

/* Song and artist: a second display line under the station name, scrolling across like a car radio */
.fr-songline { position: relative; height: 20px; margin-top: -8px; overflow: hidden; border-radius: 0 0 6px 6px; background: #0F0B09; box-shadow: inset 0 -2px 6px rgba(0,0,0,.9); font: 700 11.5px/20px var(--font-mono); }
.fr-song { position: absolute; left: 0; top: 0; white-space: nowrap; padding-left: 100%; color: #8B7A6C; animation: fr-marquee var(--dur, 12s) linear infinite; }
.fr-scene[data-on="true"] .fr-song { color: var(--gtext2); text-shadow: 0 0 5px rgba(var(--g), .45); }
.fr-songline.is-empty .fr-song { animation: none; }
@keyframes fr-marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .fr-song { animation: none; padding-left: 10px; } }
.fr-readout { border-radius: 6px 6px 0 0; }

/* Pro preset keys (13 to 18) without Pro: a small, quiet "Pro" mark */
.fr-key.is-locked b { color: rgba(0,0,0,.35); box-shadow: 0 2px 0 rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.5); gap: 5px; display: flex; align-items: center; justify-content: center; }
.fr-key.is-locked:active b { box-shadow: inset 0 2px 3px rgba(0,0,0,.2); }
.fr-pro { font: 700 8.5px var(--font-mono); font-style: normal; letter-spacing: .04em; padding: 1px 4px; border-radius: 3px; border: 1px solid currentColor; opacity: .9; }
.fr-scene[data-finish="noir"] .fr-key.is-locked b { color: rgba(255,255,255,.35); }
.fr-songopt { display: flex; gap: 10px; align-items: center; margin: 2px 0 6px; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.fr-songopt input { width: 18px; height: 18px; accent-color: var(--accent, #16233F); }
/* v2190c: on phones Back to top and Ask STP step aside while the preset keys are on screen, and come back after */
@media (max-width: 700px) { html.fr-tuck .to-top, html.fr-tuck .ask-btn { opacity: 0 !important; pointer-events: none !important; transition: opacity .2s; } }
