/* ==========================================================================
   DRIFT TABLE // STARFINDER PACT WORLDS & DRIFT NAVIGATION HUD
   Readable instruments, holographic datapad framing, warm navigation light,
   deep-space telemetry. Preserves flexbox layout for legacy & modern devices.
   ========================================================================== */

:root {
  --deck-gold: #f5b963;
  --deck-gold-bright: #ffd285;
  --deck-ink: #060d18;
  --deck-panel: #0d1c2e;
  --deck-panel-hi: #132840;
  --deck-line: #2e4d66;
  --deck-cyan: #5efce8;
  --deck-cyan-dim: #38bdf8;
  --deck-green: #79f2d0;
  --font-display: 'Orbitron', 'Chakra Petch', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui: 'Chakra Petch', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'Share Tech Mono', ui-monospace, Consolas, "Courier New", monospace;
}

/* Deep-space Drift nebula & tactical starfield grid */
body {
  background-color: #050b14;
  background-image:
    radial-gradient(circle at 15% 18%, rgba(0, 240, 255, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 85% 12%, rgba(245, 185, 99, 0.08) 0%, transparent 38%),
    radial-gradient(circle at 50% 85%, rgba(94, 252, 232, 0.05) 0%, transparent 50%),
    linear-gradient(rgba(56, 189, 248, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.022) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 44px 44px, 44px 44px;
  background-attachment: fixed;
  color: #edf5fc;
  font-family: var(--font-body);
}

/* Sci-Fi Typography Hierarchy */
h1, .lobby h1, .deck-hero h1, .bridge-hero h1, .alien-hero h1, .view-heading h1, .guide-header h1 {
  font-family: var(--font-display);
  letter-spacing: -0.5px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
}

h2, h3, h4, .nav-button, button, .item-name, .cargo-name, .choice-copy h3 {
  font-family: var(--font-ui);
  letter-spacing: 0.3px;
}

.eyebrow, .deck-kicker, .room-tag, .badge, .bridge-coordinate, .alien-folio, .alien-count,
.round-counter small, .round-counter strong, .tactical-initiative small, .tactical-initiative strong,
.tactical-order, .deck-result, .big-number, .roll-number, .quick-roll .die-value, .recovery-code,
.invite-code small, .invite-code strong, .edition-strip span, .deck-chart > span {
  font-family: var(--font-mono);
}

/* Masthead // Starship Bridge Overhead Telemetry Bar */
.masthead {
  background: linear-gradient(180deg, rgba(6, 13, 24, 0.96) 0%, rgba(10, 22, 38, 0.92) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(94, 252, 232, 0.25);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.6), inset 0 -1px 0 rgba(245, 185, 99, 0.18);
  padding: 18px 3%;
  min-height: 86px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  font-family: var(--font-display);
  letter-spacing: 3px;
  font-weight: 800;
  font-size: 21px;
  text-shadow: 0 0 18px rgba(94, 252, 232, 0.25);
}

.brand-mark {
  color: #f5b963;
  font-size: 40px;
  text-shadow: 0 0 16px rgba(245, 185, 99, 0.65), 0 0 32px rgba(94, 252, 232, 0.35);
  display: inline-block;
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
  transform: rotate(45deg) scale(1.08);
}

.brand-light {
  color: #6beee0;
  font-weight: 400;
  margin-left: 2px;
}

.brand small {
  font-family: var(--font-mono);
  letter-spacing: 2.6px;
  color: #8eb2c9;
  font-size: 11px;
  margin-top: 6px;
}

.masthead .room-tag {
  letter-spacing: 1.2px;
  background: rgba(8, 20, 34, 0.82);
  border: 1px solid rgba(76, 134, 168, 0.42);
  border-left: 3px solid #5efce8;
  padding: 7px 15px;
  border-radius: 6px;
  box-shadow: inset 0 0 14px rgba(94, 252, 232, 0.05);
}

.masthead .room-tag .badge, .badge {
  background: linear-gradient(135deg, rgba(20, 62, 72, 0.95), rgba(14, 40, 54, 0.95));
  border: 1px solid rgba(94, 252, 232, 0.45);
  color: #a8fff0;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(94, 252, 232, 0.12);
}

#connection {
  color: #79f2d0;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

#connection::before {
  content: "● ";
  color: #5efce8;
  text-shadow: 0 0 8px #5efce8;
}

#connection.connection-bad {
  color: #ffb499;
}

#connection.connection-bad::before {
  color: #ff6b6b;
  text-shadow: 0 0 8px #ff6b6b;
}

/* Workspace & Left Command Rail */
.workspace {
  max-width: 1720px;
}

.workspace[data-current-view=overview] .side-feed,
.workspace[data-current-view=encounter] .side-feed {
  display: none;
}

.rail {
  width: 204px;
  background: linear-gradient(180deg, rgba(8, 18, 31, 0.9) 0%, rgba(6, 13, 24, 0.95) 100%);
  border-right: 1px solid rgba(64, 112, 145, 0.38);
  box-shadow: inset -1px 0 0 rgba(94, 252, 232, 0.08);
  padding: 24px 12px;
}

.rail .nav-button {
  border-radius: 6px;
  padding: 11px 13px;
  margin: 3px 0;
  color: #9cb8cd;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.6px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
}

.rail .nav-button:hover {
  background: rgba(24, 54, 76, 0.65);
  color: #e6f7ff;
  border-color: rgba(94, 252, 232, 0.25);
  transform: translateX(2px);
}

.rail .nav-button.active {
  background: linear-gradient(90deg, rgba(24, 72, 84, 0.88) 0%, rgba(15, 42, 58, 0.75) 100%);
  color: #b8fff2;
  border-color: rgba(94, 252, 232, 0.42);
  box-shadow: inset 3px 0 0 #5efce8, 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 15px rgba(94, 252, 232, 0.12);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 9px;
  border-radius: 5px;
  background: rgba(12, 28, 46, 0.8);
  border: 1px solid rgba(82, 138, 170, 0.32);
  color: #72e5d4;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: inset 0 0 8px rgba(94, 252, 232, 0.08);
}

.rail .nav-button.active .nav-icon {
  background: rgba(94, 252, 232, 0.16);
  border-color: #5efce8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(94, 252, 232, 0.35);
}

