/* ============ Tokens (paleta cálida al estilo de la app de Claude) ============ */
:root {
  --panel: rgba(250, 249, 245, 0.97);
  --tint: rgba(250, 249, 245, 0.42);
  --base: 250, 249, 245;
  --glass-bright: 1.04;
  --rim: 0.5;
  --mark: rgba(31, 30, 29, 0.2);
  --card: #ffffff;
  --hover: rgba(31, 30, 29, 0.045);
  --soft: #f0eee6;
  --line: rgba(31, 30, 29, 0.09);
  --line-strong: rgba(31, 30, 29, 0.16);
  --text: #1f1e1d;
  --muted: #73726c;
  --faint: #a3a199;
  --dot: rgba(31, 30, 29, 0.22);
  --accent: #d97757;
  --accent-2: #c6613f;
  --accent-soft: rgba(217, 119, 87, 0.13);
  --ok: #6b9a5b;
  --warn: #cf9a3b;
  --late: #c9584b;
  --shadow: 0 1px 2px rgba(31, 30, 29, 0.05), 0 8px 26px rgba(31, 30, 29, 0.09);
  --shadow-lg: 0 2px 6px rgba(31, 30, 29, 0.06), 0 22px 56px rgba(31, 30, 29, 0.18);
  --serif: 'Copernicus', 'Tiempos Headline', Georgia, 'Times New Roman', serif;
  --sans: 'Styrene B', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1);
  --soft-spring: linear(0, 0.022, 0.087 4.3%, 0.335 9.4%, 0.704 16.2%, 0.858 20.4%, 0.968 25%, 1.017 29.1%, 1.04 33.6%, 1.044 37.9%, 1.035 43.2%, 1.005 56.9%, 0.996 66.4%, 1.001);
  --out: cubic-bezier(0.22, 1, 0.36, 1);
  /* Radios con esquina continua al estilo de iOS (ver MOBILE-QUALITY.md §4) */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  /* Curva de las hojas de iOS: sale rápida y frena sin rebote */
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-sheet: 0.5s;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --panel: rgba(38, 38, 36, 0.97);
    --tint: rgba(26, 26, 24, 0.38);
    --base: 28, 28, 26;
    --glass-bright: 0.85;
    --rim: 0.12;
    --mark: rgba(255, 255, 255, 0.2);
    --card: #30302e;
    --hover: rgba(255, 255, 255, 0.05);
    --soft: #383835;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f5f4ef;
    --muted: #a6a39b;
    --faint: #77756e;
    --dot: rgba(255, 255, 255, 0.2);
    --accent-soft: rgba(217, 119, 87, 0.17);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 26px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.3), 0 26px 64px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: transparent; }
body { color: var(--text); font: 13.5px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; user-select: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.ic { flex: none; display: block; }

/* ============ El widget ============ */
#widget {
  position: absolute; inset: 10px; border-radius: 26px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 22px rgba(0, 0, 0, 0.1); overflow: hidden;
  animation: widgetIn 0.9s var(--spring) both;
}
@keyframes widgetIn { from { opacity: 0; transform: scale(0.97); } }
/* Modo widget: cristal acrílico de Windows 11 detrás, solo un tinte suave encima */
body.glass-acrylic #widget { inset: 0; border-radius: 0; border: 0; box-shadow: none; background: var(--tint); animation: fadeOnly 0.6s ease both; }
body.glass-clear #widget { inset: 6px; border-radius: 22px; background: rgba(var(--base), var(--alpha, 0.55)); border-color: rgba(var(--base), 0.5); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04); }
/* Cristal esmerilado: el fondo de escritorio, en su sitio, difuminado; encima un tinte y un brillo de hielo */
#glass { position: absolute; inset: -60px; z-index: 0; pointer-events: none; background-repeat: no-repeat; filter: blur(28px) saturate(1.5) brightness(var(--glass-bright, 0.92)); opacity: 0; transition: opacity 0.5s ease; }
#glass::after { content: ''; position: absolute; inset: 0; background: rgba(var(--base), min(var(--alpha, 0.55), 0.78)); }
body.has-glass #widget { background: transparent; border-color: rgba(255, 255, 255, var(--rim, 0.16)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, var(--rim, 0.16)), 0 0 0 1px rgba(0, 0, 0, 0.06); }
body.has-glass #glass { opacity: 1; }
/* Aurora: el lienzo es pequeño y se estira; el difuminado del contenedor lo deja como seda */
#aurora { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.35s ease; }
body.aurora #aurora { opacity: 1; }
body.aurora #glass { background-image: none !important; filter: blur(22px) saturate(1.25); transition: none; }
body.aurora #glass::after { display: none; }
body.glass-clear .num, body.glass-clear .month, body.glass-clear .weekdays div { text-shadow: 0 0 6px rgba(var(--base), 0.9), 0 0 2px rgba(var(--base), 0.9); }
.range { width: 100%; accent-color: var(--accent); }
@keyframes fadeOnly { from { opacity: 0; } }
body.glass-acrylic .num, body.glass-acrylic .month { text-shadow: 0 1px 1px color-mix(in srgb, var(--panel) 40%, transparent); }

.head { position: absolute; top: 0; left: 0; right: 0; height: 58px; padding: 0 22px 0 26px; display: flex; align-items: center; gap: 4px; -webkit-app-region: drag; }
.month { font-family: var(--serif); font-size: 23px; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 8px; margin-right: 6px; }
.month .y { color: var(--faint); font-size: 16px; }
.month .n { display: inline-block; }
.month .n.l { animation: swapL 0.55s var(--spring); }
.month .n.r { animation: swapR 0.55s var(--spring); }
@keyframes swapL { from { opacity: 0; transform: translateX(-14px); } }
@keyframes swapR { from { opacity: 0; transform: translateX(14px); } }
.nav { display: flex; gap: 2px; opacity: 0; transform: translateX(-6px); transition: opacity 0.2s, transform 0.5s var(--spring); }
.nav:focus-within { opacity: 1; transform: none; }
@media (hover: hover) { .head:hover .nav { opacity: 1; transform: none; } }

.ibtn {
  -webkit-app-region: no-drag; width: 28px; height: 28px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer;
  transition: transform 0.5s var(--spring), background 0.15s, color 0.15s;
}
@media (hover: hover) { .ibtn:hover { background: var(--hover); color: var(--text); transform: scale(1.1); } }
.ibtn:active { transform: scale(0.86); transition-duration: 0.08s; }
.ibtn.on { color: var(--accent); }
.ibtn.sm { width: 22px; height: 22px; }

.weekdays { position: absolute; top: 60px; left: 18px; right: 18px; display: grid; grid-template-columns: repeat(7, 1fr); }
.weekdays div { font-size: 10px; letter-spacing: 0.12em; color: var(--faint); font-weight: 600; padding-left: 9px; }

