/* ==========================================================================
   Horizon-X | NASA Space Mission Design Game
   Main Menu & Room Screens Stylesheet (Desktop Responsive)
   Font-Family: Tektur
   ========================================================================== */

/* --- 1. Font Definitions (Tektur) --- */
@font-face {
  font-family: 'Tektur';
  src: url('assets/fonts/Tektur/Tektur-VariableFont_wdth,wght.ttf') format('truetype-variations'),
       url('assets/fonts/Tektur/static/Tektur-Regular.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tektur';
  src: url('assets/fonts/Tektur/static/Tektur-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tektur';
  src: url('assets/fonts/Tektur/static/Tektur-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tektur';
  src: url('assets/fonts/Tektur/static/Tektur-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tektur';
  src: url('assets/fonts/Tektur/static/Tektur-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- 2. CSS Variables & Reset --- */
:root {
  --color-bg-space: #02010a;
  --color-text-primary: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.25);
  --color-box-bg: rgba(217, 217, 217, 0.05);
  --font-family-base: 'Tektur', sans-serif;
  --transition-smooth: opacity 0.2s ease;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-bg-space);
  color: var(--color-text-primary);
  font-family: var(--font-family-base);
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- 3. Screen View Management --- */
.game-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--color-bg-space);
  display: none;
}

.game-screen.active {
  display: block;
}

/* --- 4. Audio Control HUD (Top Right) --- */
.audio-control-hub {
  display: none !important;
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 7, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 18px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: var(--transition-smooth);
}

.audio-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.audio-btn .icon {
  width: 15px;
  height: 15px;
}

.audio-btn .icon.hidden {
  display: none;
}

/* ==========================================================================
   SCREEN 1: MAIN MENU (Node 378:2)
   ========================================================================== */

/* Nebula Background */
.bg-nebula-container {
  position: absolute;
  left: 0;
  top: -1.2px;
  width: 110vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-nebula-img {
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transform: rotate(-90.07deg) scale(1.1);
  transform-origin: center center;
  mix-blend-mode: screen;
}

/* Saturn Planet */
.bg-saturn-container {
  position: absolute;
  left: -46.4vw;
  top: -42vh;
  width: 104.5vw;
  height: 127.6vh;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-saturn-img {
  width: 96%;
  height: auto;
  opacity: 0.55;
  transform: rotate(21.12deg);
  transform-origin: center center;
}

.ambient-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(circle at 50% 50%, rgba(2, 1, 10, 0) 30%, rgba(2, 1, 10, 0.8) 100%);
}

/* Menu Content */
.menu-content {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.game-title {
  font-size: clamp(4.5rem, 6.25vw, 7.5rem); /* 120px at 1920px */
  font-weight: 500;
  line-height: normal;
  color: var(--color-text-primary);
  margin-bottom: clamp(2.2rem, 4.5vh, 4rem);
  white-space: nowrap;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3vh, 32px);
  width: auto;
}

.menu-item {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: block;
  color: var(--color-text-primary);
  font-family: var(--font-family-base);
  font-size: clamp(2rem, 2.86vw, 3.44rem); /* 55px at 1920px */
  font-weight: 400;
  line-height: normal;
  text-align: center;
  transition: var(--transition-smooth);
}

.menu-item:hover {
  opacity: 0.75;
}

.menu-item:active {
  opacity: 0.5;
}

.menu-item:disabled {
  opacity: 0.28 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.menu-item.menu-continue-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.continue-badge {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #10b981;
  text-transform: uppercase;
  margin-top: -6px;
  margin-bottom: 2px;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

/* Footers */
.menu-footer {
  position: absolute;
  bottom: clamp(20px, 4vh, 48px);
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(32px, 7vw, 135px);
}

.footer-tag {
  font-size: clamp(0.95rem, 1.3vw, 1.56rem); /* 25px at 1920px */
  font-weight: 500;
  color: var(--color-text-primary);
  opacity: 0.25;
  letter-spacing: 1px;
  white-space: nowrap;
}

.footer-credits {
  text-align: left;
}

.footer-tagline {
  margin-right: clamp(10px, 12vw, 180px);
  text-align: right;
}

/* ==========================================================================
   SHARED ROOM BACKGROUND (Starfield download (9) 1.png)
   ========================================================================== */
.room-starfield-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-starfield-img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0.55;
  transform: rotate(89.86deg) scale(1.1);
  transform-origin: center center;
}

/* ==========================================================================
   SCREEN 2: ROOM SCREEN (Node 378:46)
   ========================================================================== */
.room-layout {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 678px;
  padding: 0 20px;
}

.room-title {
  font-size: clamp(2.5rem, 3.8vw, 55px);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: normal;
  text-align: center;
  margin-bottom: clamp(45px, 8vh, 85px);
}

.room-group {
  width: 100%;
  max-width: 678px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(40px, 6.5vh, 65px);
}

.room-label {
  font-size: clamp(1.8rem, 2.4vw, 35px);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: normal;
  text-align: center;
  margin-bottom: 24px;
}

.room-input-box {
  width: 100%;
  max-width: 678px;
  height: 71px;
  background: var(--color-box-bg);
  border: 1px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 24px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.room-input-box:focus-within {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.room-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-family-base);
  font-size: clamp(1.2rem, 1.8vw, 26px);
  font-weight: 400;
  width: 100%;
  letter-spacing: 2px;
}

.room-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-size: clamp(1rem, 1.4vw, 20px);
  letter-spacing: 2px;
}

.room-icon-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.room-icon-btn:hover {
  opacity: 0.65;
}

.room-icon-btn:active {
  transform: scale(0.92);
}

.room-svg {
  width: 32px;
  height: 32px;
  stroke: #ffffff;
}

.room-action-link {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: var(--font-family-base);
  font-size: clamp(1.6rem, 2.4vw, 35px);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: normal;
  text-align: center;
  margin-bottom: clamp(50px, 8.5vh, 95px);
  transition: var(--transition-smooth);
}

.room-action-link:hover {
  opacity: 0.7;
}

.room-back-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: var(--font-family-base);
  font-size: clamp(1.6rem, 2.4vw, 35px);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: normal;
  text-align: center;
  transition: var(--transition-smooth);
}

.room-back-btn:hover {
  opacity: 0.7;
}

/* ==========================================================================
   SCREEN 3: CREATE THE PRIVATE ROOM (Node 378:72)
   ========================================================================== */
.proom-layout {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 678px;
  padding: 0 20px;
}

.proom-title {
  font-size: clamp(1.8rem, 2.4vw, 35px);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: normal;
  text-align: center;
  margin-bottom: clamp(24px, 4vh, 44px);
}

.proom-group {
  width: 100%;
  max-width: 678px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(18px, 3vh, 32px);
}

.proom-label {
  font-size: clamp(1.6rem, 2.4vw, 35px);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: normal;
  text-align: center;
  margin-bottom: 14px;
}

/* Player Counter Specific Box */
.player-counter-box {
  padding: 0 32px;
}

.player-count-val {
  font-family: var(--font-family-base);
  font-size: clamp(1.8rem, 2.4vw, 35px);
  font-weight: 400;
  color: #ffffff;
  line-height: normal;
}

.counter-arrow-btn {
  width: 48px;
  height: 48px;
}

.counter-arrow-btn .room-svg {
  width: 36px;
  height: 36px;
}

#btnPRoomBack {
  margin-top: clamp(16px, 2.5vh, 28px);
}

/* ==========================================================================
   SCREEN 4: SETTINGS SCREEN (Node 378:131)
   ========================================================================== */
.settings-layout {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 633px;
  max-height: 96vh;
  overflow-y: auto;
  padding: clamp(10px, 2vh, 24px) 20px;
  scrollbar-width: none; /* Hide default scrollbar for sleek HUD look */
}

.settings-layout::-webkit-scrollbar {
  display: none;
}

.settings-title {
  font-size: clamp(1.8rem, 2.4vw, 35px);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: normal;
  text-align: center;
  margin-bottom: clamp(20px, 3.5vh, 40px);
}

.settings-controls-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.8vh, 32px);
  width: 100%;
}

.settings-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.settings-label {
  font-size: clamp(1.5rem, 2.2vw, 35px);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: normal;
  text-align: center;
  margin-bottom: clamp(8px, 1.6vh, 16px);
  white-space: nowrap;
}

/* Player Name Box */
.settings-input-box {
  width: 100%;
  max-width: 580px;
  height: 71px;
  background: var(--color-box-bg);
  border: 1px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.settings-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  opacity: 0.65;
  font-family: var(--font-family-base);
  font-size: clamp(1.6rem, 2.2vw, 35px);
  font-weight: 400;
  text-align: center;
  width: 100%;
  letter-spacing: 1px;
}

.settings-input:focus {
  opacity: 1;
}

/* Audio Enable/Disable Toggle in Settings */
.settings-toggle-box {
  width: 100%;
  max-width: 580px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-audio-toggle-btn {
  width: 100%;
  height: 100%;
  background: var(--color-box-bg);
  border: 1px solid #ffffff;
  color: #ffffff;
  font-family: var(--font-family-base);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 600;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.settings-audio-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #00a2ff;
}

.settings-audio-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.25s;
}

.settings-audio-dot.dot-off {
  background: #dc2626;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}

.settings-audio-dot.dot-on {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
}

/* Custom Sliders matching Figma exact Slider SVG */
.settings-slider-wrapper {
  width: 100%;
  max-width: 626px;
  height: 35px;
  display: flex;
  align-items: center;
}

.figma-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

/* Slider Thumb: WebKit */
.figma-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.figma-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.figma-range-slider::-webkit-slider-thumb:active {
  transform: scale(0.95);
}

/* Slider Thumb: Firefox */
.figma-range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.figma-range-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
}

.figma-range-slider::-moz-range-thumb:active {
  transform: scale(0.95);
}

.settings-back-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: var(--font-family-base);
  font-size: clamp(1.6rem, 2.4vw, 35px);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: normal;
  text-align: center;
  margin-top: clamp(20px, 3.5vh, 40px);
  transition: var(--transition-smooth);
}

.settings-back-btn:hover {
  opacity: 0.7;
}

/* ==========================================================================
   CONFIRMATION POP-UP (Figma Node 381:273)
   ========================================================================== */
.confirmation-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(1, 0, 6, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.confirmation-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.confirmation-modal {
  width: 90%;
  max-width: 900px;
  min-height: 320px;
  background: #010006;
  border: 1.5px solid #d9d9d9;
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  box-sizing: border-box;
  animation: modalScaleFadeIn 0.25s ease-out;
}

.confirmation-question {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: #f8f3f0;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 36px;
  white-space: normal;
  max-width: 90%;
  letter-spacing: 0.5px;
}

.confirmation-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.5vw, 14px);
  width: 100%;
}

.confirm-btn {
  width: 100%;
  max-width: 371px;
  height: clamp(65px, 8.3vh, 90px);
  border: 1px solid #d9d9d9;
  font-family: var(--font-family-base);
  font-size: clamp(1.6rem, 2.4vw, 35px);
  font-weight: 400;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}

.confirm-btn-no {
  background: #010006;
}

.confirm-btn-no:hover {
  background: rgba(255, 255, 255, 0.08);
}

.confirm-btn-yes {
  background: rgba(209, 208, 221, 0.25);
}

.confirm-btn-yes:hover {
  background: rgba(209, 208, 221, 0.38);
}

.confirm-btn:active {
  transform: scale(0.98);
}

/* ==========================================================================
   SCREEN 5: 3D FPS FACILITY ROOM (Figma Node 391:75)
   ========================================================================== */
.facility-canvas-container {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #fcf6e6;
  cursor: crosshair;
}

.facility-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Minimalist Retro/Sci-Fi HUD */
.fps-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(16px, 2.5vh, 32px) clamp(20px, 3vw, 40px);
}

.fps-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(17, 17, 19, 0.75);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.fps-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}
.top-bar-left,
.fps-bottom-bar {
  display: none !important;
}

.fps-badge {
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
  color: #111113;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #111113;
  padding: 6px 14px;
  letter-spacing: 1.5px;
}

.fps-coordinates {
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 500;
  color: #111113;
  letter-spacing: 1px;
}

.fps-exit-btn {
  pointer-events: auto;
  background: #111113;
  color: #ffffff;
  border: 1px solid #111113;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  letter-spacing: 1.5px;
  transition: opacity 0.2s ease;
}

.fps-exit-btn:hover {
  opacity: 0.8;
}

.fps-center-prompt {
  align-self: center;
  text-align: center;
  background: rgba(17, 17, 19, 0.88);
  color: #ffffff;
  padding: 18px 32px;
  border: 1px solid #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.fps-prompt-title {
  font-family: var(--font-family-base);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.fps-prompt-sub {
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 1px;
}

.fps-interaction-prompt {
  display: none;
  align-self: center;
  margin-bottom: 40px;
  background: rgba(17, 17, 19, 0.9);
  border: 1px solid #ffffff;
  color: #ffffff;
  padding: 10px 22px;
  font-family: var(--font-family-base);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.fps-key-pill {
  background: #ffffff;
  color: #111113;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  font-weight: 700;
}

.fps-bottom-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  width: 100%;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 500;
  color: rgba(17, 17, 19, 0.7);
  letter-spacing: 1.5px;
}

/* ==========================================================================
   SCREEN: MISSIONS (Figma Node 391:2)
   ========================================================================== */
.missions-layout {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
}

.missions-title {
  font-size: clamp(2.5rem, 3.8vw, 55px);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: normal;
  text-align: center;
  margin-bottom: clamp(40px, 6.5vh, 70px);
}

.missions-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 1.5vw, 16px);
  width: 100%;
}

.mission-card {
  width: clamp(280px, 36.5vw, 525px);
  height: clamp(220px, 37.5vh, 405px);
  background: #2b2b2b;
  opacity: 0.8;
  border-radius: 2px;
  border: none;
  outline: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}

.mission-card:hover {
  opacity: 0.95;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.mission-card:active {
  transform: scale(0.98);
}

#btnMissionsBack {
  margin-top: clamp(35px, 6.5vh, 75px);
}

/* ==========================================================================
   SCREEN: OBJECTIVE (Figma Node 391:60 "obj-03")
   ========================================================================== */
