/* === module: wiretap === */
.wt-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 8000;
  justify-content: center; align-items: center;
}
.wt-overlay.visible { display: flex; }

.wt-phase {
  background: linear-gradient(135deg, #0a0e14 0%, #131920 100%);
  border: 1px solid #1e2a38;
  border-radius: 18px;
  padding: 28px 32px 24px;
  width: min(560px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 0 60px rgba(88,166,255,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}
.wt-header { text-align: center; margin-bottom: 20px; }
.wt-header h2 { margin: 0 0 6px; color: #58a6ff; font-size: 20px; letter-spacing: 0.5px; }
.wt-header p  { margin: 0; color: #6e7a88; font-size: 13px; }
.wt-footer-hint {
  text-align: center; color: #f0883e; font-size: 12px;
  margin-top: 16px; opacity: 0.8;
}

/* Phase 1: Channel Grid */
.wt-channel-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.wt-ch-card {
  background: #151b24;
  border: 1.5px solid #232d3a;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.wt-ch-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, rgba(88,166,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.wt-ch-card:hover { border-color: #3a7bd5; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(88,166,255,0.1); }
.wt-ch-card.empty { opacity: 0.35; cursor: not-allowed; filter: grayscale(0.5); }
.wt-ch-card.empty:hover { border-color: #232d3a; transform: none; box-shadow: none; }
.wt-ch-card.selected { border-color: #58a6ff; background: #15202e; box-shadow: 0 0 20px rgba(88,166,255,0.15); }
.wt-ch-room { font-size: 14px; font-weight: 600; color: #c9d1d9; margin-bottom: 6px; }
.wt-ch-room .wt-room-icon { margin-right: 6px; }
.wt-ch-char { font-size: 13px; color: #58a6ff; margin-bottom: 3px; }
.wt-ch-activity { font-size: 12px; color: #6e7a88; margin-bottom: 8px; }
.wt-ch-intel { display: flex; gap: 3px; align-items: center; }
.wt-ch-intel-label { font-size: 11px; color: #f0883e; margin-right: 4px; }
.wt-intel-pip {
  width: 10px; height: 6px; border-radius: 2px;
  background: #2a2a2a; transition: background 0.2s;
}
.wt-intel-pip.filled { background: #f0883e; }

/* Phase 2: QTE Waveform */
.wt-qte-top { text-align: center; margin-bottom: 12px; }
.wt-qte-top h2 { margin: 0 0 8px; color: #58a6ff; font-size: 18px; }
.wt-qte-timer { display: flex; align-items: center; gap: 8px; justify-content: center; }
.wt-timer-bar {
  width: 200px; height: 6px; background: #1a1f28;
  border-radius: 3px; overflow: hidden;
}
.wt-timer-fill {
  height: 100%; width: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #3fb950, #58a6ff);
  transition: width 0.3s linear;
}
.wt-timer-text { font-size: 13px; color: #6e7a88; font-family: monospace; min-width: 30px; }

.wt-oscilloscope {
  position: relative; width: 100%; max-width: 480px; margin: 0 auto;
  background: #060a10; border: 1px solid #1e2a38; border-radius: 10px;
  overflow: hidden;
}
.wt-oscilloscope canvas { display: block; width: 100%; height: 160px; }
.wt-scope-label-target {
  position: absolute; top: 6px; left: 10px;
  font-size: 10px; color: rgba(63,185,80,0.6); font-family: monospace;
}
.wt-scope-label-player {
  position: absolute; top: 6px; right: 10px;
  font-size: 10px; color: rgba(88,166,255,0.6); font-family: monospace;
}

.wt-signal-meter {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 480px; margin: 8px auto 0;
}
.wt-signal-label { font-size: 12px; color: #6e7a88; white-space: nowrap; }
.wt-signal-bar-track {
  flex: 1; height: 8px; background: #1a1f28; border-radius: 4px; overflow: hidden;
}
.wt-signal-bar-fill {
  height: 100%; width: 0%; border-radius: 4px;
  background: linear-gradient(90deg, #da3633 0%, #f0883e 40%, #3fb950 80%);
  transition: width 0.15s;
}
.wt-signal-pct { font-size: 13px; color: #c9d1d9; font-weight: 600; min-width: 36px; text-align: right; }

.wt-dial-area {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 10px auto 0;
}
.wt-dial {
  position: relative; width: 100px; height: 100px;
  cursor: grab; user-select: none; -webkit-user-select: none;
}
.wt-dial:active { cursor: grabbing; }
.wt-dial-body {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #1e2a38, #0a0e14);
  border: 2.5px solid #2a3a50;
  box-shadow: 0 0 20px rgba(88,166,255,0.1), inset 0 2px 8px rgba(0,0,0,0.5);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wt-dial.hot .wt-dial-body {
  border-color: #3fb950;
  box-shadow: 0 0 28px rgba(63,185,80,0.3), inset 0 2px 8px rgba(0,0,0,0.5);
}
.wt-dial-ticks {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(
    rgba(88,166,255,0.15) 0deg 2deg,
    transparent 2deg 15deg
  );
}
.wt-dial-notch {
  position: absolute; top: 6px; left: 50%;
  width: 4px; height: 18px; margin-left: -2px;
  background: #58a6ff; border-radius: 2px;
  box-shadow: 0 0 6px rgba(88,166,255,0.6);
  transform-origin: 50% 44px;
  transition: background 0.15s, box-shadow 0.15s;
}
.wt-dial.hot .wt-dial-notch {
  background: #3fb950;
  box-shadow: 0 0 8px rgba(63,185,80,0.8);
}
.wt-dial-cap {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 45% 40%, #2a3a50, #151b24);
  border: 1px solid #3a4a5a;
}
.wt-dial-hint { font-size: 11px; color: #4a5568; }

.wt-live-transcript {
  width: 100%; max-width: 480px; margin: 12px auto 0;
  background: #0d1117; border: 1px solid #1e2a38; border-radius: 8px;
  padding: 14px 16px; min-height: 60px;
  font-size: 15px; line-height: 2; color: #c9d1d9;
  font-family: "Noto Serif SC", serif;
  letter-spacing: 0.5px;
}
.wt-char { display: inline; }
.wt-char.clear { color: #e6edf3; }
.wt-char.fuzzy { color: #f0883e; opacity: 0.7; }
.wt-char.missed { color: #484f58; }
.wt-char.missed::after { content: ""; }
.wt-cursor {
  display: inline-block; width: 2px; height: 1em;
  background: #58a6ff; animation: wtBlink 0.8s step-end infinite;
  vertical-align: text-bottom; margin-left: 1px;
}
@keyframes wtBlink { 50% { opacity: 0; } }

/* Phase 3: Result */
.wt-result-body { display: flex; flex-direction: column; gap: 16px; }
.wt-result-transcript {
  background: #0d1117; border: 1px solid #1e2a38; border-radius: 8px;
  padding: 14px 16px; font-size: 15px; line-height: 2; color: #c9d1d9;
  font-family: "Noto Serif SC", serif; letter-spacing: 0.5px;
}
.wt-result-stats {
  display: flex; gap: 20px; justify-content: center;
  font-size: 13px; color: #6e7a88;
}
.wt-stat-value { font-weight: 700; color: #c9d1d9; margin-left: 4px; }
.wt-stat-good .wt-stat-value { color: #3fb950; }
.wt-stat-warn .wt-stat-value { color: #f0883e; }
.wt-stat-bad .wt-stat-value { color: #da3633; }

.wt-blanks-footer { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* Shared buttons */
.wt-btn {
  border: none; border-radius: 10px;
  padding: 10px 22px; font-size: 13px;
  cursor: pointer; font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
}
.wt-btn:hover { opacity: 0.85; }
.wt-btn:active { transform: scale(0.97); }
.wt-btn.primary { background: #238636; color: #fff; }
.wt-btn.primary:disabled { opacity: 0.4; cursor: default; }
.wt-btn:not(.primary) { background: #21262d; color: #8b949e; border: 1px solid #30363d; }

/* 3D control-room pass: wiretap should feel embedded in the director desk, not like a modal minigame. */
.wt-overlay {
  z-index: 8000;
  background:
    radial-gradient(circle at 50% 12%, rgba(86, 142, 176, 0.20), transparent 30%),
    radial-gradient(circle at 12% 92%, rgba(96, 54, 30, 0.30), transparent 35%),
    linear-gradient(180deg, rgba(2, 5, 9, 0.98), rgba(5, 4, 6, 0.99));
  backdrop-filter: blur(10px);
  perspective: 1400px;
}
.wt-phase {
  width: min(94vw, 1120px);
  max-height: 90vh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(125, 173, 190, 0.12), transparent 38%),
    linear-gradient(145deg, #0a0e12 0%, #141514 62%, #070708 100%);
  border-color: rgba(154, 191, 205, 0.15);
  box-shadow:
    0 34px 90px rgba(0,0,0,0.66),
    inset 0 1px 0 rgba(255,255,255,0.06);
  transform: rotateX(1deg);
  transform-style: preserve-3d;
}
.wt-header h2 {
  color: #d7eff2;
  letter-spacing: 0.16em;
  text-shadow: 0 0 20px rgba(82, 190, 210, 0.22);
}
.wt-header p { color: rgba(215, 239, 242, 0.55); }
.wt-footer-hint { color: rgba(234, 183, 119, 0.82); }
.wt-channel-grid { perspective: 1100px; }
.wt-ch-card {
  padding: 10px 12px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(42, 58, 64, 0.72), rgba(10, 13, 14, 0.92));
  border-color: rgba(121, 166, 180, 0.18);
  box-shadow: 0 18px 26px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: rotateX(5deg) translateZ(10px);
}
.wt-ch-card:hover {
  border-color: rgba(116, 222, 232, 0.52);
  transform: rotateX(1deg) translateY(-5px) translateZ(28px);
  box-shadow: 0 24px 38px rgba(0,0,0,0.48), 0 0 26px rgba(116, 222, 232, 0.10);
}
.wt-ch-card.selected {
  border-color: #74dee8;
  background: #142225;
  box-shadow: 0 0 30px rgba(116,222,232,0.18);
}
.wt-ch-screen {
  height: 118px;
  margin-bottom: 12px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 45% 45%, rgba(112, 177, 183, 0.22), transparent 28%),
    linear-gradient(180deg, #121b20, #05080a);
  border: 1px solid rgba(136, 200, 210, 0.12);
  box-shadow: inset 0 0 24px rgba(0,0,0,0.54);
}
.wt-ch-glow {
  position: absolute;
  inset: 20% 25%;
  background: radial-gradient(ellipse at center, rgba(116,222,232,0.28), transparent 70%);
  filter: blur(10px);
}
.wt-ch-figure {
  position: absolute;
  left: 50%;
  bottom: 17px;
  width: 38px;
  height: 58px;
  transform: translateX(-50%);
  border-radius: 22px 22px 10px 10px;
  background: linear-gradient(180deg, rgba(190,222,220,0.36), rgba(34,54,58,0.68));
  box-shadow: 0 0 22px rgba(116,222,232,0.12);
}
.wt-ch-figure::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(190,222,220,0.35);
}
.wt-ch-noise,
.wt-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 60% 25%, rgba(255,255,255,0.06), transparent 22%);
  mix-blend-mode: screen;
  opacity: 0.42;
}
.wt-ch-card.has-signal .wt-ch-noise { animation: wtSignalFlicker 1.4s infinite steps(3); }
.wt-ch-cue {
  position: absolute;
  right: 10px;
  top: 9px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(179, 58, 48, 0.82);
  color: #ffe7df;
  font-size: 10px;
  letter-spacing: 0.08em;
  box-shadow: 0 0 16px rgba(179,58,48,0.42);
}
.wt-ch-cue.muted {
  background: rgba(85, 89, 92, 0.62);
  box-shadow: none;
}
.wt-ch-room { color: #d7eff2; }
.wt-ch-char { color: #74dee8; }
.wt-ch-activity { color: rgba(215,239,242,0.55); }
.wt-ch-intel-label { color: #eab777; }
.wt-intel-pip.filled { background: #eab777; }
.wt-control-room {
  display: grid;
  grid-template-rows: minmax(320px, 1fr) auto;
  gap: 18px;
  transform-style: preserve-3d;
}
.wt-main-monitor {
  --wt-clarity: 0.12;
  position: relative;
  min-height: 390px;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(101, 158, 154, 0.18), transparent 38%),
    linear-gradient(180deg, #101c21, #030506);
  border: 1px solid rgba(129, 194, 204, 0.18);
  box-shadow:
    0 28px 60px rgba(0,0,0,0.56),
    inset 0 0 60px rgba(0,0,0,0.62),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transform: translateZ(46px);
}
.wt-monitor-glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(255,255,255,0.13), transparent 24%, transparent 64%, rgba(255,255,255,0.05)),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.10), transparent 30%);
  z-index: 5;
}
.wt-monitor-topline {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  color: #d7eff2;
  font-size: 13px;
  letter-spacing: 0.10em;
}
.wt-monitor-live {
  color: #ff8d80;
  text-shadow: 0 0 14px rgba(255, 88, 72, 0.45);
}
.wt-room-stage {
  position: absolute;
  inset: 0;
  filter: blur(3px);
  opacity: 0.66;
  transition: filter 0.2s, opacity 0.2s;
}
.wt-room-silhouette {
  position: absolute;
  bottom: 86px;
  width: 56px;
  height: 96px;
  border-radius: 28px 28px 12px 12px;
  background: linear-gradient(180deg, rgba(212, 236, 230, 0.34), rgba(30, 48, 48, 0.86));
  box-shadow: 0 0 35px rgba(116, 222, 232, 0.15);
  animation: wtIdleFigure 4s ease-in-out infinite;
}
.wt-room-silhouette::before {
  content: "";
  position: absolute;
  top: -31px;
  left: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(212, 236, 230, 0.32);
}
.wt-room-silhouette-a { left: 42%; }
.wt-room-silhouette-b {
  left: 54%;
  transform: scale(0.8);
  opacity: 0.22;
  animation-delay: -1.8s;
}
.wt-room-floor {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 54px;
  height: 90px;
  background: radial-gradient(ellipse at center, rgba(116,222,232,0.10), transparent 70%);
  transform: perspective(520px) rotateX(64deg);
}
.wt-main-monitor[data-signal="searching"] { animation: wtMonitorSearch 0.8s infinite steps(2); }
.wt-main-monitor[data-signal="locked"] {
  border-color: rgba(75, 214, 119, 0.45);
  box-shadow:
    0 28px 60px rgba(0,0,0,0.56),
    0 0 34px rgba(75, 214, 119, 0.16),
    inset 0 0 60px rgba(0,0,0,0.52);
}
.wt-main-monitor[data-signal="locked"] .wt-room-stage {
  filter: blur(0.4px);
  opacity: 1;
}
.wt-main-monitor[data-signal="tuning"] .wt-room-stage {
  filter: blur(1.5px);
  opacity: 0.82;
}
.wt-console-deck {
  border-radius: 28px 28px 20px 20px;
  padding: 18px 20px 20px;
  background:
    radial-gradient(circle at 52% 0%, rgba(234, 183, 119, 0.16), transparent 34%),
    linear-gradient(180deg, #4a2f22, #1b1110 70%, #090707);
  border: 1px solid rgba(238, 197, 145, 0.14);
  box-shadow:
    0 24px 46px rgba(0,0,0,0.50),
    inset 0 1px 0 rgba(255,230,200,0.10);
  transform: rotateX(8deg) translateZ(24px);
  transform-origin: 50% 0%;
}
.wt-console-header,
.wt-console-body {
  display: flex;
  align-items: center;
  gap: 18px;
}
.wt-console-header {
  justify-content: space-between;
  margin-bottom: 14px;
}
.wt-console-kicker {
  color: rgba(234, 183, 119, 0.62);
  font-size: 10px;
  letter-spacing: 0.24em;
}
.wt-console-title {
  color: #f0dcc2;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.wt-timer-bar { background: rgba(10, 12, 13, 0.72); }
.wt-timer-fill { background: linear-gradient(90deg, #4bd677, #74dee8); }
.wt-timer-text { color: rgba(240,220,194,0.70); }
.wt-oscilloscope {
  flex: 1;
  min-width: 320px;
  max-width: none;
  margin: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(88, 188, 200, 0.08), transparent 50%),
    #05090a;
  border-color: rgba(116, 222, 232, 0.20);
  border-radius: 16px;
  box-shadow: inset 0 0 28px rgba(0,0,0,0.66), 0 12px 22px rgba(0,0,0,0.24);
}
.wt-scope-label-target { color: rgba(75,214,119,0.72); }
.wt-scope-label-player { color: rgba(116,222,232,0.72); }
.wt-console-controls {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.wt-signal-meter {
  max-width: 220px;
  margin: 0;
}
.wt-signal-label { color: rgba(240,220,194,0.62); }
.wt-signal-bar-track { background: rgba(10, 12, 13, 0.70); }
.wt-signal-bar-fill { background: linear-gradient(90deg, #b33a30 0%, #eab777 40%, #4bd677 80%); }
.wt-signal-pct { color: #f0dcc2; }
.wt-dial-area { margin: 0; }
.wt-dial {
  width: 122px;
  height: 122px;
  filter: drop-shadow(0 18px 22px rgba(0,0,0,0.38));
}
.wt-dial-body {
  background:
    radial-gradient(circle at 42% 35%, #6d7b7a, #222a2a 48%, #080909 72%),
    conic-gradient(from 0deg, #111, #4f5d5d, #111, #4f5d5d, #111);
  border: 1px solid rgba(232, 218, 190, 0.20);
  box-shadow:
    inset 0 6px 13px rgba(255,255,255,0.10),
    inset 0 -11px 18px rgba(0,0,0,0.72),
    0 0 0 8px rgba(9, 8, 7, 0.45);
}
.wt-dial.hot .wt-dial-body {
  border-color: #4bd677;
  box-shadow:
    0 0 32px rgba(75,214,119,0.32),
    inset 0 6px 13px rgba(255,255,255,0.10),
    inset 0 -11px 18px rgba(0,0,0,0.72),
    0 0 0 8px rgba(9, 8, 7, 0.45);
}
.wt-dial-notch {
  background: #eab777;
  border-radius: 999px;
}
.wt-dial.hot .wt-dial-notch {
  background: #4bd677;
  box-shadow: 0 0 10px rgba(75,214,119,0.8);
}
.wt-dial-cap {
  width: 38px;
  height: 38px;
  background: radial-gradient(circle at 38% 32%, #9aa6a4, #283030 64%, #090a0a);
}
.wt-dial-hint { color: rgba(240,220,194,0.52); }
.wt-live-transcript {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 24px;
  z-index: 8;
  width: auto;
  max-width: none;
  margin: 0;
  min-height: 58px;
  max-height: 104px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(1, 3, 5, 0.38), rgba(1, 3, 5, 0.72));
  border-color: rgba(216, 239, 242, 0.10);
  border-radius: 14px;
  backdrop-filter: blur(5px);
  text-shadow: 0 2px 12px rgba(0,0,0,0.84);
}
.wt-cursor { background: #74dee8; }
@keyframes wtSignalFlicker {
  0%, 100% { opacity: 0.30; transform: translateX(0); }
  50% { opacity: 0.58; transform: translateX(2px); }
}
@keyframes wtMonitorSearch {
  0%, 100% { filter: brightness(0.92); }
  50% { filter: brightness(1.08) contrast(1.08); }
}
@keyframes wtIdleFigure {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (max-width: 900px) {
  .wt-console-body {
    flex-direction: column;
  }
  .wt-console-controls {
    width: 100%;
  }
  .wt-channel-grid {
    grid-template-columns: 1fr;
  }
}
/* === end module: wiretap === */
