/**
 * Hoja de Estilos - Anatomía Humana 3D Interactiva
 * Estándar visual de alta gama para Fijate Tools
 * Tipografía corporativa: Outfit (títulos), Inter (cuerpo), JetBrains Mono (cifras)
 * Reglas estrictas: [hidden] blindado, responsive táctil >= 40px, selects con elipsis.
 */

/* 1. Reset y blindaje preventivo contra colisiones display: flex / grid */
[hidden] {
  display: none !important;
}

:root {
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta médica premium (Oscuro por defecto) */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(56, 189, 248, 0.16);
  --border-color-hover: rgba(56, 189, 248, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #0ea5e9;
  --accent-cyan-glow: rgba(14, 165, 233, 0.35);
  --accent-blue: #2563eb;
  --accent-bone: #f8fafc;
  --accent-muscle: #ef4444;
  --accent-organ: #06b6d4;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;

  --shadow-glow: 0 0 25px rgba(14, 165, 233, 0.18);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(248, 250, 252, 0.95);
  --border-color: rgba(14, 165, 233, 0.22);
  --border-color-hover: rgba(14, 165, 233, 0.45);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --shadow-glow: 0 4px 20px rgba(14, 165, 233, 0.12);
}

/* 2. Layout base de contención canónica */
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.code-font {
  font-family: var(--font-mono);
}

.tool-layout {
  max-width: 1240px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-glass:hover {
  border-color: var(--border-color-hover);
}

/* 3. Barra de navegación y búsqueda superior */
.anatomy-nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.search-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 380px;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 200px;
  min-width: 0;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.anatomy-input {
  width: 100%;
  height: 42px;
  padding: 0 0.75rem 0 2.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.anatomy-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.anatomy-select {
  height: 42px;
  padding: 0 2rem 0 0.85rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  box-sizing: border-box;
  outline: none;
  cursor: pointer;
  width: 100%;
  max-width: 280px;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230ea5e9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.anatomy-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.system-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.system-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.system-badge:hover,
.system-badge.active {
  background: var(--accent-cyan);
  color: #ffffff;
  border-color: var(--accent-cyan);
  box-shadow: 0 2px 10px var(--accent-cyan-glow);
}

/* 4. Escenario 3D Principal */
.stage-3d-card {
  position: relative;
  width: 100%;
  height: 640px;
  min-height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.webgl-canvas-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  outline: none;
  cursor: grab;
}

.webgl-canvas-wrapper:active {
  cursor: grabbing;
}

/* Spinner de carga de modelos */
.model-loader {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(10px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: opacity 0.35s ease;
}

.model-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.spinner-ring {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(14, 165, 233, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.loader-text {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.loader-progress-track {
  width: 240px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.loader-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  transition: width 0.25s ease;
}

/* Barra flotante superior de herramientas 3D */
.viewer-toolbar-top {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
}

.btn-tool, .btn-tool-toggle, .btn-tool-icon {
  height: 40px;
  min-height: 40px;
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-tool-icon {
  width: 40px;
  min-width: 40px;
  padding: 0;
  justify-content: center;
}

.btn-tool:hover, .btn-tool-toggle:hover, .btn-tool-icon:hover {
  background: rgba(30, 41, 59, 0.9);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

.btn-tool.active, .btn-tool-toggle.active {
  background: var(--accent-cyan);
  color: #ffffff;
  border-color: var(--accent-cyan);
  box-shadow: 0 2px 12px var(--accent-cyan-glow);
}

/* Barra flotante inferior de Rayos X y Capas */
.viewer-controls-bottom {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.glass-control-panel {
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  pointer-events: auto;
}

/* Control deslizante de rayos X */
.xray-slider-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.slider-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
}

.slider-label {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.slider-value {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.xray-range-input {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  outline: none;
  background: linear-gradient(90deg, #f1c29b 0%, #ef4444 35%, #06b6d4 65%, #38bdf8 100%);
  -webkit-appearance: none;
  cursor: pointer;
}

.xray-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.xray-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Conmutadores de Capas y TAC */
.layers-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.layer-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.layer-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.layer-check-label input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-skin { background-color: #f1c29b; }
.dot-muscle { background-color: #ef4444; }
.dot-organs { background-color: #06b6d4; }
.dot-skeleton { background-color: #f8fafc; }

/* Control del TAC / Resonancia */
.clip-controls-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.clip-controls-box[hidden] {
  display: none !important;
}

/* Presets de cámara */
.camera-presets-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  pointer-events: auto;
  align-self: flex-start;
}

.preset-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.2rem;
}

.btn-cam-preset {
  height: 28px;
  padding: 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cam-preset:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-cam-preset.active {
  background: var(--accent-cyan);
  color: #ffffff;
}

/* 5. Hotspots 3D y Pines Pulsantes */
.anatomy-hotspot-pin {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
}

.hotspot-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.7);
  z-index: 2;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.hotspot-pulse {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.25);
  animation: pulse-ring 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  z-index: 1;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  80%, 100% { transform: scale(2.2); opacity: 0; }
}

.anatomy-hotspot-pin:hover .hotspot-dot,
.anatomy-hotspot-pin.active .hotspot-dot {
  transform: scale(1.5);
  background: #ffffff;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
}

.hotspot-tooltip {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-cyan);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.anatomy-hotspot-pin:hover .hotspot-tooltip {
  opacity: 1;
}

/* 6. Panel Desplegable de Ficha Médica de Hotspot */
.hotspot-detail-card {
  position: absolute;
  top: 4.5rem;
  right: 1.25rem;
  width: 340px;
  max-width: calc(100% - 2.5rem);
  max-height: calc(100% - 13rem);
  overflow-y: auto;
  z-index: 30;
  padding: 1.25rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
  border-color: var(--accent-cyan);
}

.hotspot-detail-card[hidden] {
  display: none !important;
}

.hotspot-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hotspot-title {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.hotspot-latin {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-style: italic;
  display: block;
}

.hotspot-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-cyan);
  margin-bottom: 0.4rem;
}

.btn-close-hotspot {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s ease;
}

.btn-close-hotspot:hover {
  color: var(--text-primary);
}

.hotspot-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0.75rem 0 0.25rem;
}

.hotspot-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* 7. Tarjeta y Modal del Modo Examen / Quiz */
.quiz-interactive-card {
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--accent-cyan);
}

.quiz-interactive-card[hidden] {
  display: none !important;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.quiz-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  background: rgba(14, 165, 233, 0.18);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 700;
}

.quiz-question-title {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn-quiz-option {
  min-height: 44px;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-quiz-option:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.btn-quiz-option.correct {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

.btn-quiz-option.incorrect {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #f87171;
}

.quiz-feedback-box {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.quiz-feedback-box.feedback-correct {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #d1fae5;
}

.quiz-feedback-box.feedback-incorrect {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fee2e2;
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-quiz-next {
  min-height: 40px;
  padding: 0 1.25rem;
  background: var(--accent-cyan);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-quiz-next:hover {
  background: var(--accent-blue);
}

/* 8. Tarjetas Científicas Inferiores */
.scientific-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.scientific-card {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
}

.card-title {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kpi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.kpi-row:last-child {
  border-bottom: none;
}

.kpi-label {
  color: var(--text-muted);
}

.kpi-val {
  color: var(--text-primary);
  font-weight: 600;
}

/* 9. Modales Genéricos Accesibles */
.app-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.app-modal-overlay[hidden] {
  display: none !important;
}

.app-modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: modal-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.app-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-modal-title {
  font-size: 1.2rem;
  color: var(--text-primary);
}

.app-modal-close-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.app-modal-body {
  padding: 1.5rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-height: 65vh;
  overflow-y: auto;
}

.app-modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-modal-action {
  height: 40px;
  padding: 0 1.5rem;
  background: var(--accent-cyan);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

/* 10. Adaptación Responsiva para Móviles */
@media (max-width: 900px) {
  .scientific-grid {
    grid-template-columns: 1fr;
  }

  .stage-3d-card {
    height: 540px;
  }

  .quiz-options-grid {
    grid-template-columns: 1fr;
  }

  .viewer-toolbar-top {
    flex-wrap: wrap;
  }

  .camera-presets-bar {
    display: none;
  }

  .anatomy-select {
    max-width: 100%;
    width: 100%;
  }

  .search-filter-group {
    flex-direction: column;
    width: 100%;
  }

  .search-input-wrap {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .stage-3d-card {
    height: 460px;
  }

  .hotspot-detail-card {
    top: auto;
    bottom: 5.5rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-height: 45vh;
  }

  .layers-toggle-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
