/* ══════════════════════════════════════════════════════════════
   PLATA EN EL CELU (≤700px) — diseño de la maqueta v3 (iOS 26)
   En el celu se esconde la versión de PC y se muestra #celu, que lee los mismos datos.
   Vidrio (backdrop-filter) solo en lo que flota: barra de pestañas, botón + y hojas.
══════════════════════════════════════════════════════════════ */
#celu { display: none; }

@media (max-width: 700px) {
  body > nav, body > .page { display: none !important; }
  /* Avisos cortos: píldora de vidrio arriba, como en la maqueta */
  .toast { top: calc(env(safe-area-inset-top, 0px) + 8px); bottom: auto; transform: translateX(-50%) translateY(-140%);
    background: var(--c-glass); color: var(--c-text); font-family: var(--c-ui); font-size: 15px; font-weight: 600;
    padding: 10px 18px; border-radius: 22px; -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
    box-shadow: var(--c-glass-shadow), inset 0 0 0 .5px var(--c-glass-edge); transition: opacity .3s, transform .45s cubic-bezier(.32,.72,0,1); }
  .toast.show { transform: translateX(-50%) translateY(0); }
  .toast .toast-btn { color: var(--c-accent); font-family: var(--c-ui); }
  body { background: var(--c-bg); }
  #celu { display: block; }
}

body, #celu, .celu-hoja, .toast {
  --c-bg: #efeae0; --c-surface: #ffffff; --c-surface2: #f4f0e8; --c-line: #e2dbcd;
  --c-text: #1a1814; --c-muted: #625d55; --c-faint: #8a8476;
  --c-ink: #1a1814; --c-on-ink: #faf7f2; --c-on-ink-muted: #b9b2a5; --c-ink-track: #3a3631;
  --c-accent: #1a5c3a; --c-accent-bright: #5cc28b; --c-accent-soft: #e2f0e7; --c-on-accent: #ffffff;
  --c-red: #b8321a; --c-blue: #2456a6; --c-orange: #94560c;
  --c-glass: rgba(255,253,248,.66); --c-glass-edge: rgba(255,255,255,.8);
  --c-glass-shadow: 0 10px 30px rgba(40,30,10,.14), 0 1px 2px rgba(40,30,10,.08);
  --c-serif: 'DM Serif Display', Georgia, serif;
  --c-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --c-ease: cubic-bezier(.32,.72,0,1);
  --c-sat: env(safe-area-inset-top, 0px); --c-sab: env(safe-area-inset-bottom, 0px);
}
/* La letra solo dentro del celu: el body lleva los colores (para el fondo) pero no cambia la PC */
#celu, .celu-hoja { font-family: var(--c-ui); color: var(--c-text); font-size: 17px; line-height: 1.35; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body, :root:not([data-theme="light"]) #celu, :root:not([data-theme="light"]) .celu-hoja, :root:not([data-theme="light"]) .toast {
    --c-bg: #0f0e0c; --c-surface: #1c1a17; --c-surface2: #262420; --c-line: #33302a;
    --c-text: #f2ede4; --c-muted: #a7a092; --c-faint: #867f72;
    --c-ink: #1d3a2a; --c-on-ink: #eef6f0; --c-on-ink-muted: #a9c6b4; --c-ink-track: #2f5240;
    --c-accent: #5cc28b; --c-accent-bright: #7ad6a2; --c-accent-soft: #18301f; --c-on-accent: #08140d;
    --c-red: #ff8268; --c-blue: #8db2f0; --c-orange: #e9a54d;
    --c-glass: rgba(42,40,36,.6); --c-glass-edge: rgba(255,255,255,.13); --c-glass-shadow: 0 10px 30px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] body, :root[data-theme="dark"] #celu, :root[data-theme="dark"] .celu-hoja, :root[data-theme="dark"] .toast,
:root[data-theme="oled"] body, :root[data-theme="oled"] #celu, :root[data-theme="oled"] .celu-hoja, :root[data-theme="oled"] .toast {
  --c-bg: #0f0e0c; --c-surface: #1c1a17; --c-surface2: #262420; --c-line: #33302a;
  --c-text: #f2ede4; --c-muted: #a7a092; --c-faint: #867f72;
  --c-ink: #1d3a2a; --c-on-ink: #eef6f0; --c-on-ink-muted: #a9c6b4; --c-ink-track: #2f5240;
  --c-accent: #5cc28b; --c-accent-bright: #7ad6a2; --c-accent-soft: #18301f; --c-on-accent: #08140d;
  --c-red: #ff8268; --c-blue: #8db2f0; --c-orange: #e9a54d;
  --c-glass: rgba(42,40,36,.6); --c-glass-edge: rgba(255,255,255,.13); --c-glass-shadow: 0 10px 30px rgba(0,0,0,.5);
}
:root[data-theme="oled"] body, :root[data-theme="oled"] #celu, :root[data-theme="oled"] .celu-hoja { --c-bg: #000; --c-surface: #111; }

