:root {
  --paper: #f3f5f8;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --ink: #101318;
  --muted: #6f7784;
  --line: rgba(16, 19, 24, 0.08);
  --line-strong: rgba(16, 19, 24, 0.16);
  --income: #1f8a5b;
  --expense: #111827;
  --accent: #0071e3;
  --card-dark: #0f1115;
  --card-dark-soft: #1a1f27;
  --card-silver: rgba(255, 255, 255, 0.7);
  --shadow: 0 30px 80px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --motion-fast: 220ms;
  --motion-medium: 420ms;
  --motion-slow: 620ms;
  --ease-ios: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ios-soft: cubic-bezier(0.25, 0.9, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), transparent 24%),
    radial-gradient(circle at bottom right, rgba(220, 229, 241, 0.72), transparent 22%),
    linear-gradient(180deg, #f8f9fb, #edf1f6 62%, #eef2f7),
    var(--paper);
  color: var(--ink);
}

body,
button,
input,
select {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  -webkit-tap-highlight-color: transparent;
}

#app {
  width: min(100%, 620px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 16px 130px;
  position: relative;
}

.shell {
  display: grid;
  gap: 16px;
  animation: page-settle var(--motion-slow) var(--ease-ios-soft) both;
}

.shell > * {
  opacity: 0;
  animation: sheet-fade-in var(--motion-slow) var(--ease-ios-soft) both;
}

.shell > *:nth-child(1) {
  animation-delay: 40ms;
}

.shell > *:nth-child(2) {
  animation-delay: 70ms;
}

.shell > *:nth-child(3) {
  animation-delay: 100ms;
}

.shell > *:nth-child(4) {
  animation-delay: 130ms;
}

.shell > *:nth-child(5) {
  animation-delay: 160ms;
}

.home-shell {
  min-height: calc(100vh - 150px);
  align-content: start;
  padding-top: 10px;
  gap: 0;
  position: relative;
}

.home-rail {
  display: grid;
  gap: 20px;
  width: 100%;
  padding-inline: 24px;
}

.home-shell.expense-stage::before {
  content: "";
  position: absolute;
  inset: -10px -10px auto -10px;
  height: 210px;
  border-radius: 0 0 34px 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 88% 10%, rgba(15, 17, 21, 0.06), transparent 24%);
  pointer-events: none;
}

.screen-shell {
  min-height: calc(100vh - 150px);
  align-content: start;
}

.topbar,
.records-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.home-topbar {
  align-items: end;
  padding: 2px 0 0;
}

.title-wrap {
  display: grid;
  gap: 6px;
}

.home-title-wrap {
  gap: 6px;
}

.today-stamp {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.hero-copy {
  margin: 0;
  max-width: 22rem;
  color: rgba(16, 19, 24, 0.58);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

.eyebrow {
  margin: 0;
  color: rgba(16, 19, 24, 0.42);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.04em;
  font-weight: 700;
}

h1 {
  font-size: clamp(36px, 10vw, 54px);
  line-height: 1;
  letter-spacing: -0.055em;
}

h2 {
  font-size: clamp(22px, 6vw, 28px);
  line-height: 1.1;
}

.month-field,
.module-side-button,
.entry-panel,
.records-panel,
.analytics-panel,
.day-switch-panel,
.home-detail-panel,
.highlight-panel,
.recent-panel {
  box-shadow: 0 16px 34px rgba(120, 74, 28, 0.1);
}

.month-field,
.field-block {
  display: grid;
  gap: 8px;
}

.month-field {
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

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

.picker-chip {
  display: grid;
  gap: 8px;
}

.month-field span,
.field-block span,
.day-group-head span,
.stat-card span,
.recent-item p,
.record-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.month-field select,
.field-block input,
.field-block select {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--ink);
}

.month-field select:focus,
.field-block input:focus,
.field-block select:focus {
  outline: 2px solid var(--line-strong);
  outline-offset: 2px;
}

.module-stack {
  display: grid;
  gap: 16px;
}

.single-module-stack {
  gap: 0;
}

.hero-row {
  grid-template-columns: 1fr;
  gap: 14px;
}

.home-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(118, 128, 148, 0.12);
  border: 1px solid rgba(16, 19, 24, 0.04);
  box-shadow: none;
  width: min(100%, 240px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.switch-chip {
  min-height: 48px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    transform var(--motion-fast) var(--ease-ios),
    background-color var(--motion-fast) var(--ease-ios-soft),
    color var(--motion-fast) var(--ease-ios-soft),
    box-shadow var(--motion-medium) var(--ease-ios-soft);
}

.switch-chip.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.module-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
  align-items: stretch;
}

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

.module-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  align-content: start;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 248px;
  padding: 28px 24px 22px;
  border-radius: var(--radius-xl);
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.86));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  cursor: pointer;
  transform-origin: center center;
  transition:
    transform var(--motion-fast) var(--ease-ios),
    box-shadow var(--motion-medium) var(--ease-ios-soft),
    filter var(--motion-fast) var(--ease-ios-soft);
}

