/* Tema compartido para los prototipos que originalmente eran solo Noche.
   Inicio y Comunicaciones conservan sus temas existentes. */
html[data-shalom-theme="cream"] { color-scheme: light; }
[data-shalom-theme="cream"] body[data-shalom-space="cafe"],
body.theme-cream[data-shalom-space="cafe"] {
  --bg:#faf7f2;--card:#fff;--card2:#f2ece3;--border:#e6ddd0;--border2:#cfc4b4;
  --ink:#2d2d2d;--sub:#4a4a4a;--muted:#6b655d;--accent:#c8956c;
  --accent-ink:#1a1a1a;--soft:#f5ebe1;--good:#24483e;--warn:#82552f;
  color-scheme:light;
}
body.theme-cream[data-shalom-space="cafe"] :is(.sidebar,.mobile-nav) {
  background:#faf7f2;color:#2d2d2d;border-color:#cfc4b4;
}
body.theme-cream[data-shalom-space="cafe"] :is(.mobile-nav button,.nav button,.sidebar-foot,.brand small) { color:#4a4a4a; }
body.theme-cream[data-shalom-space="cafe"] :is(.mobile-nav button.on,.nav button.active) {
  background:#e6ddd0;color:#5e3d24;border-color:#c8956c;
}
body.theme-cream[data-shalom-space="cafe"] :is(.input,.field select,.modal,.tracking-ticket) {
  background:#fff;color:#2d2d2d;border-color:#cfc4b4;
}
body.theme-cream[data-shalom-space="cafe"] :is(.note,.check-option:has(input:checked)) {
  background:#f5ebe1;color:#4a4a4a;border-color:#c8956c;
}
body.theme-cream[data-shalom-space="cafe"] :is(.eyebrow,.quiet,.external-link,.product .pprice,.price,.link-btn) { color:#82552f; }
body.theme-cream[data-shalom-space="cafe"] .toast { background:#2e2e2e; color:#fff; }
body.theme-cream[data-shalom-space="cafe"] :is(.product .symbol,.ticket .item-num,.badge,.tiny-pill) { color:#5e3d24; }
body.theme-cream[data-shalom-space="cafe"] .product .symbol { background:#e6ddd0;border-color:#cfc4b4; }
body.theme-cream[data-shalom-space="cafe"] :is(.status.pendiente,.status.preparando) {
  background:#f5ebe1;color:#5e3d24;border-color:#d9ad86;
}
body.theme-cream[data-shalom-space="cafe"] .status.listo {
  background:#e4f0e7;color:#24483e;border-color:#4e8069;
}
body.theme-cream[data-shalom-space="cafe"] .status.cancelado {
  background:#f5ebe1;color:#5e3d24;border-color:#cfc4b4;
}
body.theme-cream[data-shalom-space="cafe"] .step.done .dot:after { color:#1a1a1a; }
body.theme-cream[data-shalom-space="cafe"] .tracking-ticket .timeline { color:#2d2d2d; }
body.theme-cream[data-shalom-space="cafe"] .client-total { color:#82552f; }
body.theme-cream[data-shalom-space="cafe"] .input::placeholder { color:#6b655d; }
body.theme-cream[data-shalom-space="cafe"] .modal .check-option { border-color:#cfc4b4; }
body.theme-cream[data-shalom-space="cafe"] .btn { color:#1a1a1a; }
body.theme-cream[data-shalom-space="cafe"] .outline { color:#2d2d2d; }
body.theme-cream[data-shalom-space="cafe"] .action { color:#82552f; }

/* Kids claro: fondo blanco, neutros de palette2026.kids y acentos fuego/oro del manual Kids.
   Es el tema con el que abre Kids; Noche queda disponible desde el botón del encabezado. */
body.theme-cream[data-shalom-space="kids"] {
  --ink:#1f2937;--muted:#4b5563;--line:#e5e7eb;--copper:#b84810;
  background:#fff;color:#1f2937;color-scheme:light;
}
body.theme-cream[data-shalom-space="kids"] header {
  background:#fff;color:#1f2937;border-color:#e5e7eb;
}
body.theme-cream[data-shalom-space="kids"] header>strong {
  background-image:url('../assets/shalom-logo-negro.png');
}
body.theme-cream[data-shalom-space="kids"] :is(header nav a,header>.muted,a,.muted) { color:#4b5563; }
body.theme-cream[data-shalom-space="kids"] header nav a:hover {
  background:#fff0e7;
}
body.theme-cream[data-shalom-space="kids"] header nav a[aria-current="page"],
body.theme-cream[data-shalom-space="kids"] header nav a[aria-current="page"]:hover { background:#b84810; color:#fff; }
body.theme-cream[data-shalom-space="kids"] :is(.stat,.card,.notice,.quick-action,.teacher-card,.menu-day,.preparation,.teacher-portrait,.scripture-actions .button) {
  background:#fff;color:#1f2937;border-color:#e5e7eb;
}
body.theme-cream[data-shalom-space="kids"] :is(.hero,.daily-scripture,.soft-banner,.teacher-next,.booking-note) {
  background:#fff0e7;color:#4b5563;border-color:#ffd8c2;
}
body.theme-cream[data-shalom-space="kids"] :is(.icon-box,.sand,.amber,.lilac,.badge,.menu-date,.hero small) {
  background:#fbf4e1;color:#5b430f;border-color:#f1deaa;
}
body.theme-cream[data-shalom-space="kids"] :is(.hero-label,.hero p,.hero small,.hero-art svg,.soft-banner p,.teacher-next p,.teacher-next li span,.teacher-next small,.preparation p,.daily-scripture #daily-content p,.daily-scripture small,.daily-verse-art figcaption,.form-status) {
  color:#4b5563 !important;
}
body.theme-cream[data-shalom-space="kids"] :is(.action,.button) { color:#8f360c;border-color:#ffd8c2; }
body.theme-cream[data-shalom-space="kids"] :is(select,.module-view input:not([type="checkbox"]),.module-view textarea,dialog) {
  background:#fff;color:#1f2937;border-color:#d1d5db;
}
body.theme-cream[data-shalom-space="kids"] .hero-art::after { background:#fff0e7; }
body.theme-cream[data-shalom-space="kids"] :is(.care-request-card .button[aria-pressed="true"],.action:hover,.button:hover) {
  background:#fff0e7;color:#8f360c;
}
body.theme-cream[data-shalom-space="kids"] :is(.planning-line,.teacher-next li,.teacher-bio) { border-color:#e5e7eb; }
body.theme-cream[data-shalom-space="kids"] .scripture-actions .button:hover { background:#fff0e7; }
body.theme-cream[data-shalom-space="kids"] .meeting-preview-content { color:#1f2937; }
body.theme-cream[data-shalom-space="kids"] .topline { color:#4b5563; }

/* Botones accesibles, sin necesidad de un submenu para volver a cambiarlo. */
body[data-shalom-space] .shalom-theme-control {
  display:inline-flex;justify-content:center;align-items:center;gap:8px;
  font:600 .9375rem/1.3 Inter,Arial,sans-serif;min-height:48px;
  padding:10px 14px;border-radius:16px;text-decoration:none;white-space:normal;
  cursor:pointer;
}
body[data-shalom-space="kids"] .shalom-theme-control {
  border:1px solid #c8956c;background:#2a221c;color:#f0d5bd;
}
body.theme-cream[data-shalom-space="kids"] .shalom-theme-control {
  border-color:#c8956c;background:#fff;color:#5e3d24;
}
body[data-shalom-space="cafe"] .shalom-theme-control { min-height:48px; }
body[data-shalom-space] .shalom-theme-control:focus-visible { outline:2px solid #c8956c;outline-offset:2px; }
@media(max-width:920px){
  body[data-shalom-space="kids"] header nav .shalom-theme-control {
    flex:0 0 auto;padding:10px 14px;min-height:48px;font-size:.875rem;
  }
}
@media(prefers-reduced-motion:reduce) {
  body[data-shalom-space] .shalom-theme-control { transition:none; }
}

/* El formulario de opinion comparte Noche/Crema y conserva el mismo contraste.
   Solo se guarda la preferencia del tema, nunca opiniones ni consentimientos. */
body[data-shalom-space="feedback"] .shalom-feedback-heading {
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;
}
body[data-shalom-space="feedback"] .shalom-feedback-eyebrow { font-size:.875rem; font-weight:700; letter-spacing:.07em; margin:24px 0 10px; }
body[data-shalom-space="feedback"] .shalom-theme-control {
  display:inline-flex;align-items:center;justify-content:center;min-height:48px;
  font:600 .9375rem/1.3 Inter,Arial,sans-serif; margin:0; border-radius:16px;
  border:1px solid #c8956c; padding:10px 16px; background:#fff; color:#5e3d24;
}
body[data-shalom-space="feedback"] .shalom-feedback-skip {
  position:absolute;left:12px;top:-100px;z-index:50;padding:12px;background:#fff;color:#5e3d24;
}
body[data-shalom-space="feedback"] .shalom-feedback-skip:focus { top:12px; }
body.theme-night[data-shalom-space="feedback"] {
  background:#1a1a1a;color:#f0f0f0;color-scheme:dark;
}
body.theme-night[data-shalom-space="feedback"] :is(section,article,fieldset) {
  background:#222222;color:#f0f0f0;border-color:#4f4a44;
}
body.theme-night[data-shalom-space="feedback"] :is(input:not([type="checkbox"]),select,textarea) {
  background:#1a1a1a;color:#f0f0f0;border-color:#4a4a4a;
}
body.theme-night[data-shalom-space="feedback"] :is(.notice,.badge) {
  background:#2d2d2d;color:#ecd6c3;border-color:#82552f;
}
body.theme-night[data-shalom-space="feedback"] :is(.muted,small) {color:#cfc4b4;}
body.theme-night[data-shalom-space="feedback"] a {color:#d9ad86;}
body.theme-night[data-shalom-space="feedback"] :is(button,.action) {
  background:#c8956c;color:#1a1a1a;border-color:#c8956c;
}
body.theme-night[data-shalom-space="feedback"] button.secondary,
body.theme-night[data-shalom-space="feedback"] .shalom-theme-control {
  background:#2a221c;color:#f0d5bd;border-color:#4a4a4a;
}
body.theme-night[data-shalom-space="feedback"] .error { color:#f0d5bd; }
body.theme-night[data-shalom-space="feedback"] .shalom-feedback-skip {background:#2a221c;color:#f0f0f0;}

/* Revisión de demo: textos que conservaban colores de Noche sobre fondos claros (contraste ≥4.5:1). */
body.theme-cream[data-shalom-space="cafe"] .chip.on { color:#5e3d24; border-color:#c8956c; }
body.theme-cream[data-shalom-space="cafe"] .timer.warn { color:#82552f; }
body.theme-cream[data-shalom-space="kids"] :is(.sidebar-bottom,.prep-count>span,.material-counts>div) { color:#4b5563; }
body.theme-cream[data-shalom-space="kids"] .skip-link { background:#fff; color:#1f2937; border:1px solid #b84810; }
