/* ==========================================================================
   Rx (Receive / 聽力抄收) Workspace Styles
   ========================================================================== */

.rx-workspace-stage {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px 280px 16px;
  box-sizing: border-box;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-padding-bottom: 280px;
}

.rx-workspace-stage.dock-collapsed {
  padding-bottom: 100px;
  scroll-padding-bottom: 100px;
}

.rx-workspace-stage::-webkit-scrollbar {
  width: 6px;
}
.rx-workspace-stage::-webkit-scrollbar-track {
  background: transparent;
}
.rx-workspace-stage::-webkit-scrollbar-thumb {
  background: #232b3b;
  border-radius: 3px;
}

/* Mode Selection Pills */
.rx-mode-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  background: #14161f;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #282d3c;
}

.rx-mode-pill {
  background: #1e2230;
  border: 1px solid #363d52;
  color: #aaa;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.rx-mode-pill:hover {
  background: #282e42;
  color: #fff;
  border-color: #4b5573;
}

.rx-mode-pill.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(0, 150, 255, 0.25));
  border-color: var(--neon-blue);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* Rx Cockpit Card & Eurorack Chassis Inset */
.rx-cockpit-card {
  background: linear-gradient(180deg, #161824 0%, #10121a 100%);
  border: 1.5px solid #282f44;
  border-top-color: #3f4a68;
  border-bottom-color: #171b26;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.07),
    inset 0 -1px 2px rgba(0, 0, 0, 0.5),
    0 6px 22px rgba(0, 0, 0, 0.5);
  position: relative;
}

.rx-cockpit-card::before,
.rx-cockpit-card::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #252c3d;
  border: 1px solid #141822;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: 0.55;
  top: 6px;
}
.rx-cockpit-card::before {
  left: 7px;
}
.rx-cockpit-card::after {
  right: 7px;
}

.rx-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #202434;
}

.rx-badge {
  font-size: 0.78rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  background: #1a1e2b;
  border: 1px solid #333a4f;
  color: var(--gold);
}

/* Audio Status Box & Actions */
.rx-audio-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #161824;
  border: 1px solid #2c3246;
  border-radius: 8px;
  padding: 12px 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.rx-audio-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: bold;
  color: #888;
}

.rx-audio-indicator.playing {
  color: var(--gold);
  animation: pulse-glow 1s infinite alternate;
}

@keyframes pulse-glow {
  0% { opacity: 0.7; }
  100% { opacity: 1; filter: drop-shadow(0 0 6px var(--gold)); }
}

/* 5-Stage Signal Level Ladder (Signal S-Meter) */
.rx-signal-ladder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(13, 16, 23, 0.7);
  border: 1px solid #283042;
  border-radius: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.signal-ladder-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.signal-ladder-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}

.signal-bar {
  width: 5px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.06s ease, box-shadow 0.06s ease, border-color 0.06s ease;
}

.signal-bar.bar-1 { height: 4px; }
.signal-bar.bar-2 { height: 6px; }
.signal-bar.bar-3 { height: 9px; }
.signal-bar.bar-4 { height: 11px; }
.signal-bar.bar-5 { height: 14px; }

.signal-bar.bar-1.active,
.signal-bar.bar-2.active {
  background: #00e676;
  border-color: #00e676;
  box-shadow: 0 0 6px rgba(0, 230, 118, 0.8);
}

.signal-bar.bar-3.active {
  background: #ffd700;
  border-color: #ffd700;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
}

.signal-bar.bar-4.active {
  background: #ff9100;
  border-color: #ff9100;
  box-shadow: 0 0 7px rgba(255, 145, 0, 0.85);
}

.signal-bar.bar-5.active {
  background: #ff3d00;
  border-color: #ff3d00;
  box-shadow: 0 0 8px rgba(255, 61, 0, 0.9);
}

.rx-control-btn {
  background: #1f2434;
  border: 1px solid #3c445c;
  color: #eee;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.rx-control-btn:hover:not(:disabled) {
  background: #2a3148;
  border-color: var(--neon-blue);
  color: #fff;
}

