/* SPDX-License-Identifier: GPL-3.0-only */
/* FIZZ's preview: RemoteFM1's FM-1 Player (web/site/css/site.css), FM1VST's "Graphite" look (plugin/Look.h), with
   FIZZ's own header, colours and panels below. Inter Tight (OFL 1.1). */
@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/InterTight-VF-latin.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --window: #0F1113; --surface: #1D2024; --raised: #23272C; --raised-hover: #2A2F35; --well: #141619;
  --border: #33383F; --line: #2E333A; --divider: #2B2F35; --seg-on: #2C3138;
  --text: #E8EAED; --row-text: #D6D9DD; --muted: #8A9099; --heading: #7D838C; --switch-off: #30353C; --knob-off: #9AA0A8;
  --green: #3DDC84; --amber: #F5A524; --red: #FF6464; --red-fill: #D9443F; --brand: #FF9A4D;
  --accent: #28E1FF; --on-accent: #001418; --accent-soft: rgba(40, 225, 255, .12);
  --backdrop: #0E0E10; --plate: #1C1C20;
  --head-h: 52px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--backdrop); color: var(--text); overflow: hidden;
  font: 500 14px/1.4 "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
a { color: var(--accent); }

/* ---- the header */
#top {
  height: var(--head-h); display: flex; align-items: center; gap: 10px; padding: 0 12px 0 10px;
  background: var(--window); border-bottom: 1px solid #1A1D21; position: relative; z-index: 3;
}
body.embed #top { display: none; }
.brand { display: flex; align-items: center; gap: 9px; background: none; border: 0; padding: 6px 8px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.brand:hover { background: var(--raised); }
.brand b { font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.mark { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, #FFA45E, #E07A3C); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); flex: none; }
.fw-pill {
  display: flex; align-items: center; gap: 7px; min-width: 0; background: var(--raised); border: 1px solid var(--line);
  border-radius: 8px; height: 30px; padding: 0 8px 0 11px; cursor: pointer;
}
.fw-pill:hover { background: var(--raised-hover); }
#fw-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fw-ver { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.fw-pill svg, .ic { width: 14px; height: 14px; flex: none; }
.fw-pill svg { fill: none; stroke: var(--knob-off); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* the page's volume (the sheet's PLAYING) */
.vol-wrap { display: flex; align-items: center; gap: 8px; }
.vol { width: 120px; accent-color: var(--accent); }
.vol-val { color: var(--muted); font-size: 12.5px; min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
#status { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
#status a { color: var(--row-text); font-weight: 600; text-decoration: none; }
#status a:hover { text-decoration: underline; }
#top nav { display: flex; gap: 4px; margin-left: auto; flex: none; }
#top nav a { color: var(--row-text); text-decoration: none; font-weight: 600; font-size: 13px; padding: 6px 10px; border-radius: 8px; }
#top nav a:hover { background: var(--raised); color: var(--text); }

/* ---- my FM-1: the status dot (grey off, amber pulsing busy, green on, red bad), the header button, its menu */
.fm1-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: #5A6068; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.fm1-dot.busy { background: var(--amber); box-shadow: 0 0 0 3px rgba(245,165,36,.16), 0 0 8px rgba(245,165,36,.6); }
.fm1-dot.busy.live { animation: fm1-pulse 1.1s ease-in-out infinite; }
.fm1-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(61,220,132,.16), 0 0 8px rgba(61,220,132,.55); }
.fm1-dot.bad { background: var(--red); box-shadow: 0 0 0 3px rgba(255,100,100,.16), 0 0 8px rgba(255,100,100,.5); }
@keyframes fm1-pulse { 50% { opacity: .35; transform: scale(.8); } }
.fm1-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 11px 0 10px; border-radius: 8px; cursor: pointer;
  background: var(--raised); border: 1px solid var(--line); color: var(--row-text); font-weight: 600; font-size: 13px; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04); align-self: center;
}
.fm1-btn[hidden] { display: none; }
.fm1-btn:hover { background: var(--raised-hover); color: var(--text); }
.fm1-btn[data-tone="on"] { border-color: rgba(61,220,132,.35); color: var(--text); }
.fm1-btn[data-tone="bad"] { border-color: rgba(255,100,100,.4); }
.fm1-btn[data-tone="busy"] { border-color: rgba(245,165,36,.35); }
.fm1-via { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--green); background: rgba(61,220,132,.12); border-radius: 5px; padding: 2px 5px; }
.fm1-via[hidden] { display: none; }
.fm1-short { display: none; }
.fm1-menu {
  position: fixed; z-index: 12; width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.55); padding: 12px;
}
.fm1-menu[hidden] { display: none; }
.fm1-menu-line { display: flex; gap: 9px; align-items: baseline; color: var(--row-text); font-size: 13px; }
.fm1-menu-line .fm1-dot { transform: translateY(-1px); }
.fm1-menu-row { display: flex; gap: 8px; margin-top: 12px; }
.fm1-menu-row .pill { flex: 1; }
.remote-status .fm1-dot { margin-right: 8px; vertical-align: 1px; }

