*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* CONTROL DE PANTALLAS — regla principal */
.screen { display: none !important; }
.screen.active { display: block !important; }
.hidden { display: none; }

:root {
  --text: #1a1a1a;
  --text-2: #555;
  --text-3: #999;
  --bg: #ffffff;
  --bg-2: #f5f5f3;
  --border: rgba(0,0,0,0.1);
  --border-2: rgba(0,0,0,0.18);
  --radius: 10px;
  --radius-lg: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f0f0ee;
    --text-2: #aaa;
    --text-3: #666;
    --bg: #141414;
    --bg-2: #1f1f1f;
    --border: rgba(255,255,255,0.1);
    --border-2: rgba(255,255,255,0.18);
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}


.hidden { display: none; }

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ── Marca ── */
.brand { font-size: 28px; font-weight: 500; color: var(--text); }
.brand-title { font-size: 28px; font-weight: 500; margin-bottom: 0.4rem; }
.date-label { font-size: 11px; letter-spacing: 0.08em; color: var(--text-3); text-transform: uppercase; margin-bottom: 0.4rem; }
.subtitle { font-size: 15px; color: var(--text-2); margin-bottom: 2rem; }
.header { margin-bottom: 2rem; }

/* ── Pantalla conexión ── */
.connect-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.connect-sub { font-size: 15px; color: var(--text-2); margin: 0.5rem 0 2rem; }
.connect-cards { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
.connect-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
}
.connect-card-icon { flex-shrink: 0; }
.connect-card-info { flex: 1; }
.connect-card-title { font-size: 14px; font-weight: 500; }
.connect-card-status { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.connect-card.connected .connect-card-status { color: #2d7a4a; }
.btn-connect {
  font-size: 13px; font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1.5px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.connect-card.connected .btn-connect {
  border-color: #2d7a4a33;
  color: #2d7a4a;
  pointer-events: none;
}

/* ── Botones ── */
.btn-primary {
  width: 100%;
  padding: 0.875rem;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 0.5rem;
}
.btn-primary:disabled { opacity: 0.35; cursor: default; }
.btn-secondary {
  width: 100%;
  padding: 0.875rem;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-2);
  font-size: 14px;
  cursor: pointer;
}
.btn-back {
  background: none; border: none;
  font-size: 13px; color: var(--text-3);
  cursor: pointer; padding: 0;
  margin-bottom: 1.5rem;
}

/* ── Grid minerales ── */
.minerales-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.75rem; margin-bottom: 2rem;
}
.mineral-card {
  padding: 1rem; border-radius: 12px;
  background: var(--mb, #f5f5f3);
  border: 1px solid var(--border);
}
.mineral-tipo { font-size: 11px; font-weight: 500; color: var(--mc, #333); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.mineral-nombre { font-size: 15px; font-weight: 500; color: var(--mc, #333); }
.mineral-desc { font-size: 12px; color: var(--mc, #555); opacity: 0.8; margin-top: 0.3rem; line-height: 1.5; }

/* ── Check-in ── */
.section-title { font-size: 20px; font-weight: 500; margin-bottom: 0.3rem; }
.section-sub { font-size: 14px; color: var(--text-2); margin-bottom: 1.5rem; }
.group { padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.group-label { font-size: 13px; font-weight: 500; margin-bottom: 0.75rem; }
.slider-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.slider-label { font-size: 14px; color: var(--text-2); min-width: 70px; }
.pill-group { display: flex; gap: 0.5rem; flex: 1; }
.pill-group.wrap { flex-wrap: wrap; flex: unset; }
.pill {
  flex: 1; padding: 0.4rem 0.75rem;
  border-radius: 20px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text);
  font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.pill.active {
  border-color: var(--border-2);
  background: var(--bg-2);
  font-weight: 500;
}

/* ── Resultado ── */
.mineral-hero {
  padding: 1.5rem; border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  background: var(--hero-bg, #f5f5f3);
  border: 1.5px solid var(--hero-border, rgba(0,0,0,0.08));
}
.mineral-hero-label { font-size: 11px; font-weight: 500; color: var(--hero-color, #333); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.4rem; }
.mineral-hero-nombre { font-size: 26px; font-weight: 500; color: var(--hero-color, #1a1a1a); margin-bottom: 0.75rem; }
.mineral-hero-desc { font-size: 14px; color: var(--hero-color, #555); line-height: 1.65; }

.section { margin-bottom: 1.5rem; }
.section-header {
  font-size: 13px; font-weight: 500;
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.badge {
  font-size: 11px; font-weight: 400; color: var(--text-3);
  background: var(--bg-2); padding: 2px 8px; border-radius: 10px;
}

.rec-item { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.rec-item:last-child { border-bottom: none; }
.rec-num {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  background: var(--hero-bg, #f5f5f3);
  border: 1.5px solid rgba(0,0,0,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500; color: var(--hero-color, #333);
}
.rec-text { font-size: 14px; line-height: 1.65; color: var(--text); }

.event-card { margin-bottom: 0.75rem; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.event-body { display: flex; gap: 0.75rem; padding: 0.85rem 1rem; align-items: flex-start; }
.event-bar { width: 3px; border-radius: 3px; align-self: stretch; flex-shrink: 0; }
.event-hora { font-size: 11px; color: var(--text-3); margin-bottom: 0.2rem; }
.event-titulo { font-size: 14px; font-weight: 500; margin-bottom: 0.2rem; }
.event-desc { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.event-lectura {
  padding: 0.65rem 1rem;
  background: var(--hero-bg, #f5f5f3);
  border-top: 1px solid var(--border);
}
.event-lectura-label { font-size: 11px; font-weight: 500; color: var(--hero-color, #333); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.event-lectura-text { font-size: 13px; color: var(--hero-color, #444); line-height: 1.55; }

.empty-slot {
  padding: 0.85rem 1rem; border-radius: var(--radius);
  border: 1px dashed var(--border-2);
  font-size: 13px; color: var(--text-3); line-height: 1.6;
}
.loading { padding: 0.85rem 1rem; border-radius: var(--radius); background: var(--bg-2); font-size: 13px; color: var(--text-3); }

.fuente { font-size: 11px; color: var(--text-3); line-height: 1.6; padding: 0.85rem 1rem; border-radius: var(--radius); background: var(--bg-2); margin-bottom: 1.5rem; }
