/* Lime Planner — экран приложения. Токены общие с лендингом (tokens.css). */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Цветная подложка под стеклом: без неё backdrop-filter размывает ровный крем
   и панель выглядит серой. Слой неподвижен, поэтому скролл ленты его не тащит. */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -1;
  pointer-events: none;
  background: var(--mesh-bg);
}

h1, h2 { margin: 0 0 .5em; font-family: var(--font-head); line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
p { margin: 0 0 .8em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
/* Без этого правила ссылка берёт цвет браузера: в шапке «Lime» стояло ссылочным
   синим, а «Planner» акцентом — словоmark выглядел как две разные надписи. */
a { color: inherit; text-decoration: none; }

/* Реквизиты владельца в подвале: 13px, не меньше 12px — требование к доступности. */
footer.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 20px 44px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

footer.legal p { margin: 0 0 6px; }
footer.legal p:last-child { margin-bottom: 0; }
footer.legal a { color: var(--lime-ink); text-decoration: underline; text-underline-offset: 3px; }


.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* --- шапка --- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--glass-brd);
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--glass-face);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}

/* Safari без backdrop-filter: шапка обязана остаться читаемой, поэтому плотный фон. */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .top { background: rgba(246, 245, 244, .94); }
}

/* Преломление фона (SVG-фильтр из гайда) включаем там, где под стеклом реально едет
   контент — иначе фильтр не видно, а платится за него растеризация. Фильтр умеет только
   непременованный backdrop-filter, поэтому базовое размытие остаётся как есть, а эта
   надстройка включается только при поддержке url() в backdrop-filter. Фильтр сам
   заканчивается размытием (feGaussianBlur), поэтому отдаёт и мороз стекла. */
@supports (backdrop-filter: url("#lg-refract")) {
  .top {
    backdrop-filter: url(#lg-refract) saturate(var(--glass-sat));
  }
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--lens-face), var(--lime-cta);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  box-shadow: var(--glass-gloss);
}
.brand__text { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; }
/* Словоmark состоит из двух span: без отступа Montserrat склеивает «LimePlanner» —
   на лендинге отступ есть, здесь его не было. */
.brand__text span { color: var(--lime-ink); margin-left: 3px; }

