/* MGP32X console UI styles (strips, master, channel detail, LCD, widgets).
   Owner: ui-console. CONTRACTS §A1 (CSP: all styles here; JS only sets CSS variables / transforms via CSSOM), §C6.
   Every class is prefixed "mgp-". */

.mgp {
  --mgp-panel: #26282b;
  --mgp-panel-hi: #2f3236;
  --mgp-panel-st: #34373c;
  --mgp-edge: #18191b;
  --mgp-legend: #dfe2e5;
  --mgp-dim: #8e949b;
  --mgp-accent: #5b8fd6;
  --cap-red: #c8392f;
  --cap-orange: #e2892c;
  --cap-green: #3aa266;
  --cap-dkgreen: #23714a;
  --cap-blue: #3c7fd4;
  --cap-yellow: #d9b43a;
  --cap-white: #e8e9ea;
  --cap-grey: #8b9096;
  --cap-black: #3a3c40;
  --k: 36px;
  --strip-w: 56px;
  --fz-h: 160px;
  --cap-h: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--mgp-legend);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  box-sizing: border-box;
  line-height: 1.15;
}
.mgp *, .mgp *::before, .mgp *::after { box-sizing: border-box; }
.mgp-w { touch-action: none; cursor: ns-resize; }
.mgp-sw.mgp-w, .mgp-sel.mgp-w, .mgp-led.mgp-w { cursor: pointer; }
.mgp-locked { opacity: 0.3; }
html.mgp-helpmode .mgp-w { cursor: help; outline: 1px dashed rgba(120, 180, 255, 0.55); outline-offset: -1px; }

