/* Цвета берутся из темы Telegram (--tg-theme-*), с запасными значениями для светлой и тёмной темы */
:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --bg2: var(--tg-theme-secondary-bg-color, #f1f2f6);
  --text: var(--tg-theme-text-color, #111418);
  --hint: var(--tg-theme-hint-color, #8a9099);
  --link: var(--tg-theme-link-color, #2a7de1);
  --accent: var(--tg-theme-button-color, #2a7de1);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --section: var(--tg-theme-section-bg-color, var(--bg));
  --sep: color-mix(in srgb, var(--hint) 22%, transparent);
  --done: #1fa463;
  --danger: var(--tg-theme-destructive-text-color, #e5484d);
  --warn: #e8590c;
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar: 58px;
  --star: #f2b01e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tg]) {
    --bg: #17191d; --bg2: #0f1013; --text: #eef0f3; --hint: #8b929c; --section: #1e2126;
    --link: #5aa3ff; --accent: #3a8bf0;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg2); color: var(--text);
  font: 16px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body { min-height: 100vh; padding-bottom: calc(var(--tabbar) + 96px + var(--safe-b)); overscroll-behavior-y: contain; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--text); }

/* ---------- верх ---------- */
.top { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; align-items: center;
  padding: 10px 12px 6px; background: var(--bg2); }
.search { flex: 1; display: flex; align-items: center; gap: 6px; background: var(--section);
  border-radius: 12px; padding: 0 10px; height: 40px; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; height: 100%; }
.search-icon { opacity: .55; font-size: 14px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--section); font-size: 18px; flex: none; }

.chips { position: sticky; top: 56px; z-index: 4; display: flex; gap: 6px; overflow-x: auto;
  padding: 2px 12px 10px; background: var(--bg2); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--section);
  font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--accent); color: var(--accent-text); }
.chip .cnt { opacity: .6; margin-left: 4px; font-size: 12px; }

/* ---------- список ---------- */
.list { padding: 0 12px; }
.loading, .empty { text-align: center; color: var(--hint); padding: 48px 16px; }
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.section { margin-bottom: 14px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 4px 6px; color: var(--hint); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.section-head button { color: var(--link); font-size: 13px; text-transform: none; letter-spacing: 0; }
.group { background: var(--section); border-radius: var(--radius); overflow: hidden; }

.row { position: relative; overflow: hidden; }
.row + .row .card { border-top: 1px solid var(--sep); }
.swipe-bg { position: absolute; inset: 0; background: var(--done); color: #fff; display: flex;
  align-items: center; padding: 0 18px; font-weight: 600; opacity: 0; }
.swipe-bg.left { background: var(--accent); justify-content: flex-end; }
.row.done .swipe-bg.right { background: var(--hint); }
.row[data-dir="right"] .swipe-bg.left, .row[data-dir="left"] .swipe-bg.right { display: none; }
.card { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px 11px 10px;
  background: var(--section); touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: transform .18s ease; }
.card.dragging { transition: none; }
.check { flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--hint) 70%, transparent); display: grid; place-items: center;
  font-size: 14px; color: transparent; transition: background .15s, border-color .15s, color .15s; }
.check:active, .check.on { background: var(--done); border-color: var(--done); color: #fff; }
.body { flex: 1; min-width: 0; cursor: pointer; }
.text { white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin-top: 3px; font-size: 13px; color: var(--hint); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.meta .dl { color: var(--link); }
.meta .dl.soon { color: var(--warn); }
.meta .dl.over { color: var(--danger); font-weight: 600; }
.row.leaving { transition: height .22s ease, opacity .22s ease; opacity: 0; }
mark { background: color-mix(in srgb, var(--accent) 25%, transparent); color: inherit; border-radius: 3px; }

.fab { position: fixed; right: 16px; bottom: calc(var(--tabbar) + 14px + var(--safe-b)); width: 56px; height: 56px;
  border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 30px; line-height: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,.22); z-index: 6; }

/* ---------- уведомления ---------- */
.snackbar, .toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar) + 82px + var(--safe-b)); z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: #23262b; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 15px; }
.snackbar span, .toast { flex: 1; min-width: 0; }
.snackbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snack-btn { color: #7cc4ff; font-weight: 600; flex: none; }
.toast { justify-content: center; text-align: center;
  bottom: auto; top: calc(12px + env(safe-area-inset-top, 0px)); }   /* сверху — не закрывает кнопки панелей */
.toast.err { background: #a8262b; }
[hidden] { display: none !important; }

/* ---------- нижние панели ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); animation: fade .15s ease; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto;
  background: var(--bg); border-radius: 18px 18px 0 0; padding: 6px 16px calc(16px + var(--safe-b));
  animation: up .2s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }
.sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--sep); margin: 4px auto 6px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head h2 { font-size: 18px; margin: 0; }
.sheet-head .icon-btn { background: var(--bg2); width: 34px; height: 34px; font-size: 15px; }
textarea { width: 100%; resize: none; border: 1px solid var(--sep); border-radius: 12px; padding: 10px 12px;
  background: var(--bg2); outline: none; min-height: 76px; max-height: 40vh; }
textarea:focus, input:focus, select:focus { border-color: var(--accent); }
.field-label { margin: 14px 2px 6px; font-size: 13px; color: var(--hint); }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 7px 12px; border-radius: 999px; background: var(--bg2); font-size: 14px; }
.pill.pill-on { background: var(--accent); color: var(--accent-text); }
.dl-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.dl-row input, .custom-rem input, .custom-rem select, .inline-form input {
  border: 1px solid var(--sep); border-radius: 10px; padding: 8px 10px; background: var(--bg2); outline: none; }
.dl-row input { flex: 1; min-width: 0; }
.link-btn { color: var(--link); font-size: 14px; flex: none; padding: 6px; }
.custom-rem { display: flex; gap: 6px; margin-top: 8px; }
.custom-rem input { width: 80px; }
.ed-meta { margin-top: 14px; font-size: 13px; color: var(--hint); }
.sheet-actions { margin-top: 14px; display: grid; gap: 8px; }
.sheet-actions.two { grid-template-columns: 1fr 1fr; margin-top: 8px; }
.btn-primary, .btn-secondary, .btn-danger { height: 46px; border-radius: 12px; font-weight: 600; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-secondary { background: var(--bg2); }
.btn-danger { background: var(--bg2); color: var(--danger); }
.btn-danger.confirm { background: var(--danger); color: #fff; }
.small { height: 40px; padding: 0 14px; flex: none; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.hint { color: var(--hint); font-size: 13px; margin: 16px 2px 4px; }

.sp-card { background: var(--bg2); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.sp-title { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.sp-role { color: var(--hint); font-weight: 400; font-size: 13px; flex: none; }
.sp-members { color: var(--hint); font-size: 13px; margin-top: 4px; }
.sp-code { margin-top: 8px; font-size: 14px; }
.sp-code b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; font-size: 16px; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sp-actions .pill { background: var(--bg); }
.sp-actions .danger { color: var(--danger); }
.sp-actions .danger.confirm { background: var(--danger); color: #fff; }

/* ---------- голос и разбор ---------- */
.text-wrap { position: relative; }
.text-wrap textarea { padding-right: 52px; }
.mic { position: absolute; right: 8px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-size: 18px; display: grid; place-items: center; }
.mic.busy { opacity: .6; animation: pulse 1s ease-in-out infinite; }
.rec { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--danger) 12%, var(--bg2)); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s ease-in-out infinite; }
.rec-label { flex: 1; color: var(--hint); font-size: 14px; }
#edRecTime { font-variant-numeric: tabular-nums; font-weight: 600; }
@keyframes pulse { 50% { opacity: .35; } }
.smart { margin-top: 8px; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg2)); }
.smart .row-s { display: flex; gap: 6px; }
.smart .why { color: var(--hint); }
.smart .off { color: var(--link); font-size: 13px; margin-top: 4px; padding: 0; }
.smart.warn { background: color-mix(in srgb, var(--warn) 14%, var(--bg2)); }
.pill-row.need .pill { box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 70%, transparent); }

