:root {
  color-scheme: light;
  --bg: #f4efe7;
  --surface: rgba(255, 253, 249, 0.94);
  --surface-solid: #fffdf9;
  --surface-muted: #f7f1e9;
  --text: #2d261f;
  --text-soft: #7c7166;
  --text-faint: #a99d90;
  --line: rgba(68, 47, 28, 0.09);
  --orange: #ff8a10;
  --orange-deep: #eb6f00;
  --orange-soft: #fff0d7;
  --yellow: #ffd15a;
  --green: #30a46c;
  --green-soft: #e6f7ee;
  --red: #ed665d;
  --red-soft: #fff0ee;
  --blue: #4d84d8;
  --blue-soft: #edf3ff;
  --shadow: 0 14px 36px rgba(87, 57, 25, 0.09);
  --shadow-soft: 0 7px 20px rgba(87, 57, 25, 0.07);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --nav-height: 78px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 192, 91, 0.22), transparent 31rem),
    radial-gradient(circle at 84% 83%, rgba(87, 137, 191, 0.13), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family:
    "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17130f;
  --surface: rgba(35, 29, 24, 0.94);
  --surface-solid: #241e19;
  --surface-muted: #2e261f;
  --text: #f8eee2;
  --text-soft: #b8aa9a;
  --text-faint: #7f7265;
  --line: rgba(255, 240, 220, 0.09);
  --orange-soft: #3e2b17;
  --green-soft: #17372a;
  --red-soft: #3d2522;
  --blue-soft: #203047;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.22);
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 138, 16, 0.24);
  outline-offset: 2px;
}

button,
.clickable {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(4px);
  pointer-events: none;
}

.ambient-one {
  top: -13rem;
  left: -15rem;
  width: 38rem;
  height: 38rem;
  background: rgba(255, 157, 41, 0.11);
}

.ambient-two {
  right: -19rem;
  bottom: -18rem;
  width: 44rem;
  height: 44rem;
  background: rgba(63, 113, 170, 0.07);
}

.app-frame {
  position: relative;
  width: min(100%, 440px);
  height: min(940px, 100dvh);
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 32px 90px rgba(63, 43, 24, 0.18);
  isolation: isolate;
}

@media (min-width: 520px) {
  body {
    display: grid;
    place-items: center;
  }

  .app-frame {
    height: min(900px, calc(100dvh - 32px));
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 32px;
  }
}

@media (max-width: 519px) {
  .app-frame {
    height: 100dvh;
    width: 100%;
  }
}

.app-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: max(14px, env(safe-area-inset-top)) 18px calc(var(--nav-height) + 34px);
  scrollbar-width: none;
}

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

.page > * {
  animation: rise-in 0.34s ease both;
}

.page > *:nth-child(2) {
  animation-delay: 0.03s;
}

.page > *:nth-child(3) {
  animation-delay: 0.06s;
}

.page > *:nth-child(4) {
  animation-delay: 0.09s;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  margin-bottom: 14px;
}

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 4px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 138, 16, 0.12);
}

