/* =========================================================
   The Flying Eagle — Handgun Shooting Habits & Target Error Lab
   ========================================================= */

.sh-page-wrap {
  max-width: 1260px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
}

.sh-hero {
  background: linear-gradient(135deg, rgba(28, 28, 34, 0.96), rgba(18, 18, 22, 0.98));
  border: 1px solid rgba(229, 185, 76, 0.3);
  border-radius: 18px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.sh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5b94c;
  background: rgba(229, 185, 76, 0.12);
  border: 1px solid rgba(229, 185, 76, 0.32);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.6rem;
}

.sh-hero h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.18;
  color: #f7f6f2;
  font-weight: 800;
}

.sh-hero p {
  margin: 0;
  color: #c8c6be;
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 78ch;
}

.sh-controls-card,
.sh-stage-card,
.sh-panel,
.sh-fix-section {
  background: rgba(22, 22, 27, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.2rem 1.35rem;
  margin-bottom: 1.35rem;
}

.sh-controls-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 0.95rem;
}

.sh-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sh-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #d6d3c9;
}

.sh-select {
  width: 100%;
  background: #121318;
  color: #f6f4ee;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 0.58rem 0.75rem;
  font-size: 0.9rem;
}

.sh-select:focus {
  outline: none;
  border-color: #e5b94c;
}

.sh-hand-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #121318;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.sh-hand-btn {
  border: none;
  background: transparent;
  color: #c5c2b8;
  border-radius: 7px;
  padding: 0.45rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sh-hand-btn.active {
  background: #e5b94c;
  color: #141418;
}

.sh-firing-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sh-fire-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sh-fire-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.52rem 0.95rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.sh-fire-btn.primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border: 1px solid #38bdf8;
  color: #06121e;
}

.sh-fire-btn.burst {
  background: linear-gradient(135deg, #1d1509, #2c1e0b);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.sh-secondary-btn {
  background: rgba(34, 34, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e6e4dc;
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.sh-secondary-btn:hover {
  border-color: #e5b94c;
  color: #fff;
}

.sh-slomo-check,
.sh-place-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.45rem 0.8rem;
  border-radius: 10px;
  background: rgba(15, 16, 21, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e6e4dc;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.sh-slomo-check input,
.sh-place-toggle input {
  accent-color: #f59e0b;
  width: 15px;
  height: 15px;
}

/* Range Stage */
.sh-stage-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sh-stage-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e5b94c;
  background: rgba(229, 185, 76, 0.12);
  border: 1px solid rgba(229, 185, 76, 0.3);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.sh-stage-state {
  font-size: 0.84rem;
  color: #93c5fd;
}

.sh-stage-canvas-wrap {
  width: 100%;
  height: 290px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.24);
  background: radial-gradient(ellipse at 50% 45%, #112236 0%, #09131f 72%, #050b12 100%);
}

.sh-range-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sh-stage-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: #b4b1a8;
}

/* Diagnostic Split */
.sh-diag-grid {
  display: grid;
  grid-template-columns: minmax(290px, 0.95fr) minmax(320px, 1.25fr);
  gap: 1.25rem;
  margin-bottom: 1.35rem;
}

.sh-panel {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.sh-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.sh-panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #fff;
}

.sh-panel-head p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: #bab7ae;
}

.sh-target-canvas-wrap {
  width: 100%;
  height: 290px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #101217;
  cursor: crosshair;
}

.sh-target-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sh-plotted-summary {
  background: rgba(14, 16, 22, 0.85);
  border: 1px solid rgba(229, 185, 76, 0.25);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.84rem;
  color: #e4e2da;
}

.sh-error-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sh-error-pill {
  background: rgba(31, 31, 39, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e5e3db;
  border-radius: 9px;
  padding: 0.45rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sh-error-pill:hover {
  border-color: #e5b94c;
  color: #fff;
}

.sh-error-pill.active {
  background: #e5b94c;
  border-color: #e5b94c;
  color: #141418;
}

.sh-error-detail {
  background: rgba(15, 16, 21, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sh-error-detail h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #e5b94c;
}

.sh-error-detail p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.52;
  color: #dcd9d0;
}

.sh-cause-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sh-cause-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
}

/* Fix & Adjustment Section */
.sh-fix-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sh-fix-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
}

.sh-fix-header p {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: #bab7ae;
}

.sh-fix-layout {
  display: grid;
  grid-template-columns: minmax(290px, 1fr) minmax(300px, 1.15fr);
  gap: 1.25rem;
  align-items: start;
}

.sh-fix-canvas-wrap {
  background: #0d1622;
  border: 1px solid rgba(110, 231, 183, 0.28);
  border-radius: 12px;
  overflow: hidden;
}

.sh-fix-canvas {
  width: 100%;
  height: 255px;
  display: block;
}

.sh-fix-anim-label {
  padding: 0.6rem 0.85rem;
  background: rgba(16, 185, 129, 0.12);
  border-top: 1px solid rgba(110, 231, 183, 0.22);
  color: #6ee7b7;
  font-size: 0.82rem;
  font-weight: 600;
}

.sh-fix-steps {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sh-fix-step-card {
  background: rgba(15, 16, 21, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
}

.sh-fix-step-card strong {
  display: block;
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.22rem;
}

.sh-fix-step-card span {
  font-size: 0.84rem;
  color: #c8c6be;
  line-height: 1.48;
}

.sh-guide-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.sh-guide-chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e5b94c;
  text-decoration: none;
  background: rgba(229, 185, 76, 0.12);
  border: 1px solid rgba(229, 185, 76, 0.32);
  border-radius: 7px;
  padding: 0.3rem 0.6rem;
}

.sh-guide-chip:hover {
  background: rgba(229, 185, 76, 0.22);
}

@media (max-width: 920px) {
  .sh-controls-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sh-diag-grid,
  .sh-fix-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .sh-page-wrap {
    padding: 1rem 0.85rem 2.75rem;
  }
  .sh-controls-row {
    grid-template-columns: 1fr;
  }
}

/* TruGlo-Style High-Contrast Splatter Target Frame */
.sh-target-canvas-wrap {
  background: radial-gradient(circle at 50% 50%, #1d2026 0%, #0d0f13 100%);
  border-color: rgba(163, 230, 53, 0.35);
}