.link {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 6px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link:disabled { opacity: .5; cursor: default; text-decoration: none; }

.top__right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who {
  color: var(--muted);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}
@media (max-width: 559px) {
  .who { display: none; }

  /* Дата и «Прошлые» — одна строка, шаги пути — своей строкой под ними. */
  .ritual__head .hand { order: 1; flex: 1 1 auto; margin: 0; }
  .ritual__head > .btn { order: 2; }
  .steps { order: 3; flex: 1 1 100%; }
}

/* Акцентные подписи шага («вторник, 29 сентября», «вход», «код из письма»). */
.hand,
.game__hand {
  font-family: var(--font-accent);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}

/* --- каркас --- */
.main {
  flex: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.muted { color: var(--muted); }
.error { color: var(--red); }
.hand {
  font-size: 26px;
  color: var(--lime-ink);
  margin: 0 0 4px;
}

.centered {
  max-width: 420px;
  margin: 8vh auto 0;
  text-align: center;
}
.centered .stack { align-items: stretch; }

.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* На узком экране поле и кнопка не влезают в одну строку: переносим кнопку под поле
   (иначе min-content строки шире вьюпорта и вся страница едет вбок). */
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row .input { flex: 1 1 100%; }
.row .btn { flex: 1 1 auto; }

@media (min-width: 560px) {
  .row { flex-wrap: nowrap; }
  .row .input { flex: 1 1 auto; }
  .row .btn { flex: 0 0 auto; }
}

/* Разделы приложения живут в шапке и видны всегда: проекты нельзя прятать в текстовую
   ссылку рядом с «Выйти» — пользователь их просто не найдёт. Это не вкладки ритуала
   (те внутри дня), поэтому и место, и вид другие. */
.sections {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.sections__tab {
  padding: 9px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: var(--glass-face-soft);
  box-shadow: var(--glass-gloss);
  -webkit-backdrop-filter: blur(10px) saturate(var(--glass-sat));
  backdrop-filter: blur(10px) saturate(var(--glass-sat));
  cursor: pointer;
}
.sections__tab:hover { background: var(--glass-face); color: var(--ink); }
.sections__tab--on {
  color: var(--cream);
  background: var(--lens-face-dark), linear-gradient(140deg, var(--ink-soft), var(--ink));
  border-color: var(--ink);
  box-shadow: 0 8px 20px rgba(30, 30, 30, .18), inset 0 1px 0 rgba(255, 255, 255, .16);
}

/* --- поля и кнопки --- */
.input {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
  font: inherit;
  color: var(--ink);
  background: var(--glass-face-strong);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  box-shadow: var(--glass-gloss);
}
.input:focus-visible { outline: 2px solid var(--lime-ink); outline-offset: 1px; }

/* Код из письма: крупные разнесённые цифры, чтобы читалось с телефона. */
.input--code {
  text-align: center;
  font-size: 26px;
  letter-spacing: .35em;
  font-variant-numeric: tabular-nums;
  padding: 14px 15px 14px 25px;
}

.small { font-size: 15px; }

.btn {
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--lens-face-dark), linear-gradient(140deg, var(--ink-soft), var(--ink));
  color: var(--cream);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(30, 30, 30, .18), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn:hover:not(:disabled) { box-shadow: 0 14px 30px rgba(30, 30, 30, .24), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn:disabled { opacity: .45; cursor: default; }
.btn--ghost {
  background: var(--glass-face-soft);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--glass-line), var(--glass-gloss);
  -webkit-backdrop-filter: blur(10px) saturate(var(--glass-sat));
  backdrop-filter: blur(10px) saturate(var(--glass-sat));
}
.btn--ghost:hover:not(:disabled) { background: var(--glass-face); }

/* Главное действие шага: в разметке кнопки уже помечены `btn--primary`, но стиля под это
   в приложении не было — все кнопки ехали чернильными. Акцент лаймом, текст чернилами. */
.btn--primary {
  background: var(--lens-face), var(--lime-cta);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(199, 250, 11, .38), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 16px 34px rgba(199, 250, 11, .48), inset 0 1px 0 rgba(255, 255, 255, .5); }

/* --- панели --- */

.panel {
  background: var(--glass-face);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), var(--glass-gloss);
  padding: 20px;
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}
/* Главная задача — плотная тёмная плашка (--ink, тот же чёрный, что у кнопок и текста).
   Стекло на просвет давало мутно-оливковый фон, потому что размывало лаймовые панели под ним;
   блюр здесь больше не нужен — фон непрозрачный. */
.panel--hl {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--glass-dark-brd);
  box-shadow: var(--glass-shadow), var(--glass-dark-gloss);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.panel--hl h2 { color: var(--cream); }
.panel--hl .muted { color: rgba(246, 245, 244, .62); }
.panel--hl .empty { color: rgba(246, 245, 244, .62); }

.hl__title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
.panel--hl .btn--ghost { color: var(--cream); box-shadow: inset 0 0 0 1px rgba(246, 245, 244, .3); }
.panel--hl .btn--ghost:hover { background: rgba(246, 245, 244, .1); }

/* Главных дел может быть несколько: список читается сверху вниз, у каждого — «снять». */
.hl__list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.hl__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(246, 245, 244, .18);
  border-radius: var(--radius-sm);
}
.hl__item .hl__title { flex: 1; min-width: 0; margin: 0; font-size: 18px; }

/* Подсказка модели в тёмной панели: подпись мелким капсом, текст как у ставки. */
.suggest {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(246, 245, 244, .18);
}
.suggest__label {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lime);
}
.suggest__text {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* --- лента записей --- */
.ritual { display: flex; flex-direction: column; gap: 18px; }
.step { display: flex; flex-direction: column; gap: 18px; }

.ritual__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.ritual__head .hand { margin: 0; flex: 1 1 auto; }

/* Переключатель шагов пути: четыре шага плюс «Прошлые» отдельным действием.
   Пилюли переносятся строками, а не уезжают за экран: на 390px четыре шага в одну
   строку не влезают, а спрятанный за край шаг — потерянный шаг. */
.steps { display: flex; flex-wrap: wrap; gap: 6px; }
.steps__tab {
  padding: 7px 14px;
  white-space: nowrap;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: var(--glass-face-soft);
  color: var(--muted);
  -webkit-backdrop-filter: blur(10px) saturate(var(--glass-sat));
  backdrop-filter: blur(10px) saturate(var(--glass-sat));
}
.steps__tab--on { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* Статус обработки записи: распознаю речь / разбираю на дела. */
.entry__status { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* Навигация по этапам ритуала — внизу шага, а не только вкладками сверху. */
.wizard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.wizard .btn--block { flex: 1 1 220px; display: block; }

/* Поле ввода стоит под лентой, поэтому отделяем его от записей линией. */
.dump { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.dump__area {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  padding: 14px 15px;
  font: inherit;
  line-height: 1.5;
  color: var(--ink);
  background: var(--glass-face-strong);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  box-shadow: var(--glass-gloss);
}
.dump__area:focus-visible { outline: 2px solid var(--lime-ink); outline-offset: 1px; }

.dump__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.dump__interim {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--muted);
  font-style: italic;
}
.dump__rec {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.2s ease-in-out infinite;
  flex: none;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }

.btn--rec { color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.btn--sm { padding: 9px 14px; font-size: 15px; }

.feed__title { margin: 4px 0 0; font-size: 17px; color: var(--muted); font-weight: 600; }
.feed { position: relative; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

/* Исчезновение строки и подъём соседей: строка гаснет и уезжает, остальные плавно поднимаются. */
.entries-move, .entries-enter-active, .entries-leave-active { transition: transform .22s ease, opacity .22s ease; }
.entries-leave-active { position: absolute; left: 0; right: 0; z-index: 0; }
.entries-leave-to { opacity: 0; transform: translateY(-12px) scale(.96); }
.entries-enter-from { opacity: 0; transform: translateY(8px); }
.feed--tight { margin-top: 6px; }

/* Строки ленты — не стекло: под строкой лежит красная подложка удаления, и полупрозрачный
   фон проявил бы её розовым. Плотная поверхность + блик сверху дают тот же вид без риска. */
.entry {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--cream-2);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-gloss);
}
.entry__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.entry__sprint { width: auto; max-width: 180px; padding: 4px 6px; font-size: 14px; }
.entry__del { margin-left: auto; color: var(--red); }
.entry__cal { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.entry__cal .input { width: auto; padding: 4px 6px; font-size: 14px; }
.entry--past { background: #fff; border: 1px solid var(--glass-line); }

/* Строка со свайпом: карточка переезжает внутрь обёртки, иначе красная подложка удаления
   просвечивает в отступах и выглядит как красная рамка вокруг каждой записи. */
.swipe.entry { padding: 0; background: none; border: 0; box-shadow: none; }

.entry__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.entry__time { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.entry__tag { font-size: 14px; }
.entry__gap { flex: 1; }

.entry__text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.entry__audio {
  display: block;
  width: 100%;
  max-width: 420px;
  margin-top: 8px;
  height: 36px;
}
.entry--done .entry__text { color: var(--muted); text-decoration: line-through; }

.entry__tools { margin-top: 6px; }

.task__star, .task__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: var(--glass-face-soft);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  flex: none;
}
.task__star:hover, .task__icon:hover { background: var(--glass-face); color: var(--ink); }
/* Звезда выбора «главного дела». Невыбранное — тусклая пустая ☆, выбранное — крупная
   залитая ★: размер и форма говорят сами, цветом одним не ограничиваемся. Фон строки не трогаем. */
.task__star { font-size: 0; transition: transform .15s ease; }
.task__star::before { content: '★'; font-size: 20px; line-height: 1; }
.task__star[aria-pressed="false"] { color: var(--muted); }
.task__star[aria-pressed="false"]::before { content: '☆'; font-size: 22px; opacity: .65; }
.task__star[aria-pressed="true"] { color: var(--lime-ink); transform: scale(1.15); }
.task__star[aria-pressed="true"]::before { font-size: 30px; }
.task__icon--del:hover { color: var(--red); }

.empty { color: var(--muted); padding: 10px 2px; }

/* --- модалка прошлых записей --- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow: auto;
  background: rgba(30, 30, 30, .38);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sheet {
  width: min(720px, 100%);
  max-height: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--cream);
  color: var(--ink);
}
.sheet__head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}
.sheet__head h2 { margin: 0; font-size: 18px; }
.sheet__body { padding: 16px 20px 24px; }
.sheet__day { margin-bottom: 18px; }
.sheet__day h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

/* --- мини-привычки (третья практика дня) --- */
.habits { display: flex; flex-direction: column; gap: 2px; margin: 0 0 10px; padding: 0; list-style: none; }
/* Строка минимальна: чекбокс — текст — крестик, который виден по наведению. */
.habit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  border-radius: 8px;
}
.habit:hover { background: var(--glass-face-soft); }
.habit__check {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--lime-ink);
  cursor: pointer;
}
.habit__title {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  cursor: text;
  border-radius: 4px;
  padding: 1px 3px;
}
.habit__title:hover { outline: 1px dashed var(--line); outline-offset: 2px; }
.habit--done .habit__title { color: var(--muted); text-decoration: line-through; }
.habit__edit { flex: 1; min-width: 0; padding: 5px 8px; }
/* Крестик появляется при наведении; на тач-экранах — всегда, иначе его не найти. */
.habit__del {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
}
.habit:hover .habit__del,
.habit__del:focus-visible { opacity: 1; }
.habit__del:hover { color: var(--red); background: var(--glass-face); }
@media (hover: none) {
  .habit__del { opacity: 1; }
}
.habit__add-form { margin-top: 8px; }
.habit__add-form .input { width: 100%; }
.habit__add {
  margin-top: 6px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--lime-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.habit__add:hover { text-decoration: underline; }

/* Правка текста записи: расшифровка может ошибиться, и это надо чинить на месте. */
.entry__text--editable { cursor: text; }
.entry__text--editable:hover { outline: 1px dashed var(--line); outline-offset: 4px; border-radius: 4px; }
.entry__edit {
  width: 100%;
  min-height: 68px;
  resize: vertical;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.5;
  color: var(--ink);
  background: var(--glass-face-strong);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  box-shadow: var(--glass-gloss);
}
.entry__edit:focus-visible { outline: 2px solid var(--lime-ink); outline-offset: 1px; }
.entry__edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }

/* Свайп влево = удаление: красная подложка открывается по мере движения строки. */
.swipe { position: relative; overflow: hidden; border-radius: var(--radius-sm); }
.swipe__front {
  position: relative;
  z-index: 1;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--cream-2);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-gloss);
  touch-action: pan-y;
}
.swipe__behind {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 18px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  opacity: .55;
}
.swipe__behind--armed { opacity: 1; }

/* Дела: текст крупнее — это то, с чем человек работает, а не служебная строка. */
.entry--deal .entry__text { font-size: 19px; line-height: 1.45; }

.add-deal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.add-deal .input { flex: 1 1 160px; }

/* Игра на время разбора: занимает экран, пока идёт обработка. */
.game {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  background: var(--glass-face);
  -webkit-backdrop-filter: blur(26px) saturate(var(--glass-sat));
  backdrop-filter: blur(26px) saturate(var(--glass-sat));
  touch-action: none;
}
.game__head { max-width: 640px; margin: 0 auto; width: 100%; }
.game__hand { font-size: 26px; color: var(--lime-ink); margin: 0; }
.game__hint { margin: 6px 0 0; color: var(--muted); }
.game__canvas {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  background: var(--glass-face-strong);
  box-shadow: var(--glass-gloss);
}
.game__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}
.game__score { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Итог утра: с чем день начинается. */
.summary { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.summary li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.summary__label { min-width: 110px; color: var(--muted); font-size: 15px; }
.summary__value { flex: 1 1 200px; font-weight: 600; overflow-wrap: anywhere; }
.summary__hl { display: block; }

/* --- проекты --- */

.projects__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 4px 0 18px;
}
.projects__head h1 { margin: 0; font-size: 28px; }
.projects__form-title { margin: 0 0 12px; font-size: 18px; }
.projects__deadline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.projects__deadline-row .input { flex: 0 1 190px; }
/* «Через сколько дней» — главный способ поставить срок; дата рядом для точных случаев. */
.projects__days { display: flex; align-items: center; gap: 8px; }
.projects__days-input { flex: 0 0 84px; width: 84px; text-align: center; }
.projects__hint { margin: 10px 0 0; }
.projects__done { margin-top: 26px; }
.projects__done-title { margin: 0 0 10px; }

.proj { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 16px; align-items: center; }
.proj__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  cursor: text;
  overflow-wrap: anywhere;
}
.proj__title:hover { outline: 1px dashed var(--glass-line); outline-offset: 4px; border-radius: 4px; }
.proj__deadline { margin: 0; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Дата рядом со сроком — тише самого срока: «через 14 дней · 25 окт». */
.proj__when { color: var(--muted); }
.proj__deadline--soon { color: var(--orange); }
.proj__deadline--soon .proj__when { color: var(--muted); }
.proj__deadline--over { color: var(--red); }
.proj__edit { font-family: var(--font-head); font-size: 19px; font-weight: 700; }
.proj__edit-date { grid-column: 1 / -1; max-width: 190px; }
.proj--done .proj__title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(30, 30, 30, .3); cursor: default; }
.proj--done .proj__title:hover { outline: none; }