.page-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.page-subtitle {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.icon-button,
.avatar-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.icon-button:hover,
.avatar-button:hover {
  transform: translateY(-1px);
  background: var(--orange-soft);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.avatar-button {
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd463, #ff8a10);
  color: #fff;
  font-weight: 800;
}

.section {
  margin-top: 22px;
}

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

.section-title {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
}

.section-link:hover {
  color: var(--orange-deep);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 21px 21px 18px;
  border-radius: var(--radius-xl);
  color: #fffdf8;
  background:
    radial-gradient(circle at 102% -10%, rgba(255, 255, 255, 0.33), transparent 38%),
    linear-gradient(135deg, #ffad25 0%, #ff8a10 58%, #f07400 100%);
  box-shadow: 0 19px 38px rgba(223, 111, 0, 0.25);
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-card::before {
  width: 145px;
  height: 145px;
  right: -70px;
  top: -76px;
}

.hero-card::after {
  width: 90px;
  height: 90px;
  right: -22px;
  top: -38px;
}

.hero-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hero-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 600;
}

.hero-amount {
  margin: 5px 0 0;
  font-family: "Barlow", "SF Pro Display", system-ui, sans-serif;
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.045em;
}

.hero-amount small {
  margin-right: 5px;
  font-size: 19px;
  font-weight: 650;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 21px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
}

.hero-stat {
  min-width: 0;
}

.hero-stat + .hero-stat {
  padding-left: 11px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.hero-stat-value {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.logo-feather {
  width: 42px;
  height: 42px;
  flex: none;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 14px 8px 12px;
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.quick-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 580;
}

.quick-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-size: 23px;
  transition: transform 0.18s ease;
}

.quick-item:nth-child(2) .quick-icon {
  background: var(--green-soft);
  color: var(--green);
}

.quick-item:nth-child(3) .quick-icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.quick-item:nth-child(4) .quick-icon {
  background: #fff0f0;
  color: #df6c73;
}

.quick-item:nth-child(5) .quick-icon {
  background: #f3edff;
  color: #8a67d5;
}

body[data-theme="dark"] .quick-item:nth-child(4) .quick-icon {
  background: #3d2729;
}

body[data-theme="dark"] .quick-item:nth-child(5) .quick-icon {
  background: #302744;
}

.quick-item:hover .quick-icon {
  transform: translateY(-2px) rotate(-3deg);
}

.notice-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 138, 16, 0.12);
  border-radius: 16px;
  background: linear-gradient(90deg, var(--orange-soft), rgba(255, 248, 237, 0.75));
  color: var(--text-soft);
  font-size: 11px;
}

body[data-theme="dark"] .notice-strip {
  background: linear-gradient(90deg, #382818, #2a221a);
}

.notice-strip strong {
  color: var(--text);
}

.notice-bulb {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 138, 16, 0.14);
}

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.mini-card {
  padding: 15px;
}

.mini-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-soft);
  font-size: 11px;
}

.mini-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  color: var(--text);
}

.mini-card-value {
  margin-top: 11px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.mini-card-hint {
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 10px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--surface-muted);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffad25, #ff7f09);
  transition: width 0.45s ease;
}

.progress-fill.green {
  background: linear-gradient(90deg, #63cd9b, #2da76d);
}

.progress-fill.blue {
  background: linear-gradient(90deg, #75a9ed, #477fd2);
}

.goal-card {
  position: relative;
  overflow: hidden;
  padding: 17px;
  background:
    radial-gradient(circle at 94% 10%, rgba(255, 194, 78, 0.18), transparent 42%),
    var(--surface-solid);
}

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

.goal-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e4f5eb;
  color: #2f9a63;
  font-size: 22px;
}

.goal-title {
  margin: 0;
  font-size: 15px;
}

.goal-story {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 11px;
}

.goal-amount {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 11px;
}

.goal-amount strong {
  margin-left: 4px;
  color: var(--text);
  font-size: 18px;
}

.goal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 10px;
}

.text-button {
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-size: 11px;
  font-weight: 680;
}

.bill-list {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.bill-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px 8px;
  color: var(--text-faint);
  font-size: 10px;
}

.bill-day strong {
  color: var(--text-soft);
  font-size: 11px;
}

.bill-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.bill-row:hover {
  background: rgba(255, 138, 16, 0.045);
}

.bill-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--orange-soft);
  font-size: 21px;
}

.bill-content {
  min-width: 0;
  flex: 1;
}

.bill-title {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 660;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bill-meta {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-faint);
  font-size: 10px;
  white-space: nowrap;
}

.bill-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.bill-amount {
  flex: none;
  font-family: "Barlow", "SF Pro Display", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 720;
}

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

.expense {
  color: var(--text);
}

.empty-state {
  padding: 36px 18px;
  color: var(--text-faint);
  text-align: center;
  font-size: 12px;
}

.empty-illustration {
  position: relative;
  width: 90px;
  height: 72px;
  margin: 0 auto 12px;
}

.empty-illustration::before {
  content: "";
  position: absolute;
  left: 17px;
  bottom: 8px;
  width: 55px;
  height: 52px;
  border: 3px solid #c9b8a5;
  border-radius: 9px 9px 14px 14px;
  background: #fff9ef;
  transform: rotate(-5deg);
}

