:root {
  --ink: #1d2a24;
  --ink-soft: #44534c;
  --muted: #718078;
  --paper: #f3f0e8;
  --card: #fffdf8;
  --card-strong: #ffffff;
  --line: #ddd9ce;
  --line-soft: #ebe7dd;
  --green: #24483a;
  --green-deep: #17352a;
  --green-soft: #dfe9df;
  --sage: #a9bea9;
  --lime: #d6e28c;
  --coral: #dc765b;
  --coral-soft: #f4ded7;
  --gold: #c89c4f;
  --gold-soft: #f2e7cc;
  --blue: #718e9c;
  --blue-soft: #dce7eb;
  --lavender: #9a8bab;
  --lavender-soft: #e9e2ed;
  --danger: #a94f45;
  --shadow: 0 18px 50px rgba(45, 54, 48, 0.08);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 90% 5%, rgba(214, 226, 140, 0.16), transparent 23rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

button,
[role="button"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(113, 142, 156, 0.3);
  outline-offset: 2px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.app-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 22px;
  overflow: hidden;
  color: #f5f4ec;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--green-deep);
  background-size: 32px 32px;
}

.sidebar::after {
  content: "";
  position: absolute;
  right: -84px;
  bottom: 64px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(214, 226, 140, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(214, 226, 140, 0.035);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 9px 30px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px 14px 14px 4px;
  color: var(--green-deep);
  background: var(--lime);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
}

.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.06em;
}

.brand span {
  display: block;
  margin-top: 1px;
  color: rgba(245, 244, 236, 0.5);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  gap: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  color: rgba(245, 244, 236, 0.7);
  background: transparent;
  text-align: left;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.065);
}

.nav-item.active {
  color: var(--green-deep);
  background: var(--lime);
  font-weight: 600;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -18px;
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--lime);
}

.nav-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
}

.nav-item.active .nav-count {
  color: var(--green-deep);
  background: rgba(23, 53, 42, 0.12);
}

.sidebar-note {
  position: relative;
  z-index: 1;
  margin: auto 4px 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.note-kicker {
  color: var(--lime);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.sidebar-note p {
  margin: 8px 0 0;
  color: rgba(245, 244, 236, 0.73);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.7;
}

.settings-button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  color: rgba(245, 244, 236, 0.58);
  background: transparent;
}

.settings-button:hover {
  color: #fff;
}

.main-content {
  width: 100%;
  max-width: 1540px;
  min-width: 0;
  margin: 0 auto;
  padding: 36px clamp(24px, 4vw, 64px) 70px;
}

.mobile-header,
.mobile-nav {
  display: none;
}

.page {
  animation: page-in 320ms ease both;
}

.page[hidden] {
  display: none;
}

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

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 118px;
  gap: 30px;
  margin-bottom: 28px;
}

.page-heading h1 {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 600;
  line-height: 1.23;
  letter-spacing: -0.035em;
}

.eyebrow,
.panel-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.18em;
}

.heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.8);
  color: var(--ink-soft);
  font-size: 11px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 11px;
  font-weight: 650;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 7px 18px rgba(36, 72, 58, 0.16);
}

.button-primary:hover {
  background: var(--green-deep);
}

.button-ghost {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.72);
}

.button-ghost:hover {
  border-color: #c6c2b7;
  background: var(--card);
}

.button-danger {
  color: var(--danger);
  border-color: #e3c3be;
  background: #fbf0ee;
}

.icon-button,
.round-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
}

.icon-button:hover,
.round-button:hover {
  border-color: #bfc8c0;
  background: #fff;
}

.hero-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 262px;
  margin-bottom: 34px;
  padding: clamp(26px, 4vw, 42px);
  overflow: hidden;
  border-radius: 28px;
  color: #f5f4ec;
  background:
    radial-gradient(circle at 85% 20%, rgba(214, 226, 140, 0.18), transparent 15rem),
    linear-gradient(125deg, var(--green-deep), #294f40);
  box-shadow: 0 18px 50px rgba(23, 53, 42, 0.14);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(660px, 68%);
}

.hero-kicker {
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.hero-quote {
  margin: 14px 0 24px;
  font-family: var(--serif);
  font-size: clamp(25px, 3.3vw, 42px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.015em;
}

.hero-foot {
  display: flex;
  align-items: center;
  gap: 13px;
  color: rgba(245, 244, 236, 0.6);
  font-size: 12px;
}

.hero-foot-line {
  width: 36px;
  height: 1px;
  background: rgba(245, 244, 236, 0.25);
}

.hero-foot button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  color: #f5f4ec;
  background: transparent;
  font-size: 12px;
}

.hero-foot .icon {
  width: 14px;
}

.hero-progress {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  margin-right: clamp(8px, 3vw, 50px);
}

.hero-progress p {
  margin: 10px 0 0;
  color: rgba(245, 244, 236, 0.7);
  font-size: 11px;
}

.progress-ring {
  --progress: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: conic-gradient(var(--lime) var(--progress), rgba(255, 255, 255, 0.11) 0);
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #234638;
}

.progress-ring span {
  position: relative;
  font-family: var(--serif);
  font-size: 29px;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  right: 125px;
  width: 245px;
  height: 245px;
}

.orbit-two {
  right: 80px;
  width: 335px;
  height: 335px;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-title-row h2,
.panel-heading h2,
.daily-investment h2 {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  text-decoration: none;
}

.text-link:hover {
  color: var(--green);
}

.text-link .icon {
  width: 15px;
  height: 15px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  position: relative;
  min-height: 135px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--card);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -32px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-soft, var(--green-soft));
  opacity: 0.6;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: var(--accent, var(--green));
  background: var(--accent-soft, var(--green-soft));
}

.stat-icon .icon {
  width: 15px;
}

.stat-value {
  margin: 14px 0 1px;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 600;
  line-height: 1.1;
}

.stat-value small {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
}

.stat-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--card);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-heading .round-button {
  width: 34px;
  height: 34px;
}

.panel-heading .round-button .icon {
  width: 16px;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.today-plan-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.plan-row {
  display: grid;
  grid-template-columns: 53px 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line-soft);
}

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

.plan-time {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.plan-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cat-color, var(--green));
}

.plan-copy {
  min-width: 0;
}

.plan-copy strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-copy span {
  color: var(--muted);
  font-size: 10px;
}

.plan-row.done .plan-copy strong {
  color: #8a948f;
  text-decoration: line-through;
}

.check-button {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid #cfd3cb;
  border-radius: 8px;
  color: transparent;
  background: transparent;
}

.check-button .icon {
  width: 14px;
  height: 14px;
}

.check-button.checked {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.rhythm-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(30px, 1fr));
  align-items: end;
  gap: 9px;
  height: 138px;
  margin: 5px 0 15px;
}

.rhythm-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 7px;
}

.rhythm-bar-wrap {
  display: flex;
  align-items: flex-end;
  width: min(26px, 77%);
  height: 98px;
  border-radius: 7px 7px 0 0;
  background: #eeece5;
}

.rhythm-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 7px 7px 0 0;
  background: var(--green);
  transition: height 300ms ease;
}

.rhythm-day.today .rhythm-bar {
  background: var(--coral);
}

.rhythm-day label {
  color: var(--muted);
  font-size: 9px;
}

.rhythm-day.today label {
  color: var(--coral);
  font-weight: 650;
}

.rhythm-insight {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink-soft);
  background: #f1efe8;
  font-size: 11px;
}

.rhythm-insight .icon {
  width: 14px;
  color: var(--gold);
}

.reading-panel {
  min-height: 260px;
}

.reading-feature {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 8px 0 14px;
}

