/* ==========================================================================
   SuAst Global Care - Single-Screen Body Map Application Stylesheet
   (public/css/pages/body-map.css)
   Viewport-locked (100vh x 100vw), True 50/50 Desktop Layout
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VIEWPORT & ROOT LOCK (Zero-scroll desktop architecture)
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   1. VIEWPORT & ROOT ARCHITECTURE
   -------------------------------------------------------------------------- */
html,
body.app-body {
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #F8FAFC;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 861px) {
  html,
  body.app-body {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
  }
}

@media (max-width: 860px) {
  html,
  body.app-body {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
}

/* --------------------------------------------------------------------------
   2. HEADER INTEGRATION (Simple Google-Style Header)
   -------------------------------------------------------------------------- */
.site-header {
  flex-shrink: 0;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  background-color: #F8FAFC !important;
  border-bottom: none !important;
  box-shadow: none !important;
  position: relative;
  width: 100%;
  z-index: 100;
}

.site-header.scrolled {
  box-shadow: none !important;
  background-color: #F8FAFC !important;
}

.site-header .header-inner {
  max-width: 100%;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between; /* SuAst Logo on TOP-LEFT, Nav on TOP-RIGHT */
  position: relative;
  box-sizing: border-box;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 38px;
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

.header-nav-wrap {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.header-nav-wrap .main-nav {
  display: flex;
  align-items: center;
  flex: none;
}

.header-nav-wrap .nav-list {
  position: static;
  transform: none;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}

.header-nav-wrap .nav-link {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  padding: 6px 4px;
  position: relative;
  transition: color 0.2s ease;
}

.header-nav-wrap .nav-link::after {
  display: none;
}

.header-nav-wrap .nav-link:hover,
.header-nav-wrap .nav-link.active {
  color: var(--color-navy);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. MAIN WORKSPACE (Clean, Full-Width Centered Layout)
   -------------------------------------------------------------------------- */
.app-workspace {
  flex: 1;
  min-height: 0;
  height: calc(100vh - 56px - 32px);
  max-height: calc(100vh - 56px - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 16px;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* Central Stage hosting Skeleton View or Selected Region View */
.body-map-central-stage,
.body-map-content-stage {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

/* STATE A: SKELETON & CONTROLS VIEW */
.skeleton-view-state {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

/* 1. Header (Heading & Subtitle) Centered directly ABOVE the skeleton */
.body-map-header,
.body-map-header-top,
.body-map-subtitle-top {
  text-align: center;
  flex-shrink: 0;
  margin-top: 0;
  margin-bottom: 8px;
  padding: 0;
  width: 100%;
}

.body-map-title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1.85vw, 1.6rem);
  font-weight: 800;
  color: var(--color-navy);
  margin: 0 0 3px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.body-map-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
  line-height: 1.3;
}

/* 2. Skeleton Image Container Centered */
.body-image-container {
  position: relative;
  display: inline-block;
  aspect-ratio: 682 / 1024;
  height: 100%;
  max-height: clamp(240px, calc(100vh - 56px - 32px - 130px), 480px);
  max-width: 100%;
  width: auto;
  margin: 0 auto;
  overflow: visible;
}

.anatomical-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 6px 16px rgba(22, 50, 110, 0.08));
}

/* 3. Talk to an Expert centered directly BELOW the skeleton */
.expert-card-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 10px;
  width: auto;
  height: auto;
  min-height: 0;
}

.expert-card-inner {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-expert-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.55rem 1.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: #FFFFFF;
  background: linear-gradient(135deg, #16326E 0%, #7B1FA2 50%, #E5027F 100%);
  box-shadow: 0 4px 14px rgba(22, 50, 110, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  margin: 0;
}

.btn-expert-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(22, 50, 110, 0.32);
}

.expert-btn-text {
  display: inline;
  color: #FFFFFF;
}

.expert-btn-arrow {
  display: inline;
}

.expert-assistant-rings,
.expert-avatar-block,
.status-online-dot {
  display: none !important;
}

/* SVG Connector Lines Layer */
.connector-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.connector-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
  transition: stroke-width 0.2s ease, opacity 0.2s ease;
}

/* Overlay Layer for Hotspots & Callouts */
.hotspot-overlay-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hotspot-overlay-layer .hotspot-btn,
.hotspot-overlay-layer .callout-block {
  pointer-events: auto;
}

/* Hotspot Buttons */
.hotspot-btn {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  padding: 0;
  transition: transform 0.25s ease;
}

/* Accessible touch target >= 44px for comfortable touch on mobile */
.hotspot-btn::before {
  content: '';
  position: absolute;
  width: 44px;
  height: 44px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: auto;
}

.hotspot-btn:hover,
.hotspot-btn:focus-visible {
  transform: translate(-50%, -50%) scale(1.15);
}

.hotspot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 2px 5px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 2;
}

.hotspot-btn:hover .hotspot-dot,
.hotspot-btn:focus-visible .hotspot-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 2.5px #FFFFFF, 0 0 8px currentColor;
}

@keyframes defaultHotspotPulse {
  0% {
    transform: scale(1.0);
    opacity: 0.85;
    box-shadow: 0 0 6px rgba(245, 196, 0, 0.65);
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
    box-shadow: 0 0 14px rgba(245, 196, 0, 0.9), 0 0 0 3px rgba(245, 196, 0, 0.25);
  }
  100% {
    transform: scale(1.0);
    opacity: 0.85;
    box-shadow: 0 0 6px rgba(245, 196, 0, 0.65);
  }
}

.hotspot-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #F5C400;
  box-sizing: border-box;
  opacity: 0.9;
  box-shadow: 0 0 8px rgba(245, 196, 0, 0.65);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
  animation: defaultHotspotPulse 2.4s infinite ease-in-out;
}

