:root {
  --injury-bg: #020913;
  --injury-panel: rgba(8, 19, 32, 0.94);
  --injury-panel-soft: #102438;
  --injury-line: rgba(105, 214, 255, 0.22);
  --injury-cyan: #72d9ff;
  --injury-orange: #ff6234;
  --injury-text: #f7f9fc;
  --injury-muted: #aebdca;
}

.injury-page {
  min-height: 100vh;
  padding: 24px 24px 60px;
  color: var(--injury-text);
  background:
    radial-gradient(circle at 35% 30%, rgba(23, 74, 112, 0.30), transparent 38%),
    var(--injury-bg);
}

.injury-header {
  width: min(1280px, 100%);
  margin: 0 auto 28px;
}

.injury-eyebrow,
.region-detail__eyebrow {
  color: #ff8a68;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.injury-header h1 {
  margin: 10px 0;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.98;
}

.injury-header p {
  max-width: 720px;
  color: var(--injury-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.injury-explorer {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.45fr);
  gap: 22px;
}

.injury-model-card,
.injury-panel {
  overflow: hidden;
  border: 1px solid var(--injury-line);
  border-radius: 24px;
  background: var(--injury-panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

#injury-model {
  width: 100%;
  height: min(760px, 76vh);
  min-height: 610px;
  background:
    radial-gradient(circle at 50% 38%, rgba(20, 72, 108, 0.22), transparent 45%);
}

.injury-panel {
  padding: 20px;
}

.region-list {
  display: grid;
  gap: 9px;
}

.region-button {
  width: 100%;
  padding: 13px 15px;
  color: white;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(114, 217, 255, 0.16);
  border-radius: 14px;
  background: var(--injury-panel-soft);
}

.region-button:hover,
.region-button.is-active {
  border-color: var(--injury-cyan);
  box-shadow: 0 0 0 2px rgba(114, 217, 255, 0.08);
}

.region-detail {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.region-detail h2 {
  margin: 8px 0 10px;
  font-size: 1.7rem;
}

.region-detail p {
  color: var(--injury-muted);
  line-height: 1.6;
}

.injury-hotspot {
  position: relative;
  width: 18px;
  height: 18px;
  padding: 0;
  cursor: pointer;
  border: 2px solid #ffe2d8;
  border-radius: 50%;
  background: var(--injury-orange);
  box-shadow:
    0 0 0 7px rgba(255, 98, 52, 0.18),
    0 0 24px rgba(255, 98, 52, 0.92);
}

.injury-hotspot__dot {
  display: block;
}

.injury-hotspot__label {
  position: absolute;
  top: -10px;
  left: 26px;
  padding: 6px 9px;
  color: white;
  white-space: nowrap;
  font-size: 0.75rem;
  border: 1px solid rgba(114, 217, 255, 0.34);
  border-radius: 9px;
  background: rgba(3, 11, 19, 0.94);
}

.injury-hotspot:not([data-visible]) {
  opacity: 0;
  pointer-events: none;
}

.injury-hotspot--detail {
  display: none;
  width: 14px;
  height: 14px;
  border-color: rgba(255, 255, 255, 0.78);
  background: #6e7d8b;
  box-shadow: 0 0 0 5px rgba(110, 125, 139, 0.18);
}

#injury-model.is-detail-view .injury-hotspot--region {
  display: none;
}

#injury-model.is-detail-view .injury-hotspot--detail.is-region-visible {
  display: block;
}

.injury-hotspot--detail .injury-hotspot__label {
  max-width: 170px;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
  opacity: 0.9;
}

.injury-hotspot--detail:hover,
.injury-hotspot--detail:focus-visible {
  background: #f28b63;
  box-shadow:
    0 0 0 7px rgba(242, 105, 62, 0.18),
    0 0 20px rgba(242, 105, 62, 0.7);
}

.injury-hotspot--detail.is-selected {
  width: 18px;
  height: 18px;
  background: #ff5936;
  box-shadow:
    0 0 0 8px rgba(255, 89, 54, 0.22),
    0 0 30px rgba(255, 89, 54, 0.95);
}

.injury-hotspot--detail.is-selected .injury-hotspot__label {
  opacity: 1;
  border-color: rgba(255, 119, 82, 0.75);
}

[data-detail-id="ac-joint-separation"] .injury-hotspot__label {
  left: -160px;
  top: -58px;
}

[data-detail-id="rotator-cuff-injury"] .injury-hotspot__label {
  left: 30px;
  top: -62px;
}

[data-detail-id="subacromial-impingement"] .injury-hotspot__label {
  left: 45px;
  top: -10px;
}

[data-detail-id="instability-labral-tear"] .injury-hotspot__label {
  left: -190px;
  top: 12px;
}

[data-detail-id="biceps-tendon-injury"] .injury-hotspot__label {
  left: 40px;
  top: 34px;
}

.injury-back-button {
  display: none;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 15px;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  border: 1px solid rgba(114, 217, 255, 0.35);
  border-radius: 12px;
  background: rgba(16, 36, 56, 0.88);
}

.injury-back-button:hover {
  border-color: var(--injury-cyan);
}

.injury-back-button.is-visible {
  display: block;
}

@media (max-width: 900px) {
  .injury-explorer {
    grid-template-columns: 1fr;
  }

  #injury-model {
    height: 68vh;
    min-height: 520px;
  }
}