.book-cover-mini {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 82px;
  height: 112px;
  padding: 12px 9px;
  overflow: hidden;
  border-radius: 4px 10px 10px 4px;
  color: #fff;
  background: var(--book-color, var(--green));
  box-shadow: 6px 8px 20px rgba(29, 42, 36, 0.16);
}

.book-cover-mini::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 7px;
  width: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.book-cover-mini span {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.3;
}

.reading-copy .book-meta-label {
  color: var(--coral);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.reading-copy h3 {
  margin: 5px 0 2px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.35;
}

.reading-copy p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.reading-copy blockquote {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--coral);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.6;
}

.journal-preview-panel {
  min-height: 260px;
}

.journal-snippet {
  position: relative;
  min-height: 172px;
  padding: 18px 18px 16px 22px;
  border-left: 2px solid #d8c778;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      rgba(69, 83, 76, 0.08) 32px
    );
}

.journal-snippet::before {
  content: "“";
  position: absolute;
  left: 8px;
  top: 1px;
  color: #cfbf75;
  font-family: var(--serif);
  font-size: 30px;
}

.journal-snippet p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 2.15;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.journal-snippet .snippet-empty {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
}

.journal-snippet footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  min-height: 105px;
  padding: 14px;
}

.empty-state .empty-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 9px;
  border: 1px dashed #c9c7bd;
  border-radius: 50%;
  color: var(--green);
}

.empty-state p {
  max-width: 300px;
  margin: 0;
  font-size: 12px;
}

.empty-state button {
  margin-top: 12px;
}

/* Weekly planner */
.week-switcher,
.date-picker-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.74);
}

.week-switcher .icon-button,
.date-picker-wrap .icon-button {
  width: 33px;
  height: 33px;
  border: 0;
  background: transparent;
}

.week-switcher .icon,
.date-picker-wrap .icon {
  width: 15px;
}

.week-label {
  min-width: 112px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.date-picker-wrap input {
  width: 132px;
  padding: 5px 2px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.week-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.week-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 15px 17px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--card);
}

.week-summary-item .summary-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--accent, var(--green));
  background: var(--accent-soft, var(--green-soft));
}

.week-summary-item strong {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
}

.week-summary-item span {
  color: var(--muted);
  font-size: 10px;
}

.week-board {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
}

.week-board-head {
  background: #ebe8df;
}

.week-day-columns,
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.week-day-columns > div {
  min-width: 0;
  padding: 14px 12px 12px;
  border-right: 1px solid #d9d5ca;
  text-align: center;
}

.week-day-columns > div:last-child {
  border-right: 0;
}

.week-day-columns span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.week-day-columns strong {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin-top: 4px;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 17px;
}

.week-day-columns .today strong {
  color: #fff;
  background: var(--coral);
}

.week-day-column {
  min-height: 410px;
  padding: 10px 8px;
  border-right: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.2);
}

.week-day-column:last-child {
  border-right: 0;
}

.week-day-column.today {
  background: rgba(220, 118, 91, 0.035);
}

.week-task-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.week-task {
  position: relative;
  display: block;
  width: 100%;
  min-height: 75px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--cat-color, var(--green));
  border-radius: 9px;
  background: var(--card-strong);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.week-task:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(40, 48, 43, 0.08);
}

.week-task-main {
  display: block;
  width: 100%;
  min-height: 73px;
  padding: 10px 29px 9px 11px;
  border: 0;
  background: transparent;
  text-align: left;
}

.week-task-main:hover {
  background: rgba(223, 233, 223, 0.16);
}

.week-task-check {
  position: absolute;
  top: 7px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #cdd3cc;
  border-radius: 6px;
  color: transparent;
  background: var(--card-strong);
}

.week-task-check .icon {
  width: 11px;
  height: 11px;
}

.week-task-check.checked {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.week-task .task-time {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.week-task strong {
  display: -webkit-box;
  margin: 2px 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.week-task .task-category {
  color: var(--cat-color, var(--green));
  font-size: 8px;
}

.week-task.done {
  opacity: 0.62;
}

.week-task.done strong {
  text-decoration: line-through;
}

.add-task-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 33px;
  margin-top: 7px;
  border: 1px dashed #d6d2c7;
  border-radius: 8px;
  color: #9ba29d;
  background: transparent;
  font-size: 10px;
}

.add-task-mini:hover {
  border-color: var(--sage);
  color: var(--green);
  background: rgba(223, 233, 223, 0.4);
}

.week-footer-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 15px 18px;
  border-radius: 13px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.55);
}

.week-footer-note p {
  margin: 0;
  font-size: 11px;
}

.tiny-mark {
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* Books */
.book-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 22px;
}

.book-stat {
  padding: 17px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--card);
}

.book-stat span {
  color: var(--muted);
  font-size: 10px;
}

.book-stat strong {
  display: block;
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}

.book-stat small {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #e9e6dd;
}

.filter-tab {
  min-height: 34px;
  padding: 0 15px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.filter-tab.active {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 2px 6px rgba(40, 48, 43, 0.07);
}

.toolbar-note {
  color: var(--muted);
  font-size: 11px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.book-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 19px;
  background: var(--card);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.book-card-top {
  display: grid;
  grid-template-columns: 57px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
}

.book-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 57px;
  height: 78px;
  padding: 8px;
  overflow: hidden;
  border-radius: 3px 8px 8px 3px;
  color: #fff;
  background: var(--book-color, var(--green));
  box-shadow: 5px 6px 13px rgba(29, 42, 36, 0.16);
}

.book-cover::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 6px;
  width: 1px;
  background: rgba(255, 255, 255, 0.24);
}

.book-cover span {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.4;
}

.book-title-wrap {
  min-width: 0;
}

.book-title-wrap h3 {
  display: -webkit-box;
  margin: 2px 0 3px;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.book-author {
  color: var(--muted);
  font-size: 10px;
}

.book-menu {
  display: flex;
  gap: 1px;
}

.book-menu button {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #9ba29d;
  background: transparent;
}

.book-menu button:hover {
  color: var(--green);
  background: var(--green-soft);
}

.book-menu .delete-book:hover {
  color: var(--danger);
  background: #f8e8e5;
}

.book-menu .icon {
  width: 13px;
}

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--ink-soft);
  background: #f0eee7;
  font-size: 9px;
}

.tag.purchased {
  color: var(--green);
  background: var(--green-soft);
}

.tag.not-purchased {
  color: #91654b;
  background: var(--gold-soft);
}

.tag.status-want {
  color: #9a5543;
  background: var(--coral-soft);
}

.tag.status-reading {
  color: #4e7486;
  background: var(--blue-soft);
}

.tag.status-finished {
  color: #6c5f7c;
  background: var(--lavender-soft);
}

.book-note {
  display: -webkit-box;
  min-height: 62px;
  margin: 14px 0 0;
  padding-top: 12px;
  overflow: hidden;
  border-top: 1px dashed var(--line);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.book-note.empty {
  color: #9ba29d;
  font-family: var(--sans);
}

.book-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 9px;
}

.rating {
  color: var(--gold);
  letter-spacing: 0.08em;
}

/* Journal */
.journal-date-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: -3px 0 17px;
}

.journal-date-line span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.09em;
}

.journal-date-line h2 {
  margin: 1px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}

.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.save-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #75a486;
}

.save-indicator.saving i {
  background: var(--gold);
}

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

.journal-card {
  position: relative;
  min-height: 264px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--card);
}

.journal-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 110px;
  height: 110px;
  border: 1px solid var(--accent-soft, var(--green-soft));
  border-radius: 50%;
  pointer-events: none;
}

.food-card {
  --accent: #bb7b55;
  --accent-soft: #f2dfd3;
}