.nav-jump {
  margin-bottom: 20px;
  padding: 10px 13px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(135deg, rgba(25, 48, 68, 0.9), rgba(14, 29, 45, 0.95));
  border: 1px solid rgba(245, 185, 99, 0.45);
  border-left: 3px solid #f5b963;
  color: #f7e4c6;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.nav-jump:hover {
  background: linear-gradient(135deg, rgba(35, 65, 90, 0.95), rgba(20, 40, 62, 0.98));
  border-color: #ffd285;
  box-shadow: 0 0 16px rgba(245, 185, 99, 0.22);
}

.nav-jump span {
  font-size: 19px;
  line-height: 1;
  margin-right: 9px;
  color: #f5b963;
}

.rail-bottom {
  border-top: 1px solid rgba(56, 98, 128, 0.35);
  padding-top: 20px;
  margin-top: auto;
}

/* Main Content & Holographic Panels */
.table-main {
  padding: 32px;
  max-width: 100%;
}

.panel, .crew-card, .catalog-card, .alien-card, .choice-card {
  position: relative;
  border: 1px solid rgba(62, 108, 142, 0.52);
  background:
    linear-gradient(160deg, rgba(17, 36, 56, 0.92) 0%, rgba(10, 21, 35, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(122, 238, 218, 0.22),
    inset 0 0 28px rgba(0, 240, 255, 0.03),
    0 10px 30px rgba(2, 8, 16, 0.6);
  border-radius: 10px;
}

.panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(94, 252, 232, 0.65) 25%, rgba(245, 185, 99, 0.65) 75%, transparent);
  pointer-events: none;
  opacity: 0.75;
}

.crew-card, .catalog-card, .alien-card, .choice-card {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.crew-card:hover, .catalog-card:hover, .alien-card:hover, .choice-card:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 252, 232, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(122, 238, 218, 0.4),
    0 14px 34px rgba(0, 0, 0, 0.65),
    0 0 20px rgba(94, 252, 232, 0.14);
}

/* Tactile Sci-Fi Buttons */
button {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 6px;
  border: 1px solid rgba(75, 126, 160, 0.6);
  background: linear-gradient(180deg, rgba(24, 47, 68, 0.92) 0%, rgba(15, 31, 48, 0.96) 100%);
  color: #eaf4fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.16s ease;
}

button:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(34, 66, 94, 0.96) 0%, rgba(22, 45, 68, 0.98) 100%);
  border-color: #7ce8d8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 14px rgba(94, 252, 232, 0.22);
  color: #ffffff;
}

button.primary {
  background: linear-gradient(135deg, #f5c276 0%, #e5a247 100%);
  border-color: #ffe0a8;
  color: #0b1622;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 18px rgba(235, 168, 75, 0.3);
}

button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffd48f 0%, #f2b45c 100%);
  border-color: #fff0d1;
  color: #06101a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 24px rgba(245, 185, 99, 0.5);
  transform: translateY(-1px);
}

.at-table button.primary {
  background: linear-gradient(135deg, #6cf5de 0%, #37c9b6 100%);
  border-color: #b5fff2;
  color: #061d21;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 18px rgba(64, 224, 208, 0.28);
}

.at-table button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #96ffed 0%, #52decb 100%);
  border-color: #ffffff;
  color: #041518;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 24px rgba(94, 252, 232, 0.5);
}

.at-table .deck-hero button.primary,
.at-table .tactical-controls button.primary {
  background: linear-gradient(135deg, #f5c276 0%, #e5a247 100%);
  border-color: #ffe0a8;
  color: #0b1622;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 18px rgba(235, 168, 75, 0.32);
}

.at-table .deck-hero button.primary:hover:not(:disabled),
.at-table .tactical-controls button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffd48f 0%, #f2b45c 100%);
  border-color: #fff0d1;
  box-shadow: 0 0 24px rgba(245, 185, 99, 0.55);
}

button.quiet {
  background: rgba(13, 28, 44, 0.72);
  border-color: rgba(74, 120, 152, 0.55);
}

button.quiet:hover:not(:disabled) {
  background: rgba(26, 54, 80, 0.9);
  border-color: #79eed7;
}

button.text-button {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #7ce8d8;
}

button.text-button:hover:not(:disabled) {
  background: rgba(94, 252, 232, 0.1);
  border-color: transparent;
  box-shadow: none;
  color: #b8fff4;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #5efce8;
  outline-offset: 3px;
}

/* Terminal Inputs & Selects */
input, select, textarea {
  background: rgba(6, 14, 25, 0.9);
  border: 1px solid rgba(68, 114, 148, 0.65);
  border-radius: 6px;
  color: #f0f7ff;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: #5efce8;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 12px rgba(94, 252, 232, 0.25);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-room-nav {
  display: none;
}

/* Holo-Scanner Portrait Frames (Eliminates flat white box jarring contrast) */
.overview-portrait, .sheet-portrait, .portrait-button, .choice-art,
.review-identity img, .guide-intro-art img, .mini-crew img, .portrait-choice {
  background: radial-gradient(circle at 50% 32%, #f7fafc 0%, #dce8ee 68%, #9bb8c7 100%) !important;
  box-shadow: inset 0 0 0 2px rgba(12, 30, 48, 0.85), 0 0 16px rgba(0, 240, 255, 0.14);
}

.overview-portrait, .sheet-portrait {
  border: 1px solid #5899b8 !important;
}

/* Segmented Sci-Fi Vitals Meters (HP / SP / RP) */
.meter-track {
  height: 8px !important;
  background: rgba(6, 15, 26, 0.9) !important;
  border: 1px solid rgba(68, 112, 144, 0.55);
  border-radius: 4px !important;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
}

.meter-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 14px,
    rgba(6, 15, 26, 0.55) 14px,
    rgba(6, 15, 26, 0.55) 16px
  );
  pointer-events: none;
}

