/* SIMMER — hardware-style dark panels, acid lime (the cook) + hot pink (you) */
:root {
  --bg: #0c0d10; --panel: #14161b; --panel2: #1c1f26; --line: #262a33; --line2: #363b47;
  --text: #eef1f6; --dim: #9aa3b5; --faint: #6b7385;
  --lime: #c8f53c; --pink: #ff4fa3; --hot: #ff5a36; --sky: #4fd8ff;
  --ui: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 8px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 500 14px/1.3 var(--ui); overscroll-behavior: none; }
body { touch-action: manipulation; user-select: none; -webkit-user-select: none; overflow: hidden; }
button, select, input { font: inherit; color: inherit; }
button { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 0; cursor: pointer; touch-action: manipulation; transition: background .1s, border-color .1s, color .1s; }
button:active { transform: translateY(1px); }

#app { height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; padding: calc(6px + env(safe-area-inset-top)) 12px calc(8px + env(safe-area-inset-bottom)); gap: 6px; }

/* header */
header { display: flex; align-items: center; gap: 5px; }
.logo { font: 700 20px/1 var(--ui); letter-spacing: 3px; margin-right: auto; display: flex; align-items: center; gap: 7px; }
.mark { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--lime); box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 6px var(--pink); flex: 0 0 auto; }
.hb { width: 36px; height: 36px; font-size: 15px; font-family: var(--mono); }
.hb.play { width: 52px; height: 38px; background: var(--lime); color: #0c0d10; border: none; font-size: 15px; }
.hb.play.on { background: var(--pink); color: #0c0d10; }
#bowls { display: flex; gap: 3px; }
.bowl { width: 28px; height: 28px; font: 700 11px var(--mono); color: var(--faint); background: transparent; border: 1px dashed var(--line2); }
.bowl.full { color: #0c0d10; background: var(--sky); border: 1px solid var(--sky); }
.bowl.queued { animation: pulse .8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px #4fd8ff55; } }

/* pot */
#potWrap { flex: 1 1 auto; min-height: 150px; display: flex; gap: 8px; transition: flex-basis .25s; }
#pot { flex: 1; min-width: 0; height: 100%; touch-action: none; }
.vs { width: 40px; margin: 0 2px; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; touch-action: none; }
.vs .fill { position: absolute; left: 0; right: 0; bottom: 0; background: repeating-linear-gradient(0deg, #3a404c 0 3px, #2d323c 3px 6px); }
.vs.heat .fill { background: repeating-linear-gradient(0deg, var(--hot) 0 3px, #d8452a 3px 6px); }
.vs span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); font: 700 10px var(--mono); letter-spacing: 3px; color: var(--text); pointer-events: none; text-shadow: 0 0 4px #000; white-space: nowrap; }
body.compact #potWrap { flex: 0 0 64px; min-height: 64px; }
body.compact .vs span { font-size: 8px; letter-spacing: 1px; }

/* status */
#status { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.badge { font: 700 10px var(--mono); letter-spacing: 1px; text-transform: uppercase; padding: 4px 7px; border-radius: 4px; background: var(--lime); color: #0c0d10; white-space: nowrap; }
#meta { font: 500 11.5px var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.meter { width: 54px; height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; flex: 0 0 auto; }
.meter i { display: block; height: 100%; width: 50%; background: linear-gradient(90deg, var(--lime), var(--hot)); transition: width .3s; }

/* band: one dot per instrument, flashes on hits, tap to mute */
#band { display: flex; gap: 3px; }
.bd { flex: 1; height: 26px; display: flex; align-items: center; justify-content: center; gap: 4px; background: transparent; border-color: var(--line); }
.bd i { width: 7px; height: 7px; border-radius: 50%; background: var(--line2); transition: background .25s, box-shadow .25s; }
.bd span { font: 700 9px var(--mono); color: var(--faint); letter-spacing: .5px; }
.bd.hit i { background: var(--lime); box-shadow: 0 0 8px var(--lime); transition: none; }
.bd.muted { opacity: .35; }
.bd.muted i { background: transparent; border: 1px solid var(--faint); }

/* controls */
#ctl { display: flex; gap: 5px; align-items: center; min-width: 0; }
.pill { height: 34px; padding: 0 10px; font: 700 11px var(--mono); letter-spacing: .5px; white-space: nowrap; flex-shrink: 0; }
.pill.sq { width: 36px; padding: 0; font-size: 15px; }
.pill.accent { background: var(--pink); color: #0c0d10; border-color: var(--pink); }
.pill.solo { border-color: #ffd23c; color: #ffd23c; min-width: 58px; }
.pill.solo.wait { animation: pulse .8s ease-in-out infinite; }
.pill.solo.on { background: #ffd23c; color: #0c0d10; }
#ctl .pill { padding: 0 8px; }
#auto { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#auto.on { border-color: var(--lime); color: var(--lime); }
#groove.mixing { background: linear-gradient(90deg, rgba(79,216,255,.35) var(--mixp, 0%), transparent var(--mixp, 0%)); border-color: var(--lime); color: #fff; }
#groove { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; border-color: var(--sky); color: var(--sky); }
.bpmwrap { margin-left: auto; color: var(--faint); font: 700 9px var(--mono); text-align: right; line-height: 1; }
.bpmwrap b { color: var(--text); font-size: 16px; display: block; }

#chords { display: flex; gap: 4px; }
.chord { flex: 1; height: 32px; font: 700 12.5px var(--ui); background: var(--panel); }
.chord.now { border-color: var(--lime); color: var(--lime); }

#tabs { display: flex; gap: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 3px; touch-action: none; }
.tab { flex: 1; height: 34px; font: 700 11px var(--mono); letter-spacing: 1px; background: transparent; color: var(--dim); border: none; border-radius: 6px; position: relative; }
.tab.sel { background: var(--panel2); color: var(--text); box-shadow: inset 0 -2px 0 var(--lime); }
.tab.fold { flex: 0 0 34px; color: var(--faint); font-size: 13px; }
.tab.lit::after { content: ""; position: absolute; top: 6px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--hot); }

#panel { flex: 0 0 auto; height: min(37dvh, 300px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; transition: height .25s; }
body.compact #panel { height: 58dvh; }
.hint { font: 500 12px var(--ui); color: var(--dim); }
.phead { display: flex; align-items: center; gap: 5px; }
.ptitle { margin-right: auto; font: 700 11px var(--mono); letter-spacing: 1px; color: var(--dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tools { display: flex; gap: 4px; align-items: center; margin-top: auto; }
.tb { height: 34px; min-width: 36px; padding: 0 9px; font: 700 10.5px var(--mono); letter-spacing: .5px; white-space: nowrap; }
.tb.on { border-color: var(--lime); color: var(--lime); }
.tb.rec.on, .tb.hum.on { border-color: var(--hot); color: var(--hot); }
select.inst { height: 34px; flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 0 6px; font: 500 12.5px var(--ui); }

/* step cells: lime = the cook, pink = yours */
.cell { background: #20232b; border-radius: 4px; display: grid; place-items: center; font: 700 10px var(--mono); color: #0c0d10; }
.cell.gen { background: var(--lime); }
.cell.pin { background: var(--pink); }
.cell.soft.gen { background: #7f9a28; }
.cell.soft.pin { background: #a83570; }
.cell.open.gen, .cell.open.pin { background: var(--sky); }
.cell.off { box-shadow: inset 0 0 0 1.5px #6b3a55; }
.cell.ph, .rcol.ph { outline: 2px solid #ffffffaa; outline-offset: -2px; }

/* BEAT: thin strips for every drum, big cells for the selected one */
.strips { display: flex; flex-direction: column; gap: 3px; }
.strip { display: flex; align-items: center; gap: 6px; height: 17px; padding: 0 6px; background: transparent; border-color: transparent; }
.strip.sel { border-color: var(--lime); background: var(--panel2); }
.strip.muted { opacity: .4; }
.slab2 { width: 74px; font: 700 9px var(--mono); color: var(--dim); text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sdots { flex: 1; display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; height: 8px; }
.sdots.g12 { grid-template-columns: repeat(12, 1fr); }
.sdots i { background: #262a33; border-radius: 2px; }
.sdots i.g { background: var(--lime); } .sdots i.p { background: var(--pink); }
.sdots i.ph { background: #fff !important; }
.bigcells { flex: 1; min-height: 72px; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 5px; touch-action: none; }
.bigcells .cell { min-height: 34px; border-radius: 6px; }
.strip { height: 15px; }
.bigcells .cell:nth-child(4n+1) { box-shadow: inset 0 0 0 1px #3a404c; }

/* NOTES */
.subtabs { display: flex; gap: 4px; }
.sub { flex: 1; height: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: transparent; }
.sub b { font: 700 10.5px var(--mono); letter-spacing: .5px; }
.sub small { font-size: 9.5px; color: var(--dim); max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 3px; }
.sub.sel { background: var(--panel2); border-color: var(--lime); }
.sub.muted b { text-decoration: line-through; opacity: .5; }
.pages { display: flex; gap: 4px; }
.pg { flex: 1; height: 26px; font: 700 10px var(--mono); background: transparent; color: var(--faint); }
.pg.sel { color: var(--text); border-color: var(--line2); background: var(--panel2); }
.cells { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; touch-action: none; }
.cells.keys { flex: 1; max-height: 110px; grid-template-columns: repeat(8, 1fr); grid-template-rows: 1fr 1fr; gap: 4px; }
.cells.keys .cell { font-size: 8.5px; }
.roll { flex: 1; min-height: 0; display: flex; gap: 4px; }
.rlab { width: 24px; display: flex; flex-direction: column; font: 700 9.5px var(--mono); color: var(--dim); }
.rlab span { flex: 1; display: grid; place-items: center; }
.rgrid { flex: 1; display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; touch-action: none; }
.rcol { position: relative; background: repeating-linear-gradient(to top, #1b1e25 0, #1b1e25 calc(100% / var(--rows) - 1px), #262a33 calc(100% / var(--rows) - 1px), #262a33 calc(100% / var(--rows))); border-radius: 5px; touch-action: none; }
.rcol.beat { box-shadow: inset 0 0 0 1px #3a404c; }
.rcol.off { box-shadow: inset 0 0 0 1.5px #6b3a55; }
.note { position: absolute; left: 2px; right: 2px; border-radius: 3px; pointer-events: none; }
.note.gen { background: var(--lime); }
.note.pin { background: var(--pink); }

/* PADS */
.pads { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 6px; touch-action: none; }
.pad { border-radius: var(--r); background: var(--panel2); border: 1px solid var(--line2); display: grid; place-items: center; font: 700 16px var(--ui); color: var(--text); touch-action: none; transition: background .15s, color .15s; }
.pad.lit { background: var(--lime); color: #0c0d10; transition: none; }

/* FX */
.fxtargets { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; }
.fxtargets::-webkit-scrollbar { display: none; }
.fxtg { flex: 0 0 auto; height: 30px; padding: 0 10px; font: 700 10px var(--mono); background: transparent; color: var(--dim); position: relative; }
.fxtg.sel { background: var(--panel2); color: var(--text); border-color: var(--lime); }
.fxtg.lit::after, .mfx.lit::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--hot); }
.lfx { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-around; }
.lrow { display: flex; align-items: center; gap: 8px; }
.llab { width: 54px; font: 700 10.5px var(--mono); }
.lrow input { flex: 1; accent-color: var(--lime); height: 30px; }
.lrow input.bipolar { accent-color: var(--sky); }
.lval { width: 52px; text-align: right; font: 500 11px var(--mono); color: var(--dim); }
.fxwrap { flex: 1; min-height: 0; display: flex; gap: 8px; }
.xy { flex: 1; position: relative; border-radius: var(--r); touch-action: none; overflow: hidden; border: 1px solid var(--line2);
  background: linear-gradient(90deg, #3a1630 0%, transparent 35%, transparent 65%, #10303a 100%),
  repeating-linear-gradient(0deg, #ffffff0a 0 1px, transparent 1px 25%), repeating-linear-gradient(90deg, #ffffff0a 0 1px, transparent 1px 25%), #101216; }
.xy.on { border-color: var(--lime); }
.xydot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 22px #c8f53caa; pointer-events: none; transition: left .25s, top .25s; }
.xy.on .xydot { transition: none; }
.xy span { position: absolute; font: 700 9px var(--mono); color: var(--faint); pointer-events: none; }
.xyl { left: 8px; bottom: 6px; } .xyr { right: 8px; bottom: 6px; } .xyt { left: 50%; top: 6px; transform: translateX(-50%); }
.fxtoggles { width: 92px; display: flex; flex-direction: column; gap: 5px; }
.fxt { flex: 1; font: 700 10.5px var(--mono); letter-spacing: .5px; }
.fxt.on { background: var(--hot); border-color: var(--hot); color: #0c0d10; }

/* MIX: compact, no scrolling */
.mix { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 3px; }
.mrow { display: flex; gap: 5px; align-items: center; flex: 1; min-height: 0; max-height: 34px; }
.mname { flex: 0 0 116px; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 8px; background: transparent; text-align: left; overflow: hidden; }
.mname b { font: 700 9.5px var(--mono); letter-spacing: .5px; }
.mname small { font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mm, .mfx { flex: 0 0 34px; height: 100%; font: 700 10px var(--mono); position: relative; }
.mm.on { background: var(--hot); border-color: var(--hot); color: #0c0d10; }
.mfx.lit { border-color: var(--hot); color: var(--hot); }
.mrow input.vol { flex: 1; min-width: 0; accent-color: var(--lime); }
.mrow.muted .mname, .mrow.muted input { opacity: .4; }

/* DJ desk */
.djmix, .djfx, .djnext { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 5px; }
.eqrow { display: flex; align-items: center; gap: 7px; }
.eqrow input { flex: 1; min-width: 0; accent-color: var(--lime); height: 28px; }
.eqrow input.bipolar { accent-color: var(--sky); }
.kill { flex: 0 0 56px; height: 30px; font: 700 10px var(--mono); }
.kill.on { background: var(--hot); border-color: var(--hot); color: #0c0d10; }
.djrow { display: flex; gap: 5px; align-items: stretch; }
.djrow button { flex: 1; height: 36px; font: 700 10.5px var(--mono); letter-spacing: .5px; display: grid; place-items: center; }
.djrow button.on { border-color: var(--lime); color: var(--lime); }
.djrow .tap { border-color: var(--sky); color: var(--sky); }
.stem { background: var(--panel2); color: var(--faint); }
.stem.on { background: var(--lime) !important; color: #0c0d10 !important; border-color: var(--lime) !important; }
.rowlab { flex: 0 0 40px; display: grid; place-items: center; font: 700 9px var(--mono); color: var(--dim); letter-spacing: 1px; }
.roll { font-size: 15px !important; border-color: var(--line2); }
.djrow button.on, .roll.on { background: var(--hot); color: #0c0d10; border-color: var(--hot); }
.sfx { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; gap: 5px; }
.sfxpad { font: 700 11px var(--mono); letter-spacing: .5px; background: var(--panel2); border-color: var(--line2); touch-action: none; }
.sfxpad.lit { background: var(--pink); color: #0c0d10; }
.nextchips { display: grid; grid-template-rows: repeat(2, 34px); grid-auto-flow: column; grid-auto-columns: max-content; gap: 5px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 1px; }
.nextchips::-webkit-scrollbar { display: none; }
@media (hover: hover) and (pointer: fine) { .nextchips { display: flex; flex-wrap: wrap; overflow: visible; } }
.mixlen { display: flex; gap: 5px; }
.mixlen .nchip { flex: 1; padding: 0 4px; white-space: nowrap; }
.nchip { height: 34px; padding: 0 10px; font: 700 10.5px var(--mono); }
.nchip.sel { background: var(--sky); border-color: var(--sky); color: #0c0d10; }
.nchip.cur { border-style: dashed; }
.cutloop { flex: 1; }
.cutloop.on { background: var(--pink); border-color: var(--pink); color: #0c0d10; animation: pulse 0.6s infinite; }
.mixstage { font: 700 11px var(--mono); color: var(--lime); }
.mixbar { height: 10px; background: var(--panel2); border-radius: 5px; overflow: hidden; }
.mixbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--lime)); transition: width .4s; }
.djrow .go { flex: 2; background: var(--lime); color: #0c0d10; border-color: var(--lime); font-size: 12px; }
.wide.on { border-color: var(--lime); color: var(--lime); }
.tab { font-size: 10.5px; letter-spacing: .5px; }

/* level meters: green → yellow → red gradient, dark cover hides the unlit part */
.meter2 { position: relative; height: 7px; border-radius: 2px; overflow: hidden; background: linear-gradient(90deg, #3fae4a 0%, var(--lime) 62%, #ffd23c 80%, var(--hot) 93%); }
.meter2 .f { position: absolute; right: 0; top: 0; bottom: 0; width: 100%; background: #1d2027; }
.meter2 .pk { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; opacity: .85; }
.meter2 .db { position: absolute; right: 3px; top: -1px; font: 700 7.5px/9px var(--mono); color: var(--dim); }
.meter2.clip { box-shadow: 0 0 0 1px var(--hot); }
.meter2.clip .db { color: var(--hot); }
.mrow.master { max-height: 22px; }
.mrow.master .meter2 { flex: 1; height: 10px; }
.mrow.master .meter2 .db { font-size: 8.5px; line-height: 10px; top: 0; }
.mlab { flex: 0 0 116px; font: 700 9.5px var(--mono); color: var(--dim); padding-left: 8px; }
.vcol { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.vcol input.vol { width: 100%; height: 16px; accent-color: var(--lime); margin: 0; }
.ms { flex: 0 0 30px; height: 100%; font: 700 10px var(--mono); }
.ms.on { background: #ffd23c; border-color: #ffd23c; color: #0c0d10; }
.mrow.dim { opacity: .45; }
.mm { flex-basis: 30px !important; }
.mname { flex-basis: 104px !important; }
.bd i { opacity: calc(.18 + var(--lv, 0) * .82); background: var(--lime); transform: scale(calc(.75 + var(--lv, 0) * .6)); }
.bd.clip i { background: var(--hot); opacity: 1; }
.bd.solo { border-color: #ffd23c; }
.bd.dim { opacity: .35; }

/* record, ghosts, tape sheet */
.hb.rec { color: var(--hot); font-size: 14px; min-width: 36px; width: auto; padding: 0 8px; }
.hb.rec.wait { animation: pulse .8s ease-in-out infinite; }
.hb.rec.on { background: var(--hot); color: #0c0d10; border-color: var(--hot); font: 700 11px var(--mono); }
.ghostb.on { background: #b9a6ff; border-color: #b9a6ff; }
.ghostb.wait { animation: pulse .8s ease-in-out infinite; border-color: #b9a6ff; }
#ghosts { display: none; gap: 4px; overflow-x: auto; scrollbar-width: none; }
#ghosts.show { display: flex; }
.gchip { flex: 0 0 auto; height: 26px; padding: 0 10px; font: 700 10px var(--mono); border-color: #b9a6ff; color: #d6ccff; background: #1d1830; white-space: nowrap; }
.gchip.muted { opacity: .4; text-decoration: line-through; }
.ghosted { box-shadow: 0 0 0 2px #b9a6ff !important; }
.tapeplayer { width: 100%; margin: 4px 0 10px; }
.tracklist { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; font: 500 11.5px/1.6 var(--mono); color: var(--text); white-space: pre-wrap; max-height: 30dvh; overflow: auto; margin: 0 0 10px; }
.btnlike { flex: 1; display: grid; place-items: center; height: 36px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel2); color: var(--text); font: 700 10.5px var(--mono); text-decoration: none; }
#sheetBody .djrow { margin-bottom: 8px; }
.bowl { width: 26px; height: 26px; }

/* touch targets: performance controls at (or near) the 44 px guideline; the pot gives up the height */
.logo { font-size: 17px; letter-spacing: 2px; }
.bowl { width: 31px; height: 31px; }
.hb { width: 38px; height: 40px; }
.hb.play { height: 40px; }
.tab { height: 40px; }
.chord { height: 40px; font-size: 13.5px; }
.bd { height: 32px; }
.pill { height: 40px; }
.pg { height: 34px; }
.tb, select.inst { height: 38px; }
.sub { height: 42px; }

/* what the lead/spice actually played */
.notelogrow { display: flex; gap: 5px; align-items: center; }
.notelog { flex: 1; min-width: 0; font: 600 11px var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 4px 6px; background: var(--panel2); border-radius: 6px; }
.notelog.changed { color: #ffb347; }
.note.sounded { animation: sounded .35s ease-out; }
.note.moved { animation: sounded .35s ease-out; outline: 2px solid #ffb347; outline-offset: 1px; }
.note.skipped { opacity: .25; transition: opacity .3s; }
@keyframes sounded { 0% { filter: brightness(2); transform: scaleX(1.15); } 100% { filter: none; transform: none; } }

/* bottom hold row: two pages */
#fx { align-items: stretch; }
#fx .fxpage { flex: 1; display: flex; gap: 5px; min-width: 0; }
#fx .fxpage[hidden] { display: none; }
#fx button.flip { flex: 0 0 30px; font-size: 14px; padding: 0; color: var(--dim); }
#fx button.flip.on { color: var(--lime); border-color: var(--lime); background: var(--panel); }
/* per-instrument gate in MIX */
.mg { flex: 0 0 34px; height: 100%; font: 700 10px var(--mono); }
.mg.on { background: var(--sky); border-color: var(--sky); color: #0c0d10; }
.mname { flex-basis: 96px !important; }

/* feedback */
.fb { flex: 0 0 auto; width: 38px; height: 32px; font-size: 16px; background: var(--panel); }
.fb:active { background: var(--panel2); }
.meter { width: 36px; }
.fbnote { width: 100%; background: var(--panel2); border: 1px solid var(--line2); border-radius: var(--r); color: var(--text); font: 500 14px var(--ui); padding: 10px; margin-top: 4px; resize: none; }
.wide.go { background: var(--lime); color: #0c0d10; border-color: var(--lime); }

/* hold fx */
#fx { display: flex; gap: 5px; }
#fx button { flex: 1; height: 48px; font: 700 10px/1.15 var(--mono); letter-spacing: .5px; background: var(--panel); border-color: var(--line2); touch-action: none; }
#fx button.on { background: var(--hot); color: #0c0d10; border-color: var(--hot); }
#fx button.auto { border: 2px dashed var(--lime); color: var(--lime); } /* the cook is holding this FX */

/* intro */
#stove { position: fixed; inset: 0; background: radial-gradient(circle at 50% 38%, #1a1e14, #0c0d10 65%); display: grid; place-items: center; z-index: 20; transition: opacity .5s, visibility .5s; padding: 24px; }
#stove.gone { opacity: 0; visibility: hidden; }
.stoveIn { text-align: center; max-width: 360px; }
.biglogo { font: 700 46px/1 var(--ui); letter-spacing: 8px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.biglogo .mark { width: 30px; height: 30px; border-width: 5px; box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 11px var(--pink); }
#stove p { color: var(--dim); margin: 10px 0 26px; font: 500 12px var(--mono); }
#stoveBtn { font: 700 16px var(--mono); letter-spacing: 2px; padding: 17px 30px; border-radius: var(--r); background: var(--lime); color: #0c0d10; border: none; box-shadow: 0 0 40px #c8f53c44; }
.howto { text-align: left; color: var(--dim); font-size: 13px; padding-left: 18px; margin: 28px 0 10px; }
.howto li { margin: 7px 0; } .howto b { color: var(--text); }
.tiny { font: 500 10.5px var(--mono); color: var(--faint); }
.version { margin-top: 18px; font: 500 11px var(--mono); color: var(--dim); }
.version .vnum { color: var(--lime); font-weight: 700; }
.version .newv { display: inline-block; margin-right: 8px; padding: 2px 6px; border-radius: 3px; background: var(--pink); color: #0c0d10; font-weight: 700; letter-spacing: 1px; }
.version .vnotes { margin-top: 6px; color: var(--text); font-size: 11.5px; line-height: 1.4; }

/* sheets */
#sheet { position: fixed; inset: 0; background: #000a; z-index: 10; display: flex; align-items: flex-end; justify-content: center; opacity: 0; visibility: hidden; transition: .2s; }
#sheet.open { opacity: 1; visibility: visible; }
#sheetBody { width: 100%; max-width: 560px; max-height: 84dvh; overflow-y: auto; background: var(--panel); border-radius: 14px 14px 0 0; padding: 16px 16px calc(22px + env(safe-area-inset-bottom)); border-top: 2px solid var(--lime); }
#sheetBody h3 { margin: 6px 0 10px; font: 700 11px var(--mono); letter-spacing: 2px; text-transform: uppercase; color: var(--dim); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; align-items: center; }
.chip { height: 36px; padding: 0 12px; font: 500 13px var(--ui); }
.chip.sel { border-color: var(--lime); color: var(--lime); }
.chiplab { font: 700 10px var(--mono); color: var(--dim); width: 74px; }
.seg { display: flex; gap: 4px; margin-bottom: 12px; }
.seg button { flex: 1; height: 42px; font: 700 11px var(--mono); }
.seg button.sel { background: var(--sky); border-color: var(--sky); color: #0c0d10; }
.gopt { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; margin-bottom: 6px; text-align: left; }
.gopt b { font: 700 13px var(--mono); letter-spacing: 1px; }
.gopt small { font-size: 12.5px; color: var(--dim); }
.gopt.sel { border-color: var(--lime); }
.gopt.sel b { color: var(--lime); }
.wide { width: 100%; height: 44px; margin-top: 8px; font: 700 11px var(--mono); letter-spacing: 1px; }
.wide.ghost { background: transparent; }
.srow { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.slab { width: 74px; font: 700 10.5px var(--mono); }
.srow input { flex: 1; accent-color: var(--lime); }
.sval { width: 60px; text-align: right; color: var(--dim); font: 500 11px var(--mono); }
.about { font-size: 11.5px; color: var(--faint); margin-top: 14px; }
.help { margin: 0 0 12px; color: var(--dim); font-size: 13.5px; line-height: 1.45; }
.help b { color: var(--lime); font: 700 11px var(--mono); letter-spacing: 1px; }

#toast { position: fixed; left: 50%; top: 11%; transform: translateX(-50%) translateY(-6px); background: #000e; color: var(--text); padding: 9px 14px; border-radius: 6px; font: 700 12px var(--mono); opacity: 0; transition: .2s; pointer-events: none; z-index: 30; max-width: 90vw; text-align: center; border: 1px solid var(--line2); border-left: 3px solid var(--lime); }
#toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-height: 720px) { #panel { height: 34dvh; } #fx button { height: 42px; } .pill { height: 32px; } #band { display: none; } }

/* computer: two columns. Left = the pot and the cook's controls, right = the panel and the hold buttons */
@media (min-width: 1000px) and (min-height: 560px) {
  #app { max-width: 1360px; display: grid; grid-template-columns: minmax(380px, 0.85fr) minmax(560px, 1.35fr);
    grid-template-rows: auto auto 1fr auto auto auto auto auto; column-gap: 22px; row-gap: 7px; padding: 14px 24px 16px; }
  #app > header { grid-column: 1 / -1; grid-row: 1; }
  #potWrap, body.compact #potWrap { grid-column: 1; grid-row: 2 / 4; min-height: 0; }
  #status { grid-column: 1; grid-row: 4; }
  #ghosts { grid-column: 1; grid-row: 5; }
  #band { grid-column: 1; grid-row: 6; display: flex !important; }
  #ctl { grid-column: 1; grid-row: 7; }
  #chords { grid-column: 1; grid-row: 8; }
  #tabs { grid-column: 2; grid-row: 2; }
  #panel, body.compact #panel { grid-column: 2; grid-row: 3 / 8; height: auto; min-height: 0; }
  #fx { grid-column: 2; grid-row: 8; }
  #fx button { height: 54px; }
  .pill { height: 38px; }
  #toast { top: 8%; }
}

.mrow.soloist { border-top: 1px dashed var(--line2); margin-top: 4px; }
.mrow.soloist.live .mname b { color: var(--lime); }

#sheetBody .sheetx { position: sticky; top: -16px; float: right; z-index: 2; width: 40px; height: 40px; margin: -6px -6px 0 8px; border-radius: 50%; font: 700 18px var(--mono); background: var(--panel); border: 1px solid var(--line2); color: var(--ink, #eef1f6); }

.tstrip { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; }
.tstrip .trow { display: grid; grid-template-columns: 54px repeat(var(--cols), 1fr); gap: 3px; align-items: center; }
.tstrip .tlab { font: 700 9px var(--mono); letter-spacing: 1px; color: var(--dim); }
.tstrip .tcell { height: 26px; padding: 0; font: 700 11px var(--mono); background: var(--panel); border: 1px solid var(--line2); color: var(--dim); }
.tstrip .tcell.on { color: var(--lime); border-color: var(--lime); }

.rcol .note.stacked { opacity: .75; outline: 1px dashed var(--lime); }

#section { cursor: pointer; border: 0; height: auto; min-height: 0; line-height: normal; text-decoration: underline dotted; text-underline-offset: 3px; }
.gopt.wait { border-color: var(--sky); animation: pulse .8s ease-in-out infinite; }