/* ---- the stage: the FM-1 edge to edge */
#stage { position: relative; height: calc(100% - var(--head-h)); outline: none; overflow: hidden; touch-action: none; }
body.embed #stage { height: 100%; }
#device-wrap, #screen-wrap { position: absolute; inset: 0; }
#device-wrap[hidden], #screen-wrap[hidden] { display: none; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
body.stacked #stage { display: flex; flex-direction: column; }
body.stacked #screen-wrap { position: relative; inset: auto; flex: none; }
body.stacked #device-wrap { position: relative; inset: auto; flex: 1; overflow-x: auto; overflow-y: hidden; overscroll-behavior: contain; touch-action: pan-x; scrollbar-width: thin; }
body.stacked #device { touch-action: pan-x; }

/* the corner button: fades in on movement or a first touch; opens the sheet */
#corner {
  position: absolute; z-index: 2; border-radius: 50%; border: 1px solid var(--line); background: rgba(35, 39, 44, .94);
  color: var(--row-text); display: grid; place-items: center; padding: 0; cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity .25s ease; box-shadow: 0 2px 8px rgba(0,0,0,.45);
}
#corner .ic { width: 57%; height: 57%; }
#corner:hover { background: var(--raised-hover); color: var(--text); }
body.chrome #corner, #corner:focus-visible, body:not(.running) #corner { opacity: 1; pointer-events: auto; }
body.embed #corner, body.sheet-open #corner { display: none; }

/* the start overlay (the autoplay policy: sound needs a gesture) */
#start {
  position: absolute; left: var(--start-x, 50%); top: var(--start-y, 50%); transform: translate(-50%, -50%); z-index: 2; text-align: center;
  background: rgba(23, 26, 30, .9); border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.55); backdrop-filter: blur(6px); max-width: calc(100% - 32px);
}
#start[hidden] { display: none; }
#start-btn {
  display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 12px; padding: 12px 20px; cursor: pointer;
  background: linear-gradient(135deg, #FFA45E, #E07A3C); color: #1A0E06; font-size: 17px; font-weight: 600;
}
#start-btn svg { width: 18px; height: 18px; fill: currentColor; }
#start-btn b { font-weight: 800; }
.start-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.start-row button { white-space: nowrap; }
.start-fm1 {
  display: inline-flex; align-items: center; gap: 9px; border-radius: 12px; padding: 0 18px; min-height: 48px; cursor: pointer;
  background: var(--raised); border: 1px solid var(--border); color: var(--text); font-size: 15px; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.start-fm1:hover:not(:disabled) { background: var(--raised-hover); }
.start-fm1:disabled { cursor: default; color: var(--row-text); }
.start-fm1[hidden] { display: none; }
#start p { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
#start p.start-note { color: var(--row-text); font-size: 13px; }
#start p.start-note.on { color: var(--green); }
#start p.start-note.bad { color: var(--amber); max-width: 420px; margin-left: auto; margin-right: auto; }
#start p.start-from { margin: 2px 0 14px; color: var(--text, #ECECEF); font-size: 20px; font-weight: 800; letter-spacing: .02em; }
#start p[hidden] { display: none; }
kbd { font: 600 11px/1 "Inter Tight", sans-serif; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px; color: var(--row-text); background: var(--raised); }

.toast {
  position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 12px); z-index: 4; max-width: min(560px, calc(100% - 32px));
  background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 14px;
  font-size: 13px; box-shadow: 0 8px 28px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(255, 100, 100, .45); }
