:root {
  --blue: #4285f4;
  --blue-deep: #257cf5;
  --ink: #333;
  --muted: #666;
  --line: #e3e4e8;
  --page-bg: #f4f6f9;
  --app-max: 750px;
  --header-h: 49px;
  --row-h: 47px;
  --safe-bottom: max(0px, env(safe-area-inset-bottom));
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page-bg); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page-bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input { font: inherit; }
button { color: inherit; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.desktop-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 15%, rgba(79, 144, 243, .16), transparent 28%),
    radial-gradient(circle at 86% 75%, rgba(82, 172, 255, .12), transparent 30%),
    linear-gradient(135deg, #eef4fc 0%, #dce8f6 55%, #e9f0fa 100%);
}
.desktop-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .25;
  background-image: linear-gradient(rgba(54, 103, 168, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(54, 103, 168, .055) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}
.shuiming-shell {
  position: relative;
  width: min(100%, var(--app-max));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--page-bg);
  box-shadow: 0 0 70px rgba(48, 86, 139, .16);
}
.header {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, var(--app-max));
  min-height: var(--header-h);
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transform: translateX(-50%);
}
.back-btn {
  position: absolute;
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px 8px 0;
  color: var(--blue);
  font-size: 16px;
  line-height: 1.25;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.back-btn img { display: block; width: 9px; height: auto; }
.back-btn:focus-visible { outline: 2px solid #9dc2ff; outline-offset: 2px; border-radius: 6px; }
.header-title {
  margin: 0;
  color: #000;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}
.content {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(44px + env(safe-area-inset-top, 0px)) 0 calc(32px + var(--safe-bottom));
  background: var(--page-bg);
}
.form-section-card {
  --form-card-pad-x: 16px;
  margin: 0;
  overflow: hidden;
  background: #fff;
}
.form-section-card--first { margin-top: 12px; }
.form-section-card + .form-section-card { margin-top: 12px; }
.form-section-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px var(--form-card-pad-x);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 21px;
}
.form-section-card-title::before {
  content: "";
  flex: 0 0 4px;
  width: 4px;
  height: 16px;
  margin-top: 2px;
  border-radius: 4px;
  background: var(--blue);
}
.year-select {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 12px var(--form-card-pad-x);
  border: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.year-select:active { background: #fafbfc; }
.year-select:focus-visible { outline: 2px solid #9dc2ff; outline-offset: -2px; }
.year-label { flex: 0 0 auto; margin-right: 20px; color: #565a68; font-size: 16px; font-weight: 400; line-height: 22px; white-space: nowrap; }
.year-value { position: absolute; left: 36%; color: var(--ink); font-size: 16px; font-weight: 400; line-height: 22px; transform: translateX(-50%); }
.year-chevron-wrap { display: flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 22px; margin-left: auto; }
.year-chevron { width: 12px; height: 12px; color: #d1d3d8; }
.year-chevron path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.type-list { background: transparent; }
.type-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--form-card-pad-x);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.type-item:focus-visible { outline: 2px solid #9dc2ff; outline-offset: -2px; }
.type-list > .type-item:nth-child(4) { border-bottom: none; }
.check-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  transition: background .16s ease, border-color .16s ease;
}
.check-icon svg { width: 10px; height: 10px; }
.check-icon path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check-icon.check-off { border: 1.5px solid #d1d3d8; background: transparent; }
.check-icon.check-off svg { display: none; }
.type-text { color: var(--ink); font-size: 16px; font-weight: 400; line-height: 22px; }
.income-types-extra { display: none; }
.income-types-extra.is-open { display: block; animation: reveal-types .22s ease-out; }
.income-types-extra .type-item:last-child { border-bottom: 0; }
@keyframes reveal-types { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.type-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px var(--form-card-pad-x);
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--blue-deep);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.type-toggle.hidden { display: none; }
.type-toggle:focus-visible { outline: 2px solid #9dc2ff; outline-offset: -2px; }
.type-toggle-caret { display: block; flex-shrink: 0; width: 15px; height: 15px; margin-left: 4px; }
.type-toggle-caret.zhankai { transform: scaleY(-1); }
.type-toggle-caret.shousuo { transform: scaleY(1); }
.query-btn-wrapper {
  flex: 1 0 auto;
  padding: 32px 16px calc(40px + var(--safe-bottom));
  background: var(--page-bg);
}
.query-btn {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background-color: var(--blue-deep);
  background-image: none;
  box-shadow: none;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 44px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, opacity .16s ease;
}
.query-btn:active { transform: translateY(1px); box-shadow: none; }
.query-btn:focus-visible { outline: 3px solid rgba(37, 124, 245, .25); outline-offset: 2px; }
.query-btn.is-loading { opacity: .78; pointer-events: none; }
.picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: rgba(0, 0, 0, .5);
}
.picker-overlay.show { display: block; }
.year-picker {
  position: fixed;
  z-index: 1001;
  right: max(0px, calc((100vw - var(--app-max)) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - var(--app-max)) / 2));
  background: #fff;
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.year-picker.show { transform: translateY(0); }
.picker-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.picker-cancel, .picker-confirm { padding: 0; border: 0; background: none; font-size: 16px; font-weight: 400; cursor: pointer; }
.picker-cancel { color: var(--muted); }
.picker-confirm { color: var(--blue); }
.picker-wrapper { position: relative; height: 200px; overflow: hidden; }
.picker-indicator { position: absolute; z-index: 2; top: 50%; right: 0; left: 0; height: 40px; pointer-events: none; transform: translateY(-50%); }
.picker-indicator::before, .picker-indicator::after { content: ""; position: absolute; right: 16px; left: 16px; height: 1px; background: #e0e0e0; }
.picker-indicator::before { top: 0; }
.picker-indicator::after { bottom: 0; }
.picker-mask-top, .picker-mask-bottom { position: absolute; z-index: 1; right: 0; left: 0; height: 80px; pointer-events: none; }
.picker-mask-top { top: 0; background: linear-gradient(to bottom, rgba(255,255,255,.95), rgba(255,255,255,0)); }
.picker-mask-bottom { bottom: 0; background: linear-gradient(to top, rgba(255,255,255,.95), rgba(255,255,255,0)); }
.picker-list {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.picker-list::-webkit-scrollbar { display: none; }
.picker-list::before, .picker-list::after { content: ""; display: block; height: 80px; }
.picker-item {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #999;
  font-size: 18px;
  line-height: 40px;
  text-align: center;
  scroll-snap-align: center;
  cursor: pointer;
  transition: color .2s ease;
}
.picker-item.selected { color: var(--ink); font-weight: 500; }
.toast {
  position: fixed;
  z-index: 1200;
  bottom: calc(28px + var(--safe-bottom));
  left: 50%;
  max-width: min(86vw, 420px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(20, 32, 51, .92);
  color: #fff;
  box-shadow: 0 8px 30px rgba(22, 40, 66, .24);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .28s cubic-bezier(.22, 1, .36, 1);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) {
  .shuiming-shell { margin-top: 18px; margin-bottom: 18px; min-height: calc(100vh - 36px); border-radius: 22px; overflow: hidden; }
  .header { top: 18px; border-radius: 22px 22px 0 0; }
  .year-picker { bottom: 18px; border-radius: 16px 16px 0 0; }
}
@media (max-width: 360px) {
  .header { padding-inline: 12px; }
  .back-btn { left: 10px; }
  .year-value { left: 38%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
