:root {
    --bg: #f2f2fa;
    --surface: #ffffff;
    --text: #1e2433;
    --text-soft: #6b7280;
    --border: #e4e7ee;
    --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 4px 14px rgba(16, 24, 40, .06);
    --shadow-lift: 0 8px 16px rgba(16, 24, 40, .18), 0 20px 40px rgba(16, 24, 40, .16);
    --radius: 14px;
    --kb-1: #6366f1;
    --kb-2: #8b5cf6;
    --kb-3: #d946ef;
    --kb-grad: linear-gradient(135deg, var(--kb-1), var(--kb-2) 55%, var(--kb-3));
    --todo: #3b82f6;
    --todo-soft: #eaf1fe;
    --progress: #f59e0b;
    --progress-soft: #fdf3e2;
    --done: #10b981;
    --done-soft: #e6f8f1;
    --revision: #8b5cf6;
    --revision-soft: #f1ebfe;
    --cambios: #ef4444;
    --cambios-soft: #feeceb
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html,
body {
    height: 100%
}

body {
    touch-action: manipulation;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
    background: var(--bg);
    background-image: radial-gradient(at 12% 0%, #e2e0fb 0, transparent 50%), radial-gradient(at 90% 8%, #f4defa 0, transparent 45%);
    background-attachment: fixed;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom)
}

header {
    padding: 20px clamp(16px, 4vw, 40px) 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px
}

.brand .logo {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--kb-grad);
    display: grid;
    place-items: center;
    font-size: 24px;
    box-shadow: 0 4px 14px #8b5cf659
}

.brand h1 {
    font-size: clamp(20px, 2.6vw, 26px);
    font-weight: 800;
    letter-spacing: -.03em
}

.brand h1 .brain {
    background: var(--kb-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.brand p {
    font-size: 12.5px;
    color: var(--text-soft);
    margin-top: 2px
}

.modo-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    margin-left: 6px;
    white-space: nowrap
}

.modo-badge.local {
    color: var(--text-soft);
    background: #e9ebf2
}

.modo-badge.nube {
    color: #fff;
    background: var(--kb-grad);
    box-shadow: 0 2px 10px #8b5cf659
}

.modo-badge.offline {
    color: #fff;
    background: #64748b
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

#user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 6px 4px 4px;
    box-shadow: var(--shadow)
}

#user-chip[hidden] {
    display: none
}

#user-foto {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9ebf2;
    object-fit: cover
}

#user-foto[hidden] {
    display: none
}

#user-inicial {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--kb-grad);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: grid;
    place-items: center;
    flex: none
}

#user-inicial[hidden] {
    display: none
}

#user-nombre {
    font-size: 12.5px;
    font-weight: 600;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

#btn-salir {
    border: 0;
    background: #f1f3f8;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .13s ease;
    -webkit-tap-highlight-color: transparent
}

#btn-salir:hover {
    background: var(--cambios-soft);
    color: var(--cambios)
}

#login-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: var(--bg);
    background-image: radial-gradient(at 12% 0%, #e2e0fb 0, transparent 50%), radial-gradient(at 90% 8%, #f4defa 0, transparent 45%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px
}

#login-overlay[hidden] {
    display: none
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-lift);
    padding: 40px 34px 34px;
    width: min(360px, 100%);
    text-align: center;
    animation: pop-in .25s ease
}

.login-logo {
    width: 74px;
    height: 74px;
    margin: 0 auto 14px;
    border-radius: 22px;
    background: var(--kb-grad);
    display: grid;
    place-items: center;
    font-size: 40px;
    box-shadow: 0 8px 24px #8b5cf666
}

.login-card h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.03em
}

.login-card h2 .brain {
    background: var(--kb-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.login-card p {
    font-size: 13.5px;
    color: var(--text-soft);
    margin: 6px 0 24px;
    line-height: 1.5
}

#btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all .15s ease;
    -webkit-tap-highlight-color: transparent
}

#btn-google:hover {
    border-color: #c9cedb;
    box-shadow: var(--shadow);
    transform: translateY(-1px)
}

#btn-google:active {
    transform: none
}

#btn-google:disabled {
    opacity: .6;
    cursor: default
}

#btn-apple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: #fff;
    background: #000;
    border: 1.5px solid #000;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all .15s ease;
    -webkit-tap-highlight-color: transparent
}

#btn-apple:hover {
    background: #1c1c1e;
    box-shadow: var(--shadow);
    transform: translateY(-1px)
}

#btn-apple:active {
    transform: none
}

#btn-apple:disabled {
    opacity: .6;
    cursor: default
}

#btn-nueva {
    border: 0;
    background: var(--kb-grad);
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    padding: 11px 20px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 14px #8b5cf666;
    transition: transform .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent
}

