/* ===== 街坊站 设计系统（响应式：手机优先，PC 居中栏） ===== */
:root {
  --bg: #ffe9dc;
  --card: #ffffff;
  --ink: #282828;
  --ink-2: #6c5f57;
  --green: #127820;
  --teal: #008c95;
  --brown: #6c5f57;
  --red: #ff5340;
  --orange-a: #ff6f00;
  --orange-b: #ffa25b;
  --radius: 16px;
  --shadow: 0 2px 8px rgba(108, 95, 87, .12);
  --footer-h: 70px;
  --maxw: 560px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* PC 端居中栏布局 */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: calc(var(--footer-h) + 16px);
}
@media (min-width: 600px) {
  body { background: #f6e3d3; }
  .page { box-shadow: 0 0 24px rgba(108, 95, 87, .15); }
}

img { max-width: 100%; }

/* ===== 顶栏 ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  box-shadow: 0 1px 4px rgba(108, 95, 87, .1);
}
.header-in {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
}
.header .logo { height: 32px; }
.header .back { width: 28px; height: 28px; cursor: pointer; font-size: 22px; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; }
.header .title { font-size: 1.125rem; font-weight: 700; }
.header .spacer { width: 28px; }

/* ===== 底部导航 ===== */
.footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: #fff; box-shadow: 0 -5px 8px 3px rgba(238, 238, 238, .25);
}
.footer-in {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; height: var(--footer-h);
}
.footer .item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; cursor: pointer; color: var(--ink-2); font-size: .72rem;
  text-decoration: none; position: relative;
}
.footer .item .ico { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.footer .item.active { color: var(--teal); font-weight: 700; }
.footer .dot {
  position: absolute; top: 8px; right: calc(50% - 18px);
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
}

/* ===== 通用卡片/按钮 ===== */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn {
  display: inline-block; border: none; cursor: pointer; border-radius: 8px;
  padding: 10px 22px; color: #fff; font-size: 1rem; font-weight: 700;
  background: var(--green); text-align: center; text-decoration: none;
}
.btn.teal { background: var(--teal); }
.btn.brown { background: var(--brown); }
.btn.red { background: var(--red); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #ddd; }
.empty { text-align: center; color: var(--ink-2); padding: 40px 0; }

/* ===== 入口页 ===== */
.entry { display: flex; flex-direction: column; align-items: center; padding-top: 18vh; }
.entry .logo-box { text-align: center; margin-bottom: 40px; }
.entry .logo-mark { font-size: 2.6rem; font-weight: 900; letter-spacing: .12em; color: var(--brown); }
.entry .logo-mark b { color: var(--red); }
.entry .logo-sub { margin-top: 6px; color: var(--ink-2); letter-spacing: .3em; }
.entry .btns { display: flex; gap: 18px; }
.entry .big-btn {
  width: 128px; height: 128px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.15rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow);
}
.entry .big-btn.teal { background: var(--teal); }
.entry .big-btn.brown { background: var(--brown); }
.entry-links { margin-top: 22px; font-size: .85rem; }
.entry-links a { color: var(--ink-2); }

/* ===== 登录页 ===== */
.login-card { margin: 8vh 18px 0; padding: 0 0 22px; overflow: hidden; }
.login-head { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid #eee; }
.login-head .brand { font-weight: 900; color: var(--brown); }
.login-head .brand b { color: var(--red); }
.login-head .t { font-size: 1.2rem; }
.login-body { padding: 22px 16px 0; }
.form-input {
  width: 100%; border: none; border-bottom: 1px solid #ddd; padding: 12px 6px; font-size: 1.05rem;
  background: transparent; outline: none;
}
.form-input:focus { border-bottom-color: var(--teal); }
.bday-tip { margin: 18px 0 10px; color: var(--ink); }
.bday-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bday-opt {
  background: #fff; border: 1px solid #e5ded9; border-radius: 10px; padding: 14px 0; text-align: center;
  font-size: 1.05rem; cursor: pointer; box-shadow: 0 1px 4px rgba(108,95,87,.08);
}
.bday-opt.active { border-color: var(--teal); color: var(--teal); font-weight: 700; box-shadow: 0 0 0 2px rgba(0,140,149,.2); }
.login-actions { margin-top: 22px; }
.form-err { color: var(--red); margin-top: 12px; min-height: 1.2em; font-size: .92rem; }

/* ===== 首页 ===== */
.banner-slider { position: relative; overflow: hidden; background: #000; }
.banner-track { display: flex; transition: transform .4s ease; }
.banner-slide { min-width: 100%; aspect-ratio: 16/8; }
.banner-slide img, .banner-slide iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.banner-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.banner-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); }
.banner-dots i.on { background: #fff; }

.profile-card { margin: 12px 14px 8px; padding: 12px; display: flex; align-items: center; justify-content: space-between; }
.profile-left { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.avatar-wrap { position: relative; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #eee; }
.avatar-badge {
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #4a90d9, #357abd); color: #fff; font-size: .62rem;
  padding: 1px 8px; border-radius: 10px; white-space: nowrap;
}
.profile-name { font-weight: 700; font-size: 1.05rem; }
.profile-score { display: flex; align-items: center; gap: 5px; color: var(--orange-a); font-weight: 700; margin-top: 3px; }
.profile-remark { font-size: .75rem; color: var(--ink-2); margin-top: 2px; }
.profile-signin { cursor: pointer; text-align: center; font-size: .72rem; color: var(--ink-2); }
.profile-signin .ico { font-size: 30px; }

.grid-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 14px 0; }
.grid-row.single { grid-template-columns: 1fr; }
.grid-card { padding: 14px 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.grid-card .gico { font-size: 26px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; }
.grid-card .gt { font-weight: 700; }
.grid-card .gs { font-size: .75rem; color: var(--ink-2); margin-top: 2px; }
.grid-card .arrow { margin-left: auto; color: var(--ink-2); font-size: 1.2rem; }
.grid-card.primary { background: linear-gradient(135deg, var(--teal), #00a7b1); color: #fff; }
.grid-card.primary .gs { color: rgba(255,255,255,.8); }
.grid-card.primary .arrow { color: #fff; }
.grid-card.hero {
  flex-direction: column; justify-content: center; text-align: center;
  padding: 26px 16px 22px; gap: 8px; min-height: 176px;
}
.grid-card.hero .gico { width: 76px; height: 76px; }
.grid-card.hero .gico img { width: 76px; height: 76px; display: block; }
.grid-card.hero .gt { font-size: 1.28rem; letter-spacing: .06em; }
.grid-card.hero .gs { font-size: .85rem; }
.grid-card.hero .arrow { display: none; }

/* ===== 签到卡 ===== */
.signin-card {
  margin: 12px 14px 6px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(135deg, var(--orange-a), var(--orange-b));
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; box-shadow: 0 2px 8px rgba(255, 111, 0, .3); color: #fff;
}
.signin-card .l { display: flex; align-items: center; gap: 10px; }
.signin-card .ico { font-size: 28px; }
.signin-card .t { font-weight: 700; }
.signin-card .s { font-size: .78rem; opacity: .9; }
.signin-card .r { font-weight: 900; font-size: 1.1rem; }
.signin-card.done { opacity: .75; cursor: default; }

/* ===== 活动/消息卡片 ===== */
.list { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.act-card { padding: 16px; }
.act-title { font-size: 1.06rem; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.act-meta { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: .88rem; margin-bottom: 10px; }
.act-desc { font-size: .92rem; line-height: 1.7; color: #444; margin-bottom: 10px; }
.act-desc img { border-radius: 8px; }
.act-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tag { font-size: .72rem; padding: 2px 8px; border-radius: 10px; background: #f3ece7; color: var(--ink-2); }
.tag.red { background: #ffe3df; color: var(--red); }
.tag.green { background: #e2f3e4; color: var(--green); }
.act-status { font-size: .9rem; font-weight: 700; margin-bottom: 8px; }
.act-status.success { color: var(--green); }
.act-status.full { color: var(--red); }
.act-deadline { font-size: .78rem; color: var(--ink-2); margin-top: 10px; }

.msg-card { padding: 14px 16px; cursor: pointer; position: relative; }
.msg-card .area { font-size: .78rem; color: var(--ink-2); }
.msg-card .date { font-size: .78rem; color: var(--ink-2); }
.msg-card .mt { font-weight: 700; margin: 6px 0; }
.msg-card .mc { font-size: .9rem; color: #444; line-height: 1.7; display: none; margin-top: 8px; }
.msg-card.open .mc { display: block; }
.msg-card .unread-dot { position: absolute; top: 14px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.msg-card.read .unread-dot { display: none; }

/* ===== 礼品 ===== */
.gift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 14px; }
.gift-card { overflow: hidden; cursor: pointer; }
.gift-card .ph { aspect-ratio: 1; background: #f3ece7; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.gift-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.gift-card .bd { padding: 10px 12px; }
.gift-card .gt { font-weight: 700; font-size: .95rem; }
.gift-card .gk { font-size: .75rem; color: var(--ink-2); margin-top: 3px; }
.gift-card .gp { color: var(--orange-a); font-weight: 700; margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* ===== 会员证 ===== */
.qr-wrap { padding: 18px 16px; display: flex; flex-direction: column; align-items: center; }
.qr-card { padding: 24px 16px; text-align: center; width: 100%; max-width: 380px; }
.qr-card .avatar { width: 72px; height: 72px; }
.qr-name { font-size: 1.2rem; font-weight: 700; margin-top: 10px; }
.qr-code-line { color: var(--ink-2); font-size: .85rem; margin-top: 4px; }
.qr-area { color: var(--teal); font-weight: 700; margin-top: 4px; }
.qr-box { margin: 16px auto 8px; width: 220px; height: 220px; }
.qr-box img { width: 100%; height: 100%; }
body.in-app .qr-box { width: 260px; height: 260px; }
.qr-brand { font-size: .78rem; color: var(--ink-2); }

/* ===== 义工 ===== */
.vol-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px 14px; }
.vol-stat { padding: 14px 8px; text-align: center; }
.vol-stat .i { font-size: 24px; }
.vol-stat .l { font-size: .75rem; color: var(--ink-2); margin-top: 4px; }
.vol-stat .v { font-weight: 900; margin-top: 4px; }
.vol-stat .v b { font-size: 1.3rem; }
.vol-month { margin: 0 14px 12px; overflow: hidden; }
.vol-month-h { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #f0e9e4; font-weight: 700; }
.vol-table { width: 100%; font-size: .82rem; }
.vol-table .row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.2fr .8fr; padding: 10px 16px; border-bottom: 1px solid #f7f2ee; }
.vol-table .row.head { color: var(--ink-2); font-size: .75rem; }

/* ===== 个人资料 ===== */
.acct-card { margin: 12px 14px 8px; padding: 16px; display: flex; align-items: center; gap: 12px; }
.acct-name { font-weight: 700; font-size: 1.1rem; }
.acct-code { font-size: .78rem; color: var(--ink-2); margin-top: 2px; }
.acct-stats { margin-left: auto; display: flex; gap: 18px; }
.acct-stat { text-align: center; }
.acct-stat .l { font-size: .72rem; color: var(--ink-2); }
.acct-stat .v { font-weight: 900; font-size: 1.15rem; }
.section { margin: 10px 14px; overflow: hidden; }
.section-title { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid #f0e9e4; }
.row { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid #f7f2ee; font-size: .95rem; }
.row:last-child { border-bottom: none; }
.row .label { color: var(--ink-2); }
.row .value { margin-left: auto; }
.row .arrow { color: var(--ink-2); }
.record-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px; }
.record-btn { border: 1px solid #eee3db; border-radius: 12px; padding: 14px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.logout-wrap { margin: 20px 14px; }
.logout-btn { background: var(--red); color: #fff; text-align: center; padding: 13px; border-radius: 12px; font-weight: 700; cursor: pointer; }

/* ===== 弹窗/提示 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(40, 30, 25, .45); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 22px 20px; width: 100%; max-width: 400px; text-align: center; }
.modal .mt { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.modal .mb { color: #555; line-height: 1.6; margin-bottom: 16px; }
.modal .mbtns { display: flex; gap: 10px; justify-content: center; }

.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%);
  background: rgba(40, 40, 40, .9); color: #fff; padding: 10px 18px; border-radius: 20px;
  font-size: .9rem; z-index: 200; display: none;
}
.toast.show { display: block; }

/* ===== 档主储分（PDA 4" 屏：大字 + 实体数字键） ===== */
.stall-page { padding-bottom: 24px; }
.stall-who { font-size: .85rem; color: var(--teal); cursor: pointer; }
.stall-box { margin: 14px; padding: 18px 16px 20px; }
.stall-rate { color: var(--ink-2); margin-bottom: 10px; }
.stall-steps { background: #fff4ea; color: var(--ink); font-weight: 700; padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; line-height: 1.4; }
.stall-lab { display: block; color: var(--ink-2); font-size: .95rem; margin: 12px 0 4px; }
.stall-num { font-size: 2rem; font-weight: 700; letter-spacing: .06em; text-align: center; min-height: 52px; }
.stall-num:focus { outline: 3px solid var(--green); background: #f4fff6; }
.stall-hint { font-size: .9rem; color: var(--ink-2); margin-top: 6px; min-height: 1.3em; }
.stall-hint.bad { color: var(--red); }
.stall-preview { margin: 16px 0 8px; font-size: 1.15rem; }
.stall-preview b { color: var(--orange-a); font-size: 1.6rem; }
.stall-go { width: 100%; padding: 18px; font-size: 1.3rem; margin-top: 8px; }
.stall-login-tip { margin-top: 14px; font-size: .8rem; color: var(--ink-2); line-height: 1.5; text-align: center; }
.stall-recent { margin: 0 14px 20px; overflow: hidden; }
.stall-recent-h { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid #f0e9e4; }
.stall-row { padding: 10px 16px; border-bottom: 1px solid #f7f2ee; font-size: .9rem; display: flex; justify-content: space-between; gap: 8px; }
.stall-row:last-child { border-bottom: none; }