.meter-track span {
  background: linear-gradient(90deg, #10b981, #5efce8) !important;
  box-shadow: 0 0 12px rgba(94, 252, 232, 0.65);
  transition: width 0.3s ease;
}

.meter.sp .meter-track span {
  background: linear-gradient(90deg, #0284c7, #38bdf8, #7dd3fc) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.65);
}

.meter.rp .meter-track span {
  background: linear-gradient(90deg, #d97706, #fbbf24, #fde68a) !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.65);
}

/* Defense Readout Strip & Ability Sensor Pads */
.defense-strip {
  background: rgba(7, 17, 30, 0.7);
  border: 1px solid rgba(64, 114, 148, 0.45) !important;
  border-radius: 8px;
  padding: 14px 6px !important;
}

.defense-strip strong {
  font-family: var(--font-display);
  color: #ffd285 !important;
  text-shadow: 0 0 14px rgba(245, 185, 99, 0.35);
}

.overview-abilities > button, .overview-roll {
  background: linear-gradient(160deg, rgba(13, 29, 47, 0.95), rgba(8, 18, 31, 0.98)) !important;
  border: 1px solid rgba(62, 112, 148, 0.55) !important;
  border-radius: 7px;
}

.overview-abilities > button:hover, .overview-roll:hover {
  border-color: #5efce8 !important;
  box-shadow: 0 0 16px rgba(94, 252, 232, 0.25);
  transform: translateY(-2px);
}

.overview-abilities strong {
  font-family: var(--font-display);
}

/* Command Deck Kicker & Hero Banner */
.deck-kicker {
  display: block;
  color: #7ce8d8;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.deck-hero, .bridge-hero, .alien-hero {
  position: relative;
  border: 1px solid rgba(94, 252, 232, 0.42);
  border-radius: 12px;
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 28px rgba(0, 240, 255, 0.08);
}

.deck-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 306px;
  padding: 36px 42px;
  background: #0d2236 url('/space-backdrop.jpg') center 38% / cover;
  overflow: hidden;
}

.deck-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 18, 31, 0.96) 8%, rgba(12, 29, 47, 0.88) 56%, rgba(14, 38, 56, 0.35) 100%),
    repeating-linear-gradient(0deg, rgba(94, 252, 232, 0.025) 0px, rgba(94, 252, 232, 0.025) 1px, transparent 1px, transparent 4px);
}

.deck-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #f5b963, #5efce8 55%, transparent);
  box-shadow: 0 0 16px #5efce8;
}

.deck-hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}

.deck-hero .deck-kicker {
  color: #f5d39c;
  font-size: 12px;
  letter-spacing: 2.4px;
}

.deck-kicker i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: #5efce8;
  box-shadow: 0 0 12px #5efce8, 0 0 20px #5efce8;
}

.deck-hero h1 {
  font-size: clamp(32px, 3.5vw, 50px);
  letter-spacing: -1px;
  margin: 18px 0 16px;
  line-height: 1.08;
  font-weight: 800;
  color: #f8fbff;
}

.deck-hero h1 span {
  background: linear-gradient(90deg, #ffd285, #5efce8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.deck-hero p {
  font-size: 15px;
  color: #bed6e8;
  margin-bottom: 24px;
  max-width: 540px;
}

.deck-hero-actions {
  display: flex;
  flex-wrap: wrap;
  margin: -4px;
}

.deck-hero-actions button {
  margin: 4px;
  font-size: 13px;
  padding: 12px 18px;
}

.deck-hero-actions button span {
  margin-left: 16px;
}

/* Astrogation Hologram Ship Schematic */
.deck-chart {
  position: relative;
  width: 295px;
  flex-shrink: 0;
  margin-left: 20px;
  color: #6beee0;
  opacity: 0.95;
  z-index: 1;
  filter: drop-shadow(0 0 12px rgba(94, 252, 232, 0.32));
}

.deck-chart svg {
  width: 100%;
  height: 210px;
}

.deck-chart > span {
  display: block;
  text-align: center;
  font-size: 10px;
  letter-spacing: 2.4px;
  color: #f5d39c;
  margin-top: 4px;
}

.deck-chart-orbit {
  position: absolute;
  width: 142px;
  height: 142px;
  left: 76px;
  top: 34px;
  border: 1px dashed rgba(94, 252, 232, 0.45);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(94, 252, 232, 0.15), inset 0 0 22px rgba(94, 252, 232, 0.1);
  animation: deck-orbit 55s linear infinite;
}

@keyframes deck-orbit {
  to { transform: rotate(360deg); }
}

.no-motion .deck-chart-orbit {
  animation: none;
}

/* Session Telemetry Bar (.deck-status) */
.deck-status {
  display: flex;
  flex-wrap: wrap;
  margin: 20px 0 28px;
  padding: 6px;
  background: rgba(8, 19, 33, 0.88);
  border: 1px solid rgba(64, 114, 148, 0.45);
  border-radius: 10px;
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.04), 0 8px 20px rgba(0, 0, 0, 0.35);
}

.deck-status > div, .deck-status > button {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 120px;
  padding: 11px 16px;
  border-right: 1px solid rgba(58, 102, 134, 0.38);
  font-size: 12px;
  color: #9ec0d6;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-mono);
}

.deck-status > button {
  border: 0;
  background: none;
  border-radius: 6px;
  text-align: left;
  min-height: 40px;
  font-weight: 400;
  box-shadow: none;
}

.deck-status > button:hover {
  background: rgba(94, 252, 232, 0.1);
}

.deck-status strong {
  font-family: var(--font-display);
  color: #ffffff;
  font-size: 18px;
  margin-right: 10px;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(94, 252, 232, 0.4);
}

.deck-status b {
  color: #f5b963;
  margin-left: 5px;
  font-weight: 400;
}

.status-light {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5efce8;
  box-shadow: 0 0 10px #5efce8, 0 0 18px #5efce8;
  margin-right: 10px;
  flex-shrink: 0;
}

/* Deck Columns & Panels */
.deck-layout {
  display: flex;
  align-items: flex-start;
  margin: 0 -10px;
}

.deck-primary-column {
  width: 65%;
  padding: 0 10px;
  min-width: 0;
}

.deck-secondary-column {
  width: 35%;
  padding: 0 10px;
  min-width: 0;
}

.deck-layout .panel {
  margin-bottom: 20px;
  padding: 26px;
}

/* Mission Directive Module */
.deck-mission .section-top {
  margin-bottom: 19px;
  align-items: center;
}

.deck-mission h2 {
  font-size: 28px;
  letter-spacing: -0.4px;
  margin-bottom: 15px;
}

