/* ═══════════════════════════════════════════════════════════════════════════
   PLAYER MANUAL OVERLAY — Matrix Rain Style
   Semi-transparent: the 3D game shows through the backdrop
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --pm-green:      #00ff41;
  --pm-green-dim:  #00c932;
  --pm-green-dark: #004d14;
  --pm-green-bg:   rgba(0, 12, 4, 0.88);
  --pm-cyan:       #00ffe7;
  --pm-amber:      #ffd700;
  --pm-red:        #ff3333;
  --pm-glass:      rgba(0, 20, 8, 0.82);
  --pm-glass-edge: rgba(0, 255, 65, 0.25);
  --pm-font-mono:  'Courier New', 'Lucida Console', monospace;
  --pm-font-title: 'Orbitron', 'Share Tech Mono', monospace;
  --pm-border:     1px solid rgba(0, 255, 65, 0.30);
  --pm-border-hi:  1px solid rgba(0, 255, 65, 0.65);
  --pm-radius:     6px;
  --pm-scrollbar:  rgba(0, 255, 65, 0.20);
  --pm-scrollbar-thumb: rgba(0, 255, 65, 0.50);
}

/* ── FULL-SCREEN BACKDROP ──────────────────────────────────────────────── */
.pm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  /* Semi-transparent so the 3D game shows through */
  background: rgba(0, 8, 2, 0.72);
  backdrop-filter: blur(1.5px) brightness(0.55);
  -webkit-backdrop-filter: blur(1.5px) brightness(0.55);
  transition: opacity 0.25s ease;
}
.pm-overlay.hidden {
  display: none;
}

/* ── MATRIX RAIN CANVAS (fullscreen, behind glass panel) ─────────────── */
.pm-matrix-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.35;  /* More visible matrix rain */
  z-index: 0;
}

/* ── GLASS PANEL ──────────────────────────────────────────────────────── */
.pm-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 96vw;
  max-width: 1400px;
  height: calc(100vh - 24px);
  margin: 12px auto;
  background: var(--pm-glass);
  border: var(--pm-border-hi);
  border-radius: var(--pm-radius);
  box-shadow:
    0 0 0 1px rgba(0,255,65,0.08),
    0 0 40px rgba(0,255,65,0.12),
    0 0 120px rgba(0,255,65,0.05),
    inset 0 0 80px rgba(0,0,0,0.5);
  overflow: hidden;
}

/* ── HEADER BAR ──────────────────────────────────────────────────────── */
.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(0, 30, 10, 0.95);
  border-bottom: var(--pm-border-hi);
  flex-shrink: 0;
  gap: 16px;
  box-shadow: 0 1px 0 rgba(0,255,65,0.15);
}

.pm-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 1;
  overflow: hidden;
}

