/* Protótipos /v2 (PLANNER-318). Só tokens de base.css; nada aqui afeta telas existentes. */
.v2-code { color: var(--accent); font-weight: 600; font-size: 0.78rem; text-decoration: none; }
.v2-dim { color: var(--dim); font-size: 0.75rem; }
.v2-count { color: var(--dim); font-weight: 400; }
.v2-note { margin: 1.2rem 0 1rem; color: var(--dim); font-size: 0.75rem; }
.v2-error { margin: 0 0 1rem; padding: 0.6rem 0.8rem; color: var(--danger); border: 1px solid var(--danger); border-radius: var(--radius-md); font-size: 0.8rem; }

.v2-chip { display: inline-flex; align-items: center; padding: 0.1rem 0.6rem; color: var(--dim); background: none; border: 1px solid var(--line); border-radius: var(--radius-pill); font: inherit; font-size: 0.72rem; text-decoration: none; white-space: nowrap; }
.v2-chip-btn { cursor: pointer; color: var(--txt); }
.v2-chip-accent { color: var(--accent); border-color: var(--accent); }
.v2-chip-today { color: var(--accent); }
.v2-chip-late { color: var(--late); }
.v2-chip-warn { color: var(--danger); border-color: var(--danger); }

.v2-index { list-style: none; display: grid; gap: 0.6rem; }
.v2-card { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.8rem 1rem; color: var(--txt); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; }
.v2-card:hover { border-color: var(--accent); }
.v2-card-t { font-weight: 600; }
.v2-card-d { color: var(--dim); font-size: 0.78rem; }

.v2-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.v2-task-title { font-family: var(--sans); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.4px; line-height: 1.25; margin-bottom: 0.7rem; }
.v2-task-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 1rem; }
.v2-pop { position: relative; padding: 0; }  /* base.css dá 0.5em a todo <details> */
.v2-pop > summary { list-style: none; cursor: pointer; }
.v2-pop > summary::-webkit-details-marker { display: none; }
.v2-sheet { position: absolute; z-index: 20; top: calc(100% + 0.3rem); left: 0; display: grid; gap: 0.3rem; min-width: 11rem; padding: 0.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 10px 30px oklch(0 0 0 / 0.45); }
.v2-sheet .btn { justify-content: flex-start; min-height: 44px; }
.v2-body { max-width: 72ch; margin-bottom: 1rem; overflow-wrap: anywhere; }

.v2-log { margin-bottom: 0.5rem; padding: 0.5rem 0.8rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); }
.v2-log > summary { display: flex; align-items: center; gap: 0.5rem; color: var(--dim); font-size: 0.75rem; cursor: pointer; }
.v2-log-body { max-width: 72ch; margin-top: 0.5rem; overflow-wrap: anywhere; font-size: 0.82rem; }
.v2-inline { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.v2-inline input { flex: 1; min-width: 0; }
.v2-sub, .v2-rows { list-style: none; }
.v2-sub a, .v2-rows a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; min-height: 40px; padding: 0.3rem 0; color: var(--txt); border-top: 1px solid var(--line); text-decoration: none; }

.v2-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 0.5rem; margin: 1.5rem 0 0; padding: 0.6rem 0; background: var(--bg); border-top: 1px solid var(--line); }
.v2-actions form:first-child { flex: 1; }
.v2-actions .btn { width: 100%; min-height: 44px; }

.v2-digest { margin-bottom: 1.5rem; padding: 0.8rem 1rem; background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius-lg); }
.v2-digest-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.v2-digest-sub { margin: 0.2rem 0 0.6rem; color: var(--dim); font-size: 0.75rem; }
.v2-digest .section-label { margin-top: 0.8rem; }

.v2-agenda { list-style: none; display: grid; gap: 0.5rem; margin-bottom: 1.2rem; }
.v2-agenda li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 0.6rem; align-items: start; }
.v2-time { padding-top: 0.3rem; color: var(--dim); font-size: 0.72rem; text-align: right; }
.v2-block { padding: 0.3rem 0.7rem; background: var(--panel); border: 1px solid var(--accent); border-left-width: 4px; border-radius: var(--radius-sm); font-size: 0.82rem; overflow-wrap: anywhere; }
.v2-dur { color: var(--dim); font-size: 0.72rem; }
.v2-loose { padding: 0.3rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.v2-raw { padding: 0; margin-top: 1.2rem; color: var(--dim); font-size: 0.75rem; }
.v2-raw pre { margin-top: 0.4rem; padding: 0.6rem; white-space: pre-wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); }

