/* SPDX-License-Identifier: GPL-3.0-only */
/* FIZZ Manager (docs/WEB-MANAGER-PLAN.md §8, mockups/fizz-web-manager.html): black and neon, Inter Tight (OFL 1.1),
   FIZZ's tag colours, one subject a tab, big values. Nothing under 12 px. */
@font-face { font-family: "Inter Tight"; src: url("../fonts/InterTight-VF-latin.woff") format("woff"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #000; --panel: #0b0b0e; --raised: #131318; --line: #22222a; --text: #ECECEF; --body: #C9C9D1; --muted: #8D8D96;
  --cyan: #28E1FF; --blue: #3F7DFF; --green: #1FD47E; --cream: #F1F0EA; --orange: #FF6A2C; --pink: #FF3CA0;
  --yellow: #FFD23F; --violet: #9664FF; --magenta: #F03CFF; --champagne: #F3D9A4; --red: #FF6464;
  /* the knobs' colours (core/ui/ui.h UI_K1..UI_K4, UI_KALG): the operators C A B1 B2 take them in order */
  --k1: #3F7DFF; --k2: #1FD47E; --k3: #F1F0EA; --k4: #FF6A2C; --kalg: #FF8FC8;
  --midi: #FF8FC8;   /* FIZZ MIDI (e): the guide's MIDI colour (the device's MIDI header is magenta too) */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--body); font: 500 15px/1.4 "Inter Tight", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
b { color: var(--text); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the top bar */
.top { height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 6; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.bub { width: 32px; height: 32px; fill: none; stroke-width: 2.4; flex: none; }
.bub circle:nth-child(1) { stroke: var(--cyan); } .bub circle:nth-child(2) { stroke: var(--pink); } .bub circle:nth-child(3) { stroke: var(--yellow); }
.word { font-size: 26px; font-weight: 800; letter-spacing: .06em; background: linear-gradient(90deg, #28E1FF, #3F7DFF 30%, #F03CFF 62%, #FF6A2C 85%, #FFD23F); -webkit-background-clip: text; background-clip: text; color: transparent; }
.crumb { color: var(--text); font-weight: 600; font-size: 17px; }
.tabs { display: flex; gap: 8px; margin-left: 28px; }
.tab { height: 40px; padding: 0 18px; border-radius: 20px; display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 14px; letter-spacing: .08em; color: var(--muted); border: 1.5px solid var(--line); background: transparent; }
.tab i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.tab[aria-selected="true"] { color: #000; background: var(--c); border-color: var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); }
.tab[aria-selected="true"] i { background: #000; }
/* the FM-1 pill: a solid tint and a whole 2 px border (a 1.5 px hairline broke up on the round ends) */
.unit { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; border: 2px solid var(--c, var(--cyan)); background: color-mix(in srgb, var(--c, var(--cyan)) 16%, var(--bg)); background-clip: padding-box; color: var(--text); font-weight: 800; font-size: 14px; letter-spacing: .04em; white-space: nowrap; }
/* the live switch (P2-B): edit / load onto the FM-1's track, on or off; its number the track it follows (the fixes:
   big, pink-ringed even when off, a ring that pulses until it is first used, a nudge when an edit needs it) */
.livesw { margin-left: auto; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 7px 0 10px; border-radius: 999px; border: 2px solid color-mix(in srgb, var(--pink) 45%, var(--line)); background: color-mix(in srgb, var(--pink) 5%, transparent); color: var(--text); font-weight: 800; font-size: 14px; letter-spacing: .1em; white-space: nowrap; }
.livesw b { min-width: 32px; height: 32px; padding: 0 6px; border-radius: 16px; display: grid; place-items: center; background: #24242b; color: var(--text); font-size: 18px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.livesw.on b { background: #fff; color: var(--pink); }
.livesw.hint { animation: hintring 1.6s ease-out infinite; }
@keyframes hintring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pink) 70%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
.nudge { animation: nudge .55s cubic-bezier(.3, .7, .4, 1); border-color: var(--yellow) !important; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.livesw .sw { width: 34px; height: 20px; border-radius: 10px; background: #24242b; position: relative; flex: none; transition: background .2s; }
.livesw .sw i { position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: left .2s, background .2s; }
.livesw.on { border-color: var(--pink); color: var(--text); background: color-mix(in srgb, var(--pink) 14%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--pink) 30%, transparent); }
.livesw.on .sw { background: var(--pink); }
.livesw.on .sw i { left: 17px; background: #fff; }
.livesw:not([hidden]) + .refresh { margin-left: 0; }
.loadbar { display: flex; align-items: center; gap: 12px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--pink) 12%, var(--bg)); color: var(--text); font-weight: 800; flex-wrap: wrap; position: sticky; top: 64px; z-index: 5; }
.loadbar b { font-size: 18px; letter-spacing: .03em; margin-right: auto; }
.loadbar .arr { color: var(--pink); font-size: 20px; }
.loadbar .lbt { height: 34px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--pink); background: var(--pink); color: #fff; font-weight: 800; letter-spacing: .06em; display: inline-flex; align-items: center; }
.refresh { margin-left: auto; width: 40px; height: 40px; border-radius: 999px; border: 2px solid var(--line); }
.refresh[hidden] + .unit { margin-left: auto; }
.refresh svg { width: 20px; height: 20px; stroke: var(--text); }
.refresh:not(:disabled):hover { border-color: var(--green); }
.refresh.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.unit .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--cyan)); box-shadow: 0 0 8px var(--c, var(--cyan)); flex: none; }
.unit small { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: 0; }
.unit[data-state="on"] { --c: var(--green); cursor: default; }
.unit[data-state="off"] { --c: var(--cyan); background: var(--cyan); background-clip: border-box; color: #000; box-shadow: 0 0 18px color-mix(in srgb, var(--cyan) 40%, transparent); }
.unit[data-state="off"] .dot { background: #000; box-shadow: none; }
.unit[data-state="look"] { --c: var(--yellow); }
.unit[data-state="look"] .dot { animation: blink .8s infinite alternate; }
.unit[data-state="bad"] { --c: var(--red); }
@keyframes blink { to { opacity: .2; } }

.say { margin: 0; padding: 0 24px; min-height: 0; color: var(--text); font-weight: 700; font-size: 15px; }
.say:not(:empty) { padding: 12px 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--c, var(--cyan)) 10%, var(--bg)); }
.say a { color: var(--cyan); }

/* ---- the body, cards */
.body { display: flex; gap: 20px; padding: 22px 24px; min-height: calc(100vh - 64px); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; position: relative; display: flex; flex-direction: column; min-width: 0; }
.h { font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--muted); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.h .n { color: var(--text); letter-spacing: 0; font-size: 15px; }
.big { font-size: 44px; font-weight: 800; color: var(--text); line-height: 1.05; letter-spacing: -.01em; overflow-wrap: anywhere; }
.big.dim { color: #3a3a44; }
.btn { height: 52px; padding: 0 28px; border-radius: 26px; font-weight: 800; font-size: 16px; letter-spacing: .08em; border: 0; color: #000; background: var(--c, var(--cyan)); display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 0 22px color-mix(in srgb, var(--c, var(--cyan)) 40%, transparent); white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; }
.btn.small { height: 38px; padding: 0 18px; font-size: 13px; border-radius: 19px; }
.btn.huge { height: 64px; font-size: 19px; padding: 0 40px; border-radius: 32px; }
.btn.danger { --c: var(--red); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn:not(:disabled):active { transform: translateY(1px); }
.icon { width: 38px; height: 38px; border-radius: 19px; border: 1.5px solid var(--line); background: transparent; display: grid; place-items: center; flex: none; padding: 0; }
.icon svg { width: 18px; height: 18px; fill: none; stroke: var(--body); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.row { display: flex; gap: 10px; align-items: center; }
.kv { font-size: 13px; font-weight: 600; color: var(--muted); }
.kv b { font-size: 30px; font-weight: 800; display: block; line-height: 1.1; }

/* ---- BACKUP */
#tab-backup .this { width: 560px; flex: none; gap: 22px; }
#tab-backup .list { flex: 1; }
.stats { display: flex; gap: 28px; }
.meter { height: 26px; border-radius: 13px; background: #15151a; display: flex; overflow: hidden; border: 1px solid var(--line); }
.meter span { display: block; height: 100%; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.legend { display: flex; gap: 18px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .r { margin-left: auto; }
.actions { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.speed { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--muted); }
.speed b { font-size: 15px; }
.bk { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--raised); border: 1.5px solid var(--line); margin-bottom: 10px; --c: var(--yellow); animation: slidein .35s cubic-bezier(.2, .8, .2, 1) both; }
.bk .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1.5px solid var(--c); flex: none; }
.bk .ic svg { width: 22px; height: 22px; fill: none; stroke: var(--c); stroke-width: 2.2; }
.bk .txt { min-width: 0; flex: 1; }
.bk .when { color: var(--text); font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk .what { color: var(--muted); font-size: 13px; font-weight: 600; }
.bk .ver { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; border: 1.5px solid var(--line); color: var(--body); white-space: nowrap; }
.bk .ver.old { border-color: var(--orange); color: var(--orange); }
.bk.old { --c: var(--orange); } .bk.presets { --c: var(--cream); } .bk.safety { --c: var(--cyan); }
@keyframes slidein { from { opacity: 0; transform: translateY(-10px); } }
.h .use { margin-left: auto; color: var(--text); letter-spacing: 0; font-size: 15px; font-weight: 800; }
.h .use small { color: var(--muted); font-size: 13px; font-weight: 600; margin-left: 6px; }
.bk .icon.saved { border-color: var(--green); }
.bk .icon.saved svg { stroke: var(--green); }
.bk .icon.unsaved { border-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 14%, transparent); }
.bk .icon.unsaved svg { stroke: var(--yellow); }
/* ▶: the backup in the browser's FIZZ (the player opens with it) */
.bk .icon.play { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--cyan); box-shadow: 0 0 16px color-mix(in srgb, var(--cyan) 45%, transparent); }
.bk .icon.play svg { width: 16px; height: 16px; fill: #000; stroke: none; margin-left: 3px; }
.baks { overflow-y: auto; min-height: 0; flex: 1; margin-bottom: 14px; }
.drop { border: 2px dashed #34343d; border-radius: 16px; min-height: 92px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-weight: 700; font-size: 15px; cursor: pointer; transition: border-color .2s, background .2s; }
.drop svg { width: 26px; height: 26px; fill: none; stroke: var(--muted); stroke-width: 2.2; }
.drop.over { border-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 8%, transparent); color: var(--yellow); }

/* ---- LIBRARY */
#tab-library .lib { width: 470px; flex: none; padding-bottom: 12px; }
#tab-library .sel { flex: 1; gap: 18px; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 800; letter-spacing: .05em; color: #000; border: 0; white-space: nowrap; }
.t-BASS { background: var(--blue); color: #fff; } .t-KEYS { background: var(--cream); } .t-PLUCK { background: var(--yellow); }
.t-PAD { background: var(--violet); color: #fff; } .t-LEAD { background: var(--green); } .t-DRUMS { background: var(--orange); } .t-FX { background: var(--pink); color: #fff; }
.tag.off { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
.tag.web { background: transparent; color: var(--champagne); border: 1.5px dashed color-mix(in srgb, var(--champagne) 60%, transparent); }
.tags .tag { height: 34px; padding: 0 14px; font-size: 14px; }
button.tag { cursor: pointer; }
.tagin { height: 34px; width: 150px; border-radius: 6px; border: 1.5px dashed var(--champagne); background: transparent; color: var(--champagne); font: 800 14px "Inter Tight"; letter-spacing: .05em; padding: 0 10px; text-transform: uppercase; }
.cases { overflow-y: auto; min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.cas { height: 56px; flex: none; border-radius: 10px; background: var(--raised); border: 1.5px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 12px; position: relative; text-align: left; width: 100%; color: inherit; }
.cas .algo { width: 30px; height: 30px; flex: none; }
.cas .nm { color: var(--text); font-weight: 700; font-size: 15px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cas .sl { font-size: 13px; font-weight: 700; color: var(--muted); width: 28px; flex: none; text-align: right; }
.cas .stripe { position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 2px; background: var(--c); }
.cas[aria-pressed="true"] { border-color: var(--cyan); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cyan) 35%, transparent), 0 0 20px color-mix(in srgb, var(--cyan) 30%, transparent); }
.cas .mark { margin-left: auto; display: flex; gap: 5px; align-items: center; flex: none; }
.cas .imp { color: var(--champagne); font-weight: 800; font-size: 15px; }
/* the filters: where they live, then the tags */
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.filters .chips { margin: 0; }
.srcseg { --c: var(--cream); align-self: flex-start; }
.srcseg button { height: 34px; }
.fbar { display: flex; gap: 8px; flex-wrap: wrap; }
.fbar .seg { margin: 0; }
.poolseg { --c: var(--green); }
.poolseg button { height: 34px; display: inline-flex; align-items: center; gap: 6px; }
.poolseg svg { width: 12px; height: 12px; fill: var(--green); }
.poolseg button.on svg { fill: #000; }
.grp { flex: none; display: flex; align-items: center; gap: 8px; margin: 8px 2px 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
.grp:first-child { margin-top: 0; }
.grp span { color: var(--text); letter-spacing: 0; font-size: 13px; }
.grp::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }
/* in the pool: a green ring and the place's badge (the POOL grid's tile, its number) */
.cas.inpool { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: color-mix(in srgb, var(--green) 7%, var(--raised)); }
.cas.inpool[aria-pressed="true"] { border-color: var(--cyan); box-shadow: inset 0 0 0 1px var(--green), 0 0 0 2px color-mix(in srgb, var(--cyan) 35%, transparent), 0 0 20px color-mix(in srgb, var(--cyan) 30%, transparent); }
.pbadge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px 0 6px; border-radius: 8px; background: var(--green); color: #000; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pbadge svg { width: 12px; height: 12px; fill: #000; flex: none; }
.pbadge small { font-size: 12px; font-weight: 800; opacity: .7; }
.pbadge.big { height: 40px; padding: 0 14px 0 10px; border-radius: 12px; font-size: 20px; gap: 8px; }
.pbadge.big svg { width: 17px; height: 17px; }
.btn.pooltog { height: 56px; padding: 0 30px; font-size: 18px; border-radius: 28px; --c: var(--green); }
.btn.pooltog.out { background: transparent; color: var(--green); border: 2px solid var(--green); box-shadow: none; }
.selhead { display: flex; gap: 16px; align-items: center; }
.btn.exall { --c: var(--cream); margin-left: auto; letter-spacing: .08em; }
.btn.exall svg { width: 16px; height: 16px; }
.btn.exall.spin svg { animation: blink .5s infinite alternate; }
.selgo { gap: 12px; flex-wrap: wrap; }
.selgo .btn { flex: 0 0 auto; }
.btn.onunit { --c: var(--green); }
.btn.onunit.on { animation: pulse-g 1s ease-in-out infinite alternate; }
@keyframes pulse-g { to { box-shadow: 0 0 34px color-mix(in srgb, var(--green) 75%, transparent); } }
.okeys { display: inline-flex; gap: 6px; }
.okeys i { font-style: normal; height: 30px; padding: 0 8px; border-radius: 7px; background: #000; display: inline-grid; place-items: center; font-size: 13px; letter-spacing: .04em; }
.okeys .no { color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.okeys .yes { color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.selhead .algo { width: 64px; height: 64px; flex: none; }
.selhead .big { font-size: 40px; }
.empty { flex: 1; display: grid; place-items: center; }
.empty svg { width: 160px; height: 120px; fill: none; stroke-width: 3; }

/* ---- LIBRARY, editing (Phase 1) */
.bigname { font: 800 40px/1.05 "Inter Tight", system-ui, sans-serif; color: var(--text); background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 0; width: 100%; letter-spacing: -.01em; text-transform: uppercase; caret-color: var(--cyan); }
.bigname:hover { border-bottom-color: var(--line); }
.bigname:focus { outline: none; border-bottom-color: var(--cyan); }
.tags button.tag { transition: transform .12s, background .2s; }
.tags button.tag:not(:disabled):active { transform: scale(.94); }
.uchip { height: 40px; padding: 0 16px; border-radius: 12px; background: color-mix(in srgb, var(--green) 16%, transparent); border: 1.5px solid var(--green); display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; }
.dots { color: var(--green); letter-spacing: 1px; }
.pchip.ghost { color: var(--muted); background: transparent; }
.selacts { margin-top: auto; gap: 10px; flex-wrap: wrap; }
.btn.redline { color: var(--red); border-color: color-mix(in srgb, var(--red) 50%, transparent); }
.btn.danger { color: #000; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { box-shadow: 0 0 34px color-mix(in srgb, var(--red) 70%, transparent); } }
.cas[draggable="true"] { cursor: grab; }
.cas.lift, .ps.lift { opacity: .3; }
.cas.target { border-color: var(--yellow); box-shadow: 0 0 0 2px color-mix(in srgb, var(--yellow) 40%, transparent), 0 0 18px color-mix(in srgb, var(--yellow) 35%, transparent); }

/* ---- POOL */
#tab-pool .poolcard { flex: 1; gap: 14px; }
#tab-pool .pmine { width: 370px; flex: none; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 22px; overflow: hidden; flex-wrap: wrap; }
.seg button { height: 36px; padding: 0 14px; border: 0; background: transparent; font-weight: 800; font-size: 13px; letter-spacing: .07em; color: var(--muted); }
.seg button.on { background: var(--c, var(--green)); color: #000; }
.seg.proj { --c: var(--green); margin-left: 6px; }
.seg button.arm { background: var(--yellow); color: #000; animation: pulse-y .8s ease-in-out infinite alternate; }
@keyframes pulse-y { to { box-shadow: inset 0 0 0 2px #000; } }
.pool { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 6px; }
.pool.off { opacity: .45; pointer-events: none; }
.ps { height: 62px; border-radius: 9px; background: #101014; border: 1.5px solid #1c1c22; position: relative; padding: 6px 4px 0 5px; overflow: hidden; text-align: left; display: block; min-width: 0; color: inherit; transition: border-color .15s, transform .15s; }
.ps .no { display: block; font-size: 12px; font-weight: 800; color: #5d5d66; }
.ps .pn { display: block; font-size: 12px; font-weight: 800; color: var(--t, #000); line-height: 1.12; margin-top: 2px; overflow: hidden; max-height: 27px; letter-spacing: -.02em; overflow-wrap: normal; word-break: keep-all; }
.cas.moved { animation: moved .6s cubic-bezier(.2, .8, .2, 1); }
@keyframes moved { from { transform: translateX(-14px); box-shadow: 0 0 0 2px var(--yellow); } }
.ps.full { background: var(--c); border-color: var(--c); cursor: grab; }
.ps.full .no { color: color-mix(in srgb, var(--t, #000) 55%, transparent); }
.ps .use { position: absolute; right: 5px; bottom: 5px; display: flex; gap: 2px; }
.ps .use i { width: 5px; height: 5px; border-radius: 50%; background: color-mix(in srgb, var(--t, #000) 60%, transparent); }
.ps.sel { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--cyan); }
.ps.target, .pool.picking .ps:hover { border: 2px solid var(--yellow); box-shadow: 0 0 16px color-mix(in srgb, var(--yellow) 40%, transparent); }
.ps.target:not(.full), .pool.picking .ps:not(.full):hover { background: color-mix(in srgb, var(--yellow) 14%, #101014); }
.ps.fizz { animation: fizz 1s ease-out; }
.ps.fizz::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 80%, #fff8 0 3px, transparent 4px), radial-gradient(circle at 70% 60%, #fff8 0 2px, transparent 3px), radial-gradient(circle at 50% 90%, #fff8 0 4px, transparent 5px); animation: bubbles 1s ease-out forwards; }
@keyframes fizz { 0% { transform: scale(.8); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes bubbles { from { transform: translateY(10px); opacity: 1; } to { transform: translateY(-30px); opacity: 0; } }
.pbar { margin-top: auto; gap: 10px; flex-wrap: wrap; }
.legdot { color: var(--muted); font-size: 13px; }
.selname { margin: 0 auto 0 14px; color: var(--text); font-weight: 800; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selname b { color: var(--cyan); margin-right: 6px; }

/* ---- IMPORT */
.body.col { flex-direction: column; gap: 16px; }
.dz { min-height: 130px; border-radius: 18px; border: 2px dashed var(--violet); background: color-mix(in srgb, var(--violet) 8%, transparent); display: flex; align-items: center; gap: 22px; padding: 16px 28px; flex-wrap: wrap; transition: background .2s; }
.dz.over { background: color-mix(in srgb, var(--violet) 22%, transparent); }
.dz .files { display: flex; gap: 10px; cursor: pointer; }
.ft { width: 64px; height: 78px; border-radius: 10px; border: 2px solid var(--c); display: flex; flex-direction: column; justify-content: flex-end; padding: 6px; font-size: 12px; font-weight: 800; color: var(--c); transition: transform .15s; }
.dz .files:hover .ft { transform: translateY(-3px); }
.ft small { font-size: 12px; opacity: .8; font-weight: 700; }
.dz .big { font-size: 34px; }
.dest { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.dest .seg button { height: 42px; padding: 0 18px; }
.select { height: 42px; border-radius: 21px; border: 1.5px solid var(--line); background: #000; color: var(--text); font: 800 14px "Inter Tight"; padding: 0 14px; }
.ilist { flex: 1; padding: 16px; }
.irows { flex: 1; overflow-y: auto; min-height: 0; }
.ir { display: grid; grid-template-columns: 34px 58px minmax(0, 1fr) 230px 220px 140px; align-items: center; gap: 14px; min-height: 60px; padding: 0 14px; border-radius: 12px; background: var(--raised); border: 1.5px solid var(--line); margin-bottom: 8px; }
.ir[data-k] { cursor: pointer; }
.ir.cur { border-color: var(--violet); background: color-mix(in srgb, var(--violet) 14%, var(--raised)); box-shadow: 0 0 16px color-mix(in srgb, var(--violet) 30%, transparent); }
.ir .src { font-size: 12px; font-weight: 800; padding: 3px 0; border-radius: 6px; text-align: center; color: #000; }
.ir .src.dn1 { background: var(--cyan); } .ir .src.dn2 { background: var(--magenta); } .ir .src.fz { background: var(--cream); }
.ir .nm { color: var(--text); font-weight: 800; font-size: 17px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ir .note { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ir .note.lost { color: var(--champagne); } .ir .note.bad { color: var(--red); } .ir .note.dup { color: var(--yellow); }
.ir .tg { display: flex; gap: 5px; flex-wrap: wrap; }
.ir.no { opacity: .45; } .ir.off { opacity: .6; }
.ir .okmark { color: var(--green); font-weight: 800; font-size: 14px; }
.fid { display: flex; gap: 3px; }
.fid i { flex: 1; height: 14px; border-radius: 3px; background: #24242b; transition: background .3s; }
.chk { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--violet); display: grid; place-items: center; background: transparent; padding: 0; }
.chk.on { background: var(--violet); }
.chk svg { width: 12px; height: 12px; fill: none; stroke: #000; stroke-width: 2.4; }
.ifoot { margin-top: 14px; gap: 12px; }

/* ---- the progress screen and the restore */
.scrim { position: fixed; inset: 64px 0 0 0; background: rgba(0, 0, 0, .78); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; gap: 40px; z-index: 5; padding: 20px 16px; overflow-y: auto; flex-wrap: wrap; }
.scrim.solid { background: var(--bg); flex-direction: column; gap: 30px; }
.pct { font-size: 120px; color: var(--yellow); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pct small { font-size: 60px; }
.pct.write { color: var(--orange); }
.sectors { width: min(880px, 100%); display: flex; gap: 4px; }
.sectors i { flex: 1; min-width: 1px; height: 34px; border-radius: 6px; background: #18181d; transition: background .25s; }
.sectors i.gap { flex: .5; background: transparent; }
.sectors i.lib { background: var(--cream); } .sectors i.prj { background: var(--green); }
.sectors i.now { box-shadow: 0 0 0 2px var(--yellow), 0 0 14px var(--yellow); background: color-mix(in srgb, var(--yellow) 30%, #18181d); }
.sectors.write i.lib, .sectors.write i.prj { background: var(--orange); }
.plabel { font-size: 15px; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
.plabel.warn { color: var(--orange); }
.risers { width: 220px; height: 120px; fill: none; stroke-width: 3; overflow: visible; }
.risers circle { animation: rise 2.6s ease-in infinite; transform-box: fill-box; }
.risers circle:nth-child(2) { animation-delay: -.7s; } .risers circle:nth-child(3) { animation-delay: -1.3s; } .risers circle:nth-child(4) { animation-delay: -1.9s; } .risers circle:nth-child(5) { animation-delay: -.3s; }
@keyframes rise { 0% { transform: translateY(30px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
.modal { width: 560px; max-width: 100%; background: var(--panel); border: 1.5px solid var(--c, var(--yellow)); border-radius: 22px; padding: 26px; box-shadow: 0 0 40px color-mix(in srgb, var(--c, var(--yellow)) 25%, transparent); }
.modal .h { color: var(--c, var(--yellow)); }
.diff { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 10px; align-items: center; margin: 14px 0 18px; }
.diff .col { background: var(--raised); border-radius: 14px; padding: 14px; border: 1.5px solid var(--line); min-width: 0; }
.diff .col.to { border-color: var(--c, var(--yellow)); }
.diff .col .big { font-size: 34px; }
.diff .col.to .big { color: var(--c, var(--yellow)); }
.diff .arrow { color: var(--c, var(--yellow)); font-size: 28px; font-weight: 800; text-align: center; }
.pchips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pchip { height: 34px; padding: 0 12px; border-radius: 10px; background: var(--raised); border: 1.5px solid var(--line); display: flex; align-items: center; font-weight: 800; color: var(--text); font-size: 13px; }
.delta { height: 26px; align-self: center; }
.warnbox { border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; background: color-mix(in srgb, var(--red) 12%, transparent); border: 1.5px solid color-mix(in srgb, var(--red) 55%, transparent); color: var(--text); font-weight: 700; display: flex; flex-direction: column; gap: 10px; }
.warnbox .big { font-size: 22px; color: var(--red); }
.typed { height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: #000; color: var(--text); font: 800 18px "Inter Tight"; letter-spacing: .12em; padding: 0 14px; width: 100%; text-transform: uppercase; }
.typed.ok { border-color: var(--yellow); box-shadow: 0 0 14px color-mix(in srgb, var(--yellow) 30%, transparent); }
.undo { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.undo.cleared { color: var(--orange); }
.undo.cleared::before { content: "↺ "; }
.modal.cf { display: flex; flex-direction: column; gap: 14px; width: 480px; }
.modal.cf .h { margin: 0; }
.modal.cf .big { font-size: 34px; }
.cfsub { color: var(--text); font-weight: 700; font-size: 15px; }
.modal.cf .row { margin-top: 6px; }
/* a backup of the other package, or more presets than MY PRESETS has places for: what to keep */
#rs-modal { max-height: calc(100vh - 24px); overflow-y: auto; }
.fit { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text); }
.fit .fithead b { color: var(--c, var(--yellow)); }
.fitcols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.fitlist { background: var(--raised); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.fitlist .kv { display: flex; justify-content: space-between; font-weight: 800; letter-spacing: .06em; }
.fitlist .kv b { color: var(--text); display: inline; font-size: 13px; }
.fitlist .kv b.over { color: var(--red); }
.fitrows { max-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.fitrows label { flex: none; display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.fitrows input { accent-color: var(--c, var(--yellow)); flex: none; }
.fitrows input:disabled + span { color: var(--muted); }
.fitleft { color: var(--muted); }
.fitleft b { color: var(--orange); }
@media (max-width: 560px) { .fitcols { grid-template-columns: 1fr; } }
.safe { font-size: 13px; font-weight: 700; color: var(--muted); min-height: 18px; margin-bottom: 14px; }
.safe b { color: var(--cyan); }
.fm1 { width: 340px; max-width: 100%; border-radius: 26px; background: #1c1c21; padding: 26px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.lcd { width: 240px; height: 240px; background: #000; border-radius: 6px; box-shadow: 0 0 0 10px #1a1a1f, 0 0 0 11px #2a2a31; display: block; }
.fm1 .keys { display: flex; gap: 8px; }
.fm1 .key { width: 52px; height: 34px; border-radius: 7px; background: #2b2b31; border: 1.5px solid #383840; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #6c6c75; }
.fm1 .key.lit { background: var(--red); border-color: var(--red); color: #000; box-shadow: 0 0 18px var(--red); }

/* ---- the log */
.logbox { position: fixed; right: 16px; bottom: 16px; z-index: 7; max-width: calc(100vw - 32px); }
.logbox summary { list-style: none; cursor: pointer; height: 34px; padding: 0 14px; border-radius: 17px; border: 1.5px solid var(--line); background: var(--panel); display: inline-flex; align-items: center; font-weight: 800; font-size: 12px; letter-spacing: .1em; color: var(--muted); float: right; }
.logbox summary::-webkit-details-marker { display: none; }
.logbox[open] summary { color: var(--text); }
.logbox pre { clear: both; width: 640px; max-width: 100%; max-height: 40vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 44px 0 0; font: 500 12px/1.5 ui-monospace, Menlo, monospace; color: var(--body); white-space: pre-wrap; }
.toast { pointer-events: none; position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 8; background: var(--panel); border: 1.5px solid var(--c, var(--green)); color: var(--text); font-weight: 800; padding: 14px 22px; border-radius: 16px; box-shadow: 0 0 30px color-mix(in srgb, var(--c, var(--green)) 25%, transparent); max-width: calc(100vw - 32px); animation: slidein .3s both; }

@media (max-width: 1380px) { .unit small { display: none; } }
/* ---- phone */
@media (max-width: 900px) {
  .top { padding: 0 16px; gap: 10px; }
  .crumb { display: none; }
  .tabs { position: fixed; top: 64px; left: 0; right: 0; margin: 0; padding: 12px 16px; background: var(--bg); z-index: 6; gap: 6px; }
  .tab { height: 36px; padding: 0 12px; font-size: 12px; }
  .unit small { display: none; }
  .livesw { padding: 0 5px 0 8px; gap: 6px; height: 42px; }
  .livesw .lw { display: none; }
  .loadbar { padding: 8px 16px; top: 124px; }
  .unit { padding: 0 14px 0 12px; }
  main { padding-top: 60px; }
  .body { flex-direction: column; padding: 12px 16px 70px; min-height: 0; }
  #tab-backup .this, #tab-library .lib { width: auto; }
  .h .use { font-size: 13px; }
  .card { padding: 16px; }
  .big { font-size: 34px; }
  .stats { gap: 20px; }
  .cases { max-height: none; overflow: visible; }
  .scrim { inset: 64px 0 0 0; }
  .pct { font-size: 84px; } .pct small { font-size: 42px; }
  .sectors { gap: 2px; } .sectors i { height: 26px; border-radius: 3px; }
  .diff .col .big { font-size: 26px; }
  .btn.huge { padding: 0 30px; }
  .bk { flex-wrap: wrap; }
  .bk .txt { flex: 1 1 calc(100% - 60px); }
  .bk .ver { margin-right: auto; }
  .baks { overflow: visible; }
  .tabs { overflow-x: auto; }
  #tab-library .sel { min-height: 420px; scroll-margin-top: 136px; }
  .bigname { font-size: 32px; }
  #tab-pool .pmine { width: auto; }
  .pool { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
  .ps { height: 54px; padding: 4px 4px 0; }
  .selname { margin: 0; flex-basis: 100%; order: -1; }
  .dz { padding: 14px 16px; gap: 14px; }
  .dest { margin-left: 0; flex-wrap: wrap; }
  .ir { grid-template-columns: 30px 52px minmax(0, 1fr); row-gap: 6px; padding: 10px 12px; }
  .ir .fid { grid-column: 2 / 4; } .ir .note { grid-column: 2 / 4; } .ir .tg { grid-column: 2 / 4; }
}
.sectors.many i { border-radius: 1px; } .sectors.many i.gap { flex: 2; }
/* a picked sound's places in the pool: ringed green, as its badge */
.ps.here { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--green); }
.ps.here.sel { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--cyan), 0 0 0 6px var(--green); }

/* ---- EDIT (Manager P2: the sound editor; the fixes: every value on one panel, a synth's front panel) */
.body.edit { gap: 20px; align-items: flex-start; }
.edcard { flex: 1; gap: 14px; min-width: 0; padding: 16px; }
.edhead { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
/* the track the editor follows: big, pink when live, ringed when only shown (TRACK off) */
.trkbig { width: 88px; height: 88px; border-radius: 20px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2.5px solid var(--pink); color: var(--pink); }
.trkbig small { font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.trkbig b { font-size: 50px; line-height: .95; font-weight: 800; color: inherit; }
.trkbig.live { background: var(--pink); color: #fff; box-shadow: 0 0 26px color-mix(in srgb, var(--pink) 50%, transparent); }
.trkbig.view { border-style: dashed; color: color-mix(in srgb, var(--pink) 75%, var(--text)); }
/* the track strip: SELECTED, 1..6, LIVE */
.trks { display: inline-flex; gap: 4px; padding: 3px; border-radius: 14px; border: 1.5px solid color-mix(in srgb, var(--pink) 40%, var(--line)); align-items: center; }
.trk { height: 38px; min-width: 38px; padding: 0 10px; border-radius: 11px; border: 0; background: transparent; color: var(--muted); font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; position: relative; }
.trk.sel { font-size: 12px; letter-spacing: .08em; }
.trk svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.trk.on { background: var(--pink); color: #fff; }
.trk.usel::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--yellow); }
.trk.live { font-size: 12px; letter-spacing: .1em; color: var(--text); padding: 0 12px 0 8px; margin-left: 4px; box-shadow: inset 0 0 0 1.5px var(--line); }
.trk .sw, .livesw .sw { width: 34px; height: 20px; border-radius: 10px; background: #24242b; position: relative; flex: none; transition: background .2s; }
.trk .sw i, .livesw .sw i { position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: left .2s, background .2s; }
.trk.live.on { background: color-mix(in srgb, var(--pink) 18%, transparent); box-shadow: inset 0 0 0 1.5px var(--pink); }
.trk.live.on .sw, .livesw.on .sw { background: var(--pink); }
.trk.live.on .sw i, .livesw.on .sw i { left: 17px; background: #fff; }
.edname { min-width: 0; flex: 1 1 380px; }
.edname .bigname { font-size: 38px; }
.edited { color: var(--pink); margin-left: 6px; }
.edtags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.edtags .tag.off { opacity: .7; }
.edtags .tag { height: 24px; padding: 0 7px; }
.edacts { gap: 10px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.aud { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; border-radius: 20px; background: transparent; border: 1.5px solid var(--line); color: var(--muted); font-weight: 800; font-size: 13px; letter-spacing: .06em; white-space: nowrap; }
.aud .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.aud.on { border-color: var(--c); color: var(--text); background: color-mix(in srgb, var(--c) 14%, transparent); }
.aud.on .dot { background: var(--c); box-shadow: 0 0 10px var(--c); }
.aud.live { border-color: var(--c); color: var(--text); background: color-mix(in srgb, var(--c) 16%, transparent); }
.aud.live .dot { background: var(--c); box-shadow: 0 0 10px var(--c); animation: blink .9s infinite alternate; }
.stage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; align-items: stretch; user-select: none; -webkit-user-select: none; touch-action: pan-y;
  grid-template-areas: "ops ops ops ops ops ops openv openv openv openv openv openv" "filter filter filter filter filter filter filter amp amp amp amp amp"
    "lfo lfo lfo lfo lfo lfo lfo lfo lfo drive drive drive" "mod mod mod mod mod mod mod play play play play play"; }
.pn { grid-area: var(--a); background: var(--raised); border: 1.5px solid var(--line); border-top: 3px solid var(--c); border-radius: 16px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pn-ops { --a: ops; } .pn-openv { --a: openv; } .pn-filter { --a: filter; } .pn-amp { --a: amp; } .pn-drive { --a: drive; } .pn-lfo { --a: lfo; } .pn-mod { --a: mod; } .pn-play { --a: play; }
.pnh { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--c); }
.stage .pnh svg { width: 22px; height: 20px; flex: none; fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pnb { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.sub { background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sub .cn { font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--c); }
.envc .tgs { margin-left: auto; display: inline-flex; gap: 6px; }
.bars { display: flex; flex-wrap: wrap; gap: 8px; }
.stage.locked [data-x], .stage.locked [data-y], .stage.locked [data-set], .stage.locked [data-pick] { cursor: not-allowed; }
@media (min-width: 1600px) {
  .stage { grid-template-areas: "ops ops ops ops openv openv openv openv openv play play play" "filter filter filter filter filter filter amp amp amp drive drive drive"
    "lfo lfo lfo lfo lfo lfo lfo mod mod mod mod mod"; }
}
.stage [data-x], .stage [data-y], .stage [data-pick] { touch-action: none; }
.stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.stage [data-x], .stage [data-y] { cursor: ns-resize; }
.stage [data-x]:not([data-y]) { cursor: ew-resize; }
.stage .hd { cursor: move; }
.row.wrap { flex-wrap: wrap; }
.row.center { justify-content: center; }
.pair { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.col2 { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card2 { background: var(--raised); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card2 .cn { font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--c); }
/* a value: its chip, a dial, a bar, a choice */
.vc { display: inline-flex; align-items: baseline; gap: 8px; height: 38px; padding: 0 11px; border-radius: 11px; background: var(--bg); border: 1.5px solid var(--line); font-weight: 800; white-space: nowrap; }
.vc small { font-size: 12px; letter-spacing: .08em; color: var(--muted); align-self: center; }
.vc b { color: var(--c); font-size: 18px; align-self: center; font-variant-numeric: tabular-nums; }
.vc.big b { font-size: 22px; }
.vc.pick { cursor: pointer; border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.vc.pick b::after { content: " ▾"; font-size: 12px; color: var(--muted); }
.vc:hover, .vbar:hover, .dial:hover, .opv:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--line)); }
.vc.dragging, .vbar.dragging, .dial.dragging { border-color: var(--yellow); box-shadow: 0 0 14px color-mix(in srgb, var(--yellow) 40%, transparent); }
.dial { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; width: 80px; padding: 4px 0; border-radius: 14px; border: 1.5px solid transparent; }
.dial svg { width: 62px !important; }
.dial .track { fill: none; stroke: #24242b; stroke-width: 7; stroke-linecap: round; }
.dial .fill { fill: none; stroke: var(--c); stroke-width: 7; stroke-linecap: round; }
.dial b { font-size: 20px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; margin-top: -10px; }
.dial small { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.vbar { display: inline-grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; min-width: 120px; flex: 1 1 140px; padding: 6px 10px; border-radius: 11px; background: var(--bg); border: 1.5px solid var(--line); }
.vbar small { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.vbar b { justify-self: end; color: var(--c); font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vbar i { grid-column: 1 / 3; height: 8px; border-radius: 4px; background: #1d1d23; position: relative; overflow: hidden; }
.vbar i span { position: absolute; top: 0; bottom: 0; background: var(--c); border-radius: 5px; }
.vseg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; flex-wrap: wrap; }
.vseg button { height: 36px; padding: 0 11px; border: 0; background: transparent; font-weight: 800; font-size: 13px; letter-spacing: .05em; color: var(--muted); }
.vseg button.on { background: var(--c); color: #000; }
.vseg.mach button { height: 38px; padding: 0 12px; }
.vtog { height: 34px; padding: 0 11px; border-radius: 10px; border: 1.5px solid var(--line); background: transparent; color: var(--muted); font-weight: 800; font-size: 13px; letter-spacing: .06em; }
.vtog.on { background: var(--c); border-color: var(--c); color: #000; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 35%, transparent); }
.capt { display: inline-flex; align-items: center; gap: 10px; }
.capt small { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.lfoc .vseg button { height: 32px; padding: 0 8px; font-size: 12px; }
.lfoc .vseg.waves button { padding: 0 6px; }
.vseg.waves svg { width: 22px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.vseg.waves button.on { color: #000; }
/* the drawings */
.ops { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.algosvg .bus { stroke: #3a3a44; stroke-width: 3; }
.algosvg .spk { fill: none; stroke: var(--muted); stroke-width: 3; }
.algosvg .spk.wave { stroke: var(--cream); opacity: .7; animation: blink 1s infinite alternate; }
.algosvg .carrier { stroke: var(--cream); fill: none; }
.algosvg .joint { fill: var(--cream); }
.algosvg .modl { stroke: var(--muted); stroke-width: 4; stroke-linecap: round; }
.algosvg .arrow { fill: var(--muted); }
.algosvg .spark { fill: var(--cream); }
.algosvg .fb { fill: none; stroke-width: 4; stroke-dasharray: 8 6; }
.algosvg .op circle { fill: color-mix(in srgb, var(--c) 22%, #0b0b0e); stroke: var(--c); stroke-width: 5; transition: r .15s; }
.algosvg .op text { fill: var(--c); font: 800 28px "Inter Tight", sans-serif; pointer-events: none; }
.algosvg .op.on circle, .algosvg .op.dragging circle { stroke: var(--yellow); filter: drop-shadow(0 0 8px var(--yellow)); }
.algosvg .op:focus { outline: none; }
.algosvg .op:focus-visible circle { stroke: var(--cyan); }
.algosvg .algolab { fill: var(--kalg); font: 800 18px "Inter Tight", sans-serif; letter-spacing: 2px; }
.algosvg .algonum { fill: var(--kalg); font: 800 110px "Inter Tight", sans-serif; }
.algosvg .algo { cursor: ns-resize; }
.opcards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opc { border-radius: 14px; background: var(--panel); border: 2px solid var(--c); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.opc.on { box-shadow: 0 0 18px color-mix(in srgb, var(--c) 35%, transparent); }
.opc .opn { font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--c); }
.opc .opv { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; border-radius: 10px; border: 1.5px solid transparent; padding: 2px 4px; margin: -4px; }
.opc .opv small { font-size: 16px; color: var(--muted); font-weight: 700; }
.opc .opv.dragging { border-color: var(--yellow); }
.opc .vbar { min-width: 0; padding: 6px 10px; flex: none; }
.dials { display: flex; gap: 6px; justify-content: space-around; flex-wrap: wrap; }
.env .area, .curve .area { fill: color-mix(in srgb, var(--c) 18%, transparent); stroke: none; }
.env .line, .curve .line, .wave .line, .crush .line, .glide .line { fill: none; stroke: var(--c); stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.glide .line.dim { opacity: .35; }
.env .lab, .curve .lab { fill: var(--muted); font: 800 14px "Inter Tight", sans-serif; letter-spacing: 2px; }
.curve .grid { stroke: #18181d; stroke-width: 2; }
.curve .val { fill: var(--text); font: 800 22px "Inter Tight", sans-serif; }
.curve .sub { fill: var(--k2); font: 800 15px "Inter Tight", sans-serif; }
.hd { fill: #000; stroke: var(--c); stroke-width: 4; }
.hd:hover, .hd.dragging { stroke: var(--yellow); filter: drop-shadow(0 0 6px var(--yellow)); }
.hd:focus { outline: none; } .hd:focus-visible { stroke: var(--cyan); }
.wave .axis { stroke: #24242b; stroke-width: 2; }
.wave .spark { fill: #fff; filter: drop-shadow(0 0 6px var(--c)); }
.lfos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lfoc { border: 2px solid var(--c); }
.lfoc .row:first-child { justify-content: space-between; }
.lfoc .vc { height: 36px; padding: 0 9px; gap: 6px; }
.mrow { display: grid; grid-template-columns: 20px minmax(0, 1.1fr) minmax(40px, .6fr) minmax(0, 1.4fr) minmax(0, 1fr) 34px; align-items: center; gap: 8px; min-height: 40px; }
.mrow .vc { min-width: 0; overflow: hidden; }
.mrow .vc b { overflow: hidden; text-overflow: ellipsis; }
.mrow .mk { font-weight: 800; color: var(--muted); font-size: 13px; }
.mrow .vc { justify-content: space-between; }
.mrow .cable path { fill: none; stroke: var(--c); stroke-linecap: round; }
.mrow .cable { cursor: ew-resize; }
.mrow.empty { grid-template-columns: 20px minmax(0, 1.1fr); }
.stage .icon svg { width: 18px; height: 18px; }
.madd { width: 100%; height: 34px; border-radius: 12px; border: 2px dashed #34343d; background: transparent; color: #66666f; font-weight: 800; font-size: 18px; }
.madd:hover { border-color: var(--kalg); color: var(--kalg); }
.foot { margin-top: auto; }
.picker { position: absolute; z-index: 9; background: var(--panel); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px; display: flex; flex-wrap: wrap; gap: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, .7); max-height: 50vh; overflow-y: auto; }
.picker button { height: 36px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--raised); color: var(--text); font-weight: 800; font-size: 13px; }
.picker button.on { background: var(--kalg); border-color: var(--kalg); color: #000; }
/* the keybed: the FM-1's 27 keys from F */
.kbed { display: flex; align-items: stretch; gap: 10px; height: 92px; margin-top: 4px; }
.kbed .bed { position: relative; flex: 1; border-radius: 10px; overflow: hidden; touch-action: none; }
.kbed .wk { position: absolute; top: 0; bottom: 0; border: 1.5px solid #2c2c34; border-radius: 0 0 8px 8px; background: #121216; padding: 0; }
.kbed .bk2 { position: absolute; top: 0; height: 58%; border: 1.5px solid #2c2c34; border-radius: 0 0 6px 6px; background: #000; padding: 0; z-index: 1; }
.kbed .wk.down, .kbed .bk2.down { background: var(--cream); border-color: var(--cream); box-shadow: 0 0 16px color-mix(in srgb, var(--cream) 45%, transparent); }
.kbed .bed.rec .wk { border-color: color-mix(in srgb, var(--red) 55%, #2c2c34); }
.kbed .bed.rec .wk.down, .kbed .bed.rec .bk2.down { background: var(--red); border-color: var(--red); }
.kbed .oct { width: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--raised); color: var(--text); font-weight: 800; font-size: 22px; }
.kbed .octv { align-self: center; width: 28px; text-align: center; font-weight: 800; color: var(--muted); font-size: 15px; }
/* EXPORT (shot 4) */
.modal.ex { width: 980px; --c: var(--cream); display: flex; flex-direction: column; gap: 16px; }
.exhead { gap: 14px; align-items: flex-end; }
.exhead .big { font-size: 36px; }
.fmts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fmt { border-radius: 18px; border: 2px solid var(--line); background: var(--raised); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; text-align: left; color: inherit; }
.fmt.on { border-color: var(--c); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 30%, transparent); background: color-mix(in srgb, var(--c) 8%, var(--raised)); }
.fmt .ext { font-size: 13px; font-weight: 800; color: var(--c); letter-spacing: .06em; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fmt .expmark { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: #000; background: var(--yellow); border-radius: 6px; padding: 2px 6px; }
.fmt .t { font-size: 26px; font-weight: 800; color: var(--text); }
.fmt .carry { font-weight: 800; color: var(--champagne); }
.fmt .carry.all { color: var(--green); }
.dn2seg { align-self: flex-end; }
.lostlist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; max-height: 40vh; overflow-y: auto; }
.lost { display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 6px 16px; border-radius: 12px; background: var(--raised); border: 1.5px solid var(--line); }
.lost .what { color: var(--text); font-weight: 800; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lost .how { font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 8px; color: #000; background: var(--c); white-space: nowrap; }
.lost .val { color: var(--muted); font-weight: 700; font-size: 14px; }
.exfoot { gap: 12px; flex-wrap: wrap; }
.exfoot .exname { margin-right: auto; overflow-wrap: anywhere; }
@media (max-width: 1180px) {
  .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "ops openv" "filter filter" "amp drive" "lfo lfo" "mod mod" "play play"; }
}
@media (max-width: 900px) {
  .body.edit { flex-direction: column; align-items: stretch; }
  .edcard { padding: 12px; }
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ops" "openv" "filter" "amp" "drive" "lfo" "mod" "play"; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .lfos { grid-template-columns: minmax(0, 1fr); }
  .trkbig { width: 64px; height: 64px; border-radius: 16px; }
  .trkbig b { font-size: 36px; }
  .trks { flex-wrap: wrap; }
  .trk { min-width: 34px; height: 36px; padding: 0 8px; }
  .edname .bigname { font-size: 30px; }
  .edacts { margin-left: 0; }
  .opcards { grid-template-columns: 1fr 1fr; }
  .opc .opv { font-size: 32px; }
  .dial { width: 74px; }
  .vbar { min-width: 0; flex-basis: 140px; }
  .mrow { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 34px; row-gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .mrow .cable { display: none; }
  .mrow .depth { grid-column: 2 / 4; }
  .mrow .vc { min-width: 0; overflow: hidden; padding: 0 10px; gap: 6px; }
  .mrow .vc.pick small { display: none; }
  .mrow .vc b { overflow: hidden; text-overflow: ellipsis; }
  .exfoot .exname { flex-basis: 100%; }
  .edacts { justify-content: flex-start; }
  .mrow.empty { grid-template-columns: 22px 130px; }
  .kbed { height: 76px; gap: 6px; }
  .kbed .oct { width: 34px; }
  .kbed .octv { display: none; }
  .fmts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .fmt { padding: 12px 14px; gap: 8px; }
  .fmt .t { font-size: 22px; }
  .lostlist { grid-template-columns: minmax(0, 1fr); }
  .modal.ex { padding: 18px; }
  .exhead .big { font-size: 28px; }
}
/* the panel's sections, laid out (after the shared rules above) */
.pnb > .vbar, .sub > .vbar { flex: none; }
.pn-ops .pnb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "algo cards" "dials dials"; gap: 8px 10px; align-items: center; }
.pn-ops .opc .vbar { min-width: 0; flex: none; }
.pn-ops .opc .vbar b { font-size: 14px; }
.pn-mod .pnb { gap: 4px; }
.pn-ops .ops { display: contents; }
.pn-ops .algowrap { grid-area: algo; } .pn-ops .opcards { grid-area: cards; } .pn-ops .dials { grid-area: dials; }
.mrow.empty { min-height: 32px; }
.mrow.empty .madd { height: 28px; font-size: 15px; }
.lfoc .wave { max-height: 56px; }
@media (max-width: 900px) {
  .pn-ops .pnb { grid-template-columns: minmax(0, 1fr); grid-template-areas: "algo" "cards" "dials"; }
  .pn .dial { width: 70px; }
  .pn .dial svg { width: 54px !important; }
}

/* ---- every page fits the window (the owner, 2026-10-26): the page itself never scrolls; each card's list scrolls by
   itself (LIBRARY's sound list, the backups, the pool's sounds, the import rows; EDIT's panels as one). A phone keeps
   the page scrolling (the 900 px layout above) */
@media (min-width: 901px) {
  html, body { height: 100%; }
  body { display: flex; flex-direction: column; overflow: hidden; }
  .top, .say, .loadbar { flex: none; }
  .loadbar { position: static; }
  main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  main > .body { flex: 1; min-height: 0; }
  main > .body > .card { min-height: 0; }
  #tab-library .sel { overflow-y: auto; }
  #tab-pool .poolcard { overflow-y: auto; }
  .body.edit { align-items: stretch; }
  .edcard { overflow: hidden; }                       /* (EDIT: the head and the keybed stay, the panels scroll) */
  .edcard .stage { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; padding: 2px; }
  .edcard .edhead, .edcard .kbed { flex: none; }
  #tab-import .dz { flex: none; }
  #tab-import .ilist { min-height: 0; }
}

/* ---- the header's BROWSER pill (the owner, 2026-10-27): FIZZ in this browser as the FM-1; the FM-1 pill quiet then */
.bunit { --c: var(--cyan); background: transparent; color: var(--text); margin-left: 0; }
.bunit svg { width: 18px; height: 18px; fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.unit.bunit[data-state="off"] { --c: var(--cyan); background: transparent; color: var(--text); box-shadow: none; border-color: color-mix(in srgb, var(--cyan) 55%, var(--line)); }
.bunit[data-state="on"] { --c: var(--green); background: color-mix(in srgb, var(--green) 16%, var(--bg)); }
.bunit[data-state="look"] svg { animation: blink .8s infinite alternate; }
.unit[data-state="idle"] { --c: var(--muted); background: transparent; border-color: var(--line); color: var(--muted); cursor: pointer; }
.unit[data-state="idle"] .dot { background: var(--muted); box-shadow: none; }

/* ---- PROJECTS (mockups/fizz-projects.html) */
#tab-projects .pjslots { width: 404px; flex: none; gap: 6px; }
#tab-projects .pjmain { flex: 1; gap: 0; }
.pjuse { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text); letter-spacing: 0; font-size: 15px; }
.pjuse .bar { width: 110px; height: 10px; border-radius: 5px; background: #1d1d23; overflow: hidden; display: flex; }
.pjuse .bar span { background: var(--green); }
.slots { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 0; flex: 1; }
.slot { height: 58px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--raised); display: flex; align-items: center; gap: 12px; padding: 0 12px; flex: none; text-align: left; width: 100%; }
.slot .no { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #000; background: var(--green); flex: none; }
.slot .pt0 { min-width: 0; }
.slot .sname { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: .03em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .meta { font-size: 13px; font-weight: 700; color: var(--muted); }
.slot.empty { border-style: dashed; background: transparent; }
.slot.empty .no { background: #24242b; color: var(--muted); }
.slot.cur .no { box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--green); }
.slot.sel { border: 2px solid var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, var(--raised)); box-shadow: 0 0 18px color-mix(in srgb, var(--cyan) 30%, transparent); }
.slot.target { border: 2px dashed var(--yellow); background: color-mix(in srgb, var(--yellow) 8%, transparent); }
.slot.target .no { background: var(--yellow); color: #000; }
.slot .chg { width: 12px; height: 12px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 10px var(--yellow); flex: none; }
.slot .dots { display: grid; grid-template-columns: repeat(16, 5px); gap: 2px; margin-left: auto; flex: none; }
.slot .dots i { width: 5px; height: 5px; border-radius: 1px; background: #2a2a31; }
.slot .dots i.u { background: var(--green); }
.slotname { font: 800 18px "Inter Tight", sans-serif; letter-spacing: .03em; color: var(--text); background: #000; border: 1.5px solid var(--cyan); border-radius: 8px; padding: 2px 6px; width: 190px; text-transform: uppercase; }
#tab-projects .acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding-top: 14px; flex: none; }
#tab-projects .acts .btn { padding: 0 10px; }
#tab-projects .acts .btn.go { --c: var(--green); color: #000; }
#tab-projects .acts .keepb { color: var(--champagne); }
#tab-projects .btn.red { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
#tab-projects .btn.cyan { --c: var(--cyan); }
#tab-projects .btn.yellow { --c: var(--yellow); }
#tab-projects .btn.champ { --c: var(--champagne); }
#tab-projects .btn svg { width: 18px; height: 18px; }
.armed { grid-column: 1 / 3; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; border-radius: 19px; border: 1.5px dashed var(--yellow); color: var(--yellow); font-weight: 800; min-width: 0; }
.armed svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; flex: none; }
.armed b { color: var(--yellow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pjhead { margin-bottom: 12px; gap: 12px; flex: none; }
.pjname { font-size: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pjhead .kv b { display: inline; font-size: 17px; }
.pjview { margin-left: auto; flex-wrap: nowrap; }
.pjview button { height: 38px; padding: 0 16px; }
.pjview button.on { background: var(--c); }
.pjview b { color: inherit; }
.clip { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 20px; border: 1.5px dashed var(--cyan); color: var(--text); font-weight: 800; font-size: 14px; white-space: nowrap; margin-left: auto; }
.clip + .pjview { margin-left: 0; }
.clip small { color: var(--muted); font-weight: 700; font-size: 13px; }
.clip svg { width: 18px; height: 18px; fill: none; stroke: var(--cyan); stroke-width: 2.2; }
.pjgrid { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 7px; }
.bankrow { display: flex; gap: 8px; flex: 1; min-height: 0; }
.bank { font-size: 16px; font-weight: 800; color: var(--text); width: 20px; display: grid; place-items: center; flex: none; }
.pgrid { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 6px; flex: 1; }
.pt { border-radius: 9px; background: #0f0f13; border: 1.5px solid #1c1c22; padding: 5px 5px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; text-align: left; overflow: hidden; }
.pt .no { font-size: 12px; font-weight: 800; color: #5d5d66; line-height: 1; margin-bottom: 2px; }
.pt .tr { display: grid; grid-template-columns: repeat(16, 1fr); gap: 1px; height: auto; flex: 1 1 4px; min-height: 4px; max-height: 14px; }
.pt { justify-content: flex-start; }
.pt .tr i { border-radius: 1px; background: #1c1c22; }
.pt .tr.demo i:nth-child(odd) { background: color-mix(in srgb, var(--green) 40%, #1c1c22); }
.pt.used { border-color: #2c2c34; background: #141419; }
.pt.used .no { color: var(--text); }
.pt.sel { border: 2px solid var(--cyan); background: color-mix(in srgb, var(--cyan) 12%, #141419); box-shadow: 0 0 14px color-mix(in srgb, var(--cyan) 40%, transparent); }
.pt.new { border: 2px solid var(--yellow); background: color-mix(in srgb, var(--yellow) 12%, #141419); box-shadow: 0 0 14px color-mix(in srgb, var(--yellow) 40%, transparent); }
.pt.new .no { color: var(--yellow); }
.pjwait { flex: 1; display: grid; place-items: center; }
.pjtools { gap: 8px; margin-top: 14px; flex: none; flex-wrap: wrap; }
.pjtools .selname { font-size: 26px; font-weight: 800; color: var(--cyan); letter-spacing: .02em; margin-right: 4px; }
#tab-projects .pending { flex: none; margin-top: 14px; min-height: 72px; border-radius: 18px; border: 2px solid var(--yellow); background: color-mix(in srgb, var(--yellow) 9%, var(--panel)); display: flex; align-items: center; gap: 16px; padding: 10px 12px 10px 22px; box-shadow: 0 0 26px color-mix(in srgb, var(--yellow) 22%, transparent); }
#tab-projects .pending .cnt { font-size: 40px; font-weight: 800; color: var(--yellow); line-height: 1; }
#tab-projects .pending .what { color: var(--text); font-weight: 800; font-size: 17px; min-width: 0; }
#tab-projects .pending .what small { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.kept { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.kgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bp { border-radius: 16px; background: var(--raised); border: 1.5px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.bp .sname { font-size: 19px; font-weight: 800; color: var(--text); }
.bp .meta { font-size: 13px; font-weight: 700; color: var(--muted); }
.bp .snd { display: flex; gap: 4px; flex-wrap: wrap; min-height: 12px; }
.bp .snd i { width: 12px; height: 12px; border-radius: 3px; }
.bp.sel { border: 2px solid var(--champagne); box-shadow: 0 0 20px color-mix(in srgb, var(--champagne) 30%, transparent); background: color-mix(in srgb, var(--champagne) 8%, var(--raised)); }
.kept .drop { min-height: 64px; }
.kept .drop svg { width: 22px; height: 22px; }
@media (max-width: 900px) {
  #tab-projects .pjslots { width: auto; }
  .pgrid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .bankrow { flex-direction: column; }
  .kgrid { grid-template-columns: 1fr; }
}

/* six tabs and two unit pills in one bar */
@media (max-width: 1500px) and (min-width: 901px) {
  .crumb { display: none; }
  .tabs { margin-left: 10px; gap: 6px; }
  .tab { padding: 0 13px; gap: 7px; font-size: 13px; }
  .top { gap: 10px; padding: 0 18px; }
  .unit { padding: 0 12px 0 10px; }
}

/* ---- FIZZ MIDI (e): a MIDI track's sound: its chip in the lists, the editor's seven pages of four bars
   (mockups/fizz-midi-track.html screens 4..6: the knobs' colours, CC n under each bar, then its value; untouched dashed) */
.mchip { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #000; background: var(--midi); white-space: nowrap; flex: none; vertical-align: middle; }
.din { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.din circle ~ circle { fill: currentColor; stroke: none; }
.cas .din, .selhead .din.algo { width: 30px; height: 30px; flex: none; color: var(--midi); }
.ps .mchip { position: absolute; left: 4px; bottom: 4px; height: 16px; padding: 0 4px; font-size: 12px; box-shadow: 0 0 0 1.5px #000; }
.stage.midi { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-template-areas: none; }
.stage .mpg { grid-area: auto; }
.stage .mpg .pnh { color: var(--midi); }
.stage .mpg .pnh .din { width: 22px; height: 22px; stroke: var(--midi); fill: none; stroke-width: 2; }
.stage .mpg .pnh .din circle ~ circle { fill: var(--midi); stroke: none; }
.mdots { display: inline-flex; gap: 4px; margin-right: 2px; }
.mdots i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--midi) 55%, transparent); }
.mdots i.on { background: var(--midi); border-color: var(--midi); }
.mslots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.msl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 24px; min-width: 0; }
.mbar { position: relative; width: 32px; height: 150px; border-radius: 11px; background: #1d1d23; overflow: hidden; cursor: ns-resize; touch-action: none; border: 1.5px solid transparent; }
.mbar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--c); border-radius: 9px; box-shadow: 0 0 16px color-mix(in srgb, var(--c) 45%, transparent); transition: height .06s linear; }
.mbar i::before { content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 3px; border-radius: 2px; background: color-mix(in srgb, #fff 70%, var(--c)); }
.msl.un .mbar { background: transparent; border: 2px dashed #3a3a44; }
.msl.un .mbar i { display: none; }
.mbar:hover { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.mbar.dragging { border-color: var(--yellow); box-shadow: 0 0 14px color-mix(in srgb, var(--yellow) 40%, transparent); }
.mcc { background: none; border: 0; padding: 2px 4px; border-radius: 6px; color: var(--text); font-size: 15px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; cursor: text; }
.mcc:hover { color: var(--c); text-decoration: underline; text-decoration-color: var(--c); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.mccin { width: 52px; height: 28px; border-radius: 7px; border: 1.5px solid var(--c); background: var(--bg); color: var(--text); font: 800 15px "Inter Tight", sans-serif; text-align: center; padding: 0; }
.mval b { display: block; font-size: 22px; font-weight: 600; line-height: 1.1; color: var(--c); font-variant-numeric: tabular-nums; }
.msl.un .mval b { color: var(--muted); }
.mx { position: absolute; top: 0; right: 0; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg); color: var(--muted); font-size: 14px; font-weight: 800; line-height: 1; padding: 0; opacity: .7; }
.mx:hover, .mx:focus-visible { opacity: 1; color: var(--text); border-color: var(--c); }
.stage.locked .mbar { cursor: not-allowed; }
@media (max-width: 900px) { .mbar { height: 120px; } }

