/* ============================================================================
   YOHAN HAN / HM2J (화면조정) — Modular Eurorack Portfolio (styles.css)
   ============================================================================ */

:root {
  --bg-desk: #0b0d11;
  --mod-bg: #1b1f27;
  --mod-bg-alt: #202530;
  --mod-border: #323947;
  --mod-highlight: rgba(255, 255, 255, 0.06);
  --wood-1: #5a3822;
  --wood-2: #3d2414;

  --ink: #eef2f7;
  --ink-dim: #9aa4b4;
  --ink-muted: #8a95a8; /* was #6e798c: 3.8:1, now ~5:1 on module panels */

  --sig-video: #ffd43b;
  --sig-audio: #ff5a36;
  --sig-cv: #2ef2d6;
  --phosphor: #39ff88;
  --led-red: #ff3b3b;
  --led-amber: #ffaa2b;

  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-desk);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.studio-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 212, 59, 0.07), transparent 42%),
    radial-gradient(circle at 82% 20%, rgba(46, 242, 214, 0.07), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 28px);
  z-index: 0;
}

body.mode-business .studio-backdrop {
  background:
    radial-gradient(circle at 18% 12%, rgba(46, 242, 214, 0.11), transparent 44%),
    radial-gradient(circle at 85% 22%, rgba(77, 171, 247, 0.09), transparent 44%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 28px);
}

/* ============================================================================
   RACK CHASSIS & SVG CABLE LAYER
   ============================================================================ */
.rack-chassis {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 16px auto 28px;
  padding: 14px 18px 14px;
  background: linear-gradient(180deg, #171b22 0%, #111419 100%);
  border-left: 12px solid var(--wood-1);
  border-right: 12px solid var(--wood-1);
  border-top: 3px solid #2c3340;
  border-bottom: 4px solid #090b0e;
  border-radius: 10px;
  box-shadow:
    inset 3px 0 0 var(--wood-2),
    inset -3px 0 0 var(--wood-2),
    0 24px 64px rgba(0, 0, 0, 0.75);
  transition: filter 0.3s ease;
}

body.mode-business .rack-chassis {
  border-left-color: #243847;
  border-right-color: #243847;
  box-shadow:
    inset 3px 0 0 #16232e,
    inset -3px 0 0 #16232e,
    0 24px 64px rgba(0, 0, 0, 0.75);
}

body.power-off .rack-chassis {
  filter: saturate(0.2) brightness(0.6);
}

body.power-off .led {
  background: #2a2f38 !important;
  box-shadow: none !important;
}

.rack-rail {
  height: 9px;
  margin: 8px 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #4b5363 0%, #2b303b 45%, #191d24 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid #0a0c10;
  position: relative;
}

.rack-rail::after {
  content: "";
  position: absolute;
  inset: 3px 12px;
  background: repeating-linear-gradient(90deg, #12151a 0 6px, transparent 6px 24px);
  opacity: 0.65;
}

.cable-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
  overflow: visible;
}

.patch-cable {
  fill: none;
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#cable-shadow);
  pointer-events: none;
  opacity: 0.95;
  transition: stroke-width 0.15s ease;
}

/* wide invisible stroke so a cable is easy to click (unplug) */
.patch-cable-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  pointer-events: stroke;
  cursor: pointer;
}
.patch-cable-hit:hover + .patch-cable { stroke-width: 7.5; opacity: 1; }

.patch-cable.dragging {
  pointer-events: none;
  opacity: 1;
}

.cable-plug-g { pointer-events: none; }

.patch-cable-core {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.5;
  stroke-linecap: round;
  pointer-events: none;
}

.cable-plug {
  pointer-events: none;
  stroke: #0e1015;
  stroke-width: 2;
}

/* ============================================================================
   HEADER BAR & 2-MODE SWITCHER
   ============================================================================ */
.rack-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #212630 0%, #171b23 100%);
  border: 1px solid #303746;
  border-radius: var(--radius-md);
}

.brand-cluster {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.brand-plate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: #0e1116;
  border: 1px solid #384152;
  border-radius: 4px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.65);
}

.brand-en {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sig-video);
}

body.mode-business .brand-en {
  color: var(--sig-cv);
}

.brand-tag {
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.07em;
}

