:root {
  /* Premium Light Theme Colors */
  --bg-dark: #f1f5f9;
  --bg-panel: rgba(255, 255, 255, 0.82);
  --border-color: rgba(15, 23, 42, 0.08);
  --text-main: #0f172a;
  --text-muted: #64748b;

  --color-heron: #0284c7;
  --color-falcon: #16a34a;
  --color-wren: #d97706;
  --color-kite: #7c3aed;
  --color-terminal: #dc2626;
  --color-flow: #9333ea;

  --accent: #7c3aed;
  --accent-glow: rgba(124, 58, 237, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header {
  padding: 16px 30px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.8);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.role-badge {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: var(--color-kite);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.btn-reset {
  padding: 6px 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  transition: all 0.3s ease;
}

.btn-reset:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.15);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.main-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  height: calc(100vh - 65px);
  position: relative;
}

.webgl-container {
  position: relative;
  background: #e2e8f0;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.details-sidebar {
  min-width: 0;
}

#webgl-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Floating Tooltips (Light Theme Redesign) */
.station-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #ffffff;
  border: 1.5px solid var(--station-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  opacity: 0.9;
  z-index: 5;
}

.station-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #ffffff transparent;
  display: block;
  width: 0;
}

.station-tooltip.active {
  opacity: 1;
  background: var(--station-color);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.station-tooltip.active::after {
  border-color: var(--station-color) transparent;
}

.tooltip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--station-color);
}

.station-tooltip.active .tooltip-dot {
  background: #ffffff;
}

/* 3D Overlay UI */
.viewport-overlay {
  position: absolute;
  top: 20px;
  left: 20px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.viewport-title {
  font-family: 'Space Grotesk', sans-serif;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 1px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.station-selectors {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  padding: 6px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  z-index: 10;
}

.station-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.station-btn::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.station-btn.active {
  color: #fff;
  background: var(--btn-accent);
  box-shadow: 0 4px 12px var(--btn-glow);
}

.details-sidebar {
  background: var(--bg-panel);
  border-left: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.04);
}

.detail-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.badge-label {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--border-color);
}

.detail-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.section-block {
  border-left: 2.5px solid var(--border-color);
  padding-left: 16px;
  margin-bottom: 10px;
}

.section-block.active-accent {
  border-color: var(--accent);
}

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.section-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}

code {
  font-family: monospace;
  background: rgba(15, 23, 42, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-wren);
  font-size: 13px;
}

.artifact-mockup {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-top: 10px;
  position: relative;
}

.postit-mock {
  background: #fff3a3;
  color: #5f4b00;
  padding: 14px;
  border-radius: 4px;
  font-family: sans-serif;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  width: 100%;
  max-width: 240px;
  margin: 10px auto;
  border: 1px solid #d1b84f;
}

.postit-mock code {
  background: transparent;
  color: #5f4b00;
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  display: block;
  margin-top: 10px;
  border-top: 1px dashed rgba(95, 75, 0, 0.2);
  padding-top: 8px;
}

.resistor-band {
  display: inline-block;
  width: 20px;
  height: 40px;
  margin-right: 4px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.3);
}

.wire-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.alert-box {
  background: rgba(220, 38, 38, 0.04);
  border: 1px solid rgba(220, 38, 38, 0.12);
  border-radius: 8px;
  padding: 12px 16px;
  color: #b91c1c;
  font-size: 13px;
}

.alert-box strong {
  color: var(--color-terminal);
  display: block;
  margin-bottom: 4px;
}

/* SVG Map rendering inside sidebar */
.mini-map-svg {
  width: 100%;
  height: 140px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  margin-top: 10px;
}

/* 3D scene helpers */
.instruction-tooltip {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.85);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  pointer-events: none;
}