.v2-now { margin-bottom: 1.5rem; padding: 1.1rem; background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius-lg); }
.v2-now-title { margin: 0.6rem 0; font-family: var(--sans); font-size: 1.25rem; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.v2-now-why { margin-bottom: 1rem; color: var(--dim); font-size: 0.75rem; }
.v2-big { width: 100%; min-height: 48px; }
.v2-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
@media (min-width: 768px) {
    .v2-now, .v2-agora-queue { max-width: 640px; margin-inline: auto; }
    .v2-now-actions { display: flex; gap: 0.5rem; align-items: stretch; }
    .v2-now-actions > form:first-child { flex: 1; }
    .v2-now-actions .v2-two { display: contents; }
    .v2-now-actions .v2-big { width: auto; }
    .v2-now-actions > form:first-child .v2-big { width: 100%; }
}
.v2-travei { display: none; margin-top: 1rem; gap: 0.5rem; }
.v2-travei:target { display: grid; }
.v2-travei input { width: 100%; }

.v2-q { margin-bottom: 1.5rem; padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.v2-q-title { margin-bottom: 0.6rem; font-weight: 600; overflow-wrap: anywhere; }
.v2-answer { display: grid; gap: 0.5rem; margin-top: 0.8rem; }
.v2-answer textarea, .v2-answer input[type=text] { width: 100%; }
.v2-radios { display: grid; gap: 0.3rem; padding: 0; border: 0; }
.v2-radios label { display: flex; align-items: baseline; gap: 0.4rem; font-size: 0.8rem; }

.v2-task .empty-state, .v2-q .empty-state { padding: 0.4rem 0; }
.v2-nav-link { color: var(--accent); text-decoration: none; }

@media (max-width: 600px) {
    .v2-actions { bottom: calc(64px + env(safe-area-inset-bottom)); }
    /* Alvos de toque de ~44px: chips-botão, links soltos, rádios e botões de formulário. */
    a.v2-chip, .v2-chip-btn { min-height: 40px; }
    .v2-task-meta .v2-code, .v2-q .v2-code, .v2-now .v2-code, .v2-nav-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.3rem; }
    .v2-radios label { min-height: 44px; align-items: center; }
    .v2-radios input { width: 1.2rem; height: 1.2rem; }
    .v2-answer .btn { min-height: 44px; }
    .v2-row-t { flex-basis: 100%; }
}

/* ── Pendências, projeto e leituras (PLANNER-320) ── */
.v2-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.v2-filter { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 36px; padding: 0 0.8rem; color: var(--dim); border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: 0.78rem; text-decoration: none; }
.v2-filter.on { color: var(--txt); border-color: var(--txt); }
.v2-hint { color: var(--dim); font-weight: 400; text-transform: none; letter-spacing: 0; }
.v2-row-t { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.v2-subrows { margin: 0 0 0.3rem 1.4rem; }
.v2-subrows a { min-height: 34px; font-size: 0.82rem; color: var(--dim); }
.v2-add { margin: 0 0 1rem; padding: 0; }
.v2-add > summary { display: inline-flex; list-style: none; cursor: pointer; }
.v2-add > summary::-webkit-details-marker { display: none; }
.v2-add-form { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.v2-add-form input[type=text] { flex: 1 1 12rem; min-width: 0; }
.v2-prow { display: flex; align-items: baseline; gap: 0.4rem; border-top: 1px solid var(--line); }
.v2-prow > a { flex: 1; border-top: 0; }
.v2-prow .stmenu a { display: inline-flex; align-items: center; border-top: 0; min-height: 40px; padding: 0.3rem 0; }
.v2-group { margin: 0 0 0.6rem; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-md); }
.v2-group > summary { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.8rem; min-height: 44px; cursor: pointer; }
.v2-group > .v2-rows { padding: 0 0.8rem 0.4rem; }
.v2-search { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.v2-search input[type=search] { flex: 1; min-width: 0; }

.v2-book { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.v2-book-main { display: flex; align-items: center; gap: 0.8rem; flex: 1 1 14rem; min-width: 0; color: var(--txt); text-decoration: none; }
.v2-book-cover { flex: none; width: 48px; aspect-ratio: 2 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.v2-book-nocover { display: flex; align-items: center; justify-content: center; padding: 0.2rem; overflow: hidden; color: var(--dim); font-size: 0.55rem; text-align: center; }
.v2-book-info { display: flex; flex-direction: column; min-width: 0; }
.v2-book-t { font-weight: 600; overflow-wrap: anywhere; }
.v2-book-a, .v2-book-s { color: var(--dim); font-size: 0.75rem; }
.v2-book-acoes { display: flex; gap: 0.4rem; }
.v2-book-acoes .btn { min-height: 44px; }

/* Celular: vem por último para vencer as regras base acima (mesma especificidade). */
@media (max-width: 600px) {
    .v2-filter, .v2-add > summary { min-height: 40px; }
    .v2-add-form .btn, .v2-head-actions .btn { min-height: 44px; }
    .v2-rows + .section-label, .v2-group + .section-label, .v2-group + .v2-group { margin-top: 1.2rem; }
}

.v2-empty-links { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.2rem 0 0; font-size: 0.9em; }
.v2-actions .v2-more > summary.btn { width: auto; display: flex; align-items: center; padding: 0 1rem; }
.v2-actions .v2-more .v2-sheet { bottom: 100%; right: 0; left: auto; }
