:root {
  --blue: #148cff;
  --blue-2: #18c6e7;
  --cyan: #1bd7d1;
  --purple: #8e46ff;
  --green: #12a879;
  --red: #ff3047;
  --orange: #ff9f28;
  --ink: #1c2433;
  --muted: #7a8495;
  --line: rgba(120, 150, 190, 0.18);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 48px rgba(28, 102, 192, 0.16);
  --soft-shadow: 0 12px 28px rgba(49, 78, 120, 0.1);
  --bottom-nav-height: 86px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 19px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #edf6ff;
}

body {
  overflow: hidden;
  letter-spacing: 0;
  font-size: var(--text-md);
  font-variant-numeric: tabular-nums;
}

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

button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

input,
textarea {
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
}

.app-shell :where(
  .segment-btn,
  .chip,
  .ghost-pill,
  .primary-button,
  .secondary-button,
  .round-action,
  .shortcut,
  .nav-item,
  .category-tile,
  .filter-tile,
  .export-method,
  .settings-row,
  .modal-option,
  .file-row,
  .export-row
) {
  overflow: hidden;
}

.app-shell :where(
  .row-title,
  .rank-name,
  .settings-row h3,
  .settings-row p,
  .profile-title,
  .profile-sub,
  .filter-value span,
  .export-row > span,
  .file-row > span,
  .modal-option > span,
  .modal-option strong,
  .local-banner strong,
  .local-banner span,
  .day-head > span,
  .result-head span,
  .rate-pill strong,
  .amount-main,
  .amount-sub
) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-shell :where(
  .modal-text,
  .export-hero p,
  .empty-state,
  .local-note,
  .toast
) {
  overflow-wrap: anywhere;
}

.app-shell :where(
  .summary-value,
  .amount-number,
  .amount-main,
  .amount-sub,
  .day-totals,
  .rank-row,
  .card-head,
  .settings-side,
  .rate-inline,
  .amount-converted,
  .date-input,
  .amount-input,
  .file-row,
  .result-head
) {
  font-variant-numeric: tabular-nums;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.8), transparent 28%),
    linear-gradient(168deg, #0c8cff 0%, #19cbe7 27%, #eff6ff 42%, #f7f9ff 100%);
}

.view {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 18px);
  scrollbar-width: none;
}

.view::-webkit-scrollbar {
  display: none;
}

.page {
  min-height: 100%;
  padding: calc(env(safe-area-inset-top) + 22px) 16px 0;
  position: relative;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.26), transparent 8%),
    radial-gradient(circle at 14% 38%, rgba(146, 105, 255, 0.12), transparent 21%),
    radial-gradient(circle at 89% 60%, rgba(16, 206, 199, 0.12), transparent 24%);
}

.page-body {
  position: relative;
  z-index: 1;
}

.hero,
.top-bar {
  color: white;
  position: relative;
  z-index: 1;
}

.home-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 8px 3px 28px;
}

.app-title {
  margin: 0;
  font-size: 34px;
  font-weight: 830;
  line-height: 1.05;
}

.app-subtitle {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.55;
}

.app-subtitle span {
  display: block;
}

.rate-cluster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 12px;
  align-items: center;
  min-width: 218px;
}

.rate-pill {
  min-height: 76px;
  padding: 11px 14px 10px;
  border-radius: 22px;
  color: white;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(18px);
}

.rate-pill small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: 0.96;
}

.rate-pill strong {
  display: block;
  margin-top: 4px;
  font-size: var(--text-lg);
  letter-spacing: 0;
  white-space: nowrap;
}

.rate-pill > span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.1;
  white-space: nowrap;
}

.round-action {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  color: var(--blue);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.round-action .icon {
  width: 24px;
  height: 24px;
}

.refresh-label {
  display: block;
  margin-top: 6px;
  color: white;
  font-size: 13px;
  text-align: center;
  font-weight: 700;
}

.glass-card,
.panel,
.list-card,
.settings-group,
.export-card,
.filter-card {
  background: var(--glass);
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px);
}