/* ============ Calendario de puntos ============ */
.cal { position: absolute; top: 80px; left: 18px; right: 18px; bottom: 16px; transition: top 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.dots { position: absolute; inset: 0; pointer-events: none; }
.dots i { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; opacity: 0.55; transition: opacity 0.6s ease; }
.dots i::before, .dots i::after { content: ''; position: absolute; background: var(--mark); border-radius: 1px; }
.dots i::before { left: 4px; top: 0; width: 1px; height: 9px; }
.dots i::after { top: 4px; left: 0; height: 1px; width: 9px; }
.dots i.near { opacity: 1; transition-duration: 0.25s; }
.weeks { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(6, 1fr); }
.weeks.l { animation: gridL 0.6s var(--spring); }
.weeks.r { animation: gridR 0.6s var(--spring); }
@keyframes gridL { from { opacity: 0; transform: translateX(-30px); } }
@keyframes gridR { from { opacity: 0; transform: translateX(30px); } }
.week { position: relative; min-height: 0; }
.cell { position: absolute; top: 0; bottom: 0; cursor: pointer; }
.cell::before { content: ''; position: absolute; inset: 4px; border-radius: 12px; background: var(--hover); opacity: 0; transition: opacity 0.35s ease; }
@media (hover: hover) { .cell:hover::before { opacity: 1; } }
.cell.drop::before { opacity: 1; background: var(--accent-soft); }
.num { position: absolute; top: 7px; left: 8px; font-size: 12.5px; font-weight: 550; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; transition: transform 0.45s var(--out); }
@media (hover: hover) { .cell:hover .num { transform: translateY(-1px); } }
.cell.out .num { color: var(--faint); font-weight: 400; }
.cell.today .num { background: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(217, 119, 87, 0.45); animation: todayPop 0.9s var(--spring) both 0.2s; }
@keyframes todayPop { from { transform: scale(0.3); } }
.st { position: absolute; top: 16px; left: 33px; width: 5px; height: 5px; border-radius: 50%; }
.st.ok { background: var(--ok); }
.st.late { background: var(--late); animation: pulse 1.8s ease-in-out infinite; }
.st.carried { background: var(--warn); }
@keyframes pulse { 50% { transform: scale(1.5); opacity: 0.6; } }
.more { position: absolute; top: 11px; right: 8px; font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* Barras (lo que entra en cada día) */
.bar {
  position: absolute; height: 18px; border-radius: 6px; background: var(--c); color: var(--ink, #fff); font-size: 11px; font-weight: 550; line-height: 18px;
  padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; z-index: 2;
  box-shadow: 0 1px 1px color-mix(in srgb, var(--c) 25%, transparent);
  transition: transform 0.4s var(--out), box-shadow 0.4s ease, filter 0.4s ease, opacity 0.3s ease, left 0.5s var(--soft-spring), top 0.5s var(--soft-spring), width 0.5s var(--soft-spring);
}
.weeks.anim .bar { animation: barIn 0.55s var(--out) backwards; animation-delay: calc(var(--i, 0) * 14ms); }
@keyframes barIn { from { opacity: 0; transform: translateY(3px); } }
@media (hover: hover) { .bar:hover { transform: translateY(-1px); box-shadow: 0 3px 10px color-mix(in srgb, var(--c) 28%, transparent); filter: brightness(1.04); z-index: 3; } }
.bar:active { transform: translateY(0) scale(0.985); transition-duration: 0.12s; }
.bar.blk { background: color-mix(in srgb, var(--c) 86%, var(--panel)); }
.bar.ms { font-weight: 700; display: flex; align-items: center; gap: 4px; }
.bar.ms .ic { opacity: 0.9; }
.bar.done { opacity: 0.42; }
@media (hover: hover) { .bar.done:hover { opacity: 0.8; } }
.bar.cl { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bar.cr { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.bar.ghost { visibility: hidden; }
/* Objetivos: marcas de un día, en contorno */
.bar.goal { background: color-mix(in srgb, var(--c) 13%, rgba(var(--base), 0.6)); color: color-mix(in srgb, var(--c) 78%, var(--text)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, transparent); display: flex; align-items: center; gap: 4px; padding-left: 6px; font-weight: 600; }
.bar.goal span { overflow: hidden; text-overflow: ellipsis; }
.bar.goal.done { opacity: 0.55; }
.bar.goal.done span { text-decoration: line-through; }
@media (hover: hover) { .bar.goal:hover { box-shadow: inset 0 0 0 1.5px var(--c), 0 3px 10px color-mix(in srgb, var(--c) 22%, transparent); } }
.goal-check { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c) 10%, transparent); cursor: pointer; transition: background 0.3s ease, transform 0.4s var(--out); }
@media (hover: hover) { .goal-check:hover { background: color-mix(in srgb, var(--c) 16%, transparent); } }
.goal-check:active { transform: scale(0.98); }
.goal-check .check { width: 26px; height: 26px; border-radius: 50%; }
.goal-check.done .check { background: var(--c); border-color: var(--c); }
.goal-check.done .check svg { transform: scale(1); }
.goal-check.pop .check { animation: checkPop 0.55s var(--spring); }
.goal-check b { font-weight: 600; }
.bar.dragging { opacity: 0.4; }

/* ============ "¿Cómo vas?": barrita → botón → pantalla ============ */
.how {
  -webkit-app-region: no-drag; position: absolute; z-index: 50; top: 7px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 5px; border-radius: 4px; background: var(--faint); opacity: 0.55; overflow: hidden; cursor: pointer;
  transition: width 0.6s var(--spring), height 0.6s var(--spring), top 0.6s var(--spring), border-radius 0.5s var(--out), background 0.25s, opacity 0.2s, box-shadow 0.3s;
}
.how.fresh { background: var(--accent); opacity: 1; animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 4px var(--accent-soft); } }
.how.near { width: 136px; height: 32px; top: 12px; border-radius: 16px; background: var(--card); opacity: 1; box-shadow: var(--shadow); border: 1px solid var(--line); animation: none; }
@media (hover: hover) { .how.near:hover { transform: translateX(-50%) scale(1.05); } }
.how.near:active { transform: translateX(-50%) scale(0.94); }
.how.open { width: calc(100% - 20px); height: calc(100% - 20px); top: 10px; border-radius: 22px; background: var(--card); opacity: 1; box-shadow: var(--shadow-lg); border: 1px solid var(--line); cursor: default; animation: none; }
.how-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity 0.2s; }
.how.near .how-btn { opacity: 1; transition-delay: 0.12s; }
.how-btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.how-body { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: var(--hw, 100%); height: var(--hh, 100%); overflow-y: auto; padding: 24px 28px 22px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.how.open .how-body { opacity: 1; pointer-events: auto; transition-delay: 0.18s; }
.how.open .how-body > * { animation: rise 0.55s var(--spring) both; }
.how.open .how-body > *:nth-child(2) { animation-delay: 0.05s; }
.how.open .how-body > *:nth-child(3) { animation-delay: 0.1s; }
.how.open .how-body > *:nth-child(4) { animation-delay: 0.15s; }
.how.open .how-body > *:nth-child(5) { animation-delay: 0.2s; }
.how.open .how-body > *:nth-child(6) { animation-delay: 0.25s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.how-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.greet { font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.how-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; margin-top: 18px; }
@media (max-width: 720px) { .how-cols { grid-template-columns: 1fr; } }
.ai-line { background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; line-height: 1.55; margin-top: 16px; }
.ai-line .ic { color: var(--accent); margin-top: 3px; }
.ai-line.loading span { background: linear-gradient(90deg, var(--faint), var(--text), var(--faint)); background-size: 200% 100%; -webkit-background-clip: text; color: transparent; animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.verdict { display: flex; align-items: center; gap: 14px; padding: 4px 0 12px; }
.verdict b { font-family: var(--serif); font-weight: 400; font-size: 20px; display: block; }
.h3 { font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase; margin: 14px 0 6px; display: flex; justify-content: space-between; align-items: center; }
.lnk { color: var(--accent); cursor: pointer; font-weight: 600; text-decoration: none; }
@media (hover: hover) { .lnk:hover { text-decoration: underline; } }

/* ============ Tarjeta que se despliega desde una barra o un día ============ */
.card {
  -webkit-app-region: no-drag; position: absolute; z-index: 40; display: none; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.card.show { display: block; }
.card-in { position: absolute; left: 0; top: 0; width: var(--cw, 100%); height: var(--ch, 100%); overflow-y: auto; padding: 16px 16px 18px; }
.card-in.fade { animation: fadeIn 0.35s var(--out) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
.c-head { display: flex; gap: 10px; align-items: flex-start; }
.c-head .t { flex: 1; min-width: 0; }
.c-title { font-family: var(--serif); font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; }
.c-meta { color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c, var(--accent)) 15%, transparent); color: color-mix(in srgb, var(--c, var(--accent)) 78%, var(--text)); font-weight: 600; }
.c-hero { display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; }
.c-hero .big { font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--c); }
.c-hero .lbl { color: var(--muted); font-size: 12px; }
.c-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.c-foot { display: flex; gap: 4px; justify-content: flex-end; margin-top: 10px; }

.bar-p { height: 5px; border-radius: 9px; background: var(--soft); overflow: hidden; contain: strict; } /* su animación de ancho no recalcula el resto */
.bar-p > i { display: block; height: 100%; width: 0; border-radius: 9px; background: var(--c, var(--accent)); transition: width 1s var(--soft-spring); }
.ring { transform: rotate(-90deg); flex: none; }
.ring .track { stroke: var(--soft); }
.ring .val { stroke: var(--c, var(--accent)); transition: stroke-dashoffset 1.1s var(--soft-spring); }
.ring-wrap { position: relative; display: grid; place-items: center; flex: none; }
.ring-wrap .lbl { position: absolute; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ring-wrap.big .lbl { font-family: var(--serif); font-size: 18px; font-weight: 400; }

.topic { margin-top: 10px; }
.topic-h { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 4px 2px; border-radius: 8px; }
.topic-h .name { flex: 1; font-weight: 600; font-size: 13px; }
.topic-h .meta { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.topic-h .chev { color: var(--faint); transition: transform 0.45s var(--spring); }
.topic.closed .chev { transform: rotate(-90deg); }
.topic.closed .tasks { display: none; }
.topic .bar-p { margin: 2px 2px 4px; }

.task { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 9px; cursor: pointer; transition: background 0.15s, transform 0.45s var(--spring); }
@media (hover: hover) { .task:hover { background: var(--hover); } }
.task:active { transform: scale(0.98); }
.task .tt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task .tx { position: relative; transition: color 0.3s; }
.task .tx::after { content: ''; position: absolute; left: 0; top: 55%; height: 1.5px; width: 0; background: var(--faint); transition: width 0.45s var(--out); }
.task.done .tx { color: var(--faint); }
.task.done .tx::after { width: 100%; }
.task .from { display: block; font-size: 11px; color: var(--faint); }
.task .x { opacity: 0; width: 22px; height: 22px; }
@media (hover: hover) { .task:hover .x { opacity: 1; } }
.carry { font-size: 10px; color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, transparent); padding: 0 6px; border-radius: 99px; font-weight: 700; display: inline-flex; gap: 3px; align-items: center; }
.check { width: 20px; height: 20px; border-radius: 7px; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; color: #fff; transition: background 0.2s, border-color 0.2s, transform 0.5s var(--spring); }
.check svg { transform: scale(0); transition: transform 0.45s var(--spring) 0.04s; }
@media (hover: hover) { .task:hover .check { border-color: var(--c, var(--accent)); transform: scale(1.1); } }
.task.done .check { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); }
.task.done .check svg { transform: scale(1); }
.task.pop .check { animation: checkPop 0.55s var(--spring); }
@keyframes checkPop { 50% { transform: scale(1.35) rotate(-8deg); } }
.dotc { width: 8px; height: 8px; border-radius: 3px; background: var(--c); flex: none; }

.inline-add { width: 100%; border: 1px dashed var(--line-strong); background: transparent; border-radius: 9px; padding: 6px 10px; margin-top: 4px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.inline-add::placeholder { color: var(--faint); }
.inline-add:focus { border-style: solid; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; white-space: nowrap; font-size: 12.5px;
  transition: transform 0.5s var(--spring), background 0.15s, box-shadow 0.2s;
}
@media (hover: hover) { .btn:hover { background: var(--hover); transform: translateY(-1px) scale(1.04); } }
.btn:active { transform: scale(0.92); transition-duration: 0.08s; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(217, 119, 87, 0.35); }
@media (hover: hover) { .btn.primary:hover { background: var(--accent-2); } }
.btn.plain { border-color: transparent; color: var(--muted); }
.btn.danger { border-color: transparent; color: var(--late); }
.seg { display: inline-flex; background: var(--soft); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 26px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 12.5px; display: inline-flex; gap: 5px; align-items: center; transition: transform 0.45s var(--spring), background 0.2s, color 0.15s; }
.seg button:active { transform: scale(0.9); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.seg button.on.ok { color: var(--ok); }
.seg button.on.late { color: var(--late); }
.hint { color: var(--faint); font-size: 12.5px; padding: 8px 0; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; transition: background 0.15s, transform 0.45s var(--spring); }
@media (hover: hover) { .list-row:hover { background: var(--hover); transform: translateX(3px); } }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .ttl { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .meta { color: var(--muted); font-size: 11.5px; }
.count { min-width: 38px; height: 38px; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); line-height: 1; }
.count b { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.count span { font-size: 8.5px; font-weight: 700; text-transform: uppercase; margin-top: 2px; }

/* Formularios dentro de la tarjeta */
.field { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.field > span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.row2 { display: flex; gap: 8px; }
.row2 > * { flex: 1; min-width: 0; }
.input { height: 34px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel); padding: 0 10px; outline: none; width: 100%; transition: border-color 0.2s, box-shadow 0.2s; user-select: text; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { height: auto; padding: 8px 10px; resize: none; }
.swatches { display: flex; gap: 7px; flex-wrap: wrap; }
.color-btn { width: 16px; height: 16px; border-radius: 6px; border: 0; padding: 0; background: var(--c); cursor: pointer; flex: none; box-shadow: 0 0 0 2px transparent; transition: transform 0.35s var(--out), box-shadow 0.25s; }
.color-btn.open { transform: scale(1.15); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--c); }
@media (hover: hover) { .color-btn:hover { transform: scale(1.15); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--c); } }
/* Capas */
.layer-pill { -webkit-app-region: no-drag; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line); background: rgba(var(--base), 0.35); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; transition: color 0.2s, background 0.2s, transform 0.35s var(--out); }
@media (hover: hover) { .layer-pill:hover { color: var(--text); background: rgba(var(--base), 0.6); transform: translateY(-1px); } }
.layer-pill.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.layer-wheel { -webkit-app-region: no-drag; margin-left: auto; position: relative; z-index: 0; display: inline-flex; }
.layer-wheel .layer-pill { margin-left: 0; position: relative; z-index: 1; }
.layer-wheel .layer-pill { white-space: nowrap; }
/* El nombre gira dentro de su caja: el texto nuevo ocupa su sitio definitivo y el viejo sale por encima */
.lp-name { position: relative; display: inline-block; overflow: hidden; height: 16px; line-height: 16px; vertical-align: middle; text-align: left; }
.lp-t { display: inline-block; white-space: nowrap; }
.lp-ghost { position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none; }
.layer-menu { -webkit-app-region: no-drag; position: absolute; z-index: 48; top: 50px; right: 18px; min-width: 210px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); transform-origin: top right; animation: menuIn 0.3s var(--out) both; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }
.layer-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; cursor: pointer; text-align: left; font-size: 13px; transition: background 0.15s; }
@media (hover: hover) { .layer-menu button:hover { background: var(--hover); } }
.layer-menu button.on { font-weight: 700; }
.layer-menu button .n { margin-left: auto; color: var(--faint); font-size: 11px; }
.layer-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.layer-box { border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 10px; margin-bottom: 8px; }
.layer-head { display: flex; align-items: center; gap: 6px; }
.layer-name { flex: 1; border: 0; background: transparent; font-weight: 700; font-size: 13.5px; outline: none; padding: 3px 4px; border-radius: 6px; }
.layer-name:focus { background: var(--hover); }
.chips-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.pchip { border: 1px solid var(--line-strong); background: transparent; border-radius: 99px; padding: 3px 10px 3px 8px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.pchip::before { content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--faint)); opacity: 0.45; }
.pchip.on { color: var(--text); background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent); border-color: color-mix(in srgb, var(--c, var(--accent)) 45%, transparent); }
.pchip.on::before { opacity: 1; }
.pchip.sub::before { border-radius: 50%; }
/* Eventos de calendarios suscritos: barra discreta con franja */
.bar.ext { background: color-mix(in srgb, var(--c) 20%, rgba(var(--base), 0.55)); color: color-mix(in srgb, var(--c) 55%, var(--text)); box-shadow: inset 3px 0 0 var(--c); padding-left: 9px; font-weight: 550; }
@media (hover: hover) { .bar.ext:hover { box-shadow: inset 3px 0 0 var(--c), 0 3px 10px color-mix(in srgb, var(--c) 22%, transparent); } }
.sub-form { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 6px; }
/* Lo que aparece nuevo al actualizar entra con muelle; la paleta se despliega y se pliega */
.morph-in { animation: morphIn 0.5s var(--spring) both; }
@keyframes morphIn { from { opacity: 0; transform: translateY(6px) scale(0.96); } }
.bar.morph-in { animation: barPop 0.5s var(--spring) both; }
@keyframes barPop { from { opacity: 0; transform: scaleX(0.7); } }
.palette.morph-in { animation: unfold 0.5s var(--spring) both; transform-origin: top left; }
@keyframes unfold { from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; transform: scaleY(0.4); } to { max-height: 90px; } }
.palette.folding { animation: fold 0.2s ease-in both; transform-origin: top left; }
@keyframes fold { to { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; transform: scaleY(0.5); } }
.palette button { animation: swatchIn 0.45s var(--spring) both; }
.palette.morph-in button:nth-child(n) { animation-delay: calc(var(--n, 0) * 18ms); }
@keyframes swatchIn { from { opacity: 0; transform: scale(0.3); } }
.color-btn { transition: background 0.35s ease, transform 0.35s var(--out), box-shadow 0.25s !important; }
.palette { display: grid; grid-template-columns: repeat(8, 22px); gap: 7px; padding: 6px 8px 12px 34px; animation: rise 0.35s var(--out) both; }
.palette button { width: 22px; height: 22px; border-radius: 7px; border: 0; padding: 0; background: var(--c); cursor: pointer; transition: transform 0.3s var(--out), box-shadow 0.2s; }
@media (hover: hover) { .palette button:hover { transform: scale(1.15); } }
.palette button.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--c); }
.swatches label { width: 22px; height: 22px; border-radius: 8px; background: var(--c); cursor: pointer; transition: transform 0.45s var(--spring); }
@media (hover: hover) { .swatches label:hover { transform: scale(1.15) rotate(-6deg); } }
.swatches input { display: none; }
.swatches label:has(input:checked) { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--c); }
.picklist { max-height: 160px; overflow-y: auto; border: 1px solid var(--line); border-radius: 11px; padding: 4px; }
.picklist .grp { font-size: 11px; color: var(--muted); font-weight: 600; padding: 5px 7px 1px; }
.picklist label { display: flex; align-items: center; gap: 8px; padding: 4px 7px; border-radius: 7px; cursor: pointer; font-size: 12.5px; }
@media (hover: hover) { .picklist label:hover { background: var(--hover); } }
.picklist input { accent-color: var(--accent); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle small { display: block; color: var(--muted); font-size: 11.5px; }
.toggle input { display: none; }
.switch { width: 36px; height: 21px; border-radius: 99px; background: var(--soft); position: relative; flex: none; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.5s var(--spring); }
.toggle input:checked + .switch { background: var(--accent); }
.toggle input:checked + .switch::after { transform: translateX(15px); }
.code { font-family: Consolas, 'Cascadia Mono', monospace; font-size: 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px; white-space: pre-wrap; word-break: break-all; }
.mem { display: flex; gap: 10px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mem .grow { flex: 1; }
.mem .str { width: 46px; }

/* ============ Agente: botón de esquina → barra de texto ============ */
.agent {
  -webkit-app-region: no-drag; position: absolute; z-index: 45; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 20px;
  background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(217, 119, 87, 0.45); display: flex; align-items: center; overflow: hidden; cursor: pointer;
  transition: width 0.65s var(--spring), height 0.5s var(--spring), border-radius 0.5s var(--out), background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.5s var(--spring);
}
@media (hover: hover) { .agent:not(.open):hover { transform: scale(1.08); } }
.agent:not(.open):active { transform: scale(0.9); }
/* Los puntitos van siempre centrados en el círculo de la izquierda (cerrado: 40 px; abierto: la altura de la barra) */
.agent .spark { width: 40px; height: 40px; flex: none; display: grid; place-items: center; transition: width 0.5s var(--spring), height 0.5s var(--spring); }
.agent .spark { position: relative; }
.agent .spark .dm { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; display: block; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.agent.open { width: min(460px, calc(100% - 32px)); height: 46px; border-radius: 23px; background: var(--card); color: var(--text); box-shadow: var(--shadow-lg); border: 1px solid var(--line-strong); cursor: default; }
.agent.open .spark { color: var(--accent); width: 44px; height: 44px; }
.agent input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; opacity: 0; transition: opacity 0.2s; user-select: text; }
.agent.open input { opacity: 1; transition-delay: 0.2s; }
.agent input::placeholder { color: var(--faint); }
.agent .send { width: 32px; height: 32px; margin-right: 6px; border-radius: 16px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; opacity: 0; transform: scale(0.5); transition: transform 0.5s var(--spring), opacity 0.2s; }
.agent.open .send { opacity: 1; transform: scale(1); transition-delay: 0.15s; }
@media (hover: hover) { .agent.open .send:hover { transform: scale(1.1); } }
.agent.open .send:active { transform: scale(0.85); }

.reply {
  -webkit-app-region: no-drag; position: absolute; z-index: 44; right: 16px; bottom: 72px; width: min(400px, calc(100% - 32px)); max-height: 46%; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 6px 18px; box-shadow: var(--shadow-lg); padding: 12px 14px; line-height: 1.55;
  transform-origin: bottom right; opacity: 0; transform: translateY(12px) scale(0.9); pointer-events: none; transition: opacity 0.25s, transform 0.55s var(--spring);
}
.reply.show { opacity: 1; transform: none; pointer-events: auto; }
.reply p { margin: 0 0 5px; }
.reply ul { margin: 2px 0 5px; padding-left: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); background: var(--soft); padding: 2px 9px 2px 7px; border-radius: 99px; animation: popIn 0.4s var(--spring) both; }
.chip .ic { color: var(--ok); }
@keyframes popIn { from { opacity: 0; transform: scale(0.7); } }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: bounce 1s var(--out) infinite; }
.typing i:nth-child(2) { animation-delay: 0.12s; }
.typing i:nth-child(3) { animation-delay: 0.24s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Redimensionar */
.grip { -webkit-app-region: no-drag; position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; cursor: nwse-resize; z-index: 46; opacity: 0; transition: opacity 0.2s; background: linear-gradient(135deg, transparent 55%, var(--faint) 55%, var(--faint) 62%, transparent 62%, transparent 75%, var(--faint) 75%, var(--faint) 82%, transparent 82%); }
@media (hover: hover) { #widget:hover .grip { opacity: 0.7; } }

/* Toast y partículas */
#toast-root { position: absolute; z-index: 95 !important; top: 14px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--panel); padding: 7px 14px; border-radius: 12px; font-size: 12.5px; font-weight: 500; display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow-lg); animation: toastIn 0.6s var(--spring) both; }
.toast.out { animation: toastOut 0.25s ease-in both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(0.85); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(0.92); } }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
#fx i { position: absolute; width: 6px; height: 6px; border-radius: 50%; }

/* Vacío */
.empty { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; pointer-events: none; }
.empty > div { pointer-events: auto; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px 26px; box-shadow: var(--shadow); animation: popIn 0.7s var(--spring) both; max-width: 320px; }
.empty h2 { font-family: var(--serif); font-weight: 400; font-size: 21px; margin: 0 0 6px; }
.empty p { color: var(--muted); margin: 0 0 14px; font-size: 12.5px; }

/* Modo bandeja: panel que sale junto al reloj, como EarTrumpet */
body.mode-tray .head { -webkit-app-region: no-drag; }
/* En la bandeja se agranda desde la esquina superior izquierda (la inferior derecha queda fija en la esquina) */
body.mode-tray .grip { right: auto; bottom: auto; left: 3px; top: 3px; transform: rotate(180deg); }
#widget.fly-in { animation: flyIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both; }
#widget.fly-out { animation: flyOut 0.16s ease-in both; }
@keyframes flyIn { from { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 24px)); } }
@keyframes flyOut { to { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 12px)); } }