.pm-header-badge {
  font-family: var(--pm-font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--pm-green);
  background: rgba(0,255,65,0.08);
  border: 1px solid var(--pm-green-dim);
  border-radius: 3px;
  padding: 3px 8px;
  letter-spacing: 1.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pm-header-title {
  font-family: var(--pm-font-mono);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--pm-green);
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(0,255,65,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-header-sub {
  font-family: var(--pm-font-mono);
  font-size: 11px;
  color: rgba(0,255,65,0.65);
  letter-spacing: 0.8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.pm-kbd-hint {
  font-family: var(--pm-font-mono);
  font-size: 11px;
  color: rgba(0,255,65,0.55);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pm-close-btn {
  font-family: var(--pm-font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--pm-green);
  background: rgba(0,255,65,0.08);
  border: 1px solid var(--pm-green-dim);
  border-radius: 3px;
  padding: 5px 12px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.pm-close-btn:hover {
  background: rgba(0,255,65,0.22);
  border-color: var(--pm-green);
  color: #fff;
  box-shadow: 0 0 10px rgba(0,255,65,0.4);
}

.pm-docs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--pm-font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #00d2ff;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.45);
  border-radius: 3px;
  padding: 5px 12px;
  cursor: pointer;
  letter-spacing: 1px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.pm-docs-btn:hover {
  background: rgba(0, 210, 255, 0.28);
  border-color: #00d2ff;
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.5);
}

/* ── BODY: SIDEBAR + CONTENT ─────────────────────────────────────────── */
.pm-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── LEFT SIDEBAR TOC ─────────────────────────────────────────────────── */
.pm-toc {
  width: 215px;
  min-width: 215px;
  background: rgba(0, 18, 6, 0.95);
  border-right: var(--pm-border);
  padding: 12px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--pm-scrollbar-thumb) var(--pm-scrollbar);
  flex-shrink: 0;
}

.pm-toc-title {
  font-family: var(--pm-font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(0,255,65,0.45);
  letter-spacing: 2px;
  padding: 0 14px 8px;
  border-bottom: var(--pm-border);
  margin-bottom: 6px;
}

.pm-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pm-toc-link {
  display: block;
  font-family: var(--pm-font-mono);
  font-size: 12px;
  color: rgba(0,255,65,0.65);
  padding: 6px 14px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pm-toc-link:hover {
  color: var(--pm-green);
  background: rgba(0,255,65,0.07);
  border-left-color: var(--pm-green-dim);
}
.pm-toc-link.active {
  color: var(--pm-green);
  background: rgba(0,255,65,0.10);
  border-left-color: var(--pm-green);
  text-shadow: 0 0 6px rgba(0,255,65,0.5);
}

/* ── CONTENT AREA ─────────────────────────────────────────────────────── */
.pm-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  color: rgba(0,255,65,0.85);
  font-family: var(--pm-font-mono);
  font-size: 14px;
  line-height: 1.75;
  scrollbar-width: thin;
  scrollbar-color: var(--pm-scrollbar-thumb) var(--pm-scrollbar);
}

/* ── SECTIONS ─────────────────────────────────────────────────────────── */
.pm-section {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: var(--pm-border);
  scroll-margin-top: 20px;
}
.pm-section:last-child {
  border-bottom: none;
}

.pm-section-title {
  font-family: var(--pm-font-mono);
  font-size: 18.5px;
  font-weight: 700;
  color: var(--pm-green);
  text-shadow: 0 0 12px rgba(0,255,65,0.55);
  letter-spacing: 0.5px;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,255,65,0.20);
}

.pm-sub {
  font-family: var(--pm-font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pm-cyan);
  letter-spacing: 0.8px;
  margin: 20px 0 8px 0;
  text-transform: uppercase;
}

p {
  margin: 0 0 12px 0;
}

/* ── TABLES ───────────────────────────────────────────────────────────── */
.pm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0 0 16px 0;
}
.pm-table th {
  text-align: left;
  color: var(--pm-green);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 7px 12px;
  background: rgba(0,255,65,0.07);
  border: var(--pm-border);
  border-bottom: var(--pm-border-hi);
}
.pm-table td {
  padding: 7px 12px;
  border: var(--pm-border);
  color: rgba(0,255,65,0.85);
  vertical-align: top;
}
.pm-table tr:hover td {
  background: rgba(0,255,65,0.04);
}
.pm-table strong {
  color: var(--pm-green);
}

/* ── LISTS ────────────────────────────────────────────────────────────── */
.pm-list {
  padding-left: 24px;
  margin: 10px 0;
}
.pm-list li {
  margin-bottom: 6px;
  color: rgba(0,255,65,0.85);
  font-size: 13.5px;
}

/* ── CALLOUT BOXES ────────────────────────────────────────────────────── */
.pm-callout {
  display: flex;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--pm-radius);
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.6;
  border-left: 3px solid;
}
.pm-callout-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.4;
}
.pm-callout-tip {
  background: rgba(0,255,65,0.06);
  border-color: var(--pm-green-dim);
  color: rgba(0,255,65,0.85);
}
.pm-callout-warn {
  background: rgba(255,200,0,0.07);
  border-color: var(--pm-amber);
  color: rgba(255,210,0,0.92);
}
.pm-callout-lore {
  background: rgba(0,180,255,0.06);
  border-color: var(--pm-cyan);
  color: rgba(0,230,255,0.90);
}

