/* ==========================================================================
   吃土账本 · 视觉系统
   纸张、小票、硬阴影，一点点 zine，一点点记账本。
   ========================================================================== */

:root {
  --paper: #f4eee2;
  --paper-deep: #ece3d3;
  --paper-soft: #faf6ec;
  --card: #fffcf4;
  --ink: #1c1a16;
  --ink-soft: #4b463d;
  --muted: #7f7667;
  --line: #d9cebb;
  --line-strong: #b8ab95;
  --red: #e8492c;
  --red-deep: #bf3018;
  --red-soft: #fbe3dc;
  --green: #227a5b;
  --green-soft: #dff0e7;
  --gold: #e9a91b;
  --gold-soft: #fbeecb;
  --blue: #2d5f9e;
  --pink: #d64b8a;
  --violet: #6c4bd6;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(28, 26, 22, .05);
  --shadow: 0 16px 40px -26px rgba(28, 26, 22, .45);
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(28, 26, 22, .052) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 252, 244, .55), transparent 420px);
  background-size: 22px 22px, 100% 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open { overflow: hidden; }

::selection { background: var(--gold); color: var(--ink); }

img, svg { display: block; max-width: 100%; }

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.btn .icon { width: 16px; height: 16px; }

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

button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, p { margin: 0; }

h1, h2, h3, h4 { letter-spacing: -.03em; line-height: 1.2; }

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 10px 10px;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.text-red { color: var(--red-deep); }
.text-green { color: var(--green); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   顶栏
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: rgba(244, 238, 226, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1.5px solid var(--ink);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 7px;
  color: var(--card);
  background: var(--ink);
  border-radius: 10px 10px 10px 3px;
  transform: rotate(-3deg);
  box-shadow: 3px 3px 0 var(--red);
}
.brand-mark svg { width: 100%; height: 100%; }

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 18px; font-weight: 900; letter-spacing: -.04em; }
.brand-text small {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .22em;
  color: var(--muted);
}

.mainnav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.mainnav a {
  position: relative;
  padding: 8px 11px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.mainnav a:hover { color: var(--ink); background: rgba(28, 26, 22, .05); }
.mainnav a.is-active { color: var(--ink); }
.mainnav a.is-active::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 1px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--red);
}

.topbar-actions { display: flex; align-items: center; gap: 9px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 8px;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: transform .15s, border-color .15s;
}
.icon-btn:hover { transform: rotate(-4deg); border-color: var(--ink); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }

.status-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 29px;
  padding: 5px 20px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .02em;
  border-top: 1px dashed var(--line-strong);
  background: var(--green-soft);
  color: var(--green);
}
.status-strip.is-warn { background: var(--red-soft); color: var(--red-deep); }
.status-strip.is-dirt { background: var(--red-soft); color: #7c1f0e; }
.status-strip a { text-decoration: underline; text-underline-offset: 2px; }
.status-strip .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.75); } }

.demo-banner {
  color: var(--paper);
  background: var(--ink);
  border-bottom: 1px solid var(--ink);
}
.demo-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
}
.demo-banner p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11.5px;
  color: #d7cec0;
}
.demo-banner p strong { color: var(--gold); }
.demo-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.demo-banner .btn-ink {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
  box-shadow: 2px 2px 0 rgba(244, 238, 226, .22);
}
.demo-banner .btn-ink:hover { background: #fff; }
.demo-banner .text-btn { color: #aaa196; }
.demo-banner .text-btn:hover { color: var(--paper); }

/* --------------------------------------------------------------------------
   按钮 / 表单 / 基础组件
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 19px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(28, 26, 22, .14);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
  white-space: nowrap;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 rgba(28, 26, 22, .16); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(28, 26, 22, .16); }
.btn .plus { font-family: var(--mono); font-size: 17px; line-height: 1; }

.btn-primary {
  color: #fff;
  background: var(--red);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-primary:hover { background: #f05534; box-shadow: 5px 5px 0 var(--ink); }

.btn-ink { color: var(--paper); background: var(--ink); box-shadow: 3px 3px 0 rgba(28, 26, 22, .22); }
.btn-ink:hover { background: #302c25; }

.btn-ghost { background: transparent; border-color: var(--line-strong); box-shadow: none; color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); box-shadow: 0 2px 0 rgba(28, 26, 22, .1); }

.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-xs { padding: 4px 9px; font-size: 11.5px; border-width: 1px; box-shadow: none; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .42; cursor: not-allowed; transform: none !important; box-shadow: none; }

.text-btn {
  padding: 2px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-soft);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
}
.text-btn:hover { color: var(--red-deep); }

.card {
  position: relative;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 16.5px; font-weight: 850; letter-spacing: -.025em; }
.card-title .ico { font-size: 17px; }
.card-sub { margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.card--ink { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.card--ink .card-title { color: var(--paper); }
.card--ink .card-sub, .card--ink .muted { color: #aba397; }
.card--ink .card-head { margin-bottom: 20px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 1px;
  transform: rotate(12deg);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .02em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-soft);
  white-space: nowrap;
}
.tag--green { background: var(--green-soft); color: var(--green); border-color: #b4d8c7; }
.tag--red { background: var(--red-soft); color: var(--red-deep); border-color: #efb9ac; }
.tag--gold { background: var(--gold-soft); color: #7a5400; border-color: #e8cc8c; }
.tag--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label {
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: .02em;
  color: var(--ink-soft);
}
.input, .select, .textarea {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: 11px;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #a9a091; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--ink);
  outline: none;
  box-shadow: 3px 3px 0 var(--gold);
}
.select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231c1a16' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px;
}
.textarea { min-height: 80px; resize: vertical; }
.field-hint { font-size: 11px; color: var(--muted); line-height: 1.5; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 12px; }

.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.segmented button {
  padding: 6px 15px;
  font-size: 12.5px;
  font-weight: 750;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.segmented button.is-active { color: var(--ink); background: var(--card); box-shadow: 0 1px 2px rgba(28, 26, 22, .12); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 650;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  transition: all .14s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ink)); flex: 0 0 auto; }
.chip .x { font-size: 14px; line-height: 1; opacity: .55; margin-left: 1px; }
.chip .x:hover { opacity: 1; }

.progress {
  position: relative;
  height: 11px;
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.progress > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width .6s cubic-bezier(.22, .8, .3, 1);
}
.progress.is-warn > i { background: var(--red); }
.progress.is-dirt > i { background: var(--red-deep); }
.progress.is-thin { height: 7px; }
.progress-line { display: flex; align-items: center; gap: 10px; }
.progress-line .progress { flex: 1; }

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  position: absolute;
  inset: 0;
  background: var(--paper-deep);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  transition: background .18s, border-color .18s;
  pointer-events: none;
}
.switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  transition: transform .18s;
}
.switch input:checked + span { background: var(--green); border-color: var(--green); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--card); border-color: var(--green); }
.switch input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 38px 20px;
  text-align: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 252, 244, .45);
}
.empty .empty-ico { font-size: 30px; filter: grayscale(.15); }
.empty strong { font-size: 14.5px; }
.empty p { max-width: 340px; font-size: 12px; color: var(--muted); }

.divider { height: 1px; background: var(--line); border: 0; margin: 18px 0; }
.dot-divider { height: 1px; border-top: 1px dashed var(--line-strong); margin: 14px 0; }

/* --------------------------------------------------------------------------
   首页
   -------------------------------------------------------------------------- */

.site-main { min-height: 60vh; }
.view { animation: fadeUp .38s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.hero { position: relative; padding: 58px 0 46px; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -80px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 169, 27, .2), transparent 65%);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.06fr .94fr; gap: 54px; align-items: center; position: relative; }
.hero-copy { max-width: 600px; }
.hero h1 {
  margin: 15px 0 20px;
  font-size: clamp(42px, 5.6vw, 72px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.06em;
}
.hero h1 .line { display: block; }
.hero h1 .hl { position: relative; display: inline-block; z-index: 1; white-space: nowrap; }
.hero h1 .hl::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -4px;
  bottom: 5px;
  height: .2em;
  background: var(--gold);
  z-index: -1;
  transform: rotate(-1.2deg);
  border-radius: 2px;
}
.hero-lead { max-width: 470px; font-size: 16.5px; line-height: 1.78; color: var(--ink-soft); }
.hero-lead strong { color: var(--ink); font-weight: 800; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
.hero-cta .btn { padding: 13px 24px; font-size: 14.5px; }
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--muted);
}
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 13px; height: 13px; color: var(--green); }