.figma-node-391-60,
.objective-layout {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  z-index: 10 !important;
  width: 100% !important;
  max-width: 1240px !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  padding: clamp(24px, 4vh, 60px) clamp(20px, 4vw, 64px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  user-select: none !important;
}

.figma-title-391,
.objective-title {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(34px, 3.8vw, 55px) !important;
  font-weight: 400 !important;
  color: #ffffff !important;
  letter-spacing: 2px !important;
  margin: clamp(10px, 2vh, 24px) 0 4px 0 !important;
  text-align: center !important;
  line-height: normal !important;
}

.figma-target-504,
.objective-target-name {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(30px, 3.5vw, 55px) !important;
  font-weight: 400 !important;
  color: #ffffff !important;
  letter-spacing: 1.5px !important;
  margin: 0 0 clamp(12px, 2vh, 20px) 0 !important;
  text-align: center !important;
  line-height: normal !important;
}



/* Main Briefing Content (Figma Node 504:112) */
.figma-briefing-504,
.objective-content {
  width: 100% !important;
  max-width: 1067px !important;
  margin: auto 0 !important;
  padding: 0 clamp(8px, 2vw, 24px) !important;
  box-sizing: border-box !important;
}

.objective-lead {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(16px, 1.7vw, 25px) !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  color: #ffffff !important;
  margin: 0 0 20px 0 !important;
  text-align: left !important;
}

.objective-lead strong {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-weight: 700 !important;
  color: #ffffff !important;
}

.objective-specs-list {
  list-style: disc outside !important;
  padding-left: 28px !important;
  margin: 0 !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(16px, 1.7vw, 25px) !important;
  line-height: 1.65 !important;
  color: #ffffff !important;
}

.objective-specs-list li {
  margin-bottom: 8px !important;
}

.objective-specs-list strong {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-weight: 700 !important;
  color: #ffffff !important;
}

/* Footer Actions: Previous / Start (Figma Nodes 391:62 & 391:63) */
.figma-actions-391,
.objective-footer-actions {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 1067px !important;
  margin-top: clamp(24px, 4vh, 48px) !important;
  padding: 0 clamp(8px, 2vw, 24px) !important;
  box-sizing: border-box !important;
}

.obj-action-btn,
.figma-btn-prev,
.figma-btn-start {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(24px, 2.5vw, 35px) !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  line-height: normal !important;
  letter-spacing: 1px !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.obj-action-btn:hover,
.figma-btn-prev:hover,
.figma-btn-start:hover {
  opacity: 0.7 !important;
  transform: translateY(-2px) !important;
}

.obj-action-btn:active,
.figma-btn-prev:active,
.figma-btn-start:active {
  transform: scale(0.96) !important;
}

.obj-action-btn:focus-visible,
.figma-btn-prev:focus-visible,
.figma-btn-start:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 4px !important;
}

/* Smooth Transition Overlay */
.facility-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.facility-transition-overlay.active {
  opacity: 1;
  pointer-events: auto;
}



/* ==========================================================================
   PHASE 1: FACILITY HUD & MECHANICAL MISSION ARCHITECTURE
   ========================================================================== */

/* Top bar additions */
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fps-dept-chip {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #014baa;
  padding: 4px 10px;
  letter-spacing: 1.2px;
  border-radius: 2px;
}

/* Mechanical Department Mission HUD (Left Side of Screen) */
.fps-mission-hud {
  position: absolute;
  left: 24px;
  top: 68px;
  width: 350px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: none;
  background: rgba(14, 16, 22, 0.92);
  border: 1px solid rgba(1, 75, 170, 0.45);
  border-left: 4px solid #014baa;
  border-radius: 3px;
  padding: 16px;
  color: #ffffff;
  pointer-events: auto;
  z-index: 25;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.fps-mission-hud::-webkit-scrollbar {
  display: none;
}

.hud-dept-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.hud-dept-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.hud-dept-icon {
  color: #014baa;
  font-size: 16px;
}

.hud-dept-tag {
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.hud-dept-sub {
  font-family: var(--font-family-base);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.hud-level-pill {
  display: inline-block;
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 1px;
}

/* Main Task Card */
.hud-task-card.main-task-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  padding: 12px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.hud-task-card.main-task-card.completed {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.task-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.task-type-lbl {
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
}

.task-status-badge {
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 1px;
}

.task-status-badge.pending {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.task-status-badge.completed {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.task-title {
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.4;
  margin: 0 0 6px 0;
}

.task-hint {
  font-family: var(--font-family-base);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  margin: 0;
}

/* Subtasks Section */
.hud-subtasks-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subtasks-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.subtasks-label {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1.2px;
}

.subtasks-budget-chip {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 1px;
}

.hud-subtask-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  padding: 10px;
  transition: all 0.3s ease;
}

.hud-subtask-card.locked {
  opacity: 0.5;
}

.hud-subtask-card.active {
  opacity: 1;
  border-color: rgba(1, 75, 170, 0.6);
  background: rgba(1, 75, 170, 0.08);
}

.hud-subtask-card.done {
  opacity: 1;
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.08);
}

.subtask-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.subtask-id {
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1px;
}

.subtask-status-pill {
  font-family: var(--font-family-base);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.hud-subtask-card.active .subtask-status-pill {
  background: rgba(1, 75, 170, 0.3);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.4);
}

.hud-subtask-card.done .subtask-status-pill {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.subtask-name {
  font-family: var(--font-family-base);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

.subtask-meta {
  font-family: var(--font-family-base);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Facility Controller Voiceover & Comms Overlay */
.facility-comms-overlay {
  display: none !important;
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 760px);
  z-index: 30;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.facility-comms-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.comms-panel {
  pointer-events: auto;
  background: rgba(12, 14, 20, 0.95);
  border: 1px solid #014baa;
  border-top: 3px solid #014baa;
  border-radius: 3px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  padding: 16px 22px;
  color: #ffffff;
}

.comms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.comms-signal {
  display: flex;
  align-items: center;
  gap: 8px;
}

.signal-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.comms-ch {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
}

.comms-freq {
  font-family: var(--font-family-base);
  font-size: 10px;
  color: #38bdf8;
  letter-spacing: 1px;
}

.comms-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.comms-icon-wrap {
  width: 44px;
  height: 44px;
  background: rgba(1, 75, 170, 0.15);
  border: 1px solid rgba(1, 75, 170, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comms-mic-icon {
  width: 22px;
  height: 22px;
  color: #38bdf8;
}

.comms-text-block {
  flex: 1;
}

.comms-sender {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.comms-dialogue {
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.5;
  letter-spacing: 0.5px;
  min-height: 44px;
}

.comms-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.comms-progress {
  font-family: var(--font-family-base);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 1.2px;
}

.comms-actions {
  display: flex;
  gap: 10px;
}

.comms-action-btn {
  background: #014baa;
  color: #ffffff;
  border: 1px solid #014baa;
  font-family: var(--font-family-base);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 1.2px;
  transition: opacity 0.2s ease;
}

.comms-action-btn:hover {
  opacity: 0.85;
}

.comms-action-btn.comms-skip {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

/* Modals Backdrop & Base Windows (Black & White Outline Popup Theme) */
.facility-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(1, 0, 6, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.25s ease;
}

.facility-modal-backdrop.hidden {
  display: none !important;
}

.facility-modal-window {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  background: #010006;
  border: 1.5px solid #d9d9d9;
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 255, 255, 0.08);
  color: #f8f3f0;
  display: flex;
  flex-direction: column;
  animation: modalScaleFadeIn 0.25s ease-out;
}

.facility-modal-window.modal-wide {
  max-width: 880px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #ffffff;
  background: #010006;
}

.modal-badge-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.modal-dot {
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 0;
}

.modal-dot.market-dot,
.modal-dot.doc-dot,
.modal-dot.workbench-dot {
  background: #ffffff;
}

.modal-close-btn {
  background: #010006;
  border: 1px solid #ffffff;
  color: #ffffff;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-base);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-content {
  padding: 24px;
  overflow-y: auto;
  background: #010006;
}

/* Modal 1: Session Sheet Form (Black & White Outline) */
.session-status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #010006;
  border: 1px solid #ffffff;
  padding: 14px 18px;
  border-radius: 0;
  margin-bottom: 20px;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #ffffff;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: #ffffff;
}

.status-indicator-dot.not-checked {
  background: rgba(255, 255, 255, 0.4);
}

.status-indicator-dot.checked {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.session-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.session-form-grid .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.session-form-grid label {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}

.sheet-input-readonly {
  background: #010006;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: rgba(255, 255, 255, 0.9);
  padding: 11px 16px;
  font-family: var(--font-family-base);
  font-size: 13px;
  border-radius: 0;
  outline: none;
}

.sheet-input-editable {
  background: #010006;
  border: 1px solid #ffffff;
  color: #ffffff;
  padding: 11px 16px;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
  border-radius: 0;
  outline: none;
  transition: all 0.2s;
}

.sheet-input-editable:focus {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.session-log-card {
  background: #010006;
  border: 1px solid #ffffff;
  border-radius: 0;
  padding: 16px 18px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-family-base);
  font-size: 12px;
}

.session-log-card .log-title {
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 6px;
}

.session-log-card .log-row {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.85);
}

.session-actions-row {
  display: flex;
  gap: 14px;
}

.session-btn {
  flex: 1;
  padding: 13px 20px;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #ffffff;
}

.session-btn.btn-checkin {
  background: rgba(209, 208, 221, 0.25);
  color: #ffffff;
}

.session-btn.btn-checkin:hover {
  background: rgba(209, 208, 221, 0.45);
}

.session-btn.btn-checkout {
  background: #010006;
  color: #ffffff;
}

.session-btn.btn-checkout:not(.disabled):hover {
  background: rgba(255, 255, 255, 0.18);
}

.session-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Modal 2: Marketplace (Black & White Outline) */
.market-top-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #010006;
  border: 1px solid #ffffff;
  padding: 16px 20px;
  border-radius: 0;
  margin-bottom: 22px;
}

.market-budget-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.budget-label {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1.2px;
}

.budget-value {
  font-family: var(--font-family-base);
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
}

.market-info-note {
  max-width: 440px;
  font-family: var(--font-family-base);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.45;
}

.market-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.market-item-card {
  background: #010006;
  border: 1px solid #ffffff;
  border-radius: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.market-item-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.item-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.item-category-tag {
  font-family: var(--font-family-base);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 0;
  letter-spacing: 1px;
  background: #010006;
  border: 1px solid #ffffff;
  color: #ffffff;
}

.item-category-tag.tool,
.item-category-tag.part {
  background: #010006;
  border: 1px solid #ffffff;
  color: #ffffff;
}

.item-price {
  font-family: var(--font-family-base);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.item-name {
  font-family: var(--font-family-base);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.35;
}

.item-desc {
  font-family: var(--font-family-base);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.45;
  margin: 0 0 14px 0;
  flex: 1;
}

.btn-buy-item {
  width: 100%;
  padding: 11px;
  background: rgba(209, 208, 221, 0.25);
  border: 1px solid #ffffff;
  color: #ffffff;
  font-family: var(--font-family-base);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-buy-item:hover {
  background: rgba(209, 208, 221, 0.45);
}

.btn-buy-item.owned {
  background: #010006;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  cursor: default;
}

/* =========================================================================
   MODAL 3: ASSEMBLY & RESEARCH PAPERS (Figma Node 414:44)
   Light Parchment #fefae0 Paper with NASA Blue #014baa Spine
   ========================================================================= */
.facility-modal-window.modal-research-paper-figma {
  max-width: 1120px;
  width: 92vw;
  max-height: 90vh;
  background: #fefae0;
  border: 2px solid rgba(209, 208, 221, 0.45);
  border-radius: 2px;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.85);
  padding: 0 !important;
  position: relative;
}

/* Left Spine / Binding: NASA Blue #014baa */
.paper-left-spine {
  width: 52px;
  background: #014baa;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.spine-text {
  transform: rotate(-90deg);
  white-space: nowrap;
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: #ffffff;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Right Document Pane */
.paper-doc-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 36px 30px 36px;
  position: relative;
  overflow: hidden;
  background: #fefae0;
  color: #010006;
}

.paper-close-btn {
  position: absolute;
  top: 18px;
  right: 22px;
  background: transparent;
  border: 1px solid rgba(1, 0, 6, 0.25);
  color: #010006;
  font-size: 20px;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
  z-index: 10;
}

.paper-close-btn:hover {
  background: #010006;
  color: #fefae0;
  border-color: #010006;
}

/* Top Horizontal Navigation Tabs (Figma 414:32 - 414:37) */
.paper-top-tabs {
  display: flex;
  gap: 32px;
  align-items: center;
  border-bottom: 2px solid rgba(1, 0, 6, 0.12);
  margin-bottom: 24px;
  padding-bottom: 2px;
  padding-right: 48px;
}

.paper-tab {
  background: transparent;
  border: none;
  padding: 8px 4px 10px 4px;
  font-family: 'Tektur', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #010006;
  opacity: 0.65;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.paper-tab:hover {
  opacity: 0.95;
}

.paper-tab.active {
  opacity: 1;
  font-weight: 700;
  color: #010006;
}

.paper-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #010006;
}

/* Document Pages Scrollable Area */
.paper-pages-wrapper {
  flex: 1;
  overflow-y: auto;
  padding-right: 12px;
}

.paper-pages-wrapper::-webkit-scrollbar {
  width: 6px;
}
.paper-pages-wrapper::-webkit-scrollbar-thumb {
  background: rgba(1, 0, 6, 0.25);
  border-radius: 3px;
}

.paper-page {
  display: none;
  animation: paperFadeIn 0.25s ease-out;
}

.paper-page.active {
  display: block;
}

@keyframes paperFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.paper-doc-heading {
  font-family: 'Tektur', monospace;
  font-size: 28px;
  font-weight: 700;
  color: #010006;
  line-height: 1.25;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.paper-meta-badge {
  font-family: 'Tektur', monospace;
  font-size: 14px;
  font-weight: 600;
  color: rgba(1, 0, 6, 0.72);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(1, 0, 6, 0.18);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.paper-p {
  font-family: 'Tektur', monospace;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(1, 0, 6, 0.88);
  margin-bottom: 14px;
}

.paper-strong {
  font-weight: 700;
  color: #010006;
}

/* Overview scope cards */
.paper-scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.paper-scope-card {
  background: #ffffff;
  border: 1px solid rgba(1, 0, 6, 0.2);
  border-left: 4px solid #014baa;
  padding: 14px 16px;
  border-radius: 2px;
}

.scope-card-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 6px;
}

.scope-tag {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #014baa;
  letter-spacing: 1px;
}

.scope-title {
  font-family: 'Tektur', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #010006;
}

.scope-desc {
  font-family: 'Tektur', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(1, 0, 6, 0.78);
  margin: 0;
}

/* Procedure boxes on paper */
.paper-proc-box {
  background: #ffffff;
  border: 1px solid rgba(1, 0, 6, 0.2);
  border-left: 4px solid #014baa;
  padding: 18px 20px;
  margin-top: 16px;
  border-radius: 2px;
}

.paper-proc-title {
  font-family: 'Tektur', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #014baa;
  letter-spacing: 1px;
  margin: 0 0 12px 0;
  border-bottom: 1px solid rgba(1, 0, 6, 0.12);
  padding-bottom: 6px;
}

.paper-step-list {
  margin: 0;
  padding-left: 20px;
  font-family: 'Tektur', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(1, 0, 6, 0.88);
}

/* Instrument guide tool grid on paper */
.paper-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.paper-tool-card {
  background: #ffffff;
  border: 1px solid rgba(1, 0, 6, 0.2);
  padding: 14px 16px;
  border-radius: 2px;
}

.paper-tool-name {
  font-family: 'Tektur', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #010006;
  margin-bottom: 4px;
}

.paper-tool-spec {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #014baa;
  margin-bottom: 8px;
}

.paper-tool-p {
  font-family: 'Tektur', monospace;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(1, 0, 6, 0.78);
  margin: 0;
}

/* =========================================================================
   MODAL 4: MECHANICAL WORKBENCH STATION (Figma Node 414:69)
   Dark NASA #010006, 2px solid #d1d0dd border, Lower Error Column & Tool Glow
   ========================================================================= */
.facility-modal-window.modal-workbench-figma {
  max-width: 1440px;
  width: 96vw;
  height: 94vh;
  max-height: 94vh;
  background: #010006;
  border: 2px solid #d1d0dd;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
  padding: 0 !important;
  position: relative;
}

/* TOP HEADER BAR (Figma 414:50, 414:103, 414:105, 414:135, 414:144) */
.wb-figma-top-bar {
  height: 72px;
  min-height: 72px;
  background: #010006;
  border-bottom: 2px solid #d1d0dd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: relative;
  z-index: 20;
}

.wb-figma-top-left {
  font-family: 'Tektur', monospace;
  font-size: 18px;
  font-weight: 500;
  color: #ffffff;
  opacity: 0.75;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.wb-figma-top-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Tektur', monospace;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.wb-figma-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wb-figma-btn {
  background: #010006;
  border: 1px solid #d1d0dd;
  color: #ffffff;
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.wb-figma-btn:hover {
  background: #ffffff;
  color: #010006;
}

.wb-figma-close-btn {
  background: transparent;
  border: 1px solid #d1d0dd;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.wb-figma-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

/* SUB-HEADER TABS (Figma 414:107, 414:109, 414:111, 414:113) */
.wb-figma-sub-tabs {
  height: 52px;
  min-height: 52px;
  background: #010006;
  border-bottom: 2px solid #d1d0dd;
  display: flex;
  position: relative;
  z-index: 15;
}

.wb-figma-sub-tab {
  flex: 1;
  background: #010006;
  border: none;
  border-right: 2px solid #d1d0dd;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Tektur', monospace;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wb-figma-sub-tab:last-child {
  border-right: none;
}

.wb-figma-sub-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.wb-figma-sub-tab.active {
  background: rgba(209, 208, 221, 0.12);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 -3px 0 #38bdf8;
}

/* 3D VIEWPORT CONTAINER WRAPPER */
.wb-figma-viewport-wrapper {
  flex: 1;
  position: relative;
  background: #000000;
  overflow: hidden;
  display: flex;
}

.wb-subtask-view {
  width: 100%;
  height: 100%;
}

.wb-subtask-view.hidden {
  display: none !important;
}

.wb-figma-viewport-wrapper .wb3d-viewport-container {
  width: 100%;
  height: 100%;
  border-bottom: none;
}

/* STEP TASK CARD (Top-Left of 3D Canvas, Figma 414:159) */
.wb-figma-step-card {
  position: absolute;
  top: 24px;
  left: 28px;
  background: rgba(1, 0, 6, 0.88);
  border: 1px solid rgba(209, 208, 221, 0.45);
  border-left: 3px solid #38bdf8;
  padding: 14px 18px;
  max-width: 480px;
  z-index: 10;
  pointer-events: auto;
  font-family: 'Tektur', monospace;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85);
}

.wb-figma-step-card .step-title-line {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.wb-figma-step-card .step-instruction-line {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.wb-figma-step-card .step-count-badge {
  color: #38bdf8;
  font-size: 15px;
  font-weight: 700;
}

/* RIGHT-SIDE TOOLS SHELF (Figma 414:161) */
.wb-figma-tool-shelf {
  position: absolute;
  right: 28px;
  bottom: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  z-index: 10;
  pointer-events: auto;
}

.wb-figma-tool-card {
  background: rgba(1, 0, 6, 0.92);
  border: 2px solid #d1d0dd;
  border-radius: 2px;
  width: 96px;
  height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px 6px 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  user-select: none;
}

.wb-figma-tool-card:hover {
  border-color: #ffffff;
  transform: translateY(-2px);
}

.wb-figma-tool-card .tool-img-box {
  width: 62px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.wb-figma-tool-card .tool-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
}

.wb-figma-tool-card .tool-key-tag {
  font-family: 'Tektur', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1px 10px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}

/* Tool State: Locked / Not Purchased */
.wb-figma-tool-card.locked {
  opacity: 0.45;
  filter: grayscale(0.8);
  border-style: dashed;
}

.wb-figma-tool-card.locked .tool-key-tag {
  background: #ef4444;
  border-color: #ef4444;
  font-size: 10px;
  padding: 1px 4px;
}

/* Tool State: Task Requirement Glow (Per user specification: "if selected by task then glow of outline on tool") */
.wb-figma-tool-card.task-selected-glow {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.85), inset 0 0 12px rgba(1, 75, 170, 0.6) !important;
  animation: toolPulseGlow 1.4s ease-in-out infinite alternate;
}

.wb-figma-tool-card.task-selected-glow::before {
  content: '';
  position: absolute;
  inset: -6px;
  background: rgba(1, 75, 170, 0.35);
  filter: blur(14px);
  z-index: -1;
  border-radius: 4px;
}

@keyframes toolPulseGlow {
  0% {
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5), inset 0 0 6px rgba(1, 75, 170, 0.4);
    border-color: #38bdf8;
  }
  100% {
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.95), inset 0 0 16px rgba(1, 75, 170, 0.8);
    border-color: #ffffff;
  }
}

/* Tool State: Currently Equipped by player */
.wb-figma-tool-card.equipped {
  border-color: #10b981 !important;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.7), inset 0 0 10px rgba(16, 185, 129, 0.3) !important;
}

.wb-figma-tool-card.equipped .tool-key-tag {
  background: #10b981;
  color: #010006;
  border-color: #10b981;
}

/* LOWER FOOTER COLUMNS (Figma 414:122, 414:124, 414:126, 414:129, 414:131, 414:133) */
.wb-figma-lower-footer {
  height: 60px;
  min-height: 60px;
  background: #010006;
  border-top: 2px solid #d1d0dd;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 20;
}

.wb-figma-footer-left {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Box 1: Mode Switcher */
.wb-figma-mode-box {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-right: 2px solid #d1d0dd;
  background: #010006;
}

.wb-arrow-btn {
  background: transparent;
  border: 1px solid #d1d0dd;
  color: #ffffff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.wb-arrow-btn:hover {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #010006;
}

.wb-mode-text {
  font-family: 'Tektur', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #fba505;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.wb-mode-text.mode-fwd {
  color: #10b981;
}

/* Box 2: Torque Limit Readout */
.wb-figma-torque-box {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  border-right: 2px solid #d1d0dd;
  background: #010006;
  white-space: nowrap;
}

.wb-torque-label {
  font-family: 'Tektur', monospace;
  font-size: 16px;
  font-weight: 500;
  color: #fba505;
}

.wb-torque-val {
  font-family: 'Tektur', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #19fb05;
  letter-spacing: 0.5px;
}

/* Lower Right/Center: ERROR & CALM STATUS COLUMN */
.wb-figma-error-column {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  background: #010006;
  overflow: hidden;
}

.wb-error-icon {
  font-size: 14px;
  color: #38bdf8;
}

.wb-error-message {
  font-family: 'Tektur', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #fba505;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: color 0.2s ease;
}

/* Error States in Lower Column */
.wb-figma-error-column.error .wb-error-icon {
  color: #ef4444;
}
.wb-figma-error-column.error .wb-error-message {
  color: #ef4444;
  font-weight: 700;
}
.wb-figma-error-column.shake {
  animation: wbLowerErrorShake 0.4s ease-in-out;
}

@keyframes wbLowerErrorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.wb-figma-error-column.success .wb-error-icon {
  color: #19fb05;
}
.wb-figma-error-column.success .wb-error-message {
  color: #19fb05;
}

/* 3D Workbench Task Progress Panel */
.wb3d-task-panel {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(1, 0, 6, 0.94);
  border: 1px solid #ffffff;
  padding: 12px 16px;
  max-width: 440px;
  z-index: 10;
  color: #ffffff;
  font-family: var(--font-family-base);
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
}

.task-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.task-code {
  color: #38bdf8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.task-title {
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.task-steps-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.task-step-pill {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  letter-spacing: 0.5px;
}

.task-step-pill.active {
  border-color: #ffffff;
  color: #ffffff;
  background: rgba(209, 208, 221, 0.25);
}

.task-step-pill.done {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}

.task-instructions {
  font-size: 12px;
  line-height: 1.6;
  color: #e2e8f0;
}

.task-warning {
  color: #ef4444;
  font-weight: 700;
  display: block;
  margin-top: 4px;
}

/* 3D Workbench Alert Notification */
.wb3d-alert-pill {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #ffffff;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 24px;
  z-index: 25;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
  pointer-events: none;
}

.wb3d-alert-pill.shake-anim {
  animation: wbShake 0.4s ease-in-out;
}

@keyframes wbShake {
  0%, 100% { transform: translateX(-50%); }
  20%, 60% { transform: translateX(calc(-50% - 8px)); }
  40%, 80% { transform: translateX(calc(-50% + 8px)); }
}

/* 3D Workbench PGT Mini-HUD */
.wb3d-pgt-hud {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(1, 0, 6, 0.94);
  border: 1px solid #ffffff;
  padding: 12px 14px;
  width: 300px;
  z-index: 10;
  color: #ffffff;
  font-family: var(--font-family-base);
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
}

.pgt-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pgt-status-badge {
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.6);
}

.pgt-status-badge.active {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}

.pgt-hud-screen {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pgt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.pgt-lbl {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 700;
}

.pgt-mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pgt-arrow-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  cursor: pointer;
  padding: 1px 7px;
  font-size: 11px;
}

.pgt-arrow-btn:hover {
  background: #ffffff;
  color: #010006;
}

.pgt-val.mode-rev {
  color: #f59e0b;
  font-weight: 700;
  font-size: 11px;
}

.pgt-val.mode-fwd {
  color: #38bdf8;
  font-weight: 700;
  font-size: 11px;
}

.pgt-val.highlight {
  color: #10b981;
  font-weight: 700;
  font-size: 12px;
}

.wb3d-btn {
  width: 100%;
  background: #010006;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 0;
  padding: 7px 12px;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wb3d-btn:hover, .wb3d-btn.active {
  background: rgba(209, 208, 221, 0.25);
}

.hidden {
  display: none !important;
}

.wb3d-circular-gauge-wrap.hidden {
  display: none !important;
}

.wb3d-alert-pill.hidden {
  display: none !important;
}

/* 3D Workbench Circular Timing Gauge */
.wb3d-circular-gauge-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(1, 0, 6, 0.96);
  border: 1px solid #ffffff;
  padding: 20px 24px;
  z-index: 30;
  text-align: center;
  color: #ffffff;
  font-family: var(--font-family-base);
  pointer-events: auto;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.95);
}

.gauge-torque-btn {
  margin-top: 14px;
  width: 100%;
  height: 38px;
  background: #0284c7;
  border: 1px solid #38bdf8;
  color: #ffffff;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  user-select: none;
  display: block;
}
.gauge-torque-btn:hover {
  background: #0369a1;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}
.gauge-torque-btn:active {
  background: #10b981;
  border-color: #34d399;
}

.gauge-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.gauge-svg {
  width: 150px;
  height: 150px;
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 12;
}

.gauge-target-zone {
  fill: none;
  stroke: rgba(16, 185, 129, 0.55);
  stroke-width: 14;
  /* Green zone arc between 26.5 - 33.5 N-m on a 45 N-m circle */
  stroke-dasharray: 64 344.4;
  stroke-dashoffset: -240;
}

.gauge-fill {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 12;
  stroke-dasharray: 408.4;
  stroke-dashoffset: 408.4;
  stroke-linecap: round;
  transition: stroke 0.1s ease;
}

.gauge-readout {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.gauge-num {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
}

.gauge-unit {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

.gauge-hint {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  margin-top: 6px;
}

/* 3D Workbench Tool Bar */
.wb3d-bottom-tools {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: flex;
  gap: 10px;
  z-index: 10;
  pointer-events: auto;
}

.wb3d-tool-chip {
  background: #010006;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 0;
  padding: 7px 14px;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wb3d-tool-chip:hover {
  background: rgba(209, 208, 221, 0.25);
}

.wb3d-tool-chip.active {
  background: rgba(209, 208, 221, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
}

.tool-key {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid #ffffff;
  padding: 1px 6px;
  font-size: 10px;
  color: #ffffff;
}

/* Workbench Subtask Footer */
.wb-subtask-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #010006;
  font-family: var(--font-family-base);
  font-size: 11px;
}

.wb-footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  background: #38bdf8;
  border-radius: 0;
}

.wb-req-tags {
  display: flex;
  gap: 10px;
}

.req-tag {
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 3px 10px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.req-tag.ready {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.wb-station-full {
  margin: 18px;
}

.workbench-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.wb-station-card {
  background: #010006;
  border: 1px solid #ffffff;
  border-radius: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.wb-station-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ffffff;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.wb-station-code {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.wb-station-title {
  font-family: var(--font-family-base);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.wb-part-preview {
  background: #010006;
  border: 1px solid #ffffff;
  border-radius: 0;
  padding: 14px;
  text-align: center;
  margin-bottom: 14px;
}

.preview-label {
  font-family: var(--font-family-base);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.preview-status {
  font-family: var(--font-family-base);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.preview-status.ready {
  color: #ffffff;
  border: 1px solid #ffffff;
  display: inline-block;
  padding: 2px 10px;
}

.preview-status.done {
  background: rgba(209, 208, 221, 0.25);
  border: 1px solid #ffffff;
  color: #ffffff;
  display: inline-block;
  padding: 2px 10px;
}

.wb-requirements-list {
  background: #010006;
  border: 1px solid #ffffff;
  padding: 12px;
  border-radius: 0;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.req-item {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-family-base);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
}

.req-val.ok {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
}

.req-val.missing {
  color: rgba(255, 255, 255, 0.4);
}

.wb-interactive-area {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.torque-dial-wrap, .latch-status-wrap {
  background: #010006;
  padding: 12px;
  border-radius: 0;
  border: 1px solid #ffffff;
}

.torque-dial-wrap label, .latch-status-wrap label {
  display: block;
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.torque-readout {
  text-align: right;
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 6px;
}

.latch-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-family-base);
  font-size: 11px;
}

.wb-small-btn {
  background: #010006;
  color: #ffffff;
  border: 1px solid #ffffff;
  padding: 7px 14px;
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 700;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s;
}

.wb-small-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.wb-small-btn:disabled {
  opacity: 0.35;
  border-color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
}

.wb-action-btn {
  width: 100%;
  padding: 13px;
  font-family: var(--font-family-base);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(209, 208, 221, 0.25);
  border: 1px solid #ffffff;
  color: #ffffff;
}

.wb-action-btn:not(:disabled):hover {
  background: rgba(209, 208, 221, 0.45);
}

.wb-action-btn:disabled {
  background: #010006;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
}

.wb-action-btn.assembled {
  background: rgba(209, 208, 221, 0.35);
  border: 1px solid #ffffff;
  color: #ffffff;
  cursor: default;
}


/* Subtle Toast Notification (Coffee NIO & General) */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  background: rgba(14, 16, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 3px solid #fbbf24;
  border-radius: 3px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-family: var(--font-family-base);
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.toast-notification.hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.toast-icon {
  font-size: 16px;
}

/* =========================================================================
   PHASE 1 HUD: SCI-FI ACCENTS, CHECKLIST, CONTROLS & PLAYER'S FRAME
   ========================================================================= */

/* Top Sci-Fi Frame Accent */
.fps-frame-top-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  display: flex;
  pointer-events: none;
  z-index: 15;
}
.accent-bar-left {
  flex: 1;
  background: #00a2ff;
  height: 8px;
}
.accent-tab-cut {
  width: 38px;
  height: 12px;
  background: #00a2ff;
  clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
}
.accent-bar-right {
  width: 28%;
  height: 4px;
  background: rgba(0, 162, 255, 0.45);
}

/* Top Bar Budget & Controls */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  margin-left: auto;
}
.hud-budget-box {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-family-base);
  font-weight: 700;
  font-size: 24px;
  color: #111113;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  letter-spacing: 0.5px;
}
.hud-budget-currency {
  color: #111113;
  font-size: 24px;
  font-weight: 700;
}
.hud-cog-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #111113;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.hud-cog-btn:hover {
  transform: rotate(45deg);
}
.hud-cog-btn svg {
  width: 22px;
  height: 22px;
}

/* Facility HUD Restart & Quit Actions */
.hud-action-pill-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 17, 19, 0.35);
  color: #111113;
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  backdrop-filter: blur(4px);
  user-select: none;
}
.hud-action-pill-btn .hud-btn-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.hud-action-pill-btn.restart:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.hud-action-pill-btn.quit:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

/* Settings Screen Mission Actions */
.settings-mission-group {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}
.settings-mission-actions-row {
  display: flex;
  gap: 12px;
  width: 100%;
}
.settings-mission-btn {
  flex: 1;
  height: 48px;
  background: rgba(1, 0, 6, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.settings-mission-btn .btn-inline-icon {
  width: 16px;
  height: 16px;
}
.settings-mission-btn.restart-mission-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fca5a5;
}
.settings-mission-btn.quit-mission-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Controls list (Top Left - Matching Screenshot) */
.hud-controls-card {
  position: absolute;
  top: 68px;
  left: 24px;
  pointer-events: none;
  font-family: var(--font-family-base);
  color: rgba(20, 24, 32, 0.88);
  font-size: 13px;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
  z-index: 20;
}
.hud-controls-title {
  font-size: 15px;
  font-weight: 700;
  color: #111113;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.hud-ctrl-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctrl-bracket {
  color: #4b5563;
  font-weight: 600;
  min-width: 140px;
}

/* Mission Summary (Top Right - Matching Screenshot) */
.hud-mission-panel {
  position: absolute;
  top: 68px;
  right: 28px;
  max-width: 380px;
  pointer-events: none;
  text-align: right;
  font-family: var(--font-family-base);
  z-index: 20;
}
.hud-main-task-text {
  font-size: 16px;
  font-weight: 700;
  color: #111113;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}
.hud-sub-task-text {
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 12px;
}
.hud-checklist {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.hud-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #374151;
  font-weight: 500;
}
.check-icon {
  font-size: 14px;
  font-weight: bold;
}
.hud-check-item.done {
  color: #059669;
  font-weight: 600;
}
.hud-check-item.done .check-icon {
  color: #059669;
}

/* =========================================================================
   THE PLAYER'S FRAME: INSTRUMENTS (BOTTOM RIGHT - MATCHING USER SCREENSHOT)
   ========================================================================= */
.player-instruments-frame {
  position: absolute;
  right: 28px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
  z-index: 30;
}

.player-frame-dept-pills {
  display: flex;
  gap: 8px;
  align-items: center;
}

.frame-dept-pill {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(8px);
}

.frame-dept-pill:hover {
  border-color: #38bdf8;
  color: #e2e8f0;
}

.frame-dept-pill.active {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.player-frame-slots {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.frame-slot-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  user-select: none;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 6px;
  padding: 8px 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.frame-slot-item:hover {
  transform: translateY(-2px);
  border-color: #38bdf8 !important;
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.3) !important;
}

.frame-slot-item.selected {
  border-color: #f59e0b !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.6) !important;
}

.slot-tool-img {
  width: 54px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)) !important;
}

.slot-key-label {
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 4px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.frame-empty-notice {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.85);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 6px;
  padding: 8px 14px;
  backdrop-filter: blur(8px);
}

/* Market Equip & Drop buttons */
.btn-equip-item {
  background: #059669 !important;
  color: #ffffff !important;
  border: 1px solid #059669 !important;
  cursor: pointer;
  font-weight: 700 !important;
}
.btn-equip-item:hover {
  background: #047857 !important;
  transform: translateY(-1px);
}

.market-equipped-group {
  display: flex;
  gap: 8px;
  align-items: center;
}
.market-equipped-tag {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  padding: 6px 12px;
  letter-spacing: 1px;
}
.btn-drop-market {
  background: #ef4444;
  color: #ffffff;
  border: 1px solid #dc2626;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s;
}
.btn-drop-market:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* =========================================================================
   CENTER CALM POINTER ERROR & PROTOCOL NOTIFICATION
   ========================================================================= */
.hud-center-calm-alert {
  position: absolute;
  top: 57%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 55;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-center-calm-alert.hidden {
  opacity: 0;
  transform: translate(-50%, -40%);
  pointer-events: none;
  display: none !important;
}

.calm-alert-box {
  background: rgba(1, 0, 6, 0.96);
  border: 1px solid #ffffff;
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.95), 0 0 10px rgba(255, 255, 255, 0.15);
  max-width: 460px;
  text-align: center;
}

.calm-alert-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calm-alert-icon {
  font-size: 15px;
}

.calm-alert-title {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #38bdf8;
  text-transform: uppercase;
}

.calm-alert-msg {
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.45;
  letter-spacing: 0.5px;
}

/* =========================================================================
   MISSION ACCOMPLISHED DEBRIEF CERTIFICATION MODAL
   ========================================================================= */
.debrief-modal-window {
  max-width: 720px !important;
}

.debrief-content {
  padding: 28px 32px !important;
}

.debrief-banner {
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 20px;
  margin-bottom: 22px;
}

.debrief-crest {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fbbf24;
  margin-bottom: 6px;
}

.debrief-title {
  font-family: var(--font-family-base);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #ffffff;
  margin: 0 0 6px 0;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

.debrief-subtitle {
  font-family: var(--font-family-base);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  letter-spacing: 1px;
}

.debrief-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.debrief-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.debrief-stat-lbl {
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1.5px;
}

.debrief-stat-val {
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.debrief-stat-val.highlight {
  color: #38bdf8;
}

.debrief-stat-val.status-green {
  color: #10b981;
}

.debrief-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
}

.debrief-task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 12px 16px;
}

.debrief-task-check {
  font-size: 16px;
  font-weight: 800;
  color: #10b981;
}

.debrief-task-desc {
  font-family: var(--font-family-base);
  font-size: 12px;
  line-height: 1.45;
  color: #e2e8f0;
}

.debrief-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 18px;
}

/* Tab locked styling */
.wb3d-tab-btn.locked {
  opacity: 0.38 !important;
  cursor: not-allowed !important;
}

.wb3d-tab-btn.locked:hover {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Tool Requisition Warning Banner inside 3D Viewport */
.wb3d-requisition-banner {
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  transform: none;
  background: rgba(1, 0, 6, 0.95);
  border: 1px solid #f59e0b;
  padding: 10px 18px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  pointer-events: auto;
  font-family: var(--font-family-base);
  max-width: 440px;
}

.wb3d-requisition-banner.hidden {
  display: none !important;
}

.wb3d-req-icon {
  font-size: 18px;
}

.wb3d-req-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.wb3d-req-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #f59e0b;
}

.wb3d-req-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.5px;
}

/* =========================================================================
   PHASE 1-3: ELECTRONIC DEPARTMENT & DESK NO. 02 STYLES
   ========================================================================= */

/* Department Switcher in HUD Mission Panel */
.hud-dept-switch-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.hud-dept-pill {
  flex: 1;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.hud-dept-pill:hover {
  background: rgba(0, 240, 255, 0.15);
  color: #ffffff;
  border-color: #00f0ff;
}

.hud-dept-pill.active {
  background: #00f0ff;
  color: #07090e;
  border-color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

/* Objective Screen Department Selector Chips */
.obj-dept-selector {
  display: flex;
  gap: 8px;
}

.obj-dept-chip {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.obj-dept-chip:hover {
  border-color: #00f0ff;
  color: #ffffff;
}

.obj-dept-chip.active {
  background: #00f0ff;
  color: #07090e;
  border-color: #00f0ff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.obj-desc-block.hidden {
  display: none !important;
}

/* Telemetry Diagnostic Card on Desk 02 Session Sheet */
.session-diag-card {
  margin-top: 14px;
  padding: 14px;
  background: rgba(8, 13, 24, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diag-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.diag-icon {
  font-size: 16px;
  color: #00f0ff;
}

.diag-title {
  font-family: var(--font-family-base);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #00f0ff;
}

.diag-progress-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diag-prog-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-family-base);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.diag-val {
  font-weight: 700;
  color: #fbbf24;
}

.diag-val.passed {
  color: #10b981;
}

.diag-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.diag-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #00f0ff);
  transition: width 0.4s ease;
}

.diag-run-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #00f0ff;
  font-family: var(--font-family-base);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.diag-run-btn:hover:not(.disabled) {
  background: #00f0ff;
  color: #07090e;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.5);
}

.diag-run-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(1);
}

.diag-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Electronics Workbench In-Canvas DOM Overlays */
.wb-elec-dom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.wb-elec-ticket-banner {
  position: absolute;
  top: 14px;
  left: 18px;
  background: rgba(7, 12, 22, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.4);
  padding: 10px 16px;
  max-width: 480px;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.15);
  pointer-events: auto;
}

.wb-elec-ticket-banner .ticket-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.wb-elec-ticket-banner .ticket-badge {
  background: #00f0ff;
  color: #07090e;
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  letter-spacing: 1px;
}

.wb-elec-ticket-banner .ticket-title {
  font-family: var(--font-family-base);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.2px;
}

.wb-elec-ticket-banner .ticket-instructions {
  font-family: var(--font-family-base);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

.wb-elec-esd-pill {
  position: absolute;
  top: 14px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  border-radius: 4px;
  pointer-events: auto;
  transition: all 0.25s ease;
}

.wb-elec-esd-pill.ungrounded {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #ef4444;
}

.wb-elec-esd-pill.ungrounded .esd-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulseDot 1s infinite;
}

.wb-elec-esd-pill.grounded {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.wb-elec-esd-pill.grounded .esd-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.wb-elec-controls-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 15, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  font-family: var(--font-family-base);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 1px;
  white-space: nowrap;
}

/* =========================================================================
   OPTION A: HUD SCIENCE CAMERA CARD & FULLSCREEN OPTICAL TELEMETRY MODAL
   ========================================================================= */

/* --- HUD Science Camera Card (Bottom Left of Facility Screen) --- */
.hud-science-cam-card {
  position: absolute;
  bottom: 24px;
  left: 24px;
  width: 270px;
  background: rgba(10, 16, 26, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), inset 0 0 16px rgba(56, 189, 248, 0.08);
  backdrop-filter: blur(10px);
  padding: 10px 12px;
  z-index: 25;
  pointer-events: auto;
  font-family: var(--font-family-base);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  user-select: none;
}

.science-cam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.science-cam-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.science-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 1.4s infinite;
}

.science-pulse-dot.nominal {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.science-pulse-dot.warning {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.science-cam-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #38bdf8;
}

.science-target-code {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.science-cam-preview-frame {
  position: relative;
  width: 100%;
  height: 125px;
  background: #020408;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.science-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3.5px) contrast(1.15) brightness(0.9);
  transition: filter 0.5s ease;
}

.science-cam-scanline-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.3) 0px,
    rgba(0, 0, 0, 0.3) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  opacity: 0.6;
}

.science-cam-hud-reticle {
  position: absolute;
  inset: 8px;
  pointer-events: none;
}

.science-cam-hud-reticle .reticle-corner {
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: rgba(56, 189, 248, 0.7);
}

.science-cam-hud-reticle .reticle-corner.tl {
  top: 0;
  left: 0;
  border-top: 1.5px solid;
  border-left: 1.5px solid;
}

.science-cam-hud-reticle .reticle-corner.tr {
  top: 0;
  right: 0;
  border-top: 1.5px solid;
  border-right: 1.5px solid;
}

.science-cam-hud-reticle .reticle-corner.bl {
  bottom: 0;
  left: 0;
  border-bottom: 1.5px solid;
  border-left: 1.5px solid;
}

.science-cam-hud-reticle .reticle-corner.br {
  bottom: 0;
  right: 0;
  border-bottom: 1.5px solid;
  border-right: 1.5px solid;
}

.science-cam-hud-reticle .reticle-center-cross {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(56, 189, 248, 0.6);
  font-size: 14px;
  font-weight: 300;
  line-height: 1;
}

.science-cam-status-overlay {
  position: absolute;
  bottom: 4px;
  left: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 2px;
  background: rgba(220, 38, 38, 0.8);
  color: #fff;
  text-transform: uppercase;
}

.science-cam-status-overlay.nominal {
  background: rgba(5, 150, 105, 0.85);
}

.science-cam-metrics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 4px 8px;
}

.science-metric-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.science-metric-item .metric-label {
  color: #94a3b8;
  font-size: 10px;
}

.science-metric-item .metric-val {
  font-weight: 700;
  color: #f1f5f9;
}

.science-metric-item .metric-val.highlight {
  color: #38bdf8;
}

.science-cam-inspect-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.1));
  border: 1px solid #38bdf8;
  border-radius: 4px;
  padding: 6px 10px;
  color: #38bdf8;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.science-cam-inspect-btn:hover {
  background: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  color: #fff;
}

.science-btn-svg {
  width: 14px;
  height: 14px;
}


/* --- Fullscreen Modal: Optical Science Camera (WFPC2 / COSTAR) --- */
.modal-science-camera {
  max-width: 1180px;
  width: 95vw;
  height: 88vh;
  max-height: 840px;
  display: flex;
  flex-direction: column;
  background: #090d16;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 32px rgba(56, 189, 248, 0.15);
}

.modal-science-camera .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
}

.science-dot {
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

.science-target-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-family-base);
}

.science-hdr-target {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.5px;
}

.science-hdr-coords {
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 0.3px;
}

.science-modal-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  padding: 18px 20px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

@media (max-width: 960px) {
  .science-modal-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* Left Column: Viewport & Image Display */
.science-viewport-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.science-view-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.science-mode-toggle {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  overflow: hidden;
}

.science-mode-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.science-mode-btn.active {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-weight: 700;
  box-shadow: inset 0 0 8px rgba(56, 189, 248, 0.2);
}

.science-channel-pill {
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 4px;
  padding: 4px 8px;
  letter-spacing: 0.5px;
}

.science-channel-pill.nominal {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.science-viewport-display {
  flex: 1;
  min-height: 380px;
  background: #010306;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
}

.science-img-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.science-telemetry-img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  filter: blur(4.5px) contrast(1.15) brightness(0.85);
  transition: filter 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease;
}

.science-aberration-halo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(200, 230, 255, 0.22) 0%, rgba(100, 180, 255, 0.12) 35%, rgba(0, 50, 150, 0.05) 60%, transparent 80%);
  mix-blend-mode: screen;
  transition: opacity 0.5s ease;
}

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

/* Split Comparison Slider */
.science-compare-slider {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.science-compare-before,
.science-compare-after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  padding: 12px;
}

.science-compare-after {
  clip-path: inset(0 0 0 50%);
  background: rgba(0, 0, 0, 0.01);
}

.compare-tag {
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.compare-tag.before {
  background: rgba(220, 38, 38, 0.85);
  color: #fff;
}

.compare-tag.after {
  margin-left: auto;
  background: rgba(5, 150, 105, 0.85);
  color: #fff;
}

.compare-range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  pointer-events: auto;
  z-index: 10;
}

.compare-divider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 5;
}

.compare-divider-line::before {
  content: '◄ ►';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #0284c7;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
  white-space: nowrap;
}

/* Optical Reticle Overlay */
.science-telemetry-reticle {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.reticle-scale-bar {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-family-base);
  font-size: 10px;
  color: rgba(56, 189, 248, 0.9);
  letter-spacing: 0.5px;
}

.scale-ticks {
  width: 70px;
  height: 4px;
  border-left: 1.5px solid #38bdf8;
  border-right: 1.5px solid #38bdf8;
  border-bottom: 1.5px solid #38bdf8;
}

.reticle-wfpc2-badge {
  align-self: flex-end;
  font-family: var(--font-family-base);
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.8px;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 6px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.science-feed-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: var(--font-family-base);
  font-size: 11px;
  color: #cbd5e1;
}

.science-feed-banner .banner-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  flex-shrink: 0;
  animation: pulseDot 1.2s infinite;
}

.science-feed-banner.nominal .banner-pulse {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Right Column: Telemetry Gauges & Attribution Matrix */
.science-telemetry-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.science-section-title {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
}

.science-gauges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.science-gauge-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gauge-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-family: var(--font-family-base);
}

.gauge-name {
  color: #94a3b8;
  font-weight: 600;
}

.gauge-target {
  color: #64748b;
  font-size: 9px;
}

.gauge-main-val {
  font-family: var(--font-family-base);
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.5px;
}

.gauge-main-val.highlight {
  color: #38bdf8;
}

.gauge-main-val.nominal {
  color: #10b981;
}

.gauge-bar-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin: 2px 0;
}

.gauge-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease, background 0.3s ease;
}

.gauge-bar-fill.warning {
  background: #f59e0b;
}

.gauge-bar-fill.alert {
  background: #ef4444;
}

.gauge-bar-fill.nominal {
  background: #10b981;
}

.gauge-sub-info {
  font-family: var(--font-family-base);
  font-size: 9px;
  color: #94a3b8;
  line-height: 1.3;
}

/* Attribution List */
.science-attribution-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attribution-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px 10px;
  transition: all 0.3s ease;
}

.attribution-row.done {
  background: rgba(6, 78, 59, 0.25);
  border-color: rgba(16, 185, 129, 0.4);
}

.attr-status-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  color: #64748b;
  flex-shrink: 0;
}

.attribution-row.done .attr-status-icon {
  color: #10b981;
}

.attr-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.attr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-family-base);
}

.attr-component {
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
}

.attribution-row.done .attr-component {
  color: #a7f3d0;
}

.attr-weight {
  font-size: 10px;
  font-weight: 600;
  color: #38bdf8;
}

.attr-desc {
  font-family: var(--font-family-base);
  font-size: 10px;
  color: #94a3b8;
}

/* Overall Summary Box */
.science-summary-box {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: auto;
}

.summary-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-family-base);
}

