@charset "UTF-8";
:root {
  --bg: #f6f7f3;
  --paper: #fff;
  --ink: #202c25;
  --muted: #788078;
  --line: #e4e8df;
  --green: #254e39;
  --soft: #eaf0e4;
  --lime: #dbe9bd;
  --bad: #a53d32;
  --warn: #8b641e;
  --radius: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #8fb273;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
a {
  color: var(--green);
  text-underline-offset: 4px;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 600;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.35px;
  font-weight: 600;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.positive {
  color: var(--green);
}
.negative {
  color: var(--bad) !important;
}
.warning {
  color: var(--warn);
}
.num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.4px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.primary,
.secondary,
.ghost,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 19px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 550;
}
.primary {
  background: var(--green);
  color: white;
}
.primary:hover {
  background: #193e2a;
}
.secondary {
  background: var(--paper);
  border: 1px solid var(--line);
}
.secondary:hover {
  background: var(--soft);
}
.ghost {
  color: var(--green);
  padding: 0 10px;
}
.danger {
  color: var(--bad);
  background: #fbefed;
}
.wide {
  width: 100%;
}
.icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.icon-button:hover {
  background: var(--soft);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head .ghost {
  min-height: 30px;
  font-size: 12px;
}
.section-sub {
  margin: 7px 0 23px;
  line-height: 1.5;
  font-size: 13px;
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100svh;
}
.sidebar {
  position: fixed;
  width: 218px;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  padding: 36px 22px 22px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 31px;
  letter-spacing: -1.6px;
  font-weight: 650;
  text-decoration: none;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.brand-sub {
  font-size: 11px;
  color: var(--muted);
  margin: 9px 0 42px 46px;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 13px 16px;
  border-radius: 12px;
  color: #6b756b;
  font-size: 14px;
}
.nav button.active {
  background: var(--soft);
  color: var(--green);
  font-weight: 600;
}
.nav button:hover {
  background: #edf0e8;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 40px;
}
.demo-label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  color: #66745b;
}
.demo-label:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7d985f;
}
.sidebar-bottom p {
  font-size: 11px;
  line-height: 1.6;
  margin: 10px 0 17px;
  color: var(--muted);
}
.sidebar-bottom .ghost {
  font-size: 12px;
  padding: 0;
  min-height: 26px;
}
.content {
  grid-column: 2;
  padding: 0 44px 40px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}
.topbar {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.family-name {
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.date-label {
  font-size: 12px;
  color: var(--muted);
}
.avatar {
  width: 37px;
  height: 37px;
  background: var(--lime);
  color: var(--green);
  border: 3px solid var(--bg);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.profile {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.profile:hover .avatar {
  border-color: #bdd29c;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 34px 0 28px;
  gap: 16px;
}
.page-head p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 9px;
}
.month-label {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  background: var(--paper);
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 32px;
}
.balance {
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  padding: 29px 30px 25px;
  position: relative;
  overflow: hidden;
}
.balance:after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -115px;
  top: -110px;
  border: 1px solid #ffffff16;
  border-radius: 50%;
  box-shadow:
    0 0 0 35px #ffffff04,
    0 0 0 70px #ffffff03;
  pointer-events: none;
}
.balance-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #d2dece;
}
.balance-top .icon-button {
  width: 28px;
  height: 28px;
  color: #d2dece;
}
.balance-top .icon-button:hover {
  background: #ffffff14;
}
.balance-value {
  font-size: clamp(36px, 3.9vw, 58px);
  font-weight: 500;
  letter-spacing: -2.4px;
  margin: 14px 0 11px;
  line-height: 1.1;
}
.balance-value.negative {
  color: #ffd9b5 !important;
}
.daily {
  font-size: 13px;
  color: #c4d7b8;
  display: flex;
  align-items: center;
  gap: 8px;
}
.daily strong {
  color: #fff;
  font-weight: 550;
}
.balance-bottom {
  border-top: 1px solid #ffffff21;
  margin-top: 24px;
  padding-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.balance-bottom small {
  color: #b7cbb1;
  display: block;
  font-size: 11px;
  margin-bottom: 7px;
}
.balance-bottom strong {
  font-size: 19px;
  font-weight: 500;
}
.balance-bottom button {
  text-align: left;
  padding: 0;
}
.quick-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr 48px;
  gap: 9px;
  margin: 14px 0 30px;
}
.quick-actions button {
  min-height: 49px;
}
.quick-actions .scan-button {
  padding: 0;
}
.note-line {
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: 12px;
  display: flex;
  gap: 11px;
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 28px;
  background: #f0f3e9;
}
.note-line svg {
  color: #6c8553;
  margin-top: 1px;
}
.note-line strong {
  font-weight: 550;
}
.categories {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 25px 24px 14px;
}
.category-row {
  display: flex;
  gap: 13px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 15px 0;
  border-top: 1px solid #eef0eb;
}
.category-row:hover .cat-icon {
  background: var(--lime);
}
.cat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f0f3eb;
  color: #5c6f50;
  flex-shrink: 0;
  transition: background 0.18s;
}
.cat-body {
  flex: 1;
  min-width: 0;
}
.cat-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}
.cat-line strong {
  font-weight: 550;
}
.cat-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: 10px;
  color: var(--muted);
}
.track {
  height: 3px;
  border-radius: 3px;
  background: #edf0e9;
  overflow: hidden;
  margin-top: 9px;
}
.track span {
  display: block;
  height: 100%;
  background: #9db67e;
  border-radius: 3px;
}
.track.over span {
  background: #c47d65;
}
.add-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  width: 100%;
  color: var(--green);
  font-size: 12px;
}
.add-row svg {
  width: 17px;
}
.right-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.upcoming {
  padding: 4px 0;
}
.plan-mini {
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.plan-main {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 17px 0;
  text-align: left;
}
.plan-pay {
  flex: none;
  padding: 9px 13px;
  font-size: 14px;
}
.plan-mini.done .plan-main {
  opacity: 0.55;
}
.plan-mini .mini-date {
  width: 43px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  font-size: 16px;
  font-weight: 550;
}
.mini-date small {
  font-size: 9px;
  margin-top: 2px;
  font-weight: 400;
}
.mini-body {
  flex: 1;
  min-width: 0;
}
.mini-body strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-body p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.project-preview {
  border: 1px solid #d7dfcd;
  border-radius: 16px;
  padding: 22px;
  background: #edf2e6;
}
.project-preview .eyebrow {
  color: #748464;
  font-size: 9px;
}
.project-preview h3 {
  font-size: 18px;
  margin: 13px 0 9px;
  letter-spacing: -0.3px;
}
.project-preview p {
  font-size: 11px;
  color: #738068;
  line-height: 1.6;
}
.project-preview .project-amount {
  font-size: 28px;
  margin: 18px 0 6px;
  letter-spacing: -1px;
}
.project-preview .track {
  background: #dce6cf;
  height: 5px;
  margin: 16px 0 17px;
}
.project-preview .track span {
  background: #6d8a4f;
}
.project-preview .ghost {
  padding: 0;
  min-height: 20px;
  font-size: 11px;
}
.recent-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.recent-item .cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.recent-item .cat-icon svg {
  width: 15px;
  height: 15px;
}
.recent-body {
  flex: 1;
  min-width: 0;
}
.recent-body strong {
  font-size: 11px;
  font-weight: 500;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-body small {
  display: block;
  font-size: 9px;
  margin-top: 4px;
}
.recent-amount {
  font-size: 12px;
  white-space: nowrap;
}
.empty {
  padding: 30px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.empty-panel {
  padding: 44px;
  text-align: center;
  border: 1px dashed #cbd5c4;
  border-radius: 18px;
}
.empty-panel h2 {
  margin-bottom: 12px;
}
.empty-panel p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto 22px;
}
.footnote {
  font-size: 10px;
  color: #9a9f96;
  margin-top: 32px;
  line-height: 1.7;
}
.footnote button {
  font-size: 10px;
  text-decoration: underline;
  padding: 0;
  color: inherit;
}
.fade-in {
  animation: enter 0.25s ease-out;
}
.tag {
  font-size: 10px;
  background: var(--soft);
  color: var(--green);
  border-radius: 6px;
  padding: 5px 8px;
  display: inline-block;
}
.history-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.history-tools select,
.history-tools input {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  max-width: 100%;
  font-size: 13px;
}
.history-date {
  font-size: 11px;
  color: var(--muted);
  padding: 20px 0 8px;
  border-bottom: 1px solid var(--line);
}
.history-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.history-row .recent-body strong {
  font-size: 13px;
}
.history-row .recent-body small {
  font-size: 11px;
}
.history-row .recent-amount {
  font-size: 15px;
}
.history-row .icon-button {
  color: var(--muted);
  width: 30px;
  height: 30px;
}
.report-block {
  background: white;
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 25px;
}
.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 32px;
}
.report-stats small {
  display: block;
  font-size: 11px;
  margin-bottom: 10px;
}
.report-stats strong {
  font-size: 25px;
  font-weight: 500;
}
.report-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.report-row .cat-line {
  font-size: 12px;
}
.report-row .track {
  height: 7px;
  margin-top: 12px;
}
.report-row .track span {
  background: #7f9e65;
}
.bars {
  display: flex;
  gap: 4px;
  align-items: end;
  height: 120px;
  padding-top: 15px;
}
.bars span {
  flex: 1;
  min-width: 2px;
  background: #a0b985;
  border-radius: 3px 3px 0 0;
  position: relative;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
}
.member-row,
.setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-align: left;
}
.member-row .avatar {
  width: 42px;
  height: 42px;
}
.member-row .recent-body strong {
  font-size: 14px;
}
.member-row .recent-body small {
  font-size: 11px;
}
.setting-row strong {
  font-size: 13px;
  font-weight: 500;
}
.setting-row small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
}
.setting-row .recent-body {
  flex: 1;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.settings-box {
  background: #fff;
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 24px;
}
.notice {
  background: var(--soft);
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: #64745b;
  margin: 17px 0;
}
.link-button {
  font-size: 12px;
  color: var(--green);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
dialog {
  border: 0;
  border-radius: 22px;
  padding: 0;
  width: min(520px, calc(100vw - 28px));
  max-height: 90svh;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 25px 100px #15251f30;
}
dialog::backdrop {
  background: #12241965;
  backdrop-filter: blur(3px);
}
dialog[open] {
  animation: sheet 0.2s ease-out;
}
.sheet-inner {
  padding: 27px;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 15px;
}
.sheet-head h2 {
  font-size: 21px;
}
.sheet-description {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 22px;
}
.sheet-inner label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 17px;
}
.sheet-inner input,
.sheet-inner select,
.sheet-inner textarea {
  display: block;
  border: 1px solid #dfe4da;
  background: #fafbf8;
  border-radius: 10px;
  padding: 13px;
  width: 100%;
  margin-top: 8px;
  color: var(--ink);
  font-size: 15px;
  min-height: 47px;
}
.sheet-inner textarea {
  resize: vertical;
  min-height: 90px;
}
.sheet-inner .amount-input {
  font-size: 42px;
  letter-spacing: -1.5px;
  font-weight: 500;
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  min-height: 70px;
  margin: 0;
  outline-offset: 6px;
}
.amount-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 23px;
}
.amount-wrap .currency {
  font-size: 28px;
  color: #9aa58f;
}
.amount-wrap input {
  min-width: 0;
}
.category-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 12px 0 19px;
}
.category-picker button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  background: #f4f6ef;
  min-height: 76px;
  padding: 9px 5px;
  border-radius: 10px;
  font-size: 10px;
  text-align: center;
}
.category-picker button:hover {
  background: var(--soft);
}
.category-picker svg {
  width: 22px;
  height: 22px;
  color: #60764f;
}
.details-fields {
  margin: 15px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.details-fields summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--green);
  margin-bottom: 17px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.form-grid label {
  min-width: 0;
}
.sheet-actions {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}
.sheet-actions .primary,
.sheet-actions .secondary {
  width: 100%;
  min-height: 48px;
}
.form-error {
  font-size: 12px;
  line-height: 1.6;
  color: var(--bad);
  background: #fbefed;
  border-radius: 9px;
  padding: 12px;
  margin: 12px 0;
  display: none;
}
.form-error:not(:empty) {
  display: block;
}
.detail-stat {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-size: 13px;
}
.detail-stat strong {
  font-weight: 550;
}
.large-detail {
  font-size: 38px;
  letter-spacing: -1.4px;
  margin: 8px 0 22px;
}
.dialog-legal h3 {
  margin: 23px 0 8px;
}
.dialog-legal p {
  font-size: 13px;
  line-height: 1.8;
  color: #687266;
}
.code-output {
  font-size: 12px !important;
  word-break: break-all;
  user-select: all;
  background: #f0f3eb;
  padding: 15px;
  border-radius: 10px;
}
.scan-video {
  width: 100%;
  max-height: 300px;
  background: #15251f;
  border-radius: 14px;
  margin-bottom: 16px;
  object-fit: cover;
}
.request-line {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.request-line input {
  margin: 0;
  font-size: 13px;
}
.request-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  font-size: 13px;
}
.request-total strong {
  font-size: 22px;
  font-weight: 500;
}
.loading {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -1.5px;
}
.loading span {
  font-size: 13px;
  color: var(--muted);
  margin-top: 15px;
  letter-spacing: 0;
}
.welcome {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
}
.welcome-left {
  padding: 50px 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.welcome-left .brand {
  margin-bottom: 64px;
}
.welcome-left h1 {
  font-size: clamp(36px, 4.5vw, 66px);
  letter-spacing: -2.3px;
  line-height: 1.08;
  font-weight: 500;
  max-width: 530px;
}
.welcome-left > p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  margin: 24px 0 30px;
  max-width: 420px;
}
.welcome-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.welcome-left .welcome-note {
  font-size: 11px;
  line-height: 1.7;
  max-width: 400px;
  margin-top: 25px;
}
.welcome-right {
  background: #254e39;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}
.welcome-right:after {
  content: "К";
  font-size: 650px;
  font-weight: 600;
  position: absolute;
  right: -90px;
  bottom: -130px;
  line-height: 1;
  color: #ffffff05;
  pointer-events: none;
}
.welcome-money {
  font-size: clamp(42px, 5vw, 75px);
  letter-spacing: -3px;
  margin: 20px 0;
}
.welcome-right .eyebrow {
  color: #c8d8b9;
}
.welcome-example {
  padding: 26px 0;
  border-top: 1px solid #ffffff28;
  width: 100%;
  max-width: 350px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.welcome-example small {
  color: #becfb3;
}
.welcome-right .demo-label {
  color: #c8d8b9;
  margin-top: 30px;
}
.error-screen {
  text-align: center;
  margin: 20vh auto;
  max-width: 450px;
  padding: 25px;
}
.error-screen p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin: 18px 0;
}
.mobile-brand {
  display: none;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 15px);
  background: #243b2c;
  color: #fff;
  padding: 13px 21px;
  border-radius: 12px;
  font-size: 13px;
  max-width: calc(100vw - 30px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 100;
  box-shadow: 0 8px 25px #1b302420;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.connection-note {
  color: var(--bad);
  font-size: 12px;
  line-height: 1.6;
  padding: 13px 0;
  margin-bottom: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes sheet {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1450px) {
  .content {
    padding-left: 65px;
    padding-right: 65px;
  }
  .dashboard {
    gap: 46px;
  }
  .balance {
    padding: 33px 36px;
  }
  .categories {
    padding: 28px 30px 16px;
  }
}
@media (max-width: 1120px) {
  .sidebar {
    width: 185px;
    padding: 30px 16px;
  }
  .shell {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .content {
    padding: 0 27px 35px;
  }
  .dashboard {
    gap: 24px;
    grid-template-columns: minmax(0, 1.5fr) minmax(255px, 1fr);
  }
  .quick-actions .primary,
  .quick-actions .secondary {
    font-size: 12px;
    padding: 0 10px;
  }
  .balance {
    padding: 25px;
  }
  .balance-value {
    font-size: 42px;
  }
  .brand {
    font-size: 29px;
  }
}
@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .right-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  .right-column .recent-section {
    grid-column: 1/-1;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .balance-value {
    font-size: 53px;
  }
  .welcome-right {
    padding: 30px;
  }
  .welcome-left {
    padding: 40px;
  }
  .welcome-left h1 {
    font-size: 42px;
  }
  .welcome-money {
    font-size: 49px;
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line);
    background: #f8faf5f5;
    backdrop-filter: blur(15px);
  }
  .sidebar > .brand,
  .brand-sub,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    justify-content: space-around;
    gap: 0;
  }
  .nav button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 7px 10px;
    font-size: 9px;
    border-radius: 10px;
    background: none !important;
  }
  .nav button svg {
    width: 21px;
    height: 21px;
  }
  .nav button.active {
    color: var(--green);
  }
  .nav button:not(.active) {
    color: #8b9385;
  }
  .content {
    padding: 0 20px calc(100px + env(safe-area-inset-bottom));
    margin: 0;
  }
  .topbar {
    height: 74px;
    border-bottom: 0;
  }
  .family-name {
    font-size: 11px;
    gap: 7px;
  }
  .family-name > svg {
    display: none;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -1px;
  }
  .mobile-brand img {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }
  .family-name .family-title {
    display: none;
  }
  .date-label {
    display: none;
  }
  .top-actions {
    gap: 0;
  }
  .avatar {
    width: 34px;
    height: 34px;
  }
  .profile {
    font-size: 11px;
  }
  .page-head {
    margin: 15px 0 23px;
    align-items: flex-start;
  }
  .page-head h1 {
    font-size: 25px;
    letter-spacing: -0.7px;
  }
  .page-head p {
    font-size: 11px;
    margin-top: 7px;
  }
  .page-head .primary {
    font-size: 11px;
    padding: 0 12px;
    min-height: 39px;
  }
  .page-head .primary svg {
    width: 16px;
  }
  .month-label {
    font-size: 10px;
    padding: 8px;
    background: transparent;
  }
  .month-label svg {
    display: none;
  }
  .dashboard {
    gap: 25px;
  }
  .balance {
    padding: 24px;
    border-radius: 18px;
  }
  .balance-value {
    font-size: 46px;
    letter-spacing: -1.7px;
    margin-top: 18px;
  }
  .balance-top {
    font-size: 12px;
  }
  .daily {
    font-size: 11px;
  }
  .balance-bottom {
    margin-top: 24px;
    padding-top: 18px;
  }
  .balance-bottom strong {
    font-size: 18px;
  }
  .balance-bottom small {
    font-size: 10px;
  }
  .quick-actions {
    margin: 12px 0 22px;
    grid-template-columns: 1.3fr 1fr 45px;
    gap: 7px;
  }
  .quick-actions .primary,
  .quick-actions .secondary {
    font-size: 11px;
    min-height: 46px;
  }
  .quick-actions svg {
    width: 17px;
    height: 17px;
  }
  .note-line {
    font-size: 11px;
    padding: 12px;
    margin-bottom: 22px;
  }
  .categories {
    padding: 22px 20px 10px;
  }
  .section-head {
    margin-bottom: 17px;
  }
  .section-head h2 {
    font-size: 17px;
  }
  .category-row {
    padding: 14px 0;
  }
  .cat-line {
    font-size: 12px;
  }
  .cat-meta {
    font-size: 9px;
  }
  .cat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .right-column {
    display: flex;
    gap: 25px;
  }
  .project-preview {
    padding: 21px;
  }
  .plan-main {
    padding: 15px 0;
  }
  .mini-body strong {
    font-size: 12px;
  }
  .mini-body p {
    font-size: 10px;
  }
  .recent-item .recent-body strong {
    font-size: 12px;
  }
  .recent-item .recent-body small {
    font-size: 10px;
  }
  .recent-amount {
    font-size: 13px;
  }
  .history-tools {
    gap: 7px;
  }
  .history-tools input,
  .history-tools select {
    font-size: 11px;
    padding: 10px;
    flex: 1;
    min-width: 120px;
  }
  .history-row {
    gap: 10px;
  }
  .history-row .recent-body strong {
    font-size: 12px;
  }
  .history-row .recent-body small {
    font-size: 10px;
  }
  .history-row .recent-amount {
    font-size: 12px;
  }
  .report-stats {
    gap: 15px;
    margin-bottom: 23px;
  }
  .report-stats strong {
    font-size: 20px;
  }
  .report-stats small {
    font-size: 10px;
  }
  .report-block {
    padding: 22px;
  }
  .settings-box {
    padding: 22px;
  }
  .settings-grid {
    gap: 0;
  }
  .welcome {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
  }
  .welcome-left {
    padding: 34px 27px 35px;
    flex: 1;
  }
  .welcome-left .brand {
    margin-bottom: 45px;
  }
  .welcome-left h1 {
    font-size: 43px;
    max-width: 330px;
  }
  .welcome-left > p {
    font-size: 14px;
    margin: 20px 0 25px;
  }
  .welcome-buttons {
    display: grid;
  }
  .welcome-buttons button {
    min-height: 49px;
  }
  .welcome-left .welcome-note {
    margin-bottom: 0;
    font-size: 10px;
  }
  .welcome-right {
    padding: 30px 27px;
    align-items: flex-start;
  }
  .welcome-right > .eyebrow {
    font-size: 10px;
  }
  .welcome-money {
    font-size: 46px;
    margin: 10px 0 18px;
  }
  .welcome-example {
    padding: 15px 0;
    max-width: none;
    font-size: 12px;
  }
  .welcome-right .demo-label {
    font-size: 10px;
    margin-top: 18px;
  }
  .welcome-right:after {
    font-size: 400px;
    right: -30px;
    bottom: -95px;
  }
  dialog {
    width: 100%;
    max-width: 100%;
    max-height: 92svh;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }
  .sheet-inner {
    padding: 24px 22px calc(25px + env(safe-area-inset-bottom));
  }
  .sheet-head h2 {
    font-size: 21px;
  }
  .sheet-inner input,
  .sheet-inner select,
  .sheet-inner textarea {
    font-size: 16px;
  }
  .sheet-inner .amount-input {
    font-size: 43px;
  }
  .category-picker {
    gap: 8px;
  }
  .category-picker button {
    min-height: 78px;
    font-size: 11px;
  }
  .footnote {
    font-size: 9px;
    margin-top: 25px;
  }
  #toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: max-content;
    font-size: 12px;
    max-width: calc(100vw - 35px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Вариант 2: простой главный экран, своя клавиатура, цвет категорий ---------- */
.page-head.no-title {
  display: none;
}
.page-head {
  gap: 10px;
}
.ghost.back svg {
  transform: rotate(180deg);
}
.home {
  max-width: 1180px;
}
.home-simple {
  max-width: 520px;
  margin: 0 auto;
}
.hero {
  position: relative;
  padding: 26px 24px 22px;
  border-radius: 28px;
  color: #fff;
  background: var(--green);
  transition: background 0.3s;
}
.hero.tone-warn {
  background: #8a5a12;
}
.hero.tone-bad {
  background: #8f3329;
}
.hero-info {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffffb0;
}
.hero-info svg {
  width: 20px;
  height: 20px;
}
.hero-label {
  margin: 0;
  font-size: 15px;
  color: #ffffffd0;
}
.hero-value {
  margin: 6px 0 0;
  font-size: clamp(44px, 13vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero-sub {
  margin: 10px 0 0;
  font-size: 14px;
  color: #ffffffd0;
}
.pace {
  position: relative;
  height: 8px;
  margin-top: 20px;
  border-radius: 4px;
  background: #ffffff2e;
}
.pace-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #fff;
  transition: width 0.4s;
}
.pace-mark {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 16px;
  border-radius: 1px;
  background: #ffffffd0;
}
.hero-pace {
  margin: 10px 0 0;
  font-size: 13px;
  color: #ffffffd0;
}
.hero-full .hero-value {
  font-size: clamp(36px, 10vw, 48px);
}
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}
.tiles button {
  padding: 12px 14px;
  border-radius: 16px;
  background: #ffffff1f;
  color: #fff;
  text-align: left;
}
.tiles small {
  display: block;
  font-size: 12px;
  color: #ffffffc8;
}
.tiles strong {
  display: block;
  margin-top: 2px;
  font-size: 19px;
}
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 64px;
  margin-top: 14px;
  border-radius: 22px;
  background: var(--ink);
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  box-shadow: 0 10px 24px #202c2530;
}
.cta:active,
.keypad button:active,
.category-picker button:active,
.cta-row button:active {
  transform: scale(0.97);
}
.cta svg {
  width: 22px;
  height: 22px;
}
.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 22px;
}
.cta-row button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  padding: 0 8px;
}
.cta-row svg {
  width: 19px;
  height: 19px;
}
.home .upcoming,
.home .recent-section,
.home .categories {
  margin-top: 14px;
}
.home-full .quick-actions {
  margin: 14px 0;
}
.mode-link {
  display: block;
  margin: 26px auto 6px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mini-body p.warning {
  color: var(--warn);
}
.set-limit {
  color: var(--green);
  font-weight: 500;
}
.track.near span {
  background: #c98a1b;
}
.ask {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 0 0 14px;
  padding: 18px 20px;
  border-radius: 22px;
  background: #fbf3e2;
  border: 1px solid #efdfbc;
}
.ask h3 {
  margin: 4px 0;
  font-size: 18px;
}
.ask p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.ask-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.ask-side strong {
  font-size: 20px;
}
.ask-side .primary {
  min-height: 42px;
  padding: 0 18px;
}
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 12px 0 10px;
  border-radius: 14px;
  background: var(--soft);
}
.segmented button {
  height: 42px;
  border-radius: 11px;
  font-weight: 500;
}
.segmented button.active {
  background: var(--paper);
  box-shadow: 0 1px 4px #1b302420;
}