@media (max-width: 720px) { .how-cols { gap: 8px; } }
.cloud-msg { font-size: 12.5px; line-height: 1.45; margin-top: 8px; min-height: 0; transition: color 0.2s; }
.cloud-msg:empty { display: none; }
.cloud-msg.err { color: var(--late); background: color-mix(in srgb, var(--late) 12%, transparent); padding: 8px 10px; border-radius: 10px; animation: shake 0.4s var(--out); }
.cloud-msg.ok { color: var(--ok); }
@keyframes shake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
.btn[disabled] { opacity: 0.6; pointer-events: none; }
#login { position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg-web, #faf9f5) 88%, transparent); backdrop-filter: blur(8px); }
.login-card { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 24px 22px; animation: popIn 0.5s var(--spring) both; }

/* ---------- Interacción propia (nada de lo predeterminado del navegador) ---------- */
* { -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; }
body { cursor: default; }
input, textarea { user-select: text; cursor: text; }
::selection { background: color-mix(in srgb, var(--accent) 38%, transparent); color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent); outline-offset: 2px; }
.input:focus-visible, .inline-add:focus-visible { outline: none; }
/* Subrayado propio: crece desde la izquierda */
.lnk { text-decoration: none !important; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.35s var(--out), color 0.2s; padding-bottom: 1px; }
@media (hover: hover) { .lnk:hover { background-size: 100% 1.5px; } }
/* Presión en todo lo pulsable */
.list-row:active, .task:active, .pchip:active, .topic-h:active, .goal-check:active, .layer-pill:active { transform: scale(0.97); transition-duration: 0.1s; }
.cell:active .num { transform: scale(0.9); }
.pchip { transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.35s var(--spring); }
@media (hover: hover) { .pchip:hover { transform: translateY(-1px); } }
/* Onda al pulsar: vive en una capa propia recortada a la forma del elemento, así no la corta un redibujado */
.ripple-clip { position: fixed; pointer-events: none; overflow: hidden; z-index: 99; }
.ripple-clip i { position: absolute; border-radius: 50%; background: currentColor; }
/* Menú contextual propio */
.ctx { position: fixed; z-index: 120; min-width: 210px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); animation: ctxIn 0.32s var(--spring) both; -webkit-app-region: no-drag; }
.ctx.out { animation: ctxOut 0.14s ease-in both; }
@keyframes ctxIn { from { opacity: 0; transform: scale(0.88); } }
@keyframes ctxOut { to { opacity: 0; transform: scale(0.94); } }
.ctx-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; padding: 7px 10px; border-radius: 9px; cursor: pointer; text-align: left; font-size: 13px; color: var(--text); transition: background 0.12s, transform 0.3s var(--spring); animation: rise 0.35s var(--spring) both; animation-delay: calc(var(--n, 0) * 14ms); }
@media (hover: hover) { .ctx-item:hover { background: var(--hover); } }
.ctx-item:active { transform: scale(0.96); }
.ctx-item .ic { color: var(--muted); }
.ctx-item.on { font-weight: 700; }
.ctx-item.on .ic { color: var(--accent); }
.ctx-item.danger { color: var(--late); }
.ctx-item.danger .ic { color: var(--late); }
.ctx-item.armed { background: color-mix(in srgb, var(--late) 14%, transparent); }
.ctx-item .k { margin-left: auto; color: var(--faint); font-size: 11px; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.ctx-h { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 6px 10px 2px; }
/* Arrastre propio: la barra se "levanta" y sigue al cursor con muelle */
.bar.lifted { opacity: 0.25; transform: scale(0.96); }
.drag-ghost { position: fixed; z-index: 110; pointer-events: none; margin: 0; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08); transform-origin: 30% 50%; transition: none; animation: none !important; }
body.dragging, body.dragging * { cursor: grabbing !important; }
.cell.drop::before { opacity: 1; background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.bar { touch-action: none; }

/* ---------- Pantallas Ajustes / Organizar: secciones con aire ---------- */
.how-body { padding: 26px 30px 30px; }
.how-cols { gap: 18px; align-items: start; }
.sec { background: color-mix(in srgb, var(--text) 3%, transparent); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px 18px; margin-bottom: 18px; }
.sec-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.sec-ic { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.sec-t { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.sec-d { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-top: 2px; }
.sec-b > .field:first-child, .sec-b > .toggle:first-child { margin-top: 0; }
.sec-b .field { margin-top: 14px; }
.sec-b .toggle:last-child { border-bottom: 0; padding-bottom: 0; }
.sec-b .list-row { padding: 9px 8px; }
.sec-b .inline-add { margin-top: 10px; }
.sec-b .layer-box { padding: 10px 12px 12px; margin-bottom: 10px; background: color-mix(in srgb, var(--text) 2%, transparent); }
.sec-b .sub-form { gap: 8px; margin-top: 12px; }
.how-top .seg button { padding: 0 12px; }
@media (max-width: 720px) { .how-body { padding: 20px 16px 24px; } .how-top { flex-wrap: wrap; row-gap: 10px; } }

/* Subcategorías de un proyecto (Organizar) */
.cat-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 10px 40px; }
.cat-chip { display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 4px 0 10px; border-radius: 13px; background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in srgb, var(--c) 70%, var(--text)); font-size: 12.5px; font-weight: 600; animation: popIn 0.4s var(--spring) both; }
.cat-name { border: 0; outline: none; background: none; color: inherit; font: inherit; padding: 0; min-width: 2ch; user-select: text; field-sizing: content; }
.cat-chip button { border: 0; background: none; color: inherit; opacity: 0.6; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
@media (hover: hover) { .cat-chip button:hover { opacity: 1; background: color-mix(in srgb, var(--c) 18%, transparent); } }
.cat-add { border: 1px dashed var(--line-strong); background: none; border-radius: 13px; height: 26px; padding: 0 10px; width: 120px; font-size: 12.5px; color: var(--text); outline: none; transition: border-color 0.2s, width 0.35s var(--spring); }
.cat-add:focus { border-style: solid; border-color: var(--c); width: 170px; }

/* Capas: subcategorías junto a su proyecto */
.pgroup { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pchip.cat { font-size: 11.5px; padding: 0 9px; height: 24px; opacity: 0.9; }
.pchip.part { border-style: dashed; border-color: color-mix(in srgb, var(--c) 55%, transparent); }

/* MCP remoto */
.mcp-url { display: flex; gap: 8px; align-items: center; }
.mcp-url code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Consolas, 'Cascadia Mono', monospace; font-size: 12px; background: var(--soft); border-radius: 9px; padding: 7px 10px; }
.mcp-steps { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.mcp-steps b { color: var(--text); font-weight: 600; }

/* ================= Recordatorios (escritorio y móvil) ================= */
.rm { max-width: 680px; margin: 0 auto; padding-bottom: 60px; }
.rm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.rm-back { border: 0; background: none; color: var(--accent); display: inline-flex; align-items: center; gap: 2px; font-size: 14px; cursor: pointer; padding: 4px 8px 4px 0; border-radius: 10px; transition: transform 0.35s var(--spring); }
.rm-back:active { transform: scale(0.94); }
.rm-big { font-family: var(--serif); font-size: 30px; line-height: 1.1; margin: 8px 2px 4px; }
.rm-search { display: flex; align-items: center; gap: 8px; margin: 12px 0 16px; height: 36px; border-radius: 11px; background: var(--soft); color: var(--muted); padding: 0 12px; }
.rm-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--text); user-select: text; }
.rm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rm-tile { border: 0; background: var(--soft); border-radius: 16px; padding: 11px 12px 10px; display: grid; grid-template-columns: 1fr auto; text-align: left; cursor: pointer; color: var(--text); transition: transform 0.45s var(--spring), background 0.2s; }
@media (hover: hover) { .rm-tile:hover { background: color-mix(in srgb, var(--c) 9%, var(--soft)); } }
.rm-tile:active { transform: scale(0.95); transition-duration: 0.1s; }
.rm-tile.wide { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 9px 12px; }
.rm-tile.wide .l { margin: 0; grid-column: auto; }
.rm-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; }
.rm-tile b { font-size: 24px; font-weight: 700; line-height: 1.15; justify-self: end; font-variant-numeric: tabular-nums; }
.rm-tile .l { grid-column: 1 / -1; font-weight: 600; color: var(--muted); margin-top: 6px; font-size: 13.5px; }
.rm-h { font-family: var(--serif); font-size: 20px; margin: 24px 2px 8px; }
.rm-group { background: var(--soft); border-radius: 14px; overflow: hidden; }
.rm-lrow { width: 100%; border: 0; background: none; color: var(--text); display: flex; align-items: center; gap: 12px; padding: 9px 12px; font-size: 14.5px; cursor: pointer; text-align: left; position: relative; transition: background 0.15s; }
@media (hover: hover) { .rm-lrow:hover { background: var(--hover); } }
.rm-lrow:active { background: var(--hover); }
.rm-lrow + .rm-lrow::before, .rm-group .rm-addlist::before { content: ''; position: absolute; left: 52px; right: 0; top: 0; height: 1px; background: var(--line); }
.rm-lrow .rm-ic { width: 28px; height: 28px; }
.rm-lrow .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-lrow .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.rm-lrow > .ic:last-child { color: var(--faint); }
.rm-group .inline-add.rm-addlist { display: block; width: 100%; margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; padding: 11px 12px 11px 52px; color: var(--accent); }
.rm-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-tag { border: 0; background: var(--soft); color: var(--text); border-radius: 10px; padding: 6px 12px; cursor: pointer; transition: transform 0.4s var(--spring); }
.rm-tag:active { transform: scale(0.92); }
.rm-title { font-family: var(--serif); font-size: 30px; line-height: 1.15; color: var(--c); display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 8px 2px 6px; }
body.web .rm-title-in, .rm-title-in { font: inherit; font-size: 30px; color: inherit; background: none; border: 0; outline: none; width: 100%; min-width: 0; padding: 0; user-select: text; }
.rm-title .n { font-variant-numeric: tabular-nums; }
.rm-sub { color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; align-items: center; padding: 2px 2px 8px; border-bottom: 1px solid var(--line); }
.rm-rows { overflow-x: hidden; }
.rm-row { display: flex; align-items: flex-start; gap: 8px; padding: 9px 4px 9px calc(2px + var(--d, 0) * 24px); position: relative; touch-action: pan-y; transition: transform 0.35s var(--out), opacity 0.3s; background: var(--card); }
.rm-row::after { content: ''; position: absolute; left: calc(56px + var(--d, 0) * 24px); right: 0; bottom: 0; height: 1px; background: var(--line); }
.rm-row[data-arm="in"] { box-shadow: inset 3px 0 0 var(--c); }
.rm-row[data-arm="out"] { box-shadow: inset -3px 0 0 var(--c); }
.rm-fold { width: 16px; height: 22px; flex: none; border: 0; background: none; color: var(--faint); display: grid; place-items: center; padding: 0; cursor: pointer; transition: transform 0.4s var(--spring), color 0.2s; }
.rm-fold.on { transform: rotate(90deg); }
@media (hover: hover) { .rm-fold:hover { color: var(--text); } }
.rm-check { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; background: none; padding: 0; display: block; cursor: pointer; transition: border-color 0.2s, transform 0.45s var(--spring); }
@media (hover: hover) { .rm-row:not(.draft) .rm-check:hover { border-color: var(--c); } }
/* Círculo interior centrado con medidas enteras (sin medios píxeles que lo descentren) */
.rm-check i { position: absolute; inset: 2px; border-radius: 50%; background: var(--c); transform: scale(0); transition: transform 0.4s var(--spring); }
.rm-row.done .rm-check { border-color: var(--c); }
.rm-row.done .rm-check i { transform: scale(1); }
.rm-row.pop .rm-check { animation: checkPop 0.55s var(--spring); }
.rm-main { flex: 1; min-width: 0; }
.rm-line { display: flex; align-items: flex-start; gap: 4px; }
.rm-pri { color: var(--c); font-weight: 700; line-height: 22px; }
.rm-t { flex: 1; min-width: 0; border: 0; outline: none; background: none; resize: none; color: var(--text); font-size: 14.5px; line-height: 22px; padding: 0; margin: 0; field-sizing: content; min-height: 22px; height: 22px; overflow: hidden; user-select: text; transition: color 0.3s; }
@supports (field-sizing: content) { .rm-t { height: auto; } }
.rm-row.done .rm-t { color: var(--muted); }
.rm-notes { color: var(--muted); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rm-meta { color: var(--muted); font-size: 12px; margin-top: 1px; }
.rm-meta .late { color: var(--late); font-weight: 600; }
.rm-meta .tag { color: var(--c); }
.rm-proj::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--p); margin-right: 4px; vertical-align: 1px; }
.rm-flag { color: #ff9f0a; margin-top: 3px; }
.rm-info { border: 0; background: none; color: var(--accent); width: 26px; height: 22px; padding: 0; display: grid; place-items: center; opacity: 0; cursor: pointer; transition: opacity 0.15s, transform 0.4s var(--spring); flex: none; }
.rm-row:focus-within .rm-info, .rm-row.open .rm-info { opacity: 1; }
@media (hover: hover) { .rm-row:hover .rm-info { opacity: 1; } }
.rm-info:active { transform: scale(0.85); }
.rm-swdel { position: absolute; top: 0; bottom: 0; right: -90px; width: 90px; border: 0; background: var(--late); color: #fff; font-weight: 600; cursor: pointer; }
.rm-row.swiped { transform: translateX(-90px); }
.rm-row.draft .rm-check { border-style: dashed; }
.rm-out { animation: rmOut 0.32s var(--out) forwards; }
@keyframes rmOut { to { opacity: 0; transform: translateX(18px); } }
.rm-detail { margin: 0 0 8px calc(26px + var(--d, 0) * 24px); background: var(--soft); border-radius: 14px; padding: 10px; display: grid; gap: 8px; animation: rise 0.45s var(--spring) both; }
.rm-detail .input { background: var(--card); }
.rm-notes-in { resize: none; min-height: 52px; user-select: text; }
.rm-drow { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.rm-drow > span:first-child { min-width: 64px; }
.rm-drow .input { flex: 1; min-width: 0; }
.rm-drow .ic { color: var(--muted); }
.rm-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.rm-quick button { border: 0; background: var(--card); color: var(--text); border-radius: 9px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; transition: transform 0.35s var(--spring); }
.rm-quick button:active { transform: scale(0.92); }
.btn.flag-on { color: #ff9f0a; border-color: color-mix(in srgb, #ff9f0a 45%, transparent); }
.rm-dfoot { display: flex; gap: 6px; align-items: center; }
.rm-group-h { font-family: var(--serif); font-size: 17px; margin: 18px 2px 4px; color: var(--c, var(--text)); }
.rm-group-h.late { color: var(--late); }
.rm-new { border: 0; background: none; color: var(--c); font-weight: 600; display: inline-flex; align-items: center; gap: 10px; padding: 12px 4px; cursor: pointer; font-size: 14.5px; transition: transform 0.4s var(--spring); }
.rm-new:active { transform: scale(0.95); }
.rm-new .pl { width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; }
.rm-empty { color: var(--muted); font-size: 13px; line-height: 1.5; padding: 6px 4px; }
.rm-go { position: relative; -webkit-app-region: no-drag; }
.badge { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 700; line-height: 15px; text-align: center; font-style: normal; }
/* Barra al escribir: sangrar, fecha, bandera… */
.rm-bar { position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 20px); z-index: 8; display: flex; align-items: center; gap: 2px; padding: 4px 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.4s var(--spring); }
.how.open.rm-editing .rm-bar { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.rm-bar button { border: 0; background: none; color: var(--text); height: 34px; min-width: 38px; display: grid; place-items: center; border-radius: 9px; cursor: pointer; font-weight: 700; transition: background 0.15s, transform 0.35s var(--spring); }
@media (hover: hover) { .rm-bar button:hover { background: var(--hover); } }
.rm-bar button:active { transform: scale(0.88); }
.rm-bar button[data-rmb="ok"] { color: var(--accent); padding: 0 10px; }
.rm-bar .sp { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }

/* ================= Móvil (app web) =================
   Estándares en MOBILE-QUALITY.md. Todo va bajo body.web: el escritorio no cambia.
   Solo se animan transform y opacity; lo grande (hojas, paneles) frena sin rebote. */
html.web-root { height: 100%; background: #000; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.web {
  --bg-web: #121211; --panel: #121211; --card: #1d1d1b; --soft: #272724; --hover: rgba(255, 255, 255, 0.06); --press: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.075); --line-strong: rgba(255, 255, 255, 0.17); --text: #f4f3ee; --muted: #a29f97; --faint: #7a776f;
  --mark: rgba(255, 255, 255, 0.14); --dot: rgba(255, 255, 255, 0.2); --base: 18, 18, 17; --accent-soft: rgba(217, 119, 87, 0.2);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 26px rgba(0, 0, 0, 0.45); --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.5), 0 26px 64px rgba(0, 0, 0, 0.65);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: 16px; --dock-h: 48px; --dock-b: max(var(--safe-b), 12px);
  color-scheme: dark; color: var(--text); background: #000; font-size: 15px;
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; touch-action: manipulation; overscroll-behavior: none;
}
body.web ::-webkit-scrollbar { width: 0; height: 0; }
/* Mantener pulsado abre el menú: que iOS no seleccione texto ni lo subraye (los campos sí se pueden seleccionar) */
body.web { -webkit-user-select: none; user-select: none; }
body.web input, body.web textarea, body.web [contenteditable='true'] { -webkit-user-select: text; user-select: text; }
body.web .add-btn { color: var(--accent); }
body.web .add-btn .ic { width: 24px; height: 24px; }
body.web #widget { inset: 0; border-radius: 0; border: 0; box-shadow: none; background: #000; animation: fadeOnly 0.3s ease both; }
body.web #glass, body.web #aurora, body.web .grip, body.web #agent, body.web #reply, body.web .desk-only { display: none !important; }

/* --- Escenario (el calendario) --- */
#stage { position: absolute; inset: 0; }
body.web #stage { background: var(--bg-web); overflow: hidden; }

/* --- Cabecera: mes a la izquierda, navegación a la derecha; botones de 44 px --- */
body.web .head { -webkit-app-region: no-drag; height: calc(60px + var(--safe-t)); padding: var(--safe-t) 6px 0 var(--gutter); gap: 0; }
body.web .month { font-size: 28px; margin-right: 0; }
body.web .month .y { font-size: 17px; }
body.web .nav { opacity: 1; transform: none; margin-left: auto; gap: 0; }
body.web .ibtn { width: 44px; height: 44px; border-radius: var(--r-pill); transition: transform 0.25s var(--out), background 0.15s; }
body.web .ibtn .ic { width: 20px; height: 20px; }
body.web .ibtn:active { background: var(--press); transform: scale(0.94); transition-duration: 0.08s; }
body.web .ibtn.sm, body.web .task .x { width: 36px; height: 36px; }
body.web .ibtn.sm .ic, body.web .task .x .ic { width: 16px; height: 16px; }

/* --- Calendario --- */
body.web .weekdays { top: calc(60px + var(--safe-t)); left: 6px; right: 6px; }
body.web .weekdays div { font-size: 11px; padding-left: 7px; }
body.web .cal { top: calc(80px + var(--safe-t)); left: 6px; right: 6px; bottom: calc(var(--dock-h) + var(--dock-b) + 10px); touch-action: none; contain: layout style; }
body.web .weeks { will-change: transform; }
body.web .weeks.nb { pointer-events: none; } /* meses vecinos del carrusel */

body.web .week { contain: layout style; }
body.web .dots { opacity: 0.6; }
body.web .cell::before { inset: 3px; border-radius: var(--r-md); transition: opacity 0.2s ease; }
body.web .cell:active::before { opacity: 1; transition-duration: 0.05s; }
body.web .num { font-size: 14px; left: 3px; top: 5px; width: 28px; height: 28px; }
body.web .st { top: 16px; left: 33px; }
body.web .more { top: 11px; right: 5px; font-size: 11.5px; }
body.web .bar { height: 20px; line-height: 20px; font-size: 11px; padding: 0 5px; border-radius: var(--r-xs); box-shadow: none; transition: transform 0.2s var(--out), opacity 0.3s ease; }
body.web .bar.cl { border-top-left-radius: 0; border-bottom-left-radius: 0; }
body.web .bar.cr { border-top-right-radius: 0; border-bottom-right-radius: 0; }
body.web .bar.goal { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, transparent); }
body.web .bar.ext { box-shadow: inset 3px 0 0 var(--c); }
body.web .bar:active { transform: scale(0.96); }
body.web .bar.armed { transform: scale(1.06); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); z-index: 4; }

/* --- Dock: capa · ¿Cómo vas? · recordatorios, en la zona del pulgar --- */
#dock { display: none; }
body.web #dock { position: absolute; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 0 var(--gutter) var(--dock-b); pointer-events: none; }
body.web #dock > * { pointer-events: auto; }
.dock-btn {
  height: var(--dock-h); border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: var(--r-pill); box-shadow: var(--shadow);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; cursor: pointer; font-size: 15px; font-weight: 600; white-space: nowrap; position: relative;
  transition: transform 0.25s var(--out), background 0.15s, color 0.2s;
}
.dock-btn:active { transform: scale(0.96); background: var(--soft); transition-duration: 0.08s; }
body.web .layer-pill.dock-layer { flex: 0 1 auto; margin: 0; height: var(--dock-h); min-width: 0; padding: 0 12px 0 10px; gap: 6px; border-radius: var(--r-pill); color: var(--muted); background: var(--card); font-size: 15px; }
body.web .layer-pill.dock-layer.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.dock-layer .ic, .dock-how .ic { width: 20px; height: 20px; flex: none; }
.dock-layer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dock-how { margin-left: auto; padding: 0 14px; gap: 7px; min-width: 0; flex: none; }
.dock-how .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: breathe 2s ease-in-out infinite; }
.dock-how.fresh { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.dock-rm, .dock-ai { width: var(--dock-h); padding: 0; flex: none; }
.dock-ai { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 4px 16px rgba(217, 119, 87, 0.35); }
.dock-ai:active { background: var(--accent-2); }
.dock-ai .ic { width: 22px; height: 22px; }
.dock-rm .ic { width: 22px; height: 22px; }
.dock-rm .badge { top: -3px; right: -3px; min-width: 20px; height: 20px; line-height: 20px; font-size: 11px; border-radius: 10px; box-shadow: 0 0 0 2px var(--bg-web); }
body.web .layer-menu { top: auto; right: auto; left: var(--gutter); bottom: calc(100% + 8px); min-width: 240px; max-height: 60vh; overflow-y: auto; padding: 6px; border-radius: var(--r-lg); transform-origin: bottom left; overscroll-behavior: contain; }
body.web .layer-menu button { min-height: 44px; font-size: 16px; border-radius: var(--r-md); }
body.web .layer-menu button:active { background: var(--press); }

/* --- Páginas: cada vista ocupa la pantalla y es una entrada del historial (atrás = el del sistema) --- */
body.web .card, body.web .how {
  position: absolute; inset: 0; z-index: 55; top: 0; left: 0; width: auto; height: auto; display: none;
  border: 0; border-radius: 0; box-shadow: none; background: var(--panel); opacity: 1; transform: none; animation: none; transition: none; cursor: default; overflow: hidden;
}
body.web .card.page.show { display: flex; flex-direction: column; padding-top: var(--safe-t); }
body.web .how.open { display: block; }
body.web .how-btn { display: none; }
body.web .how-body { left: 0; right: 0; top: var(--safe-t); bottom: 0; width: auto; height: auto; transform: none; opacity: 1; transition: none; pointer-events: auto; padding: 0 var(--gutter) calc(var(--safe-b) + 40px); overscroll-behavior: contain; }
body.web .how.open .how-body > * { animation: none; }
body.web .card.page .card-in { position: relative; inset: auto; width: auto; height: auto; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 var(--gutter) calc(var(--safe-b) + 32px); overscroll-behavior: contain; }
/* Vista de día: el scroll vertical es del navegador; a los lados, el carrusel de días */
body.web .card.day .card-in { touch-action: pan-y; }
body.web .card .card-in.nb { pointer-events: none; }
/* Barra de navegación: «‹ Atrás» con el nombre de la pantalla anterior */
.page-bar { flex: none; height: 48px; display: flex; align-items: center; padding: 0 var(--gutter); }
.page-back { display: inline-flex; align-items: center; height: 44px; max-width: 75%; padding: 0 12px 0 0; margin-left: -8px; border: 0; background: none; color: var(--accent); font-size: 17px; cursor: pointer; border-radius: var(--r-pill); transition: opacity 0.15s; }
.page-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-back:active { opacity: 0.45; transition-duration: 0s; }
body.web .card [data-act="close-card"], body.web .how [data-act="how-close"] { display: none; } /* se vuelve con «Atrás» */
/* Cabeceras de los paneles: barra con «Atrás» arriba y título grande debajo (como iOS) */
body.web .how-top { flex-direction: column-reverse; align-items: stretch; gap: 2px; }
body.web .how-top > div:last-child { justify-content: flex-end; align-items: center; min-height: 48px; margin-right: -10px; }
body.web .how-top > div:last-child .page-back { margin-right: auto; }
body.web .greet { font-size: 32px; }
body.web .how-top.hh { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: 'back . close' 'title title title' 'tabs tabs tabs'; gap: 2px 0; }
body.web .hh > div { display: contents !important; }
body.web .hh .page-back { grid-area: back; height: 48px; max-width: none; }
body.web .hh .greet { grid-area: title; font-size: 32px !important; }
body.web .hh .seg { grid-area: tabs; display: flex; margin-top: 10px; }
body.web .hh .seg button { flex: 1; justify-content: center; }
body.web .rm-top { min-height: 48px; margin-right: -10px; }
/* Claude: se escribe aquí y se abre Claude con el mensaje */
.ai-intro { margin: 6px 0 14px; line-height: 1.5; }
.ai-box { display: grid; gap: 10px; }
.ai-box textarea { min-height: 112px; }
.ai-box .btn { justify-self: end; }
.ai-chips { margin: 14px 0 22px; gap: 8px; }
.ai-chips .pchip::before { display: none; }

/* --- Cambio de pantalla: lo anima el navegador (View Transitions) como el «push» de iOS: entra por la derecha --- */
html[data-nav='push']::view-transition-old(root), html[data-nav='push']::view-transition-new(root),
html[data-nav='pop']::view-transition-old(root), html[data-nav='pop']::view-transition-new(root) { animation-duration: 0.42s; animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1); mix-blend-mode: normal; }
html[data-nav='push']::view-transition-new(root) { animation-name: vt-from-right; box-shadow: -8px 0 28px rgba(0, 0, 0, 0.35); }
html[data-nav='push']::view-transition-old(root) { animation-name: vt-to-left; }
html[data-nav='pop']::view-transition-old(root) { animation-name: vt-to-right; z-index: 1; box-shadow: -8px 0 28px rgba(0, 0, 0, 0.35); }
html[data-nav='pop']::view-transition-new(root) { animation-name: vt-from-left; }
html[data-nav='fade']::view-transition-old(root), html[data-nav='fade']::view-transition-new(root) { animation-duration: 0.18s; }
@keyframes vt-from-right { from { transform: translateX(100%); } }
@keyframes vt-to-left { to { transform: translateX(-28%); opacity: 0.7; } }
@keyframes vt-to-right { to { transform: translateX(100%); } }
@keyframes vt-from-left { from { transform: translateX(-28%); opacity: 0.7; } }