.hotspot-btn:hover .hotspot-ring,
.hotspot-btn:focus-visible .hotspot-ring {
  opacity: 1;
  border-color: #F5C400;
  box-shadow: 0 0 16px rgba(245, 196, 0, 0.95);
}

/* Highlighted Hotspot when animated hand guide reaches & taps the region */
.hotspot-btn.hand-highlighted,
.hotspot-btn.highlighted,
.hotspot-btn.active-hotspot {
  transform: translate(-50%, -50%) scale(1.18);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hotspot-btn.hand-highlighted .hotspot-ring,
.hotspot-btn.highlighted .hotspot-ring,
.hotspot-btn.active-hotspot .hotspot-ring {
  border-color: #F5C400 !important;
  box-shadow: 0 0 18px rgba(245, 196, 0, 0.95), 0 0 0 4px rgba(245, 196, 0, 0.35) !important;
  opacity: 1 !important;
  transform: scale(1.42);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

/* Hotspot Coordinates (% relative to image wrapper) */
.head-hotspot { top: 5.0%; left: 50.0%; color: #10B981; }
.chest-hotspot { top: 24.5%; left: 50.0%; color: #3B82F6; }
.abdomen-hotspot { top: 38.0%; left: 50.0%; color: #F59E0B; }
.arms-hotspot { top: 29.0%; left: 70.8%; color: #8B5CF6; }
.legs-hotspot { top: 62.0%; left: 41.5%; color: #EF4444; }
.back-hotspot,
.pelvis-hotspot { top: 48.5%; left: 50.0%; color: #14B8A6; }

/* Callout Labels */
.callout-block {
  position: absolute;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  z-index: 15;
  transition: transform 0.2s ease, opacity 0.2s ease;
  outline: none;
  user-select: none;
  white-space: nowrap;
}

.callout-block:hover,
.callout-block:focus-visible {
  transform: translateY(-50%) scale(1.04);
}

.callout-num-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Left-side callout positions */
.callout-head {
  top: 5.0%;
  right: 86%;
  text-align: right;
  color: #10B981;
  transform: translateY(-50%);
}

.callout-abdomen {
  top: 38.0%;
  right: 86%;
  text-align: right;
  color: #F59E0B;
  transform: translateY(-50%);
}

.callout-legs {
  top: 62.0%;
  right: 86%;
  text-align: right;
  color: #EF4444;
  transform: translateY(-50%);
}

/* Right-side callout positions */
.callout-chest {
  top: 20.0%;
  left: 86%;
  text-align: left;
  color: #3B82F6;
  transform: translateY(-50%);
}

.callout-arms {
  top: 30.0%;
  left: 86%;
  text-align: left;
  color: #8B5CF6;
  transform: translateY(-50%);
}

.callout-back {
  top: 48.5%;
  left: 86%;
  text-align: left;
  color: #14B8A6;
  transform: translateY(-50%);
}

/* Selected Callout Highlights */
.callout-block.selected .callout-num-title {
  font-weight: 900;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* STATE B: SELECTED REGION PANEL (Swaps into exact same area) */
.selected-region-state {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.selected-region-state .info-card-container {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid rgba(22, 50, 110, 0.08);
  box-shadow: 0 4px 16px rgba(22, 50, 110, 0.04);
  padding: 18px 20px;
  width: 100%;
  max-width: 520px;
  height: 100%;
  max-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow: hidden;
}

.info-card-selected {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
}

.popup-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.popup-title-area {
  flex: 1;
  min-width: 0;
}

.selected-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B7280;
  margin-bottom: 3px;
}

.selected-title-heading {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  color: var(--color-navy);
}

.btn-change-area {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  color: var(--color-navy);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-change-area:hover {
  background: #E5E7EB;
  color: var(--color-navy-dark);
}

/* Hierarchy Breadcrumb */
.hierarchy-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #6B7280;
  margin-top: 2px;
  margin-bottom: 2px;
}

.hierarchy-breadcrumb .sep {
  color: #94A3B8;
}

.hierarchy-breadcrumb .current-level {
  color: var(--color-navy);
  font-weight: 800;
}

/* Content Scroll Area */
.popup-content-scroll {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.related-section-header {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid #F1F5F9;
  flex-shrink: 0;
}

.related-cards-scroll-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  margin-bottom: 0.25rem;
}

.related-cards-scroll-container::-webkit-scrollbar,
.expert-form-body::-webkit-scrollbar,
.expert-card-widget::-webkit-scrollbar {
  width: 5px;
}
.related-cards-scroll-container::-webkit-scrollbar-track,
.expert-form-body::-webkit-scrollbar-track,
.expert-card-widget::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 4px;
}
.related-cards-scroll-container::-webkit-scrollbar-thumb,
.expert-form-body::-webkit-scrollbar-thumb,
.expert-card-widget::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
.related-cards-scroll-container::-webkit-scrollbar-thumb:hover,
.expert-form-body::-webkit-scrollbar-thumb:hover,
.expert-card-widget::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.related-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: stretch;
}

/* Centered Talk to an Expert Action directly below selected-region cards */
.selected-region-footer-action {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid #F1F5F9;
  flex-shrink: 0;
  width: 100%;
}

@media (max-width: 1080px) {
  .related-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-entrance {
  animation: cardSlideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Individual Related Area Card */
.related-card {
  background: var(--bg-white);
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 0.55rem 0.45rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  height: 100%;
  box-sizing: border-box;
  outline: none;
}

.related-card:hover,
.related-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--color-navy-light);
  box-shadow: 0 6px 14px rgba(22, 50, 110, 0.08);
}

.related-card-img-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
  padding: 0.35rem;
  box-sizing: border-box;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.related-card-img-box.has-image {
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
}

.related-card:hover .related-card-img-box,
.related-card:focus-visible .related-card-img-box {
  border-color: var(--color-navy-light);
  background: #F1F5F9;
}

.related-card-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: auto;
}

.related-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
}

.related-card-img-placeholder svg {
  width: 38px;
  height: 38px;
  max-width: 75%;
  max-height: 75%;
}

.related-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.25;
  word-break: break-word;
  text-align: center;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.1rem;
}

/* Level 4 Confirmation State */
.confirm-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ECFDF5;
  color: #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.35rem;
}

.confirm-badge-icon svg {
  width: 22px;
  height: 22px;
}

.confirm-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 0.25rem;
}

/* Selection Confirmation 3-Tier Hierarchy */
.selection-hierarchy-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 16px;
  width: 100%;
  max-width: 340px;
  margin: 0.35rem auto 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.hierarchy-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.hierarchy-item-primary .hierarchy-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748B;
  line-height: 1.25;
}

.hierarchy-item-secondary .hierarchy-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.25;
}

