/* ── Resizer handles ─────────────────────────────────────────────────── */
.resizer {
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.15s;
  z-index: 10;
}
.resizer:hover, .resizer.dragging { background: var(--accent); }
.resizer-col {
  width: 4px;
  cursor: col-resize;
  align-self: stretch;
}
.resizer-row {
  height: 4px;
  cursor: row-resize;
  width: 100%;
}

/* ── Reset & base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg0:    #0d0d1a;
  --bg1:    #14142b;
  --bg2:    #1e1e3a;
  --bg3:    #26264a;
  --border: #3a3a6a;
  --accent: #7c7cff;
  --accent2:#ff7cb8;
  --text:   #d4d4f0;
  --dim:    #7070a0;
  --green:  #4caf50;
  --red:    #f44336;
  --yellow: #ffca28;
  --header-h: 40px;
  --tracks-w: 440px;
  --editor-h: 180px;
  /* --ad-banner-h: 60px; */
}

html, body {
  height: 100%;
  height: 100dvh;  /* Mobile browsers with dynamic viewport */
  overflow: hidden;
  background: var(--bg0);
  color: var(--text);
  font-family: 'Segoe UI', 'Consolas', monospace;
  font-size: 13px;
  user-select: none;
}
body {
  /* Safe-area inset for notched phones (overridden by body.is-android below) */
  padding-top: env(safe-area-inset-top);
}

button {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 12px;
  touch-action: manipulation; /* prevent 300ms tap delay on Android */
}
button:hover { background: var(--accent); color: #fff; }
button.active { background: var(--accent); color: #fff; }

input[type="text"], input[type="number"], textarea {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 12px;
  outline: none;
}
input[type="number"] { width: 60px; }
input[type="text"]   { width: 50px; }

label { display: inline-flex; align-items: center; gap: 4px; }

.hidden { display: none !important; }
.sep    { width: 1px; background: var(--border); align-self: stretch; margin: 4px 6px; }
.sep.grow { flex: 1; background: none; }
.panel-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 4px 8px;
  font-weight: bold;
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Toolbar ─────────────────────────────────────────────────────────── */
#toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--header-h);
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  padding: 0 10px;
  flex-shrink: 0;
  overflow-x: hidden;  /* desktop: no scrollbar */
  position: relative;
}

#toolbar .toolbar-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 56px;
}
#toolbar .toolbar-scroll::-webkit-scrollbar { display: none; }

#toolbar .toolbar-arrow {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 4px;
  z-index: 2;
  background: color-mix(in srgb, var(--bg1) 72%, transparent);
}
#toolbar .toolbar-arrow-left { right: 30px; }
#toolbar .toolbar-arrow-right { right: 2px; }

#toolbar .transport { font-size: 16px; min-width: 32px; }
#btn-play.playing { background: var(--green); color: #000; }

#btn-rec { color: var(--red, #f44); }
#btn-rec.recording {
  background: var(--red, #c0392b);
  color: #fff;
  animation: rec-pulse 1s ease-in-out infinite;
}
@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

#progress-wrap {
  width: 140px;
  height: 12px;
  background: var(--bg3);
  border-radius: 6px;
  overflow: visible;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
#progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 6px;
  transition: width 0.1s linear;
  overflow: hidden;
  pointer-events: none;
}
.loop-region {
  position: absolute;
  top: 0; height: 100%;
  background: rgba(255, 202, 40, 0.25);
  pointer-events: none;
  border-radius: 3px;
}
.loop-marker {
  position: absolute;
  top: -4px; bottom: -4px;
  width: 3px;
  cursor: ew-resize;
  border-radius: 2px;
  pointer-events: none;
}
.loop-start-marker { background: var(--yellow); }
.loop-end-marker   { background: var(--yellow); }

#time-display { color: var(--yellow); font-size: 12px; white-space: nowrap; }
#status-msg   { color: var(--dim);    font-size: 11px; white-space: nowrap; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }

