/* Edhual · base compartida del diseño nuevo (tokens, fondo líquido, vidrio, controles).
   Tema oscuro por defecto; [data-theme="light"] lo alterna. Ver web/DISENO.md.
   EXCEPCIONES DE IDENTIDAD (transitions-polish no las acorta):
   nubes 48/60/72/84 s, flujo líquido 24–36 s, respiración 6–10 s (escala 1–1.15).
   Son fondo ambiental. Solo se anima transform y opacity; el filtro gooey es estático. */

:root {
  color-scheme: dark;
  --fondo: #181c20; --texto: #f1f3f3; --tenue: #bac4ca;
  --solve: #2d4a6b; --personal: #315e55;
  --solve-texto: #9bb8e0; --personal-texto: #7fc5ac;
  --superficie: #272e34; --vidrio: rgba(33, 39, 45, .72);
  /* Dos capas (DISENO.md): material = contenido, ahumado y sin brillo; capa = Liquid Glass de lo que flota */
  --material: rgba(27, 33, 39, .84); --borde-material: rgba(200, 218, 229, .09);
  --capa: linear-gradient(180deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .03) 48%, rgba(255, 255, 255, .07) 100%), rgba(22, 28, 34, .36);
  --capa-lateral: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)), rgba(22, 28, 34, .62);
  --capa-borde: rgba(255, 255, 255, .13);
  --capa-brillo: inset 0 1px .5px rgba(255, 255, 255, .5), inset 0 -1px 1px rgba(255, 255, 255, .12), inset 1px 0 1px rgba(255, 255, 255, .08), 0 14px 34px -10px rgba(0, 0, 0, .6);
  --activo: #a9c6ee; --lente: rgba(255, 255, 255, .14); --lente-brillo: inset 0 1px .5px rgba(255, 255, 255, .35);
  --campo: rgba(16, 20, 24, .5); --campo-hover: rgba(16, 20, 24, .7);
  --borde: rgba(200, 218, 229, .2); --borde-fuerte: rgba(200, 218, 229, .34);
  --luz: rgba(239, 246, 249, .1);
  --control: rgba(37, 44, 50, .66); --control-hover: #354149;
  --foco: #9bb8e0; --boton: #35577b; --boton-hover: #3f6690; --texto-boton: #f2f5f8;
  --alerta: #f0aaa7; --sombra: rgba(5, 10, 15, .4);
  --liquido-navy: #b2bdc8; --liquido-teal: #a8c0b7; --liquido-opacidad: .4;
  --intensidad-nubes: .975;
  --nube-navy: rgba(45, 74, 107, .55); --nube-teal: rgba(49, 94, 85, .5);
  --nube-mid: rgba(37, 43, 49, .9); --nube-sheen: rgba(96, 117, 140, .14);

  --letra-titulo: "Manrope", system-ui, sans-serif;
  --letra: "DM Sans", system-ui, sans-serif;
  --letra-display: "Fraunces", Georgia, serif;   /* títulos grandes (saludo) */

  /* Escala de transitions-dev */
  --duration-quick: 150ms; --duration-fast: 250ms; --duration-slow: 400ms; --duration-very-slow: 500ms;
  --ease-smooth-out: cubic-bezier(.22, 1, .36, 1); --ease-in-out: ease-in-out;
}
:root[data-theme="light"] {
  color-scheme: light;
  --fondo: #e9edeb; --texto: #233039; --tenue: #4d5d66;
  --solve-texto: #2d4a6b; --personal-texto: #285f49;
  --superficie: #f5f7f5; --vidrio: rgba(245, 247, 245, .78);
  --material: rgba(245, 247, 245, .86); --borde-material: rgba(82, 107, 117, .14);
  --capa: linear-gradient(180deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, .25) 48%, rgba(255, 255, 255, .4) 100%), rgba(245, 247, 245, .5);
  --capa-lateral: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .35)), rgba(245, 247, 245, .72);
  --capa-borde: rgba(255, 255, 255, .7);
  --capa-brillo: inset 0 1px .5px rgba(255, 255, 255, .95), 0 14px 34px -12px rgba(35, 56, 66, .18);
  --activo: #2d4a6b; --lente: rgba(255, 255, 255, .75); --lente-brillo: inset 0 1px .5px #fff, 0 2px 8px -4px rgba(35, 56, 66, .2);
  --campo: rgba(255, 255, 255, .62); --campo-hover: rgba(255, 255, 255, .9);
  --borde: rgba(82, 107, 117, .26); --borde-fuerte: rgba(82, 107, 117, .44);
  --luz: rgba(255, 255, 255, .85);
  --control: rgba(245, 247, 245, .7); --control-hover: #dce4e1;
  --foco: #2d4a6b; --boton: #2d4a6b; --boton-hover: #233c58; --texto-boton: #f6f8fa;
  --alerta: #a23b36; --sombra: rgba(35, 56, 66, .12);
  --liquido-opacidad: .24; --intensidad-nubes: .75;
  --nube-navy: rgba(45, 74, 107, .15); --nube-teal: rgba(49, 94, 85, .14);
  --nube-mid: rgba(146, 164, 161, .15); --nube-sheen: rgba(157, 179, 191, .2);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--fondo); scrollbar-color: var(--borde-fuerte) var(--fondo); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100svh; color: var(--texto); font: 400 16px/1.5 var(--letra); -webkit-font-smoothing: antialiased; }