.timeline-card {
  --accent: #647f8f;
  --accent-soft: #dfe8ec;
}

.thought-card {
  --accent: #8d7c9e;
  --accent-soft: #e9e2ed;
}

.gratitude-card {
  --accent: #bc6a64;
  --accent-soft: #f2dfdd;
}

.journal-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 17px;
}

.journal-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
}

.journal-icon .icon {
  width: 18px;
}

.journal-card-head > div:nth-child(2) {
  min-width: 0;
}

.journal-card-head span {
  display: block;
  color: var(--accent);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.journal-card-head h3 {
  margin: 1px 0 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.journal-card textarea {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 145px;
  padding: 8px 2px;
  resize: vertical;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 2;
}

.journal-card textarea::placeholder {
  color: #a4aaa5;
  font-family: var(--sans);
  font-size: 12px;
}

.journal-card textarea:focus {
  outline: none;
}

.mini-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 29px;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 10px;
}

.mini-add .icon {
  width: 13px;
}

.timeline-editor {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 29px;
  align-items: center;
  gap: 7px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-soft);
}

.timeline-row input {
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
}

.timeline-row input:hover,
.timeline-row input:focus {
  border-color: var(--line);
  background: #fff;
  outline: 0;
}

.timeline-row .row-delete,
.log-row .row-delete {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #a0a6a1;
  background: transparent;
}

.row-delete:hover {
  color: var(--danger);
  background: #f8e8e5;
}

.row-delete .icon {
  width: 13px;
}

.daily-investment {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: #e9eee5;
}

.daily-investment-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.daily-investment-head p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

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

.investment-block {
  min-width: 0;
}

.investment-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(68, 83, 76, 0.14);
}

.investment-title strong {
  font-family: var(--serif);
  font-size: 15px;
}

.investment-title > span:nth-of-type(2) {
  color: var(--muted);
  font-size: 10px;
}

.investment-title .text-link {
  margin-left: auto;
}

.investment-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.investment-dot.exercise {
  background: var(--coral);
}

.investment-dot.reading {
  background: var(--blue);
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 9px;
}

.log-row {
  display: grid;
  grid-template-columns: minmax(85px, 1fr) 76px 76px 27px;
  align-items: center;
  gap: 6px;
}

.log-row.reading-row {
  grid-template-columns: minmax(95px, 1fr) 76px 27px;
}

.log-row input,
.log-row select {
  min-width: 0;
  height: 33px;
  padding: 0 7px;
  border: 1px solid rgba(68, 83, 76, 0.14);
  border-radius: 7px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.74);
  font-size: 10px;
}

.log-empty {
  padding: 12px 0;
  color: #8b948e;
  font-size: 10px;
}

/* Summary */
.summary-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 30px;
  margin-bottom: 16px;
  padding: 30px;
  overflow: hidden;
  border-radius: 24px;
  color: #f6f5ee;
  background:
    radial-gradient(circle at 95% 5%, rgba(214, 226, 140, 0.16), transparent 14rem),
    var(--green-deep);
}

.summary-hero::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.summary-intro {
  position: relative;
  z-index: 1;
}

.summary-intro .panel-kicker {
  color: var(--lime);
}

.summary-intro h2 {
  max-width: 650px;
  margin: 8px 0 11px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.45;
}

.summary-intro > p {
  max-width: 660px;
  margin: 0;
  color: rgba(246, 245, 238, 0.68);
  font-size: 12px;
  line-height: 1.85;
}

.summary-pullquote {
  margin-top: 22px;
  padding: 12px 15px;
  border-left: 2px solid var(--lime);
  color: rgba(246, 245, 238, 0.85);
  background: rgba(255, 255, 255, 0.045);
  font-family: var(--serif);
  font-size: 12px;
}

.summary-numbers {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: center;
}

.summary-number {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
}

.summary-number span {
  color: rgba(246, 245, 238, 0.58);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.summary-number strong {
  display: block;
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
}

.summary-card {
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--card);
}

.summary-card.wide {
  grid-column: 1 / -1;
}

.summary-card h2 {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}

.summary-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.goal-metrics {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

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

.goal-metric-head strong {
  font-size: 12px;
}

.goal-metric-head span {
  color: var(--muted);
  font-size: 10px;
}

.goal-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 20px;
  background: #ece9e1;
}

.goal-track i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 20px;
  background: var(--bar-color, var(--green));
}

.goal-metric-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.weekly-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weekly-bar-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.weekly-bar-row > span {
  color: var(--muted);
  font-size: 9px;
}

.weekly-bar-row > span:last-child {
  text-align: right;
}

.weekly-bar-track {
  display: flex;
  height: 12px;
  gap: 2px;
  overflow: hidden;
  border-radius: 3px;
  background: #eeece5;
}

.weekly-bar-exercise,
.weekly-bar-reading {
  height: 100%;
  transform-origin: left;
}

.weekly-bar-exercise {
  background: var(--coral);
}

.weekly-bar-reading {
  background: var(--blue);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 9px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.chart-legend .exercise {
  background: var(--coral);
}

.chart-legend .reading {
  background: var(--blue);
}

.insight-list {
  display: flex;
  flex-direction: column;
}

.insight-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.insight-item:first-child {
  padding-top: 1px;
}

.insight-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.insight-index {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
  font-family: var(--serif);
  font-size: 11px;
}

.insight-item strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.insight-item p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.next-step {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 17px;
  color: #f6f5ee;
  background: var(--green);
}

.next-step-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--green-deep);
  background: var(--lime);
}

.next-step span {
  color: rgba(246, 245, 238, 0.58);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.next-step p {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 14px;
}

.book-week-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.book-week-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  padding: 8px 10px;
  border-radius: 11px;
  background: #f1efe8;
}

.book-week-item .mini-book {
  display: grid;
  place-items: center;
  width: 30px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 3px 6px 6px 3px;
  color: #fff;
  background: var(--book-color, var(--green));
  font-family: var(--serif);
  font-size: 11px;
}

.book-week-item strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-week-item span {
  color: var(--muted);
  font-size: 9px;
}

.book-week-item .book-week-status {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--card);
  white-space: nowrap;
}

/* Dialogs and forms */
.modal {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 32px 80px rgba(20, 29, 24, 0.28);
}

.modal::backdrop {
  background: rgba(21, 31, 26, 0.52);
  backdrop-filter: blur(3px);
}

.modal form {
  padding: 26px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.modal-head h2 {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}

.modal-head .icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  background: #f0eee7;
}

.modal-head .icon {
  width: 15px;
}

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

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
}

.field-full,
.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fffefa;
  font-size: 13px;
}

.field textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.7;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a4aaa5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--sage);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(169, 190, 169, 0.2);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.settings-section {
  padding: 19px 0;
  border-top: 1px solid var(--line-soft);
}

.settings-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.settings-section h3 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 17px;
}

.settings-section p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 11px;
}

.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.danger-zone {
  margin-top: 3px;
  padding: 15px;
  border: 1px solid #ead5d1;
  border-radius: 12px;
  background: #fcf6f4;
}