.toast.ok { border-color: rgba(61, 220, 132, .45); }
/* a save from an older version, offered once (main.js offerCarry): above the toast, until answered */
.offer {
  position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 12px); z-index: 5; max-width: min(620px, calc(100% - 32px));
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  background: var(--surface); border: 1px solid var(--accent, var(--border)); color: var(--text); border-radius: 12px; padding: 10px 12px 10px 16px;
  font-size: 13.5px; box-shadow: 0 8px 28px rgba(0,0,0,.5); opacity: 0; transition: opacity .2s, transform .2s;
}
.offer.show { opacity: 1; transform: translate(-50%, 0); }
.offer[hidden] { display: none; }
.offer .offer-btns { display: flex; gap: 6px; flex: none; }
.offer.show ~ .toast { bottom: 84px; }
.sheet .carry { border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; font-size: 13px; color: var(--row-text); }
.sheet .carry .pills { margin-top: 8px; }

/* ---- the sheet (FM1VST Sheet.cpp: 360 wide, the browser 620, About 400; slides in over a scrim) */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .18s ease-out; z-index: 10; }
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; top: 8px; right: 8px; bottom: 8px; width: min(360px, calc(100vw - 16px)); z-index: 11;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.55);
  display: flex; flex-direction: column; transform: translateX(calc(100% + 24px)); transition: transform .18s cubic-bezier(.33, 1, .68, 1), width .18s ease-out;
  outline: none; visibility: hidden;
}
.sheet.open { transform: none; visibility: visible; }
.sheet[data-page="firmware"] { width: min(620px, calc(100vw - 16px)); }
.sheet[data-page="about"] { width: min(400px, calc(100vw - 16px)); }
.sheet-head { height: 54px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 14px; border-bottom: 1px solid var(--divider); }
.sheet-head .brand { padding: 0; cursor: default; gap: 9px; }
.sheet-head .brand:hover { background: none; }
.sheet-head .brand b { font-size: 15.5px; }
.sheet-head .ver { color: var(--heading); font-size: 12px; font-weight: 600; }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: var(--knob-off); border-radius: 8px; cursor: pointer; padding: 0; }
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn .ic { width: 16px; height: 16px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 18px 18px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.heading { margin: 20px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--heading); display: flex; justify-content: space-between; }
.heading-val { letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--muted); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 4px 0; }
.row-label { color: var(--row-text); font-size: 15px; min-width: 0; }
.row-sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.note { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 6px 0 2px; }
.remote-status { margin: 10px 0 0; }
.remote-status.ok { color: var(--green); }
.remote-status.bad { color: var(--amber); }
.src-lines { margin-top: 10px; font-size: 13px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.src-lines a, .src-inline { font-weight: 600; text-decoration: none; }
.src-lines a:hover { text-decoration: underline; }
.links { margin-top: 12px; font-size: 13px; color: var(--muted); }
.links a { font-weight: 600; text-decoration: none; }
.links a:hover { text-decoration: underline; }

/* firmware card (FM1VST FirmwareCard) */
.fw-card {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; padding: 10px 12px 10px 14px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 10px;
}
.fw-card:hover { background: var(--raised-hover); }
.fw-card.slim { padding: 9px 12px; }
.fw-card .led { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 9px var(--accent); flex: none; align-self: flex-start; margin-top: 8px; }
.fw-text { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.fw-top { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.fw-top b { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-top .muted { font-size: 13px; }
.fw-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-meta.warn { color: var(--amber); }
.chev { color: var(--knob-off); display: grid; }
.ic-wrap { color: var(--knob-off); display: grid; }
.ic-wrap .ic { width: 16px; height: 16px; }

/* the saves' nav: ‹ name › */
.nav { display: flex; align-items: center; height: 44px; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; }
.nav-arrow { width: 34px; height: 100%; border: 0; background: none; color: var(--knob-off); cursor: pointer; display: grid; place-items: center; border-radius: 10px; }
.nav-arrow:hover { color: var(--text); background: var(--raised-hover); }
.nav-mid { flex: 1; position: relative; min-width: 0; height: 100%; }
.nav-select {
  width: 100%; height: 100%; appearance: none; -webkit-appearance: none; background: none; border: 0; color: var(--text); cursor: pointer;
  font: 600 14.5px "Inter Tight", sans-serif; text-align: center; text-align-last: center; padding: 0 22px;
}
.nav-select option { background: var(--surface); color: var(--text); }
.nav-chev { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--knob-off); pointer-events: none; display: grid; }
.pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.pills.two { grid-template-columns: 1fr 1fr; }
.pill {
  height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); color: var(--row-text);
  font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04); display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.pill:hover:not(:disabled) { background: var(--raised-hover); }
.pill:disabled { opacity: .4; cursor: default; }
.pill.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.pill.danger { color: var(--red); border-color: rgba(255,100,100,.35); }
.pill.danger-fill { background: var(--red-fill); border-color: transparent; color: #fff; }
.pill.ghost { background: none; border-color: transparent; color: var(--muted); box-shadow: none; }
.inline { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.inline .grow { flex: 1; color: var(--row-text); }
.inline .pill { padding: 0 12px; flex: none; }
.text, .select {
  height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--well); color: var(--text); padding: 0 10px;
  font: 500 14px "Inter Tight", sans-serif; min-width: 0;
}
.text { flex: 1; }
.text:focus, .select:focus { outline: none; border-color: var(--accent); }
.select { max-width: 170px; cursor: pointer; }

/* switch / segmented / stepper (FM1VST Look::drawSwitch, drawSegmented, drawStepper) */
.switch { width: 38px; height: 22px; border-radius: 11px; border: 0; background: var(--switch-off); position: relative; cursor: pointer; flex: none; padding: 0; }
.switch span { position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--knob-off); transition: left .15s ease, background .15s; }
.switch.on { background: var(--accent); }
.switch.on span { left: 19px; background: #fff; box-shadow: 0 .75px 0 rgba(0,0,0,.18); }
.switch:disabled { opacity: .4; }
.seg { display: flex; padding: 2px; background: var(--well); border: 1px solid var(--line); border-radius: 8px; flex: none; }
.seg button { border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 13px; padding: 6px 11px; border-radius: 6px; cursor: pointer; }
.seg button:hover:not(.on):not(:disabled) { background: var(--raised); color: var(--row-text); }
.seg button.on { background: var(--seg-on); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.seg button:disabled { opacity: .45; cursor: default; }
.stepper { display: flex; align-items: center; height: 32px; width: 118px; background: var(--well); border: 1px solid var(--line); border-radius: 8px; flex: none; }
.stepper button { width: 30px; height: 100%; border: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 6px; color: var(--knob-off); }
.stepper button:hover { color: var(--text); background: var(--raised); }
.stepper svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.stepper span { flex: 1; text-align: center; font-weight: 600; font-size: 13px; }

/* theme swatches (FM1VST Swatches: the base and the membrane, split on the diagonal) */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(0,0,0,.5); cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.swatch.on { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- About */
.about-what { color: var(--row-text); font-size: 13.5px; margin: 0 0 10px; }
.kv { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.kv .k { color: var(--muted); width: 92px; flex: none; }
.kv .v { color: var(--row-text); min-width: 0; overflow-wrap: anywhere; }
.kv a { text-decoration: none; }
.credits { white-space: pre-wrap; font: 500 11.5px/1.45 "Inter Tight", sans-serif; color: var(--muted); background: var(--well); border-radius: 8px; padding: 10px; max-height: 220px; overflow: auto; }
.credit-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.credit-list li { margin: 5px 0; }
.credit-list a { text-decoration: none; font-weight: 600; }

/* ==================================================================== FIZZ ===
   Black, neon line work, FIZZ's own colours (core/ui/ui.h, ui_kit.c UI_TRACK_PAL): */
:root {
  --fz-blue: #3F7DFF; --fz-green: #1FD47E; --fz-cream: #F1F0EA; --fz-orange: #FF6A2C; --fz-pink: #FF3CA0;
  --fz-yellow: #FFD23F; --fz-violet: #9664FF; --fz-cyan: #28E1FF; --fz-magenta: #F03CFF; --fz-champagne: #F3D9A4;
  --window: #000; --backdrop: #050506;
}
body { background: #000; }
#top { background: #000; border-bottom: 1px solid #16161a; gap: 14px; padding: 0 10px 0 12px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; padding: 4px 6px 4px 2px; border-radius: 10px; }
.logo:hover { background: #0d0d10; }
.bubbles { width: 30px; height: 30px; fill: none; stroke-width: 2.2; overflow: visible; }
.bubbles circle:nth-child(1) { stroke: var(--fz-cyan); filter: drop-shadow(0 0 3px rgba(40, 225, 255, .8)); }
.bubbles circle:nth-child(2) { stroke: var(--fz-pink); filter: drop-shadow(0 0 3px rgba(255, 60, 160, .8)); animation: fz-rise 3.2s ease-in-out infinite; }
.bubbles circle:nth-child(3) { stroke: var(--fz-yellow); filter: drop-shadow(0 0 3px rgba(255, 210, 63, .8)); animation: fz-rise 2.4s ease-in-out .8s infinite; }
@keyframes fz-rise { 50% { transform: translateY(-2px); } }
.wordmark {
  font-size: 24px; font-weight: 800; letter-spacing: .06em; line-height: 1;
  background: linear-gradient(90deg, var(--fz-cyan), var(--fz-blue) 30%, var(--fz-magenta) 62%, var(--fz-orange) 85%, var(--fz-yellow));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 6px rgba(240, 60, 255, .35));
}
.tagline { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pitch { color: var(--fz-cream); font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview { display: inline-flex; align-items: center; gap: 6px; color: var(--fz-champagne); font-size: 12px; font-weight: 600; white-space: nowrap; }
.preview i { width: 7px; height: 7px; border-radius: 50%; background: var(--fz-green); box-shadow: 0 0 6px var(--fz-green); }
.preview .ver { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
#top nav { align-items: center; gap: 6px; }
.nav-link, .nav-btn {
  display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 8px; font-weight: 600; font-size: 13px;
  color: var(--row-text); text-decoration: none; white-space: nowrap; border: 1px solid transparent; background: none; cursor: pointer;
}
#top nav .nav-link { padding: 0 11px; }
.nav-link:hover, .nav-btn:hover { background: #121216; color: var(--text); }
.nav-btn { border-color: #26262d; }
.nav-btn[aria-expanded="true"] { border-color: var(--fz-violet); color: var(--text); }
.nav-btn .short { display: none; }
#top nav .feedback { color: #001418; background: var(--fz-cyan); box-shadow: 0 0 12px rgba(40, 225, 255, .35); }
#top nav .feedback:hover { background: #6BEBFF; color: #001418; }
.menu { color: var(--row-text); }
.menu .ic { width: 18px; height: 18px; }
.fm1-btn { background: #0c0c0f; border-color: #26262d; }
.fizz-mark { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--fz-cyan); box-shadow: 0 0 6px rgba(40, 225, 255, .6); flex: none; }
.fizz-card p { margin: 0 0 4px; color: var(--row-text); font-size: 13px; line-height: 1.45; }
#start { background: rgba(0, 0, 0, .88); border-color: #2a2a31; }
#start-btn { background: linear-gradient(135deg, var(--fz-cyan), var(--fz-blue)); color: #00131a; box-shadow: 0 0 18px rgba(40, 225, 255, .35); }
#start a { color: var(--fz-cyan); font-weight: 600; text-decoration: none; }
#start a:hover { text-decoration: underline; }
#start p.start-small { font-size: 12px; margin-top: 6px; }
.sheet { background: #0b0b0e; border-color: #23232a; }

/* Digitone sounds (js/digitone-ui.js): a panel under the header's button, and the page-wide drop target */
.dn-panel {
  position: fixed; top: calc(var(--head-h) + 6px); right: 10px; z-index: 12; width: min(420px, calc(100vw - 20px));
  max-height: calc(100vh - var(--head-h) - 20px); overflow-y: auto; background: #0b0b0e; border: 1px solid #2a2a33;
  border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .7), 0 0 0 1px rgba(150, 100, 255, .12); padding: 12px 14px 14px;
}
.dn-panel[hidden] { display: none; }
.dn-head { display: flex; align-items: center; justify-content: space-between; }
.dn-head b { font-size: 15px; color: var(--fz-violet); letter-spacing: .02em; }
.dn-lead { margin: 6px 0 10px; color: var(--row-text); font-size: 13px; line-height: 1.45; }
.dn-pick { display: flex; align-items: center; gap: 10px; }
.dn-pick .pill { padding: 0 14px; }
.dn-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.dn-item { border: 1px solid #23232a; border-radius: 10px; padding: 8px 6px 8px 10px; }
.dn-item.sent { border-color: rgba(31, 212, 126, .5); }
.dn-item.failed, .dn-item.bad { border-color: rgba(255, 52, 72, .45); }
.dn-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dn-top b { font-size: 14px; color: var(--fz-cream); white-space: nowrap; }
.dn-file { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-res { font-size: 12px; color: var(--fz-green); white-space: nowrap; }
.dn-item.failed .dn-res { color: var(--fz-orange); white-space: normal; }
.dn-x { width: 24px; height: 24px; flex: none; margin-left: auto; }
.dn-x .ic { width: 12px; height: 12px; }
.dn-err { color: #FF6464; font-size: 12px; margin-top: 2px; }
.dn-notes { margin-top: 4px; font-size: 12px; color: var(--muted); }
.dn-notes summary { cursor: pointer; color: var(--fz-yellow); }
.dn-notes ul { margin: 4px 0 0; padding-left: 18px; }
.dn-notes li { margin: 2px 0; }
.dn-empty { text-align: center; padding: 8px 0; }
.dn-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 10px; }
.dn-row .row-label { font-size: 14px; }
.dn-panel .seg button.on { background: #2b1f4a; }
.dn-send { width: 100%; height: 38px; font-size: 14px; background: var(--fz-violet) !important; color: #fff !important; }
.dn-foot { margin-top: 8px; }
.dn-drop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(0, 0, 0, .72); pointer-events: none; }
.dn-drop[hidden] { display: none; }
.dn-drop div { display: grid; gap: 6px; text-align: center; padding: 34px 48px; border: 2px dashed var(--fz-violet); border-radius: 18px; color: var(--muted); }
.dn-drop b { font-size: 22px; color: var(--fz-cream); }

/* ---- small screens */
@media (max-width: 1100px) { .pitch { display: none; } }
@media (max-width: 900px) { #status { display: none; } .nav-btn .long { display: none; } .nav-btn .short { display: inline; } }
@media (max-width: 640px) {
  #top { gap: 6px; padding: 0 6px; }
  .tagline .ver { display: none; }
  .wordmark { font-size: 20px; }
  .bubbles { width: 24px; height: 24px; }
  #top nav { gap: 2px; }
  #top nav .nav-link, .nav-btn { padding: 0 8px; }
  .fm1-btn { padding: 0 9px; gap: 6px; }
  .fm1-btn .fm1-label { display: none; }
  .fm1-btn .fm1-short { display: inline; }
}
@media (max-width: 480px) {
  .preview { white-space: normal; font-size: 11px; line-height: 1.15; }
  #dn-btn, .logo .bubbles { display: none; }
  #top nav .nav-link { padding: 0 7px; }
  .menu { width: 26px; }
}
@media (max-width: 430px) {
  .sheet { top: 0; right: 0; bottom: 0; width: 100vw !important; border-radius: 0; border: 0; }
}
/* a phone on its side: the FM-1 takes the whole height; the settings are behind the corner button */
@media (max-height: 500px) and (orientation: landscape) {
  #top { display: none; }
  #stage { height: 100%; }
}
@media (prefers-reduced-motion: reduce) { .sheet, .scrim, #corner, .toast { transition: none; } .fm1-dot.busy.live, .bubbles circle { animation: none !important; } }
.dn-who { margin: 8px 0 0; color: var(--fz-green); font-weight: 600; min-height: 1em; }
.dn-row .select { max-width: 150px; }
/* a newer deploy than this page (main.js checkUpdate): a note at the top of the stage */
.update {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px;
  background: #0b0b0e; border: 1px solid var(--fz-cyan); border-radius: 12px; padding: 8px 8px 8px 14px; color: var(--text);
  font-size: 13.5px; font-weight: 600; box-shadow: 0 0 18px rgba(40, 225, 255, .25), 0 8px 28px rgba(0, 0, 0, .6); max-width: calc(100% - 24px);
}
.update[hidden] { display: none; }
.update .pill { padding: 0 12px; flex: none; }
.dn-mark { margin-top: 2px; font-size: 12px; color: var(--muted); }
.dn-chip { flex: none; padding: 0 5px; border-radius: 5px; border: 1px solid var(--fz-cyan); color: var(--fz-cyan); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; line-height: 16px; }
.dn-tag { flex: none; padding: 0 5px; border-radius: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; line-height: 16px; color: #000; background: var(--fz-cream); }
.dn-tag[data-tag="BASS"] { background: var(--fz-blue); color: #fff; }
.dn-tag[data-tag="KEYS"] { background: var(--fz-cream); }
.dn-tag[data-tag="PLUCK"] { background: var(--fz-yellow); }
.dn-tag[data-tag="PAD"] { background: var(--fz-violet); color: #fff; }
.dn-tag[data-tag="LEAD"] { background: var(--fz-green); }
.dn-tag[data-tag="DRUMS"] { background: var(--fz-orange); }
.dn-tag[data-tag="FX"] { background: var(--fz-pink); color: #fff; }
/* FIZZ's live labels on the drawn panel (js/labels-ui.js): placed by the panel's geometry, sized with it */
.labels { position: absolute; pointer-events: none; overflow: hidden; z-index: 1; }
.labels[hidden] { display: none; }
.lbl { position: absolute; display: flex; align-items: center; justify-content: center; gap: .35em; text-align: center;
  font-weight: 700; line-height: 1.05; letter-spacing: .02em; white-space: nowrap; transition: color .25s, text-shadow .25s; }
.lbl .t { overflow: hidden; text-overflow: ellipsis; }
.lbl.knob { color: var(--lbl-plate, #b8b8c0); align-items: flex-start; }
.lbl.btn, .lbl.key { white-space: normal; overflow-wrap: normal; word-break: keep-all; }
.lbl.btn { color: var(--lbl-cap, #e8e8ec); padding: 0 .2em; }
.lbl.btn.long .t { font-size: .8em; }
.lbl.key { color: var(--lbl-key, #c8c8d0); align-items: flex-start; padding: 0 .15em; }
.lbl.key.long .t { font-size: .88em; }
.lbl.none { visibility: hidden; }
.lbl kbd { display: none; font-size: .8em; padding: 0 .3em; border-radius: 3px; line-height: 1.3; background: rgba(0,0,0,.75);
  color: var(--fz-champagne); border: 1px solid #3a3a44; font-weight: 700; flex: none; }
.lbl.hover kbd { display: inline-block; }
.lbl.hover { overflow: visible; z-index: 2; }
.lbl.glow { color: var(--fz-cyan) !important; text-shadow: 0 0 6px rgba(40, 225, 255, .9); animation: lbl-pop .7s ease-out; }
@keyframes lbl-pop { 0% { transform: scale(1.12); } 100% { transform: scale(1); } }
.labels.no-knobs .lbl.knob, .labels.no-btns .lbl.btn, .labels.no-keys .lbl.key { display: none; }
@media (prefers-reduced-motion: reduce) { .lbl.glow { animation: none; } }
/* My presets (js/library-ui.js) */
.dn-row[hidden] { display: none; }
.dn-item.dup { border-color: rgba(255, 210, 63, .5); }
.dn-item.dup .dn-res, .dn-item.skipped .dn-res { color: var(--fz-yellow); }
.lib-acts { display: flex; align-items: center; gap: 6px; }
.lib-acts .pill { height: 28px; padding: 0 10px; }
.lib-all { display: flex; align-items: center; gap: 8px; margin: 4px 0 0 10px; color: var(--muted); font-size: 13px; cursor: pointer; }
.lib-item .dn-top { cursor: pointer; }
.lib-item.on { border-color: rgba(40, 225, 255, .5); }
.lib-slot { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; }
.lib-mark { color: var(--fz-yellow); font-size: 13px; }
.lib-panel .dn-row .text { width: 100%; }
@media (max-width: 480px) { #lib-btn { display: none; } }
/* Digitone export (js/dnexport.js): experimental */
.dnx-exp { font-size: 9px; font-weight: 800; letter-spacing: .04em; color: var(--fz-orange); margin-left: 3px; text-transform: uppercase; }
.dnx-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dnx-btns .pill { padding: 0 10px; }
.dnx-review { margin-top: 10px; border: 1px solid rgba(255, 106, 44, .5); border-radius: 10px; padding: 10px 12px; }
.dnx-warn { margin: 0 0 6px; font-size: 12.5px; color: var(--row-text); }
.dnx-warn b { color: var(--fz-orange); }
.dnx-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.dnx-review .pill.primary { background: var(--fz-orange) !important; color: #120600 !important; overflow: hidden; text-overflow: ellipsis; }
.dnx-file { margin: 0 0 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.lib-pool { flex: none; padding: 0 4px; border-radius: 4px; border: 1px solid var(--fz-lime, #b5e853); color: #b5e853; font-size: 9.5px; font-weight: 800; line-height: 14px; }

/* ---- the recorder: from RemoteFM1 web/site/css/site.css (ad408fa) */
.rec { display: flex; align-items: center; gap: 6px; flex: none; }
.rec[hidden] { display: none; }
.rec-btn {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; cursor: pointer; padding: 0;
  background: var(--raised); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.rec-btn:hover:not(:disabled) { background: var(--raised-hover); border-color: rgba(255,100,100,.45); }
.rec-btn:focus-visible, .takes-btn:focus-visible, .take-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.rec-btn:disabled { cursor: progress; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red-fill); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); transition: border-radius .15s, transform .15s; }
.rec-btn.on { border-color: rgba(255,100,100,.6); background: rgba(255,100,100,.12); }
.rec-btn.on .rec-dot { background: var(--red); animation: rec-pulse 1.2s ease-in-out infinite; }
.rec-btn.count .rec-dot { background: var(--amber); animation: rec-pulse .5s ease-in-out infinite; }
@keyframes rec-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,100,100,.55); } 50% { box-shadow: 0 0 0 5px rgba(255,100,100,0); transform: scale(.82); } }
.rec-time { font: 700 13px/1 "Inter Tight", sans-serif; font-variant-numeric: tabular-nums; color: var(--red); min-width: 32px; }
.rec-time.count { color: var(--amber); min-width: 18px; }
.rec-time[hidden], .rec-meter[hidden], .takes-btn[hidden] { display: none; }
.rec-meter { display: grid; gap: 2px; width: 40px; flex: none; }
.rec-meter i { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--green) 0 var(--lvl, 0%), var(--switch-off) var(--lvl, 0%) 100%); }
.rec-meter i.hot { background: linear-gradient(90deg, var(--amber) 0 var(--lvl, 0%), var(--switch-off) var(--lvl, 0%) 100%); }
.rec-meter i.clip { background: var(--red); }
.takes-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px 0 10px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  background: var(--raised); border: 1px solid var(--line); color: var(--row-text); font-weight: 600; font-size: 13px;
}
.takes-btn:hover { background: var(--raised-hover); color: var(--text); }
.takes-btn[aria-expanded="true"] { border-color: rgba(255,100,100,.45); }
.takes-btn b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red-fill); color: #fff; font-size: 11px; display: grid; place-items: center; }
.takes-pop {
  position: fixed; z-index: 12; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.55); padding: 6px 0 4px; max-height: min(70vh, 520px); display: flex; flex-direction: column;
}
.takes-pop[hidden] { display: none; }
.takes-head { display: flex; align-items: center; gap: 8px; padding: 2px 6px 6px 14px; border-bottom: 1px solid var(--divider); }
.takes-head b { font-size: 14px; }
.takes-sub { color: var(--muted); font-size: 12px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.takes-list { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; }
.take { padding: 9px 12px 10px 10px; border-bottom: 1px solid var(--divider); }
.take:last-child { border-bottom: 0; }
.take-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.take-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.take-name-in { height: 28px; font-size: 13px; }
.take-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 3px 0 8px 38px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.take-clips { color: var(--amber); }
.take-saved { color: var(--green); }
.take-acts { display: flex; gap: 6px; margin-left: 38px; }
.take-btn { cursor: pointer; }
.take-btn svg { width: 14px; height: 14px; flex: none; }
.take-btn.pill { height: 28px; padding: 0 10px; gap: 5px; font-size: 12.5px; }
.take-btn.ghost { margin-left: auto; width: 30px; height: 30px; border: 0; background: none; color: var(--knob-off); border-radius: 8px; display: grid; place-items: center; }
.take-btn.ghost:hover { background: var(--raised); color: var(--text); }
.take-btn.play { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; padding: 0;
  background: var(--raised); border: 1px solid var(--line); color: var(--text); }
.take-btn.play:hover { background: var(--raised-hover); }
.take.playing .take-btn.play { background: var(--red-fill); border-color: transparent; color: #fff; }
.takes-pop .pill.primary { background: var(--red-fill); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 640px) { .rec { gap: 4px; } .takes-btn { padding: 0 6px; } .takes-btn .takes-label { display: none; } .rec-meter { width: 24px; } }
@media (prefers-reduced-motion: reduce) { .rec-btn .rec-dot { animation: none !important; } }

@media (max-width: 640px) { #top nav a.nav-link[href="install/"] { display: none; } }   /* (narrow: a phone cannot install; the Manager link takes its room) */
@media (max-width: 420px) { #top nav a.nav-link[href="guide.html"] { display: none; } }   /* (the guide stays linked under the panel) */
@media (max-width: 900px) { #top nav a.nav-link[href="midi.html"] { display: none; } }   /* (MIDI too: under the panel) */