::selection { background: var(--solve-texto); color: var(--fondo); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.icono { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Fondo: nubes + formas líquidas ---------- */
.fondo { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; } /* html pinta el color; body queda transparente para que el fondo se vea */
.nube { position: absolute; border-radius: 50%; opacity: var(--intensidad-nubes); filter: blur(48px); animation: var(--nombre) var(--dur) var(--ease-in-out) infinite; }
.nube-navy { --nombre: deriva-a; --dur: 48s; width: 70%; height: 60%; left: -22%; top: -18%; background: radial-gradient(closest-side, var(--nube-navy), transparent); }
.nube-teal { --nombre: deriva-b; --dur: 60s; width: 72%; height: 62%; right: -26%; bottom: -22%; background: radial-gradient(closest-side, var(--nube-teal), transparent); }
.nube-mid { --nombre: deriva-c; --dur: 72s; width: 80%; height: 50%; left: 30%; top: 62%; background: radial-gradient(closest-side, var(--nube-mid), transparent); }
.nube-sheen { --nombre: deriva-d; --dur: 84s; width: 45%; height: 35%; right: -8%; top: -10%; filter: blur(40px); background: radial-gradient(closest-side, var(--nube-sheen), transparent); }
/* El campo se centra donde la página lo pida (--campo-x/--campo-y); por omisión, al centro. */
.liquido { position: absolute; left: var(--campo-x, 50%); top: var(--campo-y, 50%); width: min(1080px, 165vw); aspect-ratio: 3 / 2; translate: -50% -50%; opacity: var(--liquido-opacidad); transition: opacity 900ms var(--ease-smooth-out); }
.liquido svg { width: 100%; height: 100%; overflow: visible; }
.liquido .materia { filter: url(#gooey); }
.gota-mueve { animation: flujo var(--flujo, 28s) var(--ease-in-out) infinite; animation-delay: var(--flujo-retraso, 0s); }
.gota { transform-box: fill-box; transform-origin: center; animation: respira var(--respira, 8s) var(--ease-in-out) infinite; animation-delay: var(--respira-retraso, 0s); }
@keyframes deriva-a { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(12%, 8%) scale(1.08); } 66% { transform: translate(4%, 12%) scale(.96); } }
@keyframes deriva-b { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(-12%, -6%) scale(1.06); } 66% { transform: translate(-4%, -9.6%) scale(.97); } }
@keyframes deriva-c { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-24%, -10%); } }
@keyframes deriva-d { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-18%, 14%) scale(1.1); } }
@keyframes flujo { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(var(--mx), var(--my)); } }
@keyframes respira { 0%, 100% { transform: scale(1); opacity: .84; } 50% { transform: scale(1.15); opacity: 1; } }
html[data-movimiento="pausa"] .fondo * { animation-play-state: paused !important; } /* solo con la pestaña oculta */
@media (max-width: 767px) { .liquido { display: none; } .nube { filter: blur(32px); } }   /* sin gooey, las gotas se veían como burbujas grises */
/* PC e iPad: el mismo fondo, más grande y más tenue, para que se sienta luz y no manchas (letra 5A, 14 nov) */
@media (min-width: 768px) {
  .nube { opacity: calc(var(--intensidad-nubes) * .7); filter: blur(72px); }
  .nube-sheen { filter: blur(60px); }
  .liquido { width: min(1700px, 165vw); opacity: calc(var(--liquido-opacidad) * .3); }
}

/* ---------- Vidrio en dos capas: .vidrio solo en lo que flota (barras, botones, Pregúntale); .material en el contenido ---------- */
.vidrio { background: var(--superficie); border: 1px solid var(--borde); box-shadow: inset 0 1px 0 var(--luz), 0 24px 60px -12px var(--sombra); }
.material { background: var(--superficie); border: 1px solid var(--borde-material); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .vidrio { background: var(--capa); border-color: var(--capa-borde); box-shadow: var(--capa-brillo); -webkit-backdrop-filter: blur(14px) saturate(1.8) brightness(1.08); backdrop-filter: blur(14px) saturate(1.8) brightness(1.08); }
  /* Barras laterales con texto: el mismo vidrio, más opaco (como las de Apple) */
  .vidrio.lateral { background: var(--capa-lateral); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); }
  @media (min-width: 768px) { .riel.vidrio { background: var(--capa-lateral); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); } }
  .material { background: var(--material); -webkit-backdrop-filter: blur(30px) saturate(1.1); backdrop-filter: blur(30px) saturate(1.1); }
  /* Inicio: vidrio solo mientras se toca o se enfoca la tarjeta. */
  .centro :is(.bloque, .lo-de-hoy):is(:active, :focus-visible) { background: var(--capa); border-color: var(--capa-borde); box-shadow: var(--capa-brillo); -webkit-backdrop-filter: blur(14px) saturate(1.8) brightness(1.08); backdrop-filter: blur(14px) saturate(1.8) brightness(1.08); }
}

