/* Shell Overrides for Frameless Demo Analyzer Layout */
body:has(#demo-analyzer-view:not(.hidden)) {
  padding: 0 !important;
  overflow: hidden !important;
}

body:has(#demo-analyzer-view:not(.hidden)) .top-bar {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  max-width: none;
  margin: 0;
  padding: 8px 16px;
  box-sizing: border-box;
  z-index: 9000;
}

body:has(#demo-analyzer-view:not(.hidden)) .app-container {
  width: 100% !important;
  max-width: none !important;
  gap: 0 !important;
  padding: 0 8px 8px 8px !important;
  margin: 0 !important;
  height: calc(100vh - 48px) !important;
  max-height: calc(100vh - 48px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

body:has(#demo-analyzer-view:not(.hidden)) #main-content {
  flex: 1 1 auto !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body:has(#demo-analyzer-view:not(.hidden)) .site-footer {
  display: none !important;
}

#demo-analyzer-view {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
}

#demo-analyzer-view.hidden {
  display: none !important;
}

.demo-analyzer-container {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

#demo-main-view {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

#demo-upload-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

/* Pre-Parsed Hub Container */
.demo-preparsed-hub {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: auto;
}

/* Featured Pre-Parsed Pro Match Card */
.featured-match-card {
  position: relative;
  background: linear-gradient(145deg, rgba(22, 27, 34, 0.95), rgba(13, 17, 23, 0.98));
  border: 1px solid rgba(255, 184, 0, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 184, 0, 0.12);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.featured-match-card:hover {
  border-color: rgba(255, 184, 0, 0.6);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.6), 0 0 32px rgba(255, 184, 0, 0.2);
}

.featured-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255, 184, 0, 0.08);
  border-bottom: 1px solid rgba(255, 184, 0, 0.2);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.featured-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: #ffb800;
}

.live-beacon {
  width: 8px;
  height: 8px;
  background: #ffb800;
  border-radius: 50%;
  box-shadow: 0 0 8px #ffb800;
  animation: pulse-beacon 1.8s infinite;
}

@keyframes pulse-beacon {
  0% { transform: scale(0.95); opacity: 0.85; box-shadow: 0 0 0 0 rgba(255, 184, 0, 0.7); }
  70% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 0 8px rgba(255, 184, 0, 0); }
  100% { transform: scale(0.95); opacity: 0.85; box-shadow: 0 0 0 0 rgba(255, 184, 0, 0); }
}

.featured-zero-pill {
  color: #00e5ff;
  font-weight: 600;
  background: rgba(0, 229, 255, 0.08);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.featured-match-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Teams Scoreboard Display */
.featured-teams-board {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 12, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 20px;
}

.featured-team {
  display: flex;
  align-items: center;
  gap: 14px;
}

.featured-team.spirit {
  flex-direction: row;
}

.featured-team.falcons {
  flex-direction: row-reverse;
}

.featured-team .team-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
}

.featured-team.spirit .team-name {
  color: #4ade80; /* Spirit Green/Light Accent */
}

.featured-team.falcons .team-name {
  color: #e2e8f0;
}

.featured-team .team-score {
  font-size: 1.6rem;
  font-weight: 900;
  font-family: 'Rajdhani', monospace, sans-serif;
  color: #ffb800;
  background: rgba(255, 184, 0, 0.1);
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.featured-vs-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.featured-vs-box .vs-text {
  font-size: 0.75rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
}

.featured-vs-box .map-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffb800;
  letter-spacing: 0.08em;
  background: rgba(255, 184, 0, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Metadata Grid */
.featured-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.meta-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.meta-item .meta-icon {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.meta-item .meta-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
}

.meta-item .meta-lbl {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Simple Prepared Demo Button Under Upload */
.demo-sample-action {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.btn-load-sample {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-load-sample:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.btn-load-sample:active {
  transform: translateY(1px);
}

/* Featured Load CTA Button */
.featured-card-actions {
  display: flex;
  width: 100%;
}

.btn-load-preparsed {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #ffb800, #ff9100);
  color: #0b0e14;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.07em;
  padding: 14px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255, 184, 0, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn-load-preparsed:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(255, 184, 0, 0.5);
}

.btn-load-preparsed:active {
  transform: translateY(1px);
}

.btn-load-preparsed .btn-icon {
  font-size: 1.15rem;
}

/* Upload & Welcome Card */
.demo-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(18, 20, 24, 0.6);
  backdrop-filter: blur(10px);
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.demo-upload-zone:hover,
.demo-upload-zone.dragover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.85);
}

.upload-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: #ffffff;
}

.upload-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted, #8e95a5);
  max-width: 500px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Browse Demo Button - High-contrast black text on white background */
.demo-upload-zone .host-btn,
.demo-upload-zone .action-btn,
.demo-browse-btn,
#btn-browse-demo {
  background: linear-gradient(180deg, #ffffff 0%, #e4e4e7 100%) !important;
  color: #000000 !important;
  padding: 14px 32px !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  border-radius: 8px !important;
  border: 1px solid #ffffff !important;
  cursor: pointer !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.demo-upload-zone .host-btn:hover,
.demo-upload-zone .action-btn:hover,
.demo-browse-btn:hover,
#btn-browse-demo:hover {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-1px) !important;
}

.demo-upload-zone .host-btn:active,
.demo-upload-zone .action-btn:active,
.demo-browse-btn:active,
#btn-browse-demo:active {
  background: #e4e4e7 !important;
  color: #000000 !important;
  transform: translateY(1px) !important;
}

.sample-demos-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 440px;
}

.sample-demos-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted, #8e95a5);
}

.sample-btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.sample-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sample-btn:hover {
  background: var(--accent-gold, #ffb800);
  color: #0b0d10;
  border-color: var(--accent-gold, #ffb800);
}

/* Unified Match & Round Header Bar */
.unified-match-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(14, 17, 23, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 4px 10px;
  min-height: 38px;
}

.match-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.map-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px 7px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
}

.score-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: monospace;
}