/* ── CODE / KBD / PRE ─────────────────────────────────────────────────── */
.pm-code {
  font-family: var(--pm-font-mono);
  font-size: 12px;
  color: var(--pm-cyan);
  background: rgba(0,255,65,0.08);
  border: 1px solid rgba(0,255,65,0.20);
  border-radius: 3px;
  padding: 2px 6px;
}
.pm-kbd {
  display: inline-block;
  font-family: var(--pm-font-mono);
  font-size: 11.5px;
  color: var(--pm-green);
  background: rgba(0,255,65,0.10);
  border: 1px solid rgba(0,255,65,0.40);
  border-radius: 3px;
  padding: 2px 6px;
  box-shadow: 0 1px 0 rgba(0,255,65,0.25);
}
.pm-pre {
  font-family: var(--pm-font-mono);
  font-size: 12.5px;
  color: rgba(0,255,65,0.80);
  background: rgba(0,20,8,0.60);
  border: var(--pm-border);
  border-radius: var(--pm-radius);
  padding: 14px 18px;
  overflow-x: auto;
  line-height: 1.55;
  white-space: pre;
}
.pm-map {
  font-size: 12px;
  color: rgba(0,255,65,0.75);
  line-height: 1.6;
}

/* ── TACTICAL BATTLESPACE MAP DASHBOARD (SCENARIO 01) ───────────────── */
.pm-map-dashboard {
  background: linear-gradient(180deg, rgba(0, 24, 10, 0.92) 0%, rgba(0, 14, 6, 0.96) 100%);
  border: 1px solid rgba(0, 255, 65, 0.40);
  border-left: 3px solid var(--pm-green);
  border-radius: var(--pm-radius);
  padding: 16px 18px;
  margin: 14px 0 20px 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(0, 255, 65, 0.04);
}

.pm-map-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 255, 65, 0.25);
  padding-bottom: 10px;
  margin-bottom: 14px;
  font-family: var(--pm-font-mono);
  font-size: 11px;
  flex-wrap: wrap;
  gap: 8px;
}

.pm-map-compass-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 255, 65, 0.12);
  border: 1px solid rgba(0, 255, 65, 0.45);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--pm-green);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pm-map-specs-badge {
  color: #94a3b8;
  font-size: 10.5px;
  font-family: var(--pm-font-mono);
}

/* 2.5D Tactical Sector Visualizer */
.pm-map-blueprint {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 6, 2, 0.90);
  border: 1px solid rgba(0, 255, 65, 0.30);
  border-radius: 6px;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.pm-map-row-band {
  display: grid;
  gap: 8px;
  align-items: stretch;
}

.pm-map-row-north {
  grid-template-columns: 1.1fr 1.8fr 2.1fr;
  min-height: 85px;
}

.pm-map-row-highway {
  grid-template-columns: 1fr;
}

.pm-map-row-south {
  grid-template-columns: 1.6fr 1.6fr 2fr;
  min-height: 80px;
}

.pm-map-sector {
  border-radius: 5px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pm-map-sector.pine-forest {
  background: linear-gradient(135deg, rgba(20, 83, 45, 0.40) 0%, rgba(5, 46, 22, 0.60) 100%);
  border-color: rgba(34, 197, 94, 0.45);
}

.pm-map-sector.skybyn-selo {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.40) 0%, rgba(15, 23, 42, 0.70) 100%);
  border-color: rgba(56, 189, 248, 0.50);
}

.pm-map-sector.steppe-open {
  background: linear-gradient(135deg, rgba(161, 98, 7, 0.25) 0%, rgba(69, 26, 3, 0.35) 100%);
  border-color: rgba(234, 179, 8, 0.35);
}

.pm-map-sector.highway-m01 {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.98) 50%, rgba(15, 23, 42, 0.95) 100%);
  border-top: 2px dashed rgba(234, 179, 8, 0.75);
  border-bottom: 2px dashed rgba(234, 179, 8, 0.75);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 14px;
}

.pm-map-sector.rasputitsa-band {
  background: repeating-linear-gradient(45deg, rgba(69, 26, 3, 0.40), rgba(69, 26, 3, 0.40) 10px, rgba(41, 16, 2, 0.55) 10px, rgba(41, 16, 2, 0.55) 20px);
  border: 1px solid rgba(180, 83, 9, 0.45);
  font-size: 11px;
  padding: 6px 12px;
}

