/* Model P — black panel, walnut cheeks, brushed aluminium strip. */

.device-model-p {
  --row-h: 128px;
  --band-h: 15px;
}

/* ------------------------------------------------------------------ case */

.synth {
  display: flex;
  align-items: stretch;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.cheek {
  width: 46px;
  flex: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='700'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.22 0.006' numOctaves='4' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.08  0 0 0 0 0.03  1.7 0 0 0 -0.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E") 0 0 / 100% 100%,
    linear-gradient(90deg, #3e2210 0%, #7a4724 22%, #8d5530 50%, #6c3d1d 80%, #3a1f0e 100%);
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.25), inset 0 -2px 4px rgba(0, 0, 0, 0.5);
}
.cheek-left { border-radius: 14px 0 0 10px; }
.cheek-right { border-radius: 0 14px 10px 0; }

.case {
  display: flex;
  flex-direction: column;
  background: #0b0b0b;
}

/* ----------------------------------------------------------------- panel */

.panel {
  display: flex;
  gap: 6px;
  padding: 16px 18px 12px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #1b1b1b 0%, var(--panel) 30%, #101010 100%);
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.section {
  display: flex;
  flex-direction: column;
  padding: 0 10px;
}

.rows {
  display: grid;
  grid-template-rows: repeat(3, var(--row-h));
  flex: 1;
}

.row {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(86px, auto);
  align-items: center;
  justify-items: center;
  padding-top: var(--band-h);
}

/* Printed sub-heading above a row: "——— FILTER CONTOUR ———" */
.row[data-band]::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 6px;
  height: 1px;
  background: var(--line);
  opacity: 0.55;
}
.row[data-band]::before {
  content: attr(data-band);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  padding: 0 8px;
  background: #151515;
  font: 700 8.5px/13px var(--font);
  letter-spacing: 0.22em;
  white-space: nowrap;
  color: var(--ink);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  font: 700 11px/1 var(--font);
  letter-spacing: 0.26em;
  color: var(--ink);
  white-space: nowrap;
}
.section-title::before,
.section-title::after {
  content: "";
  flex: 1;
  min-width: 12px;
  height: 1px;
  background: var(--line);
}

.caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font: 700 9px var(--font);
  letter-spacing: 0.2em;
  color: var(--ink);
}
.caption b {
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1;
}

.pair {
  display: flex;
  gap: 10px;
}

/* ----------------------------------------------------------------- mixer */

.mixer {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: var(--band-h) repeat(6, calc((var(--row-h) * 3 - var(--band-h)) / 6));
  column-gap: 14px;
  flex: 1;
}
.mix-item {
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: center;
  justify-self: center;
}
.mix-color { align-self: start; }

/* ----------------------------------------------------------------- power */

.power {
  display: flex;
  align-items: center;
  gap: 10px;
}