.summary-lbl {
  font-size: 9px;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.summary-val {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
}

.summary-val.highlight {
  color: #38bdf8;
}

.summary-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   MULTIPLAYER HUD BADGE & PRIVATE ROOM CONTROLS
   ========================================================================== */
.hud-multiplayer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 15, 26, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.6);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 600;
  color: #00f0ff;
  letter-spacing: 1.2px;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
  margin-right: 12px;
  transition: all 0.3s ease;
}

.hud-multiplayer-badge.hidden {
  display: none !important;
}

.hud-multiplayer-badge .mp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  animation: pulse-mp-dot 1.5s infinite ease-in-out;
}

@keyframes pulse-mp-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.hud-multiplayer-badge .mp-count {
  color: #f97316;
  font-weight: 700;
}

.room-action-btn.primary {
  width: 100%;
  max-width: 520px;
  margin-top: 22px;
  padding: 16px 28px;
  font-family: var(--font-family-base);
  font-size: clamp(1rem, 1.4vw, 17px);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #38bdf8;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(2, 132, 199, 0.45);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.room-action-btn.primary:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border-color: #7dd3fc;
  box-shadow: 0 0 32px rgba(14, 165, 233, 0.7);
  transform: translateY(-2px);
}

.room-action-btn.primary:active {
  transform: translateY(0);
}

