/* Estilos base de la aplicación: tokens, reinicio y componentes compartidos (.btn, .chip).
   Propietario: MOTOR-SERVIDOR (núcleo web). Los módulos usan estos tokens; no redefinir :root en módulos. */
:root {
  --bg: #f4f3ef; --surface: #ffffff; --surface-2: #f7f6f3; --line: #e3e1db; --text: #1f2328; --muted: #6b7079;
  --accent: #2563eb; --accent-ink: #ffffff; --ok: #2f9e62; --warn: #e8890c; --bad: #d64545;
  --radius: 14px; --shadow: 0 6px 24px rgba(20, 24, 31, 0.10), 0 1px 3px rgba(20, 24, 31, 0.08);
  --sheet-h: 78px; --tap: 48px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font: 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

/* Botones (compartidos por todos los módulos) */
.btn { min-height: var(--tap); padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn.big { min-height: 56px; padding: 0 22px; font-size: 16px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.warn { background: var(--warn); color: #fff; border-color: var(--warn); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.icon { width: var(--tap); padding: 0; justify-content: center; }
.btn.wide { width: 100%; justify-content: center; }
.btn:disabled { opacity: .45; cursor: default; }

/* Chips (compartidos) */
.chip { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 14px; color: #3a3f47; }
.chip.on { background: #1f2328; color: #fff; border-color: #1f2328; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; padding-bottom: 6px; }
.chips::-webkit-scrollbar { display: none; }

/* Menú de módulos (22-11-2026, nucleo/modulos-app.js): «Catálogo» · «Estudio de espacios», en la cabecera del catálogo y
   en la barra del Estudio. El módulo actual va marcado (aria-current). Botones de 48 px. */
.cv-modulos { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.cv-modulo { min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 650; font-size: 15px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.cv-modulo:hover { color: var(--text); }
.cv-modulo:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 1px; }
.cv-modulo[aria-current="page"] { background: #1f2328; color: #fff; }
.cv-modulo svg { flex: none; }
.cv-modulo-corto { display: none; }