.pm-map-sector.agro-complex {
  background: linear-gradient(135deg, rgba(55, 65, 81, 0.40) 0%, rgba(17, 24, 39, 0.70) 100%);
  border-color: rgba(148, 163, 184, 0.45);
}

.pm-map-sector-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  font-family: var(--pm-font-mono);
}

.pm-map-sector-coords {
  font-size: 10px;
  color: #94a3b8;
  font-family: var(--pm-font-mono);
  margin-top: 2px;
}

.pm-map-sector-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pm-map-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  font-family: var(--pm-font-mono);
}

.pm-map-badge.vp-gold {
  background: rgba(250, 204, 21, 0.18);
  border: 1px solid rgba(250, 204, 21, 0.55);
  color: #fde047;
}

.pm-map-badge.cover-green {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.50);
  color: #86efac;
}

.pm-map-badge.hazard-amber {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.50);
  color: #fcd34d;
}

.pm-map-badge.killzone-red {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.50);
  color: #fca5a5;
}

/* Strategic Objectives Triad Cards */
.pm-map-objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.pm-map-obj-card {
  background: rgba(0, 15, 6, 0.85);
  border: 1px solid rgba(0, 255, 65, 0.25);
  border-left: 3px solid var(--pm-green);
  border-radius: 5px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pm-map-obj-icon {
  font-size: 22px;
  line-height: 1;
}

.pm-map-obj-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pm-map-obj-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
}

.pm-map-obj-meta {
  font-size: 11px;
  color: var(--pm-green);
  font-family: var(--pm-font-mono);
  font-weight: 700;
}

.pm-map-obj-desc {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.45;
}

/* Counter Diagram Card (Replaces ASCII chit) */
.pm-chit-card {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 195px;
  height: 105px;
  background: linear-gradient(135deg, rgba(20, 45, 30, 0.95) 0%, rgba(10, 25, 15, 0.95) 100%);
  border: 2px solid rgba(0, 255, 65, 0.65);
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(0, 255, 65, 0.15);
  font-family: var(--pm-font-mono);
  margin: 6px 0 14px 0;
}

.pm-chit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
}

.pm-chit-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0;
}

.pm-chit-hp {
  color: #22c55e;
  font-size: 15px;
  letter-spacing: 3px;
}

.pm-chit-hp-label {
  font-size: 10.5px;
  color: #86efac;
  font-weight: 700;
}

.pm-chit-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: #94a3b8;
  border-top: 1px solid rgba(0, 255, 65, 0.25);
  padding-top: 4px;
}

.pm-chit-vet {
  color: #fbbf24;
  font-weight: 700;
}

/* ── COUNTER DIAGRAM ─────────────────────────────────────────────────── */
.pm-counter-diagram {
  display: inline-block;
  margin: 8px 0 14px 0;
}

/* ── COMBAT STEP BOXES ───────────────────────────────────────────────── */
.pm-combat-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.pm-combat-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 14px;
  background: rgba(0,255,65,0.04);
  border: var(--pm-border);
  border-radius: var(--pm-radius);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(0,255,65,0.85);
}
.pm-step-badge {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--pm-green);
  background: rgba(0,255,65,0.12);
  border: 1px solid var(--pm-green-dim);
  border-radius: 3px;
  padding: 3px 8px;
  letter-spacing: 1px;
  min-width: 50px;
  text-align: center;
  margin-top: 1px;
}

/* ── COLORED DICE DOTS ───────────────────────────────────────────────── */
.pm-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  box-shadow: 0 0 4px currentColor;
}

/* ── RIBBON BUTTON ────────────────────────────────────────────────────── */
.btn-manual-pill {
  background: rgba(0, 40, 16, 0.70) !important;
  border-color: rgba(0, 200, 80, 0.60) !important;
  color: #00e050 !important;
  box-shadow: 0 0 8px rgba(0,200,80,0.18) !important;
}
.btn-manual-pill:hover {
  background: rgba(0, 60, 20, 0.90) !important;
  border-color: #00ff41 !important;
  color: #00ff41 !important;
  box-shadow: 0 0 14px rgba(0,255,65,0.40) !important;
}
.btn-manual-pill.active {
  background: rgba(0, 255, 65, 0.15) !important;
  border-color: #00ff41 !important;
  color: #00ff41 !important;
  box-shadow: 0 0 18px rgba(0,255,65,0.50) !important;
}