/* --- Movimiento sobrio: nada de rebotes ni escalados grandes en el móvil --- */
body.web .task.pop .check, body.web .goal-check.pop .check, body.web .rm-row.pop .rm-check { animation: popSoft 0.3s var(--out); }
@keyframes popSoft { 50% { transform: scale(1.12); } }
body.web .morph-in, body.web .bar.morph-in, body.web .rm-detail { animation: fadeOnly 0.22s ease both; }
body.web .weeks.anim .bar { animation: fadeOnly 0.3s ease backwards; animation-delay: calc(var(--i, 0) * 8ms); }
body.web .weeks.l, body.web .weeks.r, body.web .month .n.l, body.web .month .n.r { animation: fadeOnly 0.22s ease; }
body.web .cell.today .num { animation: none; }
body.web .toast { animation: toastSoft 0.3s var(--ease-ios) both; }
body.web .toast.out { animation: toastOut 0.2s ease-in both; }
@keyframes toastSoft { from { opacity: 0; transform: translateY(-8px); } }
body.web .ctx, body.web .layer-menu { animation: menuSoft 0.18s var(--out) both; }
body.web .ctx-item { animation: none; }
@keyframes menuSoft { from { opacity: 0; transform: scale(0.97); } }
body.web .seg button:active { transform: scale(0.97); }
body.web .rm-tile:active { transform: scale(0.97); }
body.web .rm-top { margin-right: -10px; }
body.web .sec { background: var(--card); border-radius: var(--r-lg); padding: 16px; }
body.web .sub { font-size: 14px; }
body.web .h3 { font-size: 12px; margin: 22px 0 6px; }
body.web .ai-line { border-radius: var(--r-lg); padding: 14px 16px; }
body.web .verdict b { font-size: 22px; }

