:root,
[data-theme="light"] {
  --paper: #f3eee4;
  --paper-deep: #e7dfd0;
  --card: #fffdf8;
  --ink: #1d1914;
  --muted: #6d6458;
  --line: #d9d0c0;
  --green: #1f6b45;
  --green-soft: #e4f3ea;
  --terra: #b5522a;
  --terra-soft: #f8e6dc;
  --save: #8a6a2f;
  --save-soft: #f3ead4;
  --today: #2b4c3e;
  --navy: #2c4a6e;
  --navy-soft: #e4ebf3;
  --shadow: 0 18px 40px rgba(60, 44, 20, 0.08);
  --radius: 18px;
  --glow: #efe6cf;
  --input: #ffffff;
  --note-soft: #ece7dc;
  --card-pay: #d5e0ee;
  --card-pay-ink: #243d5c;
  --on-today: #f7f3ea;
}

[data-theme="dark"] {
  --paper: #161410;
  --paper-deep: #221e18;
  --card: #1e1b16;
  --ink: #f4efe6;
  --muted: #a89f91;
  --line: #3a342c;
  --green: #7dca96;
  --green-soft: #1c3326;
  --terra: #e39270;
  --terra-soft: #3a241c;
  --save: #d6b56c;
  --save-soft: #322a1c;
  --today: #8fbfa4;
  --navy: #8aa4c8;
  --navy-soft: #1c2838;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  --glow: #2a2418;
  --input: #2a261f;
  --note-soft: #2c2822;
  --card-pay: #243044;
  --card-pay-ink: #c5d6ee;
  --on-today: #161410;
}