.empty-illustration::after {
  content: "¥";
  position: absolute;
  top: 15px;
  left: 43px;
  color: var(--orange);
  font-size: 25px;
  font-weight: 750;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.filter-chip {
  flex: none;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text-soft);
  font-size: 11px;
}

.filter-chip.active {
  border-color: transparent;
  background: var(--text);
  color: var(--surface-solid);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-solid);
  color: var(--text-faint);
}

.search-box svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.search-box input {
  width: 100%;
  height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.month-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.month-switcher button {
  width: 29px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
}

.month-switcher button:hover {
  background: var(--orange-soft);
}

.month-label {
  min-width: 66px;
  text-align: center;
  font-size: 11px;
  font-weight: 650;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.summary-cell {
  padding: 13px 11px;
  border-radius: 17px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.summary-cell span {
  display: block;
  color: var(--text-faint);
  font-size: 9px;
}

.summary-cell strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 15px;
  text-overflow: ellipsis;
}

.asset-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 11px;
}

.asset-hero {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.65), transparent 40%),
    linear-gradient(135deg, #243344, #17212e);
  color: #fff;
  box-shadow: 0 16px 32px rgba(16, 29, 42, 0.2);
}

.asset-hero::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -60px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(255, 255, 255, 0.035),
    0 0 0 56px rgba(255, 255, 255, 0.025);
}

.asset-hero .hero-label {
  color: rgba(255, 255, 255, 0.58);
}

.asset-hero .hero-amount {
  font-size: 28px;
}

.asset-column {
  display: grid;
  gap: 11px;
}

.asset-mini {
  padding: 14px;
  border-radius: 19px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.asset-mini span {
  color: var(--text-faint);
  font-size: 10px;
}

.asset-mini strong {
  display: block;
  margin-top: 5px;
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 17px;
}

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

.account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 17px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.account-logo {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.account-copy {
  min-width: 0;
  flex: 1;
}

.account-name {
  font-size: 13px;
  font-weight: 660;
}

.account-kind {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 10px;
}

.account-value {
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 720;
}

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

.module-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
  color: var(--text-soft);
  font-size: 10px;
}

.module-tile span:first-child {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 19px;
}

.segment {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.segment button {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-size: 11px;
}

.segment button.active {
  background: var(--orange);
  color: #fff;
  font-weight: 680;
}

.chart-card {
  padding: 18px;
}

.chart-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.chart-card-head h3 {
  margin: 0;
  font-size: 15px;
}

.chart-card-head p {
  margin: 4px 0 0;
  color: var(--text-faint);
  font-size: 10px;
}

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

.donut {
  position: relative;
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--orange) 0 45%, #ffd05a 45% 70%, #78b1e7 70% 88%, #9a80dc 88% 100%);
  transform: rotate(-16deg);
}

.donut::before {
  content: "";
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--surface-solid);
  box-shadow: inset 0 0 0 1px var(--line);
}

.donut-center {
  position: absolute;
  z-index: 1;
  transform: rotate(16deg);
  text-align: center;
}

.donut-center span {
  display: block;
  color: var(--text-faint);
  font-size: 9px;
}

.donut-center strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.legend-list {
  display: grid;
  gap: 9px;
}