/* Elbow label placement */

[data-detail-id="lateral-epicondylitis"] .injury-hotspot__label {
  left: 30px;
  top: -62px;
}

[data-detail-id="medial-elbow-instability"] .injury-hotspot__label {
  left: -205px;
  top: 22px;
}

[data-detail-id="distal-biceps-tendon-rupture"] .injury-hotspot__label {
  left: -210px;
  top: -65px;
}

[data-detail-id="olecranon-bursitis"] .injury-hotspot__label {
  left: 30px;
  top: 42px;
}

[data-detail-id="radial-head-fracture"] .injury-hotspot__label {
  left: 40px;
  top: -10px;
}

/* Wrist and hand label placement */

[data-detail-id="scaphoid-fracture"] .injury-hotspot__label {
  left: -170px;
  top: -62px;
}

[data-detail-id="distal-radius-fracture"] .injury-hotspot__label {
  left: 35px;
  top: -72px;
}

[data-detail-id="tfcc-tear"] .injury-hotspot__label {
  left: -120px;
  top: 36px;
}

[data-detail-id="scapholunate-ligament-injury"] .injury-hotspot__label {
  left: 42px;
  top: -18px;
}

[data-detail-id="mcp-joint-injury"] .injury-hotspot__label {
  left: -155px;
  top: 20px;
}

[data-detail-id="pip-joint-injury"] .injury-hotspot__label {
  left: 35px;
  top: 30px;
}

/* Hip / Groin label placement */
[data-detail-id="adductor-injury"] .injury-hotspot__label{left:-155px;top:26px}
[data-detail-id="iliopsoas-injury"] .injury-hotspot__label{left:34px;top:42px}
[data-detail-id="athletic-pubalgia-inguinal-hernia"] .injury-hotspot__label{left:38px;top:-72px;max-width:190px}
[data-detail-id="osteitis-pubis"] .injury-hotspot__label{left:-155px;top:-34px}
[data-detail-id="femoral-neck-stress-fracture"] .injury-hotspot__label{left:40px;top:-18px;max-width:180px}
[data-detail-id="greater-trochanteric-pain-syndrome"] .injury-hotspot__label{left:35px;top:32px;max-width:190px}
[data-detail-id="snapping-hip-syndrome"] .injury-hotspot__label{left:35px;top:-62px}
[data-detail-id="piriformis-syndrome"] .injury-hotspot__label{left:35px;top:-18px}

/* Knee label placement */

[data-detail-id="anterior-knee-pain-patella"] .injury-hotspot__label {
  left: 36px;
  top: -70px;
  max-width: 160px;
}

[data-detail-id="acl-injury"] .injury-hotspot__label {
  left: -72px;
  top: -48px;
}

