/* Шрифты лежат локально: Manrope — текст, Unbounded — заголовки и цифры. Лицензия SIL OFL. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/manrope-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/fonts/unbounded-cyrillic-wght-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/fonts/unbounded-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #050506;
  /* стекло: полупрозрачная заливка + размытие того, что под ним */
  --glass: rgba(22, 22, 25, .52);
  --glass-strong: rgba(16, 16, 18, .82);
  --glass-hi: rgba(255, 255, 255, .07);
  --glass-hi-2: rgba(255, 255, 255, .11);
  --glass-line: rgba(255, 255, 255, .09);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, .07);
  --blur: blur(22px) saturate(150%);
  --line: rgba(255, 255, 255, .08);
  --text: #f6f6f3;
  --muted: rgba(246, 246, 243, .58);
  --lime: #d4ff3f;
  --on-lime: #0a0a0b;
  --lime-soft: rgba(212, 255, 63, .14);
  --violet: #b39cff;
  --violet-soft: rgba(179, 156, 255, .16);
  --red: #ff6464; --red-soft: rgba(255, 100, 100, .16);
  --amber: #ffcc55; --amber-soft: rgba(255, 204, 85, .15);
  --blue: #86b9ff; --blue-soft: rgba(134, 185, 255, .15);
  --radius: 24px;
  /* отступы под системные панели: браузер даёт env(), приложение Android — --sat/--sab */
  --safe-top: max(env(safe-area-inset-top, 0px), var(--sat, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--sab, 0px));
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Manrope", -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg); color: var(--text);
  font: 500 15px/1.42 var(--font);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(112px + var(--safe-bottom));
  font-feature-settings: "tnum" 0;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
code { font-size: 13px; background: var(--glass-hi); padding: 1px 6px; border-radius: 6px; }
.display { font-family: var(--display); }

/* фон-обои: картинка из «Мотивации» под всем интерфейсом */
#bg { position: fixed; inset: 0; z-index: -2; background: #000 center 20% / cover no-repeat; opacity: 0; transition: opacity .5s; }
#bg.on { opacity: 1; }
#bg.lowres { filter: blur(1.5px); transform: scale(1.02); }
#bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .12) 22%, rgba(0, 0, 0, .35) 52%, rgba(0, 0, 0, .86) 82%, #000 100%); transition: background .4s; }
body.dim #bg::after { background: linear-gradient(180deg, rgba(0, 0, 0, .66), rgba(0, 0, 0, .8) 50%, rgba(0, 0, 0, .92)); }
@media (min-width: 760px) {
  #bg { filter: blur(20px) brightness(.75); transform: scale(1.08); }
}

/* стекло — общий класс для всех плашек */
.glass-surface, .card, .list, .kpi, .tile, .day, .tl-card, .search input, nav.bottom, .round, .btn:not(.primary):not(.on):not(.soft):not(.danger), .chips .btn:not(.on), .hero, .sheet, .rem-list {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}

/* шапка */
header.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: linear-gradient(180deg, rgba(5, 5, 6, .75), rgba(5, 5, 6, .35));
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
}
header.top.hidden { display: none; }
header.top h1 { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--glass-shine); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.round:active { background: var(--glass-hi-2); }
#head-actions { display: flex; gap: 8px; }