.danger-zone .button {
  min-height: 38px;
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 24px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--green-deep);
  box-shadow: 0 12px 30px rgba(20, 29, 24, 0.22);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .week-task strong {
    font-size: 10px;
  }

  .summary-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.85fr);
  }
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 0 18px 104px;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    padding: 8px 0;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 600;
  }

  .mobile-brand span {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    overflow: hidden;
    border-radius: 8px 8px 8px 3px;
    background: #fffaf0;
    font-size: 14px;
  }

  .mobile-brand span img {
    width: 31px;
    height: 31px;
    object-fit: cover;
  }

  .mobile-header .icon-button {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
  }

  .mobile-nav {
    position: fixed;
    z-index: 12;
    left: 13px;
    right: 13px;
    bottom: 12px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 19px;
    background: rgba(23, 53, 42, 0.96);
    box-shadow: 0 13px 36px rgba(23, 53, 42, 0.24);
    backdrop-filter: blur(12px);
  }

  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 49px;
    gap: 2px;
    border: 0;
    border-radius: 13px;
    color: rgba(255, 255, 255, 0.52);
    background: transparent;
    font-size: 8px;
  }

  .mobile-nav button.active {
    color: var(--green-deep);
    background: var(--lime);
  }

  .mobile-nav .icon {
    width: 17px;
    height: 17px;
  }

  .page-heading {
    min-height: auto;
    margin-bottom: 23px;
  }

  .dashboard-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-card.wide {
    grid-column: auto;
  }

  .week-board {
    overflow-x: auto;
  }

  .week-day-columns,
  .week-grid {
    min-width: 760px;
  }
}

@media (max-width: 720px) {
  .main-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .page-heading {
    display: block;
  }

  .page-heading h1 {
    font-size: 34px;
  }

  .heading-actions {
    justify-content: flex-start;
    margin-top: 18px;
  }

  .hero-card {
    min-height: 280px;
    padding: 25px;
  }

  .hero-copy {
    width: 100%;
    align-self: flex-start;
  }

  .hero-quote {
    max-width: 85%;
    font-size: 27px;
  }

  .hero-foot {
    max-width: none;
    padding-right: 90px;
    flex-wrap: wrap;
  }

  .hero-progress {
    position: absolute;
    right: 12px;
    bottom: 15px;
    margin: 0;
    transform: scale(0.66);
    transform-origin: bottom right;
  }

  .hero-orbit {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .stat-card {
    min-height: 126px;
    padding: 15px;
  }

  .stat-value {
    font-size: 25px;
  }

  .panel {
    padding: 18px;
  }

  .week-summary-strip,
  .book-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-stats {
    gap: 8px;
  }

  .book-stat {
    padding: 13px;
  }

  .book-stat strong {
    font-size: 21px;
  }

  .books-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: flex-start;
  }

  .filter-tabs {
    max-width: 100%;
    overflow-x: auto;
  }

  .filter-tab {
    padding: 0 11px;
    white-space: nowrap;
  }

  .journal-grid {
    grid-template-columns: 1fr;
  }

  .journal-card {
    min-height: auto;
  }

  .investment-columns {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .summary-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .summary-numbers {
    grid-template-columns: repeat(2, 1fr);
  }

  .chart-toolbar,
  .daily-investment-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-row {
    grid-template-columns: 72px minmax(0, 1fr) 27px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-full,
  .field-wide {
    grid-column: auto;
  }

  .modal form {
    padding: 20px;
  }

  .date-picker-wrap input {
    width: 112px;
  }
}

@media (max-width: 410px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-quote {
    max-width: 100%;
    font-size: 24px;
  }

  .hero-foot-line {
    display: none;
  }

  .hero-foot {
    flex-wrap: wrap;
    padding-right: 74px;
  }

  .hero-progress {
    right: 10px;
    bottom: 12px;
    transform: scale(0.58);
  }

  .week-summary-strip,
  .book-stats {
    grid-template-columns: 1fr;
  }

  .log-row {
    grid-template-columns: minmax(70px, 1fr) 65px 65px 27px;
  }

  .summary-numbers {
    grid-template-columns: 1fr;
  }
}

@media print {
  .sidebar,
  .mobile-nav,
  .mobile-header,
  .heading-actions,
  .button,
  .icon-button,
  .round-button {
    display: none !important;
  }

  .main-content {
    padding: 0;
  }

  body {
    background: #fff;
  }

  .page {
    display: none;
  }

  #page-summary {
    display: block !important;
  }
}

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

/* Lighter, friendlier visual refresh */
:root {
  --ink: #283029;
  --ink-soft: #4e5b52;
  --muted: #7c887f;
  --paper: #fff8ec;
  --card: #fffdf8;
  --card-strong: #fffefb;
  --line: #e8ddcc;
  --line-soft: #f0e8dc;
  --green: #47715b;
  --green-deep: #2f5442;
  --green-soft: #e3eee2;
  --sage: #a9bea9;
  --lime: #ddea9f;
  --coral: #eb8b72;
  --coral-soft: #fae5dd;
  --gold: #d2a358;
  --gold-soft: #faedd4;
  --blue: #7fa7b4;
  --blue-soft: #e3eff2;
  --lavender: #a495bb;
  --lavender-soft: #eee7f4;
  --shadow: 0 18px 42px rgba(105, 82, 47, 0.09);
}

body {
  background:
    radial-gradient(circle at 88% 3%, rgba(221, 234, 159, 0.28), transparent 22rem),
    radial-gradient(circle at 8% 88%, rgba(250, 208, 193, 0.2), transparent 24rem),
    var(--paper);
}

.sidebar {
  color: var(--ink);
  border-right: 1px solid #eadfce;
  background:
    radial-gradient(circle at 90% 78%, rgba(221, 234, 159, 0.26), transparent 10rem),
    linear-gradient(rgba(90, 71, 42, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 71, 42, 0.026) 1px, transparent 1px),
    #fff6e6;
  background-size: auto, 32px 32px, 32px 32px, auto;
}

.sidebar::after {
  border-color: rgba(71, 113, 91, 0.13);
  box-shadow: 0 0 0 28px rgba(221, 234, 159, 0.14);
}

.brand-mark {
  padding: 2px;
  overflow: hidden;
  color: var(--green-deep);
  border-color: rgba(71, 113, 91, 0.18);
  background: #fffaf0;
  box-shadow: 4px 4px 0 rgba(71, 113, 91, 0.1);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
}

.brand strong {
  color: var(--green-deep);
}

.brand span {
  color: #9d927e;
}

.nav-item {
  color: #6b756d;
}

.nav-item:hover {
  color: var(--green-deep);
  background: rgba(71, 113, 91, 0.07);
}

.nav-item.active {
  color: var(--green-deep);
  background: var(--lime);
  box-shadow: 4px 4px 0 rgba(71, 113, 91, 0.1);
}

.nav-item.active::before {
  background: var(--green);
}

.nav-count {
  color: var(--green-deep);
  background: rgba(71, 113, 91, 0.1);
}

.nav-count.alert {
  color: #8b523f;
  background: #f7c8b8;
}

.sidebar-note {
  color: var(--ink);
  border-color: #eadbc5;
  background: rgba(255, 253, 248, 0.74);
}

.note-kicker {
  color: var(--green);
}

.sidebar-note p {
  color: var(--ink-soft);
}

.settings-button {
  color: #7e887f;
}

.settings-button:hover {
  color: var(--green-deep);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: center;
  min-height: 274px;
  padding: 32px clamp(26px, 3.4vw, 42px);
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 20%, rgba(255, 255, 255, 0.72), transparent 13rem),
    linear-gradient(125deg, #dfeabf 0%, #edf0cf 48%, #f7ddca 100%);
  box-shadow: 0 20px 45px rgba(125, 111, 73, 0.13);
}

.hero-kicker {
  color: var(--green);
}

.hero-copy {
  width: auto;
}

.hero-quote {
  color: #2f4638;
}

.hero-foot {
  color: #708073;
}

.hero-foot-line {
  background: rgba(47, 84, 66, 0.2);
}

.hero-foot button {
  color: var(--green-deep);
}

.hero-companion {
  position: relative;
  align-self: stretch;
  min-height: 220px;
}

.hero-companion::before {
  content: "";
  position: absolute;
  left: 26px;
  bottom: 4px;
  width: 250px;
  height: 176px;
  border-radius: 48% 52% 44% 56%;
  background: rgba(255, 253, 248, 0.43);
  transform: rotate(-4deg);
}

.hero-progress {
  position: absolute;
  top: 0;
  right: 8px;
  z-index: 3;
  margin: 0;
  transform: scale(0.72);
  transform-origin: top right;
}

.hero-progress p {
  color: #67786b;
}

.progress-ring {
  background: conic-gradient(var(--green) var(--progress), rgba(47, 84, 66, 0.13) 0);
}

.progress-ring::before {
  background: #eef0d8;
}

.progress-ring span {
  color: var(--green-deep);
}

.hero-orbit {
  border-color: rgba(47, 84, 66, 0.1);
}

.orbit-one {
  right: 130px;
}

.orbit-two {
  right: 76px;
}

.mascot-duo {
  pointer-events: none;
}

.hero-mascots {
  position: absolute;
  left: 18px;
  right: auto;
  bottom: -11px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  width: 288px;
  height: 198px;
}

.hero-mascots img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  overflow: visible;
  filter: drop-shadow(0 10px 12px rgba(78, 64, 37, 0.15));
}