.period-shell {
  padding: 8px;
  margin-top: -8px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(var(--count, 3), 1fr);
  gap: 6px;
  min-height: 48px;
  padding: 5px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.segment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  border-radius: 19px;
  color: #243146;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.segment-btn.active {
  color: white;
  background: linear-gradient(135deg, #117cff, #1fc9df);
  box-shadow: 0 8px 18px rgba(16, 135, 255, 0.24);
}

.segment-btn.light.active {
  color: var(--blue);
  background: white;
}

.summary-card {
  margin-top: 8px;
  padding: 22px 20px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.68fr) minmax(0, 1.29fr);
  gap: 10px;
}

.summary-label {
  color: #293449;
  font-size: 15px;
  margin-bottom: 6px;
}

.summary-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 830;
  line-height: 1;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-value .currency {
  font-size: 11px;
  color: #657086;
  font-weight: 650;
  flex: 0 0 auto;
}

.red {
  color: var(--red);
}

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

.dark {
  color: #2a3144;
}

.trend-line {
  width: 100%;
  height: 92px;
  margin-top: 14px;
  display: block;
}

.summary-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 4px;
  color: #66728a;
  font-size: var(--text-sm);
}

.summary-foot strong {
  color: var(--green);
  font-weight: 850;
}

.shortcut-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 14px 0 14px;
  padding: 14px 10px;
}

.shortcut {
  display: grid;
  place-items: center;
  gap: 8px;
  color: #4d5870;
  font-weight: 650;
  min-height: 82px;
  border-radius: 18px;
}

.shortcut:active,
.nav-item:active,
.chip:active,
.category-tile:active,
.list-row:active {
  transform: scale(0.985);
}

.shortcut-icon,
.category-icon,
.method-icon,
.small-icon,
.rank-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  background: color-mix(in srgb, var(--tone, #1687ff) 16%, white);
  color: var(--tone, #1687ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.shortcut-icon {
  width: 48px;
  height: 48px;
  font-size: 25px;
}

.category-icon {
  width: 58px;
  height: 58px;
  font-size: 31px;
}

.method-icon,
.small-icon,
.rank-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  font-size: 22px;
}

.list-card {
  margin-top: 10px;
  padding: 12px 12px 0;
  overflow: hidden;
}

.day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #38445b;
  padding: 0 4px 8px;
  font-size: var(--text-lg);
  font-weight: 750;
}

.day-head small {
  color: #667287;
  font-weight: 650;
  font-size: var(--text-sm);
}

.day-totals {
  display: flex;
  gap: 14px;
  color: #38445b;
  font-size: var(--text-sm);
  white-space: nowrap;
  flex: 0 0 auto;
}

.list-row {
  position: relative;
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(132px, auto);
  align-items: center;
  gap: 7px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.list-row > span:nth-child(2) {
  min-width: 0;
}

.list-row:first-of-type {
  border-top: 0;
}

.row-title {
  display: block;
  font-size: var(--text-lg);
  font-weight: 760;
  color: #151c2b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-meta {
  display: block;
  margin-top: 4px;
  color: #607087;
  font-size: var(--text-sm);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.amount-block {
  text-align: right;
  white-space: nowrap;
  justify-self: end;
  width: max-content;
  max-width: min(188px, 100%);
  margin-right: 0;
}

.amount-main {
  display: block;
  font-size: var(--text-lg);
  font-weight: 830;
  line-height: 1.15;
}

.amount-sub {
  display: block;
  margin-top: 5px;
  color: #607087;
  font-size: var(--text-sm);
  line-height: 1.15;
}

.chev {
  color: #a8b0bd;
  font-size: 24px;
  line-height: 1;
}

.list-row .chev {
  position: absolute;
  right: 0;
  pointer-events: none;
  opacity: 0.65;
}

.fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right) + 20px);
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 18px);
  z-index: 8;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: white;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #11c9df, #246dff 56%, #8d42ff);
  box-shadow: 0 18px 36px rgba(35, 103, 255, 0.34);
}

.fab .plus {
  font-size: 56px;
  line-height: 48px;
  font-weight: 200;
}