/* ── Trial badge ───────────────────────────────────────────────────────── */
#trial-badge {
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg3);
  color: var(--green, #7cffb8);
  border: 1px solid currentColor;
  user-select: none;
  cursor: pointer;
}
#trial-badge:hover { filter: brightness(1.1); }
#trial-badge.trial-badge--warning { color: var(--yellow, #ffca28); }
#trial-badge.trial-badge--urgent  { color: var(--red,    #ff5555); animation: trial-pulse 1s steps(1) infinite; }
@keyframes trial-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── Trial expiry overlay ───────────────────────────────────────────────── */
#trial-overlay {
  position: fixed;
  inset: 0;
  z-index: 40000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
}
#trial-overlay.hidden { display: none; }
#trial-overlay-box {
  background: var(--bg1, #1a1a2e);
  border: 1px solid var(--border, #3a3a6a);
  border-radius: 8px;
  padding: 40px 48px;
  max-width: 440px;
  text-align: center;
  color: var(--text, #e8e8ff);
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}
#trial-overlay-box h2 { font-size: 22px; margin: 0 0 16px; color: var(--yellow, #ffca28); }
#trial-overlay-box p  { margin: 0 0 12px; font-size: 14px; line-height: 1.6; }

/* IAP actions */
#iap-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.iap-btn {
  padding: 9px 20px;
  border-radius: 5px;
  border: 1px solid var(--border, #3a3a6a);
  background: var(--bg2, #22223a);
  color: var(--text, #e8e8ff);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.iap-btn:hover  { background: var(--bg3, #2e2e50); }
.iap-btn-primary {
  background: var(--accent, #7c4dff);
  border-color: var(--accent, #7c4dff);
  color: #fff;
  font-weight: bold;
}
.iap-btn-primary:hover { background: #6a3de8; }

/* License key row */
.iap-or { color: var(--dim, #888); font-size: 12px; margin: 4px 0 10px; }
#iap-key-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
#iap-license-input {
  padding: 7px 10px;
  border-radius: 4px;
  border: 1px solid var(--border, #3a3a6a);
  background: var(--bg1, #1a1a2e);
  color: var(--text, #e8e8ff);
  font-size: 13px;
  letter-spacing: 0.05em;
  width: 180px;
}
#iap-status {
  min-height: 18px;
  font-size: 12px;
  margin: 10px 0 0;
}

.auto-apply-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
  user-select: none;
}

.auto-apply-control input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}

.panel-header-with-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-min-btn {
  font-size: 11px;
  line-height: 1;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
}

#tracks-panel.minimized #tracks-table-wrap,
#tracks-panel.minimized #tracks-actions {
  display: none;
}

#tracks-panel.minimized #tracks-header .auto-apply-control {
  display: none;
}

#tracks-panel.minimized {
  width: 190px;
  min-width: 190px;
  flex: 0 0 190px;
}

#tracks-panel.minimized + #resize-tracks {
  display: none !important;
}

#piano-roll-panel.minimized canvas,
#piano-roll-panel.minimized #viz-canvas {
  display: none !important;
}

#piano-roll-panel.minimized #piano-roll-header > :not(:first-child) {
  display: none;
}

#piano-roll-panel.minimized #piano-roll-header {
  justify-content: space-between;
}

#piano-roll-panel.minimized {
  flex: 0 0 auto;
  height: 34px;
  min-height: 34px;
}

#right-col.show-mixer #piano-roll-panel.minimized {
  flex: 0 0 150px;
  width: 150px;
  min-width: 150px;
  height: auto;
  min-height: 0;
  border-right: 1px solid var(--border);
}

#right-col.show-mixer #piano-roll-panel.minimized + #resize-mixer {
  display: none !important;
}

#right-col.show-mixer #piano-roll-panel.minimized ~ #mixer-panel {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
}

#mixer-panel.minimized #mixer-strips,
#mixer-panel.minimized #mixer-header > :not(:first-child) {
  display: none;
}

#mixer-panel.minimized {
  width: 170px;
  min-width: 170px;
  flex: 0 0 170px;
}

#editor-panel.minimized #editor-findbar,
#editor-panel.minimized #editor-tools-row,
#editor-panel.minimized #abc-editor,
#editor-panel.minimized #abc-table-wrap,
#editor-panel.minimized #abc-hint-tooltip,
#editor-panel.minimized #editor-header > :not(:first-child) {
  display: none;
}

#editor-panel.minimized {
  height: 34px;
  min-height: 34px;
  flex: 0 0 34px;
}

/* ── Server status dot ───────────────────────────────────────────────── */
.server-dot { font-size: 14px; line-height: 1; }
.server-dot--connected    { color: var(--green); }
.server-dot--disconnected { color: var(--red); }
.server-dot--error        { color: var(--yellow); }

/* ── Piano roll mode buttons + snap ─────────────────────────────────── */
.mode-btn {
  padding: 2px 7px;
  font-size: 11px;
  background: var(--bg3);
  border: 1px solid var(--border);
}
.mode-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mode-btn.recording { color: #ff5555; border-color: #ff5555; }

/* ── Intro / About side panel ────────────────────────────────────────── */
#intro-panel {
  position: fixed;
  top: 0; right: 0;
  width: 290px;
  height: 100vh;
  background: var(--bg1);
  border-left: 1px solid var(--border);
  box-shadow: -6px 0 28px rgba(0,0,0,0.55);
  z-index: 20000;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.22s cubic-bezier(.4,0,.2,1);
}
#intro-panel.hidden {
  transform: translateX(100%);
  pointer-events: none;
}
#intro-panel-header {
  background: var(--bg2);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: bold;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