/* ---------- Cápsula de arriba: Avisos y la R juntos (la arma assets/app.js) ---------- */
.capsula { position: relative; z-index: 6; display: flex; align-items: center; height: 44px; padding: 0 2px; border-radius: 22px; }
.campana { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 22px; color: var(--texto); }
.campana[aria-current="page"] { color: var(--activo); }
.campana-punto { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 4px; background: var(--alerta); }
.capsula .raya { width: 1px; height: 20px; background: color-mix(in srgb, var(--texto) 18%, transparent); }

/* ---------- Botón de tema: un ícono que alterna claro/oscuro (abajo a la izquierda) ---------- */
.boton-tema { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; color: var(--tenue); box-shadow: inset 0 1px 0 var(--luz), 0 4px 14px -6px var(--sombra); transition: color var(--duration-fast) var(--ease-smooth-out); }
.boton-tema:hover { color: var(--texto); }
.boton-tema .icono { animation: tema-entra var(--duration-fast) var(--ease-smooth-out); }
[data-tema] .icono-luna, :root[data-theme="light"] [data-tema] .icono-sol { display: none; }
:root[data-theme="light"] [data-tema] .icono-luna { display: block; }
@keyframes tema-entra { from { opacity: 0; transform: rotate(-30deg) scale(.8); } to { opacity: 1; transform: none; } }