.mode-switcher {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  background: #0d1015;
  border: 1px solid #2e3645;
  border-radius: 6px;
}

.mode-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.mode-btn.active[data-mode="artist"] {
  background: rgba(255, 212, 59, 0.14);
  border-color: rgba(255, 212, 59, 0.55);
  color: var(--sig-video);
}

.mode-btn.active[data-mode="business"] {
  background: rgba(46, 242, 214, 0.14);
  border-color: rgba(46, 242, 214, 0.55);
  color: var(--sig-cv);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ============================================================================
   3-STEP USER GUIDE STRIP
   ============================================================================ */
.guide-strip {
  margin-top: 8px;
  padding: 9px 14px;
  background: linear-gradient(90deg, rgba(255, 212, 59, 0.11) 0%, rgba(46, 242, 214, 0.08) 100%);
  border: 1px solid rgba(255, 212, 59, 0.35);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guide-strip[hidden] {
  display: none;
}

body.mode-business .guide-strip {
  border-color: rgba(46, 242, 214, 0.38);
}

.guide-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 12px;
}

.guide-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.guide-item b {
  color: var(--sig-video);
}

body.mode-business .guide-item b {
  color: var(--sig-cv);
}

.guide-close {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ink-dim);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

.guide-close:hover {
  color: #fff;
  border-color: #fff;
}

.step-pill {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--sig-video);
  color: #0e1015;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

body.mode-business .step-pill {
  background: var(--sig-cv);
}

/* ============================================================================
   COMMON HARDWARE COMPONENTS
   ============================================================================ */
.module {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 16%),
    var(--mod-bg);
  border: 1px solid var(--mod-border);
  border-radius: var(--radius-md);
  padding: 14px 14px 12px;
  box-shadow: inset 0 1px 0 var(--mod-highlight), 0 6px 18px rgba(0, 0, 0, 0.38);
}