.module-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.module-card:hover,
.module-side-button:hover,
.choice-button:hover,
.record-edit-button:hover,
.confirm-button:hover,
.delete-button:hover,
.bottom-back-button:hover,
.bottom-primary-button:hover,
.bottom-secondary-button:hover {
  transform: translateY(-1px);
}

.module-card:active,
.module-side-button:active,
.choice-button:active,
.record-edit-button:active,
.confirm-button:active,
.delete-button:active,
.bottom-back-button:active,
.bottom-primary-button:active,
.bottom-secondary-button:active,
.switch-chip:active,
.day-chip:active {
  transform: scale(0.992);
}

.income-card {
  background:
    radial-gradient(circle at top right, rgba(66, 133, 98, 0.26), transparent 24%),
    linear-gradient(160deg, #183328, #1f4a39 52%, #0f1a16);
  border-color: rgba(255, 255, 255, 0.12);
}

.expense-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 22%),
    linear-gradient(160deg, #0f1115, #171b23 52%, #090b0f);
  border-color: rgba(255, 255, 255, 0.12);
}

.hero-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(118, 128, 148, 0.12);
  border: 1px solid rgba(16, 19, 24, 0.04);
  color: rgba(16, 19, 24, 0.7);
  font-size: 12px;
  font-weight: 600;
}

.wallet-chip {
  width: 38px;
  height: 28px;
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(202, 209, 220, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.wallet-glow,
.wallet-sheen {
  position: absolute;
  pointer-events: none;
}

.wallet-glow {
  inset: auto auto -40px -40px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 64%);
}

.wallet-sheen {
  top: -26%;
  right: -12%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 58%);
}

.module-label {
  display: block;
  margin-top: 18px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(16, 19, 24, 0.56);
}

.module-amount {
  display: block;
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.module-caption {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  max-width: 20rem;
  color: rgba(16, 19, 24, 0.54);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

.wallet-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  align-self: end;
  padding-top: 22px;
}

.wallet-meta-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: fit-content;
  padding: 0 18px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  transition:
    transform var(--motion-fast) var(--ease-ios),
    background-color var(--motion-fast) var(--ease-ios-soft),
    opacity var(--motion-fast) var(--ease-ios-soft);
}

.income-card .hero-status-chip,
.expense-card .hero-status-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.84);
}

.income-card .module-label,
.expense-card .module-label {
  color: rgba(255, 255, 255, 0.64);
}

.income-card .module-amount,
.expense-card .module-amount {
  color: #fff;
}

.income-card .module-caption,
.expense-card .module-caption {
  color: rgba(255, 255, 255, 0.72);
}

.income-card .hero-primary-action,
.expense-card .hero-primary-action {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.entry-panel,
.records-panel,
.analytics-panel,
.day-switch-panel,
.highlight-panel,
.home-detail-panel,
.recent-panel {
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.92);
}

.entry-income .entry-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 250, 247, 0.86)),
    var(--panel);
}

.entry-expense .entry-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(245, 248, 252, 0.88)),
    var(--panel);
}

.expense-entry-screen {
  position: relative;
  gap: 0;
}

.expense-entry-screen::before {
  content: "";
  position: absolute;
  inset: -24px -24px auto -24px;
  height: 520px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 100% 12%, rgba(79, 209, 140, 0.12), transparent 26%),
    linear-gradient(180deg, #090c11, #111722 54%, rgba(17, 23, 34, 0));
  border-radius: 0 0 56px 56px;
  pointer-events: none;
}