.hero-visual { position: relative; display: flex; justify-content: center; padding: 46px 6px 26px; }
.receipt {
  position: relative;
  width: 100%;
  max-width: 390px;
  padding: 24px 26px 30px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 6px;
  transform: rotate(1.2deg);
  box-shadow: 12px 14px 0 rgba(28, 26, 22, .13);
  transition: transform .3s ease;
}
.receipt:hover { transform: rotate(0deg) translateY(-3px); }
.receipt::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 120px;
  height: 22px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(233, 169, 27, .5);
  border-left: 1px dashed rgba(28, 26, 22, .25);
  border-right: 1px dashed rgba(28, 26, 22, .25);
}
.receipt::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -13px;
  height: 13px;
  background:
    radial-gradient(circle at 7px 0, transparent 6px, var(--card) 6.5px) 0 0 / 14px 13px repeat-x;
}
.receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1.5px dashed var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .13em;
  color: var(--muted);
  text-transform: uppercase;
}
.receipt-title { margin: 16px 0 2px; font-size: 15px; font-weight: 850; letter-spacing: -.01em; }
.receipt-sub { font-size: 11px; color: var(--muted); }
.receipt-rows { margin-top: 14px; }
.r-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  font-size: 12.5px;
}
.r-row .r-label { color: var(--ink-soft); white-space: nowrap; }
.r-row .r-dots { flex: 1; border-bottom: 1px dotted var(--line-strong); transform: translateY(-3px); }
.r-row .r-val { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.r-row.is-big { margin-top: 10px; padding-top: 13px; border-top: 1.5px dashed var(--ink); align-items: flex-end; }
.r-row.is-big .r-label { font-size: 12px; font-weight: 750; color: var(--ink); }
.r-row.is-big .r-val { font-size: 31px; line-height: 1; letter-spacing: -.05em; color: var(--red-deep); }
.r-row.is-big .r-unit { font-family: var(--font); font-size: 11px; color: var(--muted); font-weight: 600; }
.receipt .progress { margin: 15px 0 8px; }
.receipt-foot { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted); font-family: var(--mono); letter-spacing: .04em; }
.barcode {
  height: 34px;
  margin-top: 18px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 10px, var(--ink) 10px 13px, transparent 13px 16px);
  opacity: .82;
}
.stamp {
  position: absolute;
  top: 92px;
  right: -18px;
  padding: 5px 11px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--red-deep);
  background: rgba(255, 252, 244, .7);
  border: 2px solid var(--red);
  border-radius: 4px;
  transform: rotate(-9deg);
  opacity: .92;
}
.stamp.is-warn { color: var(--red-deep); border-color: var(--red); transform: rotate(-7deg); }
.stamp.is-safe { color: var(--green); border-color: var(--green); transform: rotate(-6deg); }
.sticker {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 750;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
}
.sticker--one { top: 4px; left: -10px; transform: rotate(-6deg); }
.sticker--two { bottom: -8px; right: -6px; transform: rotate(4deg); background: var(--gold-soft); }
.sticker .tiny-coin { display: grid; place-items: center; width: 22px; height: 22px; background: var(--gold); border: 1px solid var(--ink); border-radius: 50%; font-size: 11px; }

.marquee {
  overflow: hidden;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 10px 22px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee-track span::after { content: "✳"; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

.section { padding: 66px 0; }
.section--tight { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.section-head h2 { margin-top: 8px; font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; letter-spacing: -.045em; }
.section-head .lead { max-width: 420px; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.section-head .head-link { flex: 0 0 auto; }

.reason-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.reason {
  position: relative;
  padding: 26px 24px 24px;
  overflow: hidden;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--paper-deep);
}
.reason-num {
  font-family: var(--mono);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--line-strong);
  letter-spacing: -.06em;
}
.reason h3 { margin: 18px 0 8px; font-size: 19px; font-weight: 850; }
.reason p { font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
.reason .tag { position: absolute; top: 24px; right: 22px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 5px 6px 0 var(--paper-deep); }
.feature-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 15px;
  color: var(--ink);
  background: var(--c, var(--gold-soft));
  border: 1.5px solid var(--ink);
  border-radius: 12px 12px 12px 4px;
  box-shadow: 2px 2px 0 var(--ink);
}
.feature-ico svg { width: 22px; height: 22px; }
.feature h3 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 850; }
.feature p { margin-top: 7px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.feature .feature-kicker {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  color: var(--line-strong);
  text-transform: uppercase;
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; background: var(--line); border: 1.5px solid var(--ink); border-radius: var(--radius); }
.step { padding: 26px 24px; background: var(--card); }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.step-num {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
}
.step-tag { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.step h3 { font-size: 17px; font-weight: 850; }
.step p { margin-top: 7px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.step .step-icon { font-size: 26px; }

.report-preview { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: center; }
.report-preview h2 { margin: 9px 0 16px; font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; letter-spacing: -.045em; }
.report-preview p { max-width: 430px; font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); }
.report-preview .check-list { display: grid; gap: 10px; margin: 22px 0 26px; }
.check-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--ink-soft); }
.check-list svg { width: 15px; height: 15px; margin-top: 3px; flex: 0 0 auto; color: var(--green); }
.preview-card {
  position: relative;
  padding: 26px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 9px 10px 0 var(--gold);
  transform: rotate(-1deg);
}
.preview-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  pointer-events: none;
}
.preview-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.preview-top .eyebrow { font-size: 9px; }
.preview-persona { margin: 16px 0 4px; font-size: 25px; font-weight: 900; letter-spacing: -.04em; }
.preview-persona-sub { font-size: 11.5px; color: var(--muted); }
.preview-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.preview-stat { padding: 10px 12px; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 9px; }
.preview-stat small { display: block; font-size: 9.5px; letter-spacing: .04em; color: var(--muted); }
.preview-stat strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 17px; letter-spacing: -.03em; }
.preview-bars { display: grid; gap: 8px; }
.preview-bar { display: grid; grid-template-columns: 55px 1fr 42px; align-items: center; gap: 8px; font-size: 10px; }
.preview-bar .bar { height: 7px; background: var(--paper-deep); border-radius: 99px; overflow: hidden; }
.preview-bar .bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 99px; }
.preview-bar span:last-child { text-align: right; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.preview-footer { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 12px; border-top: 1px dashed var(--line-strong); font-family: var(--mono); font-size: 8.5px; color: var(--muted); letter-spacing: .08em; }

.tip-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tip-preview {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 190px;
}
.tip-preview .tip-cat { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--red-deep); text-transform: uppercase; }
.tip-preview h3 { margin: 9px 0 7px; font-size: 17px; font-weight: 850; }
.tip-preview p { font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.tip-preview .tip-more { margin-top: auto; padding-top: 14px; font-size: 11.5px; font-weight: 750; color: var(--ink); }
.tip-preview:hover h3 { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 3px; }

.cta-band {
  position: relative;
  overflow: hidden;
  padding: 52px 48px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 24px;
}
.cta-band::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -110px;
  width: 340px;
  height: 340px;
  border: 1.5px dashed rgba(244, 238, 226, .32);
  border-radius: 50%;
}
.cta-band::after {
  content: "¥";
  position: absolute;
  right: 70px;
  bottom: -58px;
  font-family: var(--mono);
  font-size: 220px;
  font-weight: 700;
  line-height: 1;
  color: rgba(244, 238, 226, .06);
}
.cta-band h2 { position: relative; z-index: 1; max-width: 620px; font-size: clamp(28px, 3.4vw, 42px); font-weight: 900; letter-spacing: -.045em; }
.cta-band p { position: relative; z-index: 1; max-width: 520px; margin-top: 12px; font-size: 13.5px; color: #c9c0b2; }
.cta-band .cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.cta-band .btn-primary { border-color: var(--paper); }

/* --------------------------------------------------------------------------
   页面通用
   -------------------------------------------------------------------------- */

.page { padding: 38px 0 80px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.page-head h1 { margin-top: 7px; font-size: clamp(30px, 3.8vw, 44px); font-weight: 900; letter-spacing: -.05em; }
.page-head .page-sub { max-width: 560px; margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.page-actions .btn { flex: 0 0 auto; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.back-link:hover { color: var(--ink); }

.month-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--paper-deep);
}
.month-nav button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  font-size: 16px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--ink-soft);
}
.month-nav button:hover { background: var(--paper-deep); color: var(--ink); }
.month-nav .month-label { min-width: 92px; padding: 0 6px; text-align: center; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: -.02em; }
.month-nav .this-month { flex: 0 0 auto; white-space: nowrap; font-size: 10.5px; padding: 4px 9px; border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; color: var(--red-deep); }