/* Fullscreen Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(241, 245, 249, 0.95);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 40px;
  backdrop-filter: blur(12px);
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 20px 50px rgba(15,23,42,0.12);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(15,23,42,0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(15,23,42,0.08);
}

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 20px;
  font-size: 20px;
  border-bottom: 1px solid rgba(15,23,42,0.05);
  padding-bottom: 10px;
}

.flow-diagram-svg {
  width: 100%;
  height: auto;
  max-height: 500px;
}


/* Station color bindings keep HTML free of inline style attributes. */
.station-tooltip--heron { --station-color: var(--color-heron); }
.station-tooltip--falcon { --station-color: var(--color-falcon); }
.station-tooltip--wren { --station-color: var(--color-wren); }
.station-tooltip--kite { --station-color: var(--color-kite); }
.station-tooltip--terminal { --station-color: var(--color-terminal); }
.station-tooltip--flow { --station-color: var(--color-flow); }

.station-btn--overview {
  --btn-accent: var(--accent);
  --btn-glow: rgba(124, 58, 237, 0.3);
}

.station-btn--heron {
  --btn-accent: var(--color-heron);
  --btn-glow: rgba(2, 132, 199, 0.3);
}

.station-btn--falcon {
  --btn-accent: var(--color-falcon);
  --btn-glow: rgba(22, 163, 74, 0.3);
}

.station-btn--wren {
  --btn-accent: var(--color-wren);
  --btn-glow: rgba(217, 119, 6, 0.3);
}

.station-btn--kite {
  --btn-accent: var(--color-kite);
  --btn-glow: rgba(124, 58, 237, 0.3);
}

.station-btn--terminal {
  --btn-accent: var(--color-terminal);
  --btn-glow: rgba(220, 38, 38, 0.3);
}

.station-btn--flow {
  --btn-accent: var(--color-flow);
  --btn-glow: rgba(147, 51, 234, 0.3);
}

.diagram-open-button {
  width: 100%;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.2);
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  header {
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  h1 {
    max-width: 170px;
    font-size: 16px;
    line-height: 1.25;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .role-badge,
  .btn-reset {
    padding: 6px 10px;
    font-size: 10px;
    letter-spacing: 1.2px;
  }

  .main-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 89px);
  }

  .webgl-container {
    height: 64vh;
    min-height: 430px;
  }

  .details-sidebar {
    border-top: 1px solid var(--border-color);
    border-left: none;
    overflow: visible;
  }

  .instruction-tooltip {
    top: 58px;
    right: 12px;
    left: 12px;
    font-size: 10px;
    text-align: center;
  }

  .viewport-overlay {
    top: 12px;
    left: 12px;
  }

  .station-selectors {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    transform: none;
    overflow-x: auto;
    justify-content: flex-start;
    border-radius: 16px;
  }

  .station-selectors::-webkit-scrollbar {
    height: 0;
  }

  .station-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .station-tooltip {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Immersive room mode
   -------------------------------------------------------------------------- */

.css3d-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.terminal-iframe {
  width: 960px;
  height: 540px;
  border: 0;
  background: #050707;
  pointer-events: none;
  opacity: 0.98;
  box-shadow: 0 0 0 26px #151718;
}

#webgl-canvas {
  position: relative;
  z-index: 1;
}

.interaction-hint {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 28px;
  min-height: 34px;
  transform: translateX(-50%);
  padding: 8px 16px;
  border: 1px solid rgba(237, 225, 198, 0.22);
  border-radius: 4px;
  background: rgba(15, 14, 12, 0.76);
  color: #e8dfca;
  font: 500 12px/1.3 "Space Grotesk", sans-serif;
  letter-spacing: 0.04em;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.interaction-hint:empty {
  opacity: 0;
}

.protocol-warning {
  display: none;
  position: absolute;
  z-index: 300;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  padding: 12px 18px;
  background: #3f1814;
  border: 1px solid #b94d3c;
  color: #ffe8df;
  border-radius: 5px;
  font-size: 13px;
}

.protocol-warning.show {
  display: block;
}

body.mode-play {
  background: #171714;
}

body.mode-play header {
  position: fixed;
  top: 14px;
  right: 14px;
  left: auto;
  z-index: 40;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

body.mode-play header .logo-area,
body.mode-play header .role-badge,
body.mode-play header [data-action="overview"],
body.mode-play header #btn-reset-game {
  display: none;
}

body.mode-play header .header-actions {
  gap: 0;
}

body.mode-play #btn-mode {
  padding: 7px 11px;
  border-color: rgba(233, 222, 198, 0.22);
  background: rgba(20, 19, 17, 0.55);
  color: rgba(239, 229, 207, 0.72);
  box-shadow: none;
  opacity: 0.52;
}