.legend-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.legend-name {
  overflow: hidden;
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-value {
  font-family: "Barlow", system-ui, sans-serif;
  font-weight: 650;
}

.bar-chart {
  height: 152px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 10px 0;
  border-top: 1px dashed var(--line);
}

.bar-column {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  flex: 1;
}

.bar-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bar-income,
.bar-expense {
  width: 10px;
  min-height: 4px;
  border-radius: 8px 8px 3px 3px;
}

.bar-income {
  background: linear-gradient(180deg, #61c894, #2f9c66);
}

.bar-expense {
  background: linear-gradient(180deg, #ffb43e, #f17e06);
}

.bar-labels {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 9px;
  color: var(--text-faint);
  text-align: center;
  font-size: 9px;
}

.rank-list {
  display: grid;
  gap: 13px;
}

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

.rank-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--orange-soft);
  font-size: 20px;
}

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

.rank-copy strong {
  font-size: 12px;
}

.rank-meta {
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 9px;
}

.rank-value {
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.profile-card {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 196, 73, 0.3), transparent 31%),
    linear-gradient(135deg, #fff5df, #fffaf2);
  box-shadow: var(--shadow-soft);
}

body[data-theme="dark"] .profile-card {
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 196, 73, 0.14), transparent 31%),
    linear-gradient(135deg, #31261a, #261f19);
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: linear-gradient(145deg, #ffbd37, #ff8108);
  color: #fff;
  font-size: 24px;
  font-weight: 780;
  box-shadow: 0 8px 18px rgba(223, 117, 0, 0.2);
}

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

.profile-copy h2 {
  margin: 0;
  font-size: 18px;
}

.profile-copy p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 10px;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(255, 138, 16, 0.12);
  color: var(--orange-deep);
  font-size: 9px;
  font-weight: 680;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.profile-stat {
  text-align: center;
}

.profile-stat strong {
  display: block;
  font-size: 17px;
}

.profile-stat span {
  display: block;
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 9px;
}

.settings-group {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.settings-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

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

.settings-row:hover {
  background: rgba(255, 138, 16, 0.04);
}

.settings-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-muted);
  font-size: 17px;
}

.settings-copy {
  min-width: 0;
  flex: 1;
}

.settings-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 640;
}

.settings-copy span {
  display: block;
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 9px;
}

.settings-chevron {
  color: var(--text-faint);
  font-size: 18px;
}

.bottom-nav-wrap {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0 11px max(8px, env(safe-area-inset-bottom));
  pointer-events: none;
}

.bottom-nav {
  height: var(--nav-height);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 25px;
  background: rgba(255, 253, 249, 0.93);
  box-shadow: 0 15px 40px rgba(80, 51, 20, 0.16);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

body[data-theme="dark"] .bottom-nav {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(34, 28, 23, 0.94);
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  color: var(--text-faint);
  font-size: 9px;
}

.nav-item svg {
  width: 21px;
  height: 21px;
}

.nav-item.active {
  color: var(--orange-deep);
  font-weight: 700;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--orange);
}

.nav-add {
  position: relative;
  align-self: stretch;
}

.nav-add-button {
  position: absolute;
  top: -24px;
  left: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 6px solid var(--surface-solid);
  border-radius: 21px;
  background: linear-gradient(145deg, #ffb32d, #ff8108);
  color: #fff;
  box-shadow: 0 12px 24px rgba(235, 111, 0, 0.29);
  transform: translateX(-50%) rotate(0);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-add-button:hover {
  transform: translateX(-50%) translateY(-3px) rotate(5deg);
  box-shadow: 0 17px 28px rgba(235, 111, 0, 0.34);
}

.nav-add-button svg {
  width: 25px;
  height: 25px;
}

.modal {
  width: min(100%, 440px);
  max-width: 440px;
  max-height: min(90dvh, 840px);
  margin: auto auto 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px 28px 0 0;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 -20px 70px rgba(37, 27, 18, 0.25);
}

@media (min-width: 520px) {
  .modal {
    margin: auto;
    border-radius: 28px;
  }
}

.modal[open] {
  animation: modal-in 0.25s ease both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal::backdrop {
  background: rgba(28, 21, 16, 0.43);
  backdrop-filter: blur(4px);
}

.sheet {
  max-height: min(90dvh, 840px);
  overflow-y: auto;
  padding: 10px 18px max(22px, env(safe-area-inset-bottom));
  scrollbar-width: none;
}

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

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: rgba(128, 108, 87, 0.24);
}

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

.sheet-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.sheet-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 22px;
}

.type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-muted);
}

.type-switch button {
  padding: 10px;
  border-radius: 11px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
}

.type-switch button.active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(57, 41, 26, 0.08);
}

.type-switch button[data-type="income"].active {
  color: var(--green);
}

.amount-editor {
  margin: 18px 0 13px;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 184, 44, 0.2), transparent 42%),
    var(--surface-muted);
}