#intro-panel-header button {
  background: none;
  border: none;
  color: var(--dim);
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
#intro-panel-header button:hover { color: var(--text); background: none; }
#intro-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#intro-desc {
  font-size: 12px;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
}
#intro-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#intro-features li {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.5;
  padding: 7px 9px;
  background: var(--bg2);
  border-radius: 4px;
  border-left: 2px solid var(--accent);
}
#intro-features li b {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
  font-size: 11.5px;
}
#intro-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
}
#intro-instructions-btn {
  padding: 7px 10px;
  font-size: 12px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}
#intro-instructions-btn:hover { background: var(--accent); color: #fff; }
#intro-dismiss-btn {
  padding: 7px 10px;
  font-size: 12px;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
}
#intro-dismiss-btn:hover { background: #9494ff; border-color: #9494ff; }
#intro-forum-btn {
  display: block;
  padding: 7px 10px;
  font-size: 12px;
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--accent2);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
#intro-forum-btn:hover { background: var(--accent2); color: #fff; }
#snap-grid {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 11px;
  padding: 1px 3px;
}
#piano-roll-header { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
#roll-velocity-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#roll-velocity {
  width: 86px;
}
#roll-velocity:disabled {
  opacity: 0.45;
}
#roll-velocity-value {
  min-width: 28px;
  text-align: right;
  color: var(--subtext);
}

/* ── Main layout ─────────────────────────────────────────────────────── */
body { display: flex; flex-direction: column; }

#main {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* Tracks panel */
#tracks-panel {
  width: var(--tracks-w);
  min-width: 320px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}
#tracks-table-wrap { flex: 1; overflow-y: auto; }
#tracks-table {
  width: 100%;
  border-collapse: collapse;
}
#tracks-table th, #tracks-table td {
  padding: 3px 5px;
  text-align: left;
  border-bottom: 1px solid var(--bg3);
  white-space: nowrap;
}
#tracks-table th { background: var(--bg2); color: var(--dim); font-size: 11px; }
#tracks-table tr.selected td { background: var(--bg3); color: #fff; }
#tracks-table tr:hover td { background: var(--bg2); cursor: pointer; }

#tracks-table td.mute-btn, #tracks-table td.solo-btn { text-align: center; }
#tracks-table td.mute-btn button, #tracks-table td.solo-btn button {
  width: 26px; padding: 1px;
}
#tracks-table td.mute-btn button.active  { background: var(--red);    color: #fff; }
#tracks-table td.solo-btn button.active  { background: var(--yellow); color: #000; }

#tracks-table input[type="range"] { width: 60px; cursor: pointer; }
#tracks-table input[type="text"]  { width: 90px; }
#tracks-table input[type="range"].automation-armed { accent-color: var(--red); }
.track-drag-handle { cursor: grab; color: var(--dim); padding: 0 4px; user-select: none; font-size: 14px; }
#tracks-table tr.drag-over td { background: var(--accent) !important; opacity: 0.5; }
#tracks-table tr.dragging   { opacity: 0.4; }

#tracks-actions {
  padding: 4px 8px;
  border-top: 1px solid var(--border);
  background: var(--bg1);
}

/* Right column */
#right-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#piano-roll-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}
#piano-roll {
  flex: 1;
  display: block;
  width: 100%;
  cursor: crosshair;
  background: var(--bg0);
  position: relative;
  z-index: 1;
}
#viz-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Mixer */
#mixer-panel {
  width: 240px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg1);
  flex-shrink: 0;
}
#right-col.show-mixer { flex-direction: row; }
#right-col.show-mixer #piano-roll-panel { flex: 1; }

#right-col.show-mixer #piano-roll-panel.minimized + #resize-mixer,
#right-col.show-mixer:has(#mixer-panel.minimized) #resize-mixer {
  display: none !important;
}