.jewel {
  width: 18px;
  height: 18px;
  margin-top: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #b46a62 0%, #5a110b 45%, #240504 100%);
  box-shadow: 0 0 0 2px #1a1a1a, 0 0 0 4px #8d9196, 0 1px 0 4px #4a4d50;
  transition: background 0.2s, box-shadow 0.2s;
}
.jewel.on {
  background: radial-gradient(circle at 36% 30%, #fff1e8 0%, #ff5a3c 30%, #c51d0d 70%, #5c0a04 100%);
  box-shadow: 0 0 0 2px #1a1a1a, 0 0 0 4px #8d9196, 0 1px 0 4px #4a4d50, 0 0 18px 6px rgba(255, 70, 40, 0.45);
}

/* ------------------------------------------------------------ logo strip */

.strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 78px;
  padding: 0 22px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, rgba(0, 0, 0, 0.035) 1px 2px, transparent 2px 5px),
    linear-gradient(180deg, #e6e9ec 0%, #c8ccd0 40%, #b2b7bc 100%);
  border-top: 1px solid #f7f9fa;
  border-bottom: 2px solid #5f6367;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  color: #26282b;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
}
.wordmark {
  font: 700 32px/1 "Futura", "Century Gothic", "Avenir Next", "Trebuchet MS", sans-serif;
  letter-spacing: -0.015em;
  color: #2a2c2f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75), 0 -1px 0 rgba(0, 0, 0, 0.12);
}
.model {
  font: 700 8px var(--font);
  letter-spacing: 0.3em;
  color: #4b4f54;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.preset-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.vfd-wrap { position: relative; }

.vfd {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: baseline;
  width: 340px;
  height: 48px;
  padding: 6px 12px;
  border: 0;
  border-radius: 4px;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 40%, #0a201c, var(--vfd-bg));
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 0 2px #2a2d30, 0 0 0 3px #8e9398, 0 1px 0 3px #f2f4f5;
  color: var(--vfd);
  font: 600 15px/1.1 var(--mono);
  text-align: left;
  text-shadow: 0 0 6px rgba(125, 255, 224, 0.75);
  cursor: pointer;
}
.vfd:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.vfd-num { grid-row: 1 / 3; align-self: center; font-size: 22px; opacity: 0.85; }
.vfd-name { text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vfd-edited {
  grid-column: 3;
  grid-row: 1;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 1px 4px;
  border: 1px solid var(--vfd);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--vfd-dim);
}
.vfd-cat {
  grid-column: 2 / 4;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}

.pbtn {
  height: 28px;
  min-width: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, #45494d, #26282b);
  color: #ecebe7;
  font: 700 9px var(--font);
  letter-spacing: 0.12em;
  box-shadow: 0 2px 0 #0d0e0f, 0 3px 4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  cursor: pointer;
}
.pbtn.arrow { font-size: 10px; padding: 0 8px; }
.pbtn:hover { background: linear-gradient(180deg, #52565b, #2c2f32); }
.pbtn:active { transform: translateY(2px); box-shadow: 0 0 0 #0d0e0f, inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.pbtn:disabled { opacity: 0.4; cursor: default; transform: none; }
.pbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.monitor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.scope-wrap {
  position: relative;
  width: 210px;
  height: 46px;
  border-radius: 4px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 40%, #0a201c, var(--vfd-bg));
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 0 2px #2a2d30, 0 0 0 3px #8e9398, 0 1px 0 3px #f2f4f5;
}
.scope {
  --scope-trace: #7dffe0;
  --scope-grid: rgba(125, 255, 224, 0.1);
  display: block;
  width: 100%;
  height: 100%;
}
.scope-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 600 9px var(--mono);
  letter-spacing: 0.14em;
  color: var(--vfd);
  opacity: 0.55;
  text-shadow: 0 0 6px var(--vfd-dim);
  pointer-events: none;
}

.voice-leds {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}
.led {
  --level: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb59e, #ff3b1f 45%, #6b0d03);
  box-shadow: 0 0 0 1.5px #3b3e41, 0 0 calc(var(--level) * 9px) calc(var(--level) * 2px) rgba(255, 70, 30, 0.7);
  filter: brightness(calc(0.28 + var(--level) * 0.9)) saturate(calc(0.5 + var(--level)));
}

/* ---------------------------------------------------------------- keybed */

.keybed {
  display: flex;
  gap: 16px;
  padding: 14px 16px 0;
  background: linear-gradient(180deg, #050505, #121212 30%, #0d0d0d);
  box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.9);
}

.left-hand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 128px;
  flex: none;
  padding-bottom: 12px;
}
.lh-switches { display: flex; gap: 14px; }
.wheels { display: flex; gap: 16px; }

ws-wheel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
ws-wheel .ctl-label { min-height: 0; }
.wheel-slot {
  width: 34px;
  height: 104px;
  padding: 7px 5px;
  border-radius: 4px;
  background: #030303;
  box-shadow: inset 0 3px 8px #000, 0 1px 0 rgba(255, 255, 255, 0.06);
}
.wheel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 3px;
  background: linear-gradient(90deg, #0d0d0d, #2f2f2f 28%, #3d3d3d 50%, #2b2b2b 72%, #0b0b0b);
  cursor: ns-resize;
  touch-action: none;
  outline: none;
}
.wheel:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
.wheel-ribs {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0 2px, rgba(255, 255, 255, 0.07) 2px 3px, transparent 3px 7px);
}
.wheel-mark {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 5px;
  margin-top: -2.5px;
  background: linear-gradient(180deg, #fffdf6, #cfcabe);
}
.wheel::after {
  /* cylinder shading */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.85));
  pointer-events: none;
}

ws-keyboard {
  position: relative;
  display: block;
  flex: 1;
  height: 196px;
  touch-action: none;
  border-top: 3px solid #5a1a10;
  box-shadow: 0 -2px 0 #1a0805;
}

.key {
  position: absolute;
  top: 0;
  cursor: pointer;
}
.key.white {
  height: 100%;
  border-radius: 0 0 5px 5px;
  border-right: 1px solid #a9a294;
  background: linear-gradient(180deg, #d9d3c5 0%, #f6f2e8 6%, #efe9dc 80%, #e2dbcb 94%, #c9c1b0 100%);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.07), inset 1px 0 0 rgba(255, 255, 255, 0.8);
}
.key.white.down {
  background: linear-gradient(180deg, #8f887b 0%, #cfc7b7 9%, #d6cebe 86%, #bdb4a2 100%);
  box-shadow: inset 0 4px 7px rgba(0, 0, 0, 0.35), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
.key.black {
  z-index: 2;
  height: 62%;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(180deg, #000 0%, #262626 10%, #1a1a1a 82%, #3a3a3a 90%, #111 100%);
  box-shadow: inset 0 -6px 0 #2e2e2e, inset 1px 0 0 #3b3b3b, inset -1px 0 0 #000, 0 4px 5px rgba(0, 0, 0, 0.55);
}
.key.black.down {
  height: 61%;
  background: linear-gradient(180deg, #000 0%, #121212 14%, #0e0e0e 94%, #1c1c1c 100%);
  box-shadow: inset 0 -2px 0 #262626, 0 1px 1px rgba(0, 0, 0, 0.5);
}

.key .hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  font: 600 10px var(--mono);
  text-align: center;
  color: #8a8478;
  pointer-events: none;
}
.key.black .hint { bottom: 12px; color: #8b8b8b; }
.key .octave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  font: 700 8px var(--font);
  letter-spacing: 0.06em;
  text-align: center;
  color: #b2aa99;
  pointer-events: none;
}

.front-rail {
  height: 22px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='40'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.35' numOctaves='4' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.08  0 0 0 0 0.03  1.7 0 0 0 -0.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E") 0 0 / 100% 100%,
    linear-gradient(180deg, #8d5530, #6c3d1d 60%, #3a1f0e);
  box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.25);
}


/* ------------------------------------------------------------- patch bay */

.section-patch .row { grid-auto-columns: minmax(78px, auto); }
.section-patch .jack-label { font-size: 8.5px; }
/* PUBLIC on: the preset is yours and everybody can load it. */
.pbtn[aria-pressed="true"] { color: var(--vfd); text-shadow: 0 0 6px var(--vfd-dim); box-shadow: 0 2px 0 #0d0e0f, 0 3px 4px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(125, 255, 224, 0.4); }
