/* Нить дня — мягкое стекло дня.
   Neo-apple: сиреневое поле, белая витрина, пастельные градиенты,
   тонкие линии и один стеклянный якорь на каждом экране. */

:root {
  --surface: #fffdfb;
  --ink: #352e48;
  --ink-soft: #6b6280;
  --ink-faint: #9c93ad;
  --primary: #8b72ea;
  --primary-deep: #6c50d4;
  --on-primary: #1e1c1b;
  --accent: #f0a6c6;
  --on-accent: #352e48;
  --support-sky: #aed3f6;
  --support-cream: #fbe9d8;
  --support-peach: #ffe1d4;
  --support-mint: #dcf3e8;
  --paper: #f6eee8;
  --paper-deep: #efe3da;
  --sage: #58b99a;
  --sage-quiet: #e9f8f1;
  --vermilion: #d95c7c;
  --danger-quiet: #fdeef3;
  --rule: rgba(84, 63, 120, 0.1);
  --rule-strong: rgba(84, 63, 120, 0.18);
  --rule-soft: rgba(84, 63, 120, 0.06);
  --primary-quiet: #f1ebff;
  --accent-quiet: #fdf0f6;
  --font-display: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 26px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --shadow: 0 34px 70px -44px rgba(96, 72, 130, 0.35);
  --shadow-soft: 0 16px 36px -26px rgba(96, 72, 130, 0.28);
  --maxw: 1220px;
  --grad: linear-gradient(125deg, #8b72ea 0%, #b7a0f5 36%, #f0a6c6 72%, #fbd7c4 100%);
  --grad-soft: linear-gradient(130deg, rgba(183, 160, 245, 0.22), rgba(240, 166, 198, 0.2) 52%, rgba(220, 243, 232, 0.4));
  --grad-cool: linear-gradient(140deg, rgba(174, 211, 246, 0.34), rgba(240, 166, 198, 0.22) 60%, rgba(251, 233, 216, 0.42));
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  background-color: var(--paper);
  background-image:
    radial-gradient(44% 38% at 12% 0%, rgba(255, 255, 255, 0.85), transparent 64%),
    radial-gradient(36% 32% at 90% 6%, rgba(214, 197, 255, 0.48), transparent 70%),
    radial-gradient(34% 30% at 84% 94%, rgba(255, 214, 196, 0.46), transparent 72%),
    radial-gradient(38% 32% at 6% 90%, rgba(220, 243, 232, 0.58), transparent 72%),
    linear-gradient(165deg, #f9f1ea 0%, #f4ebe7 52%, #f8f1eb 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 640;
  letter-spacing: -0.025em;
  line-height: 1.14;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--primary);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -70px;
  left: 16px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: top 0.16s ease;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.eyebrow--light {
  color: rgba(26, 22, 34, 0.55);
}

.muted {
  color: var(--ink-faint);
  font-size: 12.5px;
}

.is-quiet {
  color: var(--ink-faint);
  font-weight: 500;
}

.text-link {
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 550;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.16s ease;
}

.text-link:hover {
  border-color: currentColor;
}

/* ---------- сцена ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene__shape {
  position: absolute;
  display: block;
  filter: blur(42px);
  opacity: 0.5;
}

.scene__shape--cream {
  top: -90px;
  left: -70px;
  width: 380px;
  height: 380px;
  border-radius: 46% 54% 60% 40% / 52% 42% 58% 48%;
  background: radial-gradient(circle at 38% 34%, #fdf8ed, #f1e5d2 60%, #e9dbc4);
  box-shadow: inset -22px -26px 60px rgba(191, 163, 120, 0.22);
}

.scene__shape--lilac {
  top: -40px;
  right: -50px;
  width: 300px;
  height: 300px;
  border-radius: 58% 42% 36% 64% / 44% 62% 38% 56%;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.18) 0 5px, transparent 5px 12px),
    radial-gradient(circle at 40% 35%, #c8b4fb, #a88bf1 70%, #8f6fe0);
  box-shadow: inset -28px -24px 50px rgba(104, 70, 200, 0.28);
  transform: rotate(-8deg);
}

.scene__shape--peach {
  bottom: 4%;
  left: -60px;
  width: 250px;
  height: 250px;
  border-radius: 52% 48% 62% 38% / 40% 56% 44% 60%;
  background: radial-gradient(circle at 38% 34%, #ffd9c8, #f6b7a1 66%, #eda48c);
  box-shadow: inset -20px -22px 44px rgba(196, 120, 96, 0.22);
}

.scene__shape--glass {
  right: 2%;
  bottom: -70px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 22px solid rgba(255, 255, 255, 0.32);
  background: radial-gradient(circle at 40% 36%, rgba(255, 255, 255, 0.5), rgba(198, 186, 226, 0.18) 62%, rgba(160, 148, 196, 0.12));
  box-shadow: 0 30px 80px -30px rgba(88, 68, 140, 0.3), inset 0 0 60px rgba(255, 255, 255, 0.5);
}

/* ---------- белая витрина ---------- */

.app-frame {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 56px), 1240px);
  margin: 30px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 60px 130px -60px rgba(58, 40, 98, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(26px) saturate(1.08);
  -webkit-backdrop-filter: blur(26px) saturate(1.08);
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 700;
  margin: 12px 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px -28px rgba(58, 40, 98, 0.45);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  min-height: 68px;
  padding: 8px clamp(14px, 2vw, 24px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark,
.login-brand .brand__mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  gap: 3px;
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 11px;
  background: var(--grad);
  box-shadow: 0 8px 18px -10px rgba(123, 92, 240, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.brand__mark i {
  display: block;
  border-radius: 2.5px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 1px rgba(80, 52, 160, 0.18);
}

.brand__text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.brand__sub {
  padding-left: 12px;
  margin-left: 2px;
  border-left: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tabs {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 18px);
  margin: 0 auto;
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 2px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s ease;
}

.tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  color: var(--ink);
  font-weight: 600;
}

.tab.is-active::after {
  width: calc(100% - 2px);
}

.nav-more {
  position: relative;
  flex: none;
}

.nav-more__button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  list-style: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-more__button::-webkit-details-marker {
  display: none;
}

.nav-more__button:hover {
  background: var(--primary-quiet);
  color: var(--primary);
}

.nav-more[open] .nav-more__button {
  background: var(--primary-quiet);
  color: var(--primary);
}

.nav-more__pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  display: grid;
  gap: 4px;
  width: 232px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 54px -28px rgba(58, 40, 98, 0.5);
  backdrop-filter: blur(18px);
}

.nav-more__date {
  margin: 0 0 6px;
  padding: 0 10px 9px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 11.5px;
}

.nav-more__link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-more__link:hover {
  background: var(--primary-quiet);
  color: var(--primary);
}

.nav-more__link svg {
  width: 17px;
  height: 17px;
}

.logout-form {
  margin: 0;
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__date {
  color: var(--ink-faint);
  font-size: 11.5px;
  white-space: nowrap;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  color: var(--primary);
  background: var(--primary-quiet);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.icon-btn--ghost {
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--rule);
}

.shell {
  padding: clamp(24px, 3vw, 38px) clamp(20px, 3.2vw, 40px) 22px;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  width: min(calc(100% - 56px), 1240px);
  margin: 18px auto 40px;
  color: var(--ink-faint);
  font-size: 11px;
  text-align: center;
}

/* ---------- нижняя навигация ---------- */

.bottom-nav {
  display: none;
}

/* ---------- плавающие кнопки ---------- */

.fab-dock {
  position: fixed;
  right: clamp(16px, 3vw, 36px);
  bottom: clamp(20px, 4vw, 36px);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: var(--grad);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 20px 40px -20px rgba(123, 92, 240, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 46px -20px rgba(123, 92, 240, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.fab--help {
  width: 50px;
  padding: 0;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 36px -24px rgba(58, 40, 98, 0.5);
  backdrop-filter: blur(14px);
}

.fab--help .fab__label {
  display: none;
}

.fab svg {
  width: 18px;
  height: 18px;
}

.fab__label {
  line-height: 1;
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 14px 26px -18px rgba(123, 92, 240, 0.8);
}

.btn--primary:hover {
  background: var(--primary-deep);
  border-color: var(--primary-deep);
}

.btn--grad {
  background: var(--grad);
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  box-shadow: 0 18px 32px -20px rgba(123, 92, 240, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn--grad:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px -20px rgba(123, 92, 240, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn--glass {
  background: rgba(255, 255, 255, 0.68);
  border-color: var(--rule);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 22px -20px rgba(58, 40, 98, 0.5);
  backdrop-filter: blur(10px);
}

.btn--glass:hover {
  border-color: rgba(123, 92, 240, 0.35);
  color: var(--primary);
}

.btn--secondary {
  border-color: var(--rule-strong);
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--ghost {
  color: var(--primary);
  border-color: transparent;
}

.btn--ghost:hover {
  background: var(--primary-quiet);
}

.btn--danger {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: #fff;
}

.btn--small {
  padding: 8px 14px;
  font-size: 12px;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.btn.is-busy {
  position: relative;
  color: transparent !important;
}

.btn.is-busy::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 15px;
  margin: -7.5px 0 0 -7.5px;
  border: 2px solid rgba(26, 22, 34, 0.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn--primary.is-busy::after,
.btn--grad.is-busy::after {
  border-color: rgba(26, 22, 34, 0.25);
  border-top-color: var(--ink);
}

/* ---------- поля ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.field > span,
.field legend {
  padding: 0;
  color: var(--ink-faint);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
}

.field:has(.input:focus) > span {
  color: var(--primary);
}

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: #f7f5fa;
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.input::placeholder {
  color: var(--ink-faint);
}

.input:hover {
  border-color: var(--rule-strong);
}

.input:focus {
  outline: none;
  background: var(--surface);
  border-color: rgba(123, 92, 240, 0.5);
  box-shadow: 0 0 0 4px rgba(123, 92, 240, 0.12);
}

.input--money {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
}

.input.is-invalid {
  border-color: var(--vermilion);
  box-shadow: 0 0 0 4px rgba(217, 70, 107, 0.1);
}

.field-error {
  margin: 1px 0 0;
  color: var(--vermilion);
  font-size: 11.5px;
  line-height: 1.4;
}

.form-error {
  margin: 0;
  padding: 10px 13px;
  border: 1px solid rgba(217, 70, 107, 0.25);
  border-radius: 12px;
  background: var(--danger-quiet);
  color: var(--vermilion);
  font-size: 12.5px;
}

.habit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.habit-pills legend {
  float: left;
  width: 100%;
  margin-bottom: 7px;
}

.pill {
  position: relative;
  display: inline-flex;
}

.pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill span {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.pill input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.pill input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.entry-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}

.entry-form--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 13px;
}

.entry-form--stack .btn {
  margin-top: 4px;
}

.field--grow {
  flex: 2 1 260px;
}

.field--date {
  flex: 0 1 176px;
}

.field--target {
  flex: 0 1 190px;
}

.field--wide {
  flex: 1 1 100%;
}

.field--inline {
  flex: 1 1 150px;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 2px rgba(58, 40, 98, 0.05);
  backdrop-filter: blur(10px);
}

.segmented--wide {
  width: 100%;
}

.segmented__btn {
  flex: 1;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.segmented__btn:hover {
  color: var(--ink);
}

.segmented__btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 6px 16px -10px rgba(58, 40, 98, 0.5);
}

/* ---------- герой ---------- */

.pagehero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(330px, 0.85fr);
  align-items: stretch;
  gap: clamp(24px, 3.4vw, 44px);
  margin: 4px 0 clamp(22px, 2.6vw, 30px);
}

.pagehero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 12px 4px 10px 6px;
}

.pagehero__title {
  margin: 12px 0 14px;
  font-size: clamp(3.1rem, 6vw, 5.3rem);
  font-weight: 640;
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.pagehero__sub {
  display: block;
  margin-top: 12px;
  color: var(--ink-faint);
  font-size: clamp(1rem, 1.7vw, 1.32rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.pagehero__lede {
  max-width: 48ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.pagehero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.pagehero__meta {
  margin: 16px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.pagehero__meta b {
  color: var(--ink);
  font-weight: 650;
}

.pagehero--compact .pagehero__title {
  font-size: clamp(2.5rem, 4.6vw, 4rem);
}

.pagehero--compact .pagehero__copy {
  padding-top: 6px;
}

.hero-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-mini > div,
.hero-mini > a {
  flex: 1 1 170px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.hero-mini span {
  display: block;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 550;
}

.hero-mini b {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-mini small {
  display: block;
  margin-top: 1px;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.35;
}

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: clamp(330px, 34vw, 410px);
  padding: 30px 28px 40px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 34px;
  text-align: center;
  background:
    radial-gradient(90% 70% at 78% 8%, rgba(255, 255, 255, 0.72), transparent 58%),
    radial-gradient(80% 70% at 12% 88%, rgba(156, 200, 245, 0.95), transparent 62%),
    radial-gradient(70% 60% at 88% 80%, rgba(248, 201, 176, 0.95), transparent 60%),
    linear-gradient(132deg, #c7b3ff 0%, #dcb0f5 28%, #f0a6cf 56%, #f7c6ad 80%, #b7d8fa 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -40px 80px rgba(255, 255, 255, 0.18),
    0 36px 66px -40px rgba(123, 92, 240, 0.65);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04) 55%, rgba(255, 255, 255, 0.16));
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.hero-visual__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 23px);
  grid-template-rows: repeat(2, 23px);
  gap: 6px;
  margin-bottom: 24px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 12px 26px -18px rgba(80, 52, 160, 0.5);
  backdrop-filter: blur(12px);
}

.hero-visual__grid i {
  display: block;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 4px rgba(90, 60, 150, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-visual__body {
  position: relative;
  z-index: 1;
  max-width: 34ch;
}

.hero-visual__eyebrow {
  margin: 0;
  color: rgba(26, 22, 34, 0.62);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-visual__amount {
  margin: 10px 0 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.8vw, 4rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero-visual__amount small {
  margin-left: 5px;
  font-size: 0.3em;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(26, 22, 34, 0.6);
}

.hero-visual__note {
  margin: 0;
  color: rgba(26, 22, 34, 0.72);
  font-size: 12.5px;
  line-height: 1.5;
}

.hero-visual.is-zero,
.hero-visual.is-empty {
  filter: saturate(0.9);
}

.hero-visual.is-zero .hero-visual__amount,
.hero-visual.is-empty .hero-visual__amount {
  color: #7c2942;
}

.hero-visual__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 2;
  display: flex;
  gap: 5px;
  transform: translateX(-50%);
}

.hero-visual__dots span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(26, 22, 34, 0.22);
  transition: width 0.2s ease;
}

.hero-visual__dots .is-on {
  width: 16px;
  background: rgba(26, 22, 34, 0.55);
}

.hero-visual--small {
  min-height: clamp(280px, 26vw, 330px);
  border-radius: 30px;
  padding: 24px 24px 36px;
}

.hero-visual--small .hero-visual__grid {
  grid-template-columns: repeat(2, 19px);
  grid-template-rows: repeat(2, 19px);
  margin-bottom: 18px;
  padding: 12px;
  border-radius: 17px;
}

.hero-visual--small .hero-visual__amount {
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
}

/* ---------- панель сводки ---------- */

.board-card {
  margin-bottom: 18px;
  padding: 22px clamp(18px, 2.2vw, 26px) 20px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 44px -36px rgba(58, 40, 98, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.board-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.board-card__head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 7px 13px;
  border: 1px solid rgba(123, 92, 240, 0.18);
  border-radius: 999px;
  background: var(--primary-quiet);
  color: var(--primary-deep);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
}

.board-card__meter {
  height: 6px;
  margin: 14px 0 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rule-soft);
}

.board-card__meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  transition: width 0.5s ease;
}

.ledger-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.ledger-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: background 0.16s ease, transform 0.16s ease;
}

a.ledger-cell:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

.ledger-cell__label {
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 550;
}

.ledger-cell__value {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ledger-cell__value--money {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
}

.ledger-cell__value small {
  margin-left: 4px;
  color: var(--ink-faint);
  font-size: 0.46em;
  font-weight: 500;
  letter-spacing: 0;
}

.ledger-cell__note {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.35;
}

.ledger-cell.is-alarm .ledger-cell__value,
.ledger-cell.is-alarm .ledger-cell__note {
  color: var(--vermilion);
}

.board-card .ledger-strip {
  gap: 0;
  margin: 6px 0 0;
}

.board-card .ledger-cell {
  padding: 12px 14px 4px;
  border: 0;
  border-radius: 0;
  border-right: 1px solid var(--rule);
  background: transparent;
  box-shadow: none;
}

.board-card .ledger-cell:last-child {
  border-right: 0;
}

.board-card .ledger-cell:hover {
  background: rgba(241, 237, 253, 0.55);
  transform: none;
  border-radius: 14px;
}

/* ---------- напоминания ---------- */

.reminder-tape {
  display: flex;
  align-items: flex-start;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin: 0 0 20px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.reminder-tape__label {
  flex: none;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.reminder-tape__list {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reminder-tape .reminder {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 12px;
}

.reminder {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.reminder__mark {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.reminder--over .reminder__mark {
  background: var(--vermilion);
}

.reminder--done .reminder__mark {
  background: var(--sage);
}

.reminder--money .reminder__mark {
  background: var(--accent);
}

.reminder--habit .reminder__mark {
  background: var(--primary);
}

.reminder__text {
  flex: 0 1 auto;
}

.reminder__cta {
  flex: none;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.reminder__cta:hover {
  border-color: currentColor;
}

/* ---------- карточки ---------- */

.card,
.panel,
.chart-frame,
.goal-card,
.plan-group {
  margin-bottom: 0;
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 22px 48px -40px rgba(58, 40, 98, 0.4);
  backdrop-filter: blur(12px);
}

.card__head,
.panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--rule);
}

.card__title,
.panel__title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card__title h2,
.panel__head h2,
.card__head h2,
.panel__title h2 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 640;
  letter-spacing: -0.025em;
}

.card__head > .btn,
.panel__head > .btn,
.panel__head > .text-link {
  flex: none;
}

.card-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--primary-deep);
  background: linear-gradient(140deg, #efe9ff, #ddd0ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px -14px rgba(88, 58, 170, 0.6);
}

.card-icon svg {
  width: 19px;
  height: 19px;
}

.card-icon--peach {
  color: #b1598a;
  background: linear-gradient(140deg, #ffeaf4, #ffd8c6);
}

.card-icon--blue {
  color: #3f78bd;
  background: linear-gradient(140deg, #e9f3ff, #d0e5ff);
}

.card-icon--cream {
  color: #9a713c;
  background: linear-gradient(140deg, #fff7ea, #f5e4cb);
}

.panel__stamp {
  flex: none;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(241, 237, 253, 0.7);
  color: var(--ink-faint);
  font-size: 10.5px;
  white-space: nowrap;
}

.panel__figures {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  color: var(--ink-faint);
  font-size: 11.5px;
}

.panel__figures b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.panel__hint {
  margin: 0 0 14px;
  padding: 10px 13px;
  border-radius: 14px;
  background: var(--accent-quiet);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.45;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

/* ---------- списки дня ---------- */

.day-list,
.habit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.day-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--rule-soft);
}

.day-row:last-child,
.habit-row:last-child {
  border-bottom: 0;
}

.check {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  padding: 0;
  border: 1.5px solid var(--rule-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.75);
  color: transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.check:hover {
  border-color: var(--primary);
}

.check[aria-checked="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.check__mark {
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.check[aria-checked="true"] .check__mark {
  opacity: 1;
  transform: scale(1);
}

.check.is-busy,
.habit-check.is-busy,
.week-cell.is-busy,
.month-cell.is-busy,
.quick-habit__check.is-busy {
  opacity: 0.55;
  cursor: progress;
}

.day-row__body {
  flex: 1;
  min-width: 0;
}

.day-row__title {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.4;
}

.day-row.is-done .day-row__title {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-strong);
}

.link-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}

.link-chips__label {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 550;
}

.habit-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.habit-chip:hover {
  border-color: rgba(123, 92, 240, 0.4);
  color: var(--primary);
}

.habit-chip__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rule-strong);
}

.habit-chip.is-marked {
  border-color: rgba(123, 92, 240, 0.28);
  background: var(--primary-quiet);
  color: var(--primary-deep);
}

.habit-chip.is-marked .habit-chip__dot {
  background: var(--sage);
}

.habit-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--rule-soft);
}

.habit-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1.5px solid var(--rule-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  color: transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.habit-check:hover {
  border-color: var(--sage);
}

.habit-check svg {
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.habit-check[aria-checked="true"] {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

.habit-check[aria-checked="true"] svg {
  opacity: 1;
  transform: scale(1);
}

.habit-row__body {
  flex: 1;
  min-width: 0;
}

.habit-row__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.habit-row__title {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.4;
}

.streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f8f5fd;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
}

.streak.is-hot {
  background: #fff1f7;
  color: #a84477;
}

.streak__flame {
  display: inline-block;
  width: 7px;
  height: 9px;
  border-radius: 50% 50% 50% 0;
  background: var(--rule-strong);
  transform: rotate(-45deg);
}

.streak.is-hot .streak__flame {
  background: linear-gradient(140deg, #f0a6cf, #f7c6ad);
}

.streak__flame--big {
  width: 12px;
  height: 16px;
}

.habit-week {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.week-cell {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.week-cell:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.week-cell.is-marked {
  border-color: transparent;
  background: linear-gradient(140deg, #e9e1ff, #f6e6fb);
  color: var(--primary-deep);
}

.week-cell.is-today {
  box-shadow: 0 0 0 1.5px var(--accent);
}

.week-cell.is-marked.is-today {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: none;
}

.goal-line {
  display: grid;
  grid-template-columns: auto minmax(40px, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.goal-line__count {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10px;
}

.goal-line__bar {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rule-soft);
}

.goal-line__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  transition: width 0.4s ease;
}

.goal-line__label {
  color: var(--ink-faint);
  font-size: 9.5px;
  white-space: nowrap;
}

.money-node__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 12px;
}

.money-node__grid > div {
  padding: 13px 14px;
  border: 1px solid var(--rule-soft);
  border-radius: 16px;
  background: #f8f6fb;
}

.money-node__grid dt {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 550;
}

.money-node__grid dd {
  margin: 4px 0 0;
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.money-node__grid dd.is-over {
  color: var(--vermilion);
}

.notch-badge,
.calm-badge {
  flex: none;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
}

.notch-badge {
  background: var(--danger-quiet);
  color: var(--vermilion);
}

.calm-badge {
  background: var(--sage-quiet);
  color: #1f7a65;
}

/* ---------- категории ---------- */

.cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cat-row {
  padding: 12px 2px;
  border-bottom: 1px solid var(--rule-soft);
}

.cat-row:last-child {
  border-bottom: 0;
}

.cat-row__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cat-row__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

.cat-row__name::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 3px;
  background: var(--cat-accent, var(--primary));
}

.cat-row__nums {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.cat-row__nums b {
  color: var(--ink);
  font-weight: 600;
}

.cat-bar {
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rule-soft);
}

.cat-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cat-accent, var(--primary));
  transition: width 0.4s ease;
}

.cat-row__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.cat-row__pct {
  font-family: var(--font-mono);
}

.cat-row.is-over .cat-bar i,
.cat-row.is-over .cat-row__name::before {
  background: var(--vermilion);
}

.cat-row.is-over .cat-row__foot {
  color: var(--vermilion);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
}

.badge--over {
  background: var(--danger-quiet);
  color: var(--vermilion);
}

.cat-row--sage {
  --cat-accent: #57b79a;
}

.cat-row--amber {
  --cat-accent: #e6a35c;
}

.cat-row--primary {
  --cat-accent: #8b6bf2;
}

.cat-row--plum {
  --cat-accent: #b98bb8;
}

.cat-more {
  margin-top: 8px;
}

.cat-more summary {
  display: inline-block;
  border-bottom: 1px solid transparent;
  color: var(--primary);
  font-size: 10.5px;
  cursor: pointer;
  list-style: none;
}

.cat-more summary::-webkit-details-marker {
  display: none;
}

.cat-more summary:hover {
  border-color: currentColor;
}

.cat-more summary::after {
  content: " +";
  font-family: var(--font-mono);
}

.cat-more[open] summary::after {
  content: " −";
}

.cat-more[open] .inline-form,
.cat-more[open] .mini-list,
.cat-more[open] p {
  animation: reveal 0.22s ease both;
}

.mini-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 11px;
}

.mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dotted var(--rule);
}

.mini-list li span:first-child {
  flex: none;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}

.mini-list li span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-list li b {
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- пустые состояния и демо ---------- */

.empty {
  margin: 12px 0;
  padding: 20px;
  border: 1px dashed var(--rule-strong);
  border-radius: 18px;
  background: rgba(248, 246, 251, 0.7);
}

.empty--compact {
  margin: 8px 0;
  padding: 16px;
}

.empty__title {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 620;
}

.empty__text {
  max-width: 54ch;
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.demo-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: var(--grad-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.demo-note__tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

.demo-note__text {
  flex: 1;
  min-width: 220px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- заголовки старых страниц ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-head__text {
  min-width: 0;
}

.page-head h1 {
  margin: 6px 0 8px;
  font-size: clamp(2.4rem, 4.6vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.page-head__lede {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.page-head__stats {
  display: flex;
  gap: 20px;
  flex: none;
  color: var(--ink-faint);
  font-size: 10.5px;
  text-align: right;
  white-space: nowrap;
}

.page-head__stats b {
  display: block;
  color: var(--ink);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.15;
}

#plans,
#habits,
#money-node,
#money,
#budget,
#money-flow,
#obligations,
#expected-incomes,
#savings,
#assistant,
#limits {
  scroll-margin-top: 110px;
}

/* ---------- планы ---------- */

.panel--entry {
  background:
    radial-gradient(120% 100% at 100% 0, rgba(240, 166, 207, 0.13), transparent 58%),
    rgba(255, 255, 255, 0.86);
}

.plan-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.plan-group {
  position: relative;
  overflow: hidden;
}

.plan-group::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--grad);
  opacity: 0;
}

.plan-group--today::before {
  opacity: 1;
}

.plan-group .day-list {
  margin-top: 4px;
}

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.group-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 630;
}

.group-head span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f6f3fb;
  color: var(--ink-faint);
  font-size: 10.5px;
  white-space: nowrap;
}

.plan-group--today .group-head h2 {
  color: var(--primary-deep);
}

.past-plans {
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.past-plans > summary {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
}

.past-plans[open] > summary {
  margin-bottom: 14px;
  color: var(--ink);
}

.plan-group--past {
  opacity: 0.92;
}

/* ---------- финансы: зоны ---------- */

.money-zone {
  margin-bottom: clamp(24px, 3vw, 34px);
}

.zone-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 14px;
  padding: 0 4px;
}

.zone-head__index {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary-deep);
  font-family: var(--font-mono);
  font-size: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.zone-head h2 {
  margin: 2px 0 0;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 640;
}

.zone-head__note {
  max-width: 68ch;
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.zone-head--quiet {
  opacity: 0.95;
}

.now-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 24px 36px;
  padding: clamp(22px, 2.6vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  background:
    radial-gradient(90% 80% at 96% 4%, rgba(255, 255, 255, 0.8), transparent 52%),
    radial-gradient(70% 70% at 4% 100%, rgba(156, 200, 245, 0.35), transparent 62%),
    linear-gradient(130deg, rgba(199, 179, 255, 0.42), rgba(240, 166, 207, 0.28) 58%, rgba(248, 201, 176, 0.32));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 30px 60px -44px rgba(123, 92, 240, 0.5);
  backdrop-filter: blur(12px);
}

.now-card.is-short,
.now-card.is-empty {
  background:
    radial-gradient(90% 80% at 96% 4%, rgba(255, 255, 255, 0.8), transparent 52%),
    linear-gradient(130deg, rgba(255, 218, 226, 0.55), rgba(248, 201, 176, 0.3) 60%, rgba(255, 255, 255, 0.4));
}

.now-card__amount {
  margin: 10px 0 12px;
  font-size: clamp(2.7rem, 5.4vw, 4.1rem);
  font-weight: 650;
  line-height: 0.96;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.now-card.is-short .now-card__amount,
.now-card.is-empty .now-card__amount {
  color: #8a2541;
}

.now-card__verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.budget-verdict {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

.budget-verdict--ok {
  background: rgba(255, 255, 255, 0.72);
  color: #256e5b;
}

.budget-verdict--short {
  background: #fbe3e9;
  color: #9c2745;
}

.budget-verdict--empty {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
}

.now-card__note {
  max-width: 56ch;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.now-card__perday {
  margin: 8px 0 0;
  color: var(--ink-faint);
  font-size: 11.5px;
}

.now-card__perday b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
}

.now-card__side {
  margin: 0;
  padding: 6px 0 6px 24px;
  border-left: 1px solid rgba(26, 22, 34, 0.1);
}

.now-card__side > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(26, 22, 34, 0.1);
}

.now-card__side > div:last-child {
  border-bottom: 0;
}

.now-card__side dt {
  color: rgba(26, 22, 34, 0.58);
  font-size: 10px;
  font-weight: 550;
}

.now-card__side dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.now-card__side dd.is-alarm {
  color: var(--vermilion);
}

.now-foot {
  margin: 14px 2px 0;
}

.now-meter {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.now-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
}

.now-foot__text {
  margin: 9px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.now-details {
  margin-top: 6px;
}

.now-details > summary {
  display: inline-block;
  border-bottom: 1px solid transparent;
  color: var(--primary);
  font-size: 11px;
  cursor: pointer;
  list-style: none;
}

.now-details > summary::-webkit-details-marker {
  display: none;
}

.now-details[open] > summary {
  color: var(--ink-soft);
}

.now-details p {
  max-width: 82ch;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.finance-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.finance-split .panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ---------- drawers ---------- */

.drawer {
  margin: 0 0 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.drawer > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}

.drawer > summary::-webkit-details-marker {
  display: none;
}

.drawer__title {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 620;
}

.drawer__hint {
  flex: 1;
  min-width: 180px;
  color: var(--ink-faint);
  font-size: 11px;
}

.drawer__meta {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f6f3fb;
  color: var(--ink-faint);
  font-size: 10px;
  white-space: nowrap;
}

.drawer__body {
  padding: 0 20px 20px;
  animation: reveal 0.22s ease both;
}

.drawer[open] > summary {
  border-bottom: 1px solid var(--rule);
}

.inline-drawer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.inline-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}

.inline-drawer > summary::-webkit-details-marker {
  display: none;
}

.inline-drawer > summary::after {
  content: "+";
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 16px;
}

.inline-drawer[open] > summary::after {
  content: "−";
}

.inline-drawer--category {
  margin-top: 18px;
}

.panel-drawer {
  margin: 0 0 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.panel-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}

.panel-drawer > summary::-webkit-details-marker {
  display: none;
}

.panel-drawer > summary::after {
  content: "+";
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 16px;
}

.panel-drawer[open] > summary::after {
  content: "−";
}

.panel-drawer[open] > summary {
  margin-bottom: 10px;
  color: var(--ink);
}

/* ---------- лента денег ---------- */

.money-flow__status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 12px;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
}

.money-flow__status-mark {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: currentColor;
}

.money-flow__status--alarm {
  background: var(--danger-quiet);
  color: var(--vermilion);
}

.money-flow__status--ok {
  background: var(--sage-quiet);
  color: #256e5b;
}

.money-flow__status--ok .money-flow__status-mark {
  background: var(--sage);
}

.money-flow__status--empty {
  background: var(--primary-quiet);
  color: var(--ink-soft);
}

.flow-scroll {
  max-height: 500px;
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: 16px;
}

.flow-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.flow-table th,
.flow-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule-soft);
  text-align: left;
  vertical-align: top;
}

.flow-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f2f9;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 550;
}

.flow-table tbody tr:last-child th,
.flow-table tbody tr:last-child td {
  border-bottom: 0;
}

.flow-row.is-negative {
  background: var(--danger-quiet);
}

.flow-row.is-today {
  box-shadow: inset 3px 0 0 var(--accent);
}

.flow-row.is-shortfall {
  outline: 1px solid var(--vermilion);
  outline-offset: -1px;
}

.flow-day {
  white-space: nowrap;
}

.flow-day b {
  display: inline-block;
  min-width: 18px;
  font-size: 14px;
  font-weight: 620;
}

.flow-day span {
  display: block;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.flow-day .flow-day__today {
  color: var(--primary);
  font-weight: 600;
}

.flow-cell {
  min-width: 130px;
}

.flow-item {
  display: block;
  font-size: 11.5px;
  white-space: nowrap;
}

.flow-item + .flow-item {
  margin-top: 2px;
}

.flow-item--in {
  color: #257a66;
}

.flow-item--out {
  color: var(--ink-soft);
}

.flow-item--saved {
  color: var(--primary);
}

.flow-empty {
  color: var(--ink-faint);
}

.flow-item.flow-item--total {
  margin-top: 4px;
  padding-top: 3px;
  border-top: 1px dashed var(--rule);
  font-weight: 620;
}

.flow-note {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.35;
}

.flow-table tfoot th,
.flow-table tfoot td {
  padding: 10px;
  border-top: 1px solid var(--rule);
  background: #f7f4fb;
  vertical-align: top;
}

.flow-table tfoot th {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.flow-table__balance {
  text-align: right !important;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.flow-balance.is-negative {
  color: var(--vermilion);
  font-weight: 600;
}

.money-flow__note {
  margin: 10px 0 0;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.55;
}

/* ---------- обязательные платежи ---------- */

.promise-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promise-row {
  border-bottom: 1px solid var(--rule-soft);
  transition: background 0.16s ease;
}

.promise-row:last-child {
  border-bottom: 0;
}

.promise-row:hover {
  background: rgba(241, 237, 253, 0.5);
}

.promise-row__main {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 12px;
  padding: 12px 2px 10px;
}

.promise-row__date {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.promise-row__date b {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
}

.promise-row__date span {
  color: var(--ink-faint);
  font-size: 9px;
}

.promise-row__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.promise-row__title {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promise-row__meta {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.promise-row__amount {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.promise-row__amount.is-income {
  color: #257a66;
}

.promise-row.is-inactive {
  opacity: 0.55;
}

.promise-row.is-soon .promise-row__date b {
  color: var(--vermilion);
}

.promise-row__more {
  margin: 0 2px 10px;
}

.promise-row__more > summary {
  display: inline-block;
  border-bottom: 1px solid transparent;
  color: var(--ink-faint);
  font-size: 10.5px;
  cursor: pointer;
  list-style: none;
}

.promise-row__more > summary::-webkit-details-marker {
  display: none;
}

.promise-row__more > summary:hover {
  color: var(--primary);
  border-color: currentColor;
}

.promise-edit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  align-items: end;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: #f9f7fc;
}

.promise-form {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.promise-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 12px;
}

/* ---------- копилки ---------- */

.piggy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.piggy-card {
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 100% 0, rgba(240, 166, 207, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.78);
}

.piggy-card--done {
  background:
    radial-gradient(120% 90% at 100% 0, rgba(87, 183, 154, 0.15), transparent 55%),
    rgba(255, 255, 255, 0.78);
}

.piggy-card--impossible,
.piggy-card--overdue {
  background:
    radial-gradient(120% 90% at 100% 0, rgba(217, 70, 107, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.78);
}

.piggy-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.piggy-card__head h3 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 630;
}

.piggy-status {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f4f1fa;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.piggy-status--done {
  background: var(--sage-quiet);
  color: #1f7a65;
}

.piggy-status--impossible,
.piggy-status--overdue {
  background: var(--danger-quiet);
  color: var(--vermilion);
}

.piggy-figure {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.piggy-figure__score b {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.piggy-figure__score {
  color: var(--ink-faint);
  font-size: 11px;
}

.piggy-figure__money {
  color: var(--ink-faint);
  font-size: 11px;
  text-align: right;
}

.piggy-figure__money b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
}

.piggy-progress {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rule-soft);
}

.piggy-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
}

.piggy-figures {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.piggy-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.piggy-plan > div {
  padding: 10px;
  border-radius: 13px;
  background: rgba(248, 246, 251, 0.9);
}

.piggy-plan dt {
  color: var(--ink-faint);
  font-size: 9.5px;
}

.piggy-plan dd {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.piggy-shared {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--accent-quiet);
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.45;
}

.piggy-note {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.piggy-note--impossible,
.piggy-note--overdue {
  color: var(--vermilion);
}

.piggy-deposit {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 12px;
}

.piggy-deposit .field {
  flex: 1;
}

.piggy-edit,
.savings-create {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.piggy-edit > summary,
.savings-create > summary {
  display: inline-block;
  border-bottom: 1px solid transparent;
  color: var(--primary);
  font-size: 10.5px;
  cursor: pointer;
  list-style: none;
}

.piggy-edit > summary::-webkit-details-marker,
.savings-create > summary::-webkit-details-marker {
  display: none;
}

.savings-create {
  margin-top: 18px;
}

.secondary-zone {
  margin-top: 8px;
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.finance-grid .panel {
  height: 100%;
}

.inline-form--category {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

/* ---------- таблицы ---------- */

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.ledger-table th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 550;
  text-align: left;
}

.ledger-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}

.ledger-table tbody tr:last-child td {
  border-bottom: 0;
}

.ledger-table tbody tr:hover {
  background: rgba(241, 237, 253, 0.45);
}

.ledger-table .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.ledger-table .is-income {
  color: #257a66;
}

.tx-kind {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f2eff7;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 550;
}

.tx-kind--income {
  background: var(--sage-quiet);
  color: #1f7a65;
}

.row-action {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--ink-faint);
  font-size: 10.5px;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.row-action:hover {
  color: var(--primary);
  border-color: currentColor;
}

.row-action--danger:hover {
  color: var(--vermilion);
}

.row-action-cell {
  text-align: right;
}

.row-action-cell .row-action + .row-action {
  margin-left: 12px;
}

.ledger-table tr[hidden] {
  display: none;
}

.tx-edit-row > td {
  padding: 0 10px 12px;
  background: rgba(241, 237, 253, 0.35);
}

.tx-edit {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: #fff;
}

.tx-edit__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.tx-edit__note {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.tx-edit__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.table-goal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 150px;
}

.table-goal__bar {
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rule-soft);
}

.table-goal__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
}

.table-goal span:last-child {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

/* ---------- аналитика ---------- */

.analytics-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.chart-frame--donut {
  grid-column: 1 / -1;
}

.chart-frame__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.chart-frame h2 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 630;
}

.chart-frame__stamp {
  flex: none;
  color: var(--ink-faint);
  font-size: 10px;
  white-space: nowrap;
}

.chart-canvas {
  position: relative;
  height: 290px;
}

.chart-empty,
.chart-failed {
  display: grid;
  place-content: center;
  gap: 10px;
  min-height: 240px;
  padding: 20px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.chart-empty p,
.chart-failed p {
  max-width: 38ch;
  margin: 0 auto;
}

.chart-failed {
  border: 1px dashed rgba(217, 70, 107, 0.4);
  border-radius: 16px;
  color: var(--vermilion);
}

.donut-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.donut-canvas {
  height: 260px;
}

.donut-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.donut-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 12px;
}

.donut-list__row:last-child {
  border-bottom: 0;
}

.donut-list__name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.donut-list__share {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.donut-list__sum {
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
}

.breakdown__row {
  display: grid;
  grid-template-columns: minmax(130px, 1.1fr) 2fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 12px;
}

.breakdown__row:last-child {
  border-bottom: 0;
}

.breakdown__name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.breakdown__bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rule-soft);
}

.breakdown__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
}

.breakdown__sum {
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.breakdown__limit {
  min-width: 74px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-align: right;
  white-space: nowrap;
}

.swatch {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--primary);
}

.swatch--sage {
  background: #57b79a;
}

.swatch--amber {
  background: #e6a35c;
}

.swatch--primary {
  background: #8b6bf2;
}

.swatch--plum {
  background: #b98bb8;
}

/* ---------- серии и цели ---------- */

.goal-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.goal-card {
  min-width: 0;
}

.goal-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--rule);
}

.goal-card__title {
  flex: 1;
  min-width: 0;
}

.goal-card__title h2 {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 640;
}

.goal-card__streak {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 8px 12px;
  border-radius: 16px;
  background: #fff3f8;
}

.goal-card__streak-value {
  font-size: 24px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
}

.goal-card__streak-label {
  width: 100%;
  color: #a84477;
  font-size: 9px;
  text-align: right;
}

.goal-card__progress {
  padding: 16px 0 4px;
}

.goal-card__score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.goal-card__score b {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.05em;
}

.goal-card__score span {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.goal-card__figures {
  display: flex;
  gap: 22px;
  margin: 10px 0 0;
}

.goal-card__figure-label {
  display: block;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.goal-card__figure-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.goal-card__figure-value small {
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 400;
}

.goal-bar {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rule-soft);
}

.goal-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  transition: width 0.4s ease;
}

.goal-card__note {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.5;
}

.month-details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.month-details > summary {
  display: inline-block;
  border-bottom: 1px solid transparent;
  color: var(--primary);
  font-size: 10.5px;
  cursor: pointer;
  list-style: none;
}

.month-details > summary::-webkit-details-marker {
  display: none;
}

.month-details > summary::after {
  content: " +";
  font-family: var(--font-mono);
}

.month-details[open] > summary::after {
  content: " −";
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin: 12px 0;
}

.month-grid__dow {
  color: var(--ink-faint);
  font-size: 8.5px;
  text-align: center;
}

.month-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.month-cell:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.month-cell.is-marked {
  border-color: transparent;
  background: var(--primary);
  color: var(--on-primary);
}

.month-cell.is-today {
  box-shadow: 0 0 0 2px var(--accent);
}

.month-cell.is-future {
  opacity: 0.32;
  cursor: default;
}

/* ---------- ассистент внутри финансов ---------- */

.assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.assistant-brief {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(248, 246, 251, 0.85);
}

.insight-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.insight {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.insight__mark {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.insight--over .insight__mark,
.insight--warn .insight__mark {
  background: var(--vermilion);
}

.insight--done .insight__mark {
  background: var(--sage);
}

.assistant-brief__note {
  margin: 10px 0 0;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.5;
}

/* ---------- CTA-полоса ---------- */

.cta-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 6px 18px 18px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background:
    radial-gradient(80% 140% at 100% 0, rgba(240, 166, 207, 0.24), transparent 60%),
    linear-gradient(120deg, rgba(199, 179, 255, 0.28), rgba(156, 200, 245, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.cta-bar__spark {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--grad);
  color: var(--ink);
  box-shadow: 0 12px 24px -16px rgba(123, 92, 240, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.cta-bar__spark svg {
  width: 19px;
  height: 19px;
}

.cta-bar__text {
  flex: 1;
  min-width: 200px;
}

.cta-bar__text b {
  display: block;
  font-size: 14px;
  font-weight: 640;
}

.cta-bar__text span {
  display: block;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.cta-bar .btn {
  flex: none;
}

/* ---------- диалоги ---------- */

.quick,
.confirm,
.help {
  width: min(580px, calc(100vw - 32px));
  max-height: min(90vh, 860px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
  box-shadow: 0 50px 120px -48px rgba(40, 24, 80, 0.65);
}

.quick::backdrop,
.confirm::backdrop,
.help::backdrop {
  background: rgba(38, 28, 60, 0.38);
  backdrop-filter: blur(6px);
}

.quick[open],
.confirm[open],
.help[open] {
  animation: dialog-in 0.24s ease both;
}

.quick__head,
.help__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 14px;
}

.quick__head h2,
.help__head h2 {
  margin: 3px 0 0;
  font-size: 24px;
  font-weight: 650;
}

.quick__tabs {
  display: flex;
  gap: 4px;
  margin: 0 20px 14px;
  padding: 4px;
  border-radius: 999px;
  background: #f3f0f8;
}

.quick__tab {
  flex: 1;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.quick__tab:hover {
  color: var(--ink);
}

.quick__tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 6px 16px -12px rgba(58, 40, 98, 0.6);
}

.quick__body {
  max-height: calc(90vh - 190px);
  padding: 4px 24px 24px;
  overflow: auto;
}

.quick__loading {
  margin: 0;
  padding: 30px 0;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
}

.quick__error {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 0;
  color: var(--vermilion);
  font-size: 13px;
  text-align: center;
}

.quick__error p {
  margin: 0;
}

.quick__shortcut-note {
  margin: 0 20px 12px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--primary-quiet);
  color: var(--ink-soft);
  font-size: 11.5px;
}

.quick-pane {
  display: none;
}

.quick-pane.is-active {
  display: block;
  animation: reveal 0.2s ease both;
}

.quick-hint {
  margin: 0 0 12px;
  color: var(--ink-faint);
  font-size: 12px;
}

.quick-habits {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.quick-habit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: #f9f7fc;
}

.quick-habit.is-marked {
  border-color: rgba(87, 183, 154, 0.35);
  background: var(--sage-quiet);
}

.quick-habit__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.quick-habit__title {
  font-size: 13.5px;
  font-weight: 550;
}

.quick-habit__meta {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.quick-habit__check {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1.5px solid var(--rule-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: transparent;
  cursor: pointer;
}

.quick-habit__check svg {
  width: 18px;
  height: 18px;
}

.quick-habit__check.is-on {
  border-color: var(--sage);
  background: var(--sage);
  color: #fff;
}

.quick-link {
  display: inline-block;
  margin-top: 4px;
}

.quick-spend {
  display: grid;
  grid-template-columns: minmax(84px, 0.9fr) minmax(110px, 1.1fr) auto;
  align-items: start;
  gap: 8px;
  margin-bottom: 14px;
}

.quick-spend .field {
  gap: 0;
}

.quick-spend .field > span {
  display: none;
}

.quick-spend .btn--spend {
  padding: 12px 14px;
  font-size: 11.5px;
}

.quick-repeat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 12px;
  padding: 11px 13px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: #f9f7fc;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.quick-repeat:hover {
  border-color: rgba(123, 92, 240, 0.35);
  background: var(--primary-quiet);
}

.quick-repeat__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--primary);
  font-size: 17px;
  box-shadow: 0 6px 14px -12px rgba(58, 40, 98, 0.5);
}

.quick-repeat__body {
  min-width: 0;
}

.quick-repeat__body b {
  display: block;
  font-size: 12.5px;
}

.quick-repeat__body small {
  display: block;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-cats {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.quick-cats legend {
  margin-bottom: 6px;
  padding: 0;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 550;
}

.quick-cats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.quick-cat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--rule);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.quick-cat:hover {
  border-color: rgba(123, 92, 240, 0.4);
}

.quick-cat.is-selected {
  border-color: rgba(123, 92, 240, 0.45);
  background: var(--primary-quiet);
}

.quick-cat__name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-cat__meta {
  color: var(--ink-faint);
  font-size: 10px;
}

.quick-cat--sage {
  border-left: 3px solid #57b79a;
}

.quick-cat--amber {
  border-left: 3px solid #e6a35c;
}

.quick-cat--primary {
  border-left: 3px solid #8b6bf2;
}

.quick-cat--plum {
  border-left: 3px solid #b98bb8;
}

.confirm {
  width: min(520px, calc(100vw - 32px));
  padding: 24px;
}

.confirm__title {
  margin: 6px 0 8px;
  font-size: 24px;
  font-weight: 650;
}

.confirm__text {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.noscript-note {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1000;
  max-width: 340px;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11.5px;
  box-shadow: var(--shadow-soft);
}

/* ---------- помощник ---------- */

.help {
  width: min(780px, calc(100vw - 32px));
}

.help__body {
  max-height: calc(90vh - 96px);
  padding: 4px 24px 24px;
  overflow: auto;
}

.assistant-stage {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(90% 100% at 0 0, rgba(199, 179, 255, 0.35), transparent 60%),
    radial-gradient(90% 100% at 100% 100%, rgba(156, 200, 245, 0.3), transparent 62%),
    #f8f6fb;
}

.assistant-bot-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.assistant-bot {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  animation: bot-float 4.6s ease-in-out infinite;
}

.assistant-bot.is-happy {
  animation: bot-happy 0.5s ease;
}

.assistant-bot__caption {
  margin: 0;
  color: var(--ink-faint);
  font-size: 9.5px;
  text-align: center;
}

.bot {
  position: relative;
  display: inline-block;
  width: 118px;
  padding-top: 15px;
}

.bot__antenna {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 16px;
  border-radius: 2px;
  background: #9d86ef;
  transform: translateX(-50%);
}

.bot__antenna i {
  position: absolute;
  top: -5px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(240, 166, 207, 0.22);
}

.bot__head {
  position: relative;
  display: block;
  width: 112px;
  height: 88px;
  border-radius: 30px;
  background: linear-gradient(145deg, #cdbdff, #8b6bf2);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 20px 32px -22px rgba(90, 60, 180, 0.7);
}

.bot__ear {
  position: absolute;
  top: 30px;
  width: 8px;
  height: 26px;
  border-radius: 4px;
  background: #b7a3fb;
}

.bot__ear--left {
  left: -5px;
}

.bot__ear--right {
  right: -5px;
}

.bot__face {
  position: absolute;
  inset: 12px 12px 9px;
  border-radius: 22px;
  background: linear-gradient(160deg, #fdfbff, #e9e1ff);
  box-shadow: inset 0 1px 4px rgba(80, 50, 150, 0.14);
}

.bot__eye {
  position: absolute;
  top: 16px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2a2140;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.bot__eye--left {
  left: 15px;
}

.bot__eye--right {
  right: 15px;
}

.bot__pupil {
  color: #f6c7dc;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.bot__blush {
  position: absolute;
  top: 42px;
  width: 12px;
  height: 7px;
  border-radius: 50%;
  background: rgba(240, 166, 207, 0.65);
  filter: blur(1px);
}

.bot__blush--left {
  left: 10px;
}

.bot__blush--right {
  right: 10px;
}

.bot__mouth {
  position: absolute;
  bottom: 12px;
  left: 50%;
  width: 16px;
  height: 7px;
  border: 2px solid #6d56a8;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  transform: translateX(-50%);
}

.bot__body {
  position: relative;
  display: block;
  width: 82px;
  height: 50px;
  margin: -4px auto 0;
  border-radius: 18px 18px 26px 26px;
  background: linear-gradient(160deg, #b9a4ff, #8b6bf2);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 14px 24px -20px rgba(90, 60, 180, 0.7);
}

.bot__chest {
  position: absolute;
  top: 10px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fdfbff;
  color: #7b5cf0;
  font-size: 10px;
  font-weight: 700;
  transform: translateX(-50%);
}

.bot__arm {
  position: absolute;
  top: 8px;
  width: 9px;
  height: 28px;
  border-radius: 6px;
  background: #a78bf6;
}

.bot__arm--left {
  left: -7px;
  transform: rotate(12deg);
}

.bot__arm--right {
  right: -7px;
  transform: rotate(-12deg);
}

.assistant-thought {
  position: relative;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 34px -30px rgba(58, 40, 98, 0.55);
}

.assistant-thought__tail {
  position: absolute;
  top: 34px;
  left: -7px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.9);
  transform: rotate(45deg);
}

.assistant-thought__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.assistant-thought__who {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 600;
}

.assistant-thought__badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-quiet);
  color: var(--primary);
  font-size: 9.5px;
}

.assistant-thought__text {
  max-height: 210px;
  overflow: auto;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.assistant-thought__text.is-typing {
  opacity: 0.7;
}

.assistant-thought.is-error {
  border-color: rgba(217, 70, 107, 0.3);
}

.assistant-thought.is-fresh {
  animation: reveal 0.26s ease both;
}

.assistant-thought__sources,
.assistant-thought__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.assistant-thought__sources a,
.assistant-thought__actions a,
.assistant-thought__actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font-size: 10.5px;
  text-decoration: none;
  cursor: pointer;
}

.assistant-thought__meta {
  margin: 9px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.assistant-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.assistant-search {
  flex: 1;
}

.assistant-search .input {
  border-radius: 999px;
  padding: 12px 18px;
}

.assistant-form .btn {
  flex: none;
  padding: 12px 20px;
}

.assistant-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.assistant-chip {
  padding: 7px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  font-size: 10.5px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.assistant-chip:hover {
  border-color: rgba(123, 92, 240, 0.4);
  background: var(--primary-quiet);
  color: var(--primary-deep);
}

.assistant-hintline {
  margin: 12px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.5;
}

.assistant-error {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--danger-quiet);
  color: var(--vermilion);
  font-size: 11.5px;
}

.help__map {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.help__map-title {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 550;
  margin-right: 2px;
}

.help__map a {
  padding: 5px 11px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 10.5px;
  text-decoration: none;
}

.help__map a:hover {
  border-color: rgba(123, 92, 240, 0.4);
  color: var(--primary);
}

/* ---------- уведомления ---------- */

.toasts {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(460px, calc(100vw - 24px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 16px;
  background: rgba(26, 22, 34, 0.94);
  color: #f8f6fb;
  font-size: 12.5px;
  line-height: 1.4;
  box-shadow: 0 22px 44px -24px rgba(26, 22, 34, 0.7);
  backdrop-filter: blur(12px);
  animation: toast-in 0.22s ease both;
  pointer-events: auto;
}

.toast--error {
  border-left: 3px solid var(--accent);
}

.toast--success {
  border-left: 3px solid #5ec4a7;
}

.toast__text {
  flex: 1;
}

.toast__action {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 10.5px;
  cursor: pointer;
}

.toast__close {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- вход ---------- */

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(14px, 3vw, 34px);
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  width: min(1060px, 100%);
  min-height: min(680px, calc(100vh - 64px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 60px 120px -60px rgba(58, 40, 98, 0.55);
  backdrop-filter: blur(24px);
}

.login-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(26px, 4vw, 48px);
  background:
    radial-gradient(80% 70% at 84% 8%, rgba(255, 255, 255, 0.7), transparent 55%),
    radial-gradient(70% 60% at 10% 90%, rgba(156, 200, 245, 0.8), transparent 60%),
    linear-gradient(135deg, #c7b3ff 0%, #dcb0f5 34%, #f0a6cf 66%, #f8c9b0 100%);
  color: var(--ink);
}

.login-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.login-brand__text {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.login-cover__body {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 46px;
}

.login-cover h1 {
  margin: 2px 0 16px;
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  font-weight: 650;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.login-cover__lede {
  max-width: 38ch;
  margin: 0;
  color: rgba(26, 22, 34, 0.72);
  font-size: 13.5px;
  line-height: 1.55;
}

.login-orb {
  position: absolute;
  top: 18%;
  right: -34px;
  z-index: 1;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 30px 60px -30px rgba(90, 60, 180, 0.5);
  transform: rotate(-7deg);
  backdrop-filter: blur(14px);
}

.login-orb .hero-visual__grid {
  grid-template-columns: repeat(2, 34px);
  grid-template-rows: repeat(2, 34px);
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.login-orb .hero-visual__grid i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 10px rgba(90, 60, 150, 0.16);
}

.login-points {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.login-points li {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  color: rgba(26, 22, 34, 0.8);
  font-size: 10.5px;
  font-weight: 550;
  backdrop-filter: blur(8px);
}

.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(26px, 4vw, 54px);
}

.login-panel__inner {
  width: min(360px, 100%);
}

.login-panel h2 {
  margin: 6px 0 8px;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 650;
  line-height: 1;
}

.login-panel__lede {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-access {
  margin-top: 18px;
}

.login-note {
  margin-top: 20px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 10.5px;
}

/* ---------- ошибка ---------- */

.error-page {
  max-width: 640px;
  padding: clamp(28px, 6vw, 72px) 0;
}

.error-page h1 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 650;
  line-height: 1.02;
}

.error-page__text {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

/* ---------- анимации ---------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bot-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes bot-happy {
  0%,
  100% {
    transform: rotate(0);
  }
  30% {
    transform: rotate(-5deg) scale(1.04);
  }
  70% {
    transform: rotate(5deg) scale(1.04);
  }
}

.pagehero,
.board-card,
.reminder-tape,
.demo-note {
  animation: page-in 0.34s ease both;
}

#page-region {
  transition: opacity 0.2s ease;
}

#page-region.is-refreshing {
  opacity: 0.62;
}

/* ============================================================
   Пастельный дашборд — редизайн по референсу
   Кремовый лист, лавандовая капсула навигации, пастельные
   плитки статистики, мягкие графики-облака и пончик.
   ============================================================ */

body {
  font-weight: 450;
  letter-spacing: 0.002em;
}

h1,
h2,
h3,
h4 {
  font-weight: 800;
  letter-spacing: -0.028em;
}

.eyebrow {
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.055em;
}

.app-frame {
  width: min(calc(100% - 64px), 1240px);
  margin: 26px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 40px;
  background: rgba(255, 253, 250, 0.93);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 44px 100px -58px rgba(96, 72, 130, 0.45),
    0 10px 30px -24px rgba(150, 117, 96, 0.18);
}

.topbar {
  top: 14px;
  margin: 14px 18px 0;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  background: rgba(255, 252, 248, 0.82);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 16px 38px -32px rgba(96, 72, 130, 0.4);
}

.topbar__inner {
  min-height: 64px;
  padding: 7px clamp(12px, 1.6vw, 20px);
}

.brand__mark,
.login-brand .brand__mark {
  width: 36px;
  height: 36px;
  padding: 7px;
  border-radius: 13px;
  background: linear-gradient(145deg, #a78ff5, #8b72ea 55%, #dcb7f7);
  box-shadow:
    0 10px 20px -12px rgba(112, 80, 214, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.brand__text {
  font-size: 17px;
  font-weight: 850;
}

.brand__sub {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 650;
}

.tabs {
  gap: 2px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(238, 232, 250, 0.72);
  box-shadow: inset 0 1px 2px rgba(96, 72, 130, 0.06);
}

.tab {
  padding: 8px 15px;
  border-radius: 999px;
  color: #786d8d;
  font-size: 12.5px;
  font-weight: 700;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.tab::after {
  display: none;
}

.tab:hover {
  color: var(--primary-deep);
  background: rgba(255, 255, 255, 0.55);
}

.tab.is-active {
  color: var(--primary-deep);
  background: var(--surface);
  box-shadow:
    0 8px 16px -12px rgba(96, 72, 130, 0.55),
    inset 0 1px 0 #fff;
}

.nav-more__button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(244, 238, 250, 0.8);
  color: #7c7190;
}

.nav-more__pop {
  border: 1px solid #f1e8f1;
  border-radius: 22px;
  background: #fffdfb;
  box-shadow: 0 28px 60px -30px rgba(96, 72, 130, 0.48);
}

.nav-more__link {
  border-radius: 14px;
  font-weight: 600;
}

.shell {
  padding: clamp(22px, 2.6vw, 32px) clamp(20px, 3vw, 38px) 24px;
}

.pagehero {
  gap: clamp(22px, 3vw, 40px);
  margin: 2px 0 clamp(20px, 2.4vw, 26px);
}

.pagehero__title {
  margin: 10px 0 12px;
  font-size: clamp(2.5rem, 4.4vw, 3.7rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.045em;
}

.pagehero--compact .pagehero__title {
  font-size: clamp(2.1rem, 3.5vw, 3rem);
}

.pagehero__sub {
  margin-top: 9px;
  color: var(--ink-faint);
  font-size: clamp(0.95rem, 1.4vw, 1.16rem);
  font-weight: 650;
}

.pagehero__lede {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.6;
}

.pagehero__meta {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.pagehero__actions {
  margin-top: 20px;
}

.hero-mini {
  gap: 10px;
  margin-top: 22px;
}

.hero-mini > div,
.hero-mini > a {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: linear-gradient(150deg, #f2ecff, #fbf7ff);
  box-shadow:
    0 14px 28px -26px rgba(96, 72, 130, 0.4),
    inset 0 1px 0 #fff;
  backdrop-filter: blur(10px);
}

.hero-mini > div:nth-child(2n),
.hero-mini > a:nth-child(2n) {
  background: linear-gradient(150deg, #fff0e8, #fff9f4);
}

.hero-mini > a {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hero-mini > a:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 32px -24px rgba(96, 72, 130, 0.52),
    inset 0 1px 0 #fff;
  color: inherit;
}

.hero-mini > a:focus-visible {
  outline: 2px solid var(--primary-deep);
  outline-offset: 2px;
}

.hero-mini .hero-mini__verdict {
  margin-top: 4px;
  font-weight: 800;
}

.hero-mini .hero-mini__verdict.is-ok {
  color: #2f8a65;
}

.hero-mini .hero-mini__verdict.is-short {
  color: var(--vermilion);
}

.hero-mini .hero-mini__second {
  display: block;
  margin-top: 7px;
  color: #978ca8;
  font-size: 10px;
  line-height: 1.35;
}

.hero-mini .hero-mini__sub {
  margin-top: 1px;
  color: #403551;
  font-size: 14px;
}

.hero-mini .hero-mini__minus {
  display: block;
  margin-top: 4px;
  color: #6a5c7d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-mini span {
  color: #978ca8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero-mini b {
  margin-top: 4px;
  color: #403551;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.hero-mini small {
  color: #978ca8;
  font-size: 10px;
}

.hero-visual {
  min-height: clamp(300px, 31vw, 380px);
  padding: 28px 26px 42px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 32px;
  background:
    radial-gradient(78% 72% at 16% 10%, rgba(255, 255, 255, 0.72), transparent 58%),
    radial-gradient(62% 62% at 90% 82%, rgba(255, 232, 240, 0.78), transparent 62%),
    linear-gradient(140deg, #cec0fb 0%, #e6c6f7 34%, #f8c6d9 66%, #fbdcc9 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -36px 66px rgba(255, 255, 255, 0.2),
    0 30px 62px -38px rgba(140, 108, 220, 0.55);
}

.hero-visual::before {
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.03) 56%, rgba(255, 255, 255, 0.14));
  backdrop-filter: blur(2px);
}

.hero-visual::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -72px;
  z-index: 0;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  filter: blur(2px);
  pointer-events: none;
}

.hero-visual__grid {
  grid-template-columns: repeat(2, 21px);
  grid-template-rows: repeat(2, 21px);
  gap: 6px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 14px 28px -20px rgba(80, 52, 160, 0.5);
  backdrop-filter: blur(12px);
}

.hero-visual__grid i {
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 2px 4px rgba(90, 60, 150, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.hero-visual__eyebrow {
  color: rgba(53, 46, 72, 0.62);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-visual__amount {
  margin: 10px 0 11px;
  color: #3b3052;
  font-size: clamp(2.7rem, 4.8vw, 4rem);
  font-weight: 850;
  letter-spacing: -0.05em;
}

.hero-visual__amount small {
  color: rgba(53, 46, 72, 0.6);
  font-weight: 750;
}

.hero-visual__note {
  color: rgba(53, 46, 72, 0.72);
  font-size: 12.5px;
  line-height: 1.52;
}

.hero-visual__dots span {
  width: 6px;
  height: 6px;
  background: rgba(53, 46, 72, 0.2);
}

.hero-visual__dots .is-on {
  width: 18px;
  background: rgba(53, 46, 72, 0.55);
}

.hero-visual--small {
  min-height: clamp(270px, 25vw, 320px);
  padding: 24px 24px 36px;
  border-radius: 30px;
}

.hero-visual--small .hero-visual__amount {
  font-size: clamp(2.3rem, 3.8vw, 3.2rem);
}

.btn {
  padding: 11px 20px;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0;
}

.btn--primary {
  background: var(--primary);
  border-color: transparent;
  color: var(--on-primary);
  box-shadow:
    0 14px 26px -18px rgba(112, 80, 214, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.btn--primary:hover {
  background: #7f65e6;
  border-color: transparent;
}

.btn--grad {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--on-primary);
  box-shadow:
    0 16px 30px -20px rgba(112, 80, 214, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn--glass {
  background: rgba(255, 253, 250, 0.72);
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 20px -18px rgba(96, 72, 130, 0.45);
}

.btn--glass:hover {
  border-color: rgba(139, 114, 234, 0.28);
  color: var(--primary-deep);
}

.btn--small {
  padding: 8px 14px;
  font-size: 11.5px;
}

.input {
  padding: 12px 14px;
  border: 1px solid #efe6ee;
  border-radius: 14px;
  background: #fbf7fb;
  font-weight: 550;
}

.input:focus {
  border-color: rgba(139, 114, 234, 0.45);
  box-shadow: 0 0 0 4px rgba(139, 114, 234, 0.12);
}

.field > span,
.field legend {
  color: #988ea8;
  font-size: 11px;
  font-weight: 750;
}

.segmented {
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(239, 233, 250, 0.72);
  box-shadow: inset 0 1px 2px rgba(96, 72, 130, 0.05);
}

.segmented__btn {
  padding: 8px 16px;
  font-weight: 700;
}

.segmented__btn.is-active {
  background: var(--surface);
  color: var(--primary-deep);
  box-shadow: 0 8px 16px -12px rgba(96, 72, 130, 0.55);
}

a.segmented__btn {
  text-align: center;
  text-decoration: none;
}

.operations-filter {
  margin: 4px 0 8px;
}

.operations-filter__note {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.45;
}

.card,
.panel,
.chart-frame,
.goal-card,
.plan-group {
  padding: clamp(18px, 1.9vw, 23px);
  border: 1px solid #f1e8ef;
  border-radius: 26px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow:
    inset 0 1px 0 #fff,
    0 22px 44px -40px rgba(96, 72, 130, 0.32);
  backdrop-filter: blur(8px);
}

.card__head,
.panel__head {
  margin-bottom: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f4ecf2;
}

.card__title h2,
.panel__head h2,
.card__head h2,
.panel__title h2 {
  font-size: 18px;
  font-weight: 800;
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #6f52d9;
  background: linear-gradient(145deg, #f1ebff, #e4d8ff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 16px -14px rgba(88, 58, 170, 0.55);
}

.card-icon--peach {
  color: #c5688f;
  background: linear-gradient(145deg, #fff0f6, #ffdfe6);
}

.card-icon--blue {
  color: #5a8dc9;
  background: linear-gradient(145deg, #eef6ff, #dcebff);
}

.card-icon--cream {
  color: #b2864a;
  background: linear-gradient(145deg, #fff8ec, #f8e8ce);
}

.pill-badge {
  padding: 7px 13px;
  border: 1px solid rgba(139, 114, 234, 0.16);
  background: var(--primary-quiet);
  color: var(--primary-deep);
  font-weight: 750;
}

.panel__stamp,
.chart-frame__stamp {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: #f7f2fa;
  color: #91869f;
  font-size: 10px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 #fff;
}

.board-card {
  padding: 22px clamp(18px, 2.1vw, 26px) 18px;
  border: 1px solid #f1e8ef;
  border-radius: 26px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow:
    inset 0 1px 0 #fff,
    0 22px 44px -40px rgba(96, 72, 130, 0.32);
}

.board-card__head h2 {
  font-size: 20px;
  font-weight: 800;
}

.board-card__meter {
  height: 7px;
  margin: 14px 0 10px;
  background: #f3ecf6;
}

.reminder-tape {
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 253, 250, 0.72);
  box-shadow: inset 0 1px 0 #fff, 0 16px 32px -32px rgba(96, 72, 130, 0.35);
}

.reminder-tape__label {
  background: #4a3f60;
  font-weight: 750;
}

.reminder-tape .reminder {
  border: 1px solid #f0e8ee;
  background: rgba(255, 255, 255, 0.8);
}

/* ---------- пастельные плитки статистики ---------- */

.ledger-strip {
  gap: 13px;
  margin: 0 0 18px;
}

.ledger-strip > .ledger-cell {
  position: relative;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  background: linear-gradient(155deg, #f2edff, #e7dcff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 30px -28px rgba(96, 72, 130, 0.42);
}

.ledger-strip > .ledger-cell:nth-child(4n + 2) {
  background: linear-gradient(155deg, #fff3ec, #ffe2d6);
}

.ledger-strip > .ledger-cell:nth-child(4n + 3) {
  background: linear-gradient(155deg, #edf9f4, #dcf3e8);
}

.ledger-strip > .ledger-cell:nth-child(4n + 4) {
  background: linear-gradient(155deg, #eef6ff, #ddebfc);
}

a.ledger-cell {
  cursor: pointer;
}

a.ledger-cell:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 20px 34px -28px rgba(96, 72, 130, 0.5);
}

a.ledger-cell:focus-visible {
  outline: 2px solid var(--primary-deep);
  outline-offset: 3px;
}

.ledger-cell__label {
  padding-right: 42px;
  color: #8b809d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.ledger-cell__value {
  margin-top: 3px;
  color: #3b3150;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.1vw, 1.95rem);
  font-weight: 850;
  letter-spacing: -0.035em;
}

.ledger-cell__value--money {
  font-size: clamp(1.22rem, 1.7vw, 1.52rem);
}

.ledger-cell__value small {
  color: #8f849f;
  font-weight: 650;
}

.ledger-cell__note {
  color: #8d829c;
  font-size: 10.5px;
}

.ledger-cell__icon {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.66);
  color: #7a5fd8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 12px -10px rgba(96, 72, 130, 0.48);
}

.ledger-cell__icon svg {
  width: 16px;
  height: 16px;
}

.ledger-strip > .ledger-cell:nth-child(4n + 2) .ledger-cell__icon {
  color: #d7829e;
}

.ledger-strip > .ledger-cell:nth-child(4n + 3) .ledger-cell__icon {
  color: #4ea88b;
}

.ledger-strip > .ledger-cell:nth-child(4n + 4) .ledger-cell__icon {
  color: #5f8fcb;
}

.ledger-cell.is-alarm .ledger-cell__value,
.ledger-cell.is-alarm .ledger-cell__note {
  color: var(--vermilion);
}

.board-card .ledger-strip {
  gap: 10px;
  margin-top: 10px;
}

.board-card .ledger-strip > .ledger-cell {
  padding: 12px 14px 11px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 16px;
  background: linear-gradient(155deg, #f6f1ff, #efe7ff);
}

.board-card .ledger-strip > .ledger-cell:nth-child(4n + 2) {
  background: linear-gradient(155deg, #fff7f2, #ffebe1);
}

.board-card .ledger-strip > .ledger-cell:nth-child(4n + 3) {
  background: linear-gradient(155deg, #f3fbf7, #e6f7ef);
}

.board-card .ledger-strip > .ledger-cell:nth-child(4n + 4) {
  background: linear-gradient(155deg, #f4f9ff, #e9f2fd);
}

.board-card .ledger-cell__icon {
  top: 9px;
  right: 9px;
  width: 26px;
  height: 26px;
  border-radius: 9px;
}

.board-card .ledger-cell__icon svg {
  width: 14px;
  height: 14px;
}

.board-card .ledger-cell__label {
  padding-right: 30px;
  font-size: 9.5px;
}

.board-card .ledger-cell__value {
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
}

.board-card .ledger-cell__value--money {
  font-size: clamp(1rem, 1.35vw, 1.2rem);
}

.board-card .ledger-cell__note {
  font-size: 9.5px;
}

.board-card .ledger-cell:hover {
  border-radius: 16px;
  background: #fff;
}

/* ---------- аналитика и графики ---------- */

.period-range {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 #fff;
}

.period-range__field {
  display: grid;
  gap: 3px;
  min-width: 132px;
}

.period-range__field span {
  color: #978ca8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.period-range__field .input {
  min-height: 40px;
}

.period-range .btn {
  min-height: 40px;
}

.period-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ledger-strip--period > .ledger-cell {
  padding: 18px 19px;
}

.ledger-strip--period .ledger-cell__value--money {
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  letter-spacing: -0.04em;
}

.period-totals {
  margin-bottom: 18px;
}

.period-totals__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.period-totals__grid > div {
  padding: 15px 17px;
  border: 1px solid #f1e9f5;
  border-radius: 18px;
  background: linear-gradient(150deg, #fbf8ff, #fffdfb);
}

.period-totals__grid dt {
  color: #8d829c;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.period-totals__grid dd {
  margin: 4px 0 2px;
  color: #3b3150;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.7vw, 1.45rem);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.period-totals__note {
  color: #978ca8;
  font-size: 10.5px;
  line-height: 1.4;
}

.period-totals__grid > div.is-alarm dd,
.period-totals__grid > div.is-alarm .period-totals__note {
  color: var(--vermilion);
}

.analytics-charts {
  gap: 18px;
  margin-bottom: 18px;
}

.chart-frame {
  padding: 20px 20px 14px;
  background: #fffdfb;
}

.chart-frame__head {
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 0;
  border-bottom: 0;
}

.chart-frame__head .eyebrow {
  color: #a79cb5;
}

.chart-frame h2 {
  margin-top: 4px;
  font-size: 16.5px;
  font-weight: 800;
}

.chart-canvas {
  height: 264px;
}

.chart-empty,
.chart-failed {
  min-height: 236px;
}

.donut-layout {
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 2px;
}

.donut-canvas {
  height: 250px;
}

.donut-list {
  padding: 6px 15px;
  border: 1px solid #f3ecf6;
  border-radius: 20px;
  background: #fbf8fd;
}

.donut-list__row {
  padding: 9px 0;
  border-bottom: 1px solid #f1e9f4;
  font-size: 12px;
}

.donut-list__row:last-child {
  border-bottom: 0;
}

.donut-list__name {
  font-weight: 650;
}

.donut-list__share {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #8a7f9b;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
}

.donut-list__sum {
  color: #4b405e;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 750;
}

.swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.swatch--sage {
  background: #93d9b8;
}

.swatch--amber {
  background: #f4d488;
}

.swatch--primary {
  background: #b7a4f4;
}

.swatch--plum {
  background: #e9a9cf;
}

.breakdown__row {
  padding: 10px 0;
  border-bottom: 1px solid #f4ecf1;
}

.breakdown__bar {
  height: 7px;
  background: #f3ecf4;
}

.breakdown__bar i {
  background: linear-gradient(90deg, #c7b7f7, #a58cf2);
}

.breakdown__row:has(.swatch--sage) .breakdown__bar i {
  background: linear-gradient(90deg, #b3e6d0, #8bd4b3);
}

.breakdown__row:has(.swatch--amber) .breakdown__bar i {
  background: linear-gradient(90deg, #f7e1a9, #f0c66f);
}

.breakdown__row:has(.swatch--plum) .breakdown__bar i {
  background: linear-gradient(90deg, #f1c0dd, #e79ac5);
}

.breakdown__sum {
  color: #4b405e;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 750;
}

.breakdown__limit {
  color: #9b90a8;
}

.cat-row--sage {
  --cat-accent: #8bd4b3;
}

.cat-row--amber {
  --cat-accent: #f0c66f;
}

.cat-row--primary {
  --cat-accent: #b7a4f4;
}

.cat-row--plum {
  --cat-accent: #e79ac5;
}

.ledger-table th {
  color: #9d92aa;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ledger-table td {
  border-bottom: 1px solid #f5eef3;
}

.ledger-table tbody tr:hover {
  background: rgba(241, 235, 255, 0.42);
}

.table-goal__bar {
  background: #f3ecf4;
}

.table-goal__bar i {
  background: linear-gradient(90deg, #c7b7f7, #a58cf2);
}

.plan-group .group-head span,
.drawer__meta {
  background: #f7f2fa;
}

.plan-group::before {
  background: linear-gradient(90deg, #b7a4f4, #f0a6c6);
}

.now-card {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 30px;
  background:
    radial-gradient(86% 76% at 96% 4%, rgba(255, 255, 255, 0.85), transparent 54%),
    radial-gradient(66% 66% at 4% 100%, rgba(220, 243, 232, 0.55), transparent 62%),
    linear-gradient(130deg, rgba(206, 192, 251, 0.55), rgba(248, 198, 217, 0.4) 58%, rgba(251, 220, 201, 0.46));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 30px 60px -44px rgba(139, 114, 234, 0.45);
}

.now-card__amount {
  color: #3b3052;
  font-weight: 850;
}

.now-card__side dt {
  color: rgba(53, 46, 72, 0.6);
  font-weight: 650;
}

.budget-verdict--ok {
  background: rgba(255, 255, 255, 0.78);
}

.piggy-card {
  border: 1px solid #f1e8ef;
  border-radius: 24px;
  background:
    radial-gradient(120% 90% at 100% 0, rgba(240, 166, 198, 0.14), transparent 55%),
    rgba(255, 253, 250, 0.94);
}

.drawer {
  border: 1px solid #f2e9f0;
  border-radius: 22px;
  background: rgba(255, 253, 250, 0.82);
}

.empty {
  border-color: #e9dfe8;
  border-radius: 20px;
  background: rgba(251, 248, 253, 0.8);
}

.demo-note {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: var(--grad-soft);
}

.demo-note__tag {
  background: #4a3f60;
}

.cta-bar {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background:
    radial-gradient(120% 100% at 100% 0, rgba(255, 255, 255, 0.8), transparent 55%),
    linear-gradient(120deg, #f2ecff, #fff2f8 60%, #fff7f0);
  box-shadow: inset 0 1px 0 #fff, 0 20px 40px -38px rgba(96, 72, 130, 0.4);
}

.cta-bar__spark {
  border-radius: 14px;
  background: linear-gradient(145deg, #c7b7f7, #a58cf2);
  color: #352e48;
}

.fab {
  border-color: rgba(255, 255, 255, 0.65);
  color: var(--on-primary);
  box-shadow:
    0 20px 40px -20px rgba(139, 114, 234, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.fab--help {
  background: rgba(255, 253, 250, 0.82);
  color: var(--primary-deep);
}

.bottom-nav {
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 252, 248, 0.9);
  box-shadow: 0 24px 50px -28px rgba(96, 72, 130, 0.42);
}

.bottom-nav__item.is-active {
  color: var(--primary-deep);
}

.bottom-nav__item.is-active .bottom-nav__icon {
  background: linear-gradient(145deg, #dcd1ff, #f3bdda);
  color: #4d3b78;
  box-shadow:
    0 8px 16px -10px rgba(112, 80, 214, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.site-footer {
  color: #a69bae;
}

.login-shell {
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 253, 250, 0.96);
  box-shadow: 0 50px 110px -60px rgba(96, 72, 130, 0.5);
}

.login-cover {
  background:
    radial-gradient(80% 70% at 84% 8%, rgba(255, 255, 255, 0.74), transparent 55%),
    radial-gradient(70% 60% at 10% 90%, rgba(220, 243, 232, 0.8), transparent 60%),
    linear-gradient(135deg, #cec0fb 0%, #e6c6f7 36%, #f8c6d9 68%, #fbdcc9 100%);
}

.login-cover h1 {
  font-weight: 850;
}

.login-points li {
  border: 1px solid rgba(255, 255, 255, 0.66);
  background: rgba(255, 255, 255, 0.3);
  font-weight: 700;
}

.login-panel h2 {
  font-weight: 850;
}

/* ---------- конструктор рабочего места «Сегодня» ---------- */

.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 100% 0, rgba(240, 196, 222, 0.14), transparent 60%),
    rgba(255, 253, 250, 0.78);
  box-shadow: inset 0 1px 0 #fff, 0 16px 32px -32px rgba(96, 72, 130, 0.35);
}

.workspace-bar__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.workspace-bar__copy .eyebrow {
  margin: 0;
}

.workspace-bar__text {
  margin: 0;
  color: #6f6582;
  font-size: 12.5px;
  line-height: 1.45;
}

.workspace-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-toggle {
  gap: 7px;
}

.btn.workspace-toggle.is-active {
  border-color: transparent;
  background: var(--grad);
  color: var(--on-primary);
  box-shadow:
    0 14px 28px -18px rgba(139, 114, 234, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.workspace-hint {
  margin: -4px 0 14px;
  padding: 9px 13px;
  border: 1px dashed rgba(123, 92, 240, 0.32);
  border-radius: 14px;
  background: rgba(242, 236, 255, 0.5);
  color: #5f5478;
  font-size: 12px;
  line-height: 1.45;
}

.today-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.today-board > .today-block {
  position: relative;
  min-width: 0;
  border-radius: 28px;
  scroll-margin-top: 90px;
}

.today-board > .today-block[data-span="wide"],
.today-board > .today-block.is-lone-half {
  grid-column: 1 / -1;
}

.today-board > .today-block > .pagehero,
.today-board > .today-block > .board-card,
.today-board > .today-block > .reminder-tape,
.today-board > .today-block > .demo-note {
  margin-block: 0;
}

.today-block__tools {
  display: none;
  position: absolute;
  top: -13px;
  right: 18px;
  z-index: 6;
}

.today-board.is-editing .today-block__tools {
  display: flex;
}

.workspace-handle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px 6px 9px;
  border: 1px solid rgba(123, 92, 240, 0.24);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.97);
  color: #5b4a7d;
  font-family: inherit;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow:
    0 12px 24px -18px rgba(58, 40, 98, 0.55),
    inset 0 1px 0 #fff;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.workspace-handle:hover {
  border-color: rgba(123, 92, 240, 0.45);
  background: #fff;
}

.workspace-handle:active {
  cursor: grabbing;
}

.workspace-handle:focus-visible {
  outline: 2px solid var(--primary-deep, #6f52d9);
  outline-offset: 2px;
}

.workspace-handle svg {
  flex: none;
}

.today-block.is-dragging {
  opacity: 0.45;
  pointer-events: none;
}

.today-block.is-dragging .workspace-handle {
  cursor: grabbing;
}

body.is-workspace-dragging,
body.is-workspace-dragging * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.today-board.is-editing {
  grid-template-columns: 1fr;
}

.today-board.is-editing > .today-block,
.today-board.is-editing > .today-block[data-span] {
  grid-column: 1 / -1;
  padding: 11px;
  border: 1px dashed rgba(123, 92, 240, 0.3);
  background: rgba(255, 255, 255, 0.24);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.today-board.is-editing > .today-block:hover {
  border-color: rgba(123, 92, 240, 0.55);
  background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 960px) {
  .today-board {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .today-board > .today-block[data-span],
  .today-board > .today-block.is-lone-half {
    grid-column: auto;
  }

  .today-board.is-editing > .today-block {
    padding: 9px;
  }
}

@media (max-width: 640px) {
  .workspace-bar {
    align-items: flex-start;
    padding: 11px 13px;
  }

  .workspace-bar__actions {
    width: 100%;
  }

  .workspace-bar__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .workspace-handle__text {
    display: none;
  }

  .workspace-handle {
    padding: 6px 8px;
  }
}

/* плотнее на планшетах */
@media (max-width: 1023px) {
  .pagehero__title {
    font-size: clamp(2.3rem, 4.8vw, 3.2rem);
  }

  .pagehero--compact .pagehero__title {
    font-size: clamp(1.95rem, 4vw, 2.6rem);
  }

  .tab {
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (max-width: 960px) {
  .app-frame {
    border-radius: 0;
    background: rgba(255, 252, 248, 0.94);
  }

  .topbar {
    top: 0;
    margin: 0;
    border-radius: 0 0 22px 22px;
  }

  .shell {
    padding: 20px 16px 20px;
  }

  .ledger-strip {
    gap: 10px;
  }

  .ledger-strip > .ledger-cell {
    border-radius: 18px;
  }

  .board-card .ledger-strip > .ledger-cell {
    border-radius: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.86);
  }

  .board-card .ledger-strip > .ledger-cell:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.86);
  }

  .chart-canvas {
    height: 250px;
  }
}

@media (max-width: 640px) {
  .pagehero__title {
    font-size: clamp(2.3rem, 9.6vw, 2.9rem);
  }

  .pagehero--compact .pagehero__title {
    font-size: clamp(1.95rem, 8vw, 2.4rem);
  }

  .ledger-strip > .ledger-cell {
    padding: 14px 14px 12px;
  }

  .ledger-cell__value {
    font-size: 1.5rem;
  }

  .ledger-cell__value--money {
    font-size: 1.08rem;
  }

  .ledger-cell__icon {
    width: 28px;
    height: 28px;
  }

  .board-card .ledger-strip > .ledger-cell {
    padding: 10px 10px 9px;
  }

  .chart-frame {
    padding: 16px 14px 10px;
    border-radius: 22px;
  }

  .donut-list {
    padding: 4px 12px;
  }
}

/* ---------- адаптив ---------- */

@media (max-width: 1180px) {
  .brand__sub {
    display: none;
  }

  .tabs {
    gap: 8px;
  }
}

@media (max-width: 1023px) {
  .pagehero {
    grid-template-columns: minmax(0, 1.1fr) minmax(290px, 0.9fr);
    gap: 24px;
  }

  .pagehero__title {
    font-size: clamp(2.7rem, 5.4vw, 4.2rem);
  }

  .today-grid {
    gap: 16px;
  }

  .plan-board,
  .goal-board,
  .analytics-charts {
    gap: 16px;
  }
}

@media (max-width: 960px) {
  body {
    padding-bottom: 88px;
  }

  .scene__shape--glass,
  .scene__shape--cream {
    opacity: 0.5;
  }

  .app-frame {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: none;
  }

  .topbar {
    top: 0;
    margin: 0;
    border-radius: 0 0 22px 22px;
    border-width: 0 0 1px;
  }

  .topbar__inner {
    min-height: 62px;
    padding: 7px 16px;
  }

  .tabs {
    display: none;
  }

  .brand {
    margin-right: auto;
  }

  .shell {
    padding: 22px 16px 20px;
  }

  .pagehero {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 20px;
  }

  .pagehero__copy {
    padding: 4px 2px 0;
  }

  .pagehero__title {
    font-size: clamp(2.7rem, 9vw, 3.6rem);
    margin: 8px 0 12px;
  }

  .pagehero--compact .pagehero__title {
    font-size: clamp(2.3rem, 7.4vw, 3rem);
  }

  .pagehero__lede {
    font-size: 13px;
  }

  .pagehero__actions {
    margin-top: 18px;
  }

  .hero-visual,
  .hero-visual--small {
    min-height: 300px;
    border-radius: 28px;
    padding: 24px 20px 36px;
  }

  .hero-visual__amount {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
  }

  .today-grid,
  .plan-board,
  .goal-board,
  .analytics-charts,
  .finance-split,
  .finance-grid,
  .piggy-grid {
    grid-template-columns: 1fr;
  }

  .chart-frame--donut {
    grid-column: auto;
  }

  .ledger-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-card .ledger-strip {
    gap: 0;
  }

  .board-card .ledger-cell:nth-child(2n) {
    border-right: 0;
  }

  .board-card .ledger-cell:nth-child(-n + 2) {
    border-bottom: 1px solid var(--rule);
  }

  .now-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
    border-radius: 26px;
  }

  .now-card__side {
    padding: 14px 0 0;
    border-top: 1px solid rgba(26, 22, 34, 0.1);
    border-left: 0;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .donut-canvas {
    height: 230px;
  }

  .cta-bar {
    margin: 4px 14px 14px;
    padding: 14px 16px;
    border-radius: 20px;
  }

  .cta-bar .btn {
    margin-left: auto;
  }

  .site-footer {
    width: 100%;
    margin: 0 auto 18px;
    padding: 0 16px;
    font-size: 10px;
  }

  .fab-dock {
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .fab {
    height: 48px;
    padding: 0 17px;
  }

  .fab--help {
    width: 48px;
  }

  .fab svg {
    width: 17px;
    height: 17px;
  }

  .bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 800;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 24px 50px -26px rgba(58, 40, 98, 0.5);
    backdrop-filter: blur(20px) saturate(1.1);
  }

  .bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 5px 2px 4px;
    border-radius: 16px;
    color: var(--ink-faint);
    font-size: 9px;
    font-weight: 550;
    text-align: center;
    text-decoration: none;
    transition: color 0.16s ease, background 0.16s ease;
  }

  .bottom-nav__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #f4f1f9;
    color: var(--ink-soft);
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  }

  .bottom-nav__icon svg {
    width: 16px;
    height: 16px;
  }

  .bottom-nav__item.is-active {
    color: var(--ink);
  }

  .bottom-nav__item.is-active .bottom-nav__icon {
    background: var(--grad);
    color: var(--ink);
    box-shadow: 0 8px 16px -10px rgba(123, 92, 240, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }

  .quick,
  .help {
    width: 100%;
    max-width: none;
    max-height: 94vh;
    margin: auto 0 0;
    border-radius: 28px 28px 0 0;
  }

  .quick__body,
  .help__body {
    max-height: calc(94vh - 190px);
    padding: 4px 18px calc(24px + env(safe-area-inset-bottom));
  }

  .quick__head,
  .help__head {
    padding: 20px 18px 12px;
  }

  .quick__tabs {
    margin: 0 14px 12px;
  }

  .assistant-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 16px;
  }

  .assistant-thought__tail {
    display: none;
  }

  .assistant-thought {
    width: 100%;
  }

  .assistant-thought__text {
    max-height: 170px;
  }

  .assistant-form {
    flex-wrap: wrap;
  }

  .assistant-form .btn {
    width: 100%;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 30px;
  }

  .login-cover {
    min-height: 300px;
    padding: 24px;
  }

  .login-cover__body {
    padding-top: 32px;
  }

  .login-cover h1 {
    font-size: clamp(2.5rem, 10vw, 3.4rem);
  }

  .login-orb {
    top: auto;
    right: -24px;
    bottom: 24px;
    transform: scale(0.82) rotate(-7deg);
  }

  .login-points {
    display: none;
  }

  .login-panel {
    padding: 26px 24px 30px;
  }

  .toasts {
    top: 8px;
  }

  .noscript-note {
    bottom: 100px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14.5px;
  }

  .shell {
    padding: 18px 12px 18px;
  }

  .topbar {
    border-radius: 0 0 18px 18px;
  }

  .topbar__inner {
    min-height: 58px;
    padding: 6px 12px;
    gap: 10px;
  }

  .brand__mark {
    width: 31px;
    height: 31px;
    padding: 6px;
    grid-template-columns: repeat(2, 7.5px);
    grid-template-rows: repeat(2, 7.5px);
  }

  .brand__text {
    font-size: 15px;
  }

  .nav-more__button {
    width: 34px;
    height: 34px;
  }

  .pagehero__title {
    font-size: clamp(2.5rem, 10.5vw, 3.1rem);
  }

  .pagehero--compact .pagehero__title {
    font-size: clamp(2.1rem, 8.6vw, 2.6rem);
  }

  .pagehero__actions {
    gap: 8px;
  }

  .pagehero__actions .btn {
    padding: 10px 16px;
    font-size: 12.5px;
  }

  .period-range {
    padding: 10px 12px;
  }

  .period-range__field {
    flex: 1 1 120px;
    min-width: 0;
  }

  .period-range .btn {
    flex: 1 1 100%;
  }

  .period-totals__grid {
    grid-template-columns: 1fr;
  }

  .hero-mini {
    gap: 8px;
    margin-top: 18px;
  }

  .hero-mini > div {
    flex: 1 1 100%;
    padding: 11px 13px;
  }

  .hero-visual,
  .hero-visual--small {
    min-height: 280px;
    border-radius: 24px;
    padding: 22px 18px 34px;
  }

  .hero-visual__grid {
    grid-template-columns: repeat(2, 19px);
    grid-template-rows: repeat(2, 19px);
    margin-bottom: 18px;
    padding: 12px;
    border-radius: 16px;
  }

  .hero-visual__amount {
    font-size: clamp(2.3rem, 11.5vw, 3rem);
  }

  .hero-visual__note {
    font-size: 11.5px;
  }

  .card,
  .panel,
  .chart-frame,
  .goal-card,
  .plan-group {
    padding: 16px;
    border-radius: 22px;
  }

  .card__head,
  .panel__head {
    flex-wrap: wrap;
    gap: 10px;
  }

  .card__title,
  .panel__title {
    flex: 1 1 100%;
  }

  .card__head > .btn,
  .panel__head > .text-link {
    margin-left: auto;
  }

  .card-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .card__title h2,
  .panel__head h2,
  .card__head h2 {
    font-size: 16.5px;
  }

  .board-card {
    padding: 16px;
    border-radius: 22px;
  }

  .board-card__head {
    flex-direction: column;
    gap: 8px;
  }

  .board-card__head h2 {
    font-size: 18px;
  }

  .board-card .ledger-cell {
    padding: 10px 10px 4px;
  }

  .ledger-cell {
    padding: 12px;
  }

  .ledger-cell__value {
    font-size: 1.25rem;
  }

  .ledger-cell__value--money {
    font-size: 1.05rem;
  }

  .reminder-tape {
    padding: 13px 14px;
    border-radius: 18px;
  }

  .reminder-tape .reminder {
    font-size: 11px;
    padding: 5px 10px;
  }

  .money-node__grid {
    grid-template-columns: 1fr;
  }

  .habit-week {
    flex-wrap: wrap;
  }

  .week-cell {
    width: 29px;
    height: 27px;
  }

  .panel__figures {
    flex-direction: column;
    gap: 6px;
  }

  .quick-spend {
    grid-template-columns: 1fr 1fr;
  }

  .quick-spend .btn--spend {
    grid-column: 1 / -1;
  }

  .promise-row__main {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .promise-row__main .row-action {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .promise-form__grid,
  .finance-grid,
  .piggy-grid {
    grid-template-columns: 1fr;
  }

  .piggy-plan {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .piggy-plan > div {
    padding: 8px;
  }

  .breakdown__row {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
  }

  .breakdown__name {
    grid-column: 1;
  }

  .breakdown__sum {
    grid-column: 2;
    text-align: right;
  }

  .breakdown__bar {
    grid-column: 1;
    align-self: center;
  }

  .breakdown__limit {
    grid-column: 2;
    text-align: right;
  }

  .ledger-table,
  .ledger-table tbody {
    display: block;
  }

  .ledger-table thead {
    display: none;
  }

  .ledger-table tr {
    display: block;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--rule);
    border-radius: 16px;
    background: #f9f7fc;
  }

  .ledger-table tbody tr:hover {
    background: #f9f7fc;
  }

  .ledger-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }

  .ledger-table td::before {
    content: attr(data-label);
    flex: none;
    color: var(--ink-faint);
    font-size: 9.5px;
  }

  .ledger-table td:not([data-label])::before {
    content: "";
  }

  .ledger-table td.row-action-cell {
    justify-content: flex-end;
    padding-top: 8px;
  }

  .ledger-table td.tx-edit-cell {
    display: block;
    padding: 0;
  }

  .ledger-table .tx-edit-row > td {
    background: #f9f7fc;
  }

  .ledger-table .tx-edit {
    margin-top: 8px;
  }

  .table-goal {
    width: 100%;
  }

  .chart-canvas {
    height: 250px;
  }

  .donut-canvas {
    height: 210px;
  }

  .zone-head {
    gap: 10px;
  }

  .zone-head__index {
    min-width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .zone-head h2 {
    font-size: 1.3rem;
  }

  .now-card__amount {
    font-size: 2.7rem;
  }

  .piggy-figure {
    flex-direction: column;
    gap: 2px;
  }

  .piggy-figure__money {
    text-align: left;
  }

  .goal-card__streak {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .goal-card__streak-label {
    width: auto;
    text-align: left;
  }

  .goal-card__score b {
    font-size: 26px;
  }

  .quick-cats__grid {
    grid-template-columns: 1fr;
  }

  .cta-bar {
    gap: 10px;
  }

  .cta-bar__spark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .cta-bar__text {
    min-width: 150px;
  }

  .cta-bar .btn {
    width: 100%;
    margin-left: 0;
  }

  .bottom-nav {
    left: 8px;
    right: 8px;
    padding: 6px;
    border-radius: 20px;
  }

  .bottom-nav__item {
    font-size: 8.5px;
  }

  .bottom-nav__icon {
    width: 28px;
    height: 28px;
  }

  .fab {
    height: 46px;
    padding: 0 15px;
    font-size: 12px;
  }

  .fab-dock {
    right: 12px;
    bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .help,
  .quick {
    border-radius: 24px 24px 0 0;
  }

  .login-shell {
    border-radius: 24px;
  }

  .login-cover {
    min-height: 270px;
    padding: 20px;
  }

  .login-cover h1 {
    font-size: clamp(2.2rem, 10.5vw, 2.9rem);
  }

  .login-cover__lede {
    font-size: 12px;
  }

  .login-panel {
    padding: 24px 18px 26px;
  }

  .login-orb {
    opacity: 0.05;
  }
}

@media (max-width: 420px) {
  .pagehero__actions .btn {
    width: 100%;
  }

  .money-node__grid {
    grid-template-columns: 1fr;
  }

  .week-cell {
    width: 27px;
    height: 25px;
  }

  .month-cell {
    font-size: 9px;
  }

  .brand__text {
    font-size: 14px;
  }

  .card-icon {
    width: 32px;
    height: 32px;
  }

  .card-icon svg {
    width: 16px;
    height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- пастельные плитки на телефоне ---------- */

@media (max-width: 960px) {
  .board-card .ledger-strip {
    gap: 8px;
    margin-top: 10px;
  }

  .board-card .ledger-strip > .ledger-cell {
    border: 1px solid rgba(255, 255, 255, 0.86);
  }

  .board-card .ledger-strip > .ledger-cell:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.86);
  }

  .ledger-strip .ledger-cell__value {
    font-size: 1.5rem;
  }

  .ledger-strip .ledger-cell__value--money {
    font-size: 1.08rem;
  }
}

@media (max-width: 640px) {
  .board-card .ledger-strip > .ledger-cell {
    padding: 10px 10px 9px;
  }

  .ledger-strip > .ledger-cell {
    padding: 13px 14px 12px;
  }

  .ledger-cell__value {
    font-size: 1.45rem;
  }

  .ledger-cell__value--money {
    font-size: 1.05rem;
  }
}

/* ---------- пользователи (кабинет владельца) ---------- */

.users-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.users-head h1 {
  margin: 6px 0 8px;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 850;
  letter-spacing: -0.04em;
}

.users-head__lede {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.users-message {
  max-width: 760px;
}

.users-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}

.users-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.users-hint {
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.4;
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.user-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: #faf8fd;
}

.user-row__main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.user-row__ident {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-row__name {
  font-size: 15px;
  font-weight: 700;
}

.user-row__created {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.user-row__status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.user-status {
  padding: 3px 9px;
  border-radius: 999px;
  background: #efeaf8;
  color: #5f5478;
  font-size: 10px;
  font-weight: 650;
}

.user-status--active {
  background: rgba(74, 160, 120, 0.14);
  color: #2f7a55;
}

.user-status--active_until {
  background: rgba(123, 92, 240, 0.12);
  color: var(--primary);
}

.user-status--blocked,
.user-status--expired {
  background: rgba(217, 70, 107, 0.12);
  color: var(--vermilion);
}

.user-row__actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.user-action {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}

.user-action__field {
  min-width: 130px;
}

.user-delete {
  position: relative;
}

.user-delete > summary {
  list-style: none;
}

.user-delete > summary::-webkit-details-marker {
  display: none;
}

.user-delete[open] > summary {
  margin-bottom: 8px;
}

.user-delete form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(217, 70, 107, 0.25);
  border-radius: 14px;
  background: var(--danger-quiet);
}

.user-row__note {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.badge--owner {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--grad);
  color: var(--on-primary);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 1023px) {
  .users-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .user-row__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .user-action {
    flex-wrap: wrap;
  }
}

/* ============================================================
   Телефон и планшет — та же веб-версия, только уже.
   Сохраняем белую витрину с внешними отступами, плавающую
   стеклянную шапку с вкладками-капсулами и пастельные плитки.
   Нижний таб-бар, которого нет в веб-версии, убираем.
   ============================================================ */

@media (max-width: 960px) {
  body {
    padding-bottom: 0;
  }

  .app-frame {
    width: min(calc(100% - 20px), 1240px);
    margin: 10px auto 0;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    background: rgba(255, 253, 250, 0.94);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.95),
      0 34px 80px -52px rgba(96, 72, 130, 0.5);
  }

  .topbar {
    top: 6px;
    margin: 8px 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    background: rgba(255, 252, 248, 0.9);
  }

  .topbar__inner {
    min-height: 0;
    padding: 7px 10px;
    gap: 6px 10px;
    flex-wrap: wrap;
  }

  .brand {
    margin-right: auto;
  }

  .nav-benefits {
    order: 3;
  }

  .nav-more {
    order: 4;
  }

  .tabs {
    order: 5;
    display: flex;
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 2px;
    margin: 1px 0 3px;
    padding: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    background: rgba(238, 232, 250, 0.72);
    box-shadow: inset 0 1px 2px rgba(96, 72, 130, 0.06);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: none;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12px;
  }

  .bottom-nav {
    display: none;
  }

  .shell {
    padding: 20px clamp(16px, 3vw, 28px) 18px;
  }

  .cta-bar {
    margin: 2px 12px 16px;
    border-radius: 22px;
  }

  .site-footer {
    width: min(calc(100% - 20px), 1240px);
    margin: 12px auto 24px;
    padding: 0;
  }

  .fab-dock {
    right: 14px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .noscript-note {
    bottom: calc(96px + env(safe-area-inset-bottom));
  }

  /* Диалоги остаются веб-панелями по центру, а не нижними шитами. */
  .quick,
  .help {
    width: min(580px, calc(100% - 20px));
    max-width: 580px;
    max-height: min(90vh, 860px);
    margin: auto;
    border-radius: 26px;
  }

  .quick__body,
  .help__body {
    max-height: calc(90vh - 190px);
    padding: 4px 18px calc(24px + env(safe-area-inset-bottom));
  }

  .quick__head,
  .help__head {
    padding: 18px 18px 10px;
  }
}

/* На планшете карточные сетки остаются двухколоночными, как в вебе. */
@media (min-width: 820px) and (max-width: 960px) {
  .today-board,
  .plan-board,
  .goal-board,
  .analytics-charts,
  .piggy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-board > .today-block[data-span] {
    grid-column: auto;
  }

  .today-board > .today-block[data-span="wide"] {
    grid-column: 1 / -1;
  }

  .today-board.is-editing {
    grid-template-columns: 1fr;
  }

  .chart-frame--donut {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) and (max-width: 960px) {
  .pagehero {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .app-frame {
    width: calc(100% - 12px);
    margin: 6px auto 0;
    border-radius: 24px;
  }

  .topbar {
    top: 4px;
    margin: 6px 6px 0;
    border-radius: 17px;
  }

  .topbar__inner {
    padding: 6px 8px;
    gap: 6px 8px;
  }

  .tab {
    padding: 7px 12px;
    font-size: 11.5px;
  }

  .shell {
    padding: 18px 13px 16px;
  }

  .card,
  .panel,
  .chart-frame,
  .goal-card,
  .plan-group {
    border-radius: 24px;
  }

  .board-card {
    border-radius: 24px;
  }

  .board-card__head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }

  .hero-visual,
  .hero-visual--small {
    min-height: 300px;
    padding: 24px 20px 36px;
    border-radius: 28px;
  }

  .hero-visual__grid {
    grid-template-columns: repeat(2, 21px);
    grid-template-rows: repeat(2, 21px);
    padding: 14px;
    border-radius: 20px;
  }

  .hero-mini > div,
  .hero-mini > a {
    flex: 1 1 150px;
  }

  .pagehero__actions .btn {
    width: auto;
  }

  .panel__figures {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  .reminder-tape {
    border-radius: 20px;
  }

  .cta-bar {
    margin: 2px 8px 12px;
    padding: 14px 16px;
    border-radius: 20px;
  }

  .cta-bar__text {
    min-width: 0;
    flex: 1 1 150px;
  }

  .cta-bar .btn {
    width: auto;
    margin-left: auto;
  }

  .quick,
  .help {
    width: calc(100% - 16px);
    border-radius: 24px;
  }

  .quick__body,
  .help__body {
    padding: 4px 16px calc(20px + env(safe-area-inset-bottom));
  }

  .site-footer {
    width: calc(100% - 16px);
    margin: 10px auto 18px;
    padding: 0 4px;
  }
}

