/* Cercalma – sistema "Cielo". Calma y confianza: el cielo cambia con la hora del día;
   abajo, una hoja blanca firme donde están las acciones. El rojo es solo para pedir ayuda. */
:root {
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  /* Tinta y superficies */
  --ink: #13263B; --ink-2: #4B5E73; --muted: #5E7086; --line: #DCE5EE;
  --sheet: #FFFFFF; --page: #F3F7FB; --bg: #F3F7FB; --bg-2: #E8F0F8; --card: #FFFFFF;
  /* Acción, cumplido, ayuda */
  --blue: #2563A8; --blue-soft: #E4EEF9; --blue-deep: #1B4C85;
  --done: #2E8A74; --done-soft: #E1F2EC;
  --help: #C93A3A; --help-soft: #FBE6E6;
  --sun: #F5BE48;
  /* Alias para estilos existentes (panel, landing) */
  --brand-900: #13263B; --brand-700: #2563A8; --brand-600: #2D6DB3; --brand-500: #4A86C8; --brand-300: #9BC0E6; --brand-100: #E4EEF9; --brand-50: #F1F6FC;
  --green-600: #2E8A74; --green-100: #E1F2EC; --red-600: #C93A3A; --red-700: #A52F2F;
  --coral-600: #C93A3A; --coral-500: #D45252; --coral-100: #FBE6E6;
  --sky-600: #2563A8; --sky-500: #4A86C8; --sky-100: #E4EEF9;
  --sun-500: #F5BE48; --sun-100: #FFF3D6; --lilac-600: #2563A8; --lilac-100: #E4EEF9;
  --radius: 24px; --radius-sm: 16px;
  --shadow-sm: 0 2px 10px -6px rgba(19, 38, 59, .28);
  --shadow: 0 12px 28px -18px rgba(19, 38, 59, .45);
  --shadow-lg: 0 20px 44px -20px rgba(19, 38, 59, .5);
  --grad-brand: linear-gradient(135deg, #4A86C8, #2563A8);
  --grad-green: linear-gradient(135deg, #3A9A83, #2E8A74);
  --grad-coral: linear-gradient(135deg, #D45252, #C93A3A);
  --grad-red: linear-gradient(135deg, #C93A3A, #A52F2F);
  --grad-sky: linear-gradient(180deg, #8FC1EE, #E4F1FC);
  --grad-lilac: var(--grad-brand); --grad-sun: linear-gradient(135deg, #FFE08A, #F5BE48);
  --grad-bg: none;
}
/* El cielo según la hora (se aplica con data-sky en el contenedor del cielo) */
[data-sky] { --sky-a: #8FC1EE; --sky-b: #E4F1FC; --sky-ink: #13263B; --sky-ink-2: #3F546B; --sky-line: rgba(255,255,255,.95); --sky-chip: rgba(255,255,255,.72); background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 100%); color: var(--sky-ink); }
[data-sky="manana"]   { --sky-a: #A9D2F3; --sky-b: #FBEBD6; }
[data-sky="mediodia"] { --sky-a: #86BCEC; --sky-b: #E3F0FC; }
[data-sky="tarde"]    { --sky-a: #96BCE6; --sky-b: #F7DDBF; --sky-ink-2: #48566A; }
[data-sky="noche"]    { --sky-a: #152846; --sky-b: #34507E; --sky-ink: #F4F7FC; --sky-ink-2: #C4D1E4; --sky-line: rgba(255,255,255,.7); --sky-chip: rgba(255,255,255,.14);
  background: radial-gradient(1.5px 1.5px at 18% 22%, #fff 99%, transparent), radial-gradient(1.2px 1.2px at 72% 14%, #fff 99%, transparent), radial-gradient(1.5px 1.5px at 86% 38%, #fff 99%, transparent), radial-gradient(1px 1px at 40% 9%, #fff 99%, transparent), radial-gradient(1.2px 1.2px at 58% 30%, #fff 99%, transparent), linear-gradient(180deg, var(--sky-a), var(--sky-b)); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--page); line-height: 1.4; -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.ic { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 52px; background: rgba(255,255,255,.22); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--bg-2); color: var(--ink-2); }
.pill.ok { background: var(--done-soft); color: var(--done); }
.pill.warn { background: var(--sun-100); color: #75520A; }
.pill.bad { background: var(--help-soft); color: var(--help); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.toast { position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 18px; font-size: 1rem; font-weight: 600; box-shadow: var(--shadow-lg); max-width: 92vw; text-align: center; z-index: 100; }

/* Arco del día (sky.js) */
.sky-arc { display: block; width: 100%; height: auto; overflow: visible; }
.sky-arc .hz { stroke: var(--sky-ink-2); stroke-width: 1; opacity: .22; }
.sky-arc .rest { stroke: var(--sky-line); stroke-width: 3; fill: none; stroke-dasharray: 1 10; stroke-linecap: round; }
.sky-arc .past { stroke: var(--sky-line); stroke-width: 6; fill: none; stroke-linecap: round; }
.sky-arc .glow2 { fill: var(--sun); opacity: .14; }
.sky-arc .glow { fill: var(--sun); opacity: .3; }
.sky-arc .sun { fill: var(--sun); }
.sky-arc .moon { fill: #F6F1DE; }
.sky-arc .mk circle { fill: #fff; stroke: var(--sky-ink-2); stroke-width: 2.5; }
.sky-arc .mk.later circle { stroke-opacity: .55; }
.sky-arc .mk.due circle { stroke: var(--blue); stroke-width: 5; }
.sky-arc .mk.ok circle { fill: var(--done); stroke: #fff; stroke-width: 2.5; }
.sky-arc .mk.no circle { fill: var(--help); stroke: #fff; stroke-width: 2.5; }
.sky-arc .tick { stroke: #fff; stroke-width: 2.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sky-arc text { font: 700 14px var(--font); fill: var(--sky-ink-2); font-variant-numeric: tabular-nums; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade { animation: fadeUp .3s ease both; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
