/* 7 · planner semanal. Papel blanco, columnas con línea negra, tareas de una línea y burbujas de color. */
:root {
  /* Diseño: título grande arriba a la izquierda, botones redondos a la derecha, 5 columnas + sábado/domingo apilados, Someday debajo */
  --paper: #FFFFFF;
  --panel: #FFFFFF;
  --ink: #0A0A0A;
  --ink2: #6B6B6B;
  --ink3: #B4B4B4;
  --rule: #EDEDED;
  --rule2: #DADADA;
  --wash: #F2F2F2;
  --accent: #0A0A0A;
  --bad: #E5302B;
  --good: #1AA053;
  --warn: #F2A900;
  --shadow: 0 12px 34px rgba(0, 0, 0, .13), 0 2px 6px rgba(0, 0, 0, .06);
  --f-display: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --btn: var(--ink); --btn-ink: var(--paper); --btn-shadow: none;
  --plus-bg: var(--wash); --plus-ink: var(--ink);
  --today: #5865E8; --todaybg: #5865E8; --todayink: #FFFFFF;
  --focus: #8B83F2;
  --secbg: var(--ink); --secfg: var(--paper);
  --w-body: 400;
  --row: 30px; --fs: 13px; --fs-day: 16px; --pill: 21px; --h1: 32px; --fs-sec: 10px;
  --tintpct: 24%; --pop: #F2F2F2; --popline: transparent; --scrim: rgba(0, 0, 0, .28);
  --red: #E2432A; --redbg: linear-gradient(180deg, #F6683F 0%, #D6361C 100%);
  --gap: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111111; --panel: #1C1C1C; --ink: #F3F3F3; --ink2: #A3A3A3; --ink3: #7C7C7C;
    --rule: #242424; --rule2: #333333; --wash: #1F1F1F; --accent: #F3F3F3; --today: #8C94FF; --todaybg: #6B76F0; --pop: #2A2A2A; --popline: #3A3A3A; --scrim: rgba(0, 0, 0, .6); --tintpct: 12%;
    --shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111111; --panel: #1C1C1C; --ink: #F3F3F3; --ink2: #A3A3A3; --ink3: #7C7C7C;
  --rule: #242424; --rule2: #333333; --wash: #1F1F1F; --accent: #F3F3F3; --today: #8C94FF; --todaybg: #6B76F0; --pop: #2A2A2A; --popline: #3A3A3A; --scrim: rgba(0, 0, 0, .6); --tintpct: 12%;
  --shadow: 0 12px 34px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3);
  color-scheme: dark;
}


:root[data-size="m"] { --row: 34px; --fs: 15px; --fs-day: 19px; --pill: 25px; --h1: 40px; --fs-sec: 11px; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font: var(--w-body) var(--fs)/1.35 var(--f-body); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-radius: 6px; }
kbd { font: 500 11px/1 var(--f-mono); padding: 3px 5px; border: 1px solid var(--rule2); border-bottom-width: 2px; border-radius: 5px; background: var(--panel); color: var(--ink2); white-space: nowrap; }
code { font: 12.5px var(--f-mono); background: var(--wash); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--ink2); }
.small { font-size: 12px; }
.grow { flex: 1; }
.ic { display: inline-flex; width: 16px; height: 16px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic.m { width: 13px; height: 13px; }

#app { height: 100%; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }

/* ---------- cabecera ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px var(--gap) 0; flex-wrap: wrap; }
.htitle h1 { margin: 0; display: flex; align-items: baseline; gap: 12px; font: 800 var(--h1)/1.1 var(--f-display); letter-spacing: -.045em; white-space: nowrap; }
.h1b { font: inherit; letter-spacing: inherit; }
.htitle .wk { color: var(--ink3); font-variant-numeric: tabular-nums; }
.hbtns { display: flex; gap: 6px; }
.cb { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; position: relative; transition: transform .1s; }
.cb .ic { width: 18px; height: 18px; }
.cb.dark { background: var(--ink); color: var(--paper); }
.cb.light { background: var(--plus-bg); color: var(--plus-ink); box-shadow: var(--btn-shadow); }
.cb.light .ic { width: 22px; height: 22px; }
.cb:hover { transform: scale(1.04); }
.cb.av span { font: 600 16px/1 var(--f-display); letter-spacing: -.02em; }
.cb .dot { position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--warn); border: 2px solid var(--paper); }
.cb .dot.bad { background: var(--bad); }

/* ---------- tablero ---------- */
.main { flex: 1; min-height: 0; display: flex; }
.board { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 0 var(--gap) 80px; }
.week { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--gap); padding-top: 44px; min-height: calc(100% - 4px); }
.wkcol { display: flex; flex-direction: column; gap: 34px; min-width: 0; }
.wkcol .day:first-child { flex: none; }
.wkcol .day:first-child .fill { min-height: calc(var(--row) * 4); }
.wkcol .day:last-child { flex: 1; }
.week.one { grid-template-columns: minmax(0, 720px); justify-content: center; }
.day { display: flex; flex-direction: column; min-width: 0; }
.dh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px 9px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.dl { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; text-align: left; }
.dd { font: 700 var(--fs-day)/1.1 var(--f-display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw { font: 400 var(--fs-day)/1.1 var(--f-display); letter-spacing: -.02em; color: var(--ink3); white-space: nowrap; }
.day.today .dh { border-bottom-color: var(--today); }
.day.today .dd, .day.today .dw { color: var(--today); }
.dbody { flex: 1; display: flex; flex-direction: column; min-height: 0; border-radius: 8px; }
.dbody.over { background: var(--wash); }
.rows { display: flex; flex-direction: column; }
.fill { flex: 1; min-height: calc(var(--row) * 4); cursor: text; background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--row) - 1px), var(--rule) calc(var(--row) - 1px) var(--row)); }
.rows > .task, .rows > .add, .rows > .sech { border-bottom: 1px solid var(--rule); }
.rows > .add { height: var(--row); border-radius: 0; }
.fill.short { min-height: var(--row); }

.task { position: relative; display: flex; align-items: center; height: var(--row); cursor: pointer; min-width: 0; outline: none; }
.task.dragging { opacity: .3; }
.tx { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-width: 0; height: var(--pill); padding: 0 8px; border-radius: 999px; white-space: nowrap; }
.task:hover .tx:not(.pill), .task:focus-visible .tx:not(.pill) { background: var(--wash); }
.task:focus-visible .tx { box-shadow: 0 0 0 2px var(--ink); }
.task:hover { padding-right: 26px; }
.lbl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tx .ic.m { opacity: .75; }
.tx .sp, .tx .subs { font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.tx.pill { background: var(--hl); color: var(--hlfg); }
.tx.pill[data-color="negro"] { background: #3A3A3A; color: #fff; }
.task.done .lbl { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.task.done .tx { color: var(--ink3); }
.task.done .tx.pill { background: color-mix(in srgb, var(--hl) 28%, var(--paper)); color: var(--ink3); }
.chk { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule2); background: var(--paper); color: transparent; display: grid; place-items: center; opacity: 0; transition: opacity .1s; }
.chk .ic { width: 11px; height: 11px; }
.task:hover .chk, .task:focus-within .chk { opacity: 1; }
.chk:hover { border-color: var(--ink); color: var(--ink3); }
.task.done .chk { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chk.big { position: static; transform: none; opacity: 1; width: 26px; height: 26px; margin-top: 3px; flex: none; }
.chk.big .ic { width: 14px; height: 14px; }
.chk.big.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.add { height: var(--row); border: 0; background: transparent; padding: 0 9px; outline: none; color: var(--ink); border-radius: 999px; }
.add::placeholder { color: transparent; }
.add:hover::placeholder, .dbody:has(.fill:hover) .add::placeholder, .add:focus::placeholder { color: var(--ink3); }
.add:focus { background: var(--wash); }
.dropline { height: 0; border-top: 2px solid var(--ink); margin: -1px 4px; position: relative; z-index: 3; }


/* secciones dentro del día */
.sech { display: flex; align-items: flex-end; gap: 4px; height: var(--row); width: 100%; text-align: left; padding: 0 0 6px 8px; color: var(--ink3); }
.sech .sn { font: 600 var(--fs-sec)/1 var(--f-body); letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; color: inherit; }
.sech .sc { font-size: 11px; font-variant-numeric: tabular-nums; margin-left: 4px; }
.sech .chev { width: 12px; height: 12px; opacity: 0; transition: transform .15s, opacity .1s; }
.sech:hover .chev, .sech.closed .chev, .sech:focus-visible .chev { opacity: 1; }
.sech.closed .chev { transform: rotate(-90deg); }
.sech:hover { color: var(--ink2); }
.day.today .sech { color: var(--today); }
.hiddenln { font-size: 12.5px; color: var(--ink2); text-align: left; padding: 6px 9px; }
.hiddenln:hover { color: var(--ink); }

/* foco de hoy: trazo violeta bajo el texto */
.tx { position: relative; }
.fic { flex: none; width: 11px; height: 11px; margin: 0 1px 0 2px; color: var(--red); }
.task.focus .tx { padding-left: 5px; }
.task.focus .tx.pill { margin-left: 3px; padding-left: 8px; }
.task.focus.done .fic { opacity: .35; }
.tx .carry { font-size: 11.5px; font-weight: 600; opacity: .55; font-variant-numeric: tabular-nums; }

/* planear el día */
.nomg { margin: 0; }
.plan > p { margin: 4px 0 10px; }
.plist2 { display: flex; flex-direction: column; max-height: 52vh; overflow: auto; }
.prow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.pfocus { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 8px; text-align: left; height: 36px; }
.pfocus::before { content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--rule2); }
.prow.on .pfocus::before { background: var(--focus); border-color: var(--focus); box-shadow: inset 0 0 0 3px var(--panel); }
.pfocus .tx { max-width: calc(100% - 60px); }
.pfocus .carry { font-size: 12px; font-weight: 600; color: var(--ink3); }
.warnline { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--focus) 14%, var(--panel)); font-size: 13px; }
.focusbtn.on { background: var(--focus); color: #fff; }
.pchip.k-sec { background: var(--secbg); color: var(--secfg); }

/* ---------- Someday ---------- */
.someday { margin-top: 56px; }
.sdh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.sdh h2 { font: 800 30px/1.1 var(--f-display); letter-spacing: -.04em; margin: 0; }
.sdact { display: flex; gap: 16px; }
.sgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 34px var(--gap); }
.slist.hid .dd { color: var(--ink2); }
.linkbtn { color: var(--ink2); font-weight: 500; padding: 4px 0; text-align: left; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule2); }
.linkbtn:hover { color: var(--ink); }

/* ---------- mes ---------- */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: minmax(110px, auto); column-gap: 12px; padding-top: 44px; }
.mh { font: 400 17px/1.1 var(--f-display); color: var(--ink3); padding: 0 2px 9px; border-bottom: 2px solid var(--ink); }
.mc { padding: 8px 0 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; border-bottom: 1px solid var(--rule); }
.mc.out { opacity: .4; }
.mn { font: 700 17px/1 var(--f-display); letter-spacing: -.02em; align-self: flex-start; padding: 4px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.mn:hover { background: var(--wash); }
.mc.today .mn { background: var(--todaybg); color: var(--todayink); }
.mc.over { background: var(--wash); }
.mi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mitem { display: block; max-width: 100%; text-align: left; font-size: 12.5px; line-height: 20px; padding: 0 7px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: flex-start; }
.mitem.pill { background: var(--hl); color: var(--hlfg); }
.mitem.pill[data-color="negro"] { background: #3A3A3A; color: #fff; }
.mitem:not(.pill):hover { background: var(--wash); }
.mitem.done { color: var(--ink3); text-decoration: line-through; }
.mitem.pill.done { background: color-mix(in srgb, var(--hl) 28%, var(--paper)); }
.more { font-size: 12px; color: var(--ink2); text-align: left; padding: 0 7px; }

/* ---------- botones flotantes ---------- */
.fab-help { position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom)); width: 46px; height: 46px; border-radius: 14px; background: var(--wash); color: var(--ink); font: 700 18px/1 var(--f-display); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); z-index: 20; border: 1px solid var(--rule); }
.fab-help:hover { background: var(--rule); }
.fab-add { display: none; }