#mixer-strips { flex: 1; overflow-y: auto; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.mixer-strip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 6px;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
}
.mixer-strip .strip-label { font-size: 10px; color: #aaa; white-space: nowrap; }
.mixer-strip .strip-name { font-size: 10px; color: var(--dim); width: 52px; min-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mixer-strip .strip-inst { font-size: 9px; color: #5a5a8a; width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mixer-strip input[type="range"] {
  writing-mode: horizontal-tb;
  direction: ltr;
  height: auto;
  width: 80px;
  cursor: pointer;
  flex-shrink: 0;
}
.mixer-strip input[type="range"].automation-armed { accent-color: var(--red); }
.mixer-strip.strip-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mixer-strip.master-strip { border-left: 2px solid #ffca28; background: #1a1a22; }
.strip-select-row {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--dim);
  cursor: pointer;
  align-self: stretch;
}
.strip-select-row:has(.strip-select:checked) { color: var(--accent); }
.strip-select { accent-color: var(--accent); cursor: pointer; width: 12px; height: 12px; }
.automation-controls {
  display: inline-flex;
  flex-direction: row;
  gap: 3px;
  align-items: center;
}
.automation-controls button {
  padding: 1px 4px;
  font-size: 9px;
}
.automation-arm-btn.active {
  background: var(--red);
  border-color: #ff8a80;
}
.automation-meta {
  font-size: 10px;
  color: var(--dim);
  text-align: center;
}

.integra-fx-strip {
  border-color: #2b4e72;
  background: linear-gradient(180deg, #172536, #142130);
}

/* ── Soft FX strip (Tuna.js) ─────────────────────────────────────────── */
.soft-fx-strip {
  border-color: #2e6b35;
  background: linear-gradient(180deg, #152418, #111e14);
}
.soft-fx-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}
.soft-fx-title {
  font-size: 11px;
  color: #7fff9f;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.soft-fx-note {
  font-size: 10px;
  color: #9dbeab;
  flex: 1;
}
.soft-fx-enable {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #aad6b2;
  cursor: pointer;
}
.soft-fx-val {
  width: 36px;
  font-size: 10px;
  color: #c5efcc;
  text-align: right;
}
.integra-fx-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
}
.integra-fx-title {
  font-size: 11px;
  color: #8fc7ff;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.integra-fx-note {
  font-size: 10px;
  color: #9db1c7;
}
.integra-fx-tabs {
  display: inline-flex;
  gap: 4px;
}
.integra-fx-tab {
  padding: 2px 8px;
  font-size: 10px;
  border: 1px solid #355b80;
  border-radius: 3px;
  background: #0f1c2a;
  color: #bdd9f4;
  cursor: pointer;
}
.integra-fx-tab.active {
  background: #2d5b88;
  border-color: #7db2e6;
  color: #fff;
}
.integra-fx-body {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}
.integra-fx-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.integra-fx-label {
  font-size: 10px;
  color: #a7bfd6;
  min-width: 120px;
}
.integra-fx-row select,
.integra-fx-row input[type="text"] {
  background: #0d1622;
  color: #e6f1ff;
  border: 1px solid #34516e;
  border-radius: 3px;
  font-size: 10px;
  padding: 2px 4px;
}
.integra-fx-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.integra-fx-level input[type="range"] {
  width: 110px;
}
.integra-fx-value {
  width: 28px;
  font-size: 10px;
  color: #d5e9ff;
}

/* ── ABC Editor ──────────────────────────────────────────────────────── */
#editor-panel {
  height: var(--editor-h);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
#editor-findbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.editor-findbar-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
#abc-find-input,
#abc-replace-input {
  flex: 1;
  min-width: 120px;
  max-width: none;
}
.editor-find-count {
  min-width: 76px;
  text-align: center;
  color: var(--dim);
  font-size: 11px;
}
.editor-find-opt {
  min-width: 34px;
  padding: 2px 6px;
  font-size: 11px;
}
.editor-find-opt.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
#editor-tools-row {
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
  padding: 4px 6px;
}
#editor-tools-row button {
  font-size: 11px;
  padding: 2px 8px;
}
#btn-editor-hints.active {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #fff;
}
#btn-editor-quickfix {
  border-color: var(--accent);
}
#abc-editor {
  flex: 1;
  resize: none;
  background: var(--bg1);
  color: var(--text);
  border: none;
  padding: 6px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  outline: none;
  width: 100%;
  white-space: pre;
}
#abc-editor:focus { outline: 1px solid var(--accent); }
#abc-table-wrap {
  flex: 1;
  overflow: auto;
  background: var(--bg1);
  border-top: 1px solid var(--border);
  padding: 6px;
}
.abc-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.abc-table th,
.abc-table td {
  border: 1px solid var(--border);
  padding: 4px;
  font-size: 11px;
}
.abc-table th {
  background: var(--bg2);
  color: var(--dim);
  text-align: left;
}
.abc-table td.meta {
  white-space: nowrap;
  color: var(--dim);
  width: 90px;
}
.abc-table td.bar-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
}
.bar-label {
  flex: 1;
  font-size: 11px;
}
.bar-copy-btn,
.bar-paste-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--dim);
  font-size: 11px;
  padding: 1px 4px;
  cursor: pointer;
  line-height: 1.4;
}
.bar-copy-btn:hover,
.bar-paste-btn:hover {
  background: var(--bg2);
  color: var(--text);
}
.abc-table td input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg0);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: 'Consolas', 'Courier New', monospace;
  overflow: hidden;
}