.hero-mascots .mascot-cat {
  position: relative;
  z-index: 3;
  width: 148px;
  height: 162px;
  margin-left: -26px;
  transform: translateY(5px) rotate(1deg);
  animation: cat-breathe 5.6s ease-in-out infinite;
}

.hero-mascots .mascot-dog {
  position: relative;
  z-index: 2;
  width: 180px;
  height: 180px;
  transform: translateY(-4px) rotate(-3deg);
  transform-origin: 50% 100%;
  animation: dog-breathe 4.8s ease-in-out infinite;
}

.mascot-spark {
  position: absolute;
  top: 20px;
  right: 10px;
  color: var(--green);
  font-size: 24px;
  animation: mascot-twinkle 2.6s ease-in-out infinite;
}

@keyframes dog-breathe {
  0%,
  100% {
    transform: translateY(-5px) rotate(-3deg) scale(1);
  }
  50% {
    transform: translateY(-14px) rotate(-1.2deg) scale(1.018);
  }
}

@keyframes cat-breathe {
  0%,
  100% {
    transform: translateY(5px) rotate(1deg) scale(1);
  }
  50% {
    transform: translateY(-2px) rotate(0.3deg) scale(1.01);
  }
}

@keyframes mascot-twinkle {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.82) rotate(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.12) rotate(12deg);
  }
}

.panel,
.stat-card,
.book-card,
.journal-card,
.summary-card,
.week-summary-item {
  border-color: #f0e7da;
  box-shadow: 0 5px 18px rgba(103, 83, 48, 0.035);
}

.button-primary {
  color: #fff;
  background: var(--green);
  box-shadow: 4px 4px 0 rgba(71, 113, 91, 0.13);
}

.button-primary:hover {
  background: var(--green-deep);
}

.button-soft {
  color: var(--green-deep);
  border-color: #dfe8c2;
  background: #f1f6df;
}

.button-soft:hover {
  border-color: #cbd89d;
  background: #ebf3d0;
}

.section-title-row h2,
.panel-heading h2,
.daily-investment h2 {
  color: #2f3b33;
}

.mobile-nav {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(47, 84, 66, 0.97);
}

/* Finance */
.month-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.82);
}

.month-switcher .icon-button {
  width: 33px;
  height: 33px;
  border: 0;
  background: transparent;
}

.month-switcher input {
  width: 131px;
  min-height: 33px;
  padding: 0 5px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.finance-expiry-alert {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 15px;
  padding: 14px 17px;
  border: 1px solid #efd3a8;
  border-radius: 15px;
  background: linear-gradient(110deg, #fff3dd, #fff9ef);
}

.finance-expiry-alert[hidden] {
  display: none;
}

.finance-heading h1 {
  max-width: 620px;
  font-size: clamp(32px, 3.2vw, 43px);
}

.expiry-alert-paw {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #a66f35;
  background: #f6dfb6;
}

.finance-expiry-alert > div:nth-child(2) {
  min-width: 0;
}

.finance-expiry-alert strong {
  display: block;
  color: #6e4d2b;
  font-family: var(--serif);
  font-size: 14px;
}

.finance-expiry-alert p {
  margin: 2px 0 0;
  color: #906b45;
  font-size: 10px;
}

.finance-expiry-alert .text-link {
  margin-left: auto;
  flex: 0 0 auto;
  color: #7e592f;
}

.finance-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 16px;
}

.finance-stat {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--card);
}

.finance-stat-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  border-radius: 13px;
  color: var(--accent);
  background: var(--accent-soft);
}

.finance-stat-icon .icon {
  width: 18px;
}

.finance-stat > div {
  min-width: 0;
}

.finance-stat span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.finance-stat strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-stat small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 13px;
  background: #eee7da;
}

.finance-tab {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 6px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  color: #7a857c;
  background: transparent;
  font-size: 11px;
}

.finance-tab .icon {
  width: 14px;
}

.finance-tab.active {
  color: var(--green-deep);
  background: var(--card);
  box-shadow: 0 3px 8px rgba(73, 62, 41, 0.08);
}

.finance-panel[hidden] {
  display: none;
}

.finance-ledger-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.7fr);
  gap: 15px;
  align-items: start;
}

.finance-main-card,
.finance-mini-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--card);
}

.finance-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.finance-card-head h2,
.finance-mini-card h2 {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}

.finance-side-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mini-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finance-empty,
.stored-empty {
  min-height: 280px;
}

.cat-empty-mark {
  border-style: solid;
  color: #b17e4c !important;
  background: #faedd7;
}

.transaction-list {
  display: flex;
  flex-direction: column;
}

.transaction-row {
  display: grid;
  grid-template-columns: 51px 42px minmax(0, 1fr) 58px 112px;
  grid-template-areas: "date category copy actions amount";
  align-items: center;
  gap: 10px;
  min-height: 83px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line-soft);
}

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

.transaction-date {
  grid-area: date;
  text-align: center;
}

.transaction-date strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
}

.transaction-date span {
  color: var(--muted);
  font-size: 8px;
}

