/**
 * Estilos canónicos del Kit de gestión del estrés y botiquín de calma
 * Fijate Tools - Sistema de diseño adaptable con soporte nativo de tema claro y oscuro
 */

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

  /* Paleta base relajante (Slate & Emerald / Calming Teal) */
  --bg-primary: #0b0f17;
  --bg-secondary: #131b26;
  --bg-card: #182232;
  --bg-card-hover: #1f2c40;
  --bg-input: #0e1520;

  --border-subtle: #243247;
  --border-focus: #14b8a6;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --color-primary: #14b8a6; /* Teal calmante */
  --color-primary-hover: #0d9488;
  --color-accent: #06b6d4; /* Cian suave */
  --color-accent-soft: rgba(6, 182, 212, 0.15);

  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.12);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.12);
  --color-danger: #f43f5e;
  --color-danger-bg: rgba(244, 63, 94, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.45);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f8fafc;

  --border-subtle: #e2e8f0;
  --border-focus: #0d9488;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --color-primary: #0d9488;
  --color-primary-hover: #0f766e;
  --color-accent: #0284c7;
  --color-accent-soft: rgba(2, 132, 199, 0.1);

  --color-success: #059669;
  --color-success-bg: rgba(5, 150, 105, 0.1);
  --color-warning: #d97706;
  --color-warning-bg: rgba(217, 119, 6, 0.1);
  --color-danger: #e11d48;
  --color-danger-bg: rgba(225, 29, 72, 0.1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Base de layout */
body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.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%;
}

/* Barra superior de acción rápida / rescate */
.hero-calm-box {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero-calm-info {
  flex: 1 1 280px;
}

.hero-calm-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-calm-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.hero-calm-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-rescue-quick {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 42px;
}

.btn-rescue-quick:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.45);
}

.btn-toggle-sound {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

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

.btn-toggle-sound.btn-muted {
  opacity: 0.65;
  color: var(--text-dim);
}

/* Pestañas de navegación principales */
.stress-nav-wrapper {
  margin-bottom: 1.5rem;
}

.stress-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 0.25rem;
}

.stress-tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.1rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.25rem;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  min-height: 44px;
}

.stress-tab-btn:hover {
  color: var(--text-main);
}

.stress-tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.stress-tab-panel {
  display: none;
}

.stress-tab-panel.active {
  display: block;
}

/* Tarjeta principal genérica */
.stress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.stress-card-header {
  margin-bottom: 1.25rem;
}

.stress-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stress-card-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================
   ESTILOS: EVALUADOR DE ESTRÉS PSS-10
   ========================================== */

.pss-intro-note {
  background: rgba(20, 184, 166, 0.08);
  border-left: 4px solid var(--color-primary);
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pss-questions-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pss-question-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.pss-question-card.highlight-missing {
  border-color: var(--color-danger);
  animation: shakeAlert 0.4s ease;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.pss-question-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.pss-question-number {
  background: rgba(20, 184, 166, 0.15);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  margin-top: 2px;
}

.pss-question-text {
  font-size: 0.98rem;
  font-weight: 500;
  margin: 0;
  color: var(--text-main);
  line-height: 1.45;
}

.pss-options-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
}

.pss-option-label {
  display: flex;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.pss-radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pss-option-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  min-height: 40px;
  box-sizing: border-box;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.pss-option-label:hover .pss-option-pill {
  border-color: var(--color-primary);
  color: var(--text-main);
}

.pss-option-label.selected .pss-option-pill {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  font-weight: 600;
}

.pss-actions-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Resultado PSS */
.pss-result-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-md);
}

.pss-result-card.hidden {
  display: none;
}

.pss-result-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.pss-score-badge-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.pss-score-big {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.pss-score-max {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--text-dim);
}

.stress-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
}

.stress-badge.badge-low {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.stress-badge.badge-moderate {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning);
}

.stress-badge.badge-high {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.pss-result-desc {
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.pss-recommendations-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.pss-recs-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--text-main);
}

.pss-recs-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pss-result-footer-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Historial PSS */
.pss-history-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

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

.pss-history-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.pss-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pss-history-table th,
.pss-history-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.pss-history-table th {
  background: var(--bg-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-muted);
}

.score-mono {
  font-family: var(--font-mono);
  font-weight: 700;
}

.status-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
}

.status-tag.tag-low {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.status-tag.tag-moderate {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.status-tag.tag-high {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

/* ==========================================
   ESTILOS: BOTIQUÍN DE CALMA (MODO RESCATE)
   ========================================== */

.rescue-subtabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.rescue-subtab-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  min-height: 40px;
}

.rescue-subtab-btn:hover {
  border-color: var(--color-primary);
  color: var(--text-main);
}

.rescue-subtab-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.rescue-subtab-panel {
  display: none;
}

.rescue-subtab-panel.active {
  display: block;
}

/* Anclaje 5-4-3-2-1 */
.grounding-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.grounding-progress-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.grounding-progress-track {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.grounding-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #06b6d4);
  width: 0%;
  transition: width 0.3s ease;
}

.grounding-progress-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.grounding-step-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.grounding-badge-count {
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.grounding-sense-name {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.grounding-instruction-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-main);
  line-height: 1.4;
}

.grounding-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 1rem;
}

.grounding-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.grounding-tip {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem 0;
}

.grounding-nav-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.grounding-finish-box {
  text-align: center;
  padding: 1.5rem 1rem;
}

.grounding-finish-icon {
  color: var(--color-success);
  margin-bottom: 1rem;
}

.grounding-finish-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
}