/* Цвета категорий */
.cat-icon.tone-bag { background: #e2f3e6; color: #1f7a3d; }
.cat-icon.tone-home { background: #fdeed8; color: #a86107; }
.cat-icon.tone-car { background: #e1edfb; color: #1c5fb0; }
.cat-icon.tone-heart { background: #fde6e4; color: #c0392b; }
.cat-icon.tone-spark { background: #efe8fb; color: #6b3fb5; }
.cat-icon.tone-coffee { background: #f1e7dc; color: #7a5230; }
.cat-icon.tone-build { background: #fde9dc; color: #b8500f; }
.cat-icon.tone-child { background: #fde6f0; color: #b83274; }
.cat-icon.tone-book { background: #dff3f1; color: #0f6f68; }
.cat-icon.tone-box { background: #ecefea; color: #5a655c; }
.cat-icon.tone-down { background: #e2f3e6; color: #1f7a3d; }
.cat-icon.tone-transfer { background: #e1edfb; color: #1c5fb0; }
.cat-icon.tone-shield { background: #efe8fb; color: #6b3fb5; }

/* Ввод траты */
.amount-show {
  display: block;
  margin: 2px 0 14px;
  text-align: center;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.amount-show.empty {
  color: #b9c0b6;
}
.amount-show.shake {
  animation: shake 0.35s;
  color: var(--bad);
}
@keyframes shake {
  25% { transform: translateX(-7px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-4px); }
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.keypad button {
  height: 54px;
  border-radius: 16px;
  background: #f1f4ec;
  font-size: 24px;
  font-weight: 500;
  display: grid;
  place-items: center;
}
.keypad button svg {
  width: 22px;
  height: 22px;
}
.category-picker {
  gap: 8px;
  margin: 16px 0 14px;
}
.category-picker button {
  gap: 6px;
  min-height: 82px;
  border-radius: 18px;
  background: #f6f8f2;
  font-size: 13px;
  font-weight: 500;
}
.category-picker .cat-icon {
  width: 38px;
  height: 38px;
}
#expense-form + .form-error,
.sheet-inner .form-error {
  text-align: center;
}
#toast {
  display: flex;
  align-items: center;
  gap: 10px;
  top: calc(14px + env(safe-area-inset-top));
  bottom: auto;
  transform: translate(-50%, -15px);
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 500;
}
#toast svg {
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: #3fae6a;
  box-sizing: content-box;
}
@media (max-width: 650px) {
  .nav button {
    font-size: 11px;
  }
  .content {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .recent-item strong,
  .category-row strong,
  .mini-body strong {
    font-size: 15px;
  }
  .recent-item small,
  .mini-body p,
  .cat-meta {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .amount-show.shake {
    animation: none;
  }
}
.category-row .track {
  display: block;
  height: 5px;
  margin: 8px 0 6px;
}

/* ---------- Расчёт: лесенка от дохода до денег на жизнь ---------- */
.calc {
  max-width: 560px;
  margin: 0 auto;
}
.ladder,
.calc-box {
  padding: 22px 22px 18px;
  border-radius: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.calc-box {
  margin-top: 14px;
}
.ladder-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  text-align: left;
}
.ladder-row span {
  color: var(--muted);
}
button.ladder-row span {
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}
.ladder-row strong {
  font-weight: 600;
  white-space: nowrap;
}
.ladder-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 16px;
  font-size: 18px;
  font-weight: 600;
}
.ladder-total strong {
  flex: none;
  white-space: nowrap;
  font-size: 30px;
  letter-spacing: -0.03em;
  color: var(--green);
}
.ladder-total strong.negative {
  color: var(--bad);
}
.ladder-day {
  margin: 2px 0 0;
  text-align: right;
  color: var(--muted);
  font-size: 15px;
}
.ladder-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--soft);
  font-size: 14px;
}
.ladder.bad .ladder-note {
  background: #fbe9e6;
  color: var(--bad);
}
.calc-fact,
.calc-later {
  margin: 12px 4px 0;
  font-size: 14px;
  color: var(--muted);
}
.source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.source-main {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.source-main strong {
  display: block;
  font-size: 16px;
}
.source-main small {
  color: var(--muted);
  font-size: 12px;
}
.source-row .secondary {
  min-height: 38px;
  padding: 0 14px;
}
.source-row .tag svg {
  width: 16px;
  height: 16px;
}
.calc > .wide {
  margin-top: 16px;
}
.ask.arrived {
  background: #eaf3e4;
  border-color: #cfe0c4;
}
.detail-title {
  margin: 22px 0 4px;
  font-size: 16px;
}
.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.pay-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

/* Невысокие экраны: клавиатура и категории должны помещаться без прокрутки */
@media (max-height: 780px) {
  #expense-form .amount-show {
    font-size: 40px;
    margin-bottom: 10px;
  }
  #expense-form .keypad {
    gap: 6px;
  }
  #expense-form .keypad button {
    height: 44px;
    font-size: 21px;
    border-radius: 13px;
  }
  #expense-form .category-picker {
    gap: 6px;
    margin: 12px 0 10px;
  }
  #expense-form .category-picker button {
    min-height: 64px;
    gap: 3px;
    padding: 6px 4px;
    border-radius: 14px;
    font-size: 12px;
  }
  #expense-form .category-picker .cat-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  #expense-form .category-picker .cat-icon svg {
    width: 17px;
    height: 17px;
  }
}
@media (max-height: 640px) {
  #expense-form .amount-show {
    font-size: 34px;
    margin-bottom: 8px;
  }
  #expense-form .keypad button {
    height: 38px;
    font-size: 19px;
  }
  #expense-form .category-picker {
    grid-template-columns: repeat(4, 1fr);
  }
  #expense-form .category-picker button {
    min-height: 56px;
    font-size: 11px;
  }
}
@media (max-width: 350px) {
  .hero {
    padding: 22px 18px 18px;
  }
  .tiles strong {
    font-size: 17px;
  }
  .cta-row button {
    font-size: 13px;
    gap: 6px;
  }
  .ladder,
  .calc-box {
    padding: 18px 16px 14px;
  }
  .ladder-total strong {
    font-size: 28px;
  }
}
@media (max-height: 640px) {
  dialog {
    max-height: 97svh;
  }
  .sheet-inner {
    padding: 16px 18px;
  }
  .sheet-head {
    margin-bottom: 4px;
  }
  #expense-form .amount-show {
    margin: 0 0 6px;
    line-height: 1;
  }
}

/* ---------- Люди ---------- */
.person {
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--line);
}
.person .segmented {
  margin: 8px 0 6px;
}
.person .segmented button {
  font-size: 13px;
  height: 38px;
}
.person .secondary {
  min-height: 36px;
  padding: 0 14px;
}
.ask.incoming {
  background: #e9f0fb;
  border-color: #cddcf3;
}
.ask-side .link-button {
  font-size: 13px;
  color: var(--muted);
}
.invite-link {
  width: 100%;
  font-size: 13px;
  word-break: break-all;
  resize: none;
}

.login-buttons {
  display: grid;
  gap: 10px;
  margin: 18px 0 6px;
}
.login-buttons .cta {
  margin-top: 0;
  text-decoration: none;
}
.cta.login-yandex {
  background: #fc3f1d;
  box-shadow: none;
}
.cta.login-vk {
  background: #0077ff;
  box-shadow: none;
}

/* ---------- Список покупок ---------- */
.shop {
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: 84px;
}
.shop-add {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.shop-add input {
  flex: 1;
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  font-size: 17px;
}
.shop-add .primary {
  width: 54px;
  min-height: 54px;
  padding: 0;
  border-radius: 18px;
  flex-shrink: 0;
  justify-content: center;
}
.shop-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 6px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.shop-check {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #b9c5b3;
  color: #fff;
}
.shop-row.done .shop-check {
  border-color: var(--green);
  background: var(--green);
}
.shop-check svg {
  width: 16px;
  height: 16px;
}
.shop-main {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.shop-main strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-main small {
  color: var(--muted);
  font-size: 12px;
}
.shop-row.done .shop-main strong {
  color: var(--muted);
  text-decoration: line-through;
}
.shop-price {
  flex-shrink: 0;
  min-width: 74px;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--soft);
  font-weight: 600;
  font-size: 14px;
}
.shop-price.empty {
  background: none;
  border: 1px dashed #b9c5b3;
  color: var(--muted);
  font-weight: 400;
}
.shop-cart-head {
  margin: 20px 4px 8px;
}
.shop-bar {
  position: sticky;
  bottom: calc(78px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 12px 12px 18px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 24px #202c2530;
}
.shop-bar .primary {
  min-height: 44px;
  padding: 0 22px;
  background: #fff;
  color: var(--ink);
}
@media (min-width: 651px) {
  .shop-bar {
    bottom: 16px;
  }
}

/* ---------- Первые шаги и быстрые кнопки ---------- */
.cta-row.three {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.cta-row.three button {
  flex-direction: column;
  height: 66px;
  gap: 5px;
  font-size: 13px;
}
.starter {
  margin: 0 0 18px;
  padding: 18px 18px 8px;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.starter-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.starter-num {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  font-weight: 600;
  font-size: 14px;
}
.starter-step.done .starter-num {
  background: var(--green);
  color: #fff;
}
.starter-num svg {
  width: 15px;
  height: 15px;
}
.starter-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.35;
}
.starter-step.done .starter-text {
  color: var(--muted);
  text-decoration: line-through;
}
.starter-step .secondary {
  min-height: 38px;
  padding: 0 14px;
  flex-shrink: 0;
}

.welcome-note + .secondary.wide {
  margin-top: 14px;
}

/* ---------- Кредиты и поздравление ---------- */
.danger-text {
  color: var(--bad);
}
.loan {
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--line);
}
.loan-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.loan-head strong {
  display: block;
  font-size: 17px;
}
.loan-head small,
.loan-end {
  color: var(--muted);
  font-size: 13px;
}
.loan-balance {
  margin: 8px 0 2px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.loan-end {
  margin: 0 0 12px;
}
.early-option {
  position: relative;
  display: block;
  margin: 8px 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--paper);
}
.early-option.on {
  border-color: var(--green);
  background: var(--soft);
}
.early-option input {
  position: absolute;
  opacity: 0;
}
.early-option strong {
  display: block;
  font-size: 16px;
}
.early-option small {
  color: var(--muted);
  font-size: 13px;
}
.celebrate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #15251fb8;
  overflow: hidden;
}
.celebrate i {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 3px;
  animation: confetti 3s linear infinite;
}
@keyframes confetti {
  to {
    transform: translateY(110vh) rotate(720deg);
  }
}
.celebrate-card {
  position: relative;
  max-width: 360px;
  padding: 28px 24px 22px;
  border-radius: 28px;
  background: var(--paper);
  text-align: center;
  animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes pop {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
}
.celebrate-mark {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
}
.celebrate-mark svg {
  width: 32px;
  height: 32px;
}
.celebrate-card h2 {
  margin: 14px 0 8px;
  font-size: 28px;
}
.celebrate-card p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.45;
}
@media (prefers-reduced-motion: reduce) {
  .celebrate i {
    display: none;
  }
}

.code-entry {
  opacity: 0.75;
}

/* ---------- Итоги: вердикт месяца, динамика цен ---------- */
.verdict {
  margin: 0 0 16px;
  padding: 22px 24px;
  border-radius: 26px;
  background: var(--green);
  color: #fff;
}
.verdict.minus {
  background: #8f3329;
}
.verdict p {
  margin: 0;
  font-size: 15px;
  color: #ffffffd0;
}
.verdict h2 {
  margin: 4px 0 6px;
  font-size: clamp(28px, 8vw, 38px);
  letter-spacing: -0.03em;
}
.verdict small {
  color: #ffffffd0;
  font-size: 14px;
}
.delta {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}
.delta.up,
.price-pct.up {
  color: var(--bad);
}
.delta.down,
.price-pct.down {
  color: #1f7a3d;
}
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.price-row strong {
  display: block;
  font-size: 16px;
}
.price-row small {
  color: var(--muted);
  font-size: 12px;
}
.price-pct {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- НЗ по желанию ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}
.chips button {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 14px;
  font-weight: 500;
}
.tiles strong {
  overflow-wrap: anywhere;
}

/* ---------- Отмена и правка записей ---------- */
#toast.with-undo {
  pointer-events: auto;
}
#toast button {
  margin-left: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  background: #ffffff26;
  color: #fff;
  font-weight: 600;
}
.recent-item[data-action],
.history-row[data-action] {
  cursor: pointer;
}