.abc-table td.abc-table-cell-selected {
  background: color-mix(in srgb, var(--accent, #4a9eff) 16%, var(--bg1));
}

.abc-table td.abc-table-cell-selected input {
  border-color: var(--accent, #4a9eff);
  box-shadow: 0 0 0 1px var(--accent, #4a9eff) inset;
}

.phantom-row td {
  opacity: 0.45;
}
.bar-group-start td {
  border-top: 2px solid var(--border);
}
.phantom-row td input {
  border-style: dashed;
}
.phantom-row td input:focus {
  opacity: 1;
  border-style: solid;
  border-color: var(--accent, #4a9eff);
}
.phantom-row td.meta {
  font-style: italic;
}

/* Fix cell border bleeding on Android portrait */
@media (orientation: portrait) {
  body.is-android .abc-table {
    border-collapse: separate;
    border-spacing: 0;
  }

  body.is-android .abc-table td {
    border: 1px solid var(--border);
    overflow: hidden;
    box-sizing: border-box;
    font-size: 11px;
    padding: 2px 2px;
    margin: 0;
  }

  body.is-android .abc-table td input {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg0);
    color: var(--text);
    border: none;
    font-family: 'Consolas', 'Courier New', monospace;
    padding: 1px 2px;
    overflow: hidden;
  }
}
.beat-palette-popover {
  position: fixed;
  z-index: 160;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px 6px;
  background: rgba(20, 20, 43, 0.97);
  border: 1px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  max-width: 260px;
  pointer-events: auto;
}
.beat-palette-btn {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px;
  padding: 2px 7px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.5;
}
.beat-palette-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.beat-palette-btn--clear {
  color: #ff7c7c;
  border-color: #ff7c7c44;
}
.beat-palette-btn--clear:hover {
  background: #7c1010;
  color: #fff;
  border-color: #ff7c7c;
}
#abc-hint-tooltip {
  position: fixed;
  z-index: 150;
  max-width: min(460px, calc(100vw - 24px));
  background: rgba(20, 20, 43, 0.97);
  border: 1px solid var(--accent2);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: auto;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  white-space: normal;
}
#abc-hint-tooltip .hint-title {
  color: var(--accent2);
  font-weight: 600;
  margin-bottom: 4px;
}
#abc-hint-tooltip .hint-body {
  margin-bottom: 6px;
}
#abc-hint-tooltip .hint-fixes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
#abc-hint-tooltip .hint-fix-btn {
  pointer-events: auto;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  cursor: pointer;
}
#abc-hint-tooltip .hint-fix-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ── GitHub Copilot AI Panel ─────────────────────────────────────────── */
#btn-editor-copilot.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
#editor-panel.minimized #copilot-panel { display: none; }

