/* ==========================================================================
   Calculadora de Fermentación Láctica, Kombucha y Curados Caseros
   Fijate Tools - Estilos Canónicos y Sistema Visual
   ========================================================================== */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta base en tema oscuro (Midnight Slate) */
  --bg-page: #0b0f17;
  --bg-card: #121824;
  --bg-subcard: #192231;
  --bg-input: #1a2332;
  --border-card: #222e42;
  --border-light: #2b3a52;

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

  /* Acentos culinarios refinados */
  --accent-lacto: #10b981;
  --accent-lacto-glow: rgba(16, 185, 129, 0.18);
  --accent-kombucha: #f59e0b;
  --accent-kombucha-glow: rgba(245, 158, 11, 0.18);
  --accent-cure: #f43f5e;
  --accent-cure-glow: rgba(244, 63, 94, 0.18);

  --accent-primary: #38bdf8;
  --accent-primary-hover: #0284c7;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Modo claro sincronizado */
[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subcard: #f1f5f9;
  --bg-input: #ffffff;
  --border-card: #e2e8f0;
  --border-light: #cbd5e1;

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

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

/* Reset y estructura básica */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

h1, h2, h3, h4, h5, h6,
.brand-title,
.pane-heading,
.card-subtitle,
.subpanel-title,
.seo-guide-heading,
.faq-box-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.mono, code, .hero-result-val, .weighing-val, .kpi-mini-val, .merma-stat-val {
  font-family: var(--font-mono);
}

/* Contención canónica */
.main-wrapper.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
}

.tool-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

@media (min-width: 1536px) {
  .tool-with-sidebar {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

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

/* Tarjeta principal */
.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .card-main {
    padding: 2rem;
  }
}

/* Pestañas de navegación superiores */
.tool-tabs-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  background: var(--bg-subcard);
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  margin-bottom: 1.8rem;
}

@media (min-width: 680px) {
  .tool-tabs-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tool-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 9px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.tool-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tool-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-card);
}

.tool-tab-btn .tab-icon {
  font-size: 1.25rem;
}

/* Paneles de contenido */
.tool-tab-pane {
  display: none;
}

.tool-tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-hero-intro {
  margin-bottom: 1.5rem;
}

.pane-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.pane-description {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Barra de recetas y presets rápidos */
.presets-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: var(--bg-subcard);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  overflow-x: auto;
}

.presets-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  white-space: nowrap;
}

.presets-chips-scroll {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.preset-chip-btn {
  white-space: nowrap;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-card);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-lacto);
}

.preset-chip-btn.active {
  background: var(--accent-lacto);
  color: #042f20;
  border-color: var(--accent-lacto);
  font-weight: 700;
}

/* Submodos bar (Kombucha vs Kéfir) */
.submode-selector-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.submode-btn {
  flex: 1;
  min-height: 42px;
  background: var(--bg-subcard);
  color: var(--text-muted);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.submode-btn.active {
  background: var(--accent-kombucha);
  color: #451a03;
  border-color: var(--accent-kombucha);
}

/* Grid dual: Inputs vs Resultados */
.calc-dual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .calc-dual-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.calc-card-inputs,
.calc-card-results {
  background: var(--bg-subcard);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
}

.card-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

/* Formularios y controles canónicos */
.form-group {
  margin-bottom: 1.2rem;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-value-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--accent-primary);
}

.input-with-unit {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.input-with-unit:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.form-input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  height: 42px;
  padding: 0 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  outline: none;
}

.unit-suffix {
  padding: 0 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-subcard);
  border-left: 1px solid var(--border-light);
  height: 42px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Desplegables con estilo canónico anti-overflow */
.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-main);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  appearance: none;
  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");
  background-repeat: no-repeat;
  background-position: right 14px center;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-select:focus {
  border-color: var(--accent-primary);
}

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

.field-hint {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* Sliders de rango táctiles */
.range-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--border-light);
  outline: none;
  margin-top: 0.5rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.1s ease;
}

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

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

.tick-recommended {
  color: var(--accent-lacto);
  font-weight: 700;
}

/* ==========================================================================
   Tarjetas de resultados hero y pesajes
   ========================================================================== */

.hero-result-box {
  padding: 1.25rem;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
}

.hero-lacto {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 78, 59, 0.25));
  border-color: rgba(16, 185, 129, 0.35);
}

.hero-kombucha {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(120, 53, 15, 0.25));
  border-color: rgba(245, 158, 11, 0.35);
}

.hero-curing {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(136, 19, 55, 0.25));
  border-color: rgba(244, 63, 94, 0.35);
}

.hero-result-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.hero-result-val {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
}

.hero-lacto .hero-result-val { color: var(--accent-lacto); }
.hero-kombucha .hero-result-val { color: var(--accent-kombucha); }
.hero-curing .hero-result-val { color: var(--accent-cure); }