[data-detail-id="mcl-injury"] .injury-hotspot__label {
  left: -72px;
  top: 28px;
}

[data-detail-id="lateral-meniscus-injury"] .injury-hotspot__label {
  left: 34px;
  top: 30px;
  max-width: 150px;
}

[data-detail-id="medial-meniscus-injury"] .injury-hotspot__label {
  left: -144px;
  top: 24px;
  max-width: 150px;
}

[data-detail-id="patellar-tendon-slj"] .injury-hotspot__label {
  left: 34px;
  top: 44px;
  max-width: 175px;
}

[data-detail-id="quadriceps-tendon-injury"] .injury-hotspot__label {
  left: 34px;
  top: -20px;
  max-width: 170px;
}

[data-detail-id="bakers-cyst"] .injury-hotspot__label {
  left: 36px;
  top: -18px;
  max-width: 150px;
}

[data-detail-id="plica-syndrome"] .injury-hotspot__label {
  left: -118px;
  top: -66px;
  max-width: 140px;
}

[data-detail-id="osgood-schlatter-disease"] .injury-hotspot__label {
  left: 36px;
  top: 36px;
  max-width: 170px;
}

/* Lower Leg label placement */

[data-detail-id="anterior-compartment-tibialis"] .injury-hotspot__label {
  left: 36px;
  top: -62px;
  max-width: 170px;
}

[data-detail-id="mtss-deep-posterior-compartment"] .injury-hotspot__label {
  left: -165px;
  top: -30px;
  max-width: 160px;
}

[data-detail-id="soleus-strain-tear"] .injury-hotspot__label {
  left: -145px;
  top: 28px;
  max-width: 145px;
}

[data-detail-id="gastrocnemius-strain-tear"] .injury-hotspot__label {
  left: 36px;
  top: -18px;
  max-width: 175px;
}

[data-detail-id="tibial-stress-fracture"] .injury-hotspot__label {
  left: 36px;
  top: 22px;
  max-width: 165px;
}

[data-detail-id="fibular-stress-fracture"] .injury-hotspot__label {
  left: 34px;
  top: 28px;
  max-width: 170px;
}

[data-detail-id="common-peroneal-nerve-injury"] .injury-hotspot__label {
  left: 34px;
  top: -48px;
  max-width: 150px;
}

[data-detail-id="achilles-tendinopathy"] .injury-hotspot__label {
  left: -170px;
  top: -42px;
  max-width: 165px;
}

[data-detail-id="achilles-tendon-rupture"] .injury-hotspot__label {
  left: 34px;
  top: 26px;
  max-width: 155px;
}

/* Ankle / Foot label placement */
[data-detail-id="syndesmosis-injury"] .injury-hotspot__label{left:34px;top:-58px}
[data-detail-id="lateral-ankle-sprain"] .injury-hotspot__label{left:34px;top:-8px}
[data-detail-id="peroneal-tendon-injury"] .injury-hotspot__label{left:34px;top:32px;max-width:150px}
[data-detail-id="deltoid-ligament-injury"] .injury-hotspot__label{left:-150px;top:-18px;max-width:145px}
[data-detail-id="subtalar-joint-injury"] .injury-hotspot__label{left:34px;top:62px}
[data-detail-id="sinus-tarsi-syndrome"] .injury-hotspot__label{left:34px;top:96px}
[data-detail-id="posterior-tibial-tendon-injury"] .injury-hotspot__label{left:-170px;top:-58px;max-width:165px}
[data-detail-id="osteochondral-lesion-talus"] .injury-hotspot__label{left:-120px;top:26px}
[data-detail-id="posterior-ankle-impingement"] .injury-hotspot__label{left:-185px;top:62px;max-width:180px}
[data-detail-id="anterior-ankle-impingement"] .injury-hotspot__label{left:34px;top:-94px;max-width:170px}
[data-detail-id="tibialis-anterior-tendon-injury"] .injury-hotspot__label{left:-155px;top:-94px;max-width:150px}
[data-detail-id="calcaneal-stress-fracture"] .injury-hotspot__label{left:34px;top:30px;max-width:165px}
[data-detail-id="midfoot-sprain"] .injury-hotspot__label{left:34px;top:-12px}
[data-detail-id="tarsal-tunnel-syndrome"] .injury-hotspot__label{left:-145px;top:32px}
[data-detail-id="plantar-fasciitis"] .injury-hotspot__label{left:-155px;top:24px}
[data-detail-id="sesamoid-injury"] .injury-hotspot__label{left:-135px;top:28px}
[data-detail-id="mortons-neuroma"] .injury-hotspot__label{left:34px;top:34px}