.room-action-btn.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.room-error-msg {
  color: #ef4444;
  font-family: var(--font-family-base);
  font-size: 13px;
  font-weight: 500;
  margin-top: 10px;
  text-align: center;
  letter-spacing: 0.5px;
}

.room-error-msg.hidden {
  display: none !important;
}

.session-btn.btn-checkout.ready-pulse {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.6) !important;
  animation: pulse-checkout 1.5s infinite ease-in-out;
  cursor: pointer;
  opacity: 1 !important;
}

.session-btn.btn-checkout.pending-look {
  opacity: 0.75;
  border-color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

@keyframes pulse-checkout {
  0%, 100% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 24px rgba(16, 185, 129, 0.85); transform: scale(1.02); }
}

.obj-facility-tag {
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: #00f0ff;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 4px;
}

.hud-active-dept-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1.2px;
}

.hud-active-dept-display .dept-dot {
  color: #10b981;
  font-size: 10px;
}

/* ==========================================================================
   ELECTRICAL MARKETPLACE: REQUIRED FLIGHT COMPONENT HIGHLIGHTING
   ========================================================================== */
.market-req-tracker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 8px 14px;
  border-radius: 4px;
}

.req-tracker-label {
  font-family: var(--font-family-base);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #94a3b8;
}

.req-tracker-count {
  font-family: var(--font-family-base);
  font-size: 15px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1px;
}

.req-tracker-count.complete {
  color: #10b981;
}

/* Card Highlighting & Badging */
.market-item-card.required-flight-item {
  border: 1.5px solid rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
  position: relative;
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.05) 0%, rgba(1, 0, 6, 0.95) 100%);
}

.market-item-card.required-flight-item:hover {
  border-color: #38bdf8;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.35);
}

.market-item-card.required-flight-item.item-acquired {
  border-color: rgba(16, 185, 129, 0.75);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.18);
}

.flight-req-badge {
  font-family: var(--font-family-base);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  text-transform: uppercase;
  white-space: nowrap;
}

.flight-req-badge.acquired {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #10b981;
}

.flight-optional-badge {
  font-family: var(--font-family-base);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #94a3b8;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Camera View Toggle Button */
.hud-action-pill-btn.view-toggle {
  background: rgba(14, 165, 233, 0.18) !important;
  border: 1px solid #38bdf8 !important;
  color: #38bdf8 !important;
  font-weight: 700;
  letter-spacing: 0.8px;
}
.hud-action-pill-btn.view-toggle:hover {
  background: rgba(14, 165, 233, 0.35) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5) !important;
  transform: translateY(-1px);
}
.hud-action-pill-btn.view-toggle.first-person {
  background: rgba(100, 116, 139, 0.25) !important;
  border-color: #94a3b8 !important;
  color: #cbd5e1 !important;
}


/* ==========================================================================
   NASA ASTRONAUT AUTHENTICATION & CALL SIGN BADGE STYLES
   ========================================================================== */

/* Main Menu Top-Right Badge */
.main-menu-auth-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 40;
}

.operator-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(56, 189, 248, 0.2);
  transition: all 0.25s ease;
}

.operator-profile-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.35);
}

.operator-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.2);
  border: 1.5px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
}

.operator-avatar img.avatar-img-circle {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.operator-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.operator-rank {
  font-family: var(--font-family-base, 'Tektur', monospace);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #94a3b8;
  text-transform: uppercase;
}

.operator-name {
  font-family: var(--font-family-base, 'Tektur', monospace);
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-operator-edit {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #38bdf8;
  font-family: var(--font-family-base, 'Tektur', monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-operator-edit:hover {
  background: rgba(56, 189, 248, 0.35);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* Facility HUD Top Bar Operator Pill */
.hud-operator-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.5);
  padding: 5px 12px;
  border-radius: 20px;
  color: #e2e8f0;
  font-family: var(--font-family-base, 'Tektur', monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: default;
}

.hud-op-avatar {
  font-size: 14px;
}

.hud-op-name {
  color: #38bdf8;
  font-weight: 700;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-op-edit-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: var(--font-family-base, 'Tektur', monospace);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
  transition: color 0.2s;
}

.hud-op-edit-btn:hover {
  color: #38bdf8;
}

/* Modal Auth Profile */
.modal-auth-profile {
  max-width: 540px !important;
  width: 90% !important;
}

.auth-modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.auth-status-bar {
  display: flex;
  justify-content: flex-start;
}

.auth-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family-base, 'Tektur', monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

.auth-status-pill.guest {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.auth-status-pill.verified {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.yellow {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}
.status-dot.green {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.auth-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 16px;
  border-radius: 6px;
}

.auth-section-title {
  margin: 0;
  font-family: var(--font-family-base, 'Tektur', monospace);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #38bdf8;
}

.auth-section-desc {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
}

.auth-callsign-row {
  display: flex;
  gap: 10px;
}

.auth-input {
  flex: 1;
  background: rgba(1, 0, 6, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #f8fafc;
  font-family: var(--font-family-base, 'Tektur', monospace);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 4px;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.auth-save-btn {
  padding: 10px 18px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

/* Google Sign In Button */
.google-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: #1f2937;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-family: var(--font-family-base, 'Tektur', monospace);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.google-signin-btn:hover {
  background: #f1f5f9;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  margin: 8px 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.25);
  z-index: 1;
}

.auth-divider span {
  position: relative;
  z-index: 2;
  background: #0b1120;
  padding: 0 12px;
  font-family: var(--font-family-base, 'Tektur', monospace);
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 1px;
}

.auth-email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.auth-btn-row .wb3d-btn {
  flex: 1;
  padding: 10px !important;
  font-size: 11px !important;
}

.auth-error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 4px;
  line-height: 1.4;
}

.auth-logged-in-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 12px 16px;
  border-radius: 6px;
}

.logged-in-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.logged-in-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #34d399;
}

.logged-in-email {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.logged-in-uid {
  font-size: 10px;
  color: #94a3b8;
  font-family: monospace;
}

.auth-signout-btn {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
  padding: 8px 16px !important;
  font-size: 10px !important;
}

.auth-signout-btn:hover {
  background: rgba(239, 68, 68, 0.4) !important;
  color: #ffffff !important;
}


/* =========================================================================
   NETWORK & COMMUNICATION DEPARTMENT (DESK 03 - SOUTH WALL)
   ========================================================================= */

/* --- DOM Overlay inside 3D Network Workbench --- */
.wb-net-dom-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: var(--font-family-base);
  z-index: 10;
}

.wb-net-ticket-banner {
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  background: rgba(10, 16, 26, 0.92);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(16, 185, 129, 0.08);
  border-radius: 6px;
  padding: 10px 16px;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.wb-net-ticket-banner .ticket-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.wb-net-ticket-banner .ticket-badge {
  background: #065f46;
  border: 1px solid #10b981;
  color: #a7f3d0;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.8px;
}

.wb-net-ticket-banner .ticket-title {
  font-size: 13px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.8px;
}

.wb-net-ticket-banner .ticket-instructions {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.4;
}

/* Floating Controls Panel (Bottom Left/Center) */
.wb-net-controls-panel {
  position: absolute;
  bottom: 16px;
  left: 20px;
  background: rgba(10, 16, 26, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  padding: 12px 16px;
  backdrop-filter: blur(8px);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 440px;
}

.net-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.net-ctrl-lbl {
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.8px;
}

.net-toggle-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #94a3b8;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.net-toggle-btn.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #a7f3d0;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.net-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #cbd5e1;
}

.net-range-input {
  flex: 1;
  accent-color: #10b981;
  cursor: pointer;
}

.net-action-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.net-action-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
  color: #ffffff;
}

.net-action-btn.primary {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

.net-action-btn.primary:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  color: #ffffff;
}

.net-action-btn.nominal {
  background: rgba(16, 185, 129, 0.3) !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
}

.net-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #475569;
  color: #64748b;
}

/* Microscopic D-Pad */
.net-dpad-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 4px 0;
}

.dpad-mid {
  display: flex;
  gap: 28px;
}

.dpad-btn {
  width: 32px;
  height: 28px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dpad-btn:hover {
  background: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  color: #ffffff;
}

/* Network Department Theme Accents */
.market-dot.net-dot,
.science-dot.net-dot {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

#btnHudDeptNet.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #34d399;
}

/* =========================================================================
   FIGMA NODE 375:66 - PLAYER PERSPECTIVE FRAME HUD
   ========================================================================= */
.node-375-frame {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  height: 54px;
  padding: 0 24px;
  background: transparent;
  pointer-events: none;
}

.top-bar-boxes-container {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
}

.hud-frame-box {
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-right: 1.5px solid #0f172a;
  font-family: 'Tektur', monospace;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.5px;
  background: #ffffff;
}

.hud-frame-box.player-box {
  min-width: 130px;
  justify-content: center;
  color: #0284c7;
}

.hud-frame-box.timer-box {
  min-width: 120px;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  color: #334155;
}

.hud-frame-box.budget-box {
  min-width: 130px;
  justify-content: flex-end;
  color: #0f172a;
}

.hud-frame-currency {
  font-weight: 800;
  margin-right: 4px;
  color: #0284c7;
}

.hud-frame-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #ffffff;
  border: none;
  border-right: 1.5px solid #0f172a;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 0;
}

.hud-frame-btn:last-child {
  border-right: none;
}

.hud-frame-btn:hover {
  background: #f1f5f9;
  color: #0284c7;
}

.hud-frame-btn.close-box:hover {
  background: #ef4444;
  color: #ffffff;
}

.hud-frame-svg {
  width: 20px;
  height: 20px;
}

/* Connected Players & Voice Activity Row */
.hud-connected-players-bar {
  display: none !important;
  position: absolute;
  top: 72px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
  pointer-events: auto;
}

.connected-player-slots {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.player-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #64748b;
  font-size: 14px;
  transition: all 0.25s ease;
  position: relative;
}

.player-slot.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
}

.player-slot.speaking {
  background: #10b981 !important;
  color: #ffffff !important;
  animation: voiceBreath 1.4s infinite ease-in-out;
}

@keyframes voiceBreath {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    transform: scale(1.1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    transform: scale(1);
  }
}

.voice-mic-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.voice-mic-pill.active {
  border-color: #10b981;
  color: #10b981;
}

.voice-mic-pill.speaking {
  border-color: #10b981 !important;
  color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.75), 0 0 32px rgba(16, 185, 129, 0.4) !important;
  animation: voiceBreath 1.0s infinite ease-in-out;
}

.voice-mic-pill.muted {
  border-color: #94a3b8;
  color: #94a3b8;
  background: #f8fafc;
}

.voice-mic-pill:hover {
  transform: scale(1.06);
}

.mic-svg {
  width: 20px;
  height: 20px;
}

/* Center of Screen: Single Active Task Banner */
.hud-center-task-container {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
  border: 1.5px solid #38bdf8;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 16px rgba(56, 189, 248, 0.25);
  pointer-events: none;
  z-index: 100;
  max-width: 650px;
  text-align: center;
}

.hud-center-task-text {
  font-family: 'Tektur', monospace;
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Settings Controls Guide Grid */
.settings-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 12px;
}

.ctrl-grid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Tektur', monospace;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ctrl-grid-row span:first-child {
  color: #38bdf8;
  font-weight: 700;
}

.ctrl-grid-row span:last-child {
  color: #e2e8f0;
}


/* =========================================================================
   PHASE 02: FIGMA NODE 427:2 ASSEMBLY SCREEN (Exact 1:1 Pixel Match)
   ========================================================================= */

#modalHubbleAssembly {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.25s ease;
}

#modalHubbleAssembly.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.assembly-figma-container {
  width: 96vw;
  max-width: 1440px;
  height: 92vh;
  max-height: 900px;
  background: #010006;
  border: 2px solid #d1d0dd;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Tektur', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(209, 208, 221, 0.15);
  box-sizing: border-box;
  color: #ffffff;
  user-select: none;
}

/* 1. TOP HEADER (Height: 98px) */
.assembly-figma-topbar {
  height: 98px;
  min-height: 98px;
  border-bottom: 2px solid #d1d0dd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #010006;
  box-sizing: border-box;
}

.assembly-figma-brand {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.assembly-figma-title {
  font-size: 26px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-align: center;
}

.assembly-figma-top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.assembly-figma-action-btn {
  background: transparent;
  border: none;
  color: #d1d0dd;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.assembly-figma-action-btn:hover {
  color: #ffffff;
  background: rgba(209, 208, 221, 0.15);
  transform: scale(1.08);
}

/* 2. SUB-HEADER (Height: 58px) */
.assembly-figma-subheader {
  height: 58px;
  min-height: 58px;
  border-bottom: 2px solid #d1d0dd;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 32px;
  background: #010006;
  box-sizing: border-box;
}

.assembly-figma-dept-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.assembly-figma-launch-btn {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 170px;
  height: 40px;
  background: #38bdf8;
  color: #010006;
  font-family: 'Tektur', sans-serif;
  font-size: 14px;
  font-weight: 800;
  border: 1px solid #38bdf8;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.88;
  transition: all 0.25s ease;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assembly-figma-launch-btn:hover {
  opacity: 1;
  background: #7dd3fc;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
  transform: translateY(-50%) scale(1.03);
}

.assembly-figma-launch-btn.ready {
  opacity: 1;
  background: #22c55e;
  border-color: #22c55e;
  color: #010006;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.7);
  animation: pulseFigmaLaunch 2s infinite ease-in-out;
}

.assembly-figma-launch-btn.ready:hover {
  background: #4ade80;
  transform: translateY(-50%) scale(1.05);
}

@keyframes pulseFigmaLaunch {
  0% { transform: translateY(-50%) scale(1); box-shadow: 0 0 15px rgba(34, 197, 94, 0.4); }
  50% { transform: translateY(-50%) scale(1.04); box-shadow: 0 0 30px rgba(34, 197, 94, 0.8); }
  100% { transform: translateY(-50%) scale(1); box-shadow: 0 0 15px rgba(34, 197, 94, 0.4); }
}

/* 3. MAIN WORKSPACE (Left: 3D Hubble, Right: 2 Stacked Task Cards) */
.assembly-figma-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1.62fr 1fr;
  min-height: 0;
  box-sizing: border-box;
}

.assembly-figma-left-box {
  border-right: 2px solid #d1d0dd;
  position: relative;
  background: #010006;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.assembly-figma-watermark {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 19px;
  font-weight: 500;
  color: #ffffff;
  opacity: 0.25;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 5;
}

#assemblyTelescopeCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#assemblyTelescopeCanvas:active {
  cursor: grabbing;
}