.rx-control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Input Display Box */
.rx-input-display {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  background: #0d0e14;
  border: 2px solid #262c3e;
  border-radius: 8px;
  padding: 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 2rem;
  letter-spacing: 6px;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.rx-input-display.has-focus {
  border-color: var(--neon-blue);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

.rx-input-char {
  display: inline-block;
  min-width: 28px;
  text-align: center;
}

.rx-cursor {
  display: inline-block;
  width: 14px;
  height: 2px;
  background: var(--neon-blue);
  animation: rx-blink 0.8s infinite;
  vertical-align: bottom;
  margin-left: 2px;
}

@keyframes rx-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Teletype Strike & Ink Impression on Immediate Submit (120ms) */
.rx-input-display.teletype-strike {
  animation: teletype-impression 0.12s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.rx-input-display.teletype-strike #rx-input-buffer {
  animation: teletype-afterglow 0.12s ease-out;
}

@keyframes teletype-impression {
  0% {
    transform: scale(0.985) translateY(1.5px);
    border-color: var(--neon-blue);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.45), inset 0 0 10px rgba(0, 229, 255, 0.25);
  }
  40% {
    transform: scale(1.015) translateY(-0.8px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), inset 0 0 12px rgba(255, 215, 0, 0.3);
  }
  100% {
    transform: scale(1) translateY(0);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
  }
}

@keyframes teletype-afterglow {
  0% {
    text-shadow: 0 0 4px #fff, 0 0 12px var(--neon-blue), 0 0 24px rgba(0, 229, 255, 0.9);
    filter: brightness(1.6);
  }
  50% {
    text-shadow: 0 0 3px #fff, 0 0 10px var(--gold), 0 0 20px rgba(255, 215, 0, 0.8);
    filter: brightness(1.3);
  }
  100% {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    filter: brightness(1);
  }
}

/* Feedback message */
.rx-feedback-msg {
  font-size: 0.85rem;
  text-align: center;
  min-height: 22px;
  color: #aaa;
}

/* History Log Strip */
.rx-history-log {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 4px;
  min-height: 38px;
  border-top: 1px solid #1c202e;
}

.rx-history-chip {
  padding: 4px 10px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.rx-history-chip.correct {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid #00e676;
  color: #00e676;
}

.rx-history-chip.wrong {
  background: rgba(255, 82, 82, 0.15);
  border: 1px solid #ff5252;
  color: #ff5252;
}

/* Scorecard & Eurorack Chassis Inset */
.rx-scorecard {
  background: linear-gradient(180deg, #161824 0%, #101119 100%);
  border: 1.5px solid var(--gold);
  border-top-color: #ffe066;
  border-bottom-color: #b89700;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 2px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(255, 215, 0, 0.2);
  position: relative;
}

.rx-scorecard::before,
.rx-scorecard::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #473c18;
  border: 1px solid #261f0a;
  box-shadow: inset 0 1px 1px rgba(255, 215, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: 0.65;
  top: 6px;
}
.rx-scorecard::before {
  left: 7px;
}
.rx-scorecard::after {
  right: 7px;
}

.rx-sc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.rx-sc-card {
  background: #1a1c26;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.rx-sc-card-label {
  font-size: 0.7rem;
  color: #888;
  margin-bottom: 2px;
  white-space: nowrap;
}

.rx-sc-card-val {
  font-size: 1.3rem;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}

.rx-sc-card-sub {
  font-size: 0.68rem;
  color: #8c9bb0;
  margin-top: 2px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.rx-sc-history-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #10121a;
  border: 1px solid #292e42;
  border-radius: 6px;
  padding: 8px 14px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: #a0a8c0;
  gap: 12px;
  flex-wrap: wrap;
}

.rx-sc-hist-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rx-sc-hist-item i {
  color: var(--neon-blue);
  font-size: 0.95rem;
}

.rx-sc-clear-btn {
  background: transparent;
  border: 1px solid #3d4560;
  color: #8892b0;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.rx-sc-clear-btn:hover {
  background: rgba(255, 82, 82, 0.2);
  border-color: #ff5252;
  color: #ff5252;
}

/* Weakness Analytics Panel & Eurorack Chassis Inset */
.rx-analytics-panel {
  background: linear-gradient(180deg, #141722 0%, #0e1018 100%);
  border: 1.5px solid #2a3148;
  border-top-color: #3d4766;
  border-bottom-color: #161924;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
  animation: rxFadeIn 0.2s ease;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.05),
    inset 0 -1px 2px rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.5);
  position: relative;
}

.rx-analytics-panel::before,
.rx-analytics-panel::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #252c3d;
  border: 1px solid #141822;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: 0.55;
  top: 6px;
}
.rx-analytics-panel::before {
  left: 7px;
}
.rx-analytics-panel::after {
  right: 7px;
}

.rx-analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1f2538;
}