/* ---------- Правки 11.10 ---------- */
.hero[data-action] {
  cursor: pointer;
}
.hero-pace u {
  text-underline-offset: 3px;
}
.profile.open svg {
  transform: rotate(180deg);
}
.detail-stat span small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.detail-stat.sub {
  padding: 6px 0 6px 14px;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}
.detail-stat.total strong {
  font-size: 20px;
}
.shop-del {
  flex: none;
  color: var(--muted);
}
.sheet-inner .expense-note {
  margin: 10px 0 12px;
}

/* ---------- Рассказать своими словами ---------- */
[data-action="ai-mic"].on {
  border-color: var(--bad);
  color: var(--bad);
}
.sheet-inner label.ai-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.sheet-inner .ai-item input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}

/* ---------- Правки 11.10, вечер ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--bg);
}
@media (max-width: 650px) {
  .topbar {
    margin: 0 -20px;
    padding: 0 20px;
    box-shadow: 0 1px 0 var(--line);
  }
}
.ai-mic svg {
  width: 20px;
  height: 20px;
}
.sheet-inner .ai-mic {
  width: 100%;
  margin-bottom: 12px;
}
.sheet-inner .ai-mic.on {
  background: var(--bad);
}

/* ---------- Плавающий микрофон ---------- */
.fab-mic {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 14;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 22px rgba(32, 44, 37, 0.28);
}
.fab-mic svg {
  width: 24px;
  height: 24px;
}
.fab-mic:active {
  transform: scale(0.94);
}
@media (max-width: 650px) {
  .fab-mic {
    right: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom));
  }
  .fab-mic.raised {
    bottom: calc(150px + env(safe-area-inset-bottom));
  }
}
.steps {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
}
.steps li {
  margin-bottom: 6px;
}

a.setting-row {
  color: inherit;
  text-decoration: none;
}
.welcome-note a {
  color: inherit;
}