.deck-mission > p {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 27px;
  color: #c2d6e6;
}

.deck-mission .text-button {
  font-size: 12px;
  padding: 7px 10px;
}

.deck-objective-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #8eb4c9;
  margin-bottom: 8px;
  font: 11px var(--font-mono);
  letter-spacing: 1.5px;
}

.deck-objective-top span {
  color: #79f2d0;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.deck-progress {
  height: 6px;
  border-radius: 4px;
  background: rgba(6, 15, 26, 0.9);
  border: 1px solid rgba(68, 114, 148, 0.45);
  overflow: hidden;
  margin-bottom: 16px;
}

.deck-progress > span {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #10b981, #5efce8);
  box-shadow: 0 0 12px rgba(94, 252, 232, 0.6);
  transition: width 0.25s;
}

.deck-objectives {
  list-style: none;
  padding: 0;
  margin: 0;
}

.deck-objectives li {
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid rgba(52, 92, 122, 0.42);
  padding: 14px 0;
  font-size: 14px;
  color: #e0eef7;
  line-height: 1.6;
}

.deck-objectives li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.deck-objectives li.complete {
  color: #7d9ca3;
}

.deck-objectives li.complete > span:nth-child(2),
.deck-objectives li.complete .objective-button > span:nth-child(2) {
  text-decoration: line-through;
  text-decoration-color: #4f7872;
}

.objective-button {
  display: flex;
  align-items: flex-start;
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 4px;
  text-align: left;
  padding: 5px 4px;
  width: 100%;
  font-size: 14px;
  font-weight: 400;
  min-height: 44px;
}

.objective-button:hover {
  background: rgba(94, 252, 232, 0.08);
}

.objective-check {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid #5889a2;
  background: rgba(8, 20, 34, 0.8);
  border-radius: 4px;
  margin: 1px 12px 0 0;
  align-items: center;
  justify-content: center;
  color: #06211d;
  font-size: 14px;
  font-weight: 800;
}

.complete .objective-check {
  background: linear-gradient(135deg, #5efce8, #2dd4bf);
  border-color: #a7fff0;
  box-shadow: 0 0 10px rgba(94, 252, 232, 0.45);
}

.deck-inline-empty {
  padding: 20px;
  border: 1px dashed rgba(74, 124, 158, 0.55);
  background: rgba(8, 18, 30, 0.5);
  border-radius: 7px;
  font-size: 14px;
  color: #a4c0d4;
  line-height: 1.7;
}

/* Crew Manifest */
.deck-crew .section-top {
  margin-bottom: 15px;
  align-items: flex-start;
}

.deck-crew h2 {
  font-size: 23px;
  margin: 9px 0 0;
}

.deck-crew .text-button {
  padding: 4px 8px;
  min-height: 40px;
  white-space: nowrap;
  font-size: 12px;
}

.deck-crew-member {
  display: flex;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid rgba(52, 92, 122, 0.42);
}

.deck-crew-member:last-child {
  border: 0;
  padding-bottom: 0;
}

.deck-avatar {
  width: 60px;
  height: 72px;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 30%, #f5f8fa, #bfd4de) !important;
  border: 1px solid #5efce8;
  box-shadow: 0 0 12px rgba(94, 252, 232, 0.2);
  margin-right: 15px;
}

.deck-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
}

.deck-crew-identity {
  flex: 1;
  min-width: 0;
  padding-right: 18px;
}

.deck-crew-identity .text-button {
  display: block;
  text-align: left;
  color: #ecf8ff;
  font-size: 16px;
  min-height: 30px;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: break-word;
  padding-left: 0;
}

.deck-crew-identity small {
  display: block;
  font-size: 12px;
  color: #97b8cc;
  line-height: 1.6;
}

.deck-health-track {
  height: 5px;
  background: rgba(6, 15, 26, 0.9);
  border: 1px solid rgba(64, 110, 142, 0.45);
  margin: 8px 0 6px;
  max-width: 250px;
  border-radius: 3px;
  overflow: hidden;
}

.deck-health-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #5efce8);
  box-shadow: 0 0 8px rgba(94, 252, 232, 0.6);
}

.deck-crew-identity small.deck-effect {
  color: #f5b963;
}

.deck-crew-member > button:last-child {
  font-size: 12px;
  padding: 8px 12px;
  color: #b5fff0;
}

.deck-crew-empty {
  text-align: center;
  padding: 24px 10px 14px;
}

.deck-crew-empty > span {
  display: block;
  font-size: 46px;
  color: #5efce8;
  text-shadow: 0 0 18px rgba(94, 252, 232, 0.4);
  margin-bottom: 13px;
}

.deck-crew-empty h3 {
  font-size: 20px;
}

.deck-crew-empty p {
  font-size: 14px;
  max-width: 340px;
  margin: 0 auto 22px;
}

/* Tactical Radar & Encounter Card */
.deck-encounter-card {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 88% 14%, rgba(0, 240, 255, 0.14), transparent 60%),
    linear-gradient(160deg, rgba(17, 37, 58, 0.95), rgba(9, 20, 34, 0.98));
}

.deck-encounter-card h2 {
  font-size: 24px;
  line-height: 1.35;
  margin: 19px 0 15px;
}

.deck-encounter-card p {
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 23px;
}

.deck-encounter-card button {
  font-size: 13px;
}

.deck-radar-small {
  width: 102px;
  height: 102px;
  border: 1px solid rgba(94, 252, 232, 0.55);
  border-radius: 50%;
  margin: 22px 0;
  position: relative;
  background:
    radial-gradient(circle, rgba(94, 252, 232, 0.12) 0%, transparent 70%),
    repeating-radial-gradient(circle, transparent 0, transparent 22px, rgba(94, 252, 232, 0.25) 23px, transparent 24px);
  box-shadow: 0 0 24px rgba(94, 252, 232, 0.18), inset 0 0 16px rgba(94, 252, 232, 0.15);
}

.deck-radar-small::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(94, 252, 232, 0.35);
}

.deck-radar-small::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(94, 252, 232, 0.35);
}

.deck-radar-small span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
  line-height: 100px;
  color: #f5b963;
  font-size: 32px;
  text-shadow: 0 0 18px rgba(245, 185, 99, 0.8);
}