:where(#celu, .celu-hoja) button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
#celu :focus-visible, .celu-hoja :focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 8px; }
#celu .num, .celu-hoja .num { font-variant-numeric: tabular-nums; }

/* ── Vistas ── */
/* Sin alto mínimo: con 100dvh sobraba un pedacito de píxel y la pantalla se podía mover aunque no hubiera más nada.
   Abajo, lo justo para la barra de pestañas (≈74px con su margen) y 16px de aire. */
.cv { padding: calc(var(--c-sat) + 10px) 16px calc(var(--c-sab) + 92px); background: var(--c-bg); }
.cv[hidden] { display: none; }
.c-top { display: flex; align-items: center; gap: 10px; }
.c-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent); font-weight: 600; font-size: 15px; display: grid; place-items: center; flex: none; overflow: hidden; }
.c-avatar img { width: 100%; height: 100%; object-fit: cover; }
.c-hello { flex: 1; font-size: 15px; color: var(--c-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-gbtn { height: 44px; min-width: 44px; padding: 0 14px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 16px; font-weight: 500;
  background: var(--c-glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--c-glass-shadow), inset 0 0 0 .5px var(--c-glass-edge); position: relative; }
.c-gbtn svg { width: 20px; height: 20px; }
.c-gbtn.dot::after { content: ""; position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--c-red); box-shadow: 0 0 0 2px var(--c-surface); }
.c-title { font-weight: 700; font-size: 34px; line-height: 1.2; letter-spacing: -.6px; margin: 10px 4px 0; display: flex; align-items: center; gap: 6px; }
.c-title button { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; letter-spacing: -.6px; }
.c-title svg { width: 18px; height: 18px; color: var(--c-muted); }
.c-range { font-size: 15px; color: var(--c-muted); margin: 2px 4px 16px; }
.c-range b { color: var(--c-accent); font-weight: 600; }
.c-sh { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 4px 8px; }
.c-sh h2 { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.c-sh .c-link, .c-link { color: var(--c-accent); font-size: 15px; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.c-sh span { font-size: 15px; color: var(--c-muted); }
.c-group { background: var(--c-surface); border-radius: 22px; overflow: hidden; }
.c-empty { text-align: center; padding: 26px 20px; color: var(--c-muted); font-size: 15px; line-height: 1.45; }
.c-empty b { display: block; color: var(--c-text); font-size: 17px; margin-bottom: 4px; }
.c-btn { min-height: 50px; padding: 0 22px; border-radius: 25px; background: var(--c-accent) !important; color: var(--c-on-accent) !important; font-weight: 600 !important; margin-top: 14px; }
.c-foot { font-size: 13px; color: var(--c-muted); margin: 8px 16px 0; line-height: 1.45; }

/* ── Tarjeta del mes ── */
.c-ink { display: block; width: 100%; text-align: left; background: var(--c-ink) !important; color: var(--c-on-ink) !important; border-radius: 28px; padding: 20px; transition: transform .12s var(--c-ease); }
.c-ink:active { transform: scale(.985); }
.c-ink .hrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--c-on-ink-muted); }
.c-ink .hrow svg { width: 16px; height: 16px; flex: none; }
.c-ink .big { font-family: var(--c-serif); font-size: 52px; line-height: 1; letter-spacing: -1px; margin-top: 8px; }
.c-ink .big small { font-size: 26px; vertical-align: .55em; margin-right: 3px; color: var(--c-on-ink-muted); }
.c-ink .eq { font-size: 13px; color: var(--c-on-ink-muted); margin-top: 6px; }
.c-ink .bar { display: flex; gap: 2px; height: 8px; margin-top: 16px; }
.c-ink .bar i { display: block; height: 100%; border-radius: 3px; }
.c-striped { background: repeating-linear-gradient(135deg, var(--c-orange) 0 3px, color-mix(in srgb, var(--c-orange) 55%, var(--c-ink)) 3px 6px); }
.c-ink .rows { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--c-on-ink-muted); }
.c-ink .rows div { display: flex; align-items: center; gap: 8px; }
.c-ink .rows span { flex: 1; }
.c-ink .rows b { color: var(--c-on-ink); font-weight: 600; }
.c-ink .rows i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.c-ink .cols { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--c-ink-track); }
.c-ink .cols div { font-size: 11px; color: var(--c-on-ink-muted); }
.c-ink .cols div:nth-child(2):not(:last-child) { text-align: center; }
.c-ink .cols div:last-child { text-align: right; }
.c-ink .cols b { display: block; font-size: 13px; color: var(--c-on-ink); font-weight: 600; margin-top: 2px; white-space: nowrap; }
.c-ink .sinpresu { margin-top: 12px; font-size: 13px; color: var(--c-accent-bright); }

/* ── Filas ── */
.c-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; position: relative; width: 100%; text-align: left; background: var(--c-surface); }
.c-row + .c-row::before, .c-row + details > summary::before { content: ""; position: absolute; top: 0; right: 0; left: 62px; border-top: .5px solid var(--c-line); }
button.c-row:active { background: var(--c-surface2); }
.c-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff; font-weight: 700; font-size: 15px; }
.c-main { flex: 1; min-width: 0; }
.c-t, .c-s { display: block; }
.c-t { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-s { font-size: 13px; color: var(--c-muted); margin-top: 1px; }
.c-s .pend { color: var(--c-orange); font-weight: 600; }
.c-amt { text-align: right; font-weight: 600; font-size: 17px; white-space: nowrap; }
.c-amt .c-s { font-weight: 400; }
.c-usd { color: var(--c-blue); }
.c-ckb { width: 44px; height: 44px; margin: -6px 0 -6px -8px; display: grid; place-items: center; flex: none; }
.c-ckb span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--c-faint); display: grid; place-items: center; }
.c-ckb svg { width: 15px; height: 15px; opacity: 0; }
.c-ckb[aria-checked="true"] span { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.c-ckb[aria-checked="true"] svg { opacity: 1; }
.c-row.paid .c-t { color: var(--c-muted); }
.c-fx-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
details.c-more summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 16px; font-size: 15px; color: var(--c-accent); font-weight: 500; cursor: pointer; border-top: .5px solid var(--c-line); background: var(--c-surface); }
details.c-more summary::-webkit-details-marker { display: none; }
details.c-more summary svg { width: 14px; height: 14px; transition: transform .2s; }
details.c-more[open] summary svg { transform: rotate(90deg); }
.c-addfx { display: block; width: 100%; min-height: 48px; padding: 0 16px; text-align: left; color: var(--c-accent) !important; font-size: 15px; font-weight: 500; border-top: .5px solid var(--c-line) !important; background: var(--c-surface) !important; }

/* Registros */
.c-month { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 16px; width: 100%; text-align: left; position: relative; background: var(--c-surface); }
.c-month + .c-month::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--c-line); }
.c-month .mn { font-weight: 600; width: 120px; flex: none; }
.c-month .mn small { display: block; font-size: 13px; font-weight: 400; color: var(--c-muted); }
.c-month .mb { flex: 1; height: 6px; border-radius: 3px; background: var(--c-surface2); overflow: hidden; }
.c-month .mb i { display: block; height: 100%; background: var(--c-accent); border-radius: 3px; }
.c-month .mv { min-width: 86px; text-align: right; font-weight: 600; }
.c-yearbar { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 4px 10px; color: var(--c-muted); font-size: 15px; }
.c-yearbar b { font-family: var(--c-serif); font-weight: 400; font-size: 26px; color: var(--c-text); }
.c-day { font-size: 13px; color: var(--c-muted); margin: 20px 16px 6px; display: flex; justify-content: space-between; }
.c-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; color: var(--c-accent); font-size: 17px; font-weight: 500; }
.c-back svg { width: 22px; height: 22px; }
.c-mini { background: var(--c-ink); color: var(--c-on-ink); border-radius: 24px; padding: 16px 18px; margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.c-mini .k { font-size: 13px; color: var(--c-on-ink-muted); }
.c-mini .v { font-family: var(--c-serif); font-size: 28px; line-height: 1.1; }

/* Ajustes */
.c-set { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; width: 100%; text-align: left; position: relative; background: var(--c-surface); font-size: 16px; }
.c-set + .c-set::before { content: ""; position: absolute; top: 0; right: 0; left: 58px; border-top: .5px solid var(--c-line); }
.c-set .c-ico { width: 30px; height: 30px; border-radius: 8px; }
.c-set .c-ico svg { width: 18px; height: 18px; }
.c-set .v { color: var(--c-muted); font-size: 15px; white-space: nowrap; }
.c-set .chev { color: var(--c-faint); width: 14px; flex: none; }
.c-set.danger { justify-content: center; color: var(--c-red); font-weight: 500; }
.c-grp-h { font-size: 13px; color: var(--c-muted); margin: 22px 16px 6px; }

/* Pantallas que entran desde el costado (Números del mes, Avisos, detalle del mes) */
.c-panel { position: fixed; inset: 0; z-index: 260; background: var(--c-bg); overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--c-sat) + 6px) 16px calc(var(--c-sab) + 92px); transform: translateX(102%); visibility: hidden;
  /* al cerrar (botón ‹ o gesto atrás): primero se desliza y recién al final se oculta */
  transition: transform .45s var(--c-ease), visibility 0s linear .45s; }