.transaction-category {
  grid-area: category;
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  border-radius: 13px;
  color: var(--category-color, #47715b);
  background: var(--category-soft, #e3eee2);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 600;
}

.transaction-category.income-category {
  color: var(--green-deep);
  background: #e4f0e0;
}

.transaction-copy {
  grid-area: copy;
  min-width: 0;
}

.transaction-copy > strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-copy > span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-copy .reimbursement-line {
  color: #657f9a;
}

.transaction-copy p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: #8a8172;
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.transaction-actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  opacity: 0.55;
}

.transaction-row:hover .transaction-actions {
  opacity: 1;
}

.transaction-actions button {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #98a198;
  background: transparent;
}

.transaction-actions button:hover {
  color: var(--green);
  background: var(--green-soft);
}

.transaction-actions button:last-child:hover {
  color: var(--danger);
  background: #fae9e6;
}

.transaction-actions .icon {
  width: 13px;
}

.transaction-amount-wrap {
  grid-area: amount;
  min-width: 0;
  text-align: right;
}

.transaction-amount {
  display: block;
  color: #b56655;
  font-family: var(--serif);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.transaction-amount.income {
  color: #4e8061;
}

.transaction-amount-wrap small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.mini-donut-wrap {
  display: flex;
  justify-content: center;
  margin: 14px 0 16px;
}

.donut-chart {
  position: relative;
  flex: 0 0 auto;
}

.donut-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  color: #657b69;
  transform: rotate(-0.01deg);
}

.donut-chart circle {
  transition: stroke-dasharray 300ms ease;
}

.donut-center {
  position: absolute;
  inset: 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.donut-center span {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(10px, 1.35vw, 15px);
  font-weight: 600;
  line-height: 1.2;
}

.donut-center small {
  color: var(--muted);
  font-size: 8px;
}

.mix-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mix-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.mix-row strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.mix-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.card-reminder-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 11px;
  background: #f6f1e6;
}

.reminder-paw {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 9px;
  color: #a97843;
  background: #f6e3c2;
}

.reminder-paw .icon {
  width: 14px;
}

.card-reminder-row > div {
  min-width: 0;
}

.card-reminder-row strong,
.card-reminder-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-reminder-row strong {
  font-size: 10px;
}

.card-reminder-row span {
  color: var(--muted);
  font-size: 8px;
}

.card-reminder-row em {
  margin-left: auto;
  color: #9b7041;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.analysis-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  min-height: 245px;
  margin-bottom: 15px;
  padding: 28px 30px;
  overflow: hidden;
  border: 1px solid #e7dfc8;
  border-radius: 23px;
  background:
    radial-gradient(circle at 90% 15%, rgba(255, 255, 255, 0.78), transparent 12rem),
    linear-gradient(120deg, #e7efcc, #f8ead3);
}

.analysis-hero.warning {
  background:
    radial-gradient(circle at 90% 15%, rgba(255, 255, 255, 0.72), transparent 12rem),
    linear-gradient(120deg, #f9e3d4, #fff0d3);
}

.analysis-copy {
  position: relative;
  z-index: 1;
}

.analysis-copy h2 {
  max-width: 680px;
  margin: 8px 0 10px;
  font-family: var(--serif);
  font-size: clamp(25px, 3.1vw, 38px);
  font-weight: 500;
  line-height: 1.4;
}

.analysis-copy > p {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}

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

.analysis-bullets span {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #526258;
  font-size: 10px;
  line-height: 1.55;
}

.analysis-bullets i {
  color: var(--green);
  font-style: normal;
}

.analysis-mascot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.analysis-mascot .small {
  width: 130px;
  max-height: 150px;
  filter: drop-shadow(0 8px 12px rgba(82, 67, 39, 0.14));
}

.analysis-mascot span {
  margin-top: -8px;
  padding: 4px 9px;
  border-radius: 20px;
  color: var(--green-deep);
  background: rgba(255, 255, 255, 0.72);
  font-size: 8px;
}

.finance-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 15px;
}

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

.analysis-legend {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.analysis-legend-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto 48px;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 9px;
}

.analysis-legend-row span:nth-child(2) {
  color: var(--ink-soft);
}

.analysis-legend-row strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
}

.analysis-legend-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.budget-range {
  padding: 17px;
  border-radius: 15px;
  background: #f2f5e5;
}

.budget-range > span {
  color: var(--muted);
  font-size: 9px;
}

.budget-range strong {
  display: block;
  margin: 4px 0;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.4;
}

.budget-range strong i {
  padding: 0 4px;
  color: #8a9d76;
  font-style: normal;
}

.budget-range p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.7;
}

.category-plan-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 15px;
}

.category-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
}

.category-plan-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.category-plan-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.category-plan-row strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
}

.plan-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
}

.plan-note .icon {
  width: 14px;
  color: var(--gold);
}

.stored-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 15px;
}

.stored-overview-grid > div {
  padding: 14px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--card);
}

.stored-overview-grid span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.stored-overview-grid strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.stored-overview-grid small {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
}

.stored-overview-grid .has-alert {
  border-color: #edcf9f;
  background: #fff5e2;
}

.stored-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stored-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #eadfce;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(221, 234, 159, 0.2), transparent 11rem),
    var(--card);
}

.stored-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stored-card-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.stored-card-paw {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 13px;
  color: #a97843;
  background: #f8e9ce;
}

.stored-card-identity > div {
  min-width: 0;
}

.stored-card-identity h3 {
  margin: 1px 0 0;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expiry-pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 20px;
  color: #687767;
  background: #edf2e4;
  font-size: 8px;
  white-space: nowrap;
}

.expiry-pill.urgent {
  color: #9d5d3c;
  background: #f9dfd2;
}

.stored-card-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 10px;
}

.stored-card-numbers span {
  padding: 8px 9px;
  border-radius: 9px;
  color: var(--muted);
  background: #f6f2e9;
  font-size: 8px;
}

.stored-card-numbers strong {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
}

.stored-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 10px;
  background: #eee8db;
}

.stored-progress i {
  display: block;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #a8bd8d, #d8b06d);
}

.project-items,
.cash-usage-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 13px 0;
}

.project-item-row {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 7px;
  border-radius: 8px;
  background: #f8f4eb;
  font-size: 9px;
}

.project-item-row.used span {
  color: #929b92;
  text-decoration: line-through;
}

.project-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #cfd6cb;
  border-radius: 6px;
  color: transparent;
  background: var(--card);
}

.project-check.checked {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.project-check .icon {
  width: 11px;
}

.project-item-row input {
  max-width: 112px;
  height: 25px;
  padding: 0 5px;
  border: 1px solid #ddd7ca;
  border-radius: 6px;
  color: var(--muted);
  background: #fffdf8;
  font-size: 8px;
}

.inline-card-add,
.cash-use-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inline-card-add input,
.cash-use-form input {
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffefa;
  font-size: 9px;
}

.inline-card-add input {
  flex: 1;
}

.cash-use-form input[type="date"] {
  width: 112px;
}

.cash-use-form input[type="number"] {
  width: 92px;
}

.inline-card-add .mini-add,
.cash-use-form .mini-add {
  margin: 0;
  white-space: nowrap;
}

.cash-usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 25px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f8f4eb;
  font-size: 9px;
}

.cash-usage-row span {
  color: var(--muted);
}

.cash-usage-row strong {
  color: #aa6852;
  font-weight: 500;
}

.cash-usage-row button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  color: #9da59e;
  background: transparent;
}

.cash-usage-row .icon {
  width: 12px;
}

.stored-card-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 9px;
  line-height: 1.7;
}

.stored-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 8px;
}

.stored-card-footer > div {
  display: flex;
  gap: 5px;
}

.stored-card-footer button {
  padding: 2px 5px;
  border: 0;
  color: #839086;
  background: transparent;
  font-size: 8px;
}

.stored-card-footer button.danger {
  color: #b36a5b;
}

.transaction-type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 17px;
  padding: 4px;
  border-radius: 11px;
  background: #f0eadf;
}

.transaction-type-switch button {
  min-height: 35px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.transaction-type-switch button.active {
  color: var(--green-deep);
  background: var(--card);
  box-shadow: 0 2px 7px rgba(73, 62, 41, 0.08);
}

.transaction-common-fields {
  margin-bottom: 14px;
}

.transaction-note {
  margin-top: 14px;
}

.reimbursement-box,
.stored-card-create-fields {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e7dece;
  border-radius: 13px;
  background: #faf6ee;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch-row > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 36px;
  height: 21px;
  flex: 0 0 auto;
  border-radius: 20px;
  background: #d8d6cb;
  transition: background 150ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: transform 150ms ease;
}

.switch-row input:checked + .switch-track {
  background: var(--green);
}

.switch-row input:checked + .switch-track::after {
  transform: translateX(15px);
}

.switch-row > span:last-child {
  min-width: 0;
}

.switch-row strong,
.switch-row small {
  display: block;
}

.switch-row strong {
  font-size: 10px;
}

.switch-row small {
  color: var(--muted);
  font-size: 8px;
}

.reimbursement-fields {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px dashed #ddd2bf;
}

.inline-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.inline-section-title span {
  font-family: var(--serif);
  font-size: 16px;
}

.inline-section-title small {
  color: var(--muted);
  font-size: 8px;
}

.checkbox-field {
  justify-content: flex-end;
}

.inline-check {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
}

.inline-check input {
  width: 17px;
  min-height: auto;
  height: 17px;
}

.form-help {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.ocr-upload-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 11px;
  padding: 11px 12px;
  border: 1px dashed #d8c7a9;
  border-radius: 12px;
  background: #fbf4e8;
}

.ocr-upload-panel > div {
  min-width: 0;
  flex: 1;
}

.ocr-upload-panel strong,
.ocr-upload-panel small {
  display: block;
}

.ocr-upload-panel strong {
  font-size: 10px;
}

.ocr-upload-panel small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.ocr-upload-panel .button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 9px;
  white-space: nowrap;
}