.rx-analytics-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
}

.rx-analytics-subtitle {
  font-size: 0.72rem;
  color: #7e8baf;
}

.rx-analytics-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.rx-analytics-col {
  background: #171a26;
  border: 1px solid #252c42;
  border-radius: 6px;
  padding: 10px;
}

.rx-analytics-col-title {
  font-size: 0.78rem;
  font-weight: bold;
  color: #a0aed4;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.rx-top-confusions-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rx-confusion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #11131c;
  border: 1px solid #252c40;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 0.78rem;
}

.rx-confusion-pair-text {
  font-family: monospace;
  font-weight: bold;
  font-size: 0.88rem;
}

/* Morse Diff Rhythm Comparison Badge */
.rx-morse-diff-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  background: rgba(10, 14, 22, 0.75);
  border: 1px solid #283348;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.diff-token {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.diff-token.exp .diff-char {
  color: #00e676;
}
.diff-token.act .diff-char {
  color: #ff5252;
}
.diff-divider {
  color: #556;
}
.rhythm-sym {
  display: inline-block;
  font-weight: bold;
}
.rhythm-sym.match {
  color: #7b869e;
}
.rhythm-sym.diff.exp {
  color: #00e676;
  text-shadow: 0 0 6px rgba(0, 230, 118, 0.85);
  font-weight: 900;
}
.rhythm-sym.diff.act {
  color: #ff5252;
  text-shadow: 0 0 6px rgba(255, 82, 82, 0.85);
  font-weight: 900;
}

.rx-severity-badge {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: bold;
}

.rx-severity-badge.critical {
  background: rgba(255, 82, 82, 0.2);
  color: #ff5252;
  border: 1px solid #ff5252;
}

.rx-severity-badge.warning {
  background: rgba(255, 183, 3, 0.2);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.rx-severity-badge.notice {
  background: rgba(0, 229, 255, 0.2);
  color: var(--neon-blue);
  border: 1px solid var(--neon-blue);
}

.rx-weak-chars-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rx-weak-char-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #10121a;
  border: 1px solid #2a3148;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
}

.rx-weak-char-letter {
  font-family: monospace;
  font-weight: bold;
  color: #fff;
  font-size: 0.85rem;
}

.rx-trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #11131c;
  border: 1px solid #252c40;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  color: #aab;
}

/* Native SVG Reflex Latency Sparkline */
.rx-sparkline-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(10, 13, 20, 0.6);
  border: 1px solid #22293a;
  border-radius: 6px;
  padding: 8px 10px;
}
.rx-sparkline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: #aab;
}
.rx-sparkline-svg {
  width: 100%;
  height: 56px;
  overflow: visible;
}
.rx-sparkline-grid {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-dasharray: 3 3;
}
.rx-sparkline-path {
  fill: none;
  stroke: var(--neon-blue);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.5));
}
.rx-sparkline-area {
  fill: url(#rx-spark-grad);
}
.rx-sparkline-point {
  fill: #00e5ff;
  transition: r 0.15s ease;
}
.rx-sparkline-point.latest {
  fill: var(--gold);
  stroke: #fff;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}
.rx-sparkline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  color: #778;
  font-size: 0.75rem;
}
.rx-sparkline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: #667899;
}

/* Zone 3 Adaptive Rx Dock & Telegraph Soft Keypad */
.rx-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f1118;
  border-top: 1.5px solid #282d3e;
  padding: 6px 12px 10px;
  z-index: 100;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease-in-out;
}

.rx-dock.collapsed {
  padding: 4px 12px 6px;
}

.rx-dock.collapsed .telegraph-keypad {
  display: none !important;
}

.rx-dock-container {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rx-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 4px;
}

.rx-dock-label {
  font-size: 0.72rem;
  color: #728299;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.5px;
}

.rx-dock-toggle-btn {
  background: #181c26;
  border: 1px solid #2e374a;
  color: #8c9cb2;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.rx-dock-toggle-btn:hover {
  background: #222938;
  border-color: var(--neon-blue);
  color: #fff;
}

.telegraph-keypad {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

.keypad-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.keypad-key {
  flex: 1;
  max-width: 60px;
  height: 38px;
  background: #1c202c;
  border: 1px solid #363e52;
  border-radius: 5px;
  color: #eee;
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.08s ease;
  touch-action: manipulation;
}

.keypad-key:active {
  background: var(--gold);
  color: #000;
  transform: translateY(2px);
}

.keypad-key.key-wide {
  flex: 1.5;
  max-width: 85px;
  font-size: 0.78rem;
  background: #252a3a;
  border-color: #444c66;
}

.keypad-key.key-action {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(0, 150, 255, 0.3));
  border-color: var(--neon-blue);
  color: #fff;
}