.c-panel.on { transform: none; visibility: visible; transition: transform .45s var(--c-ease), visibility 0s; }
.c-panel.sin-anim { transition: none; }
@media (prefers-reduced-motion: reduce) { .c-panel, .c-panel.on { transition: none; } }
.c-ptitle { font-weight: 700; font-size: 30px; line-height: 1.15; letter-spacing: -.5px; margin: 4px 4px 0; }
.c-psub { font-size: 15px; color: var(--c-muted); margin: 2px 4px 0; }
.c-wk { display: grid; gap: 10px; align-items: end; height: 140px; padding: 20px 16px 0; }
.c-wk div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.c-wk i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--c-accent) 40%, var(--c-surface2)); min-height: 3px; }
.c-wk .cur i { background: var(--c-accent); }
.c-wk b { font-size: 11px; white-space: nowrap; letter-spacing: -.2px; }
.c-wkl { display: grid; gap: 10px; font-size: 11px; color: var(--c-muted); text-align: center; padding: 6px 16px 14px; }
.c-mrow { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 10px; align-items: center; font-size: 15px; padding: 11px 16px; }
.c-mrow + .c-mrow { border-top: .5px solid var(--c-line); }
.c-mrow i { width: 10px; height: 10px; border-radius: 3px; }
.c-mrow b { font-weight: 600; }
.c-mrow em { font-style: normal; font-size: 13px; color: var(--c-muted); min-width: 36px; text-align: right; }
.c-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--c-line); }
.c-compare div { background: var(--c-surface); padding: 12px 16px; font-size: 13px; color: var(--c-muted); }
.c-compare b { display: block; font-family: var(--c-serif); font-weight: 400; font-size: 24px; color: var(--c-text); margin-top: 2px; }
.c-tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px 14px 22px; font-size: 16px; line-height: 1.35; position: relative; background: var(--c-surface); }
.c-tip + .c-tip { border-top: .5px solid var(--c-line); }
.c-tip .c-ico { width: 30px; height: 30px; border-radius: 8px; }
.c-tip small { display: block; font-size: 13px; color: var(--c-muted); margin-top: 2px; }
.c-tip.new::before { content: ""; position: absolute; left: 8px; top: 25px; width: 7px; height: 7px; border-radius: 50%; background: var(--c-blue); }

/* ── Barra de pestañas flotante + botón + ── */
.c-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 270; display: flex; gap: 10px; align-items: flex-end; padding: 0 16px calc(var(--c-sab) + 6px); pointer-events: none; }
.c-dock > * { pointer-events: auto; }
.c-tabbar { position: relative; flex: 1; display: flex; height: 62px; border-radius: 31px; padding: 4px;
  background: var(--c-glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  box-shadow: var(--c-glass-shadow), inset 0 1px 0 var(--c-glass-edge), inset 0 0 0 .5px var(--c-glass-edge); }
.c-tabbar button { flex: 1; border-radius: 27px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--c-text); transition: background .25s var(--c-ease); }
.c-tabbar button svg { width: 24px; height: 24px; }
.c-tabbar button { position: relative; z-index: 1; transition: color .25s var(--c-ease); }
.c-tabbar button[aria-current="page"] { color: var(--c-accent); }
/* La "lente" de la pestaña activa: se desliza con un leve rebote, como en iOS 26 */
.c-tabind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); border-radius: 27px;
  background: color-mix(in srgb, var(--c-text) 9%, transparent); box-shadow: inset 0 0 0 .5px var(--c-glass-edge);
  transition: transform .5s cubic-bezier(.34,1.32,.5,1); }
.c-tabbar button[aria-current="page"] svg { animation: c-tap .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes c-tap { 40% { transform: scale(.86); } }
.c-fab { width: 62px; height: 62px; border-radius: 31px; flex: none; display: grid; place-items: center; color: var(--c-on-accent) !important; background: var(--c-accent) !important;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--c-accent) 40%, transparent); transition: transform .15s var(--c-ease); }
.c-fab:active, .c-tabbar button:active { transform: scale(.92); }
.c-fab svg { width: 26px; height: 26px; }

/* ── Hoja de pago de un fijo ── */
.celu-hoja { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end; background: rgba(0,0,0,0); pointer-events: none; transition: background .3s; }
.celu-hoja.open { background: rgba(0,0,0,.28); pointer-events: auto; }
.celu-hoja .sheet { width: 100%; margin: 0 6px 6px; border-radius: 40px; padding: 8px 16px calc(var(--c-sab) + 18px);
  background: color-mix(in srgb, var(--c-bg) 92%, transparent); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 -10px 40px rgba(0,0,0,.18); transform: translateY(105%); transition: transform .45s var(--c-ease); }
.celu-hoja.open .sheet { transform: none; }
.celu-hoja .grab { touch-action: none; cursor: grab; width: 36px; height: 5px; border-radius: 3px; background: var(--c-faint); opacity: .5; margin: 0 auto 6px; }
.celu-hoja .sh-h { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.celu-hoja .sh-h > :first-child { justify-self: start; }
.celu-hoja .sh-h > :last-child { justify-self: end; }
.celu-hoja .sh-h h3 { text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.celu-hoja h3 { font-size: 17px; font-weight: 600; font-family: var(--c-ui); margin: 0; }
.celu-hoja .prim { background: var(--c-accent) !important; color: var(--c-on-accent) !important; font-weight: 600; box-shadow: none; }
.celu-hoja .amount { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 6px; margin: 22px 0 4px; }
.celu-hoja .amount > span { justify-self: end; }
.celu-hoja .amount::after { content: ""; }
.celu-hoja .amount span { font-family: var(--c-serif); font-size: 30px; color: var(--c-muted); }
.celu-hoja .amount input { font-family: var(--c-serif); font-size: 52px !important; width: 1.3ch; max-width: 66vw; text-align: center; border: 0; background: none; outline: none; color: var(--c-text); letter-spacing: -1px; }
.celu-hoja .hint { text-align: center; font-size: 13px; color: var(--c-muted); }
.celu-hoja .field { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; background: var(--c-surface); border-radius: 18px; margin-top: 18px; }
.celu-hoja .field > span:first-child { white-space: nowrap; }
.celu-hoja .field .hoy { flex: 1; text-align: right; color: var(--c-accent); font-weight: 600; }
.celu-hoja .field input { border: 0; background: none; outline: none; font-size: 16px; color: var(--c-accent); font-family: var(--c-ui); }

/* ══ Componentes de la maqueta v3 ══ */
/* Barra de arriba: transparente; con vidrio y el título chico al bajar */
.c-navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 280; height: calc(var(--c-sat) + 44px); padding-top: var(--c-sat);
  display: grid; place-items: center; font-weight: 600; font-size: 17px; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: color-mix(in srgb, var(--c-bg) 72%, transparent); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); }