.assembly-orbit-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: rgba(209, 208, 221, 0.4);
  letter-spacing: 1.5px;
  pointer-events: none;
  z-index: 5;
}

/* Right Column: Stacked Task Cards */
.assembly-figma-right-box {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #010006;
}

.assembly-figma-task-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 18px 24px;
  min-height: 0;
  box-sizing: border-box;
}

.assembly-figma-task-card:first-child {
  border-bottom: 2px solid #d1d0dd;
}

.assembly-figma-card-header {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.assembly-figma-part-canvas-wrap,
.assembly-figma-card-canvas-wrap {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
}

.assembly-figma-part-canvas-wrap canvas,
.assembly-figma-card-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.assembly-figma-part-canvas-wrap canvas:active,
.assembly-figma-card-canvas-wrap canvas:active {
  cursor: grabbing;
}

.assembly-figma-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
}

.assembly-card-status-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #a1a1aa;
  letter-spacing: 0.5px;
}

.assembly-card-status-text.assembled,
.assembly-card-status-text.done {
  color: #22c55e;
  font-weight: 700;
}

.assembly-figma-assemble-btn {
  width: 153px;
  height: 40px;
  background: #d9d9d9;
  color: #010006;
  font-family: 'Tektur', sans-serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.assembly-figma-assemble-btn:hover:not(:disabled) {
  background: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.assembly-figma-assemble-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.assembly-figma-assemble-btn.assembled,
.assembly-figma-assemble-btn.done {
  background: #22c55e !important;
  color: #010006 !important;
  opacity: 1 !important;
  cursor: default !important;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

/* 4. FOOTER TELEMETRY (Height: 65px) */
.assembly-figma-footer {
  height: 65px;
  min-height: 65px;
  border-top: 2px solid #d1d0dd;
  background: #010006;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 24px;
  box-sizing: border-box;
}

.assembly-telem-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.assembly-telem-label {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.assembly-telem-val {
  font-size: 16px;
  font-weight: 700;
  color: #fba505;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 1px;
}

/* =========================================================================
   PHASE 02: TIERED MARKETPLACE STYLES (Figma Node 419:46)
   ========================================================================= */
.tier-selector-container {
  display: flex;
  gap: 4px;
  margin: 6px 0;
}

.tier-pill {
  flex: 1;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  padding: 4px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-family: 'Share Tech Mono', monospace;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.tier-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #f1f5f9;
}

.tier-pill.active {
  background: rgba(14, 165, 233, 0.3);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: bold;
}

.market-durability-tag {
  font-size: 10px;
  color: #fbbf24;
  margin-bottom: 4px;
  font-family: 'Share Tech Mono', monospace;
}

.market-tool-timer {
  display: inline-block;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 4px;
}

.market-tool-timer.expiring {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #f87171;
  animation: blinkTimer 1s infinite;
}

@keyframes blinkTimer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Single Purchase Lock Styling */
.market-equipped-by-badge {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  font-size: 10px;
  padding: 4px;
  border-radius: 3px;
  text-align: center;
  margin-top: 6px;
}

/* =========================================================================
   PHASE 02: CHECK-IN CONCURRENCY LOCK STYLES (Figma Node 419:154)
   ========================================================================= */
.session-occupied-alert {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 12px;
  font-family: 'Share Tech Mono', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-occupied-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}


/* =========================================================================
   STANDARDIZED ALL-DEPARTMENT FIGMA SCREENS (ELEC & NET)
   ========================================================================= */
.spine-elec {
  background: linear-gradient(180deg, #064e3b 0%, #022c22 100%) !important;
  border-right: 2px solid #10b981 !important;
}

.spine-net {
  background: linear-gradient(180deg, #0e7490 0%, #083344 100%) !important;
  border-right: 2px solid #06b6d4 !important;
}

.esd-mat-bg {
  background: radial-gradient(circle at center, #064e3b 0%, #022c22 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.rf-mat-bg {
  background: radial-gradient(circle at center, #0e7490 0%, #083344 100%) !important;
  border: 1px solid rgba(6, 182, 212, 0.4) !important;
}

/* Prompt box in lower footer */
.wb-figma-prompt-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 8px 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wb-figma-prompt-prefix {
  font-size: 10px;
  font-family: 'Share Tech Mono', monospace;
  color: #38bdf8;
  font-weight: bold;
  letter-spacing: 1px;
}

.wb-figma-prompt-text {
  font-size: 12px;
  font-family: 'Share Tech Mono', monospace;
  color: #f8fafc;
  font-weight: bold;
}


/* =========================================================================
   PHASE 02: IN-CANVAS INTERACTIVE MINI-GAME PANELS & TOOL SHELF ENHANCEMENTS
   ========================================================================= */
.wb-figma-tool-card .tool-name-label {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.1;
  text-transform: uppercase;
  margin-top: 4px;
}

.wb-elec-minigame-panel {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 16, 26, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), inset 0 0 15px rgba(56, 189, 248, 0.1);
  border-radius: 8px;
  padding: 14px 20px;
  backdrop-filter: blur(10px);
  z-index: 20;
  pointer-events: auto;
  min-width: 380px;
  font-family: var(--font-family-base);
  color: #e2e8f0;
}

.wb-elec-minigame-panel.hidden {
  display: none !important;
}

.elec-mini-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.elec-mini-title {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.elec-dmm-display {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: #020617;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 8px 16px;
  border-radius: 4px;
}

.dmm-lbl {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
}

.dmm-voltage-digits {
  font-family: 'Tektur', monospace;
  font-size: 26px;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 1px;
}

.dmm-target-lbl {
  font-size: 10px;
  color: #10b981;
}

.elec-trim-controls {
  display: flex;
  gap: 12px;
  width: 100%;
}

.elec-btn-trim {
  flex: 1;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-family: var(--font-family-base);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.elec-btn-trim:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.elec-btn-trim.primary {
  background: rgba(56, 189, 248, 0.25);
  border-color: #0284c7;
  color: #e0f2fe;
}

.elec-trim-hint {
  font-size: 10px;
  color: #94a3b8;
  text-align: center;
}

.scope-status-line {
  display: flex;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
}

.scope-knobs-row {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.scope-knob-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.knob-label {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
}

.knob-btn-pair {
  display: flex;
  gap: 6px;
}

.elec-knob-btn {
  width: 32px;
  height: 32px;
  background: #0f172a;
  border: 1px solid #0284c7;
  color: #38bdf8;
  font-weight: 800;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.elec-knob-btn:hover {
  background: #0284c7;
  color: #ffffff;
}

/* Position .wb-net-controls-panel cleanly at bottom-center */
.wb-net-controls-panel {
  position: absolute;
  bottom: 20px;
  left: 50% !important;
  transform: translateX(-50%);
  background: rgba(10, 16, 26, 0.94) !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), inset 0 0 15px rgba(16, 185, 129, 0.1) !important;
  border-radius: 8px;
  padding: 14px 20px;
  backdrop-filter: blur(10px);
  z-index: 20;
  pointer-events: auto;
  max-width: 480px;
}


/* =========================================================================
   PHASE 02: TIERED INSTRUMENTS & HUD FRAME DURATION TIMERS
   ========================================================================= */
.tier-selector-group {
  display: flex;
  gap: 6px;
  margin: 10px 0;
  width: 100%;
}

.tier-pill-btn {
  flex: 1;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #94a3b8;
  font-family: var(--font-family-base, 'Rajdhani', sans-serif);
  font-size: 10px;
  font-weight: 700;
  padding: 5px 2px;
  cursor: pointer;
  border-radius: 4px;
  text-align: center;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.tier-pill-btn:hover {
  border-color: #38bdf8;
  color: #ffffff;
  background: rgba(56, 189, 248, 0.15);
}

.tier-pill-btn.active {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #020617;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  font-weight: 800;
}

.tier-pill-btn .tier-lvl {
  display: block;
  font-size: 9px;
  letter-spacing: 0.5px;
}

.tier-pill-btn .tier-dur {
  display: block;
  font-size: 11px;
}

.tier-pill-btn .tier-cost {
  display: block;
  font-size: 9px;
  opacity: 0.85;
}

/* Marketplace Occupied / Locked Tag ("Instrument Equipped already") */
.market-occupied-tag {
  display: block;
  width: 100%;
  text-align: center;
  padding: 8px 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px dashed #ef4444;
  color: #fca5a5;
  font-family: var(--font-family-base, 'Rajdhani', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 4px;
}

/* HUD Frame Active Countdown Timers */
.frame-slot-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  margin-top: 4px;
  padding: 2px 4px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 3px;
  font-family: 'Share Tech Mono', monospace, monospace;
}

.frame-slot-timer .timer-tier-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 2px;
  background: #38bdf8;
  color: #020617;
}

.frame-slot-timer .timer-countdown {
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
}

.frame-slot-timer.critical-pulse .timer-countdown {
  color: #ef4444;
  animation: timerPulse 0.8s infinite alternate;
}

.frame-slot-timer.expired {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

.frame-slot-timer.expired .timer-countdown {
  color: #f87171;
  font-size: 9px;
  font-weight: 800;
}

.frame-slot-durability-track {
  width: 100%;
  height: 3px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 3px;
}

.frame-slot-durability-fill {
  height: 100%;
  background: #10b981;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.frame-slot-item.dysfunctional {
  border-color: #ef4444 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6) !important;
  animation: slotShake 0.4s ease;
}

@keyframes timerPulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

@keyframes slotShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* Marketplace Item Card Durability / Degradation Countdown (Figma Node 419:46) */
.tier-pill-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.card-durability-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
  padding: 4px 8px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
}

.card-durability-row.critical-pulse {
  border-color: #ef4444;
  animation: timerPulse 0.8s infinite alternate;
}

.card-durability-row.expired {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

.card-timer-badge {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-timer-badge strong {
  color: #10b981;
  font-weight: 800;
}

.card-durability-row.critical-pulse .card-timer-badge strong {
  color: #ef4444;
}

.card-durability-row.expired .card-timer-badge strong {
  color: #f87171;
}

.card-durability-track {
  width: 100%;
  height: 4px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.card-durability-fill {
  height: 100%;
  background: #10b981;
  transition: width 0.3s ease, background-color 0.3s ease;
}

/* Single-Purchase Locked Button ("Instrument Equipped already") */
.btn-buy-item.locked,
.btn-buy-item:disabled {
  background: rgba(30, 41, 59, 0.7) !important;
  color: #94a3b8 !important;
  border: 1px dashed rgba(148, 163, 184, 0.4) !important;
  cursor: not-allowed !important;
  opacity: 0.8;
  box-shadow: none !important;
  pointer-events: none;
}

.btn-buy-item.locked {
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.15) !important;
}

/* Re-Requisition Button */
.btn-buy-item.btn-re-requisition {
  background: #f59e0b !important;
  color: #020617 !important;
  font-weight: 800 !important;
  border: 1px solid #fbbf24 !important;
  cursor: pointer !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4) !important;
}

.btn-buy-item.btn-re-requisition:hover {
  background: #d97706 !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.7) !important;
}

.item-price.expired-text {
  color: #ef4444 !important;
  font-weight: 800;
}

/* =========================================================================
   SETTINGS SCREEN OVERRIDES: CLEAN SCROLLBAR, COMPACT SPACING & STICKY BACK
   ========================================================================= */
.settings-layout {
  max-width: 720px;
  max-height: 92vh;
  padding: 20px 28px 24px 28px;
  background: rgba(8, 12, 24, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 24px rgba(56, 189, 248, 0.15);
  backdrop-filter: blur(12px);
  scrollbar-width: thin !important;
  scrollbar-color: #38bdf8 rgba(15, 23, 42, 0.6) !important;
}

.settings-layout::-webkit-scrollbar {
  display: block !important;
  width: 8px;
}

.settings-layout::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}

.settings-layout::-webkit-scrollbar-thumb {
  background: #38bdf8;
  border-radius: 4px;
}

.settings-title {
  font-size: clamp(1.5rem, 2vw, 28px);
  margin-bottom: 16px;
}

.settings-controls-list {
  gap: 14px;
}

.settings-label {
  font-size: clamp(1rem, 1.3vw, 18px);
  margin-bottom: 6px;
}

.settings-input-box {
  height: 48px;
}

.settings-input {
  font-size: clamp(1.1rem, 1.4vw, 20px);
}

.settings-toggle-box {
  height: 46px;
}

.settings-slider-wrapper {
  height: 26px;
}

.settings-back-btn {
  margin-top: 18px;
  padding: 10px 42px;
  font-size: clamp(1.1rem, 1.5vw, 22px);
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid #38bdf8;
  border-radius: 6px;
  color: #ffffff;
  flex-shrink: 0;
}

.settings-back-btn:hover {
  background: #0284c7;
  opacity: 1;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
}

/* =========================================================================
   SETTINGS SCREEN: CONTROLS TABLE (Figma Node 375:66)
   ========================================================================= */
.settings-controls-table-group {
  margin-top: 10px;
}

.settings-controls-table-wrap {
  width: 100%;
  max-width: 580px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

.settings-controls-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Tektur', 'Inter', monospace;
  font-size: 13px;
  color: #e2e8f0;
}

.settings-controls-table th {
  background: rgba(30, 41, 59, 0.85);
  color: #38bdf8;
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.settings-controls-table td {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-controls-table tr:last-child td {
  border-bottom: none;
}

.settings-controls-table kbd {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  box-shadow: 0 2px 0 #0f172a;
  display: inline-block;
  margin-right: 4px;
}

/* =========================================================================
   DEPARTMENT ASSEMBLY CLAIMING MODAL
   ========================================================================= */
.assembly-claim-modal {
  width: 900px;
  max-width: 94vw;
  background: #020617;
  border: 2px solid #38bdf8;
  border-radius: 12px;
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.35);
  padding: 32px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: modalPopIn 0.25s ease-out;
}

.assembly-claim-header {
  text-align: center;
}

.assembly-claim-badge {
  display: inline-block;
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.assembly-claim-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 0 8px 0;
  color: #f8fafc;
}

.assembly-claim-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  max-width: 640px;
  margin: 0 auto;
}

.assembly-claim-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.assembly-claim-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.assembly-claim-card:hover:not(.locked) {
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
  transform: translateY(-2px);
}

.assembly-claim-card.occupied {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  opacity: 0.8;
}

.claim-card-dept-icon {
  font-size: 32px;
}

.claim-card-dept-name {
  font-family: 'Tektur', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.claim-card-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  flex: 1;
}

.claim-card-status {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #10b981;
}

.assembly-claim-card.occupied .claim-card-status {
  color: #ef4444;
}

.btn-claim-dept {
  width: 100%;
  padding: 10px 14px;
  font-family: 'Tektur', monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 6px;
  cursor: pointer;
  background: #0284c7;
  color: #ffffff;
  border: 1px solid #38bdf8;
  transition: all 0.2s ease;
}

.btn-claim-dept:hover:not(:disabled) {
  background: #0369a1;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.btn-claim-dept:disabled {
  background: rgba(30, 41, 59, 0.6);
  border-color: #475569;
  color: #64748b;
  cursor: not-allowed;
}

.assembly-claim-card.occupied .btn-claim-dept {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fca5a5;
}

.assembly-claim-footer {
  display: flex;
  justify-content: center;
}

.btn-claim-cancel {
  padding: 10px 24px;
  font-family: 'Tektur', monospace;
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-claim-cancel:hover {
  color: #ffffff;
  border-color: #94a3b8;
}

/* =========================================================================
   ASSEMBLY INTERACTIVE MINI-GAME OVERLAY
   ========================================================================= */
.assembly-minigame-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(8px);
  z-index: 100005;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assembly-minigame-container {
  width: 600px;
  max-width: 95vw;
  background: #010006;
  border: 1.5px solid #d9d9d9;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 28px 24px;
  color: #f8f3f0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalScaleFadeIn 0.25s ease-out;
}

.minigame-header {
  text-align: center;
}

.minigame-badge {
  display: inline-block;
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #f8f3f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #d9d9d9;
  padding: 4px 12px;
  border-radius: 14px;
  margin-bottom: 8px;
}

.minigame-title {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: #f8f3f0;
  letter-spacing: 0.5px;
}

.minigame-desc {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

.minigame-body {
  position: relative;
  background: #010006;
  border: 1.5px solid #e3e3e3;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#miniGameCanvas {
  width: 100%;
  height: 240px;
  display: block;
  cursor: crosshair;
}

.minigame-readout-bar {
  width: 100%;
  padding: 8px 14px;
  background: #010006;
  border-top: 1px solid #e3e3e3;
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  text-align: center;
  letter-spacing: 0.5px;
}

.minigame-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.minigame-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Tektur', monospace;
  font-size: 12px;
}

.minigame-slider-row label {
  width: 130px;
  color: #cbd5e1;
}

.minigame-slider-row input[type="range"] {
  flex: 1;
}

.minigame-slider-val {
  width: 70px;
  text-align: right;
  font-weight: 700;
  color: #10b981;
}

.minigame-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.btn-minigame-abort {
  padding: 10px 22px;
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 13px;
  font-weight: 600;
  background: #010006;
  color: #f8f3f0;
  border: 1.5px solid #e3e3e3;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-minigame-abort:hover {
  color: #ffffff;
  border-color: #94a3b8;
}

.btn-minigame-submit {
  flex: 1;
  padding: 11px 20px;
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: #f8f3f0;
  color: #010006;
  border: 1.5px solid #f8f3f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-minigame-submit:hover:not(:disabled) {
  background: #059669;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45);
}

.btn-minigame-submit:disabled {
  background: rgba(30, 41, 59, 0.6);
  border-color: #475569;
  color: #64748b;
  cursor: not-allowed;
}

/* =========================================================================
   PHASE 3 - MILESTONE M2: REGISTRATION MODAL & KEYCARD AUTH SYSTEM STYLING
   ========================================================================= */

.modal-registration {
  max-width: 840px;
  width: 95%;
  background: #0b1329;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(14, 165, 233, 0.15);
}

.registration-modal-content {
  padding: 20px;
}

.registration-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .registration-layout {
    grid-template-columns: 1fr;
  }
}

.reg-intro-banner {
  background: rgba(14, 165, 233, 0.08);
  border-left: 3px solid #0284c7;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.reg-facility-code {
  display: block;
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.reg-intro-text {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}

.clearance-badge-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
}

.clearance-level-tag {
  background: #0284c7;
  color: #ffffff;
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.clearance-level-desc {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.reg-action-wrap {
  margin-top: 20px;
}

.btn-authorize-keycard {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid #38bdf8;
  border-radius: 6px;
  font-family: 'Tektur', monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-authorize-keycard:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
  transform: translateY(-1px);
}

.btn-authorize-keycard:active {
  transform: translateY(0);
}

.btn-authorize-keycard .auth-icon {
  font-size: 16px;
}

/* Keycard Preview Column */
.registration-card-preview-col {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-badge-header {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.keycard-render-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #f8fafc;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.keycard-render-frame:hover {
  transform: scale(1.02);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.3);
}

.reg-preview-img {
  width: 100%;
  height: auto;
  display: block;
}

.keycard-overlay-data {
  position: absolute;
  top: 96px;
  left: 88px;
  font-family: 'Tektur', monospace;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.overlay-callsign {
  color: #0b3d91;
  font-weight: 800;
}

.overlay-dept {
  color: #0284c7;
}

.overlay-clearance {
  color: #10b981;
}

.reg-security-notice {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Tektur', monospace;
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.5px;
}

.reg-security-notice .sec-dot {
  color: #10b981;
  font-size: 8px;
}

/* Keycard Inventory HUD Badge inside #playerInstrumentsFrame */
.hud-keycard-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid #10b981;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 8px;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
  animation: keycardGlowPulse 3s infinite alternate;
}

@keyframes keycardGlowPulse {
  0% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.2); }
  100% { box-shadow: 0 0 18px rgba(16, 185, 129, 0.5); }
}

.keycard-badge-img {
  width: 42px;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.keycard-badge-meta {
  display: flex;
  flex-direction: column;
}

.keycard-badge-title {
  font-family: 'Tektur', monospace;
  font-size: 9px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.keycard-badge-status {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.5px;
}

/* Security Terminal HUD Banner */
.hud-security-banner {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid #38bdf8;
  border-radius: 8px;
  padding: 12px 24px;
  font-family: 'Tektur', monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  text-align: center;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: opacity 0.3s ease;
}

.hud-security-banner.granted {
  border-color: #00FF88;
  color: #00FF88;
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
}

.hud-security-banner.denied {
  border-color: #FF2222;
  color: #FF2222;
  box-shadow: 0 0 25px rgba(255, 34, 34, 0.4);
}



/* ==========================================================================
   PHASE 02 REFACTORED: ASSEMBLY ACCESS PASSCODE & SELECTION SYSTEM
   (Figma Nodes: 456:112, 456:32, 456:81)
   ========================================================================== */

/* Universal Figma Back Button */
.figma-back-btn {
  background: transparent;
  border: none;
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #f8f3f0;
  cursor: pointer;
  padding: 8px 24px;
  transition: all 0.2s ease;
  margin-top: 18px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.figma-back-btn:hover {
  color: #38bdf8;
  transform: translateY(-1px);
}

/* --- Node 456:112: Assembly Access Passcode Issued Popup --- */
.figma-passcode-popup {
  width: 588px;
  max-width: 92vw;
  min-height: 285px;
  background: #010006;
  border: 1.5px solid #d9d9d9;
  border-radius: 12px;
  padding: 36px 32px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 40px rgba(255, 255, 255, 0.08);
  animation: modalScaleFadeIn 0.25s ease-out;
  position: relative;
  z-index: 1000;
}

.figma-passcode-title {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 30px;
  font-weight: 500;
  color: #f8f3f0;
  margin: 0 0 20px 0;
  text-align: center;
  letter-spacing: 0.5px;
}

.figma-passcode-code-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 12px 0 24px 0;
}

.figma-code-value {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 45px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #f8f3f0;
  text-shadow: 0 0 20px rgba(248, 243, 240, 0.5);
}

.figma-copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #d9d9d9;
  color: #f8f3f0;
  font-family: 'Tektur', monospace;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.figma-copy-btn:hover {
  background: #f8f3f0;
  color: #010006;
}

/* --- Node 456:32: Select the Assembly Department Popup --- */
.figma-dept-select-popup {
  width: 1000px;
  max-width: 95vw;
  min-height: 520px;
  background: #010006;
  border: 1.5px solid #d9d9d9;
  border-radius: 14px;
  padding: 44px 36px 32px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 255, 255, 0.08);
  animation: modalScaleFadeIn 0.25s ease-out;
  position: relative;
  z-index: 1000;
}

.figma-dept-select-title {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 30px;
  font-weight: 500;
  color: #f8f3f0;
  margin: 0 0 36px 0;
  text-align: center;
  letter-spacing: 0.5px;
}

.figma-dept-buttons-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
}

.figma-dept-row {
  width: 533px;
  max-width: 90vw;
}

.figma-dept-bar-btn {
  width: 100%;
  height: 70px;
  background: #010006;
  border: 1.5px solid #e3e3e3;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.figma-dept-bar-btn:hover:not(:disabled) {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.figma-dept-bar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: #555555;
}

.figma-dept-label {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 26px;
  font-weight: 500;
  color: #f8f3f0;
  letter-spacing: 0.5px;
}

.figma-dept-status-tag {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

/* --- Node 456:81: Enter Access Passcode Popup --- */
.figma-passcode-entry-popup {
  width: 588px;
  max-width: 92vw;
  min-height: 551px;
  background: #010006;
  border: 1.5px solid #d9d9d9;
  border-radius: 12px;
  padding: 36px 32px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 255, 255, 0.08);
  animation: modalScaleFadeIn 0.25s ease-out;
  position: relative;
  z-index: 1000;
}

.figma-passcode-entry-title {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 30px;
  font-weight: 500;
  color: #f8f3f0;
  margin: 0 0 20px 0;
  text-align: center;
  letter-spacing: 0.5px;
}

.figma-pin-display-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.figma-pin-display-field {
  width: 264px;
  height: 45px;
  background: rgba(217, 217, 217, 0.1);
  border: 1.5px solid #e3e3e3;
  border-radius: 5px;
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #f8f3f0;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.figma-pin-display-field:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.figma-pin-display-field.shake-error {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  animation: passcodeShake 0.4s ease-in-out;
}

.figma-autofill-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #d9d9d9;
  color: #f8f3f0;
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 0 12px;
  height: 45px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.figma-autofill-btn:hover {
  background: #38bdf8;
  color: #010006;
  border-color: #38bdf8;
}

/* 3x4 Numpad Keypad */
.figma-numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 65px);
  grid-gap: 14px;
  margin-bottom: 16px;
  justify-content: center;
}

.figma-numpad-key {
  width: 65px;
  height: 65px;
  background: #010006;
  border: 1.5px solid #e3e3e3;
  border-radius: 5px;
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #f8f3f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.figma-numpad-key:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.figma-numpad-key:active {
  transform: scale(0.95);
  background: rgba(56, 189, 248, 0.3);
}

.figma-key-clear {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
  font-size: 20px;
}
.figma-key-clear:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

.figma-key-submit {
  background: #f8f3f0;
  color: #010006;
  border-color: #f8f3f0;
  font-size: 22px;
  font-weight: 700;
}
.figma-key-submit:hover {
  background: #38bdf8;
  color: #010006;
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
}

/* 1. Modal 456:112 - Assembly Access Passcode Issued Popup */
.passcode-issued-modal {
  width: 540px;
  max-width: 92vw;
  background: rgba(11, 15, 25, 0.96);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.2);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 1000;
  animation: modalScaleFadeIn 0.25s ease-out;
}

.passcode-modal-crest {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fbbf24;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.passcode-modal-title {
  font-family: 'Tektur', monospace;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1.5px;
  margin: 0 0 6px 0;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.passcode-modal-dept {
  font-family: 'Tektur', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1px;
  margin: 0 0 20px 0;
  text-transform: uppercase;
}

.passcode-card-box {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px dashed rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.passcode-box-lbl {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #94a3b8;
  text-transform: uppercase;
}

.passcode-display-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.passcode-glow-code {
  font-family: 'Tektur', monospace;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #10b981;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.7);
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 18px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-copy-passcode {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  border-radius: 6px;
  padding: 8px 14px;
  font-family: 'Tektur', monospace;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-passcode:hover {
  background: rgba(56, 189, 248, 0.35);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.passcode-sticky-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Tektur', monospace;
  font-size: 11px;
  color: #fbbf24;
  line-height: 1.4;
  text-align: center;
}

.btn-passcode-confirm {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  color: #ffffff;
  padding: 12px 24px;
  font-family: 'Tektur', monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-passcode-confirm:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

/* 2. Pinned Sticky Passcodes Bar on HUD */
.hud-sticky-passcodes-bar {
  position: absolute;
  top: 132px;
  right: 28px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.sticky-passcodes-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Tektur', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fbbf24;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
}

.sticky-passcodes-chips {
  display: flex;
  gap: 8px;
}

.sticky-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: 'Tektur', monospace;
  font-size: 10px;
  transition: all 0.25s ease;
}

.sticky-chip.locked {
  opacity: 0.55;
  border-color: rgba(100, 116, 139, 0.4);
}

.sticky-chip.locked .chip-code-val {
  color: #64748b;
}

.sticky-chip.unlocked {
  opacity: 1;
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.chip-dept-tag {
  color: #38bdf8;
  font-weight: 800;
}

.chip-code-val {
  color: #10b981;
  font-weight: 800;
  letter-spacing: 1px;
}

/* 3. Modal 456:32 - Department Selection for Assembly */
.assembly-select-modal {
  width: 920px;
  max-width: 95vw;
  background: rgba(11, 15, 25, 0.97);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(56, 189, 248, 0.2);
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: modalScaleFadeIn 0.25s ease-out;
}

.assembly-select-header {
  text-align: center;
}

.assembly-select-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  padding: 4px 14px;
  border-radius: 20px;
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.assembly-select-title {
  font-family: 'Tektur', monospace;
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1.5px;
  margin: 0 0 6px 0;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.assembly-select-subtitle {
  font-family: 'Tektur', monospace;
  font-size: 13px;
  color: #94a3b8;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.5;
}

.assembly-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.assembly-select-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: all 0.25s ease;
}

.assembly-select-card:hover {
  border-color: rgba(56, 189, 248, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.assembly-select-card.qualified {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.select-card-icon {
  font-size: 38px;
  margin-bottom: 4px;
}

.select-card-name {
  font-family: 'Tektur', monospace;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.select-card-desc {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
  min-height: 32px;
}

.select-card-status {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #f59e0b;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.assembly-select-card.qualified .select-card-status {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-select-dept {
  width: 100%;
  margin-top: auto;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  padding: 10px 16px;
  font-family: 'Tektur', monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-select-dept:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: #64748b;
  color: #64748b;
  background: transparent;
}

.btn-select-dept:not(:disabled):hover {
  background: #38bdf8;
  color: #0b0f19;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

.assembly-select-footer {
  display: flex;
  justify-content: center;
}

.btn-select-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  padding: 10px 24px;
  font-family: 'Tektur', monospace;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-select-cancel:hover {
  border-color: #ef4444;
  color: #ef4444;
}

/* 4. Modal 456:81 - Passcode Entry Modal */
.passcode-input-modal {
  width: 520px;
  max-width: 92vw;
  background: rgba(11, 15, 25, 0.97);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  padding: 30px 24px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.2);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  animation: modalScaleFadeIn 0.25s ease-out;
}

.passcode-input-crest {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fbbf24;
}

.passcode-input-title {
  font-family: 'Tektur', monospace;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
  margin: 0;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.passcode-input-dept-subtitle {
  font-family: 'Tektur', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1px;
  margin: 0;
  text-transform: uppercase;
}

.passcode-input-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.passcode-input-lbl {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 1px;
  text-align: left;
}

.passcode-input-row {
  display: flex;
  gap: 10px;
}

.passcode-entry-field {
  flex: 1;
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 6px;
  padding: 12px 16px;
  font-family: 'Tektur', monospace;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #10b981;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: all 0.2s ease;
}

.passcode-entry-field:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
}

.passcode-entry-field.shake-error {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  animation: passcodeShake 0.4s ease-in-out;
}

.btn-autofill-passcode {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid #fbbf24;
  color: #fbbf24;
  border-radius: 6px;
  padding: 0 14px;
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-autofill-passcode:hover {
  background: rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.passcode-error-msg {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.passcode-input-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-passcode-submit {
  width: 100%;
  background: linear-gradient(135deg, #059669, #047857);
  border: 1px solid #10b981;
  color: #ffffff;
  padding: 12px 20px;
  font-family: 'Tektur', monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-passcode-submit:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
  transform: translateY(-1px);
}

.btn-passcode-back {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  padding: 8px 16px;
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-passcode-back:hover {
  color: #ffffff;
  border-color: #38bdf8;
}

@keyframes passcodeShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

@keyframes modalScaleFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   PHASE 04: STS-31 LAUNCH & LEO SIMULATION SCREEN (Figma 463:863 & 466:1166)
   ========================================================================== */

#simulationScreen {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  user-select: none;
  background-color: #03045e;
}

#simulationScreen .simulation-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, #03045e 0%, #023e8a 36%, #0077b6 72%, #caf0f8 100%);
}

#simulationScreen .simulation-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
}

#simulationScreen .altitude-grid {
  position: absolute;
  top: 25.2%;
  right: 0;
  height: 43%;
  width: 60.2%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  z-index: 3;
}

#simulationScreen .grid-line {
  width: 100%;
  border-top: 1px dashed rgba(255, 255, 255, 0.36);
}

#simulationScreen .telemetry-hud {
  position: absolute;
  top: 36px;
  left: 48px;
  right: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  z-index: 10;
  pointer-events: none;
}

#simulationScreen .gauge-cluster {
  display: flex;
  align-items: center;
  gap: 36px;
}

#simulationScreen .gauge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#simulationScreen .gauge-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  text-transform: uppercase;
}

#simulationScreen .gauge-circle {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(4, 24, 88, 0.35);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#simulationScreen .gauge-value {
  font-family: 'Tektur', monospace;
  font-size: 19px;
  font-weight: 600;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

#simulationScreen .gauge-unit {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

#simulationScreen .mission-clock-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 320px;
}

#simulationScreen .mission-clock {
  font-family: 'Tektur', monospace;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
}

#simulationScreen .clock-divider {
  width: 320px;
  height: 2px;
  margin: 12px 0 16px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.35) 60%, rgba(255, 255, 255, 0) 100%);
}

#simulationScreen .mission-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 36px;
}

#simulationScreen .meta-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 76px;
}

#simulationScreen .meta-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
}

#simulationScreen .meta-value {
  font-family: 'Tektur', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
  white-space: nowrap;
}

#simulationScreen .fuel-widget {
  position: absolute;
  right: 42px;
  bottom: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 10;
  pointer-events: none;
}

#simulationScreen .fuel-title {
  font-family: 'Tektur', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#simulationScreen .fuel-ring-container {
  position: relative;
  width: 170px;
  height: 171px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#simulationScreen .fuel-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-18deg);
}

#simulationScreen .fuel-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 20;
}

#simulationScreen .fuel-ring-progress {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 20;
  stroke-dashoffset: var(--fuel-dashoffset, 0);
  transition: stroke-dashoffset 0.12s linear;
}

#simulationScreen .fuel-value {
  position: absolute;
  font-family: 'Tektur', monospace;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

#simulationScreen .sim-controls-overlay {
  position: absolute;
  left: 48px;
  bottom: 36px;
  z-index: 20;
}

#simulationScreen .btn-sim-skip {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  font-family: 'Tektur', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

#simulationScreen .btn-sim-skip:hover {
  background: rgba(2, 132, 199, 0.85);
  color: #ffffff;
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.5);
}