.screw {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #cfd6e0 0%, #687382 65%, #2f3640 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.screw.tl { top: 5px; left: 5px; }
.screw.tr { top: 5px; right: 5px; }
.screw.bl { bottom: 5px; left: 5px; }
.screw.br { bottom: 5px; right: 5px; }

.mod-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mod-head-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mod-head-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mod-code {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2b313c;
  border: 1px solid rgba(0, 0, 0, 0.65);
}

.led-amber.active { background: var(--led-amber); box-shadow: 0 0 9px var(--led-amber); }
.led-green.active { background: var(--phosphor); box-shadow: 0 0 9px var(--phosphor); }
.led-cyan.active { background: var(--sig-cv); box-shadow: 0 0 9px var(--sig-cv); }

.hw-btn {
  appearance: none;
  border: 1px solid #3b4454;
  background: linear-gradient(180deg, #2d3442 0%, #1e232d 100%);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 4px rgba(0, 0, 0, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hw-btn:hover {
  border-color: #6b7a96;
  background: linear-gradient(180deg, #374051 0%, #242a36 100%);
}

.hw-btn.active,
.hw-btn[aria-pressed="true"] {
  border-color: var(--sig-video);
  color: var(--sig-video);
  background: linear-gradient(180deg, #2b2920 0%, #1c1b16 100%);
}

.btn-mini { padding: 4px 8px; font-size: 11px; }
.btn-accent { border-color: rgba(255, 212, 59, 0.55); color: var(--sig-video); }
.btn-dl { border-color: rgba(46, 242, 214, 0.45); color: var(--sig-cv); }
.btn-dl:hover { border-color: var(--sig-cv); color: #fff; }

.power-switch {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #593131;
  background: linear-gradient(180deg, #3c1f22 0%, #231114 100%);
  color: #ffc5c5;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.power-switch .power-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #442222;
}

.power-switch.active .power-led {
  background: var(--led-red);
  box-shadow: 0 0 8px var(--led-red);
}

/* 3.5mm Jacks */
/* label above the jack so the cable, which leaves downward, never covers it */
.jack-unit { display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; }
.jack-inline { display: inline-flex; align-items: center; gap: 6px; }

.jack {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #dce2ec 0%, #8691a2 52%, #434b59 100%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.65);
  cursor: grab;
  touch-action: none; /* dragging a cable must not scroll the page on phones */
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.jack::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; } /* 46px touch target */

.jack:hover { transform: scale(1.1); }
.jack.jack-snap { transform: scale(1.3); }
.jack.jack-plugged { animation: jack-plug 0.28s ease-out; }
@keyframes jack-plug { 50% { transform: scale(1.35); } }
.jack-compatible { animation: jack-pulse 1s ease-in-out infinite; }
@keyframes jack-pulse { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .jack-compatible, .jack.jack-plugged { animation: none; } }
.jack[data-signal="video"]:hover, .jack[data-signal="video"].jack-selected, .jack[data-signal="video"].jack-compatible { box-shadow: 0 0 0 2px var(--sig-video), 0 0 12px var(--sig-video); }
.jack[data-signal="audio"]:hover, .jack[data-signal="audio"].jack-selected, .jack[data-signal="audio"].jack-compatible { box-shadow: 0 0 0 2px var(--sig-audio), 0 0 12px var(--sig-audio); }
.jack[data-signal="cv"]:hover, .jack[data-signal="cv"].jack-selected, .jack[data-signal="cv"].jack-compatible { box-shadow: 0 0 0 2px var(--sig-cv), 0 0 12px var(--sig-cv); }

.jack-ring {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid #2b303a;
  pointer-events: none;
}

.jack[data-signal="video"] .jack-ring { border-color: rgba(255, 212, 59, 0.8); }
.jack[data-signal="audio"] .jack-ring { border-color: rgba(255, 90, 54, 0.8); }
.jack[data-signal="cv"] .jack-ring { border-color: rgba(46, 242, 214, 0.8); }

.jack-hole {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #07080a;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.jack-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  white-space: nowrap;
}

/* Rotary Knobs */
.knob-block { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.knob {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(from 220deg, #101318 0deg 280deg, transparent 280deg);
  padding: 4px;
  cursor: ns-resize;
  user-select: none;
  touch-action: none;
}

.knob-sm { width: 38px; height: 38px; }

.knob-cap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4d5668 0%, #242934 55%, #12151b 100%);
  border: 2px solid #101318;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  position: relative;
}

.knob-pointer {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 3px;
  height: 38%;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--sig-video);
  box-shadow: 0 0 5px rgba(255, 212, 59, 0.7);
}

.knob-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

/* ============================================================================
   ARTIST MODE: TIER 1 & TIER 2
   ============================================================================ */
.tier-1 {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 12px;
}

.cat-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }

.cat-btn {
  appearance: none;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 10px;
  text-align: left;
  background: linear-gradient(180deg, #232833 0%, #191d26 100%);
  border: 1px solid #323949;
  border-radius: 5px;
  color: var(--ink);
  font-family: var(--font-mono);
  cursor: pointer;
}

.cat-btn:hover { border-color: #5a6782; }
.cat-btn.active {
  border-color: var(--cat-accent, var(--sig-video));
  background: linear-gradient(90deg, rgba(255, 212, 59, 0.12) 0%, #1c202a 60%);
  box-shadow: inset 3px 0 0 var(--cat-accent, var(--sig-video));
}

.cat-icon-box {
  width: 30px;
  height: 26px;
  border-radius: 4px;
  background: #101319;
  border: 1px solid #2b3240;
  display: grid;
  place-items: center;
  color: var(--ink-dim);
}

.cat-btn.active .cat-icon-box {
  color: var(--cat-accent, var(--sig-video));
  border-color: var(--cat-accent, var(--sig-video));
}

.cat-code { font-size: 11px; font-weight: 700; }
.cat-name { font-size: 11px; color: var(--ink-dim); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-count { font-size: 11px; color: var(--ink-muted); background: #11141a; padding: 2px 6px; border-radius: 3px; }
.vfd-counter { font-size: 11px; font-weight: 700; color: var(--phosphor); }
.mini-label { font-size: 11px; letter-spacing: 0.09em; color: var(--ink-muted); }

/* Active Source Module */
.mod-source { display: flex; flex-direction: column; justify-content: space-between; }
.source-head-right { display: flex; align-items: center; gap: 8px; }
.channel-readout { font-size: 11px; font-weight: 700; color: var(--sig-video); background: #0d1015; padding: 3px 8px; border-radius: 4px; border: 1px solid #303746; }

.source-body {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr) 68px;
  gap: 14px;
  align-items: center;
  flex: 1;
}

.source-hardware-bay {
  height: 150px;
  border-radius: 6px;
  background: #0e1117;
  border: 1px solid #2c3342;
  padding: 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.75);
}

.hw-face-tag { font-size: 11px; letter-spacing: 0.1em; color: var(--ink-muted); display: flex; justify-content: space-between; }
.hw-face-graphic { flex: 1; display: grid; place-items: center; }

.projector-lens {
  width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fff7cc 0%, #ffd43b 28%, #594613 62%, #13161d 100%);
  border: 4px solid #323947;
  box-shadow: 0 0 22px rgba(255, 212, 59, 0.35);
}

.spatial-grid-box {
  width: 100%; height: 80px; border: 1px solid rgba(56, 217, 169, 0.35);
  background:
    linear-gradient(rgba(56, 217, 169, 0.12) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(56, 217, 169, 0.12) 1px, transparent 1px) 0 0 / 16px 16px;
  border-radius: 4px; display: grid; place-items: center; color: #38d9a9; font-size: 11px; font-weight: 700;
}

.mini-crt {
  width: 100%; height: 80px; border-radius: 10px;
  background: radial-gradient(circle, #1c3554 0%, #0b1320 85%);
  border: 3px solid #333c4c; display: grid; place-items: center; color: #74c0fc; font-size: 11px; font-weight: 700;
}

.cue-pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; width: 100%; }
.cue-pad { height: 30px; border-radius: 4px; background: #1b2029; border: 1px solid #3e4759; display: grid; place-items: center; font-size: 11px; color: var(--ink-dim); }
.cue-pad.lit { background: rgba(255, 107, 107, 0.22); border-color: #ff6b6b; color: #ffb8b8; }

.tape-cart { width: 100%; height: 76px; border-radius: 5px; background: #1a1822; border: 2px solid #493857; display: flex; align-items: center; justify-content: space-around; }
.tape-reel { width: 32px; height: 32px; border-radius: 50%; border: 3px dashed #cc5de8; background: #0d0b12; animation: spinSlow 10s linear infinite; }
@keyframes spinSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.source-control-bay { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.source-work-display { background: #0e1117; border: 1px solid #2b3240; border-radius: 6px; padding: 11px 14px; }
.source-meta-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.source-year { font-size: 11px; font-weight: 700; color: var(--sig-cv); }
.source-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.work-badge { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; background: rgba(255, 212, 59, 0.14); border: 1px solid rgba(255, 212, 59, 0.45); color: var(--sig-video); }
.work-badge.badge-live { background: rgba(255, 107, 107, 0.16); border-color: rgba(255, 107, 107, 0.55); color: #ff9c9c; }
.work-badge.badge-archive { background: rgba(154, 164, 180, 0.12); border-color: rgba(154, 164, 180, 0.35); color: var(--ink-dim); }
.source-title { margin: 0 0 3px; font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.source-venue { margin: 0; font-size: 12px; color: var(--ink-dim); }
.source-medium { margin: 2px 0 0; font-size: 11px; color: var(--ink-muted); }

.source-nav-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.channel-select { width: 100%; background: #10141b; color: var(--ink); border: 1px solid #353e4f; border-radius: 4px; padding: 6px 8px; font-family: var(--font-mono); font-size: 11px; }
.source-jack-bay { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; border-left: 1px solid rgba(255, 255, 255, 0.08); padding-left: 10px; }

/* TIER 2: MAIN DISPLAY + SIMPLE 2-MODULE SOUND LAB */
.tier-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(360px, 0.85fr);
  gap: 12px;
  align-items: stretch;
}

.mod-vcr { display: flex; flex-direction: column; gap: 10px; }
.display-channel-tabs { display: inline-flex; gap: 5px; }
.vcr-head-jacks { display: flex; align-items: center; gap: 12px; }

.crt-bezel {
  background: linear-gradient(180deg, #0d0f13 0%, #1a1e26 100%);
  border: 2px solid #343b49;
  border-radius: 10px;
  padding: 10px;
  box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.85);
}

.crt-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #06090e;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #262c37;
}

.crt-media-stage { position: absolute; inset: 0; width: 100%; height: 100%; overflow-y: auto; }
.crt-media-stage iframe { width: 100%; height: 100%; border: 0; display: block; }

.crt-scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.2) 0 1px, transparent 1px 3px);
  opacity: 0.65;
}
.crt-scanlines.hidden { opacity: 0; }

.crt-glitch-layer {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: linear-gradient(90deg, rgba(255,0,80,0.16), rgba(0,255,180,0.1), rgba(60,140,255,0.16));
}

.crt-osd {
  position: absolute; top: 10px; left: 12px; padding: 3px 8px;
  background: rgba(5, 8, 12, 0.82); border: 1px solid rgba(57, 255, 136, 0.45); border-radius: 3px;
  color: var(--phosphor); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; pointer-events: none; z-index: 4;
}

/* Monitor Work Card */
.monitor-card {
  width: 100%; height: 100%; padding: 20px 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(circle at 80% 20%, rgba(255, 212, 59, 0.12), transparent 45%), #0b0e14;
}

.smpte-bars { display: grid; grid-template-columns: repeat(7, 1fr); height: 9px; border-radius: 2px; overflow: hidden; }
.smpte-bars span:nth-child(1) { background: #d9d9d9; }
.smpte-bars span:nth-child(2) { background: #ffd43b; }
.smpte-bars span:nth-child(3) { background: #2ef2d6; }
.smpte-bars span:nth-child(4) { background: #39ff88; }
.smpte-bars span:nth-child(5) { background: #cc5de8; }
.smpte-bars span:nth-child(6) { background: #ff4d4d; }
.smpte-bars span:nth-child(7) { background: #339af0; }

.monitor-card-center { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.monitor-card-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--sig-cv); }
.monitor-card-title { margin: 0; font-family: var(--font-display); font-size: clamp(18px, 2vw, 24px); color: #fff; line-height: 1.15; }
.monitor-card-meta { margin: 0; font-size: 12px; color: var(--ink-dim); }
.monitor-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.btn-monitor-cta {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 4px;
  background: var(--sig-video); color: #0e1014; font-family: var(--font-mono); font-size: 11px;
  font-weight: 700; text-decoration: none; border: none; cursor: pointer;
}
.btn-monitor-sec {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.08); color: var(--ink); font-family: var(--font-mono); font-size: 11px;
  font-weight: 600; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.2); cursor: pointer;
}

.no-signal-screen {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 20px; background: #0a0c10;
}
.no-signal-title { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.16em; color: var(--sig-video); }

/* IN-DISPLAY PROFILE / CV VIEW (plays inside the CRT monitor) */
.in-screen-profile {
  padding: 36px 20px 18px;
  min-height: 100%;
  background: #080c12;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prof-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #2e384a;
}

.prof-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.prof-lang-toggle { display: inline-flex; gap: 4px; }

.prof-body { font-size: 12px; line-height: 1.55; }
.prof-body h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 14px; color: var(--sig-video); }
.prof-body p { margin: 0 0 10px; color: var(--ink); }
.prof-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.prof-list li { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; }
.prof-year { color: var(--sig-cv); font-weight: 700; }
.prof-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.prof-links a { color: var(--sig-cv); text-decoration: none; border-bottom: 1px dotted var(--sig-cv); }

/* Transport & Download Bar */
.vcr-transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.transport-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.btn-play { border-color: rgba(57, 255, 136, 0.55); color: var(--phosphor); }
.toggle-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-dim); background: #10141b; border: 1px solid #2d3442; padding: 4px 8px; border-radius: 4px; cursor: pointer; }
.download-cluster { display: inline-flex; align-items: center; gap: 6px; }

.vfd-strip { background: #080c0d; border: 1px solid #1f3330; border-radius: 5px; padding: 8px 12px; }
.vfd-main { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.vfd-ch { font-size: 11px; font-weight: 700; color: var(--sig-video); }
.vfd-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--phosphor); }
.vfd-sub { margin-top: 2px; font-size: 11px; color: #7ca895; }
.vfd-links { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 10px; }
.vfd-links a { color: var(--sig-cv); font-size: 11px; text-decoration: none; }

/* SIMPLIFIED 2-MODULE SOUND LAB */
.audio-skiff-simple {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 10px;
}

.synth-mod {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035) 0%, transparent 14%), var(--mod-bg-alt);
}

.btn-play-sound {
  width: 100%;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  border-color: rgba(57, 255, 136, 0.45);
}

.preset-moods, .layer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; width: 100%; }
.fx-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; width: 100%; }
.fx-btn {
  appearance: none; padding: 5px 2px; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  background: #11151d; color: var(--ink-muted); border: 1px solid #2b3342; border-radius: 3px; cursor: pointer;
}
.fx-btn.active { background: rgba(255, 212, 59, 0.16); border-color: var(--sig-video); color: var(--sig-video); }
.audio-source-toggle, .yt-track-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; width: 100%; }
.yt-mini-frame { width: 100%; aspect-ratio: 16 / 9; background: #070a0f; border: 1px solid #2b3444; border-radius: 5px; overflow: hidden; }
.yt-mini-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
#yt-radio-panel[hidden], #synth-controls-panel[hidden] { display: none !important; }
.wave-btn {
  appearance: none; padding: 6px 4px; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  background: #12161e; color: var(--ink-dim); border: 1px solid #2e3646; border-radius: 4px; cursor: pointer;
}
.wave-btn.active { background: rgba(46, 242, 214, 0.16); border-color: var(--sig-cv); color: var(--sig-cv); }

.simple-knobs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  padding: 6px 0;
}

.scope-frame {
  position: relative; width: 100%; background: #06100b; border: 2px solid #28332f; border-radius: 6px; overflow: hidden;
}
#scope-canvas { display: block; width: 100%; height: 120px; }
.scope-overlay-msg {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: rgba(57, 255, 136, 0.78); pointer-events: none;
}
.scope-overlay-msg.hidden { display: none; }

.vu-meters { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.vu-bar { height: 7px; width: 100%; background: #0f1319; border-radius: 2px; overflow: hidden; border: 1px solid #252b36; }
.vu-fill { height: 100%; width: 4%; background: linear-gradient(90deg, #39ff88 0%, #ffd43b 75%, #ff4d4d 100%); }

.scope-bottom-controls { display: flex; align-items: center; justify-content: space-around; width: 100%; gap: 10px; }
.btn-mute { min-width: 72px; }
.btn-mute[aria-pressed="true"] { border-color: var(--led-red); color: #ff9c9c; background: rgba(255, 59, 59, 0.16); }

.mod-jacks {
  display: flex; justify-content: center; gap: 16px; width: 100%;
  padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================================
   BUSINESS MODE: HM2J · 화면조정
   ============================================================================ */
.biz-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 12px;
  align-items: start;
}

.biz-card-banner {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  background: #0e1218;
  border: 1px solid #2b3847;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
}

.biz-card-img {
  width: 112px;
  height: auto;
  border-radius: 4px;
  border: 1px solid #3c4b5e;
  display: block;
}

.biz-reg-meta {
  font-size: 11px;
  color: var(--ink-dim);
  display: grid;
  gap: 3px;
}

.biz-reg-meta b { color: var(--sig-cv); }

.biz-intro { margin: 0 0 12px; font-size: 12px; color: var(--ink); line-height: 1.55; }

.biz-services-list { display: grid; gap: 8px; margin-bottom: 14px; }
.biz-service-card {
  background: #121720; border: 1px solid #293445; border-radius: 6px; padding: 10px 12px;
}
.biz-service-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.biz-service-code { font-size: 11px; font-weight: 700; color: var(--sig-cv); }
.biz-service-kr { font-size: 11px; color: var(--ink-muted); }
.biz-service-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.biz-service-desc { margin: 0; font-size: 11px; color: var(--ink-dim); }

.biz-cases-head { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; }
.biz-case-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.biz-case-btn {
  text-align: left; padding: 7px 9px; background: #141923; border: 1px solid #2e394a; border-radius: 5px;
  color: var(--ink); font-family: var(--font-mono); font-size: 11px; cursor: pointer;
}
.biz-case-btn:hover, .biz-case-btn.active { border-color: var(--sig-cv); background: rgba(46, 242, 214, 0.1); }
.biz-case-btn small { display: block; color: var(--ink-muted); font-size: 11px; }

.biz-screen { aspect-ratio: 16 / 10; }

.biz-form-wrap {
  padding: 18px 20px;
  min-height: 100%;
  background: #080d13;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.biz-form-wrap h3 { margin: 0; font-family: var(--font-display); font-size: 16px; color: var(--sig-cv); }
.biz-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.biz-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--ink-dim); }
.biz-field.full { grid-column: 1 / -1; }
.biz-field input, .biz-field select, .biz-field textarea {
  background: #111722; border: 1px solid #2f3d52; border-radius: 4px; padding: 7px 9px;
  color: #fff; font-family: var(--font-mono); font-size: 11px;
}
.biz-field textarea { min-height: 68px; resize: vertical; }

.biz-direct-bar {
  margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08);
}
.biz-contact-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 11px; color: var(--ink-dim); }
.biz-contact-quick a { color: var(--sig-cv); text-decoration: none; font-weight: 600; }

.rack-footer {
  margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  font-size: 11px; letter-spacing: 0.08em; color: var(--ink-muted);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 1120px) {
  .tier-2, .biz-grid { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .tier-1 { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .source-body { grid-template-columns: 1fr; }
  .source-jack-bay { border-left: none; border-top: 1px solid rgba(255,255,255,0.08); padding-left: 0; padding-top: 10px; }
  .biz-case-buttons, .biz-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .rack-chassis { margin: 0; border-left-width: 4px; border-right-width: 4px; border-radius: 0; padding: 10px; }
  .audio-skiff-simple { grid-template-columns: 1fr; }
  .biz-card-banner { grid-template-columns: 1fr; }
}

/* ============================================================================
   2026-11-24 — legibility, mobile and curatorial dossier pass (Claude)
   ============================================================================ */

/* No text under 10px: the 9px mono labels were hard to read */
.mini-label { font-size: 11px; }
.jack-label, .knob-label { font-size: 11px; }
.hw-face-tag, .work-badge { font-size: 11px; }
.cat-name { font-size: 11px; }
.cat-count { font-size: 11px; color: var(--ink-dim); }
.rack-footer { font-size: 11px; }

/* Guide: read as sentences instead of words split into flex columns */
.guide-item { display: block; line-height: 1.6; }
.guide-item .step-pill { margin-right: 6px; vertical-align: 1px; }

/* Curatorial dossier on the main monitor */
.dossier .prof-top-bar { align-items: center; margin-top: 26px; } /* clear the OSD tag */
.dossier-kicker { font-size: 11px; letter-spacing: 0.08em; color: #cc5de8; font-weight: 700; }
.dossier .prof-body .dossier-title { font-family: var(--font-display); font-size: clamp(18px, 2.2vw, 26px); line-height: 1.2; color: var(--ink) !important; margin: 4px 0 6px !important; }
.dossier-role { color: var(--sig-video) !important; font-size: 12.5px; }
.dossier-summary { font-size: 13.5px; line-height: 1.65; max-width: 68ch; }
.dossier h4 { margin: 14px 0 6px; font-size: 11px; letter-spacing: 0.08em; color: var(--ink-dim); }
.dossier-list { margin: 0 0 10px; padding-left: 1.1em; display: grid; gap: 4px; font-size: 12.5px; }
.dossier-credits { color: var(--ink-dim) !important; font-size: 12px; }
.dossier-note { color: var(--ink-muted) !important; font-size: 11.5px; font-style: italic; }

/* Text channels (profile, dossier) get a taller screen instead of a scrolling 16:9 slot */
.crt-screen:has(.in-screen-profile) { aspect-ratio: auto; min-height: 380px; }
.crt-screen:has(.in-screen-profile) .crt-media-stage { position: relative; }

@media (max-width: 640px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-name { white-space: normal; }
  /* decorative faceplate pushed the work title below the fold on phones */
  .source-hardware-bay { display: none; }
  .crt-screen:has(.in-screen-profile) { min-height: 0; }
  .dossier-summary { font-size: 14px; }
}

@media (max-width: 880px) {
  /* monitor input jacks sit on top of the panel on narrow screens,
     so their cables go straight up into the rail instead of across the title */
  .mod-vcr .mod-head { flex-wrap: wrap; }
  .mod-vcr .vcr-head-jacks { order: -1; width: 100%; display: flex; justify-content: flex-end; gap: 14px; padding-bottom: 6px; }
}