.c-navbar.on { opacity: 1; }
.c-top-r { justify-content: flex-end; min-height: 44px; }
.c-gbtn.icon { padding: 0; width: 44px; }
.c-gbtn.prim { background: var(--c-accent); color: var(--c-on-accent); font-weight: 600; box-shadow: none; }
.c-gbtn.prim:disabled { opacity: .4; }
.c-gbtn svg + * , .c-gbtn > svg:last-child { flex: none; }
#c-anio svg { width: 14px; height: 14px; }
.c-panel .c-title { margin-top: 8px; }
.c-badge { display: inline-block; align-self: flex-start; margin-top: 3px; font-size: 11px; font-weight: 600; color: var(--c-accent); background: var(--c-accent-soft); border-radius: 8px; padding: 3px 8px; }
.c-badge.gris { color: var(--c-muted); background: var(--c-surface2); }
.c-month .mn { display: flex; flex-direction: column; }

/* Deslizar para borrar */
.c-swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; position: relative; }
.c-swipe::-webkit-scrollbar { display: none; }
.c-swipe > .c-row { flex: 0 0 100%; scroll-snap-align: start; }
.c-swipe .c-del { flex: 0 0 88px; scroll-snap-align: end; background: #c0351a !important; color: #fff !important; font-weight: 600; font-size: 15px; }
.c-swipe + .c-swipe .c-row::before { content: ""; position: absolute; top: 0; right: 0; left: 62px; border-top: .5px solid var(--c-line); }

/* Tarjeta oscura del mes: pesos, dólares y tipo de cambio */
.c-mini .c-tcbtn { font-size: 13px; color: var(--c-on-ink-muted); min-height: 32px; display: inline-flex; align-items: center; gap: 2px; justify-self: start; }
.c-mini .c-tcbtn b { color: var(--c-on-ink); font-weight: 600; margin-left: 3px; }
.c-mini .c-tcbtn svg { width: 14px; height: 14px; }
.c-mini .foot2 { grid-column: 1 / -1; border-top: 1px solid var(--c-ink-track); margin-top: 8px; padding-top: 10px; font-size: 13px; color: var(--c-on-ink-muted); display: flex; justify-content: space-between; gap: 8px; }
.c-mini .foot2 b { color: var(--c-on-ink); font-weight: 600; }

/* Buscador y control segmentado */
.c-search { display: flex; align-items: center; gap: 8px; background: var(--c-surface2); border-radius: 14px; padding: 0 12px; min-height: 44px; margin: 14px 0 12px; }
.c-search svg { width: 18px; color: var(--c-muted); flex: none; }
.c-search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; height: 44px; font-size: 17px; color: var(--c-text); font-family: var(--c-ui); }
.c-search input::placeholder { color: var(--c-muted); }
.c-seg { display: flex; background: var(--c-surface2); border-radius: 20px; padding: 3px; gap: 2px; }
.c-seg button { flex: 1; min-height: 36px; border-radius: 17px; font-size: 15px; font-weight: 500; color: var(--c-muted) !important; padding: 0 10px; transition: background .2s, color .2s; }
.c-seg button[aria-pressed="true"] { background: var(--c-surface) !important; color: var(--c-text) !important; box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* Hoja de gasto */
.celu-hoja .sheet { max-height: calc(100dvh - var(--c-sat) - 10px); overflow-y: auto; overscroll-behavior: contain; }
.celu-hoja .lbl-s { font-size: 13px; color: var(--c-muted); margin: 18px 4px 8px; display: flex; justify-content: space-between; }
.celu-hoja .auto { color: var(--c-accent); font-weight: 600; }
.c-field { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; background: var(--c-surface); position: relative; font-size: 17px; }
.c-field + .c-field::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--c-line); }
.c-field[hidden] { display: none; }
.c-field > span:first-child { width: 96px; color: var(--c-muted); flex: none; white-space: nowrap; }
.c-field input { border: 0; background: none; outline: none; flex: 1; min-width: 0; height: 50px; font-size: 17px; color: var(--c-text); font-family: var(--c-ui); }
.c-field .hoy { flex: 1; text-align: right; color: var(--c-accent); font-weight: 600; }
.c-field input[type="date"] { flex: none; width: auto; color: var(--c-accent); text-align: right; }
.c-cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 4px; }
.c-cats::-webkit-scrollbar { display: none; }
.c-cats button { flex: none; scroll-snap-align: start; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px; background: var(--c-surface) !important; font-size: 15px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--c-line); }
.c-cats button i { width: 8px; height: 8px; border-radius: 50%; }
.c-cats button[aria-pressed="true"] { background: var(--c-text) !important; color: var(--c-bg) !important; box-shadow: none; }
.c-borrar[hidden] { display: none; }
.c-borrar { display: block; width: 100%; min-height: 50px; margin-top: 18px; border-radius: 18px; background: var(--c-surface) !important; color: var(--c-red) !important; font-weight: 500; }
.celu-hoja .bigin { font-family: var(--c-serif); font-size: 48px !important; width: 100%; text-align: center; border: 0; background: none; outline: none; margin: 18px 0 4px; color: var(--c-text); }

/* Ajustes: tarjeta de perfil */
.c-profile { min-height: 84px; gap: 14px; }
.c-avatar.big { width: 60px; height: 60px; font-size: 22px; }
.c-profile .c-t { font-weight: 600; font-size: 19px; }
.c-set .c-t { font-size: 16px; white-space: normal; }