#simulationScreen .launchpad {
  position: absolute;
  left: 50%;
  bottom: 8.9%;
  transform: translate(-50%, var(--ground-offset-y, 0px)) scale(var(--camera-zoom, 1));
  transform-origin: bottom center;
  opacity: var(--ground-opacity, 1);
  width: min(55vw, 790px);
  height: 20px;
  background-color: #1b1e21;
  clip-path: polygon(5% 0%, 95% 0%, 100% 100%, 0% 100%);
  z-index: 3;
  pointer-events: none;
}

#simulationScreen .ground-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9.2%;
  transform: translateY(var(--ground-offset-y, 0px));
  opacity: var(--ground-opacity, 1);
  background-color: #421704;
  clip-path: polygon(0% 12%, 22% 3%, 78% 12%, 100% 4%, 100% 100%, 0% 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  z-index: 4;
  pointer-events: none;
}

#simulationScreen .ground-pill {
  width: 44px;
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   SCREEN 7: MISSION COMPLETE ENDING PAGE (Figma Node 470:1373 & 470:1374)
   ========================================================================== */

#endingScreen {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000000;
  color: #ffffff;
  display: none;
}

#endingScreen.active {
  display: block;
}

#endingScreen .ending-bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#endingScreen .ending-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

#endingScreen .ending-ui-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 64px 32px 64px;
  box-sizing: border-box;
  background: radial-gradient(circle at 20% 50%, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
}

#endingScreen .ending-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

#endingScreen .ending-brand-title {
  font-family: 'Tektur', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

#endingScreen .ending-top-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

#endingScreen .ending-top-btn {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

#endingScreen .ending-top-btn:hover {
  background: rgba(2, 132, 199, 0.85);
  border-color: #38bdf8;
  transform: scale(1.08);
}

#endingScreen .ending-hero-content {
  display: flex;
  flex-direction: column;
  max-width: 640px;
}

#endingScreen .ending-main-title {
  font-family: 'Tektur', sans-serif;
  font-size: 58px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 16px 0;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.85);
  letter-spacing: -0.01em;
}

#endingScreen .ending-synopsis {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 28px 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

#endingScreen .ending-payout-box {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  border-radius: 19px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

#endingScreen .payout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

#endingScreen .payout-val {
  font-family: 'Tektur', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #38bdf8;
}

#endingScreen .payout-total-line {
  margin-top: 6px;
  padding: 12px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 22px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  color: #ffffff;
}

#endingScreen .payout-total-val {
  font-family: 'Tektur', monospace;
  font-size: 24px;
  font-weight: 800;
  color: #10b981;
  text-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
}

#endingScreen .ending-btn-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

#endingScreen .btn-ending-cta {
  padding: 14px 28px;
  border-radius: 10px;
  font-family: 'Tektur', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s ease;
}

#endingScreen .btn-ending-cta.primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.45);
}

#endingScreen .btn-ending-cta.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(2, 132, 199, 0.65);
}

#endingScreen .btn-ending-cta.secondary {
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

#endingScreen .btn-ending-cta.secondary:hover {
  background: rgba(30, 41, 59, 0.85);
  color: #ffffff;
  border-color: #38bdf8;
  transform: translateY(-2px);
}

#endingScreen .ending-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
}

#endingScreen .ending-quote-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

#endingScreen .nasa-meatball-tag {
  background: #0284c7;
  color: #ffffff;
  font-family: 'Tektur', sans-serif;
  font-weight: 800;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

#endingScreen .ending-quote-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 19px;
  font-style: italic;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

#endingScreen .ending-author-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

#endingScreen .author-team-name {
  color: #f43f5e;
  font-weight: 700;
}


/* =========================================================================
   NASA ENGINEERING DIRECTIVE DECISION MODAL & AUDIT REPORT
   ========================================================================= */
.decision-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(12px);
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
}

.decision-modal-container {
  width: 740px;
  max-width: 95vw;
  background: #010006;
  border: 1.5px solid #d9d9d9;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 32px 28px;
  color: #f8f3f0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: modalScaleFadeIn 0.25s ease-out;
}

.decision-modal-header {
  text-align: center;
}

.decision-header-crest {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #38bdf8;
  margin-bottom: 6px;
  font-weight: 700;
}