/* ---------- capas ---------- */
#overlays { position: relative; z-index: 50; }
.backdrop { position: fixed; inset: 0; background: var(--scrim); display: flex; justify-content: center; align-items: flex-start; padding: 9vh 16px 16px; overflow: auto; }
.dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--popline); border-radius: 18px; box-shadow: var(--shadow); width: 100%; max-width: 560px; padding: 20px; }
.dialog.sm { max-width: 400px; }
.dialog.cap-dlg { padding: 0; overflow: hidden; }
.dt { font: 800 21px/1.2 var(--f-display); letter-spacing: -.03em; margin: 0 0 4px; }
.row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.row.end { justify-content: flex-end; }
.row.wrap { flex-wrap: wrap; }
.btn { padding: 8px 16px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); box-shadow: var(--btn-shadow); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.btn.ghost { background: var(--wash); color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--rule); }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn.danger { background: var(--bad); color: #fff; }
.danger-t, .btn.danger-t, .mit.danger-t { color: var(--bad); }
.btn[disabled] { opacity: .35; cursor: default; }
.ib { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink2); flex: none; }
.ib:hover { background: var(--wash); color: var(--ink); }
.ib.small { width: 26px; height: 26px; }
.ib[disabled] { opacity: .3; cursor: default; }
.seg { display: inline-flex; background: var(--wash); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { padding: 5px 12px; border-radius: 999px; color: var(--ink2); font-weight: 500; }
.seg button.on { background: var(--ink); color: var(--paper); }
.seg.small button { padding: 4px 11px; font-size: 13px; }

.caphead { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.caphead .ic { color: var(--ink3); }
.cap { flex: 1; border: 0; outline: none; background: transparent; font-size: 17px; min-width: 0; }
.prev { padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 44px; }
.ptitle { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--wash); }
.pchip.k-color { background: var(--hl); color: var(--hlfg); }
.pchip.k-rec { background: var(--ink); color: var(--paper); }
.pchip.k-someday { background: transparent; box-shadow: inset 0 0 0 1px var(--rule2); }
.capfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--rule); background: var(--wash); flex-wrap: wrap; }
.plist { max-height: 52vh; overflow: auto; padding: 6px; }
.pg { font: 600 11px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); padding: 10px 10px 4px; }
.pi { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: left; }
.pi.on { background: var(--wash); }
.pi .pt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi .ps { color: var(--ink2); font-size: 12px; white-space: nowrap; }
.pi.done .pt { text-decoration: line-through; color: var(--ink3); }
.pad { padding: 12px; }