body.mode-play #btn-mode:hover {
  opacity: 1;
  background: rgba(20, 19, 17, 0.9);
}

body.mode-play .main-layout {
  display: block;
  width: 100vw;
  height: 100vh;
}

body.mode-play .webgl-container {
  width: 100vw;
  height: 100vh;
  background: #171714;
}

body.mode-play .details-sidebar,
body.mode-play .station-selectors,
body.mode-play .station-tooltip {
  display: none !important;
}

body.mode-play .viewport-overlay {
  z-index: 7;
  top: 18px;
  left: 18px;
  opacity: 0.58;
}

body.mode-play .viewport-title {
  border: 0;
  background: rgba(15, 14, 12, 0.45);
  color: #d5c9af;
  box-shadow: none;
  font-size: 10px;
  letter-spacing: 0.16em;
}

body.mode-play .instruction-tooltip {
  z-index: 7;
  top: auto;
  right: auto;
  bottom: 18px;
  left: 18px;
  max-width: 330px;
  padding: 7px 10px;
  border: 0;
  background: rgba(15, 14, 12, 0.48);
  color: rgba(226, 216, 195, 0.62);
  font-size: 10px;
  box-shadow: none;
}

body.mode-play.terminal-active .instruction-tooltip,
body.mode-play.terminal-active .interaction-hint,
body.mode-play.terminal-active .viewport-overlay {
  opacity: 0;
}

body.mode-play.terminal-active .terminal-iframe {
  pointer-events: auto;
}

body.uv-equipped #webgl-canvas {
  cursor: crosshair !important;
}

body.mode-design .css3d-layer {
  pointer-events: none;
}

.modal-overlay {
  z-index: 500;
}

@media (max-width: 900px) {
  body.mode-play .main-layout,
  body.mode-play .webgl-container {
    height: 100vh;
  }

  .terminal-iframe {
    width: 960px;
    height: 540px;
  }

  body.mode-play .instruction-tooltip {
    display: none;
  }
}

/* ============================================================ */
/* INTERACTIVE PLAY MODE AND PUZZLE ELEMENTS                    */
/* ============================================================ */

/* Mode Switch Badges */
.role-badge.role-play {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.role-badge.role-design {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.2);
  color: var(--color-kite);
}

/* Action Button to Open Puzzles */
.action-btn-puzzle {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.2);
  transition: all 0.3s ease;
  margin: 16px 0;
  text-align: center;
}

.action-btn-puzzle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.3);
}

.station-status-success {
  padding: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin: 16px 0;
}

/* Inventory List */
.inventory-tray {
  margin-top: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
}

.inventory-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.inventory-item {
  font-size: 13px;
  margin-bottom: 6px;
}

.inventory-item:last-child {
  margin-bottom: 0;
}

.solved-color {
  color: #10b981;
}

.locked-color {
  color: var(--text-muted);
  font-style: italic;
}

/* Puzzle Modal */
.puzzle-modal-content {
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
}

.puzzle-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px 0;
}

/* Standard Puzzle Forms */
.puzzle-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.puzzle-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.puzzle-input {
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-family: monospace;
}