.ocr-upload-panel .icon {
  width: 13px;
}

.ocr-status {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 8px;
}

.ocr-status.success {
  color: var(--green);
}

.ocr-status.error {
  color: var(--danger);
}

.batch-preview {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.batch-preview.ready {
  color: var(--green);
}

.ocr-review {
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #e5d7be;
  border-radius: 11px;
  background: #fffaf0;
}

.ocr-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ocr-review-head strong {
  font-family: var(--serif);
  font-size: 13px;
}

.ocr-review-head span {
  color: var(--green);
  font-size: 8px;
}

.ocr-candidate-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ocr-candidate {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border-radius: 7px;
  color: var(--ink-soft);
  background: #f5f0e5;
  font-size: 9px;
}

.ocr-candidate.selected {
  background: #eaf2df;
}

.ocr-candidate input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.ocr-candidate span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ocr-candidate em {
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
  white-space: nowrap;
}

.ocr-ignored {
  margin-top: 8px;
  color: var(--muted);
  font-size: 8px;
}

.ocr-ignored summary {
  cursor: pointer;
}

.ocr-ignored .ocr-candidate-list {
  margin-top: 7px;
}

.ocr-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 13px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #e1d7c6;
}

.ocr-none {
  margin: 4px 0;
  color: var(--muted);
  font-size: 8px;
}

.sync-code {
  width: 100%;
  min-height: 76px;
  margin-bottom: 9px;
  padding: 9px 10px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fffefa;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.finance-options-modal {
  width: min(680px, calc(100vw - 28px));
}

.modal-body {
  padding: 26px;
}

.option-section {
  padding: 19px 0;
  border-top: 1px solid var(--line-soft);
}

.option-section:first-of-type {
  border-top: 0;
}

.option-section-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
}

.option-section-head p {
  margin: 3px 0 14px;
  color: var(--muted);
  font-size: 9px;
}

.option-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px auto;
  gap: 8px;
}

.option-add-row input,
.option-add-row select,
.option-payment-form input,
.option-payment-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fffefa;
  font-size: 11px;
}

.option-payment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.option-payment-form > .field:first-child,
.option-payment-form > .button {
  align-self: end;
}

.option-payment-form > .button {
  justify-self: start;
}

.custom-option-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}

.custom-option-row {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #f6f2e9;
  font-size: 10px;
}

.custom-option-row > span:nth-child(3) {
  color: var(--muted);
  font-size: 8px;
}

.custom-option-row.inactive,
.custom-platform-row.inactive {
  opacity: 0.55;
}

.custom-option-swatch {
  width: 9px;
  height: 21px;
  border-radius: 8px;
}

.custom-platform-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #faf7ef;
}

.custom-platform-row strong {
  display: block;
  font-size: 11px;
}

.custom-platform-row p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.cloud-dot {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: #b6b3a9;
}

.cloud-dot.online {
  background: #62a879;
  box-shadow: 0 0 0 3px rgba(98, 168, 121, 0.18);
}

.cloud-dot.syncing {
  background: #d69c47;
  animation: cloud-pulse 1.2s ease-in-out infinite;
}

.cloud-dot.error {
  background: #cf6d5f;
}

@keyframes cloud-pulse {
  50% {
    opacity: 0.42;
  }
}

.cloud-settings {
  padding: 15px;
  border: 1px solid #dfe6d6;
  border-radius: 14px;
  background: linear-gradient(135deg, #f2f7e8, #fffaf0);
}

.cloud-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.cloud-settings-head h3 {
  margin-bottom: 3px;
}

.cloud-settings-head p {
  margin: 0;
}

.cloud-status-pill {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 20px;
  color: #7c887f;
  background: #e8e7df;
  font-size: 8px;
  white-space: nowrap;
}

.cloud-status-pill.online {
  color: #3f7654;
  background: #dbebd8;
}

.cloud-status-pill.syncing {
  color: #88652f;
  background: #f5e5bd;
}

.cloud-status-pill.error {
  color: #9e5147;
  background: #f7ded9;
}

.cloud-login-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
}

.cloud-auth-buttons {
  display: flex;
  grid-column: 1 / -1;
  gap: 7px;
}

.cloud-auth-buttons .button {
  min-height: 40px;
  flex: 1;
}

.cloud-help,
.cloud-message,
.cloud-last-sync {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.cloud-message.success {
  color: var(--green);
}

.cloud-message.error {
  color: var(--danger);
}

.cloud-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.72);
}

.cloud-account-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 16px;
}

.cloud-account-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  flex: 0 0 auto;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  box-shadow: 0 3px 9px rgba(47, 84, 66, 0.16);
  font-family: var(--serif);
  font-size: 17px;
}

.cloud-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cloud-account strong,
.cloud-account span {
  display: block;
}

.cloud-account strong {
  font-size: 10px;
}

.cloud-account span {
  color: var(--muted);
  font-size: 8px;
}

.cloud-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.cloud-actions .button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 9px;
}

.install-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 8px;
}

.credit-alert {
  border-color: #e3d1d0;
  background: linear-gradient(110deg, #f8e6e1, #fff8ed);
}

.bank-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bank-group + .bank-group {
  margin-top: 20px;
}

.bank-group-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
}

.bank-group-title span {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.bank-group-title small {
  color: var(--muted);
  font-size: 9px;
}

.bank-group-grid,
.bank-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#bank-card-grid {
  display: block;
}

.bank-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #dfe5da;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(221, 234, 159, 0.25), transparent 10rem),
    #fffdf8;
}

.bank-card.inactive {
  border-style: dashed;
  background: #f8f6f0;
  opacity: 0.72;
}

.bank-card.inactive::after {
  opacity: 0.4;
}

.bank-card::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(71, 113, 91, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.credit-card {
  border-color: #eadbd2;
  background:
    radial-gradient(circle at 100% 0, rgba(235, 139, 114, 0.16), transparent 10rem),
    #fffdf8;
}

.credit-card.paid {
  background:
    radial-gradient(circle at 100% 0, rgba(221, 234, 159, 0.3), transparent 10rem),
    #fffdf8;
}

.bank-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bank-card-head h3 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.bank-type-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 8px;
}

.bank-type-badge.savings {
  color: var(--green);
  background: var(--green-soft);
}

.bank-type-badge.credit {
  color: #a45c4b;
  background: var(--coral-soft);
}

.bank-type-badge.inactive {
  color: var(--muted);
  background: #ece9e1;
}

.bank-card-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.bank-balance {
  position: relative;
  z-index: 1;
  margin: 20px 0 15px;
  padding: 15px;
  border-radius: 13px;
  background: rgba(243, 240, 232, 0.72);
}

