
[hidden] { display: none !important; }

/* ---------- страница «Сейчас» ---------- */
.page-now { display: flex; flex-direction: column; min-height: 100%; padding: 4px 24px 12px; }
/* пока на экране квитанция («Сделал · Вернуть»), она не должна закрывать кнопки ответа: страница уступает ей место */
.page-now { transition: padding-bottom .25s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .page-now { transition: none; } }

/* блок дня: дата слева, «сделано N из M» справа, под ними тонкая полоска; нажатие открывает «План» на сегодня */
.day { flex: none; display: flex; flex-direction: column; gap: 8px; width: 100%; min-height: 44px; padding: 12px 16px 14px; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--shade) var(--shade-s), transparent); text-align: left; }
.day:active { background: var(--surface-2); }
.day-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.day-date { min-width: 0; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: break-word; }
.day-count { margin-left: auto; font-size: 14px; line-height: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.day-count b { font-weight: 600; color: var(--text); }
.day-quiet { margin-top: -6px; font-size: 14px; line-height: 18px; color: var(--muted); }
.day-bar { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: var(--line); }
.day-bar i { display: block; height: 100%; border-radius: 2px; background: var(--done); transition: width .3s var(--ease-out); }

/* стопка вопросов */
.stack { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; padding-block: 10px 0; }
.stack-in { position: relative; padding-bottom: 20px; }
.ghost { position: absolute; left: 0; right: 0; top: 0; bottom: 20px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); transform-origin: 50% 100%; pointer-events: none; }
.ghost.g1 { transform: translateY(10px) scale(.95); opacity: .85; }
.ghost.g2 { transform: translateY(20px) scale(.9); opacity: .5; }

.card { position: relative; z-index: 1; padding: 20px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-card); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.card.static { touch-action: auto; cursor: default; user-select: text; -webkit-user-select: text; }
.card.dragging { cursor: grabbing; }
.card.settle { transition: transform .55s var(--spring); }
.card.leaving { transition: transform .32s cubic-bezier(.45, 0, .7, .4), opacity .32s ease-in; pointer-events: none; }
.card.enter { animation: enter .42s var(--ease-out) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.card.is-urgent { box-shadow: inset 4px 0 0 var(--urgent), var(--shadow-card); animation: breathe 2.4s ease-in-out infinite; }
.card.is-urgent.enter { animation: enter .42s var(--ease-out) both, breathe 2.4s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: inset 4px 0 0 var(--urgent), 0 0 0 0 color-mix(in srgb, var(--urgent) 0%, transparent), var(--shadow-card); }
  50% { box-shadow: inset 4px 0 0 var(--urgent), 0 0 0 4px color-mix(in srgb, var(--urgent) 22%, transparent), var(--shadow-card); }
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.card-lead { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card-label { font-size: 14px; line-height: 18px; font-weight: 500; color: var(--muted); }
.tag-urgent { padding: 3px 10px; border-radius: 12px; background: color-mix(in srgb, var(--urgent) 14%, var(--surface)); color: color-mix(in srgb, var(--urgent) 80%, var(--text)); font-size: 13px; line-height: 16px; font-weight: 600; }
.card-title { margin-top: 12px; font-size: clamp(21px, 6vw, 25px); line-height: 1.25; font-weight: 600; letter-spacing: -.01em; overflow-wrap: break-word; }
.card-meta { margin-top: 12px; font-size: 15px; line-height: 20px; color: var(--muted); }
.stack-count { margin-top: 4px; text-align: center; font-size: 13px; line-height: 16px; color: var(--muted); }
.ring { display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 13px; line-height: 16px; font-weight: 600; color: color-mix(in srgb, var(--urgent) 80%, var(--text)); font-variant-numeric: tabular-nums; }
.ring svg { width: 24px; height: 24px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .r-bg { stroke: color-mix(in srgb, var(--urgent) 20%, transparent); }
.ring .r-fg { stroke: var(--urgent); stroke-linecap: round; }
/* шаги на карточке */
.card-steps { display: block; width: 100%; min-height: 44px; margin: 4px 0 -8px; padding: 8px 0; text-align: left; cursor: pointer; }
.cs-txt { display: block; font-size: 14px; line-height: 18px; color: var(--muted); overflow-wrap: break-word; }
.cs-txt b { font-weight: 600; color: var(--text); }
.cs-bar { display: block; height: 4px; margin-top: 8px; overflow: hidden; border-radius: 2px; background: color-mix(in srgb, var(--done) 18%, var(--surface)); }
.cs-bar i { display: block; height: 100%; border-radius: 2px; background: var(--done); transition: width .3s var(--ease-out); }
.card-hint { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: inherit; background: color-mix(in srgb, var(--hc, var(--accent)) 14%, var(--surface)); color: color-mix(in srgb, var(--hc, var(--accent)) 78%, var(--text)); font-size: 26px; line-height: 32px; font-weight: 700; opacity: 0; pointer-events: none; }
.card-hint .ico { width: 28px; height: 28px; }

/* ответы: сверху широкое «Сделал» (52 px), под ним ряд из трёх (48 px): «← Не актуально · ↓ Отложить · Делаю →».
   В ряду стрелка стоит над подписью: так «Не актуально» помещается в свою колонку (она чуть шире: 1.25fr 1fr 1fr) без обрезки;
   на очень узком экране подпись переносится, а кнопка вырастает по высоте */
.actions { display: grid; gap: 8px; flex: none; }
.cross { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
.actions.stick { position: sticky; bottom: 0; z-index: 4; padding: 4px 0 8px; background: var(--bg); }
.actions.stick::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 22px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.ans { --c: var(--accent); display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 4px 8px; border-radius: var(--r-btn); background: color-mix(in srgb, var(--c) 13%, var(--surface)); color: color-mix(in srgb, var(--c) 78%, var(--text)); font-size: 17px; line-height: 20px; font-weight: 600; text-align: center; transition: transform .12s, background .15s, box-shadow .15s; }
.ans:active { transform: scale(.98); }
.ans.is-hot { background: color-mix(in srgb, var(--c) 28%, var(--surface)); box-shadow: inset 0 0 0 2px var(--c); }
.ans-done { --c: var(--done); grid-column: 1 / -1; }
.ans-doing { --c: var(--doing); }
.ans-snooze { --c: var(--snooze); }
.ans-drop { --c: var(--drop); }
.ans-drop, .ans-snooze, .ans-doing { flex-direction: column; gap: 1px; min-height: 48px; padding: 4px 6px; font-size: 15px; line-height: 18px; }
.ans-doing { flex-direction: column-reverse; }
.ans-drop .ico, .ans-snooze .ico, .ans-doing .ico { width: 18px; height: 18px; }
.ans-one { grid-column: 1 / -1; background: var(--accent); color: var(--on-color); }
.ans-one:active { transform: scale(.98); }

/* «Дальше»: спокойный список под ответами, до четырёх строк */
.next { flex: none; margin-top: 12px; transition: opacity .2s; }
.next-h { padding: 0 4px 6px; font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.next-list { overflow: hidden; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--shade) var(--shade-s), transparent); }
.next-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 16px; text-align: left; }
.next-row + .next-row, .next-all { border-top: 1px solid var(--line); }
.next-row:active, .next-all:active { background: var(--surface-2); }
.next-lead { flex: none; width: 48px; font-size: 14px; line-height: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.next-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.next-t { font-size: 15px; line-height: 20px; overflow-wrap: break-word; }
.next-sub { display: block; font-size: 13px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.next-dot { display: block; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--doing); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--doing) 0%, transparent); opacity: .55; } }
.next-row.is-doing { align-items: flex-start; padding-block: 8px; }
.next-row.is-doing .sph-dot { margin-top: 6px; }
.next-all { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 16px; text-align: left; font-size: 15px; line-height: 20px; font-weight: 500; color: color-mix(in srgb, var(--accent) 75%, var(--text)); }
.next-all .ico { width: 16px; height: 16px; }
.next-empty { padding: 14px 16px; font-size: 15px; line-height: 20px; color: var(--muted); }

