@font-face {
  font-family: "Nunito Sans";
  src: url(assets/nunito-sans.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  font-family: "Nunito Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --ink: #2b2733;
  --ink-soft: #5e5867;
  --ink-faint: #746d7e;
  --line: #ece9f1;
  --field: #928b9b;
  --surface: #fff;
  --canvas: #f8f7fa;
  --lane: #f1eff5;
  --accent: #6d5688;
  --accent-ink: #574270;
  --accent-soft: #f0ebf7;
  --accent-ring: #ddd3ec;
  --danger: #963a50;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color: var(--ink);
  background: var(--surface);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; font-size: 14px; line-height: 1.4; }
button, textarea, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.symbols { position: absolute; width: 0; height: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--accent-ring); }

/* Colores de proyecto: el tinte llena la tarjeta y la tinta nombra el proyecto. */
[data-color="0"] { --tint: #f0ebfa; --tint-line: #e2d9f4; --tint-ink: #5a4688; --dot: #8f76c4; }
[data-color="1"] { --tint: #e4f4ec; --tint-line: #cfe9dc; --tint-ink: #27634c; --dot: #47a585; }
[data-color="2"] { --tint: #fcebe1; --tint-line: #f6dccb; --tint-ink: #8c4a24; --dot: #dd8450; }
[data-color="3"] { --tint: #e5f0fb; --tint-line: #d2e3f6; --tint-ink: #2a5a8a; --dot: #5597d6; }
[data-color="4"] { --tint: #fae9ef; --tint-line: #f4d9e3; --tint-ink: #8c3b5a; --dot: #da7096; }
[data-color="5"] { --tint: #f6f1dc; --tint-line: #ece4c4; --tint-ink: #685a1f; --dot: #bca13e; }
[data-color="6"] { --tint: #e0f3f4; --tint-line: #cbe8ea; --tint-ink: #1c6369; --dot: #3aa4ab; }
[data-color="7"] { --tint: #eceff4; --tint-line: #dde2ea; --tint-ink: #465064; --dot: #7a87a0; }

/* El asistente y el tablero comparten la pantalla sin superponerse. */
.app { height: 100dvh; padding-top: var(--safe-top); display: flex; flex-direction: column; }

.menu { position: relative; flex: none; }
.menu summary {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
  color: var(--ink-faint);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { width: 3.5px; height: 3.5px; border-radius: 50%; background: currentColor; }
.menu summary:hover, .menu[open] summary { background: var(--accent-soft); color: var(--accent-ink); }
.menu-panel {
  position: absolute;
  top: 38px;
  right: 0;
  width: 232px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 40px #2a203a1f;
  z-index: 40;
}
.menu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 13.5px; color: var(--ink); }
.menu-panel button svg { width: 17px; height: 17px; color: var(--ink-faint); }
.menu-panel button:hover { background: var(--accent-soft); }
.menu-panel p { margin: 6px 0 0; padding: 8px 10px 4px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.35; color: var(--ink-faint); }

/* Una sola barra arriba: el logo, Nilo y sus botones (o el chat) hacia la derecha; los controles, al final. */
.topbar {
  position: relative;
  z-index: 30;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 4px 12px;
  background: var(--surface);
}
.nilo {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
}
/* Al activarse, Nilo se traga el logo: las letras corren hacia él y encogen por detrás. Al terminar lo devuelve de un salto. */
.nilo-logo { --logo-w: 82px; --logo-h: 36px; position: relative; flex: none; display: block; width: var(--logo-w); height: var(--logo-h); transition: width .46s cubic-bezier(.3,1.35,.5,1) .08s, margin-right .46s cubic-bezier(.3,1.35,.5,1) .08s; }
.nilo-logo img, .nilo-logo .logo-color { position: absolute; top: 0; right: 0; width: var(--logo-w); height: var(--logo-h); max-width: none; object-fit: contain; transform-origin: 100% 55%; transition: transform .52s cubic-bezier(.3,1.6,.5,1) .08s, opacity .22s .1s; }
.is-active .nilo-logo { width: 0; margin-right: -8px; visibility: hidden; pointer-events: none; transition: width .36s cubic-bezier(.55,0,.8,.45), margin-right .36s cubic-bezier(.55,0,.8,.45), visibility 0s .36s; }
.is-active .nilo-logo img, .is-active .nilo-logo .logo-color { opacity: 0; transform: translateX(40px) scale(.14,.3) rotate(10deg); transition: transform .36s cubic-bezier(.55,-.25,.8,.45), opacity .18s .18s; }
.dock { position: relative; flex: none; transition: margin-right .42s cubic-bezier(.3,1.3,.5,1); }
/* Mientras está abierto deja un carril a su derecha: ahí camina sin pisar los botones. */
.is-active .dock { margin-right: 60px; }
.is-opening .mascot { animation: gulp .62s ease-in-out .24s; }
.is-closing .mascot { animation: spit .56s ease-in-out; }
.mascot {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  transition: transform .2s;
  filter: drop-shadow(0 6px 12px #2a203a26);
}
.mascot:hover { transform: scale(1.06) translateY(1px); }
.mascot:active { transform: scale(.95); }
/* Escuchar es un latido suave de su propio color, que además crece con tu voz. */
.ring { position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--nilo, var(--accent)) 58%, transparent) 58%, transparent); opacity: 0; transform: scale(calc(1 + var(--level, 0) * .36)); transition: opacity .35s, transform .08s linear; pointer-events: none; }
.ring::after { content: ""; position: absolute; inset: 16%; border-radius: 50%; background: color-mix(in srgb, var(--nilo, var(--accent)) 34%, transparent); opacity: 0; }
.is-live .ring { opacity: 1; animation: heartbeat 1.7s ease-in-out infinite; }
.is-live .ring::after { animation: ripple 1.7s ease-out infinite; }
/* Pensando late más rápido y un puntito le da vueltas. */
.is-live.is-thinking .ring { animation-duration: 1s; }
.is-live.is-thinking .ring::after { animation: none; }
.is-live.is-thinking .ring::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle at 50% 6%, var(--nilo, var(--accent)) 0 6%, transparent 7%); animation: spin 1.1s linear infinite; }

/* A la derecha de Nilo: en vivo, audio y archivo. Al activarse se recogen; al grabar, se vuelven las barritas. */
.tools { --tools-w: 108px; position: relative; flex: none; display: flex; align-items: center; width: var(--tools-w); height: 40px; transition: width .4s cubic-bezier(.3,1.25,.5,1), margin-right .4s cubic-bezier(.3,1.25,.5,1); }
.tool-buttons { display: flex; align-items: center; gap: 3px; }
.tool { position: relative; width: 34px; height: 34px; color: var(--accent-ink); background: var(--accent-soft); transition: scale .36s cubic-bezier(.3,1.7,.5,1), opacity .2s, background .15s, color .15s; }
.tool svg { width: 18px; height: 18px; }
.tool:hover, .tool:focus-visible { z-index: 50; }
.tool:hover { background: var(--accent); color: #fff; scale: 1.08; }
.tool:active { scale: .94; }
.tool:nth-child(2) { transition-delay: .04s, .04s, 0s, 0s; }
.tool:nth-child(3) { transition-delay: .08s, .08s, 0s, 0s; }
.tool::after { content: attr(data-tip); position: absolute; top: calc(100% + 7px); left: 50%; padding: 3px 8px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap; opacity: 0; translate: -50% -3px; pointer-events: none; transition: opacity .14s, translate .14s; z-index: 50; }
.tool:hover::after, .tool:focus-visible::after { opacity: 1; translate: -50% 0; }
.is-active .tools { width: 0; margin-right: -8px; visibility: hidden; transition: width .3s ease-in, margin-right .3s ease-in, visibility 0s .3s; }
.is-active .tool { scale: 0; opacity: 0; }
.is-recording .tools { width: 248px; }
.is-recording .tool-buttons { display: none; }
.recorder { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: 0 8px 28px #2a203a14; animation: panelIn .34s cubic-bezier(.3,1.3,.5,1); transform-origin: 0 50%; }
.recorder[hidden] { display: none; }
.recorder .round { width: 32px; height: 32px; }
.note-cancel { color: var(--ink-soft); }
.note-cancel:hover { background: var(--lane); color: var(--ink); }
.note-send { color: #fff; background: var(--accent); }
.note-send:hover { background: var(--accent-ink); }
.note-send svg { stroke-width: 2; }
.note-bars { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; height: 26px; overflow: hidden; }
.note-bars i { flex: none; display: block; width: 3px; height: 100%; border-radius: 2px; background: var(--accent); transform: scaleY(.1); transition: transform .07s linear; }
.note-time { flex: none; font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.is-recording .ring { opacity: 1; animation: heartbeat 1.7s ease-in-out infinite; }
.is-recording .ring::after { animation: ripple 1.7s ease-out infinite; }

.quip {
  position: absolute;
  top: 50%;
  left: calc(100% + 11px);
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(480px, calc(100vw - 640px));
  min-width: 200px;
  padding: 7px 12px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
  transform: translateY(-50%);
  box-shadow: 0 8px 22px #2a203a33;
  animation: quipIn .22s ease-out;
}
.quip::before { content: ""; position: absolute; top: 50%; left: -4px; width: 11px; height: 11px; margin-top: -5.5px; background: inherit; border-radius: 2px; rotate: 45deg; }
.quip[hidden] { display: none; }
.quip-text { display: block; position: relative; color: inherit; font-size: inherit; line-height: inherit; text-align: left; }
.quip-actions { flex: none; display: flex; gap: 5px; }
.quip-actions:empty { display: none; }
.quip-actions button { padding: 3px 10px; border-radius: 999px; background: #ffffff24; color: #fff; font-size: 12.5px; white-space: nowrap; }
.quip-actions button:hover { background: #ffffff45; }

.panel {
  position: relative;
  flex: none;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 28px #2a203a14;
  transform-origin: 0 50%;
  animation: panelIn .46s cubic-bezier(.3,1.4,.5,1) .12s both;
}
.panel[hidden] { display: none; }
/* Los botones salen de Nilo uno tras otro, y vuelven a entrar en orden inverso. */
.panel-controls > * { animation: controlIn .44s cubic-bezier(.3,1.8,.5,1) both; }
.panel-controls > :nth-child(1) { animation-delay: .22s; }
.panel-controls > :nth-child(2) { animation-delay: .29s; }
.panel-controls > :nth-child(3) { animation-delay: .36s; }
.is-closing .panel { pointer-events: none; animation: panelOut .24s cubic-bezier(.5,0,.8,.5) .08s both; }
.is-closing .panel-controls > * { animation: controlOut .18s ease-in both; }
.is-closing .panel-controls > :nth-child(1) { animation-delay: .1s; }
.is-closing .panel-controls > :nth-child(2) { animation-delay: .05s; }
.is-closing .panel-controls > :nth-child(3) { animation-delay: 0s; }
.panel { transition: opacity .2s, translate .2s; }
.is-working .panel { opacity: 0; translate: 0 -10px; pointer-events: none; }
.panel-controls { flex: none; display: flex; align-items: center; gap: 2px; }
.control { width: 32px; height: 32px; color: var(--ink-soft); }
.control svg { width: 17px; height: 17px; }
.control:hover { background: var(--lane); color: var(--ink); }
.control[aria-pressed="false"] { background: #fbf0f2; color: var(--danger); }
.is-paused .ring { opacity: 0 !important; animation: none; }
.is-paused .ring::after { animation: none; }
.meter { position: absolute; bottom: 1px; left: 12px; right: 12px; height: 2px; margin: 0; border-radius: 9px; background: var(--lane); overflow: hidden; }
.meter[hidden] { display: none; }
.meter i { display: block; height: 100%; width: var(--used, 0%); border-radius: inherit; background: var(--accent); transition: width .4s; }
.meter.is-warn i { background: #d9892f; }
.round { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.app.is-dropping .board { background: var(--accent-soft); }

/* Tablero */
.board { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); transition: background .15s; }
.chips { min-width: 0; flex: 0 1 auto; display: flex; align-items: center; gap: 2px; padding: 4px 4px 0; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.chip:hover { background: var(--lane); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--tint); color: var(--tint-ink); font-weight: 600; }
.view-chip { position: relative; flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; margin: 0 4px; padding: 0; border-radius: 50%; background: var(--accent); color: #fff; animation: rise .22s ease-out; }
.view-chip svg { width: 17px; height: 17px; }
.view-chip b { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--accent-ink); color: #fff; font-size: 13px; font-weight: 500; line-height: 1; }
.view-chip:hover b { background: #ffffff59; }
.today-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px 0 8px; border-radius: 999px; font-size: 13px; font-weight: 550; color: #8a6410; background: #fdf3d4; }
.today-chip svg { width: 15px; height: 15px; fill: #e8ae24; stroke: #c98f12; }
.today-chip:hover { background: #fbeab5; }
.chip-add { width: 30px; padding: 0; justify-content: center; color: var(--ink-faint); }
.chip-add svg { width: 15px; height: 15px; }
.toolbar-end { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.account summary { width: 36px; height: 36px; border-radius: 50%; padding: 0; }
.account summary:hover, .account[open] summary { background: none; box-shadow: 0 0 0 2px var(--accent-ring); }
.avatar { display: grid !important; place-items: center; width: 32px !important; height: 32px !important; border-radius: 50%; background: var(--accent-soft) !important; color: var(--accent-ink); font-size: 13.5px; font-weight: 650; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 18px; height: 18px; }
.account-head { padding: 6px 10px 9px; margin-bottom: 4px; border-bottom: 1px solid var(--line); overflow: hidden; }
.account-head strong { display: block; font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-head small { display: block; margin-top: 1px; font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; }
.menu-panel button[hidden] { display: none; }
.option-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.option-controls button { padding: 8px 11px; border-radius: 9px; background: var(--lane); font-size: 13px; }
.option-controls button:hover { background: var(--accent-soft); }
.sort { position: relative; display: flex; align-items: center; height: 30px; padding-left: 9px; border-radius: 999px; color: var(--ink-soft); }
.sort:hover, .sort:focus-within { background: var(--lane); }
.sort svg { width: 15px; height: 15px; }
.sort select { height: 30px; padding: 0 10px 0 5px; border: 0; background: none; appearance: none; font-size: 13px; color: inherit; cursor: pointer; outline: 0; }
.sort:has(select:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }

.columns {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--stacks, 3), minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  padding: 0 16px calc(14px + var(--safe-bottom));
  overflow-x: hidden;
  overflow-y: auto;
}
/* Cada columna apila grupitos: cuando se llena el ancho, el resto baja. */
.stack { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.column {
  flex: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  border-radius: 16px;
  transition: background .15s, box-shadow .15s;
}
.column.is-slot { background: none; outline: 2px dashed var(--dot, var(--accent-ring)); outline-offset: -2px; animation: breathe .7s ease-in-out infinite alternate; }
.column.is-slot > * { visibility: hidden; }
.column.is-born { animation: build .55s cubic-bezier(.2,1.7,.4,1); }
.column.is-target { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-ring); }
.column-head { flex: none; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 13px; }
.column-head { position: relative; }
.column-head > i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, #a79fb3); }
.column-head h2 { min-width: 0; margin: 0; font-size: 13px; font-weight: 650; color: var(--ink); overflow: hidden; }
.column-title { display: block; max-width: 100%; font-weight: inherit; font-size: inherit; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; }
button.column-title:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.goal-sticker { position: absolute; top: 7px; right: 38px; padding: 3px 9px; border-radius: 6px; background: var(--dot, var(--accent)); color: #fff; font-size: 12px; font-weight: 650; white-space: nowrap; box-shadow: 0 4px 10px #2a203a33; rotate: -4deg; animation: slap .45s cubic-bezier(.2,1.5,.4,1); pointer-events: none; z-index: 2; }
.add-goal { flex: none; align-self: flex-start; display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--ink-faint); font-size: 13px; }
.add-goal:hover { border-color: var(--accent-ring); color: var(--accent-ink); background: var(--accent-soft); }
.add-goal svg { width: 15px; height: 15px; }
.column-head span { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.column-add { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-faint); }
.column-add:hover { background: var(--lane); color: var(--ink); }
.column-add svg { width: 15px; height: 15px; }
.column-more { display: block; width: calc(100% - 16px); height: 30px; margin: -4px 8px 8px; border-radius: 9px; font-size: 12.5px; font-weight: 550; color: var(--accent-ink); }
.column-more:hover { background: var(--accent-soft); }
.cards { min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 3px 8px 10px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d9d4e0 transparent; }
.cards:empty { padding: 0; }
.column-empty { padding: 4px 5px 8px; font-size: 12.5px; color: var(--ink-faint); }

.card {
  position: relative;
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 8px 9px 10px;
  border-radius: 11px;
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--tint-line);
  transition: box-shadow .15s, transform .15s, opacity .15s;
}
.card:hover { box-shadow: inset 0 0 0 1px var(--dot), 0 3px 10px #2a203a12; }
.card.starts-group { margin-top: 8px; }
.card.is-high { box-shadow: inset 0 0 0 1px var(--tint-line), inset 3px 0 0 var(--dot); }
.card.is-high:hover { box-shadow: inset 0 0 0 1px var(--dot), inset 3px 0 0 var(--dot), 0 3px 10px #2a203a12; }
.card.is-marked { box-shadow: 0 0 0 2px var(--dot), 0 5px 14px color-mix(in srgb, var(--dot) 28%, transparent); }
.card.is-marked:hover { box-shadow: 0 0 0 2px var(--dot), 0 7px 18px color-mix(in srgb, var(--dot) 38%, transparent); }
.card.is-dim { opacity: .38; filter: saturate(.55); }
.card.is-dim:hover { opacity: .8; filter: none; }
/* Finalizadas: solo el nombre tachado. El botón para reabrir aparece al pasar por encima. */
.done-list { display: flex; flex-direction: column; gap: 0; padding: 0 8px 8px; }
.card.is-done { align-items: center; gap: 0; padding: 1px 5px; border-radius: 6px; background: none; box-shadow: none; }
.card.is-done:hover { background: var(--lane); box-shadow: none; }
.card.is-done.is-marked { box-shadow: 0 0 0 1.5px var(--dot); }
.card.is-done .card-title { font-size: 12.5px; font-weight: 450; line-height: 1.45; color: var(--ink-faint); text-decoration: line-through; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.is-done .check { width: 0; height: 13px; margin: 0; opacity: 0; overflow: hidden; transition: none; }
.card.is-done:hover .check, .card.is-done .check:focus-visible { width: 13px; margin-right: 5px; opacity: 1; }
.card.is-done .check::before { display: none; }
.card.is-done .check::after { left: 4.5px; top: 2px; width: 4px; height: 7px; border-width: 0 1.5px 1.5px 0; }
.done-more { align-self: flex-start; margin: 2px 0 0; padding: 1px 5px; border-radius: 6px; font-size: 12px; font-weight: 550; color: var(--ink-faint); }
.done-more:hover { background: var(--lane); color: var(--accent-ink); }
.card.is-arriving { visibility: hidden; }
.card.is-slot { background: none; box-shadow: none; outline: 2px dashed var(--dot); outline-offset: -2px; animation: breathe .7s ease-in-out infinite alternate; }
.card.is-slot > * { visibility: hidden; }
.card.is-building { animation: build .55s cubic-bezier(.2,1.7,.4,1); }
.card.is-touched { animation: wiggle .5s ease-in-out; }
.card.is-touched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(105deg, transparent 30%, #ffffffd9 50%, transparent 70%) no-repeat; background-size: 250% 100%; animation: shimmer .7s ease-out; }
.card.is-checking .check { background: var(--accent); box-shadow: none; animation: stamp .36s cubic-bezier(.3,1.8,.5,1); }
.card.is-checking .check::after { border-color: #fff; }
.card.is-checking .card-title { background: linear-gradient(currentColor, currentColor) no-repeat 0 55%; background-size: 100% 1.5px; animation: strike .4s ease-out; opacity: .6; transition: opacity .3s; }
.card.is-pulse { animation: pop .5s cubic-bezier(.3,1.5,.6,1), ring 1.6s ease-out; }
.card[draggable="true"] { cursor: grab; }
.card.is-dragging { opacity: .4; }
.check {
  position: relative;
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  background: #ffffffb3;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tint-ink) 60%, transparent);
  transition: background .15s;
}
.check::before { content: ""; position: absolute; inset: -11px; }
.check:hover { background: #fff; }
.check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid transparent;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(42deg);
}
.check:hover::after { border-color: color-mix(in srgb, var(--tint-ink) 55%, transparent); }
.is-done .check { background: var(--accent); box-shadow: none; }
.is-done .check::after { border-color: #fff; }
.card-body { flex: 1; min-width: 0; text-align: left; cursor: inherit; border-radius: 4px; }
.card-title { display: block; font-size: 13.5px; line-height: 1.32; font-weight: 500; overflow-wrap: anywhere; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0 5px; margin-top: 3px; font-size: 12px; line-height: 1.3; color: var(--tint-ink); }
.card-meta b { font-weight: 450; }
.card-meta .tag { font-weight: 550; opacity: .85; }
.card-meta b + b::before { content: "· "; }
/* Vencimiento: el texto y el icono dicen el estado; el color solo lo refuerza. */
.card.is-overdue { box-shadow: inset 0 0 0 1.5px #c9576d, inset 3px 0 0 #c9576d; }
.card.is-due-today { box-shadow: inset 0 0 0 1.5px #dd8a2e, inset 3px 0 0 #dd8a2e; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 5px; min-height: 18px; }
.due-chip { display: inline-flex; align-items: center; gap: 3px; min-width: 0; padding: 1px 7px 1px 4px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.35; color: var(--tint-ink); background: #ffffffa6; }
.due-chip svg { width: 13px; height: 13px; stroke-width: 2; }
.due-chip.is-overdue { background: #fbe4e8; color: #8d2a42; }
.due-chip.is-today { background: #fdeed6; color: #8a4f0a; }
.due-chip.is-tomorrow { background: #fdf3d4; color: #7a5a0c; }
/* Quién tocó la tarea, en fila: el más reciente queda encima, al final. */
.card-people { flex: none; display: inline-flex; align-items: center; margin-left: auto; }
.person { --person: var(--accent); position: relative; flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--person); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 1.5px var(--surface); overflow: hidden; }
.person img { width: 100%; height: 100%; object-fit: cover; }
.card-people .person + .person, .goal-people .person + .person { margin-left: -5px; }
.person.is-assistant { width: 22px; height: 22px; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.person.is-assistant .character-inner, .person.is-assistant .hand { animation: none; }
.person-more { flex: none; margin-left: 3px; font-size: 11px; font-weight: 600; color: var(--tint-ink); }
.goal-people { flex: none; display: inline-flex; align-items: center; margin-left: auto; }
.column-invite { flex: none; width: 28px; height: 28px; display: grid; place-items: center; margin-left: auto; border-radius: 8px; color: var(--ink-faint); }
.goal-people + .column-invite { margin-left: 2px; }
.column-invite:hover { background: var(--lane); color: var(--ink); }
.column-invite svg { width: 16px; height: 16px; }
.column-invite + .column-add { margin-left: 0; }
.due-coming-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 30px; margin-left: 4px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 13px; font-weight: 550; color: #a32c43; background: #fbe4e8; }
.due-coming-chip.has-overdue { color: #8d2a42; background: #fbe4e8; }
.due-coming-chip svg { width: 15px; height: 15px; }
.due-coming-chip:hover { filter: brightness(.97); }
.card-actions { flex: none; display: flex; align-items: center; gap: 1px; }
.card-star { display: inline-flex; align-items: center; gap: 3px; min-width: 20px; height: 20px; justify-content: center; border-radius: 6px; color: var(--tint-ink); opacity: .32; transition: opacity .12s; font-size: 11.5px; font-weight: 650; }
.card-star svg { width: 15px; height: 15px; }
.card:hover .card-star { opacity: .75; }
.card-star:hover, .card-star:focus-visible { opacity: 1 !important; }
.card.is-today { box-shadow: inset 0 0 0 1.5px #e8ae24; }
.card.is-today .card-star { opacity: 1; padding: 0 6px 0 3px; background: #fdf3d4; color: #8a6410; }
.card.is-today .card-star svg { fill: #e8ae24; stroke: #c98f12; }
.card.is-starring .card-star { opacity: 1; animation: stamp .4s cubic-bezier(.3,1.8,.5,1); color: #c98f12; }
.card.is-starring .card-star svg { fill: #e8ae24; }
.card-flag {
  position: relative;
  width: 20px;
  height: 20px;
  margin: -1px -2px 0 0;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--tint-ink);
  opacity: 0;
  transition: opacity .12s;
}
.card-flag svg { width: 14px; height: 14px; }
.card:hover .card-flag, .card-flag:focus-visible { opacity: .65; }
.card-flag:hover { opacity: 1 !important; }
.card-flag[aria-pressed="true"] { opacity: 1; }
.card-flag[aria-pressed="true"] svg { fill: currentColor; }

.quick-add { flex: none; }
.quick-add input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--accent);
  border-radius: 11px;
  background: var(--surface);
  font-size: 13.5px;
  outline: 0;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Nilo cuando viaja por la pantalla */
.character.flying-avatar { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; will-change: transform; filter: drop-shadow(0 6px 10px #2a203a2e); }
.nilo-says {
  position: absolute;
  top: 50%;
  left: calc(100% + 6px);
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-50%) scale(.9);
  transition: opacity .15s, transform .15s;
}
.nilo-says.to-left { left: auto; right: calc(100% + 6px); }
.nilo-says.show { opacity: 1; transform: translateY(-50%); }
.card-ghost { position: fixed; left: 0; top: 0; margin: 0; z-index: 999; pointer-events: none; box-shadow: 0 10px 26px #2a203a26 !important; }
.board.is-staged { pointer-events: none; }

/* Personaje */
.character { display: block; width: 100%; height: 100%; position: relative; }
.character-inner { display: block; position: absolute; inset: 0; transform-origin: 50% 72%; animation: idle 3.8s ease-in-out infinite; }
.nilo-art { display: block; width: 100%; height: 100%; overflow: visible; stroke: none; }
.nilo-fill, .hand { fill: var(--nilo); }
/* Las manitos siempre están: flotan un poco y cada estado o gesto las usa. */
.hand { transform-box: fill-box; transform-origin: center; transition: transform .22s cubic-bezier(.3,1.6,.5,1); filter: brightness(.95); stroke: #2a1040; stroke-opacity: .22; stroke-width: 1.2; animation: handFloat 3.8s ease-in-out infinite; }
.hand-right { animation-delay: -1.9s; }
.shape-option .hand { animation: none; }
.nilo-art { transform: rotate(var(--tilt, 0deg)); transform-origin: 50% 80%; transition: transform .25s; }
.face { transform: translate(var(--look-x, 0), var(--look-y, 0)); transition: transform .16s ease-out; }
.cheek { fill: #ff5f8f; opacity: .3; }
.eye { transform-box: fill-box; transform-origin: center; transition: transform .07s; fill: #2b1d3b; }
.is-blink .eye { transform: scaleY(.08); }
.is-wink .eye.left { transform: scaleY(.08); }
.glint { fill: #fff; }
.mouth { transform-box: fill-box; transform-origin: center; }
.mouth.smile { fill: none; stroke: #2b1d3b; stroke-width: 2.4; stroke-linecap: round; }
.mouth.oh { display: none; fill: #2b1d3b; transition: transform .06s; }
.character[data-state=thinking] .character-inner { animation: thinking 2s ease-in-out infinite; }
.character[data-state=thinking] { --look-x: 3px; --look-y: -2px; }
.character[data-state=listening] .character-inner { animation: attentive 2.6s ease-in-out infinite; }
/* Cara de escucha: ojos abiertos y boquita atenta. Lo demás lo hacen sus gestos (.listen-*). */
.character[data-state=listening]:not(.is-blink) .eye { transform: scale(1.14,1.18); }
.character[data-state=listening] .smile { display: none; }
.character[data-state=listening] .oh { display: block; transform: scale(.5,.42); }
.character[data-state=listening] .cheek { opacity: .4; }
/* Pensando se toca la barbilla, hablando manotea y contento las sube. */
.character[data-state=thinking] .hand-right { transform: translate(-29px, 7px); animation: chinTap .9s ease-in-out infinite alternate; }
.character[data-state=talking] .hand { animation: talkHand .46s ease-in-out infinite alternate; }
.character[data-state=talking] .hand-left { animation-delay: -.23s; }
.character[data-state=happy] .hand { transform: translateY(-30px); animation: cheerHand .3s ease-in-out infinite alternate; }
.character[data-state=happy] .hand-right { animation-delay: -.15s; }
/* Volando y trabajando. */
.flying-avatar .hand { animation: wave .55s ease-in-out infinite alternate; }
.flying-avatar .hand-right { animation-delay: .2s; }
.flying-avatar[data-state=thinking] .hand-right { transform: none; }
.flying-avatar[data-state=happy] .hand { transform: translateY(-30px); }
.flying-avatar[data-pose] .hand { animation: none; }
.flying-avatar[data-pose=hold] .hand-left, .flying-avatar[data-pose=up] .hand-left { transform: translate(14px,-62px) scale(1.1); }
.flying-avatar[data-pose=hold] .hand-right, .flying-avatar[data-pose=up] .hand-right { transform: translate(-14px,-62px) scale(1.1); }
.flying-avatar[data-pose=slam] .hand-left { transform: translate(-6px,24px) scale(1.2); }
.flying-avatar[data-pose=slam] .hand-right { transform: translate(6px,24px) scale(1.2); }
.flying-avatar[data-pose=point] .hand-left { transform: translate(-12px,12px) scale(1.25); }
.character[data-state=happy] .character-inner { animation: happy .9s ease-in-out infinite; }
.character[data-state=talking] .character-inner { animation: listening 1.1s ease-in-out infinite; }
.character[data-state=thinking] .smile, .character[data-state=talking] .smile { display: none; }
.character[data-state=thinking] .oh, .character[data-state=talking] .oh { display: block; }
.character[data-state=thinking] .oh { transform: scale(.55); }
.character[data-viseme=a] .oh { transform: scale(1.25,1.15); }
.character[data-viseme=e] .oh { transform: scale(1.35,.6); }
.character[data-viseme=i] .oh { transform: scale(1.5,.42); }
.character[data-viseme=o] .oh { transform: scale(1,1.05); }
.character[data-viseme=u] .oh { transform: scale(.7,.85); }
.character[data-viseme=closed] .oh { transform: scale(.9,.12); }
.idle-sleep .eye { transform: scaleY(.08); }
.idle-sleep .hand-left { transform: translate(14px,4px); }
.idle-sleep .hand-right { transform: translate(-14px,4px); }
.idle-tilt-left .character-inner { animation: tiltLeft 2s ease-in-out; }
.idle-tilt-right .character-inner { animation: tiltRight 2s ease-in-out; }
.idle-squish .character-inner { animation: squish 2s ease-in-out; }
.idle-stretch .character-inner { animation: stretch 2s ease-in-out; }
.idle-hop .character-inner { animation: happy 1.4s ease-in-out; }
.idle-nod .character-inner { animation: nod 2s ease-in-out; }
.idle-tilt-left .hand-left { transform: translate(20px,4px); }
.idle-tilt-right .hand-right { transform: translate(-20px,4px); }
.idle-squish .hand-left { transform: translateX(-5px); }
.idle-squish .hand-right { transform: translateX(5px); }
.idle-stretch .hand-left { transform: translate(12px,-56px); }
.idle-stretch .hand-right { transform: translate(-12px,-56px); }
.idle-hop .hand { transform: translateY(-30px); }
/* Se rasca la cabeza. */
.idle-scratch .character-inner { animation: scratchBody 2.6s ease-in-out; }
.idle-scratch .hand-right { animation: scratchHand 2.6s ease-in-out; }
.idle-scratch .smile, .idle-think .smile, .idle-pushups .smile { display: none; }
.idle-scratch .oh, .idle-think .oh, .idle-pushups .oh { display: block; transform: scale(.55,.45); }
/* Flexiones: las manitos se quedan en el piso y el cuerpo baja y sube. */
.idle-pushups .character-inner { animation: pushBody .72s ease-in-out infinite; }
.idle-pushups .hand { animation: pushHand .72s ease-in-out infinite; }
.idle-pushups .hand-left { transform: translate(-3px,26px) scale(1.1); }
.idle-pushups .hand-right { transform: translate(3px,26px) scale(1.1); }
.idle-pushups::after { content: ""; position: absolute; top: 4%; right: 2%; width: 13%; height: 18%; border-radius: 50% 50% 50% 50% / 62% 62% 40% 40%; background: #7cc4f5; animation: sweat .72s ease-in infinite; }
/* Se pone de lado, se duerme y respira. */
.idle-nap .character-inner { animation: napBody 8s ease-in-out both; }
.idle-nap .nilo-art { animation: snooze 2.2s ease-in-out infinite; }
.idle-nap .eye { transform: scaleY(.08); }
.idle-nap .hand-left { transform: translate(18px,-6px); }
.idle-nap .hand-right { transform: translate(-16px,6px); }
.idle-nap::before, .idle-nap::after { content: "z"; position: absolute; top: -8%; right: -4%; font-size: 13px; font-weight: 800; line-height: 1; color: var(--accent); opacity: 0; animation: zzz 2.6s ease-out 1s infinite; }
.idle-nap::before { animation-delay: 2.3s; }
/* Saluda. */
.idle-wave .character-inner { animation: tiltRight 2s ease-in-out; }
.idle-wave .hand-right { animation: waveHi 2s ease-in-out; }
/* Aplaude. */
.idle-clap .character-inner { animation: happy .9s ease-in-out infinite; }
.idle-clap .hand-left { transform: translate(26px,17px); animation: clapLeft .24s ease-in-out infinite alternate; }
.idle-clap .hand-right { transform: translate(-26px,17px); animation: clapRight .24s ease-in-out infinite alternate; }
/* Baila. */
.idle-dance .character-inner { animation: danceBody .52s ease-in-out infinite alternate; }
.idle-dance .hand-left { animation: danceHand .52s ease-in-out infinite alternate; }
.idle-dance .hand-right { animation: danceHand .52s ease-in-out -.52s infinite alternate; }
/* Se queda pensando, con la mano en la barbilla. */
.idle-think .character-inner { animation: tiltRight 2.6s ease-in-out; }
.idle-think .hand-right { transform: translate(-29px,7px); animation: chinTap .9s ease-in-out infinite alternate; }
.idle-think::after { content: "?"; position: absolute; top: -14%; right: 0; font-size: 15px; font-weight: 800; line-height: 1; color: var(--accent); animation: bubbleUp 2.6s ease-out both; }
/* Hace malabares con una estrellita. */
.idle-juggle .hand-left { transform: translate(14px,-4px); animation: juggleHand .8s ease-in-out infinite; }
.idle-juggle .hand-right { transform: translate(-14px,-4px); animation: juggleHand .8s ease-in-out -.4s infinite; }
.idle-juggle::after { content: "★"; position: absolute; left: 50%; top: 22%; font-size: 14px; line-height: 1; color: #f2b90c; text-shadow: 0 0 4px #fff; animation: juggleStar .8s ease-in-out infinite alternate; }
/* Se va de paseo hasta donde hay sitio, mira alrededor y vuelve. El que viaja es .dock, para que globo y halo lo acompañen. */
.dock:has(.idle-stroll) { animation: stroll 7s ease-in-out; }
.idle-stroll .character-inner { animation: waddle .5s linear 5, lookAround 1.7s ease-in-out 2.5s, waddle .5s linear 4.2s 5; }
.idle-stroll .hand-left { animation: walkHand .5s ease-in-out infinite alternate; }
.idle-stroll .hand-right { animation: walkHand .5s ease-in-out -.5s infinite alternate; }
.idle-stroll .face { animation: strollFace 7s ease-in-out; }
/* Quiere alcanzar una estrella: se estira, salta dos veces, la estrella se le escapa y se desinfla. */
.idle-reach .character-inner { transform-origin: 50% 96%; animation: reachBody 4.2s cubic-bezier(.4,0,.3,1); }
.idle-reach .hand-right { animation: reachHand 4.2s cubic-bezier(.4,0,.3,1); }
.idle-reach .hand-left { animation: reachOther 4.2s ease-in-out; }
.idle-reach .face { animation: reachFace 4.2s ease-in-out; }
.idle-reach::after { content: "★"; position: absolute; top: -12%; right: -24%; font-size: 14px; line-height: 1; color: #f2b90c; text-shadow: 0 0 4px #fff; animation: reachStar 4.2s ease-in-out both; }
/* Se aplasta como una tortilla, tiembla y vuelve de un brinco. */
.idle-pancake .character-inner { transform-origin: 50% 94%; animation: pancake 3.2s cubic-bezier(.4,0,.3,1); }
.idle-pancake .hand-left { animation: pancakeLeft 3.2s cubic-bezier(.4,0,.3,1); }
.idle-pancake .hand-right { animation: pancakeRight 3.2s cubic-bezier(.4,0,.3,1); }
.idle-pancake .eye { animation: pancakeEye 3.2s ease-in-out; }
/* Bosteza con la mano en la boca. */
.idle-yawn .character-inner { transform-origin: 50% 90%; animation: yawnBody 3.4s ease-in-out; }
.idle-yawn .smile { display: none; }
.idle-yawn .oh { display: block; animation: yawnMouth 3.4s ease-in-out both; }
.idle-yawn .eye { animation: yawnEye 3.4s ease-in-out; }
.idle-yawn .hand-right { animation: yawnHand 3.4s ease-in-out; }
.idle-yawn .hand-left { animation: yawnStretch 3.4s ease-in-out; }
/* Se asoma hacia un lado y hacia el otro, haciéndose sombra con la mano. */
.idle-peek .character-inner { animation: peekBody 3.2s cubic-bezier(.45,.05,.35,1); }
.idle-peek .hand-right { transform: translate(-22px,-24px) scale(1.05) rotate(-20deg); animation: none; }
.idle-peek .face { animation: peekFace 3.2s ease-in-out; }
/* Una pirueta completa: agacharse, saltar, girar y caer con estilo. */
.idle-pirouette .character-inner { transform-origin: 50% 88%; animation: pirouette 2.4s cubic-bezier(.4,0,.3,1); }
.idle-pirouette .hand { animation: none; transform: translateY(-32px) scale(1.05); }
.idle-pirouette::after { content: "✦"; position: absolute; top: 2%; right: -12%; font-size: 12px; line-height: 1; color: #f2b90c; opacity: 0; animation: twinkle 2.4s ease-out; }
/* Aaah… aaah… ¡achís! Toma aire dos veces y estornuda con todo el cuerpo. */
.idle-sneeze .character-inner { transform-origin: 50% 90%; animation: sneezeBody 3.2s cubic-bezier(.4,0,.3,1); }
.idle-sneeze .smile { display: none; }
.idle-sneeze .oh { display: block; animation: sneezeMouth 3.2s ease-in-out both; }
.idle-sneeze .eye { animation: sneezeEye 3.2s ease-in-out; }
.idle-sneeze .cheek { animation: sneezeCheek 3.2s ease-in-out; }
.idle-sneeze .hand { animation: sneezeHand 3.2s ease-in-out; }
.idle-sneeze::after { content: "• ∙ •"; position: absolute; top: 48%; left: 50%; font-size: 12px; line-height: 1; white-space: nowrap; color: #7cc4f5; opacity: 0; translate: -50% 0; animation: sneezeSpray 3.2s ease-out; }
/* Cae de un saltito y se queda temblando como gelatina. */
.idle-jelly .character-inner { transform-origin: 50% 100%; animation: jelly 2.6s ease-in-out; }
.idle-jelly .hand { animation: jellyHand 2.6s ease-in-out; }
/* Bota una pelotita y la sigue con la mirada. */
.idle-dribble .character-inner { animation: dribbleBody .6s ease-in-out infinite; }
.idle-dribble .hand-right { transform: translateY(9px); animation: dribbleHand .6s ease-in-out infinite; }
.idle-dribble .face { animation: dribbleFace .6s ease-in-out infinite; }
.idle-dribble::after { content: ""; position: absolute; top: 76%; right: -12%; width: 22%; height: 22%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffc08a, #f0763e); box-shadow: inset 0 0 0 .5px #a84d1e; animation: dribbleBall .6s cubic-bezier(.5,0,.5,1) infinite; }
/* Hace unos binoculares con las manitos y barre el horizonte. */
.idle-binoculars .character-inner { animation: scanBody 3.8s ease-in-out; }
.idle-binoculars .hand-left { transform: translate(28px,-13px) scale(1.06); animation: none; stroke-width: 3; stroke-opacity: .55; }
.idle-binoculars .hand-right { transform: translate(-28px,-13px) scale(1.06); animation: none; stroke-width: 3; stroke-opacity: .55; }
.idle-binoculars .face { transform: none; }

/* Mientras te escucha: base .character.listen-*, para ganarle a la pose de escucha. */
/* Se lleva la mano a la oreja y se inclina hacia ti. */
.character.listen-ear .character-inner { animation: earBody 3.2s ease-in-out; }
.character.listen-ear .hand-right { animation: earHand 3.2s ease-in-out; }
/* Asiente despacio, como diciendo «te sigo». */
.character.listen-nods .character-inner { transform-origin: 50% 88%; animation: nods 2.6s ease-in-out; }
.character.listen-nods .hand { animation: nodsHand 2.6s ease-in-out; }
/* Camina de lado a lado pensando en lo que dices, con las manitos atrás. */
.dock:has(.listen-pace) { animation: pace 6.4s ease-in-out; }
.character.listen-pace .character-inner { animation: waddle .62s linear infinite; }
.character.listen-pace .hand-left { transform: translate(8px,6px) scale(.9); animation: none; }
.character.listen-pace .hand-right { transform: translate(-8px,6px) scale(.9); animation: none; }
.character.listen-pace .face { animation: paceFace 6.4s ease-in-out; }
/* Se acerca con los ojos muy abiertos: esto se puso interesante. */
.character.listen-leanin .character-inner { transform-origin: 50% 90%; animation: leanIn 3s cubic-bezier(.4,0,.3,1); }
.character.listen-leanin .hand-left { transform: translate(26px,10px); animation: none; }
.character.listen-leanin .hand-right { transform: translate(-26px,10px); animation: none; }
.character.listen-leanin:not(.is-blink) .eye { animation: wideEye 3s ease-in-out; }
/* Se pone de puntitas para ver mejor. */
.character.listen-tiptoe .character-inner { transform-origin: 50% 100%; animation: tiptoe 3.2s cubic-bezier(.4,0,.3,1); }
.character.listen-tiptoe .hand-left { animation: tiptoeHandL 3.2s ease-in-out; }
.character.listen-tiptoe .hand-right { animation: tiptoeHandR 3.2s ease-in-out; }
/* Apoya la carita en las dos manos y se mece, encantado. */
.character.listen-chin .character-inner { animation: chinSway 4s ease-in-out; }
.character.listen-chin .hand-left { transform: translate(15px,1px); animation: none; }
.character.listen-chin .hand-right { transform: translate(-15px,1px); animation: none; }
.character.listen-chin::after { content: "♥"; position: absolute; top: -4%; right: -6%; font-size: 12px; line-height: 1; color: #f0758f; animation: bubbleUp 4s ease-out both; }
/* Ladea la cabeza a un lado y al otro, como un cachorrito. */
.character.listen-curious .character-inner { animation: curious 3.2s cubic-bezier(.4,1.4,.5,1); }
.character.listen-curious .hand-left { animation: curiousHandL 3.2s ease-in-out; }
.character.listen-curious .hand-right { animation: curiousHandR 3.2s ease-in-out; }
/* Se emociona: se agacha y da saltitos con las manos juntas. */
.character.listen-excited .character-inner { transform-origin: 50% 96%; animation: excited 2.4s cubic-bezier(.4,0,.3,1); }
.character.listen-excited .hand-left { transform: translate(27px,6px); animation: clapLeft .3s ease-in-out infinite alternate; }
.character.listen-excited .hand-right { transform: translate(-27px,6px); animation: clapRight .3s ease-in-out infinite alternate; }
.character.listen-excited .smile { display: block; }
.character.listen-excited .oh { display: none; }
/* Toma notas de lo que le dices. */
.character.listen-notes .character-inner { animation: notesBody 1.1s ease-in-out infinite alternate; }
.character.listen-notes .hand-left { transform: translate(24px,15px) scale(1.15,.9); animation: none; }
.character.listen-notes .hand-right { transform: translate(-30px,6px) scale(.85); animation: scribble .5s ease-in-out infinite; }
.character.listen-notes .face { transform: translate(0,3px); }
.character.listen-notes::after { content: "✎"; position: absolute; top: 62%; left: 45%; font-size: 11px; line-height: 1; color: var(--ink); animation: scribble .5s ease-in-out infinite; }
/* Se mece al ritmo de tu voz, con los ojitos entrecerrados. */
.character.listen-sway .character-inner { transform-origin: 50% 94%; animation: swayBody 1.5s ease-in-out infinite; }
.character.listen-sway .hand-left { animation: swayHand 1.5s ease-in-out infinite; }
.character.listen-sway .hand-right { animation: swayHand 1.5s ease-in-out -.75s infinite; }
.character.listen-sway:not(.is-blink) .eye { transform: scale(1.05,.55); }
.character.listen-sway::after { content: "♪"; position: absolute; top: -6%; right: -8%; font-size: 13px; line-height: 1; color: var(--accent); animation: bubbleUp 2.2s ease-out 2 both; }

/* Dormido de verdad: tras un rato sin que pase nada se acuesta de lado, cierra los ojos, respira y le salen zetas. */
.character.is-asleep .character-inner { animation: fallAsleep 2.4s cubic-bezier(.45,.05,.35,1) both; }
.character.is-asleep .nilo-art { animation: snooze 3.4s ease-in-out 2.4s infinite; }
.character.is-asleep .eye { transform: scaleY(.08); transition: transform .9s ease-in .5s; }
.character.is-asleep .glint { opacity: 0; transition: opacity .3s .8s; }
.character.is-asleep .hand { animation: none; transition-delay: 1.2s; }
.character.is-asleep .hand-left { transform: translate(18px,-6px); }
.character.is-asleep .hand-right { transform: translate(-16px,6px); }
.character.is-asleep .cheek { opacity: .5; }
.character.is-asleep::before, .character.is-asleep::after, .mascot:has(.is-asleep)::after { content: "z"; position: absolute; top: 6%; right: -8%; font-weight: 800; line-height: 1; color: var(--accent); opacity: 0; pointer-events: none; animation: zzzDrift 3.6s ease-out 2.2s infinite; }
.character.is-asleep::before { font-size: 11px; }
.character.is-asleep::after { font-size: 14px; animation-delay: 3.4s; }
.mascot:has(.is-asleep)::after { content: "Z"; font-size: 16px; animation-delay: 4.6s; }
/* Se despierta: se endereza, se talla los ojos y se estira. */
.character.is-waking .character-inner { animation: wakeUp 1.2s cubic-bezier(.3,1.2,.5,1); }
.character.is-waking .hand-left { animation: rubLeft 1.2s ease-in-out; }
.character.is-waking .hand-right { animation: rubRight 1.2s ease-in-out; }
.character.is-waking .eye { animation: wakeEye 1.2s ease-in-out; }

/* Efectos */
.fx-particle, .fx-wave { position: fixed; display: block; pointer-events: none; z-index: 1002; }
.fx-wave { border: 2px solid; border-radius: 13px; z-index: 998; }
.fx-pop { position: fixed; z-index: 1003; pointer-events: none; font-style: normal; font-size: 20px; font-weight: 900; color: #ffc61a; -webkit-text-stroke: 1px #8a5a00; paint-order: stroke fill; white-space: nowrap; }

/* Diálogos */
dialog {
  width: min(400px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  box-shadow: 0 24px 70px #1f172b33;
}
dialog::backdrop { background: #271f3347; }
dialog header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
dialog h2 { margin: 0; font-size: 15px; font-weight: 650; }
.dialog-x { width: 30px; height: 30px; margin: -4px -6px -4px 0; border-radius: 8px; font-size: 21px; line-height: 1; color: var(--ink-faint); }
.dialog-x:hover { background: var(--lane); color: var(--ink); }
dialog p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
dialog label, dialog legend { display: block; margin: 12px 0 5px; padding: 0; font-size: 12.5px; font-weight: 550; color: var(--ink-soft); }
form > label:first-of-type { margin-top: 0; }
dialog input:not([type=radio],[type=checkbox]), dialog select {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--field);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
}
dialog select {
  appearance: none;
  padding-right: 28px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23746d7e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 10px center;
}
.voice-picker { display: flex; align-items: center; gap: 8px; }
.voice-picker select { flex: 1; min-width: 0; }
.voice-picker button { flex: none; min-height: 38px; padding: 0 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.voice-picker button:hover { background: var(--accent-ring); }
.voice-preview-status { margin: 5px 0 0; font-size: 12px; color: var(--ink-faint); }
.voice-preview-status:empty { display: none; }
.goal-hint { margin: 5px 0 0 !important; font-size: 12.5px !important; color: var(--accent-ink) !important; }
.goal-hint:empty { display: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segmented { margin: 12px 0 0; padding: 0; border: 0; min-width: 0; }
.segmented legend { margin-top: 0; }
.segmented label { display: inline-block; margin: 0 4px 0 0; }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented span { display: block; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 450; background: var(--canvas); color: var(--ink-soft); cursor: pointer; }
.segmented input:checked + span { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 16px; }
.dialog-actions[hidden] { display: none; }
.dialog-actions.spread { justify-content: space-between; }
.field-title { display: block; margin: 12px 0 5px; font-size: 12.5px; font-weight: 550; color: var(--ink-soft); }
.today-check { display: flex !important; align-items: center; gap: 7px; height: 38px; margin: 0 !important; padding: 0 11px; border: 1px solid var(--field); border-radius: 10px; font-size: 14px !important; font-weight: 450 !important; color: var(--ink) !important; cursor: pointer; }
.today-check input { width: 16px; height: 16px; margin: 0; accent-color: #c98f12; }
.today-check svg { width: 15px; height: 15px; fill: #e8ae24; stroke: #c98f12; }
.dialog-actions button { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; color: var(--ink-soft); }
.dialog-actions button:hover { background: var(--lane); }
.dialog-actions .primary { background: var(--accent); color: #fff; font-weight: 550; }
.dialog-actions .primary:hover { background: var(--accent-ink); }
.google-sign-in { width: 100%; height: 40px; border: 1px solid var(--field); border-radius: 10px; font-weight: 550; font-size: 14px; }
.google-sign-in:hover { background: var(--canvas); }
.import-label { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 450; }
.import-label input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); }
.work-options { display: grid; gap: 7px; }
.work-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 13px; text-align: left; transition: background .15s, border-color .15s; }
.work-option:hover, .work-option[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent-ring); }
.work-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); }
.work-option:hover .work-icon, .work-option[aria-expanded="true"] .work-icon { background: var(--accent); color: #fff; }
.work-icon svg { width: 20px; height: 20px; }
.work-label { min-width: 0; display: grid; gap: 1px; }
.work-label b { font-size: 14px; font-weight: 600; }
.work-label small { font-size: 12.5px; color: var(--ink-faint); }
.work-form { margin-top: 10px; animation: rise .22s ease-out; }
.work-form[hidden] { display: none; }
.work-form textarea { display: block; width: 100%; min-height: 112px; padding: 10px 12px; border: 1px solid var(--field); border-radius: 11px; resize: vertical; background: var(--surface); font-size: 14px; line-height: 1.4; }
.work-form textarea:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px var(--accent-soft); }
.work-form .dialog-actions { margin-top: 9px; }
.work-send, .agent-create { display: inline-flex; align-items: center; gap: 7px; }
.work-send svg, .agent-create svg { width: 16px; height: 16px; stroke-width: 2; }
.dialog-actions .work-send:disabled, .dialog-actions .agent-create:disabled { background: var(--lane); color: #a79fb3; cursor: default; }
/* La primera vez el personalizador es obligatorio: pide nombre y no se puede cerrar sin crearlo. */
.agent-intro, .agent-create { display: none; }
.is-creating .agent-intro { display: block; }
.is-creating .agent-create { display: inline-flex; }
.is-creating .look-done, .is-creating header .dialog-x { display: none; }
.agent-fields { margin-bottom: 4px; }
.due-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.due-picker input { flex: 1 1 140px; width: auto !important; min-width: 0; }
.due-picker button { height: 30px; padding: 0 10px; border-radius: 999px; background: var(--canvas); font-size: 12.5px; color: var(--ink-soft); }
.due-picker button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.share-row { display: flex; gap: 7px; }
.share-row input { flex: 1; min-width: 0; }
.share-send { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 550; }
.share-send:hover:not(:disabled) { background: var(--accent-ink); }
.share-send:disabled { background: var(--lane); color: #a79fb3; cursor: default; }
.share-send svg { width: 16px; height: 16px; }
.share-list { list-style: none; display: grid; gap: 2px; margin: 0; padding: 0; max-height: 190px; overflow-y: auto; }
.share-list li { display: flex; align-items: center; gap: 9px; padding: 5px 2px; }
.share-list .person { width: 30px; height: 30px; font-size: 13px; box-shadow: none; }
.share-who { flex: 1; min-width: 0; display: grid; }
.share-who b { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-who small { font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-tag { flex: none; font-size: 12px; color: var(--ink-faint); }
.share-action { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; font-weight: 550; }
.share-action:hover { background: var(--accent-ring); }
.share-action.is-quiet { background: none; color: var(--ink-faint); }
.share-action.is-quiet:hover { background: var(--lane); color: var(--danger); }
#shareContactsBox[hidden] { display: none; }
.dialog-actions .share-copy { display: inline-flex; align-items: center; gap: 6px; }
.share-copy svg { width: 15px; height: 15px; }
.dialog-note { margin: 10px 0 0; font-size: 12.5px; }
.dialog-note:empty { display: none; }
.look-preview { width: 92px; height: 92px; margin: -4px auto 4px; }
.field-label { margin: 12px 0 6px !important; font-size: 12.5px !important; font-weight: 550; color: var(--ink-soft); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px #2a203a1a; cursor: pointer; }
.swatch[aria-pressed="true"]::after, .swatch-custom.is-active::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--accent); }
.swatch-custom { display: block; margin: 0; background: conic-gradient(#f0837a, #f2d86b, #7fd6b4, #86bff0, #b79ce8, #f29dbb, #f0837a); }
.swatch-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.shape-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.shape-option { padding: 6px 2px 4px; border-radius: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--ink-soft); }
.shape-option:hover { background: var(--canvas); }
.shape-option[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.shape-option .character { width: 40px; height: 40px; }
.shape-option .character-inner { animation: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  width: max-content;
  max-width: calc(100vw - 28px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .18s, transform .18s;
  pointer-events: none;
  z-index: 1001;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.show button { pointer-events: auto; }
.toast button { flex: none; color: #d9c9f2; font-weight: 600; }
.toast button:hover { color: #fff; }

/* Vistas de transición al ordenar o filtrar */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-group(*) { animation-duration: .26s; animation-timing-function: cubic-bezier(.3,.7,.3,1); }

@keyframes slap { 0% { transform: scale(2.6) rotate(12deg); opacity: 0; } 60% { opacity: 1; } }
@keyframes quipIn { from { opacity: 0; transform: translate(-8px, -50%); } }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }
@keyframes pop { 0% { transform: scale(.96); } 60% { transform: scale(1.015); } }
@keyframes ring { 0% { outline: 2px solid var(--dot); outline-offset: 0; } 100% { outline: 2px solid transparent; outline-offset: 5px; } }
@keyframes idle { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2px) scale(.98,1.025); } 75% { transform: scale(1.035,.96); } }
@keyframes attentive { 0%, 100% { transform: rotate(-4deg) translateY(-1px); } 50% { transform: rotate(-1deg) scale(1.02); } }
@keyframes thinking { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(4deg) scale(1.03,.95); } }
@keyframes listening { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) scale(1.03,.97); } }
@keyframes happy { 0%, 100% { transform: scale(1.04,.95); } 50% { transform: translateY(-5px) scale(.97,1.04); } }
@keyframes tiltLeft { 50% { transform: rotate(-10deg); } }
@keyframes tiltRight { 50% { transform: rotate(10deg); } }
@keyframes squish { 50% { transform: scale(1.1,.83); } }
@keyframes stretch { 50% { transform: scale(.9,1.1); } }
@keyframes nod { 40% { transform: scale(1.04,.94); } 70% { transform: scale(.98,1.03); } }
@keyframes build { 0% { transform: scale(.15) rotate(-5deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes breathe { to { opacity: .5; } }
@keyframes wiggle { 25% { transform: rotate(-1.2deg); } 60% { transform: rotate(1deg); } }
@keyframes shimmer { from { background-position: 160% 0; } to { background-position: -60% 0; } }
@keyframes stamp { 0% { transform: scale(1.7); } }
@keyframes strike { from { background-size: 0 1.5px; } }
@keyframes wave { to { translate: 0 -5px; } }
@keyframes handFloat { 50% { translate: 0 -2px; } }
@keyframes chinTap { to { translate: 0 -2.5px; } }
@keyframes talkHand { from { translate: 0 2px; } to { translate: 0 -6px; } }
@keyframes cheerHand { to { translate: 0 -5px; } }
@keyframes scratchBody { 0%, 100% { transform: none; } 15%, 85% { transform: rotate(6deg); } }
@keyframes scratchHand { 0%, 100% { transform: none; } 16%, 36%, 56%, 76% { transform: translate(-19px,-47px) scale(1.05); } 26%, 46%, 66%, 84% { transform: translate(-9px,-42px) scale(1.05) rotate(20deg); } }
@keyframes pushBody { 50% { transform: translateY(14%) scale(1.05,.95); } }
@keyframes pushHand { 50% { translate: 0 -14px; } }
@keyframes sweat { from { translate: 0 0; opacity: 1; scale: .7; } to { translate: 90% 90%; opacity: 0; scale: 1; } }
@keyframes napBody { 0%, 100% { transform: none; } 10%, 90% { transform: translateY(9%) rotate(84deg); } }
@keyframes snooze { 50% { scale: 1.04 .96; } }
@keyframes zzz { 0% { opacity: 0; transform: translate(0,0) scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(16px,-20px) scale(1.2); } }
@keyframes waveHi { 0%, 100% { transform: none; } 15%, 35%, 55%, 75% { transform: translate(8px,-44px) scale(1.1) rotate(-14deg); } 25%, 45%, 65%, 85% { transform: translate(-3px,-46px) scale(1.1) rotate(14deg); } }
@keyframes clapLeft { to { translate: 7px 0; } }
@keyframes clapRight { to { translate: -7px 0; } }
@keyframes danceBody { from { transform: rotate(-9deg) translateY(0); } to { transform: rotate(9deg) translateY(-6%); } }
@keyframes danceHand { from { transform: translateY(-34px); } to { transform: translateY(6px); } }
@keyframes bubbleUp { 0% { opacity: 0; transform: translateY(8px) scale(.5); } 20%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-5px); } }
@keyframes juggleHand { 50% { translate: 0 -7px; } }
@keyframes juggleStar { from { transform: translate(-90%,10%) rotate(-40deg); } to { transform: translate(-10%,-240%) rotate(200deg); } }
@keyframes gulp { 0%, 100% { transform: none; } 22% { transform: scale(1.2,.82); } 44% { transform: scale(.88,1.14) translateY(-4%); } 66% { transform: scale(1.07,.95); } 84% { transform: scale(.98,1.02); } }
@keyframes spit { 0%, 100% { transform: none; } 24% { transform: scale(.86,1.12); } 44% { transform: scale(1.18,.84) translateX(-5%); } 68% { transform: scale(.96,1.05); } 86% { transform: scale(1.02,.98); } }
@keyframes panelIn { from { opacity: 0; transform: translateX(-34px) scale(.28,.5); } }
@keyframes panelOut { to { opacity: 0; transform: translateX(-34px) scale(.28,.5); } }
@keyframes controlIn { from { opacity: 0; scale: 0; rotate: -50deg; } }
@keyframes controlOut { to { opacity: 0; scale: 0; rotate: -30deg; } }
@keyframes heartbeat { 0%, 62%, 100% { scale: 1; } 14% { scale: 1.17; } 28% { scale: 1.03; } 42% { scale: 1.22; } }
@keyframes ripple { 0% { opacity: 0; transform: scale(.85); } 18% { opacity: .75; } 100% { opacity: 0; transform: scale(1.75); } }
@keyframes waddle { 0%, 100% { transform: rotate(-6deg) scale(1.05,.94); } 25%, 75% { transform: translateY(-12%) scale(.97,1.05); } 50% { transform: rotate(6deg) scale(1.05,.94); } }
@keyframes walkHand { from { translate: -2px 4px; } to { translate: 2px -6px; } }
@keyframes stroll { 0% { translate: 0 0; } 35%, 60% { translate: var(--walk, 60px) 0; } 96%, 100% { translate: 0 0; } }
@keyframes pace { 0% { translate: 0 0; } 44%, 52% { translate: var(--walk, 50px) 0; } 96%, 100% { translate: 0 0; } }
@keyframes lookAround { 0%, 100% { transform: none; } 25% { transform: rotate(-9deg) scale(1.03,.98); } 50% { transform: scale(1,1); } 75% { transform: rotate(9deg) scale(1.03,.98); } }
@keyframes strollFace { 0%, 33% { transform: translate(calc(var(--walk-dir, 1) * 4px),0); } 42% { transform: translate(-4.5px,-1px); } 52% { transform: translate(5px,-1px); } 60%, 94% { transform: translate(calc(var(--walk-dir, 1) * -4px),0); } 100% { transform: none; } }
@keyframes paceFace { 0%, 42% { transform: translate(calc(var(--walk-dir, 1) * 4px),0); } 54%, 94% { transform: translate(calc(var(--walk-dir, 1) * -4px),0); } 100% { transform: none; } }
@keyframes reachBody { 0%, 100% { transform: none; } 9% { transform: scale(1.1,.88); } 24%, 40% { transform: scale(.87,1.2) rotate(3deg); } 32% { transform: scale(.85,1.22) rotate(5deg); } 48% { transform: translateY(-14%) scale(.86,1.2) rotate(4deg); } 56% { transform: scale(1.2,.78); } 66% { transform: translateY(-18%) scale(.84,1.22) rotate(5deg); } 74% { transform: scale(1.26,.72); } 82% { transform: scale(1.14,.84); } 92% { transform: scale(.98,1.03); } }
@keyframes reachHand { 0%, 100% { transform: none; } 20%, 44% { transform: translate(-8px,-72px) scale(1.05); } 32% { transform: translate(-4px,-77px) scale(1.05); } 48% { transform: translate(-3px,-84px) scale(1.08); } 56% { transform: translate(-8px,-60px); } 66% { transform: translate(-2px,-88px) scale(1.08); } 76% { transform: translate(2px,6px); } 90% { transform: none; } }
@keyframes reachOther { 0%, 100% { transform: none; } 24%, 66% { transform: translate(-4px,8px); } 76% { transform: translate(-3px,6px); } }
@keyframes reachFace { 0%, 100% { transform: none; } 18%, 68% { transform: translate(3px,-5px); } 76%, 90% { transform: translate(0,3px); } }
@keyframes reachStar { 0% { opacity: 0; transform: translateY(8px) scale(.3); } 12%, 40% { opacity: 1; transform: none; } 30% { transform: translateY(-3px) rotate(14deg); } 52% { opacity: 1; transform: translate(4px,-1px) rotate(-10deg); } 68% { opacity: 1; transform: translate(9px,-3px) rotate(20deg); } 84% { opacity: 1; transform: translate(11px,-3px); } 100% { opacity: 0; transform: translate(16px,-5px) scale(.4) rotate(90deg); } }
@keyframes pancake { 0%, 100% { transform: none; } 8% { transform: scale(.92,1.12) translateY(-5%); } 20% { transform: scale(1.5,.36); } 28% { transform: scale(1.4,.46); } 36% { transform: scale(1.5,.36); } 44% { transform: scale(1.44,.42); } 56% { transform: scale(1.5,.36); } 68% { transform: scale(.82,1.26) translateY(-14%); } 79% { transform: scale(1.12,.88); } 89% { transform: scale(.97,1.04); } }
@keyframes pancakeLeft { 0%, 100% { transform: none; } 20%, 56% { transform: translate(-13px,13px) scale(1.1,.8); } 68% { transform: translate(6px,-34px); } 80% { transform: translateY(-4px); } }
@keyframes pancakeRight { 0%, 100% { transform: none; } 20%, 56% { transform: translate(13px,13px) scale(1.1,.8); } 68% { transform: translate(-6px,-34px); } 80% { transform: translateY(-4px); } }
@keyframes pancakeEye { 0%, 16%, 60%, 100% { transform: none; } 22%, 54% { transform: scale(.9,1.55); } }
@keyframes yawnBody { 0%, 100% { transform: none; } 16% { transform: scale(1.04,.96); } 42%, 58% { transform: scale(.91,1.14) rotate(-3deg); } 72% { transform: scale(1.06,.93); } 84% { transform: scale(1.02,.98) rotate(2deg); } }
@keyframes yawnMouth { 0%, 100% { transform: scale(.3,.2); } 42%, 60% { transform: scale(1.5,1.7); } 74% { transform: scale(.7,.5); } }
@keyframes yawnEye { 0%, 100% { transform: none; } 34%, 66% { transform: scaleY(.1); } 78% { transform: scaleY(.45); } }
@keyframes yawnHand { 0%, 26%, 80%, 100% { transform: none; } 42%, 62% { transform: translate(-33px,-2px) scale(.95); } 52% { transform: translate(-31px,-4px) scale(.95); } }
@keyframes yawnStretch { 0%, 100% { transform: none; } 42%, 64% { transform: translate(-6px,-40px); } }
@keyframes peekBody { 0%, 100% { transform: none; } 8% { transform: scale(1.05,.95); } 26%, 40% { transform: translateX(14%) rotate(26deg) scale(.98,1.02); } 50% { transform: scale(1.06,.94); } 68%, 82% { transform: translateX(-14%) rotate(-26deg) scale(.98,1.02); } 92% { transform: scale(1.03,.97); } }
@keyframes peekFace { 0%, 100% { transform: none; } 26%, 40% { transform: translate(4.5px,-1px); } 68%, 82% { transform: translate(-4.5px,-1px); } }
@keyframes pirouette { 0%, 100% { transform: none; } 14% { transform: scale(1.18,.78); } 28% { transform: translateY(-12%) scale(.9,1.14); } 40% { transform: translateY(-20%) scaleX(-.9); } 52% { transform: translateY(-22%) scaleX(.9); } 62% { transform: translateY(-16%) scaleX(-.9); } 72% { transform: translateY(-5%) scale(.92,1.1); } 80% { transform: scale(1.22,.76); } 90% { transform: scale(.96,1.05); } }
@keyframes twinkle { 0%, 66% { opacity: 0; transform: scale(.3); } 82% { opacity: 1; transform: scale(1.2) rotate(60deg); } 100% { opacity: 0; transform: scale(.4) rotate(140deg); } }
@keyframes sneezeBody { 0%, 100% { transform: none; } 16% { transform: scale(.94,1.1) rotate(-4deg); } 26% { transform: scale(1.01,1); } 44% { transform: scale(.88,1.17) rotate(-7deg) translateY(-3%); } 51% { transform: scale(.86,1.2) rotate(-8deg) translateY(-4%); } 56% { transform: scale(1.3,.72) rotate(6deg) translateY(4%); } 64% { transform: scale(.94,1.08) rotate(-2deg); } 72% { transform: scale(1.05,.96) rotate(2deg); } 82% { transform: rotate(-3deg); } 90% { transform: rotate(3deg); } }
@keyframes sneezeMouth { 0%, 8%, 100% { transform: scale(.3,.2); } 16% { transform: scale(.8,.9); } 26% { transform: scale(.4,.3); } 50% { transform: scale(1.1,1.3); } 56% { transform: scale(1.5,.5); } 66% { transform: scale(.4,.3); } }
@keyframes sneezeEye { 0%, 6%, 72%, 100% { transform: none; } 16%, 26% { transform: scaleY(.45); } 48%, 62% { transform: scaleY(.08); } }
@keyframes sneezeCheek { 0%, 60%, 100% { opacity: .3; } 72%, 90% { opacity: .85; } }
@keyframes sneezeHand { 0%, 100% { transform: none; } 50% { transform: translateY(6px); } 56% { transform: translateY(-20px) scale(1.1); } 66% { transform: translateY(-4px); } }
@keyframes sneezeSpray { 0%, 54% { opacity: 0; transform: translateY(0) scale(.4); } 58% { opacity: 1; transform: translateY(6px) scale(1); } 76% { opacity: 0; transform: translateY(18px) scale(1.7); } 100% { opacity: 0; } }
@keyframes jelly { 0%, 100% { transform: none; } 8% { transform: scale(1.12,.86); } 20% { transform: translateY(-22%) scale(.88,1.16); } 32% { transform: scale(1.32,.68); } 42% { transform: scale(.86,1.16) skewX(7deg); } 52% { transform: scale(1.14,.88) skewX(-6deg); } 62% { transform: scale(.94,1.07) skewX(4deg); } 72% { transform: scale(1.06,.95) skewX(-3deg); } 82% { transform: scale(.98,1.02) skewX(1.5deg); } 92% { transform: scale(1.01,.99); } }
@keyframes jellyHand { 0%, 100% { transform: none; } 20% { transform: translateY(-28px); } 32% { transform: translateY(9px); } 46% { transform: translateY(-9px); } 62% { transform: translateY(4px); } 78% { transform: translateY(-2px); } }
@keyframes dribbleBody { 0%, 100% { transform: scale(1.03,.97); } 50% { transform: translateY(-3%) scale(.98,1.03); } }
@keyframes dribbleHand { 0%, 100% { translate: 0 2px; } 50% { translate: 0 -5px; } }
@keyframes dribbleFace { 0%, 100% { transform: translate(3.5px,3px); } 50% { transform: translate(3.5px,.5px); } }
@keyframes dribbleBall { 0%, 100% { transform: translateY(-34%) scale(1,1); } 46% { transform: translateY(92%) scale(1,1); } 52% { transform: translateY(100%) scale(1.22,.74); } 58% { transform: translateY(88%) scale(1,1); } }
@keyframes scanBody { 0%, 100% { transform: none; } 12% { transform: scale(1.04,.96); } 30%, 42% { transform: translateX(-9%) rotate(-11deg); } 62%, 76% { transform: translateX(9%) rotate(11deg); } 90% { transform: translateY(-3%); } }
@keyframes earBody { 0%, 100% { transform: rotate(-3deg); } 22%, 78% { transform: rotate(13deg) scale(1.03,.98); } 50% { transform: rotate(11deg) scale(1.01,1); } }
@keyframes earHand { 0%, 100% { transform: none; } 20%, 80% { transform: translate(-1px,-26px) scale(1.08); } 40%, 60% { transform: translate(-2px,-23px) scale(1.08) rotate(10deg); } }
@keyframes nods { 0%, 100% { transform: none; } 16%, 48%, 80% { transform: scale(1.06,.9) translateY(2%); } 32%, 64%, 92% { transform: scale(.98,1.04); } }
@keyframes nodsHand { 0%, 100% { translate: 0 0; } 16%, 48%, 80% { translate: 0 3px; } 32%, 64%, 92% { translate: 0 -2px; } }
@keyframes leanIn { 0%, 100% { transform: none; } 14% { transform: scale(.96,1.02) translateY(2%); } 34%, 76% { transform: scale(1.2) translateY(3%); } 55% { transform: scale(1.22,1.18) translateY(3%) rotate(2deg); } 88% { transform: scale(.98,1.02); } }
@keyframes wideEye { 0%, 100% { transform: scale(1.14,1.18); } 34%, 76% { transform: scale(1.32,1.4); } }
@keyframes tiptoe { 0%, 100% { transform: none; } 12% { transform: scale(1.08,.9); } 30%, 72% { transform: translateY(-7%) scale(.88,1.17); } 42% { transform: translateY(-7%) scale(.88,1.17) rotate(-5deg); } 60% { transform: translateY(-7%) scale(.88,1.17) rotate(5deg); } 84% { transform: scale(1.1,.88); } 94% { transform: scale(.98,1.02); } }
@keyframes tiptoeHandL { 0%, 100% { transform: none; } 30%, 72% { transform: translate(-6px,6px); } }
@keyframes tiptoeHandR { 0%, 100% { transform: none; } 30%, 72% { transform: translate(6px,6px); } }
@keyframes chinSway { 0%, 100% { transform: none; } 20% { transform: rotate(-7deg) scale(1.02,.98); } 50% { transform: rotate(7deg) scale(1.02,.98); } 80% { transform: rotate(-5deg) scale(1.02,.98); } }
@keyframes curious { 0%, 100% { transform: none; } 16%, 40% { transform: rotate(-17deg) scale(1.02,.98); } 56%, 82% { transform: rotate(17deg) scale(1.02,.98); } }
@keyframes curiousHandL { 0%, 100% { transform: none; } 16%, 40% { transform: translate(5px,-9px); } 56%, 82% { transform: translate(3px,4px); } }
@keyframes curiousHandR { 0%, 100% { transform: none; } 16%, 40% { transform: translate(-3px,4px); } 56%, 82% { transform: translate(-5px,-9px); } }
@keyframes excited { 0%, 100% { transform: none; } 10% { transform: scale(1.14,.82); } 24% { transform: translateY(-16%) scale(.92,1.1); } 38% { transform: scale(1.14,.84); } 52% { transform: translateY(-14%) scale(.93,1.09); } 66% { transform: scale(1.12,.86); } 80% { transform: translateY(-7%) scale(.96,1.05); } 92% { transform: scale(1.05,.95); } }
@keyframes notesBody { from { transform: rotate(-2deg); } to { transform: rotate(2deg) scale(1.01,.99); } }
@keyframes scribble { 0%, 100% { translate: -2px 0; } 25% { translate: 2px -1.5px; } 50% { translate: -1px 1px; } 75% { translate: 3px 0; } }
@keyframes swayBody { 0%, 100% { transform: rotate(-8deg) scale(1.02,.98); } 50% { transform: rotate(8deg) scale(1.02,.98); } }
@keyframes swayHand { 0%, 100% { translate: 0 2px; } 50% { translate: 0 -6px; } }
@keyframes fallAsleep { 0% { transform: none; } 18% { transform: scale(.94,1.1); } 34% { transform: scale(1.04,.96) rotate(-5deg); } 46% { transform: rotate(-10deg) scale(1.02,.98); } 72% { transform: translateY(12%) rotate(92deg) scale(1.1,.9); } 84% { transform: translateY(9%) rotate(80deg) scale(.98,1.02); } 100% { transform: translateY(10%) rotate(84deg); } }
@keyframes zzzDrift { 0% { opacity: 0; transform: translate(0,4px) scale(.5) rotate(-12deg); } 20% { opacity: 1; } 70% { opacity: .85; } 100% { opacity: 0; transform: translate(24px,-11px) scale(1.25) rotate(10deg); } }
@keyframes wakeUp { 0% { transform: translateY(10%) rotate(84deg); } 42% { transform: translateY(-6%) rotate(-8deg) scale(.92,1.14); } 62% { transform: scale(1.1,.9) rotate(3deg); } 82% { transform: scale(.97,1.04); } 100% { transform: none; } }
@keyframes wakeEye { 0%, 30% { transform: scaleY(.08); } 44% { transform: scaleY(.6); } 54% { transform: scaleY(.08); } 70%, 100% { transform: none; } }
@keyframes rubLeft { 0%, 100% { transform: none; } 30%, 50%, 70% { transform: translate(26px,-12px); } 40%, 60% { transform: translate(22px,-15px); } }
@keyframes rubRight { 0%, 100% { transform: none; } 30%, 50%, 70% { transform: translate(-26px,-12px); } 40%, 60% { transform: translate(-22px,-15px); } }
@keyframes spin { to { rotate: 360deg; } }


/* En pantallas estrechas el diálogo se apila junto al personaje. */
/* El modal de una tarea ya creada: a un lado lo que se edita, al otro todo lo que le ha pasado. */
.task-history { display: none; }
#taskDialog.has-history { width: min(860px, calc(100vw - 28px)); }
#taskDialog.has-history .task-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
#taskDialog.has-history .task-history { display: flex; flex-direction: column; min-height: 0; max-height: min(66dvh, 560px); padding-left: 22px; border-left: 1px solid var(--line); }
.task-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 0; }
.task-dates dt { font-size: 12.5px; font-weight: 550; color: var(--ink-soft); }
.task-dates dd { margin: 3px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.task-history h3 { margin: 16px 0 8px; font-size: 13px; font-weight: 650; }
.task-history .dialog-note { margin: 0 0 8px; }
.history-list { flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 0 4px 0 0; list-style: none; }
.history-entry { display: flex; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line); }
.history-entry:first-child { border-top: 0; padding-top: 2px; }
.history-entry .person.is-unknown { background: var(--lane); color: var(--ink-faint); }
.history-body { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; }
.history-body b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.history-body time { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.history-via { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11.5px; font-weight: 600; }
dialog p.history-change { margin: 4px 0 0; font-size: 12.5px; line-height: 1.35; color: var(--ink-soft); overflow-wrap: anywhere; }
.history-change strong { font-weight: 550; }
.history-change s { color: var(--ink-faint); }

/* La entrega de un objetivo: pantalla completa, por debajo de las estrellas y el confeti. */
.handoff { position: fixed; inset: 0; z-index: 1001; overflow: hidden; }
.handoff.is-leaving { pointer-events: none; }
.handoff.is-leaving .handoff-skip { pointer-events: auto; }
.handoff-sky { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at 26% 70%, color-mix(in srgb, var(--sender) 42%, transparent), transparent 52%), radial-gradient(circle at 74% 70%, color-mix(in srgb, var(--receiver) 42%, transparent), transparent 52%), #fbf9fef2; backdrop-filter: blur(5px); }
.handoff-caption { position: absolute; left: 16px; right: 16px; bottom: max(9dvh, 56px); margin: 0; text-align: center; font-size: clamp(19px, 3.1vw, 30px); font-weight: 750; line-height: 1.2; color: var(--ink); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .3s cubic-bezier(.3,1.5,.5,1); }
.handoff-caption.show { opacity: 1; transform: none; }
.handoff-skip { position: absolute; top: max(14px, var(--safe-top)); right: 16px; height: 34px; padding: 0 14px; border-radius: 999px; background: #2b27331a; color: var(--ink); font-size: 13px; font-weight: 550; }
.handoff-skip:hover { background: #2b27332b; }
.character.handoff-actor { position: absolute; left: 0; top: 0; will-change: transform; transform-origin: 50% 90%; filter: drop-shadow(0 12px 16px #2a203a33); }
.handoff-actor .hand { animation: none; }
.handoff-actor[data-state=happy] .hand { animation: cheerHand .3s ease-in-out infinite alternate; }
.handoff-actor[data-pose=hold] .hand-left { transform: translate(14px,-62px) scale(1.1); }
.handoff-actor[data-pose=hold] .hand-right { transform: translate(-14px,-62px) scale(1.1); }
.handoff-actor.is-from[data-pose=windup] .hand-right { transform: translate(calc(var(--reach) - 30px), var(--raise)) scale(1.5); }
.handoff-actor.is-from[data-pose=windup] .hand-left { transform: translate(8px,-6px); }
.handoff-actor.is-to[data-pose=windup] .hand-left { transform: translate(calc(30px - var(--reach)), var(--raise)) scale(1.5); }
.handoff-actor.is-to[data-pose=windup] .hand-right { transform: translate(-8px,-6px); }
.handoff-actor[data-pose=slap] .hand { transition-duration: .1s; }
.handoff-actor.is-from[data-pose=slap] .hand-right { transform: translate(var(--reach), var(--raise)) scale(1.7); }
.handoff-actor.is-to[data-pose=slap] .hand-left { transform: translate(calc(0px - var(--reach)), var(--raise)) scale(1.7); }
.handoff-bubble { position: absolute; bottom: calc(100% + 4px); width: max-content; max-width: min(230px, 56vw); padding: 7px 12px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.25; text-align: center; opacity: 0; transform: translateY(6px) scale(.9); transition: opacity .16s, transform .22s cubic-bezier(.3,1.6,.5,1); }
/* Cada burbuja crece hacia el centro de la pantalla, para no salirse por el borde. */
.handoff-actor.is-from .handoff-bubble { left: 0; transform-origin: 20% 100%; }
.handoff-actor.is-to .handoff-bubble { right: 0; transform-origin: 80% 100%; }
.handoff-bubble.show { opacity: 1; transform: none; }
.handoff-gift { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; gap: 2px; padding: 16px 16px 12px; border: 2px solid var(--tint-line, var(--line)); border-radius: 16px; background: #fff; box-shadow: 0 16px 34px #2a203a33; transform-origin: 50% 50%; will-change: transform; text-align: center; }
.handoff-gift small { font-size: 12px; font-weight: 550; color: var(--tint-ink, var(--ink-soft)); }
.handoff-gift b { font-size: 16px; font-weight: 750; line-height: 1.22; color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.handoff-ribbon { position: absolute; left: 50%; top: -9px; width: 34px; height: 18px; margin-left: -17px; border-radius: 9px; background: var(--dot, var(--accent)); box-shadow: 0 2px 5px #2a203a33; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.handoff-gift.is-open .handoff-ribbon { transform: translateY(-16px) rotate(-14deg) scale(1.12); }
.handoff-gift.is-still { position: relative; }
.handoff-flash { position: absolute; width: 60px; height: 60px; margin: -30px; border-radius: 50%; background: #fff3b0; box-shadow: 0 0 44px 22px #ffc400; animation: handoffFlash .42s ease-out forwards; }
.handoff-ring { position: absolute; width: 90px; height: 90px; margin: -45px; border: 5px solid #ffc400; border-radius: 50%; opacity: 0; animation: handoffRing .72s cubic-bezier(.2,.7,.3,1) forwards; }
.handoff-word { position: absolute; font-size: clamp(34px, 7vw, 68px); font-weight: 900; color: #ffc61a; -webkit-text-stroke: 2px #8a5a00; paint-order: stroke fill; white-space: nowrap; animation: handoffWord .95s cubic-bezier(.2,1.4,.4,1) forwards; }
.handoff-mini { position: absolute; left: 0; top: 0; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--tint, #fff); border: 1px solid var(--tint-line, var(--line)); box-shadow: 0 6px 14px #2a203a1f; color: var(--ink); font-size: 13px; font-weight: 550; line-height: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform-origin: 0 0; will-change: transform; }
.column.is-receiving .card:not(.is-landed) { opacity: 0; }
.card.is-landed { animation: handoffLand .34s cubic-bezier(.3,1.6,.5,1); }
.gift-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0 6px; }
.gift-stage .character { width: 110px; height: 110px; }
.gift-stage .handoff-gift { width: min(250px, 100%); }
#giftDialog h2 { margin: 12px 0 6px; text-align: center; font-size: 17px; font-weight: 700; }
#giftDialog > p { text-align: center; }
@keyframes handoffFlash { from { transform: scale(.2); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }
@keyframes handoffRing { 0% { transform: scale(.2); opacity: .95; } 100% { transform: scale(4.4); opacity: 0; } }
@keyframes handoffWord { 0% { transform: translate(-50%,-50%) scale(.3) rotate(-10deg); opacity: 0; } 30% { transform: translate(-50%,-90%) scale(1.15) rotate(-5deg); opacity: 1; } 72% { transform: translate(-50%,-105%) scale(1) rotate(-5deg); opacity: 1; } 100% { transform: translate(-50%,-135%) scale(.95) rotate(-5deg); opacity: 0; } }
@keyframes handoffLand { from { transform: scale(.92); } 60% { transform: scale(1.03); } to { transform: none; } }

@media (max-width: 759px) {
  #taskDialog.has-history .task-layout { display: block; }
  #taskDialog.has-history .task-history { max-height: none; margin-top: 16px; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .history-list { overflow: visible; }
  .topbar { padding: 4px 8px; }
  .chip { height: 34px; }
  .sort { padding-left: 7px; }
  .sort select { font-size: 13px; padding-right: 6px; }
  .columns { padding: 0 10px calc(14px + var(--safe-bottom)); }
  .stack { gap: 4px; }
  .column { background: none; }
  .column-more { width: 100%; margin: -6px 0 6px; }
  .add-goal { width: 100%; }
  .column-head { height: 36px; padding: 0 0 0 4px; }
  .column-add { width: 36px; height: 36px; }
  .cards, .column:last-child .cards { overflow: visible; padding: 0 0 10px; }
  .column-empty { display: none; }
  .card { padding: 11px 10px 11px 12px; }
  .card-title { font-size: 14.5px; }
  .check { width: 20px; height: 20px; }
  .check::after { left: 7px; top: 4px; width: 6px; height: 10px; }
  .card-flag { display: none; }
  .card-flag[aria-pressed="true"] { display: grid; }
  .nilo { height: 46px; gap: 6px; }
  .nilo-logo { --logo-w: 64px; --logo-h: 30px; }
  .is-active .dock { margin-right: 30px; }
  .tool { width: 34px; height: 34px; }
  .is-recording .tools { width: 196px; }
  .is-recording .nilo-logo { width: 0; margin-right: -6px; visibility: hidden; transition: width .3s ease-in, margin-right .3s ease-in, visibility 0s .3s; }
  .is-recording .nilo-logo img { opacity: 0; }
  .note-time { display: none; }
  .is-active .nilo-logo { margin-right: -6px; }
  .quip-actions { margin-top: 5px; flex-wrap: wrap; }
  .mascot { width: 40px; height: 40px; }
  .panel { height: 40px; padding: 0 4px; }
  .round { width: 38px; height: 38px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  dialog input:not([type=radio],[type=checkbox]), dialog select { height: 42px; font-size: 16px; }
}

/* Sin ancho para un globo al lado, va debajo de Nilo: así una noticia larga no se corta por arriba de la pantalla. */
@media (max-width: 1100px) {
  .quip { display: block; top: calc(100% + 9px); left: -54px; max-width: min(420px, calc(100vw - 100px)); padding: 6px 10px; font-size: 12.5px; transform: none; animation-name: rise; z-index: 40; }
  .quip::before { top: -4px; left: 20px; margin-top: 0; }
  .quip-actions { margin-top: 5px; }
}

@media (max-width: 430px) {
  .topbar { gap: 4px; padding-inline: 5px; }
  .nilo { gap: 4px; }
  .nilo-logo { --logo-w: 52px; --logo-h: 25px; }
  .mascot { width: 34px; height: 34px; }
  .tools { --tools-w: 84px; }
  .tool-buttons { gap: 1px; }
  .tool { width: 27px; height: 32px; }
  .tool svg { width: 16px; height: 16px; }
  .toolbar-end { gap: 1px; }
  .chips { gap: 0; padding-inline: 2px; }
  .today-label { display: none; }
  .today-chip { gap: 3px; padding-inline: 7px; }
  .due-coming-chip { gap: 3px; margin-left: 1px; padding-inline: 7px; }
  .view-chip { margin-inline: 3px; }
}

@media (max-width: 360px) {
  .topbar:has(.today-chip):has(.due-coming-chip):has(.view-chip) { flex-wrap: wrap; }
  .topbar:has(.today-chip):has(.due-coming-chip):has(.view-chip) .toolbar-end { flex: 0 0 100%; }
}

@media (hover: none) {
  .card.is-done .check { width: 13px; margin-right: 5px; opacity: 1; }
  .card-flag { opacity: 0; pointer-events: none; }
  .card-flag[aria-pressed="true"] { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