.decision-directive-badge {
  display: inline-block;
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #d9d9d9;
  color: #f8f3f0;
  padding: 4px 14px;
  border-radius: 16px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.decision-title {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: #f8f3f0;
  margin: 0 0 4px 0;
  letter-spacing: 0.5px;
}

.decision-subsystem-label {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  letter-spacing: 0.5px;
}

.decision-question-box {
  background: #010006;
  border: 1.5px solid #e3e3e3;
  border-left: 4px solid #38bdf8;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 8px;
}

.decision-question-text {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #f8f3f0;
  margin: 0;
  font-weight: 500;
}

.decision-choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.decision-choice-card {
  background: #010006;
  border: 1.5px solid #e3e3e3;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.22s ease;
}

.decision-choice-card:hover {
  transform: translateY(-2px);
}

.decision-choice-card.choice-yes:hover {
  border-color: #10b981;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}

.decision-choice-card.choice-no:hover {
  border-color: #ef4444;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.25);
}

.choice-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.choice-tag {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 1px;
}

.choice-tag.tag-nominal {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #10b981;
}

.choice-tag.tag-risk {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #ef4444;
}

.choice-hotkey {
  font-family: monospace;
  font-size: 11px;
  color: #64748b;
}

.choice-label {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.choice-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
  flex-grow: 1;
}

.btn-decision-choice {
  width: 100%;
  padding: 10px;
  font-family: 'Tektur', monospace;
  font-size: 13px;
  font-weight: 800;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s;
  border: none;
}

.btn-choice-yes {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
}
.btn-choice-yes:hover {
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

.btn-choice-no {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #ffffff;
}
.btn-choice-no:hover {
  background: linear-gradient(135deg, #ef4444, #f87171);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

.decision-consequence-preview {
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  margin-top: 4px;
}

/* Debriefing Audit Section in #endingScreen */
.ending-audit-box {
  background: rgba(9, 14, 23, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), inset 0 0 25px rgba(56, 189, 248, 0.1);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 16px;
  text-align: left;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #38bdf8 rgba(15, 23, 42, 0.6);
}

.ending-audit-box::-webkit-scrollbar {
  width: 6px;
}

.ending-audit-box::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 3px;
}

.ending-audit-box::-webkit-scrollbar-thumb {
  background: #38bdf8;
  border-radius: 3px;
}

.audit-box-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.audit-header-badge {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  color: #38bdf8;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.audit-header-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 2px 0 6px 0;
}

.audit-score-row {
  display: flex;
  gap: 14px;
  align-items: center;
}

.audit-score-pill {
  font-family: 'Tektur', monospace;
  font-size: 13px;
  font-weight: 800;
  color: #f59e0b;
}

.audit-status-badge {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}
.audit-status-badge.nominal {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
}
.audit-status-badge.failed {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.audit-directives-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-directive-card {
  background: rgba(2, 6, 23, 0.7);
  border-left: 4px solid #10b981;
  border-radius: 4px;
  padding: 10px 14px;
}
.audit-directive-card.flagged {
  border-left-color: #ef4444;
}

.audit-dir-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.audit-dir-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.audit-dir-badge {
  font-size: 10px;
  font-weight: 800;
  font-family: 'Tektur', monospace;
}
.audit-dir-badge.nominal { color: #10b981; }
.audit-dir-badge.shortcut { color: #ef4444; }

.audit-dir-explain {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

/* ==========================================================================
   NASA GMAT R2026a SIMULATION TELEMETRY CARD & ORBITAL INSERTION HUD
   ========================================================================== */
.gmat-telemetry-card {
  position: absolute;
  left: 32px;
  bottom: 28px;
  width: clamp(280px, 24vw, 360px);
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), inset 0 0 20px rgba(56, 189, 248, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  z-index: 10;
  pointer-events: none;
  font-family: var(--font-family-base, sans-serif);
}

.gmat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.gmat-badge-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gmat-logo-badge {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  font-weight: 800;
  background: #0284c7;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.gmat-regime-pill {
  font-family: 'Tektur', monospace;
  font-size: 9px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
}

.gmat-live-status {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.5px;
}

.gmat-card-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.gmat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-bottom: 10px;
}

.gmat-stat-lbl {
  display: block;
  font-family: 'Tektur', monospace;
  font-size: 9px;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.gmat-stat-val {
  font-family: 'Tektur', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
}

.gmat-phase-banner {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: 'Tektur', monospace;
  font-size: 10px;
  color: #f1f5f9;
  line-height: 1.35;
}

/* ==========================================================================
   NASA HISTORICAL MISSION MATCHER & GMAT FLIGHT CERTIFICATE (ENDING SCREEN)
   ========================================================================== */
.ending-mission-matcher-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 14px;
  text-align: left;
}

.matcher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.matcher-tag {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1px;
}

.matcher-pct-badge {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  padding: 2px 8px;
  border-radius: 4px;
}

.matcher-mission-name {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin: 4px 0;
  letter-spacing: 0.5px;
}

.matcher-desc {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0 0 10px 0;
}

.matcher-specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-pill {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 10px;
  border-radius: 4px;
  color: #94a3b8;
}

.spec-pill strong {
  color: #38bdf8;
}

.ending-gmat-certificate {
  background: rgba(6, 78, 59, 0.28);
  border: 1px solid rgba(16, 185, 129, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  padding: 12px 18px;
  margin-top: 12px;
  text-align: left;
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.cert-seal {
  font-family: 'Tektur', monospace;
  font-size: 11px;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 1px;
}

.cert-epoch {
  font-family: 'Tektur', monospace;
  font-size: 10px;
  color: #6ee7b7;
}

.cert-text {
  font-size: 11px;
  color: #d1fae5;
  line-height: 1.45;
  margin: 0;
}

.btn-ending-cta.highlight {
  background: #22c55e;
  color: #010006;
  border: 1px solid #22c55e;
  font-weight: 800;
}

.btn-ending-cta.highlight:hover {
  background: #4ade80;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
}


/* ==========================================================================
   🛰️ MODERN CYBER SETTINGS DASHBOARD (FIGMA 456 & OBSIDIAN GLASS AESTHETIC)
   ========================================================================== */
.settings-layout {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 94vw;
  max-width: 980px;
  max-height: 90vh;
  background: #010006 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 2px solid #38bdf8 !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.96), 0 0 35px rgba(56, 189, 248, 0.12) !important;
  padding: 24px 28px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  z-index: 100 !important;
}

.settings-layout::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
}
.settings-layout::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.6) !important;
}
.settings-layout::-webkit-scrollbar-thumb {
  background: #0284c7 !important;
  border-radius: 3px !important;
}
.settings-layout::-webkit-scrollbar-thumb:hover {
  background: #38bdf8 !important;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.settings-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.settings-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  font-size: 10px;
  font-family: 'Tektur', monospace;
  color: #38bdf8;
  letter-spacing: 1px;
}

.settings-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  animation: pulse 2s infinite;
}

.settings-title {
  font-size: clamp(20px, 2.2vw, 26px) !important;
  font-weight: 700 !important;
  font-family: 'Tektur', monospace !important;
  color: #ffffff !important;
  letter-spacing: 1.5px !important;
  margin: 2px 0 0 0 !important;
  text-align: left !important;
  line-height: 1.2 !important;
}

.settings-subtitle {
  font-size: 12px;
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
  margin: 0;
  text-align: left;
}

.settings-header-status {
  padding-top: 4px;
}

.settings-status-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 4px;
  color: #10b981;
  font-family: 'Tektur', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.settings-grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

@media (max-width: 840px) {
  .settings-grid-container {
    grid-template-columns: 1fr;
  }
}

.settings-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, background-color 0.2s;
}

.settings-card:hover {
  border-color: rgba(56, 189, 248, 0.25);
  background: rgba(15, 23, 42, 0.7);
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.settings-card-icon {
  width: 15px;
  height: 15px;
  color: #38bdf8;
  flex-shrink: 0;
}

.settings-card-icon.text-amber {
  color: #f59e0b;
}

.settings-card-title {
  font-size: 11px;
  font-weight: 700;
  font-family: 'Tektur', monospace;
  color: #cbd5e1;
  letter-spacing: 1px;
  margin: 0;
  text-transform: uppercase;
}

.settings-input-box {
  width: 100% !important;
  max-width: 100% !important;
  height: 42px !important;
  background: rgba(2, 6, 23, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  transition: all 0.2s ease !important;
}

.settings-input-box:focus-within {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}

.settings-input {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-family: 'Tektur', monospace !important;
  font-size: 13px !important;
  letter-spacing: 0.5px !important;
}

.settings-toggle-box {
  width: 100% !important;
  max-width: 100% !important;
  height: 38px !important;
}

.settings-audio-toggle-btn {
  width: 100% !important;
  height: 100% !important;
  background: rgba(2, 6, 23, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  color: #e2e8f0 !important;
  font-family: 'Tektur', monospace !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.8px !important;
  transition: all 0.2s ease !important;
}

.settings-audio-toggle-btn:hover {
  background: rgba(15, 23, 42, 0.9) !important;
  border-color: #38bdf8 !important;
}

.settings-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.settings-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.settings-label {
  font-size: 11px !important;
  font-family: 'Tektur', monospace !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  margin: 0 !important;
  text-align: left !important;
  letter-spacing: 0.5px !important;
}

.settings-val-chip {
  font-size: 10px;
  font-family: 'Tektur', monospace;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
  padding: 1px 6px;
  min-width: 38px;
  text-align: center;
}

.settings-slider-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
}

.figma-range-slider {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  height: 5px !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 3px !important;
  outline: none !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: all 0.2s ease !important;
}

.figma-range-slider:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

.figma-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 14px !important;
  height: 18px !important;
  border-radius: 3px !important;
  background: #38bdf8 !important;
  border: 1px solid #7dd3fc !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7) !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

.figma-range-slider::-webkit-slider-thumb:hover {
  background: #0284c7 !important;
  transform: scale(1.18) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.95) !important;
}

.figma-range-slider::-moz-range-thumb {
  width: 14px !important;
  height: 18px !important;
  border-radius: 3px !important;
  background: #38bdf8 !important;
  border: 1px solid #7dd3fc !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7) !important;
  cursor: pointer !important;
  transition: transform 0.15s ease !important;
}

.settings-controls-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  background: rgba(2, 6, 23, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}

.settings-controls-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-family: 'Tektur', monospace !important;
  font-size: 11px !important;
  color: #e2e8f0 !important;
}

.settings-controls-table th {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #38bdf8 !important;
  text-align: left !important;
  padding: 6px 12px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.8px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.settings-controls-table td {
  padding: 6px 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  font-size: 11px !important;
}

.settings-controls-table tr:hover td {
  background: rgba(56, 189, 248, 0.05) !important;
}

.settings-controls-table tr:last-child td {
  border-bottom: none !important;
}

.settings-controls-table kbd {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: 4px !important;
  padding: 1px 6px !important;
  font-size: 10px !important;
  color: #38bdf8 !important;
  font-family: 'Tektur', monospace !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.settings-danger-card {
  border-color: rgba(245, 158, 11, 0.25) !important;
}
.settings-danger-card:hover {
  border-color: rgba(245, 158, 11, 0.45) !important;
}

.settings-mission-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.settings-mission-btn {
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 6px !important;
  font-family: 'Tektur', monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 10px !important;
}

.settings-mission-btn.restart-mission-btn {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
}
.settings-mission-btn.restart-mission-btn:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4) !important;
}

.settings-mission-btn.quit-mission-btn {
  background: rgba(56, 189, 248, 0.1) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #7dd3fc !important;
}
.settings-mission-btn.quit-mission-btn:hover {
  background: rgba(56, 189, 248, 0.22) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4) !important;
}

.settings-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.settings-back-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 10px 36px !important;
  font-size: 13px !important;
  font-family: 'Tektur', monospace !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid #38bdf8 !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
}

.settings-back-btn:hover {
  background: #0284c7 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6) !important;
  transform: translateY(-1px) !important;
}


/* ==========================================================================
   🎨 EXACT FIGMA NODES 456:112, 456:32, 456:81 THEMED SETTINGS MODAL
   ========================================================================== */
.figma-settings-popup {
  width: 900px !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
  background: #010006 !important;
  border: 1.5px solid #d9d9d9 !important;
  border-radius: 12px !important;
  padding: 32px 32px 24px 32px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 255, 255, 0.08) !important;
  animation: modalScaleFadeIn 0.25s ease-out !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 1000 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  gap: 16px !important;
}

.figma-settings-popup::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
}
.figma-settings-popup::-webkit-scrollbar-track {
  background: #010006 !important;
}
.figma-settings-popup::-webkit-scrollbar-thumb {
  background: #d9d9d9 !important;
  border-radius: 3px !important;
}

.figma-settings-title {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 30px !important;
  font-weight: 500 !important;
  color: #f8f3f0 !important;
  margin: 0 0 12px 0 !important;
  text-align: center !important;
  letter-spacing: 0.5px !important;
}

.figma-settings-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  width: 100% !important;
}

@media (max-width: 820px) {
  .figma-settings-grid {
    grid-template-columns: 1fr !important;
  }
}

.figma-settings-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
}

.figma-settings-card {
  background: #010006 !important;
  border: 1.5px solid rgba(227, 227, 227, 0.3) !important;
  border-radius: 10px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  transition: border-color 0.2s ease !important;
}

.figma-settings-card:hover {
  border-color: #d9d9d9 !important;
}

.figma-sliders-card {
  gap: 12px !important;
}

.figma-settings-label {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #d9d9d9 !important;
  letter-spacing: 0.5px !important;
  margin: 0 !important;
  text-align: left !important;
}

.figma-settings-input-box {
  width: 100% !important;
  height: 48px !important;
  background: rgba(217, 217, 217, 0.08) !important;
  border: 1.5px solid #e3e3e3 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 14px !important;
  transition: all 0.2s ease !important;
}

.figma-settings-input-box:focus-within {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35) !important;
}

.figma-settings-input {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #f8f3f0 !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
}

.figma-settings-toggle-box {
  width: 100% !important;
  height: 48px !important;
}

.figma-settings-btn {
  width: 100% !important;
  height: 100% !important;
  background: #010006 !important;
  border: 1.5px solid #e3e3e3 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  color: #f8f3f0 !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
  transition: all 0.2s ease !important;
}

.figma-settings-btn:hover {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.08) !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3) !important;
}

.figma-slider-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
}

.figma-slider-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

.figma-slider-val {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 4px !important;
  padding: 2px 8px !important;
  min-width: 40px !important;
  text-align: center !important;
}

.figma-slider-wrap {
  width: 100% !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
}

/* Figma 456 Slider Track & Thumb */
.figma-range-slider {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  height: 5px !important;
  background: rgba(217, 217, 217, 0.25) !important;
  border: 1px solid rgba(227, 227, 227, 0.3) !important;
  border-radius: 3px !important;
  outline: none !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: all 0.2s ease !important;
}

.figma-range-slider:hover {
  background: rgba(217, 217, 217, 0.4) !important;
  border-color: #38bdf8 !important;
}

.figma-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 14px !important;
  height: 20px !important;
  border-radius: 3px !important;
  background: #38bdf8 !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8) !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

.figma-range-slider::-webkit-slider-thumb:hover {
  background: #0284c7 !important;
  transform: scale(1.15) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 1) !important;
}

.figma-range-slider::-moz-range-thumb {
  width: 14px !important;
  height: 20px !important;
  border-radius: 3px !important;
  background: #38bdf8 !important;
  border: 1.5px solid #ffffff !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8) !important;
  cursor: pointer !important;
  transition: transform 0.15s ease !important;
}

.figma-table-wrap {
  width: 100% !important;
  background: #010006 !important;
  border: 1.5px solid #e3e3e3 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

.figma-controls-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 11px !important;
  color: #f8f3f0 !important;
}

.figma-controls-table th {
  background: rgba(217, 217, 217, 0.08) !important;
  color: #d9d9d9 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.8px !important;
  padding: 8px 12px !important;
  text-align: left !important;
  border-bottom: 1px solid rgba(227, 227, 227, 0.15) !important;
}

.figma-controls-table td {
  padding: 7px 12px !important;
  border-bottom: 1px solid rgba(227, 227, 227, 0.08) !important;
  font-size: 11px !important;
  color: #f8f3f0 !important;
}

.figma-controls-table tr:last-child td {
  border-bottom: none !important;
}

.figma-controls-table tr:hover td {
  background: rgba(255, 255, 255, 0.03) !important;
}

.figma-controls-table kbd {
  background: rgba(217, 217, 217, 0.1) !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 4px !important;
  padding: 1px 6px !important;
  font-size: 10px !important;
  color: #f8f3f0 !important;
  font-family: 'Tektur', monospace, sans-serif !important;
}

.figma-mission-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  width: 100% !important;
}

.figma-btn-action {
  height: 44px !important;
  background: #010006 !important;
  border: 1.5px solid #e3e3e3 !important;
  border-radius: 8px !important;
  color: #f8f3f0 !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
  padding: 0 10px !important;
}

.figma-btn-action.restart-mission-btn:hover {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35) !important;
}

.figma-btn-action.quit-mission-btn:hover {
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.1) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35) !important;
}


/* ==========================================================================
   🎯 EXACT FIGMA NODE 378:131 RESPONSIVE SETTINGS IMPLEMENTATION
   ========================================================================== */
.figma-node-378-131 {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 100% !important;
  max-width: 1400px !important;
  max-height: 96vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: clamp(20px, 4vh, 48px) clamp(20px, 4vw, 64px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  z-index: 100 !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(217, 217, 217, 0.3) transparent !important;
}

.figma-node-378-131::-webkit-scrollbar {
  display: block !important;
  width: 6px !important;
}
.figma-node-378-131::-webkit-scrollbar-thumb {
  background: rgba(217, 217, 217, 0.3) !important;
  border-radius: 3px !important;
}

/* Title (Node 378:132) */
.figma-title-378 {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(28px, 3vw, 40px) !important;
  font-weight: 400 !important;
  color: #ffffff !important;
  text-align: center !important;
  margin: 0 0 clamp(16px, 2.5vh, 32px) 0 !important;
  letter-spacing: 1px !important;
  line-height: normal !important;
}

/* Player Name Section (Node 378:224) */
.figma-player-name-section {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  margin-bottom: clamp(16px, 2.5vh, 28px) !important;
}

.figma-label-378 {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(22px, 2.2vw, 35px) !important;
  font-weight: 400 !important;
  color: #ffffff !important;
  text-align: center !important;
  margin: 0 0 clamp(10px, 1.8vh, 18px) 0 !important;
  line-height: normal !important;
}

.figma-input-box-378 {
  width: 100% !important;
  max-width: 580px !important;
  height: clamp(54px, 6.5vh, 71px) !important;
  background: rgba(217, 217, 217, 0.05) !important;
  border: 1px solid #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 20px !important;
  transition: all 0.2s ease !important;
}

.figma-input-box-378:focus-within {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4) !important;
}

.figma-input-378 {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(22px, 2.2vw, 35px) !important;
  font-weight: 400 !important;
  text-align: center !important;
  opacity: 0.85 !important;
  letter-spacing: 1px !important;
}

/* Audio Toggle Section (Node 495:201) */
.figma-audio-section {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(16px, 3vw, 42px) !important;
  width: 100% !important;
  margin-bottom: clamp(16px, 3vh, 36px) !important;
}

.figma-audio-section .figma-label-378 {
  margin: 0 !important;
}

/* Exact Figma Group 74 SVG Pill Toggle Switch (93px x 45px) */
.figma-audio-toggle {
  position: relative !important;
  width: 93px !important;
  height: 45px !important;
  background: #d9d9d9 !important;
  border-radius: 22.5px !important;
  cursor: pointer !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  transition: background 0.22s ease, box-shadow 0.22s ease !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  user-select: none !important;
  pointer-events: auto !important;
}

.figma-audio-toggle:hover {
  box-shadow: 0 0 16px rgba(217, 217, 217, 0.6) !important;
}

.figma-audio-toggle.is-off {
  background: #434349 !important;
}

.figma-audio-knob {
  position: absolute !important;
  top: 5px !important;
  left: 51px !important;
  width: 35px !important;
  height: 35px !important;
  border-radius: 50% !important;
  background: #010006 !important;
  pointer-events: none !important;
  transition: left 0.22s cubic-bezier(0.4, 0, 0.2, 1), background 0.22s ease !important;
}

.figma-audio-toggle.is-off .figma-audio-knob {
  left: 7px !important;
  background: #ffffff !important;
}

