:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: #1b2a25;
  background: #f5f6f2;
  --muted: #566760;
  --line: #dbe4dd;
  --pine: #234439;
  --accent: #d0ebbb;
  --white: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.shell { max-width: 1110px; padding: 38px 24px 55px; margin: 0 auto; }
.masthead { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; }
.context { margin: 0 0 6px; color: var(--muted); font-size: .79rem; letter-spacing: .15em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 5vw, 2.6rem); line-height: 1.2; font-weight: 700; letter-spacing: -.045em; }
h2 { font-size: 1.17rem; }
h3 { font-size: .95rem; margin-bottom: 10px; }
.masthead input { width: auto; }
.tabs { display: flex; gap: 12px; margin: 24px 0 17px; border-bottom: 1px solid var(--line); }
button { appearance: none; font: inherit; font-size: .87rem; font-weight: 650; background: var(--white); color: var(--pine); border: 1px solid #c5d5c9; border-radius: 8px; padding: 9px 13px; cursor: pointer; min-height: 39px; }
button:hover { background: #eef4ec; }
button:disabled { opacity: .53; cursor: default; }
button.primary { color: #fff; background: var(--pine); border-color: var(--pine); }
button.primary:hover { background: #325a4e; }
button.secondary { background: #eaf4e3; }
button.tab { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); }
button.tab[aria-current="page"] { border-color: var(--pine); color: var(--pine); }
.notice { padding: 11px 15px; margin-bottom: 16px; background: #e8f0e5; border-radius: 8px; font-size: .9rem; }
.notice.error { background: #f9e7dc; color: #723822; }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--pine); color: #f4f9f2; border-radius: 16px; margin-bottom: 16px; }
.summary div { min-width: 0; padding: 19px 22px; }
.summary div + div { border-left: 1px solid #547168; }
.summary p, .summary small { font-size: .78rem; color: #e0ede1; }
.summary strong { display: block; font-size: clamp(1.18rem, 4vw, 1.9rem); line-height: 1.2; padding: 5px 0; color: var(--accent); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 16px; align-items: start; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.card-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 16px; }
.card-heading p, .hint, .muted, .settings > summary { color: var(--muted); font-size: .82rem; }
.card-heading p { margin-top: 4px; }
label { display: grid; gap: 6px; color: #354b41; font-weight: 600; font-size: .81rem; min-width: 0; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #cbd8cf; border-radius: 8px; padding: 8px 9px; background: #fcfdfa; color: #182720; font: inherit; font-size: .9rem; font-weight: 400; }
input, select { min-height: 38px; }
textarea { resize: vertical; }
:focus-visible { outline: 2px solid #557960; outline-offset: 2px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 12px; }
.fields.four { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.settings { margin-top: 12px; }
.settings summary { margin-bottom: 10px; cursor: pointer; }
.details-row { margin-top: 16px; }
.check { display: flex; align-items: center; gap: 7px; align-self: end; }
.check input { width: auto; }
hr { margin: 17px 0; height: 1px; background: var(--line); border: none; }
.flex-field { margin-top: 15px; grid-template-columns: 1fr minmax(70px, 120px); align-items: center; }
.hint { margin: 7px 0 11px; line-height: 1.5; }
.muted { line-height: 1.55; }
.ai-result { margin-top: 11px; padding: 12px; border-radius: 8px; background: #edf4ed; font-size: .87rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .8rem; font-variant-numeric: tabular-nums; }
td, th { padding: 8px 5px; border-bottom: 1px solid var(--line); }
th { color: #436054; font-weight: 650; }
td:first-child, th:first-child { padding-left: 0; }
td:last-child, th:last-child { padding-right: 0; }
.scroll { overflow-x: auto; }
.expense { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; gap: 8px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.expense span { overflow-wrap: anywhere; }
.list-group + .list-group { margin-top: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 780px) {
  .shell { padding: 23px 14px 42px; }
  .split { grid-template-columns: 1fr; }
  .summary div { padding: 13px 10px; }
  .summary p, .summary small { font-size: .72rem; }
}
@media (max-width: 360px) {
  .masthead { flex-wrap: wrap; }
  .card { padding: 13px; }
  .tabs { gap: 3px; }
  .fields.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
  button, input, select { min-height: 44px; }
}