/* Latest Transmissions & Roll Logs */
.deck-transmissions .section-top {
  margin-bottom: 13px;
}

.deck-transmissions .text-button {
  font-size: 12px;
  white-space: nowrap;
}

.deck-roll-log {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(52, 92, 122, 0.42);
}

.deck-roll-log:last-child {
  border: 0;
  padding-bottom: 0;
}

.deck-result {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid #5efce8;
  background: radial-gradient(circle at center, rgba(24, 76, 86, 0.95), rgba(11, 34, 46, 0.98));
  border-radius: 8px;
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #b5fff2;
  text-shadow: 0 0 10px rgba(94, 252, 232, 0.55);
  box-shadow: 0 0 14px rgba(94, 252, 232, 0.2);
  flex-shrink: 0;
  margin-right: 14px;
}

.deck-roll-log > div {
  min-width: 0;
}

.deck-roll-log strong {
  font-size: 14px;
  display: block;
  overflow-wrap: break-word;
  font-weight: 600;
  color: #eef7ff;
}

.deck-roll-log small {
  display: block;
  font-size: 12px;
  color: #93b5c9;
  margin-top: 3px;
}

.deck-transmissions > p {
  font-size: 14px;
  margin-bottom: 0;
}

/* Quick Tool Matrix (.deck-toolbox) */
.deck-toolbox {
  margin-top: 8px;
}

.deck-toolbox > .section-top {
  padding: 0 2px;
  margin-bottom: 14px;
  align-items: center;
}

.deck-toolbox .text-button {
  font-size: 12px;
  color: #f5b963;
}

.deck-tools {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -7px;
}

.deck-tool {
  width: calc(50% - 14px);
  margin: 0 7px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  text-align: left;
  background: linear-gradient(145deg, rgba(16, 36, 56, 0.92), rgba(10, 22, 36, 0.96));
  border: 1px solid rgba(64, 114, 148, 0.5);
  border-left: 3px solid #5efce8;
  border-radius: 8px;
  color: #c2dce6;
  min-width: 0;
}

.deck-tool:hover {
  border-color: #f5b963;
  background: linear-gradient(145deg, rgba(24, 52, 78, 0.96), rgba(14, 32, 52, 0.98));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(245, 185, 99, 0.2);
}

.deck-tool > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.deck-tool-icon {
  font-size: 24px;
  margin-right: 16px;
  color: #5efce8;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 252, 232, 0.1);
  border: 1px solid rgba(94, 252, 232, 0.3);
  border-radius: 6px;
  flex-shrink: 0;
}

.deck-tool strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #f0f8ff;
  margin-bottom: 4px;
}

.deck-tool small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #96b6ca;
}

.deck-tool > span:last-child {
  margin-left: 10px;
  color: #f5b963;
  font-size: 18px;
}

/* Turn Glance Alert Banner */
.deck-turn-glance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  margin: 0 0 24px;
  background: linear-gradient(100deg, rgba(42, 58, 74, 0.95), rgba(18, 38, 56, 0.96));
  border: 1px solid rgba(245, 185, 99, 0.6);
  border-left: 4px solid #f5b963;
  border-radius: 9px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(245, 185, 99, 0.12);
}

.deck-turn-glance h2 {
  font-size: 24px;
  margin: 8px 0 5px;
}

.deck-turn-glance p {
  font-size: 13px;
  margin: 0;
  color: #b4cadb;
}

.deck-turn-glance button {
  font-size: 13px;
  flex-shrink: 0;
  margin-left: 17px;
}

.your-turn {
  border-color: #5efce8 !important;
  border-left: 4px solid #5efce8 !important;
  background: linear-gradient(110deg, rgba(22, 68, 72, 0.96), rgba(14, 38, 54, 0.98)) !important;
  box-shadow: 0 0 28px rgba(94, 252, 232, 0.22) !important;
}

.your-turn .deck-kicker {
  color: #98fff0;
}

/* Invite Code & Quick Jump Modal */
.invite-code {
  border: 1px solid #5efce8;
  background: radial-gradient(ellipse at center, rgba(20, 56, 72, 0.95), rgba(8, 22, 36, 0.98));
  text-align: center;
  margin: 24px 0;
  padding: 26px 18px;
  border-radius: 10px;
  box-shadow: inset 0 0 24px rgba(94, 252, 232, 0.15), 0 0 20px rgba(94, 252, 232, 0.15);
}

.invite-code small {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  color: #99c2d6;
  margin-bottom: 10px;
}

.invite-code strong {
  display: block;
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 8px;
  color: #ffd285;
  text-shadow: 0 0 20px rgba(245, 185, 99, 0.55);
  user-select: all;
}

.invite-code + p {
  font-size: 14px;
}

.jump-label {
  margin-bottom: 19px;
}

.jump-label input {
  font-size: 17px;
  padding: 14px;
}

.jump-results {
  max-height: 52vh;
  overflow: auto;
  margin-bottom: 20px;
  border: 1px solid rgba(74, 128, 162, 0.6);
  border-radius: 8px;
}

.jump-result {
  position: relative;
  display: block;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(52, 92, 122, 0.45);
  padding: 16px 45px 16px 18px;
  background: rgba(14, 32, 50, 0.95);
  text-align: left;
  width: 100%;
  min-height: 65px;
  box-shadow: none;
}

.jump-result:hover {
  background: rgba(26, 58, 84, 0.98);
}

.jump-result:last-child {
  border-bottom: 0;
}

.jump-result strong {
  display: block;
  font-size: 15px;
  color: #e6f4f8;
  margin-bottom: 4px;
}

.jump-result small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #95b5c9;
}

.jump-result > span {
  position: absolute;
  right: 20px;
  top: 25px;
  color: #f5b963;
}

/* Tactical Deck & Combat Tracker */
.tactical-welcome {
  padding: 44px 35px;
  border: 1px solid rgba(94, 252, 232, 0.45);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(0, 240, 255, 0.14), transparent 65%),
    linear-gradient(160deg, rgba(16, 36, 56, 0.95), rgba(9, 20, 34, 0.98));
  text-align: center;
}

.tactical-welcome .deck-radar-small {
  margin: 0 auto 25px;
}

.tactical-welcome h2 {
  font-size: 33px;
  margin: 20px 0 16px;
}