.expense-cinematic-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
}

.expense-cinematic-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 26px;
  min-height: 520px;
  padding: 28px 24px 30px;
  border-radius: 38px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(165deg, #0b0f14, #131a25 52%, #090b10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 36px 90px rgba(6, 10, 18, 0.34);
}

.expense-cinematic-glow {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.glow-a {
  top: -54px;
  right: -34px;
  width: 210px;
  height: 210px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 62%);
}

.glow-b {
  bottom: 78px;
  left: -52px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(76, 209, 133, 0.14), transparent 62%);
}

.expense-card-top,
.expense-card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.expense-card-month {
  color: rgba(255, 255, 255, 0.5);
}

.expense-card-title {
  margin-top: 8px;
  color: #fff;
  font-size: clamp(38px, 11vw, 58px);
  line-height: 0.94;
  letter-spacing: -0.065em;
  font-weight: 700;
}

.expense-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 600;
}

.expense-card-middle {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
  margin-top: auto;
}

.expense-amount-stack {
  display: grid;
  gap: 12px;
  padding: 24px 20px 18px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.expense-amount-stack span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.expense-amount-stack input {
  min-height: 78px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: clamp(46px, 14vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.08em;
  font-weight: 700;
}

.expense-amount-stack input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.expense-amount-stack input:focus {
  outline: none;
}

.expense-card-copy {
  margin: 0;
  max-width: 15rem;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

.expense-card-bottom {
  align-items: end;
  margin-top: auto;
}

.expense-card-date {
  display: grid;
  gap: 4px;
}

.expense-card-date span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 600;
}

.expense-card-date strong {
  color: #fff;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.expense-card-mark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.expense-card-mark span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.expense-card-mark span:nth-child(2) {
  background: rgba(255, 255, 255, 0.68);
}

.expense-floating-sheet {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
  margin-top: -96px;
  padding: 20px 20px 24px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.86)),
    var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.expense-sheet-handle {
  width: 48px;
  height: 5px;
  margin: 0 auto 2px;
  border-radius: 999px;
  background: rgba(16, 19, 24, 0.16);
}

.expense-sheet-head {
  display: grid;
  gap: 6px;
}

.expense-entry-shell {
  position: relative;
  gap: 0;
}

.expense-entry-shell::before {
  content: "";
  position: absolute;
  inset: -16px -20px auto -20px;
  height: 440px;
  border-radius: 0 0 42px 42px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(64, 211, 138, 0.1), transparent 24%),
    linear-gradient(180deg, #0b0f14, #10151e 48%, rgba(16, 21, 30, 0));
  pointer-events: none;
}

.entry-rail {
  display: grid;
  gap: 0;
  position: relative;
  z-index: 1;
}

.entry-stage-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
  min-height: 430px;
  padding: 28px 24px 26px;
  border-radius: 36px;
  box-shadow: var(--shadow);
}

.expense-stage-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(160deg, #0f1115, #171b23 52%, #090b0f);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.entry-stage-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.entry-stage-month {
  color: rgba(255, 255, 255, 0.52);
}