/* --- Controles con tamaño de dedo (≥ 44 px) --- */
body.web .list-row, body.web .task { min-height: 48px; border-radius: var(--r-md); }
body.web .list-row:active, body.web .task:active { background: var(--press); }
body.web .list-row .meta, body.web .topic-h .meta, body.web .task .from { font-size: 13px; }
body.web .list-row .ttl { font-size: 15.5px; }
body.web .topic-h { min-height: 44px; }
body.web .topic-h .name { font-size: 15px; }
body.web .task .x { opacity: 1; }
body.web .check { width: 22px; height: 22px; border-radius: 8px; }
body.web .goal-check { border-radius: var(--r-lg); min-height: 60px; }
body.web .btn { height: 44px; padding: 0 18px; border-radius: var(--r-pill); font-size: 15px; transition: transform 0.25s var(--out), background 0.15s; }
body.web .btn:active { transform: scale(0.96); background: var(--press); transition-duration: 0.08s; }
body.web .btn.primary:active { background: var(--accent-2); }
body.web .seg { padding: 3px; border-radius: var(--r-md); }
body.web .seg button { height: 36px; padding: 0 12px; border-radius: 11px; font-size: 14px; }
body.web .df-st button { height: 40px; }
body.web .field { gap: 6px; margin-top: 14px; }
body.web .field > span { font-size: 13px; }
body.web .input { height: 46px; border-radius: var(--r-md); padding: 0 14px; background: var(--soft); border-color: transparent; }
body.web textarea.input { height: auto; padding: 12px 14px; }
body.web .input:focus { border-color: var(--accent); }
body.web input[type='date'].input, body.web input[type='time'].input { -webkit-appearance: none; appearance: none; display: flex; align-items: center; }
body.web ::-webkit-date-and-time-value { text-align: left; }
body.web .inline-add { min-height: 46px; padding: 10px 14px; border-radius: var(--r-md); }
/* Textos de campos a 16 px: si no, el iPhone hace zoom al tocarlos y la vista se queda ampliada */
body.web .input, body.web .inline-add, body.web input, body.web textarea, body.web select { font-size: 16px; }
body.web .toggle { min-height: 56px; }
body.web .switch { width: 51px; height: 31px; }
body.web .switch::after { top: 2px; left: 2px; width: 27px; height: 27px; }
body.web .toggle input:checked + .switch::after { transform: translateX(20px); }
body.web .color-btn { width: 30px; height: 30px; border-radius: var(--r-sm); }
body.web .palette { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; padding: 8px 0 14px; }
body.web .palette button { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-sm); }
body.web .swatches { gap: 10px; }
body.web .swatches label { width: 34px; height: 34px; border-radius: var(--r-sm); }
body.web .pchip { min-height: 36px; padding: 0 14px 0 11px; font-size: 14px; }
body.web .pchip.cat { min-height: 32px; height: auto; font-size: 13px; }
body.web .cat-row { padding-left: 46px; }
body.web .cat-chip, body.web .cat-add { height: 34px; border-radius: var(--r-pill); }
body.web .cat-add { width: 150px; }
body.web .cat-add:focus { width: 200px; }
body.web .cat-chip button { width: 28px; height: 28px; }
body.web .layer-box { border-radius: var(--r-lg); }
body.web .picklist { max-height: 260px; border-radius: var(--r-md); }
body.web .picklist label { min-height: 42px; font-size: 15px; }
body.web .picklist input { width: 20px; height: 20px; }
body.web .rm-back { min-height: 44px; font-size: 16px; }

