:root {
  --zhu: #2c2c2a;
  --zhu-dark: #1b1b1a;
  --ink: #2c2c2a;
  --muted: #8a7f6b;
  --paper: #f7f4ec;
  --paper-2: #fffdf8;
  --line: #e6dcc9;
  --ok: #2f7d46;
  --warn: #9a6a1c;
  --danger: #a32d2d;
  --shadow: 0 10px 30px rgba(86, 63, 32, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(circle at 8% 0%, rgba(44, 44, 42, 0.05), transparent 34%),
    radial-gradient(circle at 100% 20%, rgba(181, 138, 62, 0.08), transparent 38%),
    var(--paper);
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "PingFang SC", serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--zhu); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.shell {
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: 0 0 60px rgba(86, 63, 32, 0.08);
  position: relative;
  padding-bottom: 84px;
}
@media (min-width: 760px) {
  .shell { margin: 24px auto; min-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
}

.app-header {
  padding: 22px 20px 12px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.86));
  border-bottom: 1px solid rgba(230, 220, 201, 0.7);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.seal {
  width: 44px; height: 44px; flex: 0 0 44px;
  border: 2px solid var(--zhu); border-radius: 8px; color: var(--zhu);
  display: grid; place-items: center; text-align: center;
  font-size: 15px; line-height: 1.12; letter-spacing: 1px;
  transform: rotate(-5deg); background: rgba(255, 253, 248, 0.82);
}
.brand-name { font-size: 20px; letter-spacing: 5px; color: var(--zhu); font-weight: 700; }
.brand-wordmark-row { display: flex; align-items: center; gap: 8px; }
.brand-wordmark { width: 100px; height: auto; display: block; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-top: 2px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.cichip-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 999px;
  background: #f3e7df; color: var(--zhu-dark);
  font-size: 10px; text-decoration: none; white-space: nowrap;
}
.cichip-pill i { width: 6px; height: 6px; background: var(--zhu); border-radius: 50%; }
.user-chip {
  border: 1px solid var(--line); background: var(--paper-2); color: var(--ink);
  border-radius: 999px; padding: 5px 10px; font-size: 11px;
}

.view { padding: 18px 18px 10px; }
.page-head { padding: 8px 2px 4px; }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: 4px; }
.page-title { margin: 6px 0 4px; font-size: 26px; line-height: 1.3; letter-spacing: 2px; font-weight: 700; }
.page-sub { color: var(--muted); font-size: 12px; }
.zhu { color: var(--zhu); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 10px; }
.bold { font-weight: 700; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.flex1 { flex: 1; min-width: 0; }
.right { text-align: right; }
.center { text-align: center; }

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 17px;
  margin-top: 14px;
  box-shadow: var(--shadow);
}
.card-flat { box-shadow: none; background: #fbf8f0; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.card-title::before { content: ""; width: 4px; height: 15px; border-radius: 3px; background: var(--zhu); display: inline-block; margin-right: 8px; vertical-align: -2px; }
.card-title > span:first-child { flex: 1; }
.card-title .no-line::before { display: none; }
.card-sub { color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.7; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

.hero {
  padding: 18px 18px 16px; border-radius: 18px; margin-top: 4px;
  background:
    radial-gradient(circle at 92% 0%, rgba(216, 193, 138, 0.16), transparent 42%),
    #33473C;
  color: #F7F4EC;
  border: 1px solid rgba(247, 244, 236, 0.14);
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 23px; margin: 0 0 6px; letter-spacing: 2px; line-height: 1.35; color: #F7F4EC; }
.hero p { margin: 0; font-size: 12px; color: #D8E0D9; line-height: 1.8; }
.hero .honor { margin-top: 12px; font-size: 10px; color: #D8C18A; letter-spacing: 1px; }
.hero .seal { border-color: #D8C18A; color: #D8C18A; background: transparent; }

.tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  background: #f3e7df; color: #6f6353; font-size: 10px; line-height: 1.7;
  white-space: nowrap;
}
.tag.zhu { background: #f3e7df; color: var(--zhu); }
.tag.ok { background: #e8f2e9; color: var(--ok); }
.tag.warn { background: #fbefdc; color: var(--warn); }
.tag.danger { background: #fbe8e5; color: var(--danger); }
.tag.info { background: #e9eef4; color: #3d5a76; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 10px 14px; min-height: 40px;
  background: var(--zhu); color: #fff; text-decoration: none;
  font-size: 13px; letter-spacing: 1px;
}
.btn:hover { filter: brightness(1.03); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 11px; min-height: 34px; font-size: 12px; }
.btn.xs { padding: 5px 9px; min-height: 28px; font-size: 11px; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.soft { background: #f3eadc; color: var(--zhu-dark); border-color: #e6dcc9; }
.btn.danger { background: #fff6f4; color: var(--danger); border-color: #eccdc5; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.quick {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 12px; display: flex; gap: 10px; align-items: center;
  text-decoration: none; color: var(--ink);
}
.quick-icon {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  background: #f3eadc; color: var(--zhu); display: grid; place-items: center;
  font-size: 16px;
}
.quick b { display: block; font-size: 13px; }
.quick span { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }

.form { display: grid; gap: 12px; }
.field label { display: block; font-size: 12px; color: #6f6353; margin-bottom: 5px; }
.field .req { color: var(--zhu); }
.input, .textarea, select.input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  background: #fbf8f0; padding: 11px 12px; color: var(--ink);
  outline: none; min-height: 44px;
}
.textarea { min-height: 86px; resize: vertical; }
.input:focus, .textarea:focus { border-color: #c99383; box-shadow: 0 0 0 3px rgba(163, 45, 45, .06); }
.field-hint { color: var(--muted); font-size: 10px; line-height: 1.6; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .form-row { grid-template-columns: 1fr; } }

.seg { display: flex; background: #f2e9db; border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; color: #7b6c58; border-radius: 8px; padding: 8px 10px; flex: 1; }
.seg button.active { background: var(--paper-2); color: var(--zhu); font-weight: 700; box-shadow: 0 2px 8px rgba(86, 63, 32, .08); }

.auth-shell { padding-top: 14px; }
.auth-brand { text-align: center; padding: 18px 0 8px; }
.auth-brand .seal { margin: 0 auto 10px; width: 58px; height: 58px; font-size: 18px; }
.auth-brand h1 { margin: 0; font-size: 28px; letter-spacing: 7px; color: var(--zhu); }
.auth-wordmark { width: 260px; max-width: 76vw; height: auto; display: block; margin: 0 auto; }
.auth-brand p { margin: 6px 0 0; color: var(--muted); font-size: 11px; letter-spacing: 2px; }
.auth-note { text-align: center; color: var(--muted); font-size: 10px; line-height: 1.7; margin-top: 12px; }
.auth-links { text-align: center; font-size: 12px; margin-top: 12px; }

.list { margin-top: 4px; }
.list-item { padding: 13px 0; border-bottom: 1px dashed #eee4d2; text-decoration: none; color: var(--ink); display: block; }
.list-item:last-child { border-bottom: 0; }
.list-title { font-size: 14px; font-weight: 700; }
.list-meta { color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.6; }
.list-arrow { color: var(--zhu); font-size: 18px; }

.announce { border-color: #e3c3ba; background: #fff8f3; }
.announce-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; background: var(--zhu); color: #fff; display: grid; place-items: center; }
.announce-title { font-size: 14px; font-weight: 700; }
.announce-body { font-size: 11px; color: #6f6353; margin-top: 3px; line-height: 1.6; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { text-align: center; padding: 8px 4px; }
.stat b { display: block; font-size: 20px; color: var(--zhu); }
.stat span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }

.project-card .title { font-size: 16px; font-weight: 700; margin: 9px 0 4px; line-height: 1.45; }
.project-card .desc { color: var(--muted); font-size: 11px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.progress { height: 7px; background: #eee3d0; border-radius: 5px; overflow: hidden; margin-top: 12px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--zhu), #c46a4a); border-radius: 5px; }
.ledger-row { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px dashed #eee4d2; align-items: flex-start; }
.ledger-row:last-child { border-bottom: 0; }
.ledger-seq { width: 58px; flex: 0 0 58px; color: var(--muted); font-size: 10px; }
.cert-mono { font-family: ui-monospace, Menlo, monospace; font-size: 10px; color: #6f6353; word-break: break-all; }
.amount { color: var(--zhu); font-weight: 700; white-space: nowrap; }

.notice {
  padding: 11px 13px; border-radius: 10px; background: #fbf4e9;
  border: 1px solid #eadcc4; color: #6f5e47; font-size: 11px; line-height: 1.75;
}
.notice.red { background: #fbf8f0; border-color: #e6dcc9; color: var(--zhu-dark); }
.notice.dark { background: #332b26; border-color: #4a3c32; color: #f0e2c8; }
.notice a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.empty { text-align: center; padding: 34px 12px; color: var(--muted); }
.empty .ring { width: 56px; height: 56px; border: 1px solid #d8cbb4; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; color: #a3906b; font-size: 22px; }
.loading { text-align: center; color: var(--muted); padding: 44px 10px; font-size: 12px; }

.tabbar {
  position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px; background: rgba(255, 253, 248, .97);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 760px) { .tabbar { bottom: 24px; border-radius: 0 0 22px 22px; } }
.tabbar a { text-decoration: none; color: #8a7f6b; font-size: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 9px; }
.tabbar a.active { color: var(--zhu); font-weight: 700; }
.tabbar b { font-size: 18px; line-height: 1.1; font-weight: 500; }
.footer-note { color: var(--muted); font-size: 10px; text-align: center; line-height: 1.8; padding: 30px 8px 12px; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(12px);
  background: rgba(44, 44, 42, .94); color: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: 12px; opacity: 0; pointer-events: none; transition: .2s; z-index: 99;
  max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #8f2b2b; }

.modal-mask { position: fixed; inset: 0; background: rgba(30, 24, 20, .45); display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal { width: 100%; max-width: 360px; background: var(--paper-2); border-radius: 16px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.modal h3 { margin: 0 0 8px; font-size: 17px; }
.modal p { margin: 0 0 14px; color: #5b5144; font-size: 12px; white-space: pre-wrap; line-height: 1.7; }
.modal .btn-row { justify-content: flex-end; }

.cert-page { background: var(--paper-2); border: 1px solid #d9c7a5; border-radius: 14px; padding: 22px 18px; margin-top: 12px; }
.cert-page h2 { text-align: center; color: var(--zhu-dark); font-size: 20px; letter-spacing: 2px; margin: 4px 0; }
.cert-page .en { text-align: center; color: var(--muted); font-size: 8px; letter-spacing: 1px; margin-bottom: 16px; }
.cert-page .line { margin-top: 9px; font-size: 12px; line-height: 1.7; }
.cert-page .sign { text-align: right; margin-top: 20px; font-size: 12px; line-height: 1.9; color: #4a4034; }
.cert-page .disc { margin-top: 16px; padding-top: 10px; border-top: 1px dashed #e5dccb; color: var(--muted); font-size: 9px; line-height: 1.7; }

.h5-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; background: var(--zhu); color: #fff; font-size: 9px; letter-spacing: 1px; }

.consent-box { margin: 14px 0 16px; padding: 12px 13px; border: 1px solid var(--line); background: #fbf8f0; border-radius: 10px; }
.consent-line { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; line-height: 1.7; color: #6f5e47; margin: 6px 0; }
.consent-line input { margin-top: 4px; accent-color: var(--zhu); flex: 0 0 auto; }
.consent-line a { color: var(--zhu); text-decoration: underline; }
.auth-note a { color: var(--zhu); }