.entry-stage-head h1 {
  color: #fff;
  font-size: clamp(34px, 9vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  opacity: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.entry-stage-chip {
  flex: 0 0 auto;
}

.entry-stage-title-fixed {
  position: relative;
  z-index: 1;
  margin-top: -12px;
  color: #fff;
  font-size: clamp(36px, 10vw, 52px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 700;
}

.entry-stage-center {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.entry-stage-copy {
  margin: 0;
  max-width: 15rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

.entry-stage-cardline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.entry-stage-chipmark {
  width: 42px;
  height: 30px;
  border-radius: 10px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(196, 203, 214, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.entry-stage-brand {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.entry-stage-orbit {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.orbit-a {
  top: -44px;
  right: -24px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 60%);
}

.orbit-b {
  bottom: 58px;
  left: -38px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(64, 211, 138, 0.12), transparent 62%);
}

.entry-stage-amount {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 22px 20px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.entry-stage-amount span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.entry-stage-amount input {
  min-height: 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: clamp(34px, 10vw, 54px);
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 700;
}

.entry-stage-amount input::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.entry-stage-amount input:focus {
  outline: none;
}

.entry-stage-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
}

.entry-stage-date {
  display: grid;
  gap: 4px;
}

.entry-stage-date span,
.entry-stage-note {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  font-weight: 600;
}

.entry-stage-date strong {
  color: #fff;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.entry-sheet {
  padding: 24px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.8)),
    var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  margin-top: -92px;
  position: relative;
  z-index: 2;
}

.entry-sheet-head {
  display: grid;
  gap: 6px;
  padding-bottom: 6px;
}

.entry-copy,
.panel-copy,
.empty-state,
.axis-label,
.grid-label,
.peak-label {
  color: var(--muted);
}

.entry-copy,
.panel-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

.entry-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.auto-date-banner {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.92);
}

.auto-date-banner span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auto-date-banner strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.amount-field input {
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

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

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

.choice-button {
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.92);
  font-weight: 600;
  cursor: pointer;
  transition:
    transform var(--motion-fast) var(--ease-ios),
    background-color var(--motion-fast) var(--ease-ios-soft),
    border-color var(--motion-fast) var(--ease-ios-soft),
    color var(--motion-fast) var(--ease-ios-soft);
}

.choice-button.is-active {
  background: rgba(0, 113, 227, 0.12);
  color: var(--accent);
  border-color: rgba(0, 113, 227, 0.24);
}

.field-block.is-hidden {
  display: none;
}

.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.confirm-button,
.delete-button,
.record-edit-button,
.bottom-back-button,
.bottom-primary-button,
.bottom-secondary-button {
  min-height: 60px;
  border-radius: 20px;
  font-weight: 700;
}

.confirm-button {
  width: 100%;
  background: var(--ink);
  color: #fff;
}

.delete-button {
  width: 100%;
  background: rgba(255, 59, 48, 0.1);
  color: #d62d20;
}

.analytics-panel,
.day-switch-panel,
.highlight-panel,
.home-detail-panel,
.recent-panel {
  display: grid;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.78)),
    var(--panel);
}

.panel-head,
.highlight-head {
  display: grid;
  gap: 8px;
}

.stats-grid {
  display: grid;
  gap: 10px;
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.94);
}

.stat-card strong {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.stat-card em {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}

.chart-wrap {
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.94);
}

.trend-chart {
  display: block;
  width: 100%;
  height: auto;
}

.grid-line {
  stroke: rgba(22, 19, 15, 0.08);
  stroke-width: 1;
}

.grid-label {
  font-size: 10px;
}

.trend-area {
  fill: url(#trendArea);
}

.trend-line {
  fill: none;
  stroke: var(--expense);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.focus-line {
  stroke: rgba(196, 73, 47, 0.18);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
}

.trend-dot {
  fill: var(--expense);
  opacity: 0.82;
  cursor: pointer;
}

.trend-dot.is-peak {
  fill: #9d2e1d;
}

.trend-dot.is-selected {
  fill: #ffffff;
  stroke: var(--expense);
  stroke-width: 3.2;
}

.trend-hit-area {
  fill: transparent;
  cursor: pointer;
}

.axis-label {
  font-size: 11px;
}

.selected-day-label {
  font-size: 12px;
  font-weight: 700;
  fill: rgba(22, 19, 15, 0.7);
}

.peak-label {
  font-size: 12px;
  font-weight: 700;
}

.chart-meta {
  display: grid;
  gap: 10px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--expense);
}

.legend-dot.is-selected {
  background: #fff;
  border: 3px solid var(--expense);
}

.legend-dot.is-peak {
  background: #9d2e1d;
}

.chart-summary {
  display: grid;
  gap: 4px;
}

.chart-summary strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.chart-summary span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.home-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 18px;
  row-gap: 10px;
  padding-bottom: 2px;
}

.home-detail-head h2 {
  font-size: clamp(20px, 5vw, 24px);
}

.home-detail-intro {
  display: grid;
  gap: 6px;
}

.home-detail-tools {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.home-list-action {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(16, 19, 24, 0.045);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  transition:
    transform var(--motion-fast) var(--ease-ios),
    background-color var(--motion-fast) var(--ease-ios-soft);
}

.home-list-action:active {
  transform: scale(0.992);
}

.home-detail-summary {
  display: grid;
  gap: 2px;
  text-align: right;
  justify-items: end;
}

.home-detail-summary strong {
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-detail-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.expense-summary strong {
  color: var(--expense);
}

.income-summary strong {
  color: var(--income);
}

.home-detail-list {
  display: grid;
  gap: 0;
  margin-top: 2px;
}

.home-detail-panel {
  gap: 18px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
}

.expense-detail-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 249, 252, 0.8)),
    var(--panel);
}