.amount-editor label {
  display: block;
  color: var(--text-faint);
  font-size: 10px;
}

.amount-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.amount-input-wrap span {
  color: var(--orange-deep);
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 27px;
  font-weight: 700;
}

.amount-input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 38px;
  font-weight: 720;
  letter-spacing: -0.035em;
}

.amount-input-wrap input::placeholder {
  color: var(--text-faint);
}

.form-label {
  display: block;
  margin: 15px 0 8px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
}

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

.category-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 2px;
  border-radius: 13px;
  background: transparent;
  color: var(--text-soft);
  font-size: 9px;
}

.category-option span:first-child {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--surface-muted);
  font-size: 20px;
}

.category-option.active {
  color: var(--orange-deep);
  font-weight: 680;
}

.category-option.active span:first-child {
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(255, 138, 16, 0.1);
}

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

.field {
  min-width: 0;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 10px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
}

.field textarea {
  min-height: 78px;
  resize: vertical;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 47px;
  padding: 11px 16px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, #ffab25, #ff8007);
  color: #fff;
  box-shadow: 0 10px 22px rgba(232, 112, 0, 0.22);
}

.primary-button:hover {
  filter: brightness(1.03);
}

.secondary-button {
  background: var(--surface-muted);
  color: var(--text);
}

.danger-button {
  background: var(--red-soft);
  color: var(--red);
}

.sheet-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.sheet-actions .primary-button {
  flex: 1;
}

.stack {
  display: grid;
  gap: 12px;
}

.detail-amount {
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-muted);
  text-align: center;
}

.detail-amount strong {
  display: block;
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.detail-amount span {
  display: block;
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 10px;
}

.detail-list {
  overflow: hidden;
  border-radius: 17px;
  background: var(--surface-muted);
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

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

.detail-row span {
  color: var(--text-faint);
}

.detail-row strong {
  max-width: 68%;
  text-align: right;
  font-weight: 620;
}

.info-banner {
  padding: 14px;
  border: 1px dashed rgba(255, 138, 16, 0.32);
  border-radius: 15px;
  background: var(--orange-soft);
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.7;
}

.placeholder-page {
  padding-top: 4px;
}

.placeholder-hero {
  padding: 26px 20px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.45), transparent 32%),
    linear-gradient(135deg, #ffb53b, #ff850b);
  color: #fff;
}

.placeholder-hero span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.17);
  font-size: 28px;
}

.placeholder-hero h2 {
  margin: 17px 0 7px;
  font-size: 23px;
}

.placeholder-hero p {
  max-width: 300px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  line-height: 1.65;
}

.coming-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 17px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.coming-item > span:first-child {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-muted);
  font-size: 20px;
}

.coming-item div {
  flex: 1;
}

.coming-item strong {
  display: block;
  font-size: 12px;
}

.coming-item small {
  display: block;
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 9px;
}

.pill {
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 9px;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(var(--nav-height) + 26px);
  max-width: min(330px, calc(100vw - 40px));
  padding: 10px 15px;
  border-radius: 12px;
  background: rgba(40, 33, 27, 0.92);
  color: #fff;
  box-shadow: 0 10px 26px rgba(22, 15, 10, 0.22);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

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

.skeleton {
  animation: pulse 1.2s ease-in-out infinite;
  background: linear-gradient(90deg, var(--surface-muted), var(--surface-solid), var(--surface-muted));
  background-size: 200% 100%;
}

@keyframes pulse {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.spacer-10 {
  height: 10px;
}

.muted {
  color: var(--text-soft);
}

.nowrap {
  white-space: nowrap;
}

@media (max-width: 360px) {
  .page {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero-amount {
    font-size: 30px;
  }

  .quick-grid {
    gap: 2px;
    padding-right: 4px;
    padding-left: 4px;
  }

  .quick-icon {
    width: 39px;
    height: 39px;
    font-size: 20px;
  }

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

  .donut-layout {
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 12px;
  }

  .donut {
    width: 122px;
    height: 122px;
  }

  .donut::before {
    width: 77px;
    height: 77px;
  }
}

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