.score-display .team-name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-display .team-name.team1 {
  color: #4a90e2;
}

.score-display .team-name.team2 {
  color: #f5a623;
}

.score-display .score-team1 {
  color: #4a90e2;
  font-size: 1.15rem;
}

.score-display .score-team2 {
  color: #f5a623;
  font-size: 1.15rem;
}

.score-display .score-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.95rem;
}

.score-ct {
  color: #4a90e2;
}

.score-t {
  color: #f5a623;
}

.round-selector-container {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 2px 4px;
  overflow: visible;
}

/* Phase Groups (H1, H2, OT) */
.round-phase-group {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 4px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.round-phase-tag {
  font-size: 0.58rem;
  font-weight: 900;
  font-family: monospace;
  color: var(--accent-gold, #ffb800);
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.25);
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  margin-right: 1px;
  user-select: none;
}

.round-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  min-width: 27px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
}

.round-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.round-pill.active {
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.round-pill.winner-ct {
  border-left: 3px solid #4a90e2;
}

.round-pill.winner-t {
  border-left: 3px solid #f5a623;
}

.round-pill-num {
  font-family: monospace;
}

.round-pill-side {
  font-size: 0.58rem;
  opacity: 0.75;
}

.match-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.close-demo-btn {
  padding: 4px 8px;
  font-size: 0.75rem;
}

/* ==========================================================================
   Side-by-Side Workspace Layout (Map on Left, Tactical Workbench on Right)
   ========================================================================== */
.analyzer-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
  overflow: hidden;
}

/* Radar Column: Map Viewport & Integrated Console (hugs map with zero excess width) */
.radar-main-column {
  flex: 0 0 auto;
  width: min-content;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 4px 0 0;
  box-sizing: border-box;
  overflow: hidden;
}

.radar-viewport {
  position: relative;
  flex: 1 1 auto;
  /* Leaves 85px for the bottom controls console + 42px header + padding */
  height: calc(100vh - 200px);
  width: calc(100vh - 200px);
  aspect-ratio: 1 / 1;
  max-height: calc(100vh - 200px);
  max-width: calc(100vh - 200px);
  min-height: 240px;
  min-width: 240px;
  background-color: #000;
  border-radius: 4px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.radar-stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  transition: transform 0.22s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-bg-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.radar-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.radar-overlay-hud {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.radar-hud-info-group,
.radar-hud-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.radar-hud-tag {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffffff;
}

.radar-hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #94a3b8;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  transition: all 0.15s ease;
}

.radar-hud-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.35);
}

.radar-hud-btn.active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.radar-hud-btn .hud-zoom-indicator {
  font-size: 8px;
  color: #10b981;
  line-height: 1;
}

.radar-hud-btn:not(.active) .hud-zoom-indicator {
  color: #64748b;
}

/* Calibration HUD Widget */
.radar-calib-widget {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(12, 14, 18, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 184, 0, 0.35);
  border-radius: 6px;
  padding: 6px 8px;
  width: 175px;
  z-index: 20;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  user-select: none;
  font-size: 0.72rem;
}

.calib-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.calib-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--accent-gold, #ffb800);
}

.calib-toggle-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 3px;
  padding: 0 5px;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
}

.calib-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.calib-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calib-step-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
}

.calib-step-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ddd;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.65rem;
  cursor: pointer;
}