/* --- Avisos y menú contextual --- */
body.web #toast-root { top: calc(var(--safe-t) + 10px); }
body.web .toast { background: #2c2c29; color: #fff; border-radius: var(--r-pill); padding: 10px 18px; font-size: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); }
body.web .ctx { min-width: 240px; padding: 6px; border-radius: var(--r-lg); background: #262624; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6); }
body.web .ctx-item { min-height: 44px; padding: 0 12px; font-size: 16px; border-radius: var(--r-md); }
body.web .ctx-item:active { background: var(--press); }
body.web .ctx-item .k { display: none; } /* atajos de teclado: no aplican al dedo */

/* --- Vista de un día (como el Calendario de iOS): tira de la semana arriba y filas con la hora a la izquierda --- */
.page-bar { justify-content: space-between; }
.page-add { margin-right: -10px; color: var(--accent); }
.df-strip { flex: none; padding: 0 6px 6px; border-bottom: 1px solid var(--line); overflow: hidden; }
.ds-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ds-d { border: 0; background: none; color: var(--text); font: inherit; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; min-height: 58px; cursor: pointer; }
.ds-d .wd { font-size: 11px; font-weight: 600; color: var(--faint); }
.ds-d .dn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background-color 0.25s var(--out), color 0.25s var(--out), transform 0.2s var(--out); }
.ds-d.today .dn { color: var(--accent); font-weight: 700; }
.ds-d.on .dn { background: var(--text); color: var(--bg-web, #121211); font-weight: 700; }
.ds-d.on.today .dn { background: var(--accent); color: #fff; }
.ds-d:active .dn { transform: scale(0.9); transition-duration: 0.08s; }
.ds-d i { width: 4px; height: 4px; border-radius: 50%; }
.ds-d i.has { background: var(--faint); }
.df-head { padding: 14px 2px 4px; }
.df-title { font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.df-mo { color: var(--muted); font-size: 15px; margin-top: 2px; }
.df-sec { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); margin: 18px 2px 6px; }
.df-list { display: grid; gap: 6px; min-width: 0; }
.arow { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 52px; padding: 9px 12px 9px 10px; border-radius: var(--r-md); background: var(--card); cursor: pointer; transition: background-color 0.2s; }
.arow:active { background: var(--soft); transition-duration: 0s; }
.arow.now { background: color-mix(in srgb, var(--c) 14%, var(--card)); }
.atime { width: 42px; flex: none; display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.atime b { font-weight: 600; color: var(--text); }
.atime span { color: var(--faint); }
.abar { width: 3px; align-self: stretch; border-radius: 2px; background: var(--c); flex: none; }
.agrow { flex: 1; min-width: 0; }
.at { display: flex; align-items: flex-start; gap: 6px; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.at span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.at .ic { color: var(--c); flex: none; margin-top: 2px; }
.as { color: var(--muted); font-size: 13px; line-height: 1.3; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow.done .at span { color: var(--muted); text-decoration: line-through; }
.acheck { position: relative; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--c); background: transparent; color: transparent; display: grid; place-items: center; flex: none; cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.2s var(--out); }
.acheck::after { content: ''; position: absolute; inset: -9px; } /* área de toque de 44 px */
.acheck.on, .arow.done .acheck { background: var(--c); color: #fff; }
.acheck:active { transform: scale(0.9); }
.df-empty { display: grid; gap: 6px; color: var(--muted); text-align: center; padding: 56px 0 40px; font-size: 17px; }
.df-empty span { font-size: 14px; color: var(--faint); }
.df-st { margin-top: 22px; width: 100%; }
.df-st button { flex: 1; justify-content: center; font-size: 14px; }

/* --- Recordatorios --- */
body.web .rm-row { background: var(--panel); min-height: 48px; }
body.web .rm-t { font-size: 16px; line-height: 23px; }
body.web .rm-check { width: 24px; height: 24px; }
body.web .rm-check i { inset: 3px; }
body.web .rm-check::after { content: ''; position: absolute; inset: -10px; } /* área de toque de 44 px */
body.web .rm-fold { position: relative; }
body.web .rm-fold::after { content: ''; position: absolute; inset: -10px -6px; }
body.web .rm-info { opacity: 0; width: 36px; height: 28px; }
body.web .rm-row:focus-within .rm-info, body.web .rm-row.open .rm-info { opacity: 1; }
body.web .rm-search { height: 40px; border-radius: var(--r-md); }
body.web .rm-tile { padding: 12px 13px 11px; border-radius: var(--r-lg); }
body.web .rm-group { border-radius: var(--r-lg); }
body.web .rm-lrow { min-height: 50px; font-size: 16px; }
body.web .rm-tag { min-height: 36px; border-radius: var(--r-pill); padding: 0 14px; }
body.web .rm-detail { border-radius: var(--r-lg); padding: 12px; }
body.web .rm-quick button { min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); font-size: 14px; }
body.web .rm-new { min-height: 48px; font-size: 16px; }
/* Barra de accesorios: cápsula flotante que sube con el teclado */
body.web .rm-bar {
  position: fixed; left: 8px; right: 8px; bottom: max(calc(var(--kb, 0px) + 8px), calc(var(--safe-b) + 8px)); transform: translate3d(0, calc(100% + 60px), 0);
  border-radius: var(--r-pill); border: 1px solid var(--line); background: #262624; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); padding: 4px 6px; justify-content: space-between;
  transition: opacity 0.2s, transform 0.4s var(--ease-ios);
}
body.web .how.open.rm-editing .rm-bar { transform: none; }
body.web .rm-bar button { height: 44px; min-width: 44px; border-radius: var(--r-pill); }
body.web .rm-bar button:active { background: var(--press); }
body.web .rm-bar .sp { flex: 1; background: none; }

/* --- Entrada --- */
body.web #login { position: fixed; padding: 20px var(--gutter); background: var(--bg-web); backdrop-filter: none; }
body.web .login-card { border-radius: var(--r-xl); padding: 28px 22px; }

/* ================= Tiempo bloqueado (rayado) ================= */
.bar.blocking, .wk-it.blocking, .wk-chip.blocking { background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.22) 0 3px, transparent 3px 7px); }
.bar.ext.blocking { background-color: color-mix(in srgb, var(--c) 70%, var(--panel)); color: #fff; }
.cell.blocked::before { opacity: 1; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--text) 9%, transparent) 0 3px, transparent 3px 8px); }
.tag.blocking-tag { --c: var(--muted); }

/* Tiempo bloqueado de otra capa: solo la forma, gris translúcido y de fondo, sin texto */
.bar.foreign, .wk-it.foreign, .wk-chip.foreign, .arow.foreign .abar {
  background-color: color-mix(in srgb, var(--text) 8%, transparent) !important; color: transparent !important; border-color: transparent !important; box-shadow: none !important;
  background-image: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--text) 9%, transparent) 0 3px, transparent 3px 7px) !important;
}
.bar.foreign, .wk-it.foreign, .wk-chip.foreign { overflow: hidden; font-size: 0; }
.wk-it.foreign { z-index: 0; margin: 0; border-radius: 6px; }
/* Siempre detrás: al pasar el ratón o pulsarla no se eleva ni se mueve por encima de lo demás */
.wk-it.foreign, .wk-it.foreign:hover, .wk-it.foreign:active, .bar.foreign, .bar.foreign:hover, .bar.foreign:active { z-index: 0 !important; transform: none !important; filter: none !important; transition: background-color 0.2s ease !important; }
.wk-it.foreign:hover, .bar.foreign:hover { background-color: color-mix(in srgb, var(--text) 12%, transparent) !important; }
.wk-it:not(.foreign) { z-index: 1; }
.arow.foreign { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 7%, transparent); min-height: 40px; }
.arow.foreign .abar { align-self: stretch; flex: 1; width: auto; border-radius: 8px; }
.arow.foreign .agrow { display: none; }
.arow.foreign .atime { opacity: 0.55; }