.bank-balance span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.bank-balance strong {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
}

.bank-balance.negative strong {
  color: var(--danger);
}

.credit-due-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -4px 1px 12px;
  color: var(--muted);
  font-size: 9px;
}

.credit-due-row .paid-label {
  color: var(--green);
  font-weight: 600;
}

.bank-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.bank-mini-stats span {
  padding: 8px;
  border-radius: 9px;
  color: var(--muted);
  background: #f7f3ea;
  font-size: 8px;
}

.bank-mini-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}

.bank-mini-stats .positive-money {
  color: var(--green);
}

.bank-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}

.bank-actions .button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 9px;
}

.bank-actions .danger-text {
  color: var(--danger);
}

.bank-paid-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 9px;
}

.bank-paid-check .icon {
  width: 14px;
}

.past-due-note {
  margin: 10px 0 0;
  padding: 8px 9px;
  border-radius: 8px;
  color: #8c6840;
  background: var(--gold-soft);
  font-size: 8px;
  line-height: 1.55;
}

.bank-action-modal {
  width: min(560px, calc(100vw - 28px));
}

.bank-modal-summary {
  margin-bottom: 17px;
  padding: 16px;
  border-radius: 13px;
  background: linear-gradient(120deg, #f1f5e7, #faf1e2);
}

.bank-modal-summary > span {
  color: var(--muted);
  font-size: 9px;
}

.bank-modal-summary strong {
  display: block;
  margin: 2px 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
}

.bank-modal-summary p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.bank-detail-section {
  margin-top: 17px;
}

.bank-detail-section h3 {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: 17px;
}

.bank-detail-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bank-detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 10px;
}

.bank-detail-list strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 550;
}

.bank-detail-list strong.positive {
  color: var(--green);
}

.bank-detail-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .hero-card {
    grid-template-columns: minmax(0, 1fr) 235px;
    padding-right: 26px;
  }

  .hero-mascots {
    left: 4px;
    width: 248px;
    height: 178px;
  }

  .hero-mascots img {
    width: 136px;
    height: 136px;
  }

  .hero-mascots .mascot-dog {
    width: 158px;
    height: 158px;
  }

  .hero-mascots .mascot-cat {
    width: 136px;
    height: 148px;
    margin-left: -24px;
  }

  .hero-progress {
    right: 3px;
    transform: scale(0.62);
  }

  .finance-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transaction-row {
    grid-template-columns: 45px 39px minmax(0, 1fr) 52px 105px;
    gap: 7px;
  }
}

@media (max-width: 980px) {
  .mobile-nav {
    grid-template-columns: repeat(6, 1fr);
  }

  .mobile-header .icon-button,
  .mobile-brand {
    color: var(--ink);
  }

  .hero-card {
    grid-template-columns: minmax(0, 1fr) 220px;
    padding-right: 24px;
  }

  .hero-copy {
    width: auto;
  }

  .hero-progress {
    right: 0;
  }

  .hero-mascots {
    left: 0;
    width: 228px;
    height: 164px;
  }

  .hero-mascots img {
    width: 124px;
    height: 124px;
  }

  .hero-mascots .mascot-dog {
    width: 148px;
    height: 148px;
  }

  .hero-mascots .mascot-cat {
    width: 126px;
    height: 138px;
    margin-left: -22px;
  }

  .finance-ledger-layout,
  .finance-analysis-grid {
    grid-template-columns: 1fr;
  }

  .finance-side-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stored-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bank-group-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #finance-bank-panel > .finance-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .bank-card-heading-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .hero-card {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px;
    padding-bottom: 10px;
  }

  .hero-copy {
    width: 100%;
  }

  .hero-quote {
    max-width: 100%;
    font-size: 26px;
  }

  .hero-companion {
    min-height: 150px;
    margin-top: 8px;
  }

  .hero-companion::before {
    left: 2px;
    bottom: -8px;
    width: 202px;
    height: 128px;
  }

  .hero-progress {
    top: 0;
    right: 6px;
    transform: scale(0.5);
    transform-origin: top right;
  }

  .hero-mascots {
    left: 4px;
    right: auto;
    bottom: -9px;
    width: 222px;
    height: 156px;
    opacity: 1;
  }

  .hero-mascots img {
    width: 98px;
    height: 98px;
  }

  .hero-mascots .mascot-dog {
    width: 126px;
    height: 126px;
  }

  .hero-mascots .mascot-cat {
    width: 112px;
    height: 122px;
    margin-left: -18px;
  }

  .hero-foot {
    max-width: 100%;
    padding-right: 0;
  }

  .finance-heading .heading-actions {
    gap: 7px;
  }

  .option-add-row,
  .option-payment-form {
    grid-template-columns: 1fr;
  }

  .custom-option-row,
  .custom-platform-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .custom-platform-row > div {
    grid-column: 1 / -1;
  }

  .month-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .month-switcher input {
    flex: 1;
    width: auto;
  }

  .finance-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-stat {
    padding: 13px;
  }

  .finance-stat strong {
    font-size: 16px;
  }

  .finance-tabs {
    display: flex;
    width: 100%;
  }

  .finance-tab {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
  }

  .finance-main-card,
  .finance-mini-card {
    padding: 17px;
  }

  .transaction-row {
    grid-template-columns: 42px 38px minmax(0, 1fr) 88px;
    grid-template-areas:
      "date category copy amount"
      "date category copy actions";
    align-items: start;
    gap: 7px;
  }

  .transaction-date {
    padding-top: 4px;
  }

  .transaction-category {
    width: 37px;
    height: 37px;
  }

  .transaction-actions {
    display: flex;
    opacity: 1;
    justify-content: flex-end;
  }

  .transaction-amount-wrap {
    padding-top: 4px;
  }

  .transaction-amount {
    font-size: 12px;
  }

  .finance-side-column {
    grid-template-columns: 1fr;
  }

  .analysis-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 22px;
  }

  .analysis-mascot {
    position: absolute;
    right: 5px;
    bottom: -12px;
    opacity: 0.28;
  }

  .analysis-mascot span {
    display: none;
  }

  .analysis-bullets {
    grid-template-columns: 1fr;
  }

  .analysis-donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .analysis-legend {
    width: 100%;
  }

  .stored-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stored-card-list {
    grid-template-columns: 1fr;
  }

  .bank-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stored-card-numbers {
    grid-template-columns: 1fr 1fr;
  }

  .finance-expiry-alert {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .finance-expiry-alert .text-link {
    margin-left: 51px;
  }
}

@media (max-width: 410px) {
  .hero-mascots {
    left: 0;
    right: auto;
    opacity: 1;
  }

  .hero-foot {
    max-width: 100%;
  }

  .finance-stats {
    grid-template-columns: 1fr;
  }

  .bank-overview-grid,
  .bank-mini-stats {
    grid-template-columns: 1fr;
  }

  .finance-stat strong {
    font-size: 18px;
  }

  .transaction-row {
    grid-template-columns: 38px 34px minmax(0, 1fr);
    grid-template-areas:
      "date category copy"
      "date category amount"
      "date category actions";
  }

  .transaction-amount-wrap {
    grid-area: amount;
    padding-top: 0;
    text-align: left;
  }

  .transaction-category {
    width: 33px;
    height: 33px;
    border-radius: 10px;
  }

  .cloud-login-form {
    grid-template-columns: 1fr;
  }

  .cloud-auth-buttons {
    grid-column: auto;
  }

  .cash-use-form {
    flex-wrap: wrap;
  }

  .cash-use-form input[type="date"],
  .cash-use-form input[type="number"] {
    width: calc(50% - 3px);
  }

  .cash-use-form .mini-add {
    width: 100%;
  }
}