/* ══ Fase 2 ══ */
/* Interruptor (Cómo pagás) */
.c-sw { width: 51px; height: 31px; border-radius: 16px; background: var(--c-surface2) !important; box-shadow: inset 0 0 0 1px var(--c-line); position: relative; flex: none; transition: background .2s; }
.c-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .25s var(--c-ease); }
.c-sw[aria-checked="true"] { background: var(--c-accent) !important; box-shadow: none; }
.c-sw[aria-checked="true"]::after { transform: translateX(20px); }
/* Año */
.c-yearcard { background: var(--c-ink); color: var(--c-on-ink); border-radius: 24px; padding: 18px; margin-top: 2px; }
.c-yearcard .k { font-size: 13px; color: var(--c-on-ink-muted); }
.c-yearcard .v { font-family: var(--c-serif); font-size: 44px; line-height: 1.05; margin-top: 4px; }
.c-yearcard .ink3 { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--c-ink-track); font-size: 12px; color: var(--c-on-ink-muted); }
.c-yearcard .ink3 div:nth-child(2) { text-align: center; }
.c-yearcard .ink3 div:last-child { text-align: right; }
.c-yearcard .ink3 b { display: block; color: var(--c-on-ink); font-size: 15px; font-weight: 600; margin-top: 2px; }
.c-catbar { display: block; height: 6px; border-radius: 3px; background: var(--c-surface2); overflow: hidden; margin-top: 6px; }
.c-catbar i { display: block; height: 100%; border-radius: 3px; }
.c-hb { display: grid; grid-template-columns: 38px 1fr 82px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.c-hb .tr { height: 22px; border-radius: 6px; background: var(--c-surface2); position: relative; overflow: hidden; }
.c-hb .tr i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c-accent) 35%, var(--c-surface2)); border-radius: 6px; }
.c-hb.top .tr i { background: var(--c-accent); }
.c-hb > span:last-child { text-align: right; font-weight: 600; }
.c-hb .avg { position: absolute; top: 0; bottom: 0; border-left: 1.5px dashed var(--c-text); opacity: .45; }
/* Opciones tipo radio (Tu mes) */
.c-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; text-align: left; position: relative; background: var(--c-surface) !important; }
.c-opt + .c-opt::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--c-line); }
.c-opt .c-t { white-space: normal; }
.c-opt .tick { width: 22px; color: var(--c-accent); opacity: 0; flex: none; }
.c-opt[aria-pressed="true"] .tick { opacity: 1; }
.c-field input[type="number"] { text-align: right; color: var(--c-accent); }
.celu-hoja .bigin.auto { color: var(--c-muted); }
.c-field input[type="number"]::placeholder { color: var(--c-muted); }

/* Nunca más ancho que un iPhone grande: en pantallas algo más anchas queda centrado, como la maqueta */
.cv, .c-dock { max-width: 440px; margin-inline: auto; }
.c-panel { padding-left: max(16px, calc((100vw - 440px) / 2 + 16px)); padding-right: max(16px, calc((100vw - 440px) / 2 + 16px)); }
.celu-hoja .sheet { width: calc(100% - 12px); max-width: 428px; margin-inline: auto; }

@media (prefers-reduced-transparency: reduce) {
  .c-gbtn, .c-tabbar, .c-navbar, .celu-hoja .sheet { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--c-surface); }
}
@media (prefers-reduced-motion: reduce) { .c-panel, .celu-hoja .sheet, .c-ink, .c-tabind { transition: none; } .c-tabbar button svg { animation: none !important; } }
@media (hover: hover) and (pointer: fine) {
  button.c-row:hover, .c-month:hover, .c-set:hover { background: color-mix(in srgb, var(--c-surface2) 60%, var(--c-surface)); }
}

/* Categorías: todas a la vista y "+ Nueva" */
.c-cats .c-cat-new { color: var(--c-accent); background: transparent !important; box-shadow: inset 0 0 0 1px var(--c-line); }
.c-cats .c-cat-new svg { width: 14px; height: 14px; }
.c-cat-in { min-height: 40px; width: 150px; padding: 0 14px; border: 0; border-radius: 20px; outline: 2px solid var(--c-accent); background: var(--c-surface); color: var(--c-text); font: 500 16px var(--c-ui); }

/* Perfil */
.c-pf-foto { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px 0 18px; }
.c-avatar.xl { width: 96px; height: 96px; font-size: 36px; }
.c-field input.ro { color: var(--c-muted); }

/* Importar (como la maqueta) */
.c-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 26px 16px; margin-top: 16px; border-radius: 24px; border: 2px dashed var(--c-line); background: var(--c-surface); text-align: center; font-size: 15px; color: var(--c-muted); cursor: pointer; position: relative; }
.c-drop b { color: var(--c-accent); font-size: 17px; }
.c-drop svg { width: 30px; height: 30px; color: var(--c-accent); }
.c-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.c-drop:focus-within { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.c-row.c-imp { min-height: 56px; }
.c-row.c-imp + .c-row.c-imp::before { left: 16px; }
.c-row.c-imp .c-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-tag { font-size: 13px; font-weight: 600; border-radius: 8px; padding: 3px 8px; background: var(--c-accent-soft); color: var(--c-accent); white-space: nowrap; flex: none; }
.c-tag.off { background: var(--c-surface2); color: var(--c-muted); }
.c-wide { width: 100%; min-height: 50px; border-radius: 25px; background: var(--c-accent) !important; color: var(--c-on-accent) !important; font-weight: 600; font-size: 17px; margin-top: 18px; }
.c-wide:disabled { opacity: .4; }
.c-wide[hidden] { display: none; }

/* El editor de foto y la revisión de importados quedan arriba de las hojas del celu */
#foto-overlay { z-index: 320; }

/* Categoría: fila con menú desplegable */
.c-catsel { width: 100%; text-align: left; color: var(--c-text); }
.c-catsel .auto { flex: 1; text-align: right; font-size: 13px; color: var(--c-muted); }
.c-catsel .v { display: flex; align-items: center; gap: 7px; }
.c-catsel .v i { width: 9px; height: 9px; border-radius: 50%; }
.c-catsel .ud { width: 16px; height: 16px; color: var(--c-muted); flex: none; }
.c-menu-capa { position: fixed; inset: 0; z-index: 335; display: none; }
.c-menu-capa.open { display: block; }
.c-menu { position: fixed; z-index: 340; width: 250px; overflow-y: auto; overscroll-behavior: contain; border-radius: 22px; padding: 6px 0;
  background: var(--c-glass); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 14px 44px rgba(0,0,0,.28), inset 0 0 0 .5px var(--c-glass-edge); font-family: var(--c-ui);
  opacity: 0; transform: scale(.9); transform-origin: top right; pointer-events: none; transition: opacity .18s, transform .28s var(--c-ease); }
.c-menu.arriba { transform-origin: bottom right; }
.c-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.c-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 16px; background: none; border: 0; font: inherit; font-size: 17px; color: var(--c-text); text-align: left; cursor: pointer; }
.c-menu button + button, .c-menu input + button { border-top: .5px solid var(--c-line); }
.c-menu button i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.c-menu button span { flex: 1; }
.c-menu button svg { width: 18px; height: 18px; color: var(--c-accent); flex: none; }
.c-menu .nueva { color: var(--c-accent); font-weight: 500; }
.c-menu .c-cat-in { display: block; width: calc(100% - 16px); margin: 4px 8px; }
@media (prefers-reduced-transparency: reduce) { .c-menu { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--c-surface); } }