/* menú del avatar */
.menu-back { position: fixed; inset: 0; }
.menu-pop { position: fixed; width: 290px; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--rule); }
.menu-pop .seg { margin: 4px 4px 8px; align-self: stretch; }
.menu-pop .seg button { flex: 1; }
.mit { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: left; }
.mit:hover { background: var(--wash); }
.mit .cnt { background: var(--warn); color: #000; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; }
.msep { height: 1px; background: var(--rule); margin: 6px 4px; }
.mstat { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12.5px; color: var(--ink2); }
.mstat.ok .ic { color: var(--good); }
.mstat.bad { color: var(--bad); }

/* panel de ayuda en la esquina */
.help-pop { position: fixed; right: 22px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 440px; max-width: calc(100vw - 44px); max-height: min(72vh, 640px); background: var(--panel); border: 1px solid var(--rule); border-radius: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; z-index: 60; }
.help-pop header { display: flex; justify-content: space-between; align-items: center; padding: 16px 14px 10px 18px; }
.help-pop h2 { font: 800 19px/1 var(--f-display); letter-spacing: -.03em; margin: 0; }
.help-pop .seg { margin: 0 18px; align-self: flex-start; }
.hfilter { margin: 10px 18px 6px; padding: 7px 12px; border: 0; border-radius: 999px; background: var(--wash); outline: none; }
.hbody { overflow: auto; padding: 0 18px 18px; }
.hbody h4 { font: 600 11px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); margin: 16px 0 6px; }
.klist { display: flex; flex-direction: column; }
.krow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.krow.nl { justify-content: flex-start; align-items: baseline; }
.krow.nl b { width: 96px; flex: none; font-weight: 600; }
.krow.nl span { color: var(--ink2); }
.keys { display: inline-flex; gap: 3px; flex: none; }
.exlist { display: flex; flex-direction: column; gap: 6px; }
.ex { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 12px; background: var(--wash); border-radius: 12px; text-align: left; }
.ex:hover { background: var(--rule); }
.ex code { background: transparent; padding: 0; }
.feat { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.feat b { display: block; margin-bottom: 2px; }
.feat p { margin: 0; color: var(--ink2); }

/* editor */
.editor { display: flex; flex-direction: column; gap: 10px; }
.erow.top { display: flex; align-items: flex-start; gap: 10px; }
.erow.top .dt { flex: 1; }
.etitle { flex: 1; font: 800 22px/1.25 var(--f-display); letter-spacing: -.03em; border: 0; outline: none; background: transparent; padding: 3px 0; margin: 0; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lab { display: flex; align-items: center; gap: 8px; background: var(--wash); border-radius: 12px; padding: 0 12px; min-height: 38px; }
.lab .ic.m { color: var(--ink2); }
.lab input, .lab select { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; padding: 6px 0; }
.recbox { display: flex; flex-direction: column; background: var(--wash); border-radius: 12px; padding: 8px 12px 10px; }
.recbox > .lab { padding: 0; min-height: 30px; }
.recbox select, .recbox .num { border: 0; border-radius: 8px; padding: 5px 8px; background: var(--panel); }
.recbox .lab select { padding: 4px 0; background: transparent; }
.recbox .row { margin-top: 8px; }
.num { width: 64px; }
.wdpick { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.wdpick button { padding: 5px 10px; border-radius: 999px; background: var(--panel); font-size: 12.5px; }
.wdpick button.on { background: var(--ink); color: var(--paper); }
.chkl { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sect h4 { font: 600 11px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); margin: 6px 0 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 26px; height: 26px; border-radius: 50%; background: var(--c); }
.sw.none { background: linear-gradient(135deg, transparent 45%, var(--bad) 45% 55%, transparent 55%), var(--wash); }
.sw.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.emojis { display: flex; flex-wrap: wrap; gap: 4px; }
.emojis .emo { width: 32px; height: 32px; border-radius: 50%; font-size: 17px; display: grid; place-items: center; color: var(--ink3); }
.emojis .emo.on { background: var(--wash); outline: 1.5px solid var(--ink); }
.subsbox { display: flex; flex-direction: column; gap: 2px; }
.subrow { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--rule); }
.subin { flex: 1; border: 0; outline: none; background: transparent; padding: 7px 0; }
.enote { width: 100%; border: 0; border-radius: 12px; padding: 10px 12px; background: var(--wash); resize: vertical; outline: none; }
.foot { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 4px; flex-wrap: wrap; }
.evd .etitle { font-size: 21px; }
.evwhen { display: flex; align-items: center; gap: 8px; margin: 0; }
.evdesc { white-space: pre-wrap; color: var(--ink2); margin: 0; max-height: 200px; overflow: auto; font-size: 13px; }

/* revisión y ajustes */
.review { display: flex; flex-direction: column; }
.rvrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.rvt { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.rva { display: flex; gap: 4px; flex-wrap: wrap; }
.settings section { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.settings section:last-child { border-bottom: 0; }
.settings h4 { margin: 0 0 6px; font: 600 11px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.settings .row > .muted:first-child { width: 64px; }
.callist { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.calrow { display: flex; align-items: center; gap: 8px; }
.csel { border: 0; background: var(--wash); border-radius: 8px; padding: 4px 8px; font-size: 13px; }
.lists-ed { display: flex; flex-direction: column; gap: 4px; }
.lrow { display: flex; align-items: center; gap: 6px; }
.lrow input { flex: 1; min-width: 0; border: 0; border-radius: 8px; padding: 6px 10px; background: var(--wash); }
.lrow.hid input { color: var(--ink3); }
.ord { display: flex; }
.sync { display: block; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; }
.sync.s-cloud { color: var(--good); }
.sync.s-error { color: var(--bad); }

/* avisos */
#toasts { position: fixed; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); display: flex; justify-content: center; z-index: 80; pointer-events: none; }
#toasts .toast { pointer-events: auto; }
.toast { display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow); font-size: 13.5px; white-space: nowrap; }
.toast .linkbtn { color: var(--paper); text-decoration-color: currentColor; }

/* ---------- pantallas medianas ---------- */
@media (max-width: 1200px) and (min-width: 761px) {
  :root { --gap: 14px; }
  .cb { width: 40px; height: 40px; }
  .sgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- móvil ---------- */
.strip { display: none; }
@media (max-width: 760px) {
  :root, :root[data-size] { --row: 40px; --gap: 16px; --fs: 15.5px; --fs-day: 17px; --pill: 28px; --h1: 26px; --fs-sec: 10.5px; }
  .topbar { padding-top: 14px; row-gap: 12px; }
  .htitle h1 { gap: 8px; }
  .topbar { flex-wrap: wrap; }
  .htitle .wk { display: none; }
  .htitle h1 { overflow: hidden; text-overflow: ellipsis; }
  .htitle { flex: 1; min-width: 0; }
  .cb { width: 38px; height: 38px; }
  .cb .ic { width: 16px; height: 16px; }
  .cb.light:not(.md):not(.hb) { display: none; }
  .strip { display: grid; width: 100%; grid-template-columns: repeat(7, 1fr); gap: 2px; }
  .strip .sd { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 5px; border-radius: 14px; }
  .strip .n { font-size: 11px; color: var(--ink3); }
  .strip .d { font: 700 18px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
  .strip .dots { height: 5px; display: flex; }
  .strip .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink3); }
  .strip .sd.today .n { color: var(--ink); font-weight: 600; }
  .strip .sd.on { background: var(--todaybg); }
  .strip .sd.on .n, .strip .sd.on .d { color: var(--todayink); }
  .week, .week.one, .week.stack { grid-template-columns: minmax(0, 1fr); row-gap: 30px; padding-top: 24px; min-height: 0; }
  .v-day .dh { display: none; }
  .v-day .week { padding-top: 14px; }
  .week.stack .fill { min-height: 0; }
  .v-day .fill { min-height: 200px; }
  .tx { padding: 0 11px; }
  .chk { opacity: 1; width: 22px; height: 22px; }
  .task { padding-right: 30px; }
  .task:hover { padding-right: 30px; }
  .add::placeholder { color: color-mix(in srgb, var(--ink3) 55%, transparent); }
  .sgrid { grid-template-columns: minmax(0, 1fr); }
  .someday { margin-top: 40px; }
  .month { column-gap: 4px; grid-auto-rows: minmax(72px, auto); padding-top: 20px; }
  .mh { font-size: 13px; }
  .mc { padding: 4px 0; }
  .mitem { font-size: 10.5px; padding: 0 4px; line-height: 16px; }
  .fab-add { display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); box-shadow: var(--shadow); z-index: 20; }
  .fab-add .ic { width: 22px; height: 22px; }
  .fab-help { right: auto; left: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); width: 40px; height: 40px; border-radius: 12px; font-size: 16px; }
  .help-pop { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-width: none; max-height: 80vh; }
  .menu-pop { right: 8px !important; width: min(300px, calc(100vw - 16px)); }
  .backdrop { padding: 12px 8px; }
  .dialog { padding: 16px 14px; }
  .grid2 { grid-template-columns: 1fr; }
  .toast { white-space: normal; max-width: calc(100vw - 32px); border-radius: 16px; }
  #toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- ventana de tarea (estilo Tweek) ---------- */
.backdrop.card-bd { padding-top: 12vh; }
.backdrop.card-bd.flat { padding: 0; background: var(--paper); }
.dialog.card { position: relative; max-width: 620px; padding: 26px 40px 18px; border-radius: 28px; }
.cardin { display: flex; flex-direction: column; min-height: 400px; }
.dialog.card.full { max-width: none; width: 100%; min-height: 100%; border-radius: 0; box-shadow: none; padding: 22px 28px 26px; display: flex; }
.dialog.card.full .cardin { flex: 1; min-height: calc(100vh - 48px); }
.dialog.card.full .cbody { width: 100%; max-width: 660px; margin: 50px auto 0; }
.dialog.card.full .ctools { width: 100%; max-width: 560px; margin: auto auto 0; }
.chead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cdate { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.cdate .ic { width: 19px; height: 19px; }
.ctime { border: 1.3px solid var(--ink); border-radius: 999px; padding: 2px 10px 3px; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.ctime.empty { border-style: dashed; border-color: var(--rule2); color: var(--ink3); font-size: 14px; padding: 3px 10px; }
.crec { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); background: var(--wash); border-radius: 999px; padding: 4px 11px; }
.crec[hidden], .ctime[hidden] { display: none; }
.cexp { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--ink3); font-size: 16px; }
.cexp .ic { width: 18px; height: 18px; }
.cexp:hover { color: var(--ink); }
.cclose { display: none; }
.ctitlerow { margin-top: 34px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.ctitle { display: block; width: 100%; font: 800 34px/1.15 var(--f-display); letter-spacing: -.04em; border: 0; outline: none; background: transparent; resize: none; padding: 0; overflow: hidden; color: var(--ink); }
.ctitlerow.done .ctitle { text-decoration: line-through; color: var(--ink3); }
.cnote { display: block; width: 100%; border: 0; outline: none; background: transparent; resize: none; font-size: 17px; line-height: 1.5; padding: 16px 0 20px; min-height: 110px; overflow: hidden; }
.cnote::placeholder { color: var(--ink3); }
.csubs .subrow { display: flex; align-items: center; gap: 14px; padding: 9px 4px; border-top: 1px solid var(--rule); border-bottom: 0; }
.csubs .subrow:last-child { border-bottom: 1px solid var(--rule); }
.csubs .subin { font-size: 17px; padding: 4px 0; }
.csubs .subrow.done .subin { text-decoration: line-through; color: var(--ink3); }
.scheck { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid var(--ink); display: grid; place-items: center; color: transparent; }
.scheck .ic { width: 12px; height: 12px; }
.scheck.on { background: var(--ink); color: var(--paper); }
.subx { opacity: 0; }
.subrow:hover .subx, .subx:focus-visible { opacity: 1; }
.ctools { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 22px; }
.ctool { position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.ctool .ic { width: 25px; height: 25px; }
.ctool:hover, .ctool.act { background: var(--wash); }
.ctool.on { color: var(--red); }
.ctool.on::after { content: ''; position: absolute; bottom: 9px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.ctool .cdot { position: absolute; right: 12px; bottom: 12px; width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--panel); }
.ctool .cemo { position: absolute; right: 6px; bottom: 6px; font-style: normal; font-size: 13px; }
.cpop { position: absolute; z-index: 5; background: var(--pop); border: 1px solid var(--popline); border-radius: 24px; padding: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .10); max-width: calc(100% - 24px); }
.cpop.wide { width: 340px; }
.cpop[hidden] { display: none; }
.cgrid { display: grid; grid-template-columns: repeat(4, 30px); gap: 18px 22px; padding: 4px 6px; }
.dotc { width: 30px; height: 30px; border-radius: 50%; background: var(--c); }
.dotc.on { box-shadow: 0 0 0 3px var(--wash), 0 0 0 5px var(--ink); }
.dotc.none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rule2); color: var(--ink3); display: grid; place-items: center; }
.dotc.none.on { box-shadow: inset 0 0 0 1.5px var(--rule2), 0 0 0 3px var(--wash), 0 0 0 5px var(--ink); }
.dotc.none .ic { width: 14px; height: 14px; }
.cemos { display: grid; grid-template-columns: repeat(7, 28px); gap: 4px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule2); }
.cemos .emo { width: 28px; height: 28px; border-radius: 50%; font-size: 16px; display: grid; place-items: center; color: var(--ink3); }
.cemos .emo.on { background: var(--panel); box-shadow: 0 0 0 1.5px var(--ink); }
.cform { display: flex; flex-direction: column; gap: 8px; min-width: 250px; }
.cform .lab, .recbox.flat .lab { background: var(--panel); }
.cform .mit { padding: 8px 10px; border-radius: 10px; }
.cform .mit:hover { background: var(--panel); }
.cform .msep { background: var(--rule2); }
.qrow { display: flex; flex-wrap: wrap; gap: 6px; }
.qrow .btn.ghost { background: var(--panel); }
.recbox.flat { background: transparent; padding: 0; gap: 0; }
.recbox.flat select, .recbox.flat .num { background: var(--panel); }
.recbox.flat .wdpick button { background: var(--panel); }
.recbox.flat .wdpick button.on { background: var(--ink); }
@media (max-width: 760px) {
  .backdrop.card-bd { padding: 10px 8px; }
  .dialog.card { padding: 20px 20px 12px; border-radius: 24px; }
  .cardin { min-height: 70vh; }
  .ctitle { font-size: 28px; }
  .ctitlerow { margin-top: 24px; }
  .cexp { display: none; }
  .cclose { display: inline-grid; margin-left: auto; }
  .ctool { width: 48px; height: 48px; }
  .cpop { left: 12px !important; right: 12px; }
  .cpop.wide { width: auto; }
}

/* ---------- Mi día ---------- */
.cb.light.md { color: var(--red); }
.cb.light.md .ic { width: 19px; height: 19px; }
.cb.light.md.on { background: var(--redbg); color: #fff; box-shadow: 0 6px 14px rgba(214, 54, 28, .28); }
.myday { display: none; width: 380px; flex: none; overflow: auto; border-left: 1px solid var(--rule); background: var(--paper); padding: 22px 20px 90px; }
body.md-open .myday { display: block; }
.mdh { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.mdh h2 { font: 800 26px/1.1 var(--f-display); letter-spacing: -.04em; margin: 0; }
.mdh p { margin: 3px 0 0; }
.mdg { margin-bottom: 14px; }
.mdgh { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 0 8px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; font: 700 15px/1.2 var(--f-display); letter-spacing: -.01em; }
.mdgh .mdc { color: var(--ink3); font-weight: 500; font-variant-numeric: tabular-nums; }
.mdgh .chev { margin-left: auto; width: 14px; height: 14px; color: var(--ink3); transition: transform .15s; }
.mdg.closed .chev { transform: rotate(-90deg); }
.mdg.fixed:first-of-type .mdgh { border-bottom-color: var(--today); color: var(--today); }
.mdsug { margin-top: 26px; }
.mdsug h3 { font: 600 11px/1 var(--f-body); letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); margin: 0 0 6px; }
.mdsug .mdgh { border-bottom: 1px solid var(--rule); font-size: 14px; font-weight: 600; }
.mzone { display: flex; flex-direction: column; min-height: 30px; border-radius: 10px; }
.mzone.over { background: var(--wash); }
.mzone.focus { min-height: 60px; }
.mempty { margin: 8px 9px; font-size: 13px; color: var(--ink3); }
.msec { font: 600 10.5px/1 var(--f-body); letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); padding: 10px 9px 4px; }
.mrow { position: relative; display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px; border-radius: 8px; cursor: pointer; }
.mrow:hover { background: var(--wash); }
.mrow.dragging { opacity: .3; }
.mrow .tx { flex: 0 1 auto; }
.mrow:hover .tx:not(.pill) { background: transparent; }
.mrow .carry { font-size: 11.5px; font-weight: 600; color: var(--ink3); font-variant-numeric: tabular-nums; }
.mrow .when { margin-left: auto; font-size: 12px; color: var(--ink3); white-space: nowrap; }
.mnum { width: 20px; flex: none; text-align: center; font: 700 13px/1 var(--f-display); color: var(--red); font-variant-numeric: tabular-nums; }
.mzone.focus .mrow { min-height: 36px; }
.mrow.done .lbl { text-decoration: line-through; color: var(--ink3); }
.madd { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--ink3); border: 1.5px dashed var(--rule2); }
.madd .ic { width: 11px; height: 11px; }
.madd:hover, .mrow:focus-visible .madd { border-style: solid; border-color: var(--focus); background: var(--focus); color: #fff; }
.mchk { margin-left: auto; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule2); display: grid; place-items: center; color: transparent; }
.mchk .ic { width: 11px; height: 11px; }
.mchk:hover { border-color: var(--ink); color: var(--ink3); }
.mchk.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mrm { opacity: 0; }
.mrow:hover .mrm, .mrm:focus-visible { opacity: 1; }
.mev { display: flex; gap: 10px; align-items: baseline; padding: 6px 9px; border-radius: 8px; text-align: left; min-width: 0; }
.mev:hover { background: var(--wash); }
.mev .tm { font-size: 12.5px; color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 92px; }
.mev .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mev.done .lbl { text-decoration: line-through; color: var(--ink3); }
.myday .warnline { margin: 6px 0 8px; }
@media (max-width: 1200px) and (min-width: 761px) { .myday { width: 320px; } }
@media (max-width: 760px) {
  .myday { position: fixed; inset: 0; width: auto; z-index: 40; border-left: 0; padding: calc(16px + env(safe-area-inset-top)) 16px 100px; }
  .mrm { opacity: 1; }
}

/* ---------- fase 1 ---------- */
/* una línea por día; secciones con + al pasar el ratón */
.sech { display: flex; align-items: flex-end; gap: 4px; height: var(--row); padding: 0 0 6px 0; color: var(--ink3); }
.sechb { display: flex; align-items: center; gap: 4px; padding: 0 0 0 8px; color: inherit; text-align: left; }
.sechb:hover { color: var(--ink2); }
.day.today .sech { color: var(--today); }
.sech:hover .chev, .sech.closed .chev, .sechb:focus-visible .chev { opacity: 1; }
.secadd { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--ink3); opacity: 0; }
.secadd .ic { width: 12px; height: 12px; }
.sech:hover .secadd, .secadd:focus-visible { opacity: 1; }
.secadd:hover { background: var(--wash); color: var(--ink); }
.add.secinp::placeholder { color: var(--ink3); }
.v-day .week.one .dh { display: none; }
.v-day .week.one { padding-top: 28px; }
/* selección múltiple */
.task.sel .tx { box-shadow: 0 0 0 2px var(--today); }
.task.sel { background: color-mix(in srgb, var(--today) 8%, transparent); }
/* ventana de tarea */
.dialog.card { background: var(--tint, var(--panel)); transition: background .15s; }
.dialog.card .cpop { background: color-mix(in srgb, var(--ink) 5%, var(--panel)); }
.ctitlerow { display: flex; align-items: flex-start; gap: 12px; }
.ctitlerow .ctitle { flex: 1; }
.tchk { flex: none; width: 28px; height: 28px; margin-top: 6px; border-radius: 50%; border: 1.6px solid var(--ink); display: grid; place-items: center; color: transparent; }
.tchk .ic { width: 15px; height: 15px; }
.tchk:hover { color: var(--ink3); }
.tchk.on { background: var(--ink); color: var(--paper); }
.cnav { display: none; align-items: center; gap: 6px; color: var(--ink2); font-size: 14px; padding: 8px 10px; border-radius: 999px; }
.cnav:hover:not([disabled]) { background: var(--wash); color: var(--ink); }
.cnav[disabled] { visibility: hidden; }
.dialog.card.full .cnav { display: inline-flex; }
.dialog.card.full .ctools { max-width: none; }
.dialog.card.full .chead { max-width: 660px; width: 100%; margin: 0 auto; }
.mit.back { color: var(--ink2); font-weight: 600; }
.mit .ic.m { color: var(--ink3); }
/* subtareas ricas */
.csubs { display: flex; flex-direction: column; }
.csubs .subrow.star { order: -1; }
.csubs .subrow.head .subin { font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); }
.csubs .subrow.head { border-top-color: transparent; padding-top: 16px; }
.sstar { width: 12px; height: 12px; color: var(--red); flex: none; }
.subin { text-overflow: ellipsis; }
.subtools { display: flex; gap: 2px; opacity: 0; }
.subrow:hover .subtools, .subrow:focus-within .subtools { opacity: 1; }
.subt { color: var(--ink3); font-size: 12px; }
.subt .ic { width: 13px; height: 13px; }
.subt.on { color: var(--red); }
.subt:hover { color: var(--ink); }
/* búsqueda por color */
.pdots { display: flex; align-items: center; gap: 8px; padding: 10px 18px 4px; flex-wrap: wrap; }
.pdots:empty { display: none; }
.pdot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); }
.pdot.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
/* hover sin cambiar el ancho */
.task:hover { padding-right: 0; }
.task:hover .tx { max-width: calc(100% - 24px); }
/* ayuda y Mi día */
body.md-open .fab-help { right: 402px; }
@media (max-width: 1200px) and (min-width: 761px) { body.md-open .fab-help { right: 342px; } }
:root[data-theme="dark"] .dotc[data-c="negro"], :root[data-theme="dark"] .dotc { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dotc { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); } }
@media (max-width: 760px) {
  .add::placeholder { color: color-mix(in srgb, var(--ink3) 55%, transparent); }
  .secadd { opacity: 1; }
  .subtools { opacity: 1; }
  .task:hover .tx { max-width: 100%; }
  .help-pop .seg button:first-child { display: none; }
}