/* плавающее стеклянное меню */
nav.bottom {
  position: fixed; z-index: 6; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom));
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-around;
  height: 68px; padding: 0 6px; border-radius: 34px;
  background: rgba(18, 18, 20, .6); border: 1px solid var(--glass-line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55), var(--glass-shine);
}
nav.bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
nav.bottom a .ico { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
nav.bottom a.on { color: var(--text); }
nav.bottom a.on .ico { background: var(--lime); color: var(--on-lime); box-shadow: 0 0 22px rgba(212, 255, 63, .4); }

main { max-width: 640px; margin: 0 auto; padding: 4px 16px 24px; }

/* главная: верх как экран блокировки — обои, дата, фраза */
.home-hero { min-height: min(58vh, 520px); display: flex; flex-direction: column; justify-content: space-between; padding: calc(14px + var(--safe-top)) 2px 18px; }
.hh-top { display: flex; align-items: flex-start; gap: 10px; }
.hh-btns { display: flex; gap: 8px; }
.home-hero .hi { color: var(--lime); font-size: 14px; font-weight: 800; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.home-hero h1 { margin: 4px 0 0; font-family: var(--display); font-size: 28px; line-height: 1.08; font-weight: 700; letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0, 0, 0, .45); }
.home-hero .sub { color: rgba(255, 255, 255, .78); font-size: 14px; font-weight: 600; margin-top: 6px; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
.hh-quote { font-family: var(--display); font-size: clamp(26px, 8vw, 40px); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; text-transform: uppercase; text-shadow: 0 4px 30px rgba(0, 0, 0, .55); max-width: 92%; }
.hh-quote::after { content: ""; display: block; width: 48px; height: 5px; border-radius: 3px; background: var(--lime); margin-top: 14px; }

/* быстрые плитки */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 6px; }
.tile { aspect-ratio: 1; border: 1px solid var(--glass-line); border-radius: 22px; background: var(--glass); box-shadow: var(--glass-shine); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 800; }
.tile svg.i { width: 24px; height: 24px; }
.tile.on { background: var(--lime); color: var(--on-lime); border-color: transparent; box-shadow: 0 10px 30px rgba(212, 255, 63, .25); }
.tile:active { transform: scale(.96); }

/* карточки */
.card { background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shine); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 24px 2px 10px; }
.section-title h2 { font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 0; display: flex; align-items: center; gap: 8px; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.section-title .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.count { font-family: var(--font); font-size: 12px; font-weight: 800; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 8px; background: var(--glass-hi-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.count.hot { background: var(--red-soft); color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b { font-weight: 700; }
.big { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }

/* показатели */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { position: relative; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shine); border-radius: var(--radius); padding: 14px; overflow: hidden; min-width: 0; }
.kpi .head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.kpi .chip { width: 30px; height: 30px; border-radius: 50%; background: var(--glass-hi-2); color: var(--lime); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.kpi .chip svg.i { width: 16px; height: 16px; }
.kpi .v { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.03em; margin-top: 10px; white-space: nowrap; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.kpi.wide { grid-column: 1 / -1; }
.kpi.accent { border: 1.5px solid transparent; background: linear-gradient(var(--glass-strong), var(--glass-strong)) padding-box, linear-gradient(135deg, var(--lime), #57c7ff) border-box; }
.kpi .pill { position: absolute; top: 12px; right: 12px; }
.kpi .spark { display: block; width: 100%; height: 40px; margin-top: 6px; }
.ring-card { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 16px; }
.ring .lbl small { font-family: var(--font); font-size: 10px; color: var(--muted); font-weight: 700; }
.bar { height: 8px; border-radius: 4px; background: var(--glass-hi); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--lime); border-radius: 4px; }

/* неделя */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
.day { min-width: 0; border: 1px solid var(--glass-line); background: var(--glass); border-radius: 18px; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: var(--glass-shine); }
.day .dw { font-size: 11px; color: var(--muted); font-weight: 700; }
.day .dn { font-family: var(--display); font-size: 16px; font-weight: 700; }
.day .dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; margin-top: 2px; }
.day.has .dot { background: var(--lime); }
.day.today { border-color: rgba(255, 255, 255, .22); }
.day.on { background: var(--lime); color: var(--on-lime); border-color: transparent; }
.day.on .dw { color: rgba(10, 10, 11, .6); }
.day.on .dot { background: var(--on-lime); }

/* списки */
.list { background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shine); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.list > .item { display: block; padding: 14px 16px; position: relative; }
.list > .item.row { display: flex; }
.list > .item + .item::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; border-top: 1px solid var(--line); }
a.item:active, .item[data-act]:active { background: var(--glass-hi); }
.item .t { font-weight: 700; }
.item .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.empty { padding: 18px 16px; color: var(--muted); text-align: center; font-size: 14px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--glass-hi-2); color: var(--lime); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 13px; flex: none; }
.avatar.ref { color: var(--violet); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; font-size: 14px; }
.kv > div:nth-child(odd) { color: var(--muted); }
.kv > div:nth-child(even) { text-align: right; word-break: break-word; font-weight: 700; }
.kv a { color: var(--lime); }

/* напоминания */
.rem { display: flex; gap: 12px; padding: 14px 16px; position: relative; }
.rem + .rem::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; border-top: 1px solid var(--line); }
.rem .ic { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.rem .ic svg.i { width: 18px; height: 18px; }
.rem.red .ic { background: var(--red-soft); color: var(--red); }
.rem.yellow .ic { background: var(--amber-soft); color: var(--amber); }
.rem.blue .ic { background: var(--lime-soft); color: var(--lime); }
.rem .txt { display: block; font-size: 14px; line-height: 1.38; padding-top: 1px; font-weight: 600; }
.rem .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* бейджи */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--glass-hi-2); color: var(--muted); white-space: nowrap; }
.badge.work, .badge.submitted, .badge.done, .badge.issued { background: var(--blue-soft); color: var(--blue); }
.badge.hold { background: var(--amber-soft); color: var(--amber); }
.badge.approved, .badge.paid, .badge.credited, .badge.ok { background: var(--lime-soft); color: var(--lime); }
.badge.rejected, .badge.refused, .badge.failed, .badge.fail { background: var(--red-soft); color: var(--red); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--glass-line); background: var(--glass-hi); color: var(--text); border-radius: 999px; padding: 9px 15px; font-size: 14px; font-weight: 800; white-space: nowrap; box-shadow: var(--glass-shine); }
.btn svg.i { width: 16px; height: 16px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.primary, .btn.on { background: var(--lime); color: var(--on-lime); border-color: transparent; box-shadow: none; }
.btn.white { background: #fff; color: #000; border-color: transparent; }
.btn.soft { background: var(--lime-soft); color: var(--lime); border-color: transparent; }
.btn.ghost { background: transparent; border-color: rgba(255, 255, 255, .2); }
.btn.danger { background: var(--red-soft); color: var(--red); border-color: transparent; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.fab {
  position: fixed; z-index: 7; right: 18px; bottom: calc(94px + var(--safe-bottom));
  height: 52px; padding: 0 20px 0 16px; border-radius: 26px; border: 0;
  background: var(--lime); color: var(--on-lime); font-weight: 800; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 10px 30px rgba(212, 255, 63, .35);
}
.fab svg.i { width: 20px; height: 20px; stroke-width: 2.5; }

.search { position: relative; margin-bottom: 12px; }
.search svg.i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; z-index: 1; }
.search input { width: 100%; padding: 13px 14px 13px 44px; border-radius: 18px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--text); font: inherit; font-size: 15px; outline: none; box-shadow: var(--glass-shine); }
.search input:focus { border-color: rgba(212, 255, 63, .6); }
.search input::placeholder { color: var(--muted); }

.money-in { color: var(--lime); }
.money-out { color: var(--red); }
.warn-text { color: var(--amber); }
.danger-text { color: var(--red); }
.best { color: var(--lime); font-weight: 800; }

/* шторка с формой — тоже стекло */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: none; align-items: flex-end; justify-content: center; }
.modal.open { display: flex; }
.sheet { background: linear-gradient(180deg, rgba(38, 38, 42, .72), rgba(16, 16, 18, .9)); border: 1px solid var(--glass-line); border-bottom: 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5), var(--glass-shine); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 30px 30px 0 0; padding: 10px 18px calc(18px + var(--safe-bottom)); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .2); margin: 0 auto 12px; }
@media (min-width: 600px) { .modal { align-items: center; } .sheet { border-radius: 30px; border-bottom: 1px solid var(--glass-line); } .sheet::before { display: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head h3 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--glass-line);
  background: rgba(0, 0, 0, .3); color: var(--text); font: inherit; font-size: 16px; outline: none;
}
.field select option { background: #18181b; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(212, 255, 63, .7); }
.field input::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.6); }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row .field { margin: 12px 0; }
label.check { display: flex; align-items: center; gap: 12px; margin: 14px 0; font-size: 15px; font-weight: 700; }
label.check input { width: 22px; height: 22px; accent-color: var(--lime); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.form-actions .primary { flex: 1; padding: 14px; font-size: 16px; }
.form-group-title { font-size: 11.5px; font-weight: 800; color: var(--lime); text-transform: uppercase; letter-spacing: .08em; margin: 22px 0 2px; }
.note { background: rgba(255, 255, 255, .06); border-radius: 14px; padding: 10px 12px; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: calc(160px + var(--safe-bottom)); transform: translateX(-50%) translateY(10px); z-index: 60; background: var(--lime); color: var(--on-lime); font-weight: 800; padding: 11px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: 90vw; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--red); color: #fff; }

details summary { cursor: pointer; color: var(--lime); font-size: 13.5px; font-weight: 800; padding: 8px 2px 2px; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: " ›"; }
details[open] summary::after { content: " ‹"; }
.cmp-row { display: block; padding: 14px 16px; position: relative; }
.cmp-row + .cmp-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; border-top: 1px solid var(--line); }
.cmp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; text-align: center; }
.cmp-stats > div { background: var(--glass-hi); border-radius: 12px; padding: 8px 2px; }
.cmp-stats b { display: block; font-family: var(--display); font-size: 15px; font-weight: 700; }
.cmp-stats span { font-size: 11px; color: var(--muted); font-weight: 600; }

