/* ==========================================================================
   Semáforo de Radiación Ultravioleta y Tiempo de Quemadura Solar (AEMET UVI)
   Hoja de estilos corporativa Fijate Tools
   ========================================================================== */

:root {
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Paleta cromática tema claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #edf2f7;

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

  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-subtle: #fef3c7;
  --primary-text: #78350f;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);

  /* Colores oficiales de la escala UVI (OMS) */
  --uvi-low: #10b981;
  --uvi-moderate: #eab308;
  --uvi-high: #f97316;
  --uvi-very-high: #ef4444;
  --uvi-extreme: #8b5cf6;
}

/* ==========================================================================
   Tema Oscuro Corporativo ([data-theme="dark"])
   ========================================================================== */
[data-theme="dark"],
html.dark,
body.dark {
  --bg-page: #0b0f17;
  --bg-card: #131b26;
  --bg-card-subtle: #1a2434;
  --bg-input: #101623;
  --border-color: #243042;
  --border-subtle: #1c2738;

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

  --primary: #fbbf24;
  --primary-hover: #f59e0b;
  --primary-subtle: #2d2411;
  --primary-text: #fef3c7;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* Base y contención */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.hero-title,
.section-title,
.calc-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.mono,
.uvi-number,
.burn-big-time,
.peak-value {
  font-family: var(--font-mono);
}

/* Layout Canónico */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Tarjeta Hero / Introducción */
.tool-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: fit-content;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.25rem;
}

/* Selector de ubicación y barra GPS */
.location-bar-grid {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  flex-wrap: wrap;
}

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

.flex-province {
  flex: 1 1 260px;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.form-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 40px 0 0.85rem;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  appearance: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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 12px center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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");
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.form-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 42px;
  padding: 0 1.15rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--bg-card-subtle);
  border-color: var(--primary);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #0b0f17;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