#btn-nueva:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px #8b5cf680
}

#btn-nueva:active {
    transform: translateY(0) scale(.97)
}

.board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 22px);
    padding: 14px clamp(16px, 4vw, 40px) 32px;
    align-items: start;
    max-width: 1280px;
    margin: 0 auto
}

.column {
    background: #ffffffa6;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    min-height: 220px;
    transition: outline-color .15s ease, background .15s ease;
    outline: 2px dashed transparent;
    outline-offset: -2px
}

.column.drop-target {
    outline-color: currentColor
}

.column[data-col=todo] {
    color: var(--todo)
}

.column[data-col=progress] {
    color: var(--progress)
}

.column[data-col=done] {
    color: var(--done)
}

.column.drop-target[data-col=todo] {
    background: var(--todo-soft)
}

.column.drop-target[data-col=progress] {
    background: var(--progress-soft)
}

.column.drop-target[data-col=done] {
    background: var(--done-soft)
}

.col-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 10px
}

.col-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    flex: none
}

.col-head h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.01em
}

.col-count {
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 700;
    color: currentColor;
    background: color-mix(in srgb, currentColor 12%, transparent);
    border-radius: 999px;
    min-width: 26px;
    text-align: center;
    padding: 3px 8px
}

.col-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 12px 14px;
    min-height: 90px
}

.empty-msg {
    color: var(--text-soft);
    font-size: 13px;
    text-align: center;
    padding: 26px 10px;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    -webkit-user-select: none;
    user-select: none
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 12px 13px 11px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    transition: box-shadow .15s ease, opacity .15s ease;
    animation: pop-in .22s ease
}

@keyframes pop-in {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(.97)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.card.dragging-origin {
    opacity: .35
}

.card .titulo {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    word-wrap: break-word;
    padding-right: 88px
}

.card .labels {
    margin-right: 84px
}

.card .desc {
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 4px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap
}

.labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px
}

.labels:empty {
    display: none
}

.chip {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 3px 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px
}

.chip.revision {
    color: var(--revision);
    background: var(--revision-soft)
}

.chip.cambios {
    color: var(--cambios);
    background: var(--cambios-soft)
}

.meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px
}

.fecha {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 3px 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid transparent
}

.fecha.f-hoy {
    color: #047857;
    background: #e6f8f1
}

.fecha.f-1 {
    color: #a16207;
    background: #fef7dd
}

.fecha.f-2 {
    color: #c2571b;
    background: #fdeede
}

.fecha.f-vieja {
    color: #fff;
    background: var(--cambios);
    box-shadow: 0 2px 8px #ef444459;
    animation: pulso 1.6s ease-in-out infinite
}

.fecha.f-neutra {
    color: var(--text-soft);
    background: #eef0f5
}

@keyframes pulso {

    0%,
    to {
        transform: scale(1)
    }

    50% {
        transform: scale(1.05)
    }
}

.motivo {
    margin-top: 8px;
    font-size: 12px;
    color: #b91c1c;
    background: var(--cambios-soft);
    border-left: 3px solid var(--cambios);
    border-radius: 6px;
    padding: 7px 9px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap
}

.motivo b {
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 2px
}

.label-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap
}

.label-actions button {
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 999px;
    padding: 4px 10px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text-soft);
    cursor: pointer;
    transition: all .13s ease;
    -webkit-tap-highlight-color: transparent
}

.label-actions button.on.b-revision {
    border-color: var(--revision);
    background: var(--revision-soft);
    color: var(--revision)
}

.label-actions button.on.b-cambios {
    border-color: var(--cambios);
    background: var(--cambios-soft);
    color: var(--cambios)
}

.label-actions button:not(.on):hover {
    border-color: #c9cedb;
    color: var(--text)
}

.card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 2px
}

.card-menu button {
    border: 0;
    background: transparent;
    color: #a2a8b8;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    display: grid;
    place-items: center;
    transition: all .12s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative
}

.card-menu button:hover {
    background: #f1f3f8;
    color: var(--text)
}

.card-menu .del:hover {
    background: var(--cambios-soft);
    color: var(--cambios)
}

.card-menu .draw {
    font-size: 12px
}

.card-menu .draw.has-draw:after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--kb-2);
    border: 1.5px solid var(--surface)
}

.done .card .titulo {
    text-decoration: line-through;
    text-decoration-color: #b6c9c0;
    color: #7e8a92
}

#ghost {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    box-shadow: var(--shadow-lift);
    transform: rotate(3deg) scale(1.03);
    opacity: .95;
    cursor: grabbing
}

#pizarra-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: var(--surface);
    display: none;
    flex-direction: column
}

#pizarra-overlay.open {
    display: flex
}

#pizarra-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    padding-top: max(9px, env(safe-area-inset-top));
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex: none
}