.fab span:last-child {
  margin-top: -18px;
  font-size: 13px;
  font-weight: 800;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  padding: 8px 18px calc(env(safe-area-inset-bottom) + 8px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: rgba(255, 255, 255, 0.86);
  border-top: 1px solid rgba(146, 159, 181, 0.22);
  box-shadow: 0 -10px 36px rgba(57, 75, 109, 0.11);
  backdrop-filter: blur(24px);
}

.app-shell.nav-hidden .view {
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
  color: #5f6877;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
  border-radius: 18px;
}

.nav-item .icon {
  width: 28px;
  height: 28px;
}

.nav-item.active {
  color: var(--blue);
}

.nav-item.search-main.active .nav-icon-wrap {
  width: 54px;
  height: 54px;
  margin-top: -25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #2fd2df, #2669ff 70%, #7c4bff);
  box-shadow: 0 12px 24px rgba(40, 110, 255, 0.34);
}

.top-bar {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  padding: 0 0 18px;
}

.top-title {
  margin: 0;
  text-align: center;
  color: white;
  font-size: 25px;
  font-weight: 850;
}

.top-bar .round-action {
  color: #0f79f2;
}

.charts-page .top-bar {
  grid-template-columns: 70px 1fr 112px;
}

.charts-page .icon-text {
  white-space: nowrap;
}

.add-page {
  background: linear-gradient(160deg, #18d3d8 0%, #1888ff 33%, #eef6ff 51%, #f8f9ff 100%);
  padding-top: calc(env(safe-area-inset-top) + 8px);
}

.add-page .page-body {
  padding-bottom: 10px;
}

.add-page .top-bar {
  padding-bottom: 6px;
}

.type-switch {
  width: min(100%, 430px);
  margin: 0 auto 8px;
  --count: 2;
}

.type-switch .segment-btn {
  font-size: 18px;
}

.type-switch .segment-btn.expense.active {
  background: linear-gradient(135deg, #ff5471, #ff6d83);
}

.type-switch .segment-btn.income.active {
  background: linear-gradient(135deg, #20b982, #33d8a6);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  color: #192232;
  font-size: var(--text-lg);
  font-weight: 780;
}

.section-title .link {
  color: #68778d;
  font-size: var(--text-sm);
  font-weight: 650;
}

.category-panel {
  padding: 15px;
}

.add-page .category-panel {
  min-height: 154px;
  margin-top: 8px;
  padding: 10px 10px 12px;
  overflow: hidden;
}

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

.add-page .category-grid {
  gap: 7px 8px;
}

.add-page .add-choice-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, 58px);
}

.category-tile {
  min-height: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 8px 4px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.74);
  color: #222a38;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.add-page .category-tile {
  min-height: 58px;
  gap: 2px;
  border-radius: 15px;
  align-content: center;
  justify-items: center;
  padding: 4px 3px;
}

.add-page .category-tile .category-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 17px;
}

.add-page .category-tile small {
  display: block;
  font-size: 10px;
  line-height: 1.05;
  width: 100%;
  text-align: center;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.add-page .category-tile.more {
  grid-column: 5;
  grid-row: 2;
}

.add-method-panel {
  margin-top: 8px;
}

.add-choice-title {
  margin-bottom: 7px;
}

.category-tile.selected {
  color: var(--blue);
  outline: 2px solid var(--blue);
  background: rgba(245, 251, 255, 0.9);
}

.category-tile small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.add-page .category-tile small {
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: 10px;
  line-height: 1.05;
}

.form-card {
  margin-top: 8px;
  overflow: hidden;
}

.form-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
}

.add-page .form-row {
  min-height: 34px;
  padding: 0 12px;
  grid-template-columns: 86px minmax(0, 1fr) auto;
}

.form-row:first-child {
  border-top: 0;
}

.form-label {
  color: #111827;
  font-weight: 720;
}

.currency-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(235, 239, 246, 0.86);
}

.currency-toggle button {
  min-width: 56px;
  height: 28px;
  border-radius: 13px;
  font-weight: 760;
}

