:root {
  --bg: #F7F4EC;
  --card: #FFFFFF;
  --ink: #1B2B22;
  --ink2: #5E6C63;
  --ink3: #8B978F;
  --line: rgba(27, 43, 34, .10);
  --green: #1E6B4C;
  --green-2: #2C8A62;
  --green-soft: #E9F2EC;
  --orange: #C9671F;
  --orange-soft: #FBEFE3;
  --wheat: #EFE3C9;
  --r: 14px;
  --sh: 0 1px 2px rgba(27, 43, 34, .05), 0 6px 18px rgba(27, 43, 34, .05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
input, select, textarea, button { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
.hide { display: none !important; }
.muted { color: var(--ink3); font-size: 12.5px; }

.app { max-width: 560px; margin: 0 auto; padding-bottom: 84px; }

/* ---------- header ---------- */
.hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
}
.hd-l { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--green); color: #F4F9F5;
  display: grid; place-items: center; font-size: 19px; font-weight: 600;
}
.bn { font-size: 16px; font-weight: 600; letter-spacing: .5px; }
.bs { font-size: 11px; color: var(--ink3); letter-spacing: .3px; }
.hd-r {
  font-size: 13px; color: var(--green);
  border: 1px solid var(--line); background: #fff;
  padding: 7px 12px; border-radius: 99px;
}

/* ---------- hero ---------- */
.hero { padding: 8px 16px 0; }
.hero h1 {
  font-size: 27px; line-height: 1.28; letter-spacing: -.5px;
  margin-bottom: 8px;
}
.hero-sub { margin: 0 0 16px; font-size: 13px; color: var(--ink2); }
.switch {
  display: grid; grid-template-columns: 1fr 1fr;
  background: #EBE7DB; border-radius: 12px; padding: 4px; gap: 4px;
}
.switch button {
  padding: 11px 4px; border-radius: 9px;
  font-size: 14.5px; font-weight: 500; color: var(--ink2);
  transition: background .18s, color .18s;
}
.switch button.on {
  background: var(--green); color: #fff;
  box-shadow: 0 2px 6px rgba(30, 107, 76, .25);
}
.hero-stats {
  display: flex; gap: 18px; margin-top: 14px;
  font-size: 12px; color: var(--ink3);
}
.hero-stats b { display: block; font-size: 19px; color: var(--ink); font-weight: 600; }

/* ---------- 首页公告 ---------- */
.notice {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 14px 16px 0; padding: 11px 13px;
  background: var(--green-soft); border: 1px solid rgba(30, 107, 76, .14);
  border-radius: 12px; font-size: 13px; line-height: 1.6; color: #24543F;
}
.notice-tag {
  flex: none; font-size: 11px; font-weight: 600; letter-spacing: .3px;
  color: #fff; background: var(--green); border-radius: 5px;
  padding: 1px 6px; margin-top: 2px;
}
.notice-tx { flex: 1; word-break: break-word; }

/* ---------- filters ---------- */
.filters { padding: 16px 16px 0; }
.search input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  font-size: 14.5px; outline: none;
}
.search input:focus { border-color: var(--green-2); }
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 99px;
  background: #fff; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink2); white-space: nowrap;
}
.chip.on { background: var(--green-soft); border-color: rgba(30,107,76,.28); color: var(--green); font-weight: 500; }

