/* Modales: Sabiduría Diaria, Check-in y El Hogar — UPROTA */

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
}

/* Modal de Sabiduría Diaria */
.sabiduria-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

/* BOTONES MODAL */
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* TOUR GUIADO (SPOTLIGHT & COMIDILLA FLOTANTE) */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.tour-spotlight-box {
  position: fixed;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.82), 0 0 20px rgba(217, 119, 6, 0.7);
  border: 2px solid var(--oro-torta);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2001;
}

.tour-tooltip-card {
  position: fixed;
  width: 90%;
  max-width: 340px;
  background: var(--bg-surface);
  border: 1px solid var(--oro-torta);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 15px rgba(217, 119, 6, 0.3);
  z-index: 2002;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tour-tooltip-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--oro-torta-glow);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tour-tooltip-step {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.tour-tooltip-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 12px;
}

.tour-tooltip-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sabiduria-avatar {
  font-size: 2rem;
  line-height: 1;
}

.sabiduria-titulos h2 {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-family: var(--font-serif);
}

.sabiduria-titulos span {
  font-size: 0.75rem;
  color: var(--oro-torta);
}

.sabiduria-cuerpo-box {
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid var(--pilar-espiritu);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px;
  margin-bottom: 16px;
}

.sabiduria-referencia {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--pilar-espiritu-light);
  margin-bottom: 6px;
}

.sabiduria-texto {
  font-size: 0.9rem;
  color: #fef08a;
  line-height: 1.6;
  font-style: italic;
}

/* El Hogar (4 Capas) */
.hogar-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hogar-capa-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border-left: 3px solid var(--oro-torta);
}

.hogar-capa-titulo {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--oro-torta-glow);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.hogar-capa-texto {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Chips de Sugerencia Rápida */
.chip-sug {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-sug:hover {
  background: var(--bg-surface-active);
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.btn-toggle-mas {
  background: transparent;
  border: 1px dashed var(--border-accent);
  color: var(--oro-torta-glow);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle-mas:hover {
  background: rgba(217, 119, 6, 0.15);
  border-color: var(--oro-torta);
}

.extra-chips-box.hidden {
  display: none !important;
}

/* Pastillas de Frecuencia Semanal */
.frec-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.frec-pill:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.frec-pill.active {
  background: var(--accent-rust);
  border-color: var(--accent-rust-light);
  color: #fff;
  font-weight: 700;
}

/* ==========================================================================
   SPLASH SCREEN & SECUENCIA CINEMÁTICA DE APERTURA (SAPIENSIA CLAN + UPROTA)
   ========================================================================== */

.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #090d16;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-inner {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.splash-skip-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.splash-skip-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  color: var(--oro-torta);
  border-color: var(--oro-torta);
}

.splash-fase {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.splash-canvas-wrapper {
  width: 100%;
  max-width: 380px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.splash-frame {
  width: 100%;
  max-width: 320px;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.8));
}

.splash-brand-text {
  text-align: center;
  transition: opacity 0.5s ease;
}

.splash-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  letter-spacing: 0.25em;
  color: var(--oro-torta);
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  margin-bottom: 6px;
}

.splash-subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Fase 2: UPROTA Title Screen Actions */
.splash-uprota-wrapper {
  margin-bottom: 12px;
}

.splash-frame-uprota {
  max-width: 340px;
}

.uprota-actions-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: opacity 0.5s ease;
}

.uprota-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.btn-entrar-pulse {
  background: linear-gradient(135deg, #d97706, #b45309);
  border: 1px solid #f59e0b;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.4);
  animation: pulse-glow 2s infinite ease-in-out;
  transition: transform 0.15s ease;
}

.btn-entrar-pulse:hover {
  transform: scale(1.04);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
}

.btn-entrar-pulse:active {
  transform: scale(0.98);
}

.uprota-version-tag {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.4);
    border-color: rgba(245, 158, 11, 0.6);
  }
  50% {
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.8);
    border-color: #fbbf24;
  }
}

.opacity-0 {
  opacity: 0 !important;
}

.fade-in {
  opacity: 1 !important;
}