#btn-cerrar-pizarra {
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .13s ease;
    flex: none;
    -webkit-tap-highlight-color: transparent
}

#btn-cerrar-pizarra:hover {
    border-color: #c9cedb;
    background: #f7f8fb
}

#pizarra-top .titulo-dibujo {
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0
}

#pizarra-top .hint-guardado {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-soft);
    flex: none
}

#pizarra-frame {
    flex: 1;
    border: 0;
    width: 100%;
    background: #fff
}

#pizarra-overlay {
    padding-bottom: env(safe-area-inset-bottom)
}

dialog {
    margin: auto;
    border: 0;
    border-radius: 16px;
    box-shadow: var(--shadow-lift);
    padding: 0;
    width: min(430px, calc(100vw - 32px));
    background: var(--surface);
    color: var(--text)
}

dialog::backdrop {
    background: #151b2873;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px)
}

.modal-inner {
    padding: 22px 22px 18px
}

.modal-inner h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    gap: 8px
}

.modal-inner p.sub {
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 4px;
    line-height: 1.45
}

.modal-inner p.sub .txt-cambios {
    color: var(--cambios)
}

.modal-inner label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-soft);
    margin: 14px 0 5px
}

.modal-inner input[type=text],
.modal-inner textarea {
    width: 100%;
    font: inherit;
    font-size: 14px;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color .13s ease, box-shadow .13s ease;
    background: #fafbfd
}

.modal-inner input:focus,
.modal-inner textarea:focus {
    border-color: var(--kb-1);
    box-shadow: 0 0 0 3px #6366f126;
    background: #fff
}

.modal-inner textarea {
    resize: vertical;
    min-height: 86px
}

.modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px
}

.modal-btns button {
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 10px;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text-soft);
    transition: all .13s ease;
    -webkit-tap-highlight-color: transparent
}

.modal-btns button:hover {
    border-color: #c9cedb;
    color: var(--text)
}

.modal-btns .primary {
    border: 0;
    background: var(--kb-grad);
    color: #fff
}

.modal-btns .primary:hover {
    filter: brightness(1.07);
    color: #fff
}

.modal-btns .danger {
    border: 0;
    background: var(--cambios);
    color: #fff
}

.modal-btns .danger:hover {
    filter: brightness(1.07);
    color: #fff
}

#dlg-motivo .modal-inner h3 {
    color: var(--cambios)
}

#toast {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom));
    transform: translate(-50%) translateY(80px);
    background: #1e2433;
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    padding: 11px 20px;
    border-radius: 999px;
    box-shadow: var(--shadow-lift);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
    z-index: 1100;
    pointer-events: none;
    max-width: calc(100vw - 40px);
    text-align: center
}

#toast.show {
    transform: translate(-50%) translateY(0);
    opacity: 1
}

.acciones-rapidas {
    display: none;
    gap: 8px;
    margin-top: 11px
}

.acciones-rapidas button {
    flex: 1;
    border: 0;
    border-radius: 11px;
    padding: 11px 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .1s ease
}

.acciones-rapidas button:active {
    transform: scale(.96)
}

.ar-empezar {
    background: var(--progress-soft);
    color: #b45309
}

.ar-terminar {
    background: var(--done-soft);
    color: #047857
}

.ar-regresar {
    background: var(--cambios-soft);
    color: var(--cambios);
    flex: 0 0 auto;
    padding: 11px 14px
}

.ar-reabrir {
    background: var(--progress-soft);
    color: #b45309
}

#nav-cols,
#fab-nueva {
    display: none
}