/* Чеклист проекта внутри карточки. Строка — сетка: галочка, текст, дата, дни, стрелки. */
/* Чеклист — во всю ширину карточки: .proj это сетка «текст + дедлайн», и без этого
   блок задач попадал в узкую первую колонку, а название ломалось по буквам. */
.tasks { grid-column: 1 / -1; margin-top: 12px; }
.tasks__list { display: flex; flex-direction: column; gap: 6px; }
.tasks__row {
  display: grid;
  /* minmax(0, 1fr) у текста: иначе длинное название распирает строку и крестик уезжает за край. */
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
/* Статус: короткий селектор после даты, а под ним поле причины. Ширину ограничиваем —
   нативный селектор иначе растягивается по самому длинному пункту («прокрастинирую»)
   и выдавливает ручку. */
.tasks__status-cell { display: flex; flex-direction: column; gap: 4px; width: 165px; }
.tasks__reason { width: 100%; padding: 4px 6px; font-size: 15px; }
.tasks__status {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.tasks__row--done .tasks__status { color: var(--muted); }
.tasks__title { min-width: 0; }
.tasks__row--done .tasks__title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(30, 30, 30, .3); }
.tasks__row--done .tasks__start { color: var(--muted); text-decoration: line-through; }
/* Ручка перетаскивания. touch-action: none — палец на ручке двигает строку, а не страницу;
   остальная часть строки остаётся обычной и прокручивает список. */
/* Ручка — последняя колонка строки, поэтому прижимать её отдельно нечем: она и так
   у правого края. position нужен только чтобы меню встало над строкой. */
.tasks__handle { position: relative; }
.tasks__grip {
  display: grid;
  place-items: center;
  width: 30px;
  height: 32px;
  border-radius: 8px;
  /* Точки рисуем градиентом, а не знаком «⋮⋮»: шрифтовый глиф сжимался и был почти
     не виден — по ручке надо тянуть, значит её видно без наведения. */
  color: var(--ink-soft);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.tasks__grip::before {
  content: "";
  width: 12px;
  height: 18px;
  background-image: radial-gradient(circle, currentColor 1.6px, transparent 1.7px);
  background-size: 6px 6px;
  background-position: 1px 1px;
  opacity: .75;
}
.tasks__grip:hover::before { opacity: 1; }
.tasks__grip:hover { background: var(--glass-face); color: var(--ink); }
.tasks__row--dragging { position: relative; z-index: 2; box-shadow: 0 12px 26px rgba(30, 30, 30, .18); }
.tasks__row--dragging .tasks__grip { cursor: grabbing; }

/* Меню действий: открывается тапом по ручке, живёт над строкой. */
.tasks__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 3;
  min-width: 140px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  box-shadow: var(--shadow-lg);
}
.tasks__menu-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--red);
  cursor: pointer;
}
.tasks__menu-item:hover { background: var(--glass-face); }