/* чисто: крупное слово и приглушённая строка; список «Дальше» идёт ниже, как всегда */
.clean { display: flex; flex-direction: column; gap: 6px; margin-block: auto; padding: 16px 8px; text-align: center; }
.clean h2 { font-size: 40px; line-height: 46px; font-weight: 600; letter-spacing: -.02em; }
.clean p { font-size: 17px; line-height: 22px; color: var(--muted); }

/* карточка поверх страницы (из «Плана», календаря, полоски) */
.overlay { position: absolute; left: 0; right: 0; top: calc(48px + env(safe-area-inset-top, 0px)); bottom: var(--dock-h); z-index: 30; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 0 24px 12px; opacity: 0; visibility: hidden; transform: translateY(24px); transition: opacity .25s, transform .4s var(--ease-out), visibility 0s .4s; }
.overlay.on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.ov-close { align-self: flex-end; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.ov-stack { position: relative; }
.overlay .stack-in { padding-bottom: 0; }
.overlay .stack { justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .card.settle { transition: none; }
  .card.leaving { transition: opacity .22s; }
  .card.enter, .card.is-urgent.enter { animation: fade .3s both; }
  .overlay, .overlay.on { transform: none; }
  .card.is-urgent, .card.is-urgent.enter { animation: none; box-shadow: inset 4px 0 0 var(--urgent), 0 0 0 3px color-mix(in srgb, var(--urgent) 18%, transparent), var(--shadow-card); }
  .next-dot { animation: none; }
  .cs-bar i, .day-bar i, .next { transition: none; }
}

/* низкий экран (SE) и невысокое окно «телефона» на компьютере: всё то же, но плотнее, чтобы страница «Сейчас» по возможности не прокручивалась */
@media (max-height: 700px), (min-width: 900px) and (max-height: 880px) {
  .page-now { padding-top: 0; padding-bottom: 4px; }
  .day { gap: 6px; padding-block: 8px 10px; }
  .stack { padding-block: 8px 0; }
  .stack-in { padding-bottom: 14px; }
  .ghost { bottom: 14px; }
  .ghost.g1 { transform: translateY(7px) scale(.95); }
  .ghost.g2 { transform: translateY(14px) scale(.9); }
  .card { padding: 16px 20px; }
  .stack-count { margin-top: 0; }
  .card-steps { padding-block: 6px; }
  .actions { gap: 6px; }
  .next { margin-top: 8px; }
  .next-h { padding-bottom: 4px; }
  .next-row { padding-block: 4px; }
  .next-row.is-doing { padding-block: 6px; }
  .clean h2 { font-size: 34px; line-height: 40px; }
}