/* ── SCROLLBARS ───────────────────────────────────────────────────────── */
.pm-toc::-webkit-scrollbar,
.pm-content::-webkit-scrollbar {
  width: 5px;
}
.pm-toc::-webkit-scrollbar-track,
.pm-content::-webkit-scrollbar-track {
  background: rgba(0,255,65,0.05);
}
.pm-toc::-webkit-scrollbar-thumb,
.pm-content::-webkit-scrollbar-thumb {
  background: rgba(0,255,65,0.30);
  border-radius: 3px;
}
.pm-toc::-webkit-scrollbar-thumb:hover,
.pm-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0,255,65,0.55);
}

/* ── RESPONSIVE: HIDE TOC ON NARROW SCREENS ──────────────────────────── */
@media (max-width: 900px) {
  .pm-toc {
    display: none;
  }
  .pm-content {
    padding: 16px 18px;
  }
  .pm-panel {
    width: 99vw;
    margin: 4px auto;
    height: calc(100vh - 8px);
  }
}
@media (max-width: 600px) {
  .pm-header-sub,
  .pm-kbd-hint { display: none; }
}

/* ── BILINGUAL LANGUAGE SELECTOR IN MANUAL HEADER ────────────────────── */
.pm-lang-content.hidden,
.pm-toc-list.hidden {
  display: none !important;
}

.pm-lang-selector {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 20, 6, 0.90);
  border: 1px solid rgba(0, 255, 65, 0.35);
  border-radius: 4px;
  padding: 2px;
  gap: 2px;
}
.pm-lang-pill {
  font-family: var(--pm-font-mono);
  font-size: 12px;
  font-weight: 700;
  color: rgba(0, 255, 65, 0.65);
  background: transparent;
  border: none;
  border-radius: 3px;
  padding: 4px 10px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}
.pm-lang-pill:hover {
  color: #fff;
  background: rgba(0, 255, 65, 0.18);
}
.pm-lang-pill.active {
  color: #000;
  background: var(--pm-green);
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
  font-weight: 800;
}

/* ── REAL IN-GAME FIGURES & CALLOUT IMAGES ────────────────────────────── */
.pm-figure {
  margin: 16px 0 20px 0;
  background: rgba(0, 16, 5, 0.85);
  border: 1px solid rgba(0, 255, 65, 0.28);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}
.pm-figure:hover {
  border-color: rgba(0, 255, 65, 0.55);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.18);
}
.pm-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 65, 0.20);
  background: #020803;
  display: block;
}
.pm-figcaption {
  font-family: var(--pm-font-mono);
  font-size: 11.5px;
  color: rgba(0, 255, 65, 0.75);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pm-figcaption::before {
  content: '▶';
  color: var(--pm-green);
  font-size: 10px;
}

/* ── IN-GAME 3D DIE-CUT COUNTERS SHOWCASE GRID ───────────────────────── */
.pm-counters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 14px 0 22px 0;
}
.pm-counter-card {
  background: rgba(0, 24, 8, 0.85);
  border: 1px solid rgba(0, 255, 65, 0.25);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: all 0.2s ease;
}
.pm-counter-card:hover {
  border-color: var(--pm-green);
  box-shadow: 0 0 16px rgba(0, 255, 65, 0.25);
  transform: translateY(-2px);
}
.pm-counter-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.85));
}
.pm-counter-name {
  font-family: var(--pm-font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}
.pm-counter-badge {
  font-family: var(--pm-font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.pm-counter-badge.afu {
  background: rgba(0, 102, 204, 0.35);
  color: #66b3ff;
  border: 1px solid rgba(0, 102, 204, 0.6);
}
.pm-counter-badge.ru {
  background: rgba(204, 0, 0, 0.35);
  color: #ff8080;
  border: 1px solid rgba(204, 0, 0, 0.6);
}
.pm-counter-meta {
  font-family: var(--pm-font-mono);
  font-size: 10.5px;
  color: rgba(0, 255, 65, 0.6);
}

/* ── UNIT TABLE THUMBNAIL (IN-GAME 3D DOSSIER PORTRAIT) ─────────────── */
.pm-unit-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 65, 0.40);
  background: #020b04;
  display: block;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  transition: all 0.15s ease;
}
.pm-unit-thumb:hover {
  border-color: var(--pm-green);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
  transform: scale(1.12);
}

/* ── UNIT TABLE COUNTER CHIP (TACTICAL ALBUM CHIT) ─────────────────── */
.pm-unit-chip {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.85));
  display: block;
  margin: 0 auto;
  transition: all 0.2s ease;
}
.pm-unit-chip:hover {
  transform: scale(1.18);
  filter: drop-shadow(0 0 14px rgba(0, 255, 65, 0.65));
}