/* --------------------------------------------------------------------------
   账本页
   -------------------------------------------------------------------------- */

.ledger-grid { display: grid; grid-template-columns: minmax(0, 1.68fr) minmax(310px, .92fr); gap: 20px; align-items: start; }
.ledger-grid > *, .ledger-grid > div > *, .rail-stack, .rail-stack > * { min-width: 0; }
.rail-stack { display: grid; gap: 18px; }
.filter-row { max-width: 100%; }

.budget-card { padding: 26px; overflow: hidden; background: linear-gradient(145deg, var(--card) 45%, #fbf2df); }
.budget-card::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -50px;
  width: 180px;
  height: 180px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 50%;
  opacity: .7;
}
.budget-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.budget-main { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; margin-top: 20px; }
.budget-spent-label { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.budget-spent-label .tag { margin-left: 2px; }
.budget-amount { margin: 4px 0 2px; font-family: var(--mono); font-size: clamp(40px, 4.6vw, 58px); font-weight: 700; line-height: 1.05; letter-spacing: -.065em; }
.budget-amount small { font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.budget-of { font-size: 12px; color: var(--muted); }
.budget-of strong { color: var(--ink); font-family: var(--mono); font-weight: 700; }
.budget-progress { margin-top: 18px; }
.budget-progress .progress { height: 13px; }
.budget-progress .progress::after {
  content: "";
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 80%;
  width: 1.5px;
  background: rgba(28, 26, 22, .45);
}
.budget-progress .progress::before {
  content: "80%";
  position: absolute;
  right: 6px;
  top: -15px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
}
.budget-scale { display: flex; justify-content: space-between; margin-top: 5px; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.budget-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 22px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.budget-meta > div { padding: 12px 14px; background: rgba(255, 252, 244, .72); }
.budget-meta dt { font-size: 9.5px; letter-spacing: .04em; color: var(--muted); }
.budget-meta dd { margin: 3px 0 0; font-family: var(--mono); font-size: 16px; font-weight: 700; letter-spacing: -.03em; }
.budget-meta dd.is-good { color: var(--green); }
.budget-meta dd.is-bad { color: var(--red-deep); }

.ring-wrap { position: relative; width: 142px; height: 142px; flex: 0 0 auto; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--paper-deep); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--green); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .7s cubic-bezier(.22, .8, .3, 1), stroke .3s; }
.ring-wrap.is-warn .ring-fill { stroke: var(--red); }
.ring-wrap.is-dirt .ring-fill { stroke: var(--red-deep); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-center strong { font-family: var(--mono); font-size: 27px; font-weight: 700; letter-spacing: -.06em; line-height: 1; }
.ring-center span { margin-top: 4px; font-size: 9.5px; color: var(--muted); }
.ring-center .ring-days { margin-top: 5px; font-size: 8.5px; padding: 1px 6px; border-radius: 99px; background: var(--paper-deep); color: var(--ink-soft); }

.budget-note {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.55;
  background: var(--green-soft);
  color: #18553f;
  border-radius: 10px;
}
.budget-note.is-warn { background: var(--red-soft); color: #872411; }
.budget-note.is-dirt { background: #f8d7cf; color: #7c1f0e; }
.budget-note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; }
.budget-note strong { font-weight: 800; }

.quick-card { padding: 22px 24px; border-color: var(--ink); box-shadow: 4px 4px 0 var(--paper-deep); }
.quick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.quick-head .card-title { font-size: 15px; }
.quick-head .kbd-hint { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
  background: var(--paper-deep);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
}
.quick-form { display: flex; gap: 9px; }
.quick-form .input { flex: 1; min-width: 0; padding: 12px 14px; font-size: 15px; border-color: var(--ink); background: var(--paper-soft); }
.quick-form .btn { padding: 11px 20px; }
.quick-preview { min-height: 20px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.quick-preview.is-ok { color: var(--green); }
.quick-preview.is-bad { color: var(--red-deep); }
.quick-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.quick-example {
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
}
.quick-example:hover { color: var(--ink); border-color: var(--ink); }

.tx-card { padding: 22px 24px 12px; }
.tx-card .card-head { margin-bottom: 10px; }
.filter-row { display: flex; gap: 6px; padding-bottom: 13px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row .chip { padding: 4px 9px; font-size: 10.5px; }
.tx-list { display: flex; flex-direction: column; }
.tx-day { padding: 12px 0 7px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tx-day strong { font-size: 11px; font-weight: 800; letter-spacing: .01em; }
.tx-day span { font-family: var(--mono); font-size: 9px; color: var(--muted); }
.tx-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 11px;
  margin: 0 -8px;
  padding: 8px;
  border-radius: 10px;
  transition: background .14s;
}
.tx-item:hover { background: var(--paper-soft); }
.cat-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-size: 16px;
  background: color-mix(in srgb, var(--c) 14%, var(--card));
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line));
  border-radius: 10px 10px 10px 3px;
}
.tx-main { min-width: 0; }
.tx-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.tx-main small { display: block; margin-top: 1px; font-size: 10px; color: var(--muted); }
.tx-amount { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: -.02em; text-align: right; white-space: nowrap; }
.tx-amount.is-income { color: var(--green); }
.tx-amount small { display: block; font-family: var(--font); font-size: 8px; font-weight: 500; color: var(--muted); letter-spacing: .05em; }
.tx-del {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  opacity: 0;
  transition: opacity .14s, background .14s, color .14s;
}
.tx-item:hover .tx-del, .tx-del:focus-visible { opacity: 1; }
.tx-del:hover { color: var(--red-deep); background: var(--red-soft); }
.tx-more { padding: 14px 0 6px; text-align: center; }

.rail-card { padding: 20px; }
.jar-card { background: linear-gradient(160deg, #fff9e8, var(--card) 65%); border-color: #e3cb8d; }
.jar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.jar-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 850; }
.jar-title .jar-ico { display: grid; place-items: center; width: 28px; height: 28px; font-size: 14px; background: var(--gold-soft); border: 1px solid #dcc17d; border-radius: 8px; }
.jar-amount { display: flex; align-items: baseline; gap: 5px; margin: 12px 0 2px; }
.jar-amount strong { font-family: var(--mono); font-size: 34px; font-weight: 700; letter-spacing: -.06em; }
.jar-amount span { font-size: 11px; color: var(--muted); }
.jar-note { font-size: 10.5px; line-height: 1.55; color: var(--muted); }
.jar-recent { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.jar-coin {
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: #7a5400;
  background: var(--gold-soft);
  border: 1px solid #e8cc8c;
  border-radius: 4px;
}

.goal-list { display: grid; gap: 13px; }
.goal-item { padding: 12px; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 12px; }
.goal-top { display: flex; align-items: flex-start; gap: 9px; }
.goal-emoji { font-size: 19px; line-height: 1.2; }
.goal-info { flex: 1; min-width: 0; }
.goal-info strong { display: block; font-size: 12.5px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-info small { display: block; margin-top: 1px; font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.goal-add {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}
.goal-add:hover { border-color: var(--ink); background: var(--gold-soft); }
.goal-item .progress { height: 5px; margin-top: 9px; }
.goal-item .progress > i { background: var(--gold); }
.goal-foot { display: flex; justify-content: space-between; margin-top: 5px; font-size: 9px; color: var(--muted); }
.goal-foot button { padding: 0; font-size: 9px; color: var(--muted); background: none; border: 0; text-decoration: underline; }
.goal-foot button:hover { color: var(--red-deep); }
.goal-new { margin-top: 12px; }

.cat-list { display: grid; gap: 10px; }
.cat-row { display: grid; grid-template-columns: 9px 66px 1fr 58px; align-items: center; gap: 8px; }
.cat-row .cat-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.cat-row .cat-name { font-size: 11px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-row .cat-bar { height: 6px; background: var(--paper-deep); border-radius: 99px; overflow: hidden; }
.cat-row .cat-bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 99px; }
.cat-row .cat-amount { font-family: var(--mono); font-size: 9.5px; text-align: right; color: var(--ink-soft); }
.cat-empty { padding: 10px 0; font-size: 11px; color: var(--muted); }

.quick-cats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }

/* --------------------------------------------------------------------------
   AA 分账
   -------------------------------------------------------------------------- */

.split-grid { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(320px, .9fr); gap: 20px; align-items: start; }
.split-grid > *, .split-grid > * > * { min-width: 0; }
.editor-card { padding: 24px; }
.editor-section + .editor-section { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line-strong); }
.editor-section-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; font-size: 12.5px; font-weight: 800; }
.editor-section-title .step-mini {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
}
.editor-section-title .muted { font-size: 10px; font-weight: 500; }

.people-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px;
  min-height: 50px;
  background: var(--paper-soft);
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
}
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px 4px 9px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.person-chip button { display: grid; place-items: center; width: 15px; height: 15px; padding: 0; font-size: 10px; color: var(--muted); background: var(--paper-deep); border: 0; border-radius: 50%; }
.person-chip button:hover { color: var(--paper); background: var(--red); }
.people-add { display: flex; flex: 1; min-width: 160px; gap: 6px; }
.people-add input { flex: 1; min-width: 90px; padding: 4px 7px; font-size: 12px; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; }
.people-add input:focus { outline: none; border-color: var(--ink); }
.people-add button { padding: 3px 9px; font-size: 11px; font-weight: 700; background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px; }
.people-add button:hover { border-color: var(--ink); }
.people-hint { margin-top: 6px; font-size: 9.5px; color: var(--muted); }

.expense-list { display: grid; gap: 8px; margin-bottom: 12px; }
.expense-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.expense-ico { display: grid; place-items: center; width: 30px; height: 30px; font-size: 13px; background: var(--paper-deep); border-radius: 8px; }
.expense-main { min-width: 0; }
.expense-main strong { display: block; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-main small { display: block; margin-top: 1px; font-size: 9.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-amt { font-family: var(--mono); font-size: 12px; font-weight: 700; white-space: nowrap; }
.expense-del { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; font-size: 12px; color: var(--muted); background: transparent; border: 0; border-radius: 5px; }
.expense-del:hover { color: var(--red-deep); background: var(--red-soft); }

.add-expense { padding: 14px; background: var(--paper-soft); border: 1.5px dashed var(--line-strong); border-radius: 12px; }
.add-expense .form-grid { gap: 9px; }
.add-expense .field > label { font-size: 10px; }
.add-expense .input, .add-expense .select { padding: 8px 10px; font-size: 12px; border-width: 1px; border-radius: 8px; }
.expense-form-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 90px 110px; gap: 8px; margin-bottom: 9px; }
.participants-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 6px; font-size: 10px; font-weight: 700; color: var(--ink-soft); }
.participants-label .links { display: flex; gap: 8px; }
.participants-label button { padding: 0; font-size: 9.5px; color: var(--muted); background: none; border: 0; text-decoration: underline; }
.participant-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.participant {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.participant::before { content: ""; width: 6px; height: 6px; border: 1px solid var(--line-strong); border-radius: 50%; }
.participant.is-on { color: var(--ink); border-color: var(--ink); background: var(--card); }
.participant.is-on::before { background: var(--green); border-color: var(--green); }
.weights-box { margin-top: 9px; padding: 9px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.weights-head { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; }
.weights-head input { width: 13px; height: 13px; accent-color: var(--ink); }
.weight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 7px; }
.weight-grid label { font-size: 9px; color: var(--muted); }
.weight-grid input { width: 100%; padding: 3px 5px; font-size: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 5px; }
.add-expense-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.add-expense-hint { font-size: 9.5px; color: var(--muted); }
.add-expense-foot .btn { padding: 6px 13px; font-size: 11px; box-shadow: 2px 2px 0 var(--ink); }

.result-card { position: sticky; top: 88px; padding: 24px; color: var(--paper); background: var(--ink); border-color: var(--ink); box-shadow: 6px 6px 0 rgba(28, 26, 22, .16); }
.result-card .card-title { color: var(--paper); }
.result-card .card-sub { color: #aaa196; }
.result-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.result-total { margin: 18px 0 2px; font-family: var(--mono); font-size: 38px; font-weight: 700; line-height: 1; letter-spacing: -.06em; }
.result-total small { font-family: var(--font); font-size: 11px; font-weight: 500; color: #aaa196; letter-spacing: 0; margin-left: 4px; }
.result-meta { font-size: 10.5px; color: #aaa196; }
.result-divider { height: 1px; margin: 16px 0; border: 0; border-top: 1px dashed rgba(244, 238, 226, .28); }
.result-label { margin-bottom: 9px; font-family: var(--mono); font-size: 9px; letter-spacing: .13em; color: #aaa196; text-transform: uppercase; }
.balance-list { display: grid; gap: 7px; }
.balance-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.balance-row .b-name { display: flex; align-items: center; gap: 6px; color: #e9e2d6; }
.balance-row .b-avatar { display: grid; place-items: center; width: 19px; height: 19px; font-size: 8px; font-weight: 700; color: var(--ink); background: #e9e2d6; border-radius: 50%; }
.balance-row .b-amt { font-family: var(--mono); font-size: 11.5px; font-weight: 700; }
.balance-row .b-amt.is-plus { color: #8fdcc0; }
.balance-row .b-amt.is-minus { color: #ffab9c; }
.transfer-list { display: grid; gap: 7px; }
.transfer {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(244, 238, 226, .08);
  border: 1px solid rgba(244, 238, 226, .16);
  border-radius: 9px;
}
.transfer-num { display: grid; place-items: center; width: 17px; height: 17px; font-family: var(--mono); font-size: 8px; color: var(--ink); background: var(--gold); border-radius: 50%; }
.transfer-path { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 11px; }
.transfer-path strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer-path .arrow { color: #aaa196; font-family: var(--mono); }
.transfer-amt { font-family: var(--mono); font-size: 11px; font-weight: 700; color: #ffd77a; white-space: nowrap; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.result-actions .btn { padding: 9px 10px; font-size: 11.5px; border-color: rgba(244, 238, 226, .4); background: transparent; color: var(--paper); box-shadow: none; }
.result-actions .btn:hover { background: rgba(244, 238, 226, .1); border-color: var(--paper); }
.result-actions .btn-primary { grid-column: 1 / -1; color: var(--ink); background: var(--gold); border-color: var(--gold); box-shadow: 2px 2px 0 rgba(244, 238, 226, .25); }
.result-actions .btn-primary:hover { background: #f5bd3c; }
.result-empty { padding: 26px 8px 18px; text-align: center; }
.result-empty .big { font-size: 34px; margin-bottom: 8px; }
.result-empty strong { display: block; font-size: 15px; color: var(--paper); }
.result-empty p { max-width: 230px; margin: 6px auto 0; font-size: 11px; line-height: 1.6; color: #aaa196; }
.result-note { margin-top: 13px; font-size: 9.5px; line-height: 1.5; color: #8f877b; }
.result-note strong { color: #c9c0b2; }

.history-section { margin-top: 28px; }
.history-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.history-card { padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.history-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.history-card h3 { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-card .history-date { margin-top: 3px; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.history-amount { font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: -.04em; margin-top: 10px; }
.history-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); }
.history-bottom small { font-size: 9.5px; color: var(--muted); }
.history-actions { display: flex; gap: 5px; }
.history-actions button { padding: 2px 6px; font-size: 9.5px; font-weight: 650; background: var(--card); border: 1px solid var(--line); border-radius: 5px; }
.history-actions button:hover { border-color: var(--ink); }
.history-actions .danger:hover { color: var(--red-deep); border-color: var(--red); background: var(--red-soft); }

.scripts-section { margin-top: 34px; }
.script-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.script-card { padding: 16px 17px; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 12px; }
.script-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 800; }
.script-card p { margin: 7px 0 10px; font-size: 12px; line-height: 1.65; color: var(--ink-soft); }
.copy-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; font-size: 10.5px; background: var(--card); border: 1px dashed var(--line-strong); border-radius: 7px; }
.copy-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

/* --------------------------------------------------------------------------
   宿舍基金
   -------------------------------------------------------------------------- */

.dorm-hero { position: relative; overflow: hidden; padding: 30px; color: var(--paper); background: var(--ink); border-radius: 24px; }
.dorm-hero::before {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -150px;
  width: 320px;
  height: 320px;
  border: 1.5px dashed rgba(244, 238, 226, .22);
  border-radius: 50%;
}
.dorm-hero-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dorm-hero h2 { margin-top: 7px; font-size: 25px; font-weight: 850; letter-spacing: -.04em; }
.dorm-hero .dorm-sub { margin-top: 5px; font-size: 11px; color: #aaa196; }
.fund-balance { margin-top: 22px; display: flex; align-items: baseline; gap: 8px; }
.fund-balance strong { font-family: var(--mono); font-size: clamp(46px, 6vw, 70px); line-height: 1; font-weight: 700; letter-spacing: -.07em; color: var(--gold); }
.fund-balance span { font-size: 12px; color: #c9c0b2; }
.dorm-stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 24px; background: rgba(244, 238, 226, .16); border-radius: 12px; overflow: hidden; }
.dorm-stats > div { padding: 12px 14px; background: rgba(244, 238, 226, .05); }
.dorm-stats dt { font-size: 9px; letter-spacing: .06em; color: #aaa196; }
.dorm-stats dd { margin: 3px 0 0; font-family: var(--mono); font-size: 17px; font-weight: 700; letter-spacing: -.03em; }
.dorm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.dorm-grid > * { min-width: 0; }
.member-card { padding: 22px; }
.member-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.member-table th { padding: 0 0 8px; text-align: left; font-size: 9px; font-weight: 650; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); }
.member-table th:not(:first-child), .member-table td:not(:first-child) { text-align: right; }
.member-table td { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.member-table tr:last-child td { border-bottom: 0; }
.member-name { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.member-avatar { display: grid; place-items: center; width: 22px; height: 22px; font-size: 9px; font-weight: 700; color: var(--paper); background: var(--ink); border-radius: 50%; }
.member-table .num { font-family: var(--mono); font-size: 10.5px; }
.member-table .is-plus { color: var(--green); }
.member-table .is-minus { color: var(--red-deep); }
.member-manage { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.member-manage .person-chip { font-size: 10.5px; }
.dorm-form-card { padding: 22px; }
.dorm-form + .dorm-form { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.dorm-form h3 { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 12.5px; font-weight: 800; }
.dorm-form h3 .badge { padding: 1px 6px; font-size: 8.5px; font-weight: 700; color: var(--green); background: var(--green-soft); border-radius: 99px; }
.dorm-form h3 .badge.is-out { color: var(--red-deep); background: var(--red-soft); }
.dorm-form .form-grid { gap: 8px; }
.dorm-form .input, .dorm-form .select { padding: 8px 10px; font-size: 12px; border-width: 1px; border-radius: 8px; }
.dorm-form .field > label { font-size: 9.5px; }
.dorm-form .btn { margin-top: 9px; padding: 7px 13px; font-size: 11px; box-shadow: 2px 2px 0 var(--ink); }
.fund-list { display: grid; gap: 2px; }
.fund-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 20px; align-items: center; gap: 9px; margin: 0 -6px; padding: 7px 6px; border-radius: 8px; }
.fund-row:hover { background: var(--paper-soft); }
.fund-ico { display: grid; place-items: center; width: 27px; height: 27px; font-size: 11px; background: var(--green-soft); border-radius: 7px; }
.fund-row.is-out .fund-ico { background: var(--red-soft); }
.fund-main strong { display: block; font-size: 11.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fund-main small { display: block; font-size: 9px; color: var(--muted); }
.fund-amt { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--green); }
.fund-row.is-out .fund-amt { color: var(--red-deep); }
.fund-del { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; font-size: 11px; color: var(--muted); background: none; border: 0; border-radius: 4px; }
.fund-del:hover { color: var(--red-deep); background: var(--red-soft); }
.dorm-empty { max-width: 560px; margin: 30px auto; padding: 34px; text-align: center; background: var(--card); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 8px 8px 0 var(--gold); }
.dorm-empty .big-emoji { font-size: 48px; }
.dorm-empty h2 { margin: 12px 0 7px; font-size: 24px; }
.dorm-empty p { font-size: 12.5px; color: var(--muted); }
.dorm-empty form { margin-top: 22px; text-align: left; }

.share-card { padding: 22px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-code-import { display: flex; gap: 7px; margin-top: 9px; }
.share-code-import .input { flex: 1; min-width: 0; padding: 7px 10px; font-size: 10.5px; border-width: 1px; border-radius: 8px; }
.share-code-import .btn { flex: 0 0 auto; }
.share-note { margin-top: 10px; padding: 9px 11px; font-size: 10px; line-height: 1.6; color: var(--muted); background: var(--paper-soft); border: 1px dashed var(--line); border-radius: 8px; }
.share-result { margin-top: 14px; }
.qr-wrap { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; padding: 12px; background: var(--paper-soft); border: 1px dashed var(--line-strong); border-radius: 10px; }
.qr-wrap .qr-box { flex: 0 0 auto; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.qr-wrap .qr-box svg { width: 200px; height: 200px; }
.qr-info { flex: 1; min-width: 0; }
.qr-info p { font-size: 10px; line-height: 1.6; color: var(--muted); }
.code-area { width: 100%; height: 58px; margin-top: 8px; padding: 7px; font-family: var(--mono); font-size: 9px; line-height: 1.4; color: var(--ink-soft); background: var(--card); border: 1px solid var(--line); border-radius: 6px; resize: none; word-break: break-all; }
.import-label { display: inline-flex; }
.import-label input { display: none; }

/* --------------------------------------------------------------------------
   月度报告
   -------------------------------------------------------------------------- */

.report-hero { position: relative; overflow: hidden; padding: 34px; background: var(--card); border: 2px solid var(--ink); border-radius: 24px; box-shadow: 8px 8px 0 var(--gold); }
.report-hero::after {
  content: "REPORT";
  position: absolute;
  right: -12px;
  bottom: -28px;
  font-family: var(--mono);
  font-size: 110px;
  font-weight: 700;
  letter-spacing: -.08em;
  color: rgba(28, 26, 22, .045);
  pointer-events: none;
}
.report-hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; }
.report-hero h1 { margin: 8px 0 10px; font-size: clamp(32px, 4vw, 48px); font-weight: 900; letter-spacing: -.05em; }
.report-persona-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 12px; }
.persona-badge { padding: 4px 10px; font-size: 11px; font-weight: 750; color: var(--ink); background: var(--gold-soft); border: 1px solid #dfc06f; border-radius: 999px; }
.report-summary { max-width: 530px; font-size: 13px; line-height: 1.75; color: var(--ink-soft); }
.report-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 22px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.report-kpi { padding: 13px 15px; background: var(--paper-soft); }
.report-kpi dt { font-size: 9.5px; color: var(--muted); }
.report-kpi dd { margin: 3px 0 0; font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: -.04em; }
.report-kpi dd small { font-family: var(--font); font-size: 9px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.report-score { text-align: center; }
.score-ring { position: relative; width: 206px; height: 206px; margin: 0 auto; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .track { fill: none; stroke: var(--paper-deep); stroke-width: 13; }
.score-ring .fill { fill: none; stroke: var(--green); stroke-width: 13; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.score-ring.is-warn .fill { stroke: var(--red); }
.score-ring.is-dirt .fill { stroke: var(--red-deep); }
.score-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-center strong { font-family: var(--mono); font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.06em; }
.score-center span { margin-top: 4px; font-size: 10px; color: var(--muted); }
.score-caption { margin-top: 9px; font-size: 10.5px; color: var(--muted); }

.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.report-grid > * { min-width: 0; }
.report-card { padding: 22px; }
.engel-big { display: flex; align-items: flex-end; gap: 8px; margin: 6px 0 2px; }
.engel-big strong { font-family: var(--mono); font-size: 42px; font-weight: 700; line-height: 1; letter-spacing: -.06em; }
.engel-big span { padding-bottom: 3px; font-size: 11px; color: var(--muted); }
.engel-meter { display: flex; height: 14px; margin: 15px 0 7px; overflow: hidden; background: var(--paper-deep); border: 1px solid var(--line); border-radius: 99px; }
.engel-meter i { display: block; height: 100%; background: var(--red); }
.engel-meter i:nth-child(2) { background: var(--gold); }
.engel-meter i:nth-child(3) { background: var(--green); opacity: .55; }
.engel-legend { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); }
.engel-quote { margin-top: 16px; padding: 12px 13px; font-size: 12px; line-height: 1.65; background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; }
.engel-quote strong { font-weight: 800; }

.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calendar-head .cal-title { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { padding: 2px 0 4px; text-align: center; font-family: var(--mono); font-size: 8px; color: var(--muted); }
.cal-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 40px;
  padding: 4px 5px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink-soft);
  background: var(--paper-soft);
  border: 1px solid transparent;
  border-radius: 6px;
}
.cal-cell.is-empty { background: transparent; border: 0; }
.cal-cell.is-future { color: #bdb3a2; background: transparent; border: 1px dashed var(--line); }
.cal-cell .cal-day { line-height: 1; }
.cal-cell .cal-amt { align-self: flex-end; font-size: 7px; font-weight: 700; opacity: .85; }
.cal-cell[data-level="1"] { background: #f7e8c5; }
.cal-cell[data-level="2"] { background: #f1d597; }
.cal-cell[data-level="3"] { background: #e9b95f; }
.cal-cell[data-level="4"] { background: #dd8b3e; color: #fff; }
.cal-cell[data-level="5"] { background: #c94c2c; color: #fff; }
.cal-cell.is-max { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.cal-cell.is-max::after {
  content: "大出血";
  position: absolute;
  top: -10px;
  right: -4px;
  padding: 1px 3px;
  font-family: var(--font);
  font-size: 6.5px;
  font-weight: 800;
  color: var(--paper);
  background: var(--red-deep);
  border-radius: 3px;
  transform: rotate(4deg);
}
.cal-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 8px; font-size: 8px; color: var(--muted); }
.cal-legend i { width: 11px; height: 11px; border-radius: 3px; }

.rank-list { display: grid; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.rank-no { font-family: var(--mono); font-size: 9px; color: var(--muted); }
.rank-main { min-width: 0; }
.rank-name { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.rank-name span:first-child { font-weight: 650; }
.rank-name span:last-child { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.rank-bar { height: 5px; margin-top: 3px; background: var(--paper-deep); border-radius: 99px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 99px; }
.rank-amount { font-family: var(--mono); font-size: 10px; color: var(--ink-soft); text-align: right; }

.podium-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.podium { padding: 16px; text-align: center; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 12px; }
.podium .p-emoji { font-size: 26px; }
.podium .p-label { margin-top: 4px; font-size: 9px; letter-spacing: .08em; color: var(--muted); }
.podium .p-name { margin-top: 4px; font-size: 16px; font-weight: 850; }
.podium .p-value { margin-top: 2px; font-family: var(--mono); font-size: 10px; color: var(--red-deep); }
.podium.is-good .p-value { color: var(--green); }
.podium-note { margin-top: 10px; font-size: 9.5px; line-height: 1.55; color: var(--muted); }

.report-goals { display: grid; gap: 10px; }
.report-goal { display: flex; align-items: center; gap: 9px; }
.report-goal .emoji { font-size: 17px; }
.report-goal .rg-main { flex: 1; min-width: 0; }
.report-goal .rg-top { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; }
.report-goal .rg-top span { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-goal .rg-top b { font-family: var(--mono); font-size: 9px; color: var(--muted); font-weight: 500; }
.report-goal .progress { height: 4px; margin-top: 4px; }
.report-goal .progress > i { background: var(--gold); }

/* --------------------------------------------------------------------------
   生存攻略
   -------------------------------------------------------------------------- */

.tips-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: end; padding: 20px 0 10px; }
.tips-hero h1 { margin: 9px 0 12px; font-size: clamp(34px, 4.2vw, 55px); font-weight: 900; letter-spacing: -.055em; }
.tips-hero p { max-width: 520px; font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); }
.tips-hero-note { padding: 16px 18px; font-size: 11.5px; line-height: 1.65; color: var(--muted); background: var(--gold-soft); border: 1px dashed #d9b965; border-radius: 12px; transform: rotate(1deg); }
.tips-hero-note strong { color: var(--ink); }

.tips-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 26px 0 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.tips-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.tip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tip-card { display: flex; flex-direction: column; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .16s, transform .16s; }
.tip-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.tip-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tip-cat { font-family: var(--mono); font-size: 8.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--red-deep); }
.tip-num { font-family: var(--mono); font-size: 9px; color: var(--line-strong); }
.tip-card h3 { margin: 9px 0 4px; font-size: 18px; font-weight: 850; }
.tip-card .tip-sub { font-size: 11px; color: var(--muted); }
.tip-points { display: grid; gap: 7px; margin-top: 14px; }
.tip-points li { position: relative; padding-left: 17px; font-size: 12px; line-height: 1.65; color: var(--ink-soft); }
.tip-points li::before { content: "→"; position: absolute; left: 0; top: 0; font-family: var(--mono); font-size: 10px; color: var(--gold); font-weight: 700; }
.tip-remember { margin-top: auto; padding-top: 14px; font-size: 11.5px; font-weight: 750; color: var(--ink); }
.tip-remember span { display: inline-block; margin-right: 5px; padding: 1px 5px; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; color: var(--paper); background: var(--ink); border-radius: 3px; vertical-align: 1px; }

.challenge { margin-top: 34px; padding: 28px; background: var(--ink); color: var(--paper); border-radius: 22px; }
.challenge-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.challenge h2 { font-size: 26px; font-weight: 850; letter-spacing: -.04em; }
.challenge p { margin-top: 6px; font-size: 12px; color: #aaa196; }
.challenge-progress { min-width: 130px; text-align: right; }
.challenge-progress strong { font-family: var(--mono); font-size: 26px; color: var(--gold); }
.challenge-progress span { font-size: 10px; color: #aaa196; }
.challenge-progress .progress { height: 5px; margin-top: 5px; background: rgba(244, 238, 226, .16); border-color: transparent; }
.challenge-progress .progress > i { background: var(--gold); }
.challenge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.challenge-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; text-align: left; background: rgba(244, 238, 226, .06); border: 1px solid rgba(244, 238, 226, .14); border-radius: 9px; color: #e9e2d6; font-size: 11.5px; transition: background .14s, border-color .14s; }
.challenge-item:hover { background: rgba(244, 238, 226, .11); }
.challenge-item.is-done { background: rgba(233, 169, 27, .13); border-color: rgba(233, 169, 27, .5); color: #ffe0a1; }
.challenge-check { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto; font-size: 10px; color: transparent; border: 1px solid rgba(244, 238, 226, .4); border-radius: 5px; }
.challenge-item.is-done .challenge-check { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.challenge-foot { margin-top: 14px; font-size: 10px; color: #8f877b; }

.scripts-section { margin-top: 34px; }
.scripts-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.scripts-head h2 { font-size: 25px; font-weight: 850; letter-spacing: -.04em; }
.scripts-head p { max-width: 390px; font-size: 12px; color: var(--muted); }
.script-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.script-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 12px; }
.script-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.script-card h3 { font-size: 12.5px; font-weight: 800; }
.script-card .scene { font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
.script-card blockquote { margin: 0; padding: 10px 12px; font-size: 12px; line-height: 1.7; color: var(--ink-soft); background: var(--card); border-left: 3px solid var(--gold); border-radius: 0 7px 7px 0; }

/* --------------------------------------------------------------------------
   关于
   -------------------------------------------------------------------------- */

.about-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 24px 0 12px; }
.about-hero h1 { margin: 10px 0 14px; font-size: clamp(36px, 4.4vw, 58px); font-weight: 900; letter-spacing: -.055em; }
.about-hero p { max-width: 560px; font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.about-note-card { padding: 26px; background: var(--card); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 8px 8px 0 var(--gold); transform: rotate(1deg); }
.about-note-card .eyebrow { font-size: 9px; }
.about-note-card blockquote { margin: 14px 0 0; font-size: 15px; line-height: 1.7; font-weight: 650; }
.about-note-card .sig { margin-top: 14px; font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: .06em; }
.principle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.principle { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.principle .p-ico { font-size: 22px; }
.principle h3 { margin: 9px 0 5px; font-size: 14px; font-weight: 850; }
.principle p { font-size: 11.5px; line-height: 1.65; color: var(--muted); }
.faq { display: grid; gap: 8px; }
.faq details { padding: 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; }
.faq details[open] { border-color: var(--ink); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; font-size: 13px; font-weight: 750; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 16px; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq .faq-body { padding: 0 0 14px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.about-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.about-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

.settings-app {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.settings-app strong { display: block; font-size: 12.5px; }
.settings-app .btn { flex: 0 0 auto; }

.site-share { text-align: center; }
.site-share-qr {
  display: inline-flex;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.site-share-qr svg { width: 210px; height: 210px; }
.site-share .field { text-align: left; }
.install-steps {
  margin: 0 0 12px;
  padding-left: 21px;
  list-style: decimal;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.install-steps strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   弹窗 / 键盘 / 提示
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(28, 26, 22, .48);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeIn .16s ease both;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 20px;
  box-shadow: 9px 9px 0 var(--ink);
  animation: modalIn .22s cubic-bezier(.22, .8, .3, 1) both;
}
.modal:focus { outline: none; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.modal.is-wide { max-width: 760px; }
.modal-head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.modal-head h2 { font-size: 21px; font-weight: 900; letter-spacing: -.04em; }
.modal-head p { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.modal-close {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  padding: 0;
  font-size: 17px;
  line-height: 1;
  color: var(--ink-soft);
  background: var(--paper-soft);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.modal-close:hover { background: var(--red-soft); color: var(--red-deep); border-color: var(--red); }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 24px 8px; -webkit-overflow-scrolling: touch; }
.modal-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px 22px; background: var(--card); border-top: 1px dashed var(--line); }
.modal-foot .btn { padding: 9px 18px; font-size: 13px; }
.modal--danger .modal-head h2 { color: var(--red-deep); }

.amount-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 10px 0 14px;
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -.06em;
  line-height: 1;
}
.amount-display .currency { font-size: 20px; color: var(--muted); font-weight: 500; }
.amount-display .caret { width: 2px; height: 34px; margin-left: 2px; background: var(--red); animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.amount-display.is-empty { color: var(--line-strong); }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 12px; }
.keypad button {
  height: 46px;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: background .1s, transform .1s;
}
.keypad button:hover { background: var(--gold-soft); }
.keypad button:active { transform: scale(.97); }
.keypad button.is-fn { font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--muted); }
.keypad button.is-ok { color: var(--paper); background: var(--ink); border-color: var(--ink); font-family: var(--font); font-size: 13px; font-weight: 800; }
.keypad button.is-ok:hover { background: #302c25; }

.cat-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.cat-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 3px;
  font-size: 9.5px;
  font-weight: 650;
  color: var(--ink-soft);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.cat-option .emoji { font-size: 16px; }
.cat-option:hover { border-color: var(--ink); }
.cat-option.is-active { color: var(--ink); background: var(--gold-soft); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.quick-add-note { margin-top: 10px; }
.quick-add-note .input { padding: 8px 10px; font-size: 12.5px; }
.quick-date { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 10.5px; color: var(--muted); }
.quick-date input { width: auto; padding: 5px 8px; font-size: 11px; border-width: 1px; border-radius: 7px; }
.quick-hint { margin-top: 10px; font-size: 10px; line-height: 1.5; color: var(--muted); }

.card-preview { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.card-preview img { width: 100%; max-width: 360px; border: 1.5px solid var(--ink); border-radius: 8px; box-shadow: 5px 5px 0 var(--paper-deep); }
.card-preview .preview-actions { display: flex; gap: 8px; }

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 15px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid rgba(244, 238, 226, .24);
  border-radius: 10px;
  box-shadow: 4px 4px 0 rgba(28, 26, 22, .18);
  animation: toastIn .22s cubic-bezier(.22, .8, .3, 1) both;
}
.toast::before { content: ""; width: 7px; height: 7px; flex: 0 0 auto; background: var(--green); border-radius: 50%; }
.toast.is-error::before { background: var(--red); }
.toast.is-gold::before { background: var(--gold); }
.toast.is-out { animation: toastOut .18s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* --------------------------------------------------------------------------
   页脚 / 移动导航
   -------------------------------------------------------------------------- */

.site-footer { margin-top: 76px; padding: 46px 0 22px; background: var(--paper-deep); border-top: 1.5px solid var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.5fr .65fr .65fr 1.2fr; gap: 36px; }
.brand--footer { margin-bottom: 12px; }
.footer-brand p { font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.footer-col h3 { margin-bottom: 10px; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.footer-col a, .footer-link { display: block; margin: 5px 0; font-size: 11.5px; color: var(--ink-soft); text-align: left; background: none; border: 0; padding: 0; }
.footer-col a:hover, .footer-link:hover { color: var(--red-deep); text-decoration: underline; text-underline-offset: 2px; }
.footer-note { padding: 16px 18px; background: rgba(255, 252, 244, .6); border: 1px dashed var(--line-strong); border-radius: 12px; }
.footer-note .privacy-dot { display: block; width: 8px; height: 8px; margin-bottom: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--green-soft); }
.footer-note p { font-size: 10.5px; line-height: 1.65; color: var(--muted); }
.footer-note p strong { color: var(--ink); }
.footer-note .backup-status { margin-top: 7px; font-family: var(--mono); font-size: 9px; letter-spacing: .02em; color: var(--muted); }
.footer-note-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.footer-note-actions .btn { margin-top: 0; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--line-strong); font-size: 9.5px; color: var(--muted); }
.footer-bottom .mono { font-size: 8px; letter-spacing: .1em; }

.tabbar { display: none; }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .mainnav { gap: 0; }
  .mainnav a { padding-left: 8px; padding-right: 8px; font-size: 12.5px; }
  .hero-inner { gap: 34px; }
  .ledger-grid { grid-template-columns: minmax(0, 1.5fr) minmax(290px, .9fr); }
  .split-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr); }
  .history-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .mainnav { display: none; }
  .topbar-inner { min-height: 62px; gap: 16px; }
  .topbar-actions { margin-left: auto; }
  .hero { padding: 40px 0 32px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-copy { max-width: none; }
  .hero-visual { max-width: 430px; margin: 0 auto; width: 100%; }
  .hero h1 { font-size: clamp(40px, 9vw, 62px); }
  .reason-grid, .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-top: 1px solid var(--line); }
  .report-preview, .about-hero { grid-template-columns: 1fr; gap: 30px; }
  .preview-card { max-width: 480px; }
  .ledger-grid, .split-grid { grid-template-columns: 1fr; }
  .rail-stack { grid-template-columns: 1fr 1fr; }
  .result-card { position: static; }
  .report-grid { grid-template-columns: 1fr; }
  .report-hero-inner { grid-template-columns: 1fr; gap: 26px; }
  .report-score { order: -1; display: flex; align-items: center; justify-content: flex-start; gap: 20px; text-align: left; }
  .score-ring { width: 132px; height: 132px; margin: 0; flex: 0 0 auto; }
  .score-center strong { font-size: 25px; }
  .dorm-grid { grid-template-columns: 1fr; }
  .principle-grid { grid-template-columns: 1fr 1fr; }
  .tips-hero { grid-template-columns: 1fr; gap: 20px; }
  .tips-hero-note { max-width: 520px; transform: none; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-note { grid-column: 1 / -1; max-width: 480px; }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 252, 244, .96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1.5px solid var(--ink);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; font-size: 9px; font-weight: 650; color: var(--muted); border-radius: 8px; }
  .tabbar a svg { width: 18px; height: 18px; }
  .tabbar a.is-active { color: var(--red-deep); }
  .tabbar a.is-active svg { transform: translateY(-1px); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.has-netlify-badge { padding-bottom: calc(128px + env(safe-area-inset-bottom)); }
  body.has-netlify-badge .tabbar { bottom: 64px; }
  body.has-netlify-badge .toast-root { bottom: calc(142px + env(safe-area-inset-bottom)); }
  .site-footer { margin-top: 50px; padding-bottom: 30px; }
  .toast-root { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 680px) {
  .wrap { padding: 0 17px; }
  .topbar-inner { min-height: 58px; }
  .brand-mark { width: 33px; height: 33px; }
  .brand-text strong { font-size: 16px; }
  .brand-text small { font-size: 6.5px; }
  .topbar-actions .icon-btn { display: none; }
  .topbar-actions .btn { padding: 7px 12px; font-size: 11.5px; }
  .status-strip { font-size: 10px; padding: 4px 14px; text-align: center; }
  .demo-banner-inner { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 0; }
  .demo-banner p { display: block; font-size: 11px; line-height: 1.65; }
  .demo-actions { width: 100%; display: flex; justify-content: space-between; align-items: center; }

  .hero { padding: 30px 0 24px; }
  .hero h1 { font-size: clamp(36px, 11vw, 50px); margin: 12px 0 16px; }
  .hero-lead { font-size: 14.5px; line-height: 1.75; }
  .hero-cta .btn { flex: 1; padding: 11px 14px; font-size: 13px; }
  .trust-row { gap: 6px 12px; font-size: 10px; }
  .hero-visual { padding: 42px 0 24px; }
  .receipt { max-width: 100%; padding: 20px 20px 26px; }
  .r-row.is-big .r-val { font-size: 27px; }
  .sticker--one { left: -4px; top: 0; }
  .sticker--two { right: -3px; bottom: -6px; }
  .stamp { top: 82px; right: -8px; }

  .section { padding: 44px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
  .section-head h2 { font-size: 29px; }
  .reason-grid, .feature-grid, .tip-preview-grid, .tip-grid, .script-grid, .history-grid { grid-template-columns: 1fr; }
  .report-preview h2 { font-size: 29px; }
  .cta-band { padding: 32px 22px; border-radius: 18px; }
  .cta-band h2 { font-size: 28px; }
  .cta-band::after { font-size: 150px; right: 10px; }

  .page { padding: 24px 0 60px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .page-head h1 { font-size: 32px; }
  .page-actions { justify-content: flex-start; }
  .page-actions .month-nav { width: 100%; justify-content: space-between; }
  .page-actions .month-nav .month-label { flex: 1; }
  .page-actions .btn { flex: 1; }

  .budget-card { padding: 19px; }
  .budget-card::before { display: none; }
  .budget-main { grid-template-columns: 1fr; gap: 14px; }
  .ring-wrap { display: none; }
  .ring-center strong { font-size: 19px; }
  .ring-center span { font-size: 8px; }
  .ring-center .ring-days { display: none; }
  .budget-amount { font-size: 40px; }
  .budget-top { padding-right: 0; }
  .budget-meta > div { padding: 9px 10px; }
  .budget-meta dd { font-size: 13px; }
  .budget-note { font-size: 11px; }

  .quick-card, .tx-card { padding: 17px; }
  .filter-row { flex-wrap: wrap; overflow: visible; }
  .quick-form { flex-wrap: wrap; }
  .quick-form .input { flex-basis: 100%; }
  .quick-form .btn { width: 100%; }

  .rail-stack { grid-template-columns: 1fr; }
  .rail-card { padding: 17px; }

  .split-grid { gap: 14px; }
  .editor-card { padding: 17px; }
  .expense-form-row { grid-template-columns: 1fr 1fr; }
  .expense-form-row .expense-note { grid-column: 1 / -1; }
  .weight-grid { grid-template-columns: repeat(2, 1fr); }
  .result-card { padding: 20px; }
  .result-actions { grid-template-columns: 1fr; }
  .result-actions .btn-primary { grid-column: auto; }

  .dorm-hero { padding: 22px; border-radius: 18px; }
  .fund-balance strong { font-size: 48px; }
  .dorm-stats { grid-template-columns: repeat(3, 1fr); }
  .dorm-stats > div { padding: 8px 9px; }
  .dorm-stats dt { font-size: 8px; }
  .dorm-stats dd { font-size: 13px; }
  .dorm-hero-top { flex-direction: row; align-items: flex-start; }
  .qr-wrap { flex-direction: column; align-items: center; }
  .qr-info { width: 100%; }
  .share-code-import { flex-wrap: wrap; }
  .share-code-import .input { flex-basis: 100%; }

  .report-hero { padding: 22px; box-shadow: 5px 5px 0 var(--gold); }
  .report-score { order: 0; flex-direction: row; margin-top: 4px; }
  .report-kpis { grid-template-columns: 1fr 1fr; }
  .report-card { padding: 18px; }
  .cal-cell { min-height: 34px; padding: 3px 4px; }
  .cal-cell .cal-amt { display: none; }
  .podium-grid { grid-template-columns: 1fr; }

  .tips-hero h1 { font-size: 38px; }
  .tips-toolbar { flex-direction: column; align-items: flex-start; }
  .challenge { padding: 20px; }
  .challenge-head { flex-direction: column; gap: 12px; }
  .challenge-progress { text-align: left; width: 100%; }
  .challenge-grid { grid-template-columns: 1fr; }
  .scripts-head { flex-direction: column; align-items: flex-start; gap: 6px; }

  .about-hero { padding-top: 8px; }
  .about-hero h1 { font-size: 38px; }
  .principle-grid, .about-two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 5px; }

  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; border-bottom: 0; box-shadow: 0 -6px 0 rgba(28, 26, 22, .1); }
  .modal.is-wide { max-width: 100%; }
  .modal-head { padding: 18px 18px 0; }
  .modal-body { padding: 14px 18px 6px; }
  .modal-foot { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
  .cat-picker { grid-template-columns: repeat(4, 1fr); }
  .amount-display { font-size: 38px; }
  .keypad button { height: 44px; }
  .toast-root { right: 12px; left: 12px; bottom: 76px; align-items: stretch; }
  .toast { max-width: none; }
}

@media (min-width: 681px) {
  .filter-row { flex-wrap: wrap; overflow: visible; padding-bottom: 10px; }
}

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