.tasks__done { width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.tasks__title { overflow-wrap: anywhere; }
/* Что делать сегодня и что уже просрочено — видно цветом, а не только датой. */
.tasks__start { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tasks__start--today { color: var(--lime-ink); font-weight: 600; }
.tasks__start--over { color: var(--red); font-weight: 600; }
/* Название задачи правится на месте: тот же приём, что у строк дампа. */
.tasks__title--editable { cursor: text; }
.tasks__title--editable:hover { outline: 1px dashed var(--line); outline-offset: 4px; border-radius: 4px; }
.tasks__edit { padding: 6px 10px; font: inherit; }
/* Дни у заведённой задачи — текст, а не поле: список не должен выглядеть формой. */
.tasks__days { display: flex; align-items: center; gap: 4px; }
.tasks__days-text { color: var(--muted); font-variant-numeric: tabular-nums; cursor: text; white-space: nowrap; }
.tasks__days-text:hover { outline: 1px dashed var(--line); outline-offset: 4px; border-radius: 4px; }
.tasks__days-input { width: 64px; flex: none; padding: 6px 8px; text-align: center; }
/* Дедлайн — закрывающая строка чеклиста: последняя, без лишних линий. */
.tasks__deadline {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 2px 0;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -.02em;
}
.tasks__deadline-label { font-size: 15px; color: var(--muted); font-weight: 600; font-family: var(--font); text-transform: lowercase; }
.tasks__deadline-date { font-size: 19px; }
/* Добавление задачи — за кнопкой «+»: пока её не нажали, список выглядит списком. */
.tasks__plus {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 10px;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background: var(--glass-face-soft);
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.tasks__plus:hover { background: var(--glass-face); color: var(--ink); }
/* Кнопки «Добавить» нет: Enter в любом из полей добавляет задачу. Поэтому поле дней
   задаём отдельно — общее правило .tasks__add .input растянуло бы его на полстроки. */
.tasks__add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tasks__add .input { flex: 1 1 180px; }
.tasks__add .tasks__days-input { flex: 0 0 84px; width: 84px; }
.tasks__add-days { display: flex; align-items: center; gap: 6px; }
.tasks__add-days .input { flex: none; }

@media (max-width: 559px) {
  /* На телефоне строка задачи собирается в две: галочка и название, под ними дата и дни. */
  .tasks__row { display: flex; flex-wrap: wrap; align-items: center; }
  .tasks__handle { order: 6; margin-left: auto; }
  .tasks__status-cell { order: 5; }
  .tasks__done { order: 1; }
  .tasks__title { order: 2; flex: 1 1 100%; }
  .tasks__start { order: 3; flex: 1 1 auto; }
  .tasks__days { order: 4; }
}

/* Меню карточки проекта: та же точка-градиент, что у ручки задачи, но это кнопка. */
.proj__menu-wrap { position: relative; display: inline-flex; align-self: center; }
.proj__menu-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.proj__menu-btn::before {
  content: "";
  width: 6px;
  height: 18px;
  background-image: radial-gradient(circle, currentColor 1.6px, transparent 1.7px);
  background-size: 6px 6px;
  background-position: 1px 1px;
  opacity: .75;
}
.proj__menu-btn:hover { background: var(--glass-face); color: var(--ink); }
.proj__menu-btn:hover::before { opacity: 1; }
/* Меню прижато к правому краю карточки: слева оно уезжало бы за её пределы. */
.proj__menu { left: auto; right: 0; }
.proj__menu-question { display: block; padding: 6px 10px 10px; color: var(--muted); font-size: 14px; }
.task__menu-item--danger { color: var(--red); font-weight: 600; }

/* Панель с открытым меню поднимается: иначе следующая карточка (у неё свой backdrop-filter)
   перекрывает пункты меню — «сделано» просто не нажать. */
.panel--above { position: relative; z-index: 2; }

/* Проекты: список важнее формы, поэтому «+ проект» — кнопка, а не открытое поле. */
.projects__plus { margin-left: auto; }

/* Меню действий: открывается тапом по ручке, живёт над строкой. */
.tasks__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 3;
  min-width: 140px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  box-shadow: var(--shadow-lg);
}
.tasks__menu-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--red);
  cursor: pointer;
}
.tasks__menu-item:hover { background: var(--glass-face); }