.hierarchy-item-tertiary {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 5px 14px;
  width: auto;
  max-width: 92%;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.06);
}

.hierarchy-item-tertiary .hierarchy-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.hierarchy-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 16px;
  margin: 1px 0;
}

.connector-line {
  width: 1.5px;
  height: 8px;
  background: #CBD5E1;
  border-radius: 1px;
}

.hierarchy-connector svg {
  display: block;
  margin-top: -1px;
}

.confirm-path-chip {
  display: inline-block;
  background: #E0F2FE;
  color: #0369A1;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  margin-bottom: 0.35rem;
}

.confirm-status-text {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  max-width: 320px;
}

.btn-standalone-back {
  padding: 0.5rem 1.15rem;
  border-radius: 20px;
  border: 1.5px solid #2563EB;
  background: #FFFFFF;
  color: #2563EB;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-standalone-back:hover {
  background: #EFF6FF;
  border-color: #1D4ED8;
  color: #1D4ED8;
  transform: translateY(-1px);
}

.btn-standalone-continue {
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  border: none;
  background: var(--color-navy);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 4px 12px rgba(22, 50, 110, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-standalone-continue:hover {
  background: #0D204A;
  transform: translateY(-1px);
}

/* Loading, Error & Empty States */
.loading-state,
.error-state,
.empty-state {
  text-align: center;
  padding: 2.5rem 1.25rem;
  font-size: 0.88rem;
  color: #64748B;
  margin: auto 0;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #E2E8F0;
  border-top-color: var(--color-navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   5. TALK TO AN EXPERT: MODAL ENQUIRY DIALOG OVERLAY
   -------------------------------------------------------------------------- */
.expert-form-state {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.25s ease-out;
  box-sizing: border-box;
}

.expert-form-inner {
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: calc(100vh - 40px);
  background: #FFFFFF;
  border: 1px solid rgba(22, 50, 110, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(22, 50, 110, 0.04);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.expert-form-header {
  margin-bottom: 8px;
  flex-shrink: 0;
}

.btn-back-to-expert {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: #F1F5F9;
  border: 1px solid rgba(22, 50, 110, 0.12);
  color: var(--color-navy);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 6px;
}

.btn-back-to-expert:hover {
  background: var(--color-navy);
  color: #FFFFFF;
  border-color: var(--color-navy);
}

.form-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0;
}

.form-state-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.expert-form-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

/* Selected Body Area Preview badge inside form - compact badge style */
.enquiry-selected-area-preview {
  background: #F0F7FF;
  border: 1px solid #BFDBFE;
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 8px;
  font-size: 0.74rem;
  color: #1E40AF;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.25;
  box-sizing: border-box;
}

.enquiry-selected-area-preview .preview-label {
  font-weight: 700;
  color: var(--color-navy);
  white-space: nowrap;
  flex-shrink: 0;
}

.enquiry-selected-area-preview .preview-path {
  font-weight: 600;
  color: #1D4ED8;
  word-break: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .enquiry-selected-area-preview {
    flex-wrap: wrap;
  }
  .enquiry-selected-area-preview .preview-path {
    white-space: normal;
  }
}

/* Readonly Subject styling for Region-based enquiries */
.form-control.is-readonly-subject {
  background-color: #F8FAFC !important;
  color: #334155 !important;
  border-color: #CBD5E1 !important;
  cursor: default;
  font-weight: 600;
  user-select: none;
}
.form-control.is-readonly-subject:focus {
  border-color: #CBD5E1 !important;
  box-shadow: none !important;
}

.enquiry-subject-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.71rem;
  color: #64748B;
  margin-top: 4px;
  font-weight: 500;
  line-height: 1.2;
}
.enquiry-subject-hint svg {
  color: #3B82F6;
  flex-shrink: 0;
}

/* 2-Column Desktop Grid for Expert Form */
.expert-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.expert-form-grid .form-group {
  margin-bottom: 0;
}

.expert-form-grid .form-group.full-width {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .expert-form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.expert-form-body .form-group {
  margin-bottom: 8px;
}

.expert-form-body .form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 3px;
}

.expert-form-body .form-control {
  width: 100%;
  padding: 7px 10px;
  font-size: 0.82rem;
  border: 1px solid rgba(22, 50, 110, 0.15);
  border-radius: 8px;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.expert-form-body .form-control:focus {
  border-color: var(--color-sky-blue);
  box-shadow: 0 0 0 2px rgba(41, 171, 226, 0.2);
}

.expert-form-body .form-control.is-invalid {
  border-color: #EF4444;
}

.error-feedback {
  display: none;
  font-size: 0.72rem;
  color: #EF4444;
  margin-top: 2px;
}

.form-group.has-error .error-feedback {
  display: block;
}

/* Region Requirement Notice */
.region-requirement-notice {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 2px;
  margin-bottom: 4px;
  font-size: 0.74rem;
  color: #92400E;
  font-weight: 600;
  line-height: 1.35;
  box-sizing: border-box;
}

.region-requirement-notice svg {
  color: #D97706;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Submit Button Disabled State */
#btnSubmitEnquiry:disabled,
#btnSubmitEnquiry.btn-disabled-region {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  background-color: #94A3B8 !important;
  border-color: #94A3B8 !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Confirmation State inside Right Side */
.enquiry-confirmation {
  text-align: center;
  padding: 20px 10px;
}

.confirmation-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #DCFCE7;
  color: #16A34A;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.confirmation-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.enquiry-confirmation h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 6px;
}

.confirmation-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 12px;
}

.confirmation-details {
  background: #F8FAFC;
  border: 1px solid rgba(22, 50, 110, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  text-align: left;
  color: var(--text-main);
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   6. COMPACT STATUS FOOTER (~32px)
   -------------------------------------------------------------------------- */
.compact-status-footer {
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  background: #0E1F45;
  color: #CBD5E1;
  font-size: 0.74rem;
  display: flex;
  align-items: center;
  padding: 0 24px;
  box-sizing: border-box;
  z-index: 900;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.status-footer-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-weight: 500;
}

.footer-links-inline a,
.footer-contact-inline a {
  color: #CBD5E1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links-inline a:hover,
.footer-contact-inline a:hover {
  color: var(--color-sky-blue);
  text-decoration: underline;
}

.status-footer-inner .divider {
  margin: 0 6px;
  color: #64748B;
}

/* --------------------------------------------------------------------------
   7. RESPONSIVE MEDIA QUERIES (1920x1080, 1440x900, 1366x768, Tablet, Mobile)
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   7. RESPONSIVE MEDIA QUERIES (Desktop heights, Tablet, Mobile)
   -------------------------------------------------------------------------- */

/* Target 1366x768 and smaller desktop heights */
@media (min-width: 861px) and (max-height: 820px) {
  .app-workspace {
    height: calc(100vh - 56px - 32px);
    max-height: calc(100vh - 56px - 32px);
    padding: 4px 16px;
  }
  .body-map-header,
  .body-map-header-top,
  .body-map-subtitle-top {
    margin-top: 0;
    margin-bottom: 5px;
  }
  .body-map-title {
    font-size: 1.2rem;
    margin-bottom: 2px;
  }
  .body-map-subtitle {
    font-size: 0.8rem;
  }
  .body-image-container {
    max-height: clamp(210px, calc(100vh - 56px - 32px - 110px), 420px);
  }
  .expert-card-state {
    margin-top: 6px;
  }
  .btn-expert-action {
    padding: 0.5rem 1.4rem;
    font-size: 0.84rem;
  }
}

/* Tablet & Mobile (<= 860px) - Clean Centered Layout */
@media (max-width: 860px) {
  html, body.app-body {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background-color: #F8FAFC;
  }

  /* Compact Site Header for Mobile */
  .site-header {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    flex-shrink: 0;
    padding: 0 16px;
    box-sizing: border-box;
    z-index: 1000;
  }

  .site-header .header-inner {
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .brand-logo {
    display: flex;
    align-items: center;
  }

  .logo-img {
    height: 32px;
    max-height: 34px;
    width: auto;
  }

  .header-nav-wrap {
    display: flex;
    align-items: center;
    margin-left: auto;
  }

  .mobile-nav-toggle {
    display: block;
    margin-left: 8px;
    padding: 6px;
  }

  /* Mobile drawer */
  .main-nav {
    position: fixed;
    top: 52px;
    left: 0;
    width: 100%;
    height: calc(100vh - 52px);
    background-color: #FFFFFF;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: 1001;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    width: 100%;
  }

  .nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-navy);
  }

  /* Workspace fills viewport strictly between header and footer with zero overflow */
  .app-workspace {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    flex: 1 1 auto;
    min-height: 0;
    height: calc(100dvh - 52px - 30px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 52px - 30px - env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    padding: 2px 8px;
    gap: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .body-map-central-stage,
  .body-map-content-stage {
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    overflow: hidden;
  }

  .skeleton-view-state {
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    overflow: hidden;
  }

  .body-image-container {
    position: relative;
    display: block;
    aspect-ratio: 682 / 1024;
    width: auto;
    max-width: min(58vw, 235px);
    height: auto;
    max-height: calc(100dvh - 52px - 30px - 95px - env(safe-area-inset-bottom, 0px));
    margin: 0 auto;
    overflow: visible;
  }

  .callout-num-title {
    font-size: clamp(0.56rem, 2.0vw, 0.65rem);
    letter-spacing: -0.015em;
    white-space: nowrap;
  }

  .connector-path {
    stroke-width: 1.2px;
  }

  .body-map-header,
  .body-map-header-top,
  .body-map-subtitle-top,
  .body-map-heading-bottom {
    text-align: center;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .body-map-title {
    font-size: clamp(1.05rem, 3.8vw, 1.25rem);
    line-height: 1.15;
    margin: 0 0 2px 0;
    font-weight: 800;
  }

  .body-map-subtitle {
    font-size: clamp(0.70rem, 2.5vw, 0.76rem);
    margin: 0;
    line-height: 1.2;
  }

  /* Centered Talk to an Expert button underneath skeleton on mobile */
  .expert-card-state {
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .expert-card-inner {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    animation: none !important;
  }

  .btn-expert-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: clamp(0.38rem, 1vh, 0.48rem) clamp(1rem, 3vw, 1.35rem) !important;
    font-size: clamp(0.76rem, 2.4vw, 0.84rem) !important;
    font-weight: 600 !important;
    border-radius: var(--radius-full) !important;
    color: #FFFFFF !important;
    background: linear-gradient(135deg, #16326E 0%, #7B1FA2 50%, #E5027F 100%) !important;
    box-shadow: 0 4px 12px rgba(22, 50, 110, 0.22) !important;
    border: none !important;
    margin: 0 !important;
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
  }

  .expert-btn-text {
    display: inline !important;
    color: #FFFFFF !important;
    font-size: 0.84rem !important;
    max-width: none !important;
    text-shadow: none !important;
  }

  .expert-btn-br {
    display: none !important;
  }

  .expert-btn-arrow {
    display: inline !important;
  }

  .expert-assistant-rings,
  .expert-avatar-block,
  .status-online-dot {
    display: none !important;
  }

  /* Modal Form Overlay for Talk to an Expert on Mobile */
  .expert-form-state {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    margin: 0;
    box-sizing: border-box;
    animation: fadeIn 0.2s ease-out;
  }

  .expert-form-inner {
    width: 100%;
    max-width: 480px;
    max-height: 92dvh;
    height: auto;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
  }

  .expert-form-header {
    flex-shrink: 0;
    margin-bottom: 8px;
  }

  .expert-form-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
  }

  /* Selected Region State on Mobile */
  .selected-region-state {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .selected-region-state .info-card-container {
    width: 100%;
    max-width: 500px;
    height: 100%;
    max-height: 100%;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
  }

  /* Mobile Selected Body-Region Header: Clean Two-Column Layout */
  .popup-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    flex-shrink: 0;
    width: 100%;
  }

  .popup-title-area {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .selected-eyebrow {
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #6B7280;
    margin-bottom: 4px;
    max-width: 58px;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .selected-title-heading {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.15;
    word-break: keep-all;
    overflow-wrap: normal;
    white-space: normal;
    hyphens: none;
    max-width: 115px;
    margin: 0;
  }

  .hierarchy-breadcrumb {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: #6B7280;
    margin-top: 2px;
    margin-bottom: 2px;
    max-width: 120px;
    word-break: keep-all;
  }

  .btn-change-area {
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 0 11px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    color: var(--color-navy);
    box-sizing: border-box;
    align-self: flex-start;
    transition: all 0.2s ease;
  }

  .btn-change-area:hover,
  .btn-change-area:active {
    background: #E5E7EB;
    color: var(--color-navy-dark);
  }

  .related-section-header {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-navy);
    margin-top: 6px;
    margin-bottom: 8px;
    padding-top: 8px;
    border-top: 1px solid #E5E7EB;
    flex-shrink: 0;
  }

  .related-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: stretch;
  }

  .related-card {
    height: 100%;
    padding: 0.6rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .btn-standalone-back,
  .btn-standalone-continue {
    min-height: 40px;
    padding: 0.5rem 1.15rem;
    box-sizing: border-box;
  }

  /* Single-line 30px compact footer on mobile, positioned with safe area support */
  .compact-status-footer {
    height: calc(30px + env(safe-area-inset-bottom, 0px));
    min-height: calc(30px + env(safe-area-inset-bottom, 0px));
    max-height: calc(30px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
    padding: 0 10px env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0E1F45;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 900;
  }

  .status-footer-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.68rem;
    line-height: 1;
    white-space: nowrap;
  }

  .footer-copy {
    font-size: 0.68rem;
  }

  .footer-links-inline {
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .footer-links-inline .divider {
    margin: 0 4px;
  }

  .footer-contact-inline {
    display: none !important;
  }
}

@media (max-width: 375px) {
  .body-image-container {
    width: auto;
    max-width: min(56vw, 215px);
  }

  .callout-num-title {
    font-size: 0.58rem;
    letter-spacing: -0.025em;
  }

  .selected-eyebrow {
    font-size: 9px;
    max-width: 54px;
  }

  .selected-title-heading {
    font-size: 20px;
    max-width: 105px;
  }

  .btn-change-area {
    font-size: 11px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0 10px;
  }

  .related-section-header {
    font-size: 14px;
  }
}

@media (max-width: 330px) {
  .body-image-container {
    width: auto;
    max-width: min(52vw, 185px);
  }

  .callout-num-title {
    font-size: 0.52rem;
    letter-spacing: -0.025em;
  }
}

/* Short mobile viewport heights (<= 700px height, e.g. iPhone SE 667px, 640px, etc.) */
@media (max-width: 860px) and (max-height: 700px) {
  .site-header {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
  }
  .compact-status-footer {
    height: calc(26px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(26px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(26px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .app-workspace {
    height: calc(100dvh - 46px - 26px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 46px - 26px - env(safe-area-inset-bottom, 0px));
    padding: 1px 4px;
  }
  .body-map-title {
    font-size: clamp(0.95rem, 3.2vw, 1.08rem);
    line-height: 1.1;
    margin: 0 0 1px 0;
  }
  .body-map-subtitle {
    font-size: 0.68rem;
    line-height: 1.15;
  }
  .body-image-container {
    max-height: calc(100dvh - 46px - 26px - 78px - env(safe-area-inset-bottom, 0px));
    max-width: min(54vw, 205px);
  }
  .callout-num-title {
    font-size: 0.56rem;
  }
  .btn-expert-action {
    padding: 0.32rem 1.05rem !important;
    font-size: 0.74rem !important;
  }
}

/* Ultra-short mobile viewport heights (<= 580px height, e.g. iPhone 5 568px or landscape) */
@media (max-width: 860px) and (max-height: 580px) {
  .site-header {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
  }
  .compact-status-footer {
    height: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .app-workspace {
    height: calc(100dvh - 40px - 24px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 40px - 24px - env(safe-area-inset-bottom, 0px));
    padding: 1px 4px;
  }
  .body-map-title {
    font-size: 0.88rem;
    margin: 0;
  }
  .body-map-subtitle {
    font-size: 0.62rem;
  }
  .body-image-container {
    max-height: calc(100dvh - 40px - 24px - 66px - env(safe-area-inset-bottom, 0px));
    max-width: min(48vw, 175px);
  }
  .callout-num-title {
    font-size: 0.50rem;
  }
  .btn-expert-action {
    padding: 0.25rem 0.85rem !important;
    font-size: 0.68rem !important;
  }
}

/* ========================================================================== */
/* Single Animated Hand/Cursor Guide                                         */
/* Visually demonstrates that body regions and hotspots are clickable        */
/* ========================================================================== */
.body-map-hand-guide {
  position: absolute;
  top: 5.0%;
  left: 50.0%;
  width: 0;
  height: 0;
  pointer-events: none;
  user-select: none;
  z-index: 100;
  display: block;
  opacity: 1;
  transform: translateZ(0);
  transition: left 0.85s cubic-bezier(0.4, 0, 0.2, 1),
              top 0.85s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
  will-change: left, top;
}

/* Hidden state (fades out immediately upon interaction) */
.body-map-hand-guide.is-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease, visibility 0.2s;
}

/* Hand cursor wrapper */
.hand-guide-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 60px;
  pointer-events: none;
  /* Anchor: index fingertip apex is at (13.25px, 0.5px) within 40x60 render */
  transform: translate(-13.25px, -0.5px);
  transform-origin: 13.25px 0.5px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

/* Tap/click animation on the 3D hand cursor: gentle realistic press */
.body-map-hand-guide.is-tapping .hand-guide-cursor {
  transform: translate(-13.25px, -0.5px) scale(0.92);
}

.hand-guide-svg {
  display: block;
  width: 40px !important;
  height: 60px !important;
  max-width: none !important;
  min-width: 40px;
  min-height: 60px;
  overflow: visible;
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.22));
  pointer-events: none;
}

/* Small tap ripple effect emanating from the fingertip contact point */
.hand-guide-ripple {
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  margin-left: -16px;
  border-radius: 50%;
  border: 2px solid #F5C400;
  background: rgba(245, 196, 0, 0.25);
  box-shadow: 0 0 10px rgba(245, 196, 0, 0.50);
  transform: scale(0.2);
  opacity: 0;
  pointer-events: none;
  box-sizing: border-box;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.body-map-hand-guide.is-tapping .hand-guide-ripple {
  animation: handGuideRipplePulse 0.65s cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes handGuideRipplePulse {
  0% {
    transform: scale(0.25);
    opacity: 0.95;
  }
  50% {
    opacity: 0.75;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Responsive Hand Size for Mobile Devices */
@media (max-width: 768px) {
  .hand-guide-cursor {
    width: 30px;
    height: 45px;
    transform: translate(-9.9px, -0.4px);
    transform-origin: 9.9px 0.4px;
  }
  .body-map-hand-guide.is-tapping .hand-guide-cursor {
    transform: translate(-9.9px, -0.4px) scale(0.92);
  }
  .hand-guide-svg {
    width: 30px !important;
    height: 45px !important;
    min-width: 30px;
    min-height: 45px;
  }
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .body-map-hand-guide {
    display: none !important;
    animation: none !important;
    transition: none !important;
  }
  .expert-card-inner {
    animation: none !important;
  }
  .expert-avatar-block::before {
    animation: none !important;
    display: none !important;
  }
}

/* ========================================================================== */
/* Floating Talk to an Expert Button Keyframes & Accessibility                */
/* ========================================================================== */
@keyframes floatingAssistantPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(22, 50, 110, 0.32), 0 2px 8px rgba(229, 2, 127, 0.28);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(22, 50, 110, 0.38), 0 4px 12px rgba(229, 2, 127, 0.34);
  }
}

@keyframes assistantRipplePulse {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }
  70% {
    opacity: 0.18;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .expert-card-inner,
  .assistant-ring {
    animation: none !important;
  }
}