/* 2-Column Responsive Sliders (Nodes 495:199 & 495:200) */
.figma-settings-columns {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: clamp(24px, 5vw, 92px) !important;
  width: 100% !important;
  max-width: 1320px !important;
  align-items: start !important;
}

@media (max-width: 860px) {
  .figma-settings-columns {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
}

.figma-slider-col {
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(24px, 4vh, 48px) !important;
  width: 100% !important;
}

.figma-slider-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
}

.figma-slider-wrap {
  width: 100% !important;
  max-width: 626px !important;
  height: 35px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Exact Figma SVG Slider Style (10px track, 35px circular thumb) */
.figma-range-slider {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  max-width: 626px !important;
  height: 10px !important;
  background: rgba(217, 217, 217, 0.25) !important;
  border-radius: 5px !important;
  outline: none !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: background 0.2s ease !important;
}

.figma-range-slider:hover {
  background: rgba(217, 217, 217, 0.4) !important;
}

.figma-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 35px !important;
  height: 35px !important;
  border-radius: 50% !important;
  background: #d9d9d9 !important;
  border: none !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
}

.figma-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1) !important;
  background: #ffffff !important;
}

.figma-range-slider::-moz-range-thumb {
  width: 35px !important;
  height: 35px !important;
  border-radius: 50% !important;
  background: #d9d9d9 !important;
  border: none !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
  cursor: pointer !important;
  transition: transform 0.15s ease !important;
}

/* Auxiliary Tools (Mission Ops & Controls Drawer) */
.figma-aux-section {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 626px !important;
  gap: 12px !important;
  margin-top: 8px !important;
}

.figma-aux-buttons-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  width: 100% !important;
  justify-content: center !important;
}

.figma-aux-btn {
  background: rgba(217, 217, 217, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.figma-aux-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: #ffffff !important;
}

.figma-aux-btn.restart-mission-btn:hover {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

.figma-controls-drawer {
  width: 100% !important;
  max-width: 626px !important;
  background: rgba(2, 1, 10, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  animation: fadeIn 0.2s ease !important;
}

.figma-controls-drawer.hidden {
  display: none !important;
}

/* Back Button (Node 378:133) */
.figma-back-378 {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(26px, 2.5vw, 35px) !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  line-height: normal !important;
  letter-spacing: 1px !important;
  margin-top: clamp(20px, 3vh, 48px) !important;
  padding: 8px 32px !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.figma-back-378:hover {
  opacity: 0.7 !important;
  transform: translateY(-2px) !important;
}

/* =========================================================================
   MOBILE INTERACTIVE ON-SCREEN CONTROLS (HUD JOYSTICK & ACTION HUB)
   ========================================================================= */

.mobile-controls-overlay {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 120 !important;
  display: none !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.mobile-controls-overlay.visible {
  display: block !important;
}

/* LEFT: Floating Virtual Analog Joystick */
.mobile-joystick-zone {
  position: absolute !important;
  left: max(16px, env(safe-area-inset-left)) !important;
  bottom: max(20px, env(safe-area-inset-bottom)) !important;
  width: 140px !important;
  height: 140px !important;
  pointer-events: auto !important;
  touch-action: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.mobile-joystick-base {
  position: relative !important;
  width: 120px !important;
  height: 120px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(14, 28, 48, 0.45) 0%, rgba(3, 8, 18, 0.85) 100%) !important;
  border: 2px solid rgba(0, 229, 255, 0.4) !important;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.25), inset 0 0 16px rgba(0, 229, 255, 0.15) !important;
  backdrop-filter: blur(6px) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.mobile-joystick-base.boost {
  border-color: #ffd700 !important;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.6), inset 0 0 20px rgba(255, 215, 0, 0.3) !important;
}

.joystick-ring-outer {
  position: absolute !important;
  inset: -6px !important;
  border-radius: 50% !important;
  border: 1px dashed rgba(0, 229, 255, 0.3) !important;
  pointer-events: none !important;
}

.joystick-compass-tick {
  position: absolute !important;
  width: 4px !important;
  height: 4px !important;
  border-radius: 50% !important;
  background: #00e5ff !important;
  opacity: 0.7 !important;
  pointer-events: none !important;
}
.joystick-compass-tick.n { top: 6px !important; left: calc(50% - 2px) !important; }
.joystick-compass-tick.s { bottom: 6px !important; left: calc(50% - 2px) !important; }
.joystick-compass-tick.w { left: 6px !important; top: calc(50% - 2px) !important; }
.joystick-compass-tick.e { right: 6px !important; top: calc(50% - 2px) !important; }

.mobile-joystick-knob {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 52px !important;
  height: 52px !important;
  margin-top: -26px !important;
  margin-left: -26px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 35% 35%, #00e5ff 0%, #0077aa 55%, #022033 100%) !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.7), 0 3px 8px rgba(0, 0, 0, 0.6) !important;
  pointer-events: none !important;
  will-change: transform !important;
}

.knob-core {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 14px !important;
  height: 14px !important;
  margin-top: -7px !important;
  margin-left: -7px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  box-shadow: 0 0 8px #ffffff !important;
}

.knob-ring {
  position: absolute !important;
  inset: 5px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.joystick-label {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 9px !important;
  letter-spacing: 1px !important;
  color: rgba(0, 229, 255, 0.6) !important;
  margin-top: 6px !important;
  text-align: center !important;
  text-shadow: 0 0 4px rgba(0, 229, 255, 0.5) !important;
}

/* CENTER / RIGHT: Multi-Touch 360 Camera Drag Surface */
.mobile-touch-look-zone {
  position: absolute !important;
  top: 70px !important;
  bottom: 0 !important;
  left: 170px !important;
  right: 0 !important;
  pointer-events: auto !important;
  touch-action: none !important;
  z-index: 10 !important;
}

/* RIGHT: Action Cluster */
.mobile-actions-cluster {
  position: absolute !important;
  right: max(16px, env(safe-area-inset-right)) !important;
  bottom: max(20px, env(safe-area-inset-bottom)) !important;
  pointer-events: auto !important;
  z-index: 20 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 12px !important;
}

/* Primary Interact / Use Button */
.btn-interact {
  position: relative !important;
  width: 68px !important;
  height: 68px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 35% 35%, rgba(0, 229, 255, 0.35) 0%, rgba(6, 20, 38, 0.9) 100%) !important;
  border: 2px solid rgba(0, 229, 255, 0.65) !important;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35) !important;
  color: #00e5ff !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  outline: none !important;
  touch-action: manipulation !important;
  transition: transform 0.12s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  backdrop-filter: blur(8px) !important;
}

.btn-interact:active {
  transform: scale(0.92) !important;
  background: radial-gradient(circle at 35% 35%, rgba(0, 229, 255, 0.6) 0%, rgba(6, 20, 38, 0.95) 100%) !important;
}

.btn-interact.in-range {
  border-color: #00ffff !important;
  box-shadow: 0 0 28px rgba(0, 255, 255, 0.8), inset 0 0 14px rgba(0, 255, 255, 0.4) !important;
  animation: mobileInteractPulse 1.4s infinite ease-in-out !important;
}

@keyframes mobileInteractPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(0, 255, 255, 0.7); }
  50% { transform: scale(1.08); box-shadow: 0 0 34px rgba(0, 255, 255, 1); }
}

.btn-interact .action-svg {
  width: 26px !important;
  height: 26px !important;
  stroke: #ffffff !important;
}

.btn-interact .btn-label {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 8px !important;
  font-weight: 700 !important;
  color: #00e5ff !important;
  letter-spacing: 0.5px !important;
  margin-top: 2px !important;
  text-shadow: 0 0 4px rgba(0, 229, 255, 0.8) !important;
}

/* Secondary Actions Cluster Arc */
.mobile-sub-actions-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.mobile-action-btn.btn-sub {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(14, 25, 45, 0.8) 0%, rgba(4, 10, 20, 0.9) 100%) !important;
  border: 1.5px solid rgba(0, 229, 255, 0.4) !important;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2) !important;
  color: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  outline: none !important;
  touch-action: manipulation !important;
  transition: transform 0.1s ease, border-color 0.2s ease, background 0.2s ease !important;
  backdrop-filter: blur(6px) !important;
}

.mobile-action-btn.btn-sub:active {
  transform: scale(0.9) !important;
}

.mobile-action-btn.btn-sub.active {
  border-color: #ffd700 !important;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.6) !important;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(20, 15, 2, 0.9) 100%) !important;
}

.mobile-action-btn.btn-sub .btn-sub-icon {
  font-size: 15px !important;
  line-height: 1 !important;
}

.mobile-action-btn.btn-sub .btn-sub-label {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 7px !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.8) !important;
  letter-spacing: 0.5px !important;
  margin-top: 1px !important;
}

/* =========================================================================
   MOBILE RESPONSIVENESS (SCREENS <= 860px)
   ========================================================================= */

@media (max-width: 860px) {
  /* Cleanroom Top HUD on Mobile */
  .fps-top-bar.node-375-frame {
    transform: scale(0.85) !important;
    transform-origin: top center !important;
    top: 6px !important;
    max-width: 98vw !important;
  }

  .top-bar-boxes-container {
    gap: 6px !important;
  }

  .hud-frame-box {
    padding: 0 8px !important;
    font-size: 12px !important;
  }

  /* Sticky Passcode HUD Widget */
  .hud-sticky-passcodes-bar {
    top: 64px !important;
    left: 8px !important;
    transform: scale(0.85) !important;
    transform-origin: top left !important;
  }

  /* Interaction Center Prompt */
  .fps-interaction-prompt {
    bottom: 110px !important;
    transform: translateX(-50%) scale(0.9) !important;
    padding: 8px 16px !important;
  }

  /* Facility Modals Full-Bleed on Small Screens */
  .facility-modal-card {
    width: 95vw !important;
    max-width: 95vw !important;
    height: 90vh !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    padding: 16px !important;
  }

  /* 3D Workbenches responsive canvas & step guides */
  .wb-figma-viewport-wrapper {
    height: 60vh !important;
  }

  .wb-shelf-card {
    min-width: 64px !important;
    min-height: 64px !important;
  }

  /* Mini-game canvas */
  #miniGameCanvas {
    max-width: 92vw !important;
    height: auto !important;
  }
}

/* =========================================================================
   PHASE 5: TARGET SELECTION / OBSERVATORY SCREEN (FIGMA NODE 504:60)
   ========================================================================= */

.figma-node-504-60,
.target-selection-layout {
  position: relative !important;
  z-index: 10 !important;
  width: 100% !important;
  max-width: 1440px !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  padding: clamp(24px, 4vh, 48px) clamp(20px, 3.5vw, 48px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  user-select: none !important;
}

/* Header Area (Node 504:61) */
.target-header-block {
  text-align: center !important;
  margin-top: clamp(10px, 2.5vh, 28px) !important;
  margin-bottom: clamp(16px, 3vh, 32px) !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 16px !important;
}

.figma-title-504,
.target-title {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(28px, 2.8vw, 38px) !important;
  font-weight: 400 !important;
  color: #ffffff !important;
  letter-spacing: 1.5px !important;
  margin: 0 !important;
  text-align: center !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7) !important;
}

/* Educational Difficulty Selector (Age 13+ Friendly) */
.target-difficulty-selector {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 5px 8px !important;
  background: rgba(2, 1, 10, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
}

.target-diff-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 16px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(10px, 1.1vw, 12px) !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.6) !important;
  letter-spacing: 1px !important;
  transition: all 0.2s ease !important;
}

.target-diff-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.target-diff-btn.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  font-weight: 600 !important;
}

/* 3-Column Observatory Targets Grid (Figma Node 504:60) */
.figma-observatory-grid,
.target-grid-3col {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(20px, 3.2vw, 44px) !important;
  width: 100% !important;
  max-width: 1320px !important;
  align-items: flex-start !important;
  justify-content: center !important;
  margin: auto 0 !important;
  padding: 10px 0 !important;
}

@media (max-width: 1024px) {
  .figma-observatory-grid,
  .target-grid-3col {
    grid-template-columns: 1fr !important;
    max-width: 440px !important;
    gap: 36px !important;
  }
}

/* Observatory Target Card (Figma Nodes 504:83, 504:84, 504:85) */
.target-card-figma {
  background: transparent !important;
  border: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: transform 0.25s ease, opacity 0.25s ease !important;
  box-sizing: border-box !important;
  outline: none !important;
}

/* Subtitle on Top (Nodes 504:88, 504:99, 504:103) */
.target-card-subtitle {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(15px, 1.4vw, 20px) !important;
  font-weight: 400 !important;
  color: #ffffff !important;
  letter-spacing: 0.5px !important;
  margin: 0 0 16px 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

/* Middle Image Wrap with 1px border #e3e3e3 */
.target-card-image-wrap {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 360 / 265 !important;
  max-height: 290px !important;
  border: 1px solid #e3e3e3 !important;
  background: #02010A !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease !important;
}

.target-card-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s ease !important;
}

/* Hover Overlay for Active Target */
.target-hover-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(2, 1, 10, 0.45) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  transition: opacity 0.25s ease !important;
}

.target-action-label {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 1.5px !important;
  color: #ffffff !important;
  padding: 6px 14px !important;
  background: rgba(2, 1, 10, 0.9) !important;
  border: 1px solid #ffffff !important;
  border-radius: 2px !important;
  text-transform: uppercase !important;
}

/* Title on Bottom (Nodes 504:86, 504:98, 504:102) */
.target-card-name {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(22px, 2.3vw, 32px) !important;
  font-weight: 400 !important;
  color: #ffffff !important;
  letter-spacing: 0.5px !important;
  margin: 18px 0 0 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
}

/* Active Target States */
.target-card-figma.active-target:hover {
  transform: translateY(-4px) !important;
}

.target-card-figma.active-target:hover .target-card-image-wrap {
  border-color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12) !important;
}

.target-card-figma.active-target:hover .target-card-img {
  transform: scale(1.03) !important;
}

.target-card-figma.active-target:hover .target-hover-overlay {
  opacity: 1 !important;
}

.target-card-figma.active-target:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 4px !important;
}

/* Locked Targets (Figma 55% Opacity) */
.target-card-figma.locked-target {
  opacity: 0.55 !important;
  cursor: pointer !important;
}

.target-card-figma.locked-target:hover {
  opacity: 0.75 !important;
  transform: translateY(-2px) !important;
}

.target-card-figma.locked-target:hover .target-hover-overlay {
  opacity: 1 !important;
}

/* Accessible Screen Reader Action Button */
.sr-only-action {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Back Button (Figma Node 504:62) */
.figma-back-504,
.target-back-btn {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(24px, 2.5vw, 35px) !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  letter-spacing: 1px !important;
  margin-top: clamp(24px, 4vh, 48px) !important;
  margin-bottom: clamp(10px, 2vh, 24px) !important;
  text-align: center !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.figma-back-504:hover,
.target-back-btn:hover {
  opacity: 0.7 !important;
  transform: translateY(-2px) !important;
}

.figma-back-504:focus-visible,
.target-back-btn:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 4px !important;
}



/* Research Paper NASA Citations Grid (Figma Document Sheet) */
.paper-citations-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  margin-top: 14px !important;
}

.paper-citation-card {
  padding: 14px 16px !important;
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.18) !important;
  border-radius: 4px !important;
}

.citation-head {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 6px !important;
}

.citation-badge {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 1px !important;
  padding: 2px 8px !important;
  background: #1e3a8a !important;
  color: #ffffff !important;
  border-radius: 2px !important;
}

.citation-title {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #111827 !important;
}

.citation-text {
  font-size: 12px !important;
  color: #374151 !important;
  line-height: 1.5 !important;
  margin: 0 0 8px 0 !important;
}

.citation-link-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 11px !important;
}

.citation-link-label {
  font-weight: 600 !important;
  color: #4b5563 !important;
}

.citation-link-code {
  font-family: monospace !important;
  color: #1d4ed8 !important;
  font-weight: 600 !important;
}

/* =========================================================================
   KEYCARD ACCESS MODAL (FIGMA NODE 505:114)
   ========================================================================= */
.modal-keycard-figma-505 {
  width: min(92vw, 830px) !important;
  height: min(85vh, 497px) !important;
  background: #000000 !important;
  border: 1px solid #e3e3e3 !important;
  border-radius: 2px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  padding: 40px 24px !important;
  box-sizing: border-box !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95) !important;
}

.modal-close-btn-figma {
  position: absolute !important;
  top: 14px !important;
  right: 18px !important;
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 28px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  opacity: 0.7 !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.modal-close-btn-figma:hover {
  opacity: 1 !important;
  transform: scale(1.1) !important;
}

/* Keycard PVC Card Surface */
.keycard-card-surface {
  width: min(92%, 520px) !important;
  aspect-ratio: 520 / 270 !important;
  max-height: 275px !important;
  background: #091380 !important;
  border: 1px solid rgba(227, 227, 227, 0.45) !important;
  border-radius: 12px !important;
  position: relative !important;
  overflow: hidden !important;
  padding: clamp(20px, 3vh, 28px) clamp(24px, 3.5vw, 36px) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  user-select: none !important;
}

.keycard-content-left {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

.keycard-title-line {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(20px, 2.3vw, 28px) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: 0.5px !important;
  line-height: 1.25 !important;
}

.keycard-sub-line {
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: clamp(20px, 2.3vw, 28px) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: 0.5px !important;
  margin-top: 4px !important;
  line-height: 1.25 !important;
}

.keycard-rfid-icon {
  margin-top: auto !important;
  padding-top: 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.rfid-dot {
  font-size: 14px !important;
  line-height: 1 !important;
}

.rfid-waves-svg {
  width: 22px !important;
  height: 22px !important;
  stroke: rgba(255, 255, 255, 0.7) !important;
}

/* NASA Insignia Watermark on Right */
.keycard-nasa-watermark {
  position: absolute !important;
  right: -15px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: clamp(220px, 28vw, 300px) !important;
  height: clamp(220px, 28vw, 300px) !important;
  pointer-events: none !important;
  z-index: 1 !important;
  opacity: 0.85 !important;
}

.nasa-meatball-svg {
  width: 100% !important;
  height: 100% !important;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5)) !important;
}

/* Action Button: Equip */
.btn-equip-keycard-figma {
  margin-top: clamp(24px, 3.5vh, 36px) !important;
  width: 150px !important;
  height: 48px !important;
  background: #2b2b2b !important;
  border: 1px solid #e3e3e3 !important;
  border-radius: 2px !important;
  color: #ffffff !important;
  font-family: 'Tektur', monospace, sans-serif !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  letter-spacing: 1px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.btn-equip-keycard-figma:hover {
  background: #3d3d3d !important;
  border-color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1) !important;
}

.btn-equip-keycard-figma:active {
  transform: scale(0.96) !important;
}

.btn-equip-keycard-figma:disabled,
.btn-equip-keycard-figma.disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background: #181818 !important;
  border-color: #444444 !important;
  color: #777777 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* --- Lobby Multiplayer Waiting for Players Status Pill --- */
.lobby-waiting-status-banner {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px;
  background: rgba(2, 1, 10, 0.88);
  border: 1px solid rgba(227, 227, 227, 0.55);
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: #ffffff;
  pointer-events: none;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.lobby-waiting-status-banner .status-radar-ping {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: radarPingPulse 1.6s infinite ease-in-out;
}

@keyframes radarPingPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #38bdf8; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.lobby-waiting-status-banner.all-ready {
  border-color: rgba(34, 197, 94, 0.75);
}

.lobby-waiting-status-banner.all-ready .status-radar-ping {
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
}

.modal-waiting-players-notice {
  font-family: 'Tektur', monospace, sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-weight: 500;
}

.modal-waiting-players-notice.all-ready {
  color: #22c55e;
}

.keycard-card-img-figma {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: 8px !important;
}