.desktop-hotkey-strip {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.72rem;
  color: #888;
  padding: 4px;
}

/* Rx Blind Mode Visual Cue, Target & Pool Concealment, and PCB Safety */
.rx-blind-mode #rx-visual-cue,
.rx-blind-active #rx-visual-cue,
.rx-blind-active #rx-koch-target-info,
.rx-blind-active .rx-pool-preview-row {
  display: none !important;
}

/* Acoustic Sonar Pulse (Blind Mode Audio Radar Ripple) */
.rx-sonar-pulse {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 38px;
  margin: 2px 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.rx-blind-active .rx-sonar-pulse,
.rx-blind-mode .rx-sonar-pulse {
  display: flex;
}

.rx-sonar-pulse.active {
  opacity: 1;
}

.sonar-core {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(13, 22, 35, 0.85);
  border: 1.5px solid rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4), inset 0 0 6px rgba(0, 229, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-blue);
  font-size: 1rem;
  z-index: 2;
  animation: sonar-core-pulse 1.4s infinite ease-in-out;
}

@keyframes sonar-core-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.3), inset 0 0 4px rgba(0, 229, 255, 0.2);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.7), inset 0 0 8px rgba(0, 229, 255, 0.4);
    color: #fff;
  }
}

.sonar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  margin-left: -13px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
  pointer-events: none;
  opacity: 0;
}

.rx-sonar-pulse.active .sonar-ring.ring-1 {
  animation: sonar-expand 1.8s infinite cubic-bezier(0.2, 0.75, 0.35, 1);
  animation-delay: 0s;
}

.rx-sonar-pulse.active .sonar-ring.ring-2 {
  animation: sonar-expand 1.8s infinite cubic-bezier(0.2, 0.75, 0.35, 1);
  animation-delay: 0.6s;
}

.rx-sonar-pulse.active .sonar-ring.ring-3 {
  animation: sonar-expand 1.8s infinite cubic-bezier(0.2, 0.75, 0.35, 1);
  animation-delay: 1.2s;
}

@keyframes sonar-expand {
  0% {
    transform: scale(0.6);
    opacity: 0.85;
    border-color: rgba(0, 229, 255, 0.7);
  }
  60% {
    opacity: 0.4;
    border-color: rgba(0, 229, 255, 0.35);
  }
  100% {
    transform: scale(4.4);
    opacity: 0;
    border-color: rgba(0, 229, 255, 0);
  }
}

/* Blind Mode Top Oscilloscope Shutter & Privacy Shield (Preserves 75px height, strictly zero text) */
.p3b-top-ribbon.ribbon-blind-mode {
  display: flex !important;
}

.p3b-top-ribbon.ribbon-blind-mode .scope-canvas {
  filter: grayscale(1) brightness(0.2) blur(1px);
  opacity: 0.25;
}

.p3b-top-ribbon.ribbon-blind-mode .scope-graticule {
  opacity: 0.1;
}

.p3b-top-ribbon.ribbon-blind-mode .scope-bezel-text {
  opacity: 0.15;
}

.p3b-top-ribbon .ribbon-blind-shield {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    -45deg,
    rgba(8, 11, 17, 0.88),
    rgba(8, 11, 17, 0.88) 12px,
    rgba(14, 18, 28, 0.88) 12px,
    rgba(14, 18, 28, 0.88) 24px
  );
  border-bottom: 1px dashed rgba(255, 215, 0, 0.2);
}

.p3b-top-ribbon.ribbon-blind-mode .ribbon-blind-shield {
  display: flex;
}

.ribbon-blind-shield .blind-shield-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(13, 17, 25, 0.92);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.8), 0 0 8px rgba(255, 215, 0, 0.2);
  color: var(--gold);
  font-size: 1.5rem;
  animation: blindShieldPulse 2.4s ease-in-out infinite;
}

@keyframes blindShieldPulse {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.8), 0 0 6px rgba(255, 215, 0, 0.15);
  }
  50% {
    transform: scale(1.06);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.9), 0 0 12px rgba(255, 215, 0, 0.35);
  }
}

