/* Pocketline, Glasshouse and Cutter. Self-contained. Glasshouse and Cutter are 1100px
   hardware zoomed by container width that switch to a horizontal pan below 858px, like the
   stations. Pocketline is a portrait slab that fits a phone without panning. */

.instrument.tr {
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --focus: #ffd27a;
  container-type: inline-size;
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  font-family: var(--sans);
  color: #f1ece2;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tr *, .tr *::before, .tr *::after { box-sizing: border-box; }
.tr button { appearance: none; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; }
.tr :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.tr-pan { position: relative; }
/* --z mirrors the container zoom so names and readouts keep their size on screen. */
.tr-body { position: relative; width: 1100px; margin-inline: auto; --z: 1; }
.tr-pan-hint { display: none; margin: 6px 0 0; text-align: center; font: 600 14px/1.2 var(--mono); letter-spacing: .08em; color: rgba(255, 244, 228, .8); }
@container (max-width: 1099.98px) { .tr-body { zoom: .92; --z: .92; } }
@container (max-width: 1011px) { .tr-body { zoom: .84; --z: .84; } }
@container (max-width: 923px) { .tr-body { zoom: .78; --z: .78; } }
@container (max-width: 857px) {
  .tr-pan { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 14px 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent; }
  .tr-body { zoom: 1; --z: 1; margin-inline: 0; }
  .tr-pan-hint { display: block; }
  .gh-deck, .gh-ch, .gh-center, .ct-deck, .ct-mixer { scroll-snap-align: center; }
}
@container (max-width: 520px) { .ct-body { zoom: .86; --z: .86; } }

/* ── shared mechanics: real inputs and buttons under drawn art ── */
.tr-name { display: block; font: 600 calc(14px / var(--z, 1))/1.1 var(--mono); letter-spacing: .04em; text-align: center; white-space: nowrap; pointer-events: none; }
.tr-val { position: absolute; left: 50%; top: -28px; z-index: 40; translate: -50% 4px; padding: 5px 8px; border-radius: 6px; background: rgba(12, 12, 14, .95); color: var(--focus); font: 600 calc(14px / var(--z, 1))/1 var(--mono); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .14s, translate .14s; }
.control:is(:hover, :focus-within) > .tr-val { opacity: 1; translate: -50% 0; }

.tr-dial { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; width: var(--dial-w, 64px); padding-top: 6px; cursor: grab; }
.tr-dial:active { cursor: grabbing; }
.tr-dial .knob-art { position: relative; display: block; width: var(--dial, 44px); height: var(--dial, 44px); pointer-events: none; }
.tr-dial-ring { position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(from -135deg, var(--ring, #e6bf74) 0 calc(var(--v) * 270deg), var(--ring-off, rgba(255, 255, 255, .14)) 0 270deg, transparent 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); mask: radial-gradient(closest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); }
.tr-dial-cap { position: absolute; inset: 0; border-radius: 50%; background: var(--cap-bg, radial-gradient(circle at 35% 28%, #5a5650, #1d1b19 65%)); box-shadow: 0 4px 8px rgba(0, 0, 0, .5), inset 0 1px 1px rgba(255, 255, 255, .2); rotate: calc(-135deg + var(--v) * 270deg); }
.tr-dial-cap::after { content: ""; position: absolute; left: calc(50% - 1.5px); top: 4px; width: 3px; height: 30%; border-radius: 2px; background: var(--mark, #fff); }
.tr-dial > input { appearance: none; -webkit-appearance: none; position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; touch-action: none; }

.tr-slide { --capw: 40px; --caph: 22px; position: relative; display: grid; cursor: grab; }
.tr-slide:active { cursor: grabbing; }
.tr-slide > input { appearance: none; -webkit-appearance: none; position: relative; z-index: 3; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; background: transparent; cursor: inherit; touch-action: none; }
.tr-slide > input::-webkit-slider-thumb { -webkit-appearance: none; width: var(--capw); height: var(--caph); border: 0; background: transparent; }
.tr-slide > input::-moz-range-thumb { width: var(--capw); height: var(--caph); border: 0; background: transparent; }
.tr-track { position: relative; pointer-events: none; }
.tr-fill, .tr-cap { position: absolute; display: block; }
.tr-track::before { content: ""; position: absolute; border-radius: 4px; background: var(--slot, #0b0a09); box-shadow: inset 0 1px 2px #000; }
.tr-cap { border-radius: 6px; background: var(--capbg, linear-gradient(#f1ebe0, #a9a194)); box-shadow: 0 4px 8px rgba(0, 0, 0, .5); }
/* vertical: name above, track and input share one cell */
.tr-slide--v { width: var(--sw, 56px); height: var(--sh, 170px); grid-template-rows: auto 1fr; justify-items: center; gap: 8px; }
.tr-slide--v .tr-name { grid-row: 1; }
.tr-slide--v .tr-track, .tr-slide--v > input { grid-row: 2; grid-column: 1; width: 100%; height: 100%; }
.tr-slide--v > input { writing-mode: vertical-lr; direction: rtl; }
.tr-slide--v .tr-track::before { left: calc(50% - 3px); top: 0; bottom: 0; width: 6px; }
.tr-slide--v .tr-cap { left: calc(50% - var(--capw) / 2); bottom: calc(var(--v) * (100% - var(--caph))); width: var(--capw); height: var(--caph); }
.tr-slide--v .tr-cap::after { content: ""; position: absolute; left: 5px; right: 5px; top: calc(50% - 1px); height: 2px; background: rgba(0, 0, 0, .65); }
.tr-slide--v .tr-fill { left: calc(50% - 3px); width: 6px; bottom: 0; height: calc(var(--caph) / 2 + var(--v) * (100% - var(--caph))); border-radius: 3px; background: var(--fill, transparent); }
.tr-slide--v.tr-slide--center .tr-fill { --pos: calc(var(--caph) / 2 + var(--v) * (100% - var(--caph))); bottom: min(50%, var(--pos)); height: max(calc(var(--pos) - 50%), calc(50% - var(--pos))); }
/* horizontal: name and live value on one line, track below */
.tr-slide--h { grid-template-columns: 1fr auto; grid-template-rows: auto var(--th, 44px); align-items: center; gap: 4px 10px; }
.tr-slide--h .tr-name { grid-column: 1; grid-row: 1; text-align: left; }
.tr-slide--h > .tr-val { position: static; grid-column: 2; grid-row: 1; translate: none; padding: 0; background: none; opacity: 1; color: inherit; }
.tr-slide--h .tr-track, .tr-slide--h > input { grid-column: 1 / -1; grid-row: 2; width: 100%; height: 100%; }
.tr-slide--h .tr-track::before { left: 0; right: 0; top: calc(50% - 4px); height: 8px; }
.tr-slide--h .tr-cap { left: calc(var(--v) * (100% - var(--capw))); top: calc(50% - var(--caph) / 2); width: var(--capw); height: var(--caph); }
.tr-slide--h .tr-cap::after { content: ""; position: absolute; top: 6px; bottom: 6px; left: calc(50% - 1px); width: 2px; background: rgba(0, 0, 0, .55); }
.tr-slide--h .tr-fill { top: calc(50% - 4px); height: 8px; left: 0; width: calc(var(--capw) / 2 + var(--v) * (100% - var(--capw))); border-radius: 4px; background: var(--fill, transparent); }
.tr-slide--h.tr-slide--center .tr-fill { --pos: calc(var(--capw) / 2 + var(--v) * (100% - var(--capw))); left: min(50%, var(--pos)); width: max(calc(var(--pos) - 50%), calc(50% - var(--pos))); }
.tr-slide:has(> input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 10px; }
.tr-dial:has(> input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 10px; }

.tr-key { position: relative; display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.tr-key > span { pointer-events: none; }
.tr-meter { display: flex; flex-direction: column-reverse; gap: 2px; width: 8px; height: 130px; pointer-events: none; }
.tr-meter i { flex: 1; border-radius: 2px; background: var(--seg, #63d892); opacity: clamp(.12, calc((var(--m) - var(--i)) * 18), 1); }
.tr-meter i:nth-last-child(-n + 2) { background: var(--seg-hot, #f1bf47); }
.tr-meter i:last-child { background: var(--seg-peak, #f05a3c); }

/* ═══════════ POCKETLINE: a matte polymer slab, two cards and one blend ═══════════ */
.pl { --a: #7fe0c8; --b: #ffb27a; }
.pl-slab { position: relative; width: min(100%, 440px); margin-inline: auto; padding: 18px 16px 20px; border-radius: 40px; display: grid; gap: 12px;
  background: radial-gradient(120% 60% at 30% 0, rgba(127, 224, 200, .1), transparent 60%), linear-gradient(165deg, #2f3d3f, #1a2325 70%);
  border: 2px solid #46595c; box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .8), inset 0 2px 0 rgba(255, 255, 255, .08); }
.pl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 6px 0 10px; }
.pl-brand { font: 700 22px/1 var(--sans); letter-spacing: -.02em; color: #eaf7f2; }
.pl-brand small { display: block; margin-top: 4px; font: 500 13px/1 var(--sans); letter-spacing: .02em; color: #9fbdb6; }
.pl-records { min-height: 44px; padding: 0 16px; border-radius: 22px; background: #10191a; border: 1px solid #4d6366; font: 700 14px/1 var(--sans); letter-spacing: .04em; color: #dff3ee; }
.pl-card { --c: var(--a); display: grid; gap: 10px; padding: 14px; border-radius: 26px; background: #101819; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent), 0 8px 18px rgba(0, 0, 0, .35); }
.pl-card--b { --c: var(--b); }
.pl-head { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.pl-art { display: block; width: 58px; height: 58px; border-radius: 14px; background-size: cover; background-position: center; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 55%, transparent); }
.pl-id { display: grid; min-width: 0; gap: 3px; }
.pl-letter { font: 700 13px/1 var(--sans); letter-spacing: .12em; color: var(--c); }
.pl-title { overflow: hidden; font: 700 17px/1.2 var(--sans); white-space: nowrap; text-overflow: ellipsis; }
.pl-meta { font: 500 14px/1.2 var(--mono); color: #b7c9c4; }
.pl-load { min-height: 44px; padding: 0 14px; border-radius: 14px; background: #1d2a2b; font: 700 14px/1 var(--sans); letter-spacing: .04em; }
.pl-progress { position: relative; display: block; height: 4px; border-radius: 2px; background: #233032; overflow: hidden; }
.pl-progress i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 100%); background: var(--c); }
.pl-transport { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 12px; }
.pl-round { width: 64px; height: 56px; border-radius: 18px; background: #1d2a2b; font: 700 14px/1 var(--sans); letter-spacing: .06em; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35); }
.pl-play { height: 60px; border-radius: 20px; background: #25393a; font: 700 16px/1 var(--sans); letter-spacing: .08em; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35); }
.pl-play > span { display: inline-flex; align-items: center; gap: 10px; }
.pl-glyph { width: 0; height: 0; border-left: 13px solid currentColor; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.pl-play[aria-pressed="true"] { background: var(--c); color: #0d1a18; }
.pl-play[aria-pressed="true"] .pl-glyph { width: 13px; height: 16px; border: 0; background: linear-gradient(90deg, currentColor 0 4px, transparent 4px 9px, currentColor 9px); }
.pl :is(.pl-round, .pl-load, .pl-records):active, .pl-play:active { translate: 0 1px; }
.pl-sliders { display: grid; gap: 6px; }
/* One row per slider: name, track, live value, so a card stays short on a phone. */
.pl-sliders .tr-slide--h { grid-template-columns: 62px minmax(0, 1fr) 64px; grid-template-rows: var(--th); }
.pl-sliders .tr-slide--h .tr-track, .pl-sliders .tr-slide--h > input { grid-column: 2; grid-row: 1; }
.pl-sliders .tr-slide--h > .tr-val { grid-column: 3; text-align: right; }
.pl .tr-slide--h { --capw: 46px; --caph: 32px; --th: 44px; --slot: #1f2b2d; --fill: var(--c); --capbg: linear-gradient(#f4f8f6, #b9c6c2); }
.pl .tr-slide--h > input { touch-action: pan-y; }
.pl .tr-name { font: 700 13px/1.1 var(--sans); letter-spacing: .1em; color: #c8d9d4; }
.pl .tr-val { font: 600 14px/1.1 var(--mono); color: #eaf5f1; }
.pl-blend { display: grid; grid-template-columns: 10px 1fr 10px; align-items: end; gap: 12px; padding: 10px 14px 12px; border-radius: 24px; background: linear-gradient(#0b1213, #131c1d); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6); }
.pl-meter { height: 60px; width: 10px; margin-bottom: 4px; }
.pl-meter--a { --seg: var(--a); }
.pl-meter--b { --seg: var(--b); }
.pl .pl-xfader { --capw: 60px; --caph: 46px; --th: 60px; --slot: linear-gradient(90deg, var(--a), #2b3a3c 30% 70%, var(--b)); --capbg: linear-gradient(#ffffff, #c8d2cf); }
.pl-xfader .tr-name { display: flex; justify-content: space-between; align-items: baseline; grid-column: 1 / -1; font-size: 14px; color: #eaf5f1; }
.pl-xfader .tr-name b { font: 700 18px/1 var(--sans); color: var(--a); }
.pl-xfader .tr-name b:last-child { color: var(--b); }
.pl-xfader > .tr-val { display: none; }
.pl-foot { display: grid; gap: 4px; padding: 0 8px; }
.pl .pl-master { --c: #dfe9e6; --capw: 40px; --caph: 28px; --th: 44px; }
.pl-note { margin: 0; font: 500 14px/1.4 var(--sans); color: #a9c0ba; }
.pl-card[data-playing="true"] { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 70%, transparent), 0 8px 18px rgba(0, 0, 0, .35); }
@container (max-width: 420px) {
  .pl-slab { padding: 14px 10px 16px; border-radius: 30px; gap: 10px; }
  .pl-card { padding: 12px; border-radius: 22px; }
}

/* ═══════════ GLASSHOUSE: clear acrylic, etched traces, a lit signal path ═══════════ */
.gh { --on: #5fe0ff; --accent-a: #5fe0ff; --accent-b: #ffb35c; --ring: #5fe0ff; --ring-off: rgba(95, 224, 255, .14); --cap-bg: radial-gradient(circle at 35% 28%, rgba(220, 245, 255, .55), rgba(40, 70, 85, .85) 60%, rgba(10, 22, 30, .95)); --mark: #e6fbff; color: #e3f5fb; }
.gh-body { display: grid; grid-template-columns: 282px minmax(0, 1fr) 282px; grid-template-rows: auto auto auto; gap: 14px 16px; padding: 22px 20px 18px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(170, 230, 255, .13), rgba(90, 170, 200, .05) 45%, rgba(170, 230, 255, .1)), rgba(6, 16, 22, .55);
  border: 1px solid rgba(160, 230, 255, .4); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(230, 250, 255, .35), inset 0 0 50px rgba(95, 224, 255, .07); }
.gh-glass { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(90deg, rgba(95, 224, 255, .05) 0 1px, transparent 1px 44px), repeating-linear-gradient(0deg, rgba(95, 224, 255, .04) 0 1px, transparent 1px 44px), linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .06) 38%, transparent 46%); }
.gh-brand { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 14px; font: 500 15px/1 var(--mono); letter-spacing: .32em; color: #bff2ff; }
.gh-brand small { font: 500 12px/1 var(--mono); letter-spacing: .18em; color: rgba(191, 242, 255, .65); }
.gh .tr-name { font: 500 calc(13px / var(--z, 1))/1.1 var(--mono); letter-spacing: .1em; color: #a9e9fa; }
.gh .tr-key { border-radius: 8px; border: 1px solid rgba(160, 230, 255, .35); background: rgba(10, 28, 38, .7); font: 500 calc(14px / var(--z, 1))/1 var(--mono); letter-spacing: .08em; color: #dff7ff; box-shadow: inset 0 1px 0 rgba(230, 250, 255, .15); }
.gh .tr-key:is([aria-pressed="true"], [data-on="true"]) { border-color: var(--on); background: rgba(95, 224, 255, .22); box-shadow: 0 0 14px rgba(95, 224, 255, .4), inset 0 1px 0 rgba(230, 250, 255, .3); }
.gh .tr-key:active { translate: 0 1px; }
.gh .tr-slide { --slot: rgba(3, 10, 14, .85); --capbg: linear-gradient(rgba(230, 250, 255, .9), rgba(120, 190, 215, .85)); --fill: rgba(95, 224, 255, .7); }
.gh .tr-slide--h .tr-val { font: 500 calc(13px / var(--z, 1))/1 var(--mono); color: #e3f5fb; }
.gh-deck { position: relative; display: grid; align-content: start; gap: 12px; padding: 14px; border-radius: 14px; background: rgba(4, 14, 20, .72); border: 1px solid rgba(160, 230, 255, .22); }
.gh-head { display: grid; grid-template-columns: auto 42px minmax(0, 1fr); align-items: center; gap: 10px; }
.gh-letter { font: 500 22px/1 var(--mono); color: var(--accent-a); }
.gh-deck--b .gh-letter { color: var(--accent-b); }
.gh-disc { width: 42px; height: 42px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 2px rgba(160, 230, 255, .35); }
.gh-id { display: grid; gap: 4px; min-width: 0; }
.gh-title { overflow: hidden; font: 600 calc(16px / var(--z, 1))/1.2 var(--sans); white-space: nowrap; text-overflow: ellipsis; }
.gh-read { font: 500 calc(13px / var(--z, 1))/1.2 var(--mono); color: #a9d8e6; }
.gh-wave { display: block; width: 100%; height: 60px; border-radius: 6px; background: rgba(2, 8, 12, .8); box-shadow: inset 0 0 0 1px rgba(160, 230, 255, .15); }
.gh-seek, .gh-tempo { --th: 40px; --capw: 22px; --caph: 32px; }
.gh-transport { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gh-transport .tr-key { min-height: 48px; }
.gh .gh-play[aria-pressed="true"] { border-color: #8dffb0; background: rgba(110, 255, 160, .2); box-shadow: 0 0 14px rgba(110, 255, 160, .35); }
.gh-pads { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; gap: 6px; }
.gh-pads-name { grid-column: 1 / -1; margin-top: 2px; font: 500 calc(12px / var(--z, 1))/1 var(--mono); letter-spacing: .1em; color: #8fcfe0; }
.gh .gh-pad[data-assigned="true"] { border-color: #8dffb0; color: #c8ffd9; }
.gh .gh-pad--loop[aria-pressed="true"] { border-color: var(--accent-b); background: rgba(255, 179, 92, .22); box-shadow: 0 0 12px rgba(255, 179, 92, .35); }

.gh-mixer { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 118px minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 10px 10px; --dial: 36px; --dial-w: 52px; }
/* stage lights: --lit is written per stage from the snapshot; nothing moves unless signal does */
.gh-node { position: absolute; left: -8px; top: 10px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(95, 224, 255, .35); background: #06121a; pointer-events: none; }
.gh-node i { position: absolute; inset: 1px; border-radius: 50%; background: var(--on); opacity: clamp(0, calc(var(--lit, 0) * 1.6), 1); box-shadow: 0 0 10px var(--on), 0 0 18px var(--on); }
.gh-ch { position: relative; display: grid; align-content: start; gap: 2px; }
.gh-ch-name { font: 500 calc(14px / var(--z, 1))/1 var(--mono); letter-spacing: .2em; color: #bff2ff; padding-left: 18px; margin-bottom: 4px; }
.gh-ch--b .gh-ch-name { padding: 0 18px 0 0; text-align: right; }
.gh-stage { position: relative; display: grid; grid-template-columns: 1fr; justify-items: center; gap: 2px; padding: 6px 4px 8px 18px; border-left: 2px solid rgba(95, 224, 255, calc(.12 + var(--lit, 0) * .75)); }
.gh-ch--b .gh-stage { padding: 6px 18px 8px 4px; border-left: 0; border-right: 2px solid rgba(95, 224, 255, calc(.12 + var(--lit, 0) * .75)); }
.gh-ch--b .gh-node { left: auto; right: -8px; }
.gh-stage-name { justify-self: start; font: 500 calc(12px / var(--z, 1))/1 var(--mono); letter-spacing: .14em; color: rgba(169, 233, 250, .8); }
.gh-ch--b .gh-stage-name { justify-self: end; }
.gh-stage .tr-dial .tr-name { display: none; }
.gh-stage--eq .tr-dial .tr-name { display: block; }
.gh-eq { display: flex; justify-content: center; gap: 0; --dial: 32px; --dial-w: 46px; }
.gh-in-state { font: 500 calc(13px / var(--z, 1))/1.2 var(--mono); letter-spacing: .1em; color: #cfeef7; }
.gh-stage--branch { --on: #ffb35c; border-left-style: dashed; }
.gh-ch--b .gh-stage--branch { border-right-style: dashed; }
.gh .gh-cue { min-width: 72px; min-height: 44px; }
.gh .gh-cue[aria-pressed="true"] { border-color: #ffb35c; background: rgba(255, 179, 92, .22); box-shadow: 0 0 14px rgba(255, 179, 92, .4); }
.gh-fader-row { display: flex; align-items: flex-end; gap: 10px; }
.gh-stage--ch .tr-slide--v { --sh: 160px; --capw: 38px; --caph: 22px; }
.gh-meter { height: 132px; margin-bottom: 2px; }
.gh-ch--a [data-stage="in"] { --lit: var(--gh-in0); }
.gh-ch--a [data-stage="pre"] { --lit: var(--gh-pre0); }
.gh-ch--a [data-stage="cue"] { --lit: var(--gh-cue0); }
.gh-ch--a [data-stage="ch"] { --lit: var(--gh-ch0); }
.gh-ch--b [data-stage="in"] { --lit: var(--gh-in1); }
.gh-ch--b [data-stage="pre"] { --lit: var(--gh-pre1); }
.gh-ch--b [data-stage="cue"] { --lit: var(--gh-cue1); }
.gh-ch--b [data-stage="ch"] { --lit: var(--gh-ch1); }
.gh-center { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 22px; }
.gh-monitor { position: relative; display: grid; justify-items: center; gap: 6px; width: 100%; padding: 8px 6px 10px; border-radius: 10px; border: 1px dashed rgba(255, 179, 92, calc(.25 + var(--lit, 0) * .6)); --on: #ffb35c; --ring: #ffb35c; --lit: var(--gh-cuebus); }
.gh-monitor .gh-node { left: calc(50% - 7px); top: -8px; }
.gh-monitor .gh-stage-name { justify-self: center; }
.gh-small { margin: 0; font: 400 calc(13px / var(--z, 1))/1.35 var(--sans); text-align: center; color: #cfe3ea; }
.gh-paths { display: grid; gap: 8px; width: 100%; margin: 0; }
.gh-paths p { display: grid; grid-template-columns: auto 1fr; gap: 6px; margin: 0; padding: 7px 8px; border-radius: 8px; background: rgba(2, 10, 14, .6); font: 500 calc(13px / var(--z, 1))/1.3 var(--mono); color: #dff7ff; }
.gh-paths b { color: var(--accent-a); }
.gh-paths p + p b { color: var(--accent-b); }
.gh .gh-browse { width: 100%; min-height: 44px; }
.gh-xf { position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: 14px minmax(0, 320px) 14px; justify-content: center; align-items: end; gap: 14px; padding: 4px 0; }
.gh-xf .gh-node { position: relative; left: auto; top: auto; margin-bottom: 15px; }
.gh-node--a { --lit: var(--gh-xf0); }
.gh-node--b { --lit: var(--gh-xf1); }
.gh .gh-xfader { --th: 48px; --capw: 30px; --caph: 42px; --fill: transparent; }
.gh-xfader .tr-name { grid-column: 1 / -1; text-align: center; }
.gh-xfader > .tr-val { display: none; }
.gh-sends, .gh-out { position: relative; display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-top: 2px solid rgba(95, 224, 255, calc(.12 + var(--lit, 0) * .75)); }
.gh-sends .gh-node, .gh-out .gh-node { left: calc(50% - 7px); top: -8px; }
.gh-sends .gh-stage-name, .gh-out .gh-stage-name { justify-self: center; }
.gh-sends--a { --lit: var(--gh-fx0); }
.gh-sends--b { --lit: var(--gh-fx1); }
.gh-sends { --dial: 32px; --dial-w: 50px; --ring: #b9a6ff; }
.gh-send-row { display: flex; justify-content: center; }
.gh-out { --lit: var(--gh-master); --on: #8dffb0; --ring: #8dffb0; }
.gh-out-row { display: flex; align-items: flex-end; gap: 8px; }
.gh-master-meter { height: 70px; margin-bottom: 26px; }
.gh-db { font: 500 calc(13px / var(--z, 1))/1 var(--mono); color: #c8ffd9; }
.gh-legend { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 0; padding-top: 4px; font: 400 calc(14px / var(--z, 1))/1.4 var(--sans); color: #cfe3ea; }
.gh-legend .gh-node { position: relative; left: auto; top: auto; flex: none; --lit: 1; }

/* ═══════════ CUTTER: black plinths, big platters, a short orange fader section ═══════════ */
.ct { --hot: #ff5a36; --ring: #ff7a52; --cap-bg: radial-gradient(circle at 35% 28%, #4c4e52, #18191b 65%); color: #f2ede6; }
.ct-body { display: grid; grid-template-columns: minmax(0, 1fr) 230px minmax(0, 1fr); gap: 14px; padding: 16px; border-radius: 16px; background: #0d0d0e; box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .85); }
.ct .tr-name { font: 700 calc(14px / var(--z, 1))/1.1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #e9e2d8; }
.ct-deck { display: grid; gap: 14px; padding: 14px; border-radius: 18px; background: radial-gradient(120% 90% at 30% 0, #2a2a2c, #161617 60%), #161617; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 28px rgba(0, 0, 0, .6); }
.ct-plinth { display: grid; grid-template-columns: 1fr 52px; align-items: center; gap: 14px; }
.ct-deck--b .ct-plinth { grid-template-columns: 52px 1fr; }
.ct-deck--b .ct-pitch { order: -1; }
.ct-platter { position: relative; justify-self: center; width: 300px; aspect-ratio: 1; border-radius: 50%; cursor: grab; touch-action: none;
  background: radial-gradient(circle, #1a1a1b 66%, #2f3033 67% 69%, #121213 70%); box-shadow: 0 12px 26px rgba(0, 0, 0, .7), inset 0 0 0 3px #3a3b3e; }
.ct-platter:active { cursor: grabbing; }
.ct-strobe { position: absolute; inset: 2px; border-radius: 50%; background: repeating-conic-gradient(#8a8c90 0 1.6deg, transparent 1.6deg 6deg); -webkit-mask: radial-gradient(closest-side, transparent 94%, #000 95%); mask: radial-gradient(closest-side, transparent 94%, #000 95%); opacity: .55; rotate: var(--ct-a, 0deg); }
.ct-mat { position: absolute; inset: 7%; border-radius: 50%; background: radial-gradient(circle, #232325 60%, #1b1b1c); box-shadow: 0 0 0 2px rgba(255, 90, 54, .55); }
.ct-vinyl { position: absolute; inset: 3%; border-radius: 50%; background: repeating-radial-gradient(circle, #121212 0 2px, #1d1d1d 2px 3px); box-shadow: 0 2px 6px rgba(0, 0, 0, .7); rotate: var(--ct-a, 0deg); }
.ct-vinyl::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 20deg, transparent 0 40deg, rgba(255, 255, 255, .07) 52deg, transparent 66deg 210deg, rgba(255, 255, 255, .05) 222deg, transparent 236deg); }
/* The parent turns each [data-spin] vinyl and strobe ring with its own rotate; --ct-a is the resting pose. */
.ct-deck--a .ct-vinyl, .ct-deck--a .ct-strobe { --ct-a: var(--d0-angle, 0deg); }
.ct-deck--b .ct-vinyl, .ct-deck--b .ct-strobe { --ct-a: var(--d1-angle, 0deg); }
.ct-label { position: absolute; inset: 33%; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 2px rgba(0, 0, 0, .5); }
/* The sticker marks the record's position under your hand, as scratch DJs do. */
.ct-sticker { position: absolute; left: calc(50% - 3px); top: 4%; width: 6px; height: 29%; border-radius: 3px; background: var(--hot); box-shadow: 0 0 6px rgba(255, 90, 54, .6); }
.ct-spindle { position: absolute; left: calc(50% - 7px); top: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f4f4f4, #77797d); }
.ct-platter[data-held="true"] { box-shadow: 0 12px 26px rgba(0, 0, 0, .7), inset 0 0 0 3px var(--hot), 0 0 0 4px rgba(255, 90, 54, .35); }
.ct-platter:focus-visible { outline-offset: 6px; }
.ct .ct-pitch { --sh: 300px; --sw: 52px; --capw: 44px; --caph: 26px; --slot: #050505; --fill: rgba(255, 90, 54, .7); --capbg: linear-gradient(#dcdcdc, #8d8f93); }
.ct-controls { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); align-items: center; gap: 10px; }
.ct .tr-key { border-radius: 8px; background: linear-gradient(#2e2f32, #1c1d1f); box-shadow: 0 3px 0 #050505, inset 0 1px 0 rgba(255, 255, 255, .1); font: 700 calc(14px / var(--z, 1))/1 var(--sans); letter-spacing: .08em; }
.ct .tr-key:active { translate: 0 2px; box-shadow: 0 1px 0 #050505; }
.ct-start { width: 92px; height: 54px; }
.ct-start > span { display: grid; gap: 3px; }
.ct-start small, .ct-cut small { font: 600 calc(12px / var(--z, 1))/1 var(--mono); letter-spacing: .06em; opacity: .75; text-transform: none; }
.ct .ct-start[aria-pressed="true"] { background: linear-gradient(#5b5d61, #3a3c40); box-shadow: 0 3px 0 #050505, 0 0 0 2px #e9e2d8 inset; }
.ct-cue, .ct-load { min-width: 60px; height: 54px; }
.ct-read { display: grid; gap: 4px; min-width: 0; margin: 0; }
.ct-read b { overflow: hidden; font: 700 calc(15px / var(--z, 1))/1.2 var(--sans); white-space: nowrap; text-overflow: ellipsis; }
.ct-read > span { font: 500 calc(13px / var(--z, 1))/1.2 var(--mono); color: #c9c1b6; }
.ct-mixer { display: grid; grid-template-rows: auto 1fr auto auto; gap: 12px; padding: 16px 14px 18px; border-radius: 14px; background: linear-gradient(170deg, #34373c, #212327); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 28px rgba(0, 0, 0, .6); --dial: 40px; --dial-w: 60px; }
.ct-brand { text-align: center; font: italic 700 24px/1 var(--sans); letter-spacing: .02em; color: var(--hot); }
.ct-chans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ct-ch { display: grid; justify-items: center; align-content: start; gap: 10px; padding: 8px 4px 10px; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.ct-ch-name { font: 700 18px/1 var(--sans); color: #e9e2d8; }
.ct-fader-row { display: flex; align-items: flex-end; gap: 6px; }
.ct .ct-fader-row .tr-slide--v { --sh: 150px; --sw: 48px; --capw: 40px; --caph: 22px; --capbg: linear-gradient(#ff8a66, #c93c1e); }
.ct-meter { height: 120px; margin-bottom: 2px; }
.ct-cut { width: 84px; height: 58px; }
.ct-cut > span { display: grid; gap: 3px; }
.ct .ct-cut:is([data-held="true"], [data-cutting="true"]) { background: linear-gradient(#ff7a52, #d4401f); color: #1a0b05; box-shadow: 0 1px 0 #050505, 0 0 16px rgba(255, 90, 54, .55); translate: 0 2px; }
.ct-center { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ct .ct-browse { min-height: 44px; padding: 0 12px; }
.ct .ct-xfader { --th: 64px; --capw: 40px; --caph: 56px; --slot: #050505; --capbg: linear-gradient(#ff8a66, #c93c1e); padding: 10px 8px 6px; border-radius: 10px; background: linear-gradient(#1a1b1e, #101113); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .1); }
.ct-xfader .tr-name { grid-column: 1 / -1; text-align: center; color: #ffb39c; }
.ct-xfader > .tr-val { display: none; }

/* Pocketline fits the phone width, so the page-level swipe hint does not apply. */
.app[data-board=pocketline] .mobile-pan-hint { display: none; }

/* ── rooms ── */
.tr-scene { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.tr-scene .s-glow { opacity: calc(.45 + var(--master-meter, 0) * .55); }

@media (prefers-reduced-motion: reduce) {
  .tr-val { transition: none; }
  .ct-vinyl, .ct-strobe { rotate: 0deg !important; }
  .tr-scene .s-glow { opacity: .7; }
}
