/* Pantalla Hoy: agenda (con tareas por bloque), tablero de misión, hábitos, entreno y diario; portadas de metas y proyectos. */

/* Agenda (escritorio: filas; móvil: tarjetas en una línea de tiempo) */
.timeline { display: flex; flex-direction: column; }
.blk { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.blk:first-child { border-top: 0; }
.blk__time { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); width: 40px; flex: none; padding-top: 9px; }
.blk__body { flex: 1; min-width: 0; }
.blk--past { opacity: .72; }
.blk--now { margin: 4px -10px; padding: 10px; border-radius: 10px; border-top: 0; background: var(--now-bg); box-shadow: inset 0 0 0 1.5px var(--now); }
.blk--now + .blk { border-top: 0; }
.blk--now .blk__time { color: var(--now-ink); font-weight: 600; }
.blk__now { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 2px; }
.blk__badge { font-size: 11px; font-weight: 700; color: var(--now-ink); letter-spacing: .06em; text-transform: uppercase; }
.blk__until { font-size: 12px; color: var(--now-ink); }
.blk__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-height: 36px; }
.blk__title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.blk__meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.blk__loc { font-size: 12px; color: var(--muted); }
.blk__link { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; text-decoration: none; }
.blk__habits { display: flex; flex-direction: column; gap: 2px; }
.subtasks { margin: 2px 0 0 12px; padding-left: 12px; border-left: 2px solid var(--line); }
.routine-tag { color: var(--now-ink); }
@media (max-width: 1023px) {
  .card--agenda { background: transparent; border: 0; padding: 0; border-radius: 0; }
  .card--agenda .card__head { padding: 0 4px; }
  .timeline { gap: 10px; }
  .blk { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 0; border: 0; }
  .blk__time { width: auto; text-align: right; padding-top: 14px; }
  .blk__body { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; }
  .blk--past { opacity: 1; }
  .blk--past .blk__body { opacity: .72; }
  .blk--now { margin: 0; padding: 0; background: transparent; box-shadow: none; }
  .blk--now .blk__body { border: 2px solid var(--now); box-shadow: 0 0 0 4px rgb(47 111 237 / .15); }
  .blk__title { font-size: 15px; }
  .subtasks { margin-left: 14px; padding-left: 14px; }
}

/* Tareas desplegadas dentro de un bloque de la agenda (y "Otras tareas" al final) */
.blk-tasks { margin-top: 4px; border-top: 1px dashed var(--line); padding-top: 2px; }
.blk-tasks__sum { list-style: none; display: flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.blk-tasks__sum::-webkit-details-marker { display: none; }
.blk-tasks__sum svg { color: var(--muted); transition: transform .15s; }
.blk-tasks[open] > .blk-tasks__sum svg { transform: rotate(90deg); }
.blk-tasks__list { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; }
.blk-tasks__add { align-self: flex-start; margin-top: 4px; }
.blk-tasks .chk .tag { flex: none; }
.task-sub { display: block; margin-top: 1px; font-size: 11px; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.blk--loose .blk__title { color: var(--ink-2); }
@media (max-width: 1023px) { .blk-tasks__sum { min-height: 40px; font-size: 13px; } .task-sub { font-size: 12px; } }

/* Hábito de número (pasos, propuestas…): − / + y el número a mano */
.number { display: grid; gap: 8px; padding: 6px 0; }
.number__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.number__value { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.number__ctl { display: flex; align-items: center; gap: 6px; }
.number__ctl input { width: 120px; height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; background: var(--surface); color: var(--ink); }
@media (max-width: 1023px) { .number__ctl input { height: 36px; font-size: 15px; } }

/* Tablero de misión: metas en marcha con su portada y sus proyectos */
.board { display: flex; flex-direction: column; gap: 14px; }
.board__goal { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.board__hero { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: inherit; }
.board__hero .cover { width: 100%; height: 136px; }
/* Sin imagen, la inicial va arriba a la derecha para no taparse con el nombre */
.board__hero .cover--empty { place-items: start end; padding: 10px 16px; font-size: 34px; color: rgb(255 255 255 / .55); }
.board__title { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; padding: 32px 12px 10px; background: linear-gradient(transparent, rgb(0 0 0 / .66)); color: #fff; }
.board__name { display: flex; flex-direction: column; gap: 2px; font-weight: 700; font-size: 15px; line-height: 1.25; text-shadow: 0 1px 2px rgb(0 0 0 / .45); min-width: 0; overflow-wrap: anywhere; }
.board__sub { font-size: 12px; font-weight: 500; opacity: .85; }
.board__title .tag { flex: none; }
.board__projs { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 8px; }
.board__proj { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: var(--tap); padding: 4px; border: 0; border-radius: var(--radius-sm); background: none; text-align: left; color: inherit; cursor: pointer; }
.board__proj:hover, .board__hero:hover .cover { filter: brightness(1.04); }
.board__proj:hover { background: var(--surface-2); }
.board__proj .cover { width: 40px; height: 40px; border-radius: 8px; }
.board__proj-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.board__proj-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board__none { padding: 10px 12px 12px; }
@media (max-width: 1023px) { .board__hero .cover { height: 150px; } .board__proj-name { font-size: 14px; } }

/* Portadas (tablero y fichas): la imagen o, si no hay, el color del área con la inicial */
.cover { display: block; object-fit: cover; background: var(--surface-2); }
.cover--empty { display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--dark-2), var(--dark)); }
.cover--lg.cover--empty { font-size: 44px; }
.cover--sm.cover--empty { font-size: 16px; }
.cover--negocio { background: linear-gradient(135deg, var(--area-negocio), #173c8f); }
.cover--salud { background: linear-gradient(135deg, var(--area-salud), #0f5530); }
.cover--desarrollo { background: linear-gradient(135deg, var(--area-desarrollo), #3f2378); }
.cover--relaciones { background: linear-gradient(135deg, var(--area-relaciones), #7a2a08); }
.reader-cover { display: grid; gap: 8px; margin-bottom: 12px; }
.reader-cover .cover--lg { width: 100%; height: 180px; border-radius: var(--radius-sm); }
.cover-ctl, .reader__meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reader__goal { cursor: pointer; border: 0; font: inherit; }

/* Hábitos: anillo y listas */
.ring-row { display: flex; align-items: center; gap: 16px; margin: 4px 0 12px; }
.ring { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); }
.ring__in { width: 54px; height: 54px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.ring__pct { font-weight: 600; }
.habits-list { display: flex; flex-direction: column; gap: 2px; }
.habits-list:empty { display: none; }

/* Entreno de hoy */
.tr + .tr { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.tr__title { font-weight: 700; font-size: 17px; margin: 2px 0; }
.tr__actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }

/* Diario */
.journal { display: grid; gap: 12px; }
.choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice legend { font-size: 12px; color: var(--muted); margin-bottom: 6px; padding: 0; }