.calib-step-btn.active {
  background: var(--accent-gold, #ffb800);
  color: #000;
  font-weight: 700;
  border-color: var(--accent-gold, #ffb800);
}

.calib-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.calib-row-label {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.calib-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.dpad-mid {
  display: flex;
  align-items: center;
  gap: 2px;
}

.calib-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.calib-btn:hover {
  background: rgba(255, 184, 0, 0.25);
  border-color: var(--accent-gold, #ffb800);
  color: #fff;
}

.calib-btn:active {
  transform: scale(0.95);
}

.dpad-up, .dpad-down {
  width: 32px;
  height: 22px;
  font-size: 0.65rem;
}

.dpad-left, .dpad-right {
  width: 28px;
  height: 22px;
  font-size: 0.65rem;
}

.dpad-center {
  width: 24px;
  height: 22px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}

.calib-scale-group {
  display: flex;
  gap: 4px;
}

.scale-btn {
  flex: 1;
  padding: 3px 4px;
  font-size: 0.65rem;
  font-weight: 600;
}

.calib-values-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 4px 6px;
  font-family: monospace;
  font-size: 0.66rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calib-val-line {
  display: flex;
  justify-content: space-between;
}

.calib-copy-btn {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.9), rgba(255, 140, 0, 0.9));
  border: none;
  border-radius: 4px;
  color: #000;
  font-weight: 800;
  font-size: 0.65rem;
  padding: 5px;
  cursor: pointer;
  letter-spacing: 0.4px;
  transition: all 0.15s;
}

.calib-copy-btn:hover {
  background: #ffc425;
  box-shadow: 0 0 8px rgba(255, 184, 0, 0.5);
}

.calib-copy-btn:active {
  transform: scale(0.98);
}

/* Integrated Control Console */
.radar-console {
  flex: 0 0 auto;
  width: calc(100vh - 200px);
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 6px 8px;
}

.console-transport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.transport-left-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Perspective View Filter Overlay (Bottom-Right Corner of Radar Viewport) */
.radar-side-filter-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 15;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(10, 14, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.side-filter-overlay-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted, #8e95a5);
  text-transform: uppercase;
  padding: 0 4px 0 2px;
}

.console-transport-row .play-pause-btn {
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.console-transport-row .reset-btn {
  padding: 3px 6px;
  font-size: 0.75rem;
}

.step-btn-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.step-btn-group .step-btn {
  padding: 2px 5px;
  font-size: 0.68rem;
  font-family: monospace;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.console-transport-row .timeline-slider {
  flex: 1;
  min-width: 60px;
  margin: 0 4px;
}

.console-transport-row .timeline-time {
  font-family: monospace;
  font-size: 0.75rem;
  color: #e2e8f0;
  min-width: 72px;
  text-align: center;
  white-space: nowrap;
}

.speed-buttons-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.speed-buttons-group .speed-btn {
  padding: 2px 5px;
  font-size: 0.7rem;
  border-radius: 3px;
}

/* Tactical Sub-Bar (Perspective, Jumps, Utility) */
.console-sub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.sub-bar-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-bar-group.flex-right {
  margin-left: auto;
}

.sub-bar-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted, #8e95a5);
  text-transform: uppercase;
}

.perspective-btn-group {
  display: flex;
  gap: 2px;
}

.side-filter-btn {
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 3px;
}

.side-filter-btn.ct { color: #82b6f4; }
.side-filter-btn.t { color: #eda338; }

.quick-jumps-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.jump-badge-btn {
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.jump-badge-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.util-badge-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.util-mini-badge {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.util-mini-badge strong {
  font-family: monospace;
  color: var(--accent-gold, #ffb800);
}

.grenade-img-icon,
.misc-nade-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.inline-nade-icon {
  width: 14px;
  height: 14px;
  margin-right: 2px;
}

.util-icons-val {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.util-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.control-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.control-btn.active {
  background: var(--accent-gold, #ffb800);
  color: #0b0d10;
  border-color: var(--accent-gold, #ffb800);
}

/* ==========================================================================
   Multi-Mode Tactical Workbench (Right Panel)
   ========================================================================== */
.tactical-workbench {
  flex: 1 1 auto;
  min-height: 0;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  padding: 0 4px 0 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workbench-view {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.workbench-panel {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title-text {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #ffffff;
}

.panel-desc {
  font-size: 0.75rem;
  color: var(--text-muted, #8e95a5);
  margin: 0;
  line-height: 1.4;
}

.launcher-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.extract-launcher-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-align: left;
}

.extract-launcher-btn.ct-btn {
  background: rgba(74, 144, 226, 0.12);
  border-color: rgba(74, 144, 226, 0.4);
  color: #82b6f4;
}

.extract-launcher-btn.ct-btn:hover {
  background: rgba(74, 144, 226, 0.25);
  border-color: #4a90e2;
}

.extract-launcher-btn.t-btn {
  background: rgba(245, 166, 35, 0.12);
  border-color: rgba(245, 166, 35, 0.4);
  color: #ffd27d;
}

.extract-launcher-btn.t-btn:hover {
  background: rgba(245, 166, 35, 0.25);
  border-color: #f5a623;
}

.launcher-btn-icon {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.launcher-side-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.launcher-btn-text strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.launcher-btn-text small {
  display: block;
  font-size: 0.65rem;
  opacity: 0.8;
}

.launcher-buy-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.launcher-buy-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.4px;
}

.launcher-buy-row .strat-pill {
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 700;
}

/* Modern Tactical Round Breakdown */
.tactical-breakdown-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  background: rgba(14, 17, 23, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
}

.tactical-breakdown-panel .panel-header {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tactical-archetype-badge {
  font-size: 0.68rem;
  font-weight: 800;
  font-family: monospace;
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.18), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(255, 184, 0, 0.45);
  color: var(--accent-gold, #ffb800);
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(255, 184, 0, 0.15);
}

.tactical-metrics-container {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.modern-stat-box {
  background: rgba(18, 22, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.modern-stat-box:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.stat-box-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #c9d1d9;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.stat-box-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.stat-box-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.5px;
}

.stat-box-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.strat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-family: inherit;
  padding: 2px 0;
}

.strat-lbl {
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.strat-val {
  font-weight: 700;
  color: #f1f5f9;
  font-family: monospace;
}

.strat-val.highlight {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 0.73rem;
}

.target-site-val {
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-size: 0.73rem;
}

.trade-rate-val {
  color: #86efac;
  font-size: 0.75rem;
}

/* Economy Pill Badges */
.strat-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: monospace;
  letter-spacing: 0.3px;
}

.strat-pill.ct-pill {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.strat-pill.t-pill {
  background: rgba(245, 158, 11, 0.15);
  color: #fde047;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Prominent Modern Utility Deployment Breakdown */
.utility-stat-box {
  background: rgba(14, 18, 25, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 12px 14px !important;
}

.util-breakdown-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.util-team-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.util-team-card.ct-util-card {
  border-left: 3px solid #3b82f6;
}

.util-team-card.t-util-card {
  border-left: 3px solid #f59e0b;
}

.util-team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.strat-side-tag {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-family: monospace;
}

.strat-side-tag.ct {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.strat-side-tag.t {
  background: rgba(245, 158, 11, 0.2);
  color: #eda338;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.util-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.util-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 6px 4px;
  transition: all 0.2s ease;
}

.util-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.util-badge.active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.util-badge-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

.util-badge-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.util-badge-count {
  font-size: 0.85rem;
  font-weight: 900;
  font-family: monospace;
  color: #64748b;
  line-height: 1;
}

.util-badge-count.highlight {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Tactical Strat Extractor Workbench (Mode 2 - Embedded alongside map)
   ========================================================================== */
.extractor-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.extractor-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.extractor-header-bar h3 {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
  margin: 0;
}

.extractor-header-tags {
  display: flex;
  align-items: center;
  gap: 4px;
}

.close-extractor-btn {
  padding: 3px 8px;
  font-size: 0.72rem;
}

/* Scrollable Extractor Workbench Body */
.extractor-workbench-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 3px;
  scrollbar-width: thin;
}

.extractor-footer-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.form-group label {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted, #8e95a5);
}

.form-control {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #ffffff;
  padding: 4px 8px;
  font-size: 0.78rem;
  outline: none;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--accent-gold, #ffb800);
}

.strat-meta-grid {
  display: flex;
  gap: 6px;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.extractor-section-panel {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--accent-gold, #ffb800);
  text-transform: uppercase;
}

.snippet-summary-badge {
  font-size: 0.65rem;
  font-family: monospace;
  font-weight: 700;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
}

.snippet-presets-bar {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.snippet-preset-btn {
  padding: 2px 6px;
  font-size: 0.65rem;
  border-radius: 3px;
}

.snippet-times-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}

.snippet-time-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 4px 6px;
}

.snippet-time-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.snippet-time-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--accent-gold, #ffb800);
}

.snippet-preview-btn {
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.35);
  color: #ffd27d;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}

.snippet-preview-btn:hover {
  background: rgba(255, 184, 0, 0.28);
  border-color: var(--accent-gold, #ffb800);
  color: #ffffff;
}

.snippet-input-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.snippet-time-text-input {
  width: 44px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  color: #ffffff;
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 3px;
  text-align: center;
  outline: none;
}

.snippet-time-text-input:focus {
  border-color: var(--accent-gold, #ffb800);
  box-shadow: 0 0 6px rgba(255, 184, 0, 0.35);
}

/* Streamlined Player Extractor Cards */
.extractor-roster-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-extractor-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.15s;
}

.player-extractor-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.player-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.player-identity {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.player-name-text {
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-primary-badge {
  font-size: 0.6rem;
  color: var(--accent-gold, #ffb800);
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.25);
  border-radius: 3px;
  padding: 1px 4px;
  font-family: monospace;
}

.player-role-select.compact {
  padding: 2px 5px;
  font-size: 0.68rem;
  font-weight: 700;
  width: auto;
  max-width: 150px;
  color: #82b6f4;
}

.player-task-row {
  display: flex;
  width: 100%;
}

.player-task-row .player-task-desc {
  width: 100%;
  padding: 2px 6px;
  font-size: 0.68rem;
  border-radius: 3px;
}

.player-card-events {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 1px;
}

.event-tag {
  font-size: 0.6rem;
  padding: 1px 3px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.event-tag.kill {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.event-tag.nade {
  border-color: rgba(96, 165, 250, 0.4);
  color: #93c5fd;
}

.event-tag.bomb {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

/* ==========================================================================
   Tactical 3-Phase Segmentation (Setup, Execute, Post) Styles
   ========================================================================== */
.phase-segmentation-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 8px;
}

.phase-preview-pills {
  display: flex;
  gap: 4px;
}

.phase-pill-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.phase-pill-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.phase-pill-btn.active[data-phase="all"] {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.phase-pill-btn.active.setup,
.phase-pill-btn.setup:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.phase-pill-btn.active.execute,
.phase-pill-btn.execute:hover {
  background: rgba(237, 163, 56, 0.18);
  border-color: #eda338;
  color: #eda338;
  box-shadow: 0 0 8px rgba(237, 163, 56, 0.25);
}

.phase-pill-btn.active.post,
.phase-pill-btn.post:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

/* 3-Phase Segmented Timeline Bar */
.phases-segmented-bar {
  display: flex;
  width: 100%;
  height: 28px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0d1117;
}

.phase-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.phase-segment.setup {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.25) 0%, rgba(56, 189, 248, 0.12) 100%);
  border-right: 1px solid rgba(56, 189, 248, 0.4);
}

.phase-segment.execute {
  background: linear-gradient(180deg, rgba(237, 163, 56, 0.28) 0%, rgba(237, 163, 56, 0.14) 100%);
  border-right: 1px solid rgba(237, 163, 56, 0.4);
}

.phase-segment.post {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.12) 100%);
}

.phase-segment:hover {
  filter: brightness(1.2);
}

.phase-seg-label {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  line-height: 1;
}

.phase-segment.setup .phase-seg-label { color: #38bdf8; }
.phase-segment.execute .phase-seg-label { color: #eda338; }
.phase-segment.post .phase-seg-label { color: #10b981; }

.phase-seg-time {
  font-size: 0.55rem;
  color: #94a3b8;
  font-family: monospace;
  line-height: 1;
  margin-top: 2px;
}

.phase-splits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.phase-split-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Phase Player Task Rows */
.player-phase-tasks {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
}

.phase-task-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.phase-task-badge {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 1px 4px;
  border-radius: 3px;
  min-width: 48px;
  text-align: center;
  flex-shrink: 0;
}

.phase-task-badge.setup {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.phase-task-badge.execute {
  background: rgba(237, 163, 56, 0.15);
  border: 1px solid rgba(237, 163, 56, 0.35);
  color: #eda338;
}

.phase-task-badge.post {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.player-phase-input {
  width: 100%;
  padding: 2px 6px;
  font-size: 0.68rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.player-phase-input:focus {
  border-color: var(--cs-orange);
  outline: none;
  box-shadow: 0 0 6px rgba(237, 163, 56, 0.3);
}

/* 5-Player Tactical Strip (Less is More Focused Selection) */
.extractor-player-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  margin-bottom: 6px;
  scrollbar-width: thin;
}

.extractor-player-strip::-webkit-scrollbar {
  height: 4px;
}

.extractor-player-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.player-strip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}

.player-strip-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #f1f5f9;
}

.player-strip-btn.active {
  background: rgba(237, 163, 56, 0.14) !important;
  border-color: var(--player-accent, #eda338) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(237, 163, 56, 0.25);
}

.strip-player-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.strip-all-icon {
  font-size: 0.85rem;
}

.strip-player-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.strip-player-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: #f1f5f9;
}

.strip-player-role {
  font-size: 0.58rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
}

.roster-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-btn.mini {
  font-size: 0.62rem !important;
  padding: 2px 7px !important;
  height: auto !important;
}

/* Active Phase Segment Highlight */
.phase-segment.active-phase {
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.2);
  filter: brightness(1.25);
}

.phase-segment.setup.active-phase {
  border-top: 2px solid #38bdf8;
  border-bottom: 2px solid #38bdf8;
}

.phase-segment.execute.active-phase {
  border-top: 2px solid #eda338;
  border-bottom: 2px solid #eda338;
}

.phase-segment.post.active-phase {
  border-top: 2px solid #10b981;
  border-bottom: 2px solid #10b981;
}

.player-extractor-card.focused-hero-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(237, 163, 56, 0.3);
  padding: 8px 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.player-extractor-card.focused-hero-card .player-name-text {
  font-size: 0.88rem;
  color: #eda338;
}

.player-extractor-card.focused-hero-card .player-phase-input {
  font-size: 0.74rem;
  padding: 4px 8px;
}

/* Full Screen Backdrop Blur Loading Overlay */
.demo-loading-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(10, 12, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeIn 0.2s ease-out;
}

/* Loading Spinner */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px 40px;
  background: rgba(18, 22, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent-gold, #ffb800);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Mobile & Responsive Layout for CS2 Demo Analyzer (<= 900px)
   Keeps 100% normal desktop browser CSS untouched above 900px.
   ========================================================================== */
@media (max-width: 900px) {
  html, body {
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .app-container {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 24px;
  }

  .demo-analyzer-container,
  #demo-main-view,
  #demo-analysis-section {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    gap: 10px;
  }

  /* 1. Unified Match Header Bar on Mobile */
  .unified-match-bar {
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    min-height: unset !important;
    height: auto !important;
  }

  .match-info-left {
    flex: 1 1 auto !important;
    gap: 8px !important;
  }

  .match-actions-right {
    flex: 0 0 auto !important;
  }

  .close-demo-btn {
    padding: 6px 10px !important;
    font-size: 0.78rem !important;
    min-height: 32px;
  }

  /* Horizontal swipeable round selector strip */
  .round-selector-container {
    order: 3 !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding: 6px 2px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .round-phase-group {
    flex-shrink: 0 !important;
  }

  .round-pill {
    padding: 4px 8px !important;
    min-height: 28px;
    font-size: 0.72rem !important;
  }

  /* 2. Workspace Stacked Layout on Mobile */
  .analyzer-workspace {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
    gap: 12px !important;
  }

  /* 3. Radar & Console Column */
  .radar-main-column {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    padding: 8px !important;
    gap: 8px !important;
  }

  .radar-viewport {
    width: 100% !important;
    max-width: min(92vw, 440px) !important;
    height: auto !important;
    max-height: min(92vw, 440px) !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 auto !important;
  }

  .radar-bg-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  .radar-console {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px !important;
    gap: 8px !important;
  }

  /* 4-Corner Balanced Radar HUD on Mobile (Zero Button Overlap) */
  .radar-overlay-hud {
    position: static !important;
  }

  .radar-hud-info-group {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    z-index: 15 !important;
    pointer-events: none !important;
  }

  .radar-hud-info-group .radar-hud-tag {
    pointer-events: auto !important;
    font-size: 0.68rem !important;
    padding: 3px 6px !important;
    max-width: 140px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .demo-radar-layer-toggle {
    top: 8px !important;
    right: 8px !important;
    z-index: 15 !important;
  }

  .demo-radar-layer-toggle .layer-toggle-btn {
    padding: 3px 8px !important;
    font-size: 0.68rem !important;
    min-height: 28px !important;
  }

  /* Bottom-Left Tactical Buttons: Thumb Reachable */
  .radar-hud-btn-group {
    position: absolute !important;
    bottom: 8px !important;
    left: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    z-index: 15 !important;
  }

  .radar-hud-btn-group .radar-hud-btn {
    padding: 4px 7px !important;
    font-size: 0.66rem !important;
    min-height: 28px !important;
    letter-spacing: 0.3px !important;
  }

  /* Bottom-Right Team Perspective Filter */
  .radar-side-filter-overlay {
    bottom: 8px !important;
    right: 8px !important;
    z-index: 15 !important;
    padding: 2px 4px !important;
    gap: 3px !important;
  }

  .radar-side-filter-overlay .side-filter-overlay-label {
    display: none !important;
  }

  .radar-side-filter-overlay .side-filter-btn {
    padding: 3px 7px !important;
    font-size: 0.66rem !important;
    min-height: 26px !important;
  }

  /* Mobile Phase Timeline Bar & Extended Touch Hitboxes */
  .radar-phase-timeline-bar,
  .radar-unified-timeline {
    height: 34px !important;
  }

  .phase-timeline-dot::after,
  .radar-phase-handle::after {
    content: '' !important;
    position: absolute !important;
    top: -10px !important;
    bottom: -10px !important;
    left: -12px !important;
    right: -12px !important;
    cursor: col-resize !important;
  }

  .radar-phase-seg .seg-title {
    font-size: 0.6rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 90% !important;
    padding: 0 2px !important;
  }

  /* Transport & Timeline Controls on Mobile */
  .console-transport-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .console-transport-row .timeline-slider {
    order: 1 !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    margin: 4px 0 !important;
    height: 6px;
  }

  .console-transport-row .reset-btn,
  .console-transport-row .play-pause-btn,
  .step-btn-group {
    order: 2 !important;
  }

  .console-transport-row .play-pause-btn {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    min-height: 34px;
  }

  .step-btn-group .step-btn {
    padding: 5px 8px !important;
    font-size: 0.72rem !important;
    min-height: 34px;
  }

  .console-transport-row .timeline-time {
    order: 3 !important;
    font-size: 0.75rem !important;
  }

  .speed-buttons-group {
    order: 4 !important;
    margin-left: auto !important;
  }

  .speed-buttons-group .speed-btn {
    padding: 4px 7px !important;
    font-size: 0.72rem !important;
    min-height: 32px;
  }

  /* Tactical Sub-Bar (Perspective & Jumps) */
  .console-sub-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .sub-bar-group {
    justify-content: space-between !important;
    width: 100% !important;
  }

  .perspective-btn-group,
  .quick-jumps-group {
    display: flex !important;
    gap: 4px !important;
  }

  .side-filter-btn {
    padding: 5px 12px !important;
    min-height: 32px;
    font-size: 0.75rem !important;
  }

  .jump-badge-btn {
    padding: 5px 8px !important;
    min-height: 32px;
    font-size: 0.7rem !important;
  }

  /* 4. Tactical Workbench Column on Mobile */
  .tactical-workbench {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  .workbench-view {
    height: auto !important;
    overflow: visible !important;
    gap: 12px !important;
  }

  .workbench-panel {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .launcher-actions-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .extract-launcher-btn {
    padding: 12px 14px !important;
  }

  .tactical-metrics-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .tactical-stat-box {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Extractor Workbench on Mobile */
  .extractor-workbench-body {
    max-height: none !important;
    overflow: visible !important;
    gap: 12px !important;
  }

  .strat-meta-grid {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .snippet-controls {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .snippet-time-presets {
    width: 100% !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
  }

  .role-row-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .role-task-input {
    width: 100% !important;
  }

  /* Mockup Extractor Studio Mobile Optimizations (<= 900px) */
  .mockup-extractor-studio {
    padding: 12px 10px !important;
    gap: 12px !important;
    overflow-x: hidden !important;
    height: auto !important;
  }

  .mockup-strat-title-input {
    font-size: clamp(1.15rem, 5vw, 1.4rem) !important;
  }

  .mockup-sub-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* Smooth Horizontal Swipe Carousel for 5 Players */
  .mockup-player-strip {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 8px !important;
    padding: 4px 2px 8px 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    scrollbar-width: thin !important;
  }

  .mockup-player-card {
    flex: 0 0 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    scroll-snap-align: start !important;
    padding: 8px 4px 7px 4px !important;
    box-sizing: border-box !important;
  }

  .mockup-player-avatar {
    width: 30px !important;
    height: 30px !important;
  }

  .mockup-avatar-wrap {
    width: 40px !important;
    height: 40px !important;
    margin-bottom: 4px !important;
  }

  .mockup-player-name {
    font-size: 0.74rem !important;
  }

  .mockup-role-select {
    font-size: 0.64rem !important;
    padding: 2px 10px 2px 2px !important;
  }

  .mockup-phase-card {
    padding: 10px 12px !important;
  }

  .mockup-phase-num-title {
    font-size: 0.86rem !important;
  }

  .mockup-phase-timestamp {
    font-size: 0.75rem !important;
  }

  .mockup-phase-desc {
    font-size: 0.8rem !important;
    line-height: 1.45 !important;
  }

  .mockup-action-area {
    margin-top: 4px !important;
    gap: 8px !important;
  }
}

@media (max-width: 480px) {
  .radar-viewport {
    max-width: min(94vw, 360px) !important;
    max-height: min(94vw, 360px) !important;
  }

  .radar-hud-info-group .radar-hud-tag {
    max-width: 95px !important;
    font-size: 0.64rem !important;
    padding: 2px 5px !important;
  }

  .snippet-times-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .console-sub-bar {
    gap: 6px !important;
  }

  .side-filter-btn {
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
  }

  .jump-badge-btn {
    padding: 4px 6px !important;
    font-size: 0.65rem !important;
  }

  .speed-buttons-group .speed-btn {
    padding: 3px 5px !important;
    font-size: 0.68rem !important;
  }

  .round-selector-container {
    padding: 4px 0 !important;
    gap: 4px !important;
  }

  /* Stack Action CTA Buttons Full-Width on Mobile */
  .mockup-action-area {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .mockup-preview-btn,
  .mockup-save-btn {
    width: 100% !important;
    flex: none !important;
    min-height: 44px !important;
    font-size: 0.84rem !important;
  }
}

/* ==========================================================================
   Mockup 1:1 Strat Extractor Studio Styles
   ========================================================================== */
.mockup-extractor-studio {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 2px 4px 6px 4px;
  box-sizing: border-box;
  overflow-y: auto;
}

/* 1. Header Area */
.mockup-header-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mockup-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.mockup-title-left {
  flex: 1 1 200px;
  min-width: 0;
}

.mockup-strat-title-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid transparent;
  color: #ffb800;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: inherit;
  padding: 2px 0;
  outline: none;
  transition: border-color 0.2s;
}

.mockup-strat-title-input:hover,
.mockup-strat-title-input:focus {
  border-bottom-color: rgba(255, 184, 0, 0.4);
}

/* In-Studio CT vs T Side Switcher */
.extractor-side-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
}

.extractor-side-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  user-select: none;
}

.extractor-side-toggle .side-tag {
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.extractor-side-toggle .side-buy-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

/* CT Side Toggle Styling */
.extractor-side-toggle.ct .side-tag {
  color: #60a5fa;
}
.extractor-side-toggle.ct .side-buy-pill {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.extractor-side-toggle.ct:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}
.extractor-side-toggle.ct.active {
  background: rgba(59, 130, 246, 0.22);
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}
.extractor-side-toggle.ct.active .side-tag {
  color: #ffffff;
}
.extractor-side-toggle.ct.active .side-buy-pill {
  background: rgba(59, 130, 246, 0.4);
  color: #ffffff;
  border-color: #60a5fa;
}

/* T Side Toggle Styling */
.extractor-side-toggle.t .side-tag {
  color: #fbbf24;
}
.extractor-side-toggle.t .side-buy-pill {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.extractor-side-toggle.t:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}
.extractor-side-toggle.t.active {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}
.extractor-side-toggle.t.active .side-tag {
  color: #ffffff;
}
.extractor-side-toggle.t.active .side-buy-pill {
  background: rgba(245, 158, 11, 0.4);
  color: #ffffff;
  border-color: #fbbf24;
}

.mockup-close-btn {
  display: none !important;
}

.mockup-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mockup-sub-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mockup-round-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  padding: 3px 8px;
  font-weight: 800;
  font-size: 0.72rem;
  color: #f1f5f9;
  letter-spacing: 0.05em;
}

.mockup-round-pill.ct {
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.mockup-round-pill.t {
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.mockup-type-select {
  background: #11141a;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 6px;
  padding: 3px 8px;
  font-weight: 800;
  font-size: 0.73rem;
  color: #fbbf24;
  letter-spacing: 0.04em;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.mockup-type-select:hover,
.mockup-type-select:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.mockup-type-select option {
  background: #14171d;
  color: #fff;
  font-weight: 700;
}

.mockup-clean-routes-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 3px 9px;
  font-weight: 700;
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.mockup-clean-routes-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.mockup-clean-routes-btn.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.mockup-date-text {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 2. 5-Player Avatar Strip */
.mockup-player-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.mockup-player-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px 6px 4px;
  border-radius: 8px;
  background: rgba(18, 22, 28, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.mockup-player-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.mockup-player-card.active {
  border: 1.5px solid #ffb800 !important;
  background: rgba(255, 184, 0, 0.08) !important;
  box-shadow: 0 0 16px rgba(255, 184, 0, 0.16);
}

.mockup-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  margin-bottom: 6px;
  transition: border-color 0.2s;
}

.mockup-player-card.active .mockup-avatar-wrap {
  border-color: #ffb800;
  box-shadow: 0 0 10px rgba(255, 184, 0, 0.3);
}

.mockup-player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.mockup-role-icon {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #0f131a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 1;
}

.mockup-player-card.active .mockup-role-icon {
  border-color: #ffb800;
}

.mockup-player-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mockup-player-card.active .mockup-player-name {
  color: #ffb800;
}

.mockup-player-role {
  width: 100%;
  max-width: 100%;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-role-select {
  width: 96%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 13px 2px 3px;
  text-align: center;
  text-align-last: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5' fill='none'%3E%3Cpath d='M1 1L4 4L7 1' stroke='rgba(255,255,255,0.45)' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 3px center;
}

.mockup-player-card:hover .mockup-role-select,
.mockup-role-select:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 184, 0, 0.45);
  color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5' fill='none'%3E%3Cpath d='M1 1L4 4L7 1' stroke='%23ffb800' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.mockup-player-card.active .mockup-role-select {
  border-color: rgba(255, 184, 0, 0.35);
  color: #ffb800;
  background-color: rgba(255, 184, 0, 0.06);
}

.mockup-role-select:focus {
  background-color: #0b0f16;
  border-color: #ffb800;
  box-shadow: 0 0 8px rgba(255, 184, 0, 0.35);
  color: #ffb800;
}

.mockup-role-select option {
  background: #10141d;
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
}

/* 3. The 3 Phase Cards Container */
.mockup-phase-cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.mockup-phase-card {
  background: rgba(18, 22, 28, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.mockup-phase-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}

.mockup-phase-card.active {
  border: 1.5px solid #ffb800 !important;
  background: rgba(255, 184, 0, 0.04) !important;
  box-shadow: 0 0 18px rgba(255, 184, 0, 0.12);
}

.mockup-phase-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.mockup-phase-num-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
}

.mockup-phase-card.active .mockup-phase-num-title {
  color: #ffb800;
}

.mockup-phase-timestamp {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  font-family: monospace;
}

.mockup-phase-card.active .mockup-phase-timestamp {
  color: #ffb800;
}

.mockup-phase-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mockup-phase-desc {
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
  outline: none;
  min-height: 24px;
}

.mockup-phase-desc:focus {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 2px 4px;
  font-style: normal;
}

.mockup-phase-utility-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mockup-phase-utility-pills:empty {
  display: none;
}

.mockup-util-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #cbd5e1;
}

.mockup-util-icon {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

/* 4. Bottom Action Area */
.mockup-action-area {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mockup-preview-btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1.5px solid #38bdf8;
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  font-family: inherit;
}

.mockup-preview-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
  border-color: #7dd3fc;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.mockup-preview-btn.active {
  background: #38bdf8;
  color: #0b0e14;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.5);
}

.mockup-preview-btn:active {
  transform: translateY(1px);
}

.mockup-save-btn {
  flex: 1.3;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 184, 0, 0.1);
  border: 1.5px solid #ffb800;
  color: #ffb800;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  font-family: inherit;
}

.mockup-save-btn:hover {
  background: #ffb800;
  color: #0b0e14;
  box-shadow: 0 0 24px rgba(255, 184, 0, 0.4);
}

.mockup-save-btn:active {
  transform: translateY(1px);
}

/* 5. Radar Unified Interactive Timeline Track & Phases */
.radar-phase-timeline-bar,
.radar-unified-timeline {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 32px;
  border-radius: 6px;
  overflow: visible;
  position: relative;
  background: rgba(10, 14, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0;
  box-sizing: border-box;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
  user-select: none;
  cursor: pointer;
}

.radar-phase-timeline-bar.hidden {
  /* Keep visible as it is the primary playback timeline */
  display: flex !important;
}

.radar-phase-timeline-bar.timeline-dragging .radar-phase-seg {
  transition: none !important;
}

.radar-phase-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}

.radar-phase-seg:first-child {
  border-radius: 5px 0 0 5px;
}

.radar-phase-seg:last-child {
  border-radius: 0 5px 5px 0;
}

.radar-phase-seg.setup {
  background: rgba(37, 99, 235, 0.12);
}

.radar-phase-seg.setup:hover {
  background: rgba(37, 99, 235, 0.22);
}

.radar-phase-seg.execute {
  background: rgba(255, 184, 0, 0.12);
}

.radar-phase-seg.execute:hover {
  background: rgba(255, 184, 0, 0.22);
}

.radar-phase-seg.post {
  background: rgba(16, 185, 129, 0.12);
}

.radar-phase-seg.post:hover {
  background: rgba(16, 185, 129, 0.22);
}

.radar-phase-seg .seg-title {
  font-size: 0.64rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.radar-phase-seg .seg-time {
  display: none; /* Exact times are shown on the live floating tooltips and right-hand phase cards */
}

.radar-phase-seg.active {
  background: rgba(255, 184, 0, 0.2) !important;
  border-top: 1.5px solid #ffb800;
  border-bottom: 1.5px solid #ffb800;
  box-shadow: inset 0 0 10px rgba(255, 184, 0, 0.25);
}

.radar-phase-seg.active .seg-title,
.radar-phase-seg.active .seg-time {
  color: #ffb800 !important;
  font-weight: 800;
}

/* Playhead Scrubber Cursor Line & Pin */
.timeline-playhead-cursor {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.95), 0 0 3px #ffffff;
  z-index: 22;
  pointer-events: none;
  transform: translateX(-50%);
  transition: none;
}

.timeline-playhead-cursor .playhead-pin {
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border: 1.5px solid #00d4ff;
  border-radius: 2px;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.timeline-playhead-cursor .playhead-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Native invisible range input overlay */
.timeline-slider-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

/* 6. Draggable Timeline Phase Dots & Trim Segments */
.phase-timeline-dot,
.radar-phase-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  margin: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: col-resize;
  user-select: none;
  touch-action: none;
  outline: none;
  transform: translateX(-50%);
}

.phase-timeline-dot .dot-line,
.radar-phase-handle .handle-line {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 184, 0, 0.4);
  transition: all 0.15s ease;
  pointer-events: none;
}

.phase-timeline-dot .dot-handle,
.radar-phase-handle .handle-grip {
  position: relative;
  z-index: 2;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10151d;
  border: 2px solid #ffb800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 8px rgba(255, 184, 0, 0.35);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.phase-timeline-dot .dot-center {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffb800;
  transition: all 0.15s ease;
}

/* Hover and Dragging States */
.phase-timeline-dot:hover .dot-line,
.phase-timeline-dot.dragging .dot-line,
.phase-timeline-dot:focus .dot-line,
.radar-phase-handle:hover .handle-line,
.radar-phase-handle.dragging .handle-line,
.radar-phase-handle:focus .handle-line {
  background: #ffb800;
  box-shadow: 0 0 10px rgba(255, 184, 0, 0.9);
  width: 2.5px;
}

.phase-timeline-dot:hover .dot-handle,
.phase-timeline-dot.dragging .dot-handle,
.phase-timeline-dot:focus .dot-handle,
.radar-phase-handle:hover .handle-grip,
.radar-phase-handle.dragging .handle-grip,
.radar-phase-handle:focus .handle-grip {
  background: #ffb800;
  border-color: #fff;
  transform: scale(1.25);
  box-shadow: 0 0 18px rgba(255, 184, 0, 0.95);
}

.phase-timeline-dot:hover .dot-center,
.phase-timeline-dot.dragging .dot-center,
.phase-timeline-dot:focus .dot-center {
  background: #0b0e14;
}

/* Floating Tooltip */
.phase-timeline-dot .handle-tooltip,
.radar-phase-handle .handle-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f141c;
  border: 1px solid #ffb800;
  color: #ffb800;
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
  z-index: 30;
}

.phase-timeline-dot .handle-tooltip::after,
.radar-phase-handle .handle-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border-width: 4px;
  border-style: solid;
  border-color: #ffb800 transparent transparent transparent;
}

.phase-timeline-dot:hover .handle-tooltip,
.phase-timeline-dot.dragging .handle-tooltip,
.phase-timeline-dot:focus .handle-tooltip,
.radar-phase-handle:hover .handle-tooltip,
.radar-phase-handle.dragging .handle-tooltip,
.radar-phase-handle:focus .handle-tooltip {
  opacity: 1;
}

/* Pre-Trim and Post-Trim Inactive Sections */
.radar-phase-seg.pre-trim,
.radar-phase-seg.post-trim {
  background: repeating-linear-gradient(
    45deg,
    rgba(10, 13, 18, 0.85),
    rgba(10, 13, 18, 0.85) 6px,
    rgba(255, 255, 255, 0.03) 6px,
    rgba(255, 255, 255, 0.03) 12px
  );
  opacity: 0.65;
  cursor: default;
  font-size: 0.65rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.08em;
}

.radar-phase-seg.pre-trim {
  border-right: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 7px 0 0 7px;
}

.radar-phase-seg.post-trim {
  border-left: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 0 7px 7px 0;
}

.radar-phase-handle .handle-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border-width: 4px;
  border-style: solid;
  border-color: #ffb800 transparent transparent transparent;
}

.radar-phase-handle:hover .handle-tooltip,
.radar-phase-handle.dragging .handle-tooltip,
.radar-phase-handle:focus .handle-tooltip {
  opacity: 1;
}

/* 7. Phase Card Micro Timing Controls */
.mockup-phase-time-ctrl {
  display: flex;
  align-items: center;
  gap: 5px;
}

.phase-time-nudge-btn,
.phase-time-snap-btn {
  display: none; /* Phase timing is now adjusted via the 4 interactive dots on the timeline */
}