/* Hoja de pago: acción secundaria */
.c-sec { display: block; width: 100%; min-height: 50px; margin-top: 12px; border-radius: 25px; background: var(--c-surface) !important; color: var(--c-accent) !important; font-size: 17px; font-weight: 500; }

/* ── Formularios estilo iOS ── */
/* Hoja: fondo agrupado; las filas, en superficie. Sin transparencia la hoja no puede ser del mismo color que las filas */
@media (prefers-reduced-transparency: reduce) { .celu-hoja .sheet { background: var(--c-bg); } }
.celu-hoja .sheet { overflow-x: hidden; }
.celu-hoja .lbl-s { margin: 20px 16px 7px; }
.celu-hoja .hint { min-height: 1.35em; }
/* Texto a lo ancho sin etiqueta (Comercio, Nombre) */
.c-field.c-full input { height: 50px; }
/* Filas de valor: etiqueta a la izquierda, valor a la derecha */
.c-field:has(input[type="date"]) > span:first-child, .c-field:has(input[type="number"]) > span:first-child, .c-catsel > span:first-child { width: auto; flex: 1; }
.c-field input[type="number"] { flex: none; width: 8ch; text-align: right; color: var(--c-text); }
.c-field input[type="date"] { flex: none; width: auto; height: 34px; padding: 0 10px; border-radius: 9px; background: var(--c-surface2); color: var(--c-text); font-size: 16px; text-align: center; }
.c-field input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
.c-field input[type="date"]::-webkit-datetime-edit { padding: 0; }
.c-field .hoy { flex: none; color: var(--c-muted); font-weight: 400; font-size: 15px; }
.c-catsel .auto { flex: none; }
/* Foco: sin marco verde alrededor de cada campo; el cursor ya lo muestra, y las filas-botón se iluminan */
.c-field input:focus-visible, .celu-hoja .amount input:focus-visible { outline: none; }
.c-catsel:focus-visible { outline: none; background: var(--c-surface2) !important; }
/* Categoría nueva: campo + Crear */
.c-cat-nueva { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; }
.c-cat-nueva .c-cat-in { flex: 1; width: auto; min-width: 0; margin: 0; min-height: 36px; outline-width: 1.5px; }
.c-menu .c-cat-nueva .c-cat-ok { width: auto; min-height: 36px; padding: 0 14px; border-radius: 18px; border-top: 0; background: var(--c-accent); color: var(--c-on-accent); font-weight: 600; font-size: 15px; flex: none; }
.c-menu .c-cat-nueva .c-cat-ok:disabled { opacity: .4; }
.c-cat-nueva + button { border-top: .5px solid var(--c-line); }

/* ── Filas que entran y salen (Débito / Crédito / Fijo), como las de Calendario al tocar "Todo el día" ── */
.c-field.c-opc { max-height: 60px; overflow: hidden; transition: max-height .34s var(--c-ease), min-height .34s var(--c-ease), opacity .22s ease; }
.c-field.c-opc.fuera { max-height: 0; min-height: 0; opacity: 0; }
.medir .c-opc { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .c-field.c-opc { transition: opacity .15s; } }

/* Menús en vez de números a mano */
.c-field:has(select) > span:first-child { width: auto; flex: 1; }
.c-field select { flex: none; -webkit-appearance: none; appearance: none; border: 0; outline: none; height: 50px; padding: 0 22px 0 8px; font: inherit; font-size: 17px; color: var(--c-text); text-align: right; text-align-last: right; cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8476' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 9 4-4 4 4M8 15l4 4 4-4'/%3E%3C/svg%3E") no-repeat right center / 16px; }
.c-field select option { color: initial; }
.celu-hoja input[type="number"]::-webkit-inner-spin-button, .celu-hoja input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.celu-hoja input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
#celu input[type="search"]::-webkit-search-cancel-button, #celu input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }

/* Fecha legible en cápsula ("Hoy", "28 nov") */
.c-fecha { position: relative; flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 9px; background: var(--c-surface2); color: var(--c-text); font-size: 16px; }
.c-fecha b { font-weight: 500; }
.c-field .c-fecha input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; pointer-events: none; }
.c-fecha { cursor: pointer; }
.c-field:has(.c-fecha) { cursor: pointer; }
.c-field:has(.c-fecha) > span:first-child { width: auto; flex: 1; }
#cp-hoy { display: none; }

/* Nota */
.c-notabtn .v { min-width: 0; max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-text); }
.c-notabtn .v.vacia { color: var(--c-muted); }
.c-nota-bar { display: flex; gap: 8px; margin: 16px 0 10px; }
.c-chipbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 18px; background: var(--c-surface) !important; font-size: 15px; font-weight: 500; color: var(--c-text); }
.c-chipbtn svg { width: 18px; height: 18px; color: var(--c-accent); }
.c-nota { display: block; width: 100%; min-height: 220px; max-height: 45dvh; border: 0; border-radius: 22px; padding: 14px 16px; background: var(--c-surface); color: var(--c-text); font: 17px/1.45 var(--c-ui); resize: none; outline: none; }
.c-nota::placeholder { color: var(--c-muted); }

/* ── Calendario propio ── */
#c-cal-capa { z-index: 345; }
.c-cal { position: fixed; z-index: 350; width: min(320px, calc(100vw - 16px)); padding: 12px 12px 10px; border-radius: 26px; font-family: var(--c-ui); color: var(--c-text);
  background: var(--c-glass); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 16px 48px rgba(0,0,0,.3), inset 0 0 0 .5px var(--c-glass-edge);
  opacity: 0; transform: scale(.92); transform-origin: top right; pointer-events: none; transition: opacity .18s, transform .28s var(--c-ease); }