/* ---------- list ---------- */
.list-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 18px 16px 10px; font-size: 14px; font-weight: 600;
}
.cards { padding: 0 16px; display: grid; gap: 12px; }
.card {
  background: #fff; border-radius: var(--r); padding: 15px 14px;
  border: 1px solid rgba(27, 43, 34, .09);
  box-shadow: 0 1px 2px rgba(27, 43, 34, .06), 0 10px 28px rgba(27, 43, 34, .09);
  position: relative; overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:active { transform: scale(.985); box-shadow: 0 1px 2px rgba(27,43,34,.05); }
/* 置顶/金牌卡：绿色描边 + 渐变底 */
.card.featured {
  border-color: rgba(30, 107, 76, .38);
  background: linear-gradient(135deg, #F2F9F4 0%, #FFFFFF 58%);
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-t { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.card-t .tag.top { margin-right: 5px; vertical-align: 2px; }
.card-sub { font-size: 12.5px; color: var(--ink2); margin-top: 3px; }
.card-price {
  font-size: 19px; font-weight: 700; color: var(--orange);
  white-space: nowrap; text-align: right; letter-spacing: -.3px;
}
.card-price small { display: block; font-size: 10.5px; color: var(--ink3); font-weight: 400; }
.card-meta {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px;
}
.tag {
  font-size: 11.5px; padding: 3px 8px; border-radius: 6px;
  background: #F3F1E9; color: var(--ink2);
}
.tag.g { background: var(--green-soft); color: var(--green); }
.tag.o { background: var(--orange-soft); color: var(--orange); }
.tag.top { background: var(--green); color: #fff; font-weight: 500; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 11.5px; color: var(--ink3);
}
.lead-badge { color: var(--green); font-weight: 500; }

.empty { padding: 44px 16px; text-align: center; }
.empty-i { font-size: 15px; font-weight: 600; color: var(--ink2); }
.empty-t { font-size: 12.5px; color: var(--ink3); margin-top: 6px; }
.more {
  display: block; margin: 16px auto 0; padding: 10px 22px;
  border-radius: 99px; border: 1px solid var(--line); background: #fff;
  font-size: 13.5px; color: var(--ink2);
}

/* ---------- cases ---------- */
.cases { padding: 30px 16px 0; }
.cases h3 { font-size: 15px; margin-bottom: 10px; }
.case {
  background: #fff; border-radius: 12px; padding: 12px 14px;
  border: 1px solid rgba(27,43,34,.05); margin-bottom: 8px;
}
.case-top { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 500; }
.case-sub { font-size: 12px; color: var(--ink3); margin-top: 4px; }

.trust { padding: 30px 16px 20px; }
.trust-row {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; color: var(--ink2); padding: 7px 0;
}
.trust-row b {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  font-size: 11px; display: grid; place-items: center; margin-top: 1px;
}

/* ---------- tabbar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: 560px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.1fr 1fr;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.tabbar button {
  padding: 8px 0; font-size: 11.5px; color: var(--ink3);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.tabbar button.on { color: var(--green); font-weight: 500; }
.tabbar .pub span {
  display: block; width: 42px; height: 30px; border-radius: 10px;
  background: var(--green); color: #fff; font-size: 19px; line-height: 28px;
}
.tabbar .pub { color: var(--green); }
.ico-home, .ico-me {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.6px solid currentColor; display: block;
}
.ico-me { border-radius: 50%; width: 15px; height: 15px; }

/* ---------- detail ---------- */
.back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 14px 16px 6px; font-size: 13.5px; color: var(--ink2);
}
.d-wrap { padding: 4px 16px 20px; }
.d-card { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: var(--sh); }
.d-kind { font-size: 11.5px; color: var(--green); font-weight: 500; letter-spacing: .4px; }
.d-title { font-size: 21px; margin: 6px 0 4px; letter-spacing: -.3px; }
.d-price { font-size: 24px; color: var(--orange); font-weight: 600; margin: 10px 0 2px; }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.d-item .k { font-size: 11.5px; color: var(--ink3); }
.d-item .v { font-size: 14px; margin-top: 2px; }
.d-note {
  margin-top: 16px; padding: 12px; border-radius: 10px;
  background: #FAF8F1; font-size: 13.5px; color: var(--ink2); line-height: 1.65;
}
.d-pub {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  padding: 12px; border-radius: 10px; background: var(--green-soft);
}
.d-pub .av {
  width: 34px; height: 34px; border-radius: 50%; background: var(--green);
  color: #fff; display: grid; place-items: center; font-size: 14px;
}
.d-pub .t1 { font-size: 13.5px; font-weight: 500; }
.d-pub .t2 { font-size: 11.5px; color: var(--ink2); }
.d-actions {
  position: sticky; bottom: 84px; margin: 16px 16px 0;
  display: grid; gap: 8px;
}
.btn {
  display: block; width: 100%; padding: 15px; border-radius: 13px;
  font-size: 15.5px; font-weight: 500; text-align: center;
}
.btn-main { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(30,107,76,.22); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink2); font-size: 13.5px; padding: 12px; }
.btn:disabled { opacity: .55; }

/* ---------- form ---------- */
.f-wrap { padding: 4px 16px 24px; }
.f-head { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.f-sub { font-size: 12.5px; color: var(--ink3); margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; }
.field label b { color: var(--orange); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 13px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff;
  font-size: 15px; outline: none; appearance: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green-2); }
.field textarea { min-height: 78px; resize: vertical; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1.2fr 1fr .9fr; gap: 8px; }
.hint { font-size: 11.5px; color: var(--ink3); margin-top: 6px; line-height: 1.5; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 10px; border-radius: 10px; font-size: 13.5px;
  background: #fff; border: 1px solid var(--line); color: var(--ink2);
}
.seg button.on { background: var(--green-soft); border-color: rgba(30,107,76,.3); color: var(--green); font-weight: 500; }
.f-note {
  background: var(--orange-soft); color: #8A4A15; border-radius: 10px;
  padding: 10px 12px; font-size: 12px; line-height: 1.6; margin-bottom: 16px;
}

/* ---------- mine ---------- */
.m-card { background: #fff; border-radius: var(--r); padding: 14px; margin-bottom: 10px; box-shadow: var(--sh); }
.m-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.m-code { font-size: 12px; color: var(--ink3); letter-spacing: .6px; }
.st { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.st-pending { background: #FDF3E3; color: #9A6714; }
.st-online { background: var(--green-soft); color: var(--green); }
.st-rejected { background: #FBEAEA; color: #A33; }
.st-closed { background: #F0EFEA; color: var(--ink3); }
.m-reason { font-size: 12px; color: #A33; margin-top: 8px; }
.m-actions { display: flex; gap: 8px; margin-top: 10px; }
.m-actions button {
  flex: 1; padding: 9px; border-radius: 9px; font-size: 12.5px;
  border: 1px solid var(--line); color: var(--ink2); background: #fff;
}
.mine-empty { text-align: center; padding: 40px 10px; color: var(--ink3); font-size: 13px; }
.lookup { background: #fff; border-radius: var(--r); padding: 16px; margin-top: 16px; box-shadow: var(--sh); }
.lookup h4 { font-size: 13.5px; margin-bottom: 10px; }

/* ---------- sheet ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(20, 30, 24, .42);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sheet.show { opacity: 1; pointer-events: auto; }
.sheet-bd {
  width: 100%; max-width: 560px; background: var(--bg);
  border-radius: 18px 18px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(16px); transition: transform .22s;
  max-height: 88vh; overflow-y: auto;
}
.sheet.show .sheet-bd { transform: translateY(0); }
.sheet h3 { font-size: 17px; margin-bottom: 4px; }
.sheet .s-sub { font-size: 12.5px; color: var(--ink3); margin-bottom: 16px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 8px);
  background: #1B2B22; color: #fff; font-size: 13px;
  padding: 10px 16px; border-radius: 10px; z-index: 200;
  opacity: 0; pointer-events: none; transition: all .22s; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: #1E6B4C; }
.toast.err { background: #A03434; }

@media (min-width: 620px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; background: var(--bg); }
  .tabbar { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .d-actions { position: static; }
}