.tactical-welcome p {
  max-width: 530px;
  margin: 0 auto 28px;
  font-size: 16px;
  line-height: 1.8;
}

.tactical-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 27px 30px;
  background: linear-gradient(135deg, rgba(20, 46, 68, 0.95), rgba(12, 28, 44, 0.98));
  border: 1px solid rgba(94, 252, 232, 0.45);
  border-radius: 10px;
  margin-bottom: 19px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.tactical-header h2 {
  font-size: 32px;
  margin: 11px 0;
  overflow-wrap: break-word;
}

.tactical-header p {
  font-size: 15px;
  margin: 0;
}

.tactical-header > div:first-child {
  min-width: 0;
}

.round-counter {
  margin-left: 24px;
  text-align: center;
  min-width: 78px;
  flex-shrink: 0;
  border-left: 1px solid rgba(94, 252, 232, 0.35);
  padding-left: 25px;
}

.round-counter small {
  font-size: 11px;
  letter-spacing: 2.2px;
  color: #93bfd4;
}

.round-counter strong {
  display: block;
  font-family: var(--font-display);
  font-size: 46px;
  color: #ffd285;
  text-shadow: 0 0 18px rgba(245, 185, 99, 0.45);
  line-height: 1.15;
  margin-top: 4px;
}

.initiative-ready {
  margin-left: 22px;
  white-space: nowrap;
  color: #79f2d0;
  font-size: 14px;
}

.initiative-prompt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border: 1px solid #5efce8;
  border-radius: 8px;
  margin-bottom: 20px;
  background: linear-gradient(110deg, rgba(20, 62, 64, 0.95), rgba(14, 38, 48, 0.98));
  box-shadow: 0 0 22px rgba(94, 252, 232, 0.15);
}

.initiative-prompt h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #d4fff4;
}

.initiative-prompt p {
  font-size: 13px;
  margin: 0;
  color: #b0dcd0;
}

.initiative-prompt button {
  font-size: 13px;
  flex-shrink: 0;
  margin-left: 20px;
}

.tactical-controls {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -4px 20px;
}

.tactical-controls button {
  font-size: 13px;
  margin: 4px;
  padding: 11px 16px;
}

.tactical-controls button.text-button {
  margin-left: auto;
  color: #ffad99;
}

.tactical-order-panel {
  padding: 24px;
}

.tactical-order-panel .section-top {
  align-items: center;
  margin-bottom: 15px;
}

.tactical-order-panel h3 {
  margin: 0;
}

.tactical-order-panel .section-top small {
  font-size: 12px;
  color: #92b6cc;
}

.tactical-roster {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tactical-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 16px 16px;
  background: rgba(10, 24, 38, 0.92);
  border: 1px solid rgba(58, 102, 134, 0.55);
  border-radius: 8px;
  min-width: 0;
  transition: all 0.18s ease;
}

.tactical-row:last-child {
  margin: 0;
}

.tactical-row.acting {
  border-color: #f5b963;
  background: linear-gradient(90deg, rgba(48, 68, 72, 0.95), rgba(22, 42, 56, 0.96));
  border-left: 4px solid #f5b963;
  box-shadow: 0 0 22px rgba(245, 185, 99, 0.2);
}

.tactical-order {
  font-size: 14px;
  width: 28px;
  color: #82a4b8;
  flex-shrink: 0;
}

.acting .tactical-order {
  color: #ffd285;
  text-shadow: 0 0 8px rgba(245, 185, 99, 0.6);
}

.tactical-avatar {
  width: 40px;
  height: 52px;
  object-fit: cover;
  object-position: 50% 15%;
  border: 1px solid #5efce8;
  border-radius: 5px;
  margin-right: 15px;
  background: radial-gradient(circle, #f5f8fa, #bfd4de);
  flex-shrink: 0;
}

.tactical-contact {
  font-size: 28px;
  color: #f5b963;
  width: 40px;
  margin-right: 15px;
  text-align: center;
  flex-shrink: 0;
}

.tactical-name {
  min-width: 0;
  flex: 1;
}

.tactical-name > strong {
  font-size: 16px;
  display: block;
  overflow-wrap: break-word;
  color: #ecf6ff;
}

.tactical-name > strong small {
  font-size: 10px;
  color: #5efce8;
  margin-left: 9px;
}

.tactical-name > small {
  font-size: 12px;
  display: block;
  color: #9cb9cb;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.tactical-initiative {
  text-align: center;
  min-width: 50px;
  margin: 0 13px;
  flex-shrink: 0;
}

.tactical-initiative small {
  display: block;
  font-size: 10px;
  color: #92b2c4;
  letter-spacing: 1.2px;
}

.tactical-initiative strong {
  font-family: var(--font-display);
  font-size: 24px;
  color: #ffd285;
  display: block;
  margin-top: 3px;
}

.tactical-row-actions {
  display: flex;
  flex-shrink: 0;
}

.tactical-row-actions button {
  font-size: 12px;
  padding: 7px 11px;
  margin-left: 5px;
  min-height: 38px;
  min-width: 36px;
}

.tactical-row-actions button:disabled {
  cursor: default;
  opacity: 0.3;
}

.tactical-guide summary {
  cursor: pointer;
  min-height: 36px;
  color: #79f2d0;
  font-size: 15px;
  font-weight: 600;
}

.tactical-guide > div {
  margin-top: 21px;
}

.tactical-guide p {
  font-size: 14px;
  line-height: 1.8;
}

.tactical-guide a {
  font-size: 13px;
}

.turn-reminders {
  display: flex;
  margin: 15px -6px 21px;
}

.turn-reminders article {
  flex: 1;
  min-width: 0;
  margin: 0 6px;
  border: 1px solid rgba(72, 124, 158, 0.55);
  padding: 15px;
  background: rgba(11, 26, 42, 0.9);
  border-radius: 7px;
}

.turn-reminders strong {
  font-size: 15px;
  color: #ffd285;
}

.turn-reminders p {
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 0;
}

.tactical-footnote {
  font-size: 12px;
  line-height: 1.8;
  max-width: 850px;
  color: #98b0c2;
}

/* Dice Stage, Quick Roll & Drift Core Roll Overlay */
.dice-stage {
  border: 1px solid rgba(94, 252, 232, 0.5) !important;
  box-shadow: inset 0 0 50px rgba(0, 240, 255, 0.12), 0 14px 40px rgba(0, 0, 0, 0.55);
}

.big-number {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  color: #98fff0 !important;
  text-shadow: 0 0 32px rgba(94, 252, 232, 0.75), 0 0 64px rgba(0, 240, 255, 0.35) !important;
}

.dice-row button {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 1px;
  border-color: rgba(94, 252, 232, 0.45);
}

.dice-row button:hover {
  border-color: #f5b963;
  box-shadow: 0 0 18px rgba(245, 185, 99, 0.35);
}

.roll-overlay {
  border: 1px solid #5efce8 !important;
  background: radial-gradient(ellipse at center, rgba(16, 44, 66, 0.98) 0%, rgba(7, 18, 32, 0.98) 100%) !important;
  box-shadow: 0 0 90px rgba(94, 252, 232, 0.35), inset 0 0 30px rgba(94, 252, 232, 0.15) !important;
}

/* Lobby // Absalom Station Docking & Crew Access Terminal */
.lobby {
  border: 1px solid rgba(94, 252, 232, 0.45);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.75), 0 0 40px rgba(0, 240, 255, 0.08);
  background-position: 56% center;
}