.c-cal.arriba { transform-origin: bottom right; }
.c-cal.open { opacity: 1; transform: none; pointer-events: auto; }
.c-cal button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.c-cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.c-cal-h b { font-size: 17px; font-weight: 600; }
.c-cal-nav { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; color: var(--c-accent) !important; }
.c-cal-nav svg { width: 20px; height: 20px; }
.c-cal-nav:disabled { color: var(--c-faint) !important; opacity: .5; }
.c-cal-sem, .c-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.c-cal-sem span { font-size: 12px; font-weight: 600; color: var(--c-muted); padding: 4px 0; }
.c-cal-grid button { height: 40px; margin: 1px auto; width: 40px; border-radius: 50%; font-size: 17px; font-variant-numeric: tabular-nums; transition: background .15s; }
.c-cal-grid button.hoy { color: var(--c-accent); font-weight: 600; }
.c-cal-grid button.sel { background: var(--c-accent); color: var(--c-on-accent); font-weight: 600; }
.c-cal-grid button:disabled { color: var(--c-faint); opacity: .45; cursor: default; }
.c-cal-grid button:not(.sel):not(:disabled):active { background: var(--c-surface2); }
.c-cal-hoy { display: block; margin: 6px auto 0; min-height: 40px; padding: 0 18px; border-radius: 20px; color: var(--c-accent) !important; font-weight: 600 !important; }
.c-cal-hoy:disabled { opacity: .4; }
.c-cal :focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
@media (prefers-reduced-transparency: reduce) { .c-cal { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--c-surface); } }

/* Fecha escrita a mano en el calendario */
.c-cal-in { display: block; width: 100%; height: 44px; margin: 0 0 8px; padding: 0 14px; border: 0; border-radius: 14px; outline: none; background: var(--c-surface2); color: var(--c-text); font: 600 17px var(--c-ui); text-align: center; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.c-cal-in::placeholder { color: var(--c-muted); font-weight: 400; }
.c-cal-in:focus { box-shadow: inset 0 0 0 2px var(--c-accent); }
.c-cal-in.mal { box-shadow: inset 0 0 0 2px var(--c-red); color: var(--c-red); }

/* Cuotas: − número + */
.c-field:has(.c-step) > span:first-child { width: auto; flex: 1; }
.c-step { display: inline-flex; align-items: center; height: 34px; border-radius: 9px; background: var(--c-surface2); flex: none; }
.c-step button { width: 40px; height: 34px; font-size: 20px !important; font-weight: 500; color: var(--c-accent) !important; }
.c-field .c-step input { flex: none; width: 3ch; height: 34px; padding: 0; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--c-text); }

/* Nota en las compras: una línea propia, chica y con ícono, como las notas en Recordatorios */
.c-nt { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 13px; color: var(--c-faint); min-width: 0; }
.c-nt svg { width: 13px; height: 13px; flex: none; }
.c-nt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Nota en la hoja: el texto se ve (hasta 2 líneas), no solo "Agregar" */
.c-notabtn .v { flex: none; }
.c-nota-prev { white-space: pre-line; text-align: left; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
/* Con nota: "Nota" chica arriba, el texto debajo y la flecha centrada a la derecha */
.c-notabtn.llena { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l c" "p p"; column-gap: 12px; row-gap: 2px; align-items: center; padding: 15px 16px 13px; }
.c-notabtn.llena > span:first-child { grid-area: l; width: auto; }
.c-notabtn.llena .v { display: none; }
.c-notabtn.llena .ud { grid-area: c; }
.c-notabtn.llena .c-nota-prev { grid-area: p; font-size: 16px; line-height: 1.4; color: var(--c-text); }
.c-nota-prev[hidden] { display: none; }

.c-field.c-full { min-height: 52px; }
.c-field.c-full input { height: 52px; }

.c-cal-grid span { height: 42px; } /* las celdas vacías ocupan lo mismo que un día */

/* ── Formularios: todas las filas iguales, etiqueta a la izquierda y lo que escribís a la derecha (como Ajustes de iOS) ── */
.celu-hoja .c-field:has(> input:not([type])) > span:first-child, .celu-hoja .c-field:has(> input[type="text"]) > span:first-child { width: auto; flex: none; }
.celu-hoja .c-field > input:not([type]), .celu-hoja .c-field > input[type="text"] { flex: 1; text-align: right; }
.celu-hoja .c-field > input:not([type])::placeholder { color: var(--c-faint); }
/* Nota con texto: un poco más de aire entre la etiqueta y el texto */
.c-notabtn.llena { row-gap: 5px; }
/* Hoja de gasto: el lugar reservado (para que no cambie de alto) queda arriba de "Eliminar", no colgando abajo */
#celu-gasto .sheet { display: flex; flex-direction: column; }
#celu-gasto .sheet > .c-group { flex: none; }
#celu-gasto .c-borrar { margin-top: auto; }
#celu-gasto .c-group:last-of-type { margin-bottom: 18px; }

/* ── Hoja de pago (opción A): qué pagás, cuánto y un botón grande abajo ── */
/* Ritmo: ícono en el lugar del título · nombre y mes · monto · fecha · un botón */
.c-pico .c-ico { width: 44px; height: 44px; border-radius: 13px; }
.c-pico .c-ico svg { width: 24px; height: 24px; }
.c-quien { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 10px; }
.celu-hoja .c-quien h3 { font-size: 20px; font-weight: 600; }
#cp-sub { font-size: 13px; color: var(--c-muted); }
#celu-pago .amount { margin-top: 14px; }
.c-link-in { color: var(--c-accent) !important; font-weight: 600 !important; font-size: 13px; padding: 0; line-height: inherit; }
.c-lnk { display: block; width: 100%; min-height: 44px; color: var(--c-accent) !important; font-size: 16px; font-weight: 500 !important; }
.c-lnk { margin-top: 4px; }
.c-lnk.oculto { visibility: hidden; }
#cp-save { margin-top: 20px; }

/* Menú "···": acciones secundarias del fijo; la que quita va última, separada y en rojo */
#c-acc-capa { z-index: 335; }
#c-acc { width: 250px; }
#c-acc button.rojo { color: var(--c-red); border-top: 6px solid color-mix(in srgb, var(--c-text) 8%, transparent); }
#c-acc button.rojo svg { color: var(--c-red); }
#c-acc button svg { color: var(--c-text); }
#cp-mas svg { width: 20px; height: 20px; }
#cf-rep-g[hidden], #cf-rep-foot[hidden] { display: none; }

/* Día del mes: cápsula como la fecha; el <select> queda escondido debajo */
.c-field .c-fecha select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; padding: 0; }
.c-field:has(.c-fecha select) { cursor: pointer; }
#c-dia-capa { z-index: 345; }
.c-dia { width: min(320px, calc(100vw - 16px)); }
#c-dia-sin[hidden] { display: none; }

/* Encabezado del selector de día: dice qué elegís y que no es una fecha puntual */
.c-dia-h { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0 10px; }
.c-dia-h b { font-size: 17px; font-weight: 600; }
.c-dia-h span { font-size: 13px; color: var(--c-muted); }

/* ── Tutorial en el celu: el globo con el estilo de las hojas ── */
@media (max-width: 700px) {
  .tuto-foco { border-radius: 26px; }
  .tuto-globo { background: var(--c-surface); color: var(--c-text); border: 0; border-radius: 26px; padding: 18px 18px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.4); font-family: var(--c-ui); }
  .tuto-globo h2 { font: 600 20px/1.25 var(--c-ui); margin: 12px 0 6px; }
  .tuto-globo h2 .tuto-logo { font-family: var(--c-serif); font-weight: 400; }
  .tuto-logo em { color: var(--c-accent); }
  .tuto-globo p { font-size: 15px; line-height: 1.45; color: var(--c-muted); }
  .tuto-cuenta { font-size: 13px; color: var(--c-muted); }
  .tuto-puntos i { background: var(--c-line); }
  .tuto-puntos i.activo { background: var(--c-accent); }
  .tuto-btns { margin-top: 16px; }
  .tuto-saltar { min-height: 48px; padding: 0 14px; font: 500 16px var(--c-ui); color: var(--c-accent); }
  .tuto-sig { min-height: 48px !important; padding: 0 22px !important; border: 0 !important; border-radius: 24px !important; background: var(--c-accent) !important; color: var(--c-on-accent) !important; font: 600 16px var(--c-ui) !important; letter-spacing: 0 !important; text-transform: none !important; }
}

