/* Secret Sauce - window chrome: top-bar wordmark, bottom bar (size + layout, "by Robert"),
   tab colours, the tab row, the tracklist shade, the Sounds light, hover glow and the
   vertical (tall) layout. Loaded after style.css. No animation loops: hover glow is a
   short CSS transition on text-shadow / box-shadow only. */

/* ------------------------------------------------------------- top bar: SECRET SAUCE behind it */
.top { position: relative; isolation: isolate; min-height: 48px; }
.top-mark {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: -1;
  pointer-events: none; text-align: center; white-space: nowrap; overflow: hidden;
  font-weight: 900; font-size: clamp(30px, 4.8vw, 60px); line-height: 1; letter-spacing: .42em; text-indent: .42em;
  color: rgba(255, 255, 255, .07);
  text-shadow: 0 0 6px rgba(255, 255, 255, .22), 0 0 22px rgba(255, 255, 255, .12);
}
html[data-theme="sunset"] .top-mark {
  color: rgba(255, 255, 255, .5);
  text-shadow: 0 0 1px rgba(190, 100, 30, .35), 0 0 12px rgba(255, 255, 255, .95), 0 0 30px rgba(249, 115, 22, .22);
}
.update-badge { position: relative; }

/* ------------------------------------------------------------- bottom bar */
body { padding-bottom: 30px; }
body.in-plugin .rack { min-height: calc(100vh - 30px); }
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 30px;
  display: flex; align-items: center; gap: 12px; padding: 0 12px;
  background: rgba(7, 4, 11, .94); border-top: 1px solid var(--line);
}
html[data-theme="sunset"] .bottom-bar { background: rgba(255, 244, 228, .95); }
.bb-group { display: flex; gap: 3px; }
.bb-btn {
  background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 1px 9px; min-width: 26px;
  font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.bb-btn[aria-pressed="true"] { color: var(--text); border-color: var(--accent); box-shadow: 0 0 8px var(--accent-soft); }
.bb-ver { font-size: 10px; color: var(--muted); opacity: .6; font-variant-numeric: tabular-nums; }
.bottom-bar .byline { margin: 0; }
.bottom-bar .theme-btn { width: 22px; height: 22px; font-size: 12px; }
.bb-group[aria-label="Look"] { gap: 6px; }
.bb-mono .switch { border-radius: 6px; }
.bb-mono .switch button { font-size: 11px; font-weight: 700; padding: 1px 9px; }
.bb-mono .switch-cap { display: none; }
.bb-mono .switch-wrap { gap: 0; }
/* narrow windows: the bar takes two rows instead of pushing past the edge */
@media (max-width: 640px) {
  body { padding-bottom: 60px; }
  .bottom-bar { height: auto; min-height: 30px; flex-wrap: wrap; gap: 4px 8px; padding: 3px 8px; }
  .toast { bottom: 70px; }
}
.tl-slot[hidden] { display: none; }
.eq-band-sc[hidden] { display: none; }
.eq .fx-more-row { max-width: none; flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.eq .fx-more-row .eq-band-sc { border-left: 0; padding-left: 0; justify-content: center; }
.clips .fx-more { width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
.clips .fx-more-row { border-top: 0; padding: 0; }
.toast { bottom: 42px; }

/* ------------------------------------------------------------- tabs: a grid, Samples left + Visualize right */
/* Every tab is always visible. Samples sits in the first cell and Visualize in the last
   cell of the first row; effects fill the cells in chain order and wrap into more rows.
   layoutTabs() (app.js) sets --cols from the width, and .dense when it needs to be tight. */
.tabs {
  display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); grid-auto-flow: row;
  gap: 6px; padding: 4px 0 6px; margin: 10px 0 2px; overflow: visible;
}
.tabs .tab { min-width: 0; margin: 0; }
.tabs .tab .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs .samples-tab { grid-column: 1; grid-row: 1; }
.tabs .viz-tab:not(.samples-tab) { grid-column: -2 / -1; grid-row: 1; margin: 0; }
/* tight: smaller badge + light, the x only on the open tab or under the mouse */
.tabs.dense { gap: 4px; }
.tabs.dense .tab { min-height: 32px; gap: 3px; padding: 0 3px; border-radius: 8px; }
.tabs.dense .tab .name { padding: 6px 0; font-size: 11px; letter-spacing: 0; }
.tabs.dense .tab-num { min-width: 15px; height: 15px; padding: 0 3px; font-size: 9.5px; }
.tabs.dense .power { width: 16px; height: 16px; }
.tabs.dense .power::before { width: 8px; height: 8px; }
.tabs.dense .tab-x { display: none; margin-left: 0; padding: 0 2px; }
.tabs.dense .tab.sel .tab-x, .tabs.dense .tab:hover .tab-x, .tabs.dense .tab:focus-within .tab-x { display: block; }
.tabs.dense .viz-icon { width: 18px; }
@media (pointer: coarse) { .tabs.dense .tab { min-height: 40px; } }

/* Visualize: yellow */
.tabs .tab.viz-tab:not(.samples-tab) { background: linear-gradient(180deg, #3d3206, #1d1703); border-color: #8a6a0a; }
.tabs .tab.viz-tab:not(.samples-tab) .name { color: #fde68a; }
.tabs .tab.viz-tab:not(.samples-tab).sel {
  background: linear-gradient(180deg, #5c4a07, #2a2103); border-color: #facc15;
  box-shadow: inset 0 -2px 0 #facc15, 0 0 14px rgba(250, 204, 21, .3), inset 0 1px 0 rgba(255, 255, 255, .12);
}
html[data-theme="sunset"] .tabs .tab.viz-tab:not(.samples-tab) { background: linear-gradient(180deg, #fff3c4, #fde68a); border-color: #e0b10c; }
html[data-theme="sunset"] .tabs .tab.viz-tab:not(.samples-tab) .name { color: #4a3000; }
html[data-theme="sunset"] .tabs .tab.viz-tab:not(.samples-tab).sel {
  background: linear-gradient(180deg, #fff8d8, #facc15); border-color: #ca8a04;
  box-shadow: inset 0 -2px 0 #a16207, 0 0 12px rgba(234, 179, 8, .4);
}

/* Samples: dark blue */
.tabs .tab.samples-tab { background: linear-gradient(180deg, #16306a, #0a1838); border-color: #1e3a8a; }
.tabs .tab.samples-tab .name { color: #dbeafe; }
.tabs .tab.samples-tab.sel {
  background: linear-gradient(180deg, #1d3f8c, #0c1d45); border-color: #3b82f6;
  box-shadow: inset 0 -2px 0 #60a5fa, 0 0 14px rgba(59, 130, 246, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
}
html[data-theme="sunset"] .tabs .tab.samples-tab { background: linear-gradient(180deg, #1e3a8a, #172554); border-color: #1e3a8a; }
html[data-theme="sunset"] .tabs .tab.samples-tab .name { color: #e0ecff; }
html[data-theme="sunset"] .tabs .tab.samples-tab.sel {
  background: linear-gradient(180deg, #2a4fae, #1e3a8a); border-color: #172554;
  box-shadow: inset 0 -2px 0 #93c5fd, 0 0 12px rgba(30, 58, 138, .45);
}
.tabs .samples-tab .power.on::before { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }
html[data-theme="sunset"] .tabs .samples-tab .power { filter: none; }

/* Sounds light off: not highlighted (a plain tab), nothing inside is rendered; clicking it lights it */
.tabs .tab.samples-tab.off { background: var(--plate-2); border-color: var(--line); box-shadow: none; }
.tabs .tab.samples-tab.off .name { color: var(--muted); }
html[data-theme="sunset"] .tabs .tab.samples-tab.off { background: var(--plate-2); border-color: var(--line); }
html[data-theme="sunset"] .tabs .tab.samples-tab.off .name { color: var(--muted); }
.samples-body, .samples-top { display: flex; flex-direction: column; gap: 10px; }
.samples-top[hidden] { display: none; }
.synth-row small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.synths-body { display: flex; flex-direction: column; gap: 10px; }
.synths-body[hidden], .samples-body[hidden] { display: none; }
.synths-list { display: flex; flex-direction: column; gap: 4px; }
.samples-face.samples-off .synths-body { display: none; }
.samples-off-note { display: none; }
.samples-face.samples-off .samples-off-note { display: block; margin: 70px 0; text-align: center; color: var(--muted); }
.samples-face.samples-off { opacity: .6; }

/* ------------------------------------------------------------- tracklist: its own lighter shade */
/* It opens under the tab row (the tabs never move) and grows in place. Its top strip
   (tracklist tabs + tool bar) is a slightly different shade from the lanes below. */
.tracklist { margin: 0 0 10px; transform-origin: top; animation: tl-open .16s ease-out; }
@keyframes tl-open { from { opacity: 0; transform: scaleY(.96); } }
.tracklist { --tl-top: #2b2143; --tl-top-line: #4a3870; }
html[data-theme="sunset"] .tracklist { --tl-top: #f7e3c4; --tl-top-line: #e3bf93; }
.tracklist { background: linear-gradient(180deg, #221a36, #171126); border-color: #4a3870; box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08); }
.tracklist .tl-tabs, .tracklist .tl-bar { background: var(--tl-top); }
.tracklist .tl-tabs { border-bottom-color: var(--tl-top-line); }
.tracklist .tl-bar { border-bottom: 1px solid var(--tl-top-line); }
.tracklist .tl-tab.sel { border-bottom-color: var(--tl-top); background: linear-gradient(180deg, #3a2c5a, var(--tl-top)); }
.tracklist .tl-lane-head { background: #1c152d; }
.tracklist .tl-ruler { background: #191226; }
.tracklist .tl-rack { background: linear-gradient(90deg, rgba(26, 19, 41, .85), #1a1329 14px); border-left-color: #3a2a58; }
html[data-theme="sunset"] .tracklist { background: linear-gradient(180deg, #fffdf8, #fff6e8); border-color: #e7c497; box-shadow: 0 8px 22px rgba(160, 90, 30, .14); }
html[data-theme="sunset"] .tracklist .tl-tabs, html[data-theme="sunset"] .tracklist .tl-bar { background: var(--tl-top); }
html[data-theme="sunset"] .tracklist .tl-tab { background: #fdf0dc; border-color: #e3bf93; color: #6b4a2c; }
html[data-theme="sunset"] .tracklist .tl-tab.sel { border-bottom-color: var(--tl-top); background: linear-gradient(180deg, #fffaf2, var(--tl-top)); color: var(--text); }
html[data-theme="sunset"] .tracklist .tl-lane-head { background: #fbefdc; }
html[data-theme="sunset"] .tracklist .tl-slot.filled { background: #fde4c4; border-color: #e3bf93; }

/* ------------------------------------------------------------- hover glow (no grow, no JS) */
:root { --glow: rgba(216, 180, 254, .85); }
html[data-theme="sunset"] { --glow: rgba(249, 115, 22, .55); }
.btn, .tl-btn, .add-btn, .tab .name, .bb-btn, .theme-btn, .menu-item, .sb-tab, .sb-chip, .switch button,
.tl-tab, .tl-slot-add, .update-badge, .fx-toggle, .linkish, .tab-x, .tl-mute, .tl-lane-del {
  transition: text-shadow .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}
:is(.btn, .tl-btn, .add-btn, .tab .name, .bb-btn, .theme-btn, .menu-item, .sb-tab, .sb-chip, .switch button,
    .tl-tab, .tl-slot-add, .fx-toggle, .linkish, .tab-x, .tl-mute, .tl-lane-del):hover:not(:disabled) {
  text-shadow: 0 0 8px var(--glow), 0 0 2px var(--glow);
}
.update-badge:hover { box-shadow: 0 0 12px rgba(250, 204, 21, .7); }
.bb-btn:hover { border-color: var(--accent); }
.theme-btn:hover { box-shadow: 0 0 10px var(--accent-soft); }

/* ------------------------------------------------------------- vertical (tall) layout: sections stack */
html.vert body:not(.in-plugin) .rack { max-width: 640px; }
html.vert .face, html.vert .face.clip { grid-template-columns: 1fr 1fr; justify-items: center; }
html.vert .meters { grid-column: 1 / -1; height: 120px; }
html.vert .face.clip {
  grid-template-areas: "meter meter" "left right" "strip strip" "row row" "bottom bottom";
}
html.vert .face.comp {
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "mode mode" "meter meter" "left right" "row row" "bottom bottom" "strip strip";
}
html.vert .face .bigmeter-wrap { width: 100%; }
html.vert .face-row { flex-wrap: wrap; justify-content: center; }
html.vert .face.comp .fm-track { min-height: 200px; }
html.vert .tl-bar { gap: 6px 8px; }
html.vert .tl-right { margin-left: 0; flex-wrap: wrap; }
html.vert .tl-body { flex-direction: column; }
html.vert .tl-master { width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
html.vert .tl-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
html.vert .tl-scroll { min-height: 200px; }
html.vert .flow { grid-template-columns: 1fr; }

/* ------------------------------------------------------------- colour tokens */
/* accent-strong: filled buttons with white text; accent-text: accent-coloured words;
   neutral: badges + Sign in. Yellow is only Visualize's colour. */
:root {
  --accent-strong: #7c3aed; --accent-text: #d8b4fe; --neutral-fill: #e7e2ee; --neutral-ink: #17111f;
  --lt-fx: #b46cff; --lt-snd: #4f9dff; --lt-out: #ff8a2a; --led-ring: #6d5a8a; --playhead: #f5efff;
}
html[data-theme="sunset"] {
  --accent-strong: #c2410c; --accent-text: #a63a08; --neutral-fill: #4a3322; --neutral-ink: #fff;
  --lt-fx: #8b2be2; --lt-snd: #1f63d6; --lt-out: #e2560b; --led-ring: #9c7650; --playhead: #c2410c;
  --muted: #7a5534;  /* 5.3:1 on the panels (was #8b6544) */
}

/* ------------------------------------------------------------- lights by meaning */
/* purple = effects, blue = sounds / tracklist, orange = master / output. Only the lights. */
.power::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--led-ring); }
.power.on::before { background: var(--lt-fx); box-shadow: 0 0 9px var(--lt-fx), 0 0 2px #fff inset; }
html[data-theme="sunset"] .power, html[data-theme="sunset"] .tab-num { filter: none; }
html[data-theme="sunset"] .power.on::before { box-shadow: 0 0 7px var(--lt-fx); }
.tabs .samples-tab .power::before { box-shadow: inset 0 0 0 1.5px #7fa6e6; }
.tabs .samples-tab .power.on::before { background: #7cb8ff; box-shadow: 0 0 8px #7cb8ff; }
.tabs .tab[data-fx="master"] .power.on::before { background: var(--lt-out); box-shadow: 0 0 9px var(--lt-out); }
.tl-slot-led { background: transparent; box-shadow: inset 0 0 0 1.5px var(--led-ring); }
.tl-slot.on .tl-slot-led { background: var(--lt-out); box-shadow: 0 0 8px var(--lt-out); }
.tl-mute.on { background: var(--lt-snd); border-color: var(--lt-snd); color: #fff; }
.limit.on i { background: var(--lt-out); box-shadow: 0 0 6px var(--lt-out); }
.autothr.on i { background: var(--lt-fx); box-shadow: 0 0 10px var(--lt-fx); }
.ie-fx.on { background: var(--lt-fx); border-color: var(--lt-fx); color: #fff; box-shadow: 0 0 8px var(--lt-fx); }

/* chain number badges: neutral grey */
.tab-num { background: #3b3447; color: #ece6f5; box-shadow: none; }
html[data-theme="sunset"] .tab-num { background: #6e5845; color: #fff; }
.tab.drop-before { box-shadow: inset 3px 0 0 var(--accent); }
.tab.drop-after { box-shadow: inset -3px 0 0 var(--accent); }

/* yellow -> theme colours (outside Visualize) */
.sb-user { color: var(--text); }
.sb-name.playing b { color: var(--accent-text); }
.sb-chip.on, .sb-add { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }
.dly-title { color: var(--accent-text); }
.src-picker.on .sp-value { color: var(--accent-text); border-color: var(--accent); }
.src-picker.live .sp-value { color: #fff; background: var(--accent-strong); border-color: var(--accent-strong); box-shadow: 0 0 10px var(--accent-soft); }
.eq-handle.has-sc::after { color: #fff; background: var(--accent-strong); }
.scs-chip b { color: var(--accent-text); }
.scs-chip i { background: var(--accent); }
.scs-chip:hover { border-color: var(--accent); }
.scm-fill { background: linear-gradient(90deg, var(--accent-strong), var(--accent)); }
.plug-drop.over { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.ie-knob i { background: var(--text); }
.net.wait { color: #fb923c; }
.audio-start { background: var(--accent-strong); color: #fff; }
.audio-start::before { box-shadow: 0 0 14px var(--accent); }
.audio-start::after { box-shadow: 0 0 4px var(--accent-soft); }
.update-badge { background: var(--accent-strong); color: #fff; }
.update-badge:hover { box-shadow: 0 0 12px var(--accent); }
.tl-playhead { background: var(--playhead); box-shadow: 0 0 8px var(--playhead); }
.tl-clip.sel { border-color: var(--playhead); box-shadow: 0 0 0 1px var(--playhead), 0 0 12px var(--accent-soft); }
.tl-clip.dragging { box-shadow: 0 0 0 1px var(--playhead), 0 8px 20px rgba(0, 0, 0, .6); }
.tl-clip:hover .tl-clip-h, .tl-clip.sel .tl-clip-h { background: rgba(255, 255, 255, .3); }
.tl-bpm { color: #e9d5ff; }
.tl-tab.confirm { border-color: #ff3b6b; color: var(--text); }

/* ------------------------------------------------------------- tracklist bar: Zoom - +, Send */
.tl-zoom { gap: 3px; }
.tl-zoom-lbl { font-size: 11px; color: var(--muted); padding: 0 2px 0 4px; }
.tl-zoom .tl-btn { min-width: 28px; padding: 5px 8px; }
.tl-time { color: var(--text); }

/* ------------------------------------------------------------- Send dialog */
.send-box { width: min(400px, 100%); gap: 6px; }
.send-q { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.send-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.send-opts button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  text-align: left; background: var(--plate-2); border: 1px solid var(--line); color: var(--text);
}
.send-opts button b { font-size: 13px; }
.send-opts button small { font-size: 11px; color: var(--muted); }
.send-opts button.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 0 10px var(--accent-soft); }
.send-opts button:disabled { cursor: default; opacity: .6; }
.send-note { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.send-go { margin-top: 4px; font-size: 14px; }
.send-go:disabled { opacity: .6; }
.send-status { margin: 0; min-height: 16px; font-size: 12px; text-align: center; color: var(--text); }
.send-drag {
  padding: 18px 12px; border-radius: 12px; border: 2px dashed var(--accent); text-align: center; font-weight: 800;
  color: var(--text); background: var(--accent-soft); cursor: grab; user-select: none; -webkit-user-select: none;
}
.send-drag:active { cursor: grabbing; }
html[data-theme="sunset"] .send-opts button { background: #fffaf3; }
html[data-theme="sunset"] .save-back { background: rgba(90, 50, 20, .35); }

/* ------------------------------------------------------------- small windows: "more below" */
.bottom-bar::before {
  content: "▾"; position: absolute; left: 0; right: 0; bottom: 100%; height: 22px; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: center; font-size: 12px; color: var(--muted);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55)); opacity: 0; transition: opacity .2s;
}
html[data-theme="sunset"] .bottom-bar::before { background: linear-gradient(180deg, transparent, rgba(160, 100, 40, .3)); }
html.more-below .bottom-bar::before { opacity: 1; }

/* ------------------------------------------------------------- Sunset (light) contrast pass */
/* The glass sheen sits behind a panel's content (it washed out text near the top). */
.face { isolation: isolate; }
.face::before { z-index: -1; }
html[data-theme="sunset"] .toast { background: #3a2210; border-color: #3a2210; color: #fff7ec; }
html[data-theme="sunset"] .switch button.sel, html[data-theme="sunset"] .tl-btn.sel, html[data-theme="sunset"] .tl-btn.on { color: var(--accent-text); }
html[data-theme="sunset"] .tl-btn:hover { border-color: #c9762e; }
html[data-theme="sunset"] .tl-bar, html[data-theme="sunset"] .tl-tabs, html[data-theme="sunset"] .tl-master,
html[data-theme="sunset"] .tl-lane-head, html[data-theme="sunset"] .tl-editor { border-color: #e3bf93; }
html[data-theme="sunset"] .tl-ruler { background: #f1d8b5; border-bottom-color: #d9b48a; }
html[data-theme="sunset"] .tl-mark { color: #5e3d22; border-left-color: #b98d5f; background-image: linear-gradient(90deg, #cfa77a 1px, transparent 1px); }
html[data-theme="sunset"] .tl-grid i { border-left-color: rgba(120, 70, 30, .18); background-image: linear-gradient(90deg, rgba(120, 70, 30, .07) 1px, transparent 1px); }
html[data-theme="sunset"] .tl-lane { border-bottom-color: #ecd3b0; }
html[data-theme="sunset"] .tl-lane-head { color: var(--text); }
html[data-theme="sunset"] .tl-mute, html[data-theme="sunset"] .tl-lane-del { background: #fffaf3; border-color: #c9a57e; color: var(--text); }
html[data-theme="sunset"] .tl-mute.on { background: var(--lt-snd); border-color: var(--lt-snd); color: #fff; }
html[data-theme="sunset"] .tl-slot { border-color: #d9b48a; color: var(--muted); }
html[data-theme="sunset"] .tl-slot.filled { background: #fde4c4; border-color: #c9a57e; }
html[data-theme="sunset"] .tl-slot.filled b, html[data-theme="sunset"] .tl-slot-name b { color: var(--text); }
html[data-theme="sunset"] .tl-slot-menu { background: #fff8ee; border-color: #e3bf93; box-shadow: 0 10px 24px rgba(120, 60, 20, .25); }
html[data-theme="sunset"] .tl-slot-menu button:hover { background: #fde2bf; }
html[data-theme="sunset"] .tl-clip { background: linear-gradient(180deg, rgba(249, 115, 22, .32), rgba(194, 65, 12, .3)); border-color: #c2410c; box-shadow: 0 2px 6px rgba(120, 60, 20, .25); }
html[data-theme="sunset"] .tl-clip-name { color: #3a1a05; }
html[data-theme="sunset"] .tl-clip:hover .tl-clip-h, html[data-theme="sunset"] .tl-clip.sel .tl-clip-h { background: rgba(194, 65, 12, .35); }
html[data-theme="sunset"] .tl-tab-x, html[data-theme="sunset"] .tab-x { color: #7a5534; }
html[data-theme="sunset"] .tl-tab-add, html[data-theme="sunset"] .tl-ftab-add { border-color: #b98d5f; color: var(--text); }
html[data-theme="sunset"] .tl-tab-no { background: #fffaf3; border-color: #c9a57e; }
html[data-theme="sunset"] .tl-bpm { color: #8a3a0c; }
html[data-theme="sunset"] .tl-bpm-box.synced .tl-bpm { color: #166534; }
/* Visualize keeps its blue + yellow, readable on tan */
html[data-theme="sunset"] .face.viz .btn, html[data-theme="sunset"] .face.viz .btn.to-tl { color: var(--text); border-color: #5b7fcf; }
html[data-theme="sunset"] .face.viz .btn:hover { border-color: #b08800; box-shadow: 0 0 10px rgba(202, 138, 4, .35); }
html[data-theme="sunset"] .face.viz .btn:disabled { opacity: .55; }
html[data-theme="sunset"] .face.viz .clip-card { border-color: #9fb5e3; }
html[data-theme="sunset"] .face.viz .clip-card strong { color: #1e3a8a; }
html[data-theme="sunset"] .face.viz .clip-card .x { color: #7a5534; }
html[data-theme="sunset"] .ba-switch { border-color: #5b7fcf; }
html[data-theme="sunset"] .ba-switch button { background: #fffaf3; color: #1e3a8a; }
html[data-theme="sunset"] .ba-switch button + button { border-left-color: #5b7fcf; }
html[data-theme="sunset"] .ba-switch button.sel:first-child { background: #1d4ed8; color: #fff; }
html[data-theme="sunset"] .ba-switch button.sel:last-child { background: #facc15; color: #2a1d00; }
html[data-theme="sunset"] .drag-out { border-color: #a16207; color: #5c3d00; }
html[data-theme="sunset"] .fx-toggle { background: #fffaf3; border-color: #5b7fcf; color: #1e3a8a; }
html[data-theme="sunset"] .legend .lg:hover { background: rgba(120, 70, 30, .08); }
html[data-theme="sunset"] .legend .lg .sw { box-shadow: 0 0 0 1.5px var(--c), 0 0 0 2.5px rgba(90, 50, 20, .35); }
html[data-theme="sunset"] .take-note, html[data-theme="sunset"] .viz-empty { color: var(--muted); }
/* add menu, chips, inputs, misc */
html[data-theme="sunset"] .mi-icon { background: radial-gradient(circle at 35% 30%, #fff, #f6d6ad); border-color: #d9b48a; color: #8a3a0c; }
html[data-theme="sunset"] .menu-samples { border-top-color: #e3bf93; }
html[data-theme="sunset"] .add-btn .count { border-left-color: #d9b48a; }
html[data-theme="sunset"] .sb-tab, html[data-theme="sunset"] .sb-like, html[data-theme="sunset"] .sb-chip,
html[data-theme="sunset"] .mb-tab, html[data-theme="sunset"] .cloud-tab { border-color: #c9a57e; color: #6b4a2c; }
html[data-theme="sunset"] .sb-tab.on, html[data-theme="sunset"] .cloud-tab.on, html[data-theme="sunset"] .sb-chip.on { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
html[data-theme="sunset"] .sb-play { background: var(--accent-strong); }
html[data-theme="sunset"] .sb-item:hover { border-color: #d9b48a; background: rgba(249, 115, 22, .08); }
html[data-theme="sunset"] .net { background: #f6e1c3; }
html[data-theme="sunset"] .net.on { color: #15803d; }
html[data-theme="sunset"] .net.off { color: #b91c1c; }
html[data-theme="sunset"] .net.wait { color: #8f4306; }
html[data-theme="sunset"] .sp-btn, html[data-theme="sunset"] .sp-value, html[data-theme="sunset"] .eq-chip, html[data-theme="sunset"] .eq-sc { background: #fffaf3; border-color: #d9b48a; }
html[data-theme="sunset"] .eq-chip { color: #6b4a2c; }
html[data-theme="sunset"] .eq-chip.sel { color: var(--text); }
html[data-theme="sunset"] .eq-band-sc { border-left-color: #e3bf93; }
html[data-theme="sunset"] .scs-chip { background: #fffaf3; border-color: #d9b48a; }
html[data-theme="sunset"] .scm-well { background: #f3dcbd; border-color: #d9b48a; }
html[data-theme="sunset"] .autothr { background: linear-gradient(180deg, #fff8ee, #fbe3c3); border-color: #d9b48a; color: #6b4a2c; box-shadow: 0 2px 6px rgba(160, 90, 30, .15); }
html[data-theme="sunset"] .autothr.on { color: var(--text); border-color: var(--accent); }
html[data-theme="sunset"] .ie-fx { background: #fffaf3; }
html[data-theme="sunset"] .tune-note { color: var(--text); text-shadow: none; }
html[data-theme="sunset"] .tune-mid { background: #3a2210; }
html[data-theme="sunset"] .tune-scale, html[data-theme="sunset"] .fm-level, html[data-theme="sunset"] .strip-note { color: var(--muted); }
html[data-theme="sunset"] .off-note { background: #fff6ea; color: var(--text); }
html[data-theme="sunset"] .bb-ver { opacity: 1; }
html[data-theme="sunset"] .linkish { opacity: 1; }

/* Visualize takes never push the window sideways (narrow / tall windows) */
html .face.viz { justify-items: normal; }  /* tall layout sets justify-items: center for the grid faces; on this block face it shrank the takes to their widest content */
.face.viz .clips { flex-direction: column; overflow: visible; }
.face.viz .clip-card { min-width: 0; }
.clip-card .clip-top span { min-width: 0; }
html[data-theme="sunset"] .byline { color: #c8102e; text-shadow: 0 0 6px rgba(200, 16, 46, .25); }
html[data-theme="sunset"] .fm-scale span { color: #dcc6a8; }
html[data-theme="sunset"] .livestrip .live-tag { color: #ecd6b8; opacity: 1; }

/* ------------------------------------------------------------- ABC Synth (Sounds ▾ Synths) */
/* Blue like the Sounds zone. Sections A / B / C side by side when wide, stacked when narrow;
   the piano always runs the full width underneath. */
.synths-list .synth-row .mi-icon { background: radial-gradient(circle at 35% 30%, #2f5fb3, #0a1838); border-color: #1e3a8a; color: #dbeafe; }
.synths-list.compact { flex-direction: row; flex-wrap: wrap; }
.synths-list.compact .synth-row { width: auto; padding: 3px 12px 3px 4px; gap: 8px; border-color: var(--line); }
.synths-list.compact .synth-row .mi-icon { width: 24px; height: 24px; font-size: 13px; border-radius: 7px; }
.synths-list.compact .synth-row small { display: none; }
.synths-list.compact .synth-row.on { border-color: var(--lt-snd); }
.synths-list.compact.single { display: none; }
.synths-body.synth-open { gap: 6px; align-self: stretch; }
.synths-panel, .synths-panel .syn { width: 100%; }
.syn-note { color: var(--muted); font-size: 10.5px; }

.syn { --syn: var(--lt-snd); --syn-soft: rgba(79, 157, 255, .1); container-type: inline-size; display: flex; flex-direction: column; gap: 8px; }
.syn-head { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.syn-head .power { width: 26px; height: 26px; }
.syn .power.on::before { background: var(--syn); box-shadow: 0 0 8px var(--syn); }
.syn-name { font-size: 15px; letter-spacing: .08em; }
.syn-hint { margin-left: auto; color: var(--muted); font-size: 11px; text-align: right; }
.syn-sections { display: grid; grid-template-columns: 1.3fr 1.45fr .85fr; gap: 8px; }
.syn-sec { min-width: 0; border: 1px solid #1e3a6e; border-radius: 12px; padding: 6px 8px 6px;
  background: linear-gradient(180deg, var(--syn-soft), rgba(79, 157, 255, 0) 70%); display: flex; flex-direction: column; }
.syn-sec h3 { margin: 0 0 2px; display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.syn-sec h3 i { font-style: normal; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  background: var(--syn); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0; }
.syn-row { flex: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-around; gap: 2px 2px; }
.syn .knob { padding: 2px; }
.syn .knob .val { stroke: var(--syn); filter: drop-shadow(0 0 3px rgba(79, 157, 255, .6)); }
.syn .knob .cap { stroke: #2a4c86; }
.syn .knob .num { font-size: 11.5px; }
.syn .knob .lbl { font-size: 10px; letter-spacing: .1em; }
.syn .knob.dim, .syn .dim { opacity: .4; }
.syn-wave { display: flex; flex-direction: column; align-items: center; }
.syn-pct { font-size: 11px; font-weight: 700; color: var(--syn); font-variant-numeric: tabular-nums; min-height: 14px; line-height: 14px; }
.syn-mixbar { position: relative; width: 44px; height: 6px; min-height: 0; margin: 4px 0; border-radius: 3px; background: #1e3a6e; overflow: hidden; }
.syn-mixbar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--mix, 50%); background: var(--syn); }
/* Volume: a vertical bar that fills to the level you set */
.syn-vol { width: 50px; align-self: stretch; }
.syn-vol .fm-track { width: 22px; min-height: 84px; box-shadow: inset 0 0 10px rgba(79, 157, 255, .2); }
.syn-vol .fm-scale { left: -24px; width: 20px; }
.syn-vol .fm-fill.l { background: linear-gradient(0deg, #1d4ed8, #4f9dff 60%, #bfdbfe); box-shadow: 0 0 10px rgba(79, 157, 255, .55); }
.syn-vol .fm-peak, .syn-vol .fm-level { display: none; }
.syn-vol .fm-handle::before { background: #93c5fd; box-shadow: 0 0 6px #93c5fd; }
.syn-vol .fm-handle i { border-right-color: #93c5fd; filter: drop-shadow(0 0 4px rgba(147, 197, 253, .7)); }
.syn-vol .fm-label { letter-spacing: .1em; font-size: 10px; }
.syn-vol .fm-value { font-size: 11px; }
/* C: big switches */
.syn-c .syn-row { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 2px 4px; }
.syn-chordbox { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.syn-toggle { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--plate-2); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.syn-toggle i { width: 9px; height: 9px; border-radius: 50%; background: var(--led-off); flex: none; }
.syn-toggle.on { color: var(--text); border-color: var(--syn); box-shadow: inset 0 0 12px rgba(79, 157, 255, .18); }
.syn-toggle.on i { background: var(--syn); box-shadow: 0 0 8px var(--syn); }
.syn-mm { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.syn-mm button { flex: 1; background: transparent; border: 0; padding: 6px 8px; cursor: pointer; color: var(--muted);
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.syn-mm button + button { border-left: 1px solid var(--line); }
.syn-mm button.sel { background: var(--syn); color: #fff; }
.syn-oct { display: flex; align-items: center; justify-content: center; gap: 6px; }
.syn-oct-btn { width: 28px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: var(--plate-2); cursor: pointer; font-size: 15px; line-height: 1; }
.syn-oct-num { min-width: 30px; text-align: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* the piano */
.syn-piano { --bk-w: calc(100% / var(--nw, 15) * .6); position: relative; height: clamp(90px, 16vh, 140px); flex: none; touch-action: none;
  border: 1px solid #1e3a6e; border-radius: 10px; overflow: hidden; background: #02050c; cursor: pointer; }
.syn-whites { display: flex; height: 100%; }
.syn-key { position: relative; }
.syn-key.white { flex: 1; min-width: 0; background: linear-gradient(180deg, #e9effc, #f7f9ff 70%, #dfe6f5); border-right: 1px solid #9fb0cf;
  border-radius: 0 0 6px 6px; }
.syn-key.white:last-child { border-right: 0; }
.syn-blacks { position: absolute; left: 0; right: 0; top: 0; height: 60%; pointer-events: none; }
.syn-blacks .syn-key { position: absolute; top: 0; height: 100%; width: var(--bk-w); pointer-events: auto; border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, #232b3e, #070a12); box-shadow: 0 3px 4px rgba(0, 0, 0, .55), inset 0 -3px 0 #2c3650; }
.syn-key.white.lit { background: linear-gradient(180deg, #cfe2ff, #93c5fd); }
.syn-key.black.lit { background: linear-gradient(180deg, #3b82f6, #1e40af); }
.syn-key.white.down { background: linear-gradient(180deg, #93c5fd, #4f9dff); }
.syn-key.black.down { background: linear-gradient(180deg, #60a5fa, #1d4ed8); }
.syn-kl { position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; font-size: 10px; font-weight: 700; color: #6b7a99; pointer-events: none; }
.syn-key.black .syn-kl { bottom: 4px; color: #9fb0d4; font-size: 9px; }
.syn-kn { position: absolute; left: 0; right: 0; bottom: 19px; text-align: center; font-size: 9px; color: #8d9ab6; pointer-events: none; }
.syn-key.down .syn-kl, .syn-key.lit .syn-kl, .syn-key.down .syn-kn, .syn-key.lit .syn-kn { color: #0b1f4a; }
.syn-key.black.down .syn-kl, .syn-key.black.lit .syn-kl { color: #e0ecff; }
.syn.off .syn-sections { opacity: .55; filter: saturate(.4); }
.syn.off .syn-name { opacity: .7; }
/* big windows: bigger knobs */
@container (min-width: 1000px) {
  .syn .knob svg { width: 66px; height: 66px; }
  .syn-b .syn-row > .knob:nth-child(-n+2) svg { width: 56px; height: 56px; }
}
/* small plugin window: smaller knobs so A / B / C stay on one line each */
@container (max-width: 820px) {
  .syn-sections { grid-template-columns: 1.3fr 1.5fr minmax(128px, .7fr); }
  .syn .knob svg { width: 50px; height: 50px; }
  .syn-b .syn-row > .knob:nth-child(-n+2) svg { width: 42px; height: 42px; }
  .syn-toggle { padding: 7px 8px; }
}
/* narrow (vertical windows, phones): sections stack, each one a single row with its letter at the left */
@container (max-width: 620px) {
  .syn-sections { grid-template-columns: 1fr; gap: 6px; }
  .syn-sec { flex-direction: row; align-items: center; gap: 4px; padding: 4px 6px; }
  .syn-sec h3 { flex-direction: column; gap: 3px; margin: 0; width: 58px; flex: none; font-size: 8.5px; letter-spacing: .1em; text-align: center; }
  .syn-c .syn-row { flex-direction: row; align-items: center; justify-content: space-around; flex-wrap: wrap; gap: 6px; }
  .syn-chordbox { flex-direction: row; align-items: center; }
  .syn-toggle { padding: 7px 9px; font-size: 11px; }
  .syn-vol { align-self: auto; }
  .syn-vol .fm-track { min-height: 76px; }
}
@container (max-width: 470px) {
  .syn-sec h3 { width: 24px; }
  .syn-sec h3 span { display: none; }  /* just the letter: room for the controls */
  .syn-hint { display: none; }
  .syn .knob svg { width: 46px; height: 46px; }
  .syn-b .syn-row > .knob:nth-child(-n+2) svg { width: 40px; height: 40px; }
  .syn .knob .lbl { letter-spacing: .04em; }
}
html[data-theme="sunset"] .syn { --syn: #1f63d6; --syn-soft: rgba(31, 99, 214, .08); }
html[data-theme="sunset"] .syn-sec { border-color: #a9bfe6; background: linear-gradient(180deg, rgba(31, 99, 214, .08), rgba(255, 255, 255, .35) 70%); }
html[data-theme="sunset"] .syn .knob svg { filter: none; }
html[data-theme="sunset"] .syn .knob .track { stroke: #c9d6ee; }
html[data-theme="sunset"] .syn .knob .cap { fill: #1d2c4d; stroke: #3d5a91; }
html[data-theme="sunset"] .syn .knob .needle { stroke: #f2f6ff; }
html[data-theme="sunset"] .syn-mixbar { background: #c9d6ee; }
html[data-theme="sunset"] .syn-toggle, html[data-theme="sunset"] .syn-oct-btn { background: #fff8ee; }
html[data-theme="sunset"] .syn-toggle.on { background: #eef4ff; }
html[data-theme="sunset"] .syn-piano { border-color: #a9bfe6; }
html[data-theme="sunset"] .syn-vol .fm-track { background: #1d2c4d; }
html[data-theme="sunset"] .synths-list .synth-row .mi-icon { background: radial-gradient(circle at 35% 30%, #4f86e6, #1e3a8a); color: #fff; }
