@font-face { font-family: 'Funnel Display'; font-weight: 700 800; font-display: swap; src: url(/fuentes/display-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4; }
@font-face { font-family: 'Funnel Display'; font-weight: 700 800; font-display: swap; src: url(/fuentes/display.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Funnel Sans'; font-weight: 400 600; font-display: swap; src: url(/fuentes/sans-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4; }
@font-face { font-family: 'Funnel Sans'; font-weight: 400 600; font-display: swap; src: url(/fuentes/sans.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root { --negro: #000; --blanco: #fff; --gris: #7A7A7A; --borde: #E2E2E2; --rojo: #C4161C; color-scheme: light; }
* { box-sizing: border-box; margin: 0; }
html { background: #fff; -webkit-text-size-adjust: 100%; }
body { background: #fff; color: #000; font: 400 15px/1.35 'Funnel Sans', sans-serif; padding: 40px max(40px, env(safe-area-inset-right)) 96px max(40px, env(safe-area-inset-left)); }
h1, h2 { font-family: 'Funnel Display', sans-serif; }
h1 { font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.05em; }
button, input { font: inherit; color: inherit; border-radius: 0; -webkit-appearance: none; appearance: none; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
b { font-weight: 600; }
.rojo { color: var(--rojo); }

header { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 32px; }
#linea { color: var(--gris); margin-top: 10px; min-height: 1.35em; }
#linea .rojo { font-weight: 500; }
#apuntar { display: flex; width: min(380px, 45%); flex: none; }
#apuntar input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid #000; background: #fff; }
#apuntar input::placeholder, .acceso input::placeholder { color: var(--gris); opacity: 1; }
#apuntar button { display: none; }
svg { fill: none; stroke: currentColor; stroke-width: 2; }

#tablero { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(212px, 100%), 1fr)); gap: 16px; align-items: start; }
.col { background: #fff; border: 1px solid var(--borde); border-radius: 6px; padding: 14px; min-width: 0; }
.col .cab { display: flex; width: 100%; align-items: baseline; gap: 10px; text-align: left; }
.col h2 { font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; flex: 1; }
.num, .vacio { color: var(--gris); }
.col .cab .atr { color: var(--rojo); display: none; }
.lista { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 8px; }
.vacio { margin-top: 12px; }

.tarea { background: #fff; border: 1px solid var(--borde); border-radius: 4px; display: flex; min-width: 0; transition: opacity .2s; }
.tarea > button { flex: none; width: 42px; padding-top: 13px; display: flex; justify-content: center; align-items: flex-start; align-self: stretch; }
.tarea > button i { width: 16px; height: 16px; border: 1.5px solid #000; display: block; }
.tarea > button svg { display: none; width: 13px; height: 13px; stroke: #fff; }
.tarea > div { flex: 1; min-width: 0; padding: 11px 12px 11px 0; overflow-wrap: anywhere; }
.tarea .t { font-weight: 500; }
.tarea .d { color: var(--gris); font-size: 13.5px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tarea .d b { color: #000; }
.tarea.atrasada { border-color: var(--rojo); }
.tarea.atrasada > button i { border-color: var(--rojo); }
.tarea.hecha { opacity: .45; }
.tarea.hecha > button i { background: #000; }
.tarea.hecha > button svg { display: block; }
.tarea.hecha .t { text-decoration: line-through; }

#hoy { --rojo: #FF5A55; background: #000; border-color: #000; color: #fff; }
#hoy .tarea { background: #1A1A1A; border-color: #1A1A1A; }
#hoy .tarea > button i { border-color: #fff; }
#hoy .tarea.atrasada, #hoy .tarea.atrasada > button i { border-color: var(--rojo); }
#hoy .num, #hoy .d, #hoy .vacio { color: #E2E2E2; }
#hoy .d b { color: #fff; }
#hoy .d .rojo { color: var(--rojo); }
#hoy .tarea.hecha > button i { background: #fff; }
#hoy .tarea svg { stroke: #000; }

#aviso { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #000; color: #fff; border-radius: 4px; display: none; align-items: center; z-index: 2; }
#aviso.ver { display: flex; }
#aviso span { padding: 12px 8px 12px 16px; white-space: nowrap; }
#aviso button { padding: 12px 16px 12px 8px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.acceso { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.acceso main { width: 100%; max-width: 320px; }
.acceso form { display: grid; gap: 10px; margin-top: 24px; }
.acceso input[type=password] { height: 48px; padding: 0 14px; border: 1px solid #000; background: #fff; font-size: 16px; width: 100%; }
.acceso button { height: 48px; background: #000; color: #fff; font-weight: 600; }
.acceso p { color: var(--rojo); }

@media (max-width: 700px) {
  body { padding: calc(20px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); }
  body.acceso { padding: 24px; }
  header { display: block; margin-bottom: 20px; }
  h1 { font-size: 52px; }
  #tablero { gap: 10px; }
  .col .cab { min-height: 24px; }
  .col:not(#hoy) { padding: 0; }
  .col:not(#hoy) .cab { padding: 15px 14px; }
  .col:not(#hoy) .lista, .col:not(#hoy) .vacio { margin: 0 14px 14px; }
  .col:not(#hoy):not(.abierta) .lista, .col:not(#hoy):not(.abierta) .vacio { display: none; }
  .col .cab .atr { display: inline; }
  #apuntar { position: fixed; left: 0; right: 0; bottom: 0; width: auto; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; z-index: 1; }
  #apuntar input { height: 48px; font-size: 16px; border-right: 0; }
  #apuntar button { display: grid; place-items: center; width: 48px; height: 48px; background: #000; color: #fff; flex: none; }
  #aviso { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (min-width: 701px) { .col .cab { cursor: default; } }
@media (prefers-reduced-motion: reduce) { .tarea { transition: none; } }