.income-detail-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 249, 252, 0.8)),
    var(--panel);
}

.day-chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.day-chip-row::-webkit-scrollbar {
  height: 6px;
}

.day-chip-row::-webkit-scrollbar-thumb {
  background: rgba(22, 19, 15, 0.16);
  border-radius: 999px;
}

.day-chip {
  flex: 0 0 auto;
  min-width: 118px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 6px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  scroll-snap-align: start;
  transition:
    transform var(--motion-fast) var(--ease-ios),
    background-color var(--motion-fast) var(--ease-ios-soft),
    border-color var(--motion-fast) var(--ease-ios-soft),
    box-shadow var(--motion-medium) var(--ease-ios-soft);
}

.day-chip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.day-chip strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.day-chip.is-active {
  background: rgba(0, 113, 227, 0.08);
  border-color: rgba(0, 113, 227, 0.2);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.08);
}

.highlight-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.highlight-head strong {
  font-size: 26px;
  letter-spacing: -0.04em;
  color: var(--expense);
}

.highlight-list {
  display: grid;
  gap: 12px;
}

.compact-record-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(16, 19, 24, 0.06);
}

.premium-record-item {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition:
    transform var(--motion-fast) var(--ease-ios),
    box-shadow var(--motion-medium) var(--ease-ios-soft),
    background-color var(--motion-medium) var(--ease-ios-soft);
}

.premium-record-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.06);
}

.premium-record-item:last-child {
  padding-bottom: 16px;
}

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

.compact-main {
  display: grid;
  gap: 6px;
}

.compact-main strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.home-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(16, 19, 24, 0.06);
}

.home-list-item.is-last {
  border-bottom: 0;
}

.home-list-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-list-main strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.home-list-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.home-list-side {
  display: grid;
  grid-template-rows: auto auto;
  gap: 7px;
  justify-items: end;
  width: 112px;
}

.home-list-side span {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.home-list-edit {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(16, 19, 24, 0.045);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  transition:
    transform var(--motion-fast) var(--ease-ios),
    background-color var(--motion-fast) var(--ease-ios-soft),
    color var(--motion-fast) var(--ease-ios-soft);
}

.home-list-edit:active {
  transform: scale(0.992);
}

.compact-main span,
.compact-main p {
  color: var(--muted);
}

.compact-main p {
  margin: 0;
  font-size: 14px;
}

.compact-edit-button {
  min-height: 46px;
  padding: 0 16px;
}

.recent-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

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

.recent-main {
  display: grid;
  gap: 8px;
}

.recent-main strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.recent-main p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.records-panel {
  display: grid;
  gap: 16px;
}

.day-group {
  display: grid;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.day-group.is-selected {
  padding-left: 10px;
  border-left: 4px solid rgba(196, 73, 47, 0.5);
}

.day-group:first-child {
  padding-top: 0;
}

.day-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.day-group-head,
.record-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.day-group-head strong,
.record-topline strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.day-group-head em {
  font-style: normal;
  font-weight: 700;
}

.day-group-items {
  display: grid;
  gap: 12px;
}

.record-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.94);
}

.record-main {
  display: grid;
  gap: 10px;
}

