/* Layout: one walnut cabinet radio (dial window, grille + knobs, piano-key presets). */
:root {
  --wall: #1d1916;
  --wall-2: #2a231d;
  --walnut: #5a3420;
  --walnut-dk: #331b10;
  --walnut-lt: #7a4a2c;
  --brass: #c9a35a;
  --brass-dk: #8a6a2e;
  --ivory: #efe5cf;
  --ivory-dk: #c9bb9c;
  --dial-glow: #f3c46a;
  --dial-glass: #2b1d10;
  --eye: #6fe08a;
  --ink: #2a1a0f;
  --text: #f1e6d2;
  --muted: #b9a68a;
  --enamel: #b4472f;
  --enamel-on: #e0623f;
  --night: #3b4f7a;
  --f-plate: "Limelight", "Didot", Georgia, serif;
  --f-label: "Josefin Sans", "Futura", "Avenir Next", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* panels set display: grid; hidden must still win */
html, body { margin: 0; }
html, body { min-height: 100%; }
body {
  background: radial-gradient(120% 80% at 50% 0%, var(--wall-2), var(--wall) 70%);
  color: var(--text);
  font-family: var(--f-label);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 40px;
}

/* ---------- Cabinet ---------- */
.cabinet {
  max-width: 980px; margin: 0 auto;
  border-radius: 34px 34px 14px 14px;
  padding: 22px 26px 26px;
  background:
    repeating-linear-gradient(92deg, rgba(0,0,0,.10) 0 2px, transparent 2px 9px, rgba(255,255,255,.035) 9px 11px, transparent 11px 23px),
    repeating-linear-gradient(88deg, rgba(0,0,0,.08) 0 1px, transparent 1px 37px),
    linear-gradient(180deg, var(--walnut-lt), var(--walnut) 35%, var(--walnut-dk));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.12), inset 0 -6px 14px rgba(0,0,0,.45), 0 24px 50px rgba(0,0,0,.55);
  display: grid; gap: 18px;
}
.nameplate {
  justify-self: center; text-align: center;
  font-family: var(--f-plate); font-size: clamp(22px, 3.4vw, 34px); letter-spacing: .06em;
  color: var(--brass);
  text-shadow: 0 1px 0 rgba(255,255,255,.25), 0 -1px 0 rgba(0,0,0,.6);
  line-height: 1;
}
.nameplate small { display: block; font-family: var(--f-label); font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.room {
  font: 700 1em var(--f-label); letter-spacing: .3em; text-transform: uppercase; color: var(--ivory);
  background: rgba(0,0,0,.25); border: 1px solid var(--brass-dk); border-radius: 4px; padding: .45em .5em .35em .8em; cursor: pointer;
}
.room::after { content: "  ✎"; letter-spacing: 0; color: var(--brass); }
.room:hover { border-color: var(--brass); }
.room:focus-visible, .chip:focus-visible, .rename input:focus-visible, .rename .save:focus-visible { outline: 3px solid var(--dial-glow); outline-offset: 2px; }
.rename {
  justify-self: center; width: min(100%, 560px);
  background: var(--ivory); color: var(--ink); border-radius: 10px; padding: 14px 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,.45); display: grid; gap: 10px;
}
.rename label { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.rename .row { display: flex; gap: 8px; }
.rename input { flex: 1; min-width: 0; font: 600 16px var(--f-label); padding: 10px 12px; border: 2px solid var(--ivory-dk); border-radius: 6px; background: #fffaf0; color: var(--ink); }
.rename .save { font: 700 14px var(--f-label); letter-spacing: .1em; text-transform: uppercase; border: 0; border-radius: 6px; padding: 0 16px; background: var(--walnut); color: var(--ivory); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 13px var(--f-label); border: 1.5px solid var(--walnut-lt); color: var(--walnut-dk); background: transparent; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip:hover { background: rgba(122,74,44,.1); }
.rename p { margin: 0; font-size: 12.5px; color: #6a5a45; }
.rename .opt { display: flex; align-items: center; gap: 10px; font: 600 14px var(--f-label); letter-spacing: 0; text-transform: none; cursor: pointer; }
.rename .opt input { flex: none; width: 22px; height: 22px; margin: 0; padding: 0; accent-color: var(--walnut); color-scheme: light; }
/* Presets on this screen: a switch per station */
.rename .presets-opt { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 6px; }
.rename .presets-opt legend { padding: 0; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.rename .preset-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.rename .preset-list .opt small { font-weight: 400; font-size: 12px; color: #6a5a45; }
.rename .preset-list .opt .new { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: var(--enamel); color: #fff3e6; }

/* Visual level slider */
.rename .lvl { display: flex; align-items: center; gap: 12px; font: 600 14px var(--f-label); }
.rename .lvl label { font-size: 14px; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.rename .lvl input { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; accent-color: var(--walnut); color-scheme: light; height: 28px; }
.rename .lvl output { min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
.rename .install { font: 700 13px var(--f-label); letter-spacing: .08em; border: 0; border-radius: 6px; padding: 10px 14px; background: var(--walnut); color: var(--ivory); cursor: pointer; }
.rename .actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Knobs hidden (the option above): the grille takes the whole row; Mute joins the switches under the readout. */
.no-knobs .knob-wrap { display: none; }
.no-knobs .mid { grid-template-columns: 1fr; }
.no-knobs .switches .mute { padding: 6px 14px 6px 10px; font-size: 11px; border-radius: 6px; }

/* Look (This screen panel): Vintage, Modern or Modern dark; Modern is radio-modern.css. */
.looks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.looks-lbl { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-right: 4px; }
.chip.look[aria-pressed="true"] { background: var(--walnut); border-color: var(--walnut); color: var(--ivory); }

/* The display: in Vintage only the dial window shows (the frequency readout and the song stay in the
   grille); Modern turns it into one black panel with the dial and the song (radio-modern.css). */
.display { display: contents; }
.freq { display: none; }
.vstep { display: none; } /* Modern's volume buttons; Vintage has the knob */

/* Dial window */
.dial {
  position: relative; height: 112px; border-radius: 14px;
  border: 5px solid var(--brass);
  box-shadow: inset 0 0 0 2px var(--brass-dk), inset 0 8px 18px rgba(0,0,0,.7), 0 2px 0 rgba(255,255,255,.15);
  background: var(--dial-glass);
  overflow: hidden;
  transition: background .6s;
}
.on .dial { background: radial-gradient(90% 140% at 50% 50%, #6b4a1e, #3a2711 70%); }
.scale { position: absolute; inset: 14px 22px auto; height: 40px; }
.tick { position: absolute; bottom: 0; width: 1px; background: var(--ivory-dk); opacity: .55; height: 8px; }
.tick.major { height: 16px; opacity: .9; }
.num { position: absolute; top: 0; transform: translateX(-50%); font-size: 13px; color: var(--ivory); opacity: .75; font-variant-numeric: tabular-nums; }
.unit { position: absolute; right: 22px; top: 14px; font-size: 10px; letter-spacing: .2em; color: var(--ivory-dk); }
.marks { position: absolute; inset: auto 22px 14px; height: 30px; }
.mark {
  position: absolute; left: 0; bottom: 0; /* placed by layoutMarks() */
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ivory-dk); opacity: .55; white-space: nowrap; transition: color .3s, opacity .3s, text-shadow .3s;
}
.mark[data-lane="1"] { bottom: 1.3em; } /* the second row, for a name that would touch its neighbour */
.mark.crowded { visibility: hidden; }
.mark.crowded.active { visibility: visible; z-index: 1; background: #4f3618; box-shadow: 0 0 6px 4px #4f3618; } /* covers the names it lands on */
.mark.active { color: var(--dial-glow); opacity: 1; text-shadow: 0 0 10px rgba(243,196,106,.8); }
.mark.web { color: #8fd0c4; }
.mark.web.active { color: #b9f2e6; text-shadow: 0 0 10px rgba(143,208,196,.85); }
.num.web { color: #8fd0c4; opacity: .9; letter-spacing: .15em; font-size: 11px; font-weight: 700; }
.webzone { position: absolute; top: 2px; bottom: -8px; width: 0; border-left: 1px dashed #8fd0c4; opacity: .45; }
.needle {
  position: absolute; top: 8px; bottom: 8px; width: 3px; margin-left: -1.5px;
  background: #d9412b; border-radius: 2px; box-shadow: 0 0 6px rgba(217,65,43,.8);
  left: 50%; transition: left .9s cubic-bezier(.45,.05,.25,1);
}
.needle[data-move="hunt"] { transition: left .32s ease-in-out; }
.needle[data-move="lock"] { transition: left .55s cubic-bezier(.3,1.7,.5,1); } /* swings on with a little overshoot */
@media (prefers-reduced-motion: reduce) { .needle, .needle[data-move] { transition: none; } }

/* Middle row: knob, grille, eye, knob */
.mid { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.grille {
  min-height: 150px; border-radius: 12px; padding: 14px; gap: 10px; align-content: center;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 4px),
    linear-gradient(#8a6b45, #6f5434);
  box-shadow: inset 0 4px 12px rgba(0,0,0,.55);
  border: 3px solid var(--walnut-dk);
  display: grid; place-items: center; position: relative;
}
.output {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  border: 0; border-radius: 6px; padding: 6px 12px 6px 8px; color: var(--ink);
  background: linear-gradient(180deg, #e2c27c, var(--brass) 45%, #9c7a3a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 6px rgba(0,0,0,.45);
  font-family: var(--f-label); max-width: 100%;
}
.output:focus-visible { outline: 3px solid var(--dial-glow); outline-offset: 2px; }
.output .otxt { font-size: 11px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; line-height: 1; }
.readout { text-align: center; padding: 10px 16px; background: rgba(29,18,10,.72); border-radius: 8px; min-width: 0; width: min(100% - 100px, 640px); } /* clear of the eye on both sides */
.readout .lbl { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.readout .stn { font-size: clamp(18px, 2.6vw, 26px); font-weight: 700; letter-spacing: .06em; margin-top: 4px; }
.readout .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.readout .stn, .readout .sub { overflow-wrap: anywhere; }
/* A song title is longer than a call sign: a little smaller, at most two lines. */
.readout .stn.song {
  font-size: clamp(17px, 2.2vw, 22px); letter-spacing: .02em; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.readout .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The album cover, when there is one, sits left of the song; the text keeps the rest of the width. */
.now { display: flex; align-items: center; gap: 14px; }
.now .txt { flex: 1; min-width: 0; }
.art { flex: none; width: 76px; height: 76px; border-radius: 4px; object-fit: cover; background: #2a1a0f;
  box-shadow: 0 0 0 1px rgba(245,234,213,.18), 0 3px 8px rgba(0,0,0,.5); opacity: 0; transition: opacity .5s; }
.art.shown { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .art { transition: none; } }
/* Phones: the readout is narrow, so the cover goes above the song and the title keeps the full width. */
@media (max-width: 520px) {
  .now { flex-direction: column; gap: 8px; }
  .now .txt { width: 100%; }
  .art { width: 96px; height: 96px; }
}
.wave { display: block; width: 100%; height: 34px; margin-top: 6px; cursor: pointer; }
.wave[data-mode="bars"] { height: 52px; }
/* Output and the Wave / Bars switch sit side by side under the readout. */
.switches { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.output.vis { padding: 6px 12px; }
.vicon { width: 22px; height: 15px; flex: none; color: var(--walnut-dk); }
.vis .vicon { display: none; }
.vis[data-mode="wave"] .wave-i, .vis[data-mode="bars"] .bars-i, .vis[data-mode="off"] .off-i { display: block; }
.eye {
  position: absolute; top: 12px; right: 14px; width: 26px; height: 26px; border-radius: 50%;
  background: #12301b; border: 2px solid var(--brass-dk);
  box-shadow: inset 0 0 6px rgba(0,0,0,.8);
}
.on .eye { background: radial-gradient(circle, #0d2914 18%, var(--eye) 22%, #2c8a47 70%); box-shadow: 0 0 12px rgba(111,224,138,.6); animation: eye 2.4s ease-in-out infinite; }
@keyframes eye { 50% { filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { .on .eye { animation: none; } }

.knob-wrap { display: grid; justify-items: center; gap: 8px; align-self: start; } /* knobs line up even though only Volume has Mute */
.knob {
  width: 92px; height: 92px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
  background:
    repeating-conic-gradient(from 0deg, rgba(0,0,0,.25) 0 4deg, transparent 4deg 10deg),
    radial-gradient(circle at 35% 30%, #f4ead4, #b8a888 60%, #7c6d55);
  box-shadow: 0 6px 12px rgba(0,0,0,.5), inset 0 -3px 6px rgba(0,0,0,.35);
  transition: transform .35s ease;
  touch-action: none;
}
.knob.dragging { transition: none; }
.knob::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.knob:focus-visible, .key:focus-visible { outline: 3px solid var(--dial-glow); outline-offset: 3px; }
.knob-lbl { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ivory-dk); }
.vol-val { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Mute: a small brass push-button under the volume knob; red enamel while muted. */
.mute {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border: 0; border-radius: 999px;
  padding: 5px 12px 5px 9px; color: var(--ink); font: 700 10px var(--f-label); letter-spacing: .25em; text-transform: uppercase;
  background: linear-gradient(180deg, #e2c27c, var(--brass) 45%, #9c7a3a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 5px rgba(0,0,0,.45);
}
.mute svg { width: 16px; height: 16px; flex: none; }
.mute .off, .mute[aria-pressed="true"] .on { display: none; }
.mute[aria-pressed="true"] .off { display: inline; }
.mute[aria-pressed="true"] {
  color: #fff3e6; background: linear-gradient(180deg, var(--enamel-on), var(--enamel) 60%, #8a3322);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.4), 0 0 10px rgba(224,98,63,.55);
}
.mute:focus-visible { outline: 3px solid var(--dial-glow); outline-offset: 2px; }
.muted #volVal { color: var(--enamel-on); font-weight: 700; letter-spacing: .1em; }
.on.muted .eye { filter: brightness(.45); animation: none; } /* the eye dims while muted */

/* Piano-key presets */
.keys { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)) minmax(0, .7fr); gap: 10px; padding: 12px; background: rgba(0,0,0,.35); border-radius: 10px; box-shadow: inset 0 3px 8px rgba(0,0,0,.6); }
.key {
  font: 700 15px/1.1 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  border: 0; border-radius: 4px 4px 10px 10px; cursor: pointer; min-height: 74px; padding: 10px 6px;
  background: linear-gradient(180deg, #fffaf0, var(--ivory) 55%, var(--ivory-dk));
  box-shadow: 0 7px 0 #8f8166, 0 9px 10px rgba(0,0,0,.5);
  transition: transform .08s, box-shadow .08s;
  display: grid; align-content: center; gap: 4px;
}
.keys.rows { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); } /* 7+ presets: two rows */
.key span { font-size: 11px; font-weight: 400; letter-spacing: .04em; text-transform: none; color: #6a5a45; }
.key:active, .key[aria-pressed="true"] { transform: translateY(6px); box-shadow: 0 1px 0 #8f8166, 0 2px 4px rgba(0,0,0,.5); background: linear-gradient(180deg, var(--ivory), var(--ivory-dk)); }
.key.off { background: linear-gradient(180deg, #3a2a1f, #24180f); color: var(--ivory-dk); box-shadow: 0 7px 0 #120a05, 0 9px 10px rgba(0,0,0,.5); }
.key.off span { color: var(--muted); }
.key.off[aria-pressed="true"] { box-shadow: 0 1px 0 #120a05; }

/* ---------- Narrow screens ---------- */
@media (max-width: 720px) {
  .cabinet { padding: 18px 14px 18px; border-radius: 24px 24px 12px 12px; }
  .mid { grid-template-columns: 1fr 1fr; }
  .grille { grid-column: 1 / -1; order: -1; min-height: 120px; }
  .knob { width: 70px; height: 70px; }
  .keys, .keys.rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key.off { grid-column: 1 / -1; min-height: 52px; }
  .mark { font-size: 10px; }
  .num:nth-child(odd of .num) { display: none; }
}

/* ---------- Cozyla Calendar+ 2 (15.6", hung portrait): everything on one screen, big touch targets ---------- */
@media (orientation: portrait) and (min-width: 600px) {
  html, body { height: 100%; }
  body { display: flex; flex-direction: column; padding-block: 1.6vh; }
  main { flex: 1; display: flex; flex-direction: column; min-height: 0; width: 100%; max-width: 980px; margin: 0 auto; }
  .cabinet { flex: 1; min-height: 0; width: 100%; grid-template-rows: auto auto 1fr auto auto; gap: 1.8vh; padding: 2.4vh 4vw 2.8vh; border-radius: 6vw 6vw 2vw 2vw; }
  .nameplate { font-size: 4.6vw; }
  .nameplate small { font-size: 1.6vw; }
  .dial { height: 11vh; }
  .scale { height: 4.5vh; }
  .num { font-size: 1.9vw; }
  .mark { font-size: 1.9vw; }
  .num.web { display: block; }
  .marks { height: 3.4vh; }
  .mid { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; align-content: stretch; } /* the grille takes the spare height */
  .grille { grid-column: 1 / -1; order: -1; height: 100%; min-height: 12vh; gap: 1.4vh; }
  .readout .lbl { font-size: 1.6vw; }
  .readout .stn { font-size: 6vw; }
  .readout .stn.song { font-size: 4.2vw; }
  .readout .sub { font-size: 2.6vw; }
  .now { gap: 3vw; }
  .art { width: 22vw; height: 22vw; border-radius: .8vw; } /* the tall grille has room for a real cover */
  .wave { height: 5vh; margin-top: 1vh; }
  .wave[data-mode="bars"] { height: 8vh; }
  .switches { gap: 1.6vw; }
  .output.vis { padding: 0.8vh 2vw; }
  .vicon { width: 3.2vw; height: 2.2vw; }
  .readout { width: min(100% - 14vw, 760px); }
  .eye { width: 4vw; height: 4vw; }
  .output { gap: 1.6vw; }
  .output .otxt { font-size: 1.7vw; }
  .knob { width: 11vw; height: 11vw; }
  .knob-lbl, .vol-val { font-size: 1.7vw; }
  .mute { font-size: 1.5vw; padding: 0.7vh 1.8vw 0.7vh 1.4vw; gap: 1vw; }
  .mute svg { width: 2.4vw; height: 2.4vw; }
  /* One row of presets (plus Off), like the push-buttons along a real radio's front. */
  .keys { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)) minmax(0, .7fr); gap: 1.4vw; padding: 1.4vh 1.4vw; }
  .keys.rows { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); row-gap: 2.4vh; }
  .key { min-height: 9vh; font-size: 2.9vw; padding: 1vh 1vw; }
  .key span { font-size: 1.6vw; }
  .key.off { grid-column: auto; min-height: 9vh; }
  .rename { width: 100%; }
  .rename label { font-size: 1.7vw; }
  .rename .lvl, .rename .lvl label { font-size: 2.2vw; }
  .rename p { font-size: 1.8vw; }
}

/* ---------- Mini player window (Chrome/Edge): its <body id="pip"> holds the readout and the mini bar ---------- */
#pip {
  margin: 0; min-height: 100vh; padding: 10px 12px; box-sizing: border-box; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--walnut-lt), var(--walnut) 35%, var(--walnut-dk));
}
#pip .readout { width: 100%; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding: 8px 12px; }
#pip .now { flex-direction: row; gap: 12px; text-align: left; }
#pip .now .txt { width: auto; }
#pip .art { width: 64px; height: 64px; }
#pip .readout .lbl { font-size: 10px; }
#pip .readout .stn { font-size: 20px; }
#pip .readout .stn.song { font-size: 17px; }
#pip .readout .sub { font-size: 13px; }
#pip .wave { flex: 1 1 30px; min-height: 22px; max-height: 70px; height: auto; margin-top: 6px; }
#pip .mini-bar { display: flex; align-items: center; gap: 6px; }
#pip .mini-bar button {
  min-width: 36px; height: 32px; padding: 0 10px; border: 0; border-radius: 6px; cursor: pointer;
  font: 700 19px/1 var(--f-label); color: var(--ink);
  background: linear-gradient(180deg, #e2c27c, var(--brass) 45%, #9c7a3a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 4px rgba(0,0,0,.45);
}
#pip .mini-bar .mini-mute { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
#pip .mini-bar .mini-mute[aria-pressed="true"] { color: #fff3e6; background: linear-gradient(180deg, var(--enamel-on), var(--enamel) 60%, #8a3322); }
#pip .mini-bar button:disabled { opacity: .4; cursor: default; }
#pip .mini-bar button:focus-visible { outline: 3px solid var(--dial-glow); outline-offset: 2px; }
#pip .mini-gap { flex: 1; }
#pip .mini-vol { min-width: 2ch; text-align: center; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- Big song view (after 30 s without a touch while playing) ---------- */
.np {
  position: fixed; inset: 0; z-index: 30; overflow: hidden; cursor: pointer;
  display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 35%, #4a2a18, var(--walnut-dk) 60%, #1a0e07);
  color: var(--ivory); animation: np-in .8s ease;
}
@keyframes np-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .np { animation: none; } }
.np-bg { position: absolute; inset: -15%; width: 130%; height: 130%; object-fit: cover; filter: blur(48px) saturate(1.2); opacity: .35; pointer-events: none; }
.np-bg:not([src]) { display: none; }
.np-body { position: relative; display: grid; justify-items: center; gap: 3vh; width: min(100%, 980px); text-align: center; }
.np-art {
  width: min(78vw, 52vh); aspect-ratio: 1; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(160deg, #d9b56c, var(--brass) 45%, #a5823f);
  box-shadow: 0 0 0 1px rgba(245,234,213,.2), 0 18px 50px rgba(0,0,0,.6);
}
.np-art img { width: 100%; height: 100%; object-fit: cover; }
.np-call { font: 400 clamp(32px, 9vw, 96px)/1 var(--f-plate); color: var(--ink); padding: 0 8%; overflow-wrap: anywhere; }
.np-art img:not([hidden]) + .np-call { display: none; }
.np-txt { display: grid; gap: 1vh; width: 100%; min-width: 0; }
.np-lbl { font: 600 clamp(12px, 1.6vw, 18px) var(--f-label); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.np-song { font: 700 clamp(26px, 5vw, 64px)/1.15 var(--f-label); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-artist { font: 400 clamp(18px, 3vw, 36px) var(--f-label); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-vis .wave { height: 8vh; margin-top: 1vh; cursor: inherit; }
.np-vis .wave[data-mode="bars"] { height: 12vh; }
.np-hint { font: 600 clamp(13px, 1.6vw, 18px) var(--f-label); letter-spacing: .1em; color: var(--muted); opacity: .6; margin-top: 1vh; }
/* Wide and short (a phone on its side, a laptop): cover on the left, words on the right. */
@media (orientation: landscape) and (max-height: 700px), (min-aspect-ratio: 3/2) {
  .np-body { grid-template-columns: auto 1fr; align-items: center; gap: 5vw; text-align: left; }
  .np-art { width: min(42vw, 72vh); }
  .np-txt { justify-items: start; }
  .np-vis { width: 100%; }
  .np-song { font-size: clamp(24px, 3.8vw, 56px); -webkit-line-clamp: 3; }
}

/* New-version banner (version-check.js): amber, so it stands out from the walnut and brass. */
.version-banner {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  max-width: 980px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #f5b82e; color: #2a1a0f; border-radius: 10px; padding: 10px 14px;
  font: 700 15px var(--f-label); box-shadow: 0 6px 16px rgba(0,0,0,.45);
}
.version-banner button {
  font: 700 14px var(--f-label); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  background: #2a1a0f; color: #f5b82e; border: 0; border-radius: 6px; padding: 8px 14px;
}
.version-banner button:focus-visible { outline: 3px solid #2a1a0f; outline-offset: 2px; }
@media (orientation: portrait) and (min-width: 600px) {
  .version-banner { flex: none; width: 100%; font-size: 2.4vw; }
  .version-banner button { font-size: 2.2vw; padding: 1.2vh 2.4vw; }
}