/* ------------------------------------------------------------------ console view */
.mgp-console {
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%;
  background: var(--mgp-panel); overflow: hidden;
}
.mgp-toolbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 4px 6px;
  background: #161719; border-bottom: 1px solid #000; overflow-x: auto; scrollbar-width: none;
  touch-action: pan-x;
}
.mgp-toolbar::-webkit-scrollbar { display: none; }
.mgp-banks, .mgp-opts { display: flex; gap: 4px; flex: 0 0 auto; }
.mgp-tbtn {
  font: inherit; font-size: 11px; line-height: 1; padding: 0 8px; min-height: 28px; min-width: 28px;
  border-radius: 5px; background: #2b2e32; color: #c9cdd2; border: 1px solid #44484e; white-space: nowrap;
  touch-action: manipulation; cursor: pointer;
}
.mgp-tbtn:disabled { opacity: 0.35; }
.mgp-tbtn.mgp-on { background: #34557f; color: #fff; border-color: #5d86bb; }
.mgp-tbtn-help { font-weight: 800; }
.mgp-mini {
  position: relative; flex: 1 1 160px; min-width: 110px; max-width: 360px; height: 24px; background: #0c0d0e;
  border-radius: 4px; touch-action: none; cursor: pointer; overflow: hidden; border: 1px solid #333;
}
.mgp-mini-cells { position: absolute; inset: 3px 2px; display: flex; gap: 1px; }
.mgp-mini-c { flex: 1 1 0; background: var(--c, #777); opacity: 0.55; border-radius: 1px; }
.mgp-mini-st { flex-grow: 1.15; }
.mgp-mini-win {
  position: absolute; top: 0; bottom: 0; left: 0; width: 40px; border: 2px solid #fff; border-radius: 4px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25); pointer-events: none;
}
.mgp-scroller {
  flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch; position: relative;
}
.mgp-strips { display: flex; width: max-content; min-height: 100%; padding: 0 6px 0 4px; background: #1a1b1d; }
.mgp-mode-compact .mgp-strips { height: 100%; }

.mgp-strip {
  width: var(--strip-w); flex: 0 0 auto; display: flex; flex-direction: column; position: relative;
  background: linear-gradient(90deg, #2a2c30 0, #2c2f33 50%, #28292d 100%);
  border-right: 1px solid var(--mgp-edge); box-shadow: inset 1px 0 0 #3a3d42;
}
.mgp-stereo { background: linear-gradient(90deg, #32353a 0, #35383d 50%, #303337 100%); }
.mgp-strip:nth-child(8n) { border-right: 2px solid #111; }
.mgp-cell { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.mgp-rh-knob { height: calc(var(--k) + 15px); }
.mgp-rh-sw { height: 24px; gap: 4px; }
.mgp-r-num { height: 16px; gap: 3px; border-bottom: 1px solid #1c1d1f; }
.mgp-num { font-size: 10px; font-weight: 800; color: #fff; letter-spacing: 0.02em; }
.mgp-dsrc { display: flex; align-items: center; gap: 1px; margin-left: 2px; }
.mgp-dsrc-t { font-size: 6px; color: var(--mgp-dim); }
.mgp-r-hi { border-top: 1px solid #1c1d1f; }
.mgp-r-aux1, .mgp-r-fx1, .mgp-r-pan { border-top: 1px solid #1c1d1f; }
.mgp-hide-input .mgp-sec-input, .mgp-hide-eq .mgp-sec-eq, .mgp-hide-aux .mgp-sec-aux, .mgp-hide-fx .mgp-sec-fx { display: none; }
.mgp-tiny { font-size: 7px; color: var(--mgp-dim); letter-spacing: 0.02em; }
.mgp-fixed { font-size: 8px; color: var(--mgp-dim); border: 1px dashed #555; padding: 2px 3px; border-radius: 3px; }
.mgp-imgwrap { display: flex; flex-direction: column; align-items: center; gap: 1px; }

/* dock: ON + fader zone + scribble, sticky to the bottom of the scroller */
.mgp-dock {
  margin-top: auto; position: sticky; bottom: 0; z-index: 3;
  background: linear-gradient(90deg, #26282b, #2a2c30 50%, #25272a);
  box-shadow: 0 -7px 9px -5px rgba(0, 0, 0, 0.75);
}
.mgp-stereo .mgp-dock { background: linear-gradient(90deg, #2f3236, #33363a 50%, #2e3034); }
.mgp-unpinned .mgp-dock { position: relative; box-shadow: none; }
.mgp-r-on { height: 32px; border-top: 1px solid #1c1d1f; }
.mgp-fz {
  position: relative; height: var(--fz-h); display: grid; grid-template-columns: minmax(0, 1fr) 4px 22px; gap: 2px;
  padding: 4px 2px 3px 1px; border-top: 6px solid #0d0d0e;
  background: linear-gradient(90deg, #45484c, #505357 50%, #45474b); box-shadow: inset -1px 0 0 #2a2c2f;
}
.mgp-fz-r { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 2px; padding: 1px 0 2px; }
.mgp-fz-leds { display: grid; grid-template-columns: 8px; justify-items: center; row-gap: 0; }
.mgp-fz-leds .mgp-tiny { font-size: 6px; margin-bottom: 1px; }
.mgp-scrib {
  position: relative; height: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #0e0e0f; border-top: 1px solid #000; touch-action: pan-x pan-y; cursor: pointer; padding: 3px 2px 0;
}
.mgp-scrib-bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c, #888); }
.mgp-scrib-name { font-size: 10px; font-weight: 700; color: #f4f4f4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mgp-scrib-num { font-size: 8px; color: #9aa0a6; }
.mgp-strip-sel .mgp-tape { background-color: rgba(255, 246, 200, 0.95); }
.mgp-strip-sel .mgp-tape-pen { display: flex; }
.mgp-strip-sel .mgp-r-num { background: #23395a; }

/* compact strips */
.mgp-compact { height: 100%; }
.mgp-r-cpfl { height: 30px; }
.mgp-r-cleds { height: 12px; gap: 8px; }
.mgp-cfz { flex: 1 1 auto; min-height: 60px; display: grid; grid-template-columns: 6px minmax(0, 1fr); gap: 3px; padding: 4px 3px 4px 4px; }
.mgp-mode-compact .mgp-strip { box-shadow: inset 1px 0 0 #3a3d42; }

/* ------------------------------------------------------------------ knob */
.mgp-knob { position: relative; width: 100%; height: 100%; }
.mgp-knob-dial {
  position: absolute; left: 50%; top: 11px; width: var(--k); height: var(--k); margin-left: calc(var(--k) / -2);
  border-radius: 50%;
}
.mgp-knob-dial::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from -151deg, #c9ccd0 0 2deg, #0000 0 30deg, #c9ccd0 0 32deg, #0000 0 60deg, #c9ccd0 0 62deg, #0000 0 90deg,
    #c9ccd0 0 92deg, #0000 0 120deg, #c9ccd0 0 122deg, #0000 0 150deg, #c9ccd0 0 152deg, #0000 0 180deg, #c9ccd0 0 182deg, #0000 0 210deg,
    #c9ccd0 0 212deg, #0000 0 240deg, #c9ccd0 0 242deg, #0000 0 270deg, #c9ccd0 0 272deg, #0000 0 300deg, #c9ccd0 0 302deg, #0000 0);
  -webkit-mask: radial-gradient(closest-side, #0000 79%, #000 80%);
  mask: radial-gradient(closest-side, #0000 79%, #000 80%);
  opacity: 0.85;
}
.mgp-knob-rot {
  position: absolute; inset: 15%; border-radius: 50%;
  background:
    radial-gradient(closest-side, #0000 86%, rgba(255,255,255,0.08) 88%, #0000 92%),
    repeating-conic-gradient(#1d1e20 0 7deg, #2a2c2f 7deg 15deg);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.7), inset 0 0 0 1px #111;
}
.mgp-active .mgp-knob-rot, .mgp-active .mgp-fader-cap { will-change: transform; }
.mgp-knob-rot::before {
  /* black top cap with a thin section-colour ring (the real MGP32X knobs are black with coloured pointers) */
  content: ""; position: absolute; inset: 20%; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #5a5d62 0, #2a2c2f 45%, #141516 100%);
  box-shadow: inset 0 0 0 1.5px var(--cap, #888), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.mgp-knob-rot::after {
  content: ""; position: absolute; left: calc(50% - 1.5px); top: 1%; width: 3px; height: 46%;
  background: var(--ptr, var(--cap, #fff)); border-radius: 1.5px; box-shadow: 0 0 1px #000;
}
.mgp-cap-red { --cap: var(--cap-red); }
.mgp-cap-orange { --cap: var(--cap-orange); }
.mgp-cap-green { --cap: var(--cap-green); }
.mgp-cap-dkgreen { --cap: var(--cap-dkgreen); }
.mgp-cap-blue { --cap: var(--cap-blue); }
.mgp-cap-yellow { --cap: var(--cap-yellow); }
.mgp-cap-white { --cap: #c9cbce; --ptr: #e8452f; }
.mgp-cap-grey { --cap: var(--cap-grey); --ptr: #f2f2f2; }
.mgp-cap-black { --cap: #77797d; --ptr: #f2f2f2; }
.mgp-knob-lbl, .mgp-knob-top, .mgp-knob-l, .mgp-knob-r, .mgp-knob-l2, .mgp-knob-r2 {
  position: absolute; font-size: 7px; line-height: 1; pointer-events: none; white-space: nowrap; letter-spacing: 0.01em;
}
.mgp-knob-lbl { left: 2px; top: 1px; font-size: 8px; font-weight: 800; color: #f2f3f4; }
.mgp-knob-top { right: 2px; top: 1px; color: var(--mgp-dim); font-size: 6.5px; }
.mgp-knob-l { left: 1px; bottom: 1px; color: #c4c8cc; }
.mgp-knob-r { right: 1px; bottom: 1px; color: #c4c8cc; }
.mgp-knob-l2, .mgp-knob-r2 { bottom: 0; background: #e3e5e8; color: #111; padding: 0 1px; border-radius: 1px; font-weight: 700; font-size: 6.5px; }
.mgp-knob-l2 { left: 1px; }
.mgp-knob-r2 { right: 1px; }
.mgp-k-gain .mgp-knob-l, .mgp-k-gain .mgp-knob-r { bottom: 8px; }
.mgp-nom-centre .mgp-knob-dial::after, .mgp-nom-level .mgp-knob-dial::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  border-left: 3px solid transparent; border-right: 3px solid transparent; border-top: 4px solid #e9ebee;
  transform: translate(-50%, calc(var(--k) * -0.5 - 3px));
}
.mgp-nom-level .mgp-knob-dial::after {
  border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-left: 4px solid #e9ebee; border-right: 0;
  transform: translate(-50%, -50%) rotate(75deg) translateY(calc(var(--k) * -0.5 - 3px)) rotate(-75deg);
}
.mgp-nom-comp .mgp-knob-dial::before {
  background: conic-gradient(from -150deg, #0000 0 60deg, #c9ccd0 0 120deg, #0000 0 125deg, #c9ccd0 0 180deg, #0000 0 185deg, #c9ccd0 0 300deg, #0000 0);
  -webkit-mask: radial-gradient(closest-side, #0000 82%, #000 83%);
  mask: radial-gradient(closest-side, #0000 82%, #000 83%);
}
.mgp-comp-led { position: absolute; right: 3px; top: 10px; }
.mgp-k-lg { --k: 64px; }
.mgp-k-md { --k: 46px; }

/* ------------------------------------------------------------------ fader */
.mgp-fader { position: relative; width: 100%; height: 100%; }
.mgp-fader-track { position: absolute; inset: 0; }
.mgp-fader-slot {
  position: absolute; top: calc(var(--cap-h) / 2); bottom: calc(var(--cap-h) / 2); right: 9px; width: 4px;
  background: #050505; border-radius: 2px; box-shadow: 0 0 0 1px #3c3f44;
}
.mgp-noscale .mgp-fader-slot { right: auto; left: calc(50% - 2px); }
.mgp-fader-scale { position: absolute; inset: 0; pointer-events: none; }
.mgp-fm {
  position: absolute; left: 0; right: 16px; font-size: 7px; line-height: 1; color: #c9cdd1; transform: translateY(-50%);
  display: flex; align-items: center; gap: 1px;
}
.mgp-fm::after { content: ""; flex: 1 1 auto; height: 1px; background: #8d9298; min-width: 2px; }
.mgp-fm-nom { font-weight: 800; color: #fff; }
.mgp-fm-nom::after { height: 2px; background: #fff; }
.mgp-fm-0 { top: calc(var(--cap-h) / 2); }
.mgp-fm-1 { top: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * 0.1); }
.mgp-fm-2 { top: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * 0.2); }
.mgp-fm-3 { top: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * 0.3); }
.mgp-fm-4 { top: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * 0.4); }
.mgp-fm-5 { top: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * 0.5); }
.mgp-fm-6 { top: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * 0.6); }
.mgp-fm-7 { top: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * 0.7); }
.mgp-fm-8 { top: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * 0.8); }
.mgp-fm-9 { top: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * 0.9); }
.mgp-fm-10 { top: calc(var(--cap-h) / 2 + (100% - var(--cap-h)) * 1); }
.mgp-fader-cap {
  position: absolute; top: 0; right: 0; width: 22px; height: var(--cap-h); border-radius: 3px;
  /* light-grey cap with ridges and a dark centre groove, like the real console */
  background:
    linear-gradient(#0000 0 46%, #2b2c2e 46% 54%, #0000 54%),
    repeating-linear-gradient(#f4f5f6 0 2px, #c4c7ca 2px 3px),
    linear-gradient(#f7f7f7, #b8bbbe);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.75), inset 0 0 0 1px #6f7276;
}
.mgp-noscale .mgp-fader-cap { right: auto; left: calc(50% - 11px); }
.mgp-fcap-red .mgp-fader-cap { background: linear-gradient(#e8796f 0, #b8322a 22%, #8e1f19 46%, #f2f2f2 46%, #f2f2f2 54%, #8e1f19 54%, #b02c25 80%, #d0554c 100%); }
.mgp-fcap-blue .mgp-fader-cap { background: linear-gradient(#7aa4dc 0, #3b6aa8 22%, #234a7e 46%, #f2f2f2 46%, #f2f2f2 54%, #234a7e 54%, #3a68a5 80%, #5d89c4 100%); }
.mgp-fcap-white-old .mgp-fader-cap { background: linear-gradient(#ffffff 0, #d9dbdd 22%, #b9bcc0 46%, #333 46%, #333 54%, #b9bcc0 54%, #d2d4d6 80%, #f0f0f0 100%); }
.mgp-fader.mgp-active .mgp-fader-cap { box-shadow: 0 0 0 2px var(--mgp-accent), 0 3px 6px rgba(0, 0, 0, 0.8); }

/* ------------------------------------------------------------------ switches */
.mgp-sw { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mgp-sw-btn {
  display: flex; align-items: center; justify-content: center; width: 22px; height: 16px; border-radius: 3px;
  background: linear-gradient(#eef0f2, #c3c6ca); color: #15171a; font-size: 7px; font-weight: 800; letter-spacing: -0.01em;
  box-shadow: 0 2px 0 #0b0b0c, inset 0 -1px 0 #9a9ea3; white-space: nowrap; overflow: hidden;
}
.mgp-sw.mgp-on .mgp-sw-btn { background: linear-gradient(#d4d7da, #aeb2b6); box-shadow: 0 1px 0 #0b0b0c, inset 0 1px 3px rgba(0, 0, 0, 0.45); transform: translateY(1px); }
.mgp-sw.mgp-active .mgp-sw-btn { filter: brightness(0.9); }
.mgp-sw-sm .mgp-sw-btn { width: 24px; }
.mgp-sw-xs .mgp-sw-btn, .mgp-sw-xsred .mgp-sw-btn { width: 20px; height: 15px; font-size: 7px; }
.mgp-sw-xs .mgp-sw-btn, .mgp-sw-pfl .mgp-sw-btn { background: linear-gradient(#a4a7ab, #7b7e82); color: #111; box-shadow: 0 2px 0 #0b0b0c, inset 0 -1px 0 #5f6266; }
.mgp-sw-xs.mgp-on .mgp-sw-btn, .mgp-sw-pfl.mgp-on .mgp-sw-btn { background: linear-gradient(#8e9195, #686b6f); }
.mgp-sw-xsred .mgp-sw-btn, .mgp-sw-smred .mgp-sw-btn { background: linear-gradient(#f0675c, #c8322a); color: #2a0503; box-shadow: 0 2px 0 #0b0b0c, inset 0 -1px 0 #8e1d17; }
.mgp-sw-xsred.mgp-on .mgp-sw-btn, .mgp-sw-smred.mgp-on .mgp-sw-btn { background: linear-gradient(#d4473d, #a8241d); }
.mgp-sw-pad { background: #0b0b0c; padding: 2px; border-radius: 3px; }
.mgp-sw-pad .mgp-sw-btn { width: 23px; }
.mgp-sw-pad.mgp-on .mgp-sw-btn { background: linear-gradient(#ffcf7a, #e7a43a); }
.mgp-sw-on .mgp-sw-btn { width: 36px; height: 22px; font-size: 10px; border-radius: 4px; }
.mgp-sw-on.mgp-on .mgp-sw-btn {
  background: linear-gradient(#fff2c8, #ffbf3d 55%, #f39a12); color: #3b2300;
  box-shadow: 0 0 9px rgba(255, 168, 30, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.6); transform: none;
}
.mgp-sw-lit.mgp-on .mgp-sw-btn { background: linear-gradient(#d9ffd8, #63d16a); box-shadow: 0 0 8px rgba(80, 230, 90, 0.7); transform: none; }
.mgp-sw-lit .mgp-sw-btn { width: 24px; }
.mgp-sw-pfl { gap: 1px; }
.mgp-sw-pfl .mgp-sw-btn { width: 20px; height: 15px; font-size: 7px; }
.mgp-sw-led-top { gap: 1px; }
.mgp-sw-led-top .mgp-sw-ledel { order: -1; }
.mgp-sw-led-left { flex-direction: row; gap: 3px; }
.mgp-sw-led-left .mgp-sw-ledel { order: -1; }
.mgp-r-sw1 .mgp-sw-led-top .mgp-sw-ledel, .mgp-r-sw1 .mgp-sw-led-top { margin-top: -2px; }
.mgp-r-sw1 .mgp-sw-led-top .mgp-sw-btn { height: 13px; }
.mgp-r-sw1 .mgp-led { width: 5px; height: 5px; }
.mgp-compact .mgp-sw-pfl .mgp-sw-btn { width: 26px; height: 18px; font-size: 8px; }
.mgp-compact .mgp-sw-on .mgp-sw-btn { width: 34px; }

/* selects */
.mgp-sel { display: flex; align-items: center; gap: 2px; }
.mgp-sel-slot { position: relative; width: 9px; height: 27px; background: #070708; border-radius: 2px; box-shadow: 0 0 0 1px #45484d; }
.mgp-sel-n3 .mgp-sel-slot { height: 30px; }
.mgp-sel-knob { position: absolute; left: 1px; right: 1px; top: 1px; height: calc((100% - 2px) / 3); background: linear-gradient(#f2f2f2, #b8bbbe); border-radius: 1px; transition: transform 0.08s; }
.mgp-sel-legend { display: flex; flex-direction: column; justify-content: space-between; font-size: 6.5px; line-height: 1.05; color: #c4c8cc; }
.mgp-sel[data-idx="0"] .mgp-sel-legend span:nth-child(1), .mgp-sel[data-idx="1"] .mgp-sel-legend span:nth-child(2),
.mgp-sel[data-idx="2"] .mgp-sel-legend span:nth-child(3) { color: #fff; font-weight: 800; }
.mgp-sel-push .mgp-sw-btn { width: 16px; height: 15px; }
.mgp-sel-push.mgp-on .mgp-sw-btn { background: linear-gradient(#d4d7da, #aeb2b6); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45); }
.mgp-sel-push .mgp-sel-legend { font-size: 6px; }

/* ------------------------------------------------------------------ LEDs */
.mgp-led {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 35% 30%, #5b4a46 0, #2a1e1c 70%); box-shadow: inset 0 0 1px #000, 0 0 0 1px #0a0a0a;
}
.mgp-led-green { background: radial-gradient(circle at 35% 30%, #46574a 0, #18241b 70%); }
.mgp-led-orange, .mgp-led-yellow { background: radial-gradient(circle at 35% 30%, #5d5140 0, #2a2216 70%); }
.mgp-led-red.mgp-lit { background: radial-gradient(circle at 35% 30%, #fff 0, #ff6a5a 28%, #d81b10 70%); box-shadow: 0 0 6px 1px rgba(255, 50, 30, 0.8); }
.mgp-led-green.mgp-lit { background: radial-gradient(circle at 35% 30%, #fff 0, #7dff7a 28%, #1fb52c 70%); box-shadow: 0 0 6px 1px rgba(60, 255, 70, 0.7); }
.mgp-led-orange.mgp-lit { background: radial-gradient(circle at 35% 30%, #fff 0, #ffc070 28%, #f07a10 70%); box-shadow: 0 0 6px 1px rgba(255, 150, 30, 0.8); }
.mgp-led-yellow.mgp-lit { background: radial-gradient(circle at 35% 30%, #fff 0, #fff07a 28%, #e0c010 70%); box-shadow: 0 0 6px 1px rgba(255, 230, 40, 0.7); }
.mgp-led-xs { width: 5px; height: 5px; }

/* ------------------------------------------------------------------ segment meter */
.mgp-meter { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 4px; height: 100%; }
.mgp-meter-pk { flex: 0 0 4px; background: #3a1512; border-radius: 1px; }
.mgp-meter-pk.mgp-lit { background: #ff3b2a; box-shadow: 0 0 5px #ff2a10; }
.mgp-meter-col {
  position: relative; flex: 1 1 auto; overflow: hidden; border-radius: 1px;
  background: linear-gradient(to top, #22d84f 0, #22d84f 63.6%, #e9dc28 63.6%, #e9dc28 72.7%, #ff9a24 72.7%, #ff9a24 90.9%, #ff3b2a 90.9%);
}
.mgp-meter-cover { position: absolute; inset: 0; background: rgba(9, 10, 11, 0.86); transform-origin: 50% 0; transform: scaleY(1); will-change: transform; }
.mgp-meter-grid {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to top, #0000 0, #0000 calc(100% / 11 - 1.5px), #0b0b0c calc(100% / 11 - 1.5px), #0b0b0c calc(100% / 11));
}
.mgp-meter-thin { width: 4px; }
.mgp-meter-c { width: 6px; }

/* ------------------------------------------------------------------ overlay layer (bubble, hint, help) */
.mgp-layer { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 10000; pointer-events: none; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif; }
.mgp-bubble, .mgp-hint, .mgp-help { position: fixed; left: 0; top: 0; }
.mgp-bubble {
  padding: 5px 9px; border-radius: 8px; background: rgba(12, 14, 18, 0.94); color: #fff; font-size: 15px; font-weight: 700;
  border: 1px solid #5b8fd6; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6); white-space: nowrap; opacity: 0; transition: opacity 0.12s;
  font-variant-numeric: tabular-nums;
}
.mgp-bubble.mgp-show { opacity: 1; }
.mgp-bubble-sub { display: none; font-size: 10px; color: #9cc3ff; font-weight: 600; }
.mgp-bubble.mgp-has-sub .mgp-bubble-sub { display: block; }
.mgp-hint {
  padding: 5px 9px; border-radius: 6px; background: #3b2a12; color: #ffd79a; border: 1px solid #a8742a; font-size: 12px;
  opacity: 0; transition: opacity 0.15s; white-space: nowrap;
}
.mgp-hint.mgp-show { opacity: 1; }
.mgp-help {
  pointer-events: auto; width: min(340px, calc(100vw - 16px)); max-height: min(70vh, 460px); overflow: auto;
  background: #f7f7f5; color: #1b1c1e; border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55); padding: 10px 12px 12px;
  font-size: 13.5px; line-height: 1.6; -webkit-user-select: text; user-select: text;
}
.mgp-help-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.mgp-help-title { font-weight: 800; font-size: 15px; }
.mgp-help-close { font: inherit; font-size: 20px; line-height: 1; border: 0; background: #e3e3e0; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; color: #333; }
.mgp-help-body { margin: 0 0 8px; }
.mgp-help-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.mgp-help-chip { font-size: 11px; background: #e6e9ee; border-radius: 10px; padding: 2px 8px; color: #333; }
.mgp-help-warn { background: #fde7c8; color: #6b3d00; }

/* ------------------------------------------------------------------ built-in detail sheet */
.mgp-sheet { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; background: rgba(18, 19, 21, 0.98); }
.mgp-sheet-bar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; background: #111; border-bottom: 1px solid #000; }
.mgp-sheet-title { font-size: 12px; color: #aaa; }
.mgp-sheet-body { flex: 1 1 auto; overflow: auto; position: relative; }

/* narrow / short adaptations */
.mgp-short .mgp-r-num { height: 14px; }
.mgp-short .mgp-r-on { height: 28px; }
.mgp-short .mgp-scrib { height: 24px; }
.mgp-short .mgp-scrib-num { display: none; }

/* ------------------------------------------------------------------ master view */
.mgp-master { position: relative; display: flex; width: 100%; height: 100%; background: var(--mgp-panel); overflow: hidden; }
.mgp-mbridge {
  flex: 0 0 auto; width: 108px; display: flex; flex-direction: column; gap: 5px; padding: 6px 6px 6px;
  background: linear-gradient(#1f2023, #1a1b1d); border-right: 1px solid #000; box-shadow: inset -1px 0 0 #333;
}
.mgp-mb-cols { flex: 1 1 auto; min-height: 0; max-height: 440px; display: flex; gap: 3px; }
.mgp-mb-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 0; }
.mgp-mb-head { flex: 0 0 auto; height: 10px; font-size: 6.5px; color: var(--mgp-dim); white-space: nowrap; }
.mgp-meter-mb { width: 11px; flex: 1 1 auto; height: auto; }
.mgp-meter-mb .mgp-meter-pk { flex: 0 0 calc((100% - 2px) / 12); border-radius: 2px; }
.mgp-meter-mb .mgp-meter-grid { background: repeating-linear-gradient(to top, #0000 0, #0000 calc(100% / 11 - 2px), #111214 calc(100% / 11 - 2px), #111214 calc(100% / 11)); }
.mgp-mb-labels { flex: 0 0 18px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mgp-mb-lab-in { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-around; font-size: 7px; color: #c8ccd0; text-align: center; }
.mgp-mb-pk { color: #ff6a5a; font-size: 5.5px; font-weight: 800; }
.mgp-mb-zero { color: #fff; font-weight: 800; }
.mgp-msel { display: grid; grid-template-columns: 8px 1fr; gap: 2px 4px; align-items: center; }
.mgp-msel .mgp-tiny { font-size: 7px; }
.mgp-msel-btn .mgp-sw-btn, .mgp-sw-wide .mgp-sw-btn { width: 92px; height: 24px; font-size: 8px; }
.mgp-msel-btn.mgp-on .mgp-sw-btn { transform: none; }
.mgp-mscroll { flex: 1 1 auto; min-width: 0; }
.mgp-mcontent { display: flex; flex-direction: column; width: max-content; min-height: 100%; margin: 0 auto; }
.mgp-mband-up { flex: 1 0 auto; display: flex; align-items: stretch; background: #1a1b1d; }
.mgp-msec {
  display: flex; flex-direction: column; border-right: 1px solid #111; box-shadow: inset 1px 0 0 #3a3d42;
  background: linear-gradient(#2e3135, #292b2f);
}
.mgp-msec-body { display: flex; flex-direction: column; padding: 2px 0; }
.mgp-msec-title {
  margin-top: auto; font-size: 8px; font-weight: 800; text-align: center; padding: 3px 4px; color: #fff; background: #121314;
  letter-spacing: 0.05em; white-space: nowrap;
}
.mgp-mcell { position: relative; flex: 0 0 auto; width: var(--strip-w); height: calc(var(--k) + 15px); display: flex; align-items: center; justify-content: center; }
.mgp-mcell-row { width: calc(var(--strip-w) + 30px); justify-content: flex-start; padding-right: 4px; }
.mgp-mcell-row > .mgp-knob { width: var(--strip-w); flex: 0 0 auto; }
.mgp-mcell-sw { height: 34px; }
.mgp-mcell-pair { gap: 6px; }
.mgp-fxgrid { display: grid; grid-template-columns: repeat(2, var(--strip-w)); }
.mgp-fxgrid .mgp-knob-lbl { font-size: 6.5px; }
.mgp-fxblend { display: flex; width: calc(var(--strip-w) * 2); }
.mgp-mcell-blend { width: calc(var(--strip-w) * 1.15); }
.mgp-tapbox { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.mgp-sw-tap .mgp-sw-btn { width: 30px; height: 24px; font-size: 9px; border-radius: 4px; }
.mgp-tapnote { font-size: 5.5px; text-align: center; }
.mgp-dim { opacity: 0.45; }
.mgp-fxlogos { display: flex; justify-content: space-around; padding: 4px 0 6px; width: calc(var(--strip-w) * 2); }
.mgp-logo { font-size: 9px; font-weight: 900; font-style: italic; color: #fff; border: 1px solid #8a8f95; border-radius: 9px; padding: 1px 6px; letter-spacing: 0.03em; }
.mgp-logo-spx { border-radius: 2px; }
.mgp-msec-disp { padding: 0; width: 348px; }
.mgp-msec-disp .mgp-disp { padding: 6px; gap: 6px; }
.mgp-msec-disp .mgp-enc-knob { width: 50px; height: 50px; }
.mgp-msec-disp .mgp-dbtn-cap { width: 40px; }
.mgp-mband-lo {
  margin-top: auto; position: sticky; bottom: 0; z-index: 3; display: flex; background: #161718;
  box-shadow: 0 -7px 9px -5px rgba(0, 0, 0, 0.75); border-top: 6px solid #0d0d0e;
}
.mgp-mstrip {
  width: var(--strip-w); display: flex; flex-direction: column; flex: 0 0 auto;
  background: linear-gradient(90deg, #2e3135, #33363a 50%, #2d2f33); border-right: 1px solid #111; box-shadow: inset 1px 0 0 #3e4146;
}
.mgp-mstrip-top { flex: 0 0 auto; height: calc(var(--k) + 15px); display: flex; align-items: center; justify-content: center; }
.mgp-mstrip-name {
  flex: 0 0 auto; height: 24px; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  background: #0e0e0f; color: #fff; border-top: 3px solid #50555b; white-space: nowrap;
}
.mgp-ms-fx .mgp-mstrip-name { border-top-color: #b98ad8; }
.mgp-ms-grp .mgp-mstrip-name { border-top-color: #5b8fd6; }
.mgp-ms-st .mgp-mstrip-name { border-top-color: #e0473c; }
.mgp-mfz { border-top: 0; }
.mgp-fz-gap { display: block; }
.mgp-fz-r-end { justify-content: flex-end; gap: 8px; }
.mgp-fz-flex { flex: 1 1 auto; }
.mgp-mgap { flex: 0 0 10px; background: #121314; }
.mgp-sw-afl { background: #0b0b0c; border-radius: 3px; padding: 2px; gap: 1px; }
.mgp-sw-afl .mgp-sw-btn { width: 20px; height: 15px; font-size: 7px; }
.mgp-mcell-row .mgp-sw-afl { margin-left: 2px; }
/* row mode (short boxes, e.g. phone landscape): faders first, both bands side by side, no vertical scroll */
.mgp-mrow .mgp-mcontent { flex-direction: row; height: 100%; min-height: 0; }
.mgp-mrow .mgp-mband-lo { order: -1; margin-top: 0; position: relative; box-shadow: none; border-top: 0; height: 100%; border-right: 6px solid #0d0d0e; }
.mgp-mrow .mgp-mband-up { height: 100%; }
.mgp-mrow .mgp-mstrip { height: 100%; }
.mgp-mrow .mgp-mfz { flex: 1 1 auto; height: auto; min-height: 0; }
.mgp-mrow .mgp-msec-body { flex: 1 1 auto; overflow-y: auto; touch-action: pan-x pan-y; }

/* ------------------------------------------------------------------ channel detail */
.mgp-detail { --k: 54px; position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; background: #202225; overflow: hidden; }
.mgp-dt-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: #141517; border-bottom: 1px solid #000;
  touch-action: pan-y;
}
.mgp-dt-nav { min-width: 44px; font-size: 14px; }
.mgp-dt-title { flex: 1 1 auto; display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; }
.mgp-dt-color { align-self: stretch; width: 6px; border-radius: 2px; background: var(--c, #888); }
.mgp-dt-num { font-size: 13px; font-weight: 800; color: #9aa4ae; white-space: nowrap; }
.mgp-dt-name { font-size: 18px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgp-dt-hint { font-size: 10px; color: #6c737a; margin-left: auto; white-space: nowrap; }
.mgp-dt-body {
  flex: 1 1 auto; min-height: 0; display: flex; gap: 6px; padding: 6px; overflow: auto; touch-action: pan-x pan-y;
  overscroll-behavior: contain;
}
.mgp-dt-panel {
  flex: 0 0 auto; display: flex; flex-direction: column; background: linear-gradient(#2d3034, #282a2e); border-radius: 8px;
  border: 1px solid #3a3d42; padding: 4px 6px 6px; min-height: 0;
}
.mgp-dt-ptitle { margin: 0 0 2px; font-size: 10px; font-weight: 800; color: #9aa4ae; letter-spacing: 0.06em; }
.mgp-dt-pbody { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1 1 auto; min-height: 0; }
.mgp-dt-k { position: relative; width: calc(var(--k) + 30px); height: calc(var(--k) + 18px); flex: 0 0 auto; }
.mgp-dt-k .mgp-knob-lbl { font-size: 10px; }
.mgp-dt-k .mgp-knob-l, .mgp-dt-k .mgp-knob-r, .mgp-dt-k .mgp-knob-top { font-size: 8.5px; }
.mgp-dt-k .mgp-knob-l2, .mgp-dt-k .mgp-knob-r2 { font-size: 8px; }
.mgp-dt-k .mgp-knob-dial { top: 13px; }
.mgp-dt-k-lg { --k: 70px; }
.mgp-dt-k .mgp-k-gain .mgp-knob-l, .mgp-dt-k .mgp-k-gain .mgp-knob-r { bottom: 11px; }
.mgp-dt-k .mgp-comp-led { right: 8px; top: 12px; width: 9px; height: 9px; }
.mgp-dt-swrow { display: flex; gap: 8px; align-items: center; justify-content: center; min-height: 34px; }
.mgp-dt-swrow .mgp-sw-btn { width: auto; min-width: 40px; padding: 0 6px; height: 26px; font-size: 9px; border-radius: 4px; }
.mgp-dt-swrow .mgp-sw-on .mgp-sw-btn { width: 64px; height: 34px; font-size: 13px; }
.mgp-dt-swrow .mgp-sw-pfl .mgp-sw-btn { width: 48px; height: 28px; font-size: 10px; }
.mgp-dt-swrow .mgp-led { width: 9px; height: 9px; }
.mgp-dt-swrow .mgp-sel-push .mgp-sw-btn { width: 30px; }
.mgp-dt-swrow .mgp-sel-legend { font-size: 8px; }
.mgp-dt-img { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.mgp-dt-img .mgp-sel-slot { width: 14px; height: 44px; }
.mgp-dt-img .mgp-sel-legend { font-size: 9px; }
.mgp-dt-eq .mgp-dt-pbody { align-items: stretch; }
.mgp-eqc { position: relative; flex: 1 1 auto; min-height: 90px; width: 300px; border-radius: 5px; overflow: hidden; border: 1px solid #333a42; }
.mgp-eqc-cv { position: absolute; left: 0; top: 0; }
.mgp-eqc-leg { position: absolute; right: 6px; top: 4px; font-size: 9px; color: #8fa0ae; pointer-events: none; }
.mgp-dt-eqk { display: flex; justify-content: space-between; }
.mgp-dt-eqk .mgp-dt-k { width: calc(var(--k) + 18px); }
.mgp-dt-sendgrid { display: grid; grid-template-columns: repeat(2, auto); }
.mgp-dt-out .mgp-dt-pbody { flex-direction: row; align-items: stretch; gap: 8px; }
.mgp-dt-outl { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mgp-dt-outr { display: flex; gap: 6px; align-items: stretch; min-height: 0; }
.mgp-dt-leds { display: grid; grid-template-columns: auto auto; gap: 4px 6px; align-items: center; }
.mgp-dt-leds .mgp-led { width: 10px; height: 10px; }
.mgp-dt-leds .mgp-tiny { font-size: 9px; }
.mgp-dt-mcol { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 0; }
.mgp-dt-mcol .mgp-tiny { font-size: 8px; }
.mgp-meter-dt { width: 12px; flex: 1 1 auto; height: auto; }
.mgp-grm { flex: 1 1 auto; width: 12px; display: flex; flex-direction: column; gap: 2px; }
.mgp-grm-s { flex: 1 1 0; background: #3a2a10; border-radius: 1px; }
.mgp-grm-s.mgp-lit { background: #ffae2a; box-shadow: 0 0 4px rgba(255, 170, 40, 0.8); }
.mgp-grm-t { font-variant-numeric: tabular-nums; min-width: 22px; text-align: center; }
.mgp-dt-fader { --cap-h: 34px; width: 62px; flex: 0 0 auto; min-height: 160px; }
.mgp-dt-fader .mgp-fader-cap { width: 30px; }
.mgp-dt-fader .mgp-fader-slot { right: 13px; }
.mgp-dt-fader .mgp-fm { font-size: 9px; right: 24px; }
/* portrait / narrow: stack the panels */
.mgp-dt-stack .mgp-dt-body { flex-direction: column; align-items: stretch; }
.mgp-dt-stack .mgp-eqc { width: auto; min-height: 120px; }
.mgp-dt-stack .mgp-dt-pbody { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.mgp-dt-stack .mgp-dt-eq .mgp-dt-pbody { flex-direction: column; }
.mgp-dt-stack .mgp-dt-out .mgp-dt-pbody { flex-wrap: nowrap; justify-content: center; }
.mgp-dt-stack .mgp-dt-outr { height: 300px; }
.mgp-dt-stack .mgp-dt-sendgrid { grid-template-columns: repeat(4, auto); }
.mgp-dt-stack .mgp-dt-fxg { grid-template-columns: repeat(2, auto); }

/* ------------------------------------------------------------------ LCD display */
.mgp-disp {
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; height: 100%; padding: 8px;
  background: linear-gradient(#2c2e32, #232528); overflow: auto; touch-action: pan-y;
}
.mgp-lcd-bezel { width: 100%; max-width: 520px; padding: 7px; background: #08090a; border-radius: 7px; box-shadow: inset 0 0 0 1px #34373b, 0 2px 0 #444; flex: 0 0 auto; }
.mgp-lcd {
  --ink-l: var(--lcd-ink, 18%);
  --ink: hsl(165 30% var(--ink-l));
  --lcd-bg: #e4ece6;
  position: relative; aspect-ratio: 2 / 1; width: 100%; display: flex; flex-direction: column; padding: 2.4% 3%;
  background: #8fa497; color: var(--ink); overflow: hidden; border-radius: 2px;
  font-family: "Courier New", ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: var(--lcd-fs, 13px);
  line-height: 1.2; letter-spacing: 0.01em; cursor: default;
}
.mgp-lcd::before { content: ""; position: absolute; inset: 0; background: linear-gradient(#f2f7f3, #dce7df); opacity: var(--lcd-bl, 0.85); }
.mgp-lcd::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.16;
  background: repeating-linear-gradient(0deg, #0000 0 2px, #6a7a70 2px 2.5px), repeating-linear-gradient(90deg, #0000 0 2px, #6a7a70 2px 2.5px);
}
.mgp-lcd > * { position: relative; z-index: 1; }
.mgp-lcd .mgp-lcd-ovl { position: absolute; z-index: 3; }
.mgp-lcd-inv { background: var(--ink); color: var(--lcd-bg); padding: 0 0.25em; }
.mgp-lcd-title { display: flex; align-items: center; gap: 0.35em; height: 1.3em; flex: 0 0 auto; border-bottom: 0.08em solid var(--ink); margin-bottom: 0.15em; white-space: nowrap; overflow: hidden; }
.mgp-lcd-pg { font-size: 0.85em; }
.mgp-lcd-pgname { margin-left: auto; }
.mgp-hide { visibility: hidden; }
.mgp-lcd-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.mgp-lcd-row { display: flex; justify-content: space-between; gap: 0.5em; height: 1.2em; line-height: 1.2em; padding: 0 0.2em; white-space: pre; overflow: hidden; flex: 0 0 auto; }
.mgp-lcd-l { overflow: hidden; text-overflow: clip; white-space: pre; }
.mgp-lcd-r { flex: 0 0 auto; }
.mgp-lcd-sel { background: var(--ink); color: var(--lcd-bg); }
.mgp-lcd-sel2 .mgp-lcd-r { background: var(--ink); color: var(--lcd-bg); padding: 0 0.25em; }
.mgp-lcd-big { font-size: 1.25em; height: 1.35em; line-height: 1.35em; }
.mgp-lcd-small { font-size: 0.75em; }
.mgp-lcd-scroll { position: absolute; right: 0.1em; bottom: 0; font-size: 0.65em; }
.mgp-lcd-foot { display: flex; justify-content: space-between; gap: 6%; flex: 0 0 auto; margin-top: 0.15em; }
.mgp-lcd-fk { flex: 0 0 44%; border: 0.09em solid var(--ink); border-radius: 0.15em; text-align: center; font-size: 0.78em; line-height: 1.35em; white-space: nowrap; overflow: hidden; }
.mgp-lcd-bar { height: 0.55em; margin: 0.25em 0.2em 0; border: 0.08em solid var(--ink); position: relative; }
.mgp-lcd-bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--v, 0)); }
@keyframes mgp-blink { 50% { opacity: 0.1; } }
.mgp-lcd-blink .mgp-lcd-r { animation: mgp-blink 0.7s steps(1) infinite; }
/* home */
.mgp-lcd-hrow { display: flex; align-items: center; gap: 0.35em; height: 1.18em; flex: 0 0 auto; white-space: nowrap; overflow: hidden; }
.mgp-lcd-tag { flex: 0 0 auto; border: 0.08em solid var(--ink); padding: 0 0.2em; font-size: 0.85em; line-height: 1.15em; }
/* GEQ graph */
.mgp-geqg { position: relative; flex: 1 1 auto; min-height: 2.6em; display: flex; gap: 1px; margin: 0.15em 0.1em 0; }
.mgp-geqg::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 0.07em dotted var(--ink); }
.mgp-geqb { position: relative; flex: 1 1 0; }
.mgp-geqb::before {
  content: ""; position: absolute; left: 18%; right: 18%; top: 50%; height: 50%; background: var(--ink);
  transform-origin: 50% 0; transform: scaleY(calc(var(--v, 0) * -1));
}
.mgp-geqb-cur { background: repeating-linear-gradient(0deg, #0000 0 2px, rgba(30, 60, 50, 0.28) 2px 3px); }
.mgp-geqb-cur::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.15em; height: 0.15em; background: var(--ink); }
.mgp-geqg-mini { flex: 1 1 auto; min-height: 0; height: 1em; margin: 0; }
.mgp-geqg-mini .mgp-geqb::before { left: 10%; right: 10%; }
.mgp-lcd-fg { flex: 0 0 auto; }
.mgp-lcd-flexn { position: absolute; right: 0.2em; top: 1.3em; }
/* fx1+fx2 */
.mgp-lcd-split { flex-direction: row; gap: 0.3em; }
.mgp-lcd-half { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 0.2em; border: 0.08em solid var(--ink); padding: 0.15em; font-size: 0.82em; overflow: hidden; }
.mgp-lcd-half .mgp-lcd-l, .mgp-lcd-half .mgp-lcd-r { white-space: nowrap; overflow: hidden; }
.mgp-lcd-htag { align-self: flex-start; }
/* comp threshold + GR */
.mgp-lcd-thr { flex: 1 1 auto; display: flex; gap: 0.5em; min-height: 0; }
.mgp-lcd-thrv { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.mgp-lcd-huge { font-size: 2.1em; line-height: 1.05; }
.mgp-lcd-gr { display: flex; gap: 0.2em; font-size: 0.62em; }
.mgp-lcd-grs { display: flex; flex-direction: column; justify-content: space-between; text-align: right; padding-bottom: 1.3em; }
.mgp-lcd-grc { display: flex; flex-direction: column; gap: 0.15em; align-items: center; width: 1.5em; }
.mgp-lcd-grseg { flex: 1 1 0; width: 100%; border: 0.1em solid var(--ink); }
.mgp-lcd-grseg.mgp-on { background: var(--ink); }
.mgp-lcd-grl { flex: 0 0 auto; }
/* overlays: list, dialog, message */
.mgp-lcd-ovl { display: none; inset: 15% 3% 3%; background: var(--lcd-bg); border: 0.1em solid var(--ink); flex-direction: column; padding: 0.1em; }
.mgp-lcd-ovl.mgp-show { display: flex; }
.mgp-lcd-list .mgp-lcd-foot { margin-top: auto; justify-content: flex-start; }
.mgp-lcd-list-left { right: 50%; }
.mgp-lcd-list-right { left: 50%; }
.mgp-lcd-dlg, .mgp-lcd-msg { inset: 20% 8% 8%; justify-content: space-between; box-shadow: 0 0 0 0.25em var(--lcd-bg); }
.mgp-lcd-dlg-t, .mgp-lcd-msg-t { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; text-align: center; white-space: pre-line; font-size: 1.05em; }
.mgp-lcd-msg-t { font-family: -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; font-size: 0.85em; }
.mgp-lcd-msg-h { align-self: center; }
/* controls under the LCD */
.mgp-disp-ctrls { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.mgp-disp-encs { display: flex; align-items: center; justify-content: space-around; gap: 8px; }
.mgp-disp-btns { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; flex-wrap: wrap; }
.mgp-enc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: grab; }
.mgp-enc-knob {
  position: relative; width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #55595e, #1c1d1f 70%); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7), inset 0 0 0 1px #000;
}
.mgp-enc-grip {
  position: absolute; inset: 9%; border-radius: 50%; background: repeating-conic-gradient(#2a2c2f 0 5deg, #4a4e53 5deg 10deg);
  box-shadow: inset 0 0 0 3px #232527; will-change: transform;
}
.mgp-enc-grip::after { content: ""; position: absolute; left: calc(50% - 3px); top: 10%; width: 6px; height: 6px; border-radius: 50%; background: #e9ebee; }
.mgp-enc.mgp-pressed .mgp-enc-knob { transform: scale(0.95); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 0 2px var(--mgp-accent); }
.mgp-enc-lbl { font-size: 10px; color: #c9cdd2; }
.mgp-dbtn { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.mgp-dbtn-lbl { font-size: 9px; font-weight: 800; color: #e3e6e9; }
.mgp-dbtn-cap {
  display: flex; align-items: center; justify-content: center; width: 42px; height: 26px; border-radius: 5px;
  background: linear-gradient(#55595e, #2b2d31); box-shadow: 0 2px 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-size: 9px; font-weight: 800; color: #fff;
}
.mgp-dbtn.mgp-on .mgp-dbtn-cap { box-shadow: 0 2px 0 #000, inset 0 0 0 2px #6a9be0; }
.mgp-dbtn.mgp-active .mgp-dbtn-cap { transform: translateY(1px); box-shadow: 0 1px 0 #000; }
.mgp-dbtn-home .mgp-dbtn-cap { width: 52px; height: 30px; background: linear-gradient(#6b6f75, #3a3d41); }
.mgp-disp-fx12, .mgp-disp-both { font-size: 10px; min-height: 26px; padding: 0 6px; }
.mgp-dt-short { --k: 44px; }
.mgp-dt-short .mgp-dt-k-lg { --k: 58px; }
.mgp-dt-short .mgp-eqc { width: 230px; }
.mgp-dt-short .mgp-dt-swrow { min-height: 30px; }
.mgp-dt-short .mgp-dt-swrow .mgp-sw-on .mgp-sw-btn { height: 30px; }
.mgp-dt-short .mgp-dt-ptitle { font-size: 9px; margin-bottom: 0; }
.mgp-dt-short .mgp-dt-head { padding: 3px 8px; }
.mgp-dt-short .mgp-dt-nav { min-height: 30px; }

.mgp-dt-short .mgp-dt-k { width: calc(var(--k) + 22px); height: calc(var(--k) + 16px); }
.mgp-dt-short .mgp-eqc { width: 210px; }
.mgp-dt-short .mgp-dt-eqk .mgp-dt-k { width: calc(var(--k) + 14px); }
.mgp-dt-short .mgp-eqc { width: 200px; }
.mgp-dt-short .mgp-dt-swrow .mgp-sw-btn { width: auto; min-width: 34px; padding: 0 5px; }
.mgp-mb-help { align-self: stretch; }

/* ------------------------------------------------------------------ masking-tape channel labels */
.mgp-tape {
  --ink: #161616;
  position: relative; flex: 0 0 auto; height: 32px; margin: 3px 0 3px; display: flex; align-items: center; justify-content: center;
  background-color: rgba(233, 231, 220, 0.9);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.08)),
    repeating-linear-gradient(93deg, rgba(120, 115, 100, 0.06) 0 1px, rgba(0, 0, 0, 0) 1px 4px),
    repeating-linear-gradient(-3deg, rgba(255, 255, 255, 0.12) 0 2px, rgba(0, 0, 0, 0) 2px 7px);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  touch-action: pan-x pan-y; cursor: pointer; overflow: visible; padding-bottom: 6px;
}
.mgp-tape::after {  /* black marker divider line between channels */
  content: ""; position: absolute; right: -1px; top: 1px; bottom: 1px; width: 2.5px; border-radius: 2px;
  background: linear-gradient(#111, #222 40%, #0d0d0d 60%, #1c1c1c); opacity: 0.88; transform: translateX(var(--dx, 0)) rotate(var(--dr, 0deg));
}
.mgp-tape-last::after { display: none; }
.mgp-tape-first { margin-left: -2px; clip-path: polygon(3px 0, 100% 0, 100% 100%, 2px 100%, 0 88%, 4px 76%, 1px 62%, 5px 50%, 1px 37%, 4px 24%, 0 12%); padding-left: 3px; }
.mgp-tape-last { margin-right: -4px; clip-path: polygon(0 0, calc(100% - 2px) 0, 100% 11%, calc(100% - 4px) 23%, calc(100% - 1px) 36%, calc(100% - 5px) 49%, calc(100% - 1px) 61%, calc(100% - 4px) 74%, 100% 87%, calc(100% - 3px) 100%, 0 100%); }
.mgp-tape-name {
  display: block; max-width: 96%; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: clip;
  font-family: "Klee One", "Klee", "Hiragino Maru Gothic ProN", "Yu Gothic", "YuGothic", "Comic Sans MS", sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; transform: rotate(var(--tr, 0deg));
  text-shadow: 0 0 0.6px var(--ink);
}
.mgp-tape-name.mgp-long { font-size: 11px; letter-spacing: -0.04em; }
.mgp-tape-patch {
  position: absolute; left: 6%; right: 4%; top: -3px; bottom: -3px; z-index: 1; display: flex; align-items: center; justify-content: center;
  background-color: rgba(240, 238, 228, 0.95);
  background-image: repeating-linear-gradient(88deg, rgba(120, 115, 100, 0.07) 0 1px, rgba(0, 0, 0, 0) 1px 4px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transform: translateY(var(--py, 0)) rotate(var(--pr, 0deg));
  clip-path: polygon(2px 0, calc(100% - 3px) 0, 100% 20%, calc(100% - 3px) 45%, 100% 70%, calc(100% - 2px) 100%, 3px 100%, 0 78%, 3px 52%, 0 26%);
}
.mgp-tape-patch .mgp-tape-name { transform: rotate(calc(var(--tr, 0deg) * -0.6)); }
.mgp-tape-pen {
  display: none; position: absolute; right: 1px; top: -9px; z-index: 2; width: 18px; height: 18px; align-items: center; justify-content: center;
  border-radius: 50%; background: #2b2e33; color: #fff; font-size: 11px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); cursor: pointer;
}
.mgp-tape-input {
  position: absolute; inset: 1px; z-index: 3; width: calc(100% - 2px); min-width: 0; border: 1px solid #5b8fd6; border-radius: 2px; padding: 0 2px;
  background: #fffdf2; color: var(--ink); text-align: center; outline: none;
  font-family: "Klee One", "Klee", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif; font-size: 16px; font-weight: 600;
  -webkit-user-select: text; user-select: text; touch-action: manipulation;
}
.mgp-tape-menu {
  position: absolute; left: 50%; bottom: calc(100% + 4px); z-index: 5; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 5px 4px; border-radius: 8px;
  background: #1d1f22; border: 1px solid #4a4e54; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.mgp-tape-menu-t { font-size: 9px; color: #aab; }
.mgp-tape-sw {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #ddd; background: var(--ink, #161616); cursor: pointer;
  font: inherit; color: #fff; font-size: 14px; padding: 0;
}
.mgp-tape-sw-edit { background: #3a3e44; }
.mgp-fz-num { position: absolute; left: 2px; bottom: 1px; font-size: 7px; font-weight: 800; color: #e6e8ea; opacity: 0.8; pointer-events: none; z-index: 1; }
.mgp-compact .mgp-tape { height: 30px; }
.mgp-short .mgp-tape { height: 28px; margin: 2px 0; }
.mgp-short .mgp-tape-name { font-size: 12.5px; }
.mgp-short .mgp-tape-name.mgp-long { font-size: 10px; }
.mgp-cfz { background: linear-gradient(90deg, #45484c, #505357 50%, #45474b); }

/* ------------------------------------------------------------------ real-panel knob colours (photo) + 音出し + channel tint */
.mgp-cap-silver { --cap: #d6d9dc; --ptr: #ffffff; }
.mgp-cap-blue { --cap: #4aa9ea; }
.mgp-cap-yellow { --cap: #e8c637; }
.mgp-cap-green { --cap: #47c46e; }
.mgp-cap-dkgreen { --cap: #2f9f58; }
.mgp-cap-red { --cap: #e0412f; }
.mgp-knob-rot::before { box-shadow: inset 0 0 0 2.5px var(--cap, #888), 0 0 0 1px rgba(0, 0, 0, 0.6); }
.mgp-hidden { visibility: hidden; pointer-events: none; }
.mgp-r-sc { height: 24px; padding: 2px 2px 0; }
.mgp-scbtn {
  font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-height: 20px; width: 100%;
  padding: 0 3px; border-radius: 4px; border: 1px solid #55595f; background: linear-gradient(#3b3e43, #2a2c30); color: #cfd3d8;
  font-size: 9px; font-weight: 700; white-space: nowrap; cursor: pointer; touch-action: manipulation;
}
.mgp-scbtn-i { font-size: 11px; line-height: 1; }
.mgp-scbtn.mgp-on {
  background: linear-gradient(#fff2c8, #ffbf3d 55%, #f39a12); color: #3b2300; border-color: #c27a10;
  box-shadow: 0 0 8px rgba(255, 168, 30, 0.75);
}
.mgp-scbtn.mgp-on .mgp-scbtn-i { animation: mgp-blink 1s steps(1) infinite; }
.mgp-scbtn-drums { width: auto; min-height: 28px; font-size: 11px; padding: 0 8px; }
.mgp-narrow .mgp-scbtn .mgp-scbtn-t { font-size: 8px; }
.mgp-ch-live { box-shadow: inset 1px 0 0 #3a3d42, inset 0 3px 0 rgba(120, 200, 255, 0.55); }
.mgp-ch-live .mgp-r-num { background: linear-gradient(#2c4a66, #24384d); }
.mgp-ch-live .mgp-tape { background-color: rgba(246, 243, 226, 0.95); }
.mgp-ch-idle::after { content: ""; position: absolute; inset: 0; z-index: 4; background: rgba(8, 9, 10, 0.3); pointer-events: none; }
.mgp-tape-src {
  position: absolute; left: 2px; right: 2px; bottom: 1px; font-size: 6.5px; line-height: 1; color: #5a5850; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; z-index: 2;
}
.mgp-tape-patch ~ .mgp-tape-src { color: #4a4840; }
.mgp-dt-sc .mgp-scbtn { width: auto; min-height: 30px; font-size: 11px; padding: 0 10px; }
.mgp-dt-src { font-size: 9px; color: #9aa3ad; max-width: 170px; text-align: center; }
.mgp-nosc .mgp-r-sc { display: none; }

/* ================================================================== VISUAL FIDELITY PASS (real MGP32X look)
   matte black panel, thin light-grey channel dividers, white condensed uppercase silk-screen, dark knobs with
   coloured caps and printed scale arcs, small square buttons, light-grey band + grey fader plates, chassis. */
.mgp { --mgp-font-panel: "Helvetica Neue", "Arial Narrow", "Roboto Condensed", "Segoe UI", Arial, sans-serif; }
.mgp-console, .mgp-master { background: #0f1011; }
.mgp-strips { background: #0e0f10; }
.mgp-strip, .mgp-stereo, .mgp-mode-compact .mgp-strip {
  background: linear-gradient(90deg, #141516 0, #18191b 50%, #141516 100%);
  border-right: 1px solid #4b4f54; box-shadow: none;
}
.mgp-strip:nth-child(8n) { border-right: 1px solid #6c7075; }
.mgp-r-num, .mgp-r-hi, .mgp-r-aux1, .mgp-r-fx1, .mgp-r-pan, .mgp-r-on { border-color: #3a3d41; }
.mgp-knob-lbl, .mgp-knob-top, .mgp-knob-l, .mgp-knob-r, .mgp-knob-l2, .mgp-knob-r2, .mgp-sw-txt, .mgp-tiny, .mgp-fm,
.mgp-num, .mgp-msec-title, .mgp-mstrip-name, .mgp-sel-legend, .mgp-mb-head, .mgp-mb-lab-in, .mgp-fz-num, .mgp-dbtn-lbl {
  font-family: var(--mgp-font-panel); font-stretch: condensed; text-transform: uppercase;
}
.mgp-knob-lbl { color: #f4f5f6; letter-spacing: 0.02em; }
.mgp-knob-l, .mgp-knob-r, .mgp-knob-top { color: #d9dcdf; }
/* knob: printed scale arc + ticks, dark ribbed body, coloured cap insert, white index line */
.mgp-knob::before {
  content: ""; position: absolute; left: 50%; top: 11px; width: var(--k); height: var(--k); margin-left: calc(var(--k) / -2);
  border-radius: 50%; pointer-events: none;
  background: conic-gradient(from -150deg, #d5d8db 0 300deg, #0000 0);
  -webkit-mask: radial-gradient(closest-side, #0000 95%, #000 96%, #000 99.5%, #0000 100%);
  mask: radial-gradient(closest-side, #0000 95%, #000 96%, #000 99.5%, #0000 100%);
  opacity: 0.9;
}
.mgp-dt-k .mgp-knob::before { top: 13px; }
.mgp-knob-dial::before { opacity: 1; }
.mgp-knob-rot {
  inset: 16%;
  background: radial-gradient(closest-side, #0000 84%, rgba(255, 255, 255, 0.07) 90%, #0000 96%), repeating-conic-gradient(#0b0b0c 0 8deg, #26282b 8deg 15deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.85), inset 0 0 0 1px #000;
}
.mgp-knob-rot::before {
  inset: 23%;
  background: radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.6) 0, rgba(255, 255, 255, 0) 52%), var(--cap, #888);
  box-shadow: inset 0 -1.5px 2px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.75);
}
.mgp-knob-rot::after { left: calc(50% - 1px); top: 3%; width: 2px; height: 47%; background: var(--ix, #ffffff); box-shadow: 0 0 1px rgba(0, 0, 0, 0.9); }
.mgp-cap-silver { --cap: #e3e5e7; --ix: #18191a; }
.mgp-cap-white { --cap: #eceeef; --ix: #18191a; }
.mgp-cap-grey { --cap: #9da1a6; --ix: #ffffff; }
.mgp-cap-yellow { --cap: #f0cf3a; --ix: #1c1a10; }
.mgp-cap-green { --cap: #3fc163; }
.mgp-cap-dkgreen { --cap: #2b9a51; }
.mgp-cap-blue { --cap: #3a9be0; }
.mgp-cap-red { --cap: #d93a2b; }
.mgp-cap-black { --cap: #44474b; }
/* small square buttons */
.mgp-sw-btn { border-radius: 2px; background: linear-gradient(#d6d9dc, #a9adb1); box-shadow: 0 1.5px 0 #000, inset 0 -1px 0 #7c8085; font-family: var(--mgp-font-panel); }
.mgp-sw.mgp-on .mgp-sw-btn { background: linear-gradient(#c2c5c9, #969a9e); }
.mgp-sw-pad { background: transparent; padding: 0; }
.mgp-sw-pad .mgp-sw-btn { box-shadow: 0 0 0 2px #050505, 0 1.5px 0 2px #000; }
.mgp-sw-on .mgp-sw-btn { border-radius: 3px; background: linear-gradient(#e9ebec, #b9bdc1); }
.mgp-sw-on.mgp-on .mgp-sw-btn { background: linear-gradient(#ffe2a0, #ffad2a 55%, #f08a0c); box-shadow: 0 0 10px rgba(255, 150, 20, 0.85), inset 0 1px 2px rgba(255, 255, 255, 0.6); }
/* light-grey band under the ON lamps, grey fader plates with white silk-screen */
.mgp-fz, .mgp-mfz { border-top: 9px solid #b7bfc6; background: linear-gradient(90deg, #55595e, #62666b 50%, #54585d); }
.mgp-cfz { border-top: 0; background: linear-gradient(90deg, #55595e, #62666b 50%, #54585d); }
.mgp-r-cleds { border-bottom: 6px solid #b7bfc6; height: 18px; }
.mgp-fm { color: #f2f3f4; text-shadow: 0 0 2px rgba(0, 0, 0, 0.6); }
.mgp-fm::after { background: #e6e8ea; }
.mgp-fader-slot { background: #030303; box-shadow: 0 0 0 1px #8b9095, 0 0 0 2px #3a3d41; }
.mgp-fcap-dark .mgp-fader-cap {
  background: linear-gradient(#0000 0 44%, #e2332a 44% 56%, #0000 56%), repeating-linear-gradient(#4a4d51 0 2px, #2a2c2f 2px 3px), linear-gradient(#55595e, #26282b);
}
.mgp-dock, .mgp-stereo .mgp-dock { background: #141516; }
/* master: darker panel, raised display pod */
.mgp-msec, .mgp-mstrip { background: linear-gradient(#121314, #101112); box-shadow: inset 1px 0 0 #3c3f43; }
.mgp-mband-up { background: #0e0f10; }
.mgp-mbridge { background: #0b0b0c; }
.mgp-mpod {
  align-self: flex-end; display: flex; align-items: stretch; gap: 8px; margin: 8px 8px 6px; padding: 10px;
  background: linear-gradient(#0b0b0c, #050506); border: 1px solid #34373b; border-radius: 16px;
  box-shadow: inset 0 1px 0 #2c2e31, 0 6px 12px rgba(0, 0, 0, 0.7);
}
.mgp-mpod .mgp-msec-disp { border-right: 0; box-shadow: none; background: transparent; }
.mgp-mpod .mgp-disp { background: transparent; }
.mgp-mpod .mgp-mbridge { width: 112px; border: 1px solid #222; border-radius: 8px; }
.mgp-master-panel .mgp-mcontent { margin: 0; }
.mgp-master-panel .mgp-mband-lo { position: relative; box-shadow: none; border-top: 0; }
.mgp-fz { grid-template-rows: minmax(0, 1fr); }   /* fader = fader-zone content height in every strip / master column */
.mgp-mband-top { display: flex; border-top: 6px solid #0d0d0e; }
.mgp-mband-top .mgp-mstrip-top { flex: 0 0 auto; }
.mgp-master-inline .mgp-mband-top { margin-top: auto; }
.mgp-master-inline .mgp-mband-lo { border-top: 0; margin-top: 0; }
.mgp-master-panel .mgp-mstrip-name { height: var(--mname-h, 62px); align-items: flex-start; padding-top: 6px; } /* = strip's 音出し + tape (masterView alignTo) */

/* toolbar logo */
.mgp-tbtn-ov { font-weight: 800; }
.mgp-mode-ov .mgp-banks .mgp-tbtn:not(.mgp-scbtn-drums), .mgp-mode-ov .mgp-mini { display: none; }

/* ------------------------------------------------------------------ 全体ビュー (whole-console overview) */
.mgp-ov-host { display: none; }
.mgp-mode-ov > .mgp-scroller { display: none; }
.mgp-mode-ov .mgp-ov-host { display: block; position: relative; flex: 1 1 auto; min-height: 0; }
.mgp-ov {
  position: absolute; inset: 0; overflow: hidden; touch-action: none;
  background: radial-gradient(ellipse at 50% 40%, #3b3d41 0, #232427 60%, #18191b 100%);
}
.mgp-ov-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.mgp-ov-anim { transition: transform 0.28s ease-out; }
.mgp-ov-out .mgp-ov-stage { cursor: zoom-in; }
.mgp-ov-out .mgp-w, .mgp-ov-out .mgp-tape, .mgp-ov-out .mgp-scbtn, .mgp-ov-out .mgp-tbtn:not(.mgp-ov-ctrl .mgp-tbtn) { pointer-events: none; }
.mgp-chassis { display: flex; width: max-content; border-radius: 30px; overflow: hidden; background: #08090a; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px #2c2e31; }
.mgp-cheek {
  flex: 0 0 48px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.35) 100%),
    repeating-linear-gradient(178deg, #1d1814 0 3px, #241e19 3px 5px, #19140f 5px 9px, #2a231d 9px 10px),
    #1d1814;
}
.mgp-cheek-l { border-radius: 30px 0 0 30px; box-shadow: inset -2px 0 0 #000; }
.mgp-cheek-r { border-radius: 0 30px 30px 0; box-shadow: inset 2px 0 0 #000; }
.mgp-chassis-body { display: flex; flex-direction: column; padding: 0 12px 22px; background: linear-gradient(#141517, #0f1011); }
.mgp-chassis-top { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.mgp-logo-yamaha { display: flex; align-items: center; gap: 8px; color: #eceeef; font: 800 17px/1 "Helvetica Neue", Arial, sans-serif; letter-spacing: 0.2em; }
.mgp-logo-yamaha::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #eceeef; box-shadow: inset 0 0 0 3px #141517, inset 0 0 0 5px #eceeef; }
.mgp-logo-model { display: flex; align-items: baseline; gap: 10px; color: #e6e8ea; }
.mgp-logo-mc { font: 700 9px/1 var(--mgp-font-panel); letter-spacing: 0.12em; }
.mgp-logo-mgp { font: 700 italic 24px/1 "Times New Roman", "Hiragino Mincho ProN", serif; letter-spacing: 0.02em; }
.mgp-ov-panel { display: flex; align-items: stretch; border: 1px solid #2d3034; border-radius: 6px; overflow: hidden; }
.mgp-ov-strips { padding: 0; min-height: 0; }
.mgp-ov .mgp-dock { position: relative; box-shadow: none; }
.mgp-ov .mgp-strip { min-height: 0; }
.mgp-ov-master { flex: 0 0 auto; position: relative; border-left: 2px solid #4b4f54; }
.mgp-ov-ctrl { position: absolute; right: 8px; bottom: 8px; z-index: 6; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 8px; background: rgba(10, 10, 12, 0.72); }
.mgp-ov-zoom { min-width: 40px; text-align: center; font-size: 11px; color: #cfd3d8; font-variant-numeric: tabular-nums; }
.mgp-ov-hint { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 6; padding: 5px 10px; border-radius: 6px; background: rgba(10, 10, 12, 0.75); color: #dfe3e8; font-size: 11px; white-space: nowrap; transition: opacity 0.6s; pointer-events: none; }
.mgp-ov-hint.mgp-fade { opacity: 0; }

/* ------------------------------------------------------------------ thick bottom scrubber (phones) */
.mgp-scrub {
  flex: 0 0 auto; position: relative; height: 36px; max-width: none; margin: 0; border-radius: 0; border: 0; border-top: 1px solid #000;
  background: #0a0a0b; touch-action: none; cursor: grab;
}
.mgp-scrub .mgp-mini-cells { inset: 5px 4px; gap: 2px; }
.mgp-scrub .mgp-mini-c { opacity: 0.6; border-radius: 2px; }
.mgp-mini-m {
  display: flex; align-items: center; justify-content: center; flex-basis: 0; background: #3a3d42 !important; opacity: 0.9 !important;
  font: 800 9px/1 var(--mgp-font-panel, sans-serif); color: #d9dde2; letter-spacing: 0.1em; overflow: hidden;
}
.mgp-scrub .mgp-mini-win { border: 3px solid #f2f4f6; border-radius: 7px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35), 0 0 8px rgba(0, 0, 0, 0.8); display: flex; align-items: center; justify-content: center; }
.mgp-scrub-grip { width: 14px; height: 14px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0 2px, #0000 2px 5px); opacity: 0.8; }
.mgp-scrub.mgp-active .mgp-mini-win { border-color: #8fc0ff; }
.mgp-mode-ov .mgp-scrub, .mgp-mode-ov .mgp-mini { display: none; }

/* ------------------------------------------------------------------ inline master (continuation of the strips) */
.mgp-inline-master { flex: 0 0 auto; position: relative; width: max-content; border-left: 2px solid #6c7075; display: flex; }
.mgp-master-inline { display: flex; width: max-content; height: auto; min-height: 100%; overflow: visible; background: #0f1011; }
.mgp-master-inline .mgp-mscroll { overflow: visible; flex: none; }
.mgp-master-inline .mgp-mcontent { min-height: 100%; }
.mgp-master-inline .mgp-mband-lo { position: sticky; bottom: 0; z-index: 3; box-shadow: 0 -7px 9px -5px rgba(0, 0, 0, 0.75); }
.mgp-unpinned .mgp-master-inline .mgp-mband-lo { position: relative; box-shadow: none; }
.mgp-ov-master { width: max-content; display: flex; }
.mgp-master-panel { width: max-content; height: auto; min-height: 100%; overflow: visible; }
.mgp-master-panel .mgp-mscroll { overflow: visible; flex: none; }
.mgp-lcdstub {
  display: flex; flex-direction: column; gap: 5px; width: 210px; padding: 8px; border-radius: 10px; background: #070708;
  border: 1px solid #2c2f33; cursor: pointer; touch-action: manipulation;
}
.mgp-lcdstub:active { border-color: #5b8fd6; }
.mgp-lcdstub-scr {
  padding: 6px 8px; border-radius: 3px; background: linear-gradient(#e9f0ea, #d2ddd5); color: #173027;
  font: 700 11px/1.35 "Courier New", ui-monospace, monospace; box-shadow: inset 0 0 0 2px #0e1110;
}
.mgp-lcdstub-l { white-space: nowrap; overflow: hidden; }
.mgp-lcdstub-go { font-size: 10px; color: #9fc3f0; text-align: center; }
.mgp-lcdstub-btns { display: flex; gap: 3px; justify-content: space-between; }
.mgp-lcdstub-btns span { flex: 1 1 0; text-align: center; font: 800 6.5px/1 var(--mgp-font-panel, sans-serif); color: #cfd3d8; padding: 5px 0; border-radius: 3px; background: linear-gradient(#45484d, #26282b); }
.mgp-disp-tab { justify-content: center; }
.mgp-disp-tab .mgp-lcd-bezel, .mgp-disp-tab .mgp-disp-ctrls { max-width: 720px; }
.mgp-ov-stage { width: max-content; }
.mgp-ov-panel > *, .mgp-chassis > * { flex-shrink: 0; }
.mgp-master-panel .mgp-mcontent, .mgp-master-inline .mgp-mcontent { width: max-content; }
.mgp-short .mgp-r-sc { height: 22px; padding-top: 1px; }
.mgp-short .mgp-scbtn { min-height: 19px; }
.mgp-short .mgp-fz { border-top-width: 7px; }
@media (max-height: 430px) { .mgp-toolbar .mgp-tbtn { min-height: 26px; } .mgp-scrub { height: 32px; } }

/* ドラム全体 bar (joined segments across the drum strips, above their 音出し buttons) */
.mgp-r-scd { height: 18px; padding: 2px 0 0; }
.mgp-scdrum {
  position: relative; width: calc(100% + 1px); height: 16px; margin-right: -1px; padding: 0; border: 1px solid #55595f; border-left: 0; border-right: 0;
  background: linear-gradient(#3b3e43, #2a2c30); color: #cfd3d8; cursor: pointer; touch-action: manipulation; font: inherit; overflow: visible;
}
.mgp-scdrum-first { border-left: 1px solid #55595f; border-radius: 4px 0 0 4px; margin-left: 2px; width: calc(100% - 1px); }
.mgp-scdrum-last { border-right: 1px solid #55595f; border-radius: 0 4px 4px 0; width: calc(100% - 2px); margin-right: 2px; }
.mgp-scdrum-first.mgp-scdrum-last { width: calc(100% - 4px); }
.mgp-scdrum-t { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); z-index: 2; white-space: nowrap; font-size: 9.5px; font-weight: 800; pointer-events: none; }
.mgp-scdrum.mgp-on { background: linear-gradient(#fff2c8, #ffbf3d 55%, #f39a12); color: #3b2300; border-color: #c27a10; box-shadow: 0 0 7px rgba(255, 168, 30, 0.6); }
.mgp-nosc .mgp-r-scd { display: none; }
.mgp-short .mgp-r-scd { height: 17px; }
.mgp-scdrum { overflow: hidden; }
.mgp-scdrum-t { left: 3px; font-size: 9px; letter-spacing: -0.02em; }
.mgp-fz { overflow: hidden; }
.mgp-short .mgp-fz-r { gap: 1px; padding: 0 0 1px; }
.mgp-short .mgp-fz-r .mgp-sw-btn { height: 14px; }

/* ------------------------------------------------------------------ frozen legend column (left of CH1) */
.mgp-legend {
  position: sticky; left: 0; z-index: 6; flex: 0 0 auto; width: var(--legend-w, 56px); display: flex; flex-direction: column;
  background: linear-gradient(90deg, #1b1c1f, #222428); border-right: 2px solid #6c7075; box-shadow: 4px 0 8px rgba(0, 0, 0, 0.55);
}
.mgp-narrow .mgp-legend, .mgp-short .mgp-legend { --legend-w: 48px; }
.mgp-legend .mgp-cell { justify-content: flex-start; padding: 0 3px; gap: 1px; flex-wrap: wrap; align-content: center; }
.mgp-lg { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.mgp-lg-t { font: 800 9px/1.05 var(--mgp-font-panel); font-stretch: condensed; text-transform: uppercase; color: #f2f4f6; white-space: nowrap; }
.mgp-lg-s { font-size: 7.5px; color: #9fb0c0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(var(--legend-w, 56px) - 6px); }
.mgp-lg-link { cursor: help; border-radius: 3px; padding: 1px 2px; }
.mgp-lg-link:active { background: #34557f; }
.mgp-legend .mgp-r-sw1 .mgp-lg { flex-direction: row; }
.mgp-legend .mgp-r-sw1.mgp-cell { flex-direction: column; align-items: flex-start; }
.mgp-legend .mgp-r-sw1 .mgp-lg-t { font-size: 8px; }
.mgp-lg-head { color: #9fb0c0; }
.mgp-lg-dock { background: linear-gradient(90deg, #1b1c1f, #222428); }
.mgp-lg-fz { display: block; background: linear-gradient(90deg, #45484d, #4f5257); }
.mgp-lg-fzcol { height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 2px 2px; }
.mgp-lg-fader { margin-top: auto; }
.mgp-lg-xs .mgp-lg-t { font-size: 7px; }
.mgp-lg-drum { flex-direction: column; gap: 0; min-height: 20px; line-height: 1; padding: 1px 2px; font-size: 8px; }
.mgp-lg-drum .mgp-scbtn-i { font-size: 9px; }
.mgp-lg-drum .mgp-scbtn-t { font-size: 7.5px; letter-spacing: -0.03em; }
.mgp-legend .mgp-r-sc { height: 24px; padding: 2px 2px 0; }
.mgp-lg-tape { flex: 0 0 auto; height: 32px; margin: 3px 0; display: flex; flex-direction: column; justify-content: center; padding: 0 3px 6px; }
.mgp-short .mgp-lg-tape { height: 28px; margin: 2px 0; }
.mgp-compact.mgp-strip ~ .mgp-legend, .mgp-legend-c .mgp-cfz { min-height: 60px; }
.mgp-legend-c { height: 100%; }
.mgp-legend-c .mgp-lg-tape { height: 30px; }
.mgp-strips > .mgp-strip:nth-child(8n) { border-right-color: #4b4f54; }
.mgp-strips > .mgp-legend ~ .mgp-strip:nth-child(8n+1) { border-right-color: #6c7075; }

/* master layout per photo: pod spans the master section from the FX RTN left edge; knob band sits directly above
   the fader band (bottom-aligned); fader band spans the same width (FX RTN left, STEREO right). */
.mgp-mpod { align-self: stretch; justify-content: space-between; margin: 8px 6px 6px; }
.mgp-master-panel .mgp-msec { justify-content: flex-end; }
.mgp-master-panel .mgp-msec-title { margin-top: 0; }
.mgp-master-panel .mgp-mband-lo .mgp-mgap { flex: 1 1 10px; }

/* ---- master layout fidelity (photo-measured): master = 8 strip widths; pod spans it over the input-section rows */
.mgp-mcell-row { width: calc(var(--strip-w) + 22px); padding-right: 2px; }
.mgp-mcell-row > .mgp-knob { width: calc(var(--strip-w) - 2px); }
.mgp-usbbox { border: 1px solid #4b4f54; border-radius: 4px; margin: 2px 3px; padding-bottom: 2px; }
.mgp-usbbox .mgp-mcell { width: calc(var(--strip-w) + 14px); }
.mgp-usbbox .mgp-mcell-sw { height: 26px; }
.mgp-master-panel .mgp-mband-lo .mgp-mgap { display: none; }
.mgp-master-panel .mgp-msec-title { font-size: 7px; letter-spacing: 0.02em; padding: 3px 2px; }
.mgp-master-panel .mgp-msec-disp { width: 300px; }
.mgp-master-panel .mgp-mpod { gap: 6px; padding: 8px; }
.mgp-master-panel .mgp-mpod .mgp-mbridge { width: 100px; }
.mgp-mpod .mgp-disp { padding: 4px; gap: 5px; }
.mgp-mpod .mgp-enc-knob { width: 42px; height: 42px; }
.mgp-mpod .mgp-dbtn-cap { width: 32px; height: 22px; }
.mgp-mpod .mgp-dbtn-lbl { font-size: 7.5px; }
.mgp-mpod .mgp-disp-fx12, .mgp-mpod .mgp-disp-both { font-size: 9px; min-height: 22px; padding: 0 4px; }
.mgp-mpod .mgp-dbtn-home .mgp-dbtn-cap { width: 42px; height: 24px; }
.mgp-master-panel .mgp-msec-title { white-space: normal; line-height: 1.1; max-width: 100%; }
.mgp-master-panel .mgp-mcell-pair { gap: 2px; }
.mgp-master-panel .mgp-mcell-pair .mgp-sw-btn { width: 24px; font-size: 6px; }
.mgp-master-panel .mgp-msec-title { width: 0; min-width: 100%; }
.mgp-master-panel .mgp-mpod { flex: 1 1 auto; align-items: center; }
.mgp-master-panel .mgp-mband-up { flex: 0 0 auto; }
.mgp-master-panel .mgp-mpod .mgp-mbridge { align-self: stretch; }
.mgp-ov-scg { position: absolute; left: 70px; bottom: 3px; z-index: 2; display: flex; gap: 6px; }
.mgp-ov-scg .mgp-scg-b { width: auto; min-height: 18px; font-size: 10px; padding: 0 10px; }
.mgp-chassis { position: relative; }
/* inline (strip view): pod at its natural height, knob band right below it (reachable by scrolling on phones) */
.mgp-master-inline .mgp-mpod { flex: 0 0 auto; align-items: flex-start; }
.mgp-master-inline .mgp-mband-up { flex: 1 0 auto; }
.mgp-master-inline .mgp-msec { justify-content: flex-start; }
.mgp-master-inline .mgp-msec-title { margin-top: auto; }

/* desktop affordances: pan mode (SPACE / Alt / middle button) and fader cap-only grab */
html.mgp-panmode .mgp, html.mgp-panmode .mgp * { cursor: grab !important; }
html.mgp-panning, html.mgp-panning * { cursor: grabbing !important; }
.mgp-fader.mgp-w { cursor: default; }
.mgp-fader-cap { cursor: grab; }
/* desktop: invisible grab box 16 px above/below (and a little wider than) the cap — same pad as fader.js accept();
   it stays inside the fader column, so 1-2/3-4/ST/PFL next to it keep their clicks; the bare track still does nothing */
@media (hover: hover) and (pointer: fine) {
  .mgp-fader-cap::before { content: ""; position: absolute; left: -5px; right: -1px; top: -16px; bottom: -16px; }
}
.mgp-fader.mgp-active, .mgp-fader.mgp-active .mgp-fader-cap { cursor: grabbing; }
.mgp-knob.mgp-w { cursor: ns-resize; }

/* touch navigation: the console viewports handle every touch themselves (no native scroll / page pinch) */
.mgp-tnav, .mgp-tnav * { touch-action: none !important; }
.mgp-tnav .mgp-tape-input { touch-action: manipulation !important; }
.mgp-strips { min-height: calc(100% / var(--z, 1)); }
.mgp-mode-compact .mgp-strips { height: calc(100% / var(--z, 1)); }
.mgp-tbtn-zoom { min-width: 44px; font-variant-numeric: tabular-nums; }

/* ================================================================== PERFORMANCE (raster / layout cost)
   knob graphics as cached SVG images instead of per-knob conic gradients + masks; containment for strips;
   off-screen strips skip rendering. */
.mgp-knob-dial::before { background: url("img/knob-dial.svg") center / 100% 100% no-repeat; -webkit-mask: none; mask: none; opacity: 1; }
.mgp-nom-comp .mgp-knob-dial::before { background: url("img/knob-dial-comp.svg") center / 100% 100% no-repeat; -webkit-mask: none; mask: none; }
.mgp-knob::before { display: none; }
.mgp-knob-rot { background: url("img/knob-skirt.svg") center / 100% 100% no-repeat; }
.mgp-strips > .mgp-strip { contain: layout style; }
.mgp-scroller { will-change: scroll-position; }
.mgp-console:not(.mgp-mode-ov) .mgp-strips > .mgp-strip:not(.mgp-strip-sel) { content-visibility: auto; contain-intrinsic-size: auto var(--strip-w) auto 900px; }
.mgp-meter-cover { contain: strict; }

/* ------------------------------------------------------------------ 客席の音量 (FOH) meter (fohMeter.js) */
.mgp-foh {
  position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 2px 2px 1px; gap: 1px;
  cursor: help; background: #0d0e10; border-radius: 3px; box-shadow: inset 0 0 0 1px #2e3236;
}
.mgp-foh-head { display: flex; flex-direction: column; align-items: center; line-height: 1; gap: 1px; }
.mgp-foh-title { font: 800 7.5px/1 var(--mgp-font-panel); color: #c9d3dd; white-space: nowrap; letter-spacing: -0.03em; }
.mgp-foh-vrow { display: flex; align-items: baseline; gap: 1px; }
.mgp-foh-val { font: 800 13px/1 var(--mgp-font-panel); color: #f2f4f6; font-variant-numeric: tabular-nums; }
.mgp-foh-unit { font-size: 6.5px; color: #9aa3ad; }
.mgp-foh-st { align-self: center; font-size: 8px; font-weight: 800; line-height: 1.1; color: #9aa3ad; min-height: 9px; white-space: nowrap; }
.mgp-foh-low .mgp-foh-st, .mgp-foh-low .mgp-foh-val { color: #ffb63a; }
.mgp-foh-ok .mgp-foh-st, .mgp-foh-ok .mgp-foh-val { color: #4fe873; }
.mgp-foh-high .mgp-foh-st, .mgp-foh-high .mgp-foh-val { color: #ff5246; }
.mgp-foh-body { position: relative; flex: 1 1 auto; min-height: 30px; display: flex; gap: 2px; padding: 3px 9px 3px 0; }
.mgp-foh-scale { position: relative; flex: 0 0 11px; }
.mgp-foh-tick { position: absolute; right: 0; top: calc((1 - var(--p)) * 100%); transform: translateY(-50%); font: 600 6px/1 var(--mgp-font-panel); color: #aab3bc; }
.mgp-foh-col { position: relative; flex: 1 1 auto; min-width: 7px; overflow: hidden; border-radius: 2px; background: #1a1c1f; }
.mgp-foh-band {
  position: absolute; left: 0; right: 0; top: calc((1 - var(--hi, 0.57)) * 100%); bottom: calc(var(--lo, 0.46) * 100%); z-index: 3;
  background: rgba(79, 232, 115, 0.16); box-shadow: inset 0 1.5px 0 #4fe873, inset 0 -1.5px 0 #4fe873;
}
.mgp-foh-band-t {
  position: absolute; right: -1px; width: 10px; top: calc(3px + (1 - var(--hi, 0.57)) * (100% - 6px)); bottom: calc(3px + var(--lo, 0.46) * (100% - 6px));
  display: flex; align-items: center; justify-content: center; overflow: visible;
  border-left: 2px solid #4fe873; font-size: 7px; font-weight: 800; line-height: 1; color: #7cf09a; writing-mode: vertical-rl; white-space: nowrap;
}
.mgp-foh-fill { position: absolute; inset: 0; z-index: 1; background: #4a4e54; }
.mgp-foh-low .mgp-foh-fill { background: linear-gradient(to top, #a8650f, #ffb63a); }
.mgp-foh-ok .mgp-foh-fill { background: linear-gradient(to top, #1c9a3b, #4fe873); }
.mgp-foh-high .mgp-foh-fill { background: linear-gradient(to top, #b8241b, #ff5246); }
.mgp-foh-cover { position: absolute; inset: 0; z-index: 2; background: rgba(14, 15, 17, 0.8); transform-origin: 50% 0; transform: scaleY(1); }
.mgp-foh-grid {
  position: absolute; inset: 0; z-index: 4;
  background: repeating-linear-gradient(to top, #0000 0, #0000 calc(100% / var(--segs, 18) - 1px), #0b0b0c calc(100% / var(--segs, 18) - 1px), #0b0b0c calc(100% / var(--segs, 18)));
}
.mgp-foh-pkw { position: absolute; left: 0; right: 0; top: 0; height: 100%; z-index: 5; pointer-events: none; transform: translateY(100%); }
.mgp-foh-pk { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #f4f6f8; box-shadow: 0 0 3px #fff; }
.mgp-foh-c .mgp-foh-val { font-size: 11px; }
/* legend (strip view): labels column + meter side by side in the pinned fader zone */
.mgp-legend { --legend-w: 84px; }
.mgp-narrow .mgp-legend, .mgp-short .mgp-legend { --legend-w: 76px; }
.mgp-legend .mgp-lg-fz { display: flex; gap: 2px; padding: 2px 2px 2px 1px; }
.mgp-legend .mgp-lg-fz .mgp-lg-fzcol { flex: 0 0 auto; width: 31px; padding: 2px 0 2px 1px; }
.mgp-legend .mgp-lg-fz .mgp-lg-s { max-width: 31px; }
.mgp-legend .mgp-lg-fz .mgp-foh { flex: 1 1 auto; }
.mgp-legend-c .mgp-lg-fz { display: flex; flex-direction: column; gap: 2px; padding: 3px 2px; }
.mgp-legend-c .mgp-lg-fz .mgp-lg-fzcol { flex: 0 0 auto; width: auto; height: auto; }
/* 全体ビュー: small version on the left end cheek, level with the fader band */
.mgp-ov-foh { position: absolute; left: 3px; width: 42px; bottom: 96px; height: 300px; z-index: 3; display: flex; }
.mgp-ov-foh .mgp-foh { flex: 1 1 auto; }

/* LCD tempo dot (display.js, flashes on the shared TAP clock) */
.mgp-lcd-tap { display: flex; align-items: center; gap: 0.5em; }
.mgp-lcd-tapdot { flex: 0 0 auto; width: 0.85em; height: 0.85em; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ink, #173027); }
.mgp-lcd-tapdot.mgp-on { background: var(--ink, #173027); }

/* ================================================================== latching switches: ON = lit, OFF = blacked out
   Deliberately clearer than the real console (user request). Applies to every createSwitch without onPress
   (class mgp-latch, set in toggle.js) and to the 2-way push selects. Momentary buttons (TAP, METER SELECT) and the
   amber/grey ON lamps keep their own look; LEDs are untouched. ST and +48V keep their red identity: vivid red ON,
   deep dark red OFF. Glow = one box-shadow, no filters (全体ビュー draws hundreds of these). */
.mgp-sw.mgp-latch .mgp-sw-btn, .mgp-sel.mgp-sel-push .mgp-sw-btn {
  background: linear-gradient(#222428, #131416); color: #5f666e;
  box-shadow: 0 1px 0 #000, inset 0 0 0 1px #3a3e44; transform: none; text-shadow: none;
}
.mgp-sw.mgp-latch.mgp-on .mgp-sw-btn, .mgp-sel.mgp-sel-push.mgp-on .mgp-sw-btn {
  background: linear-gradient(#ffffff, #dde3ea); color: #07080a;
  box-shadow: 0 0 7px 1px rgba(210, 230, 255, 0.85), inset 0 0 0 1px #ffffff; transform: none;
}
.mgp-sw.mgp-latch.mgp-sw-st .mgp-sw-btn, .mgp-sw.mgp-latch.mgp-sw-smred .mgp-sw-btn {
  background: linear-gradient(#5e1510, #3a0a07); color: #cf7f77; box-shadow: 0 1px 0 #000, inset 0 0 0 1px #84281f;
}
.mgp-sw.mgp-latch.mgp-sw-st.mgp-on .mgp-sw-btn, .mgp-sw.mgp-latch.mgp-sw-smred.mgp-on .mgp-sw-btn {
  background: linear-gradient(#ff8f80, #ff2d1a 55%, #e01a0a); color: #fff; text-shadow: 0 0 2px #6a0700;
  box-shadow: 0 0 8px 1px rgba(255, 50, 30, 0.9), inset 0 0 0 1px #ffb0a5;
}
/* DUCK (lit button): green lamp when ON */
.mgp-sw.mgp-latch.mgp-sw-lit.mgp-on .mgp-sw-btn { background: linear-gradient(#e6ffe5, #63d16a); color: #062a0a; box-shadow: 0 0 8px 1px rgba(80, 230, 90, 0.85), inset 0 0 0 1px #f0fff0; }
.mgp-sw.mgp-latch.mgp-active .mgp-sw-btn { filter: none; }
/* push selects: the active printed legend lit, the other dim */
.mgp-sel-push .mgp-sel-legend span { color: #6f757c; }
.mgp-sel-push[data-idx="0"] .mgp-sel-up, .mgp-sel-push[data-idx="1"] .mgp-sel-dn { color: #fff; font-weight: 800; }

/* section soundcheck buttons (scGroups.js): legend 2×2 block over the 音出し + tape rows, detail row */
.mgp-scg.mgp-hidden, .mgp-scg-b.mgp-hidden { display: none; }
.mgp-lg-bot { position: relative; flex: 0 0 auto; }
.mgp-lg-scg {
  position: absolute; inset: 2px 2px 3px; z-index: 2; display: flex; flex-wrap: wrap; align-content: stretch; gap: 2px;
  background: linear-gradient(90deg, #1b1c1f, #222428);
}
.mgp-lg-scg .mgp-scg-b { flex: 1 1 calc(50% - 1px); min-width: 0; min-height: 0; width: auto; padding: 0 1px; gap: 0; justify-content: center; overflow: hidden; }
.mgp-scg-t { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; font-size: 8.5px; letter-spacing: -0.03em; }
.mgp-scg-s { font-size: 6.5px; opacity: 0.8; }
.mgp-lg-scg .mgp-scbtn-i { display: none; }   /* legend block: no room for the ♪ — the title says it */
.mgp-lg-scg .mgp-scg-t { align-items: center; font-size: 8px; }
.mgp-dt-scg { display: flex; gap: 6px; }