.tasks__done { width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.tasks__title { overflow-wrap: anywhere; }
/* Что делать сегодня и что уже просрочено — видно цветом, а не только датой. */
.tasks__start { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tasks__start--today { color: var(--lime-ink); font-weight: 600; }
.tasks__start--over { color: var(--red); font-weight: 600; }
/* Название задачи правится на месте: тот же приём, что у строк дампа. */
.tasks__title--editable { cursor: text; }
.tasks__title--editable:hover { outline: 1px dashed var(--line); outline-offset: 4px; border-radius: 4px; }
.tasks__edit { padding: 6px 10px; font: inherit; }
/* Дни у заведённой задачи — текст, а не поле: список не должен выглядеть формой. */
.tasks__days { display: flex; align-items: center; gap: 4px; }
.tasks__days-text { color: var(--muted); font-variant-numeric: tabular-nums; cursor: text; white-space: nowrap; }
.tasks__days-text:hover { outline: 1px dashed var(--line); outline-offset: 4px; border-radius: 4px; }
.tasks__days-input { width: 64px; flex: none; padding: 6px 8px; text-align: center; }
/* Дедлайн — закрывающая строка чеклиста: последняя, без лишних линий. */
.tasks__deadline {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 2px 0;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -.02em;
}
.tasks__deadline-label { font-size: 15px; color: var(--muted); font-weight: 600; font-family: var(--font); text-transform: lowercase; }
.tasks__deadline-date { font-size: 19px; }
/* Добавление задачи — за кнопкой «+»: пока её не нажали, список выглядит списком. */
.tasks__plus {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 10px;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background: var(--glass-face-soft);
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.tasks__plus:hover { background: var(--glass-face); color: var(--ink); }
/* Кнопки «Добавить» нет: Enter в любом из полей добавляет задачу. Поэтому поле дней
   задаём отдельно — общее правило .tasks__add .input растянуло бы его на полстроки. */
.tasks__add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tasks__add .input { flex: 1 1 180px; }
.tasks__add .tasks__days-input { flex: 0 0 84px; width: 84px; }
.tasks__add-days { display: flex; align-items: center; gap: 6px; }
.tasks__add-days .input { flex: none; }

@media (max-width: 559px) {
  /* На телефоне строка задачи собирается в две: галочка и название, под ними дата и дни. */
  .tasks__row { display: flex; flex-wrap: wrap; align-items: center; }
  .tasks__handle { order: 6; margin-left: auto; }
  .tasks__done { order: 1; }
  .tasks__title { order: 2; flex: 1 1 100%; }
  .tasks__start { order: 3; flex: 1 1 auto; }
  .tasks__days { order: 4; }
}

/* Меню карточки проекта: та же точка-градиент, что у ручки задачи, но это кнопка. */
.proj__menu-wrap { position: relative; display: inline-flex; align-self: center; }
.proj__menu-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.proj__menu-btn::before {
  content: "";
  width: 6px;
  height: 18px;
  background-image: radial-gradient(circle, currentColor 1.6px, transparent 1.7px);
  background-size: 6px 6px;
  background-position: 1px 1px;
  opacity: .75;
}
.proj__menu-btn:hover { background: var(--glass-face); color: var(--ink); }
.proj__menu-btn:hover::before { opacity: 1; }
/* Меню прижато к правому краю карточки: слева оно уезжало бы за её пределы. */
.proj__menu { left: auto; right: 0; }
.proj__menu-question { display: block; padding: 6px 10px 10px; color: var(--muted); font-size: 14px; }
.task__menu-item--danger { color: var(--red); font-weight: 600; }

/* Панель с открытым меню поднимается: иначе следующая карточка (у неё свой backdrop-filter)
   перекрывает пункты меню — «сделано» просто не нажать. */
.panel--above { position: relative; z-index: 2; }

/* Проекты: список важнее формы, поэтому «+ проект» — кнопка, а не открытое поле. */
.projects__plus { margin-left: auto; }

/* Меню (действия карточки проекта): поверхность как у модалки — за плотным фоном
   пункты не просвечивают строками карточки. */
.task__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 3;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  box-shadow: var(--shadow-lg);
}
.task__menu-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.task__menu-item:hover { background: var(--glass-face); }
.task__menu-item--on { font-weight: 600; color: var(--lime-ink); }
.task__menu-reason { width: 100%; margin-top: 4px; padding: 8px 10px; font-size: 15px; }

/* Экран входа: два способа — две кнопки одного размера, выбор без чтения. */
.enter { max-width: 320px; margin: 0 auto; }
.enter .btn { width: 100%; }

/* --- спринт-сессия --- */
/* Чанк: пока он идёт, панель держится на экране доски; шапка показывает счётчик всегда. */
.session {
  margin: 4px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  background: var(--glass-face);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}
.session--over { border-color: var(--lime); }
.session__title { margin-bottom: 10px; font-size: 18px; }
.session__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.session__sprint { max-width: 200px; }
.session__chips { display: flex; gap: 6px; }
.session__chip {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--muted);
  font-size: 15px;
}
.session__chip--on { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.session__chip:hover { color: var(--ink); }
.session__time {
  margin: 0;
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.session__where { display: flex; gap: 8px; align-items: baseline; margin: 0; }
.session__break { margin: 8px 0 0; color: var(--lime-ink); font-weight: 600; }
.session-history { margin: 16px 0 12px; }
.session-history__title { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; font-size: 18px; }

/* Счётчик чанка в шапке: видно с любого шага, тап ведёт на доску. */
.top__session {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  font-variant-numeric: tabular-nums;
}
.top__session:hover { background: var(--glass-face); }
.top__session-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime-ink); }
.top__session-time { font-weight: 600; }
.top__session-where { color: var(--muted); font-size: 14px; }

/* Кнопка фидбэка в шапке и его запись поверх экрана. */
.fb { display: inline-flex; }
.fb__btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.fb__btn:hover { background: var(--glass-face); }
.fb__btn--on { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* Панель фидбэка — в правом нижнем углу, без затемнения: экран, о котором пишешь, виден. */
.fb__panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  padding: 12px 14px 10px;
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  background: var(--glass-face-strong);
  box-shadow: var(--shadow-lg), var(--glass-gloss);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}
.fb__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.fb__head h2 { margin: 0; font-size: 15px; }
.fb__close { width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(30, 30, 30, .06); font-size: 18px; line-height: 1; }
.fb__close:hover { background: rgba(30, 30, 30, .12); }
/* Поле фидбэка: тот же .input, но многострочный и растягивается вниз. */
.fb__text { width: 100%; min-height: 84px; max-height: 40vh; resize: vertical; font-size: 15px; }
.fb__actions { display: flex; gap: 8px; justify-content: space-between; margin: 8px 0 2px; }
.fb__actions .btn--primary { margin-left: auto; }
.fb__mic--rec { background: var(--red); color: #fff; border-color: var(--red); font-variant-numeric: tabular-nums; }
.fb__attached { margin: 6px 0 0; font-size: 13px; color: var(--lime-ink); }
.fb__hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.fb__error { margin: 4px 0 0; font-size: 13px; }
.fb__done { margin: 4px 0; font-weight: 600; color: var(--lime-ink); }

/* --- доска спринтов --- */
/* Неразобранное — не колонка, а поднос: рамка пунктиром, чтобы не читалось как категория. */
.board__inbox {
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
/* Неразобранное не прокручивается: все карточки видны сразу, поднос растёт по высоте. */
.board__inbox .board__cards {
  max-height: none;
  overflow: visible;
}
.board__inbox-title { margin-bottom: 8px; font-size: 17px; }
.board__cols {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding-bottom: 6px;
  /* Колонки как в трелло: горизонтальная лента фиксированной ширины, скроллится вбок. */
  overflow-x: auto;
  align-items: flex-start;
  scroll-snap-type: x proximity;
}
.board__col {
  flex: 0 0 264px;
  padding: 12px;
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  background: var(--glass-face);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  scroll-snap-align: start;
}
/* «Не разобрано» стоит отдельно от ленты спринтов: лента листается вбок, а оно остаётся на виду,
   поэтому карточку всегда можно утащить в самый правый спринт. */
.board__layout { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; }
.board__layout > .board__cols { flex: 1; min-width: 0; margin-top: 0; }
.board__col--inbox { flex: 0 0 264px; }
/* Телефон: «Не разобрано» сверху лентой карточек по горизонтали, спринты ниже листаются вбок. */
@media (max-width: 699px) {
  .board__layout { flex-direction: column; align-items: stretch; }
  .board__col--inbox { flex: none; }
  .board__col--inbox .board__cards {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
  }
  .board__col--inbox .board__card { flex: 0 0 200px; }
}
/* Колонка создания своего спринта: пунктирная, чтобы не путалась с рабочими. */
.board__col--new { border-style: dashed; background: var(--glass-face-soft); }
/* Колонка под пальцем: единственная подсказка, куда карточка упадёт. */
.board__col--over { outline: 2px dashed var(--lime-ink); outline-offset: 2px; }
.board__col-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.board__col-title {
  padding: 2px 4px;
  border: 0;
  border-radius: 6px;
  background: none;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  cursor: text;
}
.board__col-title:hover { background: var(--glass-face-soft); }
/* «Не разобрано» и форма нового спринта — заголовки не переименовываются. */
.board__col-title--static { cursor: default; }
.board__col-title--static:hover { background: none; }
.board__col-edit { font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.board__col-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.board__col-first {
  margin-left: auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--cream);
  color: var(--muted);
  line-height: 1;
}
.board__col-first:hover { color: var(--ink); background: var(--glass-face-soft); }
/* Длительность и старт чанка: у каждого спринта своя длина. */
.board__col-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.board__dur { display: flex; align-items: center; gap: 6px; }
.board__dur-select { width: auto; padding: 4px 6px; font-size: 14px; }
.board__new-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
/* Высокая колонка скроллится внутри себя: сама доска остаётся горизонтальной. */
.board__cards { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.board__card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  /* Тянется вся карточка; `pan-y` оставляет вертикальную прокрутку страницы, когда жест
     начинается не на ручке. На ручке — `touch-action: none`, там перенос перехватывает всё. */
  touch-action: pan-x pan-y;
  -webkit-touch-callout: none;
  user-select: none;
  cursor: grab;
}
.board__card--drag { opacity: .35; }
.board__card-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* Название проекта у карточки проекта: без него в колонке не понять, откуда она. */
.board__card-source { color: var(--muted); font-size: 14px; }
/* Ручка карточки: touch-action none только на ней, иначе список на телефоне не прокрутить. */
/* Место, куда встанет карточка: пустой слот в колонке и линия перед соседом. */
.board__drop { height: 40px; border: 2px dashed var(--lime); border-radius: 10px; background: var(--lime-soft); list-style: none; }
.board__card--before { box-shadow: 0 -8px 0 -4px var(--lime-ink); margin-top: 4px; }
/* Копия карточки под пальцем: поверх всего, события пропускает — иначе она перехватит отпускание. */
.board__ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 6px 8px;
  border: 1px solid var(--lime);
  border-radius: 10px;
  background: var(--cream);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  pointer-events: none;
  overflow-wrap: anywhere;
}

/* Шапка доски: название и вход в «хреновый день» в одну строку. */
.board__head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.board__head-actions { display: flex; align-items: center; gap: 8px; }
/* «+ Спринт»: тихая кнопка рядом с «хреновым днём», форма раскрывается под шапкой. */
.board__add {
  flex: none;
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.board__add:hover { border-color: #b5b5b0; color: var(--lime-ink); }
.board__add-form { display: flex; gap: 8px; margin: 8px 0 2px; }
/* Кнопка режима: тихая в обычный день, заметная в тяжёлый — режим должен читаться сразу. */
.board__day {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.board__day:hover { background: var(--glass-face); color: var(--ink); }
.board__day--on { border-color: var(--orange); color: var(--orange); background: var(--lime-soft); }

/* Звёздочка «в минимум»: на карточке рядом с ручкой перетаскивания. */
.board__star {
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--line);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.board__star:hover { color: var(--orange); }
.board__star--on { color: var(--orange); }

/* --- «хреновый день»: сжатый вид доски, только отмеченный минимум --- */
.minimal {
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  background: var(--glass-face);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}
.minimal__hand {
  margin: 0 0 4px;
  font-family: var(--font-accent);
  font-size: 22px;
  color: var(--lime-ink);
}
.minimal__list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.minimal__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
}
.minimal__check { flex: none; width: 18px; height: 18px; border: 2px solid var(--orange); border-radius: 50%; }
.minimal__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.minimal__where { color: var(--muted); font-size: 14px; }
.minimal__all { margin-top: 14px; }
.minimal__all summary { cursor: pointer; color: var(--muted); font-size: 15px; }
.minimal__rest { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.minimal__rest-item { display: flex; align-items: center; gap: 8px; padding: 4px 2px; color: var(--muted); }
.minimal__rest-item .board__star { color: var(--line); }
.minimal__rest-item .board__star:hover { color: var(--orange); }

@media (max-width: 560px) {
  /* На телефоне доска остаётся лентой как в трелло, только колонки чуть уже. */
  .board__col { flex-basis: 230px; }
}

/* Удаление проекта: тихая ссылка внизу карточки, подтверждение — на месте. */
.proj__danger {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.proj__delete {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.proj__delete:hover { color: var(--red); text-decoration: underline; }
.proj__danger-yes { background: var(--red); border-color: var(--red); color: #fff; }

/* --- уведомления --- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 10;
  max-width: min(560px, calc(100vw - 40px));
  margin: 0;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  /* #ff2f2f под белым текстом давал 3.7:1; тёмный оттенок того же красного — 6.9:1. */
  background: rgba(178, 24, 24, .95);
  color: #fff;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .22);
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Без backdrop-filter стеклянные поверхности складываются в кашу из просвечивающих
   слоёв: где под панелью текст, он читается сквозь панель. Тогда — плотный фон. */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .input,
  .dump__area,
  .entry__edit,
  .steps__tab,
  .btn--ghost {
    background: var(--cream-2);
  }
  .panel { background: rgba(255, 255, 255, .95); }
  .sheet-backdrop { background: rgba(30, 30, 30, .6); }
  .game { background: var(--cream); }
  .game__canvas { background: #fff; }
}

/* ---------- Календарь: раскладка Apple Calendar (день / неделя / месяц) в цветах Lime ---------- */

/* Календарь — та же семья Inter, но легче остального приложения: базовый текст 300,
   иерархия внутри — 400–600. Раньше он отличался гарнитурой (Inter против Open Sans),
   теперь отличается весом. */
.cal-wrap, .cal-ghost, .cal-sheet {
  --cal-font: var(--font);
  font-family: var(--cal-font);
  font-weight: 300;
}

.cal-wrap { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) {
  .cal-wrap { grid-template-columns: 260px minmax(0, 1fr); }
  .cal-tray { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
}

/* Цвета событий: --c — кромка и точка, --t — текст, --f — заливка блока. */
.cal-tray__item, .cal__event, .cal__mev, .cal-ghost { --c: var(--lime-2); --t: var(--lime-ink); --f: color-mix(in srgb, var(--lime) 34%, #fff); }
.cal__event--lime,   .cal__mev--lime,   .cal-tray__item--lime,   .cal-ghost--lime   { --c: #c7fa0b; --t: #1e1e1e; --f: color-mix(in srgb, #c7fa0b 34%, #fff); }
.cal__event--red,    .cal__mev--red,    .cal-tray__item--red,    .cal-ghost--red    { --c: #ff3b30; --t: #b3140b; --f: color-mix(in srgb, #ff3b30 15%, #fff); }
.cal__event--orange, .cal__mev--orange, .cal-tray__item--orange, .cal-ghost--orange { --c: #ff9f1c; --t: #9a5500; --f: color-mix(in srgb, #ff9f1c 20%, #fff); }
.cal__event--yellow, .cal__mev--yellow, .cal-tray__item--yellow, .cal-ghost--yellow { --c: #ffe600; --t: #6b5f00; --f: color-mix(in srgb, #ffe600 30%, #fff); }
.cal__event--blue,   .cal__mev--blue,   .cal-tray__item--blue,   .cal-ghost--blue   { --c: #3b82f6; --t: #1d4ed8; --f: color-mix(in srgb, #3b82f6 15%, #fff); }
.cal__event--purple, .cal__mev--purple, .cal-tray__item--purple, .cal-ghost--purple { --c: #a855f7; --t: #7e22ce; --f: color-mix(in srgb, #a855f7 15%, #fff); }
/* Старые ключи (первые палитры): в выборе их нет, события с ними показываем ближайшими цветами. */
.cal__event--green,  .cal__mev--green,  .cal-tray__item--green  { --c: #c7fa0b; --t: #1e1e1e; --f: color-mix(in srgb, #c7fa0b 34%, #fff); }
.cal__event--graphite, .cal__mev--graphite, .cal-tray__item--graphite,
.cal__event--brown,  .cal__mev--brown  { --c: var(--ink); --t: var(--ink); --f: color-mix(in srgb, var(--ink) 9%, #fff); }

/* --- список дел слева: стеклянная панель, как остальные панели приложения --- */
.cal-tray {
  font-family: var(--cal-font);
  background: var(--glass-face);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), var(--glass-gloss);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  padding: 16px 12px;
}
.cal-tray__head { margin: 0 4px; font-family: var(--cal-font); font-size: 16px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.cal-tray__hint { margin: 2px 4px 12px; font-size: 13px; color: var(--muted); }
.cal-tray__empty { margin: 4px; font-size: 14px; color: var(--muted); }
.cal-tray__list { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 899px) {
  .cal-tray__list { flex-direction: row; flex-wrap: wrap; }
  .cal-tray__item { max-width: 100%; }
}
.cal-tray__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 9px 14px;
  background: rgba(255, 255, 255, .85);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.cal-tray__item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.cal-tray__item:hover { box-shadow: 0 6px 18px rgba(30, 30, 30, .1); transform: translateY(-1px); }
.cal-tray__item--planned { opacity: .55; }
.cal-tray__item--lifted { opacity: .3; }
.cal-tray__grip { color: rgba(30, 30, 30, .28); font-size: 12px; letter-spacing: -2px; }
.cal-tray__source { color: var(--muted); font-weight: 400; }
.cal-tray__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-tray__badge {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.cal-ghost {
  position: fixed;
  z-index: 50;
  transform: translate(-20px, -50%) rotate(-2deg);
  max-width: 240px;
  padding: 9px 14px 9px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  border-left: 4px solid var(--c);
  font: 400 14px/1.3 var(--cal-font);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}

/* --- сам календарь --- */
.cal {
  --cal-accent: var(--lime);
  --cal-line: rgba(30, 30, 30, .09);
  --cal-label: var(--muted);
  --gutter: 56px;
  min-width: 0;
  font-family: var(--cal-font);
  color: var(--ink);
  background: var(--glass-face-strong);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), var(--glass-gloss);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  overflow: hidden;
}

.cal__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 0; }

/* «День · Неделя · Месяц» — та же пилюля, что вкладки ритуала: активная чернильная. */
.cal__seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(30, 30, 30, .06); }
.cal__segbtn {
  border: 0;
  background: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--cal-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--muted);
}
.cal__segbtn:hover { color: var(--ink); }
.cal__segbtn--on, .cal__segbtn--on:hover { background: var(--ink); color: var(--cream); }

.cal__actions { display: flex; gap: 8px; align-items: center; }
.cal__today {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--lens-face), var(--lime-cta);
  color: var(--ink);
  font-family: var(--cal-font);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 16px rgba(199, 250, 11, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.cal__add {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-size: 24px;
  line-height: 1;
}
.cal__add:hover { background: var(--ink-soft); }

.cal__titlebar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 6px 18px; }
.cal__month { margin: 0; font-family: var(--cal-font); font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.cal__nav { display: flex; gap: 4px; }
.cal__arrow {
  width: 34px;
  height: 34px;
  border: 1px solid var(--glass-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.cal__arrow:hover { background: var(--lime); border-color: var(--lime); }

/* --- День: полоса недели --- */
.cal__days { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 8px; }
.cal__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  border: 0;
  background: none;
  font-family: var(--cal-font);
  color: var(--ink);
}
.cal__letter { font-size: 11px; font-weight: 500; color: var(--cal-label); text-transform: uppercase; letter-spacing: .04em; }
.cal__num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-family: var(--cal-font); font-size: 17px; font-weight: 400; }
.cal__day:hover .cal__num { background: rgba(30, 30, 30, .06); }
.cal__day--today .cal__num { background: var(--lime-soft); color: var(--ink); font-weight: 600; }
.cal__day--sel .cal__num, .cal__day--sel:hover .cal__num { background: var(--ink); color: var(--cream); font-weight: 600; }
.cal__day--sel.cal__day--today .cal__num { background: var(--lime); color: var(--ink); box-shadow: 0 4px 12px rgba(199, 250, 11, .45); }
.cal__dot { width: 5px; height: 5px; border-radius: 50%; }
.cal__dot--on { background: var(--lime-2); }
.cal__date { margin: 2px 0 0; padding: 6px 16px 10px; text-align: center; font-size: 14px; font-weight: 400; color: var(--muted); border-bottom: 1px solid var(--cal-line); }

/* --- Неделя: шапка колонок --- */
.cal__colhead { display: flex; padding: 4px 6px 8px 0; border-bottom: 1px solid var(--cal-line); }
.cal__gutter { flex: 0 0 var(--gutter); }
.cal__colday {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 0;
  background: none;
  font-family: var(--cal-font);
  color: var(--ink);
}
.cal__colnum { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-family: var(--cal-font); font-size: 16px; font-weight: 400; }
.cal__colday:hover .cal__colnum { background: rgba(30, 30, 30, .06); }
.cal__colday--today .cal__colnum, .cal__colday--today:hover .cal__colnum { background: var(--lime); color: var(--ink); font-weight: 600; }
.cal__colday--today .cal__letter { color: var(--lime-ink); }

/* --- Часовая сетка --- */
.cal__scroll { height: min(70vh, 640px); overflow-y: auto; overscroll-behavior: contain; background: rgba(255, 255, 255, .55); }
.cal__canvas { position: relative; margin: 10px 0; }
.cal__hour { position: absolute; left: var(--gutter); right: 0; height: 0; border-top: 1px solid var(--cal-line); }
.cal__hlabel {
  position: absolute;
  left: calc(-1 * var(--gutter) + 4px);
  top: -8px;
  width: calc(var(--gutter) - 12px);
  text-align: right;
  font-size: 11px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--cal-label);
}
.cal__hlabel--hidden { visibility: hidden; }

.cal__cols { position: absolute; top: 0; bottom: 0; left: var(--gutter); right: 6px; display: grid; }
.cal__col { position: relative; min-width: 0; }
.cal--week .cal__col + .cal__col { border-left: 1px solid var(--cal-line); }
.cal--week .cal__col--today { background: rgba(199, 250, 11, .08); }
.cal__col--target { background: rgba(199, 250, 11, .14) !important; }

/* Событие: светлая заливка цвета, яркая кромка слева, текст — тёмный оттенок. */
.cal__event {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 3px 5px 3px 9px;
  border-radius: 8px;
  background: var(--f);
  color: var(--t);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  font-size: 13px;
  line-height: 1.25;
}
.cal__event::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.cal__etitle { font-weight: 500; overflow-wrap: anywhere; }
.cal__etime { font-size: 12px; font-weight: 400; opacity: .8; font-variant-numeric: tabular-nums; }
.cal--week .cal__event { font-size: 11px; padding: 2px 3px 2px 7px; }
.cal--week .cal__etime { font-size: 10px; }
.cal__event--short { flex-direction: row; gap: 6px; align-items: baseline; padding-top: 1px; }
.cal__event--short .cal__etitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal--week .cal__event--short .cal__etime { display: none; }
.cal__event--past { opacity: .55; }
.cal__event--drag { cursor: grabbing; z-index: 3; opacity: 1; box-shadow: var(--shadow); }
.cal__event--preview { z-index: 3; pointer-events: none; outline: 2px dashed var(--c); outline-offset: -2px; opacity: .9; }
.cal__resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }

/* Линия «сейчас»: лаймовая плашка времени на шкале, тёмно-лаймовая линия поперёк. */
.cal__now { position: absolute; left: 0; right: 0; height: 0; z-index: 4; pointer-events: none; }
.cal__nowtime {
  position: absolute;
  left: 4px;
  top: -10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px rgba(30, 30, 30, .3);
}
.cal__nowline { position: absolute; left: var(--gutter); right: 6px; top: -1px; height: 2px; background: var(--lime-ink); }
.cal--week .cal__nowline { height: 1px; top: 0; opacity: .3; }
.cal__nowcol { position: absolute; left: 0; right: 0; height: 2px; margin-top: -1px; background: var(--lime-ink); z-index: 4; pointer-events: none; }
.cal__nowcol::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--lime-ink); }
.cal--day .cal__nowcol { display: none; }

/* --- Месяц --- */
.cal__month-grid { border-top: 1px solid var(--cal-line); background: rgba(255, 255, 255, .55); }
.cal__mhead { display: grid; grid-template-columns: repeat(7, 1fr); padding: 8px 0; font-size: 11px; font-weight: 500; letter-spacing: .04em; color: var(--cal-label); text-align: center; text-transform: uppercase; }
.cal__mcells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(92px, 1fr); }
.cal__mcell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 3px;
  border-top: 1px solid var(--cal-line);
  cursor: pointer;
  transition: background .12s;
}
.cal__mcell + .cal__mcell:not(:nth-child(7n + 1)) { border-left: 1px solid var(--cal-line); }
.cal__mcell:nth-child(7n + 6), .cal__mcell:nth-child(7n) { background: rgba(232, 228, 226, .35); }
.cal__mcell:hover { background: rgba(199, 250, 11, .1); }
.cal__mcell--target { background: rgba(199, 250, 11, .22) !important; }
.cal__mnum { align-self: center; display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; font-family: var(--cal-font); font-size: 14px; font-weight: 400; }
.cal__mcell--out .cal__mnum { color: rgba(30, 30, 30, .28); }
.cal__mcell--today .cal__mnum { background: var(--lime); color: var(--ink); font-weight: 600; }
.cal__mev {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--f);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--t);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.cal__mev--drag { box-shadow: var(--shadow-sm); }
.cal__mdot { flex: 0 0 6px; height: 6px; border-radius: 50%; background: var(--c); }
.cal__mtitle { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal__mtime { opacity: .75; font-variant-numeric: tabular-nums; }
.cal__mmore { padding: 0 5px; font-size: 11px; font-weight: 400; color: var(--muted); }
@media (max-width: 559px) {
  .cal__mtime { display: none; }
  .cal__mcells { grid-auto-rows: minmax(72px, 1fr); }
  .cal__segbtn { padding: 6px 10px; }
  .cal__month { font-size: 22px; }
}

/* Лист «Новое событие»: раскладка iOS (сгруппированные строки), краски и шрифты Lime. */
.cal-sheet {
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: auto;
  padding: 0 16px 18px;
  background: var(--cream);
  border-radius: var(--radius);
  font-family: var(--cal-font);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.cal-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0 6px; }
.cal-sheet__head h3 { margin: 0; font-family: var(--cal-font); font-size: 17px; font-weight: 500; }
.cal-sheet__btn { border: 0; background: none; color: var(--muted); font-family: var(--cal-font); font-size: 15px; font-weight: 400; padding: 8px 2px; }
.cal-sheet__btn--bold {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--lens-face), var(--lime-cta);
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 6px 16px rgba(199, 250, 11, .35);
}
.cal-sheet__btn:disabled { opacity: .4; box-shadow: none; cursor: default; }
.cal-sheet__group { background: #fff; border-radius: var(--radius-sm); margin-top: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-sheet__input { width: 100%; box-sizing: border-box; border: 0; padding: 13px 14px; font-family: var(--cal-font); font-size: 16px; font-weight: 400; color: var(--ink); outline: none; }
.cal-sheet__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 0 14px; font-size: 15px; font-weight: 400; }
.cal-sheet__row + .cal-sheet__row { border-top: 1px solid var(--cal-line, rgba(30, 30, 30, .09)); }
.cal-sheet__pill { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--cream-2); font-family: var(--cal-font); font-size: 15px; font-weight: 400; color: var(--ink); }
.cal-sheet__colors { display: flex; gap: 8px; }
.cal-sheet__swatch { width: 24px; height: 24px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 2px #fff; outline: 2px solid transparent; outline-offset: 1px; }
.cal-sheet__swatch--on { outline-color: var(--ink); }
.cal-sheet__swatch--red    { background: #ff3b30; }
.cal-sheet__swatch--orange { background: #ff9f1c; }
.cal-sheet__swatch--yellow { background: #ffe600; }
.cal-sheet__swatch--lime   { background: #c7fa0b; }
.cal-sheet__swatch--blue   { background: #3b82f6; }
.cal-sheet__swatch--purple { background: #a855f7; }
.cal-sheet__delete { width: 100%; border: 0; background: none; padding: 13px; font-family: var(--cal-font); font-size: 15px; font-weight: 500; color: var(--red); }

/* ---------- Проекты: таблица-дерево «название · дата» ---------- */

.ptable { padding: 6px 0; }
.ptable__head,
.ptable__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 36px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}
.ptable__head {
  padding-top: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ptable__head span:first-child { padding-left: 34px; }
.ptable__row { min-height: 46px; border-bottom: 1px solid rgba(30, 30, 30, .07); }
.ptable__row:last-child { border-bottom: 0; }
.ptable__row:hover { background: rgba(199, 250, 11, .07); }
.ptable__row--child { background: rgba(255, 255, 255, .25); }

.ptable__name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ptable__toggle {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .7);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.ptable__toggle:hover { background: var(--lime); border-color: var(--lime); }
.ptable__toggle--open { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.ptable__toggle--ghost { opacity: .25; border-style: dashed; background: none; }

.ptable__title,
.ptable__date {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  color: var(--ink);
  outline: none;
}
.ptable__title { flex: 1; padding: 7px 8px; font-size: 16px; font-weight: 600; }
.ptable__row--child .ptable__title { font-weight: 500; font-size: 15px; }
.ptable__date { position: relative; display: block; width: 100%; padding: 6px 8px; font-size: 14px; cursor: pointer; }
.ptable__datetext { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptable__datetext--empty { color: rgba(30, 30, 30, .35); }
/* Настоящий выбор даты лежит поверх подписи невидимым: подпись «завтра, пт» вместо «дд.мм.гггг». */
.ptable__datepick { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ptable__title:hover, .ptable__date:hover { border-color: var(--glass-line); }
.ptable__title:focus, .ptable__date:focus-within { border-color: var(--lime-2); background: #fff; box-shadow: 0 0 0 3px var(--lime-soft); }
.ptable__row--draft .ptable__title { font-weight: 400; }
.ptable__row--draft .ptable__title::placeholder { color: rgba(30, 30, 30, .35); }
/* Унаследованная от проекта дата в черновике — бледная: своей ещё нет. */
.ptable__date--inherited .ptable__datetext { color: rgba(30, 30, 30, .45); }
.ptable__date--soon { color: #9a5500; font-weight: 600; }
.ptable__date--over { color: var(--red); font-weight: 600; }

.ptable__check { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.ptable__check--ghost { visibility: hidden; }
.ptable__title--done { text-decoration: line-through; color: var(--muted); }
/* Прогресс проекта: полоска и «сделано/всего» — виден, сколько уже позади. */
.ptable__progress { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.ptable__bar { width: 54px; height: 6px; border-radius: 999px; background: rgba(30, 30, 30, .12); overflow: hidden; }
.ptable__bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--lime); }
.ptable__count {
  flex: 0 0 auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(30, 30, 30, .07);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.ptable__del {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: rgba(30, 30, 30, .3);
  opacity: 0;
}
.ptable__row:hover .ptable__del, .ptable__del:focus { opacity: 1; }
.ptable__del:hover { background: rgba(255, 59, 48, .1); color: var(--red); }
@media (hover: none) { .ptable__del { opacity: 1; } }
@media (max-width: 559px) {
  .ptable__head, .ptable__row { grid-template-columns: minmax(0, 1fr) 118px 30px; gap: 4px; padding: 0 8px; }
  .ptable__date { font-size: 13px; padding: 6px 4px; }
  /* Название не сжимается в точку: прогресс и счётчик уходят на вторую строку под него. */
  .ptable__row { padding-top: 4px; padding-bottom: 4px; }
  .ptable__name { flex-wrap: wrap; row-gap: 2px; gap: 6px; }
  .ptable__title { flex: 1 1 100px; width: 0; min-width: 100px; }
  .ptable__progress, .ptable__count { margin-left: 0; }
  .ptable__bar { width: 44px; }
  .ptable__datetext { white-space: normal; }
}

/* --- «Куда ушло время» --- */
.timerep { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.timerep__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.timerep__range { display: flex; gap: 4px; }
.timerep__btn { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.timerep__btn--on { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.timerep__total { margin: 0 0 10px; }
.timerep__list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.timerep__row { display: grid; grid-template-columns: minmax(80px, 160px) 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.timerep__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.timerep__bar { height: 10px; border-radius: 999px; background: rgba(30, 30, 30, .08); overflow: hidden; }
.timerep__fill { display: block; height: 100%; border-radius: 999px; background: var(--lime); }
.timerep__val { color: var(--muted); font-variant-numeric: tabular-nums; }
.timerep__days { display: flex; align-items: flex-end; gap: 3px; height: 96px; margin-top: 14px; }
.timerep__day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.timerep__col { flex: 1; width: 100%; display: flex; align-items: flex-end; border-radius: 4px 4px 0 0; background: rgba(30, 30, 30, .05); }
.timerep__colfill { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--lime); }
.timerep__lbl { font-size: 11px; color: var(--muted); }

/* Стиль Phoenix (Дина, 2026-10-22): заголовки средней толщины, как на лендинге. */
h1, h2 { font-weight: 500; letter-spacing: -.03em; }

/* Кнопка записи голосом — круглая, как в Telegram: лаймовый круг, чёрный микрофон. */
.btn--mic {
  width: 52px;
  height: 52px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 52px;
  border-radius: 50%;
  background: var(--lime) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
.btn--mic:hover:not(:disabled) { filter: brightness(.95); }