.hero { background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shine); border-radius: 28px; padding: 18px; margin-bottom: 12px; }
.hero .name { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.18; }
.hero .contacts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* таймлайн: время — линия с цветными кружками — карточки */
.tl { position: relative; margin-bottom: 12px; }
.tl::before { content: ""; position: absolute; left: 73px; top: 22px; bottom: 22px; width: 2px; border-radius: 1px; background: rgba(255, 255, 255, .14); }
.tl-row { display: grid; grid-template-columns: 48px 40px 1fr; gap: 6px; align-items: start; padding: 5px 0; }
.tl-time { text-align: right; color: rgba(255, 255, 255, .7); font-size: 13px; font-weight: 700; padding-top: 13px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.tl-dot { position: relative; z-index: 1; width: 34px; height: 34px; margin: 6px auto 0; padding: 0; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--on-lime); box-shadow: 0 0 0 4px rgba(0, 0, 0, .55); }
.tl-dot svg.i { width: 17px; height: 17px; }
button.tl-dot:active { transform: scale(.92); }
.tl-card { min-width: 0; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-shine); border-radius: 18px; padding: 12px 14px; }
.tl-card .t { font-weight: 700; font-size: 14.5px; }
.tl-card .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tl-date { margin: 12px 0 4px 60px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.tl-date:first-child { margin-top: 0; }
.c-lime { background: var(--lime); }
.c-red { background: var(--red); color: #fff; }
.c-violet { background: var(--violet); }
.c-blue { background: var(--blue); }
.c-amber { background: var(--amber); }
.c-gray { background: rgba(255, 255, 255, .16); color: var(--text); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* галерея «Мотивации» */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.g-item { position: relative; aspect-ratio: 9 / 16; padding: 0; border: 1px solid var(--glass-line); border-radius: 18px; overflow: hidden; background: var(--glass); }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-item.cur { outline: 2px solid var(--lime); outline-offset: 2px; }
.g-q { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); font-size: 10.5px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* экран входа: большое слово под стеклянной карточкой */
body.locked > header, body.locked > main, body.locked > nav, body.locked .fab, body.locked #bg { display: none !important; }
#login { position: fixed; inset: 0; z-index: 40; overflow: hidden auto; background: radial-gradient(120% 70% at 50% 0%, #17171a 0%, #000 60%); display: flex; flex-direction: column; align-items: center; padding: calc(22px + var(--safe-top)) 20px 30px; }
.login-pill { padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: rgba(255, 255, 255, .75); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.login-word { margin-top: 7vh; font-family: var(--display); font-size: min(40vw, 250px); font-weight: 800; line-height: .9; letter-spacing: -.05em; color: #fff; text-shadow: 0 0 70px rgba(255, 255, 255, .3); user-select: none; }
.glass { position: relative; width: 100%; max-width: 380px; margin-top: calc(min(40vw, 250px) * -.45); padding: 22px; border-radius: 30px; border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, rgba(44, 44, 48, .5), rgba(18, 18, 20, .78)); -webkit-backdrop-filter: blur(22px) saturate(120%); backdrop-filter: blur(22px) saturate(120%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .07); }
.glass-label { font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, .55); }
.glass-title { margin-top: 6px; font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.glass-sep { height: 1px; margin: 18px 0; background: rgba(255, 255, 255, .08); }
.glass-li { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.glass-li svg.i { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; }
.glass input { width: 100%; margin: 6px 0; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .35); color: #fff; font: inherit; font-size: 16px; outline: none; }
.glass input:focus { border-color: rgba(255, 255, 255, .4); }
.glass-btn { width: 100%; margin-top: 14px; padding: 15px; border: 0; border-radius: 999px; background: #fff; color: #000; font-size: 16px; font-weight: 800; }
.glass-btn:active { transform: scale(.98); }
.glass-hint { margin-top: 12px; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .55); }

/* старые телефоны без размытия: делаем плашки плотнее, чтобы текст читался */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  :root { --glass: rgba(22, 22, 25, .9); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: rgba(22, 22, 25, .94); }
}

/* мультяшные аватары */
.avatar.ava { overflow: hidden; background: none; padding: 0; }
.avatar.ava svg { display: block; }
.ava-btn { padding: 0; border: 0; background: none; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .1); transition: transform .15s; }
.ava-btn:active { transform: scale(.9) rotate(-8deg); }

/* наведение мышью (на компьютере) */
@media (hover: hover) {
  a.item:hover, .item[data-act]:hover, .cmp-row:hover { background: var(--glass-hi); }
  .btn:hover { filter: brightness(1.12); }
  .tile:hover, .day:hover, .round:hover { border-color: rgba(255, 255, 255, .22); }
  .tl-card[data-act]:hover { border-color: rgba(255, 255, 255, .2); }
  .ava-btn:hover { transform: rotate(-6deg) scale(1.05); }
}

/* версия для компьютера: меню слева, содержимое в две колонки */
@media (min-width: 1000px) {
  body { padding: 0 0 48px 268px; }
  nav.bottom {
    left: 16px; top: 16px; bottom: 16px; right: auto; width: 232px; height: auto; max-width: none; margin: 0;
    flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px; padding: 22px 12px; border-radius: 30px;
  }
  nav.bottom::before { content: "ROK"; font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -.05em; padding: 0 12px 24px; color: var(--text); }
  nav.bottom a { flex: 0 0 auto; flex-direction: row; gap: 12px; padding: 5px; border-radius: 999px; font-size: 14.5px; }
  nav.bottom a.on { background: var(--glass-hi); }
  main { max-width: 1200px; padding: 8px 40px 40px; }
  header.top { padding-left: 40px; padding-right: 40px; }
  .fab { right: 40px; bottom: 32px; }
  .toast { bottom: 40px; }

  .home-hero { min-height: 330px; padding-top: 28px; }
  .home-hero h1 { font-size: 34px; }
  .hh-quote { font-size: 48px; max-width: 72%; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 170px)); }
  .tile { aspect-ratio: auto; height: 104px; flex-direction: row; gap: 10px; font-size: 14px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 32px; align-items: start; }

  .narrow { max-width: 860px; }
  .cols { columns: 2; column-gap: 32px; }
  .cols > .blk { break-inside: avoid; display: inline-block; width: 100%; }
  .cols > .blk:first-child > :first-child { margin-top: 12px; }
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .kpi .v { font-size: 23px; }
}
@media (min-width: 1500px) {
  .home-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .home-grid .kpis { grid-template-columns: repeat(3, 1fr); }
  .home-grid .kpis .kpi.wide { grid-column: span 3; }
}

/* ---------- плавность ---------- */
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
#bg { transition: opacity .6s var(--ease); }
#bg.swap { opacity: 0 !important; transition-duration: .25s; }

/* появление экрана: блоки выплывают снизу по очереди */
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
main.enter > *, main.enter .cols > .blk, main.enter .narrow > *, main.enter .home-grid > * > * { animation: rise .5s var(--ease) both; }
main.enter > :nth-child(2), main.enter .cols > .blk:nth-child(2), main.enter .narrow > :nth-child(2) { animation-delay: .04s; }
main.enter > :nth-child(3), main.enter .cols > .blk:nth-child(3), main.enter .narrow > :nth-child(3) { animation-delay: .08s; }
main.enter > :nth-child(4), main.enter .cols > .blk:nth-child(4), main.enter .narrow > :nth-child(4) { animation-delay: .12s; }
main.enter > :nth-child(5), main.enter .cols > .blk:nth-child(5), main.enter .narrow > :nth-child(5) { animation-delay: .16s; }
main.enter > :nth-child(n+6), main.enter .cols > .blk:nth-child(n+6), main.enter .narrow > :nth-child(n+6) { animation-delay: .2s; }
main.enter .home-grid > * > :nth-child(2) { animation-delay: .1s; }
main.enter .home-grid > * > :nth-child(3) { animation-delay: .16s; }
main.enter .home-grid > * > :nth-child(n+4) { animation-delay: .22s; }
main.enter .home-hero > * { animation: rise .7s var(--ease) both; }
main.enter .home-hero > :nth-child(2) { animation-delay: .12s; }
main.enter .tiles .tile { animation: rise .55s var(--spring) both; }
main.enter .tiles .tile:nth-child(2) { animation-delay: .05s; }
main.enter .tiles .tile:nth-child(3) { animation-delay: .1s; }
main.enter .tiles .tile:nth-child(4) { animation-delay: .15s; }
header.top h1 { transition: opacity .25s; }

/* отклик на нажатия */
.btn, .tile, .round, .day, .chips .btn, .fab, nav.bottom a .ico, .tl-dot, .g-item, .ava-btn, .kpi, .item, .rem, .tl-card {
  transition: transform .22s var(--spring), background-color .2s, border-color .2s, box-shadow .25s, opacity .2s, color .2s, filter .2s;
}
.btn:active, .tile:active, .round:active, .day:active, .fab:active { transform: scale(.94); transition-duration: .08s; }
.item:active, .rem:active, .tl-card[data-act]:active, .g-item:active { transform: scale(.985); transition-duration: .08s; }
nav.bottom a.on .ico { animation: pop .45s var(--spring); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.fab { animation: rise .5s var(--spring) .15s both; }

/* шторка: выезжает снизу, фон плавно темнеет; при закрытии — обратно */
.modal.open { animation: fade .25s var(--ease) both; }
.modal.open .sheet { animation: sheetUp .42s var(--ease) both; }
.modal.closing { animation: fade .2s var(--ease) reverse both; }
.modal.closing .sheet { animation: sheetDown .22s ease-in both; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { from { transform: none; } to { transform: translateY(100%); } }
@media (min-width: 600px) {
  @keyframes sheetUp { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes sheetDown { to { opacity: 0; transform: translateY(16px) scale(.97); } }
}

/* напоминание, отмеченное выполненным, уезжает */
.rem.leaving { opacity: 0; transform: translateX(40px); transition: opacity .3s, transform .35s var(--ease); }
.toast { transition: opacity .25s var(--ease), transform .35s var(--spring); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