/* ================= Vista semanal ================= */
.weeks.wkview { display: block; }
.weekdays, .dots { transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
body.view-week .weekdays, body.view-week .dots { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.view-ghost { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
body.view-week .cal { top: 62px; }
body.web.view-week .cal { top: calc(68px + env(safe-area-inset-top)); touch-action: pan-y; }
.wk { position: absolute; inset: 0; display: flex; flex-direction: column; }
.wk-row { display: grid; grid-template-columns: 30px repeat(7, 1fr); flex: none; }
.wk-dh { border: 0; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px 0 6px; cursor: pointer; border-radius: 12px; transition: background 0.2s, transform 0.4s var(--spring); }
.wk-dh:hover { background: var(--hover); }
.wk-dh:active { transform: scale(0.94); }
.wk-dh .wd { font-size: 10px; letter-spacing: 0.1em; font-weight: 600; }
.wk-dh .dn { font-size: 17px; font-weight: 600; color: var(--text); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.wk-dh.we .dn { color: var(--muted); }
.wk-dh.today .dn { background: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(217, 119, 87, 0.45); }
.wk-allday { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.wk-ad { display: flex; flex-direction: column; gap: 3px; padding: 0 2px; min-width: 0; }
.wk-chip { height: 18px; line-height: 18px; border-radius: 6px; padding: 0 5px; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--c); color: var(--ink, #fff); cursor: pointer; display: flex; align-items: center; gap: 3px; }
.wk-chip.ext { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--text); }
.wk-chip.goal, .wk-chip.todo { background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in srgb, var(--c) 75%, var(--text)); box-shadow: inset 0 0 0 1.2px color-mix(in srgb, var(--c) 60%, transparent); }
.wk-chip.done { opacity: 0.45; }
.wk-more { font-size: 10px; color: var(--muted); padding-left: 4px; }
.wk-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.wk-grid { position: relative; display: grid; grid-template-columns: 30px repeat(7, 1fr); }
.wk-hours { position: relative; }
.wk-hours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wk-hours span:first-child { transform: none; }
.wk-col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% calc(60px * var(--ppm, 1)); cursor: copy; }
.wk-col.today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.wk-col.blocked { background-image: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--text) 8%, transparent) 0 3px, transparent 3px 8px); cursor: not-allowed; }
.wk-it { position: absolute; padding: 3px 5px; border-radius: 7px; background: color-mix(in srgb, var(--c) 86%, var(--panel)); color: var(--ink, #fff); font-size: 10.5px; line-height: 1.25; overflow: hidden; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); transition: transform 0.4s var(--out), box-shadow 0.3s, filter 0.3s; margin: 0 1px; }
.wk-it:hover { transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 30%, transparent); z-index: 2; filter: brightness(1.05); }
.wk-it b { display: block; font-weight: 700; font-size: 9.5px; opacity: 0.85; font-variant-numeric: tabular-nums; }
.wk-it span { display: flex; gap: 3px; align-items: flex-start; font-weight: 600; overflow-wrap: anywhere; }
.wk-it.thin { display: flex; gap: 4px; align-items: center; white-space: nowrap; padding: 1px 5px; }
.wk-it.thin b { display: inline; }
.wk-it.thin span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-it.ext { background: color-mix(in srgb, var(--c) 24%, var(--panel)); color: var(--text); }
.wk-it.goal, .wk-it.todo { background: color-mix(in srgb, var(--c) 16%, var(--panel)); color: var(--text); border-style: dashed; }
.wk-it.done { opacity: 0.5; }
.wk-it.blocking { background-color: color-mix(in srgb, var(--c) 55%, var(--panel)); color: #fff; }
.wk-now { position: absolute; left: -1px; right: 0; height: 2px; background: var(--accent); z-index: 3; pointer-events: none; }
.wk-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.weeks.wkview.anim .wk-it { animation: barIn 0.5s var(--out) backwards; }
body.web .wk-dh .dn { font-size: 16px; width: 28px; height: 28px; }
body.web .wk-it { font-size: 10px; padding: 2px 3px; }

/* Dependencias de progreso */
.deps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.topic-deps { margin: 6px 0 2px 22px; }
.dep { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 3px 0 7px; border-radius: 10px; font-size: 11px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); max-width: 100%; }
.dep span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.dep button { border: 0; background: none; color: inherit; opacity: 0.55; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.dep button:hover { opacity: 1; background: var(--hover); }
.dep.add { cursor: pointer; padding: 0 8px; border-style: dashed; color: var(--accent); background: none; font: inherit; font-size: 11px; transition: transform 0.35s var(--spring); }
.dep.add:active { transform: scale(0.94); }
.task.auto .check { border-style: dashed; }
.cat-pct { font-size: 11px; opacity: 0.75; margin-left: 4px; font-variant-numeric: tabular-nums; }
.c-meta.sums { margin-top: 10px; display: flex; gap: 6px; align-items: center; }

/* Capas: varias a la vez */
.layer-menu .tick { width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; color: transparent; transition: background 0.2s, border-color 0.2s, transform 0.35s var(--spring); }
.layer-menu .tick.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.layer-menu button:active .tick { transform: scale(0.85); }
.lm-hint { font-size: 11px; color: var(--faint); padding: 4px 10px 2px; }

/* Indicador de Escape en la cabecera */
.head .esc-hint { -webkit-app-region: no-drag; order: 9; font: 600 10px/16px var(--sans); letter-spacing: 0.04em; color: var(--faint); border: 1px solid var(--line-strong); border-radius: 5px; padding: 0 5px; margin: 0 2px 0 6px; opacity: 0.7; }

/* Memoria: normas y fijados (memoria núcleo) */
.mem.core { background: var(--accent-soft); border-radius: 10px; }
.mem-k { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-right: 6px; }

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