.lobby::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #5efce8, #f5b963 60%, transparent);
  box-shadow: 0 0 18px #5efce8;
  pointer-events: none;
}

.lobby h1 {
  letter-spacing: -1.5px;
  color: #f8fbff;
  font-weight: 800;
}

.lobby h1 em {
  background: linear-gradient(90deg, #ffd285 0%, #5efce8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lobby .access-panel {
  background: linear-gradient(165deg, rgba(14, 30, 48, 0.95) 0%, rgba(8, 18, 31, 0.98) 100%);
  border: 1px solid rgba(94, 252, 232, 0.45);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.lobby-intro > .eyebrow {
  color: #ffd285;
  letter-spacing: 2.5px;
}

.lobby .access-tabs {
  background: rgba(6, 13, 24, 0.9);
  border-bottom: 1px solid rgba(72, 124, 158, 0.45);
}

.lobby .access-tabs .selected {
  color: #071921;
  background: linear-gradient(135deg, #6cf5de, #38c9b6);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(94, 252, 232, 0.35);
}

.lobby-intro > p {
  color: #d2e4f2;
}

.access-tabs button {
  font-size: 13px;
  box-shadow: none;
}

.lobby .edition-strip span {
  border: 1px solid rgba(245, 185, 99, 0.45);
  border-left: 3px solid #f5b963;
  background: rgba(10, 22, 36, 0.78);
  padding: 5px 12px;
  border-radius: 4px;
  color: #f7e6c8;
  letter-spacing: 1.4px;
}

.lobby .portrait-signal {
  border-color: rgba(94, 252, 232, 0.35);
}

.lobby .signal-cross {
  color: #f5b963;
  text-shadow: 0 0 20px rgba(245, 185, 99, 0.65);
}

.lobby .edition-lock {
  background: rgba(20, 56, 66, 0.85);
  color: #b8fff0;
  border-color: rgba(94, 252, 232, 0.45);
}

/* Responsive Breakpoints (Preserving exact mobile & tablet ergonomics) */
@media (min-width: 1500px) {
  .deck-hero { min-height: 325px; }
  .deck-hero h1 { font-size: 54px; }
  .deck-chart { width: 335px; }
  .deck-chart svg { height: 230px; }
  .deck-chart-orbit { left: 93px; top: 48px; }
  .deck-layout .panel { padding: 29px; }
  .deck-mission h2 { font-size: 31px; }
}

@media (max-width: 1150px) {
  .deck-chart { width: 230px; }
  .deck-chart svg { height: 180px; }
  .deck-chart-orbit { left: 48px; top: 20px; }
  .deck-hero { padding: 29px; min-height: 295px; }
  .deck-hero h1 { font-size: 41px; }
  .deck-layout { margin: 0 -7px; }
  .deck-primary-column { width: 61%; padding: 0 7px; }
  .deck-secondary-column { width: 39%; padding: 0 7px; }
  .deck-layout .panel { padding: 22px; }
  .deck-status > div, .deck-status > button { padding: 8px; font-size: 11px; min-width: 105px; }
  .deck-status strong { font-size: 14px; margin-right: 6px; }
  .deck-crew-identity { padding-right: 10px; }
  .deck-crew-member > button:last-child { padding: 8px; }
  .deck-avatar { width: 46px; height: 61px; margin-right: 11px; }
  .deck-hero .deck-kicker { font-size: 10px; letter-spacing: 1.3px; }
  .tactical-row { flex-wrap: wrap; }
  .tactical-row-actions { margin: 12px 0 0 28px; width: calc(100% - 28px); padding-top: 10px; border-top: 1px solid #355363; }
  .tactical-row-actions button { margin-left: 0; margin-right: 6px; min-height: 44px; min-width: 44px; }
}

@media (max-width: 950px) {
  .rail { width: 162px; padding: 22px 9px; }
  .rail .nav-button { padding: 11px 9px; font-size: 13px; }
  .nav-jump { font-size: 12px; padding: 9px; }
  .deck-chart { display: none; }
  .deck-hero { min-height: 270px; padding: 27px; }
  .deck-hero h1 { font-size: 40px; }
  .deck-layout { display: block; margin: 0; }
  .deck-primary-column, .deck-secondary-column { width: 100%; padding: 0; }
  .deck-secondary-column { display: flex; flex-wrap: wrap; margin: 0 -7px; width: calc(100% + 14px); }
  .deck-secondary-column > .panel { width: calc(50% - 14px); margin: 0 7px 20px; }
  .deck-encounter-card .deck-radar-small { width: 65px; height: 65px; margin: 17px 0; }
  .deck-encounter-card .deck-radar-small span { line-height: 63px; font-size: 24px; }
  .deck-encounter-card h2 { font-size: 20px; }
  .deck-status > div, .deck-status > button { flex: 1 0 50%; padding: 9px 8px; }
  .deck-status > div:nth-child(2) { border: 0; }
  .deck-status > div:first-child { padding-left: 8px; }
  .deck-status { padding-bottom: 12px; margin-top: 15px; }
  .tactical-header { padding: 23px; }
  .tactical-header h2 { font-size: 27px; }
  .tactical-controls button { font-size: 12px; }
  .tactical-order-panel { padding: 18px; }
}

@media (max-width: 700px) {
  .masthead { padding: 15px 17px; position: relative; }
  .workspace { display: block; }
  .table-main { padding: 23px 17px; }
  .rail { width: 100%; padding: 9px 7px; position: relative; background: #0a1929; border-bottom: 1px solid #365264; align-items: center; }
  .rail .nav-button { padding: 11px 14px; font-size: 13px; }
  .nav-jump { flex-shrink: 0; white-space: nowrap; margin: 0 8px 0 0; min-height: 42px; font-size: 12px; padding: 9px 12px; position: sticky; left: 0; z-index: 2; background: #142e42; box-shadow: 6px 0 8px #071624; }
  .nav-jump span { margin-right: 8px; }
  .mobile-room-nav { display: block; flex-shrink: 0; font-size: 12px; padding: 10px 13px; margin: 0 7px; border-color: #456376; background: #162e40; }
  .deck-hero { padding: 27px 24px; min-height: 284px; border-radius: 9px; }
  .deck-hero h1 { font-size: 34px; letter-spacing: -0.8px; line-height: 1.1; margin: 17px 0 16px; overflow-wrap: break-word; }
  .deck-hero p { font-size: 13px; margin-bottom: 23px; line-height: 1.7; }
  .deck-hero .deck-kicker { font-size: 9px; letter-spacing: 1px; }
  .deck-hero-actions button { font-size: 12px; padding: 11px 14px; }
  .deck-hero-actions button span { margin-left: 9px; }
  .deck-status { margin-bottom: 22px; font-size: 11px; }
  .deck-status > div, .deck-status > button { padding: 10px 9px; }
  .deck-layout .panel { padding: 23px 21px; }
  .deck-mission h2 { font-size: 27px; }
  .deck-mission > p { font-size: 14px; }
  .deck-mission .text-button { font-size: 11px; }
  .deck-kicker { font-size: 9px; letter-spacing: 1.2px; }
  .deck-objectives li, .objective-button { font-size: 13px; }
  .deck-crew h2 { font-size: 21px; line-height: 1.35; }
  .deck-crew .section-top { display: block; }
  .deck-crew .section-top > .text-button { margin-top: 4px; }
  .deck-crew-member { flex-wrap: wrap; position: relative; align-items: flex-start; padding: 16px 0 17px; }
  .deck-avatar { width: 48px; height: 64px; }
  .deck-crew-identity { padding-right: 0; }
  .deck-crew-member > button:last-child { margin: 11px 0 0 59px; min-height: 38px; }
  .deck-crew-identity .text-button { font-size: 14px; }
  .deck-crew-identity small { font-size: 11px; }
  .deck-secondary-column { display: block; margin: 0; width: 100%; }
  .deck-secondary-column > .panel { width: 100%; margin: 0 0 20px; }
  .deck-encounter-card .deck-radar-small { float: right; margin: 22px 0 20px 16px; }
  .deck-encounter-card h2 { font-size: 23px; margin-top: 20px; }
  .deck-encounter-card p { font-size: 14px; }
  .deck-toolbox > .section-top { align-items: flex-start; }
  .deck-toolbox > .section-top .deck-kicker { max-width: 180px; line-height: 1.8; margin-top: 8px; }
  .deck-tools { margin: 0; }
  .deck-tool { width: 100%; margin: 0 0 10px; padding: 16px 18px; }
  .deck-tool-icon { font-size: 20px; margin-right: 14px; }
  .deck-tool strong { font-size: 14px; }
  .deck-tool small { font-size: 11px; }
  .deck-turn-glance { display: block; padding: 20px; }
  .deck-turn-glance h2 { font-size: 22px; }
  .deck-turn-glance button { margin: 15px 0 0; }
  .deck-turn-glance p { font-size: 12px; }
  .tactical-header { padding: 22px 20px; }
  .tactical-header h2 { font-size: 25px; }
  .tactical-header p { font-size: 13px; }
  .round-counter { padding-left: 17px; margin-left: 15px; min-width: 53px; }
  .round-counter strong { font-size: 36px; }
  .round-counter small { font-size: 8px; }
  .initiative-ready { font-size: 11px; margin-left: 13px; white-space: normal; text-align: center; }
  .initiative-prompt { display: block; padding: 20px; }
  .initiative-prompt h3 { font-size: 17px; }
  .initiative-prompt button { margin: 15px 0 0; }
  .initiative-prompt .badge { display: inline-block; margin-top: 12px; }
  .tactical-controls { margin-bottom: 18px; }
  .tactical-controls button { font-size: 12px; padding: 10px 12px; }
  .tactical-controls button.text-button { margin-left: 4px; }
  .tactical-row { padding: 14px 11px; }
  .tactical-order { width: 23px; font-size: 12px; }
  .tactical-avatar, .tactical-contact { width: 31px; margin-right: 10px; }
  .tactical-avatar { height: 44px; }
  .tactical-name > strong { font-size: 14px; }
  .tactical-name > small { font-size: 10px; }
  .tactical-name > strong small { margin-left: 6px; font-size: 8px; }
  .tactical-initiative { min-width: 30px; margin: 0 0 0 8px; }
  .tactical-initiative strong { font-size: 22px; }
  .tactical-row-actions { margin-left: 23px; width: calc(100% - 23px); }
  .tactical-welcome { padding: 34px 23px; }
  .tactical-welcome h2 { font-size: 28px; }
  .tactical-welcome p { font-size: 14px; }
  .turn-reminders { display: block; margin: 17px 0; }
  .turn-reminders article { margin: 0 0 9px; }
  .tactical-footnote { font-size: 11px; }
  .jump-result strong { font-size: 14px; }
  .jump-result small { font-size: 11px; }
  .jump-results { max-height: 49vh; }
  .invite-code strong { font-size: 35px; letter-spacing: 6px; }
  .lobby h1 { letter-spacing: -1px; }
  .lobby .access-tabs button { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .deck-chart-orbit { animation: none; }
  .deck-progress > span { transition: none; }
}