@media(max-width:860px) {
    header {
        padding: 12px 16px 6px
    }

    .brand .logo {
        width: 38px;
        height: 38px;
        font-size: 20px;
        border-radius: 11px
    }

    .brand p,
    .modo-badge .txt {
        display: none
    }

    .modo-badge {
        margin-left: 2px
    }

    #user-nombre,
    #btn-nueva {
        display: none
    }

    .board {
        display: block;
        padding: 10px 14px calc(110px + env(safe-area-inset-bottom))
    }

    .column {
        display: none;
        min-height: 0
    }

    .column.activa {
        display: flex;
        animation: col-in .16s ease
    }

    @keyframes col-in {
        0% {
            opacity: .4;
            transform: translate(14px)
        }

        to {
            opacity: 1;
            transform: none
        }
    }

    .acciones-rapidas {
        display: flex
    }

    #nav-cols {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        gap: 4px;
        background: #ffffffeb;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--border);
        padding: 7px 10px calc(7px + env(safe-area-inset-bottom))
    }

    .nav-tab {
        flex: 1;
        border: 0;
        background: transparent;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        font: inherit;
        font-size: 11px;
        font-weight: 700;
        color: var(--text-soft);
        padding: 7px 2px 6px;
        cursor: pointer;
        position: relative;
        -webkit-tap-highlight-color: transparent;
        transition: background .15s ease, color .15s ease
    }

    .nav-tab .nav-dot {
        width: 9px;
        height: 9px;
        border-radius: 50%
    }

    .nav-tab[data-col=todo] .nav-dot {
        background: var(--todo)
    }

    .nav-tab[data-col=progress] .nav-dot {
        background: var(--progress)
    }

    .nav-tab[data-col=done] .nav-dot {
        background: var(--done)
    }

    .nav-tab.activa {
        background: #eef0fb;
        color: var(--text)
    }

    .nav-tab .nav-count {
        position: absolute;
        top: 2px;
        right: calc(50% - 26px);
        font-size: 10px;
        font-weight: 800;
        background: var(--kb-2);
        color: #fff;
        border-radius: 999px;
        min-width: 17px;
        padding: 1.5px 5px
    }

    .nav-tab .nav-count:empty,
    .nav-tab .nav-count[data-cero] {
        display: none
    }

    .nav-tab.drop-tab {
        background: var(--kb-grad);
        color: #fff;
        transform: scale(1.05)
    }

    .nav-tab.drop-tab .nav-dot {
        background: #fff
    }

    #fab-nueva {
        display: grid;
        place-items: center;
        position: fixed;
        right: 16px;
        bottom: calc(86px + env(safe-area-inset-bottom));
        width: 58px;
        height: 58px;
        border-radius: 50%;
        border: 0;
        background: var(--kb-grad);
        color: #fff;
        font-size: 32px;
        line-height: 1;
        padding-bottom: 4px;
        box-shadow: 0 8px 22px #8b5cf680;
        cursor: pointer;
        z-index: 901;
        -webkit-tap-highlight-color: transparent;
        transition: transform .12s ease
    }

    #fab-nueva:active {
        transform: scale(.92)
    }

    #toast {
        bottom: calc(96px + env(safe-area-inset-bottom))
    }

    .modal-inner input[type=text],
    .modal-inner textarea {
        font-size: 16px
    }

    dialog {
        margin: auto 0 0;
        width: 100vw;
        max-width: 100vw;
        border-radius: 20px 20px 0 0
    }

    .modal-inner {
        padding: 22px 20px calc(18px + env(safe-area-inset-bottom))
    }

    .modal-btns button {
        padding: 12px 20px
    }
}
/* ══════════════ Formato en la descripción (toolbar del modal) ══════════════ */

.label-fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 14px 0 7px
}

.label-fila label {
    margin: 0
}

#desc-toolbar {
    display: flex;
    gap: 4px
}

#desc-toolbar button {
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    width: 28px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-soft);
    cursor: pointer;
    transition: all .13s ease;
    -webkit-tap-highlight-color: transparent
}

#desc-toolbar button:hover {
    border-color: var(--kb-1);
    color: var(--kb-1);
    background: #f4f3ff
}

/* ══════════════ Descripción formateada en la tarjeta ══════════════ */

.card .desc {
    white-space: normal
}

.desc-linea {
    min-height: 1.4em
}

.desc-item {
    display: flex;
    align-items: baseline;
    gap: 6px
}

.desc-num,
.desc-punto {
    flex: none;
    font-weight: 700;
    color: var(--kb-1)
}

.desc-check {
    flex: none;
    width: 15px;
    height: 15px;
    align-self: center;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: all .13s ease;
    -webkit-tap-highlight-color: transparent
}

.desc-check:hover {
    border-color: var(--done)
}

.desc-item.hecha .desc-check {
    border-color: var(--done);
    background: var(--done)
}

.desc-item.hecha {
    color: var(--text-soft);
    text-decoration: line-through;
    text-decoration-color: #b9bec9
}

/* ══════════════ Modal de tareas terminadas ══════════════ */

/* El contador de Done invita al clic */
.column.done .col-count {
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease
}

.column.done .col-count:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 3px var(--done-soft)
}

#dlg-done .modal-inner h3 {
    color: var(--done)
}

.modal-inner input[type=date] {
    width: 100%;
    font: inherit;
    font-size: 14px;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: #fafbfd;
    transition: border-color .13s ease, box-shadow .13s ease
}

.modal-inner input[type=date]:focus {
    border-color: var(--kb-1);
    box-shadow: 0 0 0 3px #6366f126;
    background: #fff
}

.modal-btns button:disabled {
    opacity: .45;
    cursor: not-allowed
}

/* Primer clic en Eliminar: el botón pide confirmación */
#btn-done-borrar.confirmando {
    animation: latido .5s ease
}

@keyframes latido {
    0% { transform: scale(1) }
    35% { transform: scale(1.06) }
    to { transform: scale(1) }
}