#copilot-panel {
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: 290px;
  flex-shrink: 0;
}
.copilot-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.copilot-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
  flex: 1;
}
.copilot-header button {
  font-size: 11px;
  padding: 2px 6px;
}
#copilot-model-select {
  font-size: 11px;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 4px;
  max-width: 120px;
}
#copilot-token-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: color-mix(in srgb, var(--accent) 8%, var(--bg2));
  border-bottom: 1px solid var(--border);
}
#copilot-token-input {
  flex: 1;
  font-family: monospace;
  font-size: 11px;
}
.copilot-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.copilot-prompt-row {
  display: flex;
  gap: 4px;
  align-items: flex-start;
}
#btn-copilot-mic {
  flex-shrink: 0;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  cursor: pointer;
  align-self: stretch;
  line-height: 1;
}
#btn-copilot-mic.recording {
  background: #7c1010;
  border-color: #ff4444;
  color: #fff;
  animation: copilot-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes copilot-pulse {
  from { box-shadow: 0 0 0 0 rgba(255,68,68,0.5); }
  to   { box-shadow: 0 0 0 5px rgba(255,68,68,0); }
}
#btn-copilot-tts {
  font-size: 11px;
  padding: 2px 8px;
}
#btn-copilot-tts.speaking {
  background: var(--accent2);
  color: #fff;
  border-color: var(--accent2);
}
#copilot-prompt {
  flex: 1;
  resize: none;
  font-size: 12px;
  min-height: 42px;
  max-height: 80px;
  background: var(--bg0);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
  font-family: inherit;
}
#copilot-prompt:focus { outline: 1px solid var(--accent); }
#copilot-response {
  flex: 1;
  resize: none;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px;
  background: var(--bg0);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
  min-height: 60px;
  overflow-y: auto;
}
.copilot-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.copilot-actions button {
  font-size: 11px;
  padding: 2px 8px;
}
.copilot-status {
  font-size: 11px;
  color: var(--dim);
  flex: 1;
}
.copilot-status--warn { color: var(--accent2); }
.copilot-status--error { color: #ff7c7c; }

/* ── Overlays ────────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30000;
}
.overlay-box {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 360px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.overlay-header {
  background: var(--bg2);
  padding: 8px 12px;
  font-weight: bold;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#inst-search {
  margin: 6px 8px;
  width: calc(100% - 16px);
}
#inst-list, #browser-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
#inst-list .inst-item, #browser-list .browser-item {
  padding: 5px 12px;
  cursor: pointer;
  font-size: 12px;
}
#inst-list .inst-item:hover, #browser-list .browser-item:hover { background: var(--bg3); }
#inst-list .inst-item.selected, #browser-list .browser-item.selected { background: var(--accent); color: #fff; }
#browser-path { padding: 6px 12px; color: var(--dim); font-size: 11px; }

/* ── Help overlay ────────────────────────────────────────────────────── */
.help-box {
  width: min(760px, calc(100vw - 32px));
  max-height: min(90vh, 880px);
}
.help-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.help-body section { display: flex; flex-direction: column; gap: 6px; }
.help-body h3 { font-size: 12px; font-weight: bold; color: var(--accent); letter-spacing: 0.03em; }
.help-body p, .help-body li { font-size: 12px; color: var(--text); line-height: 1.6; }
.help-body ul { padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.help-body a { color: var(--accent2); text-decoration: none; }
.help-body a:hover { text-decoration: underline; }
.help-body code { background: var(--bg3); border-radius: 3px; padding: 1px 5px; font-size: 11px; }
.help-body pre { background: var(--bg0); border-radius: 4px; padding: 8px 10px; font-size: 11px; overflow-x: auto; color: var(--text); line-height: 1.6; margin: 0; }
.help-body ol { padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text); line-height: 1.6; }
.help-table { border-collapse: collapse; font-size: 12px; width: 100%; }
.help-table td { padding: 3px 8px 3px 0; vertical-align: top; }
.help-table td:first-child { white-space: nowrap; padding-right: 16px; }
kbd {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 11px;
  font-family: 'Consolas', monospace;
  color: var(--text);
}

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg1); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Ad Banner (web only) ────────────────────────────────────────────── */
/* Hidden by default; shown when body.is-web is present (set in app.js). */
/* As a flex child of body (column), it naturally shrinks the space        */
/* available to #main and #editor-panel — no extra JS required.           */
/* #ad-banner {
  display: none;
  height: var(--ad-banner-h);
  min-height: var(--ad-banner-h);
  flex-shrink: 0;
  background: var(--bg1);
  border-top: 1px solid var(--border);
  overflow: hidden;
  align-items: center;
  justify-content: center;
}
body.is-web #ad-banner { display: flex; }
body.is-purchased #ad-banner { display: none !important; } */

/* ── Mobile / narrow-window responsive layout ────────────────────────── */
@media (max-width: 600px) {

  /* Toolbar: single row that scrolls horizontally */
  #toolbar {
    height: var(--header-h);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 6px;
    gap: 4px;
  }
  #toolbar::-webkit-scrollbar { display: none; }

  /* Hide less-critical toolbar items to save space */
  #btn-loop,
  #btn-set-loop-start,
  #btn-set-loop-end { display: none; }

  label:has(#key-input),
  label:has(#meter-input) { display: none; }

  #progress-wrap { width: 70px; }
  #status-msg    { display: none; }

  /* Separator lines become thin spacers; grow separator still expands */
  .sep:not(.grow) { margin: 2px 3px; }

  /* ── Main area: stack tracks above piano roll ── */
  #main { flex-direction: column; }

  #tracks-panel {
    width: 100% !important;   /* override JS-set inline width */
    min-width: unset;
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  /* Hide the vertical column-resize handle between tracks and roll */
  #resize-tracks { display: none; }

  /* Tracks table: hide less-essential columns */
  /* Col order: drag | # | Mute | Solo | Ch | Name | Instrument | Vol | Pan | edit | del */
  #tracks-table th:nth-child(4),
  #tracks-table td:nth-child(4),   /* Solo */
  #tracks-table th:nth-child(9),
  #tracks-table td:nth-child(9) {  /* Pan  */
    display: none;
  }

  #tracks-table input[type="range"] { width: 48px; }
  #tracks-table input[type="text"]  { width: 64px; }

  /* ── Right column: keep column direction (piano roll + mixer stacked) ── */
  #right-col { flex: 1; min-height: 0; }

  /* Mixer goes below piano roll, full-width, fixed height so it scrolls */
  #mixer-panel {
    width: 100% !important;
    height: 160px;
    flex-shrink: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    overflow: hidden;
  }
  #mixer-panel #mixer-strips {
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
    padding: 4px;
    gap: 2px;
  }
  /* On narrow mobile, let sliders be shorter */
  #mixer-panel .mixer-strip input[type="range"] { width: 60px; }
  #right-col.show-mixer             { flex-direction: column; }
  #right-col.show-mixer #piano-roll-panel { flex: 1; }

  /* Editor panel height */
  #editor-panel { height: 140px; }

  /* Overlay: fill narrow screen */
  .overlay-box { width: calc(100% - 16px); max-height: 90vh; }

  /* Larger tap targets */
  button { padding: 5px 10px; min-height: 28px; }
  #toolbar button.transport { min-width: 36px; }
}

