/* Genie — diseño tal cual el shot "Genie Chatbot" (RonDesignLab, Dribbble 25245363):
   Outfit, lavanda #DAD4E2, salvia #C3DCA8, azul #2684FC, vidrio esmerilado claro. */

@font-face {
  font-family: 'Outfit';
  src: url('/fonts/outfit.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  src: url('/fonts/outfit-ext.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --tinta: #151417;
  --tinta-2: #4a474f;
  --gris: #8c8892;
  --gris-2: #b3afb8;
  --linea: rgba(21, 20, 23, 0.07);
  --fondo: #f2f0f5;
  --fondo-2: #f7f5f8;
  --lavanda: #dad4e2;
  --salvia: #c3dca8;
  --salvia-2: #dcead0;
  --salvia-3: #e8f1df;
  --azul: #2684fc;
  --azul-2: #5aa2ff;
  --rojo: #ef4a3c;
  --naranja: #ff8a3d;
  --vidrio: rgba(226, 222, 232, 0.58);
  --vidrio-fuerte: rgba(222, 218, 229, 0.78);
  --blanco-v: rgba(255, 255, 255, 0.72);
  --blanco-v2: rgba(255, 255, 255, 0.88);
  --borde-v: rgba(255, 255, 255, 0.65);
  --sombra-s: 0 1px 2px rgba(30, 20, 50, 0.04), 0 2px 8px rgba(30, 20, 50, 0.04);
  --sombra-m: 0 2px 6px rgba(30, 20, 50, 0.05), 0 12px 32px rgba(30, 20, 50, 0.08);
  --sombra-l: 0 10px 30px rgba(30, 20, 50, 0.10), 0 30px 80px rgba(30, 20, 50, 0.12);
  --r-xl: 32px;
  --r-l: 26px;
  --r-m: 20px;
  --r-s: 14px;
  --circulo: 46px;
  --resorte: cubic-bezier(0.34, 1.36, 0.64, 1);
  --suave: cubic-bezier(0.22, 1, 0.36, 1);
  --salida: cubic-bezier(0.55, 0, 0.75, 0.2);
  --seg-arriba: env(safe-area-inset-top, 0px);
  --seg-abajo: env(safe-area-inset-bottom, 0px);
  --ancho: min(100vw, 480px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
/* nada de zoom con doble toque; la página no "rebota" ni se corre */
html { background: var(--fondo); touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { position: fixed; inset: 0; width: 100%; }
/* que un toque largo no seleccione texto ni abra la lupa (mantener presionado = hablar) */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, [contenteditable], .burbuja, .md, .resumen-ia, .evento .t { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
body {
  font-family: 'Outfit', ui-rounded, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--tinta);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.005em;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
/* el iPhone acerca la pantalla solo si un campo tiene letra menor a 16 px */
input, textarea, select { font-size: max(16px, 1em); }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea { border: 0; outline: 0; background: none; }
::selection { background: rgba(38, 132, 252, 0.18); }
[hidden] { display: none !important; }
svg { display: block; }
a { color: var(--azul); text-decoration: none; }

/* ── contenedor de la app ─────────────────────────────────────────────── */
#app {
  position: fixed;
  inset: 0;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #f3f1f6 0%, #f4f2f6 55%, #f7eff2 100%);
}
@media (min-width: 520px) {
  body { background: radial-gradient(1200px 800px at 50% 0%, #ebe7f0 0%, #e2dee8 60%, #d9d5df 100%); }
  #app {
    inset: 16px auto auto 50%;
    width: 480px;
    height: min(100dvh - 32px, 920px);
    transform: translateX(-50%);
    border-radius: 44px;
    box-shadow: var(--sombra-l), 0 0 0 10px rgba(255, 255, 255, 0.35);
  }
}

/* manchas de color difuminadas que se mueven despacito */
.fondo { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.mancha {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55;
  will-change: transform; animation: flotar 22s var(--suave) infinite alternate;
}
.m1 { width: 300px; height: 300px; background: #e3dcef; top: -80px; left: -90px; }
.m2 { width: 260px; height: 260px; background: #d7e8c6; top: 34%; right: -110px; animation-duration: 26s; animation-delay: -6s; }
.m3 { width: 280px; height: 280px; background: #f6dfe7; bottom: -120px; left: -60px; animation-duration: 30s; animation-delay: -12s; }
.m4 { width: 180px; height: 180px; background: #dbe8ff; top: 18%; left: 28%; opacity: 0.35; animation-duration: 34s; animation-delay: -3s; }
@keyframes flotar {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(30px, 24px, 0) scale(1.08); }
  100% { transform: translate3d(-20px, 40px, 0) scale(0.96); }
}

/* ── vistas y transiciones ─────────────────────────────────────────────── */
.vista {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
}
.pantalla {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding-top: calc(var(--seg-arriba) + 8px);
}
.desliza {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 4px 18px 28px;
}
.desliza::-webkit-scrollbar { display: none; }
.con-nav .desliza { padding-bottom: calc(var(--seg-abajo) + 110px); }

/* entrada y salida de pantallas (respaldo cuando no hay View Transitions) */
.entra-adelante { animation: entraAdelante 0.52s var(--suave) both; }
.entra-atras { animation: entraAtras 0.52s var(--suave) both; }
.sale-adelante { animation: saleAdelante 0.34s var(--suave) both; pointer-events: none; }
.sale-atras { animation: saleAtras 0.34s var(--suave) both; pointer-events: none; }
@keyframes entraAdelante { from { opacity: 0; transform: translate3d(28px, 0, 0) scale(0.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes entraAtras { from { opacity: 0; transform: translate3d(-28px, 0, 0) scale(0.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes saleAdelante { to { opacity: 0; transform: translate3d(-22px, 0, 0) scale(0.985); } }
@keyframes saleAtras { to { opacity: 0; transform: translate3d(22px, 0, 0) scale(0.985); } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.45s; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
html.vt-adelante::view-transition-old(root) { animation-name: vtSaleIzq; }
html.vt-adelante::view-transition-new(root) { animation-name: vtEntraDer; }
html.vt-atras::view-transition-old(root) { animation-name: vtSaleDer; }
html.vt-atras::view-transition-new(root) { animation-name: vtEntraIzq; }
@keyframes vtSaleIzq { to { opacity: 0; transform: translateX(-24px) scale(0.98); } }
@keyframes vtEntraDer { from { opacity: 0; transform: translateX(32px) scale(0.98); filter: blur(3px); } }
@keyframes vtSaleDer { to { opacity: 0; transform: translateX(24px) scale(0.98); } }
@keyframes vtEntraIzq { from { opacity: 0; transform: translateX(-32px) scale(0.98); filter: blur(3px); } }
::view-transition-group(nav), ::view-transition-group(composer), ::view-transition-group(orbe) { animation-duration: 0.5s; animation-timing-function: var(--suave); }
::view-transition-old(nav), ::view-transition-new(nav) { animation: none; mix-blend-mode: normal; }

/* elementos que aparecen escalonados */
.aparece { animation: aparece 0.62s var(--suave) both; animation-delay: calc(var(--i, 0) * 55ms + 60ms); }
@keyframes aparece { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.sin-anim .aparece, .sin-anim .aparece-suave { animation: none; }
.aparece-suave { animation: apareceSuave 0.5s var(--suave) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes apareceSuave { from { opacity: 0; } to { opacity: 1; } }

/* ── encabezado ─────────────────────────────────────────────────────────── */
.cabeza {
  display: grid; grid-template-columns: var(--circulo) 1fr var(--circulo);
  align-items: center; gap: 10px;
  padding: 6px 18px 10px;
  min-height: 64px;
  position: relative; z-index: 3;
}
.cabeza h1 {
  margin: 0; text-align: center;
  font-size: 21px; font-weight: 400; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cabeza .sub { display: block; font-size: 12px; color: var(--gris); text-align: center; margin-top: 1px; letter-spacing: 0; }

.circulo {
  width: var(--circulo); height: var(--circulo); border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blanco-v);
  box-shadow: var(--sombra-s), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  transition: transform 0.45s var(--resorte), background 0.25s;
  flex-shrink: 0;
  position: relative;
}
.circulo svg { width: 20px; height: 20px; }
.circulo.chico { --circulo: 38px; }
.circulo.chico svg { width: 17px; height: 17px; }
.circulo.gris { background: rgba(214, 210, 220, 0.7); box-shadow: none; }
.circulo.azul { background: var(--azul); color: #fff; box-shadow: 0 6px 18px rgba(38, 132, 252, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.circulo.vacio { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; pointer-events: none; }
.circulo .punto {
  position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--rojo); box-shadow: 0 0 0 2px #fff; animation: latido 2s var(--suave) infinite;
}
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* presionar: todo lo tocable se hunde con resorte */
.toca { transition: transform 0.5s var(--resorte), box-shadow 0.3s, background 0.25s, opacity 0.25s; }
.toca:active, .toca.presionado { transform: scale(0.955); transition-duration: 0.12s; }
.circulo:active { transform: scale(0.9); transition-duration: 0.1s; }

/* ── saludo ─────────────────────────────────────────────────────────────── */
.saludo { display: flex; align-items: center; gap: 18px; padding: 10px 6px 22px; }
.saludo .textos { min-width: 0; }
.saludo .hola { font-size: 24px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; }
.saludo .pregunta { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; margin-top: 2px; }
.saludo .pregunta .letra { display: inline-block; animation: letra 0.6s var(--suave) both; animation-delay: calc(var(--l) * 18ms + 250ms); }
@keyframes letra { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* ── el orbe (avatar de Genie) ─────────────────────────────────────────── */
.orbe {
  --t: 84px; --nivel: 0;
  width: var(--t); height: var(--t); border-radius: 50%; flex-shrink: 0;
  position: relative; isolation: isolate;
  box-shadow: 0 10px 30px rgba(108, 90, 160, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transform: scale(calc(1 + var(--nivel) * 0.12));
  transition: transform 0.12s linear;
  background: #e9e4f2;
  overflow: hidden;
}
.orbe::before {
  content: ''; position: absolute; inset: -30%;
  background: conic-gradient(from 0deg, #b9a8ff, #8fc6ff, #c3dca8, #ffd6e4, #c9b8ff, #b9a8ff);
  filter: blur(14px); animation: girar 9s linear infinite;
  /* Safari (iPhone) no recorta con border-radius una capa que gira: se recorta ella misma en
     círculo. La capa mide 160 % del orbe → radio 50 % del orbe = 31.25 % de la capa. */
  clip-path: circle(31.25% at 50% 50%);
  -webkit-clip-path: circle(31.25% at 50% 50%);
}
.orbe::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.35) 22%, transparent 48%),
              radial-gradient(circle at 70% 80%, rgba(38, 132, 252, 0.28) 0%, transparent 55%);
  mix-blend-mode: screen;
}
.orbe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; border-radius: 50%; }
.orbe.foto::before, .orbe.foto::after { display: none; }
.orbe.vivo::before { animation-duration: 3.2s; }
.orbe.pensando::before { animation-duration: 1.6s; }
.orbe.respira { animation: respira 4.5s ease-in-out infinite; }
@keyframes respira { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes girar { to { transform: rotate(360deg); } }
.orbe.chico { --t: 34px; box-shadow: 0 4px 12px rgba(108, 90, 160, 0.18); }
.orbe.mini { --t: 26px; }

/* ── panel de vidrio (las tarjetas grandes del shot) ──────────────────── */
.panel {
  background: var(--vidrio);
  border-radius: var(--r-xl);
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), var(--sombra-s);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  position: relative;
}
.panel + .panel { margin-top: 14px; }
.panel.verde {
  background: linear-gradient(180deg, rgba(232, 241, 223, 0.9) 0%, rgba(206, 226, 186, 0.92) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 8px 28px rgba(120, 160, 80, 0.16);
}
.panel .titulo-panel { display: flex; align-items: center; gap: 12px; padding: 4px 4px 10px; }
.panel .titulo-panel .txt { flex: 1; min-width: 0; }
.panel .titulo-panel b { display: block; font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.panel .titulo-panel small { display: flex; align-items: center; gap: 7px; color: var(--gris); font-size: 13.5px; margin-top: 1px; }
.panel .titulo-panel small i { width: 4px; height: 4px; border-radius: 50%; background: var(--gris-2); display: inline-block; }
.panel .divisor { height: 1px; background: rgba(21, 20, 23, 0.08); margin: 4px 6px 12px; }

.ficha {
  background: var(--blanco-v);
  border-radius: var(--r-m);
  padding: 13px 15px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  position: relative;
}
.ficha + .ficha { margin-top: 8px; }
.ficha .ico { width: 26px; display: grid; place-items: center; flex-shrink: 0; }
.ficha .ico svg { width: 21px; height: 21px; }
.ficha .txt { flex: 1; min-width: 0; }
.ficha .txt b { display: block; font-weight: 500; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha .txt small { display: block; color: var(--gris); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ficha.verde { background: rgba(220, 234, 205, 0.95); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55); }
.ficha .der { color: var(--gris); font-size: 13px; flex-shrink: 0; }

/* ── mosaicos (Translate / Audio Chat / Chat Files / Images) ──────────── */
.hoja-mosaicos {
  background: rgba(236, 233, 240, 0.55);
  border-radius: 34px 34px 0 0;
  padding: 18px 14px 6px;
  margin: 0 -18px;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.hoja-mosaicos::before {
  content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px;
  border-radius: 4px; background: rgba(21, 20, 23, 0.08);
}
.mosaicos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mosaico {
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(240, 238, 243, 0.85) 0%, rgba(226, 223, 231, 0.72) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 6px 22px rgba(60, 40, 90, 0.07);
  position: relative; overflow: hidden;
  transform: translateZ(0); /* que Safari recorte bien las animaciones dentro de las esquinas redondas */
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px;
  text-align: left;
}
.mosaico .ilus {
  position: absolute; inset: 8px 8px 46px;
  display: grid; place-items: center;
  -webkit-mask-image: linear-gradient(180deg, #000 58%, rgba(0, 0, 0, 0.25) 86%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 58%, rgba(0, 0, 0, 0.25) 86%, transparent 100%);
  transition: transform 0.6s var(--resorte);
}
.mosaico .ilus svg { width: 74%; height: auto; max-height: 100%; overflow: visible; }
.mosaico:active .ilus { transform: scale(1.06) translateY(-2px); }
.mosaico .pie { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.mosaico .pie .circulo { --circulo: 40px; background: rgba(214, 210, 220, 0.85); box-shadow: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.mosaico .pie .circulo svg { width: 18px; height: 18px; }
.mosaico .pie span { font-size: 15.5px; font-weight: 400; letter-spacing: -0.01em; white-space: nowrap; }
.mosaico .brillo {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(180px circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.65), transparent 60%);
  transition: opacity 0.35s;
}
.mosaico.presionado .brillo { opacity: 1; }
.mosaico .contador {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.85); font-size: 13px; font-weight: 500;
  display: grid; place-items: center; box-shadow: var(--sombra-s);
}
.mosaico .contador.rojo { background: var(--rojo); color: #fff; }

/* ── caja de texto inferior ("Ask me anything …") ─────────────────────── */
.compositor {
  position: relative; z-index: 6;
  padding: 10px 14px calc(var(--seg-abajo) + 12px);
  view-transition-name: composer;
}
.caja {
  display: flex; align-items: flex-end; gap: 6px;
  min-height: 64px;
  border-radius: 34px;
  padding: 7px 7px 7px 10px;
  background: rgba(216, 212, 221, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 10px 30px rgba(40, 20, 70, 0.08);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  transition: border-radius 0.3s var(--suave), box-shadow 0.3s;
}
.caja:focus-within { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 12px 36px rgba(40, 20, 70, 0.12); }
.caja textarea {
  flex: 1; resize: none; min-height: 50px; max-height: 160px;
  padding: 14px 6px 13px; font-size: 16.5px; line-height: 1.4;
}
.caja textarea::placeholder { color: rgba(21, 20, 23, 0.42); }
.caja .circulo { --circulo: 50px; background: rgba(250, 249, 251, 0.95); }
.caja .circulo.mas { --circulo: 40px; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; margin-bottom: 5px; color: var(--tinta-2); }
.caja .circulo.mas.activo { color: var(--azul); }
.caja .enviar svg { transition: transform 0.4s var(--resorte), opacity 0.2s; }
.caja .enviar.mic svg.ico-enviar, .caja .enviar:not(.mic) svg.ico-mic { display: none; }
.caja .enviar.grabando { background: var(--rojo); color: #fff; animation: pulsoRojo 1.4s ease-out infinite; }
@keyframes pulsoRojo { 0% { box-shadow: 0 0 0 0 rgba(239, 74, 60, 0.45); } 100% { box-shadow: 0 0 0 16px rgba(239, 74, 60, 0); } }
.chip-profundo {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 8px 8px; padding: 6px 12px; border-radius: 20px;
  background: rgba(38, 132, 252, 0.12); color: var(--azul); font-size: 13px; font-weight: 500;
  animation: aparece 0.4s var(--suave) both;
}
.chip-profundo svg { width: 14px; height: 14px; }
.foto-adjunta {
  position: relative; display: inline-block; margin: 0 0 8px 8px;
  animation: aparece 0.4s var(--suave) both;
}
.foto-adjunta img { width: 64px; height: 64px; object-fit: cover; border-radius: 16px; box-shadow: var(--sombra-m); transform: rotate(-4deg); }
.foto-adjunta button { position: absolute; top: -8px; right: -8px; }

/* grabación: ondas en vivo dentro de la caja */
.ondas { flex: 1; display: flex; align-items: center; justify-content: center; gap: 3px; height: 50px; padding: 0 8px; }
.ondas i { width: 3px; border-radius: 3px; background: var(--tinta-2); height: calc(6px + var(--h, 0) * 30px); transition: height 0.08s linear; opacity: 0.7; }
.ondas .tiempo { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--gris); margin-left: 10px; min-width: 36px; }

/* ── barra de navegación flotante ─────────────────────────────────────── */
.nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7;
  padding: 0 22px calc(var(--seg-abajo) + 14px);
  pointer-events: none;
  view-transition-name: nav;
}
.nav .barra {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px; border-radius: 40px;
  background: rgba(232, 229, 236, 0.66);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 12px 34px rgba(40, 20, 70, 0.10);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
  position: relative;
  animation: navEntra 0.6s var(--resorte) both;
}
@keyframes navEntra { from { transform: translateY(30px); opacity: 0; } }
.nav .bola {
  position: absolute; top: 8px; left: 8px; width: 58px; height: 58px; margin: -3px;
  border-radius: 50%; background: var(--azul);
  box-shadow: 0 8px 22px rgba(38, 132, 252, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.55s var(--resorte);
  transform: translateX(var(--bx, 0px));
}
.nav button {
  position: relative; z-index: 1;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--sombra-s);
  transition: color 0.3s, background 0.3s, transform 0.45s var(--resorte);
}
.nav button svg { width: 22px; height: 22px; transition: transform 0.45s var(--resorte); }
.nav button.activo { background: transparent; box-shadow: none; color: #fff; }
.nav button.activo svg { transform: scale(1.06); }
.nav button:active { transform: scale(0.88); }

/* ── chat ───────────────────────────────────────────────────────────────── */
.mensajes { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.msj { position: relative; animation: msjEntra 0.55s var(--suave) both; }
@keyframes msjEntra { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.98); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
.msj.yo .burbuja {
  background: rgba(244, 242, 246, 0.82);
  border-radius: 28px;
  padding: 20px 22px;
  font-size: 15.5px; line-height: 1.6; color: var(--tinta-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), var(--sombra-s);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  white-space: pre-wrap; word-wrap: break-word;
  margin-right: 0;
}
.msj.yo .burbuja b, .msj.yo .burbuja strong { color: var(--tinta); font-weight: 600; }
.msj.yo .foto { width: 120px; height: 120px; object-fit: cover; border-radius: 18px; box-shadow: var(--sombra-m); transform: rotate(4deg); position: absolute; right: 10px; top: -28px; border: 3px solid #fff; }
.msj.yo.con-foto { padding-top: 92px; }
.msj .acciones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.msj .acciones .circulo { --circulo: 42px; background: rgba(250, 249, 251, 0.8); }
.msj .acciones .circulo svg { width: 18px; height: 18px; }
.msj.genie .quien { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px 2px; }
.msj.genie .quien .nombre { font-size: 13px; color: var(--gris); }
.msj.genie .burbuja {
  background: rgba(250, 249, 251, 0.78);
  border-radius: 28px;
  padding: 18px 20px;
  font-size: 15.5px; line-height: 1.62; color: var(--tinta-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), var(--sombra-s);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  word-wrap: break-word;
}
.burbuja p { margin: 0 0 10px; }
.burbuja p:last-child { margin-bottom: 0; }
.burbuja ol, .burbuja ul { margin: 6px 0 10px; padding-left: 22px; }
.burbuja li { margin: 4px 0; }
.burbuja strong { color: var(--tinta); font-weight: 600; }
.burbuja h3 { font-size: 16px; margin: 10px 0 6px; color: var(--tinta); font-weight: 600; }
.burbuja code { background: rgba(21, 20, 23, 0.06); border-radius: 6px; padding: 1px 6px; font-size: 14px; }
.burbuja .palabra { animation: palabra 0.45s var(--suave) both; animation-delay: calc(var(--w) * 22ms); display: inline; }
@keyframes palabra { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
.msj.error .burbuja { background: rgba(255, 236, 234, 0.85); color: #8a2a22; }

.tarjetas { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; align-items: flex-end; }
.tarjeta {
  width: min(82%, 300px);
  border-radius: 24px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(240, 238, 243, 0.92), rgba(225, 222, 230, 0.86));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), var(--sombra-m);
  display: flex; align-items: center; gap: 12px;
  animation: tarjetaVuela 0.8s var(--resorte) both;
  animation-delay: calc(var(--i, 0) * 110ms + 200ms);
  text-align: left;
}
@keyframes tarjetaVuela { from { opacity: 0; transform: translate3d(30px, 18px, 0) rotate(4deg) scale(0.9); } to { opacity: 1; transform: none; } }
.tarjeta .mini-ilus { width: 54px; height: 54px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.7); }
.tarjeta .mini-ilus svg { width: 38px; height: 38px; }
.tarjeta .txt { min-width: 0; flex: 1; }
.tarjeta b { display: block; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tarjeta small { display: block; font-size: 12.5px; color: var(--gris); margin-top: 2px; line-height: 1.3; }

.escribiendo { display: inline-flex; gap: 6px; padding: 18px 22px; border-radius: 28px; background: rgba(250, 249, 251, 0.78); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8); }
.escribiendo i { width: 8px; height: 8px; border-radius: 50%; background: var(--gris-2); animation: puntito 1.2s ease-in-out infinite; }
.escribiendo i:nth-child(2) { animation-delay: 0.15s; }
.escribiendo i:nth-child(3) { animation-delay: 0.3s; }
@keyframes puntito { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-6px); opacity: 1; background: var(--azul); } }
.escribiendo .que { font-size: 13px; color: var(--gris); margin-left: 6px; align-self: center; }

.sugerencias { display: flex; gap: 8px; overflow-x: auto; padding: 2px 18px 10px; margin: 0 -18px; scrollbar-width: none; }
.sugerencias::-webkit-scrollbar { display: none; }
.sugerencia {
  flex-shrink: 0; padding: 10px 15px; border-radius: 20px; font-size: 14px;
  background: rgba(255, 255, 255, 0.66); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), var(--sombra-s);
  white-space: nowrap; color: var(--tinta-2);
}

/* ── listas (pendientes, notas, historial) ────────────────────────────── */
.segmentos {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(220, 216, 226, 0.6); border-radius: 22px; padding: 4px;
  position: relative; margin: 2px 0 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.segmentos .pastilla {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / var(--n, 3));
  border-radius: 18px; background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--sombra-s);
  transform: translateX(calc(100% * var(--s, 0)));
  transition: transform 0.5s var(--resorte);
}
.segmentos button { position: relative; z-index: 1; padding: 10px 6px; font-size: 14.5px; color: var(--gris); transition: color 0.3s; border-radius: 18px; }
.segmentos button.activo { color: var(--tinta); font-weight: 500; }
.segmentos button .n { font-size: 11.5px; background: rgba(21, 20, 23, 0.08); border-radius: 8px; padding: 1px 6px; margin-left: 4px; }

.grupo-t { font-size: 13px; color: var(--gris); margin: 18px 6px 8px; text-transform: none; letter-spacing: 0.01em; display: flex; justify-content: space-between; align-items: center; }
.grupo-t:first-child { margin-top: 4px; }

.renglon {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 24px;
  background: rgba(250, 249, 251, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), var(--sombra-s);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  text-align: left; width: 100%;
  position: relative; overflow: hidden;
}
.renglon + .renglon { margin-top: 8px; }
.renglon .ico-c { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.95); flex-shrink: 0; box-shadow: var(--sombra-s); }
.renglon .ico-c svg { width: 20px; height: 20px; }
.renglon .ico-c.azul { background: rgba(38, 132, 252, 0.12); color: var(--azul); }
.renglon .ico-c.verde { background: var(--salvia-2); color: #4f7a2b; }
.renglon .ico-c.rojo { background: rgba(239, 74, 60, 0.12); color: var(--rojo); }
.renglon .txt { flex: 1; min-width: 0; }
.renglon .txt b { display: block; font-weight: 500; font-size: 16px; letter-spacing: -0.01em; line-height: 1.3; }
.renglon .txt small { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--gris); font-size: 13px; margin-top: 3px; }
.renglon .txt small svg { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; }
.renglon.sonando { background: linear-gradient(135deg, rgba(255, 233, 228, 0.95), rgba(255, 245, 240, 0.9)); }
.renglon.sonando .ico-c { animation: sacude 0.9s ease-in-out infinite; }
@keyframes sacude { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }
.renglon.hecho .txt b { text-decoration: line-through; color: var(--gris); }
.renglon.apagado { opacity: 0.55; }

/* tarjetas de alarma tipo reloj */
.alarma {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-radius: 28px;
  background: rgba(250, 249, 251, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), var(--sombra-s);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  width: 100%; text-align: left;
  transition: opacity 0.4s, transform 0.5s var(--resorte);
}
.alarma + .alarma { margin-top: 10px; }
.alarma .hora { display: block; font-size: 42px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.alarma .hora small { font-size: 17px; font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.alarma .info { flex: 1; min-width: 0; }
.alarma .info { display: flex; flex-direction: column; }
.alarma .info .sub-a { display: block; font-size: 14px; color: var(--gris); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alarma.apagada .hora, .alarma.apagada .info { opacity: 0.4; }
.dias { display: flex; gap: 4px; margin-top: 8px; }
.dias i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: var(--gris); background: rgba(21, 20, 23, 0.05); }
.dias i.si { background: var(--azul); color: #fff; }

/* interruptor */
.interruptor { width: 52px; height: 32px; border-radius: 16px; background: rgba(21, 20, 23, 0.14); position: relative; flex-shrink: 0; transition: background 0.35s var(--suave); }
.interruptor::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.5s var(--resorte), width 0.25s var(--suave);
}
.interruptor:active::after { width: 32px; }
.interruptor.si { background: #34c759; }
.interruptor.si::after { transform: translateX(20px); }
.interruptor.si:active::after { transform: translateX(14px); }

/* casilla de tarea con check que se dibuja */
.casilla { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gris-2); display: grid; place-items: center; flex-shrink: 0; transition: background 0.35s var(--suave), border-color 0.35s, transform 0.5s var(--resorte); }
.casilla svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 3; fill: none; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 0.4s var(--suave) 0.08s; }
.casilla.si { background: #34c759; border-color: #34c759; transform: scale(1.08); }
.casilla.si svg { stroke-dashoffset: 0; }
.casilla:active { transform: scale(0.85); }
.prioridad { font-size: 11px; padding: 2px 8px; border-radius: 8px; background: rgba(255, 138, 61, 0.15); color: #c25a12; font-weight: 500; }
.prioridad.urgente { background: rgba(239, 74, 60, 0.14); color: var(--rojo); }

.vacio-txt { text-align: center; color: var(--gris); padding: 34px 20px; font-size: 15px; line-height: 1.5; }
.vacio-txt .ilus-vacia { width: 110px; margin: 0 auto 14px; opacity: 0.9; }

/* ── notas ─────────────────────────────────────────────────────────────── */
.buscador {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 16px; border-radius: 26px;
  background: rgba(250, 249, 251, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), var(--sombra-s);
  margin-bottom: 12px;
}
.buscador svg { width: 19px; height: 19px; color: var(--gris); }
.buscador input { flex: 1; font-size: 16px; }
.etiquetas { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 12px; padding: 2px 18px 4px; scrollbar-width: none; }
.etiquetas::-webkit-scrollbar { display: none; }
.etiqueta { flex-shrink: 0; padding: 8px 14px; border-radius: 18px; font-size: 14px; background: rgba(255, 255, 255, 0.55); color: var(--tinta-2); transition: background 0.3s, color 0.3s; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); }
.etiqueta.activo { background: var(--tinta); color: #fff; }
.rejilla { columns: 2; column-gap: 10px; }
.nota-c {
  break-inside: avoid; display: block; width: 100%; text-align: left;
  margin-bottom: 10px; padding: 15px 15px 13px; border-radius: 24px;
  background: rgba(250, 249, 251, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), var(--sombra-s);
}
.nota-c.fijada { background: linear-gradient(170deg, rgba(232, 241, 223, 0.95), rgba(214, 231, 197, 0.9)); }
.nota-c b { display: block; font-size: 15.5px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 6px; }
.nota-c p { margin: 0; font-size: 13.5px; color: var(--tinta-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.nota-c .pie-n { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: var(--gris); }
.nota-c .pie-n svg { width: 14px; height: 14px; }

.editor { padding: 0 20px 40px; }
.editor .titulo-n { width: 100%; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; padding: 8px 0 6px; resize: none; overflow: hidden; }
.editor .meta-n { font-size: 13px; color: var(--gris); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.editor .meta-n .etiqueta { padding: 4px 10px; font-size: 12.5px; }
.editor textarea.cuerpo-n { width: 100%; min-height: 50vh; resize: none; font-size: 16.5px; line-height: 1.65; color: var(--tinta-2); }
.md { font-size: 16.5px; line-height: 1.65; color: var(--tinta-2); min-height: 40vh; }
.md h2 { font-size: 21px; font-weight: 600; color: var(--tinta); margin: 18px 0 6px; letter-spacing: -0.02em; }
.md h3 { font-size: 18px; font-weight: 600; color: var(--tinta); margin: 14px 0 4px; }
.md p { margin: 0 0 10px; }
.md ul { padding-left: 22px; margin: 6px 0 12px; }
.md li { margin: 4px 0; }
.md .check { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; cursor: pointer; }
.md .check .casilla { width: 24px; height: 24px; margin-top: 2px; border-radius: 8px; }
.md .check .casilla svg { width: 14px; height: 14px; }
.md .check.si span { text-decoration: line-through; color: var(--gris); }
.md blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--salvia); background: rgba(195, 220, 168, 0.18); border-radius: 0 12px 12px 0; }
.md .placeholder { color: var(--gris-2); }
.barra-herr {
  position: relative; z-index: 6;
  display: flex; justify-content: center; gap: 10px;
  padding: 10px 14px calc(var(--seg-abajo) + 14px);
}
.barra-herr .grupo { display: flex; gap: 8px; padding: 7px; border-radius: 34px; background: rgba(232, 229, 236, 0.75); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), var(--sombra-m); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.barra-herr .circulo { --circulo: 48px; }
.barra-herr .circulo.activo { background: var(--azul); color: #fff; }

/* ── botones ───────────────────────────────────────────────────────────── */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 26px;
  background: var(--tinta); color: #fff; font-size: 16px; font-weight: 500;
  box-shadow: 0 8px 20px rgba(21, 20, 23, 0.18);
}
.boton svg { width: 19px; height: 19px; }
.boton.azul { background: var(--azul); box-shadow: 0 8px 22px rgba(38, 132, 252, 0.35); }
.boton.claro { background: rgba(255, 255, 255, 0.85); color: var(--tinta); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), var(--sombra-s); }
.boton.rojo { background: var(--rojo); box-shadow: 0 8px 22px rgba(239, 74, 60, 0.3); }
.boton.ancho { width: 100%; }
.boton.chico { height: 40px; padding: 0 16px; font-size: 14.5px; border-radius: 20px; }
.boton[disabled] { opacity: 0.5; pointer-events: none; }
.boton .girando { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: girar 0.8s linear infinite; }
.enlace { color: var(--azul); font-size: 14.5px; font-weight: 500; padding: 6px 4px; }

/* ── hojas inferiores (sheets) ────────────────────────────────────────── */
.velo { position: absolute; inset: 0; z-index: 20; background: rgba(30, 24, 40, 0.18); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: veloEntra 0.35s var(--suave) both; }
.velo.sale { animation: veloSale 0.3s var(--suave) both; }
@keyframes veloEntra { from { opacity: 0; } }
@keyframes veloSale { to { opacity: 0; } }
.hoja {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 21;
  max-height: calc(100% - var(--seg-arriba) - 30px);
  display: flex; flex-direction: column;
  background: rgba(246, 244, 248, 0.94);
  border-radius: 34px 34px 0 0;
  box-shadow: 0 -10px 40px rgba(30, 20, 50, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
  animation: hojaEntra 0.55s var(--resorte) both;
  touch-action: pan-y;
}
.hoja.sale { animation: hojaSale 0.32s var(--salida) both; }
.hoja.arrastrando { animation: none; transition: none; }
.hoja.suelta { transition: transform 0.45s var(--resorte); }
@keyframes hojaEntra { from { transform: translate3d(0, 100%, 0); } to { transform: none; } }
@keyframes hojaSale { to { transform: translate3d(0, 105%, 0); } }
.hoja .asa { padding: 10px 0 4px; display: grid; place-items: center; cursor: grab; flex-shrink: 0; touch-action: none; }
.hoja .cab-hoja { touch-action: none; }
.hoja .asa::before { content: ''; width: 40px; height: 5px; border-radius: 3px; background: rgba(21, 20, 23, 0.14); }
.hoja .cab-hoja { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 20px 10px; flex-shrink: 0; }
.hoja .cab-hoja h2 { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -0.02em; }
.hoja .cuerpo-hoja { overflow-y: auto; padding: 4px 20px calc(var(--seg-abajo) + 22px); overscroll-behavior: contain; }

/* formularios */
.campo { margin-bottom: 14px; }
.campo label, .campo .etq { display: block; font-size: 13px; color: var(--gris); margin: 0 6px 6px; }
.entrada {
  width: 100%; height: 52px; padding: 0 18px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.85); font-size: 16px;
  box-shadow: inset 0 0 0 1px rgba(21, 20, 23, 0.06);
  transition: box-shadow 0.25s;
}
textarea.entrada { height: auto; min-height: 90px; padding: 14px 18px; resize: none; line-height: 1.45; }
.entrada:focus { box-shadow: inset 0 0 0 2px rgba(38, 132, 252, 0.45); }
.fila { display: flex; gap: 10px; }
.fila > * { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.8); font-size: 14.5px; box-shadow: inset 0 0 0 1px rgba(21, 20, 23, 0.06); transition: background 0.25s, color 0.25s, transform 0.4s var(--resorte); }
.chip svg, .etiqueta svg, .meta-n svg, .sugerencia svg, .enlace svg { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-right: 2px; }
.chip.si { background: var(--tinta); color: #fff; box-shadow: none; }
.chip:active { transform: scale(0.92); }
.chip-dia { width: 40px; height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; }
.opcion {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: 20px; background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(21, 20, 23, 0.05);
}
.opcion + .opcion { margin-top: 8px; }
.opcion .txt { flex: 1; min-width: 0; }
.opcion .txt b { display: block; font-weight: 500; font-size: 15.5px; }
.opcion .txt small { display: block; color: var(--gris); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.opcion .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--gris-2); flex-shrink: 0; position: relative; transition: border-color 0.25s; }
.opcion .radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--azul); transform: scale(0); transition: transform 0.45s var(--resorte); }
.opcion.si .radio { border-color: var(--azul); }
.opcion.si .radio::after { transform: scale(1); }
.opcion .ico-c { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(38, 132, 252, 0.1); color: var(--azul); flex-shrink: 0; }
.opcion .ico-c svg { width: 19px; height: 19px; }
.opcion.peligro { color: var(--rojo); }
.opcion.peligro .ico-c { background: rgba(239, 74, 60, 0.1); color: var(--rojo); }

/* selector de hora grande (rueditas) */
.reloj-sel { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px 0 18px; position: relative; }
.rueda { height: 180px; width: 86px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.rueda::-webkit-scrollbar { display: none; }
.rueda div { height: 60px; display: grid; place-items: center; font-size: 40px; font-weight: 300; scroll-snap-align: center; color: var(--gris-2); transition: color 0.2s, transform 0.2s; font-variant-numeric: tabular-nums; }
.rueda div.centro { color: var(--tinta); }
.rueda .relleno { height: 60px; scroll-snap-align: none; }
.reloj-sel .dos-puntos { font-size: 38px; font-weight: 300; padding-bottom: 6px; }
.reloj-sel .marco { position: absolute; left: 50%; top: 50%; width: 270px; height: 60px; transform: translate(-50%, -50%); border-radius: 20px; background: rgba(255, 255, 255, 0.7); z-index: -1; box-shadow: inset 0 0 0 1px rgba(21, 20, 23, 0.04); }
.rueda.ampm { width: 70px; }
.rueda.ampm div { font-size: 24px; }

/* ── ajustes ───────────────────────────────────────────────────────────── */
.seccion { margin-bottom: 18px; }
.seccion > .etq-s { font-size: 13px; color: var(--gris); margin: 0 10px 8px; display: flex; align-items: center; gap: 6px; }
.seccion .caja-s { background: rgba(250, 249, 251, 0.74); border-radius: 26px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), var(--sombra-s); overflow: hidden; }
.ajuste { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; text-align: left; min-height: 60px; position: relative; }
.ajuste + .ajuste::before { content: ''; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--linea); }
.ajuste .ico-c { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.ajuste .ico-c svg { width: 18px; height: 18px; }
.ajuste .txt { flex: 1; min-width: 0; }
.ajuste .txt b { display: block; font-weight: 400; font-size: 16px; }
.ajuste .txt small { display: block; color: var(--gris); font-size: 13px; margin-top: 1px; line-height: 1.35; }
.ajuste .valor { color: var(--gris); font-size: 14.5px; display: flex; align-items: center; gap: 4px; max-width: 45%; text-align: right; }
.ajuste .valor svg { width: 16px; height: 16px; flex-shrink: 0; }
.ajuste .estado-ok { color: #2e9e4f; }
.ajuste .estado-no { color: var(--naranja); }
.nota-ayuda svg, .vacio-txt svg:not(.ilus-vacia svg), .detalle svg { width: 15px; height: 15px; display: inline-block; vertical-align: -3px; }
.nota-ayuda { font-size: 13px; color: var(--gris); line-height: 1.5; margin: 8px 12px 0; }
.pasos { counter-reset: paso; padding: 0; margin: 4px 0 12px; list-style: none; }
.pasos li { counter-increment: paso; position: relative; padding: 2px 0 12px 42px; font-size: 15px; line-height: 1.5; color: var(--tinta-2); }
.pasos li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--azul); color: #fff; font-size: 14px; font-weight: 500; display: grid; place-items: center; }
.pasos li b { color: var(--tinta); font-weight: 600; }
.codigo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: rgba(21, 20, 23, 0.06); padding: 2px 6px; border-radius: 6px; }
.barra-uso { height: 10px; border-radius: 5px; background: rgba(21, 20, 23, 0.07); overflow: hidden; margin-top: 6px; }
.barra-uso i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--azul), var(--azul-2)); width: 0; transition: width 1.1s var(--suave); }
.cifra { font-size: 40px; font-weight: 300; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ── sonando (alarma de pantalla completa) ─────────────────────────────── */
.sonando-p {
  position: absolute; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--seg-arriba) + 40px) 26px calc(var(--seg-abajo) + 30px);
  background: linear-gradient(180deg, #f6f3fa 0%, #efe8f6 40%, #fde9ee 100%);
  overflow: hidden;
  animation: apareceSuave 0.4s both;
}
.sonando-p.alarma-t { background: linear-gradient(180deg, #1b1830 0%, #2a1f4a 45%, #4b2a52 100%); color: #fff; }
.sonando-p .anillos { position: relative; width: 210px; height: 210px; display: grid; place-items: center; margin: 28px 0 26px; }
.sonando-p .anillos span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(38, 132, 252, 0.35); animation: onda 2.4s var(--suave) infinite; }
.sonando-p.alarma-t .anillos span { border-color: rgba(255, 170, 200, 0.4); }
.sonando-p .anillos span:nth-child(2) { animation-delay: 0.8s; }
.sonando-p .anillos span:nth-child(3) { animation-delay: 1.6s; }
@keyframes onda { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.sonando-p .orbe { --t: 150px; animation: zumba 0.5s ease-in-out infinite alternate; }
@keyframes zumba { from { transform: scale(1) rotate(-2deg); } to { transform: scale(1.05) rotate(2deg); } }
.sonando-p .hora-g { font-size: 76px; font-weight: 200; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.sonando-p .que { font-size: 24px; font-weight: 500; text-align: center; margin-top: 10px; letter-spacing: -0.02em; line-height: 1.25; }
.sonando-p .detalle { font-size: 15px; opacity: 0.65; text-align: center; margin-top: 8px; }
.sonando-p .abajo { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.deslizador {
  position: relative; height: 72px; border-radius: 36px;
  background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
}
.alarma-t .deslizador { background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.deslizador .texto-d {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 500;
  background: linear-gradient(90deg, rgba(21, 20, 23, 0.35) 0%, rgba(21, 20, 23, 0.9) 50%, rgba(21, 20, 23, 0.35) 100%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brilloTexto 2.2s linear infinite; padding-left: 60px;
}
.alarma-t .deslizador .texto-d { background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0%, #fff 50%, rgba(255, 255, 255, 0.35) 100%); }
@keyframes brilloTexto { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.deslizador .perilla {
  position: absolute; top: 6px; left: 6px; width: 60px; height: 60px; border-radius: 50%;
  background: var(--azul); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(38, 132, 252, 0.45);
  transform: translateX(var(--dx, 0px));
}
.deslizador .perilla svg { width: 26px; height: 26px; }
.deslizador.soltando .perilla { transition: transform 0.5s var(--resorte); }

/* ── hablar (modo voz) ─────────────────────────────────────────────────── */
.hablar-p { align-items: center; }
.hablar-p .centro-h { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; padding: 0 26px; }
.hablar-p .orbe { --t: 190px; view-transition-name: orbe; }
.hablar-p .estado-h { margin-top: 34px; font-size: 22px; font-weight: 300; letter-spacing: -0.02em; text-align: center; min-height: 30px; }
.hablar-p .dicho { margin-top: 14px; font-size: 16px; color: var(--tinta-2); text-align: center; line-height: 1.5; max-height: 30vh; overflow-y: auto; min-height: 48px; }
.hablar-p .dicho.yo { color: var(--gris); font-size: 15px; }
.hablar-p .controles { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 10px 0 calc(var(--seg-abajo) + 26px); }
.boton-mic {
  width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center;
  background: var(--azul); color: #fff; position: relative;
  box-shadow: 0 12px 30px rgba(38, 132, 252, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.45s var(--resorte), background 0.3s;
}
.boton-mic svg { width: 34px; height: 34px; }
.boton-mic::before, .boton-mic::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; opacity: 0; z-index: -1; }
.boton-mic.escuchando { background: var(--rojo); box-shadow: 0 12px 30px rgba(239, 74, 60, 0.45); }
.boton-mic.escuchando::before { animation: ondaMic 1.6s var(--suave) infinite; }
.boton-mic.escuchando::after { animation: ondaMic 1.6s var(--suave) 0.8s infinite; }
@keyframes ondaMic { from { transform: scale(1); opacity: 0.4; } to { transform: scale(1.8); opacity: 0; } }
.boton-mic:active { transform: scale(0.92); }

/* ── entrar (PIN) y bienvenida ─────────────────────────────────────────── */
.entrar-p { align-items: center; justify-content: center; padding: calc(var(--seg-arriba) + 30px) 26px calc(var(--seg-abajo) + 26px); text-align: center; }
.entrar-p .orbe { --t: 120px; margin-bottom: 26px; }
.entrar-p h1 { font-size: 30px; font-weight: 300; letter-spacing: -0.03em; margin: 0; line-height: 1.15; }
.entrar-p h1 b { font-weight: 600; }
.entrar-p p { color: var(--gris); font-size: 15.5px; line-height: 1.5; margin: 12px 0 24px; max-width: 320px; }
.puntos-pin { display: flex; gap: 16px; justify-content: center; margin: 8px 0 30px; }
.puntos-pin i { width: 15px; height: 15px; border-radius: 50%; background: rgba(21, 20, 23, 0.12); transition: background 0.25s, transform 0.4s var(--resorte); }
.puntos-pin i.si { background: var(--tinta); transform: scale(1.15); }
.puntos-pin.mal { animation: tiembla 0.5s var(--suave); }
.puntos-pin.mal i.si { background: var(--rojo); }
@keyframes tiembla { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-12px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.teclado { display: grid; grid-template-columns: repeat(3, 78px); gap: 16px 26px; justify-content: center; }
.teclado button { width: 78px; height: 78px; border-radius: 50%; font-size: 30px; font-weight: 300; background: rgba(255, 255, 255, 0.62); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), var(--sombra-s); transition: transform 0.4s var(--resorte), background 0.2s; }
.teclado button:active { transform: scale(0.88); background: rgba(255, 255, 255, 0.95); transition-duration: 0.08s; }
.teclado button.vacio { background: none; box-shadow: none; }
.teclado button svg { width: 26px; height: 26px; margin: 0 auto; }
.paso-b { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; }

/* ── avisos (toasts) ───────────────────────────────────────────────────── */
.avisos { position: absolute; left: 0; right: 0; top: calc(var(--seg-arriba) + 10px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.aviso {
  pointer-events: auto; max-width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 12px; border-radius: 26px;
  background: rgba(30, 28, 34, 0.92); color: #fff; font-size: 14.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: avisoEntra 0.55s var(--resorte) both;
}
.aviso.sale { animation: avisoSale 0.3s var(--suave) both; }
.aviso .ico-a { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.15); flex-shrink: 0; }
.aviso .ico-a svg { width: 16px; height: 16px; }
.aviso.ok .ico-a { background: #34c759; }
.aviso.mal .ico-a { background: var(--rojo); }
.aviso button { color: var(--azul-2); font-weight: 500; margin-left: 6px; }
@keyframes avisoEntra { from { opacity: 0; transform: translateY(-24px) scale(0.9); } }
@keyframes avisoSale { to { opacity: 0; transform: translateY(-16px) scale(0.95); } }

/* ── ilustraciones vacías / cargando ───────────────────────────────────── */
.cargando { display: grid; place-items: center; padding: 40px; }
.esqueleto { border-radius: 22px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0.4) 100%); background-size: 200% 100%; animation: esq 1.4s linear infinite; height: 64px; }
.esqueleto + .esqueleto { margin-top: 8px; }
@keyframes esq { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* resumen del día */
.resumen-ia { font-size: 15.5px; line-height: 1.6; color: var(--tinta-2); padding: 4px 6px 6px; }
.linea-tiempo { position: relative; padding-left: 22px; }
.linea-tiempo::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: rgba(21, 20, 23, 0.08); }
.evento { position: relative; padding: 6px 0 10px; }
.evento::before { content: ''; position: absolute; left: -20px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--gris-2); box-shadow: 0 0 0 3px rgba(242, 240, 245, 1); }
.evento.ev-yo::before { background: var(--azul); }
.evento.ev-recordatorio::before, .evento.ev-alarma::before, .evento.ev-llamada::before { background: var(--naranja); }
.evento.ev-nota::before { background: #8b6cf0; }
.evento.ev-tarea::before { background: #34c759; }
.evento .h { font-size: 12px; color: var(--gris); font-variant-numeric: tabular-nums; }
.evento .t { font-size: 15px; color: var(--tinta-2); line-height: 1.4; }
.mini-circulos { display: flex; flex-direction: column; gap: 8px; position: absolute; right: 12px; top: 12px; }
.mini-circulos span { width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, 0.6); display: grid; place-items: center; font-size: 15px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8); text-align: center; line-height: 1.05; }
.mini-circulos span small { display: block; font-size: 10px; color: var(--gris); }
.destacado { position: relative; border-radius: 26px; background: rgba(255, 255, 255, 0.35); min-height: 190px; padding: 20px 80px 20px 20px; overflow: hidden; }
.destacado .grande { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.destacado .cuando-g { font-size: 15px; color: var(--tinta-2); margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.destacado .cuando-g svg { width: 16px; height: 16px; }
.destacado .ilus-fondo { position: absolute; right: -8px; bottom: -16px; width: 120px; opacity: 0.85; pointer-events: none; }

/* En el teléfono, el vidrio esmerilado DENTRO de lo que se desliza deja rastros y píxeles
   corridos en Safari: ahí se usa el color sólido translúcido (se ve casi igual). El vidrio
   se queda en lo flotante: barra, caja de texto, hojas y avisos. */
@media (hover: none) {
  .desliza *, .alarma, .renglon, .panel, .ficha, .mosaico, .mosaico .pie .circulo, .msj .burbuja, .cabeza .circulo {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .mancha { will-change: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* vida en los mosaicos: las ondas laten y el reloj se sacude cada tanto */
.mosaico .barra-onda { transform-box: fill-box; transform-origin: center; animation: ondaBarra 1.3s ease-in-out infinite; animation-delay: calc(var(--d) * 90ms); }
@keyframes ondaBarra { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.45); } }
.mosaico .reloj-ilus { transform-box: fill-box; transform-origin: 50% 60%; animation: relojSacude 6s ease-in-out infinite 2s; }
@keyframes relojSacude { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(-9deg); } 90% { transform: rotate(8deg); } 92% { transform: rotate(-6deg); } 94% { transform: rotate(4deg); } 96% { transform: rotate(-2deg); } }
.tarjeta .barra-onda, .tarjeta .reloj-ilus { animation: none; }
