.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px); z-index: 200;
  display: flex; align-items: flex-end;
  justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-sheet {
  width: 100%; max-width: 430px; margin: 0 auto;
  background: var(--bg2); border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border2);
  padding: 12px 16px env(safe-area-inset-bottom, 24px);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
  height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
[data-theme="light"] .modal-sheet { background: var(--bg2); }

.modal-sheet-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.modal-handle { width: 36px; height: 4px; background: var(--border2); border-radius: 2px; margin: 0 auto 16px; flex-shrink: 0; }
.modal-title { font-size: 1.133rem; font-weight: 600; margin-bottom: 18px; letter-spacing: -0.01em; }

.campo-requerido { color: var(--accent); }

.manual-section-title {
  font-family: var(--mono);
  font-size: 0.667rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.manual-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.manual-section-title .toggle-icon { font-size: 0.733rem; color: var(--text3); transition: transform 0.2s; flex-shrink: 0; }
.manual-section-title.open .toggle-icon { transform: rotate(180deg); }

.manual-micros-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.manual-micros-grid .field { margin-bottom: 0; }
.manual-micros-grid label.field-label { font-size: 0.733rem; }

.manual-tipo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.tdee-result { background: var(--bg3); border-radius: 12px; padding: 16px; margin-top: 16px; display: none; }
.tdee-result.show { display: block; animation: fadeIn 0.3s ease; }
.tdee-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.tdee-row:last-child { border-bottom: none; }
.tdee-key { font-size: 0.933rem; color: var(--text2); }
.tdee-val { font-family: var(--mono); font-size: 1rem; font-weight: 500; }
.tdee-val.big { font-size: 1.467rem; color: var(--accent); }