@media (max-width: 400px) {
  /* Extra-small: hide # and Ch columns too */
  #tracks-table th:nth-child(2),
  #tracks-table td:nth-child(2),   /* # */
  #tracks-table th:nth-child(5),
  #tracks-table td:nth-child(5) {  /* Ch */
    display: none;
  }

  /* BPM input narrower */
  #bpm-input { width: 48px; }
}

/* ── Mobile landscape (e.g. phone rotated) ───────────────────────────── */
@media (orientation: landscape) and (max-height: 500px) {
  /* Toolbar: single scrollable row (same as portrait mobile) */
  #toolbar {
    height: var(--header-h);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 6px;
    gap: 4px;
  }
  #toolbar::-webkit-scrollbar { display: none; }

  /* Suppress items that waste space */
  #btn-loop, #btn-set-loop-start, #btn-set-loop-end { display: none; }
  label:has(#key-input), label:has(#meter-input) { display: none; }
  #progress-wrap { width: 70px; }
  #status-msg    { display: none; }
  .sep:not(.grow) { margin: 2px 3px; }

  /* Side-by-side layout: tracks left, roll right (like desktop but compact) */
  #main { flex-direction: row; }
  #tracks-panel {
    width: 220px !important;
    min-width: unset;
    max-height: unset;
    border-right: 1px solid var(--border);
    border-bottom: none;
  }
  #resize-tracks { display: none; }

  /* Larger tap targets */
  button { padding: 4px 8px; min-height: 26px; }
}

/* ── Android vertical reflow for all windows ─────────────────────────── */
body.is-android {
  --android-statusbar-pad: env(safe-area-inset-top);
  --android-nav-pad: env(safe-area-inset-bottom);
  padding-top: calc(var(--header-h) + var(--android-statusbar-pad));
  padding-bottom: var(--android-nav-pad);
}

body.is-android #toolbar {
  position: fixed;
  top: var(--android-statusbar-pad);
  left: 0;
  right: 0;
  z-index: 10000; /* above trial-overlay (9999) and all other overlays */
  width: 100%;
}

body.is-android #main {
  flex-direction: column;
}

body.is-android #tracks-panel {
  width: 100% !important;
  min-width: 0;
  max-width: none;
  border-right: none;
  border-bottom: 1px solid var(--border);
  flex: 0 1 auto;
  max-height: 42vh;
}

body.is-android #tracks-panel.minimized {
  width: 100% !important;
  min-width: 0;
  flex: 0 0 34px;
}

/* On Android, tracks/mixer resizers become horizontal row handles */
body.is-android #resize-tracks,
body.is-android #resize-mixer {
  height: 10px !important;
  min-height: 10px !important;
  width: 100% !important;
  cursor: row-resize;
  flex-shrink: 0;
  margin: 0 !important;
  /* override .resizer-col's 4px width */
  align-self: auto;
}
body.is-android #resize-tracks {
  display: block !important; /* not .hidden by default, force show */
}

body.is-android #right-col,
body.is-android #right-col.show-mixer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

body.is-android #piano-roll-panel {
  width: 100% !important;
  min-width: 0;
  flex: 1 1 0;
  min-height: 120px;
  border-right: none;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

body.is-android #piano-roll-panel.minimized {
  width: 100% !important;
  min-width: 0 !important;
  flex: 0 0 34px !important;
  height: 34px !important;
  max-height: 34px !important;
  min-height: 34px !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.is-android #mixer-panel {
  width: 100% !important;
  min-width: 0;
  border-left: none;
  border-top: none !important;
  flex: 1 1 auto;
  min-height: 120px;
  margin: 0 !important;
  padding: 0 !important;
  overflow-y: auto;
}

body.is-android #mixer-panel.minimized {
  width: 100% !important;
  min-width: 0 !important;
  flex: 0 0 34px !important;
  height: 34px !important;
  max-height: 34px !important;
  min-height: 34px !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.is-android.minimized #mixer-panel.minimized {
  flex-basis: 34px !important;
}