.cnav { white-space: nowrap; flex: none; }
.focusbtn.on { background: var(--red); }
@media (max-width: 760px) { .htitle h1 { font-size: 22px; } }

/* ---------- arrastrar (pointer) ---------- */
.task, .mrow, .mitem { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.task:not(.ev), .mrow { cursor: pointer; }
body.dnd, body.dnd * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.dghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; box-shadow: 0 10px 28px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .1); background: var(--panel); border-radius: 999px; opacity: .96; will-change: transform; }
.dghost.pill { background: var(--hl); }
.dghost .lbl { overflow: hidden; text-overflow: ellipsis; }
.task.dragging, .mrow.dragging, .mitem.dragging { opacity: .25; }
.dbody.over, .mzone.over, .mc.over { background: color-mix(in srgb, var(--today) 6%, transparent); }
.dropline { height: 0; border-top: 2px solid var(--today); margin: -1px 4px; position: relative; z-index: 3; }
.dropline::before { content: ''; position: absolute; left: -5px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--today); }

/* ---------- fase 2 ---------- */
/* líneas opcionales */
:root[data-lines="off"] .rows > .task, :root[data-lines="off"] .rows > .add, :root[data-lines="off"] .rows > .sech { border-bottom-color: transparent; }
:root[data-lines="off"] .fill { background-image: none; }
/* Someday 3 o 6 columnas, nombre editable */
:root[data-sdcols="3"] .sgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sdname { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 0; font: 700 var(--fs-day)/1.1 var(--f-display); letter-spacing: -.02em; color: var(--ink); text-overflow: ellipsis; }
.sdname:focus { box-shadow: 0 2px 0 var(--today); }
.slist.hid .sdname { color: var(--ink2); }
.slist.newl .dh { border-bottom-style: dashed; border-bottom-color: var(--rule2); }
.slist.newl .sdname::placeholder { color: var(--ink3); font-weight: 600; }
/* texto que se desvanece */
.lbl.ov { text-overflow: clip; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }
/* interruptores */
.swrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.swin { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swi { flex: none; width: 36px; height: 22px; border-radius: 999px; background: var(--rule2); position: relative; transition: background .15s; }
.swi::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.swin:checked + .swi { background: var(--ink); }
.swin:checked + .swi::after { transform: translateX(14px); }
.swin:focus-visible + .swi { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--today); }
/* mes: cajón lateral */
.mdr-back { position: fixed; inset: 0; background: var(--scrim); z-index: 50; }
.mdr { position: absolute; left: 0; top: 0; bottom: 0; width: min(440px, 92vw); background: var(--panel); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: mdrIn .18s ease-out; border-right: 1px solid var(--popline); }
@keyframes mdrIn { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.mdr-h { display: flex; align-items: center; gap: 8px; padding: 18px 18px 8px; }
.mdr-h h2 { flex: 1; margin: 0; font: 800 24px/1.1 var(--f-display); letter-spacing: -.04em; }
.mdr-wd { display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px 14px 8px; border-bottom: 1px solid var(--rule); font-size: 11px; font-weight: 600; color: var(--ink3); text-align: center; }
.mdr-body { flex: 1; overflow: auto; padding: 0 14px 40px; }
.mdr-m h3 { position: sticky; top: 0; z-index: 2; margin: 0; padding: 14px 4px 8px; font: 700 16px/1 var(--f-display); letter-spacing: -.02em; background: color-mix(in srgb, var(--panel) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.mdr-m h3 span { color: var(--ink3); font-weight: 500; }
.mdr-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mdc { min-height: 64px; padding: 4px 2px 3px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; min-width: 0; }
.mdc.blank { cursor: default; }
.mdc:not(.blank):hover { background: var(--wash); }
.mdc.wkend:not(.blank) { background: color-mix(in srgb, var(--wash) 60%, transparent); }
.mdc.cur:not(.blank) { box-shadow: inset 0 0 0 1px var(--rule2); }
.mdn { font: 600 12px/1 var(--f-body); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.mdc.past .mdn { color: var(--ink3); }
.mdc.today .mdn { background: var(--todaybg); color: var(--todayink); }
.mdp { display: block; max-width: 100%; font-size: 9.5px; line-height: 14px; padding: 0 4px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink2); }
.mdp.pill { background: var(--hl); color: var(--hlfg); }
.mdp.pill[data-color="negro"] { background: #3A3A3A; color: #fff; }
.mdp.done { opacity: .4; text-decoration: line-through; }
.mdmore { font-size: 9.5px; color: var(--ink3); }
.mdc.over { background: color-mix(in srgb, var(--today) 12%, transparent); }
.mdc .dropline { display: none; }
@media (max-width: 760px) { .mdr { width: 100vw; } .mdp { font-size: 9px; } }

/* ---------- tanda 1 ---------- */
.prtog { flex: none; width: 20px; height: 20px; border-radius: 6px; font: 700 10.5px/1 var(--f-body); color: var(--ink3); opacity: 0; align-self: center; }
.slist .dh:hover .prtog, .prtog.on, .prtog:focus-visible { opacity: 1; }
.prtog.on { background: var(--ink); color: var(--paper); }
.prtog:hover { background: var(--wash); color: var(--ink); }
.prtog.on:hover { background: var(--ink2); color: var(--paper); }
.sech.prio .sn { color: var(--ink2); }
.sech.prio .sc { margin-left: 4px; }
.pchip.k-prio { background: var(--ink); color: var(--paper); }
.btn.ghost.on { background: var(--ink); color: var(--paper); }
.task.ev { cursor: pointer; }

/* ---------- tanda 2: pasos y secciones ---------- */
.stepic { flex: none; width: 13px; height: 13px; color: var(--today); margin-right: 4px; align-self: center; }
.stepic svg { width: 13px; height: 13px; }
.task .ctx { color: var(--ink3); margin-left: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; font-size: .92em; }
.task[data-step] .tx { min-width: 0; }
.xbtn { flex: none; width: 16px; height: 16px; margin: 0 2px 0 -4px; align-self: center; color: var(--ink3); border-radius: 4px; display: grid; place-items: center; }
.xbtn svg { width: 11px; height: 11px; transition: transform .15s; }
.xbtn.on svg { transform: rotate(90deg); }
.xbtn:hover { background: var(--wash); color: var(--ink); }
.task.subl { padding-left: 18px; }
.task.subl .lbl { color: var(--ink2); font-size: .95em; }
.task.subl.done .lbl { color: var(--ink3); text-decoration: line-through; }
.task.subl .when, .task.subl + .x { font-size: 11px; color: var(--today); margin-left: 6px; white-space: nowrap; }
.task.subh { padding-left: 18px; cursor: default; }
.task.subh .lbl { font: 600 10px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.task.subh .sc { font-size: 10px; color: var(--ink3); margin-left: 6px; }
.subrow { position: relative; }
.sgrip { flex: none; width: 14px; height: 22px; display: grid; place-items: center; color: var(--ink3); opacity: 0; cursor: grab; touch-action: none; margin-left: -18px; }
.sgrip svg { width: 12px; height: 12px; }
.subrow:hover .sgrip, .subrow:focus-within .sgrip { opacity: .8; }
.subrow.dragging { opacity: .35; }
.sdrop { height: 2px; background: var(--today); border-radius: 2px; margin: -1px 0; }
.subrow.head { margin-top: 8px; }
.subrow.head .subin { font: 700 11px/1.2 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink2); }
.secx { width: 20px; height: 20px; color: var(--ink3); }
.secx svg { width: 11px; height: 11px; transition: transform .15s; }
.secx.open svg { transform: rotate(90deg); }
.secp { flex: none; font-size: 11px; color: var(--ink3); margin: 0 6px; font-variant-numeric: tabular-nums; }
.schip { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--today); background: color-mix(in srgb, var(--today) 12%, transparent); margin-left: 4px; }
.schip .ic svg { width: 11px; height: 11px; }
.subrow.hl { background: color-mix(in srgb, var(--today) 10%, transparent); border-radius: 6px; }
@media (hover: none) { .sgrip { opacity: .6; } }
.task[data-step] .tx { display: flex; flex-wrap: nowrap; }
.task[data-step] .lbl { flex: 0 1 auto; min-width: 5ch; -webkit-mask-image: none; mask-image: none; text-overflow: ellipsis; }
.task[data-step] .ctx { flex: 0 100 auto; min-width: 0; }
.task[data-step] .lbl { flex-shrink: 0; max-width: 78%; }
/* eventos más ligeros que las tareas */
.task.ev .tx { font-size: .9em; }
.task.ev .lbl { color: var(--ink2); }
.task.ev .etm { flex: none; color: var(--ink3); font-variant-numeric: tabular-nums; margin-right: 6px; font-size: .95em; }
.task.ev .tx.pill .etm, .task.ev .tx.pill .lbl { color: inherit; }
.task.ev .tx.pill .etm { opacity: .7; }
.task.ev .ic.erep { width: 10px; height: 10px; margin-left: 4px; opacity: .45; align-self: center; flex: none; }
.task.ev .ic.erep svg { width: 10px; height: 10px; }
.task.ev.done .etm { text-decoration: line-through; }
/* eventos importantes: marcador */
:root { --imp: #FFB23F; --impfg: #C25E00; }
[data-theme="dark"] { --imp: #B86A12; --impfg: #FFB547; }
.impb { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; display: grid; place-items: center; color: var(--ink3); opacity: 0; border-radius: 50%; transition: opacity .1s; }
.impb .ic, .impb svg { width: 12px; height: 12px; }
.task.ev:hover .impb, .task.ev:focus-within .impb { opacity: 1; }
.impb:hover { color: var(--impfg); background: var(--wash); }
.impb.on { color: var(--impfg); }
.task.ev.imp .lbl { color: var(--ink); font-weight: 600; background: linear-gradient(transparent 56%, color-mix(in srgb, var(--imp) 70%, transparent) 56%, color-mix(in srgb, var(--imp) 70%, transparent) 92%, transparent 92%); padding: 0 2px; margin: 0 -2px; overflow: visible; }
.task.ev.imp .etm { color: var(--impfg); font-weight: 600; }
.mdp.ev.imp { box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--imp) 75%, transparent); font-weight: 600; }
.mev.imp .lbl { font-weight: 600; background: linear-gradient(transparent 56%, color-mix(in srgb, var(--imp) 70%, transparent) 56%); }
.ettx.imp { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--imp) 60%, transparent) 62%); display: inline; }
.erow.top .impb.big { position: static; transform: none; opacity: 1; width: 32px; height: 32px; }
.erow.top .impb.big .ic, .erow.top .impb.big svg { width: 16px; height: 16px; }
.impb:not(.on) svg path { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.ettx.imp { padding: 0 2px; }
/* importantes en tareas */
.task:not(.ev) .impb { right: 24px; }
.task:not(.ev):hover .impb, .task:not(.ev):focus-within .impb { opacity: 1; }
.task.imp:not(.ev) .tx:not(.pill) .lbl, .mrow.imp .tx:not(.pill) .lbl { font-weight: 600; color: var(--ink); background: linear-gradient(transparent 56%, color-mix(in srgb, var(--imp) 70%, transparent) 56%, color-mix(in srgb, var(--imp) 70%, transparent) 92%, transparent 92%); padding: 0 2px; margin: 0 -2px; }
.task.imp .tx.pill, .mrow.imp .tx.pill { box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--imp) 90%, transparent); font-weight: 600; }
.ctitle.imp { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--imp) 75%, transparent); text-decoration-thickness: .3em; text-underline-offset: -.12em; text-decoration-skip-ink: none; }
.ctool.impt.on { color: var(--impfg); }
.ctool.impt:not(.on) svg path { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
/* botones superiores más pequeños */
.cb { width: 38px; height: 38px; }
.cb .ic { width: 15px; height: 15px; }
.cb.light .ic { width: 18px; height: 18px; }
.cb.av span { font-size: 13px; }
.cb .dot { width: 9px; height: 9px; top: 1px; right: 1px; }
/* botón de ayuda */
.fab-help { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--paper); border: 0; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.18); transition: transform .12s; }
.fab-help .ic, .fab-help svg { width: 17px; height: 17px; }
.fab-help:hover { background: var(--ink); transform: scale(1.06); }
/* almanaque */
.alm { display: flex; flex-direction: column; gap: 12px; padding-bottom: 6px; }
.alhero { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--wash); }
.alk { font: 600 10.5px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.alnum { display: flex; align-items: baseline; gap: 6px; }
.alnum b { font: 800 46px/1 var(--f-display); letter-spacing: -.04em; color: var(--ink); }
.alnum span { font: 600 16px/1 var(--f-display); color: var(--ink3); }
.als { font-size: 12.5px; color: var(--ink2); }
.albar { height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; margin-top: 6px; }
.albar i { display: block; height: 100%; background: var(--today); border-radius: 3px; }
.algrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.alc { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px; }
.alb { font: 700 17px/1.2 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.alc .als { font-size: 12px; color: var(--ink3); }
.almoon { position: absolute; top: 10px; right: 10px; line-height: 0; }
.alfact { padding: 12px 14px; border-left: 3px solid var(--today); background: color-mix(in srgb, var(--today) 6%, transparent); border-radius: 0 10px 10px 0; }
.alfact p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
/* marca */
.htitle { display: flex; flex-direction: column; gap: 8px; }
.brand { display: flex; align-items: baseline; gap: 10px; user-select: none; }
.bw { font: 800 19px/1 var(--f-display); letter-spacing: -.04em; color: var(--ink); }
.bp { font: 500 11px/1 var(--f-display); color: var(--ink3); vertical-align: .95em; letter-spacing: 0; margin-left: 2px; }
.bp .ic.bast { display: inline-block; width: .85em; height: .85em; vertical-align: -.1em; margin: 0 .05em; color: var(--red); }
.bp .ic.bast svg { width: 100%; height: 100%; display: block; }
.bby { font: 400 9.5px/1 'Geist Mono', ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
/* paleta: fila suave + fila viva */
.cgrid { grid-template-columns: repeat(10, 24px); gap: 10px 8px; padding: 4px 2px; }
.cgrid .dotc { width: 24px; height: 24px; }
.cgrid .dotc.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
.cnone { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--ink3); padding: 3px 8px 3px 6px; border-radius: 12px; }
.cnone .ic { width: 12px; height: 12px; }
.cnone:hover, .cnone.on { background: var(--wash); color: var(--ink); }
.cemos { margin-top: 12px; }
/* pie de la ventana de evento */
.efoot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 4px; }
.eacts { display: flex; gap: 2px; flex: 1; min-width: 0; flex-wrap: wrap; margin-left: -8px; }
.eact { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 10px; font: 500 13px/1 var(--f-body); color: var(--ink2); text-decoration: none; }
.eact .ic { width: 15px; height: 15px; }
.eact:hover { background: var(--wash); color: var(--ink); }
.btn.ecomp { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.btn.ecomp .ic { width: 14px; height: 14px; }
.btn.ecomp.undo { background: var(--wash); color: var(--ink); }
@media (max-width: 760px) { .eact span { display: none; } .eact { width: 38px; justify-content: center; padding: 0; } }

/* ---------- tanda 3 ---------- */
/* completed */
.sech.donegrp, .day.today .sech.donegrp { color: var(--today); }
.sech.donegrp .sn { text-transform: none; letter-spacing: .01em; font-size: calc(var(--fs-sec) + 1.5px); font-weight: 600; }
.sech.donegrp .chev { opacity: .7; }
/* prioridades en morado, por intensidad */
.sech.prio .sn { color: inherit; }
.sech.prio[data-prio="1"] { color: var(--today); }
.sech.prio[data-prio="2"] { color: color-mix(in srgb, var(--today) 72%, var(--paper)); }
.sech.prio[data-prio="3"] { color: color-mix(in srgb, var(--today) 50%, var(--paper)); }
.sech.prio[data-prio="4"], .sech.prio[data-prio="0"] { color: var(--ink3); }
.sech.prio .sc { color: inherit; opacity: .85; }
.sech.prio .chev { opacity: .6; }
/* Someday en una fila */
.sdh { align-items: center; justify-content: flex-start; }
.sdh h2 { margin-right: 8px; }
.sdsp { align-self: center; }
.sdact { margin-left: auto; align-items: center; }
.sdarr { width: 28px; height: 28px; border-radius: 50%; background: var(--wash); display: grid; place-items: center; }
.sdarr .ic, .sdarr svg { width: 13px; height: 13px; }
.sdarr:disabled { opacity: .35; }
.sdarr[hidden] { display: none; }
.sgrid { display: grid !important; grid-auto-flow: column; grid-template-columns: none !important; grid-auto-columns: calc((100% - 5 * var(--gap)) / 6); gap: 0 var(--gap); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 10px; }
:root[data-sdcols="3"] .sgrid { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
.sgrid > .slist { scroll-snap-align: start; min-width: 0; }
.slist .dh[data-draginput] { cursor: grab; }
.slist .dh[data-draginput] .sdname { cursor: text; }
.slist.ldrop-b { box-shadow: -10px 0 0 -8px var(--today); }
.slist.ldrop-a { box-shadow: 10px 0 0 -8px var(--today); }
.slist.dragging { opacity: .35; }
/* altura máxima con scroll interno */
.slist[data-list] .dbody { max-height: calc(var(--row) * 12 + 2px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.slist[data-list] .dbody .fill.short { display: none; }
.slist[data-list] .rows > .add { position: sticky; bottom: 0; background: var(--paper); z-index: 1; }
.slist[data-list] .dbody.scrl .rows > .add { box-shadow: 0 -18px 16px -8px var(--paper); }
@media (max-width: 760px) { .sgrid { grid-auto-columns: 82%; } }
/* panel de repetidas */
.mdr.rpan { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--popline); width: min(460px, 94vw); animation: rpIn .18s ease-out; }
@keyframes rpIn { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.rbody { padding-top: 6px; }
.rgen { padding: 10px 4px 16px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.rdots { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.rdots .dotc { width: 20px; height: 20px; }
.rdots .cnone { margin-top: 0; }
.rgrp h3 { margin: 18px 4px 6px; font: 700 15px/1 var(--f-display); letter-spacing: -.01em; }
.rgrp h3 span { color: var(--ink3); font-weight: 500; }
.rrow { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--rule); }
.rrow.ended .rt { color: var(--ink3); }
.rdot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c, transparent); border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.rdot.own { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--ink3); }
.rmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 2px 0; }
.rt { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs { font-size: 12px; color: var(--ink3); }
.rcar { font-size: 11.5px; color: var(--red); }
.redit { padding: 8px 4px 12px 26px; border-bottom: 1px solid var(--rule); }
.lrow .spsel { font-size: 12px; padding: 3px 6px; border-radius: 8px; }
/* importantes: tareas en morado, eventos en amarillo */
.task.imp:not(.ev) .tx:not(.pill) .lbl, .mrow.imp .tx:not(.pill) .lbl { background: linear-gradient(transparent 56%, color-mix(in srgb, var(--today) 32%, transparent) 56%, color-mix(in srgb, var(--today) 32%, transparent) 92%, transparent 92%); }
.task.imp:not(.ev) .tx.pill, .mrow.imp .tx.pill { box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--today) 75%, transparent); }
.task:not(.ev) .impb.on, .ctool.impt.on { color: var(--today); }
.ctitle.imp { text-decoration-color: color-mix(in srgb, var(--today) 45%, transparent); }
.rimp { color: var(--ink3); }
.rimp.on { color: var(--today); }
.rimp:not(.on) svg path { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
/* listas completas */
.sdfull { width: 28px; height: 28px; border-radius: 50%; background: var(--wash); display: grid; place-items: center; }
.sdfull .ic, .sdfull svg { width: 13px; height: 13px; transition: transform .15s; }
.sdfull.on { background: var(--ink); color: var(--paper); }
.sdfull.on svg { transform: rotate(180deg); }
.someday.full .slist[data-list] .dbody { max-height: none; overflow: visible; }
.someday.full .slist[data-list] .rows > .add { position: static; box-shadow: none; }
/* ---------- tanda 4 ---------- */
/* ventanas que se cierran con suavidad */
.closing { pointer-events: none; animation: ovOut .14s ease-in forwards !important; }
.closing .mdr { animation: mdrOut .14s ease-in forwards; }
.closing .mdr.rpan { animation: rpOut .14s ease-in forwards; }
.closing .dialog { animation: dlgOut .14s ease-in forwards; }
@keyframes ovOut { to { opacity: 0; } }
@keyframes mdrOut { to { transform: translateX(-20px); } }
@keyframes rpOut { to { transform: translateX(20px); } }
@keyframes dlgOut { to { transform: translateY(6px) scale(.985); } }
/* listas en Ajustes */
.led { display: flex; flex-direction: column; gap: 14px; }
.ledh { font: 600 10.5px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--today); margin: 0 0 4px 22px; }
.ledl { display: flex; flex-direction: column; min-height: 8px; }
.ledr { display: flex; align-items: center; gap: 6px; height: 36px; border-bottom: 1px solid var(--rule); }
.ledr.new { border-bottom: 0; }
.ledr.dragging { opacity: .35; }
.ledg { flex: none; width: 16px; display: grid; place-items: center; color: var(--ink3); opacity: 0; cursor: grab; touch-action: none; }
.ledg svg { width: 12px; height: 12px; }
.ledr:hover .ledg { opacity: .8; }
.ledn { flex: 1; min-width: 0; border: 0; background: transparent; padding: 6px 4px; font: 500 14px/1.2 var(--f-body); color: var(--ink); border-radius: 6px; }
.ledn:focus { background: var(--wash); outline: none; }
.ledr.new .ledn { color: var(--ink2); }
.ledr.hid .ledn { color: var(--ink3); }
.ledc { flex: none; min-width: 22px; text-align: right; font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.ledt { display: flex; gap: 2px; margin-left: 4px; }
.ledi { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--ink3); opacity: 0; font: 700 10.5px/1 var(--f-body); }
.ledi svg { width: 14px; height: 14px; }
.ledr:hover .ledi, .ledi:focus-visible, .ledi.on { opacity: 1; }
.ledi:hover { background: var(--wash); color: var(--ink); }
.ledp.on { background: var(--ink); color: var(--paper); }
@media (hover: none) { .ledi, .ledg { opacity: .8; } }
/* iconos de repetida y notas: más pequeños, en negro */
.task:not(.ev) .tx > .ic.m { width: 10px; height: 10px; flex: none; align-self: center; color: var(--ink); opacity: .7; margin-left: 4px; }
.task:not(.ev) .tx > .ic.m svg { width: 10px; height: 10px; }
.task:not(.ev) .tx.pill > .ic.m { color: inherit; opacity: .75; }
.task:not(.ev) .tx > .subs { font-size: 10.5px; }
/* iconos en el menú FM */
.mit.wic { gap: 10px; }
.mit.wic > .ic.m { width: 15px; height: 15px; color: var(--ink2); flex: none; }
.mit.wic:hover > .ic.m { color: var(--ink); }
/* copias de seguridad */
.bk { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.bk .btn .ic { width: 13px; height: 13px; vertical-align: -2px; }
.bklist { display: flex; flex-direction: column; }
.bkrow { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.bkrow b { font-weight: 600; }
/* ---------- repaso móvil ---------- */
.mdgh .mdgc { color: var(--ink3); font-weight: 500; font-variant-numeric: tabular-nums; }
.mdg.fixed:first-of-type .mdgh .mdgc { color: inherit; opacity: .7; }
@media (max-width: 760px) {
  .eact > span:not(.ic) { display: none; }
  .eact > .ic { display: inline-block; }
  .sdh { gap: 10px 12px; }
  .sdh h2 { font-size: 26px; }
  .sdact { width: 100%; margin-left: 0; justify-content: flex-start; gap: 14px; font-size: 13px; }
  .sdarr { display: none !important; }
  .sdfull { margin-left: auto; }
  #board { padding-bottom: 120px; }
  .almoon { top: 8px; right: 8px; }
  .almoon svg { width: 24px; height: 24px; }
  .alc { padding-right: 36px; }
  .alb { font-size: 15px; }
}
/* ---------- planear semana ---------- */
button.wk { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 8px; }
button.wk:hover { color: var(--today); }
.pwchip { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; height: 28px; padding: 0 12px 0 9px; border-radius: 999px; background: color-mix(in srgb, var(--today) 12%, transparent); color: var(--today); font: 600 13px/1 var(--f-body); letter-spacing: 0; vertical-align: middle; }
.pwchip .ic { width: 12px; height: 12px; color: var(--red); }
.pwchip:hover { background: color-mix(in srgb, var(--today) 20%, transparent); }
.dialog.lg.pwdlg { width: min(1040px, 96vw); max-width: none; }
.pw { display: flex; flex-direction: column; gap: 16px; }
.pwh { display: flex; align-items: baseline; gap: 12px; }
.pwh h2 { margin: 0; font: 800 26px/1.1 var(--f-display); letter-spacing: -.04em; }
.pwh .muted { flex: 1; font-size: 13px; }
.pwh .ib { align-self: center; }
.pwg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pwc { border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; min-width: 0; max-height: 300px; overflow-y: auto; }
.pwk { margin: 0 0 8px; font: 600 10.5px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--today); }
.pwbig { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.pwbig b { font: 800 32px/1 var(--f-display); letter-spacing: -.04em; }
.pwbig span { font-size: 12.5px; color: var(--ink3); }
.pwr { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 13px; min-width: 0; }
.pwr.drag, .pwc .pwr { cursor: grab; }
.pwt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwtag, .pwl { flex: none; font-size: 11px; color: var(--ink3); }
.pwtag { padding: 2px 7px; border-radius: 9px; background: var(--wash); }
.pwcar { flex: none; font: 600 11px/1 var(--f-body); color: var(--red); }
.pwdays { display: inline-flex; gap: 2px; flex: none; }
.pwd { width: 24px; height: 22px; border-radius: 6px; font: 600 10.5px/1 var(--f-body); color: var(--ink2); background: var(--wash); }
.pwd:hover { background: var(--ink); color: var(--paper); }
.pwd.back { color: var(--today); }
.pwmore { margin: 8px 0 0; font-size: 12px; color: var(--ink3); }
.pwstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.pwday { border: 1px dashed var(--rule2); border-radius: 12px; padding: 8px; min-height: 92px; display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: border-color .1s, background .1s; }
.pwday.today { border-style: solid; border-color: var(--today); }
.pwday.over { border-color: var(--today); background: color-mix(in srgb, var(--today) 6%, transparent); }
.pwday b { font: 600 12.5px/1.2 var(--f-body); margin-bottom: 2px; }
.pwp { display: block; font-size: 11.5px; padding: 2px 7px; border-radius: 8px; background: var(--wash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; }
.pwp.pill { background: var(--hl); color: var(--hlfg); }
.pwn { margin-top: auto; font-size: 10.5px; color: var(--ink3); }
.pwday .dropline { display: none; }
.pwfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 760px) {
  .pwg { grid-template-columns: 1fr; }
  .pwstrip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pwchip { margin-left: 0; margin-top: 6px; }
}
.pwday.past { opacity: .45; border-style: dotted; }
/* ---------- tanda 5 ---------- */
/* selector de espacios más pequeño */
.seg.sdsp { padding: 2px; gap: 1px; }
.seg.sdsp button { padding: 3px 10px; font-size: 12px; line-height: 1.3; }
/* prioridades en negrita */
.sech.prio .sn { font-weight: 800; }
.sech.prio .sc { font-weight: 700; }
/* contador de pasos que despliega */
.subsx { font: inherit; font-size: 10.5px; font-weight: 600; color: var(--ink3); background: none; border: 0; padding: 1px 5px; margin-left: 4px; border-radius: 6px; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; align-self: center; }
.subsx:hover { background: var(--wash); color: var(--ink); }
.subsx.on { color: var(--today); background: color-mix(in srgb, var(--today) 10%, transparent); }
.subsx .sxi, .subsx .sxi svg { width: 9px; height: 9px; }
.tx.pill .subsx { color: inherit; opacity: .8; }
/* vista previa de notas */
.npv { position: fixed; z-index: 80; background: var(--panel); border: 1px solid var(--popline); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; pointer-events: none; animation: npvIn .12s ease-out; }
@keyframes npvIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.npvk { font: 600 10px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.npv p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink); white-space: pre-wrap; max-height: 220px; overflow: hidden; }
/* marca en morado y botones superiores más pequeños */
.bw { color: var(--today); font-size: 23px; }
.bp { color: var(--ink); font-size: 12px; }
.cb { width: 34px; height: 34px; }
.cb .ic { width: 13px; height: 13px; }
.cb.light .ic { width: 16px; height: 16px; }
.cb.av span { font-size: 12px; }
@media (max-width: 760px) { .cb { width: 34px; height: 34px; } }
/* prioridades: mismo morado para P1, P2 y P3 */
.sech.prio[data-prio="1"], .sech.prio[data-prio="2"], .sech.prio[data-prio="3"] { color: var(--today); }
/* marca: gris oscuro */
.bw { color: #3A3A3C; }
[data-theme="dark"] .bw { color: #C7C7CC; }
/* marca centrada en la cabecera (escritorio) */
@media (min-width: 1000px) {
  #top.topbar, .topbar { position: relative; }
  .topbar .brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); flex-direction: column; align-items: center; gap: 5px; pointer-events: none; }
  .topbar .htitle { gap: 0; }
}
/* subtareas más pequeñas en la tarjeta */
.subin { font-size: 13.5px; padding: 5px 0; }
.subrow.head .subin { font-size: 10.5px; }
.subrow .scheck { width: 16px; height: 16px; }
/* ⌄⌄ siempre visible para desplegar pasos; gira al abrir */
.subsx .sxi { transition: transform .15s; }
.subsx.on .sxi { transform: rotate(180deg); }
.csubs .subin { font-size: 14px; padding: 2px 0; }
.csubs .subrow { gap: 10px; padding: 6px 4px; }
.csubs .subrow.head .subin { font-size: 10.5px; }
.csubs .subrow.head { padding-top: 12px; }
.subsx .sxi, .subsx .sxi svg { width: 10px; height: 10px; }
/* ---------- filas más limpias ---------- */
.chk { width: 16px; height: 16px; border-width: 1.4px; }
.chk .ic { width: 9px; height: 9px; }
.task:not(.ev) .impb, .task.ev .impb { right: 21px; width: 18px; height: 18px; }
.task .tx { max-width: calc(100% - 20px); }
.task:hover .tx, .task:focus-within .tx { max-width: calc(100% - 44px); }
.subsx { padding: 2px 3px; margin-left: 2px; }
.subsx .sxi, .subsx .sxi svg { width: 10px; height: 10px; }
.subsx:not(.on) { color: var(--ink3); }
/* progreso de pasos dentro de la tarjeta */
.cprog { order: -2; display: flex; align-items: center; gap: 8px; padding: 4px 4px 8px; }
.cpk { font: 600 10.5px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.cpn { font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.cpbar { flex: 1; max-width: 140px; height: 4px; border-radius: 2px; background: var(--rule); overflow: hidden; margin-left: auto; }
.cpbar i { display: block; height: 100%; background: var(--today); border-radius: 2px; }
/* grupos de prioridad: línea cuando están abiertos */
.sech.prio .sechb { flex: 1; display: flex; align-items: center; min-width: 0; }
.sech.prio:not(.closed) .sechb::after { content: ''; flex: 1; height: 1px; margin-left: 8px; background: currentColor; opacity: .3; }
.sech.prio:not(.closed) .chev { opacity: .6; }
/* botón P más pequeño */
.prtog { width: 15px; height: 15px; border-radius: 4px; font-size: 8.5px; }
.prtog.on { font-size: 8.5px; }
.ledp, .ledp.on { width: 20px; height: 20px; font-size: 9px; border-radius: 5px; }
/* secciones del día: línea cuando están abiertas */
.day .sech[data-sec]:not(.donegrp) .sechb { flex: 1; display: flex; align-items: center; min-width: 0; }
.day .sech[data-sec]:not(.donegrp):not(.closed) .sechb::after { content: ''; flex: 1; height: 1px; margin: 0 6px 0 8px; background: currentColor; opacity: .25; }

/* Espacio por serie (Recurrentes) */
.rsp { flex: none; max-width: 104px; appearance: none; -webkit-appearance: none; font: 500 11.5px/1 Inter, sans-serif; color: var(--ink3); background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 9px; cursor: pointer; text-overflow: ellipsis; }
.rsp:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.rsp.on { color: var(--today); border-color: color-mix(in srgb, var(--today) 35%, transparent); background: color-mix(in srgb, var(--today) 7%, transparent); }
.rsp:focus-visible { outline: 2px solid var(--today); outline-offset: 1px; }
@media (max-width: 600px) { .rsp { max-width: 84px; padding: 4px 7px; } }
/* Píldoras de color más delgadas: solo lo necesario */
.tx.pill { height: calc(var(--pill) - 5px); padding: 0 7px; }
.task.imp .tx.pill, .mrow.imp .tx.pill, .task.imp:not(.ev) .tx.pill { box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--today) 75%, transparent); }

/* Recurrentes: chip de espacio ajustado al texto e iconos */
.rsp { field-sizing: content; max-width: none; font-size: 11px; line-height: 1; padding: 2px 7px; height: 19px; border-color: transparent; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.rsp.on { border-color: transparent; background: color-mix(in srgb, var(--today) 10%, transparent); }
.rrow .ib.small { color: var(--ink3); }
.rrow .ib.small:hover { color: var(--ink); }
@media (max-width: 600px) { .rsp { max-width: none; padding: 2px 6px; } }

/* ================= hábitos ================= */
.cb.light.hb { color: var(--today); }
.cb.light.hb .ic { width: 20px; height: 20px; }
.cb.light.hb.on { background: var(--today); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--today) 35%, transparent); }
.cb.light.hb.vac { color: var(--ink3); }
.hring { display: inline-grid; width: var(--rs); height: var(--rs); flex: none; }
.hring svg { width: 100%; height: 100%; overflow: visible; }
.hring .rb { fill: none; stroke: color-mix(in srgb, var(--today) 30%, transparent); stroke-width: 1.6; }
.hring .rp { fill: none; stroke: var(--today); stroke-width: 2.2; stroke-linecap: round; }
.hring .rf { fill: var(--today); }
.hring .rk { fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hrb { flex: none; display: grid; place-items: center; padding: 3px; margin: -3px; border-radius: 50%; cursor: pointer; transition: transform .1s; }
.hrb:hover:not(:disabled) { transform: scale(1.1); }
.hrb:disabled { opacity: .45; cursor: default; }
.hday { display: flex; align-items: center; gap: 7px; height: var(--row); padding: 0 8px; border-bottom: 1px solid var(--rule); cursor: pointer; min-width: 0; }
.hday:hover { background: var(--wash); }
.hday .hlab { font-size: 11.5px; font-weight: 600; color: var(--today); letter-spacing: .01em; flex: none; }
.hday .hmini { display: flex; gap: 3px; min-width: 0; overflow: hidden; flex: 1; }
.hday .hcnt { font-size: 11px; color: var(--ink3); font-variant-numeric: tabular-nums; flex: none; }
.hday.all .hcnt { color: var(--today); font-weight: 600; }
.hday.vac { cursor: default; }
.hday.vac .hlab { color: var(--ink3); font-weight: 500; }
.hday.vac:hover { background: none; }
.hrow { display: flex; align-items: center; gap: 8px; height: var(--row); padding: 0 8px 0 10px; border-bottom: 1px solid var(--rule); min-width: 0; }
.hrow .hname { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1; text-align: left; font-size: var(--fs); color: var(--ink); }
.hrow .hname .lbl { white-space: nowrap; }
.hrow.done .hname .lbl { color: var(--ink3); }
.hrow .hem { flex: none; font-size: .95em; }
.hrow .hmeta { flex: none; font-size: 11px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.hrow .hstreak { flex: none; font-size: 11px; font-weight: 600; color: var(--today); font-variant-numeric: tabular-nums; }
.hrow.big { height: 40px; border-bottom: 1px solid var(--rule); padding: 0 4px; }
.hmz .hrow.big:last-child, .hlist .hrow.big:last-child { border-bottom: 0; }
.hvac { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.hvac b { font-weight: 600; font-size: 13.5px; }
.hvac.on { background: color-mix(in srgb, var(--today) 9%, transparent); }
.hvac.on b { color: var(--today); }
.hempty p { color: var(--ink2, var(--ink3)); font-size: 13.5px; line-height: 1.5; margin: 14px 4px 4px; }
.hall { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--rule); background: var(--panel); }
.hall.paused .rt { color: var(--ink3); }
.hall.drag { opacity: .7; box-shadow: var(--shadow); }
.hgrip { flex: none; color: var(--ink3); opacity: .5; cursor: grab; touch-action: none; display: grid; }
.hgrip .ic { width: 14px; height: 14px; }
.hall .rmain { flex: 1; min-width: 0; }
.h7 { display: flex; gap: 3px; flex: none; }
.h7 i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.h7 i.y { background: var(--today); }
.h7 i.p { background: color-mix(in srgb, var(--today) 40%, transparent); }
.h7 i.t { background: transparent; box-shadow: inset 0 0 0 1.3px color-mix(in srgb, var(--today) 50%, transparent); }
.h7 i.o { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); width: 5px; height: 5px; margin: 1px; }
.hall .ib.small { color: var(--ink3); }
.hall .ib.small:hover { color: var(--ink); }
.hadd { display: flex; align-items: center; gap: 6px; margin: 10px 2px; padding: 8px 10px; border-radius: 10px; color: var(--today); font-weight: 600; font-size: 13.5px; }
.hadd:hover { background: color-mix(in srgb, var(--today) 8%, transparent); }
.hed { display: flex; flex-direction: column; gap: 14px; }
.hrowin { display: flex; gap: 8px; }
.hin { font: inherit; font-size: 15px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); min-width: 0; }
.hin:focus { outline: none; border-color: var(--today); }
.hrowin .hin:last-child { flex: 1; }
.hemo { width: 52px; text-align: center; }
.hnum { width: 80px; }
.hfld { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hfld.col { flex-direction: column; align-items: stretch; }
.hfl { font-size: 13px; font-weight: 600; }
.hstep { display: flex; align-items: center; gap: 6px; }
.hsv { min-width: 64px; text-align: center; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.hfld.col .hstep { align-self: flex-start; }
.hdays { display: flex; gap: 6px; }
.hdy { width: 32px; height: 32px; border-radius: 50%; font-size: 12.5px; font-weight: 600; color: var(--ink3); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.hdy.on { background: var(--today); color: #fff; }
.hvlab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; }
.hvlab input { font: inherit; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.secfix { font-size: 11px; color: var(--ink3); padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
@media (max-width: 700px) { .h7 { display: none; } }

.hed.inl { gap: 12px; padding: 14px 12px; margin: 6px 0 10px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 3.5%, transparent); border: 1px solid var(--rule); }
.hed.inl .hin { font-size: 14px; padding: 8px 10px; }
.hed.inl .seg.small button { font-size: 12.5px; }
.hnewwrap { margin-top: 10px; }
.hnewh { font: 700 15px/1 var(--f-display); margin: 8px 4px 0; letter-spacing: -.01em; }

/* premio: día de hábitos completo */
.hday.all { background: color-mix(in srgb, #F2B300 16%, transparent); }
.hday.all:hover { background: color-mix(in srgb, #F2B300 24%, transparent); }
.hday.all .hlab { color: #9A6A00; }
.hday.all .hring .rf { fill: #E0A100; }
.hwin { display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: 11px; font-weight: 700; color: #9A6A00; }
.hwin .ic { width: 11px; height: 11px; }
:root[data-theme="dark"] .hday.all .hlab, :root[data-theme="dark"] .hwin { color: #F2C24A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hday.all .hlab, :root:not([data-theme="light"]) .hwin { color: #F2C24A; } }

/* ================= selección múltiple ================= */
.task.sel .tx { box-shadow: 0 0 0 2px var(--today); }
.task.sel .tx:not(.pill) { background: color-mix(in srgb, var(--today) 9%, transparent); }
#selbar { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 2px; padding: 5px 6px 5px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); box-shadow: 0 10px 30px rgba(0, 0, 0, .22); animation: sbIn .16s ease-out; max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; }
@keyframes sbIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.sbn { font-size: 13px; font-weight: 600; white-space: nowrap; padding-right: 4px; font-variant-numeric: tabular-nums; }
.sbsep { width: 1px; height: 18px; background: color-mix(in srgb, var(--paper) 22%, transparent); margin: 0 5px; flex: none; }
.sbb { display: inline-flex; align-items: center; gap: 5px; height: 32px; min-width: 32px; justify-content: center; padding: 0 9px; border-radius: 999px; color: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; flex: none; }
.sbb:hover { background: color-mix(in srgb, var(--paper) 14%, transparent); }
.sbb .ic { width: 16px; height: 16px; }
.sbb.imp.on { color: #F2C24A; }
.sbb.imp:not(.on) svg path { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.sbb.sbx { opacity: .7; }
.sbdw { position: relative; display: inline-flex; flex: none; }
.sbdate { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; }
body.sel-on #toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
@media (max-width: 760px) { body.sel-on .fab-add, body.sel-on .fab-help { display: none; } }
.selpop { position: fixed; z-index: 75; padding: 10px; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); border: 1px solid var(--popline); animation: sbIn2 .12s ease-out; }
@keyframes sbIn2 { from { opacity: 0; transform: translateY(6px); } }
.selpop .rdots { max-width: 300px; }
.sblists { display: flex; flex-direction: column; min-width: 180px; max-height: 50vh; overflow: auto; }
.sblists button { text-align: left; padding: 7px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink); }
.sblists button:hover { background: var(--wash); }
.dghost .dgn { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--today); color: #fff; font-size: 11px; font-weight: 700; }

/* ================= desk audit: desktop polish (1024-1440) ================= */
/* columnas estrechas (Mi día abierto a ~1024px): el título del evento no debe desaparecer */
.task.ev .tx { overflow: hidden; }
.task.ev .lbl { min-width: 2.4em; }
.hrow { overflow: hidden; }
.hrow .hname { min-width: 4.5em; }
.hrow .hmeta { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
/* fila Hábitos: «✓ Todo» y «en pausa · vacaciones» no se salen de la columna */
.hday { overflow: hidden; }
.hday .hlab { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* selección: anillo interior, no pisa la estrella roja de importante */
.task.sel .tx { box-shadow: inset 0 0 0 2px var(--today); }
/* oscuro: el color elegido conserva su anillo; el negro se distingue del panel */
:root[data-theme="dark"] .dotc { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
:root[data-theme="dark"] .dotc.on { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 0 0 3px var(--wash), 0 0 0 5px var(--ink); }
:root[data-theme="dark"] .cgrid .dotc.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dotc { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
  :root:not([data-theme="light"]) .dotc.on { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 0 0 3px var(--wash), 0 0 0 5px var(--ink); }
  :root:not([data-theme="light"]) .cgrid .dotc.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
}
/* formulario de hábito: el stepper −/+ se ve como botón */
.hstep .ib.small { font-size: 16px; line-height: 1; color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
.hstep .ib.small:hover { background: var(--wash); }
/* ajustes: aire entre «Actualizar ahora» y la casilla de colores */
#set-cal > .chkl { margin-top: 10px; }

/* ================= móvil: auditoría táctil (tap ≥ 32px, zoom iOS, notch) ================= */
@media (max-width: 760px) {
  /* Someday: «.v-day .dh {display:none}» también escondía el nombre de cada lista */
  .v-day .someday .dh { display: flex; }
  .prtog { opacity: .55; }
  /* el título del mes no se corta en 360px (Septiembre 2026) */
  .htitle h1 { font-size: clamp(18px, 5.6vw, 22px); }
  /* iOS hace zoom al enfocar campos de menos de 16px */
  input, textarea, select { font-size: 16px; }
  .add, .hin, .hed.inl .hin, .ledn, .csel, .hfilter, .hvlab input, .subin, .csubs .subin, .subrow.head .subin, .csubs .subrow.head .subin { font-size: 16px; }
  /* zonas táctiles: misma apariencia, área de toque mayor */
  .chk::after, .mchk::after, .madd::after { content: ''; position: absolute; inset: -9px; }
  .mchk, .madd, .secadd, .rdot, .chk.big { position: relative; }
  .rdot::after { content: ''; position: absolute; inset: -9px; }
  .hrow .hname { align-self: stretch; }
  .prtog { width: 28px; height: 28px; }
  .dl { padding-block: 7px; margin-block: -7px; }
  .secadd::after { content: ''; position: absolute; inset: -7px; }
  .sechb { padding-top: 20px; margin-top: -20px; }
  .hrb { padding: 8px; margin: -8px; }
  .hgrip { padding: 9px 8px; margin: -9px -8px; }
  .ib.small { width: 34px; height: 34px; }
  .btn.small { min-height: 34px; }
  .seg button { min-height: 32px; }
  .seg.sdsp button { padding: 6px 12px; }
  .ledi, .ledp, .ledp.on { width: 32px; height: 32px; }
  .pwd { width: 28px; height: 32px; }
  .cdate, .ctime { min-height: 32px; }
  .tchk { width: 32px; height: 32px; margin-top: 4px; }
  .linkbtn { padding-block: 7px; }
  /* barra de selección: en dos filas en vez de esconder botones (y la X) fuera de pantalla */
  #selbar { left: 8px; right: 8px; transform: none; max-width: none; flex-wrap: wrap; justify-content: center; row-gap: 2px; padding: 6px 8px; border-radius: 22px; overflow: visible; animation-name: sbInM; }
  @keyframes sbInM { from { opacity: 0; transform: translateY(8px); } }
  body.sel-on #toasts { bottom: calc(118px + env(safe-area-inset-bottom)); }
  /* paneles a pantalla completa: respetar notch y barra de inicio */
  .mdr-h { padding-top: calc(18px + env(safe-area-inset-top)); }
  .mdr-body { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}
/* táctil: la estrella invisible no se pulsa por accidente al lado del círculo */
@media (hover: none) { .task .impb:not(.on) { pointer-events: none; } }
/* logo entero en móviles estrechos */
.bw, .bp, .bby { white-space: nowrap; }
@media (max-width: 400px) { .bby { display: none; } .brand { flex: none; } }

/* iconos de hábitos: línea fina, todos en el morado de la app */
.hico { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; color: var(--today); }
.hico svg { width: 100%; height: 100%; }
.hrow .hico { width: 15px; height: 15px; }
.hrow.big .hico { width: 18px; height: 18px; }
.hrow.done .hico { opacity: .45; }
.hall .rt { display: inline-flex; align-items: center; gap: 7px; }
.hall .hico.inl { width: 16px; height: 16px; }
.hicb { flex: none; width: 42px; height: 40px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); display: grid; place-items: center; }
.hicb .hico { width: 20px; height: 20px; }
.hicb .hico.ghost { color: var(--ink3); opacity: .55; }
.hicb:hover, .hicb.on { border-color: var(--today); }
.higrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 4px; padding: 8px; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); }
.hib { height: 36px; border-radius: 9px; display: grid; place-items: center; }
.hib .hico { width: 19px; height: 19px; }
.hib:hover { background: color-mix(in srgb, var(--today) 8%, transparent); }
.hib.on { background: color-mix(in srgb, var(--today) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--today); }
.hib.none { color: var(--ink3); }
.hib.none .ic { width: 14px; height: 14px; }

/* hábitos para dejar */
.hring.neg .rb { fill: none; stroke: color-mix(in srgb, var(--today) 30%, transparent); stroke-width: 1.6; }
.hring.neg .rs { fill: #E5484D; }
.hrow.neg.slip .hname .lbl { color: #C2373C; }
.hrow.neg.slip .hico { color: #E5484D; opacity: 1; }
.h7 i.x { background: #E5484D; }
.hnote { margin: -4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink3); }

/* estadísticas de un hábito */
.hstats { gap: 14px; }
.hsnums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hsn { display: flex; flex-direction: column; gap: 3px; padding: 8px 4px; border-radius: 10px; background: var(--paper); text-align: center; }
.hsn b { font: 700 20px/1 var(--f-display); letter-spacing: -.02em; color: var(--today); font-variant-numeric: tabular-nums; }
.hsn span { font-size: 10.5px; color: var(--ink3); line-height: 1.2; }
.hmap { display: flex; flex-direction: column; gap: 4px; }
.hmm { display: grid; font-size: 10px; color: var(--ink3); text-transform: capitalize; height: 12px; }
.hmm span { white-space: nowrap; }
.hmg { display: grid; grid-template-columns: repeat(18, 1fr); gap: 3px; }
.hmcol { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.hmcol i { aspect-ratio: 1; border-radius: 3px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.hmcol i.y { background: var(--today); }
.hmcol i.p { background: color-mix(in srgb, var(--today) 40%, transparent); }
.hmcol i.x { background: #E5484D; }
.hmcol i.t { background: transparent; box-shadow: inset 0 0 0 1.3px color-mix(in srgb, var(--today) 55%, transparent); }
.hmcol i.v { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink) 10%, transparent) 0 2px, transparent 2px 4px); }
.hmcol i.o, .hmcol i.pre { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.hmcol i.f { background: transparent; }
.hstats .grow { flex: 1; }
@media (max-width: 760px) { .hsn b { font-size: 18px; } .hmg, .hmcol { gap: 2px; } }

/* hábitos: fallé / saltado */
.hring.fail .rs { fill: #E5484D; }
.hring.fail .rk, .hring.skip .rk { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hring.fail .rk { stroke: #fff; }
.hring.skip .rb { fill: none; stroke: var(--ink3); stroke-width: 1.4; stroke-dasharray: 2.2 2.2; }
.hring.skip .rk { stroke: var(--ink3); }
.hrow.fail .hname .lbl { color: #C2373C; }
.hrow.skip .hname .lbl { color: var(--ink3); }
.hrow.skip .hico, .hrow.fail .hico { opacity: .55; }
.hmore { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-right: -4px; border-radius: 8px; color: var(--ink3); opacity: .55; }
.hmore:hover, .hmore:focus-visible { opacity: 1; background: var(--wash); color: var(--ink); }
.hmore .ic { width: 16px; height: 16px; }
.hmenu { width: 210px; }
.hmenuh { padding: 6px 10px 4px; font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: none) { .hmore { opacity: .8; width: 32px; height: 32px; } }
@media (hover: hover) { .hrow:not(.big) .hmore { display: none; } .hrow:not(.big):hover .hmore, .hrow:not(.big):focus-within .hmore { display: grid; } }

/* completar: respuesta inmediata y salida suave */
.task.completing .chk, .mrow.completing .mchk { opacity: 1; background: var(--ink); border-color: var(--ink); color: var(--paper); animation: chkpop .22s cubic-bezier(.2,.9,.3,1.3); }
.task.completing .lbl, .mrow.completing .lbl { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--ink3); transition: color .15s; }
.task.completing, .mrow.completing { animation: rowout .23s ease-in forwards; animation-delay: .06s; pointer-events: none; }
@keyframes chkpop { 0% { transform: translateY(-50%) scale(.7); } 60% { transform: translateY(-50%) scale(1.15); } 100% { transform: translateY(-50%) scale(1); } }
.mrow.completing .mchk { animation-name: chkpop2; }
@keyframes chkpop2 { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes rowout { to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .task.completing, .mrow.completing, .task.completing .chk, .mrow.completing .mchk { animation: none; } }
/* botones: sin retraso ni destello gris al tocar, con respuesta al pulsar */
button, [role=button], .task, .hday { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@media (hover: none) {
  button:active:not(:disabled) { transform: scale(.94); transition: transform .06s; }
  .chk:active:not(:disabled) { transform: translateY(-50%) scale(.88); }
  .task:active .tx { filter: brightness(.96); }
}
/* escritorio: el check es fácil de acertar (área mayor, misma apariencia) */
@media (hover: hover) { .chk::after { content: ''; position: absolute; inset: -6px; } .chk { position: absolute; } }
@media (hover: none) { .chk.big:active:not(:disabled), .mchk:active:not(:disabled) { transform: scale(.88); } }

/* ===== scroll fluido ===== */
/* el scroll de las listas de Someday encadena con el de la página (antes se quedaba «atascado» al llegar al final) */
.slist[data-list] .dbody { overscroll-behavior-y: auto; }
.sgrid { overscroll-behavior-x: contain; overscroll-behavior-y: auto; }
/* cada columna calcula su layout aparte: el navegador repinta menos al desplazar */
.day, .slist { contain: layout style; }
.board { -webkit-overflow-scrolling: touch; }
@media (max-width: 760px) {
  /* en el móvil, nada de scroll dentro de scroll: las listas muestran todo y solo se desplaza la página */
  .slist[data-list] .dbody { max-height: none; overflow: visible; }
  .sgrid { scroll-snap-type: x mandatory; }
}
@media (hover: none) { .sgrid { scroll-snap-type: x mandatory; } }

/* ===== barras de scroll: invisibles; aparecen solo mientras se desplaza ===== */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.is-scrolling { scrollbar-color: color-mix(in srgb, var(--ink) 28%, transparent) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
*::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.is-scrolling::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink) 28%, transparent); }
.ctool.on::after { bottom: 3px; }
