/* 邻里互助帮 NeighborHelp */
:root {
  --bg: #f2f5f9;
  --card: #ffffff;
  --primary: #1a73e8;
  --primary-dark: #1558b0;
  --primary-soft: #e8f0fe;
  --accent: #ff8c1a;
  --accent-soft: #fff3e6;
  --text: #1f2933;
  --muted: #6b7a8d;
  --danger: #d93025;
  --danger-soft: #fdecea;
  --ok: #1e8e3e;
  --ok-soft: #e7f6ec;
  --radius: 14px;
  --shadow: 0 2px 8px rgba(20, 40, 80, .08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; padding: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 16px; line-height: 1.55;
}
body.large { font-size: 20px; }
body.large .btn, body.large input, body.large select, body.large textarea { font-size: 20px; }
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 130px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, var(--primary), #3b8bf0);
  color: #fff; box-shadow: 0 2px 8px rgba(26,115,232,.35);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
}
.topbar h1 { margin: 0; font-size: 20px; letter-spacing: .5px; }
.topbar .langbtn { background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.7); color: #fff; border-radius: 20px; padding: 5px 14px; font-size: 14px; }
.topbar .langbtn:active { background: rgba(255,255,255,.35); }

.view { padding: 14px 14px 0; }
.view h2 { margin: 4px 2px 12px; font-size: 20px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 15px 16px; margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.4; }
.card.clickable:active { transform: scale(.985); box-shadow: 0 1px 4px rgba(20,40,80,.1); }
.meta { color: var(--muted); font-size: 13px; margin: 5px 0; }
body.large .meta { font-size: 16px; }
.desc { margin-top: 8px; color: #3a4653; }

/* 类别标签：按类别配色 */
.tag {
  display: inline-block; border-radius: 20px; padding: 3px 11px;
  font-size: 13px; margin: 0 6px 4px 0; font-weight: 600;
}
.tag-grocery   { background: #e7f6ec; color: #1e8e3e; }
.tag-ride      { background: #e8f0fe; color: #1a73e8; }
.tag-school_ride { background: #fff3e6; color: #c26a00; }
.tag-repair    { background: #f0eafc; color: #6a3fd4; }
.tag-companion { background: #fdeef4; color: #c2337f; }
.tag-other     { background: #eef1f4; color: #5b6b7c; }

/* 状态胶囊 */
.status-pill {
  display: inline-block; border-radius: 20px; padding: 3px 11px;
  font-size: 13px; font-weight: 700; margin: 0 6px 4px 0;
}
.status-open { background: var(--ok-soft); color: var(--ok); }
.status-claimed { background: var(--accent-soft); color: #c26a00; }
.status-completed { background: #eef1f4; color: var(--muted); }
.status-cancelled { background: var(--danger-soft); color: var(--danger); }
.fee { color: var(--danger); font-weight: 700; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; border: none; border-radius: 12px;
  padding: 13px 18px; font-size: 16px; font-weight: 600; cursor: pointer;
  background: var(--primary); color: #fff; width: 100%; margin-top: 10px;
  box-shadow: 0 2px 6px rgba(26,115,232,.28);
  transition: transform .1s ease, box-shadow .1s ease, background .15s ease;
}
.btn:active { background: var(--primary-dark); transform: scale(.985); }
.btn.secondary { background: #e9edf2; color: var(--text); box-shadow: none; }
.btn.secondary:active { background: #dde3ea; }
.btn.warn { background: var(--danger); box-shadow: 0 2px 6px rgba(217,48,37,.28); }
.btn.ok { background: var(--ok); box-shadow: 0 2px 6px rgba(30,142,62,.28); }
.btn.small { width: auto; padding: 8px 15px; font-size: 14px; margin: 4px 6px 0 0; box-shadow: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 表单 ---------- */
input, select, textarea {
  width: 100%; padding: 12px 14px; margin: 6px 0;
  border: 1.5px solid #d5dce4; border-radius: 12px; font-size: 16px; background: #fff;
  transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { min-height: 90px; resize: vertical; }
label { font-weight: 700; display: block; margin-top: 12px; font-size: 15px; }
.charcount { text-align: right; font-size: 12px; color: var(--muted); margin-top: -2px; }
.voice-row { display: flex; gap: 6px; align-items: flex-start; }
.voice-row textarea, .voice-row input { flex: 1; }
.voicebtn { width: auto; flex: none; padding: 12px 14px; margin: 6px 0; background: var(--accent); box-shadow: 0 2px 6px rgba(255,140,26,.3); }

/* ---------- 首页工具条：筛选 chips + 排序 ---------- */
.home-toolbar {
  position: sticky; top: 58px; z-index: 15;
  background: var(--bg); padding: 10px 0 8px; margin: 0 -14px; padding-left: 14px; padding-right: 14px;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px solid #d5dce4; background: #fff; color: var(--text);
  border-radius: 20px; padding: 7px 13px; font-size: 14px; cursor: pointer;
  transition: all .15s ease; white-space: nowrap;
}
.chip:active { transform: scale(.95); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.filter-row { display: flex; gap: 8px; margin-bottom: 4px; align-items: center; }
.filter-row input { margin: 0; flex: 1; }
.sortbtn {
  flex: none; border: 1.5px solid #d5dce4; background: #fff; border-radius: 12px;
  padding: 11px 12px; font-size: 14px; color: var(--muted); cursor: pointer;
}
.sortbtn:active { background: #eef1f4; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty .big { font-size: 52px; display: block; margin-bottom: 12px; }
.empty p { margin: 0 0 14px; font-size: 15px; }
.empty .btn { width: auto; padding: 11px 26px; }

/* ---------- 状态时间线 ---------- */
.timeline { display: flex; align-items: flex-start; margin: 14px 0 6px; }
.tstep { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--muted); }
.tstep .dot {
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 5px;
  background: #e3e9f0; color: #fff; font-size: 14px; line-height: 26px;
  position: relative; z-index: 1;
}
.tstep::before {
  content: ''; position: absolute; top: 13px; left: -50%; width: 100%;
  height: 2px; background: #e3e9f0;
}
.tstep:first-child::before { display: none; }
.tstep.done { color: var(--ok); font-weight: 700; }
.tstep.done .dot { background: var(--ok); }
.tstep.done::before { background: var(--ok); }
.tstep.now { color: var(--primary); font-weight: 700; }
.tstep.now .dot { background: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft); }

/* ---------- 评价 ---------- */
.stars { font-size: 38px; cursor: pointer; letter-spacing: 6px; text-align: center; margin: 8px 0; }
.stars span { color: #e0e4ea; transition: color .1s; }
.stars span.on { color: #ffb400; }
.rating-item { padding: 10px 0; }
.rating-item .who { font-weight: 700; font-size: 14px; }
.rating-item .stars-static { color: #ffb400; letter-spacing: 2px; }
.rating-item .msg { color: #3a4653; margin-top: 4px; font-size: 15px; }

/* ---------- 我的：统计 ---------- */
.stats { display: flex; gap: 10px; margin-bottom: 12px; }
.stat {
  flex: 1; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 6px; text-align: center;
}
.stat .num { font-size: 24px; font-weight: 800; color: var(--primary); }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px);
  background: rgba(31,41,51,.94); color: #fff; border-radius: 24px;
  padding: 11px 22px; font-size: 15px; z-index: 100; opacity: 0;
  pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  max-width: 86vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 底部导航 / 悬浮按钮 / 弹窗 ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: #fff; border-top: 1px solid #e3e9f0;
  display: flex; max-width: 640px; margin: 0 auto;
  box-shadow: 0 -2px 10px rgba(20,40,80,.06);
}
.bottomnav button {
  flex: 1; border: none; background: none; padding: 11px 0 13px;
  font-size: 14px; color: var(--muted); cursor: pointer;
  transition: color .15s ease;
}
.bottomnav button .ico { font-size: 23px; display: block; margin-bottom: 1px; }
.bottomnav button.active { color: var(--primary); font-weight: 700; }

.fab {
  position: fixed; right: 18px; bottom: 94px; z-index: 40;
  width: 60px; height: 60px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #e03325, #d93025); color: #fff; font-size: 28px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(217,48,37,.4);
  transition: transform .12s ease;
}
.fab:active { transform: scale(.92); }
.modal-bg {
  position: fixed; inset: 0; background: rgba(15,25,40,.55); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadein .18s ease;
}
.modal {
  background: #fff; border-radius: 18px; padding: 22px; width: 100%; max-width: 420px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  animation: popin .2s ease;
  max-height: 86vh; overflow-y: auto;
}
.modal h2, .modal h3 { margin-top: 0; }
@keyframes fadein { from { opacity: 0; } }
@keyframes popin { from { opacity: 0; transform: scale(.94) translateY(8px); } }
.hidden { display: none !important; }
.center { text-align: center; }
.err { color: var(--danger); margin: 8px 0; font-size: 14px; }
.okmsg { color: var(--ok); margin: 8px 0; }
.divider { border: none; border-top: 1px solid #eef1f4; margin: 14px 0; }
.privacy { font-size: 14px; color: var(--text); white-space: pre-line; }
body.large .privacy { font-size: 18px; }
a.tel { text-decoration: none; }
.contact-line { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 15px; }
.contact-line .who { color: var(--muted); font-size: 13px; }
.callbtn {
  display: inline-block; background: var(--ok-soft); color: var(--ok);
  border-radius: 20px; padding: 6px 14px; font-weight: 700; text-decoration: none; font-size: 14px;
}
.callbtn:active { background: #d3edda; }
.section-title { font-size: 15px; font-weight: 800; color: var(--muted); margin: 18px 2px 8px; text-transform: none; }

/* ---------- 首页 hero 品牌区 ---------- */
.hero {
  position: relative; overflow: hidden;
  margin: -14px -14px 6px; padding: 30px 20px 24px;
  background: linear-gradient(135deg, #0d5cc6 0%, #1a73e8 55%, #4a9bf5 100%);
  color: #fff; text-align: center;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 4px 16px rgba(26,115,232,.3);
}
.hero-deco { position: absolute; border-radius: 50%; background: rgba(255,255,255,.09); pointer-events: none; }
.hero-deco.d1 { width: 150px; height: 150px; top: -55px; right: -45px; }
.hero-deco.d2 { width: 90px; height: 90px; bottom: -30px; left: 6%; }
.hero-deco.d3 { width: 44px; height: 44px; top: 26px; left: 13%; }
.hero-badge { font-size: 46px; line-height: 1; }
.hero-title { font-size: 27px; font-weight: 800; letter-spacing: 2px; margin: 8px 0 4px; }
.hero-slogan { margin: 0 0 18px; font-size: 15px; opacity: .93; letter-spacing: 1px; }
.hero-stats { display: flex; gap: 10px; margin: 0 0 18px; }
.hstat { flex: 1; background: rgba(255,255,255,.17); border-radius: 14px; padding: 11px 4px; }
.hstat .num { font-size: 23px; font-weight: 800; }
.hstat .lbl { font-size: 12px; opacity: .88; margin-top: 3px; }
.btn.hero-cta {
  background: var(--accent); color: #fff; margin-top: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); font-size: 17px;
}
.btn.hero-cta:active { background: #e07a12; }
body.large .hero-title { font-size: 33px; }
body.large .hero-slogan { font-size: 18px; }
body.large .hstat .lbl { font-size: 15px; }

/* ---------- 分区标题 + 使用说明三步 ---------- */
.section-head {
  display: flex; align-items: center; gap: 9px;
  font-size: 17px; font-weight: 800; margin: 20px 2px 10px;
}
.section-head::before {
  content: ''; width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), #4a9bf5);
}
.how-steps { display: flex; gap: 10px; }
.hstep {
  flex: 1; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px 8px 13px; text-align: center;
}
.hstep .hicon {
  width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 50%;
  background: var(--primary-soft); font-size: 24px; line-height: 46px;
}
.hstep:nth-child(2) .hicon { background: var(--accent-soft); }
.hstep:nth-child(3) .hicon { background: var(--ok-soft); }
.hstep .ht { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.hstep .hd { font-size: 12px; color: var(--muted); line-height: 1.55; }
body.large .hstep .ht { font-size: 17px; }
body.large .hstep .hd { font-size: 15px; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin: 28px -14px -130px; padding: 24px 18px 140px;
  background: #22303f; color: #c8d3df; text-align: center;
}
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.footer-links button {
  background: none; border: none; color: #fff; font-size: 14px;
  padding: 9px 16px; cursor: pointer;
}
.footer-links button:active { opacity: .65; }
.footer-links button + button { border-left: 1px solid rgba(255,255,255,.22); }
.site-footer .rights { font-size: 12px; color: #93a1b3; line-height: 1.7; }
body.large .footer-links button { font-size: 17px; }
body.large .site-footer .rights { font-size: 15px; }