/* Ultra-aggressive minimized mixer collapse */
body.is-android #mixer-panel[class*="minimized"] {
  height: 34px !important;
  max-height: 34px !important;
  flex-basis: 34px !important;
  margin: 0 !important;
}

/* resize-mixer on Android: controlled by .hidden (JS shows/hides with mixer) */
body.is-android #resize-mixer.hidden {
  display: none !important;
}

body.is-android #piano-roll-panel ~ #mixer-panel.minimized {
  margin-top: -1px !important;
}

/* Minimize mixer header styling when minimized in Android */
body.is-android #mixer-panel.minimized #mixer-header {
  padding: 3px 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
  border: none !important;
}

/* Show copy/paste buttons only in Android landscape mode */
body.is-android .bar-copy-btn,
body.is-android .bar-paste-btn {
  display: none !important;
}

/* Show on Android landscape */
@media (orientation: landscape) {
  body.is-android .bar-copy-btn,
  body.is-android .bar-paste-btn {
    display: inline-flex !important;
  }
}

body.is-android #resize-editor {
  height: 20px !important;
  min-height: 20px !important;
  width: 100% !important;
}

body.is-android #editor-panel {
  width: 100%;
  height: auto;
  min-height: 100px;
  margin: 0;
  min-height: 0;
  overflow: hidden;
}

body.is-android #abc-editor,
body.is-android #abc-table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y pan-x;
}

body.is-android #editor-panel.minimized {
  width: 100%;
  height: 34px;
  min-height: 34px;
}

@media (max-width: 600px) and (orientation: portrait) {
  body.is-android.editor-expanded #main {
    flex: 0 1 auto;
  }

  body.is-android.editor-expanded #editor-panel {
    flex: 1 1 0;
    height: auto;
    min-height: 140px;
  }
}

@media (orientation: landscape) {
  body.is-android #main {
    flex-direction: row;
    min-height: 0;
  }

  body.is-android #tracks-panel {
    width: clamp(180px, 32vw, 320px) !important;
    min-width: 160px;
    max-height: none;
    border-right: 1px solid var(--border);
    border-bottom: none;
    flex: 0 0 auto;
  }

  body.is-android #tracks-panel.minimized {
    width: 42px !important;
    min-width: 42px;
    flex: 0 0 42px;
  }

  body.is-android #right-col,
  body.is-android #right-col.show-mixer {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  body.is-android #piano-roll-panel {
    flex: 1 1 auto;
    min-height: 0;
  }

  body.is-android.tracks-roll-minimized #main {
    flex: 0 0 auto;
  }

  body.is-android.tracks-roll-minimized #editor-panel:not(.minimized) {
    flex: 1 1 auto;
    min-height: 0;
  }

  /* Ensure minimize button is visible in landscape minimized state */
  body.is-android #tracks-panel.minimized #tracks-header {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 2px 0;
  }

  body.is-android #tracks-panel.minimized #tracks-header > span {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    gap: 0;
  }

  body.is-android #tracks-panel.minimized #tracks-header > span > span {
    display: none;
  }

  body.is-android #tracks-panel.minimized #tracks-header .panel-min-btn {
    width: 100%;
    min-width: 100%;
    padding: 2px 0;
    font-size: 16px;
  }
}

/* ── WAM Plugin overlays & strips ───────────────────────────────────────── */
.wam-url-box { width: 420px; }
#wam-url-input {
  background: var(--bg0); color: var(--text);
  border: 1px solid var(--border); border-radius: 3px;
  padding: 4px 6px; font-size: 12px; width: 100%; box-sizing: border-box;
}
.wam-gui-box {
  width: min(700px, 95vw); max-height: 80vh; overflow: hidden;
}
#wam-gui-container {
  flex: 1; overflow: auto; background: #111; min-height: 200px;
}
.wam-fx-strip {
  border-color: #4a2e7a;
  background: linear-gradient(180deg, #1a1030, #140c28);
}
.wam-fx-title { font-size: 11px; color: #b07cff; font-weight: 700; }
.wam-fx-row {
  display: flex; align-items: center; gap: 4px;
  width: 100%; padding: 2px 0;
}
.wam-fx-name {
  flex: 1; font-size: 10px; color: #c8a8ff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wam-fx-btn {
  font-size: 10px; padding: 1px 5px;
  border: 1px solid #4a3a6a; border-radius: 3px;
  background: #1a1030; color: #c8a8ff; cursor: pointer;
}
.wam-fx-btn:hover { background: #2a1850; }
.wam-fx-bypassed { opacity: 0.45; }