/* ═══════════════════════════════════════════════════════════════════════════
   MATRIX FIELD MANUAL REDESIGN & ENHANCED TERMINAL HUD
   ═══════════════════════════════════════════════════════════════════════════ */

.pm-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pm-green);
  box-shadow: 0 0 10px var(--pm-green);
  animation: pm-status-pulse 2s infinite ease-in-out;
  margin-right: 4px;
}

@keyframes pm-status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px var(--pm-green); }
  50% { opacity: 0.35; transform: scale(0.85); box-shadow: 0 0 3px var(--pm-green); }
}

/* ── SEARCH & FILTER BOX ──────────────────────────────────────────────── */
.pm-search-box {
  position: relative;
  padding: 0 10px 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.pm-search-input {
  width: 100%;
  background: rgba(0, 10, 4, 0.90);
  border: 1px solid rgba(0, 255, 65, 0.45);
  border-radius: 3px;
  color: var(--pm-green);
  font-family: var(--pm-font-mono);
  font-size: 11.5px;
  padding: 6px 24px 6px 10px;
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.pm-search-input:focus {
  border-color: var(--pm-green);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
  background: rgba(0, 18, 8, 0.98);
}

.pm-search-clear {
  position: absolute;
  right: 18px;
  top: 5px;
  color: rgba(0, 255, 65, 0.5);
  cursor: pointer;
  font-size: 13px;
  font-family: monospace;
  display: none;
  user-select: none;
}

.pm-search-clear:hover {
  color: #fff;
}

/* ── QUICK ACTION STRIP ──────────────────────────────────────────────── */
.pm-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
  padding: 10px 14px;
  background: rgba(0, 24, 10, 0.90);
  border: 1px solid rgba(0, 255, 65, 0.35);
  border-radius: 4px;
  box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.05), 0 4px 16px rgba(0, 0, 0, 0.6);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pm-quick-pill {
  font-family: var(--pm-font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pm-green);
  background: rgba(0, 255, 65, 0.08);
  border: 1px solid rgba(0, 255, 65, 0.35);
  border-radius: 3px;
  padding: 4px 10px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.pm-quick-pill:hover {
  background: rgba(0, 255, 65, 0.28);
  color: #fff;
  border-color: var(--pm-green);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.55);
}

/* ── RETICLE HUD ACCENTS ON SECTIONS ─────────────────────────────────── */
.pm-section {
  position: relative;
  background: rgba(0, 16, 6, 0.70);
  border: 1px solid rgba(0, 255, 65, 0.22);
  border-radius: 5px;
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(0, 255, 65, 0.02);
}

.pm-section::before {
  content: "◤";
  position: absolute;
  top: 4px;
  left: 6px;
  font-family: var(--pm-font-mono);
  font-size: 11px;
  color: rgba(0, 255, 65, 0.45);
  pointer-events: none;
}

.pm-section::after {
  content: "◢";
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-family: var(--pm-font-mono);
  font-size: 11px;
  color: rgba(0, 255, 65, 0.45);
  pointer-events: none;
}

.pm-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pm-section-tag {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(0, 255, 65, 0.5);
  border: 1px solid rgba(0, 255, 65, 0.25);
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: normal;
}