.record-edit-button {
  padding: 0 18px;
  background: rgba(16, 19, 24, 0.06);
  color: var(--ink);
  cursor: pointer;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag-chip,
.record-note {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
}

.tag-chip {
  background: rgba(118, 128, 148, 0.12);
  color: var(--ink);
  font-weight: 600;
}

.record-note {
  background: rgba(255, 255, 255, 0.85);
  color: var(--muted);
  border: 1px solid rgba(47, 36, 29, 0.06);
}

.record-time,
.empty-state {
  font-size: 14px;
}

.empty-state {
  margin: 0;
  padding: 4px 0;
}

.bottom-bar {
  position: sticky;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding-top: 12px;
  animation: sheet-fade-in var(--motion-slow) var(--ease-ios-soft) both;
  animation-delay: 180ms;
}

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

.bottom-back-button,
.bottom-primary-button,
.bottom-secondary-button {
  width: 100%;
  box-shadow: 0 14px 34px rgba(38, 31, 24, 0.12);
  cursor: pointer;
  transition:
    transform var(--motion-fast) var(--ease-ios),
    box-shadow var(--motion-medium) var(--ease-ios-soft),
    background-color var(--motion-fast) var(--ease-ios-soft);
}

.bottom-back-button,
.bottom-secondary-button {
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.94);
}

.bottom-primary-button {
  background: var(--ink);
  color: #fff;
}

.bottom-back-button,
.bottom-primary-button,
.bottom-secondary-button {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

@keyframes page-settle {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheet-fade-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.992);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell,
  .shell > *,
  .bottom-bar {
    animation: none;
  }

  .module-card,
  .module-side-button,
  .choice-button,
  .record-edit-button,
  .confirm-button,
  .delete-button,
  .bottom-back-button,
  .bottom-primary-button,
  .bottom-secondary-button,
  .switch-chip,
  .day-chip,
  .premium-record-item,
  .hero-primary-action {
    transition: none;
  }
}

@media (max-width: 520px) {
  #app {
    padding: 16px 14px 134px;
  }

  .home-rail {
    padding-inline: 16px;
    gap: 18px;
  }

  .expense-entry-screen::before {
    inset: -20px -16px auto -16px;
    height: 470px;
  }

  .expense-cinematic-card {
    min-height: 468px;
    padding: 24px 20px 24px;
    border-radius: 32px;
  }

  .expense-card-title {
    font-size: clamp(34px, 12vw, 46px);
  }

  .expense-amount-stack {
    padding: 18px 16px 14px;
    border-radius: 24px;
  }

  .expense-amount-stack input {
    min-height: 66px;
    font-size: clamp(42px, 14vw, 58px);
  }

  .expense-floating-sheet {
    margin-top: -72px;
    border-radius: 28px;
  }

  .home-topbar {
    align-items: center;
    flex-direction: column;
  }

  .home-title-wrap {
    width: 100%;
    justify-items: center;
    text-align: center;
  }

  .home-shell,
  .screen-shell {
    min-height: calc(100vh - 154px);
  }

  .month-picker-grid,
  .double-bar,
  .choice-grid,
  .category-grid,
  .highlight-head {
    grid-template-columns: 1fr;
  }

  .module-row {
    grid-template-columns: 1fr;
  }

  .module-side-button {
    justify-items: start;
    text-align: left;
  }

  .module-headline {
    align-items: center;
    flex-direction: row;
  }

  .module-card,
  .entry-panel,
  .entry-sheet,
  .records-panel,
  .analytics-panel,
  .day-switch-panel,
  .highlight-panel,
  .home-detail-panel,
  .recent-panel {
    border-radius: 28px;
  }

  .day-group-head,
  .record-topline,
  .recent-item,
  .compact-record-item,
  .home-detail-head,
  .entry-stage-head,
  .entry-stage-meta {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .entry-stage-card {
    min-height: 0;
    padding: 24px 20px 22px;
    border-radius: 30px;
  }

  .expense-entry-shell::before {
    inset: -18px -16px auto -16px;
    height: 400px;
  }

  .entry-stage-title-fixed {
    margin-top: -8px;
    font-size: clamp(34px, 11vw, 46px);
  }

  .entry-stage-amount {
    padding: 16px;
  }

  .entry-stage-amount input {
    min-height: 56px;
    font-size: clamp(32px, 11vw, 46px);
  }

  .entry-sheet {
    margin-top: -68px;
  }

  .home-detail-summary {
    text-align: left;
  }

  .home-detail-tools {
    justify-items: start;
  }

  .home-list-item {
    align-items: flex-start;
    grid-template-columns: 1fr;
    padding: 12px 0;
  }

  .home-list-side {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .home-list-main p {
    max-width: none;
    white-space: normal;
  }
}