/* Tarjetas métricas del semáforo */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card-metric {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.metric-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-time-badge,
.tag-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 0.35rem;
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Círculo medidor UVI */
.gauge-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.uvi-badge-circle {
  width: 96px;
  height: 96px;
  min-width: 96px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-subtle);
  border: 4px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.uvi-number {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.uvi-unit {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.uvi-status-pill {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.uvi-advice-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Escala cromática de barras UVI */
.uvi-scale-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--border-color);
  gap: 2px;
}

.scale-segment {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: default;
}

.scale-segment span {
  display: none;
}

.scale-segment.active {
  opacity: 1;
  box-shadow: 0 0 6px currentColor;
}

.seg-low { background-color: var(--uvi-low); }
.seg-moderate { background-color: var(--uvi-moderate); }
.seg-high { background-color: var(--uvi-high); }
.seg-very-high { background-color: var(--uvi-very-high); }
.seg-extreme { background-color: var(--uvi-extreme); }

/* Métricas del pico solar */
.peak-metrics-row {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.85rem;
}

.peak-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.peak-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.peak-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.15rem 0;
}

.peak-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.danger-window-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

[data-theme="dark"] .danger-window-box {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.danger-window-text {
  display: flex;
  flex-direction: column;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.danger-window-text strong {
  font-size: 0.875rem;
}

/* Contenedores de tarjeta principal */
.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.section-top-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dot-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.dot-actual { background: var(--primary); }
.dot-clear { background: #38bdf8; }

/* Contenedor del gráfico de barras horarias */
.chart-container {
  width: 100%;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scrollbar-width: thin;
}

.chart-bars-track {
  display: flex;
  align-items: flex-end;
  height: 180px;
  min-width: 600px;
  gap: 6px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.hour-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.hour-col:hover,
.hour-col.active {
  transform: translateY(-2px);
}

.hour-bar-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}

.hour-bar {
  width: 75%;
  max-width: 24px;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease, background-color 0.2s ease;
  position: relative;
}

.hour-col.is-now .hour-bar {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.hour-val-badge {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.hour-time-label {
  position: absolute;
  bottom: -22px;
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.hour-col.is-now .hour-time-label {
  color: #38bdf8;
  font-weight: 700;
}

.hourly-info-panel {
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ==========================================================================
   Sección Calculadora de Tiempo hasta Quemadura (Eritema)
   ========================================================================== */
.calc-section-header {
  margin-bottom: 1.5rem;
}

.calc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 2rem;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .calc-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.calc-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calc-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.calculator-inputs-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calc-input-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-link-action {
  background: none;
  border: none;
  color: #0284c7;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

[data-theme="dark"] .btn-link-action {
  color: #38bdf8;
}

.btn-link-action:hover {
  color: #0369a1;
}

/* Selector de fototipos de piel */
.phototypes-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.btn-phototype {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s ease;
  min-height: 58px;
}

.btn-phototype:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-phototype.selected {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-sm);
}

.pt-tone {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
}

/* Tonos Fitzpatrick representativos */
.tone-1 { background-color: #ffebd2; }
.tone-2 { background-color: #f7d5b4; }
.tone-3 { background-color: #e8b88a; }
.tone-4 { background-color: #b58051; }
.tone-5 { background-color: #7b4b26; }
.tone-6 { background-color: #3d2314; }

.pt-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pt-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pt-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Selector de FPS / SPF */
.spf-selector-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-spf-pill {
  flex: 1 1 100px;
  height: 42px;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-spf-pill:hover {
  border-color: var(--primary);
  background: var(--bg-card);
}

.btn-spf-pill.selected {
  background: var(--primary);
  color: #0b0f17;
  border-color: var(--primary);
  font-weight: 700;
}

.input-helper-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Banner de Resultado Principal (El Gran Cronómetro de Quemadura)
   ========================================================================== */
.burn-result-banner {
  margin-top: 1.75rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.burn-result-main {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.burn-time-card {
  flex: 1 1 240px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.burn-time-card.card-protected {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.04);
}

[data-theme="dark"] .burn-time-card.card-protected {
  background: rgba(16, 185, 129, 0.08);
}

.burn-label-sub {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.burn-big-time {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: #ef4444;
  margin: 0.25rem 0;
}

.text-emerald {
  color: #10b981 !important;
}

.burn-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.text-warning {
  color: #b45309 !important;
  font-weight: 600;
}

[data-theme="dark"] .text-warning {
  color: #fbbf24 !important;
}

.burn-divider-arrow {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Barra de tolerancia dérmica */
.skin-tolerance-bar-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tolerance-bar-track {
  height: 10px;
  background: var(--border-color);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.tolerance-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #eab308 50%, #ef4444 100%);
  border-radius: 5px;
  transition: width 0.4s ease;
}

.tolerance-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Dictamen dermatológico */
.clinical-verdict-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.verdict-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

[data-theme="dark"] .verdict-icon {
  color: #fbbf24;
}

.verdict-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.verdict-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.verdict-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ==========================================================================
   Previsión de Días Siguientes
   ========================================================================== */
.forecast-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.forecast-day-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 0.15s ease;
}

.forecast-day-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.forecast-day-card.is-today {
  border: 2px solid var(--primary);
  background: var(--bg-card);
}

.f-day-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.f-day-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.f-day-val {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.2rem 0;
}

.f-day-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
}

/* ==========================================================================
   Guía Médica de Salud Dermatológica
   ========================================================================== */
.guide-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.guide-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-card h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.guide-card p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.guide-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.icon-amber { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.icon-blue { background: rgba(56, 189, 248, 0.15); color: #0284c7; }
.icon-rose { background: rgba(244, 63, 94, 0.15); color: #e11d48; }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #059669; }

/* ==========================================================================
   Acordeón de Preguntas Frecuentes (FAQ)
   ========================================================================== */
.faq-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--bg-card-subtle);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item[open] {
  background: var(--bg-card);
  border-color: var(--primary);
}

.faq-question {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-arrow {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Modal Accesible: Test de Fototipo
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 23, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  overflow-y: auto;
}

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

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  width: 100%;
  max-width: 620px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
}

.modal-title-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-close-modal:hover {
  background: var(--bg-card-subtle);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-intro {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.test-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.test-question-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.question-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.test-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.test-option-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--bg-card-subtle);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.test-option-item:hover {
  background: var(--bg-card);
  border-color: var(--primary);
}

.test-option-item input[type="radio"] {
  margin-top: 0.15rem;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 768px) {
  .tool-hero-card {
    padding: 1.25rem;
  }

  .hero-title {
    font-size: 1.25rem;
  }

  .location-bar-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-gps-container {
    width: 100%;
  }

  .btn-gps {
    width: 100%;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .gauge-content {
    flex-direction: column;
    text-align: center;
  }

  .burn-result-main {
    flex-direction: column;
  }

  .burn-divider-arrow {
    transform: rotate(90deg);
  }

  .burn-big-time {
    font-size: 2.1rem;
  }

  .phototypes-selector-grid {
    grid-template-columns: 1fr;
  }

  .spf-selector-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}