.pcb-blind-mode {
  /* Legacy safety reset - guarantee PCB elements remain 100% visible */
  opacity: 1 !important;
  filter: none !important;
}

/* Enhanced Rx Control Buttons */
.rx-btn-start {
  background: rgba(0, 230, 118, 0.15) !important;
  border-color: #00e676 !important;
  color: #00e676 !important;
}
.rx-btn-start:hover:not(:disabled) {
  background: #00e676 !important;
  color: #000 !important;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

.rx-btn-stop {
  background: rgba(255, 82, 82, 0.15) !important;
  border-color: #ff5252 !important;
  color: #ff5252 !important;
}
.rx-btn-stop:hover:not(:disabled) {
  background: #ff5252 !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(255, 82, 82, 0.4);
}

.rx-btn-next {
  background: rgba(0, 229, 255, 0.15) !important;
  border-color: var(--neon-blue) !important;
  color: #fff !important;
}
.rx-btn-next:hover:not(:disabled) {
  background: var(--neon-blue) !important;
  color: #000 !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
}
.rx-btn-next.highlight-next {
  animation: rx-next-pulse 1.2s infinite alternate;
}

@keyframes rx-next-pulse {
  0% { box-shadow: 0 0 4px var(--neon-blue); border-color: var(--neon-blue); }
  100% { box-shadow: 0 0 14px var(--neon-blue); border-color: #fff; }
}

.rx-visual-cue {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  font-family: monospace;
  font-size: 0.95rem;
  letter-spacing: 4px;
  color: var(--gold);
}

/* Keypad Active Press Animation */
.keypad-key.active-press {
  background: var(--neon-blue) !important;
  color: #000 !important;
  transform: scale(0.95);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

/* Confusion Matrix List Styling */
.rx-confusion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 0;
  font-family: monospace;
}
.rx-confusion-item .confusion-exp {
  color: #00e676;
  font-weight: bold;
}
.rx-confusion-item .confusion-act {
  color: #ff5252;
  font-weight: bold;
}

.rx-btn-drill-pair {
  padding: 2px 7px;
  font-size: 0.72rem;
  color: var(--gold);
  border-color: rgba(255, 183, 3, 0.4);
  background: rgba(255, 183, 3, 0.08);
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
}
.rx-btn-drill-pair:hover {
  background: rgba(255, 183, 3, 0.25);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 0 8px rgba(255, 183, 3, 0.4);
}

.rx-sc-breakthrough {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rx-sc-breakthrough.success {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid #00e676;
  color: #00e676;
}
.rx-sc-breakthrough.warning {
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold);
}

/* Koch Rx Stage Control Bar & Pool Display */
.rx-koch-stage-bar {
  background: #0b141d;
  border: 1px solid #1c2b3d;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.rx-koch-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.rx-koch-stage-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rx-badge-cyan {
  background: #002d3d;
  color: var(--neon-blue);
  border: 1px solid #005a78;
}

.rx-target-chip {
  font-size: 0.78rem;
  color: #aaa;
  background: #141c26;
  border: 1px solid #27374b;
  padding: 3px 8px;
  border-radius: 4px;
}

.rx-btn-ghost {
  background: transparent;
  border: 1px solid #2e3e52;
  color: #9ab;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.rx-btn-ghost:hover {
  background: #1c2b3d;
  color: #fff;
  border-color: var(--neon-blue);
}

.rx-pool-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid #152230;
}

.rx-pool-label {
  font-size: 0.75rem;
  color: #889;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.rx-pool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.rx-pool-chip {
  display: inline-flex;
  align-items: center;
  background: #141d29;
  border: 1px solid #27374b;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #cde;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.rx-pool-chip:hover {
  border-color: var(--neon-blue);
  background: #1c2c40;
  color: #fff;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}
.rx-pool-chip.is-target {
  border-color: var(--gold);
  color: var(--gold-light);
  background: #241e0b;
}

.rx-koch-matrix-collapse {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #192433;
}

.rx-btn-advance {
  background: linear-gradient(135deg, #00e5ff, #0088cc) !important;
  color: #000 !important;
  font-weight: bold !important;
  border: none !important;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4) !important;
  animation: pulseAdvance 1.5s infinite alternate ease-in-out;
}
@keyframes pulseAdvance {
  from { box-shadow: 0 0 8px rgba(0, 229, 255, 0.3); transform: scale(1); }
  to { box-shadow: 0 0 16px rgba(0, 229, 255, 0.7); transform: scale(1.03); }
}

