:root {
  --bg: #f6f2ec;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --text: #211e1b;
  --muted: #817a72;
  --line: #e7e0d8;
  --sage: #8f9f8a;
  --sage-dark: #556956;
  --taupe: #6b5e56;
  --sand: #eadccb;
  --danger: #b95f58;
  --success: #487b55;
  --shadow: 0 14px 36px rgba(62, 52, 43, 0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100vh; }
button { font: inherit; }

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom));
  position: relative;
}

.topbar {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 16px;
}

.brand-mark {
  width: 38px; height: 38px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #75695f, #3f493f);
  color: #fff; font-weight: 700; letter-spacing: -1px;
  box-shadow: var(--shadow);
}
.brand-name { font-weight: 750; letter-spacing: 0.18em; font-size: 14px; }
.brand-caption { font-size: 10px; color: var(--muted); margin-top: 2px; letter-spacing: 0.08em; }
.icon-button { border: 0; background: var(--surface); border-radius: 14px; width: 42px; height: 42px; color: var(--taupe); box-shadow: var(--shadow); }

.page { display: grid; gap: 14px; }
.hero {
  padding: 22px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.92), transparent 30%),
    linear-gradient(135deg, rgba(143,159,138,.24), rgba(234,220,203,.62));
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow);
}
.hero h1 { margin: 0; font-size: clamp(28px, 8vw, 38px); line-height: 1.03; letter-spacing: -0.04em; }
.hero p { color: var(--muted); margin: 10px 0 0; line-height: 1.45; }
.hero-meta { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-top: 24px; }
.date { font-size: 13px; color: var(--muted); }
.score { font-size: 34px; font-weight: 750; color: var(--sage-dark); }

.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.card-link { border: 0; background: transparent; color: var(--sage-dark); font-size: 13px; padding: 0; }

.progress-track { height: 9px; border-radius: 999px; background: #ebe7e2; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #71866f, #9dad98); border-radius: inherit; }

.task-list, .goal-list, .settings-list { display: grid; gap: 10px; }
.task {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.task:last-child { border-bottom: 0; }
.check {
  width: 24px; height: 24px; border-radius: 50%; border: 1.8px solid #b9b3ac;
  display: grid; place-items: center; color: white; font-size: 13px;
}
.task.done .check { border-color: var(--success); background: var(--success); }
.task-title { font-weight: 650; }
.task-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.task-icon { color: var(--muted); font-size: 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric { padding: 15px; border-radius: var(--radius-md); background: rgba(255,255,255,.68); border: 1px solid var(--line); }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { margin-top: 6px; font-size: 21px; font-weight: 730; }
.metric-value.positive { color: var(--success); }
.metric-value.negative { color: var(--danger); }

.goal {
  display: grid; grid-template-columns: 42px 1fr 42px; gap: 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.goal:last-child { border-bottom: 0; }
.goal-icon { width: 38px; height: 38px; border-radius: 12px; background: #f1ece6; display: grid; place-items: center; }
.goal-title { font-weight: 700; }
.goal-meta { color: var(--muted); font-size: 12px; margin: 3px 0 7px; }
.goal-percent { text-align: right; font-weight: 750; color: var(--sage-dark); }

.section-heading { margin: 8px 4px 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.placeholder { text-align: center; padding: 40px 20px; }
.placeholder h2 { font-size: 26px; margin-bottom: 8px; }
.placeholder p { margin: 0; color: var(--muted); line-height: 1.5; }

.fab {
  width: 100%; border: 0; border-radius: 16px; padding: 15px 18px;
  background: linear-gradient(135deg, #536a55, #83977f); color: white; font-weight: 700;
  box-shadow: 0 10px 24px rgba(83,106,85,.23);
}

.bottom-nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 520px);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  background: rgba(247,244,239,.93); border-top: 1px solid var(--line); backdrop-filter: blur(18px);
  z-index: 50;
}
.nav-item { border: 0; background: transparent; color: #807970; display: grid; gap: 4px; place-items: center; min-height: 50px; }
.nav-item span { font-size: 21px; line-height: 1; }
.nav-item small { font-size: 10px; }
.nav-item.active { color: var(--sage-dark); font-weight: 700; }

@media (min-width: 900px) {
  body { padding: 28px 0; }
  .app-shell { min-height: calc(100vh - 56px); border-radius: 36px; box-shadow: 0 24px 70px rgba(51,45,39,.12); background: rgba(255,255,255,.18); overflow: hidden; }
  .bottom-nav { bottom: 28px; border-radius: 0 0 36px 36px; }
}

/* ARVYNO 0.2 — live tasks */
.progress-caption {
  margin-top: 9px;
  font-size: 12px;
  color: var(--muted);
}

.inline-note {
  padding: 13px 15px;
  border: 1px solid rgba(143, 159, 138, .28);
  background: rgba(143, 159, 138, .12);
  color: var(--sage-dark);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.4;
}

.fab:disabled {
  opacity: .48;
  cursor: not-allowed;
  box-shadow: none;
}

.task {
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}

.task-pending {
  opacity: .48;
  pointer-events: none;
}

.task-main {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.task-edit {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 11px;
  background: #f3eee8;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
}

.task-toggle {
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.task.done .task-title {
  color: #88817a;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.task.done .task-meta {
  opacity: .7;
}

.task-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.priority-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9785f;
  flex: 0 0 auto;
}

.task-loading {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #ddd6ce;
  border-top-color: var(--sage-dark);
  border-radius: 50%;
  animation: arvyno-spin .7s linear infinite;
}

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

.empty-state {
  text-align: center;
  padding: 24px 14px 18px;
}

.empty-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(143, 159, 138, .15);
  color: var(--sage-dark);
  font-size: 20px;
  font-weight: 700;
}

.empty-title {
  font-weight: 720;
  font-size: 16px;
}

.empty-text {
  max-width: 310px;
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px 14px max(18px, env(safe-area-inset-bottom));
  background: rgba(31, 27, 23, 0);
  backdrop-filter: blur(0);
  transition: background .18s ease, backdrop-filter .18s ease;
}

.modal-backdrop.visible {
  background: rgba(31, 27, 23, .30);
  backdrop-filter: blur(5px);
}

.modal-sheet {
  width: min(100%, 510px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 9px 18px 20px;
  border-radius: 28px;
  background: #fbf8f4;
  box-shadow: 0 28px 80px rgba(40, 33, 27, .22);
  transform: translateY(28px) scale(.985);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}

.modal-backdrop.visible .modal-sheet {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-handle {
  width: 40px;
  height: 4px;
  margin: 3px auto 13px;
  border-radius: 999px;
  background: #d8d1c9;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 3px 0 0;
  font-size: 25px;
  letter-spacing: -.035em;
}

.modal-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #eee8e1;
  color: #716960;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.task-form {
  display: grid;
  gap: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1px solid #e0d9d1;
  border-radius: 14px;
  padding: 0 13px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.field input:focus,
.field select:focus {
  border-color: #9bab98;
  box-shadow: 0 0 0 3px rgba(143, 159, 138, .13);
}

.modal-save {
  margin-top: 5px;
}

.danger-button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  background: rgba(185, 95, 88, .09);
  color: var(--danger);
  font-weight: 680;
  cursor: pointer;
}

.app-toast {
  position: fixed;
  left: 50%;
  top: max(16px, env(safe-area-inset-top));
  z-index: 400;
  max-width: calc(100vw - 32px);
  padding: 11px 15px;
  border-radius: 14px;
  background: rgba(50, 63, 51, .94);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 12px 35px rgba(39, 47, 39, .25);
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.app-toast.error { background: rgba(127, 67, 62, .96); }
.app-toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 390px) {
  .form-grid { grid-template-columns: 1fr; }
  .modal-sheet { padding-left: 15px; padding-right: 15px; }
}

@media (min-width: 900px) {
  .modal-backdrop { align-items: center; }
  .modal-sheet { border-radius: 30px; }
}

/* ARVYNO 0.3 — habits & stability */
.card-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.habit-list,
.habit-manage-list {
  display: grid;
  gap: 8px;
}

.habit-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity .18s ease;
}

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

.habit-check {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1.8px solid #aaa79f;
  border-radius: 9px;
  background: transparent;
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.habit-row.done .habit-check {
  border-color: var(--success);
  background: var(--success);
}

.habit-main {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.habit-title {
  font-size: 14px;
  font-weight: 710;
  line-height: 1.3;
}

.habit-row.done .habit-title { color: #777168; }

.habit-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.habit-streak {
  white-space: nowrap;
  color: var(--taupe);
  font-size: 12px;
  font-weight: 700;
}

.habit-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.habit-summary-strip span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
}

.habit-summary-strip b {
  color: var(--text);
  font-size: 14px;
}

.mini-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.mini-empty button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 11px;
  padding: 8px 10px;
  background: rgba(143, 159, 138, .13);
  color: var(--sage-dark);
  font-weight: 680;
}

.page-heading {
  padding: 12px 4px 4px;
}

.page-heading h1 {
  margin: 5px 0 8px;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.03;
  letter-spacing: -.04em;
}

.page-heading p,
.muted-paragraph {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.section-eyebrow {
  color: var(--sage-dark);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .16em;
}

.discipline-overview {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(83, 106, 85, .93), rgba(126, 144, 122, .92));
  color: white;
  box-shadow: var(--shadow);
}

.discipline-score {
  display: grid;
  align-content: center;
  border-right: 1px solid rgba(255,255,255,.18);
}

.discipline-number {
  font-size: 38px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: -.04em;
}

.discipline-label {
  margin-top: 7px;
  color: rgba(255,255,255,.72);
  font-size: 10px;
  line-height: 1.35;
}

.discipline-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 5px;
}

.discipline-metrics div {
  display: grid;
  gap: 5px;
  text-align: center;
}

.discipline-metrics span {
  color: rgba(255,255,255,.67);
  font-size: 9px;
}

.discipline-metrics b {
  font-size: 14px;
}

.habit-manage-item {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.62);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.habit-manage-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.habit-manage-arrow {
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
}

.habit-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 13px;
}

.habit-stats-row span {
  display: grid;
  gap: 2px;
}

.habit-stats-row b {
  font-size: 14px;
  color: var(--sage-dark);
}

.habit-stats-row small {
  color: var(--muted);
  font-size: 9px;
}

.progress-track.compact {
  height: 6px;
  margin-top: 11px;
}

.soft-card {
  background: rgba(255,255,255,.48);
}

.segment-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  border-radius: 14px;
  background: #eee9e3;
}

.segment-control label { cursor: pointer; }
.segment-control input { position: absolute; opacity: 0; pointer-events: none; }
.segment-control span {
  display: block;
  padding: 10px 8px;
  border-radius: 11px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 680;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.segment-control input:checked + span {
  background: white;
  color: var(--sage-dark);
  box-shadow: 0 4px 14px rgba(59, 52, 44, .08);
}

.weekday-field {
  display: grid;
  gap: 8px;
}

.weekday-field.hidden { display: none; }

.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

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

.weekday-chip { cursor: pointer; }
.weekday-chip input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-chip span {
  min-height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid #ded7cf;
  border-radius: 11px;
  background: white;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  transition: .16s ease;
}

.weekday-chip input:checked + span {
  border-color: #788b75;
  background: #6f846e;
  color: white;
}

.habit-modal-note {
  padding: 12px 13px;
  border-radius: 13px;
  background: rgba(143,159,138,.11);
  color: var(--sage-dark);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 390px) {
  .discipline-overview { grid-template-columns: 108px 1fr; padding: 15px; }
  .discipline-number { font-size: 32px; }
  .weekday-grid { gap: 3px; }
  .weekday-chip span { min-height: 36px; font-size: 10px; }
}

/* ARVYNO 0.4 — habit day tracker */
.habit-tracker-overlay {
  position: fixed;
  inset: 0;
  z-index: 170;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(239, 236, 230, 0);
  backdrop-filter: blur(0);
  transition: background .18s ease, backdrop-filter .18s ease;
}

.habit-tracker-overlay.visible {
  background: rgba(239, 236, 230, .98);
  backdrop-filter: blur(10px);
}

.habit-tracker-panel {
  width: min(100%, 520px);
  min-height: 100%;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 16px max(30px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 100% 0%, rgba(143,159,138,.18), transparent 34%),
    linear-gradient(180deg, #f7f4ef 0%, #f2eee8 100%);
  transform: translateY(16px);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}

.habit-tracker-overlay.visible .habit-tracker-panel {
  transform: translateY(0);
  opacity: 1;
}

.habit-tracker-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: 5px 0 12px;
  background: linear-gradient(180deg, rgba(247,244,239,.97) 72%, rgba(247,244,239,0));
}

.tracker-top-title {
  text-align: center;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: -.01em;
}

.tracker-icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(89, 99, 86, .14);
  border-radius: 14px;
  background: rgba(255,255,255,.68);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.tracker-hero {
  padding: 18px 4px 16px;
}

.tracker-hero h1 {
  margin: 6px 0 8px;
  max-width: 390px;
  font-size: clamp(31px, 9vw, 43px);
  line-height: .98;
  letter-spacing: -.05em;
}

.tracker-hero p {
  margin: 0;
  max-width: 400px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.tracker-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.tracker-stat-grid > div {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid rgba(94, 107, 92, .12);
  border-radius: 16px;
  background: rgba(255,255,255,.58);
}

.tracker-stat-grid b,
.tracker-stat-grid span {
  display: block;
}

.tracker-stat-grid b {
  color: var(--sage-dark);
  font-size: 17px;
  letter-spacing: -.02em;
}

.tracker-stat-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.tracker-calendar-card {
  padding: 17px 15px 18px;
  border: 1px solid rgba(101, 111, 98, .12);
  border-radius: 27px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 18px 44px rgba(63, 57, 49, .07);
}

.tracker-range-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.tracker-range-title {
  text-align: center;
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -.025em;
}

.tracker-range-meta {
  margin-top: 3px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.tracker-page-arrow {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 13px;
  background: #efebe5;
  color: var(--sage-dark);
  font-size: 25px;
  cursor: pointer;
}

.tracker-page-arrow:disabled {
  opacity: .3;
  cursor: default;
}

.habit-day-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.habit-day {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 1.35px solid #9c9b93;
  border-radius: 50%;
  background: rgba(255,255,255,.72);
  color: #4f4a44;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  font: inherit;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color: transparent;
}

.habit-day:active:not(:disabled) {
  transform: scale(.94);
}

.habit-day-number {
  font-size: clamp(13px, 4vw, 17px);
  font-weight: 780;
  letter-spacing: -.035em;
}

.habit-day small {
  max-width: 90%;
  color: currentColor;
  font-size: 7px;
  font-weight: 650;
  line-height: 1;
  opacity: .64;
}

.habit-day.completed {
  border-color: #536a55;
  background: linear-gradient(145deg, #4f6752, #738772);
  color: white;
  box-shadow: 0 7px 15px rgba(77, 101, 80, .18);
}

.habit-day-check {
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 760;
  line-height: .95;
}

.habit-day.today-day {
  box-shadow: 0 0 0 3px rgba(111,132,110,.18);
  border-color: #596f5b;
}

.habit-day.rest-day {
  border-style: dashed;
  border-color: #d5d0ca;
  background: rgba(242,238,232,.6);
  color: #aaa39a;
  cursor: default;
}

.habit-day.future-day {
  border-color: #e1ddd7;
  background: rgba(245,242,238,.55);
  color: #c3bdb5;
  cursor: default;
}

.habit-day.placeholder-day {
  visibility: hidden;
}

.habit-day.pending-day {
  opacity: .45;
  pointer-events: none;
}

.tracker-pagination {
  min-height: 12px;
  margin: 17px 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
}

.tracker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d2cdc6;
}

.tracker-dot.active {
  width: 8px;
  height: 8px;
  background: var(--sage-dark);
}

.tracker-help {
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(143,159,138,.10);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 360px) {
  .habit-tracker-panel { padding-left: 12px; padding-right: 12px; }
  .tracker-calendar-card { padding-left: 12px; padding-right: 12px; }
  .habit-day-grid { gap: 6px; }
}

@media (min-width: 900px) {
  .habit-tracker-overlay { padding: 28px 0; }
  .habit-tracker-panel {
    min-height: calc(100vh - 56px);
    border-radius: 36px;
    box-shadow: 0 26px 80px rgba(48,43,38,.16);
  }
}

/* ARVYNO 0.5 — goals + selectable habit ranges */
.duration-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: -2px;
}
.duration-chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.66);
  color: var(--muted);
  border-radius: 12px;
  padding: 9px 4px;
  font-size: 11px;
  font-weight: 700;
}
.duration-chip.active {
  border-color: rgba(85,105,86,.35);
  background: rgba(143,159,138,.16);
  color: var(--sage-dark);
}

.goals-heading .goals-add { margin-top: 18px; }
.goal-type-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.goal-type-strip > div {
  min-width: 0;
  padding: 14px 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  text-align: center;
}
.goal-type-strip span { display:block; font-size: 21px; margin-bottom: 7px; }
.goal-type-strip b { display:block; font-size: 11px; line-height: 1.15; }
.goal-type-strip small { display:block; color: var(--muted); font-size: 9px; margin-top: 4px; line-height: 1.2; }
.goals-page-list { display: grid; gap: 4px; }
.goal-live {
  width: 100%;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.goal-live:hover { background: rgba(143,159,138,.05); }
.goal-body { min-width: 0; }
.goal-title-row { display:flex; gap:7px; align-items:center; min-width:0; }
.goal-title-row .goal-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.goal-priority {
  flex: 0 0 auto;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--sage-dark);
  background: rgba(143,159,138,.15);
  border-radius: 999px;
  padding: 4px 6px;
}
.goal-next { color: var(--muted); font-size: 10px; margin-top: 6px; }
.compact-goal { padding-top: 8px; padding-bottom: 8px; }

.goal-type-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.goal-type-selector label { cursor:pointer; }
.goal-type-selector input { position:absolute; opacity:0; pointer-events:none; }
.goal-type-selector span {
  min-height: 54px;
  display:grid;
  place-items:center;
  text-align:center;
  border:1px solid var(--line);
  border-radius:14px;
  padding:8px 5px;
  background:rgba(255,255,255,.68);
  color:var(--muted);
  font-size:10px;
  line-height:1.2;
  font-weight:650;
}
.goal-type-selector input:checked + span {
  background:rgba(143,159,138,.16);
  border-color:rgba(85,105,86,.38);
  color:var(--sage-dark);
}
.field textarea {
  width:100%;
  resize:vertical;
  border:1px solid var(--line);
  background:rgba(255,255,255,.76);
  border-radius:14px;
  padding:12px 13px;
  color:var(--text);
  font:inherit;
  outline:none;
}
.field textarea:focus { border-color:rgba(85,105,86,.48); box-shadow:0 0 0 3px rgba(143,159,138,.10); }
.goal-numeric-block { display:grid; gap:10px; }
.goal-numeric-block.hidden { display:none; }
.priority-switch {
  display:flex;
  align-items:center;
  gap:9px;
  padding:12px 13px;
  border-radius:14px;
  background:rgba(143,159,138,.09);
  color:var(--sage-dark);
  font-size:12px;
}
.priority-switch input { accent-color: var(--sage-dark); }
.goal-link-section { display:grid; gap:8px; }
.goal-link-grid { display:flex; flex-wrap:wrap; gap:7px; }
.goal-link-chip input { position:absolute; opacity:0; pointer-events:none; }
.goal-link-chip span {
  display:block;
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 11px;
  background:rgba(255,255,255,.68);
  color:var(--muted);
  font-size:10px;
}
.goal-link-chip input:checked + span { background:rgba(143,159,138,.16); border-color:rgba(85,105,86,.35); color:var(--sage-dark); }

.goal-detail-overlay {
  position:fixed;
  inset:0;
  z-index:90;
  display:flex;
  justify-content:center;
  align-items:flex-end;
  background:rgba(37,32,28,.2);
  backdrop-filter:blur(8px);
  opacity:0;
  transition:opacity .18s ease;
}
.goal-detail-overlay.visible { opacity:1; }
.goal-detail-panel {
  width:min(100%, 520px);
  max-height:100vh;
  overflow:auto;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(26px + env(safe-area-inset-bottom));
  background:var(--bg);
  border-radius:28px 28px 0 0;
  transform:translateY(18px);
  transition:transform .18s ease;
}
.goal-detail-overlay.visible .goal-detail-panel { transform:translateY(0); }
.goal-detail-topbar { display:grid; grid-template-columns:42px 1fr 42px; align-items:center; margin-bottom:12px; }
.goal-detail-hero {
  position:relative;
  overflow:hidden;
  padding:22px;
  border-radius:26px;
  background:linear-gradient(135deg, rgba(143,159,138,.22), rgba(234,220,203,.58));
  border:1px solid rgba(255,255,255,.75);
  box-shadow:var(--shadow);
}
.goal-detail-hero.financial { background:linear-gradient(135deg, rgba(143,159,138,.25), rgba(255,255,255,.72)); }
.goal-detail-hero.material { background:linear-gradient(135deg, rgba(234,220,203,.82), rgba(255,255,255,.72)); }
.goal-detail-type { font-size:10px; letter-spacing:.09em; text-transform:uppercase; color:var(--muted); font-weight:700; }
.goal-detail-hero h1 { margin:10px 0 7px; font-size:30px; line-height:1.02; letter-spacing:-.035em; }
.goal-detail-hero p { color:var(--muted); line-height:1.45; margin:0 0 18px; font-size:13px; }
.goal-progress-big { display:flex; align-items:end; gap:8px; margin:18px 0 9px; }
.goal-progress-big b { font-size:34px; color:var(--sage-dark); }
.goal-progress-big span { color:var(--muted); font-size:11px; padding-bottom:6px; }
.goal-detail-meta { display:flex; justify-content:space-between; gap:10px; margin-top:10px; color:var(--muted); font-size:11px; }
.goal-detail-card { margin-top:12px; }
.milestone-list { display:grid; gap:6px; margin-top:12px; }
.milestone-row {
  width:100%;
  display:grid;
  grid-template-columns:26px 1fr;
  align-items:center;
  gap:9px;
  border:0;
  background:transparent;
  text-align:left;
  color:inherit;
  padding:8px 0;
}
.milestone-check { width:24px; height:24px; border:1.5px solid #b7b0a9; border-radius:50%; display:grid; place-items:center; color:white; font-size:12px; }
.milestone-row.done .milestone-check { background:var(--success); border-color:var(--success); }
.milestone-row.done > span:last-child { color:var(--muted); text-decoration:line-through; }
.goal-linked-list { display:grid; gap:8px; margin-top:12px; }
.goal-linked-list > div { display:flex; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); font-size:12px; }
.goal-linked-list > div:last-child { border-bottom:0; }
.goal-linked-list b { color:var(--sage-dark); font-size:10px; text-align:right; }



/* ---------------- Finance 0.6 ---------------- */
.finance-heading { padding-bottom:8px; }
.finance-month-switch { display:grid; grid-template-columns:36px 1fr 36px; gap:8px; align-items:center; margin-top:16px; max-width:320px; }
.finance-month-switch button { width:36px; height:36px; border-radius:50%; border:1px solid var(--line); background:rgba(255,255,255,.7); color:var(--sage-dark); font-size:20px; }
.finance-month-switch b { text-align:center; font-size:13px; font-weight:650; color:var(--text); }
.finance-balance-card { margin-top:12px; padding:22px; border-radius:26px; background:linear-gradient(135deg,#536a58,#8f9f8a); color:#fff; box-shadow:0 20px 48px rgba(64,82,69,.18); }
.finance-balance-label { font-size:11px; text-transform:uppercase; letter-spacing:.08em; opacity:.72; }
.finance-balance-value { font-size:34px; line-height:1; font-weight:750; letter-spacing:-.035em; margin-top:8px; }
.finance-balance-sub { margin-top:9px; font-size:11px; opacity:.78; }
.finance-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:18px; }
.finance-actions button { border:1px solid rgba(255,255,255,.24); border-radius:14px; padding:10px 7px; color:#fff; background:rgba(255,255,255,.12); font:inherit; font-size:10px; font-weight:700; }
.finance-metrics { margin-top:12px; }
.budget-row { display:grid; gap:7px; padding:10px 0; border-bottom:1px solid var(--line); }
.budget-row > div:first-child { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:11px; }
.budget-row > div:first-child span { color:var(--muted); }
.budget-row > div:first-child b { font-size:11px; }
.progress-bar.danger { background:#bc695f; }
.budget-mini-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.budget-mini-grid > div { padding:11px; border-radius:15px; background:rgba(143,159,138,.08); display:grid; gap:5px; }
.budget-mini-grid span { color:var(--muted); font-size:9px; }
.budget-mini-grid b { font-size:10px; }
.account-list { display:grid; gap:6px; }
.account-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.account-row:last-child { border-bottom:0; }
.account-row > div { display:flex; align-items:center; gap:10px; min-width:0; }
.account-row > div > div { display:grid; gap:2px; min-width:0; }
.account-row b { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-row small { font-size:9px; color:var(--muted); }
.account-row strong { font-size:12px; white-space:nowrap; }
.account-icon,.transaction-icon { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:12px; background:rgba(143,159,138,.12); }
.category-spend-list { display:grid; gap:9px; }
.category-spend-row { display:grid; grid-template-columns:1fr auto; column-gap:10px; row-gap:5px; align-items:center; }
.category-spend-main { grid-column:1 / -1; display:flex; justify-content:space-between; gap:10px; font-size:10px; }
.category-spend-main span { color:var(--text); }
.category-spend-main b { font-size:10px; }
.category-spend-track { height:6px; border-radius:99px; background:rgba(91,102,91,.08); overflow:hidden; }
.category-spend-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--sage),var(--sage-dark)); }
.category-spend-row small { color:var(--muted); font-size:9px; }
.finance-stack { display:grid; gap:10px; }
.finance-progress-card { padding:13px; border-radius:17px; background:rgba(143,159,138,.065); border:1px solid rgba(143,159,138,.12); }
.finance-progress-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:9px; }
.finance-progress-head > div { display:grid; gap:3px; }
.finance-progress-head b { font-size:12px; }
.finance-progress-head small { font-size:9px; color:var(--muted); }
.finance-progress-head > span { font-size:12px; font-weight:750; color:var(--sage-dark); }
.finance-progress-actions { display:flex; gap:7px; margin-top:10px; }
.finance-progress-actions button { border:0; border-radius:999px; padding:7px 10px; background:rgba(255,255,255,.8); color:var(--sage-dark); font:inherit; font-size:9px; font-weight:650; }
.transaction-list { display:grid; }
.transaction-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); }
.transaction-row:last-child { border-bottom:0; }
.transaction-row > div:first-child { display:flex; align-items:center; gap:10px; min-width:0; }
.transaction-row > div:first-child > div { display:grid; gap:3px; min-width:0; }
.transaction-row b { font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.transaction-row small { font-size:8.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.transaction-amount { font-size:11px; font-weight:750; white-space:nowrap; }
.neutral-money { color:var(--text); }
.finance-modal-sheet select { width:100%; border:1px solid var(--line); background:rgba(255,255,255,.76); border-radius:14px; padding:12px 13px; color:var(--text); font:inherit; outline:none; }
.finance-amount-field input { font-size:26px !important; font-weight:730; letter-spacing:-.03em; }
.finance-kind-control { grid-template-columns:repeat(3,1fr); }
.finance-kind-control span { padding-inline:5px; font-size:9px; }

@media (min-width: 700px) {
  .finance-balance-card { padding:28px; }
  .finance-stack { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 370px) {
  .duration-presets { grid-template-columns: repeat(3,1fr); }
  .goal-type-selector { grid-template-columns: 1fr; }
  .goal-type-selector span { min-height:42px; }
}

@media (min-width: 900px) {
  .goal-detail-overlay { padding:28px 0; align-items:center; }
  .goal-detail-panel { min-height:calc(100vh - 56px); max-height:calc(100vh - 56px); border-radius:36px; box-shadow:0 26px 80px rgba(48,43,38,.16); }
}

/* ---------------- Analytics 0.7 ---------------- */
.analytics-heading { padding-bottom:10px; }
.analytics-period-switch {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px;
  width:min(250px,100%);
  margin-top:16px;
  padding:4px;
  border-radius:999px;
  background:rgba(143,159,138,.09);
  border:1px solid rgba(143,159,138,.12);
}
.analytics-period-switch button {
  border:0;
  border-radius:999px;
  padding:9px 14px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:10px;
  font-weight:700;
}
.analytics-period-switch button.active {
  background:#fff;
  color:var(--sage-dark);
  box-shadow:0 6px 18px rgba(68,79,69,.08);
}
.analytics-score-card {
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:20px 22px;
  border-radius:26px;
  color:#fff;
  background:linear-gradient(135deg,#536a58,#8f9f8a);
  box-shadow:0 20px 50px rgba(64,82,69,.16);
}
.analytics-score-card > div:first-child { display:grid; gap:5px; }
.analytics-score-card span { font-size:9px; letter-spacing:.09em; opacity:.74; }
.analytics-score-card b { font-size:38px; line-height:1; letter-spacing:-.04em; }
.analytics-score-card small { font-size:9px; opacity:.74; }
.analytics-ring {
  --score:0;
  width:68px;
  height:68px;
  flex:0 0 68px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:conic-gradient(rgba(255,255,255,.95) calc(var(--score) * 1%), rgba(255,255,255,.18) 0);
  position:relative;
}
.analytics-ring::after {
  content:"";
  position:absolute;
  inset:7px;
  border-radius:50%;
  background:#6f846f;
}
.analytics-ring span { position:relative; z-index:1; font-size:13px; font-weight:800; opacity:1; }
.analytics-metrics { margin-top:12px; }
.analytics-metrics .metric small { margin-top:4px; display:block; color:var(--muted); font-size:9px; }
.analytics-bars {
  height:150px;
  display:flex;
  align-items:end;
  gap:6px;
  overflow-x:auto;
  padding:14px 2px 2px;
  scrollbar-width:none;
}
.analytics-bars::-webkit-scrollbar { display:none; }
.analytics-bar-item {
  min-width:22px;
  flex:1 0 22px;
  max-width:34px;
  display:grid;
  gap:6px;
  justify-items:center;
}
.analytics-bar-track {
  width:100%;
  height:118px;
  display:flex;
  align-items:flex-end;
  border-radius:12px;
  overflow:hidden;
  background:rgba(143,159,138,.08);
}
.analytics-bar-track i {
  width:100%;
  min-height:0;
  display:block;
  border-radius:10px;
  background:linear-gradient(180deg,var(--sage),var(--sage-dark));
}
.analytics-bar-item.empty .analytics-bar-track i { background:transparent; }
.analytics-bar-item span { color:var(--muted); font-size:8px; }
.analytics-day-summary {
  margin-top:14px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.analytics-day-summary > div {
  padding:11px 12px;
  border-radius:15px;
  background:rgba(143,159,138,.07);
  display:grid;
  gap:5px;
}
.analytics-day-summary span { color:var(--muted); font-size:8px; }
.analytics-day-summary b { font-size:10px; }
.analytics-money-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.analytics-money-grid > div {
  padding:12px;
  border-radius:16px;
  background:rgba(143,159,138,.06);
  display:grid;
  gap:5px;
}
.analytics-money-grid span { color:var(--muted); font-size:8px; }
.analytics-money-grid b { font-size:10px; line-height:1.25; }
.analytics-expenses { display:grid; gap:10px; margin-top:15px; }
.analytics-expenses > div > div:first-child { display:flex; justify-content:space-between; gap:12px; margin-bottom:5px; font-size:9px; }
.analytics-expenses > div > div:first-child span { color:var(--muted); }
.analytics-expenses > div > div:first-child b { font-size:9px; }
.analytics-empty { margin-top:10px; }
.weekly-report-card { overflow:hidden; }
.weekly-report-score {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  background:linear-gradient(135deg,rgba(143,159,138,.16),rgba(234,220,203,.36));
}
.weekly-report-score span { color:var(--muted); font-size:9px; }
.weekly-report-score b { font-size:28px; color:var(--sage-dark); }
.weekly-report-summary {
  display:flex;
  gap:7px;
  overflow:auto;
  margin-top:10px;
  scrollbar-width:none;
}
.weekly-report-summary::-webkit-scrollbar { display:none; }
.weekly-report-summary span {
  flex:0 0 auto;
  padding:8px 10px;
  border-radius:999px;
  background:rgba(143,159,138,.07);
  color:var(--muted);
  font-size:8px;
}
.weekly-report-summary b { color:var(--text); }
.weekly-insights { display:grid; gap:8px; margin-top:14px; }
.weekly-insight {
  display:grid;
  grid-template-columns:30px 1fr;
  gap:10px;
  align-items:start;
  padding:10px 0;
  border-bottom:1px solid var(--line);
}
.weekly-insight:last-child { border-bottom:0; }
.weekly-insight > span {
  width:28px;
  height:28px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:rgba(143,159,138,.11);
  color:var(--sage-dark);
  font-size:10px;
  font-weight:800;
}
.weekly-insight > div { display:grid; gap:3px; }
.weekly-insight b { font-size:10px; }
.weekly-insight p { margin:0; color:var(--muted); font-size:9px; line-height:1.4; }
.profile-settings-teaser { margin-bottom:8px; }

@media (min-width:700px) {
  .analytics-score-card { padding:28px 30px; }
  .analytics-ring { width:82px; height:82px; flex-basis:82px; }
  .analytics-bars { height:180px; }
  .analytics-bar-track { height:146px; }
  .analytics-money-grid { grid-template-columns:repeat(4,1fr); }
}


/* ARVYNO 0.8 — operation management + notification settings */
.transaction-row{gap:12px}.transaction-main{display:flex;align-items:center;gap:11px;min-width:0;flex:1}.transaction-main>div{min-width:0}.transaction-main b,.transaction-main small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.transaction-side{display:flex;align-items:center;gap:9px}.transaction-actions{display:flex;gap:5px}.transaction-actions button{width:30px;height:30px;border-radius:10px;border:1px solid rgba(31,51,42,.1);background:#fff;color:#66726c;font-size:16px;line-height:1;cursor:pointer}.transaction-actions button:last-child{color:#a55757}.transaction-lock{font-size:13px;opacity:.55}.transaction-row.managed{background:rgba(111,143,122,.035)}
.finance-delete-from-modal{width:100%;margin-top:2px}.settings-summary{display:grid;gap:7px;margin-top:12px}.settings-summary-row{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#77817c}.settings-summary-row b{color:#304139;font-weight:650;text-align:right}.settings-modal-sheet{max-height:min(88vh,760px);overflow:auto}.settings-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.settings-toggle{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid rgba(31,51,42,.08)}.settings-toggle>div{display:grid;gap:3px}.settings-toggle b{font-size:15px}.settings-toggle small{font-size:12px;color:#818a86}.switch{position:relative;width:46px;height:27px;flex:0 0 auto}.switch input{position:absolute;opacity:0;pointer-events:none}.switch i{position:absolute;inset:0;border-radius:999px;background:#d8ddd9;transition:.2s}.switch i:after{content:'';position:absolute;width:21px;height:21px;left:3px;top:3px;background:#fff;border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,.15);transition:.2s}.switch input:checked+i{background:#7f9f8a}.switch input:checked+i:after{transform:translateX(19px)}.settings-zone{grid-column:1/-1;padding:11px 13px;background:rgba(125,155,135,.08);border-radius:13px;font-size:12px;color:#75807a}.settings-zone b{color:#41544a}.settings-form .modal-save{grid-column:1/-1}.settings-inline-field{align-self:end}
@media(max-width:560px){.transaction-side{align-items:flex-end;flex-direction:column;gap:5px}.transaction-actions{gap:3px}.transaction-actions button{width:28px;height:28px}.settings-form{grid-template-columns:1fr}.settings-form .field,.settings-form .settings-zone,.settings-form .modal-save{grid-column:1}.settings-inline-field{margin-top:-4px}}

/* ARVYNO 0.9 — release polish */
:root {
  --surface-strong: rgba(255,255,255,.94);
  --line-soft: rgba(63,55,48,.085);
  --focus-ring: 0 0 0 4px rgba(126,148,126,.14);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  overscroll-behavior-y: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }

.page { min-width: 0; }
.page.page-enter { animation: arvyno-page-in .22s ease both; }
@keyframes arvyno-page-in {
  from { opacity: .72; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.card,
.hero,
.metric,
.finance-progress-card,
.habit-manage-item,
.goal-type-strip > div {
  border-color: var(--line-soft);
}

.card { background: var(--surface-strong); }
.card-link,
.task-main,
.habit-main,
.goal-live,
.nav-item,
.finance-actions button,
.finance-progress-actions button,
.tracker-page-arrow,
.tracker-icon-button {
  touch-action: manipulation;
}

.fab,
.modal-save,
.finance-actions button,
.finance-progress-actions button,
.secondary-button,
.confirm-danger {
  min-height: 46px;
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease, background .14s ease;
}

.fab:active:not(:disabled),
.finance-actions button:active:not(:disabled),
.finance-progress-actions button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.confirm-danger:active:not(:disabled) { transform: scale(.985); }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* skeletons replace layout-jumping spinners */
.loading-state {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 18px 4px;
}
.skeleton-stack { display: grid; gap: 9px; }
.skeleton-line {
  display: block;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8e3dd 20%, #f5f1ec 45%, #e8e3dd 70%);
  background-size: 220% 100%;
  animation: arvyno-shimmer 1.25s linear infinite;
}
.skeleton-line.wide { width: 92%; }
.skeleton-line.medium { width: 68%; }
.skeleton-line.short { width: 42%; }
.loading-label { color: var(--muted); font-size: 12px; }
@keyframes arvyno-shimmer { to { background-position: -220% 0; } }

.empty-state { padding-top: 28px; padding-bottom: 24px; }
.empty-state .fab.retry-button { width: auto; min-width: 160px; margin-top: 16px; padding-inline: 22px; }
.empty-icon { box-shadow: inset 0 0 0 1px rgba(85,105,86,.06); }

/* consistent confirmation sheet instead of browser confirm */
.confirm-backdrop { z-index: 520; }
.confirm-sheet {
  max-width: 430px;
  text-align: center;
  overflow: hidden;
  padding-bottom: 18px;
}
.confirm-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 8px auto 13px;
  border-radius: 16px;
  background: rgba(185,95,88,.10);
  color: var(--danger);
  font-size: 22px;
  font-weight: 800;
}
.confirm-sheet h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.confirm-sheet p { margin: 9px auto 18px; max-width: 330px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.secondary-button,
.confirm-danger {
  border: 0;
  border-radius: 15px;
  padding: 12px 14px;
  font-weight: 700;
}
.secondary-button { background: #eee9e3; color: #615a54; }
.confirm-danger { background: var(--danger); color: #fff; box-shadow: 0 10px 24px rgba(185,95,88,.18); }

.app-toast { backdrop-filter: blur(12px); }
.app-toast.success { background: rgba(50,63,51,.94); }

/* finance states */
.finance-balance-card.is-negative {
  background: linear-gradient(135deg, #7a514d, #a97970);
  box-shadow: 0 20px 48px rgba(101,66,63,.17);
}
.finance-balance-card.is-neutral {
  background: linear-gradient(135deg, #667168, #959d96);
}
.finance-balance-card.is-positive {
  background: linear-gradient(135deg, #536a58, #8f9f8a);
}
.transaction-amount,
.finance-balance-value,
.metric-value,
.account-row strong { font-variant-numeric: tabular-nums; }

/* forms */
.field input,
.field select,
.finance-modal-sheet select {
  background: rgba(255,255,255,.94);
}
.field input:disabled,
.field select:disabled { opacity: .58; background: #f1ede8; }
.modal-sheet { scrollbar-width: thin; scrollbar-color: #d8d1c9 transparent; }
.modal-sheet::-webkit-scrollbar { width: 5px; }
.modal-sheet::-webkit-scrollbar-thumb { background: #d8d1c9; border-radius: 999px; }

/* 365-day habit tracker navigation */
.tracker-overall-progress { margin-top: 16px; background: rgba(255,255,255,.22); }
.tracker-overall-progress .progress-bar { background: rgba(255,255,255,.9); }
.tracker-pagination { align-items: center; }
button.tracker-dot {
  appearance: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform .14s ease, width .14s ease, background .14s ease;
}
button.tracker-dot:active { transform: scale(.82); }
.habit-day { min-width: 0; }
.habit-day-number { font-variant-numeric: tabular-nums; }

/* navigation */
.bottom-nav { box-shadow: 0 -8px 28px rgba(51,45,39,.035); }
.nav-item { border-radius: 14px; transition: background .15s ease, color .15s ease, transform .15s ease; }
.nav-item:active { transform: scale(.97); }
.nav-item.active { background: rgba(143,159,138,.10); }

@media (hover:hover) {
  .card-link:hover { color: #3f5944; }
  .task-edit:hover,
  .modal-close:hover { background: #e9e2da; }
  .habit-manage-item:hover,
  .goal-live:hover { border-color: rgba(85,105,86,.22); background: rgba(255,255,255,.88); }
  .finance-progress-actions button:hover { filter: brightness(.98); }
  .nav-item:hover:not(.active) { background: rgba(255,255,255,.45); }
}

/* compact phones */
@media (max-width: 370px) {
  .app-shell { padding-left: 12px; padding-right: 12px; }
  .hero, .card { padding-left: 15px; padding-right: 15px; }
  .grid-2 { gap: 8px; }
  .metric { padding: 13px; }
  .metric-value { font-size: 18px; }
  .confirm-actions { grid-template-columns: 1fr; }
}

/* desktop/tablet: keep mobile logic, give it breathing room */
@media (min-width: 900px) {
  body { padding: 28px; }
  .app-shell {
    width: min(calc(100vw - 56px), 860px);
    min-height: calc(100vh - 56px);
    padding-left: 28px;
    padding-right: 28px;
  }
  .bottom-nav {
    width: min(calc(100vw - 56px), 860px);
    bottom: 28px;
    padding-left: 22px;
    padding-right: 22px;
  }
  .page { gap: 18px; }
  .topbar { padding-bottom: 22px; }
  .hero { padding: 30px; }
  .card { padding: 22px; }
  .grid-2 { gap: 16px; }
  .modal-sheet { width: min(100%, 560px); }
  .confirm-sheet { width: min(100%, 430px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ARVYNO 0.9.1 — immersive header, locked vertical swipes, operation details */
html, body {
  min-height: 100dvh;
  background: var(--bg);
}

.app-shell {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  padding-top: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  margin: 0 -16px 14px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 14px;
  background:
    linear-gradient(180deg, rgba(246,242,236,1) 0%, rgba(246,242,236,.985) 78%, rgba(246,242,236,.94) 100%);
  border-bottom: 1px solid rgba(74,65,57,.055);
  box-shadow: 0 8px 24px rgba(58,49,41,.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.telegram-webapp body {
  min-height: var(--tg-viewport-stable-height, 100dvh);
}

.telegram-webapp .app-shell {
  min-height: var(--tg-viewport-stable-height, 100dvh);
}

/* Whole operation row is the target; destructive controls live inside details. */
.transaction-row.transaction-row-link {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  padding: 12px 2px;
  transition: background .15s ease, transform .12s ease;
}
.transaction-row.transaction-row-link:last-child { border-bottom: 0; }
.transaction-row.transaction-row-link:active { transform: scale(.992); }
.transaction-row.transaction-row-link:focus-visible {
  outline: none;
  border-radius: 14px;
  box-shadow: var(--focus-ring);
}
.transaction-row.transaction-row-link.managed { background: rgba(111,143,122,.035); }
.transaction-side { flex-direction: row; align-items: center; gap: 8px; }
.transaction-chevron {
  color: #aaa199;
  font-size: 25px;
  line-height: 1;
  margin-left: 1px;
  transform: translateY(-1px);
}
.transaction-lock { font-size: 12px; opacity: .5; }

.transaction-detail { display: grid; gap: 16px; }
.transaction-detail-hero {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 20px 14px 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(143,159,138,.13), rgba(234,220,203,.25));
  border: 1px solid rgba(85,105,86,.08);
}
.transaction-detail-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(255,255,255,.76);
  color: var(--sage-dark);
  font-size: 21px;
  box-shadow: inset 0 0 0 1px rgba(85,105,86,.05);
}
.transaction-detail-amount {
  margin-top: 2px;
  font-size: 34px;
  line-height: 1;
  font-weight: 780;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.transaction-detail-date { color: var(--muted); font-size: 12px; }
.transaction-detail-list {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}
.transaction-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.transaction-detail-row:last-of-type { border-bottom: 0; }
.transaction-detail-row span { color: var(--muted); font-size: 12px; }
.transaction-detail-row b {
  max-width: 64%;
  color: var(--text);
  font-size: 12px;
  font-weight: 680;
  text-align: right;
  overflow-wrap: anywhere;
}
.transaction-managed-note {
  margin: 12px;
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(143,159,138,.11);
  color: var(--sage-dark);
  font-size: 12px;
  line-height: 1.45;
}
.transaction-detail-actions { display: grid; gap: 9px; }
.transaction-detail-actions .secondary-button,
.transaction-detail-close { width: 100%; }
.transaction-delete-button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 15px;
  background: rgba(185,95,88,.09);
  color: var(--danger);
  font: inherit;
  font-weight: 720;
  cursor: pointer;
}
.transaction-delete-button:active { transform: scale(.985); }

@media (hover:hover) {
  .transaction-row.transaction-row-link:hover { background: rgba(143,159,138,.055); }
}

@media (max-width: 560px) {
  .transaction-side { flex-direction: row; align-items: center; gap: 7px; }
}

@media (min-width: 900px) {
  .app-shell { padding-top: 0; }
  .topbar {
    margin-left: -28px;
    margin-right: -28px;
    padding-left: 28px;
    padding-right: 28px;
    border-radius: 36px 36px 0 0;
  }
}


/* ARVYNO 0.9.2 — true fullscreen shell and swipe lock */
:root {
  --arvyno-safe-top: 0px;
  --arvyno-safe-bottom: 0px;
  --arvyno-content-safe-top: 0px;
  --arvyno-content-safe-bottom: 0px;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overscroll-behavior-y: none;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  margin: 0;
}

.telegram-webapp,
.telegram-webapp body {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  background: var(--bg);
}

.telegram-webapp body {
  overscroll-behavior-y: none;
}

.app-shell {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  padding-top: 0;
  background: var(--bg);
}
/* The header itself paints behind the device/Telegram safe area; only its content is inset. */
.topbar {
  top: 0;
  margin-top: 0;
  padding-top: calc(12px + max(env(safe-area-inset-top), var(--arvyno-safe-top), var(--arvyno-content-safe-top)));
  background: #f6f2ec;
  isolation: isolate;
}

.topbar::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 0;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  background: #f6f2ec;
  pointer-events: none;
}

.page {
  overscroll-behavior-y: contain;
}

.bottom-nav {
  padding-bottom: max(10px, env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom));
}

@media (max-width: 899px) {
  body { padding-top: 0 !important; }
  .app-shell { border-radius: 0; }
}


/* ARVYNO 0.9.3 — zoom lock, analytics width containment, Telegram chrome clearance */
:root {
  --arvyno-header-top: 0px;
}

html,
body,
.app-shell {
  max-width: 100%;
  overflow-x: hidden;
  touch-action: pan-x pan-y;
}

/* Keep content clear of Telegram's native Close button in fullscreen.
   The header background still paints all the way to the physical top edge. */
.telegram-webapp .topbar {
  padding-top: calc(12px + var(--arvyno-header-top));
}

/* Prevent any page from acquiring the min-content width of a wide child. */
.app-shell,
.page,
.page > *,
.card,
.analytics-heading,
.analytics-score-card,
.analytics-metrics,
.weekly-report-card,
.profile-settings-teaser {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* Month has up to 31 bars. They scroll inside the card instead of widening
   the whole Telegram Mini App viewport. */
.analytics-bars {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  contain: inline-size;
}

.analytics-bar-item {
  min-width: 22px;
}

.analytics-money-grid,
.analytics-day-summary,
.weekly-report-summary,
.weekly-insights {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 560px) {
  .telegram-webapp.telegram-fullscreen .topbar,
  html.telegram-webapp.telegram-fullscreen .topbar {
    padding-top: calc(12px + max(var(--arvyno-header-top), 54px));
  }
}

/* ARVYNO 0.9.4 — fixed sheets, Telegram top clearance, plan tasks */

/* Telegram's native Close/menu row floats over fullscreen WebApps on iOS.
   Keep ARVYNO content below it while preserving the full-bleed background. */
.telegram-webapp .topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 18px;
  padding-right: 18px;
  padding-bottom: 14px;
  background: rgba(246, 242, 236, .97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Open sheets no longer move as one long page: the sheet stays anchored and
   its content scrolls inside it. The title/action row stays visible. */
.modal-backdrop {
  overflow: hidden;
  overscroll-behavior: none;
}
.modal-sheet {
  position: relative;
  max-height: min(86dvh, 760px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.modal-header {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0 -4px 14px;
  padding: 10px 4px 12px;
  background: linear-gradient(180deg, #fbf8f4 78%, rgba(251,248,244,.96));
  border-bottom: 1px solid rgba(31, 51, 42, .06);
}
.goal-detail-panel {
  overscroll-behavior-y: contain;
}
.goal-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 8px 0 12px;
  background: linear-gradient(180deg, rgba(246,242,236,.99) 76%, rgba(246,242,236,.92));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Tasks are a first-class part of Plan. */
.plan-tasks-card { overflow: hidden; }
.plan-card-heading { margin-bottom: 10px; }
.plan-date-switch {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(143,159,138,.09);
}
.plan-date-switch button {
  min-width: 0;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  color: var(--sage-dark);
  font-weight: 700;
}
.plan-date-switch .plan-date-current {
  width: 100%;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.plan-progress { height: 6px; margin: 2px 0 8px; }
.plan-task-list { min-width: 0; }
.plan-task-list .task-main { min-width: 0; }

@media (max-width: 560px) {
  .telegram-webapp .topbar {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .modal-sheet { max-height: 84dvh; }
}

/* ARVYNO 0.9.5 — no screen flashing on taps */
.page.page-enter { animation: none !important; }
.habit-tracker-content.tracker-updating {
  pointer-events: none;
}
.habit-tracker-content.tracker-updating .tracker-calendar-card,
.habit-tracker-content.tracker-updating .tracker-hero {
  opacity: .985;
}

/* ARVYNO 0.9.6 — Today screen redesign, protected Telegram shell, habit/finance clarity */

/* In Telegram only the middle content scrolls. The ARVYNO header and bottom nav
   remain visually fixed, so native Close/menu controls never cover page cards. */
.telegram-webapp body {
  overflow: hidden;
}

.telegram-webapp .app-shell {
  height: var(--tg-viewport-stable-height, 100dvh);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.telegram-webapp .topbar {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  transform: none;
  z-index: 100;
  padding: calc(8px + var(--arvyno-header-top)) 16px 12px;
  background: rgba(246, 242, 236, .985);
  border-bottom: 1px solid rgba(105, 94, 83, .08);
  box-shadow: 0 8px 20px rgba(54, 48, 42, .025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.telegram-webapp .topbar::before {
  height: 100%;
  background: #f6f2ec;
}

.telegram-webapp .page {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 12px 16px calc(92px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)));
  scrollbar-width: none;
}
.telegram-webapp .page::-webkit-scrollbar { display: none; }

.telegram-webapp .bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  width: 100%;
  z-index: 110;
}

/* Make the brand row feel native and compact after the protected Telegram area. */
.telegram-webapp .brand-mark { width: 34px; height: 34px; border-radius: 12px; }
.telegram-webapp .brand-name { font-size: 13px; }
.telegram-webapp .brand-caption { font-size: 9px; }
.telegram-webapp .icon-button { width: 38px; height: 38px; border-radius: 13px; }

/* Compact Today hero. */
.today-hero {
  padding: 17px 18px 15px;
}
.today-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.today-hero-copy { min-width: 0; }
.today-hero .section-eyebrow { margin-bottom: 6px; }
.today-hero h1 {
  font-size: clamp(28px, 7.4vw, 36px);
  line-height: .98;
}
.today-hero p {
  margin-top: 7px;
  max-width: 310px;
  font-size: 13px;
  line-height: 1.35;
}
.today-score {
  text-align: right;
  min-width: 78px;
}
.today-score .score { font-size: 32px; line-height: 1; }
.today-progress { margin-top: 14px; height: 8px; }
.today-hero .progress-caption { margin-top: 7px; }

/* Today tasks: empty state should not consume half the screen. */
.today-tasks-card { padding-bottom: 16px; }
.today-tasks-card .card-title-row { margin-bottom: 10px; }
.today-task-empty {
  min-height: 0;
  padding: 9px 0 12px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.today-task-empty .empty-icon {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 13px;
  font-size: 21px;
}
.today-task-empty .empty-title { font-size: 15px; }
.today-task-empty .empty-text { margin-top: 3px; font-size: 12px; line-height: 1.35; }
.today-add-task { margin-top: 8px; padding-block: 13px; }

/* Today habits: show the actual challenge horizon instead of duplicated 7/30-day stats. */
.today-habits-card .card-title-row { align-items: flex-start; }
.today-habit-row {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 13px 0;
}
.today-habit-row .habit-check { margin-top: 1px; }
.today-habit-main {
  width: 100%;
  min-width: 0;
}
.today-habit-title-row,
.today-habit-progress-head,
.today-habit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.today-habit-title-row { margin-bottom: 8px; }
.today-habit-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f1ede7;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
}
.today-habit-status.done {
  color: var(--success);
  background: rgba(72, 123, 85, .10);
}
.today-habit-progress-head {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}
.today-habit-progress-head b { color: var(--sage-dark); font-size: 11px; }
.today-habit-progress { height: 7px; }
.today-habit-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.today-habit-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: #b6afa7;
}
.today-habit-row .habit-streak { display: none; }
.habit-summary-strip { display: none !important; }

/* Finance is one coherent Today block, sourced from the same transactions as Finance. */
.today-finance-card { padding-bottom: 15px; }
.today-finance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.today-money-tile {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #faf8f5;
  text-align: left;
  color: inherit;
}
.today-money-tile span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}
.today-money-tile b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(17px, 5vw, 21px);
  letter-spacing: -.025em;
}
.today-money-tile.income b { color: var(--success); }
.today-money-tile.expense b { color: var(--danger); }
.today-net-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 16px;
  align-items: center;
  gap: 9px;
  padding: 12px 2px 2px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.today-net-row span { color: var(--muted); font-size: 11px; }
.today-net-row b { font-size: 15px; }
.today-net-row.positive b { color: var(--success); }
.today-net-row.negative b { color: var(--danger); }
.today-net-row em { color: var(--muted); font-style: normal; text-align: right; }
.today-add-operation {
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px dashed rgba(85, 105, 86, .28);
  border-radius: 14px;
  background: rgba(143, 159, 138, .07);
  color: var(--sage-dark);
  font-weight: 650;
  font-size: 12px;
}

/* Slightly denser goals on the home screen. */
.today-goals-card .goal { padding-block: 8px; }
.today-goals-card .goal-icon { width: 36px; height: 36px; }

@media (max-width: 420px) {
  .telegram-webapp .page { padding-left: 13px; padding-right: 13px; }
  .today-hero { padding: 15px; }
  .today-habit-meta { gap: 6px; }
  .today-habit-meta span:not(:last-child)::after { margin-left: 6px; }
  .today-money-tile { padding: 12px; }
}

@media (min-width: 900px) {
  .telegram-webapp .app-shell { height: calc(100vh - 56px); }
  .telegram-webapp .bottom-nav { border-radius: 0 0 36px 36px; }
}

/* ARVYNO 0.9.7 — Telegram Desktop compact mode */
html.telegram-desktop,
html.telegram-desktop body {
  background: #ece7df;
}

@media (min-width: 700px) {
  html.telegram-desktop body {
    min-height: 100dvh;
    padding: 22px !important;
    display: flex;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
  }

  html.telegram-desktop .app-shell {
    width: min(560px, calc(100vw - 44px)) !important;
    max-width: 560px !important;
    height: calc(100dvh - 44px) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    border-radius: 30px !important;
    overflow: hidden !important;
    background: var(--bg);
    box-shadow: 0 24px 70px rgba(51, 45, 39, .16);
    border: 1px solid rgba(255,255,255,.68);
  }

  html.telegram-desktop .topbar {
    padding-top: 16px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    margin: 0 !important;
    border-radius: 30px 30px 0 0;
  }

  html.telegram-desktop .topbar::before {
    left: 0 !important;
    width: 100% !important;
    transform: none !important;
    border-radius: 30px 30px 0 0;
  }

  html.telegram-desktop .page {
    padding-left: 18px !important;
    padding-right: 18px !important;
    padding-bottom: 96px !important;
  }

  html.telegram-desktop .bottom-nav {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    border-radius: 0 0 30px 30px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  html.telegram-desktop .hero h1,
  html.telegram-desktop .today-hero h1 {
    font-size: 34px !important;
  }

  html.telegram-desktop .modal-sheet {
    width: min(520px, calc(100vw - 80px)) !important;
    max-width: 520px !important;
  }

  html.telegram-desktop .confirm-sheet {
    width: min(420px, calc(100vw - 100px)) !important;
    max-width: 420px !important;
  }
}

/* Tablet-sized Telegram windows: still avoid a stretched dashboard. */
@media (min-width: 700px) and (max-width: 899px) {
  html.telegram-desktop .app-shell {
    width: min(560px, calc(100vw - 32px)) !important;
    height: calc(100dvh - 32px) !important;
  }
  html.telegram-desktop body { padding: 16px !important; }
}


/* ARVYNO 0.9.8 — Tasks architecture, habits in Goals, stable task forms */

/* Task modal: one clean column on phones and desktops; no sideways drag from
   native date/time controls or intrinsic field widths. */
#task-form,
#task-form .form-grid,
#task-form .field,
#task-form input,
#task-form select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
#task-form {
  overflow-x: hidden;
  touch-action: pan-y;
}
#task-form .form-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
}
.modal-sheet { overflow-x: hidden; }

/* Tasks = a focused day view. Habit statistics no longer live here. */
.tasks-heading { padding-bottom: 2px; }
.tasks-day-card { overflow: hidden; }
.tasks-day-card .plan-card-heading h2 {
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-transform: none;
}
.tasks-day-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 10px;
}
.tasks-day-summary span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 13px;
  background: rgba(143,159,138,.075);
  text-align: center;
}
.tasks-day-summary b { font-size: 16px; color: var(--text); }
.tasks-day-summary small { font-size: 9px; color: var(--muted); }
.plan-date-switch .plan-date-current {
  font-size: 12px;
  letter-spacing: -.01em;
}

/* Habits now belong to Goals and describe the configured duration, not an
   unrelated 7/30-day summary. */
.goals-habits-card { scroll-margin-top: 16px; }
.habit-goal-item { gap: 10px; }
.habit-manage-copy { min-width: 0; text-align: left; }
.habit-duration-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.habit-duration-head b { color: var(--sage-dark); font-size: 12px; }
.habit-goal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.habit-goal-meta .is-done { color: var(--sage-dark); font-weight: 700; }
.habit-end-date {
  text-align: left;
  color: #9a9188;
  font-size: 10px;
}

/* Habit detail lives above the app shell. Its back button must start below
   Telegram's native Close/menu row on mobile fullscreen. */
.telegram-webapp.telegram-mobile .habit-tracker-panel {
  padding-top: calc(12px + max(env(safe-area-inset-top), var(--arvyno-header-top)));
}
.telegram-webapp.telegram-mobile .habit-tracker-topbar {
  top: 0;
}

@media (max-width: 390px) {
  .tasks-day-summary { gap: 6px; }
  .tasks-day-summary span { padding-left: 5px; padding-right: 5px; }
  .plan-date-switch { grid-template-columns: 38px minmax(0, 1fr) 38px; }
  .plan-date-switch .plan-date-current { font-size: 11px; padding: 0 4px; }
}

.modal-backdrop { overflow-x: hidden; overscroll-behavior-x: none; }

/* ARVYNO 0.9.9 — Tasks UX cleanup */

/* A short tasks page must not stretch its two grid rows to fill the entire
   viewport. This was the source of the large gap and oversized white card. */
.telegram-webapp .page[data-page="plan"] {
  align-content: start;
  grid-auto-rows: max-content;
  gap: 12px;
}

.page[data-page="plan"] .tasks-heading {
  padding-top: 10px;
  padding-bottom: 0;
}

.page[data-page="plan"] .tasks-heading h1 {
  margin-bottom: 7px;
}

.page[data-page="plan"] .tasks-heading p {
  max-width: 460px;
}

.tasks-day-card {
  align-self: start;
  height: auto;
  min-height: 0;
  padding: 16px;
}

.tasks-day-card .plan-date-switch {
  margin: 0 0 14px;
}

.tasks-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.tasks-progress-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  text-align: left;
}

.tasks-progress-copy b {
  color: var(--text);
  font-size: 15px;
  line-height: 1.18;
  letter-spacing: -.012em;
}

.tasks-progress-copy span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.tasks-add-button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  padding: 0 11px;
  background: rgba(143, 159, 138, .12);
  color: var(--sage-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.tasks-add-button:disabled { opacity: .45; }

.tasks-day-card .plan-progress {
  height: 6px;
  margin: 2px 0 8px;
}

.plan-task-list {
  gap: 0;
}

.plan-task-list .task {
  padding: 12px 0;
}

.tasks-empty-state {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 2px 6px;
  text-align: left;
}

.tasks-empty-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(143, 159, 138, .11);
  color: var(--sage-dark);
  font-size: 18px;
  font-weight: 750;
}

.tasks-empty-state > div:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.tasks-empty-state b {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.tasks-empty-state span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

/* Task editor: vertical-only gesture area, consistent field widths and a
   clearer visual hierarchy. */
.task-modal-sheet {
  width: min(100%, 510px);
  max-width: calc(100vw - 28px);
  overflow-x: clip !important;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.task-modal-sheet .modal-header {
  margin-bottom: 14px;
}

#task-form {
  display: grid;
  gap: 12px;
  inline-size: 100%;
  max-inline-size: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

.task-form-section {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(105, 94, 83, .09);
  border-radius: 16px;
  background: rgba(255,255,255,.36);
  box-sizing: border-box;
}

.task-form-section-title {
  color: var(--sage-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.task-form-section-soft {
  background: rgba(143,159,138,.055);
}

#task-form .field {
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

#task-form .field input,
#task-form .field select {
  display: block;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  height: 46px;
  margin: 0;
  box-sizing: border-box;
}

#task-form input[type="date"],
#task-form input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
}

#task-form .modal-save {
  margin-top: 2px;
}

.task-delete-button {
  padding: 10px 14px;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

@media (max-width: 390px) {
  .tasks-day-card { padding: 14px; }
  .tasks-card-toolbar { gap: 10px; }
  .tasks-add-button { padding-inline: 9px; font-size: 11px; }
  .tasks-progress-copy b { font-size: 14px; }
  .task-modal-sheet { max-width: calc(100vw - 20px); padding-left: 14px; padding-right: 14px; }
  .task-form-section { padding: 11px; }
}


/* ARVYNO 0.9.10 — Goals UX: clickable categories + full internal goal screen */

/* Goals page is denser and easier to scan. */
.page[data-page="goals"] { align-content: start; }
.page[data-page="goals"] .goals-heading { padding-bottom: 0; }
.page[data-page="goals"] .goals-heading h1 {
  max-width: 470px;
  font-size: clamp(31px, 7.3vw, 38px);
  line-height: 1.02;
}
.page[data-page="goals"] .goals-heading p { max-width: 470px; }
.page[data-page="goals"] .goals-heading .goals-add { margin-top: 14px; }

.goal-type-strip { gap: 8px; }
.goal-type-strip > .goal-type-card {
  position: relative;
  min-width: 0;
  min-height: 112px;
  padding: 14px 8px 13px;
  border: 1px solid var(--line-soft, var(--line));
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  color: var(--text);
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
.goal-type-strip > .goal-type-card:active { transform: scale(.98); }
.goal-type-strip > .goal-type-card span { display:block; font-size:21px; margin-bottom:7px; }
.goal-type-strip > .goal-type-card b { display:block; font-size:11px; line-height:1.15; }
.goal-type-strip > .goal-type-card small { display:block; color:var(--muted); font-size:9px; margin-top:4px; line-height:1.2; }
.goal-type-strip > .goal-type-card em {
  position: absolute;
  top: 9px;
  right: 9px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(143,159,138,.13);
  color: var(--sage-dark);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.goals-page-list .goal-title-row { align-items: flex-start; flex-wrap: wrap; }
.goals-page-list .goal-title-row .goal-title {
  flex: 1 1 160px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.18;
}
.goals-page-list .goal-priority { margin-top: 1px; }
.goals-habit-add { white-space: nowrap; }
.goals-habits-heading { align-items: flex-start; }

/* Category drill-down keeps the Goals tab active and only changes the page content. */
.goal-category-page {
  display: grid;
  gap: 10px;
  padding: 8px 4px 2px;
}
.goal-category-back {
  justify-self: start;
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  padding: 0 11px;
  background: rgba(143,159,138,.10);
  color: var(--sage-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}
.goal-category-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}
.goal-category-title-row h1 {
  margin: 0 0 7px;
  font-size: clamp(28px, 7vw, 36px);
  line-height: 1.03;
  letter-spacing: -.035em;
}
.goal-category-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.goal-category-count {
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(143,159,138,.12);
  color: var(--sage-dark);
  font-weight: 800;
}
.goal-category-add { margin-top: 2px; }
.goal-category-list-card { align-self: start; }
.goal-empty-state { padding-block: 20px; }

/* A concrete goal is now a true internal screen, not a low bottom sheet. */
.app-shell.goal-detail-active .bottom-nav { display: none !important; }
.goal-detail-screen {
  position: absolute;
  top: var(--goal-detail-top, 0px);
  left: 0;
right: 0;
  bottom: 0;
  z-index: 130;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease;
  overflow: hidden;
}
.goal-detail-screen.visible {
  opacity: 1;
  pointer-events: auto;
}
.goal-detail-screen .goal-detail-panel {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: 0;
  background: var(--bg);
  box-shadow: none;
  transform: none;
}
.goal-detail-screen .goal-detail-topbar {
  position: relative;
  top: auto;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 42px;
  align-items: center;
  margin: 0;
  padding: 12px 16px 10px;
  background: rgba(246,242,236,.985);
  border-bottom: 1px solid rgba(105,94,83,.08);
  z-index: 2;
}
.goal-detail-screen .goal-detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 12px 16px calc(24px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)));
}
.goal-detail-screen .goal-detail-scroll::-webkit-scrollbar { display: none; }
.goal-detail-screen .goal-detail-hero {
  padding: 20px;
  border-radius: 24px;
}
.goal-detail-screen .goal-detail-hero h1 {
  font-size: clamp(30px, 8vw, 40px);
  overflow-wrap: anywhere;
}
.goal-detail-screen .goal-detail-card { margin-top: 12px; }
.goal-detail-screen .goal-detail-meta { flex-wrap: wrap; }

/* Old bottom-sheet rules must not win when the new detail screen is active. */
.goal-detail-screen.goal-detail-overlay,
.goal-detail-overlay.goal-detail-screen { backdrop-filter: none; }

@media (min-width: 900px) {
  html.telegram-desktop .goal-detail-screen {
    border-radius: 0 0 30px 30px;
  }
  html.telegram-desktop .goal-detail-screen .goal-detail-scroll {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 390px) {
  .goal-type-strip > .goal-type-card { min-height: 106px; padding-inline: 6px; }
  .goal-type-strip > .goal-type-card small { font-size: 8.5px; }
  .goal-detail-screen .goal-detail-topbar { padding-inline: 12px; }
  .goal-detail-screen .goal-detail-scroll { padding-inline: 12px; }
}

.habit-goal-link { margin-top: 3px; color: var(--sage-dark); font-size: 9px; line-height: 1.3; }

/* ARVYNO 0.9.11 — financial goals integration */
.goal-finance-link-section {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
  padding: 16px;
  border: 1px solid rgba(83, 109, 87, .16);
  border-radius: 20px;
  background: rgba(124, 151, 126, .06);
  box-sizing: border-box;
  overflow: hidden;
}
.goal-finance-link-section.hidden,
.goal-finance-auto-settings.hidden,
.goal-allocation-field.hidden { display: none !important; }
.goal-finance-link-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.goal-finance-auto-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(86, 119, 90, .10);
  color: var(--sage-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.goal-finance-mode-control { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.goal-finance-mode-control span {
  min-height: 48px;
  padding: 8px 6px;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
  font-size: 12px;
}
.goal-finance-mode-help {
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.goal-finance-auto-settings {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.goal-percent-input {
  display: grid;
  grid-template-columns: minmax(84px, 110px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.goal-percent-input b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
.goal-finance-note {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.goal-finance-link-section input[readonly] {
  background: rgba(238, 235, 229, .72);
  color: var(--muted);
}

.finance-goals-list { display: grid; gap: 10px; }
.finance-goal-row {
  width: 100%;
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(91, 83, 73, .10);
  border-radius: 18px;
  background: rgba(250, 249, 246, .78);
  color: inherit;
  text-align: left;
  box-sizing: border-box;
}
.finance-goal-row-head,
.finance-goal-row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.finance-goal-row-head > div { min-width: 0; display: grid; gap: 3px; }
.finance-goal-row-head b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.finance-goal-row-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.finance-goal-row-head > span {
  flex: 0 0 auto;
  color: var(--sage-dark);
  font-size: 18px;
  font-weight: 800;
}
.finance-goal-row-foot { color: var(--muted); font-size: 11px; }
.finance-goal-row-foot em {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(121, 113, 103, .08);
  font-style: normal;
  font-weight: 700;
}
.finance-goal-row-foot em.auto { background: rgba(86, 119, 90, .10); color: var(--sage-dark); }

.goal-finance-detail-card { display: grid; gap: 14px; }
.goal-finance-detail-amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.goal-finance-detail-amount b { font-size: 28px; letter-spacing: -.03em; }
.goal-finance-detail-amount span { color: var(--muted); font-size: 13px; }
.goal-finance-source-row {
  display: grid;
  grid-template-columns: 88px minmax(0,1fr);
  gap: 12px;
  align-items: start;
  padding-top: 10px;
  border-top: 1px solid rgba(91,83,73,.08);
  font-size: 12px;
}
.goal-finance-source-row span { color: var(--muted); }
.goal-finance-source-row b { text-align: right; line-height: 1.4; }
.goal-finance-last {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 4px 12px;
  padding: 13px;
  border-radius: 16px;
  background: rgba(86,119,90,.07);
}
.goal-finance-last span { color: var(--muted); font-size: 11px; }
.goal-finance-last b { color: var(--sage-dark); font-size: 17px; }
.goal-finance-last small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.goal-finance-empty { color: var(--muted); font-size: 12px; line-height: 1.45; }
.goal-finance-history { display: grid; gap: 8px; }
.goal-finance-history > div:not(.field-label) {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(91,83,73,.07);
  font-size: 11px;
}
.goal-finance-history span { color: var(--muted); }
.goal-finance-history b { flex: 0 0 auto; color: var(--sage-dark); }

.transaction-goal-impact {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 15px;
  background: rgba(86,119,90,.07);
}
.transaction-goal-impact > span { color: var(--muted); font-size: 11px; }
.transaction-goal-impact > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.transaction-goal-impact strong { color: var(--sage-dark); }

@media (max-width: 390px) {
  .goal-finance-mode-control { grid-template-columns: 1fr; }
  .goal-percent-input { grid-template-columns: 90px minmax(0,1fr); }
}
.goal-finance-connect-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.goal-finance-connect-card > div { min-width: 0; }
.goal-finance-connect-card h2 { margin: 0 0 5px; }
.goal-finance-connect-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.goal-finance-connect-card .secondary-button { flex: 0 0 auto; width: auto; min-width: 120px; }
@media (max-width: 420px) {
  .goal-finance-connect-card { align-items: stretch; flex-direction: column; }
  .goal-finance-connect-card .secondary-button { width: 100%; }
}


/* ARVYNO 0.9.12 — Finance UX hierarchy */
.finance-operations-card .card-title-row { align-items: flex-start; }
.finance-operations-card .transaction-list { margin-top: -2px; }
.finance-operations-card .transaction-row { min-height: 58px; }
.finance-operations-card .transaction-row:nth-child(n+6) { animation: none; }
.finance-operations-empty { padding-bottom: 2px; }

.finance-budget-card .budget-row-unset { gap: 8px; }
.finance-budget-card .budget-row-unset > div:first-child { border: 0; }
.budget-unset-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(143,159,138,.075);
  color: var(--muted);
  font-size: 10px;
}
.budget-unset-line button {
  border: 0;
  background: transparent;
  color: var(--sage-dark);
  padding: 0;
  font: inherit;
  font-weight: 750;
}
.finance-budget-card .budget-mini-grid b { line-height: 1.35; }

.finance-empty-card { padding-top: 16px; padding-bottom: 14px; }
.finance-empty-card .card-title-row { margin-bottom: 4px; }
.finance-empty-card .mini-empty {
  padding: 5px 0 0;
  min-height: 0;
}
.finance-empty-card .mini-empty button { display: none; }

.finance-goal-row { cursor: pointer; }
.finance-goal-row:active { transform: scale(.993); }
.finance-goal-row-head small { font-size: 10.5px; }
.finance-goal-row-foot em { flex: 0 0 auto; }

@media (max-width: 560px) {
  .finance-operations-card .card-title-row { gap: 8px; }
  .finance-operations-card .card-link { white-space: nowrap; padding-top: 2px; }
  .finance-empty-card { padding: 15px 16px 13px; }
  .budget-unset-line { font-size: 10px; }
}

/* ARVYNO 0.9.13 — Finance periods + recurring payments */
.finance-period-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: min(100%, 360px);
  margin: 18px auto 0;
  padding: 4px;
  border-radius: 15px;
  background: rgba(143,159,138,.09);
  border: 1px solid rgba(91,102,91,.08);
}
.finance-period-control button {
  min-width: 0;
  border: 0;
  border-radius: 11px;
  padding: 9px 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.finance-period-control button.active {
  background: rgba(255,255,255,.9);
  color: var(--sage-dark);
  box-shadow: 0 6px 16px rgba(67,75,68,.07);
}
.finance-date-switch {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  width: min(100%, 390px);
  margin: 14px auto 0;
}
.finance-date-switch button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: var(--sage-dark);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.finance-date-switch button:disabled {
  opacity: .32;
  cursor: default;
}
.finance-date-switch b {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-align: center;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}
.finance-heading .finance-period-control,
.finance-heading .finance-date-switch { margin-left: auto; margin-right: auto; }

.finance-recurring-card .card-title-row { align-items: flex-start; }
.recurring-payment-list { display: grid; }
.recurring-payment-row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto 12px;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.recurring-payment-row:last-child { border-bottom: 0; }
.recurring-payment-row.inactive { opacity: .55; }
.recurring-payment-day {
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 1px;
  text-align: center;
  border-radius: 14px;
  background: rgba(143,159,138,.11);
}
.recurring-payment-day b { font-size: 14px; color: var(--sage-dark); line-height: 1; }
.recurring-payment-day small { font-size: 7.5px; color: var(--muted); }
.recurring-payment-main { min-width: 0; display: grid; gap: 3px; }
.recurring-payment-main b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.recurring-payment-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 9px;
}
.recurring-payment-side { display: grid; gap: 2px; text-align: right; }
.recurring-payment-side strong { white-space: nowrap; font-size: 11px; }
.recurring-payment-side small { color: var(--muted); font-size: 8px; }
.recurring-payment-arrow { color: var(--muted); font-size: 20px; line-height: 1; }
.recurring-payment-form { overflow-x: hidden; }
.recurring-active-toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(143,159,138,.075);
}
.recurring-active-toggle input { width: 18px; height: 18px; accent-color: var(--sage-dark); flex: 0 0 auto; }
.recurring-active-toggle span { display: grid; gap: 2px; }
.recurring-active-toggle b { font-size: 11px; }
.recurring-active-toggle small { color: var(--muted); font-size: 9px; }

@media (max-width: 420px) {
  .finance-period-control { width: 100%; }
  .finance-date-switch { width: 100%; grid-template-columns: 40px minmax(0,1fr) 40px; gap: 8px; }
  .finance-date-switch button { width: 40px; height: 40px; }
  .recurring-payment-row { grid-template-columns: 42px minmax(0,1fr) auto 9px; gap: 8px; }
  .recurring-payment-day { width: 42px; height: 42px; }
  .recurring-payment-side strong { font-size: 10px; }
}

/* ARVYNO 0.9.14 — Profile hub + analytics/settings inner screens */
.profile-home-heading {
  padding-bottom: 2px;
}
.profile-home-heading h1 {
  margin-bottom: 8px;
  font-size: clamp(34px, 8vw, 48px);
}
.profile-home-heading p {
  max-width: 430px;
}
.profile-identity-card {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255,255,255,.75);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #71836e, #4f6250);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(83,106,85,.16);
}
.profile-avatar.large {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  font-size: 28px;
}
.profile-identity-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.profile-identity-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
  letter-spacing: -.02em;
}
.profile-identity-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.profile-menu-chevron {
  color: var(--muted);
  font-size: 25px;
  line-height: 1;
}
.profile-stats-card {
  cursor: pointer;
}
.profile-stats-card:active,
.profile-identity-card:active,
.profile-menu-row:active { transform: scale(.995); }
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
}
.profile-stats-grid > div {
  min-width: 0;
  padding: 13px 14px;
  border-radius: 15px;
  background: rgba(143,159,138,.075);
  display: grid;
  gap: 4px;
}
.profile-stats-grid span { color: var(--muted); font-size: 10px; }
.profile-stats-grid b { min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.profile-stats-grid b.positive { color: var(--success); }
.profile-stats-grid b.negative { color: var(--danger); }
.profile-menu-card { padding: 4px 18px; }
.profile-menu-row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto 12px;
  align-items: center;
  gap: 11px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.profile-menu-row:last-child { border-bottom: 0; }
.profile-menu-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(143,159,138,.10);
  color: var(--sage-dark);
  font-size: 18px;
  font-weight: 800;
}
.profile-menu-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.profile-menu-copy b { font-size: 13px; }
.profile-menu-copy small { color: var(--muted); font-size: 9.5px; line-height: 1.35; }
.profile-menu-value { color: var(--sage-dark); font-size: 10px; font-weight: 750; white-space: nowrap; }

.app-shell.profile-detail-active .bottom-nav { display: none !important; }
.profile-detail-screen {
  position: absolute;
  top: var(--profile-detail-top, 0px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 132;
  overflow: hidden;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease;
}
.profile-detail-screen.visible { opacity: 1; pointer-events: auto; }
.profile-detail-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.profile-detail-topbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 42px;
  align-items: center;
  padding: 12px 16px 10px;
  background: rgba(246,242,236,.985);
  border-bottom: 1px solid rgba(105,94,83,.08);
  z-index: 2;
}
.profile-detail-top-spacer { width: 42px; height: 42px; }
.profile-detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 16px 16px calc(26px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)));
}
.profile-detail-scroll::-webkit-scrollbar { display: none; }
.profile-section-intro {
  padding: 5px 5px 2px;
}
.profile-section-intro h1 {
  margin: 8px 0 7px;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.profile-section-intro p {
  margin: 0;
  max-width: 440px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.profile-detail-metrics .metric small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}
.profile-edit-card { display: grid; gap: 18px; }
.profile-edit-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.profile-edit-hero h2 { margin: 0 0 4px; }
.profile-edit-hero p { margin: 0; color: var(--muted); font-size: 11px; }
.profile-edit-form { display: grid; }
.profile-inline-action {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--sage-dark);
  text-align: left;
  padding: 0 2px 4px;
  font-size: 10px;
  font-weight: 700;
}
.profile-readonly-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(143,159,138,.07);
  font-size: 10px;
}
.profile-readonly-row span { color: var(--muted); }
.profile-readonly-row b { overflow-wrap: anywhere; text-align: right; }
.profile-analytics-switch { grid-template-columns: repeat(3, minmax(0,1fr)); }
.settings-two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.settings-help {
  margin-top: -4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}
.profile-data-actions { padding-block: 4px; }
.profile-data-actions > button {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0,1fr) 32px;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}
.profile-data-actions > button:last-child { border-bottom: 0; }
.profile-data-actions span { min-width: 0; display: grid; gap: 4px; }
.profile-data-actions b { font-size: 13px; }
.profile-data-actions small { color: var(--muted); font-size: 9.5px; line-height: 1.4; }
.profile-data-actions i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; background: rgba(143,159,138,.1); color: var(--sage-dark); font-style: normal; }
.danger-zone-card { display: grid; gap: 16px; }
.danger-zone-card h2 { margin: 5px 0 6px; }
.danger-zone-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.danger-secondary {
  width: 100%;
  border: 1px solid rgba(185,95,88,.16);
  border-radius: 15px;
  padding: 13px 15px;
  background: rgba(185,95,88,.08);
  color: var(--danger);
  font-weight: 750;
}
.profile-about-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.profile-about-logo {
  width: 82px;
  height: 82px;
  margin-bottom: 18px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #75695f, #3f493f);
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.profile-about-card h1 { margin: 7px 0 8px; font-size: 32px; letter-spacing: -.04em; }
.profile-about-card > p { max-width: 320px; margin: 0; color: var(--muted); line-height: 1.5; }
.profile-about-meta {
  width: 100%;
  max-width: 360px;
  display: grid;
  gap: 0;
  margin-top: 28px;
  text-align: left;
}
.profile-about-meta > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.profile-about-meta > div:last-child { border-bottom: 0; }
.profile-about-meta span { color: var(--muted); }
.profile-about-meta b { text-align: right; }

@media (min-width: 900px) {
  html.telegram-desktop .profile-detail-screen { border-radius: 0 0 30px 30px; }
  html.telegram-desktop .profile-detail-scroll { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 390px) {
  .profile-detail-topbar { padding-inline: 12px; }
  .profile-detail-scroll { padding-inline: 12px; }
  .profile-menu-row { grid-template-columns: 38px minmax(0,1fr) auto 10px; gap: 8px; }
  .profile-menu-icon { width: 38px; height: 38px; border-radius: 12px; }
  .settings-two-fields { grid-template-columns: 1fr; }
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }


/* ARVYNO 0.9.15 — Profile polish, real inner scrolling, aligned notifications */
.profile-detail-panel > [data-profile-detail-content] {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.profile-detail-scroll {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  touch-action: pan-y;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  padding-bottom: calc(42px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)));
}
.profile-notification-form {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0 !important;
}
.profile-notification-form > *,
.profile-notification-form .settings-two-fields,
.profile-notification-form .field,
.profile-notification-form .settings-zone,
.profile-notification-form .fab {
  grid-column: 1 / -1 !important;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.profile-notification-form .settings-toggle {
  min-height: 72px;
  padding: 16px 0 12px;
}
.profile-notification-form .settings-inline-field {
  margin: 0 0 12px !important;
}
.profile-notification-form .settings-two-fields {
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin: 0 0 12px;
}
.profile-notification-form .field input,
.profile-notification-form .field select,
.profile-edit-form .field select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.profile-notification-form input[type='number']::-webkit-inner-spin-button,
.profile-notification-form input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.profile-notification-form input[type='number'] { appearance: textfield; -moz-appearance: textfield; }
.profile-data-actions .profile-restore-input { display: none !important; }
@media (max-width: 390px) {
  .profile-notification-form .settings-two-fields { grid-template-columns: 1fr; }
}


/* ARVYNO 0.9.16 — Home Polish Fix */
.today-hero {
  padding: 15px 16px 13px;
}
.today-hero-grid {
  gap: 12px;
}
.today-hero h1 {
  font-size: clamp(27px, 7vw, 34px);
}
.today-hero p {
  margin-top: 5px;
  line-height: 1.3;
}
.today-score {
  min-width: 70px;
}
.today-score .score {
  font-size: 30px;
}
.today-progress {
  margin-top: 11px;
}
.today-hero .progress-caption {
  margin-top: 6px;
  font-size: 11px;
}
.today-tasks-card {
  padding-top: 16px;
  padding-bottom: 14px;
}
.today-task-empty {
  padding-top: 6px;
  padding-bottom: 8px;
}
.today-add-task {
  margin-top: 6px;
  padding-block: 12px;
}
.today-money-tile.income b.is-zero,
.today-money-tile.expense b.is-zero {
  color: var(--text);
}
.today-money-tile.income b.has-value { color: var(--success); }
.today-money-tile.expense b.has-value { color: var(--danger); }
.today-goals-card .compact-goal .goal-meta {
  line-height: 1.35;
  white-space: normal;
}
.today-goals-card .compact-goal .goal-title-row {
  align-items: flex-start;
}
.today-goals-card .compact-goal .goal-priority {
  flex: 0 0 auto;
}
@media (max-width: 420px) {
  .today-hero { padding: 14px; }
  .today-score .score { font-size: 28px; }
}


/* ARVYNO 0.9.17 — Tasks Polish: compact week navigation + intentional empty day */
.page[data-page="plan"] .tasks-heading {
  margin-bottom: 2px;
}

.tasks-day-card {
  padding: 15px;
}

.tasks-day-card .plan-date-switch {
  margin-bottom: 10px;
}

.tasks-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  margin: 0 0 13px;
  border-radius: 17px;
  background: rgba(143,159,138,.07);
  overflow: hidden;
}

.tasks-week-day {
  position: relative;
  min-width: 0;
  min-height: 57px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 5px 2px 7px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.tasks-week-day span {
  font-size: 9px;
  line-height: 1;
  text-transform: capitalize;
}
.tasks-week-day b {
  color: var(--text);
  font-size: 13px;
  line-height: 1.15;
}
.tasks-week-day i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: transparent;
}
.tasks-week-day i.has-tasks { background: var(--sage-dark); }
.tasks-week-day.is-today:not(.is-selected) b { color: var(--sage-dark); }
.tasks-week-day.is-selected {
  background: rgba(255,255,255,.92);
  box-shadow: 0 4px 14px rgba(77,72,64,.07);
}
.tasks-week-day.is-selected span,
.tasks-week-day.is-selected b { color: var(--sage-dark); font-weight: 760; }

.tasks-empty-centered {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 10px;
  padding: 18px 8px 8px;
  text-align: center;
}
.tasks-empty-centered .tasks-empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-size: 20px;
}
.tasks-empty-centered > div:last-child {
  justify-items: center;
  max-width: 310px;
  gap: 5px;
  text-align: center;
}
.tasks-empty-centered b { font-size: 16px; }
.tasks-empty-centered span { font-size: 11px; }
.tasks-empty-add {
  min-height: 42px;
  margin-top: 9px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  background: rgba(143,159,138,.13);
  color: var(--sage-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

@media (max-width: 390px) {
  .tasks-week-strip { gap: 3px; padding: 4px; }
  .tasks-week-day { min-height: 53px; }
  .tasks-week-day span { font-size: 8px; }
  .tasks-week-day b { font-size: 12px; }
}


/* ARVYNO 0.9.18 — Tasks week nav + Home copy/deadline polish */
.tasks-week-nav {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: stretch;
  gap: 6px;
  margin: 0 0 13px;
}
.tasks-week-nav .tasks-week-strip {
  margin: 0;
  min-width: 0;
}
.tasks-week-arrow {
  border: 0;
  border-radius: 13px;
  background: rgba(143,159,138,.08);
  color: var(--sage-dark);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}
.tasks-week-arrow:active { transform: scale(.97); }
.today-goals-card .compact-goal .goal-meta {
  margin-bottom: 7px;
}
.goal-deadline-below {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
}
@media (max-width: 390px) {
  .tasks-week-nav { grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 4px; }
  .tasks-week-arrow { border-radius: 11px; font-size: 21px; }
}
\n\n/* ARVYNO 0.9.19 — stable task editor on iOS/Telegram keyboards */\n.task-modal-backdrop {\n  inset: auto 0 auto 0 !important;\n  top: var(--task-viewport-top, 0px) !important;\n  width: 100% !important;\n  height: var(--task-viewport-height, 100dvh) !important;\n  max-height: var(--task-viewport-height, 100dvh) !important;\n  padding: 8px 10px max(8px, env(safe-area-inset-bottom)) !important;\n  align-items: flex-end;\n  overflow: hidden !important;\n  box-sizing: border-box;\n}\n\n.task-modal-backdrop .task-modal-sheet {\n  width: min(100%, 510px);\n  max-width: 510px;\n  max-height: calc(100% - 4px) !important;\n  min-height: 0;\n  margin: 0 auto;\n  padding: 8px 14px max(16px, env(safe-area-inset-bottom));\n  overflow-y: auto !important;\n  overflow-x: hidden !important;\n  overscroll-behavior: contain;\n  -webkit-overflow-scrolling: touch;\n  scroll-padding-top: 92px;\n  scroll-padding-bottom: 24px;\n  touch-action: pan-y;\n  box-sizing: border-box;\n}\n\n.task-modal-backdrop.task-keyboard-open .task-modal-sheet {\n  transition: opacity .12s ease !important;\n  transform: none !important;\n}\n\n.task-modal-backdrop .modal-header {\n  padding-top: 8px;\n}\n\n#task-form,\n#task-form .task-form-section,\n#task-form .field {\n  min-inline-size: 0;\n  max-inline-size: 100%;\n  inline-size: 100%;\n  box-sizing: border-box;\n}\n\n#task-form .field {\n  overflow: visible;\n}\n\n#task-form .field input,\n#task-form .field select,\n#task-form .field textarea {\n  inline-size: 100%;\n  max-inline-size: 100%;\n  min-inline-size: 0;\n  height: 48px;\n  margin: 0;\n  padding: 0 14px;\n  border-radius: 14px;\n  box-sizing: border-box;\n  font-size: 16px; /* prevents iOS focus zoom */\n  line-height: 1.2;\n  text-align: left;\n  text-align-last: left;\n  -webkit-text-size-adjust: 100%;\n}\n\n#task-form .field select {\n  padding-right: 38px;\n}\n\n#task-form input[type=\"date\"],\n#task-form input[type=\"time\"],\n#task-form input[type=\"number\"] {\n  text-align: left !important;\n}\n\n#task-form input[type=\"date\"]::-webkit-date-and-time-value,\n#task-form input[type=\"time\"]::-webkit-date-and-time-value {\n  min-width: 0;\n  margin: 0;\n  text-align: left !important;\n}\n\n#task-form input[type=\"date\"]::-webkit-datetime-edit,\n#task-form input[type=\"time\"]::-webkit-datetime-edit {\n  display: block;\n  width: 100%;\n  padding: 0;\n  text-align: left;\n}\n\n#task-form input:focus,\n#task-form select:focus {\n  outline: none;\n}\n\n@media (max-width: 560px) {\n  .task-modal-backdrop .task-modal-sheet {\n    width: 100%;\n    max-width: 100%;\n    border-radius: 24px 24px 20px 20px;\n  }\n  .task-form-section {\n    padding: 11px 10px;\n    gap: 9px;\n  }\n  #task-form { gap: 10px; }\n}\n
/* ARVYNO 0.9.20 — tasks, habits and goals use full internal form pages */
.app-shell.entity-form-active .bottom-nav { display: none !important; }
body.entity-form-open { overflow: hidden !important; }

.entity-form-screen {
  position: absolute;
  top: var(--entity-form-top, 0px);
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  max-height: none;
  z-index: 142;
  overflow: hidden;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease;
}
.entity-form-screen.visible { opacity: 1; pointer-events: auto; }
.entity-form-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.entity-form-topbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  padding: 11px 16px 10px;
  background: rgba(246,242,236,.99);
  border-bottom: 1px solid rgba(105,94,83,.08);
  z-index: 4;
}
.entity-form-top-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 14px;
  font-weight: 780;
  letter-spacing: -.02em;
}
.entity-form-top-spacer { width: 42px; height: 42px; }
.entity-form-scroll {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scroll-behavior: auto;
  scroll-padding-top: 14px;
  scroll-padding-bottom: calc(18px + var(--entity-keyboard-reserve, 0px));
  padding: 16px 16px calc(34px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)) + var(--entity-keyboard-reserve, 0px));
}
.entity-form-scroll::-webkit-scrollbar { display: none; }
.entity-form-intro {
  display: grid;
  gap: 6px;
  padding: 2px 4px 14px;
}
.entity-form-intro h1 {
  margin: 0;
  font-size: clamp(28px, 7.5vw, 38px);
  line-height: 1.03;
  letter-spacing: -.045em;
}
.entity-form-intro p {
  margin: 0;
  max-width: 440px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.entity-form-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  gap: 12px;
  overflow-x: hidden;
}
.entity-form-content > *,
.entity-form-screen .field,
.entity-form-screen .task-form-section,
.entity-form-screen .form-grid,
.entity-form-screen .goal-numeric-block,
.entity-form-screen .goal-finance-link-section,
.entity-form-screen .goal-link-section {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.entity-form-screen .field { overflow: visible; }
.entity-form-screen .field input,
.entity-form-screen .field select,
.entity-form-screen .field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  font-size: 16px !important;
  line-height: 1.25;
  text-align: left;
  text-align-last: left;
  -webkit-text-size-adjust: 100%;
}
.entity-form-screen .field input,
.entity-form-screen .field select { height: 50px; padding-left: 14px; padding-right: 14px; }
.entity-form-screen .field select { padding-right: 38px; }
.entity-form-screen .field textarea {
  min-height: 94px;
  resize: vertical;
  padding: 13px 14px;
}
.entity-form-screen input[type="date"],
.entity-form-screen input[type="time"],
.entity-form-screen input[type="number"] { text-align: left !important; }
.entity-form-screen input[type="date"]::-webkit-date-and-time-value,
.entity-form-screen input[type="time"]::-webkit-date-and-time-value {
  min-width: 0;
  margin: 0;
  text-align: left !important;
}
.entity-form-screen input[type="date"]::-webkit-datetime-edit,
.entity-form-screen input[type="time"]::-webkit-datetime-edit {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
}
.entity-form-screen .form-grid { grid-template-columns: 1fr; }
.entity-form-screen .task-form-section {
  padding: 14px;
  gap: 11px;
  border-radius: 18px;
  background: rgba(255,255,255,.46);
}
.entity-form-screen .task-form-section-soft { background: rgba(143,159,138,.065); }
.entity-form-save { margin-top: 3px; min-height: 50px; }
.entity-form-screen .danger-button { min-height: 46px; }

/* ARVYNO 0.9.22 — reference-style keyboard physics.
   The screen/header are fixed. iOS is allowed to animate its keyboard natively.
   Only the INNER form scroller moves after the viewport settles. */
.entity-form-screen {
  --entity-keyboard-reserve: 0px;
  contain: layout paint;
}
.entity-form-screen,
.entity-form-topbar {
  transform: none !important;
}
.entity-form-scroll {
  overflow-anchor: none;
  scroll-behavior: auto !important;
}
.entity-form-screen.entity-keyboard-open { transition: none; }
.entity-form-screen.entity-keyboard-open .entity-form-scroll {
  overscroll-behavior-y: contain;
}
body.entity-keyboard-active,
body.entity-keyboard-active .app-shell {
  overscroll-behavior: none;
}
body.entity-keyboard-active .entity-form-screen {
  touch-action: pan-y;
}

@media (max-width: 390px) {
  .entity-form-topbar { padding-inline: 12px; }
  .entity-form-scroll { padding-inline: 12px; }
  .entity-form-screen .task-form-section { padding: 12px 10px; }
  .entity-form-intro h1 { font-size: 29px; }
}

@media (min-width: 900px) {
  html.telegram-desktop .entity-form-screen { border-radius: 0 0 30px 30px; }
  html.telegram-desktop .entity-form-scroll { padding-left: 18px; padding-right: 18px; }
}

/* ARVYNO 0.9.23 — native-style push navigation + calmer keyboard handling */
.app-shell.entity-form-active .bottom-nav,
.app-shell.entity-form-closing .bottom-nav {
  display: none !important;
}

/* The source page recedes slightly instead of disappearing. Only compositor
   properties animate, so opening a form never triggers a layout pass. */
.telegram-webapp .page,
.app-shell .page {
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 50% 50%;
  transition: transform 320ms cubic-bezier(.22,.78,.18,1), opacity 260ms ease;
  will-change: transform;
}
.app-shell.entity-form-active .page {
  transform: translate3d(-8%, 0, 0) scale(.988);
  opacity: .94;
  pointer-events: none;
}
.app-shell.entity-form-closing .page {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  pointer-events: none;
}

.entity-form-screen {
  opacity: 1 !important;
  pointer-events: none;
  transform: translate3d(102%, 0, 0);
  transition: transform 320ms cubic-bezier(.22,.78,.18,1) !important;
  will-change: transform;
  box-shadow: -18px 0 38px rgba(45,39,34,.08);
  contain: layout paint;
  backface-visibility: hidden;
}
.entity-form-screen.visible {
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}
.entity-form-screen.closing {
  pointer-events: none;
}
.entity-form-panel,
.entity-form-topbar {
  transform: translate3d(0,0,0) !important;
  backface-visibility: hidden;
}

/* Keyboard runway: added once on first interaction and never resized while the
   keyboard animates. This gives bottom fields room to rise without changing the
   geometry on every VisualViewport frame. */
.entity-form-screen {
  --entity-keyboard-runway: clamp(280px, 44vh, 390px);
}
.entity-form-scroll {
  padding-bottom: calc(34px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)));
  scroll-padding-bottom: 18px;
  overflow-anchor: none;
  overscroll-behavior-y: contain;
  scroll-behavior: auto !important;
}
.entity-form-screen.keyboard-runway-ready .entity-form-scroll {
  padding-bottom: calc(34px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)) + var(--entity-keyboard-runway));
  scroll-padding-bottom: var(--entity-keyboard-runway);
}
.entity-form-screen .field,
.entity-form-screen .priority-switch,
.entity-form-screen .goal-finance-link-section,
.entity-form-screen .goal-link-section,
.entity-form-screen .weekday-field {
  scroll-margin-top: 14px;
  scroll-margin-bottom: 16px;
}

/* No transitions on dimensions/position while iOS owns the keyboard animation. */
.entity-form-screen.entity-keyboard-open,
.entity-form-screen.entity-keyboard-open .entity-form-panel,
.entity-form-screen.entity-keyboard-open .entity-form-scroll {
  transition-property: transform !important;
}
body.entity-keyboard-active,
body.entity-keyboard-active .app-shell {
  overscroll-behavior: none;
}

@media (prefers-reduced-motion: reduce) {
  .entity-form-screen,
  .app-shell .page {
    transition-duration: 1ms !important;
  }
}
/* 0.9.23 specificity guard: overrides the old 0.9.22 transform:none rule. */
.entity-form-screen {
  transform: translate3d(102%, 0, 0) !important;
}
.entity-form-screen.visible {
  transform: translate3d(0, 0, 0) !important;
}
.entity-form-screen.entity-keyboard-open {
  transition: transform 320ms cubic-bezier(.22,.78,.18,1) !important;
}


/* ARVYNO 0.9.24 — task-form geometry + keyboard dismissal polish */
.entity-form-scroll {
  padding-bottom: calc(18px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))) !important;
}
.entity-form-screen.keyboard-runway-ready .entity-form-scroll {
  padding-bottom: calc(18px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)) + var(--entity-keyboard-runway)) !important;
}

/* WebKit gives date/time controls a different internal baseline. Normalize the
   value wrapper so text sits on the same vertical and horizontal axis as all
   other ARVYNO inputs. */
.entity-form-screen input[type="date"],
.entity-form-screen input[type="time"] {
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 14px !important;
  line-height: 50px !important;
  font: inherit !important;
  text-align: left !important;
  text-align-last: left !important;
}
.entity-form-screen input[type="date"]::-webkit-date-and-time-value,
.entity-form-screen input[type="time"]::-webkit-date-and-time-value,
.entity-form-screen input[type="date"]::-webkit-datetime-edit,
.entity-form-screen input[type="time"]::-webkit-datetime-edit,
.entity-form-screen input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.entity-form-screen input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
  text-align: left !important;
}
.entity-form-screen input[type="date"]::-webkit-calendar-picker-indicator,
.entity-form-screen input[type="time"]::-webkit-calendar-picker-indicator {
  align-self: center;
  margin: 0;
}

/* The CTA should visually finish the form. Any extra keyboard runway is removed
   as soon as the keyboard is truly closed, so no artificial blank page remains. */
.entity-form-content {
  padding-bottom: 0 !important;
}
.entity-form-save {
  margin-top: 2px !important;
  margin-bottom: 0 !important;
}


/* ARVYNO 0.9.25 — dedicated Telegram iOS/mobile form layer.
   Native date/time text is hidden behind a stable ARVYNO presentation layer,
   and keyboard space exists only while visualViewport confirms a real keyboard. */
html.telegram-mobile .entity-form-screen {
  --entity-keyboard-runway: 0px !important;
}
html.telegram-mobile .entity-form-scroll,
html.telegram-mobile .entity-form-screen.keyboard-runway-ready .entity-form-scroll {
  padding-bottom: calc(18px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))) !important;
  scroll-padding-bottom: 18px !important;
}
html.telegram-mobile .entity-keyboard-spacer {
  display: block;
  width: 100%;
  height: 0;
  flex: 0 0 auto;
  pointer-events: none;
}

/* iOS renders date/time values on a different baseline. Keep the real native
   input fully tappable, but draw the visible value ourselves on one exact grid. */
html.telegram-mobile .entity-native-picker {
  position: relative;
  width: 100%;
  height: 50px;
  min-height: 50px;
  border: 1px solid #e0d9d1;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}
html.telegram-mobile .entity-native-picker:focus-within {
  border-color: #9bab98;
  box-shadow: 0 0 0 3px rgba(143,159,138,.13);
}
html.telegram-mobile .entity-native-picker-value {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 14px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
  box-sizing: border-box;
}
html.telegram-mobile .entity-native-picker-value.is-placeholder {
  color: #b5b1ad;
}
html.telegram-mobile .entity-native-picker > input[type="date"],
html.telegram-mobile .entity-native-picker > input[type="time"] {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  opacity: .001 !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  appearance: none;
  -webkit-appearance: none;
}
html.telegram-mobile .entity-native-picker > input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: .001;
}

/* On phones the last action should end the scroll content naturally; no
   guessed keyboard runway or persistent blank tail is allowed. */
html.telegram-mobile .entity-form-content {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
html.telegram-mobile .entity-form-save,
html.telegram-mobile .entity-form-screen .danger-button {
  margin-bottom: 0 !important;
}


/* ARVYNO 0.9.26 — iOS keyboard viewport lock.
   The visible form viewport ends above the keyboard; there is no fake runway
   and ARVYNO never repositions the focused field after a manual swipe. */
html.telegram-mobile .entity-form-screen {
  min-height: 0 !important;
  max-height: none !important;
}
html.telegram-mobile .entity-form-scroll,
html.telegram-mobile .entity-form-screen.entity-keyboard-open .entity-form-scroll {
  overscroll-behavior-y: none !important;
  scroll-behavior: auto !important;
  padding-bottom: calc(18px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))) !important;
  scroll-padding-bottom: 14px !important;
}
html.telegram-mobile .entity-keyboard-spacer {
  display: none !important;
  height: 0 !important;
}
html.telegram-mobile body.entity-keyboard-active,
html.telegram-mobile body.entity-keyboard-active .app-shell,
html.telegram-mobile body.entity-keyboard-active .entity-form-screen {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}


/* ARVYNO 0.9.27 — iOS form layer isolation.
   The form page always covers the complete ARVYNO content layer. Opening the
   keyboard never changes the page height, so the previous screen can never
   leak through. Keyboard space exists only as an exact inner scroll inset. */
html.telegram-mobile .entity-form-screen {
  top: var(--entity-form-top, 0px) !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  background: #f6f2ec !important;
  isolation: isolate;
  --entity-keyboard-inset: 0px;
}
html.telegram-mobile .entity-form-panel {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #f6f2ec !important;
}
html.telegram-mobile .entity-form-scroll,
html.telegram-mobile .entity-form-screen.entity-keyboard-open .entity-form-scroll {
  flex: 1 1 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
  padding-bottom: calc(
    18px +
    max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)) +
    var(--entity-keyboard-inset, 0px)
  ) !important;
  scroll-padding-bottom: calc(18px + var(--entity-keyboard-inset, 0px)) !important;
}
html.telegram-mobile .entity-keyboard-spacer {
  display: none !important;
  height: 0 !important;
}
html.telegram-mobile body.entity-keyboard-active,
html.telegram-mobile body.entity-keyboard-active .app-shell {
  overflow: hidden !important;
}
html.telegram-mobile body.entity-keyboard-active .entity-form-screen {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

/* ARVYNO 0.9.28 — stable iOS form viewport.
   Mobile entity forms are portalled outside .app-shell so WebKit cannot pan the
   underlying page when the software keyboard focuses an input. The page keeps
   one fixed geometry; only the inner form scroller receives keyboard room. */
html.entity-form-html-lock,
html.entity-form-html-lock body {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

html.telegram-mobile .entity-form-screen.entity-form-portal {
  position: fixed !important;
  top: var(--entity-form-top, 0px) !important;
  left: var(--entity-form-left, 0px) !important;
  right: auto !important;
  bottom: 0 !important;
  width: var(--entity-form-width, 100vw) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  z-index: 1000 !important;
  overflow: hidden !important;
  background: #f6f2ec !important;
  isolation: isolate;
  contain: layout paint style;
}

html.telegram-mobile .entity-form-screen.entity-form-portal .entity-form-panel {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #f6f2ec !important;
}

/* After the push animation completes there is deliberately NO transform on the
   form page. iOS focus/keyboard panning is much more stable in this state. */
html.telegram-mobile .entity-form-screen.entity-form-portal.settled {
  transform: none !important;
  transition: none !important;
  will-change: auto !important;
  box-shadow: none;
}
html.telegram-mobile .entity-form-screen.entity-form-portal.settled .entity-form-panel,
html.telegram-mobile .entity-form-screen.entity-form-portal.settled .entity-form-scroll {
  transform: none !important;
}

html.telegram-mobile .entity-form-screen.entity-form-portal .entity-form-scroll,
html.telegram-mobile .entity-form-screen.entity-form-portal.entity-keyboard-open .entity-form-scroll {
  flex: 1 1 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  width: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none !important;
  touch-action: pan-y !important;
  overflow-anchor: none !important;
  scroll-behavior: auto !important;
  padding-bottom: calc(
    18px +
    max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)) +
    var(--entity-keyboard-inset, 0px)
  ) !important;
  scroll-padding-bottom: calc(16px + var(--entity-keyboard-inset, 0px)) !important;
}

/* Reduce iOS momentum/bounce while the keyboard is open. Manual scrolling still
   works normally, but a field cannot fall into a giant elastic blank region. */
html.telegram-mobile .entity-form-screen.entity-form-portal.entity-keyboard-open .entity-form-scroll {
  -webkit-overflow-scrolling: auto;
}

html.telegram-mobile body.entity-keyboard-active .entity-form-screen.entity-form-portal {
  overflow: hidden !important;
}

/* Old runway/spacer mechanisms are fully disabled on the new mobile form path. */
html.telegram-mobile .entity-form-screen.entity-form-portal.keyboard-runway-ready .entity-form-scroll {
  padding-bottom: calc(
    18px +
    max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)) +
    var(--entity-keyboard-inset, 0px)
  ) !important;
}
html.telegram-mobile .entity-form-screen.entity-form-portal .entity-keyboard-spacer {
  display: none !important;
  height: 0 !important;
}

/* ARVYNO 0.9.29 — SIMPLE iOS FORM RESET
   After the push animation, mobile forms become ordinary content inside the
   existing #page scroller. There is one vertical scroll surface only. */
html.telegram-mobile .app-shell.entity-form-active .page.entity-form-page-mode,
html.telegram-mobile .app-shell.entity-form-closing .page.entity-form-page-mode {
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  padding: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  scroll-behavior: auto !important;
}

html.telegram-mobile .entity-form-screen.entity-form-in-page {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 100% !important;
  max-height: none !important;
  z-index: auto !important;
  overflow: visible !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  will-change: auto !important;
  contain: none !important;
  box-shadow: none !important;
  pointer-events: auto !important;
  background: #f6f2ec !important;
}

html.telegram-mobile .entity-form-screen.entity-form-in-page .entity-form-panel {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 100% !important;
  overflow: visible !important;
  background: #f6f2ec !important;
}

html.telegram-mobile .entity-form-screen.entity-form-in-page .entity-form-topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(246,242,236,.99) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html.telegram-mobile .entity-form-screen.entity-form-in-page .entity-form-scroll,
html.telegram-mobile .entity-form-screen.entity-form-in-page.entity-keyboard-open .entity-form-scroll,
html.telegram-mobile .entity-form-screen.entity-form-in-page.keyboard-runway-ready .entity-form-scroll {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
  touch-action: auto !important;
  padding: 16px 16px calc(28px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))) !important;
  scroll-padding: 0 !important;
  transform: none !important;
}

html.telegram-mobile .entity-form-screen.entity-form-in-page .entity-form-content {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* While the entrance/exit push is running, the temporary form layer remains
   non-interactive. Keyboard focus is only possible after it becomes a normal
   in-page document, avoiding focus inside a transformed ancestor. */
html.telegram-mobile .entity-form-screen.entity-form-mobile-transition:not(.entity-form-in-page) {
  pointer-events: none !important;
}

/* No keyboard engine classes may alter geometry in the simple mobile path. */
html.telegram-mobile .entity-form-screen.entity-form-in-page,
html.telegram-mobile .entity-form-screen.entity-form-in-page.entity-keyboard-open,
html.telegram-mobile body.entity-keyboard-active .entity-form-screen.entity-form-in-page {
  --entity-keyboard-inset: 0px !important;
  --entity-keyboard-reserve: 0px !important;
  --entity-keyboard-runway: 0px !important;
}

html.telegram-mobile .entity-form-screen.entity-form-in-page .entity-keyboard-spacer {
  display: none !important;
  height: 0 !important;
}

/* One normal iOS text geometry. */
html.telegram-mobile .entity-form-screen.entity-form-in-page input,
html.telegram-mobile .entity-form-screen.entity-form-in-page textarea,
html.telegram-mobile .entity-form-screen.entity-form-in-page select {
  font-size: 16px !important;
}

/* Underlying page returns from the same subtle depth used by the push. */
html.telegram-mobile .page.entity-nav-returning {
  transform: translate3d(-6%,0,0) scale(.99) !important;
  opacity: .96 !important;
}

/* ARVYNO 0.9.30 — value editor navigation
   Long entity forms no longer open the text keyboard. Text and custom numeric
   values are edited on a short, dedicated slide-in screen near the top. */
.entity-choice-form .entity-value-storage { display: none !important; }

.entity-value-row {
  width: 100%;
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  color: var(--text);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
.entity-value-row + .entity-value-row { margin-top: 10px; }
.entity-value-row:active { transform: scale(.995); }
.entity-value-row.is-disabled,
.entity-value-row:disabled { opacity: .62; cursor: default; }
.entity-value-copy { min-width: 0; display: grid; gap: 6px; }
.entity-value-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .02em;
}
.entity-value-text {
  min-width: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entity-value-text.is-placeholder { color: #aaa39b; font-weight: 500; }
.entity-value-chevron { font-size: 28px; line-height: 1; color: var(--muted); }

.entity-choice-block { gap: 10px; }
.entity-choice-form .duration-presets { margin-top: 4px; }
.entity-choice-form .duration-chip { min-height: 42px; }
.entity-priority-control { width: 100%; }
.entity-choice-form .goal-numeric-block { display: grid; gap: 10px; }
.entity-choice-form .goal-allocation-field { margin-top: 10px; }

.entity-value-screen {
  position: absolute;
  z-index: 160;
  top: var(--entity-value-top, 0px);
  left: 0;
  right: 0;
  bottom: 0;
  background: #f6f2ec;
  opacity: 1;
  transform: translate3d(100%,0,0);
  transition: transform .30s cubic-bezier(.22,.8,.2,1);
  pointer-events: none;
  overflow: hidden;
  will-change: transform;
}
.entity-value-screen.visible {
  transform: translate3d(0,0,0);
  pointer-events: auto;
}
.entity-value-screen.closing { pointer-events: none; }
.entity-value-panel {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #f6f2ec;
}
.entity-value-topbar {
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(107,94,86,.10);
  background: rgba(246,242,236,.98);
}
.entity-value-title {
  min-width: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entity-value-done {
  min-width: 72px;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(143,159,138,.14);
  color: var(--sage-dark);
  font-weight: 750;
}
.entity-value-body {
  align-self: start;
  padding: 28px 20px max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
}
.entity-value-body h1 {
  margin: 6px 0 20px;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.02;
  letter-spacing: -.04em;
}
.entity-value-input-wrap { display: block; width: 100%; }
.entity-value-input-wrap input,
.entity-value-input-wrap textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #ded5cc;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  color: var(--text);
  padding: 16px 18px;
  font: inherit;
  font-size: 17px;
  line-height: 1.35;
  outline: none;
  resize: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.entity-value-input-wrap input { min-height: 58px; }
.entity-value-input-wrap textarea { min-height: 150px; }
.entity-value-input-wrap input:focus,
.entity-value-input-wrap textarea:focus {
  border-color: rgba(85,105,86,.55);
  box-shadow: 0 0 0 3px rgba(143,159,138,.12);
}
.entity-value-hint {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.entity-form-screen.entity-value-parent-shift {
  transition: transform .30s cubic-bezier(.22,.8,.2,1), opacity .30s ease !important;
  transform: translate3d(-5%,0,0) scale(.995) !important;
  opacity: .96 !important;
}

@media (max-width: 560px) {
  .entity-value-row { min-height: 68px; padding: 13px 14px; }
  .entity-value-body { padding: 22px 16px max(22px, env(safe-area-inset-bottom)); }
  .entity-value-body h1 { font-size: 34px; margin-bottom: 18px; }
  .entity-value-topbar { padding-inline: 12px; }
}

html.telegram-mobile .entity-value-screen {
  top: var(--entity-value-top, 0px);
  height: auto;
  min-height: 0;
  overscroll-behavior: none;
  touch-action: manipulation;
}
html.telegram-mobile .entity-value-body {
  overflow: hidden;
  overscroll-behavior: none;
}
html.telegram-mobile .entity-value-input-wrap input,
html.telegram-mobile .entity-value-input-wrap textarea {
  font-size: 17px !important;
}

/* ARVYNO 0.9.31 — contextual value editor */
.entity-value-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.entity-value-help {
  margin-top: 18px;
  border: 1px solid rgba(107,94,86,.10);
  border-radius: 24px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(143,159,138,.12), rgba(255,255,255,.70));
  color: var(--text);
}
.entity-value-help-kicker {
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.entity-value-help h2 {
  margin: 8px 0 7px;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.entity-value-help p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.entity-value-help-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.entity-value-help-examples span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(107,94,86,.10);
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 560px) {
  .entity-value-help {
    margin-top: 16px;
    padding: 16px;
    border-radius: 22px;
  }
  .entity-value-help h2 { font-size: 18px; }
  .entity-value-help p { font-size: 13px; }
}
\n\n/* =========================================================\n   ARVYNO 0.9.33 — SIMPLE FORMS\n   One stable form pattern based on the current “Add goal” view.\n   No slide navigation, no sheet motion, no parent-screen shifting.\n   ========================================================= */\n.entity-form-screen,\n.entity-form-panel,\n.entity-form-scroll,\n.entity-form-topbar,\n.entity-value-screen,\n.entity-value-panel,\n.modal-backdrop,\n.modal-sheet,\n.task-modal-backdrop,\n.task-modal-sheet {\n  animation: none !important;\n  transition: none !important;\n}\n\n.entity-form-screen,\n.entity-form-screen.visible,\n.entity-form-screen.closing,\n.entity-form-screen.entity-form-mobile-transition,\n.entity-form-screen.entity-form-in-page,\n.entity-form-screen.entity-value-parent-shift {\n  transform: none !important;\n  opacity: 1 !important;\n}\n\n.entity-value-screen,\n.entity-value-screen.visible,\n.entity-value-screen.closing {\n  transform: none !important;\n  transition: none !important;\n}\n\n.entity-form-screen.entity-value-parent-shift .entity-form-panel,\n.entity-form-screen.entity-value-parent-shift {\n  transform: none !important;\n  filter: none !important;\n}\n\nhtml.telegram-mobile .entity-form-screen.entity-form-in-page {\n  position: relative !important;\n  inset: auto !important;\n  width: 100% !important;\n  min-height: 100% !important;\n  height: auto !important;\n  max-height: none !important;\n  box-shadow: none !important;\n}\n\nhtml.telegram-mobile .entity-form-screen.entity-form-in-page .entity-form-panel {\n  min-height: 100% !important;\n  height: auto !important;\n}\n\nhtml.telegram-mobile .entity-form-screen.entity-form-in-page .entity-form-scroll {\n  overflow: visible !important;\n  height: auto !important;\n  max-height: none !important;\n}\n\n.finance-form-screen .task-form {\n  width: 100%;\n  max-width: 100%;\n  display: grid;\n  gap: 12px;\n}\n\n.finance-form-screen .modal-save {\n  width: 100%;\n}\n\n/* Legacy bottom sheets may still be used for confirmations/settings.\n   They now appear without motion. */\n.modal-backdrop { opacity: 1 !important; }\n.modal-backdrop .modal-sheet,\n.modal-backdrop.visible .modal-sheet { transform: none !important; }\n
/* =========================================================
   ARVYNO 0.9.34 — SIMPLE FORM GEOMETRY FIX
   1) Form title bar is ordinary document content: no sticky overlap.
   2) Bottom navigation is hidden while any entity form is open.
   3) Forms keep a clear bottom runway for the primary action.
   ========================================================= */
body.task-form-open .bottom-nav {
  display: none !important;
}

html.telegram-mobile .entity-form-screen.entity-form-in-page .entity-form-topbar {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
  flex: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.telegram-mobile .entity-form-screen.entity-form-in-page .entity-form-scroll,
html.telegram-mobile .entity-form-screen.entity-form-in-page.entity-keyboard-open .entity-form-scroll,
html.telegram-mobile .entity-form-screen.entity-form-in-page.keyboard-runway-ready .entity-form-scroll {
  padding-bottom: calc(
    40px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))
  ) !important;
}

html.telegram-mobile .entity-form-screen.entity-form-in-page .entity-form-save,
html.telegram-mobile .entity-form-screen.entity-form-in-page .danger-button {
  margin-bottom: 0 !important;
}


/* =========================================================
   ARVYNO 0.9.35 — SIMPLE TASK FORM
   Flat task editor: only title, date, time and priority.
   No nested section cards. Navigation is hidden only here.
   ========================================================= */
.task-form-screen .entity-form-intro {
  display: none !important;
}

.task-form-screen .entity-form-scroll {
  padding-left: 16px !important;
  padding-right: 16px !important;
}

#task-form.task-simple-form {
  width: 100%;
  max-width: 100%;
  display: grid;
  gap: 18px;
  overflow: visible;
}

#task-form.task-simple-form .task-simple-field {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
}

#task-form.task-simple-form .task-simple-field > span {
  margin: 0;
  font-size: 12px;
  font-weight: 680;
  color: var(--muted);
}

#task-form.task-simple-form .task-simple-field > input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 54px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #e0d9d1;
  border-radius: 16px;
  background: #fff;
  box-sizing: border-box;
  font-size: 16px;
}

#task-form.task-simple-form .task-priority-field {
  gap: 8px;
}

#task-form.task-simple-form .entity-priority-control {
  width: 100%;
  min-height: 54px;
  padding: 4px;
  border-radius: 16px;
  box-sizing: border-box;
}

#task-form.task-simple-form .entity-priority-control span {
  min-height: 46px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  font-size: 14px;
}

#task-form.task-simple-form .task-simple-save {
  width: 100%;
  margin-top: 6px;
  min-height: 54px;
}

body.task-form-open .bottom-nav {
  display: none !important;
}

@media (max-width: 390px) {
  .task-form-screen .entity-form-scroll {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.36 — QUIET PREMIUM TASK FORM
   Things/Todoist-inspired task entry in ARVYNO's Smart Balance language.
   Flat hierarchy, generous whitespace, no motion, no nested cards.
   ========================================================= */
.task-form-screen.task-quiet-screen .entity-form-intro {
  display: none !important;
}

.task-form-screen.task-quiet-screen .entity-form-topbar {
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  border-bottom-color: rgba(82, 73, 64, .065) !important;
  background: var(--bg) !important;
}

.task-form-screen.task-quiet-screen .entity-form-top-title {
  font-size: 15px;
  font-weight: 760;
}

.task-form-done {
  min-width: 58px;
  height: 40px;
  padding: 0 2px 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #5d745f;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -.01em;
  text-align: right;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.task-form-done:disabled {
  opacity: .52;
}

.task-form-screen.task-quiet-screen .entity-form-scroll {
  padding: 0 16px calc(
    34px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))
  ) !important;
  background: var(--bg);
}

#task-form.task-quiet-form {
  width: 100%;
  max-width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.task-quiet-title-field {
  width: 100%;
  padding: 34px 0 30px;
  border-bottom: 1px solid rgba(92, 80, 68, .10);
}

.task-quiet-title-field input {
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 42px;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text);
  font: inherit;
  font-size: clamp(25px, 7vw, 31px) !important;
  font-weight: 650;
  line-height: 1.16 !important;
  letter-spacing: -.035em;
  -webkit-appearance: none;
  appearance: none;
}

.task-quiet-title-field input::placeholder {
  color: rgba(83, 76, 69, .36);
  opacity: 1;
}

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

.task-quiet-section {
  width: 100%;
  margin: 0;
  padding: 27px 0 0;
  border: 0;
  background: transparent;
}

.task-quiet-section-label {
  margin: 0 0 8px;
  color: #667866;
  font-size: 11px;
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.task-quiet-row {
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(142px, auto);
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid rgba(92, 80, 68, .10);
  background: transparent;
  cursor: pointer;
}

.task-quiet-row-label {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 570;
  letter-spacing: -.015em;
}

.task-quiet-row-control {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

#task-form.task-quiet-form .task-quiet-row input[type="date"],
#task-form.task-quiet-form .task-quiet-row input[type="time"] {
  width: auto !important;
  max-width: 178px !important;
  min-width: 128px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #6d675f;
  font: inherit;
  font-size: 15px !important;
  font-weight: 580;
  line-height: 1 !important;
  text-align: right !important;
  text-align-last: right !important;
  -webkit-appearance: none;
  appearance: none;
}

#task-form.task-quiet-form .task-quiet-row input[type="date"]::-webkit-date-and-time-value,
#task-form.task-quiet-form .task-quiet-row input[type="time"]::-webkit-date-and-time-value {
  margin: 0;
  text-align: right !important;
}

#task-form.task-quiet-form .task-quiet-row input[type="date"]::-webkit-datetime-edit,
#task-form.task-quiet-form .task-quiet-row input[type="time"]::-webkit-datetime-edit {
  padding: 0;
  text-align: right !important;
}

.task-quiet-priority-section {
  padding-top: 29px;
}

#task-form.task-quiet-form .task-quiet-priority {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 0;
  border-radius: 16px;
  background: rgba(111, 102, 91, .09);
  box-shadow: none;
  box-sizing: border-box;
}

#task-form.task-quiet-form .task-quiet-priority label {
  min-width: 0;
}

#task-form.task-quiet-form .task-quiet-priority span {
  min-height: 44px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #827a71;
  font-size: 14px;
  font-weight: 650;
  box-shadow: none;
}

#task-form.task-quiet-form .task-quiet-priority input:checked + span {
  background: rgba(255,255,255,.94);
  color: #5a715c;
  box-shadow: 0 1px 5px rgba(53, 46, 39, .08);
}

.task-native-submit {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.task-quiet-delete {
  width: 100%;
  margin: 34px 0 0 !important;
}

body.task-form-open .bottom-nav {
  display: none !important;
}

@media (max-width: 390px) {
  .task-form-screen.task-quiet-screen .entity-form-topbar,
  .task-form-screen.task-quiet-screen .entity-form-scroll {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .task-quiet-title-field {
    padding-top: 28px;
    padding-bottom: 25px;
  }

  .task-quiet-row {
    grid-template-columns: minmax(0, 1fr) minmax(124px, auto);
    gap: 12px;
  }

  #task-form.task-quiet-form .task-quiet-row input[type="date"],
  #task-form.task-quiet-form .task-quiet-row input[type="time"] {
    min-width: 116px !important;
    max-width: 156px !important;
  }
}
\n\n/* =========================================================
   ARVYNO 0.9.37 — QUIET PREMIUM POLISH
   Task-only refinement: single navigation layer, lighter date/time rows,
   complete values and tighter vertical rhythm. No motion added.
   ========================================================= */

/* The task editor is its own screen. Hide only ARVYNO's brand bar while it is
   open; Telegram's native controls remain untouched. */
body.task-form-open .topbar {
  display: none !important;
}

/* Once the brand bar is gone, the task header itself owns the Telegram safe
   area so Back / title / Done never sit under native Close/menu controls. */
html.telegram-webapp body.task-form-open .task-form-screen.task-quiet-screen .entity-form-topbar {
  padding-top: calc(10px + var(--arvyno-header-top)) !important;
  padding-bottom: 10px !important;
}

/* Pull the first field closer to the navigation bar. */
.task-form-screen.task-quiet-screen .entity-form-scroll {
  padding-top: 0 !important;
}

.task-quiet-title-field {
  padding-top: 24px !important;
  padding-bottom: 22px !important;
}

.task-quiet-section {
  padding-top: 22px !important;
}

.task-quiet-priority-section {
  padding-top: 24px !important;
}

/* Date/time are rows, not input boxes. Give the value enough room to show the
   complete Russian date and keep the whole row on one calm baseline. */
.task-quiet-row {
  grid-template-columns: minmax(62px, 1fr) minmax(0, 220px) !important;
  gap: 14px !important;
  min-height: 58px;
}

.task-quiet-row-control {
  position: relative;
  width: 100%;
  max-width: 220px;
  justify-self: end;
  overflow: visible;
  padding-right: 18px;
  box-sizing: border-box;
}

.task-quiet-row-control::after {
  content: '›';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-52%);
  color: #8c857d;
  font-size: 27px;
  font-weight: 430;
  line-height: 1;
  pointer-events: none;
}

/* Mobile: keep the real native picker fully tappable but make its wrapper
   visually disappear. Only the formatted value remains visible. */
html.telegram-mobile #task-form.task-quiet-form .task-quiet-row-control .entity-native-picker {
  width: 100% !important;
  max-width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

html.telegram-mobile #task-form.task-quiet-form .task-quiet-row-control .entity-native-picker:focus-within {
  border: 0 !important;
  box-shadow: none !important;
}

html.telegram-mobile #task-form.task-quiet-form .task-quiet-row-control .entity-native-picker-value {
  padding: 0 !important;
  justify-content: flex-end !important;
  color: #6d675f !important;
  font-size: 15px !important;
  font-weight: 580 !important;
  line-height: 1.2 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

html.telegram-mobile #task-form.task-quiet-form .task-quiet-row-control .entity-native-picker-value.is-placeholder {
  color: #aaa49c !important;
}

/* Desktop/web fallback before/without the mobile display wrapper. */
#task-form.task-quiet-form .task-quiet-row input[type="date"],
#task-form.task-quiet-form .task-quiet-row input[type="time"] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: right !important;
  text-align-last: right !important;
}

@media (max-width: 390px) {
  .task-quiet-row {
    grid-template-columns: minmax(54px, 1fr) minmax(0, 202px) !important;
    gap: 12px !important;
  }

  .task-quiet-row-control {
    max-width: 202px;
  }

  html.telegram-mobile #task-form.task-quiet-form .task-quiet-row-control .entity-native-picker-value {
    font-size: 14px !important;
  }

  .task-quiet-title-field {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.38 — TASK EDITOR TOP CHROME FIX
   The task form fully replaces ARVYNO's own header and starts at the top of
   the Telegram Mini App. Only Telegram's native Close/menu safe area remains.
   No animation or sliding behavior is introduced.
   ========================================================= */

/* Remove ARVYNO brand chrome AND its layout height while the task editor is
   open. The direct-child selector prevents unrelated headers from changing. */
html.telegram-webapp body.task-form-open .app-shell > .topbar,
body.task-form-open .app-shell > .topbar {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  flex: 0 0 0 !important;
}

/* With ARVYNO chrome removed, the page owns the entire Mini App viewport. */
html.telegram-webapp body.task-form-open .app-shell {
  padding-top: 0 !important;
}

html.telegram-webapp body.task-form-open .page.entity-form-page-mode {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

html.telegram-mobile body.task-form-open .task-form-screen.task-quiet-screen.entity-form-in-page {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100% !important;
}

/* Paint behind Telegram's native top row, but place ARVYNO controls directly
   below it. --arvyno-header-top is calculated from Telegram safe-area APIs. */
html.telegram-webapp body.task-form-open .task-form-screen.task-quiet-screen .entity-form-topbar {
  margin: 0 !important;
  padding-top: calc(var(--arvyno-header-top) + 8px) !important;
  padding-bottom: 10px !important;
  background: #f6f2ec !important;
  border-top: 0 !important;
}

/* The form content follows the task navigation bar immediately. */
html.telegram-webapp body.task-form-open .task-form-screen.task-quiet-screen .entity-form-scroll {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* =========================================================
   ARVYNO 0.9.39 — TASK PAGE SLIDER
   Native-style horizontal task navigation inspired by the reference video.
   The current ARVYNO screen stays untouched underneath; only the task editor
   slides over it. Edge swipe from the left returns to the previous screen.
   ========================================================= */

html.telegram-webapp body.task-slider-open,
body.task-slider-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

html.telegram-webapp body.task-slider-open .app-shell,
body.task-slider-open .app-shell {
  position: relative !important;
  isolation: isolate;
}

/* The old ARVYNO header and bottom navigation remain in place underneath the
   overlay. They are visible only while the new page is moving, matching the
   reference push/return interaction. */
body.task-slider-open .app-shell > .topbar,
body.task-slider-open .bottom-nav {
  visibility: visible !important;
}

.entity-form-screen.task-slider-screen,
.entity-form-screen.task-slider-screen.visible,
html.telegram-mobile .entity-form-screen.task-slider-screen,
html.telegram-webapp .entity-form-screen.task-slider-screen {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 180 !important;
  overflow: hidden !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: #f6f2ec !important;
  transform: translate3d(100%, 0, 0) !important;
  transition: transform 360ms cubic-bezier(.22,.72,.18,1) !important;
  will-change: transform !important;
  box-shadow: -14px 0 30px rgba(45, 38, 32, .12) !important;
  contain: layout paint style;
  overscroll-behavior-x: none !important;
  touch-action: pan-y;
}

.entity-form-screen.task-slider-screen.task-slider-active,
html.telegram-mobile .entity-form-screen.task-slider-screen.task-slider-active,
html.telegram-webapp .entity-form-screen.task-slider-screen.task-slider-active {
  transform: translate3d(0, 0, 0) !important;
}

.entity-form-screen.task-slider-screen.task-slider-dragging,
html.telegram-mobile .entity-form-screen.task-slider-screen.task-slider-dragging,
html.telegram-webapp .entity-form-screen.task-slider-screen.task-slider-dragging {
  transition: none !important;
  will-change: transform !important;
}

.entity-form-screen.task-slider-screen.task-slider-closing {
  pointer-events: none !important;
}

.entity-form-screen.task-slider-screen .entity-form-panel {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #f6f2ec !important;
  transform: none !important;
}

/* The task page begins directly under Telegram's own native top controls. */
html.telegram-webapp body.task-slider-open .task-slider-screen .entity-form-topbar,
body.task-slider-open .task-slider-screen .entity-form-topbar {
  position: relative !important;
  top: auto !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: calc(var(--arvyno-header-top) + 8px) 16px 10px !important;
  background: #f6f2ec !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(82, 73, 64, .065) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
}

html.telegram-webapp body.task-slider-open .task-slider-screen .entity-form-scroll,
body.task-slider-open .task-slider-screen .entity-form-scroll,
html.telegram-mobile body.task-slider-open .task-slider-screen .entity-form-scroll,
html.telegram-mobile body.task-slider-open .task-slider-screen.entity-keyboard-open .entity-form-scroll,
html.telegram-mobile body.task-slider-open .task-slider-screen.keyboard-runway-ready .entity-form-scroll {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 16px calc(
    34px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))
  ) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
  transform: none !important;
}

/* Keep the Quiet Premium geometry exactly as in 0.9.38. */
body.task-slider-open .task-slider-screen .task-quiet-title-field {
  padding-top: 20px !important;
}

@media (prefers-reduced-motion: reduce) {
  .entity-form-screen.task-slider-screen,
  .entity-form-screen.task-slider-screen.visible {
    transition-duration: 1ms !important;
  }
}

/* =========================================================
   ARVYNO 0.9.40 — UNIVERSAL PAGE SLIDER
   One native-style horizontal navigation model for every form.
   Forms keep the current screen intact underneath, enter from the right,
   return to the right, and support an edge-swipe back gesture on mobile.
   ========================================================= */

html.telegram-webapp body.entity-slider-open,
body.entity-slider-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

html.telegram-webapp body.entity-slider-open .app-shell,
body.entity-slider-open .app-shell {
  position: relative !important;
  isolation: isolate !important;
}

/* Full-page form layer. This intentionally overrides the old 0.9.33 static
   form rules and the earlier in-page mobile implementation. */
.entity-form-screen.entity-slider-screen,
.entity-form-screen.entity-slider-screen.visible,
html.telegram-mobile .entity-form-screen.entity-slider-screen,
html.telegram-webapp .entity-form-screen.entity-slider-screen {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 180 !important;
  overflow: hidden !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: #f6f2ec !important;
  transform: translate3d(100%, 0, 0) !important;
  transition: transform 360ms cubic-bezier(.22,.72,.18,1) !important;
  will-change: transform !important;
  box-shadow: -14px 0 30px rgba(45, 38, 32, .12) !important;
  contain: layout paint style;
  overscroll-behavior-x: none !important;
  touch-action: pan-y;
}

.entity-form-screen.entity-slider-screen.entity-slider-active,
html.telegram-mobile .entity-form-screen.entity-slider-screen.entity-slider-active,
html.telegram-webapp .entity-form-screen.entity-slider-screen.entity-slider-active {
  transform: translate3d(0, 0, 0) !important;
}

.entity-form-screen.entity-slider-screen.entity-slider-dragging,
html.telegram-mobile .entity-form-screen.entity-slider-screen.entity-slider-dragging,
html.telegram-webapp .entity-form-screen.entity-slider-screen.entity-slider-dragging {
  transition: none !important;
  will-change: transform !important;
}

.entity-form-screen.entity-slider-screen.entity-slider-closing {
  pointer-events: none !important;
}

.entity-form-screen.entity-slider-screen .entity-form-panel {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #f6f2ec !important;
  transform: none !important;
}

/* Every form now begins directly below Telegram's native Close/menu row. */
html.telegram-webapp body.entity-slider-open .entity-form-screen.entity-slider-screen .entity-form-topbar,
body.entity-slider-open .entity-form-screen.entity-slider-screen .entity-form-topbar {
  position: relative !important;
  top: auto !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: calc(var(--arvyno-header-top) + 8px) 16px 10px !important;
  background: #f6f2ec !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(82, 73, 64, .065) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
}

html.telegram-webapp body.entity-slider-open .entity-form-screen.entity-slider-screen .entity-form-scroll,
body.entity-slider-open .entity-form-screen.entity-slider-screen .entity-form-scroll,
html.telegram-mobile body.entity-slider-open .entity-form-screen.entity-slider-screen .entity-form-scroll,
html.telegram-mobile body.entity-slider-open .entity-form-screen.entity-slider-screen.entity-keyboard-open .entity-form-scroll,
html.telegram-mobile body.entity-slider-open .entity-form-screen.entity-slider-screen.keyboard-runway-ready .entity-form-scroll {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 18px 16px calc(
    34px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))
  ) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
  transform: none !important;
}

/* Quiet Premium task form already owns its vertical rhythm. */
body.task-slider-open .entity-form-screen.entity-slider-screen.task-quiet-screen .entity-form-scroll {
  padding-top: 0 !important;
}

/* Nested value editors use the exact same page-slider physics. */
.entity-value-screen.entity-slider-screen,
.entity-value-screen.entity-slider-screen.visible {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  z-index: 195 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: #f6f2ec !important;
  transform: translate3d(100%, 0, 0) !important;
  transition: transform 360ms cubic-bezier(.22,.72,.18,1) !important;
  box-shadow: -14px 0 30px rgba(45, 38, 32, .12) !important;
  overflow: hidden !important;
  touch-action: pan-y !important;
}

.entity-value-screen.entity-slider-screen.entity-slider-active {
  transform: translate3d(0, 0, 0) !important;
}

.entity-value-screen.entity-slider-screen.entity-slider-dragging {
  transition: none !important;
}

.entity-value-screen.entity-slider-screen .entity-value-panel {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #f6f2ec !important;
}

.entity-value-screen.entity-slider-screen .entity-value-topbar {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  padding: calc(var(--arvyno-header-top) + 8px) 16px 10px !important;
  background: #f6f2ec !important;
  border-bottom: 1px solid rgba(82, 73, 64, .065) !important;
}

.entity-value-screen.entity-slider-screen .entity-value-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 22px 16px calc(
    28px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))
  ) !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Notification settings now live in the same full-page form system. */
.notification-settings-slider-form {
  width: 100%;
  max-width: 100%;
  display: grid;
  gap: 12px;
}

.notification-settings-slider-form .entity-form-save {
  width: 100%;
  margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .entity-form-screen.entity-slider-screen,
  .entity-value-screen.entity-slider-screen {
    transition-duration: 1ms !important;
  }
}
/* =========================================================
   ARVYNO 0.9.41 — QUIET PREMIUM UNIVERSAL FORMS
   The task editor becomes the design language for every data-entry screen.
   Flat rows, one navigation bar, Done in the top-right, no nested cards.
   Swipe-back physics: drag left -> right; cancelled gesture snaps right -> left.
   ========================================================= */

.quiet-entity-screen .entity-form-intro {
  display: none !important;
}

.quiet-entity-screen .entity-form-topbar {
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  border-bottom: 1px solid rgba(82, 73, 64, .065) !important;
  background: #f6f2ec !important;
}

.quiet-entity-screen .entity-form-top-title {
  font-size: 15px !important;
  font-weight: 760 !important;
  letter-spacing: -.018em !important;
}

.entity-form-done {
  min-width: 58px;
  height: 40px;
  padding: 0 2px 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #5d745f;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -.01em;
  text-align: right;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.entity-form-done:disabled { opacity: .52; }

html.telegram-webapp body.entity-slider-open .quiet-entity-screen.entity-slider-screen .entity-form-scroll,
body.entity-slider-open .quiet-entity-screen.entity-slider-screen .entity-form-scroll,
html.telegram-mobile body.entity-slider-open .quiet-entity-screen.entity-slider-screen .entity-form-scroll,
html.telegram-mobile body.entity-slider-open .quiet-entity-screen.entity-slider-screen.entity-keyboard-open .entity-form-scroll,
html.telegram-mobile body.entity-slider-open .quiet-entity-screen.entity-slider-screen.keyboard-runway-ready .entity-form-scroll {
  padding: 0 16px calc(
    34px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))
  ) !important;
  background: #f6f2ec !important;
}

.quiet-entity-form {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.quiet-entity-native-submit {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Standard setting-like row: label left, value/control right. */
.quiet-entity-form .quiet-entity-field {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 62px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(108px, .82fr) minmax(0, 1.18fr) !important;
  align-items: center !important;
  gap: 16px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92, 80, 68, .10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.quiet-entity-form .quiet-entity-field > span,
.quiet-entity-form .quiet-entity-field > .field-label {
  margin: 0 !important;
  color: var(--text) !important;
  font-size: 15px !important;
  font-weight: 570 !important;
  line-height: 1.2 !important;
  letter-spacing: -.015em !important;
}

.quiet-entity-form .quiet-entity-field input:not([type="radio"]):not([type="checkbox"]),
.quiet-entity-form .quiet-entity-field select,
.quiet-entity-form .quiet-entity-field textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 44px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #6d675f !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 580 !important;
  line-height: 1.25 !important;
  text-align: right !important;
  text-align-last: right !important;
  -webkit-appearance: none;
  appearance: none;
}

.quiet-entity-form .quiet-entity-field input::placeholder,
.quiet-entity-form .quiet-entity-field textarea::placeholder {
  color: #aaa49c !important;
  opacity: 1 !important;
}

/* First title/name is a calm hero field, just like New Task. */
.quiet-entity-form .quiet-entity-primary-field {
  display: block !important;
  min-height: 0 !important;
  padding: 24px 0 22px !important;
}
.quiet-entity-form .quiet-entity-primary-field > span {
  display: block !important;
  margin: 0 0 9px !important;
  color: #667866 !important;
  font-size: 11px !important;
  font-weight: 780 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}
.quiet-entity-form .quiet-entity-primary-field input {
  min-height: 42px !important;
  color: var(--text) !important;
  font-size: clamp(24px, 6.7vw, 30px) !important;
  font-weight: 650 !important;
  line-height: 1.16 !important;
  letter-spacing: -.032em !important;
  text-align: left !important;
  text-align-last: left !important;
}

/* Entity value rows (Goals/Habits) use the same flat hierarchy. */
.quiet-entity-form .quiet-entity-value-row {
  width: 100% !important;
  min-height: 62px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 22px !important;
  align-items: center !important;
  gap: 12px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.quiet-entity-form .quiet-entity-value-row .entity-value-copy {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(102px,.82fr) minmax(0,1.18fr) !important;
  align-items: center !important;
  gap: 16px !important;
}
.quiet-entity-form .quiet-entity-value-row .entity-value-label {
  color: var(--text) !important;
  font-size: 15px !important;
  font-weight: 570 !important;
  letter-spacing: -.015em !important;
}
.quiet-entity-form .quiet-entity-value-row .entity-value-text {
  min-width: 0 !important;
  color: #6d675f !important;
  font-size: 15px !important;
  font-weight: 580 !important;
  text-align: right !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.quiet-entity-form .quiet-entity-value-row .entity-value-text.is-placeholder { color: #aaa49c !important; }
.quiet-entity-form .quiet-entity-value-row .entity-value-chevron { color: #8c857d !important; font-size: 26px !important; }

.quiet-entity-form .quiet-entity-primary-row {
  min-height: 0 !important;
  padding: 24px 0 22px !important;
  grid-template-columns: minmax(0,1fr) 22px !important;
}
.quiet-entity-form .quiet-entity-primary-row .entity-value-copy {
  display: block !important;
}
.quiet-entity-form .quiet-entity-primary-row .entity-value-label {
  display: block !important;
  margin: 0 0 9px !important;
  color: #667866 !important;
  font-size: 11px !important;
  font-weight: 780 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}
.quiet-entity-form .quiet-entity-primary-row .entity-value-text {
  display: block !important;
  color: var(--text) !important;
  font-size: clamp(24px,6.7vw,30px) !important;
  font-weight: 650 !important;
  line-height: 1.16 !important;
  letter-spacing: -.032em !important;
  text-align: left !important;
}
.quiet-entity-form .quiet-entity-primary-row .entity-value-text.is-placeholder { color: rgba(83,76,69,.36) !important; }

/* Amount-only finance forms get the same hero treatment. */
.quiet-entity-form .quiet-entity-amount-primary {
  display: block !important;
  padding: 24px 0 22px !important;
  min-height: 0 !important;
}
.quiet-entity-form .quiet-entity-amount-primary > span {
  display: block !important;
  margin: 0 0 8px !important;
  color: #667866 !important;
  font-size: 11px !important;
  font-weight: 780 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}
.quiet-entity-form .quiet-entity-amount-primary input {
  min-height: 48px !important;
  color: var(--text) !important;
  font-size: clamp(30px,8vw,38px) !important;
  font-weight: 650 !important;
  line-height: 1.05 !important;
  letter-spacing: -.04em !important;
  text-align: left !important;
  text-align-last: left !important;
}

/* Segmented choices stay functional but use the task priority visual language. */
.quiet-entity-form .quiet-entity-field-stacked {
  display: block !important;
  min-height: 0 !important;
  padding: 22px 0 20px !important;
}
.quiet-entity-form .quiet-entity-field-stacked > span,
.quiet-entity-form .quiet-entity-field-stacked > .field-label {
  display: block !important;
  margin: 0 0 10px !important;
  color: #667866 !important;
  font-size: 11px !important;
  font-weight: 780 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}
.quiet-entity-form .segment-control,
.quiet-entity-form .goal-type-selector {
  width: 100% !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 4px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: rgba(111,102,91,.09) !important;
  box-shadow: none !important;
}
.quiet-entity-form .segment-control label span,
.quiet-entity-form .goal-type-selector label span {
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #827a71 !important;
  box-shadow: none !important;
}
.quiet-entity-form .segment-control input:checked + span,
.quiet-entity-form .goal-type-selector input:checked + span {
  background: rgba(255,255,255,.94) !important;
  color: #5a715c !important;
  box-shadow: 0 1px 5px rgba(53,46,39,.08) !important;
}

/* Textareas use a flat full-width writing area, not a nested white card. */
.quiet-entity-form .quiet-entity-field-multiline {
  display: block !important;
  padding: 18px 0 !important;
}
.quiet-entity-form .quiet-entity-field-multiline > span {
  display: block !important;
  margin-bottom: 9px !important;
  color: #667866 !important;
  font-size: 11px !important;
  font-weight: 780 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}
.quiet-entity-form .quiet-entity-field-multiline textarea {
  min-height: 84px !important;
  text-align: left !important;
  text-align-last: left !important;
}

/* Native date/time pickers stay tappable but visually disappear into the row. */
html.telegram-mobile .quiet-entity-form .entity-native-picker {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html.telegram-mobile .quiet-entity-form .entity-native-picker:focus-within {
  border: 0 !important;
  box-shadow: none !important;
}
html.telegram-mobile .quiet-entity-form .entity-native-picker-value {
  padding: 0 !important;
  justify-content: flex-end !important;
  color: #6d675f !important;
  font-size: 15px !important;
  font-weight: 580 !important;
  text-align: right !important;
  white-space: nowrap !important;
}
html.telegram-mobile .quiet-entity-form .entity-native-picker-value.is-placeholder { color: #aaa49c !important; }

/* Complex goal/habit/settings blocks are flattened instead of boxed. */
.quiet-entity-form .quiet-entity-flat-block,
.quiet-entity-form .goal-finance-link-section,
.quiet-entity-form .goal-link-section,
.quiet-entity-form .weekday-field,
.quiet-entity-form .recurring-active-toggle,
.quiet-entity-form .priority-switch,
.quiet-entity-form .settings-toggle,
.quiet-entity-form .settings-zone,
.quiet-entity-form .habit-modal-note {
  width: 100% !important;
  margin: 0 !important;
  padding: 18px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.quiet-entity-form .goal-finance-link-section,
.quiet-entity-form .goal-link-section { margin-top: 0 !important; }

.quiet-entity-form .duration-presets,
.quiet-entity-form .weekday-grid,
.quiet-entity-form .goal-link-grid { margin-top: 10px !important; }

.quiet-entity-form .danger-button,
.quiet-entity-form .danger-link,
.quiet-entity-form .finance-delete-from-modal {
  width: 100% !important;
  margin: 28px 0 0 !important;
  padding: 14px 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Explicit swipe physics overrides: left -> right drag, right -> left snap-back. */
.entity-form-screen.entity-slider-screen.entity-slider-dragging,
.entity-value-screen.entity-slider-screen.entity-slider-dragging {
  transition: none !important;
}
.entity-form-screen.entity-slider-screen:not(.entity-slider-dragging),
.entity-value-screen.entity-slider-screen:not(.entity-slider-dragging) {
  will-change: transform !important;
}

@media (max-width: 390px) {
  .quiet-entity-screen .entity-form-topbar,
  html.telegram-webapp body.entity-slider-open .quiet-entity-screen.entity-slider-screen .entity-form-scroll {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .quiet-entity-form .quiet-entity-field,
  .quiet-entity-form .quiet-entity-value-row .entity-value-copy {
    grid-template-columns: minmax(92px,.76fr) minmax(0,1.24fr) !important;
    gap: 12px !important;
  }
  .quiet-entity-form .quiet-entity-primary-field,
  .quiet-entity-form .quiet-entity-primary-row,
  .quiet-entity-form .quiet-entity-amount-primary {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }
}

/* 0.9.41 — picker affordance and nested value-editor simplification */
.quiet-entity-form .quiet-entity-picker-field {
  position: relative !important;
  padding-right: 20px !important;
}
.quiet-entity-form .quiet-entity-picker-field::after {
  content: '›';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-52%);
  color: #8c857d;
  font-size: 26px;
  font-weight: 430;
  line-height: 1;
  pointer-events: none;
}

.entity-value-screen.entity-slider-screen .entity-value-body {
  padding: 0 16px calc(
    34px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom))
  ) !important;
  background: #f6f2ec !important;
}
.entity-value-screen.entity-slider-screen .entity-value-body > .modal-kicker,
.entity-value-screen.entity-slider-screen .entity-value-body > h1 {
  display: none !important;
}
.entity-value-screen.entity-slider-screen .entity-value-input-wrap {
  width: 100% !important;
  display: block !important;
  margin: 0 !important;
  padding: 24px 0 22px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.entity-value-screen.entity-slider-screen .entity-value-input-wrap input,
.entity-value-screen.entity-slider-screen .entity-value-input-wrap textarea {
  width: 100% !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: clamp(24px,6.7vw,30px) !important;
  font-weight: 650 !important;
  line-height: 1.18 !important;
  letter-spacing: -.032em !important;
  resize: none !important;
}
.entity-value-screen.entity-slider-screen .entity-value-input-wrap input::placeholder,
.entity-value-screen.entity-slider-screen .entity-value-input-wrap textarea::placeholder {
  color: rgba(83,76,69,.36) !important;
}
.entity-value-screen.entity-slider-screen .entity-value-help {
  margin: 22px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.entity-value-screen.entity-slider-screen .entity-value-help-kicker {
  color: #667866 !important;
}
.entity-value-screen.entity-slider-screen .entity-value-help h2 {
  margin-top: 8px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}
.entity-value-screen.entity-slider-screen .entity-value-help p {
  color: #817a72 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}
.entity-value-screen.entity-slider-screen .entity-value-help-examples {
  gap: 8px !important;
}
.entity-value-screen.entity-slider-screen .entity-value-help-examples span {
  border: 0 !important;
  background: rgba(111,102,91,.07) !important;
  box-shadow: none !important;
}


/* =========================================================
   ARVYNO 0.9.42 — HOME-ONLY BRAND + FOCUSED TASK DAY
   Brand chrome remains only on Home. Tasks use one readable day slider,
   a single top-right add action and direct day swipes.
   ========================================================= */

/* The ARVYNO brand row belongs to Home only. Other root pages start directly
   below Telegram's native Close/menu controls. */
body.app-page-no-brand .app-shell > .topbar {
  display: none !important;
}

html.telegram-webapp body.app-page-no-brand .page {
  padding-top: calc(var(--arvyno-header-top) + 14px) !important;
}

/* Tasks page: title + one clear add action. */
.page[data-page="plan"] .tasks-heading.tasks-heading-compact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 2px;
  padding: 0;
}

.tasks-heading-copy {
  min-width: 0;
}

.page[data-page="plan"] .tasks-heading.tasks-heading-compact h1 {
  margin: 4px 0 0;
  font-size: clamp(30px, 8vw, 38px);
  line-height: 1;
  letter-spacing: -.045em;
}

.tasks-page-add {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid rgba(91, 81, 71, .09);
  border-radius: 15px;
  background: rgba(255,255,255,.76);
  color: var(--sage-dark);
  box-shadow: 0 8px 20px rgba(62,52,43,.055);
  font: inherit;
  font-size: 28px;
  font-weight: 420;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.tasks-page-add:active { transform: scale(.97); }
.tasks-page-add:disabled { opacity: .42; }

/* A single readable selected date replaces the dense week strip. The entire
   task card still accepts horizontal day swipes. */
.tasks-date-slider {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 38px;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(143,159,138,.07);
  touch-action: pan-y;
}

.tasks-date-current {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -.015em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tasks-date-arrow {
  width: 38px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  color: var(--sage-dark);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.tasks-date-arrow:active { transform: scale(.97); }

.tasks-card-toolbar-simple {
  justify-content: flex-start;
}

/* Retire legacy add buttons inside the task card. */
.page[data-page="plan"] .tasks-add-button,
.page[data-page="plan"] .tasks-empty-add,
.page[data-page="plan"] .tasks-week-nav,
.page[data-page="plan"] .tasks-week-strip {
  display: none !important;
}

@media (max-width: 390px) {
  .tasks-date-slider { grid-template-columns: 34px minmax(0,1fr) 34px; gap: 5px; }
  .tasks-date-current { font-size: 14px; }
  .tasks-date-arrow { width: 34px; height: 40px; }
  .tasks-page-add { width: 42px; height: 42px; }
}


/* =========================================================
   ARVYNO 0.9.43 — GOALS + HABITS COMPACT COLLECTIONS
   Goals and Habits use the same top-right add affordance as Tasks.
   Habit rows mirror the concise progress language used on Home.
   ========================================================= */

.page[data-page="goals"] .goals-heading.goals-heading-compact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 4px;
  padding: 0;
}

.goals-heading-copy,
.goals-section-copy {
  min-width: 0;
}

.page[data-page="goals"] .goals-heading.goals-heading-compact h1 {
  max-width: 500px;
  margin: 5px 0 8px;
  font-size: clamp(29px, 7.5vw, 38px);
  line-height: 1.02;
  letter-spacing: -.042em;
}

.page[data-page="goals"] .goals-heading.goals-heading-compact p,
.goals-section-heading p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.48;
}

.goals-page-add,
.habits-page-add {
  flex: 0 0 auto;
}

/* Category cards are retired from the main Goals experience. */
.page[data-page="goals"] .goal-type-strip {
  display: none !important;
}

.goals-overview-simple {
  margin-top: 2px;
}

.goals-habits-section {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  scroll-margin-top: 16px;
}

.goals-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px 0;
}

.goals-section-heading h2 {
  margin: 5px 0 5px;
  color: var(--text);
  font-size: clamp(24px, 6.2vw, 30px);
  line-height: 1.04;
  letter-spacing: -.035em;
}

.goals-habits-card-simple {
  padding-top: 6px;
  padding-bottom: 6px;
}

.habit-summary-list {
  display: grid;
  gap: 0;
}

.habit-summary-item {
  width: 100%;
  display: grid;
  gap: 9px;
  padding: 16px 4px 15px;
  border: 0;
  border-bottom: 1px solid rgba(92,80,68,.09);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.habit-summary-item:last-child {
  border-bottom: 0;
}

.habit-summary-item:active {
  opacity: .72;
}

.habit-summary-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.habit-summary-item .habit-title {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.habit-summary-arrow {
  flex: 0 0 auto;
  color: #9a9188;
  font-size: 24px;
  font-weight: 430;
  line-height: 1;
}

.habit-summary-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.habit-summary-progress-head b {
  color: var(--sage-dark);
  font-size: 12px;
}

.habit-summary-progress.progress-track.compact {
  height: 6px;
  margin-top: -1px;
}

.habit-summary-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 14px;
  color: #8e867e;
  font-size: 10px;
  line-height: 1.35;
}

.habit-summary-meta span:last-child {
  text-align: right;
}

.habit-summary-empty {
  padding-top: 24px;
  padding-bottom: 24px;
}

@media (max-width: 390px) {
  .page[data-page="goals"] .goals-heading.goals-heading-compact,
  .goals-section-heading {
    gap: 10px;
  }
  .page[data-page="goals"] .goals-heading.goals-heading-compact h1 {
    font-size: 28px;
  }
  .goals-section-heading h2 {
    font-size: 24px;
  }
  .habit-summary-meta {
    display: grid;
    justify-content: stretch;
  }
  .habit-summary-meta span:last-child {
    text-align: left;
  }
}


/* =========================================================
   ARVYNO 0.9.44 — TASKS QUIET POLISH
   A lighter task card: typography first, fewer containers.
   ========================================================= */

/* Smaller top-right add action so the page title stays dominant. */
.page[data-page="plan"] .tasks-page-add {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  padding-bottom: 1px;
  font-size: 25px;
  box-shadow: 0 5px 14px rgba(62,52,43,.04);
}

/* Calm main card — less floating, slightly tighter corners. */
.page[data-page="plan"] .tasks-day-card {
  padding: 15px 16px 13px;
  border-radius: 22px;
  border-color: rgba(91,81,71,.07);
  box-shadow: 0 9px 28px rgba(62,52,43,.045);
}

/* Date is now part of the card, not a nested capsule. */
.page[data-page="plan"] .tasks-date-slider {
  min-height: 42px;
  grid-template-columns: 28px minmax(0,1fr) 28px;
  gap: 8px;
  margin: 0 0 15px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.page[data-page="plan"] .tasks-date-current {
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -.018em;
}

.page[data-page="plan"] .tasks-date-arrow {
  width: 28px;
  height: 38px;
  padding: 0 0 2px;
  border-radius: 0;
  background: transparent;
  color: var(--sage-dark);
  font-size: 28px;
  font-weight: 480;
}
.page[data-page="plan"] .tasks-date-arrow:active {
  transform: none;
  opacity: .58;
}

/* Summary remains readable but no longer competes with task titles. */
.page[data-page="plan"] .tasks-card-toolbar {
  margin-bottom: 8px;
}
.page[data-page="plan"] .tasks-progress-copy {
  gap: 2px;
}
.page[data-page="plan"] .tasks-progress-copy b {
  font-size: 14px;
  font-weight: 720;
}
.page[data-page="plan"] .tasks-progress-copy span {
  font-size: 10px;
  color: rgba(112,104,96,.76);
}
.page[data-page="plan"] .tasks-day-card .plan-progress {
  height: 4px;
  margin: 2px 0 6px;
  background: rgba(196,190,183,.42);
}

/* Tighter task rows. The chevron is just a navigation hint, not another button. */
.page[data-page="plan"] .plan-task-list .task {
  grid-template-columns: 28px minmax(0,1fr) 20px;
  gap: 10px;
  padding: 9px 0;
  min-height: 54px;
}
.page[data-page="plan"] .plan-task-list .check {
  width: 23px;
  height: 23px;
}
.page[data-page="plan"] .plan-task-list .task-title {
  font-size: 15px;
  line-height: 1.22;
  font-weight: 670;
}
.page[data-page="plan"] .plan-task-list .task-meta {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
}
.page[data-page="plan"] .plan-task-list .task-edit.task-chevron {
  width: 20px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(116,108,100,.72);
  font-size: 24px;
  font-weight: 430;
  line-height: 1;
}
.page[data-page="plan"] .plan-task-list .task-edit.task-chevron:active {
  opacity: .55;
}

/* Completed task is quieter while keeping the green completion signal. */
.page[data-page="plan"] .plan-task-list .task.done .task-title {
  color: #aaa39b;
  text-decoration-color: rgba(142,135,127,.58);
}
.page[data-page="plan"] .plan-task-list .task.done .task-meta {
  color: #aaa39b;
  opacity: .82;
}
.page[data-page="plan"] .plan-task-list .task.done .task-edit.task-chevron {
  color: rgba(145,138,130,.52);
}

@media (max-width: 390px) {
  .page[data-page="plan"] .tasks-page-add { width: 36px; height: 36px; font-size: 24px; }
  .page[data-page="plan"] .tasks-date-slider { grid-template-columns: 26px minmax(0,1fr) 26px; gap: 6px; }
  .page[data-page="plan"] .tasks-date-arrow { width: 26px; }
  .page[data-page="plan"] .tasks-date-current { font-size: 14px; }
}


/* =========================================================
   ARVYNO 0.9.45 — TASKS HEADER + RIGHT SUMMARY
   Remove duplicate page eyebrow and move completion summary
   to the right for a calmer hierarchy.
   ========================================================= */
.page[data-page="plan"] .tasks-heading-copy .section-eyebrow {
  display: none !important;
}

.page[data-page="plan"] .tasks-card-toolbar-simple {
  justify-content: flex-end;
}

.page[data-page="plan"] .tasks-progress-copy {
  justify-items: end;
  text-align: right;
}


/* =========================================================
   ARVYNO 0.9.46 — TASKS HEADER SUMMARY + FLOATING ADD
   Completion moves into the page header; add action floats
   above the Profile tab while the task card stays focused.
   ========================================================= */
.page[data-page="plan"] .tasks-heading.tasks-heading-compact {
  align-items: center;
}

.page[data-page="plan"] .tasks-heading.tasks-heading-compact h1 {
  margin: 0;
}

.page[data-page="plan"] .tasks-heading-summary {
min-width: 0;
  display: grid;
  justify-items: end;
  gap: 2px;
  margin-left: auto;
  padding-top: 2px;
  text-align: right;
  white-space: nowrap;
}

.page[data-page="plan"] .tasks-heading-summary b {
  color: var(--text);
  font-size: 13px;
  font-weight: 730;
  line-height: 1.18;
  letter-spacing: -.012em;
}

.page[data-page="plan"] .tasks-heading-summary span {
  color: rgba(112,104,96,.72);
  font-size: 10px;
  line-height: 1.2;
}

/* The summary no longer occupies space inside the task card. */
.page[data-page="plan"] .tasks-day-card .plan-progress {
  margin-top: 0;
}

/* Add task is a floating page action aligned with the Profile tab center. */
.page[data-page="plan"] .tasks-floating-add {
  position: fixed;
  left: calc(50% + min(40vw, 208px) - 20px);
  right: auto;
  bottom: calc(88px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)));
  z-index: 109;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  padding: 0 0 2px;
  font-size: 27px;
  box-shadow: 0 8px 22px rgba(62,52,43,.075);
}

@media (max-width: 390px) {
  .page[data-page="plan"] .tasks-heading-summary b { font-size: 12px; }
  .page[data-page="plan"] .tasks-heading-summary span { font-size: 9px; }
  .page[data-page="plan"] .tasks-floating-add {
    left: calc(50% + min(40vw, 208px) - 19px);
    width: 38px;
    height: 38px;
    font-size: 25px;
  }
}


/* ARVYNO 0.9.47 — floating add contrast + fixed orientation polish */
.page[data-page="plan"] .tasks-floating-add {
  background: var(--sage-dark);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 9px 24px rgba(85,105,86,.22);
}
.page[data-page="plan"] .tasks-floating-add:active {
  background: var(--sage-dark);
  color: #fff;
}

/* =========================================================
   ARVYNO 0.9.48 — GOALS + HABITS UNIFIED
   Habits live inside the Goals experience; one plus creates
   either a goal or a habit. Task priority is handled in JS.
   ========================================================= */
.page[data-page="goals"] .goals-unified-card {
  padding-top: 12px;
  padding-bottom: 8px;
}

.page[data-page="goals"] .goals-unified-card > .card-title-row {
  margin-bottom: 4px;
}

.goals-unified-list {
  min-width: 0;
  display: grid;
  gap: 0;
}

.goals-unified-list .goals-page-list + .goals-embedded-habits {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(92,80,68,.09);
}

.goals-unified-list .goals-embedded-habits .habit-summary-item:first-child {
  padding-top: 12px;
}

/* Compact anchored chooser opened from the single plus in Goals. */
.goal-add-menu-layer {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: transparent;
}

.goal-add-popover {
  position: fixed;
  width: min(286px, calc(100vw - 28px));
  display: grid;
  gap: 2px;
  padding: 7px;
  border: 1px solid rgba(92,80,68,.10);
  border-radius: 19px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 18px 44px rgba(53,45,38,.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.goal-add-popover > button {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
}

.goal-add-popover > button:active {
  background: rgba(126,148,126,.10);
}

.goal-add-choice-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(126,148,126,.12);
  color: var(--sage-dark);
  font-size: 19px;
  font-weight: 700;
}

.goal-add-popover b,
.goal-add-popover small {
  display: block;
}

.goal-add-popover b {
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -.012em;
}

.goal-add-popover small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}


/* =========================================================
   ARVYNO 0.9.49 — GOALS AS OUTCOMES + EMBEDDED HABITS
   Goals inherit the calm visual system from Tasks. A habit is
   now a progress mode inside a goal, not a sibling section.
   ========================================================= */
.page[data-page="goals"] .goals-task-heading {
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
  margin:0 0 12px; padding:0;
}
.page[data-page="goals"] .goals-task-heading h1 {
  margin:0; font-size:clamp(34px,9vw,42px); line-height:1; letter-spacing:-.05em;
}
.page[data-page="goals"] .goals-heading-summary {
  flex:0 0 auto; text-align:right; padding-bottom:2px;
}
.page[data-page="goals"] .goals-heading-summary b,
.page[data-page="goals"] .goals-heading-summary span { display:block; }
.page[data-page="goals"] .goals-heading-summary b { font-size:13px; color:var(--text); }
.page[data-page="goals"] .goals-heading-summary span { margin-top:2px; font-size:11px; color:var(--muted); }
.page[data-page="goals"] .goals-task-card {
  padding:8px 16px 7px; border-radius:22px;
  border-color:rgba(91,81,71,.07); box-shadow:0 9px 28px rgba(62,52,43,.045);
}
.goals-task-list { display:grid; gap:0; }
.goal-task-row {
  width:100%; min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center;
  gap:14px; padding:15px 0; border:0; border-bottom:1px solid rgba(91,81,71,.10);
  background:transparent; color:var(--text); text-align:left; font:inherit;
}
.goal-task-row:last-child { border-bottom:0; }
.goal-task-main { min-width:0; display:grid; gap:5px; }
.goal-task-title-row { min-width:0; display:flex; align-items:center; gap:7px; }
.goal-task-title-row b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:17px; line-height:1.18; }
.goal-task-title-row i {
  flex:0 0 auto; padding:3px 6px; border-radius:999px; background:rgba(166,105,73,.10);
  color:#a26649; font-size:9px; font-style:normal; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
}
.goal-task-meta { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:12px; }
.goal-task-progress { height:4px; margin-top:2px; }
.goal-task-side { display:flex; align-items:center; gap:8px; color:var(--muted); }
.goal-task-side b { color:var(--sage-dark); font-size:13px; }
.goal-task-side i { font-size:25px; line-height:1; font-style:normal; color:rgba(91,81,71,.48); }
.page[data-page="goals"] .goals-floating-add {
  position:fixed; right:calc(18px + max(env(safe-area-inset-right), 0px));
  bottom:calc(88px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom), var(--arvyno-content-safe-bottom)));
  z-index:116; width:48px; height:48px; border-radius:16px; background:var(--sage-dark); color:#fff;
  border-color:transparent; box-shadow:0 9px 24px rgba(85,105,86,.22); font-size:30px;
}
.page[data-page="goals"] .goals-floating-add:active { background:var(--sage-dark); color:#fff; }

.goal-progress-mode-section { display:grid; gap:10px; margin:4px 0 2px; }
.goal-progress-mode-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.goal-progress-mode-grid label { min-width:0; }
.goal-progress-mode-grid input { position:absolute; opacity:0; pointer-events:none; }
.goal-progress-mode-grid span {
  min-height:74px; display:flex; flex-direction:column; justify-content:center; gap:3px;
  padding:11px 12px; border:1px solid rgba(91,81,71,.10); border-radius:16px;
  background:rgba(255,255,255,.72); transition:none;
}
.goal-progress-mode-grid b { font-size:14px; color:var(--text); }
.goal-progress-mode-grid small { font-size:10px; color:var(--muted); line-height:1.25; }
.goal-progress-mode-grid input:checked + span {
  background:rgba(126,148,126,.12); border-color:rgba(85,105,86,.30); box-shadow:inset 0 0 0 1px rgba(85,105,86,.08);
}
.goal-progress-mode-help { min-height:28px; color:var(--muted); font-size:11px; line-height:1.4; padding-inline:2px; }
.goal-mode-panel { display:grid; gap:10px; }
.goal-mode-panel.hidden { display:none !important; }
.goal-hybrid-note { padding:3px 2px 0; color:var(--muted); font-size:10px; line-height:1.45; }
.goal-habit-panel .weekday-field { margin-top:0; }
.goal-hybrid-form .goal-finance-link-section { margin-top:0; }
.goal-hybrid-form .priority-switch { margin-top:2px; }
@media (max-width:390px) {
  .goal-progress-mode-grid span { min-height:68px; padding:9px 10px; }
  .page[data-page="goals"] .goals-task-card { padding-inline:14px; }
}


/* =========================================================
   ARVYNO 0.9.51 — GOAL HEADER + TASK NOTES
   ========================================================= */
html.telegram-webapp .goal-detail-screen { top: 0 !important; }
html.telegram-webapp .goal-detail-screen .goal-detail-topbar {
  padding-top: calc(var(--arvyno-header-top, 0px) + 8px) !important;
  padding-bottom: 10px !important;
}
.task-quiet-notes-field { width:100%; padding:16px 0 18px; border-bottom:1px solid rgba(92,80,68,.10); }
.task-quiet-notes-field label { display:block; margin:0 0 7px; color:#667866; font-size:11px; font-weight:780; line-height:1.2; letter-spacing:.14em; text-transform:uppercase; }
#task-form.task-quiet-form .task-quiet-notes-field textarea { display:block; width:100%; min-height:62px; max-height:150px; margin:0; padding:0 !important; border:0 !important; border-radius:0 !important; outline:none !important; resize:none; background:transparent !important; box-shadow:none !important; color:var(--text); font:inherit; font-size:16px !important; line-height:1.45; -webkit-appearance:none; appearance:none; }
#task-form.task-quiet-form .task-quiet-notes-field textarea::placeholder { color:rgba(83,76,69,.35); opacity:1; }
\n\n/* =========================================================\n   ARVYNO 0.9.52 — TASK FORM FLAT FIELDS\n   One visual language for title, notes, date, time and priority.\n   ========================================================= */\n#task-form.task-quiet-form .task-quiet-title-field,\n#task-form.task-quiet-form .task-quiet-notes-field {\n  width: 100%;\n  min-height: 62px;\n  margin: 0;\n  padding: 0 !important;\n  display: flex;\n  align-items: center;\n  border-bottom: 1px solid rgba(92,80,68,.10);\n  box-sizing: border-box;\n}\n\n#task-form.task-quiet-form .task-quiet-title-field input {\n  width: 100%;\n  min-height: 62px !important;\n  height: 62px !important;\n  margin: 0;\n  padding: 0 !important;\n  border: 0 !important;\n  border-radius: 0 !important;\n  background: transparent !important;\n  box-shadow: none !important;\n  color: var(--text);\n  font: inherit;\n  font-size: 16px !important;\n  font-weight: 570 !important;\n  line-height: 1.35 !important;\n  letter-spacing: -.015em !important;\n}\n\n#task-form.task-quiet-form .task-quiet-title-field input::placeholder,\n#task-form.task-quiet-form .task-quiet-notes-field textarea::placeholder {\n  color: #777168 !important;\n  opacity: .72 !important;\n}\n\n#task-form.task-quiet-form .task-quiet-notes-field label {\n  display: none !important;\n}\n\n#task-form.task-quiet-form .task-quiet-notes-field textarea {\n  width: 100%;\n  min-height: 62px !important;\n  max-height: 124px !important;\n  margin: 0;\n  padding: 19px 0 17px !important;\n  border: 0 !important;\n  border-radius: 0 !important;\n  outline: none !important;\n  resize: none;\n  overflow-y: auto;\n  background: transparent !important;\n  box-shadow: none !important;\n  color: var(--text);\n  font: inherit;\n  font-size: 16px !important;\n  font-weight: 500 !important;\n  line-height: 1.45 !important;\n  box-sizing: border-box;\n}\n\n#task-form.task-quiet-form .task-quiet-fields {\n  width: 100%;\n  margin: 0;\n  padding: 0;\n}\n\n#task-form.task-quiet-form .task-quiet-row {\n  min-height: 62px !important;\n}\n\n#task-form.task-quiet-form .task-quiet-row-label {\n  color: var(--text) !important;\n  font-size: 16px !important;\n  font-weight: 570 !important;\n}\n\n#task-form.task-quiet-form .task-quiet-select-control select {\n  display: block;\n  width: 100%;\n  min-width: 0;\n  max-width: 100%;\n  height: 44px;\n  margin: 0;\n  padding: 0 2px 0 0;\n  border: 0;\n  border-radius: 0;\n  outline: none;\n  background: transparent;\n  box-shadow: none;\n  color: #6d675f;\n  font: inherit;\n  font-size: 15px;\n  font-weight: 580;\n  line-height: 1;\n  text-align: right;\n  text-align-last: right;\n  direction: rtl;\n  -webkit-appearance: none;\n  appearance: none;\n  cursor: pointer;\n}\n\n#task-form.task-quiet-form .task-quiet-select-control select option {\n  direction: ltr;\n}\n\n/* The old section labels/segmented priority control are intentionally gone. */\n#task-form.task-quiet-form .task-quiet-section-label,\n#task-form.task-quiet-form .task-quiet-priority {\n  display: none !important;\n}\n\nbody.task-slider-open .task-slider-screen .task-quiet-title-field {\n  padding-top: 0 !important;\n}\n

/* =========================================================
   ARVYNO 0.9.53 — TASK TITLE + PRIORITY POLISH
   Title matches Notes. Priority visually matches Date / Time,
   while the native selector remains fully tappable.
   ========================================================= */
#task-form.task-quiet-form .task-quiet-title-field {
  width: 100%;
  min-height: 62px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  box-sizing: border-box !important;
}

#task-form.task-quiet-form .task-quiet-title-field input {
  width: 100% !important;
  height: 62px !important;
  min-height: 62px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#task-form.task-quiet-form .task-quiet-title-field input::placeholder,
#task-form.task-quiet-form .task-quiet-notes-field textarea::placeholder {
  color: #777168 !important;
  opacity: .72 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
}

#task-form.task-quiet-form .task-quiet-priority-control {
  position: relative !important;
  width: 100% !important;
  max-width: 220px !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding-right: 18px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

#task-form.task-quiet-form .task-priority-display {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  color: #6d675f !important;
  font-size: 15px !important;
  font-weight: 580 !important;
  line-height: 1.2 !important;
  text-align: right !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

#task-form.task-quiet-form .task-priority-native {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  cursor: pointer !important;
}

#task-form.task-quiet-form .task-quiet-priority-row:focus-within .task-priority-display {
  color: var(--sage-dark) !important;
}

@media (max-width: 390px) {
  #task-form.task-quiet-form .task-quiet-priority-control {
    max-width: 190px !important;
  }
}

/* =========================================================
   ARVYNO 0.9.54 — TASK FORM ALIGNMENT
   Compact, equal-height fields and tighter top rhythm.
   ========================================================= */
.task-form-screen.task-quiet-screen .entity-form-scroll {
  padding-top: 0 !important;
}

#task-form.task-quiet-form {
  margin-top: -14px !important;
}

#task-form.task-quiet-form .task-quiet-title-field,
#task-form.task-quiet-form .task-quiet-notes-field,
#task-form.task-quiet-form .task-quiet-row {
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  box-sizing: border-box !important;
}

#task-form.task-quiet-form .task-quiet-title-field input {
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  font-size: 16px !important;
  font-weight: 570 !important;
  line-height: 1.35 !important;
}

#task-form.task-quiet-form .task-quiet-notes-field textarea {
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  padding: 18px 0 16px !important;
  overflow: hidden !important;
  font-size: 16px !important;
  font-weight: 570 !important;
  line-height: 1.35 !important;
}

#task-form.task-quiet-form .task-quiet-title-field input::placeholder,
#task-form.task-quiet-form .task-quiet-notes-field textarea::placeholder {
  font-size: 16px !important;
  font-weight: 570 !important;
}

/* =========================================================
   ARVYNO 0.9.55 — TASK FORM FINAL ALIGNMENT
   Vertically centered title/notes and minimal back arrow.
   ========================================================= */
#task-form.task-quiet-form .task-quiet-title-field input {
  padding: 0 !important;
  line-height: 58px !important;
  vertical-align: middle !important;
}

#task-form.task-quiet-form .task-quiet-notes-field textarea {
  padding: 18px 0 !important;
  line-height: 22px !important;
  vertical-align: middle !important;
}

.task-form-screen.task-quiet-screen .entity-form-topbar .tracker-icon-button {
  width: 32px !important;
  height: 40px !important;
  min-width: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font-size: 30px !important;
  font-weight: 430 !important;
  line-height: 1 !important;
  -webkit-tap-highlight-color: transparent !important;
}

.task-form-screen.task-quiet-screen .entity-form-topbar .tracker-icon-button:active {
  opacity: .55;
  transform: none !important;
}

/* =========================================================
   ARVYNO 0.9.57 — TASK FORM GROUPED SCHEDULE
   Based strictly on 0.9.55. Title is slightly stronger than Notes;
   Date / Time / Priority live in one calm grouped card.
   ========================================================= */
#task-form.task-quiet-form .task-quiet-title-field input,
#task-form.task-quiet-form .task-quiet-title-field input::placeholder {
  font-size: 30px !important;
  font-weight: 600 !important;
  letter-spacing: -.025em !important;
}

#task-form.task-quiet-form .task-quiet-notes-field textarea,
#task-form.task-quiet-form .task-quiet-notes-field textarea::placeholder {
  font-size: 16px !important;
  font-weight: 500 !important;
  letter-spacing: -.01em !important;
}

#task-form.task-quiet-form .task-quiet-fields {
  width: 100% !important;
  margin: 22px 0 0 !important;
  padding: 0 18px !important;
  border: 1px solid rgba(105, 94, 83, .055) !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, .82) !important;
  box-shadow: 0 8px 28px rgba(54, 47, 40, .045) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#task-form.task-quiet-form .task-quiet-fields .task-quiet-row {
  width: 100% !important;
  min-height: 60px !important;
  height: 60px !important;
  max-height: 60px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(92, 80, 68, .10) !important;
  background: transparent !important;
  box-shadow: none !important;
}

#task-form.task-quiet-form .task-quiet-fields .task-quiet-row:last-child,
#task-form.task-quiet-form .task-quiet-fields .task-quiet-row-last {
  border-bottom: 0 !important;
}

#task-form.task-quiet-form .task-quiet-fields .task-quiet-row-label {
  font-size: 16px !important;
  font-weight: 560 !important;
}

#task-form.task-quiet-form .task-quiet-fields .task-quiet-row-control,
#task-form.task-quiet-form .task-quiet-fields .task-priority-display,
html.telegram-mobile #task-form.task-quiet-form .task-quiet-fields .entity-native-picker-value {
  font-size: 15px !important;
  font-weight: 560 !important;
}

@media (max-width: 390px) {
  #task-form.task-quiet-form .task-quiet-fields {
    margin-top: 18px !important;
    padding-inline: 16px !important;
    border-radius: 20px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.58 — TASK TITLE SCALE
   Keep the 0.9.57 grouped form; restore the larger title scale.
   ========================================================= */

/* =========================================================
   ARVYNO 0.9.59 — TASK TITLE DIVIDER FIX
   Keep the large title, but give it enough vertical room so
   the text never collides with the bottom divider on iOS.
   ========================================================= */
#task-form.task-quiet-form .task-quiet-title-field {
  height: 78px !important;
  min-height: 78px !important;
  max-height: 78px !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

#task-form.task-quiet-form .task-quiet-title-field input,
#task-form.task-quiet-form .task-quiet-title-field input::placeholder {
  font-size: 30px !important;
  font-weight: 600 !important;
  letter-spacing: -.025em !important;
}

#task-form.task-quiet-form .task-quiet-title-field input {
  display: block !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.15 !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* =========================================================
   ARVYNO 0.9.60 — TASK TITLE BASELINE FIX
   Keep the large title, but anchor it near the divider with
   the same visual bottom spacing as Notes.
   ========================================================= */
#task-form.task-quiet-form .task-quiet-title-field {
  align-items: flex-end !important;
}

#task-form.task-quiet-form .task-quiet-title-field input {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  line-height: 52px !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: none !important;
}

/* =========================================================
   ARVYNO 0.9.61 — TASK TITLE OPTICAL BASELINE
   Keep the large title, but place its glyphs close to the
   divider with the same visual bottom gap as Notes.
   ========================================================= */
#task-form.task-quiet-form .task-quiet-title-field {
  height: 78px !important;
  min-height: 78px !important;
  max-height: 78px !important;
  display: flex !important;
  align-items: flex-end !important;
  padding: 0 !important;
}

#task-form.task-quiet-form .task-quiet-title-field input {
  display: block !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  margin: 0 0 6px 0 !important;
  padding: 0 !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  line-height: 38px !important;
  letter-spacing: -.025em !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#task-form.task-quiet-form .task-quiet-title-field input::placeholder {
  font-size: 30px !important;
  font-weight: 600 !important;
  line-height: 38px !important;
  letter-spacing: -.025em !important;
}

/* =========================================================
   ARVYNO 0.9.62 — TASK FORM LANGUAGE FOR ALL FORMS
   The finished New Task editor is now the visual system for
   Goals, Finance, recurring payments, accounts, debts,
   savings, habits and notification settings.
   ========================================================= */

/* Same clean navigation: bare back arrow + title + Done. */
.quiet-entity-screen .entity-form-topbar .tracker-icon-button {
  width: 36px !important;
  min-width: 36px !important;
  height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #201f1d !important;
  font-size: 34px !important;
  font-weight: 430 !important;
  line-height: 1 !important;
}
.quiet-entity-screen .entity-form-topbar .tracker-icon-button:active {
  opacity: .55 !important;
  transform: none !important;
}

.quiet-entity-form.quiet-task-standard-form {
  padding-top: 42px !important;
}

/* Primary title/name: same hierarchy as New Task. */
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-primary-field {
  min-height: 82px !important;
  height: 82px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: flex-end !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
}
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-primary-field > span,
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-primary-field > .field-label {
  display: none !important;
}
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-primary-field input {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 0 7px !important;
  padding: 0 !important;
  color: var(--text) !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  line-height: 40px !important;
  letter-spacing: -.025em !important;
  text-align: left !important;
  text-align-last: left !important;
}
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-primary-field input::placeholder {
  color: rgba(83,76,69,.43) !important;
  opacity: 1 !important;
}

/* Value-row titles used by Goal/Habit get the same large title treatment. */
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-primary-row {
  min-height: 82px !important;
  height: 82px !important;
  padding: 0 22px 7px 0 !important;
  display: grid !important;
  align-items: end !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
}
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-primary-row .entity-value-label {
  display: none !important;
}
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-primary-row .entity-value-text {
  min-height: 40px !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  line-height: 40px !important;
  letter-spacing: -.025em !important;
  color: var(--text) !important;
}
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-primary-row .entity-value-text.is-placeholder {
  color: rgba(83,76,69,.43) !important;
}

/* Amount forms keep the strong number, but use the same flat top area. */
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-amount-primary {
  min-height: 94px !important;
  padding: 16px 0 10px !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
}
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-amount-primary > span {
  margin: 0 0 3px !important;
  color: #8f8981 !important;
  font-size: 13px !important;
  font-weight: 560 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.quiet-task-standard-form .quiet-task-primary-block.quiet-entity-amount-primary input {
  font-size: 32px !important;
  line-height: 1.08 !important;
}

/* One grouped white settings card, matching Date / Time / Priority. */
.quiet-task-standard-form .quiet-task-fields-card {
  width: 100% !important;
  margin: 22px 0 0 !important;
  padding: 0 18px !important;
  border: 1px solid rgba(105,94,83,.055) !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.82) !important;
  box-shadow: 0 8px 28px rgba(54,47,40,.045) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Reset all old standalone-card treatments inside the shared card. */
.quiet-task-standard-form .quiet-task-fields-card > *,
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-flat-block,
.quiet-task-standard-form .quiet-task-fields-card .goal-finance-link-section,
.quiet-task-standard-form .quiet-task-fields-card .goal-link-section,
.quiet-task-standard-form .quiet-task-fields-card .weekday-field,
.quiet-task-standard-form .quiet-task-fields-card .recurring-active-toggle,
.quiet-task-standard-form .quiet-task-fields-card .priority-switch,
.quiet-task-standard-form .quiet-task-fields-card .settings-toggle,
.quiet-task-standard-form .quiet-task-fields-card .settings-zone,
.quiet-task-standard-form .quiet-task-fields-card .habit-modal-note,
.quiet-task-standard-form .quiet-task-fields-card .goal-progress-mode-section,
.quiet-task-standard-form .quiet-task-fields-card .goal-mode-panel {
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.quiet-task-standard-form .quiet-task-fields-card > .quiet-entity-field,
.quiet-task-standard-form .quiet-task-fields-card > .quiet-entity-value-row,
.quiet-task-standard-form .quiet-task-fields-card > .quiet-entity-flat-block,
.quiet-task-standard-form .quiet-task-fields-card > .recurring-active-toggle,
.quiet-task-standard-form .quiet-task-fields-card > .priority-switch,
.quiet-task-standard-form .quiet-task-fields-card > .settings-toggle,
.quiet-task-standard-form .quiet-task-fields-card > .settings-zone,
.quiet-task-standard-form .quiet-task-fields-card > .weekday-field,
.quiet-task-standard-form .quiet-task-fields-card > .habit-modal-note {
  min-height: 60px !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
}

/* Plain setting rows exactly mirror task rows. */
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field {
  min-height: 60px !important;
  padding: 0 !important;
  grid-template-columns: minmax(118px,.86fr) minmax(0,1.14fr) !important;
  gap: 14px !important;
}
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field > span,
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field > .field-label,
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-value-label {
  color: var(--text) !important;
  font-size: 16px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  letter-spacing: -.015em !important;
  text-transform: none !important;
}
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field input:not([type="radio"]):not([type="checkbox"]),
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field select,
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-value-text,
html.telegram-mobile .quiet-task-standard-form .quiet-task-fields-card .entity-native-picker-value {
  color: #6d675f !important;
  font-size: 15px !important;
  font-weight: 560 !important;
}

/* Multiline/comment fields are still part of the card, not nested cards. */
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field-multiline {
  padding: 14px 0 !important;
}
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field-multiline textarea {
  min-height: 68px !important;
  padding: 6px 0 !important;
  text-align: left !important;
}

/* Choice blocks live inside the same white card and lose uppercase section labels. */
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field-stacked,
.quiet-task-standard-form .quiet-task-fields-card .goal-progress-mode-section,
.quiet-task-standard-form .quiet-task-fields-card .goal-mode-panel,
.quiet-task-standard-form .quiet-task-fields-card .goal-finance-link-section,
.quiet-task-standard-form .quiet-task-fields-card .weekday-field {
  padding: 16px 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
}
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field-stacked > span,
.quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field-stacked > .field-label {
  margin-bottom: 10px !important;
  color: var(--text) !important;
  font-size: 15px !important;
  font-weight: 560 !important;
  letter-spacing: -.01em !important;
  text-transform: none !important;
}

/* Hide obsolete inline submit buttons; Done in the navigation bar is the action. */
.quiet-task-standard-form .modal-save,
.quiet-task-standard-form .entity-form-save {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

/* No divider after the last visible block. */
.quiet-task-standard-form .quiet-task-fields-card > .quiet-task-card-last,
.quiet-task-standard-form .quiet-task-fields-card > :last-child {
  border-bottom: 0 !important;
}

@media (max-width: 390px) {
  .quiet-entity-form.quiet-task-standard-form { padding-top: 36px !important; }
  .quiet-task-standard-form .quiet-task-fields-card {
    margin-top: 18px !important;
    padding-inline: 16px !important;
    border-radius: 20px !important;
  }
  .quiet-task-standard-form .quiet-task-fields-card .quiet-entity-field {
    grid-template-columns: minmax(102px,.80fr) minmax(0,1.20fr) !important;
    gap: 12px !important;
  }
}

/* =========================================================
   ARVYNO 0.9.63 — HOME COMPACT ACTIONS + CENTERED BRAND
   Home keeps three core blocks only: Tasks, Finance, Goals.
   Section titles navigate to their pages; compact plus buttons reuse the
   visual language of the Tasks floating add action.
   ========================================================= */

/* Home brand: remove the right-side action and center the logo + wordmark as
   one visual group. Non-home pages are still hidden by app-page-no-brand. */
.app-shell > .topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}
.app-shell > .topbar .brand-copy {
  flex: 0 0 auto;
  min-width: 0;
  text-align: left;
}

/* Unified home section header. */
.page[data-page="today"] .today-section-header {
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}
.page[data-page="today"] .today-section-heading-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.page[data-page="today"] .today-section-header > h2,
.page[data-page="today"] .today-section-heading-copy > h2 {
  min-width: 0;
  margin: 0;
}

/* The section name itself is the navigation affordance. Keep it looking like
   normal typography while giving it a comfortable invisible tap target. */
.page[data-page="today"] .today-section-title {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: -5px 0 -5px -6px;
  padding: 5px 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.page[data-page="today"] .today-section-title:active {
  opacity: .58;
}

/* Exact visual family of the Tasks plus, moved into each home block header. */
.page[data-page="today"] .today-section-add {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin: -3px 0 0;
  padding: 0 0 2px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--sage-dark);
  color: #fff;
  box-shadow: 0 9px 24px rgba(85,105,86,.22);
  font: inherit;
  font-size: 27px;
  font-weight: 420;
  line-height: 1;
}
.page[data-page="today"] .today-section-add:active {
  transform: scale(.97);
  background: var(--sage-dark);
  color: #fff;
}
.page[data-page="today"] .today-section-add:disabled {
  opacity: .42;
}

/* Old large CTAs are retired on Home in 0.9.63. */
.page[data-page="today"] .today-add-task,
.page[data-page="today"] .today-add-operation,
.page[data-page="today"] .today-habits-card {
  display: none !important;
}

@media (max-width: 390px) {
  .page[data-page="today"] .today-section-add {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    font-size: 25px;
  }
}


/* =========================================================
   ARVYNO 0.9.64 — HOME BRAND + COMPACT ACTIONS
   Matches the first approved visualization:
   - topbar contains only a larger centered ARVYNO wordmark;
   - no logo tile and no “больше, чем планы” caption;
   - Home add actions are compact filled sage squares with a white plus.
   ========================================================= */

/* Home wordmark: one centered element, no secondary chrome. */
.app-shell > .topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}

.app-shell > .topbar .brand-copy.brand-copy-solo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  width: auto !important;
  text-align: center !important;
}

.app-shell > .topbar .brand-copy.brand-copy-solo .brand-name {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--text) !important;
  font-size: 28px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  letter-spacing: .22em !important;
  text-align: center !important;
  white-space: nowrap !important;
}
/* Safety: old brand pieces must never reserve layout space. */
.app-shell > .topbar .brand-mark,
.app-shell > .topbar .brand-caption {
  display: none !important;
}

/* First-visualization action style: small, filled, calm, and consistent. */
.page[data-page="today"] .today-section-add {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  flex: 0 0 42px !important;
  margin: -2px 0 0 !important;
  padding: 0 0 2px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: var(--sage-dark) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(85,105,86,.16) !important;
  font-size: 27px !important;
  font-weight: 420 !important;
  line-height: 1 !important;
}

.page[data-page="today"] .today-section-add:active {
  transform: scale(.97) !important;
  background: var(--sage-dark) !important;
  color: #fff !important;
}

@media (max-width: 390px) {
  .app-shell > .topbar .brand-copy.brand-copy-solo .brand-name {
    font-size: 27px !important;
    letter-spacing: .21em !important;
  }

  .page[data-page="today"] .today-section-add {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    flex-basis: 40px !important;
    border-radius: 13px !important;
    font-size: 26px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.65 — HOME MICRO ADD BUTTONS
   Visually smaller than 0.9.64 while keeping a comfortable tap zone.
   ========================================================= */

.page[data-page="today"] .today-section-add {
  position: relative !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  flex: 0 0 34px !important;
  margin: 0 !important;
  padding: 0 0 1px !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 10px rgba(85,105,86,.13) !important;
  font-size: 22px !important;
  font-weight: 430 !important;
  line-height: 1 !important;
}

/* Invisible expansion keeps the control easy to tap without making it look big. */
.page[data-page="today"] .today-section-add::after {
  content: "";
  position: absolute;
  inset: -5px;
}

@media (max-width: 390px) {
  .page[data-page="today"] .today-section-add {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    flex-basis: 32px !important;
    border-radius: 10px !important;
    font-size: 21px !important;
  }

  .page[data-page="today"] .today-section-add::after {
    inset: -6px;
  }
}


/* =========================================================
   ARVYNO 0.9.66 — SCROLLING HOME WORDMARK
   ARVYNO is now part of the Home scroll content instead of fixed shell chrome.
   ========================================================= */

/* The legacy shell header is no longer used. Keeping it in HTML preserves
   compatibility with older JS/CSS selectors, but it reserves no space. */
.app-shell > .topbar {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

/* The wordmark lives inside .page, so it naturally scrolls with every Home card. */
.page[data-page="today"] .home-scroll-brand {
  width: 100%;
  margin: 0 0 3px;
  padding: calc(var(--arvyno-header-top) + 5px) 0 8px;
  color: var(--text);
  font-size: 28px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .22em;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 390px) {
  .page[data-page="today"] .home-scroll-brand {
    font-size: 27px;
    letter-spacing: .21em;
    padding-top: calc(var(--arvyno-header-top) + 4px);
  }
}


/* =========================================================
   ARVYNO 0.9.67 — HOME COPY + ALIGNMENT POLISH
   ========================================================= */

/* The greeting now starts cleanly with no "Главная · дата" eyebrow above it. */
.page[data-page="today"] .today-hero-copy > h1:first-child {
  margin-top: 0 !important;
}

/* Empty Tasks copy: both lines share exactly the same left edge.
   Base .empty-text uses auto horizontal margins, which visually shifted
   the second line to the right inside the text column. */
.page[data-page="today"] .today-task-empty > div:last-child {
  min-width: 0;
  text-align: left !important;
}

.page[data-page="today"] .today-task-empty .empty-title,
.page[data-page="today"] .today-task-empty .empty-text {
  width: 100%;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  text-align: left !important;
}

.page[data-page="today"] .today-task-empty .empty-text {
  margin-top: 3px !important;
}

/* Finance heading no longer has a date subtitle, so keep the title vertically
   centered against the compact + action. */
.page[data-page="today"] .today-finance-card .today-section-heading-copy {
  display: flex;
  align-items: center;
  min-height: 34px;
}

/* With the chevron removed, the balance amount occupies the true right edge,
   aligned with the right-hand action column above. */
.page[data-page="today"] .today-net-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  padding-right: 0 !important;
}

.page[data-page="today"] .today-net-row b {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

/* Legacy chevron safety in case older markup is temporarily cached. */
.page[data-page="today"] .today-net-row em {
  display: none !important;
}


/* =========================================================
   ARVYNO 0.9.68 — FIXED HOME WORDMARK / SCROLL-UNDER HEADER
   Keeps ARVYNO visually between Telegram's native left/right controls.
   Home content scrolls underneath a calm cream/blur header layer.
   ========================================================= */

.page[data-page="today"] .home-scroll-brand {
  position: sticky !important;
  top: 12px !important;
  z-index: 88 !important;
  align-self: start !important;

  /* Extend the header surface across the whole Mini App width, including
     the Home page's horizontal padding. */
  width: calc(100% + 32px) !important;
  max-width: none !important;
  margin-left: -16px !important;
  margin-right: -16px !important;
  margin-bottom: 3px !important;

  /* Preserve the exact vertical placement already approved in v0.9.67. */
  padding:
    calc(var(--arvyno-header-top) + 5px)
    16px
    12px !important;

  background: rgba(246, 242, 236, .965) !important;
  backdrop-filter: blur(18px) saturate(1.04) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.04) !important;

  color: var(--text) !important;
  font-size: 28px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  letter-spacing: .22em !important;
  text-align: center !important;
  white-space: nowrap !important;

  /* Soft separation only when page content moves underneath. */
  box-shadow: 0 10px 22px rgba(54, 48, 42, .025) !important;
  isolation: isolate;
}

/* Cover the Home page's 12px top padding too, so text/cards cannot peek
   above the sticky cream layer while scrolling. */
.page[data-page="today"] .home-scroll-brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: -12px;
  height: 13px;
  background: rgba(246, 242, 236, .985);
  pointer-events: none;
}

/* Gentle fade at the lower edge makes cards disappear under the header
   rather than meeting a hard horizontal cut. */
.page[data-page="today"] .home-scroll-brand::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 12px;
  background: linear-gradient(
    to bottom,
    rgba(246, 242, 236, .94),
    rgba(246, 242, 236, 0)
  );
  pointer-events: none;
}

@media (max-width: 390px) {
  .page[data-page="today"] .home-scroll-brand {
    font-size: 27px !important;
    letter-spacing: .21em !important;
    padding-top: calc(var(--arvyno-header-top) + 4px) !important;
  }
}

/* Desktop/web fallback: keep the same behavior but without relying on
   Telegram-specific safe-area values. */
html:not(.telegram-webapp) .page[data-page="today"] .home-scroll-brand {
  top: 0 !important;
  padding-top: 14px !important;
}


/* =========================================================
   ARVYNO 0.9.69 — NATIVE-ROW CENTERED WORDMARK
   ARVYNO now sits visually in the same horizontal row as Telegram's
   native Close / menu controls, centered between them.
   ========================================================= */

/* Reserve normal content space below Telegram's native control row.
   The fixed wordmark itself no longer participates in page layout. */
html.telegram-webapp .page[data-page="today"] {
  padding-top: calc(var(--arvyno-header-top) + 18px) !important;
}

/* Fixed cream header surface. It spans the native control row and a small
   amount below it so cards/text glide underneath a clean background. */
html.telegram-webapp .page[data-page="today"] .home-scroll-brand {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 88 !important;

  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  height: calc(var(--arvyno-header-top) + 10px) !important;

  margin: 0 !important;
  padding:
    var(--arvyno-safe-top)
    112px
    0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: rgba(246, 242, 236, .975) !important;
  backdrop-filter: blur(18px) saturate(1.03) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.03) !important;

  color: var(--text) !important;
  font-size: 26px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  letter-spacing: .22em !important;
  text-align: center !important;
  white-space: nowrap !important;

  box-shadow: none !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Remove the previous top-cover helper from 0.9.68. */
html.telegram-webapp .page[data-page="today"] .home-scroll-brand::before {
  content: none !important;
}

/* Soft fade where content disappears under the fixed top surface. */
html.telegram-webapp .page[data-page="today"] .home-scroll-brand::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -14px !important;
  height: 14px !important;
  background: linear-gradient(
    to bottom,
    rgba(246, 242, 236, .975),
    rgba(246, 242, 236, 0)
  ) !important;
  pointer-events: none !important;
}

/* The native Telegram buttons need more room on narrower iPhones.
   Keep ARVYNO centered while reducing only its typography slightly. */
@media (max-width: 390px) {
  html.telegram-webapp .page[data-page="today"] .home-scroll-brand {
    padding-left: 108px !important;
    padding-right: 108px !important;
    font-size: 24px !important;
    letter-spacing: .20em !important;
  }
}

/* Non-Telegram fallback: normal fixed app header at the top. */
html:not(.telegram-webapp) .page[data-page="today"] {
  padding-top: 68px !important;
}

html:not(.telegram-webapp) .page[data-page="today"] .home-scroll-brand {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 56px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(246, 242, 236, .975) !important;
  z-index: 88 !important;
}


/* =========================================================
   ARVYNO 0.9.70 — FOCUS SIGNATURE WORDMARK
   Custom geometric vector lettering based on the selected brand direction.
   ========================================================= */

html.telegram-webapp .page[data-page="today"] .home-scroll-brand {
  color: #26382f !important;
  font-size: 0 !important;
  letter-spacing: 0 !important;
}

.home-brand-wordmark {
  display: block;
  width: 176px;
  height: auto;
  max-width: 100%;
  overflow: visible;
  color: inherit;
  shape-rendering: geometricPrecision;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.34));
}

/* Slight optical compensation: the vector is visually wider than text,
   so reduce it on smaller iPhones while keeping the native-row centering. */
@media (max-width: 390px) {
  .home-brand-wordmark {
    width: 160px;
  }
}

@media (max-width: 360px) {
  .home-brand-wordmark {
    width: 148px;
  }
}

/* Desktop/web preview fallback. */
html:not(.telegram-webapp) .home-brand-wordmark {
  width: 180px;
}


/* =========================================================
   ARVYNO 0.9.71 — BOLD GEOMETRIC SIGNATURE
   Matches the selected wide geometric ARVYNO reference.
   ========================================================= */
.home-brand-wordmark {
  width: 190px !important;
  max-width: 100% !important;
  height: auto !important;
  color: #26382f !important;
  filter: none !important;
  shape-rendering: geometricPrecision;
}

@media (max-width: 390px) {
  .home-brand-wordmark { width: 174px !important; }
}

@media (max-width: 360px) {
  .home-brand-wordmark { width: 162px !important; }
}


/* =========================================================
   ARVYNO 0.9.72 — NEW GOAL = NEW TASK
   Goal creation/editing now uses the exact same quiet premium
   form language as the finished New Task screen.
   ========================================================= */

.goal-task-form-screen .entity-form-scroll {
  padding-top: 0 !important;
}

#goal-form.goal-task-form {
  margin-top: -14px !important;
}

/* Primary title — same geometry as New Task. */
#goal-form.goal-task-form .task-quiet-title-field {
  height: 78px !important;
  min-height: 78px !important;
  max-height: 78px !important;
  display: flex !important;
  align-items: flex-end !important;
  padding: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  box-sizing: border-box !important;
}

#goal-form.goal-task-form .task-quiet-title-field input,
#goal-form.goal-task-form .task-quiet-title-field input::placeholder {
  font-size: 30px !important;
  font-weight: 600 !important;
  line-height: 38px !important;
  letter-spacing: -.025em !important;
}

#goal-form.goal-task-form .task-quiet-title-field input {
  display: block !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#goal-form.goal-task-form .task-quiet-title-field input::placeholder {
  color: rgba(83,76,69,.43) !important;
  opacity: 1 !important;
}

/* Grouped cards — same size, radius and material as Date / Time / Priority. */
#goal-form.goal-task-form .task-quiet-fields {
  width: 100% !important;
  margin: 22px 0 0 !important;
  padding: 0 18px !important;
  border: 1px solid rgba(105,94,83,.055) !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.82) !important;
  box-shadow: 0 8px 28px rgba(54,47,40,.045) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#goal-form.goal-task-form .goal-task-mode-card {
  margin-top: 12px !important;
}

#goal-form.goal-task-form .task-quiet-row {
  width: 100% !important;
  min-height: 60px !important;
  height: 60px !important;
  max-height: 60px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(78px,1fr) minmax(0,220px) !important;
  align-items: center !important;
  gap: 14px !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  background: transparent !important;
  box-shadow: none !important;
}

#goal-form.goal-task-form .task-quiet-row-last,
#goal-form.goal-task-form .task-quiet-fields > .task-quiet-row:last-child {
  border-bottom: 0 !important;
}

#goal-form.goal-task-form .task-quiet-row-label {
  color: var(--text) !important;
  font-size: 16px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  letter-spacing: -.015em !important;
}

#goal-form.goal-task-form .task-quiet-row-control {
  position: relative !important;
  width: 100% !important;
  max-width: 220px !important;
  min-width: 0 !important;
  justify-self: end !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 5px !important;
  padding-right: 18px !important;
  box-sizing: border-box !important;
}

/* Keep the same subtle disclosure chevron as task pickers. */
#goal-form.goal-task-form .task-quiet-row-control::after {
  content: '›';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-52%);
  color: #8c857d;
  font-size: 27px;
  font-weight: 430;
  line-height: 1;
  pointer-events: none;
}

#goal-form.goal-task-form .goal-task-select,
#goal-form.goal-task-form .goal-task-input,
#goal-form.goal-task-form .task-quiet-row input[type="date"] {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #6d675f !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  text-align: right !important;
  text-align-last: right !important;
}

#goal-form.goal-task-form .goal-task-select {
  direction: rtl;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#goal-form.goal-task-form .goal-task-select option {
  direction: ltr;
}

#goal-form.goal-task-form .goal-task-input {
  -webkit-appearance: none !important;
  appearance: none !important;
}

#goal-form.goal-task-form .goal-task-input::placeholder {
  color: #aaa49c !important;
  opacity: 1 !important;
}

#goal-form.goal-task-form .goal-task-wide-input {
  font-size: 14px !important;
}

#goal-form.goal-task-form .goal-task-input-suffix {
  flex: 0 0 auto;
  margin-left: 2px;
  color: #8f8981;
  font-size: 13px;
  font-weight: 560;
}

/* Telegram mobile date picker presentation, matching New Task. */
html.telegram-mobile #goal-form.goal-task-form .task-quiet-row-control .entity-native-picker {
  width: 100% !important;
  max-width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

html.telegram-mobile #goal-form.goal-task-form .task-quiet-row-control .entity-native-picker-value {
  padding: 0 !important;
  justify-content: flex-end !important;
  color: #6d675f !important;
  font-size: 15px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

html.telegram-mobile #goal-form.goal-task-form .task-quiet-row-control .entity-native-picker-value.is-placeholder {
  color: #aaa49c !important;
}

/* Weekday chooser stays inside the same calm card. */
#goal-form.goal-task-form .goal-task-weekdays {
  padding: 14px 0 15px !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
}

#goal-form.goal-task-form .goal-task-weekdays-label {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -.01em;
}

#goal-form.goal-task-form .goal-task-weekdays .weekday-grid {
  gap: 6px !important;
}

#goal-form.goal-task-form .goal-task-weekdays .weekday-chip span {
  min-height: 34px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

/* Hidden dynamic rows must collapse completely. */
#goal-form.goal-task-form .hidden {
  display: none !important;
}

/* Done in the top navigation is the only primary save action. */
.goal-task-form-screen .task-form-done {
  color: #5a715c !important;
}

/* Same minimal back arrow as New Task. */
.goal-task-form-screen.task-quiet-screen .entity-form-topbar .tracker-icon-button {
  width: 32px !important;
  height: 40px !important;
  min-width: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font-size: 30px !important;
  font-weight: 430 !important;
  line-height: 1 !important;
}

/* When goal editor is open it behaves like the native task slider. */
body.task-slider-open .goal-task-form-screen .task-quiet-title-field {
  padding-top: 0 !important;
}

@media (max-width: 390px) {
  #goal-form.goal-task-form .task-quiet-fields {
    margin-top: 18px !important;
    padding-inline: 16px !important;
    border-radius: 20px !important;
  }

  #goal-form.goal-task-form .goal-task-mode-card {
    margin-top: 10px !important;
  }

  #goal-form.goal-task-form .task-quiet-row {
    grid-template-columns: minmax(72px,1fr) minmax(0,202px) !important;
    gap: 12px !important;
  }

  #goal-form.goal-task-form .task-quiet-row-control {
    max-width: 202px !important;
  }

  #goal-form.goal-task-form .goal-task-wide-input {
    font-size: 13px !important;
  }

  html.telegram-mobile #goal-form.goal-task-form .task-quiet-row-control .entity-native-picker-value {
    font-size: 14px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.73 — GOAL FORM FIELDS
   Description + type + start date + duration + regularity.
   ========================================================= */

#goal-form.goal-task-form .goal-description-field {
  min-height: 68px !important;
}

#goal-form.goal-task-form .goal-description-field textarea {
  min-height: 54px !important;
  max-height: 110px !important;
}

/* Weekday chooser is part of the same settings card. */
#goal-form.goal-task-form .goal-task-weekdays {
  padding: 13px 0 15px !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
}

#goal-form.goal-task-form .goal-task-weekdays-label {
  margin-bottom: 10px !important;
}

#goal-form.goal-task-form .goal-task-weekdays .weekday-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

#goal-form.goal-task-form .goal-task-weekdays .weekday-chip {
  min-width: 0 !important;
}

#goal-form.goal-task-form .goal-task-weekdays .weekday-chip span {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 34px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 10px !important;
  font-size: 11px !important;
}

/* Custom duration stays visually identical to the other picker rows. */
#goal-form.goal-task-form [data-goal-custom-duration-row] .goal-task-input {
  text-align: right !important;
}

@media (max-width: 390px) {
  #goal-form.goal-task-form .goal-task-weekdays .weekday-grid {
    gap: 4px !important;
  }

  #goal-form.goal-task-form .goal-task-weekdays .weekday-chip span {
    min-height: 32px !important;
    font-size: 10.5px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.74 — GOAL FORM POLISH
   Exact Task-style description + clean custom duration +
   multi-select weekday list.
   ========================================================= */

/* DESCRIPTION: exactly the same flat row treatment as New Task / Notes. */
#goal-form.goal-task-form .task-quiet-notes-field,
#goal-form.goal-task-form .goal-description-field {
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#goal-form.goal-task-form .task-quiet-notes-field label,
#goal-form.goal-task-form .goal-description-field label {
  display: none !important;
}

#goal-form.goal-task-form .task-quiet-notes-field textarea,
#goal-form.goal-task-form .goal-description-field textarea {
  display: block !important;
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  margin: 0 !important;
  padding: 18px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  resize: none !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 22px !important;
  letter-spacing: -.01em !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#goal-form.goal-task-form .task-quiet-notes-field textarea::placeholder,
#goal-form.goal-task-form .goal-description-field textarea::placeholder {
  color: #777168 !important;
  opacity: .72 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
}

/* Custom duration is just the number — no suffix and no disclosure arrow. */
#goal-form.goal-task-form [data-goal-custom-duration-row] .task-quiet-row-control {
  padding-right: 0 !important;
}
#goal-form.goal-task-form [data-goal-custom-duration-row] .task-quiet-row-control::after {
  display: none !important;
}
#goal-form.goal-task-form [data-goal-custom-duration-row] .goal-task-input {
  padding-right: 0 !important;
}

/* Weekday selector looks like the other select rows. */
#goal-form.goal-task-form .goal-weekday-picker-row {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 100% !important;
  color: inherit !important;
  text-align: left !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  cursor: pointer;
}

#goal-form.goal-task-form .goal-weekday-summary {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #6d675f;
  font-size: 15px;
  font-weight: 560;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bottom multi-select sheet. */
.goal-weekday-sheet {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  align-items: end;
  pointer-events: auto;
}

.goal-weekday-sheet.hidden {
  display: none !important;
}

.goal-weekday-sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(27,31,28,.20);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.goal-weekday-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(78vh, 620px);
  margin: 0 auto;
  padding: 10px 16px calc(16px + max(env(safe-area-inset-bottom), var(--arvyno-safe-bottom, 0px)));
  overflow-y: auto;
  border-radius: 26px 26px 0 0;
  background: #f6f2ec;
  box-shadow: 0 -18px 54px rgba(41,35,30,.16);
}

.goal-weekday-sheet-panel::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 99px;
  background: rgba(75,68,61,.18);
}

.goal-weekday-sheet-header {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(92,80,68,.10);
}

.goal-weekday-sheet-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.goal-weekday-sheet-header button {
  border: 0;
  padding: 8px 0 8px 12px;
  background: transparent;
  color: #5a715c;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
}
.goal-weekday-sheet-list {
  display: grid;
}

.goal-weekday-option {
  position: relative;
  min-height: 54px;
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(92,80,68,.085);
  cursor: pointer;
}

.goal-weekday-option:last-child {
  border-bottom: 0;
}

.goal-weekday-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.goal-weekday-option span {
  color: var(--text);
  font-size: 16px;
  font-weight: 520;
  letter-spacing: -.01em;
}

.goal-weekday-option b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(87,104,87,.24);
  border-radius: 8px;
  color: transparent;
  background: rgba(255,255,255,.55);
  font-size: 14px;
  font-weight: 800;
  transition: .14s ease;
}

.goal-weekday-option input:checked ~ b {
  border-color: #6f846e;
  background: #6f846e;
  color: white;
}

body.goal-weekday-sheet-open {
  overflow: hidden !important;
}


/* =========================================================
   ARVYNO 0.9.75 — GOAL DESCRIPTION + WEEKDAY POPOVER
   ========================================================= */

/* Description is now literally the same flat field geometry as Task / Notes. */
#goal-form.task-quiet-form .task-quiet-notes-field {
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#goal-form.task-quiet-form .task-quiet-notes-field textarea {
  display: block !important;
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  margin: 0 !important;
  padding: 18px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  resize: none !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 22px !important;
  letter-spacing: -.01em !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#goal-form.task-quiet-form .task-quiet-notes-field textarea::placeholder {
  color: #777168 !important;
  opacity: .72 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  letter-spacing: -.01em !important;
}

/* Remove every old bottom-sheet weekday surface from layout. */
.goal-weekday-sheet,
.goal-weekday-sheet-panel,
.goal-weekday-sheet-backdrop {
  display: none !important;
}

/* iOS-style floating multi-select list, visually matching the duration menu. */
.goal-weekday-menu-layer {
  position: fixed;
  inset: 0;
  z-index: 420;
  pointer-events: auto;
}

.goal-weekday-menu-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.goal-weekday-menu {
  position: fixed;
  z-index: 1;
  padding: 10px 0;
  overflow: hidden;
  border: 1px solid rgba(120,112,103,.10);
  border-radius: 24px;
  background: rgba(255,255,255,.97);
  box-shadow:
    0 18px 46px rgba(49,43,38,.16),
    0 2px 8px rgba(49,43,38,.06);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
  transform-origin: center;
  animation: goalWeekdayMenuIn 120ms ease-out both;
}

@keyframes goalWeekdayMenuIn {
  from { opacity: 0; transform: scale(.975); }
  to   { opacity: 1; transform: scale(1); }
}

.goal-weekday-menu-option {
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 20px 0 18px;
  display: grid;
  grid-template-columns: 26px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #151515;
  text-align: left;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}

.goal-weekday-menu-option:active {
  background: rgba(110,104,96,.08);
}

.goal-weekday-menu-check {
  width: 24px;
  display: block;
  color: #111;
  font-size: 19px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
}

.goal-weekday-menu-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-weekday-menu-option:not(.is-selected) .goal-weekday-menu-check {
  color: transparent;
}

body.goal-weekday-menu-open {
  overflow: hidden !important;
}

/* Keep the weekday row itself identical to the other value selectors. */
#goal-form.goal-task-form .goal-weekday-picker-row {
  position: relative;
}

#goal-form.goal-task-form .goal-weekday-summary {
  color: #6d675f !important;
  font-size: 15px !important;
  font-weight: 560 !important;
}

/* Old special description class is intentionally neutralized if cached markup appears. */
#goal-form.goal-task-form .goal-description-field {
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
}


/* =========================================================
   ARVYNO 0.9.76 — EXACT GOAL/TASK RHYTHM + NATIVE-LIKE MENU MOTION
   ========================================================= */

/* Critical fix:
   Task form is display:block, while Goal was still inheriting
   .task-form/.entity-form-content grid gaps. That gap caused Description
   to float far above its divider. Make Goal use the exact Task flow. */
#goal-form.goal-task-form {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  gap: 0 !important;
  row-gap: 0 !important;
  column-gap: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* Exact Notes geometry copied from the current New Task form. */
#goal-form.goal-task-form .task-quiet-notes-field {
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#goal-form.goal-task-form .task-quiet-notes-field textarea {
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  margin: 0 !important;
  padding: 18px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  resize: none !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 22px !important;
  letter-spacing: -.01em !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#goal-form.goal-task-form .task-quiet-notes-field textarea::placeholder {
  color: #777168 !important;
  opacity: .72 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 22px !important;
  letter-spacing: -.01em !important;
}

/* Keep the same 22px separation from Description divider to the settings card. */
#goal-form.goal-task-form .goal-task-core-fields {
  margin-top: 22px !important;
}

/* ---------------------------------------------------------
   Animated "Дни недели" row when Regularity changes.
   No display:none: height/opacity/transform transition instead.
   --------------------------------------------------------- */
#goal-form.goal-task-form .goal-weekday-picker-row {
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  border-bottom-color: transparent !important;
  transform: translateY(-7px) scale(.985);
  transform-origin: top center;
  pointer-events: none !important;
  transition:
    height 240ms cubic-bezier(.22,.8,.2,1),
    min-height 240ms cubic-bezier(.22,.8,.2,1),
    max-height 240ms cubic-bezier(.22,.8,.2,1),
    opacity 160ms ease,
    transform 240ms cubic-bezier(.22,.8,.2,1),
    border-color 160ms ease !important;
}

#goal-form.goal-task-form .goal-weekday-picker-row.is-visible {
  height: 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
  opacity: 1 !important;
  border-bottom-color: rgba(92,80,68,.10) !important;
  transform: translateY(0) scale(1);
  pointer-events: auto !important;
}

/* ---------------------------------------------------------
   Weekday menu: mimic the iOS duration popup.
   Initial state is intentionally NOT visible. JS adds is-open
   two animation frames later so Telegram WebView always paints
   the scale/fade transition instead of jumping to final state.
   --------------------------------------------------------- */
.goal-weekday-menu-layer {
  position: fixed;
  inset: 0;
  z-index: 420;
  pointer-events: auto;
}

.goal-weekday-menu-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  background: rgba(24,22,20,.025);
  transition: opacity 220ms ease;
}

.goal-weekday-menu {
  position: fixed;
  z-index: 1;
  padding: 10px 0;
  overflow: hidden;
  border: 1px solid rgba(120,112,103,.09);
  border-radius: 24px;
  background: rgba(255,255,255,.975);
  box-shadow:
    0 18px 46px rgba(49,43,38,.16),
    0 2px 8px rgba(49,43,38,.055);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);

  opacity: 0;
  transform:
    translate3d(0, 3px, 0)
    scale(.84);
  transform-origin:
    var(--goal-menu-origin-x, 50%)
    var(--goal-menu-origin-y, 50%);
  filter: blur(.7px);
  will-change: transform, opacity, filter;

  transition:
    transform 260ms cubic-bezier(.16,.88,.24,1.12),
    opacity 145ms ease-out,
    filter 180ms ease-out;
}

.goal-weekday-menu-layer.is-open .goal-weekday-menu {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
  filter: blur(0);
}

.goal-weekday-menu-layer.is-open .goal-weekday-menu-backdrop {
  opacity: 1;
}

/* Reverse animation on close instead of immediate DOM removal. */
.goal-weekday-menu-layer.is-closing .goal-weekday-menu {
  opacity: 0;
  transform: translate3d(0, 2px, 0) scale(.90);
  filter: blur(.45px);
  transition:
    transform 210ms cubic-bezier(.4,0,.6,1),
    opacity 150ms ease-in,
    filter 150ms ease-in;
}

.goal-weekday-menu-layer.is-closing .goal-weekday-menu-backdrop {
  opacity: 0;
  transition: opacity 170ms ease-in;
}

/* Selected rows keep the same clean iOS menu treatment. */
.goal-weekday-menu-option {
  transition: background 120ms ease;
}

.goal-weekday-menu-option.is-selected {
  background: rgba(112,128,110,.035);
}

/* Reduce motion only when the OS explicitly asks for it. */
@media (prefers-reduced-motion: reduce) {
  #goal-form.goal-task-form .goal-weekday-picker-row,
  .goal-weekday-menu,
  .goal-weekday-menu-backdrop {
    transition-duration: 1ms !important;
  }
}


/* =========================================================
   ARVYNO 0.9.77 — FINANCE PREMIUM HIERARCHY
   Balance first, then money flow, then operations.
   ========================================================= */

.page[data-page="finance"] {
  gap: 11px !important;
}

/* Clean page title: one clear label, no redundant eyebrow/subtitle. */
.page[data-page="finance"] .finance-heading {
  padding: 0 0 2px !important;
  margin: 0 !important;
}

.page[data-page="finance"] .finance-heading > h1 {
  margin: 0 0 14px !important;
  font-size: clamp(36px, 9vw, 46px) !important;
  line-height: 1 !important;
  letter-spacing: -.045em !important;
  font-weight: 760 !important;
}

/* Period + date become one quieter, tighter control card. */
.page[data-page="finance"] .finance-period-panel {
  padding: 11px 12px 12px !important;
  border: 1px solid rgba(91,81,71,.07) !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.77) !important;
  box-shadow: 0 8px 26px rgba(62,52,43,.04) !important;
}

.page[data-page="finance"] .finance-period-control {
  width: 100% !important;
  margin: 0 !important;
  padding: 3px !important;
  gap: 3px !important;
  border-radius: 13px !important;
  background: rgba(143,159,138,.065) !important;
  border-color: rgba(91,102,91,.055) !important;
}

.page[data-page="finance"] .finance-period-control button {
  min-height: 34px !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 690 !important;
}

.page[data-page="finance"] .finance-period-control button.active {
  box-shadow: 0 3px 10px rgba(67,75,68,.055) !important;
}

.page[data-page="finance"] .finance-date-switch {
  width: 100% !important;
  min-height: 42px !important;
  margin: 8px 0 0 !important;
  padding-top: 7px !important;
  grid-template-columns: 28px minmax(0,1fr) 28px !important;
  gap: 8px !important;
  border-top: 1px solid rgba(91,81,71,.07) !important;
}

.page[data-page="finance"] .finance-date-switch button {
  width: 28px !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--sage-dark) !important;
  font-size: 27px !important;
  font-weight: 430 !important;
}

.page[data-page="finance"] .finance-date-switch button:active {
  opacity: .55 !important;
}

.page[data-page="finance"] .finance-date-switch b {
  font-size: 14px !important;
  font-weight: 710 !important;
  letter-spacing: -.015em !important;
}

/* Balance remains the visual anchor, but is lower and more refined. */
.page[data-page="finance"] .finance-balance-card {
  margin-top: 2px !important;
  padding: 19px 20px 18px !important;
  border-radius: 24px !important;
  box-shadow: 0 16px 36px rgba(64,82,69,.13) !important;
}

.page[data-page="finance"] .finance-balance-label {
  font-size: 10px !important;
  letter-spacing: .10em !important;
  opacity: .70 !important;
}

.page[data-page="finance"] .finance-balance-value {
  margin-top: 7px !important;
  font-size: clamp(32px, 8.2vw, 40px) !important;
  font-weight: 710 !important;
  letter-spacing: -.042em !important;
  font-variant-numeric: tabular-nums !important;
}

.page[data-page="finance"] .finance-balance-sub {
  margin-top: 8px !important;
  font-size: 10.5px !important;
  line-height: 1.35 !important;
  opacity: .76 !important;
}

/* Quick actions are intentionally lighter than the amount. */
.page[data-page="finance"] .finance-actions {
  gap: 7px !important;
  margin-top: 15px !important;
}

.page[data-page="finance"] .finance-actions button {
  min-height: 38px !important;
  padding: 7px 6px !important;
  border-color: rgba(255,255,255,.19) !important;
  border-radius: 13px !important;
  background: rgba(255,255,255,.075) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
  font-size: 10px !important;
  font-weight: 680 !important;
}

/* Income / Expenses sit close to the balance and stay secondary. */
.page[data-page="finance"] .finance-metrics {
  gap: 9px !important;
  margin-top: 0 !important;
}

.page[data-page="finance"] .finance-metrics .metric {
  min-height: 86px !important;
  padding: 13px 14px !important;
  border-radius: 19px !important;
  background: rgba(255,255,255,.72) !important;
  border-color: rgba(91,81,71,.075) !important;
  box-shadow: 0 7px 22px rgba(62,52,43,.028) !important;
}

.page[data-page="finance"] .finance-metrics .metric-label {
  font-size: 11px !important;
}

.page[data-page="finance"] .finance-metrics .metric-value {
  margin-top: 5px !important;
  font-size: 22px !important;
  line-height: 1.05 !important;
  font-weight: 720 !important;
  letter-spacing: -.03em !important;
  font-variant-numeric: tabular-nums !important;
}

/* Pull Operations closer to the money-summary cards. */
.page[data-page="finance"] .finance-operations-card {
  margin-top: -1px !important;
}

/* Consistent section headers and compact add actions. */
.page[data-page="finance"] .finance-section-title-row {
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 4px !important;
}

.page[data-page="finance"] .finance-section-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
}

.page[data-page="finance"] .finance-compact-add {
  position: relative !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  flex: 0 0 34px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 0 1px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--sage-dark) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(85,105,86,.13) !important;
  font: inherit !important;
  font-size: 22px !important;
  font-weight: 430 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.page[data-page="finance"] .finance-compact-add::after {
  content: "";
  position: absolute;
  inset: -5px;
}

.page[data-page="finance"] .finance-compact-add:active {
  transform: scale(.96) !important;
}

.page[data-page="finance"] .finance-section-actions .card-link {
  padding: 0 !important;
  font-size: 10px !important;
  white-space: nowrap !important;
}

/* Empty operation state no longer has a second CTA. */
.page[data-page="finance"] .finance-operations-empty {
  min-height: 54px !important;
  padding: 14px 0 4px !important;
  justify-content: flex-start !important;
}

/* Tighter vertical rhythm across finance cards. */
.page[data-page="finance"] > .card {
  margin-top: 0 !important;
}

.page[data-page="finance"] .finance-operations-card,
.page[data-page="finance"] .finance-recurring-card {
  padding-top: 16px !important;
  padding-bottom: 14px !important;
}

.page[data-page="finance"] .finance-recurring-card .card-title-row {
  align-items: center !important;
}

/* Slightly lighter section subtitles so headings win. */
.page[data-page="finance"] .card-subtitle {
  margin-top: 3px !important;
  font-size: 10.5px !important;
  line-height: 1.35 !important;
}

/* Prevent the old large '+ Добавить' treatment from reappearing here. */
.page[data-page="finance"] .finance-recurring-card > .card-title-row > .card-link {
  display: none !important;
}

@media (max-width: 390px) {
  .page[data-page="finance"] {
    gap: 10px !important;
  }

  .page[data-page="finance"] .finance-heading > h1 {
    margin-bottom: 12px !important;
    font-size: 38px !important;
  }

  .page[data-page="finance"] .finance-period-panel {
    padding: 9px 10px 10px !important;
    border-radius: 20px !important;
  }

  .page[data-page="finance"] .finance-period-control button {
    min-height: 32px !important;
    font-size: 11.5px !important;
  }

  .page[data-page="finance"] .finance-date-switch {
    min-height: 40px !important;
  }

  .page[data-page="finance"] .finance-balance-card {
    padding: 18px 18px 17px !important;
  }

  .page[data-page="finance"] .finance-actions button {
    min-height: 36px !important;
    font-size: 9.7px !important;
  }

  .page[data-page="finance"] .finance-metrics .metric {
    min-height: 82px !important;
    padding: 12px 13px !important;
  }

  .page[data-page="finance"] .finance-compact-add {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    flex-basis: 32px !important;
    font-size: 21px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.78 — FINANCE REFINED / CLEARLY VISIBLE UPDATE
   Stronger spacing, lighter hierarchy, calmer control surfaces.
   ========================================================= */

.page[data-page="finance"] {
  gap: 8px !important;
}

/* Header */
.page[data-page="finance"] .finance-heading {
  padding: 0 !important;
}

.page[data-page="finance"] .finance-heading > h1 {
  margin: 0 0 10px !important;
  font-size: 40px !important;
  line-height: 1 !important;
  letter-spacing: -.045em !important;
  font-weight: 760 !important;
}

/* Compact period card */
.page[data-page="finance"] .finance-period-panel {
  padding: 8px 10px 9px !important;
  border-radius: 19px !important;
  background: rgba(255,255,255,.68) !important;
  border: 1px solid rgba(93,82,72,.06) !important;
  box-shadow: 0 5px 18px rgba(59,49,41,.025) !important;
}

.page[data-page="finance"] .finance-period-control {
  padding: 2px !important;
  gap: 2px !important;
  border-radius: 12px !important;
  background: rgba(117,137,115,.06) !important;
}

.page[data-page="finance"] .finance-period-control button {
  min-height: 31px !important;
  padding: 4px 7px !important;
  border-radius: 9px !important;
  font-size: 11.5px !important;
  font-weight: 680 !important;
}

.page[data-page="finance"] .finance-period-control button.active {
  background: rgba(255,255,255,.92) !important;
  box-shadow: 0 2px 7px rgba(54,62,55,.05) !important;
}

.page[data-page="finance"] .finance-date-switch {
  min-height: 36px !important;
  margin: 5px 0 0 !important;
  padding-top: 5px !important;
  grid-template-columns: 24px minmax(0,1fr) 24px !important;
  gap: 5px !important;
}

.page[data-page="finance"] .finance-date-switch button {
  width: 24px !important;
  height: 28px !important;
  font-size: 23px !important;
  color: #607260 !important;
}

.page[data-page="finance"] .finance-date-switch b {
  font-size: 13.2px !important;
  font-weight: 690 !important;
}

/* Balance card: visibly lower and cleaner */
.page[data-page="finance"] .finance-balance-card {
  margin-top: 0 !important;
  padding: 16px 18px 15px !important;
  border-radius: 22px !important;
  background: linear-gradient(135deg, #5c735f 0%, #8fa08b 100%) !important;
  box-shadow: 0 12px 28px rgba(64,82,69,.10) !important;
}

.page[data-page="finance"] .finance-balance-label {
  font-size: 9.5px !important;
  letter-spacing: .11em !important;
}

.page[data-page="finance"] .finance-balance-value {
  margin-top: 5px !important;
  font-size: 34px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: -.04em !important;
}

.page[data-page="finance"] .finance-balance-sub {
  margin-top: 6px !important;
  font-size: 10px !important;
  opacity: .74 !important;
}

.page[data-page="finance"] .finance-actions {
  gap: 6px !important;
  margin-top: 12px !important;
}

.page[data-page="finance"] .finance-actions button {
  min-height: 33px !important;
  padding: 5px 5px !important;
  border-radius: 11px !important;
  border-color: rgba(255,255,255,.16) !important;
  background: rgba(255,255,255,.055) !important;
  font-size: 9.5px !important;
  font-weight: 650 !important;
}

/* Income / Expenses: significantly tighter */
.page[data-page="finance"] .finance-metrics {
  gap: 8px !important;
}

.page[data-page="finance"] .finance-metrics .metric {
  min-height: 72px !important;
  padding: 11px 12px !important;
  border-radius: 17px !important;
  background: rgba(255,255,255,.68) !important;
  border: 1px solid rgba(92,81,72,.065) !important;
  box-shadow: none !important;
}

.page[data-page="finance"] .finance-metrics .metric-label {
  font-size: 10.5px !important;
}

.page[data-page="finance"] .finance-metrics .metric-value {
  margin-top: 4px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
}

/* Main finance cards */
.page[data-page="finance"] .finance-operations-card,
.page[data-page="finance"] .finance-recurring-card {
  border-radius: 21px !important;
  padding: 14px 15px 13px !important;
  box-shadow: 0 6px 18px rgba(62,52,43,.025) !important;
}

.page[data-page="finance"] .finance-operations-card {
  margin-top: 0 !important;
}

.page[data-page="finance"] .finance-section-title-row {
  margin-bottom: 2px !important;
}

.page[data-page="finance"] .finance-section-title-row h2 {
  font-size: 18px !important;
  letter-spacing: -.025em !important;
}

.page[data-page="finance"] .finance-section-title-row .card-subtitle {
  font-size: 9.8px !important;
  margin-top: 2px !important;
}

/* Compact plus: unmistakably visible and consistent */
.page[data-page="finance"] .finance-compact-add {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  flex-basis: 30px !important;
  border-radius: 9px !important;
  font-size: 20px !important;
  box-shadow: 0 3px 8px rgba(85,105,86,.11) !important;
}

/* Operation rows slightly tighter */
.page[data-page="finance"] .finance-operations-card .transaction-row {
  min-height: 52px !important;
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}

/* Recurring rows tighter too */
.page[data-page="finance"] .recurring-payment-row {
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}

/* Secondary finance cards visually recede */
.page[data-page="finance"] > .card:not(.finance-operations-card):not(.finance-recurring-card) {
  border-radius: 20px !important;
  box-shadow: 0 5px 16px rgba(62,52,43,.02) !important;
}

/* Slightly tighter global card spacing only on Finance */
.page[data-page="finance"] > section + section {
  margin-top: 0 !important;
}

@media (max-width: 390px) {
  .page[data-page="finance"] .finance-heading > h1 {
    font-size: 38px !important;
  }

  .page[data-page="finance"] .finance-period-panel {
    padding: 7px 9px 8px !important;
    border-radius: 18px !important;
  }

  .page[data-page="finance"] .finance-period-control button {
    min-height: 30px !important;
    font-size: 11px !important;
  }

  .page[data-page="finance"] .finance-balance-card {
    padding: 15px 16px 14px !important;
  }

  .page[data-page="finance"] .finance-balance-value {
    font-size: 32px !important;
  }

  .page[data-page="finance"] .finance-actions button {
    min-height: 32px !important;
    font-size: 9.2px !important;
  }

  .page[data-page="finance"] .finance-metrics .metric {
    min-height: 68px !important;
    padding: 10px 11px !important;
  }

  .page[data-page="finance"] .finance-compact-add {
    width: 29px !important;
    height: 29px !important;
    min-width: 29px !important;
    min-height: 29px !important;
    flex-basis: 29px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.79 — FINANCE LOWER-HALF UNIFICATION
   Keeps the approved upper Finance design from 0.9.78.
   ========================================================= */

/* The lower finance page uses one visual rhythm. */
.page[data-page="finance"] .finance-recurring-card,
.page[data-page="finance"] .finance-accounts-card,
.page[data-page="finance"] .finance-goals-card,
.page[data-page="finance"] .finance-budget-card,
.page[data-page="finance"] .finance-categories-card,
.page[data-page="finance"] .finance-debts-card,
.page[data-page="finance"] .finance-savings-card {
  padding: 14px 15px 13px !important;
  border-radius: 20px !important;
  box-shadow: 0 5px 16px rgba(62,52,43,.022) !important;
}

/* One header system across the entire finance page. */
.page[data-page="finance"] .finance-section-title-row {
  min-height: 34px !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 5px !important;
}

.page[data-page="finance"] .finance-section-title-row > div:first-child {
  min-width: 0 !important;
}

.page[data-page="finance"] .finance-section-title-row h2 {
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1.08 !important;
  font-weight: 730 !important;
  letter-spacing: -.028em !important;
}

.page[data-page="finance"] .finance-section-title-row .card-subtitle {
  margin-top: 3px !important;
  font-size: 9.8px !important;
  line-height: 1.3 !important;
}

.page[data-page="finance"] .finance-section-link {
  flex: 0 0 auto !important;
  padding: 5px 0 5px 8px !important;
  color: var(--sage-dark) !important;
  font-size: 10.5px !important;
  font-weight: 590 !important;
  white-space: nowrap !important;
}

/* Recurring payments: the header + is now the only Add action. */
.page[data-page="finance"] .finance-recurring-empty {
  min-height: 0 !important;
  padding: 13px 0 3px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
}

.page[data-page="finance"] .finance-recurring-empty button {
  display: none !important;
}

/* Accounts become tighter and more product-like. */
.page[data-page="finance"] .finance-accounts-card .account-list {
  margin-top: 2px !important;
  gap: 0 !important;
}

.page[data-page="finance"] .finance-accounts-card .account-row {
  padding: 9px 0 !important;
}

.page[data-page="finance"] .finance-accounts-card .account-icon {
  width: 31px !important;
  height: 31px !important;
  flex-basis: 31px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
}

.page[data-page="finance"] .finance-accounts-card .account-row b {
  font-size: 11.5px !important;
}

.page[data-page="finance"] .finance-accounts-card .account-row strong {
  font-size: 11.5px !important;
  font-variant-numeric: tabular-nums !important;
}

/* Goals & money: noticeably more compact than the previous large inner cards. */
.page[data-page="finance"] .finance-goals-list {
  display: grid !important;
  gap: 7px !important;
  margin-top: 6px !important;
}

.page[data-page="finance"] .finance-goal-row {
  padding: 10px 11px !important;
  border: 1px solid rgba(92,81,72,.065) !important;
  border-radius: 15px !important;
  background: rgba(250,248,245,.72) !important;
  box-shadow: none !important;
}

.page[data-page="finance"] .finance-goal-row-head {
  margin-bottom: 7px !important;
}

.page[data-page="finance"] .finance-goal-row-head b {
  font-size: 12.5px !important;
  line-height: 1.15 !important;
}

.page[data-page="finance"] .finance-goal-row-head small {
  margin-top: 2px !important;
  font-size: 9px !important;
}

.page[data-page="finance"] .finance-goal-row-head > span {
  font-size: 16px !important;
  font-weight: 750 !important;
}

.page[data-page="finance"] .finance-goal-row .progress-track {
  height: 6px !important;
}

.page[data-page="finance"] .finance-goal-row-foot {
  margin-top: 7px !important;
  font-size: 9.5px !important;
}

.page[data-page="finance"] .finance-goal-row-foot em {
  padding: 3px 7px !important;
  font-size: 8.5px !important;
}

/* Budget: approximately 15% less visual weight. */
.page[data-page="finance"] .finance-budget-card .budget-row {
  gap: 5px !important;
  padding: 8px 0 !important;
}

.page[data-page="finance"] .finance-budget-card .budget-row > div:first-child {
  font-size: 10px !important;
}

.page[data-page="finance"] .finance-budget-card .budget-row > div:first-child b {
  font-size: 10px !important;
}

.page[data-page="finance"] .finance-budget-card .progress-track {
  height: 6px !important;
}

.page[data-page="finance"] .finance-budget-card .budget-unset-line {
  padding: 7px 9px !important;
  border-radius: 11px !important;
  font-size: 9.5px !important;
}

.page[data-page="finance"] .finance-budget-card .budget-mini-grid {
  gap: 7px !important;
  margin-top: 9px !important;
}

.page[data-page="finance"] .finance-budget-card .budget-mini-grid > div {
  padding: 9px 10px !important;
  border-radius: 13px !important;
}

.page[data-page="finance"] .finance-budget-card .budget-mini-grid span {
  font-size: 8.5px !important;
}

.page[data-page="finance"] .finance-budget-card .budget-mini-grid b {
  font-size: 9.5px !important;
}

/* Categories: reduce empty vertical weight while preserving the chart. */
.page[data-page="finance"] .finance-categories-card .category-spend-list {
  margin-top: 7px !important;
  gap: 8px !important;
}

.page[data-page="finance"] .finance-categories-card .category-spend-row {
  row-gap: 4px !important;
}

.page[data-page="finance"] .finance-categories-card .category-spend-track {
  height: 5px !important;
}

/* Debts / Savings empty cards are now short system rows instead of tall panels. */
.page[data-page="finance"] .finance-debts-card.finance-empty-card,
.page[data-page="finance"] .finance-savings-card.finance-empty-card {
  padding-top: 13px !important;
  padding-bottom: 12px !important;
}

.page[data-page="finance"] .finance-debts-card .finance-stack,
.page[data-page="finance"] .finance-savings-card .finance-stack {
  gap: 7px !important;
}

.page[data-page="finance"] .finance-empty-card .mini-empty {
  padding: 7px 0 0 !important;
  color: var(--muted) !important;
  font-size: 10.5px !important;
  line-height: 1.35 !important;
}

/* Compact + buttons remain identical everywhere. */
.page[data-page="finance"] .finance-accounts-card .finance-compact-add,
.page[data-page="finance"] .finance-debts-card .finance-compact-add,
.page[data-page="finance"] .finance-savings-card .finance-compact-add,
.page[data-page="finance"] .finance-recurring-card .finance-compact-add,
.page[data-page="finance"] .finance-operations-card .finance-compact-add {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  flex: 0 0 30px !important;
  border-radius: 9px !important;
  font-size: 20px !important;
}

/* Smaller section-to-section gaps in the lower half. */
.page[data-page="finance"] .finance-recurring-card,
.page[data-page="finance"] .finance-accounts-card,
.page[data-page="finance"] .finance-goals-card,
.page[data-page="finance"] .finance-budget-card,
.page[data-page="finance"] .finance-categories-card,
.page[data-page="finance"] .finance-debts-card,
.page[data-page="finance"] .finance-savings-card {
  margin-top: -1px !important;
}

@media (max-width: 390px) {
  .page[data-page="finance"] .finance-recurring-card,
  .page[data-page="finance"] .finance-accounts-card,
  .page[data-page="finance"] .finance-goals-card,
  .page[data-page="finance"] .finance-budget-card,
  .page[data-page="finance"] .finance-categories-card,
  .page[data-page="finance"] .finance-debts-card,
  .page[data-page="finance"] .finance-savings-card {
    padding: 13px 14px 12px !important;
    border-radius: 19px !important;
  }

  .page[data-page="finance"] .finance-section-title-row h2 {
    font-size: 17px !important;
  }

  .page[data-page="finance"] .finance-goal-row {
    padding: 9px 10px !important;
    border-radius: 14px !important;
  }

  .page[data-page="finance"] .finance-compact-add {
    width: 29px !important;
    height: 29px !important;
    min-width: 29px !important;
    min-height: 29px !important;
    flex-basis: 29px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.80 — PROFILE / FINANCE CATEGORY MANAGEMENT
   ========================================================= */

.profile-category-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid rgba(91,102,91,.07);
  border-radius: 15px;
  background: rgba(143,159,138,.075);
}

.profile-category-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 690;
}

.profile-category-tabs button.active {
  background: rgba(255,255,255,.94);
  color: var(--sage-dark);
  box-shadow: 0 4px 12px rgba(67,75,68,.055);
}

.profile-categories-card {
  padding: 14px 17px 8px !important;
}

.profile-categories-header {
  align-items: center !important;
  margin-bottom: 4px !important;
}

.profile-category-add {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: grid;
  place-items: center;
  padding: 0 0 1px;
  border: 0;
  border-radius: 10px;
  background: var(--sage-dark);
  color: #fff;
  box-shadow: 0 4px 10px rgba(85,105,86,.13);
  font: inherit;
  font-size: 22px;
  font-weight: 430;
  line-height: 1;
}

.profile-category-add::after {
  content: "";
  position: absolute;
  inset: -5px;
}

.profile-category-list {
  display: grid;
}

.profile-category-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) 16px;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid rgba(92,80,68,.095);
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

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

.profile-category-row:active {
  opacity: .66;
}

.profile-category-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(143,159,138,.10);
  font-size: 20px;
  line-height: 1;
}

.profile-category-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-category-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.012em;
}

.profile-category-copy small {
  color: var(--muted);
  font-size: 10px;
}

.profile-category-empty {
  min-height: 72px !important;
}

/* Nested editor */
.profile-category-editor-topbar {
  grid-template-columns: 42px minmax(0,1fr) auto !important;
}

.profile-category-editor-save {
  min-width: 58px;
  padding: 7px 0 7px 9px;
  border: 0;
  background: transparent;
  color: #5a715c;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.profile-category-editor-scroll {
  gap: 12px !important;
}

.profile-category-editor-form {
  display: grid;
  gap: 12px;
}

.profile-category-editor-card {
  padding: 0 17px !important;
  overflow: hidden;
}

.profile-category-editor-primary {
  min-height: 72px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(92,80,68,.10);
}

.profile-category-preview {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(143,159,138,.11);
  font-size: 23px;
  line-height: 1;
}

.profile-category-editor-primary input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -.02em;
}

.profile-category-editor-primary input::placeholder {
  color: rgba(83,76,69,.38);
}

.profile-category-editor-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr minmax(120px, 190px);
  align-items: center;
  gap: 14px;
}

.profile-category-editor-row > span {
  font-size: 14px;
  font-weight: 590;
}

.profile-category-editor-row select {
  width: 100%;
  height: 44px;
  padding: 0 4px 0 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #6d675f;
  font: inherit;
  font-size: 14px;
  font-weight: 570;
  text-align: right;
  text-align-last: right;
  direction: rtl;
  -webkit-appearance: none;
  appearance: none;
}

.profile-category-icons-card {
  padding: 15px !important;
}

.profile-category-icons-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}

.profile-category-icons-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.profile-category-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 7px;
  margin-top: 13px;
}

.profile-category-icon-choice {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(106,95,84,.09);
  border-radius: 13px;
  background: rgba(249,247,243,.82);
  transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.profile-category-icon-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-category-icon-choice span {
  font-size: 21px;
  line-height: 1;
}

.profile-category-icon-choice.is-selected {
  border-color: rgba(87,110,90,.34);
  background: rgba(143,159,138,.13);
  box-shadow: inset 0 0 0 1px rgba(87,110,90,.12);
  transform: scale(.97);
}

.profile-category-delete {
  width: 100%;
  margin: 5px 0 16px;
  padding: 14px 0;
  border: 0;
  background: transparent;
  color: #b55d55;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}

/* Category emoji in native finance selectors remain aligned. */
.finance-form-screen select option,
.goal-task-form select option {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 390px) {
  .profile-category-icon-grid {
    grid-template-columns: repeat(6, minmax(0,1fr));
    gap: 6px;
  }

  .profile-category-icon-choice {
    border-radius: 12px;
  }

  .profile-category-icon-choice span {
    font-size: 20px;
  }

  .profile-category-row {
    min-height: 56px;
  }

  .profile-category-add {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 21px;
  }
}


/* =========================================================
   ARVYNO 0.9.81 — CATEGORY EDITOR = NEW TASK VISUAL LANGUAGE
   Same primary geometry as New Task, without Notes.
   ========================================================= */

.task-like-category-scroll {
  padding-left: 16px !important;
  padding-right: 16px !important;
  padding-top: 0 !important;
}

#profile-category-form.task-like-category-form {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  overflow: visible !important;
}

/* Same large primary field as New Task. */
#profile-category-form .profile-category-task-title {
  width: 100% !important;
  height: 78px !important;
  min-height: 78px !important;
  max-height: 78px !important;
  display: flex !important;
  align-items: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#profile-category-form .profile-category-task-title input {
  display: block !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  line-height: 38px !important;
  letter-spacing: -.025em !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#profile-category-form .profile-category-task-title input::placeholder {
  color: rgba(83,76,69,.43) !important;
  opacity: 1 !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  line-height: 38px !important;
  letter-spacing: -.025em !important;
}

/* No Notes field here by design. Type starts exactly where Task settings begin. */
#profile-category-form .profile-category-task-fields {
  width: 100% !important;
  margin: 22px 0 0 !important;
  padding: 0 18px !important;
  border: 1px solid rgba(105,94,83,.055) !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.82) !important;
  box-shadow: 0 8px 28px rgba(54,47,40,.045) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#profile-category-form .profile-category-task-fields .task-quiet-row {
  width: 100% !important;
  min-height: 60px !important;
  height: 60px !important;
  max-height: 60px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(78px,1fr) minmax(0,220px) !important;
  align-items: center !important;
  gap: 14px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-category-form .profile-category-task-fields .task-quiet-row-label {
  color: var(--text) !important;
  font-size: 16px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  letter-spacing: -.015em !important;
}

#profile-category-form .profile-category-type-control {
  position: relative !important;
  width: 100% !important;
  max-width: 220px !important;
  min-width: 0 !important;
  height: 44px !important;
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding-right: 18px !important;
  box-sizing: border-box !important;
}

#profile-category-form .profile-category-type-control::after {
  content: '›';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-52%);
  color: #8c857d;
  font-size: 27px;
  font-weight: 430;
  line-height: 1;
  pointer-events: none;
}

#profile-category-form .profile-category-kind-display {
  width: 100%;
  overflow: hidden;
  color: #6d675f;
  font-size: 15px;
  font-weight: 560;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profile-category-form .profile-category-kind-native {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

/* Icon selection remains functional but is visually lighter and follows
   the same spacing/radius system as Task cards. */
#profile-category-form .task-like-category-icons-card {
  width: 100% !important;
  margin: 12px 0 0 !important;
  padding: 16px !important;
  border: 1px solid rgba(105,94,83,.055) !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.82) !important;
  box-shadow: 0 8px 28px rgba(54,47,40,.045) !important;
  box-sizing: border-box !important;
}

#profile-category-form .task-like-category-icons-heading {
  min-height: 48px;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 42px !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 0 13px !important;
}

#profile-category-form .task-like-category-icons-heading h2 {
  margin: 0 !important;
  font-size: 17px !important;
  font-weight: 650 !important;
  letter-spacing: -.02em !important;
}

#profile-category-form .task-like-category-icons-heading p {
  margin: 3px 0 0 !important;
  color: var(--muted) !important;
  font-size: 10.5px !important;
  line-height: 1.35 !important;
}

#profile-category-form .task-like-category-preview {
  width: 42px !important;
  height: 42px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 13px !important;
  background: rgba(143,159,138,.11) !important;
  font-size: 21px !important;
  line-height: 1 !important;
}

#profile-category-form .profile-category-icon-grid {
  margin-top: 0 !important;
  gap: 7px !important;
}

#profile-category-form .profile-category-icon-choice {
  border-radius: 12px !important;
  background: rgba(249,247,243,.76) !important;
}

#profile-category-form .profile-category-icon-choice.is-selected {
  background: rgba(143,159,138,.14) !important;
  border-color: rgba(87,110,90,.34) !important;
}

/* Same calm Done/back treatment as Task. */
.task-like-category-topbar .tracker-icon-button {
  width: 36px !important;
  min-width: 36px !important;
  height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #201f1d !important;
  font-size: 34px !important;
  font-weight: 430 !important;
  line-height: 1 !important;
}

.task-like-category-topbar .profile-category-editor-save {
  color: #5a715c !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* Delete action stays outside the form hierarchy. */
#profile-category-form .profile-category-delete {
  margin-top: 24px !important;
  margin-bottom: 18px !important;
}

@media (max-width: 390px) {
  #profile-category-form .profile-category-task-fields {
    margin-top: 18px !important;
    padding-inline: 16px !important;
    border-radius: 20px !important;
  }

  #profile-category-form .profile-category-task-fields .task-quiet-row {
    grid-template-columns: minmax(72px,1fr) minmax(0,202px) !important;
    gap: 12px !important;
  }

  #profile-category-form .profile-category-type-control {
    max-width: 202px !important;
  }

  #profile-category-form .task-like-category-icons-card {
    margin-top: 10px !important;
    padding: 14px !important;
    border-radius: 20px !important;
  }

  #profile-category-form .profile-category-icon-grid {
    gap: 6px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.82 — CATEGORY HEADER + ICON ROW ALIGNMENT
   ========================================================= */

/* The category editor is hosted inside Profile rather than entity-slider.
   Give its topbar the exact native-safe vertical start used by New Task,
   so Back / title / Done sit below Telegram chrome instead of the status bar. */
.profile-detail-topbar.task-like-category-topbar {
  position: relative !important;
  top: auto !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding:
    calc(var(--arvyno-header-top) + 8px)
    16px
    10px !important;
  display: grid !important;
  grid-template-columns: 32px minmax(0,1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  background: #f6f2ec !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(82,73,64,.065) !important;
  box-sizing: border-box !important;
  z-index: 3 !important;
}

.profile-detail-topbar.task-like-category-topbar .tracker-icon-button {
  width: 32px !important;
  min-width: 32px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font-size: 30px !important;
  font-weight: 430 !important;
  line-height: 1 !important;
}

.profile-detail-topbar.task-like-category-topbar .tracker-top-title {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-align: center !important;
  font-size: 14px !important;
  font-weight: 720 !important;
  letter-spacing: -.01em !important;
}

.profile-detail-topbar.task-like-category-topbar .profile-category-editor-save {
  min-width: 58px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #5a715c !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* Because the topbar now owns the Telegram safe-area spacing,
   content starts immediately beneath it like New Task. */
.profile-category-editor-scroll.task-like-category-scroll {
  padding-top: 0 !important;
}

/* ---------------------------------------------------------
   "Иконка" now uses the exact same 60px label hierarchy as "Тип".
   --------------------------------------------------------- */
#profile-category-form .task-like-category-icons-card {
  padding: 0 18px 16px !important;
  overflow: hidden !important;
}

#profile-category-form .profile-category-icon-title-row {
  width: 100% !important;
  min-height: 60px !important;
  height: 60px !important;
  max-height: 60px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(78px,1fr) minmax(0,220px) !important;
  align-items: center !important;
  gap: 14px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  background: transparent !important;
  box-shadow: none !important;
}

#profile-category-form .profile-category-icon-title-row .task-quiet-row-label {
  color: var(--text) !important;
  font-size: 16px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  letter-spacing: -.015em !important;
}

#profile-category-form .profile-category-icon-title-control {
  width: 100% !important;
  max-width: 220px !important;
  min-width: 0 !important;
  height: 60px !important;
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 !important;
}

#profile-category-form .profile-category-icon-title-control::after {
  display: none !important;
}

/* Smaller selected-icon preview so it behaves like the value on the Type row,
   rather than a second headline. */
#profile-category-form .profile-category-icon-title-row .task-like-category-preview {
  width: 38px !important;
  height: 38px !important;
border-radius: 12px !important;
  background: rgba(143,159,138,.11) !important;
  font-size: 19px !important;
  line-height: 1 !important;
}

/* Grid starts as content below the row, with no extra heading/caption. */
#profile-category-form .profile-category-icon-grid {
  margin: 14px 0 0 !important;
}

/* Old heading/caption from 0.9.80/0.9.81 must never reserve space. */
#profile-category-form .profile-category-icons-heading,
#profile-category-form .task-like-category-icons-heading {
  display: none !important;
}

@media (max-width: 390px) {
  .profile-detail-topbar.task-like-category-topbar {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  #profile-category-form .task-like-category-icons-card {
    padding: 0 16px 14px !important;
  }

  #profile-category-form .profile-category-icon-title-row {
    grid-template-columns: minmax(72px,1fr) minmax(0,202px) !important;
    gap: 12px !important;
  }

  #profile-category-form .profile-category-icon-title-control {
    max-width: 202px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.83 — CATEGORIES LIST SAFE HEADER
   Moves only the Categories list header below Telegram chrome.
   ========================================================= */

html.telegram-webapp .profile-detail-topbar.profile-categories-topbar {
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding:
    calc(var(--arvyno-header-top) + 8px)
    16px
    10px !important;
  display: grid !important;
  grid-template-columns: 32px minmax(0,1fr) 32px !important;
  align-items: center !important;
  gap: 8px !important;
  background: #f6f2ec !important;
  border-bottom: 1px solid rgba(82,73,64,.065) !important;
  box-sizing: border-box !important;
  z-index: 3 !important;
}

html.telegram-webapp .profile-detail-topbar.profile-categories-topbar .tracker-icon-button {
  width: 32px !important;
  min-width: 32px !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font-size: 30px !important;
  font-weight: 430 !important;
  line-height: 1 !important;
}

html.telegram-webapp .profile-detail-topbar.profile-categories-topbar .tracker-top-title {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-align: center !important;
  font-size: 14px !important;
  font-weight: 720 !important;
  letter-spacing: -.01em !important;
}

html.telegram-webapp .profile-detail-topbar.profile-categories-topbar .profile-detail-top-spacer {
  width: 32px !important;
  height: 40px !important;
}

/* Categories content begins immediately after the corrected header. */
.profile-detail-scroll.profile-categories-scroll {
  padding-top: 12px !important;
}

/* Slightly tighter intro rhythm requested after reviewing the screen. */
.profile-categories-intro {
  padding-top: 1px !important;
  padding-bottom: 0 !important;
}

.profile-categories-intro .profile-category-tabs {
  margin-top: 11px !important;
}

/* Keep desktop/web fallback compact when Telegram native chrome is absent. */
html:not(.telegram-webapp) .profile-detail-topbar.profile-categories-topbar {
  padding-top: 12px !important;
}

@media (max-width: 390px) {
  html.telegram-webapp .profile-detail-topbar.profile-categories-topbar {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .profile-detail-scroll.profile-categories-scroll {
    padding-top: 10px !important;
  }

  .profile-categories-intro .profile-category-tabs {
    margin-top: 10px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.84 — CATEGORIES COLLAPSIBLE LIST
   ========================================================= */

/* Remove old marketing/intro block entirely from visual flow. */
.profile-categories-scroll .profile-section-intro,
.profile-categories-scroll .profile-categories-intro {
  display: none !important;
}

/* Tabs now begin immediately below the Categories topbar. */
.profile-category-tabs-wrap {
  padding: 0 4px !important;
}

.profile-categories-scroll .profile-category-tabs {
  margin: 0 !important;
}

/* The list card owns the collapse header and floating add button. */
.profile-categories-card {
  position: relative !important;
  padding: 0 17px 58px !important;
  overflow: hidden !important;
  transition:
    padding-bottom 240ms cubic-bezier(.22,.8,.2,1),
    box-shadow 240ms ease !important;
}

/* Header now feels like a navigation row, not a static title. */
.profile-categories-collapse-row {
  width: 100%;
  min-height: 69px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 34px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(92,80,68,.095);
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.profile-categories-collapse-row:active {
  opacity: .66;
}

.profile-categories-collapse-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-categories-collapse-copy b {
  font-size: 20px;
  font-weight: 730;
  line-height: 1.06;
  letter-spacing: -.028em;
}

.profile-categories-collapse-copy small {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.2;
}

.profile-categories-collapse-chevron {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  justify-self: end;
  color: #7d776f;
  font-size: 23px;
  font-weight: 520;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 240ms cubic-bezier(.22,.8,.2,1);
}

/* Content area animates open/closed. */
.profile-category-list-wrap {
  max-height: 1200px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    max-height 340ms cubic-bezier(.2,.8,.2,1),
    opacity 190ms ease,
    transform 300ms cubic-bezier(.2,.8,.2,1);
}

.profile-categories-card.is-collapsed .profile-category-list-wrap {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
}

.profile-categories-card.is-collapsed .profile-categories-collapse-chevron {
  transform: rotate(-90deg);
}

.profile-categories-card.is-collapsed {
  padding-bottom: 14px !important;
}

.profile-categories-card.is-collapsed .profile-categories-collapse-row {
  border-bottom-color: transparent;
}

/* Keep rows unchanged; only container behavior changes. */
.profile-categories-card .profile-category-list {
  padding-bottom: 8px;
}

/* Soft "evaporation" at the bottom, inspired by the supplied reference. */
.profile-categories-bottom-fade {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,.74) 46%,
      rgba(255,255,255,.96) 78%,
      rgba(255,255,255,1) 100%
    );
  opacity: 1;
  transition: opacity 180ms ease;
}

.profile-categories-card.is-collapsed .profile-categories-bottom-fade {
  opacity: 0;
}

/* Move + to the lower-right corner of the category list. */
.profile-category-floating-add {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 0;
  border-radius: 14px;
  background: var(--sage-dark);
  color: #fff;
  box-shadow: 0 8px 20px rgba(75,94,78,.20);
  font: inherit;
  font-size: 29px;
  font-weight: 390;
  line-height: 1;
  transition:
    transform 150ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.profile-category-floating-add:active {
  transform: scale(.94);
}

.profile-categories-card.is-collapsed .profile-category-floating-add {
  opacity: 0;
  pointer-events: none;
  transform: translateY(7px) scale(.90);
}

/* Old top-right + must not appear if stale markup is cached. */
.profile-categories-card .profile-category-add {
  display: none !important;
}

/* Tighten the top rhythm now that the descriptive intro is gone. */
.profile-detail-scroll.profile-categories-scroll {
  gap: 10px !important;
  padding-top: 10px !important;
}

/* Allow a very long list to remain pleasant on small iPhones.
   The whole profile screen still scrolls naturally. */
@media (max-width: 390px) {
  .profile-categories-card {
    padding-left: 15px !important;
    padding-right: 15px !important;
    padding-bottom: 56px !important;
  }

  .profile-categories-collapse-row {
    min-height: 65px;
  }

  .profile-categories-collapse-copy b {
    font-size: 19px;
  }

  .profile-category-floating-add {
    right: 15px;
    bottom: 13px;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 13px;
    font-size: 27px;
  }

  .profile-categories-bottom-fade {
    height: 68px;
  }
}


/* =========================================================
   ARVYNO 0.9.85 — INDEPENDENT ADD + LOCAL FADE + ROW CHEVRON
   ========================================================= */

/* The card no longer reserves space for the floating add button. */
.profile-categories-card,
.profile-categories-card.is-expanded,
.profile-categories-card.is-collapsed {
  padding-bottom: 10px !important;
}

/* Remove the old full-width fade from 0.9.84 completely. */
.profile-categories-bottom-fade {
  display: none !important;
}

/* Old in-card plus must never appear. */
.profile-category-floating-add {
  display: none !important;
}

/* Collapse arrow now literally uses the same chevron language as category rows. */
.profile-categories-collapse-chevron.profile-menu-chevron {
  width: 16px !important;
  height: 28px !important;
  min-width: 16px !important;
  display: grid !important;
  place-items: center !important;
  justify-self: end !important;
  color: #8a8379 !important;
  font-size: 28px !important;
  font-weight: 430 !important;
  line-height: 1 !important;
  transform: rotate(90deg);
  transform-origin: center;
  transition: transform 220ms cubic-bezier(.22,.8,.2,1) !important;
}

/* Closed = same right-facing › as every category row. */
.profile-categories-card.is-collapsed .profile-categories-collapse-chevron.profile-menu-chevron {
  transform: rotate(0deg);
}

/* Open = same glyph rotated down. */
.profile-categories-card.is-expanded .profile-categories-collapse-chevron.profile-menu-chevron {
  transform: rotate(90deg);
}

/* Independent screen-level add button: unrelated to collapse state. */
.profile-category-screen-add {
  position: fixed !important;
  z-index: 180 !important;
  right: 22px !important;
  bottom: calc(
    18px + max(
      env(safe-area-inset-bottom),
      var(--arvyno-safe-bottom),
      var(--arvyno-content-safe-bottom)
    )
  ) !important;

  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;

  display: grid !important;
  place-items: center !important;

  margin: 0 !important;
  padding: 0 0 2px !important;

  border: 0 !important;
  border-radius: 15px !important;

  background: var(--sage-dark) !important;
  color: #fff !important;

  box-shadow:
    0 10px 24px rgba(75,94,78,.22),
    0 2px 6px rgba(75,94,78,.10) !important;

  font: inherit !important;
  font-size: 31px !important;
  font-weight: 390 !important;
  line-height: 1 !important;

  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;

  -webkit-tap-highlight-color: transparent !important;
  transition:
    transform 130ms ease,
    box-shadow 160ms ease !important;
}

.profile-category-screen-add:active {
  transform: scale(.94) !important;
  box-shadow:
    0 6px 16px rgba(75,94,78,.18),
    0 1px 4px rgba(75,94,78,.08) !important;
}

/* Local evaporation only directly under/around the floating +.
   On empty cream background it is visually invisible; when a row scrolls
   beneath the +, the row softly disappears before reaching the button. */
.profile-category-add-fade {
  position: fixed !important;
  z-index: 179 !important;

  right: 4px !important;
  bottom: calc(
    2px + max(
      env(safe-area-inset-bottom),
      var(--arvyno-safe-bottom),
      var(--arvyno-content-safe-bottom)
    )
  ) !important;

  width: 102px !important;
  height: 96px !important;

  pointer-events: none !important;

  background:
    radial-gradient(
      circle at 70% 68%,
      rgba(246,242,236,1) 0%,
      rgba(246,242,236,.96) 30%,
      rgba(246,242,236,.76) 49%,
      rgba(246,242,236,.30) 69%,
      rgba(246,242,236,0) 86%
    ) !important;
}

/* Plus remains independent even while the list is collapsed. */
.profile-categories-card.is-collapsed ~ .profile-category-screen-add,
.profile-categories-card.is-expanded ~ .profile-category-screen-add {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

.profile-categories-card.is-collapsed ~ .profile-category-add-fade,
.profile-categories-card.is-expanded ~ .profile-category-add-fade {
  display: block !important;
}

/* Let the last category naturally travel under the floating control,
   matching the reference interaction. */
.profile-detail-scroll.profile-categories-scroll {
  padding-bottom: calc(
    22px + max(
      env(safe-area-inset-bottom),
      var(--arvyno-safe-bottom),
      var(--arvyno-content-safe-bottom)
    )
  ) !important;
}

@media (max-width: 390px) {
  .profile-category-screen-add {
    right: 18px !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 14px !important;
    font-size: 29px !important;
  }

  .profile-category-add-fade {
    right: 1px !important;
    width: 96px !important;
    height: 90px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.86 — CATEGORIES SIMPLIFIED
   Tabs -> list directly. No repeated heading, no collapse, no haze.
   ========================================================= */

/* Old collapse header from 0.9.84/0.9.85 is fully removed. */
.profile-categories-collapse-row,
.profile-categories-collapse-copy,
.profile-categories-collapse-chevron,
.profile-category-list-wrap,
.profile-categories-bottom-fade,
.profile-category-add-fade,
.profile-category-floating-add {
  display: none !important;
}

/* Category card is now only the list itself. */
.profile-categories-card.profile-categories-simple-card,
.profile-categories-card.profile-categories-simple-card.is-expanded,
.profile-categories-card.profile-categories-simple-card.is-collapsed {
  position: relative !important;
  margin: 0 !important;
  padding: 8px 17px !important;
  overflow: hidden !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.84) !important;
  box-shadow: 0 8px 28px rgba(54,47,40,.045) !important;
}

/* List immediately follows the tabs. */
.profile-categories-simple-card .profile-category-list {
  padding: 0 !important;
  margin: 0 !important;
}

/* Preserve the existing category row geometry. */
.profile-categories-simple-card .profile-category-row {
  min-height: 58px !important;
}

/* Tabs and list sit closer together now that the duplicate section header is gone. */
.profile-detail-scroll.profile-categories-scroll {
  gap: 10px !important;
  padding-top: 10px !important;
  padding-bottom: calc(
    22px + max(
      env(safe-area-inset-bottom),
      var(--arvyno-safe-bottom),
      var(--arvyno-content-safe-bottom)
    )
  ) !important;
}

/* Independent floating + remains, but with no surrounding haze whatsoever. */
.profile-category-screen-add {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

/* Explicitly remove every fade/gradient artifact around the floating +. */
.profile-category-screen-add::before,
.profile-category-screen-add::after {
  content: none !important;
  display: none !important;
}

.profile-category-add-fade {
  display: none !important;
  background: none !important;
}

/* No collapsed/expanded styling may affect the list anymore. */
.profile-categories-card.is-collapsed,
.profile-categories-card.is-expanded {
  padding-bottom: 8px !important;
}

.profile-categories-card.is-collapsed .profile-category-list,
.profile-categories-card.is-expanded .profile-category-list {
  display: grid !important;
  max-height: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Give the last row a clean ending above the floating button area. */
.profile-categories-simple-card .profile-category-row:last-child {
  border-bottom: 0 !important;
}

@media (max-width: 390px) {
  .profile-categories-card.profile-categories-simple-card {
    padding: 7px 15px !important;
    border-radius: 20px !important;
  }

  .profile-detail-scroll.profile-categories-scroll {
    gap: 9px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.87 — MANUAL CATEGORY ORDER
   ========================================================= */

.profile-category-copy {
  gap: 0 !important;
  align-content: center !important;
}

.profile-category-copy small {
  display: none !important;
}

.profile-category-copy b {
  font-size: 14px !important;
  line-height: 1.2 !important;
}

.profile-categories-simple-card .profile-category-row {
  grid-template-columns: 40px minmax(0,1fr) 32px 16px !important;
  gap: 10px !important;
}

.profile-category-drag-handle {
  width: 32px;
  height: 44px;
  display: grid;
  place-items: center;
  justify-self: end;
  color: #aaa39a;
  font-size: 23px;
  font-weight: 480;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 130ms ease,
    transform 130ms ease;
}

.profile-category-drag-handle:active {
  cursor: grabbing;
  color: var(--sage-dark);
  transform: scale(1.06);
}

.profile-category-row.is-reordering {
  position: relative;
  z-index: 5;
  border-radius: 14px !important;
  background: rgba(248,247,243,.99) !important;
  box-shadow:
    0 10px 28px rgba(53,48,42,.10),
    0 2px 7px rgba(53,48,42,.05) !important;
  transform: scale(.988);
  border-bottom-color: transparent !important;
}

.profile-category-row.is-reordering .profile-category-drag-handle {
  color: var(--sage-dark);
  cursor: grabbing;
}

body.category-reordering,
body.category-reordering * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.profile-categories-simple-card .profile-menu-chevron {
  justify-self: end !important;
}

@media (max-width: 390px) {
  .profile-categories-simple-card .profile-category-row {
    grid-template-columns: 40px minmax(0,1fr) 30px 16px !important;
    gap: 9px !important;
  }

  .profile-category-drag-handle {
    width: 30px;
    height: 44px;
    font-size: 22px;
  }
}


/* =========================================================
   ARVYNO 0.9.88 — ROBUST CATEGORY DRAG & DROP
   ========================================================= */

/* Row itself is now a neutral container. */
.profile-categories-simple-card .profile-category-row {
  width: 100% !important;
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 38px !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.095) !important;
  background: transparent !important;
  color: var(--text) !important;
  box-sizing: border-box !important;
}

/* Main tap area opens editing. */
.profile-category-edit-zone {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: 40px minmax(0,1fr) 16px !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 9px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  text-align: left !important;
  font: inherit !important;
  -webkit-tap-highlight-color: transparent !important;
}

.profile-category-edit-zone:active {
  opacity: .66;
}

/* Grip is a genuinely separate control now. */
.profile-category-drag-handle {
  width: 38px !important;
  height: 50px !important;
  min-width: 38px !important;
  display: grid !important;
  place-items: center !important;
  justify-self: end !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #aaa39a !important;
  font: inherit !important;
  font-size: 24px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  cursor: grab !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.profile-category-drag-handle:active {
  color: var(--sage-dark) !important;
  cursor: grabbing !important;
}

/* Lifted row follows the finger. */
.profile-category-row.is-reordering {
  border: 1px solid rgba(88,103,88,.10) !important;
  border-radius: 15px !important;
  background: rgba(255,255,255,.985) !important;
  box-shadow:
    0 18px 42px rgba(53,48,42,.16),
    0 4px 12px rgba(53,48,42,.07) !important;
  transform: scale(1.015) !important;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease !important;
}

/* Empty slot while dragging. */
.profile-category-drag-placeholder {
  width: 100% !important;
  min-height: 58px;
  border-radius: 14px;
  background: rgba(143,159,138,.055);
  border: 1px dashed rgba(91,111,92,.18);
  box-sizing: border-box;
  transition:
    height 130ms ease,
    transform 130ms ease,
    background 130ms ease;
}

/* Last real row should still end cleanly when not dragging. */
.profile-categories-simple-card .profile-category-row:last-of-type {
  border-bottom: 0 !important;
}

body.category-reordering {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

body.category-reordering,
body.category-reordering * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

@media (max-width: 390px) {
  .profile-categories-simple-card .profile-category-row {
    grid-template-columns: minmax(0,1fr) 36px !important;
  }

  .profile-category-edit-zone {
    grid-template-columns: 40px minmax(0,1fr) 16px !important;
    gap: 10px !important;
  }

  .profile-category-drag-handle {
    width: 36px !important;
    min-width: 36px !important;
    font-size: 23px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.89 — SMOOTHER CATEGORY REORDER
   ========================================================= */

/* v0.9.89 no longer uses the dotted placeholder at all. */
.profile-category-drag-placeholder {
  display: none !important;
}

/* Dragged row remains inside normal list flow and only follows the finger
   using a GPU transform, so there is no detached "ghost" card. */
.profile-category-row.is-reordering {
  position: relative !important;
  border: 1px solid rgba(88,103,88,.10) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.99) !important;
  box-shadow:
    0 12px 28px rgba(53,48,42,.13),
    0 3px 8px rgba(53,48,42,.05) !important;
  transition:
    box-shadow 120ms ease,
    background 120ms ease !important;
}

/* Neighbouring rows stay visually stable instead of flashing/jumping. */
.profile-categories-simple-card .profile-category-row:not(.is-reordering) {
  transition:
    background 110ms ease,
    opacity 110ms ease !important;
}

/* Grip has a larger touch target but remains visually quiet. */
.profile-category-drag-handle {
  width: 40px !important;
  min-width: 40px !important;
  height: 54px !important;
  color: #9f9990 !important;
}

.profile-category-row.is-reordering .profile-category-drag-handle {
  color: var(--sage-dark) !important;
}

/* Keep normal scrolling locked only while the finger is actively reordering. */
body.category-reordering {
  overscroll-behavior: none !important;
}


/* =========================================================
   ARVYNO 0.9.90 — CATEGORY ORDER MODE
   Reliable tap controls instead of drag-and-drop.
   ========================================================= */

/* Old drag UI is retired completely. */
.profile-category-drag-handle,
.profile-category-drag-placeholder {
  display: none !important;
}

body.category-reordering {
  overflow: auto !important;
  overscroll-behavior: auto !important;
}

.profile-category-row.is-reordering {
  position: static !important;
  transform: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Small action line above the list. No second category heading. */
.profile-category-order-toolbar {
  width: 100%;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px;
  box-sizing: border-box;
}

.profile-category-order-toggle {
  min-height: 26px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--sage-dark);
  font: inherit;
  font-size: 11px;
  font-weight: 720;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.profile-category-order-toggle:active {
  opacity: .55;
}

.profile-category-order-toggle.is-active {
  font-weight: 760;
}

/* Normal rows return to simple edit layout. */
.profile-categories-simple-card .profile-category-row {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

.profile-category-edit-zone {
  grid-template-columns: 40px minmax(0,1fr) 16px !important;
}

/* Sort mode: edit area + explicit ↑ ↓ buttons. */
.profile-categories-simple-card.is-sort-mode .profile-category-row {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 74px !important;
  align-items: center !important;
  gap: 6px !important;
}

.profile-categories-simple-card.is-sort-mode .profile-category-edit-zone {
  grid-template-columns: 40px minmax(0,1fr) !important;
  gap: 12px !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

.profile-categories-simple-card.is-sort-mode .profile-category-edit-zone:active {
  opacity: 1 !important;
}

.profile-category-order-controls {
  width: 74px;
  height: 44px;
display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4px;
  justify-self: end;
}

.profile-category-order-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid rgba(96,107,95,.10);
  border-radius: 11px;
  background: rgba(143,159,138,.075);
  color: var(--sage-dark);
  font: inherit;
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 100ms ease,
    background 100ms ease,
    opacity 100ms ease;
}

.profile-category-order-button:active:not(:disabled) {
  transform: scale(.92);
  background: rgba(143,159,138,.15);
}

.profile-category-order-button:disabled {
  opacity: .22;
  cursor: default;
}

/* Plus stays independent, but sorting mode is intentionally focused. */
.profile-category-screen-add.is-sort-mode {
  opacity: .28 !important;
  pointer-events: none !important;
}

/* Slightly tighten spacing between tabs, edit control, and list. */
.profile-detail-scroll.profile-categories-scroll {
  gap: 6px !important;
}

.profile-category-order-toolbar + .profile-categories-simple-card {
  margin-top: -1px !important;
}

@media (max-width: 390px) {
  .profile-categories-simple-card.is-sort-mode .profile-category-row {
    grid-template-columns: minmax(0,1fr) 70px !important;
    gap: 4px !important;
  }

  .profile-category-order-controls {
    width: 70px;
    gap: 3px;
  }

  .profile-category-order-button {
    width: 33px;
    height: 33px;
    border-radius: 10px;
  }
}


/* =========================================================
   ARVYNO 0.9.91 — CATEGORY ORDER ICON
   ========================================================= */

.profile-category-order-toggle:not(.is-active) {
  width: 32px !important;
  min-width: 32px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  font-size: 20px !important;
  font-weight: 560 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

.profile-category-order-toggle.is-active {
  width: auto !important;
  min-width: 0 !important;
  height: 28px !important;
  padding: 0 3px !important;
  font-size: 11px !important;
  font-weight: 760 !important;
}


/* =========================================================
   ARVYNO 0.9.92 — CATEGORY ADD IN HEADER
   ========================================================= */

/* Old floating add button is retired completely. */
.profile-category-screen-add {
  display: none !important;
}

/* Bare plus opposite the back arrow in the Categories topbar. */
.profile-detail-topbar.profile-categories-topbar .profile-category-header-add {
  width: 32px !important;
  min-width: 32px !important;
  height: 40px !important;

  display: grid !important;
  place-items: center !important;
  justify-self: end !important;

  margin: 0 !important;
  padding: 0 0 2px !important;

  border: 0 !important;
  border-radius: 0 !important;

  background: transparent !important;
  box-shadow: none !important;

  color: var(--text) !important;

  font: inherit !important;
  font-size: 29px !important;
  font-weight: 390 !important;
  line-height: 1 !important;

  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;

  transition:
    opacity 120ms ease,
    transform 120ms ease !important;
}

.profile-detail-topbar.profile-categories-topbar .profile-category-header-add:active {
  opacity: .5 !important;
  transform: scale(.93) !important;
}

/* Keep the topbar perfectly symmetric: back arrow 32px / title / plus 32px. */
html.telegram-webapp .profile-detail-topbar.profile-categories-topbar {
  grid-template-columns: 32px minmax(0,1fr) 32px !important;
}

/* With no floating bottom button we no longer need its extra runway. */
.profile-detail-scroll.profile-categories-scroll {
  padding-bottom: calc(
    22px + max(
      env(safe-area-inset-bottom),
      var(--arvyno-safe-bottom),
      var(--arvyno-content-safe-bottom)
    )
  ) !important;
}

@media (max-width: 390px) {
  .profile-detail-topbar.profile-categories-topbar .profile-category-header-add {
    width: 32px !important;
    min-width: 32px !important;
    height: 40px !important;
    font-size: 28px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.93 — BARE PLUS SYSTEM
   Tasks / Goals / Home use the same + language as Categories.
   ========================================================= */

/* ---------- Tasks + Goals headers ---------- */
.page[data-page="plan"] .tasks-header-v093,
.page[data-page="goals"] .goals-header-v093 {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 32px !important;
  align-items: start !important;
  gap: 12px !important;
  margin-bottom: 6px !important;
}

.page[data-page="plan"] .tasks-heading-main,
.page[data-page="goals"] .tasks-heading-main {
  min-width: 0 !important;
  display: grid !important;
  align-content: start !important;
  justify-items: start !important;
  gap: 5px !important;
}

.page[data-page="plan"] .tasks-header-v093 h1,
.page[data-page="goals"] .goals-header-v093 h1 {
  margin: 0 !important;
}

/* Progress/info moves under the page title, aligned left. */
.page[data-page="plan"] .tasks-header-v093 .tasks-heading-summary,
.page[data-page="goals"] .goals-header-v093 .tasks-heading-summary,
.page[data-page="goals"] .goals-header-v093 .goals-heading-summary {
  min-width: 0 !important;
  width: auto !important;
  display: grid !important;
  justify-items: start !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  white-space: normal !important;
}

.page[data-page="plan"] .tasks-header-v093 .tasks-heading-summary b,
.page[data-page="goals"] .goals-header-v093 .tasks-heading-summary b,
.page[data-page="goals"] .goals-header-v093 .goals-heading-summary b {
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 670 !important;
  line-height: 1.22 !important;
  letter-spacing: -.01em !important;
}

.page[data-page="plan"] .tasks-header-v093 .tasks-heading-summary span,
.page[data-page="goals"] .goals-header-v093 .tasks-heading-summary span,
.page[data-page="goals"] .goals-header-v093 .goals-heading-summary span {
  margin: 0 !important;
  color: rgba(112,104,96,.72) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
}

/* Same invisible 32×40 tap target as Categories: only the black + is visible. */
.page[data-page="plan"] .tasks-header-add,
.page[data-page="goals"] .goals-header-add {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;

  width: 32px !important;
  min-width: 32px !important;
  height: 40px !important;
  min-height: 40px !important;

  display: grid !important;
  place-items: center !important;
  justify-self: end !important;

  margin: -5px 0 0 !important;
  padding: 0 0 2px !important;

  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;

  color: var(--text) !important;
  font: inherit !important;
  font-size: 29px !important;
  font-weight: 390 !important;
  line-height: 1 !important;

  -webkit-tap-highlight-color: transparent !important;
  transition: opacity 120ms ease, transform 120ms ease !important;
}

.page[data-page="plan"] .tasks-header-add:active,
.page[data-page="goals"] .goals-header-add:active {
  opacity: .5 !important;
  transform: scale(.93) !important;
  background: transparent !important;
  color: var(--text) !important;
}

.page[data-page="plan"] .tasks-header-add:disabled,
.page[data-page="goals"] .goals-header-add:disabled {
  opacity: .3 !important;
}

/* Legacy bottom floating adds must never survive. */
.page[data-page="plan"] .tasks-floating-add,
.page[data-page="goals"] .goals-floating-add {
  display: none !important;
}

/* ---------- Home ---------- */
/* All three Home plus buttons become plain black + without square/background. */
.page[data-page="today"] .today-section-add {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;

  width: 32px !important;
  min-width: 32px !important;
  height: 40px !important;
  min-height: 40px !important;
  flex: 0 0 32px !important;

  margin: -5px 0 0 !important;
  padding: 0 0 2px !important;

  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;

  color: var(--text) !important;
  font: inherit !important;
  font-size: 29px !important;
  font-weight: 390 !important;
  line-height: 1 !important;
}

.page[data-page="today"] .today-section-add::after {
  content: none !important;
  display: none !important;
}

.page[data-page="today"] .today-section-add:active {
  opacity: .5 !important;
  transform: scale(.93) !important;
  background: transparent !important;
  color: var(--text) !important;
}

.page[data-page="today"] .today-section-add:disabled {
  opacity: .3 !important;
}

/* Keep title and + optically on the same top line. */
.page[data-page="today"] .today-section-header {
  align-items: flex-start !important;
}

@media (max-width: 390px) {
  .page[data-page="plan"] .tasks-header-add,
  .page[data-page="goals"] .goals-header-add,
  .page[data-page="today"] .today-section-add {
    width: 32px !important;
    min-width: 32px !important;
    height: 40px !important;
    min-height: 40px !important;
    font-size: 28px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.94 — GOAL ↔ FINANCE SYNC RESTORED
   ========================================================= */

#goal-form.goal-task-form .goal-finance-settings-card {
  margin-top: 12px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(252,253,250,.84)) !important;
}

#goal-form.goal-task-form .goal-finance-settings-card.hidden,
#goal-form.goal-task-form .goal-finance-settings-card .task-quiet-row.hidden {
  display: none !important;
}

#goal-form.goal-task-form .goal-finance-settings-card .task-quiet-row-control {
  max-width: 220px !important;
}

#goal-form.goal-task-form .goal-finance-number-control {
  padding-right: 0 !important;
}

#goal-form.goal-task-form .goal-finance-number-control::after {
  display: none !important;
}

#goal-form.goal-task-form .goal-finance-number-control .goal-task-input {
  padding-right: 0 !important;
}

#goal-form.goal-task-form .goal-finance-category-select {
  text-overflow: ellipsis !important;
}

#goal-form.goal-task-form .goal-finance-settings-card select[name="finance_mode"] {
  color: #5a715c !important;
}

@media (max-width: 390px) {
  #goal-form.goal-task-form .goal-finance-settings-card {
    margin-top: 10px !important;
  }

  #goal-form.goal-task-form .goal-finance-settings-card .task-quiet-row-control {
    max-width: 202px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.95 — NEW TRANSACTION = TASK/CATEGORIES LANGUAGE
   ========================================================= */

/* Transaction form starts immediately below the quiet topbar. */
.finance-form-screen #finance-transaction-form.transaction-task-form {
  margin-top: -2px !important;
}

/* Type switch = Categories tabs, now with 3 equal segments and no "Тип" label. */
#finance-transaction-form .transaction-kind-tabs {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: 4px !important;
  margin: 10px 0 16px !important;
  padding: 4px !important;
  border: 1px solid rgba(91,102,91,.07) !important;
  border-radius: 15px !important;
  background: rgba(143,159,138,.075) !important;
  box-sizing: border-box !important;
}

#finance-transaction-form .transaction-kind-tabs label {
  position: relative !important;
  min-width: 0 !important;
  min-height: 38px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 690 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}

#finance-transaction-form .transaction-kind-tabs label.active {
  background: rgba(255,255,255,.94) !important;
  color: var(--sage-dark) !important;
  box-shadow: 0 4px 12px rgba(67,75,68,.055) !important;
}

#finance-transaction-form .transaction-kind-tabs input {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Large amount line — same hierarchy as the New Task title. */
#finance-transaction-form .transaction-amount-primary {
  width: 100% !important;
  height: 82px !important;
  min-height: 82px !important;
  max-height: 82px !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#finance-transaction-form .transaction-amount-label {
  display: none !important;
}

#finance-transaction-form .transaction-amount-line {
  position: relative !important;
  width: 100% !important;
  height: 82px !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

#finance-transaction-form .transaction-amount-line input {
  width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  margin: 0 0 7px !important;
  padding: 0 48px !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  line-height: 46px !important;
  letter-spacing: -.025em !important;
  text-align: center !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#finance-transaction-form .transaction-amount-line input::placeholder {
  color: #a7a19a !important;
  opacity: 1 !important;
  font-size: 32px !important;
  font-weight: 600 !important;
}

#finance-transaction-form .transaction-currency-fixed {
  position: absolute !important;
  right: 2px !important;
  bottom: 16px !important;
  min-width: 32px !important;
  color: #777168 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-align: right !important;
  pointer-events: none !important;
}

/* Note sits directly under amount just like in New Task. */
#finance-transaction-form .transaction-note-field {
  width: 100% !important;
  min-height: 58px !important;
  height: 58px !important;
  max-height: 58px !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#finance-transaction-form .transaction-note-field > span {
  display: none !important;
}

#finance-transaction-form .transaction-note-field textarea {
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  margin: 0 !important;
  padding: 18px 0 !important;
  border: 0 !important;
  outline: none !important;
  resize: none !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 22px !important;
  letter-spacing: -.01em !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#finance-transaction-form .transaction-note-field textarea::placeholder {
  color: #777168 !important;
  opacity: .72 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
}

/* Only Category → Account → Date remain in the lower card. */
#finance-transaction-form .transaction-settings-card {
  width: 100% !important;
  margin: 22px 0 0 !important;
  padding: 0 18px !important;
  border: 1px solid rgba(105,94,83,.055) !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,.82) !important;
  box-shadow: 0 8px 28px rgba(54,47,40,.045) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#finance-transaction-form .transaction-settings-card > .field {
  min-height: 60px !important;
  height: 60px !important;
  max-height: 60px !important;
  display: grid !important;
  grid-template-columns: minmax(86px,1fr) minmax(0,230px) !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  background: transparent !important;
  box-shadow: none !important;
}

#finance-transaction-form .transaction-settings-card > .field.quiet-task-card-last {
  border-bottom: 0 !important;
}

#finance-transaction-form .transaction-settings-card > .field > span:first-child {
  margin: 0 !important;
  color: var(--text) !important;
  font-size: 16px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  letter-spacing: -.015em !important;
}

#finance-transaction-form .transaction-settings-card select,
#finance-transaction-form .transaction-settings-card input[type="date"] {
  width: 100% !important;
  min-width: 0 !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 18px 0 0 !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #6d675f !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  text-align: right !important;
  text-align-last: right !important;
}

/* Hide old generic "Type/Comment" structures if stale cached markup survives. */
#finance-transaction-form [data-to-account-field],
#finance-transaction-form .transaction-comment-field {
  display: none !important;
}

@media (max-width: 390px) {
  #finance-transaction-form .transaction-kind-tabs {
    margin-top: 8px !important;
    margin-bottom: 14px !important;
  }

  #finance-transaction-form .transaction-amount-line input {
    font-size: 30px !important;
  }

  #finance-transaction-form .transaction-settings-card {
    margin-top: 18px !important;
    padding-inline: 16px !important;
    border-radius: 20px !important;
  }

  #finance-transaction-form .transaction-settings-card > .field {
    grid-template-columns: minmax(78px,1fr) minmax(0,210px) !important;
    gap: 12px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.96 — TRANSACTION FORM RHYTHM + TRANSFER LABELS
   ========================================================= */

/* Raise transaction type tabs closer to the topbar. */
.finance-form-screen #finance-transaction-form.transaction-task-form {
  margin-top: -12px !important;
}

#finance-transaction-form .transaction-kind-tabs {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}

/* Amount and currency behave as one centered visual unit. */
#finance-transaction-form .transaction-amount-line {
  justify-content: center !important;
}

#finance-transaction-form .transaction-amount-line input {
  width: auto !important;
  min-width: 74px !important;
  max-width: calc(100% - 62px) !important;
  flex: 0 1 auto !important;
  padding: 0 !important;
  margin: 0 0 7px !important;
  text-align: center !important;
}

#finance-transaction-form .transaction-currency-fixed {
  position: static !important;
  min-width: 0 !important;
  margin: 0 0 17px 8px !important;
  color: #777168 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-align: left !important;
}

/* Keep 0 and ₽ centered together even before the input has content. */
#finance-transaction-form .transaction-amount-line {
  padding-left: 30px !important;
  padding-right: 30px !important;
}

/* Note sits tighter to amount. */
#finance-transaction-form .transaction-note-field {
  margin-top: -4px !important;
}

#finance-transaction-form .transaction-note-field textarea {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}

/* Transfer rows use the same visual geometry as other operation settings. */
#finance-transaction-form [data-transaction-first-row],
#finance-transaction-form [data-transaction-second-row] {
  transition: none !important;
}

@media (max-width: 390px) {
  .finance-form-screen #finance-transaction-form.transaction-task-form {
    margin-top: -10px !important;
  }

  #finance-transaction-form .transaction-kind-tabs {
    margin-bottom: 8px !important;
  }

  #finance-transaction-form .transaction-currency-fixed {
    margin-left: 7px !important;
    margin-bottom: 16px !important;
    font-size: 17px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.97 — TRANSACTION FORM ALIGNMENT FIX
   ========================================================= */

/* Remove the hidden intro gap above the form. */
.finance-form-screen .entity-form-intro {
  display: none !important;
}

.finance-form-screen .entity-form-scroll {
  padding-top: 0 !important;
}

.finance-form-screen #finance-transaction-form.transaction-task-form {
  margin-top: 0 !important;
}

/* Tabs should visually match Categories one-to-one. */
#finance-transaction-form .transaction-kind-tabs {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: 4px !important;
  margin: 0 0 12px !important;
  padding: 4px !important;
  border: 1px solid rgba(91,102,91,.07) !important;
  border-radius: 15px !important;
  background: rgba(143,159,138,.075) !important;
  box-sizing: border-box !important;
}

#finance-transaction-form .transaction-kind-tabs label {
  min-height: 38px !important;
  border-radius: 11px !important;
  font-size: 12px !important;
  font-weight: 690 !important;
}

#finance-transaction-form .transaction-kind-tabs label.active {
  background: rgba(255,255,255,.94) !important;
  color: var(--sage-dark) !important;
  box-shadow: 0 4px 12px rgba(67,75,68,.055) !important;
}

/* Amount = one centered compact line. */
#finance-transaction-form .transaction-amount-primary {
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
}

#finance-transaction-form .transaction-amount-line {
  width: 100% !important;
  height: 76px !important;
  min-height: 76px !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 0 !important;
}

#finance-transaction-form .transaction-amount-inline {
  display: inline-flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  margin: 0 0 8px !important;
}

#finance-transaction-form .transaction-amount-line input[data-transaction-amount] {
  width: 1.45ch;
  min-width: 1.45ch !important;
  max-width: calc(100vw - 170px) !important;
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  line-height: 46px !important;
  letter-spacing: -.025em !important;
  text-align: center !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#finance-transaction-form .transaction-amount-line input[data-transaction-amount]::placeholder {
  color: #a7a19a !important;
  opacity: 1 !important;
  font-size: 32px !important;
  font-weight: 600 !important;
}

#finance-transaction-form .transaction-currency-fixed {
  position: static !important;
  min-width: 0 !important;
  margin: 0 0 6px 0 !important;
  color: #777168 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-align: left !important;
  pointer-events: none !important;
}

/* Note line should sit cleanly on the baseline, like in the task form. */
#finance-transaction-form .transaction-note-field {
  width: 100% !important;
  min-height: 58px !important;
  height: 58px !important;
  max-height: 58px !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#finance-transaction-form .transaction-note-field > span {
  display: none !important;
}

#finance-transaction-form .transaction-note-field input {
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#finance-transaction-form .transaction-note-field input::placeholder {
  color: #777168 !important;
  opacity: .72 !important;
}

/* Settings card spacing. */
#finance-transaction-form .transaction-settings-card {
  margin-top: 20px !important;
}

/* Native date indicator must not collide with the shared chevron. */
#finance-transaction-form .transaction-settings-card .quiet-entity-picker-field {
  padding-right: 18px !important;
}

#finance-transaction-form .transaction-settings-card input[type="date"] {
  padding-right: 24px !important;
}

#finance-transaction-form .transaction-settings-card input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0 !important;
  width: 18px !important;
  margin: 0 !important;
  pointer-events: none !important;
}

#finance-transaction-form .transaction-settings-card input[type="date"]::-webkit-date-and-time-value,
#finance-transaction-form .transaction-settings-card input[type="date"]::-webkit-datetime-edit {
  text-align: right !important;
}

@media (max-width: 390px) {
  .finance-form-screen .entity-form-scroll {
    padding-top: 0 !important;
  }

  #finance-transaction-form .transaction-kind-tabs {
    margin-bottom: 10px !important;
  }

  #finance-transaction-form .transaction-amount-primary,
  #finance-transaction-form .transaction-amount-line {
    height: 72px !important;
    min-height: 72px !important;
  }

  #finance-transaction-form .transaction-amount-line input[data-transaction-amount] {
    font-size: 30px !important;
  }

  #finance-transaction-form .transaction-currency-fixed {
    font-size: 17px !important;
  }

  #finance-transaction-form .transaction-settings-card .quiet-entity-picker-field {
    padding-right: 16px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.98 — TRANSACTION FORM FINAL GEOMETRY
   ========================================================= */

/* The generic task-style form adds 42px top padding.
   Transactions need the same compact start as Categories. */
#finance-transaction-form.quiet-task-standard-form {
  padding-top: 10px !important;
}

/* Exact segmented-control geometry used by Categories. */
#finance-transaction-form .transaction-kind-tabs {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: 4px !important;
  margin: 0 0 10px !important;
  padding: 4px !important;
  border: 1px solid rgba(91,102,91,.07) !important;
  border-radius: 15px !important;
  background: rgba(143,159,138,.075) !important;
  box-sizing: border-box !important;
}

#finance-transaction-form .transaction-kind-tabs label {
  min-height: 38px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
border-radius: 11px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 690 !important;
  line-height: 1 !important;
}

#finance-transaction-form .transaction-kind-tabs label.active {
  background: rgba(255,255,255,.94) !important;
  color: var(--sage-dark) !important;
  box-shadow: 0 4px 12px rgba(67,75,68,.055) !important;
}

/* Amount block has no shared form-grid behavior at all. */
#finance-transaction-form .transaction-amount-primary {
  width: 100% !important;
  min-width: 0 !important;
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#finance-transaction-form .transaction-amount-label {
  display: none !important;
}

/* Center the whole "0 ₽" unit, not only the number. */
#finance-transaction-form .transaction-amount-line {
  width: 100% !important;
  height: 76px !important;
  display: grid !important;
  place-items: end center !important;
  margin: 0 !important;
  padding: 0 !important;
}

#finance-transaction-form .transaction-amount-inline {
  width: max-content !important;
  max-width: 100% !important;
  display: inline-grid !important;
  grid-template-columns: max-content max-content !important;
  align-items: end !important;
  justify-content: center !important;
  column-gap: 8px !important;
  margin: 0 auto 8px !important;
  padding: 0 !important;
}

#finance-transaction-form .transaction-amount-inline input[data-transaction-amount] {
  width: 1.45ch;
  min-width: 1.45ch !important;
  max-width: 10ch !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  line-height: 46px !important;
  letter-spacing: -.025em !important;
  text-align: center !important;
  text-align-last: center !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#finance-transaction-form .transaction-amount-inline input[data-transaction-amount]::placeholder {
  color: #a7a19a !important;
  opacity: 1 !important;
}

#finance-transaction-form .transaction-currency-fixed {
  position: static !important;
  display: block !important;
  min-width: 0 !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  color: #777168 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-align: left !important;
}

/* Note is a clean left-aligned task-like row. */
#finance-transaction-form .transaction-note-field {
  width: 100% !important;
  min-width: 0 !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#finance-transaction-form .transaction-note-field > span {
  display: none !important;
}

#finance-transaction-form .transaction-note-field input {
  width: 100% !important;
  min-width: 0 !important;
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 58px !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-align-last: left !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#finance-transaction-form .transaction-note-field input::placeholder {
  color: #777168 !important;
  opacity: .72 !important;
  text-align: left !important;
}

/* Lower settings card follows immediately after the note. */
#finance-transaction-form .transaction-settings-card {
  margin-top: 20px !important;
}

/* Keep a proper runway between the date text and the chevron. */
#finance-transaction-form .transaction-settings-card .quiet-entity-picker-field {
  padding-right: 28px !important;
}

#finance-transaction-form .transaction-settings-card .quiet-entity-picker-field::after {
  right: 2px !important;
}

#finance-transaction-form .transaction-settings-card input[type="date"] {
  padding-right: 10px !important;
  text-align: right !important;
  text-align-last: right !important;
}

#finance-transaction-form .transaction-settings-card input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0 !important;
  display: none !important;
  pointer-events: none !important;
}

@media (max-width: 390px) {
  #finance-transaction-form.quiet-task-standard-form {
    padding-top: 10px !important;
  }

  #finance-transaction-form .transaction-kind-tabs {
    margin-bottom: 8px !important;
  }

  #finance-transaction-form .transaction-amount-primary,
  #finance-transaction-form .transaction-amount-line {
    height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
  }

  #finance-transaction-form .transaction-amount-inline input[data-transaction-amount] {
    font-size: 30px !important;
  }

  #finance-transaction-form .transaction-currency-fixed {
    font-size: 17px !important;
  }

  #finance-transaction-form .transaction-settings-card .quiet-entity-picker-field {
    padding-right: 26px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.99 — AMOUNT + CURRENCY LOCKED TOGETHER
   ========================================================= */

/* Parent provides the exact center reference. */
#finance-transaction-form .transaction-amount-line {
  position: relative !important;
  width: 100% !important;
  height: 76px !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* "0 ₽" is one physical unit centered by its own full width. */
#finance-transaction-form .transaction-amount-inline {
  position: absolute !important;
  left: 50% !important;
  bottom: 8px !important;
  transform: translateX(-50%) !important;

  width: max-content !important;
  max-width: calc(100% - 32px) !important;

  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 6px !important;

  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

/* Number itself stays content-sized. */
#finance-transaction-form .transaction-amount-inline input[data-transaction-amount] {
  display: block !important;
  width: 1.45ch;
  min-width: 1.45ch !important;
  max-width: 9ch !important;

  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;

  flex: 0 0 auto !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  outline: 0 !important;

  background: transparent !important;
  box-shadow: none !important;

  color: var(--text) !important;

  font: inherit !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  line-height: 46px !important;
  letter-spacing: -.025em !important;

  text-align: center !important;
  text-align-last: center !important;

  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Currency is no longer positioned independently in any way. */
#finance-transaction-form .transaction-currency-fixed {
  position: static !important;
  inset: auto !important;

  display: inline-block !important;
  flex: 0 0 auto !important;

  width: auto !important;
  min-width: 0 !important;

  margin: 0 !important;
  padding: 0 !important;

  transform: translateY(-1px) !important;

  color: #777168 !important;

  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;

  text-align: left !important;
  pointer-events: none !important;
}

@media (max-width: 390px) {
  #finance-transaction-form .transaction-amount-line {
    height: 72px !important;
  }

  #finance-transaction-form .transaction-amount-inline {
    bottom: 8px !important;
    gap: 5px !important;
  }

  #finance-transaction-form .transaction-amount-inline input[data-transaction-amount] {
    font-size: 30px !important;
  }

  #finance-transaction-form .transaction-currency-fixed {
    font-size: 17px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.100 — TRANSACTION FORM FINAL VISUAL MATCH
   ========================================================= */

/* Remove extra air under the topbar so the first control sits like Categories. */
#finance-transaction-form.quiet-task-standard-form {
  padding-top: 18px !important;
}

/* Top switch: copy the Categories tabs more literally. */
#finance-transaction-form .transaction-kind-tabs {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 4px !important;
  margin: 0 0 14px !important;
  padding: 4px !important;
  border: 1px solid rgba(91,102,91,.07) !important;
  border-radius: 15px !important;
  background: rgba(143,159,138,.075) !important;
  box-sizing: border-box !important;
}
#finance-transaction-form .transaction-kind-tabs label {
  position: relative !important;
  min-width: 0 !important;
  min-height: 38px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: transparent !important;
}
#finance-transaction-form .transaction-kind-tabs label span {
  display: block !important;
  padding-inline: 0 !important;
  color: var(--muted) !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 690 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}
#finance-transaction-form .transaction-kind-tabs label.active {
  background: rgba(255,255,255,.94) !important;
  box-shadow: 0 4px 12px rgba(67,75,68,.055) !important;
}
#finance-transaction-form .transaction-kind-tabs label.active span {
  color: var(--sage-dark) !important;
}

/* Stronger lock between amount and currency. */
#finance-transaction-form .transaction-amount-primary {
  height: 78px !important;
  min-height: 78px !important;
  max-height: 78px !important;
}
#finance-transaction-form .transaction-amount-line {
  position: relative !important;
  width: 100% !important;
  height: 78px !important;
  min-height: 78px !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
#finance-transaction-form .transaction-amount-inline {
  position: absolute !important;
  left: 50% !important;
  bottom: 8px !important;
  transform: translateX(-50%) !important;
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 2px !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}
#finance-transaction-form .transaction-amount-line input[data-transaction-amount] {
  display: block !important;
  width: 1ch;
  min-width: 1ch !important;
  max-width: 10ch !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  line-height: 46px !important;
  letter-spacing: -.025em !important;
  text-align: center !important;
  text-align-last: center !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
#finance-transaction-form .transaction-amount-line input[data-transaction-amount]::placeholder {
  color: #a7a19a !important;
  opacity: 1 !important;
}
#finance-transaction-form .transaction-currency-fixed {
  position: static !important;
  inset: auto !important;
  display: inline-block !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translateY(-1px) !important;
  color: #777168 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-align: left !important;
  pointer-events: none !important;
}

/* Note placeholder exactly on the row baseline. */
#finance-transaction-form .transaction-note-field {
  min-height: 58px !important;
  height: 58px !important;
  max-height: 58px !important;
}
#finance-transaction-form .transaction-note-field input {
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 18px 0 !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 22px !important;
  letter-spacing: -.01em !important;
  box-sizing: border-box !important;
}

/* Right-side values sit closer to the chevron and feel more centered vertically/right. */
#finance-transaction-form .quiet-task-fields-card .quiet-entity-field {
  grid-template-columns: minmax(100px,.80fr) minmax(0,1.20fr) !important;
  gap: 12px !important;
}
#finance-transaction-form .quiet-task-fields-card .quiet-entity-picker-field {
  padding-right: 13px !important;
}
#finance-transaction-form .quiet-task-fields-card .quiet-entity-picker-field::after {
  right: 1px !important;
}
#finance-transaction-form .quiet-task-fields-card .quiet-entity-field select,
#finance-transaction-form .quiet-task-fields-card .quiet-entity-field input[type="date"],
#finance-transaction-form .quiet-task-fields-card .quiet-entity-field input[type="text"],
#finance-transaction-form .quiet-task-fields-card .quiet-entity-field input[type="number"] {
  padding-right: 2px !important;
  text-align: right !important;
  text-align-last: right !important;
}
#finance-transaction-form .quiet-task-fields-card .quiet-entity-field select {
  direction: rtl !important;
}
#finance-transaction-form .quiet-task-fields-card .quiet-entity-field select option {
  direction: ltr !important;
}

@media (max-width: 390px) {
  #finance-transaction-form.quiet-task-standard-form {
    padding-top: 16px !important;
  }
  #finance-transaction-form .transaction-kind-tabs {
    margin-bottom: 12px !important;
  }
  #finance-transaction-form .transaction-amount-inline {
    gap: 1px !important;
  }
  #finance-transaction-form .quiet-task-fields-card .quiet-entity-field {
    gap: 10px !important;
    grid-template-columns: minmax(96px,.78fr) minmax(0,1.22fr) !important;
  }
}


/* =========================================================
   ARVYNO 0.9.101 — transaction polish
   - remove year suffix in transaction date display
   - pull ₽ tightly next to amount
   ========================================================= */

#finance-transaction-form .transaction-amount-line {
  --transaction-amount-width: 18px;
  --transaction-currency-offset: 16px;
  position: relative !important;
}

#finance-transaction-form .transaction-amount-inline {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#finance-transaction-form .transaction-amount-sizer {
  position: absolute !important;
  left: -9999px !important;
  top: 0 !important;
  visibility: hidden !important;
  white-space: pre !important;
  pointer-events: none !important;
  font: inherit !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  line-height: 46px !important;
  letter-spacing: -.025em !important;
}

#finance-transaction-form .transaction-amount-line input[data-transaction-amount] {
  position: absolute !important;
  left: 50% !important;
  bottom: 8px !important;
  transform: translateX(-50%) !important;
  width: var(--transaction-amount-width) !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#finance-transaction-form .transaction-currency-fixed {
  position: absolute !important;
  left: calc(50% + var(--transaction-currency-offset)) !important;
  right: auto !important;
  bottom: 16px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  text-align: left !important;
}


/* =========================================================
   ARVYNO 0.9.102 — AMOUNT BLOCK REBUILT
   ========================================================= */

/* Completely isolate amount from generic form/label geometry. */
#finance-transaction-form .transaction-amount-primary {
  width: 100% !important;
  min-width: 0 !important;
  height: 78px !important;
  min-height: 78px !important;
  max-height: 78px !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(92,80,68,.10) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#finance-transaction-form .transaction-amount-label {
  display: none !important;
}

#finance-transaction-form .transaction-amount-line {
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 78px !important;
  min-height: 78px !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 0 8px !important;
  box-sizing: border-box !important;
}

#finance-transaction-form .transaction-amount-inline {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 46px !important;
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 3px !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

#finance-transaction-form .transaction-amount-inline input[data-transaction-amount] {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 18px;
  min-width: 18px !important;
  max-width: 260px !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  line-height: 46px !important;
  letter-spacing: -.025em !important;
  text-align: center !important;
  text-align-last: center !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#finance-transaction-form .transaction-amount-inline input[data-transaction-amount]::placeholder {
  color: #a7a19a !important;
  opacity: 1 !important;
}

#finance-transaction-form .transaction-currency-fixed {
  position: static !important;
  inset: auto !important;
  display: inline-block !important;
  width: auto !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translateY(-1px) !important;
  color: #777168 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-align: left !important;
  pointer-events: none !important;
}

#finance-transaction-form .transaction-amount-sizer {
  position: fixed !important;
  left: -9999px !important;
  top: -9999px !important;
  visibility: hidden !important;
  white-space: pre !important;
  pointer-events: none !important;
  font: inherit !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  line-height: 46px !important;
  letter-spacing: -.025em !important;
}

@media (max-width: 390px) {
  #finance-transaction-form .transaction-amount-primary,
  #finance-transaction-form .transaction-amount-line {
    height: 74px !important;
    min-height: 74px !important;
    max-height: 74px !important;
  }
  #finance-transaction-form .transaction-amount-inline input[data-transaction-amount],
  #finance-transaction-form .transaction-amount-sizer {
    font-size: 30px !important;
  }
  #finance-transaction-form .transaction-currency-fixed {
    font-size: 17px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.103 — DYNAMIC AMOUNT WIDTH FIX
   ========================================================= */

/* Old !important rules were keeping the input at ~18px, so values such as
   1000 were clipped and only the final digit was visible.
   The live measured width now comes through a custom property. */
#finance-transaction-form .transaction-amount-inline {
  --transaction-live-amount-width: 18px;
}

#finance-transaction-form .transaction-amount-inline input[data-transaction-amount] {
  width: var(--transaction-live-amount-width) !important;
  min-width: var(--transaction-live-amount-width) !important;
  max-width: var(--transaction-live-amount-width) !important;
  flex: 0 0 var(--transaction-live-amount-width) !important;
}

/* Keep the currency attached to the number while the whole unit remains centered. */
#finance-transaction-form .transaction-amount-inline {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 3px !important;
  width: auto !important;
}

#finance-transaction-form .transaction-currency-fixed {
  flex: 0 0 auto !important;
  margin-left: 0 !important;
}


/* =========================================================
   ARVYNO 0.9.105 — STABLE DECIMAL AMOUNT INPUT
   ========================================================= */

#finance-transaction-form .transaction-amount-inline input[data-transaction-amount][type="text"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  caret-color: var(--text) !important;
}

/* Drafts such as 47, and 47. must remain visible while the user is typing. */
#finance-transaction-form .transaction-amount-inline {
  overflow: visible !important;
}


/* =========================================================
   ARVYNO 0.9.106 — UNIFIED FINANCE PLUS BUTTONS
   ========================================================= */

/* All compact add actions in Finance use the same visual language
   as Tasks, Goals and Categories: only a black plus is visible. */
.page[data-page="finance"] .finance-compact-add {
  position: relative !important;

  width: 32px !important;
  min-width: 32px !important;
  height: 40px !important;
  min-height: 40px !important;
  flex: 0 0 32px !important;

  display: grid !important;
  place-items: center !important;

  margin: -4px 0 0 !important;
  padding: 0 0 2px !important;

  border: 0 !important;
  border-radius: 0 !important;

  background: transparent !important;
  box-shadow: none !important;

  color: var(--text) !important;

  font: inherit !important;
  font-size: 29px !important;
  font-weight: 390 !important;
  line-height: 1 !important;

  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;

  transition:
    opacity 120ms ease,
    transform 120ms ease !important;
}

.page[data-page="finance"] .finance-compact-add::after {
  content: none !important;
  display: none !important;
}

.page[data-page="finance"] .finance-compact-add:active {
  opacity: .5 !important;
  transform: scale(.93) !important;
  background: transparent !important;
  color: var(--text) !important;
}

/* Keep headings and bare plus optically aligned on the same top line. */
.page[data-page="finance"] .finance-section-title-row {
  align-items: flex-start !important;
}

.page[data-page="finance"] .finance-section-actions {
  min-height: 40px !important;
  align-items: flex-start !important;
}

/* On narrow screens preserve the same size as the rest of the app. */
@media (max-width: 390px) {
  .page[data-page="finance"] .finance-compact-add {
    width: 32px !important;
    min-width: 32px !important;
    height: 40px !important;
    min-height: 40px !important;
    flex-basis: 32px !important;
    font-size: 28px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.107 — FINANCE ADJUSTMENTS
   ========================================================= */

.page[data-page="finance"] .account-row-adjustable {
  width: 100% !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  text-align: left !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}

.page[data-page="finance"] .account-row-main,
.page[data-page="finance"] .account-row-side {
  display: flex !important;
  align-items: center !important;
}

.page[data-page="finance"] .account-row-side {
  margin-left: auto !important;
  display: grid !important;
  justify-items: end !important;
  gap: 2px !important;
}

.page[data-page="finance"] .account-row-side small {
  color: #8c857d !important;
  font-size: 10px !important;
  font-weight: 560 !important;
}

.finance-adjustments-card .finance-adjustment-list {
  display: grid !important;
}

.finance-adjustment-row {
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  border-bottom: 1px solid rgba(92,80,68,.09) !important;
}

.finance-adjustment-row:last-child {
  border-bottom: 0 !important;
}

.finance-adjustment-main {
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
}

.finance-adjustment-main b {
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

.finance-adjustment-main small {
  min-width: 0 !important;
  color: #8c857d !important;
  font-size: 10px !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.finance-adjustment-row > strong {
  font-size: 13px !important;
  font-weight: 690 !important;
  white-space: nowrap !important;
}

.finance-adjustment-form .finance-adjustment-current {
  margin: 6px 0 14px !important;
  padding: 15px 17px !important;
  border-radius: 18px !important;
  background: rgba(143,159,138,.075) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

.finance-adjustment-current span {
  color: #7d766e !important;
  font-size: 12px !important;
  font-weight: 560 !important;
}

.finance-adjustment-current b {
  color: var(--text) !important;
  font-size: 16px !important;
  font-weight: 680 !important;
}

.finance-adjustment-kind {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 4px !important;
  margin: 0 0 16px !important;
  padding: 4px !important;
  border: 1px solid rgba(91,102,91,.07) !important;
  border-radius: 15px !important;
  background: rgba(143,159,138,.075) !important;
  box-sizing: border-box !important;
}

.finance-adjustment-kind label {
  position: relative !important;
  min-height: 38px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 11px !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 690 !important;
}

.finance-adjustment-kind label.active {
  background: rgba(255,255,255,.94) !important;
  color: var(--sage-dark) !important;
  box-shadow: 0 4px 12px rgba(67,75,68,.055) !important;
}

.finance-adjustment-kind input {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.finance-adjustment-note {
  margin: 12px 0 0 !important;
  color: #8c857d !important;
font-size: 11px !important;
  line-height: 1.4 !important;
}

/* =========================================================
   ARVYNO 0.9.108 — FINANCE INFORMATION ARCHITECTURE CLEANUP
   - protects root-page content from Telegram native controls while scrolling
   - merges income/expense metrics into the balance card
   - moves Accounts above Operations and folds adjustment history into Accounts
   - removes duplicated Finance Goals and debt/savings budget summaries
   - compacts empty states and recurring payments
   ========================================================= */

/* Root pages without the ARVYNO home wordmark need an opaque native-control
   shield. Padding protects the initial position; this layer also protects the
   same area after the inner .page starts scrolling. */
html.telegram-webapp body.app-page-no-brand .app-shell::before {
  content: "";
  position: absolute;
  z-index: 96;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--arvyno-header-top) + 12px);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(246,242,236,1) 0%,
    rgba(246,242,236,.995) calc(100% - 10px),
    rgba(246,242,236,0) 100%
  );
}

/* Keep Finance comfortably clear of the fixed bottom navigation as well. */
html.telegram-webapp .page[data-page="finance"] {
  padding-bottom: calc(
    112px + max(
      env(safe-area-inset-bottom),
      var(--arvyno-safe-bottom),
      var(--arvyno-content-safe-bottom)
    )
  ) !important;
}

.page[data-page="finance"] {
  gap: 10px !important;
}

/* ----- Balance: one summary card instead of three separate cards ----- */
.page[data-page="finance"] .finance-balance-card {
  padding-bottom: 17px !important;
}

.page[data-page="finance"] .finance-balance-sub {
  margin-top: 7px !important;
}

.page[data-page="finance"] .finance-balance-stats {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: 0 !important;
  margin: 14px 0 0 !important;
  padding-top: 11px !important;
  border-top: 1px solid rgba(255,255,255,.16) !important;
}

.page[data-page="finance"] .finance-balance-stats > div {
  min-width: 0 !important;
  display: grid !important;
  gap: 2px !important;
}

.page[data-page="finance"] .finance-balance-stats > div + div {
  padding-left: 14px !important;
  border-left: 1px solid rgba(255,255,255,.13) !important;
}

.page[data-page="finance"] .finance-balance-stats span {
  color: rgba(255,255,255,.68) !important;
  font-size: 9.5px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
}

.page[data-page="finance"] .finance-balance-stats strong {
  min-width: 0 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 680 !important;
  line-height: 1.25 !important;
  letter-spacing: -.015em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-variant-numeric: tabular-nums !important;
}

.page[data-page="finance"] .finance-actions {
  margin-top: 13px !important;
}

/* Legacy two-card metrics are no longer rendered; keep cached markup safe. */
.page[data-page="finance"] .finance-metrics {
  display: none !important;
}

/* ----- Shared finance cards ----- */
.page[data-page="finance"] .finance-accounts-card,
.page[data-page="finance"] .finance-operations-card,
.page[data-page="finance"] .finance-budget-card,
.page[data-page="finance"] .finance-categories-card,
.page[data-page="finance"] .finance-recurring-card,
.page[data-page="finance"] .finance-debts-card,
.page[data-page="finance"] .finance-savings-card {
  border-radius: 21px !important;
  padding: 15px 16px !important;
}

.page[data-page="finance"] .finance-section-title-row {
  margin-bottom: 3px !important;
}

.page[data-page="finance"] .finance-section-title-row h2 {
  font-size: 20px !important;
  line-height: 1.08 !important;
  letter-spacing: -.035em !important;
}

.page[data-page="finance"] .finance-section-title-row .card-subtitle {
  margin-top: 3px !important;
  font-size: 10.5px !important;
}

.page[data-page="finance"] .finance-section-link {
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  margin-top: 1px !important;
  padding: 5px 0 !important;
  font-size: 10.5px !important;
  line-height: 1.2 !important;
}

/* ----- Accounts ----- */
.page[data-page="finance"] .finance-accounts-card .account-list {
  margin-top: 6px !important;
}

.page[data-page="finance"] .finance-accounts-card .account-row {
  min-height: 58px !important;
  padding: 8px 0 !important;
}

.page[data-page="finance"] .account-row-main {
  min-width: 0 !important;
  gap: 10px !important;
}

.page[data-page="finance"] .account-row-copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 2px !important;
}

.page[data-page="finance"] .account-icon {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 11px !important;
  background: rgba(85,105,86,.075) !important;
  color: #5c6d5d !important;
  font-size: 0 !important;
}

.page[data-page="finance"] .account-icon svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.65 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.page[data-page="finance"] .finance-accounts-card .account-row b {
  max-width: 155px !important;
  color: var(--text) !important;
  font-size: 12.5px !important;
  font-weight: 670 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.page[data-page="finance"] .finance-accounts-card .account-row-main small {
  color: #938b83 !important;
  font-size: 9.5px !important;
  line-height: 1.2 !important;
}

.page[data-page="finance"] .account-row-side {
  min-width: 0 !important;
  max-width: 48% !important;
}

.page[data-page="finance"] .account-row-side strong {
  max-width: 100% !important;
  font-size: 12.5px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-variant-numeric: tabular-nums !important;
}

.page[data-page="finance"] .account-row-side small {
  margin-top: 2px !important;
  color: #8e877f !important;
  font-size: 9.5px !important;
  font-weight: 540 !important;
  white-space: nowrap !important;
}

.page[data-page="finance"] .finance-accounts-empty {
  min-height: 46px !important;
  padding: 12px 0 2px !important;
  justify-content: flex-start !important;
}

/* Adjustment audit trail now lives inside Accounts and is collapsed by default. */
.page[data-page="finance"] .finance-adjustment-history {
  margin-top: 5px !important;
  border-top: 1px solid rgba(92,80,68,.09) !important;
}

.page[data-page="finance"] .finance-adjustment-history > summary {
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 8px 0 5px !important;
  list-style: none !important;
  color: #627363 !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}

.page[data-page="finance"] .finance-adjustment-history > summary::-webkit-details-marker {
  display: none !important;
}

.page[data-page="finance"] .finance-adjustment-history > summary span {
  font-size: 10.5px !important;
  font-weight: 650 !important;
}

.page[data-page="finance"] .finance-adjustment-history > summary small {
  position: relative !important;
  padding-right: 13px !important;
  color: #958e87 !important;
  font-size: 9.5px !important;
  font-weight: 540 !important;
}

.page[data-page="finance"] .finance-adjustment-history > summary small::after {
  content: "›" !important;
  position: absolute !important;
  right: 0 !important;
  top: 50% !important;
  transform: translateY(-52%) rotate(90deg) !important;
  color: #958e87 !important;
  font-size: 14px !important;
  transition: transform 140ms ease !important;
}

.page[data-page="finance"] .finance-adjustment-history[open] > summary small::after {
  transform: translateY(-52%) rotate(-90deg) !important;
}

.page[data-page="finance"] .finance-adjustment-history-body {
  padding: 0 0 5px !important;
}

.page[data-page="finance"] .finance-adjustment-history-body > p {
  margin: 8px 0 1px !important;
  color: #999188 !important;
  font-size: 9px !important;
  line-height: 1.4 !important;
}

.page[data-page="finance"] .finance-adjustment-row {
  min-height: 50px !important;
}

.page[data-page="finance"] .finance-adjustment-main b,
.page[data-page="finance"] .finance-adjustment-row > strong {
  font-size: 11.5px !important;
}

.page[data-page="finance"] .finance-adjustment-main small {
  font-size: 9px !important;
}

/* Old standalone block must never reappear from a stale render. */
.page[data-page="finance"] .finance-adjustments-card {
  display: none !important;
}

/* ----- Operations ----- */
.page[data-page="finance"] .finance-operations-card .transaction-list {
  margin-top: 5px !important;
}

.page[data-page="finance"] .finance-operations-card .transaction-row {
  min-height: 57px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.page[data-page="finance"] .finance-operations-card .transaction-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 11px !important;
  background: rgba(85,105,86,.07) !important;
}

.page[data-page="finance"] .finance-operations-card .transaction-main b {
  font-size: 12.5px !important;
  font-weight: 660 !important;
}

.page[data-page="finance"] .finance-operations-card .transaction-main small {
  font-size: 9.5px !important;
}

.page[data-page="finance"] .finance-operations-card .transaction-amount {
  font-size: 12px !important;
  font-weight: 680 !important;
  font-variant-numeric: tabular-nums !important;
}

/* ----- Budget ----- */
.page[data-page="finance"] .finance-budget-card .budget-row {
  padding: 10px 0 !important;
}

.page[data-page="finance"] .finance-budget-card .budget-row:last-child {
  padding-bottom: 1px !important;
}

.page[data-page="finance"] .finance-budget-card .budget-mini-grid {
  display: none !important;
}

/* ----- Categories ----- */
.page[data-page="finance"] .finance-categories-card .category-spend-list {
  margin-top: 8px !important;
}

.page[data-page="finance"] .finance-categories-card .category-spend-row {
  min-height: 48px !important;
}

/* ----- Recurring payments ----- */
.page[data-page="finance"] .finance-recurring-empty-card {
  padding-bottom: 12px !important;
}

.page[data-page="finance"] .finance-recurring-empty-card .finance-section-title-row {
  margin-bottom: 0 !important;
}

.page[data-page="finance"] .finance-recurring-card .recurring-payment-list {
  margin-top: 6px !important;
}

/* ----- Compact empty Debts / Savings ----- */
.page[data-page="finance"] .finance-entity-compact-card {
  padding: 0 16px !important;
}

.page[data-page="finance"] .finance-empty-entity-action {
  width: 100% !important;
  min-height: 72px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 11px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--text) !important;
  text-align: left !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}

.page[data-page="finance"] .finance-empty-entity-action > span {
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
}

.page[data-page="finance"] .finance-empty-entity-action b {
  font-size: 20px !important;
  font-weight: 730 !important;
  line-height: 1.08 !important;
  letter-spacing: -.035em !important;
}

.page[data-page="finance"] .finance-empty-entity-action small {
  color: #8d867e !important;
  font-size: 10.5px !important;
  line-height: 1.3 !important;
}

.page[data-page="finance"] .finance-empty-entity-action i {
  flex: 0 0 32px !important;
  width: 32px !important;
  height: 40px !important;
  display: grid !important;
  place-items: center !important;
  color: var(--text) !important;
  font-style: normal !important;
  font-size: 29px !important;
  font-weight: 390 !important;
  line-height: 1 !important;
}

.page[data-page="finance"] .finance-empty-entity-action:active {
  opacity: .58 !important;
}

/* The duplicated "Цели и деньги" card was removed from Finance in JS.
   This cache guard prevents old markup from flashing after a hot reload. */
.page[data-page="finance"] .finance-goals-card {
  display: none !important;
}

@media (max-width: 390px) {
  .page[data-page="finance"] .finance-balance-stats strong {
    font-size: 12px !important;
  }

  .page[data-page="finance"] .finance-accounts-card,
  .page[data-page="finance"] .finance-operations-card,
  .page[data-page="finance"] .finance-budget-card,
  .page[data-page="finance"] .finance-categories-card,
  .page[data-page="finance"] .finance-recurring-card,
  .page[data-page="finance"] .finance-debts-card,
  .page[data-page="finance"] .finance-savings-card {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .page[data-page="finance"] .finance-accounts-card .account-row b {
    max-width: 126px !important;
  }

  .page[data-page="finance"] .account-row-side {
    max-width: 50% !important;
  }
}

/* =========================================================
   ARVYNO 0.9.112 — HOME FINAL POLISH
   - denser, quieter Home hierarchy
   - hero shows one useful line instead of repeated copy
   - due habits are visible, so daily progress is explainable
   - Home task row is one clean tap target (except completion check)
   - Finance explicitly says “Сегодня”
   - compact goal has no nested-card effect
   - unified bottom navigation icon system
   ========================================================= */

/* Slightly tighter rhythm: keep air, remove unused vertical runway. */
.page[data-page="today"] {
  gap: 9px !important;
}

.page[data-page="today"] .home-brand-wordmark {
  width: 164px !important;
}

@media (max-width: 390px) {
  .page[data-page="today"] .home-brand-wordmark {
    width: 154px !important;
  }
}

@media (max-width: 360px) {
  .page[data-page="today"] .home-brand-wordmark {
    width: 146px !important;
  }
}

/* The wordmark stays aligned with Telegram chrome, but no longer dominates it. */
html.telegram-webapp .page[data-page="today"] .home-scroll-brand {
  height: calc(var(--arvyno-header-top) + 7px) !important;
}

html.telegram-webapp .page[data-page="today"] {
  padding-top: calc(var(--arvyno-header-top) + 14px) !important;
}

/* Hero: greeting + one dynamic summary + progress. */
.page[data-page="today"] .today-hero {
  padding: 14px 15px 13px !important;
  border-radius: 22px !important;
}

.page[data-page="today"] .today-hero-grid {
  align-items: center !important;
  gap: 12px !important;
}

.page[data-page="today"] .today-hero h1 {
  font-size: clamp(27px, 7vw, 33px) !important;
  line-height: 1 !important;
}

.page[data-page="today"] .today-hero .today-hero-summary {
  margin: 7px 0 0 !important;
  max-width: 320px !important;
  color: var(--muted) !important;
  font-size: 12.5px !important;
  line-height: 1.3 !important;
}

.page[data-page="today"] .today-score {
  min-width: 72px !important;
}

.page[data-page="today"] .today-score .score {
  font-size: 29px !important;
  line-height: 1 !important;
}

.page[data-page="today"] .today-score .date {
  margin-top: 3px !important;
  font-size: 10px !important;
  white-space: nowrap !important;
}

.page[data-page="today"] .today-progress {
  height: 7px !important;
  margin-top: 11px !important;
}

/* No legacy repeated progress caption should survive a stale render. */
.page[data-page="today"] .today-hero .progress-caption {
  display: none !important;
}

/* Home cards share one quieter density. */
.page[data-page="today"] .today-tasks-card,
.page[data-page="today"] .today-finance-card,
.page[data-page="today"] .today-goals-card {
  padding: 15px 16px !important;
  border-radius: 22px !important;
}

.page[data-page="today"] .today-section-header {
  margin-bottom: 8px !important;
  align-items: flex-start !important;
}

.page[data-page="today"] .today-section-title {
  min-height: 30px !important;
  margin-top: -4px !important;
  margin-bottom: -4px !important;
}

/* Keep the 32×40 tap area but reduce the visible + slightly. */
.page[data-page="today"] .today-section-add {
  font-size: 27px !important;
  margin-top: -4px !important;
}

/* ---------------- Home task row ---------------- */
.page[data-page="today"] .home-task-row {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 10px !important;
  min-height: 62px !important;
  padding: 8px 0 !important;
}

.page[data-page="today"] .home-task-main {
  width: 100% !important;
  min-height: 46px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 20px !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.page[data-page="today"] .home-task-copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
}

.page[data-page="today"] .home-task-copy .task-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 16px !important;
  line-height: 1.18 !important;
}

.page[data-page="today"] .home-task-copy .task-meta {
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.page[data-page="today"] .home-task-chevron {
  justify-self: end !important;
  color: rgba(91,81,71,.46) !important;
  font-size: 25px !important;
  font-weight: 380 !important;
  font-style: normal !important;
  line-height: 1 !important;
}

/* Home relies on priority ordering, not a decorative priority dot. */
.page[data-page="today"] .priority-dot {
  display: none !important;
}

/* Old square chevron is never needed on Home after 0.9.112. */
.page[data-page="today"] .task-edit.task-chevron {
  display: none !important;
}

/* ---------------- Due habits inside Today's action card ---------------- */
.page[data-page="today"] .today-inline-habits {
  margin-top: 5px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(92,80,68,.09) !important;
}

.page[data-page="today"] .today-inline-habits-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 2px !important;
}

.page[data-page="today"] .today-inline-habits-head > span {
  color: #706960 !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
}

.page[data-page="today"] .today-inline-habits-head > small {
  color: #948d85 !important;
  font-size: 9.5px !important;
}

.page[data-page="today"] .today-inline-habit-list {
  display: grid !important;
}

.page[data-page="today"] .today-inline-habit-row {
  min-height: 49px !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0,1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  border-bottom: 1px solid rgba(92,80,68,.07) !important;
}

.page[data-page="today"] .today-inline-habit-row:last-child {
  border-bottom: 0 !important;
}

.page[data-page="today"] .today-inline-habit-row .habit-check {
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
}

.page[data-page="today"] .today-inline-habit-main {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 20px !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--text) !important;
  text-align: left !important;
}

.page[data-page="today"] .today-inline-habit-main > span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 640 !important;
}

.page[data-page="today"] .today-inline-habit-main > i {
  justify-self: end !important;
  color: rgba(91,81,71,.42) !important;
  font-size: 23px !important;
  font-style: normal !important;
  line-height: 1 !important;
}

.page[data-page="today"] .today-inline-habit-row.done .today-inline-habit-main > span {
  color: var(--muted) !important;
  text-decoration: line-through !important;
}

.page[data-page="today"] .today-inline-habits-more {
  width: 100% !important;
  margin: 3px 0 -2px !important;
  padding: 7px 0 2px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--sage-dark) !important;
  text-align: left !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
}

/* ---------------- Finance ---------------- */
.page[data-page="today"] .today-finance-card .today-section-heading-copy {
  min-height: 30px !important;
  display: grid !important;
  align-content: start !important;
  gap: 1px !important;
}

.page[data-page="today"] .today-section-period {
  margin-top: -1px !important;
  color: #918980 !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
}

.page[data-page="today"] .today-finance-grid {
  gap: 9px !important;
}

.page[data-page="today"] .today-money-tile {
  padding: 11px 12px !important;
  border-radius: 14px !important;
}

.page[data-page="today"] .today-money-tile span {
  margin-bottom: 5px !important;
  font-size: 10.5px !important;
}

.page[data-page="today"] .today-money-tile b {
  font-size: clamp(17px, 4.8vw, 20px) !important;
}

.page[data-page="today"] .today-net-row {
  padding-top: 10px !important;
}

/* ---------------- Goals ---------------- */
.page[data-page="today"] .today-goals-card .goal-list {
  background: transparent !important;
}

.page[data-page="today"] .today-goals-card .compact-goal,
.page[data-page="today"] .today-goals-card .goal-live {
  margin: 0 !important;
  padding: 8px 0 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.page[data-page="today"] .today-goals-card .compact-goal:hover,
.page[data-page="today"] .today-goals-card .compact-goal:active {
  background: transparent !important;
}

.page[data-page="today"] .today-goals-card .goal-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 11px !important;
}

.page[data-page="today"] .today-goals-card .goal-title {
  font-size: 15.5px !important;
}

.page[data-page="today"] .today-goals-card .goal-meta {
  margin-top: 2px !important;
  margin-bottom: 6px !important;
  font-size: 11px !important;
}

.page[data-page="today"] .today-goals-card .goal-deadline-below {
  margin-top: 6px !important;
  color: var(--muted) !important;
  font-size: 10px !important;
}

/* ---------------- One icon language for bottom navigation ---------------- */
.bottom-nav .nav-item .nav-icon {
  width: 24px !important;
  height: 24px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 0 !important;
  line-height: 1 !important;
}

.bottom-nav .nav-item .nav-icon svg {
  width: 23px !important;
  height: 23px !important;
  display: block !important;
  overflow: visible !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.65 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.bottom-nav .nav-item {
  gap: 5px !important;
}

.bottom-nav .nav-item small {
  font-size: 10px !important;
}

@media (max-width: 390px) {
  .page[data-page="today"] .today-tasks-card,
  .page[data-page="today"] .today-finance-card,
  .page[data-page="today"] .today-goals-card {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .page[data-page="today"] .today-hero {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}


/* =========================================================
   ARVYNO 0.9.113 — HOME FINAL FIX
   - repairs Goals/Profile bottom-nav SVG markup
   - tightens Today's action card without reducing tap targets
   - quiets the habits subsection label
   - makes habit-goal percentage semantics explicit
   - slightly reduces visible Home add icons
   ========================================================= */

/* Keep section add controls easy to tap, but visually subordinate to headings. */
.page[data-page="today"] .today-section-add {
  font-size: 24px !important;
}

/* Tasks: ~10% less vertical runway, same clear hierarchy. */
.page[data-page="today"] .today-tasks-card {
  padding-top: 14px !important;
  padding-bottom: 13px !important;
}

.page[data-page="today"] .home-task-row {
  min-height: 56px !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

.page[data-page="today"] .home-task-main {
  min-height: 44px !important;
}

.page[data-page="today"] .today-inline-habits {
  margin-top: 3px !important;
  padding-top: 8px !important;
}

.page[data-page="today"] .today-inline-habits-head {
  margin-bottom: 0 !important;
}

.page[data-page="today"] .today-inline-habits-head > span {
  color: #817a72 !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: .075em !important;
  text-transform: uppercase !important;
}

.page[data-page="today"] .today-inline-habits-head > small {
  font-size: 9px !important;
}

.page[data-page="today"] .today-inline-habit-row {
  min-height: 44px !important;
}

.page[data-page="today"] .today-inline-habit-main {
  min-height: 42px !important;
}

/* Habit-linked goals use two separate meanings:
   completion % above, calendar position below. */
.page[data-page="today"] .today-goals-card .compact-goal .goal-meta {
  color: #817a72 !important;
}

.page[data-page="today"] .today-goals-card .compact-goal .goal-deadline-below {
  line-height: 1.3 !important;
}


/* =========================================================
   ARVYNO 0.9.120 — TASKS FINAL UX
   - one-line progress summary
   - no duplicate progress bar
   - Today label + tappable return-to-today date
   - tighter rows/card and smaller completion control
   - whole task row opens details
   - completed tasks collapse into a quiet group
   ========================================================= */
.page[data-page="plan"] .tasks-header-v093 .tasks-heading-summary {
  gap: 0 !important;
}
.page[data-page="plan"] .tasks-header-v093 .tasks-heading-summary b {
  font-size: 12px !important;
  font-weight: 670 !important;
}
.page[data-page="plan"] .tasks-header-v093 .tasks-heading-summary span,
.page[data-page="plan"] .tasks-day-card .plan-progress {
  display: none !important;
}

.page[data-page="plan"] .tasks-day-card {
  padding: 12px 16px 10px !important;
}
.page[data-page="plan"] .tasks-date-slider {
  min-height: 38px !important;
  grid-template-columns: 44px minmax(0,1fr) 44px !important;
  gap: 4px !important;
  margin-bottom: 8px !important;
}
.page[data-page="plan"] .tasks-date-current {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 8px 4px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--text) !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 720 !important;
  line-height: 1.2 !important;
  letter-spacing: -.018em !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}
.page[data-page="plan"] .tasks-date-current:active {
  opacity: .62 !important;
}
.page[data-page="plan"] .tasks-date-arrow {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
}

.page[data-page="plan"] .plan-task-list .task {
  grid-template-columns: 25px minmax(0,1fr) 18px !important;
  gap: 9px !important;
  min-height: 48px !important;
  padding: 7px 0 !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}
.page[data-page="plan"] .plan-task-list .task:active {
  opacity: .72 !important;
}
.page[data-page="plan"] .plan-task-list .task-main {
  width: 100% !important;
  cursor: pointer !important;
}
.page[data-page="plan"] .plan-task-list .check {
  width: 21px !important;
  height: 21px !important;
  min-width: 21px !important;
}
.page[data-page="plan"] .plan-task-list .task-edit.task-chevron {
  width: 18px !important;
  height: 32px !important;
  pointer-events: none !important;
}
.page[data-page="plan"] .plan-task-list .task-title {
  font-size: 15px !important;
  line-height: 1.2 !important;
}
.page[data-page="plan"] .plan-task-list .task-meta {
  margin-top: 1px !important;
  font-size: 10.5px !important;
}

.page[data-page="plan"] .tasks-completed-group {
  margin-top: 4px !important;
  border-top: 1px solid rgba(92,80,68,.09) !important;
}
.page[data-page="plan"] .tasks-completed-group > summary {
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 8px 0 6px !important;
  list-style: none !important;
  color: rgba(98,91,84,.78) !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}
.page[data-page="plan"] .tasks-completed-group > summary::-webkit-details-marker {
  display: none !important;
}
.page[data-page="plan"] .tasks-completed-group > summary span {
  font-size: 11.5px !important;
  font-weight: 650 !important;
}
.page[data-page="plan"] .tasks-completed-group > summary i {
  font-style: normal !important;
  font-size: 18px !important;
  line-height: 1 !important;
  transition: transform .16s ease !important;
}
.page[data-page="plan"] .tasks-completed-group[open] > summary i {
  transform: rotate(180deg) !important;
}
.page[data-page="plan"] .tasks-completed-list .task:first-child {
  border-top: 0 !important;
}

.page[data-page="plan"] .tasks-empty-centered {
  min-height: 120px !important;
  padding: 18px 8px !important;
}
.page[data-page="plan"] .tasks-empty-centered .tasks-empty-icon {
  width: 38px !important;
  height: 38px !important;
}

@media (max-width: 390px) {
  .page[data-page="plan"] .tasks-date-current { font-size: 14px !important; }
  .page[data-page="plan"] .tasks-day-card { padding-inline: 14px !important; }
}