.puzzle-btn {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.puzzle-btn:hover {
  opacity: 0.9;
}

.puzzle-feedback {
  font-size: 13px;
  font-weight: 600;
}

.puzzle-feedback.success {
  color: #10b981;
}

.puzzle-feedback.error {
  color: #dc2626;
}

/* HERON Decryptor CSS */
.vigenere-wheel-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.vigenere-tape {
  display: flex;
  overflow-x: auto;
  width: 100%;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
}

.vigenere-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid #f1f5f9;
  padding: 2px 6px;
}

/* FALCON CSV CSS */
.csv-viewer {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #ffffff;
}

.csv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: monospace;
}

.csv-table th, .csv-table td {
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
}

.csv-table th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  font-weight: 700;
}

.csv-table tr.filtered-out {
  display: none;
}

.csv-table tr.selected {
  background: rgba(22, 163, 74, 0.08);
}

.falcon-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.falcon-map-container {
  display: flex;
  justify-content: center;
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.interactive-map {
  max-width: 500px;
  width: 100%;
  border: 1px solid var(--border-color);
  background: #fff;
}

.interactive-map .map-cell {
  cursor: pointer;
  transition: fill 0.2s ease;
}

.interactive-map .map-cell:hover {
  fill: rgba(22, 163, 74, 0.2);
}

.interactive-map .map-cell.active {
  fill: rgba(22, 163, 74, 0.4);
}

/* KITE Wires CSS */
.kite-board-svg {
  width: 100%;
  max-width: 550px;
  background: #1e293b;
  border-radius: 8px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.wire-strand {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
  transition: stroke-width 0.2s, stroke 0.2s;
}

.wire-strand:hover {
  stroke-width: 8 !important;
}

.wire-strand.active {
  stroke-dasharray: none !important;
  stroke-width: 7 !important;
}

.wire-terminal {
  cursor: pointer;
}

.wire-terminal:hover circle {
  fill: #fff;
}

/* WREN Lockbox CSS */
.wren-hasp-panel {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 24px;
  background: #e2e8f0;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
}

.wren-dial-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.wren-dial-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.wren-lock-inputs {
  display: flex;
  gap: 6px;
}

.wren-digit-spinner {
  width: 32px;
  height: 48px;
  background: #0f172a;
  color: #fff;
  border: 2px solid #334155;
  border-radius: 4px;
  font-family: monospace;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.wren-digit-spinner:hover {
  border-color: var(--accent);
}

.schematic-box {
  margin-top: 16px;
  padding: 16px;
  background: #fffbeb;
  border: 2px dashed #f59e0b;
  border-radius: 8px;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.5;
}

/* TERMINAL CSS */
.terminal-simulate {
  background: #090d16;
  color: #10b981;
  font-family: monospace;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 2px solid #111827;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.terminal-header-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #10b98133;
  padding-bottom: 12px;
}

.terminal-title-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.terminal-timer {
  font-size: 24px;
  font-weight: 700;
  color: #ef4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.terminal-inputs-row {
  display: flex;
  gap: 16px;
}

.terminal-input-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terminal-input-col label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
}

.terminal-box-input {
  background: #0f172a;
  border: 1px solid #10b98155;
  color: #fff;
  padding: 12px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 16px;
  text-align: center;
  text-transform: uppercase;
}

.terminal-box-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.terminal-box-input.ok-state {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  font-weight: 700;
}

.terminal-box-input.bad-state {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.terminal-sys-msg {
  background: #020617;
  border: 1px solid #10b98122;
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  min-height: 42px;
}

.terminal-action-panel {
  background: #020617;
  padding: 16px;
  border-radius: 4px;
  border: 1px dashed #10b98133;
}

.consensus-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.consensus-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
}

.outage-overlay-simulation {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #7f1d1d;
  color: #fff;
  z-index: 1000;
  padding: 32px;
  text-align: center;
  border-radius: 8px;
  animation: scanlinesOutage 0.15s infinite;
}

.outage-overlay-simulation.show {
  display: flex;
}

.outage-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

@keyframes scanlinesOutage {
  0% { opacity: 0.98; }
  50% { opacity: 1.0; }
  100% { opacity: 0.98; }
}