.currency-toggle button.active {
  color: white;
  background: linear-gradient(135deg, #137cff, #14a9ff);
}

.rate-inline {
  color: #8a93a2;
  font-weight: 650;
  white-space: nowrap;
}

.ghost-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 17px;
  color: #2a6cff;
  background: rgba(246, 247, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(70, 110, 255, 0.1);
  font-weight: 760;
}

.add-page .ghost-pill {
  min-height: 30px;
  padding: 0 10px;
}

.amount-display {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  min-height: 92px;
  padding: 10px 16px 16px;
  border-top: 1px solid var(--line);
}

.add-page .amount-display {
  min-height: 54px;
  padding: 7px 12px 8px;
}

.amount-label {
  color: var(--blue);
  font-size: 15px;
  font-weight: 720;
}

.amount-number {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #111;
  font-size: 38px;
  font-weight: 760;
  line-height: 1;
}

.add-page .amount-number {
  margin-top: 4px;
  font-size: 24px;
}

.cursor {
  width: 2px;
  height: 42px;
  background: #2d8aff;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.amount-converted {
  color: #9298a4;
  font-size: 16px;
  font-weight: 650;
  white-space: nowrap;
}

.chip-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 0 2px;
  scrollbar-width: none;
}

.chip-row .chip {
  flex: 0 0 auto;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border-radius: 18px;
  background: rgba(241, 244, 249, 0.9);
  color: #323946;
  white-space: nowrap;
  font-weight: 650;
}

.add-page .chip {
  min-height: 34px;
  padding: 0 8px;
  font-size: 14px;
}