/* UI CLEANUP V2
   - independent viewer height
   - compact information panel
   - no region button list
   - unavailable regions shown in grey
*/

.injury-explorer {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
}

.injury-model-card {
  height: clamp(680px, 74vh, 900px);
}

#injury-model {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.injury-panel {
  align-self: start;
  padding: 22px;
}

.region-list {
  display: none !important;
}

.region-detail {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.injury-back-button.is-visible + .region-list + .region-detail {
  margin-top: 8px;
}

.region-detail__eyebrow {
  display: inline-block;
  margin-bottom: 2px;
}

.region-detail h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.08;
}

.region-detail p {
  margin: 0;
  color: var(--injury-muted);
  line-height: 1.65;
}

.injury-learn-more {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  padding: 10px 14px;
  color: var(--injury-cyan);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(114, 217, 255, 0.30);
  border-radius: 10px;
  background: rgba(16, 36, 56, 0.52);
}

.injury-learn-more:hover {
  border-color: var(--injury-cyan);
  background: rgba(16, 36, 56, 0.88);
}

.injury-learn-more[hidden] {
  display: none;
}

/* Regions without detail content yet */
.injury-hotspot--region.is-coming-soon {
  cursor: default;
  border-color: rgba(220, 229, 237, 0.62);
  background: #66727d;
  box-shadow:
    0 0 0 6px rgba(102, 114, 125, 0.13),
    0 0 15px rgba(102, 114, 125, 0.28);
}

.injury-hotspot--region.is-coming-soon .injury-hotspot__label {
  color: rgba(235, 241, 246, 0.72);
  border-color: rgba(174, 189, 202, 0.20);
  background: rgba(13, 22, 31, 0.90);
}

.injury-hotspot--region.is-coming-soon:hover,
.injury-hotspot--region.is-coming-soon:focus-visible {
  background: #66727d;
  box-shadow:
    0 0 0 6px rgba(102, 114, 125, 0.13),
    0 0 15px rgba(102, 114, 125, 0.28);
}

@media (max-width: 900px) {
  .injury-model-card {
    height: clamp(560px, 70vh, 760px);
  }

  #injury-model {
    height: 100%;
    min-height: 0;
  }
}

/* LEARN MORE AVAILABILITY */
.injury-learn-more.is-disabled {
  color: rgba(185, 198, 209, 0.50);
  border-color: rgba(185, 198, 209, 0.18);
  background: rgba(116, 132, 145, 0.08);
  cursor: default;
  pointer-events: none;
  box-shadow: none;
  opacity: 0.68;
}

.injury-learn-more.is-disabled:hover {
  color: rgba(185, 198, 209, 0.50);
  border-color: rgba(185, 198, 209, 0.18);
  background: rgba(116, 132, 145, 0.08);
  transform: none;
}

/* MOBILE STACK FIX */
@media (max-width: 900px) {
  .injury-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .injury-explorer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .injury-model-card,
  .injury-panel {
    width: 100%;
    min-width: 0;
  }

  .injury-model-card {
    height: clamp(520px, 68vh, 720px);
  }

  .injury-panel {
    order: 2;
  }

  #injury-model {
    width: 100%;
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .injury-page {
    padding: 16px 10px 42px;
  }

  .injury-header {
    margin-bottom: 18px;
  }

  .injury-header h1 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .injury-model-card {
    height: min(72vh, 640px);
    min-height: 480px;
    border-radius: 18px;
  }

  .injury-panel {
    padding: 16px;
    border-radius: 18px;
  }
}