html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--glow) 0%, transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: Figtree, "Segoe UI", sans-serif;
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  width: 100%;
  margin: 0;
  padding: var(--chrome-height, 180px) max(12px, env(safe-area-inset-right)) max(72px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  width: 100%;
  max-width: 100%;
  padding-top: max(10px, constant(safe-area-inset-top));
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  padding-bottom: 10px;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  background: var(--paper);
  overflow: visible;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.hero-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(18px, 4.2vw, 34px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.hamburger {
  display: grid;
  gap: 4px;
  place-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.file-menu {
  left: auto;
  right: 0;
  transform: none;
  min-width: 188px;
  max-height: none;
  overflow: visible;
}

.file-menu.sub-menu {
  max-height: min(70vh, 480px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chrome-icon {
  display: grid;
  place-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
}

.chrome-icon svg {
  display: block;
}

.account-chip {
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.menu-kicker {
  margin: 8px 8px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.month-option[aria-checked="true"] {
  background: var(--paper-deep);
}

.file-status {
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

.nav-kicker {
  padding: 0 4px 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.compact-nav {
  padding-right: 8px;
}

.compact-select {
  min-width: 0;
  height: 32px;
  font-size: 13px;
  padding: 0 6px 0 2px;
}

.plan-btn {
  border: 0;
  background: transparent;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.plan-btn:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.plan-btn.active {
  background: var(--today);
  color: var(--on-today);
}

.plan-btn.active:hover {
  background: var(--today);
  color: var(--on-today);
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow);
}

.month-picker {
  position: relative;
}

.month-select {
  min-width: 148px;
  height: 36px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  padding: 0 8px;
}

.month-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  max-height: min(70vh, 480px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 20;
  scrollbar-width: thin;
}

.month-menu.plan-menu-wide {
  min-width: min(300px, calc(100vw - 24px));
  max-height: min(480px, 70vh);
}

.custom-cal {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.custom-cal .repeat-note {
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.custom-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.custom-cal-nav p {
  margin: 0;
  font-weight: 700;
  font-size: 13px;
}

.custom-cal-weekdays,
.custom-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.custom-cal-weekdays span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 4px;
}

.custom-cal-day {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
}

.custom-cal-day:hover:not(:disabled) {
  background: var(--paper-deep);
}

.custom-cal-day.today {
  box-shadow: inset 0 0 0 1px var(--today);
}

.custom-cal-day.selected {
  background: var(--today);
  color: var(--on-today);
}

.custom-cal-day:disabled {
  color: var(--muted);
  opacity: 0.4;
}

.month-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  color: var(--ink);
}

.menu-more {
  color: var(--muted);
  font-weight: 700;
}

.menu-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px 4px 8px;
}

.menu-month-nav span {
  font-weight: 700;
  font-size: 13px;
}

.month-option:hover,
.month-option[aria-selected="true"] {
  background: var(--paper-deep);
}

.month-option[aria-selected="true"] {
  font-weight: 700;
}

.ghost,
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  min-width: 36px;
  height: 36px;
}

.ghost:hover,
.icon-btn:hover {
  background: var(--paper-deep);
}

.ghost:disabled {
  opacity: 0.35;
  cursor: default;
}

.plan-range {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin: 0 0 6px;
}

.summary-metrics {
  display: contents;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px 10px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.stat .label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat .value {
  margin: 4px 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.stat.good .value {
  color: var(--green);
}

.stat.warn .value {
  color: var(--terra);
}

.stat.save .value {
  color: var(--save);
}

.balance-input {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  font-family: Fraunces, Georgia, serif;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--ink);
  outline: none;
}

.balance-input:focus {
  color: var(--green);
}

.month-mark {
  margin: 18px 0 2px;
  padding: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 22px;
  font-weight: 650;
  scroll-margin-top: var(--chrome-height, 180px);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.month-days {
  scroll-margin-top: var(--chrome-height, 180px);
}

.year-calendar .day-card {
  scroll-margin-top: var(--chrome-height, 180px);
}

.day-slot {
  min-width: 0;
}

.day-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
  min-height: 148px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.day-card.today {
  border-color: var(--today);
  box-shadow: 0 0 0 2px rgba(43, 76, 62, 0.12), var(--shadow);
}

.day-card.outside {
  opacity: 0.62;
}

.day-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 8px;
}

.day-name {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.day-num {
  margin: 2px 0 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 24px;
  line-height: 1;
}

.add-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.hover-tip {
  position: fixed;
  z-index: 18;
  max-width: min(280px, calc(100vw - 16px));
  padding: 8px 10px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: pre-line;
  pointer-events: none;
}

.hover-tip[hidden] {
  display: none !important;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.item-row,
.list-row-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.item-row .item,
.list-row-wrap .list-row {
  flex: 1;
  min-width: 0;
}

.paid-mark {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--terra);
  background: var(--card);
  color: var(--terra);
  padding: 0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
}

.item-row:has(.card-pay) .paid-mark,
.list-row-wrap:has(.card-pay) .paid-mark {
  border-color: var(--card-pay-ink);
  color: var(--card-pay-ink);
}

.item-row:has(.card-charge) .paid-mark,
.list-row-wrap:has(.card-charge) .paid-mark {
  border-color: var(--navy);
  color: var(--navy);
}

.paid-mark.on {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-today);
}

.item.paid .name,
.item.paid .amt,
.list-row.paid .list-name,
.list-row.paid .list-amt,
.list-row.paid .list-kind {
  text-decoration: line-through;
  opacity: 0.72;
}

.item {
  border: 0;
  text-align: left;
  border-radius: 999px;
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.item.income,
.chip.income {
  background: var(--green-soft);
  color: var(--green);
}

.item.expense,
.chip.expense {
  background: var(--terra-soft);
  color: var(--terra);
}

.item.card,
.chip.card {
  background: var(--card-pay);
  color: var(--card-pay-ink);
}

.item.card-charge,
.list-row.card-charge {
  background: var(--navy-soft);
  color: var(--navy);
}

.item.card-pay,
.list-row.card-pay {
  background: var(--card-pay);
  color: var(--card-pay-ink);
}

.item.save,
.chip.save {
  background: var(--save-soft);
  color: var(--save);
}

.item.note,
.chip.note {
  background: var(--note-soft);
  color: var(--muted);
}

.item.balance,
.chip.balance {
  background: var(--glow);
  color: var(--ink);
}

.item .name,
.chip {
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item .amt {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.month-board {
  display: grid;
  grid-template-columns: repeat(var(--months-per-row, 3), minmax(0, 1fr));
  gap: 12px;
}

.month-board[style*="--months-per-row: 1"] {
  grid-template-columns: minmax(0, 1fr);
  width: calc(100% - 32px);
  max-width: none;
  margin: 0 auto;
  gap: 28px;
}

.month-board[style*="--months-per-row: 1"] .mini-month {
  padding: 18px 16px 16px;
}

.month-board[style*="--months-per-row: 1"] .mini-month-title {
  font-size: 28px;
  padding-bottom: 12px;
}

.month-board[style*="--months-per-row: 1"] .mini-weekdays span {
  font-size: 12px;
  padding-bottom: 8px;
}

.month-board[style*="--months-per-row: 1"] .mini-slot,
.month-board[style*="--months-per-row: 1"] .mini-day {
  aspect-ratio: auto;
  width: 100%;
  min-height: 48px;
}

.month-board[style*="--months-per-row: 1"] .mini-day {
  font-size: 16px;
  border-radius: 12px;
}

.month-board[style*="--months-per-row: 1"] .mini-dots {
  min-height: 8px;
}

.mini-month {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 10px 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  scroll-margin-top: var(--chrome-height, 180px);
}

.mini-month-title {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0 2px 8px;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 650;
  color: var(--ink);
}

.mini-month-title:hover {
  color: var(--green);
}

.mini-weekdays,
.mini-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.mini-weekdays span {
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 4px;
}

.mini-slot {
  min-width: 0;
  aspect-ratio: 1;
}

.mini-day {
  min-width: 0;
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 2px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--ink);
  font-size: clamp(10px, 1.1vw, 13px);
  font-weight: 600;
}

.mini-day:hover {
  background: var(--paper-deep);
}

.mini-day.today {
  background: var(--today);
  color: var(--on-today);
}

.mini-dots {
  display: flex;
  gap: 2px;
  min-height: 4px;
}

.mini-day.today .dot.income {
  background: #c8e6d4;
}

.mini-day.today .dot.expense {
  background: #f3c4b0;
}

.mini-day.today .dot.save {
  background: #e6d5a8;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  display: block;
}

.dot.income {
  background: var(--green);
}

.dot.expense {
  background: var(--terra);
}

.dot.save {
  background: var(--save);
}

.dot.note {
  background: var(--muted);
}

.year-wrap {
  width: 100%;
}

.year-calendar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 32px;
}

.day-root {
  position: fixed;
  inset: 0;
  background: rgba(29, 25, 20, 0.38);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 25;
  overflow: auto;
}

.day-root[hidden] {
  display: none !important;
}

.day-panel {
  width: min(480px, 100%);
  background: var(--paper);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(29, 25, 20, 0.25);
}

.day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.day-nav h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 26px;
  font-weight: 650;
  text-align: center;
}

.day-nav .sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.day-panel .day-card {
  min-height: 280px;
}

.day-panel .item {
  padding: 10px 12px;
}

.day-panel .paid-mark {
  flex-basis: 28px;
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.day-panel .item .name,
.day-panel .item .amt {
  font-size: 14px;
}

.modal-root {
  position: fixed;
  inset: 0;
  background: rgba(29, 25, 20, 0.38);
  display: grid;
  align-items: start;
  justify-items: center;
  padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  overflow: auto;
  scrollbar-width: none;
}

.modal-root#login-root {
  z-index: 50;
  place-items: center;
  align-items: center;
}

.login-card {
  width: min(400px, 100%);
}

.modal-root::-webkit-scrollbar {
  display: none;
}

.modal-root[hidden] {
  display: none !important;
}

.modal {
  width: min(460px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--card);
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: 0 30px 80px rgba(29, 25, 20, 0.25);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.modal::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.modal h3 {
  margin: 0 0 4px;
  font-family: Fraunces, Georgia, serif;
  font-size: 26px;
}

.modal p.hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--input);
  color: var(--ink);
}

input,
select {
  height: 42px;
}

textarea {
  min-height: 64px;
  padding: 10px 12px;
  resize: vertical;
}

.type-toggle {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.type-toggle button {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  padding: 0 6px;
}

.type-toggle button.active.income {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}

.type-toggle button.active.expense {
  background: var(--terra-soft);
  border-color: var(--terra);
  color: var(--terra);
}

.type-toggle button.active.card {
  background: var(--navy-soft);
  border-color: var(--navy);
  color: var(--navy);
}

.type-toggle button.active.save {
  background: var(--save-soft);
  border-color: var(--save);
  color: var(--save);
}

.type-toggle button.active.note {
  background: var(--note-soft);
  border-color: var(--muted);
  color: var(--ink);
}

.scope-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.scope-toggle button {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--ink);
  font-weight: 600;
}

.scope-toggle button.active {
  background: var(--paper-deep);
  border-color: var(--ink);
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  position: sticky;
  bottom: -16px;
  padding: 10px 0 4px;
  background: linear-gradient(to bottom, transparent, var(--card) 28%);
}

.btn {
  height: 42px;
  border-radius: 11px;
  border: 0;
  padding: 0 16px;
  font-weight: 700;
}

.btn.primary {
  background: var(--today);
  color: var(--on-today);
}

.btn.danger {
  background: transparent;
  color: var(--terra);
}

.btn.quiet {
  background: var(--paper-deep);
  color: var(--ink);
}

.repeat-note {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.install-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.install-url {
  display: block;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--paper-deep);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}

label.check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

label.check-row input {
  width: 18px;
  height: 18px;
  padding: 0;
  flex-shrink: 0;
}

.pay-with-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.pay-with-toggle button {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
}

.pay-with-toggle button.active {
  background: var(--navy-soft);
  border-color: var(--navy);
  color: var(--navy);
}

.list-view {
  max-width: 860px;
  margin: 0 auto;
}

.list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.list-table {
  display: grid;
  gap: 6px;
}

.list-row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  grid-template-areas:
    "date name amt"
    "date kind run";
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  text-align: left;
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  width: 100%;
}

.list-row.income {
  background: var(--green-soft);
  color: var(--green);
}

.list-row.expense {
  background: var(--terra-soft);
  color: var(--terra);
}

.list-row.save {
  background: var(--save-soft);
  color: var(--save);
}

.list-row.note {
  background: var(--note-soft);
  color: var(--muted);
}

.list-row.card-charge {
  background: var(--navy-soft);
  color: var(--navy);
}

.list-row.card-pay {
  background: var(--card-pay);
  color: var(--card-pay-ink);
}

.list-date {
  grid-area: date;
  font-weight: 700;
  font-size: 13px;
}

.list-name {
  grid-area: name;
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-kind {
  grid-area: kind;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}

.list-amt {
  grid-area: amt;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  justify-self: end;
}

.list-run {
  grid-area: run;
  font-family: Fraunces, Georgia, serif;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  justify-self: end;
  opacity: 0.85;
}

.list-empty {
  margin: 24px 0;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 720px) {
  .month-menu {
    left: 0;
    right: auto;
    transform: none;
    min-width: 0;
    width: max-content;
    max-width: calc(100vw - 24px);
  }

  .file-menu {
    left: auto;
    right: 0;
  }

  .week-grid {
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    gap: 8px;
  }

  .week-grid .day-slot {
    display: none;
  }

  .day-card {
    min-height: 168px;
  }

  .file-status {
    display: none;
  }

  .type-toggle {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {

  .month-board[style*="--months-per-row: 12"],
  .month-board[style*="--months-per-row: 6"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .month-board[style*="--months-per-row: 3"] {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    max-width: 420px;
    margin: 0 auto;
  }
}