/* Eliminar un mes */
.c-bm-ico { width: 56px; height: 56px; margin: 12px auto 0; border-radius: 50%; display: grid; place-items: center; color: var(--c-red); background: color-mix(in srgb, var(--c-red) 14%, transparent); }
.c-bm-ico svg { width: 28px; height: 28px; }
.celu-hoja .c-bm-t { text-align: center; font-size: 20px; margin-top: 12px; }
.c-bm-txt { text-align: center; font-size: 15px; line-height: 1.45; color: var(--c-muted); margin: 6px 8px 0; }
.c-wide.rojo { background: var(--c-red) !important; color: var(--c-on-accent) !important; font-variant-numeric: tabular-nums; }

/* Revisión de importados: aviso de lo salteado */
.im-aviso { margin-top: 6px; font-size: 13px; font-weight: 400; color: var(--c-muted, #67625a); }

/* Celu: sin zoom de pellizco ni de doble toque (el viewport ya lo bloquea; esto cubre navegadores que lo ignoran) */
@media (max-width: 700px) { html, body { touch-action: pan-x pan-y; } }

/* ── Revisar compras importadas ── */
#celu-revisar .sheet { min-height: calc(100dvh - var(--c-sat) - 10px); }
.c-rev-res { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 16px 0 4px; }
.c-rev-res b { font: 400 40px var(--c-serif); letter-spacing: -.5px; }
.c-rev-res span { font-size: 14px; color: var(--c-muted); }
.c-rev-aviso { margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--c-surface2); font-size: 14px; color: var(--c-text); text-align: center; }
.c-rev-aviso[hidden] { display: none; }
#cr-pie[hidden] { display: none; }
.c-rev-row { cursor: pointer; }
.c-rev-row .c-selck { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--c-faint); color: transparent; transition: background .15s, box-shadow .15s; }
.c-rev-row .c-selck svg { width: 14px; height: 14px; }
.c-rev-row[aria-checked="true"] .c-selck { background: var(--c-accent); box-shadow: none; color: var(--c-on-accent); }
.c-rev-row.off .c-ico, .c-rev-row.off .c-main, .c-rev-row.off .c-amt { opacity: .4; }
.c-rev-row.off .c-t { text-decoration: line-through; }
#cr-lista .c-row + .c-row::before { left: 98px; }
.c-rev-cat { display: inline-flex; align-items: center; gap: 2px; padding: 2px 0; min-height: 28px; color: var(--c-accent) !important; font-size: 13px; font-weight: 500; }
.c-rev-cat .ud { width: 13px; height: 13px; }
#cr-lista .c-empty b { display: block; color: var(--c-text); margin-bottom: 4px; }

/* Celu: el body de la PC pide alto mínimo 100dvh; en Android con barra de gestos eso es más que lo visible
   (862 vs 806 en un Xiaomi 15T Pro) y las pantallas cortas se podían mover. El alto lo da el contenido. */
@media (max-width: 700px) { body { min-height: 0; } }

/* Al abrir: hasta que llegan tus datos, el celu muestra solo el fondo (sigue a la pantalla de arranque de Android)
   en vez de un instante de "Todavía no empezaste noviembre" con datos vacíos */
.arrancando #celu .cv, .arrancando #celu .c-dock, .arrancando #celu .c-navbar { visibility: hidden; }

/* Selector de año en el título (iOS: el título como menú) */
.c-tsel { display: inline-flex; align-items: center; gap: 6px; font: inherit; color: var(--c-text) !important; padding: 0; letter-spacing: inherit; }
.c-tsel svg { width: .55em; height: .55em; color: var(--c-accent); margin-top: .08em; }
.c-ysel { display: inline-flex; align-items: center; gap: 3px; padding: 6px 0; margin: -6px 0; font: inherit; font-weight: 600 !important; color: var(--c-accent) !important; }
.c-ysel svg { width: 14px; height: 14px; }
#c-acc.izq { transform-origin: top left; }


/* Año dentro del total: se lee como parte de la frase; la flecha avisa que se puede cambiar */
.c-ysel { display: inline-flex; align-items: center; gap: 2px; padding: 8px 0; margin: -8px 0; font: inherit; color: var(--c-accent) !important; font-weight: 600 !important; }
.c-ysel svg { width: 13px; height: 13px; }
.c-yearcard .c-ysel { color: var(--c-on-ink) !important; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--c-on-ink) 40%, transparent); text-underline-offset: 3px; }

/* Celu: letra del sistema en todo (también en lo que viene de la PC, como el editor de foto);
   el inicio de sesión mantiene la letra de marca de Plata */
@media (max-width: 700px) {
  body { font-family: var(--c-ui); }
  button, input, select, textarea { font-family: inherit; }
  #login { font-family: var(--mono); }
}

/* Registros: encabezado de cada año con su total */
.c-anio-h { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 4px 8px; }
.c-anio-h h2 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin: 0; }
.c-anio-h span { color: var(--c-muted); font-size: 15px; font-weight: 600; }
/* Año: puntitos para cambiar de año (solo con más de uno) */
.c-puntos { display: flex; gap: 8px; margin: 10px 0 0; }
.c-puntos[hidden] { display: none; }
.c-puntos button { width: 22px; height: 22px; display: grid; place-items: center; }
.c-puntos button::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-line); transition: background .2s, width .2s; }
.c-puntos button[aria-pressed="true"]::after { background: var(--c-text); width: 18px; border-radius: 4px; }
#cv-anio { touch-action: pan-y; }