.grounding-finish-desc {
  max-width: 540px;
  margin: 0 auto 1.5rem auto;
  color: var(--text-muted);
}

.grounding-actions-final {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* TIPP: Frío */
.tipp-cold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.tipp-cold-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.tipp-cold-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.tipp-cold-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
}

.tipp-cold-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.tipp-science-box {
  background: rgba(6, 182, 212, 0.08);
  border-left: 4px solid var(--color-accent);
  padding: 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* TIPP: Descarga motora (60 segundos) */
.shake-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
}

.shake-orb-wrapper {
  margin: 1.5rem auto;
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shake-orb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.3) 0%, rgba(20, 184, 166, 0.05) 70%, transparent 100%);
  border: 2px dashed var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.shake-orb.pulsing {
  animation: shakeOrbPulse 1.2s infinite ease-in-out;
}

@keyframes shakeOrbPulse {
  0% { transform: scale(0.96); border-color: #14b8a6; }
  50% { transform: scale(1.06); border-color: #06b6d4; }
  100% { transform: scale(0.96); border-color: #14b8a6; }
}

.shake-timer-mono {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.shake-status-text {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.5rem auto;
}

.shake-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* TIPP: Relajación de Jacobson */
.jacobson-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition-smooth), background var(--transition-smooth);
}

.jacobson-card.phase-tension {
  border-color: var(--color-warning);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-secondary) 100%);
}

.jacobson-card.phase-relax {
  border-color: var(--color-success);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-secondary) 100%);
}

.jacobson-card.phase-done {
  border-color: var(--color-primary);
}

.jacobson-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.step-badge {
  background: rgba(20, 184, 166, 0.15);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.jacobson-timer-badge {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.phase-tension .jacobson-timer-badge {
  color: var(--color-warning);
  border-color: var(--color-warning);
}

.phase-relax .jacobson-timer-badge {
  color: var(--color-success);
  border-color: var(--color-success);
}

.jacobson-step-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
}

.jacobson-step-instructions {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.jacobson-progress-dots {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.jacobson-progress-dots .dot {
  flex: 1;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
}

.jacobson-progress-dots .dot.completed {
  background: var(--color-success);
}

.jacobson-progress-dots .dot.active {
  background: var(--color-primary);
}

.jacobson-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================
   ESTILOS: DIARIO ABCDE DE PENSAMIENTOS
   ========================================== */

.abcde-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

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

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

.label-letter {
  background: rgba(20, 184, 166, 0.15);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.8rem;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  box-sizing: border-box;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.abcde-history-wrap {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.abcde-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.abcde-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.abcde-entry-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.abcde-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.abcde-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.abcde-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.abcde-box-distorted {
  background: var(--color-danger-bg);
  border-left: 3px solid var(--color-danger);
  padding: 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.abcde-label-danger {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-danger);
  display: block;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.abcde-box-rational {
  background: var(--color-success-bg);
  border-left: 3px solid var(--color-success);
  padding: 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.abcde-label-success {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-success);
  display: block;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.abcde-details-toggle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.abcde-details-toggle summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--color-primary);
}

.abcde-hidden-body {
  margin-top: 0.75rem;
  padding: 0.85rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ==========================================
   ESTILOS: HÁBITOS DE DESCOMPRESIÓN DIARIA
   ========================================== */

.habits-progress-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.habits-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.habits-progress-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.habits-progress-percent {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.habits-progress-track {
  height: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.habits-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #10b981);
  width: 0%;
  transition: width 0.3s ease;
}

.habits-status-feedback {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.habits-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.habit-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.habit-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.habit-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(20, 184, 166, 0.15);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.habit-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.habit-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 1rem 0;
  flex-grow: 1;
}

.habit-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  min-height: 40px;
  box-sizing: border-box;
  transition: border-color var(--transition-fast);
}

.habit-checkbox-label:hover {
  border-color: var(--color-primary);
}

.habit-check-input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.habit-check-text {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Botones estándar */
.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.25rem;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

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

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.25rem;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

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

.btn-text-danger {
  background: none;
  border: none;
  color: var(--color-danger);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.btn-text-danger:hover {
  text-decoration: underline;
}

.empty-hint {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-style: italic;
  margin: 0;
  padding: 1rem 0;
}

/* ==========================================
   MODAL DE CONFIRMACIÓN NATIVO ACCESIBLE
   ========================================== */

.stress-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1rem;
}

.stress-modal-backdrop.visible {
  display: flex;
}

.stress-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.stress-modal-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
}

.stress-modal-msg {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 1.5rem 0;
}

.stress-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================
   GUÍA TÉCNICA SEO Y FAQ
   ========================================== */

.seo-guide-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.seo-guide-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--text-main);
}

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

.seo-accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.seo-accordion-header {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.seo-accordion-header::-webkit-details-marker {
  display: none;
}

.seo-accordion-content {
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.seo-accordion-content p {
  margin: 0 0 0.75rem 0;
}

.seo-accordion-content p:last-child {
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .tool-with-sidebar {
    display: block;
  }

  .tool-main-content {
    width: 100%;
  }

  .hero-calm-box {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-rescue-quick,
  .btn-toggle-sound {
    width: 100%;
    justify-content: center;
  }

  .pss-actions-bar button,
  .grounding-actions-final button,
  .jacobson-actions button {
    width: 100%;
    justify-content: center;
  }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