.chip.active {
  color: white;
  background: linear-gradient(135deg, #127cff, #18a8ff);
}

.note-input {
  width: 100%;
  min-width: 0;
  font-size: 16px;
}

.date-pill {
  min-width: 98px;
  justify-content: center;
}

.keypad-card {
  margin-top: 12px;
  padding: 13px 13px 16px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.add-page .keypad-card {
  margin-top: 8px;
  padding: 8px;
  border-radius: 20px;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.key {
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: #1b1e26;
  font-size: 25px;
  font-weight: 650;
  box-shadow: 0 6px 15px rgba(56, 72, 103, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.add-page .key {
  height: 34px;
}

.key.op {
  color: #386bff;
  background: rgba(248, 249, 255, 0.82);
}

.save-button,
.primary-button {
  width: 100%;
  min-height: 56px;
  border-radius: 22px;
  color: white;
  font-size: 20px;
  font-weight: 850;
  background: linear-gradient(110deg, #078fff, #1ac7df 58%, #a832f2);
  box-shadow: 0 14px 24px rgba(69, 91, 255, 0.28);
}

.save-button {
  margin-top: 12px;
}

.add-page .save-button {
  min-height: 42px;
  margin-top: 7px;
  border-radius: 18px;
  font-size: 17px;
}

.charts-page,
.search-page,
.export-page,
.more-page,
.category-page {
  background: linear-gradient(160deg, #197eff 0%, #19cce4 24%, #ecf5ff 39%, #f7f8ff 100%);
}

.chart-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.icon-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 20px;
  color: white;
  font-weight: 760;
}

.chart-currency {
  --count: 2;
  width: 148px;
}

.tab-card {
  margin-top: 10px;
  padding: 0;
  overflow: hidden;
}

.top-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 54px;
  background: rgba(255, 255, 255, 0.62);
}

.top-tabs button {
  position: relative;
  color: #8a93a2;
  font-size: 18px;
  font-weight: 800;
}

.top-tabs button.active {
  color: var(--red);
}

.top-tabs button.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 26px;
  height: 4px;
  border-radius: 99px;
  background: currentColor;
  transform: translateX(-50%);
}

.donut-panel {
  position: relative;
  min-height: 392px;
  margin: 14px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 6% 22%, rgba(255, 168, 214, 0.25), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(17, 202, 216, 0.18), transparent 30%),
    rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.donut-wrap {
  position: absolute;
  left: 50%;
  top: 94px;
  width: 230px;
  height: 230px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: conic-gradient(var(--segments, #ff4248 0 32%, #237ef4 32% 50%, #2ecac7 50% 64%, #9462ed 64% 75%, #ffca32 75% 83%, #ff66a4 83% 89%, #2ad2b7 89% 95%, #7fb8ff 95% 100%));
  box-shadow: 0 16px 34px rgba(56, 80, 118, 0.12);
}

.donut-wrap::before {
  content: "";
  position: absolute;
  inset: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
}

.donut-center span {
  display: block;
  color: #333c4d;
  font-weight: 760;
}

.donut-center strong {
  display: block;
  margin: 8px 0;
  color: #293145;
  font-size: 31px;
  font-weight: 860;
}

.donut-label {
  position: absolute;
  display: grid;
  place-items: center;
  gap: 6px;
  color: #303849;
  font-size: 14px;
  font-weight: 760;
  text-align: center;
}

.donut-label .rank-icon {
  width: 46px;
  height: 46px;
  font-size: 27px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 18px rgba(55, 73, 100, 0.13);
}

.rank-card {
  margin-top: 14px;
  padding: 16px;
  overflow: hidden;
}

.card-head {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 62px 108px 14px;
  align-items: center;
  gap: 10px;
  color: #8892a2;
  font-size: 14px;
  font-weight: 700;
}

.card-head strong {
  grid-column: 1 / 3;
  color: #344056;
  font-size: 18px;
}

.card-head span {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rank-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 62px 108px 14px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  font-size: var(--text-md);
}

.rank-row > span:nth-child(3),
.rank-row > span:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.rank-no {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #aeb5c1;
  font-size: 12px;
  font-weight: 800;
}

.rank-no.top1 {
  background: #ff444d;
}

.rank-no.top2 {
  background: #1b84ff;
}

.rank-no.top3 {
  background: #22c8c4;
}

.rank-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
}

.rank-name {
  display: block;
  font-weight: 780;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar {
  height: 5px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(73, 84, 110, 0.08);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: var(--tone, #1687ff);
}

.trend-card {
  margin: 14px 0 0;
  padding: 17px;
}

.trend-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 8px;
  margin-top: 14px;
}

.trend-stats span {
  display: block;
  color: #8892a2;
  font-size: 13px;
  font-weight: 700;
}

.trend-stats strong {
  display: block;
  margin: 6px 0;
  font-size: 19px;
  color: #344056;
}

.category-header {
  padding-bottom: 12px;
}

.category-header .segmented {
  --count: 2;
}

.category-page .page-body {
  padding-bottom: 108px;
}

.info-pill {
  width: fit-content;
  margin: 16px auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 16px;
  color: #5f7da7;
  background: rgba(226, 234, 247, 0.78);
  font-weight: 730;
}

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

.category-card {
  min-height: 104px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  padding: 14px 12px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--soft-shadow);
}

.category-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.status-pill {
  width: fit-content;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #10a854;
  background: rgba(39, 198, 94, 0.12);
  border: 1px solid rgba(39, 198, 94, 0.22);
}

.status-pill.off {
  color: #ff513e;
  background: rgba(255, 92, 74, 0.1);
  border-color: rgba(255, 92, 74, 0.22);
}

.handle {
  color: #b6bdc9;
  font-size: 26px;
}

.floating-actions {
  position: fixed;
  left: max(16px, env(safe-area-inset-left) + 16px);
  right: max(16px, env(safe-area-inset-right) + 16px);
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.secondary-button {
  min-height: 54px;
  border-radius: 20px;
  color: #ff513e;
  font-size: 17px;
  font-weight: 830;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.search-title-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 12px;
  align-items: center;
}

.search-box {
  display: grid;
  grid-template-columns: 32px 1fr 34px;
  align-items: center;
  min-height: 58px;
  padding: 0 14px;
  border-radius: 28px;
  color: white;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(20px);
}

.search-box input {
  color: white;
  font-size: 16px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.filter-card {
  margin-top: 12px;
  padding: 16px;
}

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

.filter-tile {
  min-height: 72px;
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.filter-tile .tile-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 780;
  line-height: 1.25;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.filter-value {
  margin-top: 12px;
  color: #7b8494;
  font-weight: 650;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  line-height: 1.25;
}

.date-range {
  display: grid;
  grid-template-columns: 1fr 26px 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.date-input,
.amount-input {
  min-height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(97, 111, 138, 0.08);
}

.amount-range {
  display: grid;
  grid-template-columns: 1fr 26px 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: 12px;
  margin: 12px 0;
}

.search-results {
  overflow: hidden;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 4px;
  color: #727d90;
  font-size: 15px;
  font-weight: 650;
}

.export-hero {
  min-height: 258px;
  padding-top: 8px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 6px;
  color: white;
}

.export-hero h1 {
  margin: 26px 0 12px;
  font-size: 36px;
  line-height: 1.08;
  font-weight: 860;
}

.export-hero p {
  margin: 0;
  max-width: 280px;
  line-height: 1.5;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.92);
}

.excel-art {
  align-self: start;
  justify-self: end;
  width: 150px;
  height: 150px;
  position: relative;
  margin-top: 20px;
}

.excel-sheet {
  position: absolute;
  inset: 10px 20px 36px 22px;
  border-radius: 16px 32px 18px 18px;
  background: linear-gradient(160deg, white, #ecf6ff);
  box-shadow: 0 20px 36px rgba(33, 97, 172, 0.25);
}

.excel-sheet::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  border-top: 38px solid #cfe4ff;
  border-left: 38px solid transparent;
  border-radius: 0 28px 0 0;
}

.excel-x {
  position: absolute;
  left: 30px;
  top: 42px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: #43c682;
  font-size: 28px;
  font-weight: 900;
}

.excel-base {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 14px;
  height: 42px;
  border-radius: 50%;
  background: rgba(185, 229, 255, 0.52);
  transform: perspective(80px) rotateX(42deg);
}

.export-card {
  margin-top: 12px;
  padding: 18px;
}

.export-card .segmented .segment-btn,
.filter-card .segmented .segment-btn {
  font-size: 14px;
}

.export-card h2,
.settings-group h2,
.filter-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 19px;
}

.export-list {
  display: grid;
}

.export-row {
  display: grid;
  grid-template-columns: 32px 34px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-top: 1px solid var(--line);
}

.export-row:first-child {
  border-top: 0;
}

.check {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(145deg, #1687ff, #216bdf);
  font-weight: 900;
}

.check.off {
  background: rgba(130, 144, 166, 0.2);
  color: transparent;
}

.file-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 16px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border-radius: 15px;
  background: rgba(247, 249, 253, 0.78);
  box-shadow: inset 0 0 0 1px rgba(74, 93, 132, 0.07);
}

.export-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.export-method {
  min-height: 116px;
  padding: 12px 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(71, 86, 115, 0.1);
  text-align: center;
  color: #202838;
  font-weight: 790;
  line-height: 1.25;
}

.export-method small {
  display: block;
  color: #818b9b;
  font-size: 12px;
  font-weight: 650;
}

.export-method.active {
  outline: 2px solid var(--blue);
}

.local-note {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7c8798;
  font-weight: 700;
}

.more-profile {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(0, auto);
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 16px;
  margin: 16px 0 16px;
  text-align: left;
}

.more-page .category-icon,
.more-page .small-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 24px;
  justify-self: start;
}

.profile-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-align: left;
}

.profile-sub {
  margin-top: 4px;
  color: #777f8f;
  font-weight: 650;
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 15px;
  color: #22a957;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 760;
  font-size: 13px;
  max-width: 132px;
  white-space: nowrap;
}

.local-badge .icon {
  width: 16px;
  height: 16px;
}

.settings-group {
  margin-top: 12px;
  padding: 8px 0;
  overflow: hidden;
}

.settings-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(0, auto) 14px;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.settings-row:first-child {
  border-top: 0;
}

.settings-row h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
  font-weight: 800;
  text-align: left;
}

.settings-row p {
  margin: 4px 0 0;
  color: #858d9b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
}

.settings-side {
  color: #8a93a2;
  font-size: 13px;
  text-align: right;
  max-width: 96px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.local-banner {
  min-height: 70px;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  text-align: left;
}

.local-banner strong {
  display: block;
  color: #1678db;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
}

.local-banner span {
  color: #7a8494;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
}

.empty-state {
  padding: 30px 18px;
  text-align: center;
  color: #7d8797;
}

.empty-state strong {
  display: block;
  color: #354058;
  margin-bottom: 6px;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.modal-root.open {
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 32, 47, 0.34);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  max-height: min(78dvh, 680px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 72px rgba(20, 38, 70, 0.28);
}

.modal-title {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 860;
  line-height: 1.25;
}

.modal-text {
  margin: 0 0 16px;
  color: #657086;
  line-height: 1.5;
  font-size: var(--text-md);
}

.modal-actions {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.modal-list {
  display: grid;
  gap: 8px;
}

.modal-option {
  min-height: 54px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(241, 245, 250, 0.72);
  line-height: 1.25;
}

.modal-option strong {
  max-width: 132px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.modal-option small {
  color: #7f8998;
  font-size: var(--text-xs);
  line-height: 1.25;
}

.edit-title,
.edit-subtitle {
  text-align: center;
}

.modal-card:has(.edit-sheet) {
  top: calc(env(safe-area-inset-top) + 46px);
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  max-height: none;
  padding: 18px;
}

.edit-sheet {
  display: grid;
  gap: 9px;
}

.edit-category-row,
.edit-field-row,
.edit-amount-card {
  width: 100%;
  border-radius: 18px;
  background: rgba(241, 245, 250, 0.72);
}

.edit-category-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 98px 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  text-align: left;
}

.edit-category-row > span:first-child {
  color: #6b7484;
  font-size: 15px;
  font-weight: 760;
}

.edit-category-row .category-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 25px;
}

.edit-category-row strong {
  display: block;
  min-width: 0;
  color: #202838;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-align: right;
}

.edit-amount-card {
  position: relative;
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px 16px 18px;
}

.edit-amount-card label {
  min-width: 0;
  display: block;
}

.edit-amount-card label:last-of-type {
  text-align: right;
}

.edit-amount-card label > span {
  display: block;
  margin-bottom: 8px;
  color: #202838;
  font-size: 13px;
  font-weight: 800;
}

.edit-amount-card label:last-of-type > span {
  color: #202838;
}

.edit-amount-card b {
  display: inline;
  margin-right: 2px;
  font-size: 20px;
  font-weight: 860;
  vertical-align: baseline;
}

.edit-amount-card.red b,
.edit-amount-card.red input {
  color: var(--red);
}

.edit-amount-card.green b,
.edit-amount-card.green input {
  color: var(--green);
}

.edit-amount-card input {
  display: inline-block;
  width: 92px;
  font-size: 23px;
  font-weight: 850;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.edit-amount-card label:last-of-type input {
  text-align: right;
}

.edit-amount-card small {
  display: block;
  margin-top: 8px;
  color: #8a93a2;
  font-size: 12px;
  font-weight: 650;
}

.edit-amount-card > i {
  width: 1px;
  height: 62px;
  background: #dfe8f2;
}

.edit-amount-card > em {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  min-width: 72px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #6e7f95;
  background: #edf5ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.edit-field-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  text-align: left;
}

.edit-field-row > span {
  color: #6b7484;
  font-size: 15px;
  font-weight: 760;
}

.edit-field-row > strong,
.edit-field-row input,
.edit-field-row textarea {
  color: #202838;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.edit-date-time {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
}

.edit-date-time input {
  width: 100%;
  font-size: 15px;
}

.edit-note-row {
  min-height: 78px;
  align-items: start;
}

.edit-note-row textarea {
  width: 100%;
  resize: none;
  color: #202838;
}

.edit-actions {
  margin-top: 12px;
}

.field {
  min-height: 48px;
  width: 100%;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(236, 241, 248, 0.78);
}

.toast-root {
  position: fixed;
  left: 16px;
  right: 16px;
  top: calc(env(safe-area-inset-top) + 16px);
  z-index: 40;
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.toast {
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 18px;
  color: white;
  background: rgba(32, 42, 61, 0.86);
  box-shadow: 0 16px 38px rgba(25, 31, 43, 0.22);
  backdrop-filter: blur(14px);
  font-weight: 700;
  animation: toast-in 0.22s ease-out;
}

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

@media (max-width: 520px) {
}

.hidden {
  display: none !important;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
}

.mono {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 560px) {
  .app-shell {
    width: 430px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(51, 74, 112, 0.12), 0 20px 80px rgba(35, 52, 84, 0.18);
  }

  body {
    display: grid;
    place-items: center;
    background: #dbe9f8;
  }
}

@media (max-width: 380px) {
  .app-title {
    font-size: 29px;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .rate-cluster {
    min-width: 0;
  }

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

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

  .category-manage-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .export-methods {
    grid-template-columns: 1fr;
  }
}
