:root {
  --bg: #15171c; --panel: #1d2027; --line: #2e323c; --text: #e8eaed; --dim: #8b919c;
  --accent: #9b7bbf; --play: #4cd49f; --stop: #d44c4c;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 14px/1.35 "Segoe UI", system-ui, sans-serif; user-select: none; overflow: hidden; }
body { display: flex; flex-direction: column; }

/* ── Top bar ── */
.bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.banks-wrap { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; }
.banks { display: flex; gap: 4px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.bank-add { flex: none; width: 34px; height: 34px; border-radius: 6px; border: 1px dashed #4a505c; background: transparent;
  color: var(--dim); font: 700 1.2rem/1 "Segoe UI", sans-serif; cursor: pointer; }
.bank-add:hover { color: #fff; border-color: #fff; background: #262a33; }
.bank-tab { background: #262a33; color: var(--dim); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 10px; cursor: pointer; white-space: nowrap; font: inherit; position: relative; }
.bank-tab:hover { color: var(--text); }
.bank-tab.on { background: var(--accent); color: #fff; border-color: var(--accent); }
/* ✎ on the current bank — click it (or double-click / right-click any tab) to rename. */
.bank-tab .ren { display: none; margin-left: 6px; opacity: .75; font-size: .8em; }
.bank-tab.on .ren { display: inline; }
.bank-tab .ren:hover { opacity: 1; }
.bank-tab .del { display: none; margin-left: 6px; opacity: .6; font-size: .75em; }
.bank-tab.on .del { display: inline; }
.bank-tab .del:hover { opacity: 1; color: #ffb3b3; }
.bank-tab.playing::after { content: ''; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--play); box-shadow: 0 0 6px var(--play); }
.bar-right { display: flex; align-items: center; gap: 10px; }
.vol { display: flex; align-items: center; gap: 6px; color: var(--dim); }
.vol input { width: 110px; }
.btn-mute { min-width: 64px; }
.btn-mute.on { color: #fff; background: #c62828; border-color: #ff6b6b; animation: muteFlash 1s steps(1) infinite; }
@keyframes muteFlash { 50% { background: #4a1414; color: #ffb3b3; border-color: #7a2a2a; } }

.btn { background: #2a2f3a; color: var(--text); border: 1px solid #3a404d; border-radius: 6px;
  padding: 6px 12px; font: inherit; cursor: pointer; }
.btn:hover { background: #343a47; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-danger { color: #ff9d9d; border-color: rgba(212,76,76,.6); }
.btn-stop { background: rgba(212,76,76,.85); border-color: #ff9d9d; color: #fff; font-weight: 700; }
/* Live show mode (9 Oct) */
.btn-live { font-weight: 700; }
.btn-live.on { background: #c0262c; border-color: #ff8a8a; color: #fff; animation: liveGlow 2s ease-in-out infinite; }
@keyframes liveGlow { 50% { box-shadow: 0 0 0 3px rgba(255,80,80,.35); } }
body.live .cart.empty { cursor: default; opacity: .35; border-color: #2a2e36; }
body.live .cart.empty:hover { filter: none; }
body.live .c-grip { display: none; }
body.live .bank-tab .ren, body.live .bank-tab .del, body.live .bank-add { display: none; }

/* ── Cart grid ── */
.grid { flex: 1 1 auto; display: grid; gap: 8px; padding: 10px; min-height: 0; }
.cart { position: relative; border-radius: 8px; border: 1px solid var(--line); background: #22262e;
  color: var(--text); padding: 8px 10px; display: flex; flex-direction: column; justify-content: center;
  cursor: pointer; overflow: hidden; min-width: 0; min-height: 0; text-align: center; transition: filter .08s;
  container: cart / inline-size; }
.cart:hover { filter: brightness(1.12); }
.cart.empty { background: transparent; border-style: dashed; color: #4a505c; }
.cart.empty .c-label { font-size: .8rem; font-weight: 400; }
.cart.missing { outline: 2px solid var(--stop); outline-offset: -2px; }
.cart.playing { box-shadow: 0 0 0 3px var(--play), 0 0 18px rgba(76,212,159,.45); }
.cart.fading { box-shadow: 0 0 0 3px #e0a060; }
.cart.drop { outline: 3px dashed #fff; outline-offset: -4px; }
.c-label { font-weight: 700; font-size: clamp(.8rem, 1.3vw, 1.15rem); word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; position: relative; z-index: 1; }
/* Top-left: hotkey + MIDI badges. */
.c-binds { position: absolute; top: 5px; left: 7px; display: flex; gap: 3px; z-index: 1; }
.c-key, .c-midi { font-size: .7rem; font-weight: 800; padding: 1px 5px;
  border-radius: 3px; background: rgba(0,0,0,.35); color: #fff; white-space: nowrap; }
.c-midi { font-weight: 700; }
.c-key[hidden], .c-midi[hidden] { display: none; }
/* Settings chips under the name: mode, loop, fade in/out, what it does when
   another cart starts. Defaults that change nothing are left off. */
.c-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 5px;
  position: relative; z-index: 1; max-height: 2.6em; overflow: hidden; }
.c-info:empty, body.no-info .c-info { display: none; }
.chip { font-size: .66rem; font-weight: 700; line-height: 1.25; padding: 0 5px; border-radius: 3px; white-space: nowrap;
  background: rgba(0,0,0,.4); color: rgba(255,255,255,.88); }
.chip-mode { background: rgba(0,0,0,.55); }
.chip-loop { color: #9fe0ff; }
.chip-intr { color: #fff; background: #b0457a; }
.chip-over { color: #10230f; background: #7fd36b; }
.chip-dip { color: #fff; background: #6e4aa0; }
.chip-fin { color: #a8f0d2; }
.chip-fout { color: #ffd29e; }
.chip-other { color: #ffb3b3; }
/* Drag grip — the handle for moving a cart. Pressing it never plays the cart. */
.c-grip { position: absolute; top: 2px; right: 4px; width: 22px; height: 22px; z-index: 2;
  display: flex; align-items: center; justify-content: center; border-radius: 4px;
  font-size: 1.1rem; line-height: 1; color: rgba(255,255,255,.75); cursor: grab; }
.c-grip:hover { background: rgba(0,0,0,.3); color: #fff; }
.cart.empty .c-grip { display: none; }
/* Per-button volume — a fat slider along the bottom edge, inside a safety
   zone: a near-miss lands on the zone (does nothing), never on the cart. */
.c-volzone { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; z-index: 3; cursor: default;
  display: flex; align-items: center; padding: 0 10px; background: linear-gradient(transparent, rgba(0,0,0,.28));
  border-top: 1px dashed rgba(255,255,255,.45); box-shadow: inset 0 1px 0 rgba(0,0,0,.25); }
.cart.empty .c-volzone { display: none; }
.c-vol { --p: 100%; --fill: #e8eaed; -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0;
  background: transparent; opacity: .7; cursor: pointer; }
.c-vol:hover, .c-vol:focus { opacity: 1; }
.c-vol[hidden] { display: none; }
.c-vol::-webkit-slider-runnable-track { height: 9px; border-radius: 5px; border: 1px solid rgba(0,0,0,.45);
  background: linear-gradient(to right, var(--fill) var(--p), rgba(0,0,0,.5) var(--p)); }
.c-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -6.5px; border-radius: 50%;
  background: #fff; border: 2px solid rgba(0,0,0,.55); box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.c-vol:hover::-webkit-slider-thumb { transform: scale(1.1); }
/* Each cart's own fade-out button: top centre, "⤵ 2s". Live only while the
   cart is playing; right-click it to set the time. */
/* Top-centre controls: ⏸ pause/resume + ⤵ fade. The padding + gaps are a
   safety zone: missing a button by a little does nothing. */
.c-ctl { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 8px; width: max-content; padding: 4px 10px 8px; cursor: default;
  border: 1px dashed rgba(255,255,255,.45); border-top: 0; border-radius: 0 0 14px 14px; background: rgba(0,0,0,.12); }   /* never squeezed: three buttons since ■ (8 Oct) */
.cart.empty .c-ctl { display: none; }
.c-pause, .c-stop, .c-fade {
  min-width: 60px; padding: 6px 16px; border-radius: 20px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(0,0,0,.3); color: rgba(255,255,255,.7); font: 700 1.25rem/1.3 "Segoe UI", sans-serif;
  cursor: pointer; white-space: nowrap; }
.c-pause { letter-spacing: 1px; }
.c-pause:hover, .c-stop:hover, .c-fade:hover { color: #fff; border-color: #fff; }
.cart.playing .c-pause { background: #4c8fd4; border-color: #9cc4ee; color: #fff; }
.cart.paused .c-pause { background: #4cd49f; border-color: #a8f0d2; color: #0d1f17; }
.cart.paused { box-shadow: 0 0 0 3px #4c8fd4; animation: cartPaused 1.2s ease-in-out infinite; }
@keyframes cartPaused { 50% { box-shadow: 0 0 0 3px rgba(76,143,212,.35); } }
.c-stop { min-width: 52px; }
.cart.playing .c-stop, .cart.paused .c-stop, .cart.fading .c-stop, .cart.gap .c-stop { background: #d4504c; border-color: #f0a8a6; color: #fff; }
.cart.playing .c-fade { background: #e0a060; border-color: #ffd29e; color: #1a1208; }
.cart.fading .c-fade { background: #7a5a33; color: #fff; }
/* Music dip ▼ / ▲ (9 Oct): purple, lit while the cart sits at its dip level. */
.c-dip { min-width: 52px; padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(0,0,0,.3); color: rgba(255,255,255,.7); font: 700 1.25rem/1.3 "Segoe UI", sans-serif;
  cursor: pointer; white-space: nowrap; }
.c-dip[hidden], .row[hidden] { display: none; }
.c-dip:hover { color: #fff; border-color: #fff; }
.cart.playing .c-dip, .cart.paused .c-dip { border-color: #c9a8f0; color: #fff; }
.c-dip.down { background: #8a5cc4; border-color: #c9a8f0; color: #fff; }
.cart:not(.playing):not(.paused) .c-dip.down { opacity: .6; }
.c-vol.dipped { --fill: #a77de0; }
.c-vol.dipped::-webkit-slider-thumb { background: #c9a8f0; }
.fade-pop { position: fixed; z-index: 40; background: var(--panel); border: 1px solid #3a404d; border-radius: 8px;
  padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.6); width: 210px; }
.fade-pop[hidden] { display: none; }
.dip-pop { width: 300px; }
.dip-pop-l { font-size: .75rem; font-weight: 700; margin: 6px 0 4px; }
.dip-pop .fade-pop-chips button.on { background: #8a5cc4; color: #fff; border-color: #c9a8f0; }
.c-dip .dt { font-size: .7em; opacity: .85; }
.fade-pop-title { font-size: .75rem; color: var(--dim); margin-bottom: 6px; }
.fade-pop-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.fade-pop-chips button { background: #2a2f3a; color: var(--text); border: 1px solid #3a404d; border-radius: 5px;
  padding: 3px 7px; font: inherit; font-size: .8rem; cursor: pointer; }
.fade-pop-chips button.on { background: #e0a060; color: #1a1208; border-color: #e0a060; }
.fade-pop-custom { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--dim); }
.fade-pop-custom input { width: 90px; background: #14161b; color: var(--text); border: 1px solid #3a404d; border-radius: 5px; padding: 4px 6px; font: inherit; }
.cart.dragging { opacity: .45; }
/* Paused by an interrupt, waiting to carry on. */
.cart.held .c-time { color: #9cc4ee; }
/* Hold + Interrupt finished but still held: the song waits for the release. */
.cart.gap { box-shadow: 0 0 0 3px #4c8fd4; animation: cartPaused 1.2s ease-in-out infinite; }
.cart.gap .c-prog { background: rgba(76,143,212,.25); }
.cart.gap .c-time { color: #9cc4ee; }
.bank-tab.drop { outline: 2px dashed #fff; outline-offset: 2px; }
/* Reordering tabs: the marker shows which side the dragged tab lands. */
.bank-tab.dragging { opacity: .4; }
.bank-tab.drop-before { box-shadow: -4px 0 0 #fff; }
.bank-tab.drop-after { box-shadow: 4px 0 0 #fff; }
.c-time { position: absolute; bottom: 32px; right: 8px; font-size: .78rem; font-variant-numeric: tabular-nums;
  font-weight: 700; z-index: 1; }
/* Where the cart plays from: ⚡ RAM / Disk / ⏳ — next to the length. */
.c-lb { position: absolute; bottom: 32px; left: 8px; display: flex; align-items: center; gap: 5px; z-index: 1; }
.c-lb .c-dur { position: static; }
.c-ram { font-size: .62rem; font-weight: 700;
  padding: 0 4px; border-radius: 3px; line-height: 1.35; background: rgba(0,0,0,.35); }
.c-ram[hidden] { display: none; }
.c-ram.ram { color: #ffe066; }
.c-ram.disk { color: #9fc4ff; }
.c-ram.loading { color: #ccc; }
.c-dur { position: absolute; bottom: 32px; left: 8px; font-size: .72rem; opacity: .7; z-index: 1; font-variant-numeric: tabular-nums; }
.c-prog { position: absolute; left: 0; bottom: 0; height: 100%; width: 0; background: rgba(255,255,255,.16); z-index: 0; pointer-events: none; }
/* End-of-track warning. Long tracks: amber pulse, then fast red flash.
   Short ('calm') tracks: no animation, just the progress fill colour. */
.cart.warn-soon:not(.warn-calm) { animation: warnSoon 1s ease-in-out infinite; }
.cart.warn-final:not(.warn-calm) { animation: warnFinal .5s steps(2) infinite; }
@keyframes warnSoon { 0%, 100% { box-shadow: 0 0 0 3px #e0a060, 0 0 16px rgba(224,160,96,.5); }
  50% { box-shadow: 0 0 0 3px rgba(224,160,96,.3), 0 0 0 rgba(224,160,96,0); } }
@keyframes warnFinal { 0% { box-shadow: 0 0 0 4px #ff4d4d, 0 0 22px rgba(255,77,77,.7); filter: brightness(1.25); }
  100% { box-shadow: 0 0 0 4px rgba(255,77,77,.25); filter: none; } }
.cart.warn-soon .c-prog { background: rgba(224,160,96,.38); }
.cart.warn-final .c-prog { background: rgba(255,77,77,.42); }
.bank-tab.warn-soon { animation: tabSoon 1s ease-in-out infinite; }
.bank-tab.warn-final { animation: tabFinal .5s steps(2) infinite; }
@keyframes tabSoon { 50% { box-shadow: 0 0 0 2px #e0a060; } }
@keyframes tabFinal { 0% { box-shadow: 0 0 0 2px #ff4d4d; background: #7a2a2a; } }
.cart.ending .c-time { color: #ffd0d0; animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ── Status ── */
.status { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 4px 12px;
  font-size: .78rem; color: var(--dim); background: var(--panel); border-top: 1px solid var(--line); }
#statusLeft, #statusRight { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#statusRight { text-align: right; }
/* Credit, centred in the status bar. */
.credit { font-weight: 600; letter-spacing: .04em; color: #b8a6cc; white-space: nowrap; text-decoration: none; }
.credit:hover { color: #fff; text-decoration: underline; }
.site-link { cursor: pointer; }
.btn-about { padding: 6px 10px; font-size: .8rem; color: var(--dim); }
.btn-about:hover { color: var(--text); }
.dlg-about .dlg-body { align-items: center; text-align: center; gap: 6px; }
.dlg-about h2 { margin: 6px 0 0; }
.dlg-about p { margin: 0; }
.dlg-about .dlg-foot { align-self: stretch; margin-top: 10px; }
.about-ver { color: var(--dim); font-size: .85rem; }
.dlg-about a { color: #b8a6cc; }
.dlg-about a:hover { color: #fff; }

/* ── Dialogs ── */
.dlg { background: var(--panel); color: var(--text); border: 1px solid #3a404d; border-radius: 10px; padding: 0;
  width: min(560px, 94vw); box-shadow: 0 16px 48px rgba(0,0,0,.6); }
.dlg::backdrop { background: rgba(0,0,0,.5); }
.dlg-small { width: min(400px, 92vw); }
.dlg-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.dlg h2 { margin: 0 0 4px; font-size: 1.1rem; }
.row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; color: var(--dim); }
.row.check { display: flex; color: var(--text); }
.row input[type=text], .row select, .dlg-small input { background: #14161b; color: var(--text); border: 1px solid #3a404d;
  border-radius: 5px; padding: 6px 8px; font: inherit; width: 100%; }
.num { display: flex; align-items: center; gap: 6px; color: var(--text); }
.num input[type=number] { width: 90px; background: #14161b; color: var(--text); border: 1px solid #3a404d; border-radius: 5px; padding: 5px 6px; font: inherit; }
.num input[type=range] { flex: 1 1 auto; }
.file-row { display: flex; align-items: center; gap: 8px; color: var(--text); flex-wrap: wrap; }
.file-path { flex: 1 1 auto; font-size: .8rem; word-break: break-all; color: var(--text); min-width: 0; }
.file-path.missing { color: #ff9d9d; }
.keycap { display: inline-block; min-width: 46px; text-align: center; padding: 3px 8px; border-radius: 4px;
  background: #14161b; border: 1px solid #3a404d; font-weight: 700; color: var(--text); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 5px; border: 1px solid rgba(255,255,255,.2); cursor: pointer; padding: 0; }
.swatch.on { outline: 2px solid #fff; outline-offset: 2px; }
.swatch-text { font: 700 .75rem/1 "Segoe UI", sans-serif; }
.swatch-custom { -webkit-appearance: none; appearance: none;
  background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); border: none; }
.swatch-custom::-webkit-color-swatch-wrapper { padding: 4px; }
.swatch-custom::-webkit-color-swatch { border: none; border-radius: 3px; }
/* ── Help ── */
.btn-help { font-weight: 800; min-width: 34px; }
.dlg-help { width: min(860px, 94vw); height: min(88vh, 900px); }
.dlg-help[open] { display: flex; flex-direction: column; }
.help-head { position: relative; padding: 14px 52px 10px 18px; border-bottom: 1px solid var(--line); }
.help-head h2 { margin: 0 0 8px; font-size: 1.15rem; }
.help-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.help-nav a { color: var(--text); text-decoration: none; background: #262a33; border: 1px solid var(--line);
  border-radius: 12px; padding: 2px 9px; font-size: .78rem; }
.help-nav a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.help-x { position: absolute; top: 10px; right: 12px; padding: 4px 10px; }
.help-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 22px 18px; user-select: text; line-height: 1.5; }
.help-body section { padding-top: 10px; }
.help-body h4 { font-size: .9rem; margin: 12px 0 4px; color: var(--text); }
.help-body h3 { font-size: 1rem; color: var(--accent); margin: 10px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.help-body p, .help-body li { color: #cfd3da; }
.help-body ul, .help-body ol { margin: 6px 0; padding-left: 22px; }
.help-body li { margin: 3px 0; }
.help-body b { color: var(--text); }
.help-body a { color: #c7a8ea; }
.help-tbl { width: 100%; border-collapse: collapse; margin: 6px 0; }
.help-tbl td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; color: #cfd3da; }
.help-tbl td:first-child { white-space: nowrap; width: 1%; color: var(--text); }
.help-body .chip { background: #2e323c; display: inline-block; margin: 1px 0; }
.hk { display: inline-block; min-width: 1.6em; text-align: center; padding: 0 5px; border-radius: 4px;
  background: #2a2f3a; border: 1px solid #3a404d; border-bottom-width: 2px; font-size: .8rem; font-weight: 700; color: var(--text); }
.ring { display: inline-block; padding: 0 7px; border-radius: 5px; font-size: .82rem; color: var(--text); }
.ring-play { box-shadow: 0 0 0 2px var(--play); } .ring-fade { box-shadow: 0 0 0 2px #e0a060; }
.ring-pause { box-shadow: 0 0 0 2px #4c8fd4; } .ring-miss { box-shadow: 0 0 0 2px var(--stop); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--play); box-shadow: 0 0 6px var(--play); }
.help-foot { margin-top: 18px; text-align: center; font-size: .8rem; color: var(--dim) !important; }
.dlg-foot { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.grow { flex: 1 1 auto; }
.hint { margin: -4px 0 0 140px; font-size: .78rem; color: var(--dim); }
.warn { margin: -4px 0 0 140px; font-size: .8rem; color: #f0bd85; }
.warn[hidden], .hint[hidden] { display: none; }

.learn { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center;
  z-index: 50; font-size: 1.4rem; font-weight: 700; text-align: center; }
.learn[hidden] { display: none; }
.learn small { font-size: .85rem; color: var(--dim); font-weight: 400; }
/* Narrow buttons (default 6-wide grid on a laptop): the centred ❚❚ / ⤵ pair
   would sit on top of the hotkey + MIDI badges. Move it right, slim it down,
   and stack the badges.
   ⚠ Must stay AFTER the base .c-ctl / button rules: it sat above them and their
   min-width: 46px won on source order, so it never applied (found with ■, 8 Oct). */
@container cart (max-width: 330px) {
  .c-ctl { left: auto; right: 28px; transform: none; gap: 4px; }
  .c-pause, .c-stop, .c-fade, .c-dip { min-width: 0; padding: 4px 11px; font-size: 1.1rem; }
  .c-dip .dl, .c-dip .dt { display: none; }
  /* Four big buttons (dip carts): slimmer, and the ⤵ goes so the time fits. */
  .c-ctl:has(.c-dip:not([hidden])) { gap: 3px; }
  .c-ctl:has(.c-dip:not([hidden])) > button { padding: 4px 8px; }
  .c-ctl:has(.c-dip:not([hidden])) .fa { display: none; }
  .c-binds { flex-direction: column; align-items: flex-start; gap: 2px; }
  .c-midi .mi { display: none; }
}
/* Very narrow (8+ columns): three buttons + badges + grip can't share one row.
   The buttons take the top row on their own, the badges drop under them. */
@container cart (max-width: 230px) {
  .c-ctl { left: 4px; right: 26px; justify-content: center; width: auto; gap: 3px; }
  .c-pause, .c-stop, .c-fade, .c-dip { padding: 3px 8px; font-size: 1rem; }
  /* Four buttons (dip carts) don't fit at full padding: squeeze, and let them
     share the row rather than overflow into each other. */
  .c-ctl:has(.c-dip:not([hidden])) { gap: 2px; }
  .c-ctl:has(.c-dip:not([hidden])) > button { padding: 3px 5px; font-size: .88rem; flex: 0 1 auto; min-width: 0; overflow: hidden; }
  .c-ctl:has(.c-dip:not([hidden])) .fa { display: none; }   /* "2s" alone: ⤵ is still the only time button */
  .c-binds { top: 38px; }
}
/* Tiny buttons (10+ columns): bigger controls (15 Nov) still have to fit beside the grip. */
@container cart (max-width: 160px) {
  .c-ctl, .c-ctl:has(.c-dip:not([hidden])) { gap: 2px; }
  .c-ctl > button, .c-ctl:has(.c-dip:not([hidden])) > button { padding: 2px 4px; font-size: .8rem; flex: 0 1 auto; min-width: 0; overflow: hidden; }
  .c-ctl .fa { display: none; }
  .c-binds { top: 32px; }
}