.hero-unit {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-result-sub {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

/* Lista de pesajes detallados */
.recipe-weighing-list {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.weighing-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-card);
}

.weighing-item:last-child {
  border-bottom: none;
}

.weighing-item.total-row {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-light);
}

.weighing-info {
  display: flex;
  flex-direction: column;
}

.weighing-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.weighing-sub {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.weighing-val {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Tarjetas de dictamen y avisos de seguridad */
.safety-advisory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.advisory-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-lacto);
}

.advisory-tea .advisory-header { color: var(--accent-kombucha); }
.advisory-meat .advisory-header { color: var(--accent-cure); }

.advisory-title {
  font-size: 0.86rem;
  font-weight: 700;
}

.advisory-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.advisory-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: var(--bg-subcard);
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.kpi-mini {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.kpi-mini-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.kpi-mini-val {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Botones de acción */
.action-buttons-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: auto;
}

@media (min-width: 500px) {
  .action-buttons-row {
    grid-template-columns: 1fr auto;
  }
}

.btn-action-primary,
.btn-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-action-primary {
  background: var(--accent-primary);
  color: #082f49;
  border: none;
}

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

.btn-action-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-card);
}

.btn-action-secondary:hover {
  background: var(--bg-subcard);
  border-color: var(--border-light);
}

/* ==========================================================================
   Subpaneles de curados y medidor de merma
   ========================================================================== */

.curing-dual-section-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.curing-subpanel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1.5rem;
}

.subpanel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-card);
}

.subpanel-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-cure);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.subpanel-badge.badge-merma {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-primary);
  border-color: rgba(56, 189, 248, 0.3);
}

.subpanel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Componente visual de merma y barra de progreso */
.merma-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.merma-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.8rem;
}

.merma-stat-lbl {
  font-size: 0.76rem;
  color: var(--text-dim);
  display: block;
}

.merma-stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1.1;
}

.merma-target-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
}

.merma-bar-track {
  width: 100%;
  height: 12px;
  background: var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.6rem;
  position: relative;
}

.merma-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #38bdf8 0%, #10b981 70%, #f59e0b 100%);
  transition: width 0.3s ease;
}

.merma-progress-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stage-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.stage-fresh { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.stage-early { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.stage-mid { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.stage-optimal { background: rgba(16, 185, 129, 0.25); color: #10b981; }
.stage-dry { background: rgba(244, 63, 94, 0.2); color: #f43f5e; }

.merma-remain-caption {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.merma-grid-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.kpi-merma-cell {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.6rem;
  text-align: center;
}

.kpi-merma-cell.highlight-cell {
  border-color: var(--accent-lacto);
  background: rgba(16, 185, 129, 0.05);
}

.kpi-merma-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  display: block;
}

.kpi-merma-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.highlight-cell .kpi-merma-val {
  color: var(--accent-lacto);
}

.merma-advice-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  font-style: italic;
}

/* ==========================================================================
   Sección SEO didáctica y acordeón FAQ
   ========================================================================== */

.seo-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .seo-guide-section {
    padding: 2.2rem;
  }
}

.seo-guide-heading {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.seo-guide-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.8rem;
  max-width: 850px;
}

.seo-guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 680px) {
  .seo-guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.guide-card {
  background: var(--bg-subcard);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.25rem;
}

.guide-card-icon {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.guide-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.guide-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Acordeón FAQ */
.faq-box-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.faq-accordion-item {
  border: 1px solid var(--border-card);
  border-radius: 10px;
  margin-bottom: 0.65rem;
  background: var(--bg-subcard);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-accordion-item[open] {
  border-color: var(--border-light);
}

.faq-accordion-summary {
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

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

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

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

.faq-accordion-content {
  padding: 0 1.25rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   Modal corporativo accesible (sin alert)
   ========================================================================== */

.app-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.app-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.app-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  max-width: 440px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.app-modal-overlay.active .app-modal-card {
  transform: scale(1);
}

.app-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.app-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

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

.app-modal-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.app-modal-footer {
  display: flex;
  justify-content: flex-end;
}

.btn-modal-action {
  min-height: 40px;
  padding: 0.5rem 1.25rem;
  background: var(--accent-primary);
  color: #082f49;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

/* ==========================================================================
   Modo impresión limpia (@media print)
   ========================================================================== */

@media print {
  .app-header,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .fijate-footer,
  .tool-tabs-nav,
  .presets-bar,
  .submode-selector-bar,
  .action-buttons-row,
  .amazon-affiliate-showcase,
  .seo-guide-section,
  .related-tools-section,
  .range-slider {
    display: none !important;
  }

  body, .main-wrapper.tool-layout, .card-main, .calc-card-inputs, .calc-card-results, .curing-subpanel {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tool-tab-pane {
    display: block !important;
    page-break-after: always;
  }

  .calc-dual-grid {
    display: block !important;
  }

  .recipe-weighing-list, .hero-result-box {
    border: 1px solid #cccccc !important;
  }

  .hero-result-val {
    color: #000000 !important;
  }
}