/* ================= v3: планер ================= */
.muted { color: var(--hint); font-weight: 400; }
.center { justify-content: center; text-align: center; }

/* нижние вкладки */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px);
  border-top: 1px solid var(--sep); }
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; color: var(--hint); }
.tabbar .ti { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: .7; transition: transform .15s; }
.tabbar button.on { color: var(--accent); font-weight: 600; }
.tabbar button.on .ti { filter: none; opacity: 1; transform: scale(1.08); }
body[data-view="stats"] .fab { display: none; }

/* строки дел */
.row.done .text { text-decoration: line-through; color: var(--hint); }
.row.done .check { opacity: .8; }
.row.checking .check { background: var(--done); border-color: var(--done); color: #fff; animation: pop .35s ease; }
.row.checking .text { text-decoration: line-through; color: var(--hint); transition: color .2s; }
@keyframes pop { 40% { transform: scale(1.25); } }
.check.on { background: var(--done); border-color: var(--done); color: #fff; }
.meta .ok { color: var(--done); }
.meta .sp { opacity: .85; }
.meta .dl.over { color: var(--warn); font-weight: 500; }
.next { font-size: 13px; color: var(--link); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini { flex: none; width: 34px; height: 34px; margin: -4px -4px -4px 0; border-radius: 10px; display: grid; place-items: center;
  font-size: 17px; color: var(--hint); }
.mini:active { background: var(--bg2); }
.mini.star.on { color: var(--star); }
.mini.star { font-size: 20px; }
.row.ghost .card { opacity: .62; cursor: pointer; }
.ghost-check { border-style: dashed; color: var(--hint); font-size: 12px; }
.empty.small { padding: 16px; font-size: 14px; }
.section-head .toggle { cursor: pointer; }
.section-head.accent { color: var(--star); font-weight: 600; }
.head-btns { display: flex; gap: 10px; margin-left: auto; }
.head-btns button { color: var(--link); font-size: 13px; text-transform: none; letter-spacing: 0; }
.section-head > span:first-child { flex: 1; }
.section-head { gap: 8px; }
.tip { font-size: 13px; color: var(--hint); padding: 6px 4px 0; }
.more { display: block; width: 100%; text-align: left; padding: 10px 14px; color: var(--link); font-size: 14px;
  border-top: 1px solid var(--sep); }
.more.block { background: var(--section); border-radius: var(--radius); border: 0; margin-bottom: 14px; }

/* ☀️ Сегодня */
.hero { background: var(--section); border-radius: var(--radius); padding: 14px 14px 12px; margin-bottom: 14px; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hero-day { color: var(--hint); font-size: 13px; text-transform: capitalize; }
.hero-date { font-size: 22px; font-weight: 700; }
.streak { background: color-mix(in srgb, var(--warn) 14%, var(--bg2)); color: var(--warn); font-weight: 600;
  padding: 6px 10px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.progress { height: 8px; border-radius: 4px; background: var(--bg2); margin-top: 12px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: var(--done); transition: width .5s ease; }
.hero-sub { margin-top: 6px; font-size: 14px; color: var(--hint); }

/* «По срокам / По спейсам» */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--section); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg button { height: 32px; border-radius: 8px; font-size: 14px; color: var(--hint); }
.seg button.on { background: var(--bg2); color: var(--text); font-weight: 600; }

/* 📅 Календарь */
.cal { background: var(--section); border-radius: var(--radius); padding: 8px 8px 10px; margin-bottom: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head .icon-btn { background: transparent; font-size: 22px; }
.cal-title { font-weight: 700; font-size: 17px; text-transform: capitalize; padding: 6px 10px; }
.cal-wd, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-wd span { text-align: center; font-size: 12px; color: var(--hint); padding: 4px 0; }
.cell { height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 5px;
  border-radius: 10px; gap: 3px; }
.cell .num { width: 28px; height: 24px; line-height: 24px; border-radius: 12px; font-size: 15px; }
.cell.we .num { color: color-mix(in srgb, var(--danger) 75%, var(--text)); }
.cell.out { opacity: .35; }
.cell.today .num { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.cell.sel { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.dots { display: flex; gap: 3px; align-items: center; height: 8px; }
.dots i, .cal-legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dots b { font-size: 9px; color: var(--hint); line-height: 1; }
i.open { background: var(--accent); }
i.done { background: var(--done); }
i.over { background: var(--warn); }
i.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--hint); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; font-size: 12px; color: var(--hint); margin-top: 6px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }

/* 📊 Статистика */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.tile { background: var(--section); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; }
.tile b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { font-size: 14px; }
.tile small { color: var(--hint); font-size: 12px; margin-top: 2px; }
.card-box { background: var(--section); border-radius: var(--radius); padding: 12px; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 130px; align-items: end; }
.bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 4px; padding: 0; }
.bar i { display: block; background: color-mix(in srgb, var(--accent) 55%, var(--section)); border-radius: 4px 4px 0 0; min-height: 0;
  transition: height .4s ease; }
.bar.today i, .bar.sel i { background: var(--accent); }
.bar span { font-size: 10px; color: var(--hint); text-align: center; border-top: 1px solid var(--sep); padding-top: 3px; }
.bar.sel span { color: var(--text); font-weight: 600; }
.bar-tip { margin-top: 8px; font-size: 14px; color: var(--hint); }
.bar-tip b { color: var(--text); }
.kv > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 15px; }
.kv > div + div { border-top: 1px solid var(--sep); }
.kv b { font-variant-numeric: tabular-nums; text-align: right; }
.warn { color: var(--warn); }
.hrow { display: grid; grid-template-columns: 24px 1fr 28px; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; color: var(--hint); }
.hrow b { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.hbar { height: 10px; background: var(--bg2); border-radius: 5px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: color-mix(in srgb, var(--accent) 55%, var(--section)); border-radius: 0 5px 5px 0; }
.hbar i.best { background: var(--accent); }
.trow { display: grid; grid-template-columns: 1fr 62px 62px 62px; gap: 6px; padding: 7px 0; font-size: 14px; align-items: center; }
.trow > span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.trow.two { grid-template-columns: 1fr 62px; }
.trow + .trow { border-top: 1px solid var(--sep); }
.trow.th { font-size: 11px; color: var(--hint); line-height: 1.2; }

/* редактор: когда, повтор, шаги, главное */
.focus-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
#edFocus.pill-on { background: color-mix(in srgb, var(--star) 22%, var(--bg2)); color: var(--text); }
.dl-row input[type="date"] { flex: 1.3; }
.dl-row input[type="time"] { flex: 1; }
.dl-row input:disabled { opacity: .45; }
.repeat-custom { margin-top: 8px; }
.repeat-custom .every { align-self: center; font-size: 14px; color: var(--hint); }
.repeat-custom .custom-rem input { width: 64px; }
.pill-row.days { margin-top: 8px; }
.pill-row.days .pill { min-width: 40px; padding: 7px 0; text-align: center; }
.ed-hint { font-size: 13px; color: var(--hint); margin-top: 6px; }
.ed-hint:empty { display: none; }
.steps { display: grid; gap: 4px; }
.step { display: flex; align-items: center; gap: 8px; background: var(--bg2); border-radius: 10px; padding: 4px 6px 4px 8px; }
.step input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 6px 0; }
.step.on input { text-decoration: line-through; color: var(--hint); }
.scheck { width: 22px; height: 22px; border-radius: 6px; border: 2px solid color-mix(in srgb, var(--hint) 70%, transparent);
  font-size: 13px; display: grid; place-items: center; flex: none; color: #fff; }
.step.on .scheck { background: var(--done); border-color: var(--done); }
.sdel { color: var(--hint); width: 28px; height: 28px; flex: none; }
.steps-sum { font-size: 13px; color: var(--hint); padding: 2px 4px; }
.step-add { margin-top: 6px; }
.step-add input { border: 1px solid var(--sep); border-radius: 10px; padding: 8px 10px; background: var(--bg2); outline: none; }

/* ▶ таймер */
.tm-task { font-size: 17px; font-weight: 600; text-align: center; margin: 4px 0; }
.tm-step { font-size: 14px; color: var(--link); text-align: center; }
.tm-ring { position: relative; width: 220px; height: 220px; margin: 14px auto; }
.tm-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tm-track { fill: none; stroke: var(--bg2); stroke-width: 9; }
.tm-arc { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.tm-time { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tm-time b { font-size: 46px; font-variant-numeric: tabular-nums; font-weight: 700; }
.tm-time span { color: var(--hint); font-size: 14px; }
.pill:disabled { opacity: .4; }

/* настройки */
.tips { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.tips li + li { margin-top: 4px; }

/* 🎉 */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: 40%; width: 8px; height: 12px; border-radius: 2px; opacity: 0;
  animation: confetti 1.4s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  30% { opacity: 1; transform: translate(calc(var(--dx) * .6), -160px) rotate(200deg); }
  100% { opacity: 0; transform: translate(var(--dx), 260px) rotate(540deg); }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .row.checking .check { animation: none; } }

/* ================= безопасность: участники, устаревшая сессия ================= */
.sp-members { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.member { display: inline-flex; align-items: center; gap: 4px; }
.kick { color: var(--danger); font-size: 12px; padding: 2px 6px; border-radius: 8px; background: var(--bg); }
.kick.confirm { background: var(--danger); color: #fff; }
.expired { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(6px); }
.expired-card { background: var(--section); border-radius: 18px; padding: 24px 20px; max-width: 360px; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.expired-icon { font-size: 40px; }
.expired-card h2 { margin: 8px 0; font-size: 20px; }
.expired-card p { color: var(--hint); margin: 0 0 16px; line-height: 1.45; }
.expired-card .btn-primary { width: 100%; }

/* иконка на главном экране */
.home-btn { width: 100%; margin: 4px 0 2px; }