/* ---------- Barra lateral de íconos (riel) · en celular, barra flotante inferior ---------- */
.riel { position: fixed; z-index: 10; left: 20px; top: 20px; bottom: 20px; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; border-radius: 34px; }
/* Orbe de Edhual (logo): esfera de vidrio con magma; el tamaño lo pone cada lugar. Lo pinta assets/orbe.js. */
.orbe { display: block; position: relative; aspect-ratio: 1; flex: none; border-radius: 50%; will-change: transform; }   /* block: un <span class="orbe"> en línea mide 0 y orbe.js lo pintaba en 1×1 px */
.orbe canvas { width: 100%; height: 100%; display: block; border-radius: 50%; }
/* Vidrio encima del magma: canto con sombra suave y reflejo arriba a la izquierda */
.orbe::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 0 12px rgba(0, 0, 0, .55); pointer-events: none; }
.orbe::after { content: ""; position: absolute; top: 6%; left: 8%; width: 24%; height: 12%; border-radius: 50%; background: rgba(255, 255, 255, .1); filter: blur(1px); transform: rotate(-45deg); pointer-events: none; }
:root[data-theme="light"] .orbe::before { border-color: rgba(255, 255, 255, .75); box-shadow: inset 0 0 10px rgba(35, 56, 66, .16); }   /* orbe claro: vidrio perla */
:root[data-theme="light"] .orbe::after { background: rgba(255, 255, 255, .7); }
.riel-marca .orbe { width: 34px; box-shadow: 0 0 10px rgba(69, 125, 224, .25); }
.riel-marca .orbe::before { box-shadow: inset 0 0 5px rgba(0, 0, 0, .55); }
.riel .riel-marca:hover { background: none; }
.riel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.riel ul ul { display: none; }
.riel a, .riel button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--tenue); text-decoration: none; list-style: none; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-smooth-out), color var(--duration-fast) var(--ease-smooth-out); }
.riel a:hover, .riel button:hover { background: var(--control-hover); color: var(--texto); }
.riel a[aria-current="page"] { background: var(--lente); color: var(--activo); box-shadow: var(--lente-brillo); }   /* pestaña activa: una lente de vidrio */
.riel a[aria-current="page"] .icono { fill: currentColor; fill-opacity: .25; }
.riel .salir { color: var(--alerta); }
.riel .salir:hover { color: var(--alerta); }
.riel-pie { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.riel .boton-tema { box-shadow: none; }
/* Etiqueta como globo al pasar o enfocar (el nombre accesible es el texto) */
.riel .etiqueta { position: absolute; left: calc(100% + 14px); top: 50%; padding: 6px 12px; border-radius: 99px; background: var(--superficie); border: 1px solid var(--borde); color: var(--texto); font-size: 13px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-4px, -50%); transition: opacity var(--duration-quick) var(--ease-in-out), transform var(--duration-quick) var(--ease-in-out); }
.riel a:hover .etiqueta, .riel a:focus-visible .etiqueta, .riel button:hover .etiqueta, .riel button:focus-visible .etiqueta { opacity: 1; transform: translate(0, -50%); transition-duration: var(--duration-fast); }
/* Grupos por mundo (DISENO.md → "Diseño macro"): plegado, solo el punto de color; abierto, el punto y el nombre */
.mundo { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--tenue); font: 600 10px/1 var(--letra-titulo); letter-spacing: .12em; text-transform: uppercase; }
.mundo:is(.personal, .solve)::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mundo.personal { color: var(--personal-texto); }
.mundo.solve { color: var(--solve-texto); }
.riel-grupo { display: grid; place-items: center; height: 12px; }
.riel-grupo .mundo { font-size: 0; letter-spacing: 0; }   /* el nombre sigue para el lector de pantalla */
/* Hoja "Lo demás" (celular): la abre la R con lo que no cabe en las 5 pestañas; la misma de la app */
.lo-demas { width: min(420px, calc(100% - 24px)); max-height: calc(100svh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); margin: auto auto max(12px, env(safe-area-inset-bottom)); padding: 0; border-radius: 30px; color: var(--texto); overflow-y: auto; }
.lo-demas::backdrop { background: rgba(5, 10, 15, .45); }
.lo-demas-dentro { display: grid; gap: 2px; padding: 10px 10px 14px; }
.lo-demas-cabeza { display: flex; justify-content: space-between; align-items: center; padding: 0 0 4px 14px; font: 500 17px var(--letra-titulo); }
.lo-demas .cerrar { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--tenue); }
.lo-demas .mundo { padding: 12px 14px 4px; font-size: 11px; }   /* celular: mínimo 11 pt */
.lo-demas .fila { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: none; color: var(--texto); font-size: 15px; text-align: left; text-decoration: none; }
.lo-demas .fila:hover { background: var(--control-hover); }
.lo-demas .fila[aria-current="page"] { background: var(--lente); color: var(--activo); }
.lo-demas .fila.salir { color: var(--alerta); }
/* Franja de arriba: la R (Mi cuenta) a la derecha; con ella, el riel empieza más abajo */
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--texto); text-decoration: none; font-weight: 500; }
@media (min-width: 768px) { .con-arriba .riel { top: 80px; } }
.con-riel .contenido { margin-left: 108px; transition: margin-left var(--duration-slow) var(--ease-smooth-out); }
/* Riel abierto (PC/iPad): muestra el menú completo con nombres y submenús; se recuerda en este navegador */
.riel { transition: width var(--duration-slow) var(--ease-smooth-out); }
.riel-alternar svg { transition: transform var(--duration-slow) var(--ease-smooth-out); }
@media (min-width: 768px) {
  html.riel-abierto .riel { width: 232px; align-items: stretch; padding: 14px 12px; overflow: hidden auto; }
  html.riel-abierto .riel-marca { margin-left: 4px; }
  html.riel-abierto .riel a, html.riel-abierto .riel button { width: 100%; display: flex; justify-content: flex-start; gap: 12px; padding: 0 12px; border-radius: 22px; }
  html.riel-abierto .riel .etiqueta { position: static; opacity: 1; transform: none; padding: 0; border: 0; background: none; color: inherit; font-size: 14px; }
  html.riel-abierto .riel ul ul { display: flex; gap: 2px; margin: 2px 0 4px; }
  html.riel-abierto .riel ul ul a { height: 36px; padding-left: 44px; font-size: 13px; }
  html.riel-abierto .riel-pie { align-items: stretch; }
  html.riel-abierto .riel-grupo { place-items: center start; height: auto; padding: 10px 12px 2px; }
  html.riel-abierto .riel-grupo .mundo { font-size: 10px; letter-spacing: .12em; }
  html.riel-abierto .riel-alternar svg { transform: scaleX(-1); }
  html.riel-abierto .con-riel .contenido { margin-left: 272px; }
}
@media (max-width: 767px) {
  .riel-alternar { display: none !important; }
  .riel { top: auto; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; height: 68px; flex-direction: row; justify-content: space-between; gap: 0; padding: 0 10px; }
  .riel .riel-marca, .riel .secundario, .riel .riel-grupo, .riel-pie { display: none; }
  .riel nav { flex: 1; }
  .riel ul { flex-direction: row; justify-content: space-around; gap: 0; }
  .riel .etiqueta { display: none; }
  .con-riel .contenido { margin-left: 0; padding-bottom: 100px; }
  /* 5 pestañas con nombre (Inicio · Agenda · Fitness · Finanzas · Deportes), como la barra de Apple */
  .riel nav li { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
  .riel nav a { width: 100%; max-width: 76px; height: 54px; border-radius: 27px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
  .riel nav .etiqueta { display: block; position: static; padding: 0; border: 0; background: none; color: inherit; opacity: 1; transform: none; font-size: 11px; font-weight: 500; line-height: 1; letter-spacing: -.01em; white-space: nowrap; }
  /* Franja difuminada bajo el reloj del iPhone: el contenido no choca con la barra de estado */
  body.con-riel::before { content: ""; position: fixed; z-index: 4; top: 0; left: 0; right: 0; height: calc(env(safe-area-inset-top) + 28px); pointer-events: none; background: linear-gradient(180deg, color-mix(in srgb, var(--fondo) 70%, transparent), transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent); mask-image: linear-gradient(180deg, #000 45%, transparent); }
}
@media (max-width: 359px) { .riel { left: 4px; right: 4px; padding: 0 4px; } }

/* La app (iPhone y iPad, en cualquier orientación) navega con su barra nativa: nunca el riel web, a ningún ancho. */
html.app-nativa .riel, html.app-nativa .capsula { display: none !important; }
html.app-nativa .con-riel .contenido {
  margin-left: 0;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
}
@media (min-width: 768px) { html.app-nativa .con-riel .contenido { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); } }
html.app-nativa .con-arriba .arriba { display: none; }
html.app-nativa body.con-riel::before { display: none; }   /* la barra nativa ya difumina bajo el reloj */

/* ---------- Preferencias del dispositivo ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .liquido, body.con-riel::before { display: none; }
  .vidrio, .material { background: var(--superficie) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
@media (prefers-contrast: more) {
  .vidrio, .material { background: var(--superficie) !important; border-color: var(--borde-fuerte) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
/* Quién contestó o a quién va un mensaje ("Para Code") */
.via { display: block; margin-top: 6px; color: var(--tenue); font-size: 12px; }

/* ---------- Piezas comunes de las secciones (DISENO.md → Diseño macro): encabezado, Pide atención y orbe de Pregúntale ----------
   Salen de Finanzas, Deportes y Rumbo. Van con :where() (sin peso) para que cada página pueda ajustarlas en su <style>. */
:root { --pronto: #be8832; }
:root[data-theme="light"] { --pronto: #8a5a00; }   /* 5.0:1 sobre --fondo claro (#b17000 daba 3.4:1) */
.cuenta-fija { position: absolute; z-index: 5; top: 20px; right: 20px; }   /* con peso: le gana a .capsula, que toma esta clase de la R */
@media (max-width: 767px) { .cuenta-fija { top: max(16px, env(safe-area-inset-top)); right: 16px; } }
/* Encabezado: ‹ sección (si es subpágina), mundo, título Fraunces 300 y una línea de estado */
:where(.regresa) { display: inline-flex; align-items: center; min-height: 44px; color: var(--tenue); text-decoration: none; }
:where(.regresa):hover { color: var(--texto); }
:where(.etiqueta-area) { display: inline-flex; align-items: center; gap: 6px; color: var(--personal-texto); font-size: 12px; font-weight: 600; }
:where(.etiqueta-area)::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
:where(.etiqueta-area.solve) { color: var(--solve-texto); }
:where(.cabeza) h1 { margin: 6px 0 0; font: 300 clamp(38px, 4.6vw, 54px)/1.05 var(--letra-display); letter-spacing: -.02em; }
:where(.cabeza) h1 em { font-style: italic; }
:where(.cabeza) .sub { margin: 6px 0 0; color: var(--tenue); font-size: 14px; }
/* Pide atención: chips ámbar con lo que espera algo de Raul; vacío, no se ve (lo llena Edhual.atencion) */
:where(.atencion) { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
:where(.atencion):empty { display: none; }
@media (pointer: coarse) { :where(.atencion) { gap: 8px; } :where(.atencion) > a { display: inline-flex; align-items: center; min-height: 32px; } }   /* chips tocables: 26 → 32 px de alto en pantallas táctiles */
:where(.atencion) > .tarde { color: var(--tarde); border-color: color-mix(in srgb, var(--tarde) 45%, transparent); }   /* --tarde lo pone la página (Finanzas) */
:where(.atencion) > * { font-size: 12.5px; font-weight: 500; line-height: 1.3; text-decoration: none; color: var(--pronto); border: 1px solid color-mix(in srgb, var(--pronto) 45%, transparent); border-radius: 99px; padding: 4px 10px; }
/* Orbe único abajo a la derecha en todas las páginas; abre su panel encima (lo arma assets/app.js, pintarOrbe).
   Tamaños (Raul, 31 oct): chica 460 px × 80 % del alto; grande (⤢) al centro con la página oscurecida; sección /edhual (el orbe del riel).
   En celular: la chica es una hoja de 2/3 y la grande una página completa. Las conversaciones (☰) tapan la charla en la chica y son columna en grande. */
:where(.preg-flota) { position: fixed; z-index: 15; right: 22px; bottom: 22px; display: grid; justify-items: end; gap: 12px; }
:where(.orbe-flota) { width: 60px; height: 60px; border-radius: 50%; padding: 6px; transition: transform var(--duration-fast) var(--ease-smooth-out); }
:where(.orbe-flota):hover { transform: translateY(-2px); }
:where(.orbe-flota) .orbe { width: 100%; }
:where(.preg-flota) .panel { display: none; width: min(460px, calc(100vw - 32px)); height: min(80svh, calc(100svh - 118px)); overflow: hidden; border-radius: 24px; }
:where(.preg-flota.abierto) .panel { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (max-width: 767px) { :where(.preg-flota) { right: 16px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 80px); } :where(.orbe-flota) { width: 52px; height: 52px; } }
:where(.preg-flota.comun) .cuerpo { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; min-width: 0; min-height: 0; padding: 14px 16px 16px; }
:where(.preg-flota.comun) .charla { display: grid; align-content: start; gap: 10px; min-height: 0; overflow: auto; overscroll-behavior: contain; }
:where(.preg-flota.comun) .charla:has(> .vacio) { align-content: center; }
:where(.preg-flota.comun) .vacio { align-self: center; justify-self: center; margin: 0; color: var(--tenue); font: 300 22px/1.3 var(--letra-display); }
:where(.preg-flota.comun) .arriba-orbe { display: flex; align-items: center; gap: 8px; min-width: 0; }
:where(.preg-flota.comun) .orbe-mini { flex: none; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #457de0, #1a336b 30%, #24b091 60%, #7fc5ac 80%, #2d4a6b); }
:where(.preg-flota.comun) .arriba-orbe .nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 300 19px/1.2 var(--letra-display); }
:where(.preg-flota.comun) .arriba-orbe button { flex: none; min-width: 36px; min-height: 36px; padding: 0 14px; border: 1px solid var(--borde); border-radius: 99px; background: none; color: var(--tenue); font: 500 13px/1 var(--letra); }
:where(.preg-flota.comun) .arriba-orbe .ic { padding: 0; font-size: 16px; }
:where(.preg-flota.comun) .arriba-orbe button:hover { color: var(--texto); background: var(--control-hover); }
:where(.preg-flota.comun) .convs { display: none; min-height: 0; overflow: auto; padding: 14px 10px; }
:where(.preg-flota.comun) .convs-titulo { margin: 4px 10px 6px; color: var(--tenue); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
:where(.preg-flota.comun) .lista-conv { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
:where(.preg-flota.comun) .lista-conv .dia { padding: 10px 10px 4px; color: var(--tenue); font-size: 12px; }
:where(.preg-flota.comun) .conv { display: grid; gap: 2px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--texto); text-align: left; font-size: 14px; }
:where(.preg-flota.comun) .conv small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tenue); font-size: 12px; }
:where(.preg-flota.comun) .conv:hover { background: var(--campo-hover); }
:where(.preg-flota.ocupado) .conv:not([aria-current]), :where(.preg-flota.comun) .arriba-orbe button:disabled { opacity: .5; cursor: default; }
:where(.preg-flota.comun) .conv[aria-current] { background: color-mix(in srgb, var(--texto) 9%, transparent); }
:where(.preg-flota.con-lista) .panel { grid-template-rows: auto minmax(0, 1fr); }
:where(.preg-flota.con-lista) .cuerpo { order: -1; grid-template-rows: auto; padding-bottom: 0; }
:where(.preg-flota.con-lista) .cuerpo > :not(.arriba-orbe) { display: none; }
:where(.preg-flota.con-lista) .convs { display: block; }
:where(.orbe-velo) { display: none; }
@media (min-width: 768px) {
  :where(.preg-flota.grande.abierto) .orbe-velo { display: block; position: fixed; inset: 0; background: color-mix(in srgb, var(--fondo) 55%, transparent); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  :where(.preg-flota.grande) .panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(780px, calc(100vw - 48px)); height: min(88svh, 900px); border-radius: 28px; }
  :where(.preg-flota.grande, .preg-flota.seccion) .panel { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  :where(.preg-flota.grande, .preg-flota.seccion) .convs { display: block; border-right: 1px solid var(--borde-material); }
  :where(.preg-flota.grande, .preg-flota.seccion) .cuerpo { order: 0; grid-template-rows: auto minmax(0, 1fr) auto; padding: 16px 22px 18px; }
  :where(.preg-flota.grande, .preg-flota.seccion) .ver-lista { display: none; }
  :where(.preg-flota.grande, .preg-flota.seccion) .cuerpo > .charla { display: grid; }   /* si quedó abierta la lista del celular */
  :where(.preg-flota.grande, .preg-flota.seccion) .cuerpo > .pregunta { display: flex; }
}
@media (max-width: 767px) {
  :where(.preg-flota.abierto) .orbe-velo { display: block; position: fixed; inset: 0; background: rgba(5, 10, 15, .4); }
  :where(.preg-flota.abierto) .orbe-flota { display: none; }
  :where(.preg-flota:not(.seccion)) .panel { position: fixed; left: 0; right: 0; bottom: 0; width: auto; height: 66svh; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  :where(.preg-flota.grande:not(.seccion)) .panel { top: 0; height: auto; border-radius: 0; padding-top: env(safe-area-inset-top); background: var(--fondo); }
  :where(.preg-flota.grande.abierto) .orbe-velo { display: none; }
}
:where(.preg-flota.seccion) { position: static; display: grid; justify-items: stretch; min-height: 0; }   /* sin caja de vidrio (Raul): la sección usa todo el ancho */
:where(.preg-flota.seccion) .panel { width: auto; height: 100%; border-radius: 0; }   /* el chat es la página (Raul, 31 oct) */
:where(.preg-flota.seccion) :is(.charla, .pregunta) { justify-self: center; width: 100%; max-width: 760px; }   /* ancho cómodo de lectura */
:where(.preg-flota.comun) .pensando { display: flex; align-items: center; gap: 5px; padding: 6px 0; }
:where(.preg-flota.comun) .pensando i { width: 7px; height: 7px; border-radius: 50%; background: var(--tenue); animation: punto 1.2s var(--ease-in-out) infinite; }
:where(.preg-flota.comun) .pensando i:nth-child(2) { animation-delay: .15s; } :where(.preg-flota.comun) .pensando i:nth-child(3) { animation-delay: .3s; }
@keyframes punto { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
/* Propuesta (letra 1A): tarjeta dentro de la conversación; Aplicar · Ajustar · No; ya aplicada, chip "✓ Hecho · Ver en …" (letra 2A) */
:where(.preg-flota.comun) .prop { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--borde); border-radius: 18px; background: color-mix(in srgb, var(--superficie) 60%, transparent); }
:where(.preg-flota.comun) .prop.descartada { opacity: .55; }
:where(.preg-flota.comun) .prop .mundo { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--personal-texto); }
:where(.preg-flota.comun) .prop b { font: 600 15px/1.35 var(--letra-titulo); }
:where(.preg-flota.comun) .prop .filas { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
:where(.preg-flota.comun) .prop .filas.antes { grid-template-columns: 1fr auto auto; font-size: 13px; }
:where(.preg-flota.comun) .prop .filas > :not(.n) { color: var(--tenue); }
:where(.preg-flota.comun) .prop .filas .n { text-align: right; }
:where(.preg-flota.comun) .prop .ok { color: var(--personal-texto); } :where(.preg-flota.comun) .prop .mal { color: var(--alerta); }
:where(.preg-flota.comun) .prop .nota { color: var(--tenue); font-size: 13px; }
:where(.preg-flota.comun) .prop .acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
:where(.preg-flota.comun) .prop .acciones button { min-height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: 99px; background: var(--boton); color: var(--texto-boton); font-size: 13.5px; font-weight: 500; }
:where(.preg-flota.comun) .prop .acciones button.suave { border-color: var(--borde); background: none; color: var(--texto); }
:where(.preg-flota.comun) .prop .acciones button:disabled { opacity: .5; cursor: default; }
:where(.preg-flota.comun) .prop .hecho { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 6px 12px; border: 1px solid currentColor; border-radius: 99px; color: var(--personal-texto); font-size: 13px; }
:where(.preg-flota.comun) .prop .hecho.gris { color: var(--tenue); }
:where(.preg-flota.comun) .prop a { color: inherit; }
:where(.preg-flota.comun) .prop .error { flex-basis: 100%; color: var(--alerta); font-size: 13px; }
@media (pointer: coarse) { :where(.preg-flota.comun) .prop .acciones button { min-height: 44px; } }
:where(.preg-flota.comun) .burbuja { padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5; white-space: pre-line; background: color-mix(in srgb, var(--texto) 7%, transparent); }
:where(.preg-flota.comun) .burbuja.tu { justify-self: end; background: color-mix(in srgb, var(--texto) 13%, transparent); }
:where(.preg-flota.comun) .burbuja.error { color: var(--alerta); }
:where(.preg-flota.comun) .pregunta { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 26px; border: 1px solid var(--borde); background: var(--campo); }
:where(.preg-flota.comun) .pregunta:focus-within { border-color: var(--foco); }
:where(.preg-flota.comun) .pregunta input { flex: 1; min-width: 0; height: 36px; border: 0; background: none; outline: none; }
:where(.preg-flota.comun) .pregunta .enviar { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--boton); color: var(--texto-boton); }
:where(.preg-flota.comun) .burbuja .via { margin: 6px 0 0; }
:where(.preg-flota.comun) .pensando .via { margin: 0 0 0 6px; }
/* Encargos a Code (la 2D; mockup "Orbe 2D de Edhual"): franja fija arriba de la conversación (letra 4A), tarjeta con pasos, pregunta con letras
   y final con capturas y revisiones. Ámbar (--pronto) = Code trabajando o esperándote. */
:where(.preg-flota.comun:not(.con-lista)) .cuerpo:has(> .franja:not([hidden])) { grid-template-rows: auto auto minmax(0, 1fr) auto; }
:where(.preg-flota.comun) .franja:not([hidden]) { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--borde); border-radius: 14px; background: var(--campo); color: var(--texto); font-size: 12.5px; text-align: left; }
:where(.preg-flota.comun) .franja:hover { background: var(--campo-hover); }
:where(.preg-flota.comun) .franja .que { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(.preg-flota.comun) .franja .barra { flex: 1 0 30px; }
:where(.preg-flota.comun) .franja .cuanto { flex: none; color: var(--tenue); }
:where(.preg-flota.comun) .pulso { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--pronto); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pronto) 25%, transparent); }
@media (prefers-reduced-motion: no-preference) { :where(.preg-flota.comun) .pulso.pide { animation: pulso 2s var(--ease-in-out) infinite; } }
@keyframes pulso { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--pronto) 0%, transparent); } }
:where(.preg-flota.comun) :is(.franja, .contador) .barra { height: 4px; border-radius: 3px; background: color-mix(in srgb, var(--texto) 9%, transparent); overflow: hidden; }
:where(.preg-flota.comun) :is(.franja, .contador) .barra > span { display: block; height: 100%; background: var(--pronto); }
:where(.preg-flota.comun) .conv small.vivo { color: var(--pronto); }
:where(.preg-flota.comun) .prop .mundo.pide { color: var(--pronto); }
:where(.preg-flota.comun) .contador { display: flex; align-items: center; gap: 8px; color: var(--tenue); font-size: 12.5px; }
:where(.preg-flota.comun) .contador .barra { flex: 1; }
:where(.preg-flota.comun) .pasos { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--tenue); font-size: 13px; }
:where(.preg-flota.comun) .pasos li { display: flex; gap: 8px; align-items: baseline; }
:where(.preg-flota.comun) .pasos li::before { content: "○"; flex: none; width: 14px; text-align: center; }
:where(.preg-flota.comun) .pasos li.ok { color: var(--texto); } :where(.preg-flota.comun) .pasos li.ok::before { content: "✓"; color: var(--personal-texto); }
:where(.preg-flota.comun) .pasos li.ya { color: var(--texto); font-weight: 500; } :where(.preg-flota.comun) .pasos li.ya::before { content: "●"; color: var(--pronto); }
:where(.preg-flota.comun) .letras { display: grid; gap: 6px; }
:where(.preg-flota.comun) .letra { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; min-height: 44px; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 14px; background: var(--campo); color: var(--texto); font-size: 13.5px; text-align: left; }
:where(.preg-flota.comun) .letra:hover { background: var(--campo-hover); }
:where(.preg-flota.comun) .letra:disabled { opacity: .5; cursor: default; }
:where(.preg-flota.comun) .letra > b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--texto) 10%, transparent); font: 600 12.5px/1 var(--letra-titulo); }
:where(.preg-flota.comun) .letra.reco { border-color: color-mix(in srgb, var(--personal-texto) 60%, transparent); }
:where(.preg-flota.comun) .letra.reco > b { background: var(--personal-texto); color: var(--fondo); }
:where(.preg-flota.comun) .reco-tag { color: var(--personal-texto); font-size: 12px; font-weight: 600; }
:where(.preg-flota.comun) .capturas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
:where(.preg-flota.comun) .capturas a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--borde); border-radius: 10px; background: var(--fondo); }
:where(.preg-flota.comun) .capturas img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
:where(.preg-flota.comun) .prop .revision { color: var(--personal-texto); font-size: 12.5px; } :where(.preg-flota.comun) .prop .revision.mal { color: var(--alerta); }
/* Punto ámbar en el orbe cerrado: Code te pregunta o terminó, o Edhual contestó mientras no veías */
:where(.orbe-flota) { position: relative; }
:where(.orbe-flota.con-punto)::after { content: ""; position: absolute; top: 3px; right: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--pronto); box-shadow: 0 0 0 2px var(--fondo); }
html.app-nativa .preg-flota.comun:not(.seccion) { display: none; }   /* en la app (iPhone y iPad) el orbe es nativo (Barra.swift) y hace lo mismo */
/* Espacio al final para que el orbe no tape lo último de la página (Agenda ocupa la pantalla y no se desplaza) */
body.con-riel:has(.orbe-flota) .contenido:not(:has(.agenda)) { padding-bottom: 104px; }
@media (max-width: 767px) { body.con-riel:has(.orbe-flota) .contenido:not(:has(.agenda)) { padding-bottom: calc(164px + env(safe-area-inset-bottom)); } html.app-nativa body.con-riel:has(.preg-flota.comun) .contenido:not(:has(.agenda)) { padding-bottom: calc(env(safe-area-inset-bottom) + 16px); } }
/* Finanzas: "¿solo este o todos?" debajo de un movimiento al cambiar su categoría (Edhual.soloEste en app.js). */
.solo-este { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0 12px; font-size: 13px; }
.solo-este > span { flex: 1 1 100%; color: var(--tenue); }

@media (forced-colors: active) {
  .fondo { display: none; }
  .vidrio, .material { border: 1px solid CanvasText; box-shadow: none; }
}
