/* 八里庄街道 · 昆玉包兑换平台 共享设计系统（与首页蓝色商务风一致） */
:root {
  --navy:#0E2A66; --ink:#1E2B4A; --sub:#6B7A99; --mut:#9AA7C0;
  --blue:#2F6BE6; --blue2:#3D7EFF; --deep:#1F5EDD; --cyan:#29B6E8; --peri:#6E8BFF;
  --bg:#F2F6FD; --tint:#E8F0FE; --line:#DCE6F7;
  --ok:#2FBF8F; --warn:#F5A623; --danger:#E5533C;
  --disp:'QingKe','STHupo','华文琥珀','Microsoft YaHei',sans-serif;
  --num:'Bahnschrift','DIN Alternate','Microsoft YaHei',sans-serif;
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { scroll-behavior:smooth; }
body { font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; background:#0B1530; display:flex; justify-content:center; }
button, input, select, textarea { font-family:inherit; }
a { text-decoration:none; color:inherit; }
.phone { width:390px; min-height:100vh; background:var(--bg); position:relative; overflow-x:hidden;
  box-shadow:0 0 60px rgba(0,0,0,.5); display:flex; flex-direction:column; }

/* 状态栏 */
.statusbar { height:44px; display:flex; align-items:center; justify-content:space-between;
  padding:0 22px; font-size:15px; font-weight:600; color:var(--navy); position:relative; z-index:3; flex:none; }
.statusbar .right { display:flex; gap:5px; align-items:center; }

/* 子页顶栏 */
.pagebar { height:48px; display:flex; align-items:center; gap:8px; padding:0 14px; flex:none; }
.pagebar .back { width:36px; height:36px; border-radius:50%; border:none; cursor:pointer; flex:none;
  background:#fff; box-shadow:0 3px 8px rgba(31,94,221,.14), inset 0 1px 0 #fff; color:var(--deep);
  font-size:0; display:flex; align-items:center; justify-content:center; }
.pagebar .back::after { content:""; width:11px; height:11px; box-sizing:border-box;
  border-left:2.8px solid currentColor; border-bottom:2.8px solid currentColor; border-radius:2.5px;
  transform:rotate(45deg); margin-left:7px; }
.pagebar .back:active { transform:scale(.92); }
.pagebar .ttl { flex:1; text-align:center; font-size:16px; font-weight:900; color:var(--ink); }
.pagebar .rt { flex:none; min-width:36px; text-align:right; font-size:12px; font-weight:700; color:var(--deep); background:none; border:none; cursor:pointer; }

/* 按钮 */
.btn-main { border:none; cursor:pointer; font-weight:800; font-size:14px; color:#fff; padding:12px 20px;
  border-radius:999px; background:linear-gradient(180deg,#4D8DFF,#1F5EDD);
  box-shadow:0 6px 14px rgba(31,94,221,.35), inset 0 1.5px 0 rgba(255,255,255,.45); transition:transform .15s; }
.btn-main:active { transform:scale(.96); }
.btn-main:disabled { opacity:.5; }
.btn-ghost { border:none; cursor:pointer; font-weight:700; font-size:13px; color:var(--deep); padding:10px 20px;
  border-radius:999px; background:var(--tint); box-shadow:inset 0 0 0 1px #C9DBFA; transition:transform .15s; }
.btn-ghost:active { transform:scale(.96); }
.sheet-actions { display:flex; gap:10px; }
.sheet-actions button { flex:1; border:none; cursor:pointer; padding:12px 0; border-radius:999px; font-size:14px; font-weight:800; }
.act-cancel { background:var(--tint); color:var(--sub); }
.act-ok { background:linear-gradient(180deg,#4D8DFF,#1F5EDD); color:#fff; box-shadow:0 6px 14px rgba(31,94,221,.35); }

/* 卡片/分区 */
.card { background:#fff; border-radius:18px; padding:14px 16px; box-shadow:0 6px 16px rgba(31,94,221,.1), inset 0 1px 0 #fff; }
.section { margin:16px 18px 0; }
.sec-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:11px; }
.sec-head .t { font-size:16px; font-weight:900; color:var(--ink); display:flex; align-items:center; gap:8px; }
.sec-head .t::before { content:""; width:5px; height:17px; border-radius:99px; background:linear-gradient(180deg,#4D8DFF,#1F5EDD); }
.sec-head .more { font-size:12px; color:#8FA3C8; font-weight:600; }

/* 礼品网格 */
.goods { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.good { background:#fff; border-radius:18px; padding:10px 12px 12px; cursor:pointer;
  box-shadow:0 6px 16px rgba(31,94,221,.1), inset 0 1px 0 #fff; transition:transform .2s, box-shadow .2s; }
.good:hover { transform:translateY(-3px); box-shadow:0 12px 24px rgba(31,94,221,.16); }
.good .thumb { height:93px; border-radius:12px; overflow:hidden; margin-bottom:9px; background:var(--tint); }
.good .thumb img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .4s; }
.good:hover .thumb img { transform:scale(1.05); }
.good .name { font-size:13px; font-weight:800; color:var(--ink); line-height:1.35; height:18px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.good .price-row { display:flex; align-items:center; justify-content:space-between; margin-top:8px; }
.good .pts { font-size:17px; font-weight:900; color:var(--blue); font-family:var(--num); }
.good .pts small { font-size:10px; font-weight:700; color:#8FA3C8; margin-left:2px; }
.good .buy { border:none; cursor:pointer; font-size:11px; font-weight:800; color:#fff; padding:6px 13px; border-radius:999px;
  background:linear-gradient(180deg,#4D8DFF,#1F5EDD); box-shadow:0 4px 8px rgba(31,94,221,.32), inset 0 1px 0 rgba(255,255,255,.4); }
.goods-empty { grid-column:1/-1; text-align:center; color:var(--mut); font-size:12px; padding:26px 0; }

/* 分类 chips */
.chips { display:flex; gap:8px; padding:0 18px; overflow-x:auto; scrollbar-width:none; }
.chips::-webkit-scrollbar { display:none; }
.chips button { flex:none; border:none; cursor:pointer; font-size:13px; font-weight:800; color:var(--sub);
  background:#fff; padding:8px 16px; border-radius:999px; box-shadow:0 3px 8px rgba(31,94,221,.08); transition:all .2s; }
.chips button.on { color:#fff; background:linear-gradient(180deg,#4D8DFF,#1F5EDD); box-shadow:0 5px 12px rgba(31,94,221,.32); }

/* 列表行 */
.row-item { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 2px; border-bottom:1px solid #EEF3FB; }
.row-item:last-child { border-bottom:none; }
.row-item .l { min-width:0; }
.row-item .l b { font-size:13px; color:var(--ink); display:block; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row-item .l i { font-size:11px; color:var(--mut); font-style:normal; }
.row-item .r { flex:none; font-family:var(--num); font-weight:900; font-size:15px; }
.r.out { color:var(--danger); } .r.in { color:var(--ok); }
.chip { font-size:10px; font-weight:700; border-radius:999px; padding:2px 8px; }
.chip.ok { color:#177A5B; background:#E2F7EF; }
.chip.blue { color:var(--deep); background:var(--tint); }
.chip.warn { color:#9A6A00; background:#FDF1DC; }
.chip.gray { color:var(--mut); background:#EEF2F9; }

/* 表单 */
.field { margin-bottom:14px; }
.field label { display:block; font-size:12px; font-weight:700; color:var(--sub); margin-bottom:6px; }
.field input, .field select, .field textarea { width:100%; border:1.5px solid var(--line); border-radius:12px; padding:11px 14px;
  font-size:14px; outline:none; color:var(--ink); background:#FAFCFF; transition:border-color .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color:var(--blue2); background:#fff; }
.field .with-btn { display:flex; gap:8px; }
.field .with-btn input { flex:1; }
.field .code-btn { flex:none; border:none; cursor:pointer; font-size:12px; font-weight:800; color:var(--deep);
  background:var(--tint); border-radius:12px; padding:0 14px; box-shadow:inset 0 0 0 1px #C9DBFA; }
.field .hint { font-size:11px; color:var(--mut); margin-top:5px; }

/* 成功/核销码 */
.okmark { width:64px; height:64px; margin:0 auto 12px; border-radius:50%;
  background:linear-gradient(150deg,#4FD0EE,#1F5EDD); display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 22px rgba(31,94,221,.35), inset 0 2px 0 rgba(255,255,255,.5); }
.code-box { text-align:center; }
.code-box .code { font-family:var(--num); font-size:36px; font-weight:900; letter-spacing:6px; color:var(--navy);
  background:var(--tint); border:1.5px dashed #9CC0F5; border-radius:14px; padding:14px 0; margin:12px 0 8px; }
.code-box .hint { font-size:11px; color:var(--mut); }

/* 弹层 + toast */
.scrim { position:fixed; inset:0; background:rgba(10,22,54,.45); backdrop-filter:blur(3px);
  z-index:40; display:flex; align-items:flex-end; justify-content:center; opacity:0; pointer-events:none; transition:opacity .25s; }
.scrim.open { opacity:1; pointer-events:auto; }
.sheet { width:390px; max-height:78vh; background:#fff; border-radius:22px 22px 0 0; display:flex; flex-direction:column;
  transform:translateY(40px); transition:transform .3s cubic-bezier(.22,.8,.3,1); box-shadow:0 -10px 40px rgba(14,42,102,.25); }
.scrim.open .sheet { transform:none; }
.sheet-head { display:flex; align-items:center; justify-content:space-between; padding:16px 18px 12px; border-bottom:1px solid var(--line); flex:none; }
.sheet-head b { font-size:16px; color:var(--ink); font-weight:900; display:flex; align-items:center; gap:8px; }
.sheet-head b::before { content:""; width:4px; height:16px; border-radius:99px; background:linear-gradient(180deg,#4D8DFF,#1F5EDD); }
.sheet-x { border:none; background:var(--tint); color:var(--sub); width:28px; height:28px; border-radius:50%; cursor:pointer; font-size:14px; line-height:1; }
.sheet-body { padding:14px 18px 22px; overflow-y:auto; }
.toasts { position:fixed; top:58px; left:50%; transform:translateX(-50%); z-index:60; display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none; }
.toast { background:rgba(14,42,102,.92); color:#fff; font-size:12.5px; font-weight:700; padding:9px 18px; border-radius:999px;
  box-shadow:0 8px 20px rgba(14,42,102,.35); display:flex; align-items:center; gap:7px; animation:tin .3s cubic-bezier(.22,.8,.3,1); }
.toast.ok::before { content:""; width:7px; height:7px; border-radius:50%; background:#4FD0EE; }
.toast.err::before { content:""; width:7px; height:7px; border-radius:50%; background:#FF8A70; }
.toast.out { opacity:0; transform:translateY(-8px); transition:all .3s; }
@keyframes tin { from { opacity:0; transform:translateY(-10px); } }

/* 底部导航（链接版） */
.tabbar { margin-top:auto; height:76px; padding-bottom:18px; background:rgba(255,255,255,.94); backdrop-filter:blur(10px);
  box-shadow:0 -4px 20px rgba(31,94,221,.1); display:flex; align-items:center; position:sticky; bottom:0;
  border-radius:22px 22px 0 0; z-index:5; flex:none; }
.tab { flex:1; border:none; background:none; cursor:pointer; display:flex; flex-direction:column; align-items:center;
  gap:3px; font-size:11px; color:#9AA7C0; font-weight:600; }
.tab svg { width:24px; height:24px; }
.tab.on { color:var(--deep); font-weight:800; }
.tab .dot { width:4px; height:4px; border-radius:50%; background:var(--deep); margin-top:-1px; visibility:hidden; }
.tab.on .dot { visibility:visible; }

/* 入场动画 */
.rv { opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s cubic-bezier(.22,.8,.3,1); }
.rv.in { opacity:1; transform:none; }

/* 客服聊天 */
.chat { display:flex; flex-direction:column; gap:10px; }
.msg { max-width:82%; padding:9px 12px; border-radius:14px; font-size:12.5px; line-height:1.55; }
.msg.bot { align-self:flex-start; background:var(--tint); color:var(--ink); border-bottom-left-radius:4px; }
.msg.me { align-self:flex-end; background:linear-gradient(180deg,#4D8DFF,#1F5EDD); color:#fff; border-bottom-right-radius:4px; }
.chat-input { display:flex; gap:8px; padding:12px 18px calc(12px + env(safe-area-inset-bottom)); background:#fff;
  box-shadow:0 -4px 14px rgba(31,94,221,.08); position:sticky; bottom:0; }
.chat-input input { flex:1; border:1.5px solid var(--line); border-radius:999px; padding:10px 14px; font-size:13px; outline:none; color:var(--ink); background:#FAFCFF; }
.chat-input input:focus { border-color:var(--blue2); }
.chat-input button { border:none; cursor:pointer; border-radius:999px; padding:0 20px; font-weight:800; font-size:13px; color:#fff; background:linear-gradient(180deg,#4D8DFF,#1F5EDD); }

/* 内容块卡片 */
.blk { margin:14px 18px 0; background:#fff; border-radius:18px; padding:14px 16px; box-shadow:0 6px 16px rgba(31,94,221,.1), inset 0 1px 0 #fff; }
.blk h4 { font-size:14px; font-weight:900; color:var(--ink); display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.blk h4::before { content:""; width:4px; height:15px; border-radius:99px; background:linear-gradient(180deg,#4D8DFF,#1F5EDD); }
.blk li { list-style:none; font-size:12.5px; color:#33415E; line-height:1.5; padding:7px 0 7px 24px; position:relative; border-bottom:1px dashed #EDF2FA; }
.blk li:last-child { border-bottom:none; }
.blk li::before { content:""; position:absolute; left:4px; top:12px; width:12px; height:12px; border-radius:50%;
  background:var(--tint); box-shadow:inset 0 0 0 2px var(--blue2); }

/* 公告条目 */
.notice-item { padding:12px 2px; border-bottom:1px solid #EEF3FB; }
.notice-item:last-child { border:none; }
.notice-item b { font-size:13px; color:var(--ink); display:block; margin-bottom:4px; }
.notice-item p { font-size:12px; color:var(--sub); line-height:1.6; }
.notice-item i { font-size:10px; color:var(--mut); font-style:normal; }

/* 菜单行 */
.menu-item { display:flex; align-items:center; gap:12px; width:100%; border:none; background:none; cursor:pointer;
  padding:14px 2px; border-bottom:1px solid #EEF3FB; font-size:14px; font-weight:700; color:var(--ink); text-align:left; }
.menu-item:last-child { border-bottom:none; }
.menu-item .mi-ico { width:34px; height:34px; border-radius:12px; flex:none; display:flex; align-items:center; justify-content:center;
  box-shadow:inset 0 1.5px 0 rgba(255,255,255,.5), 0 3px 8px rgba(31,94,221,.22); position:relative; }
.menu-item .mi-ico::before { content:""; position:absolute; left:5px; right:5px; top:4px; height:9px; border-radius:6px; background:linear-gradient(180deg,rgba(255,255,255,.4),transparent); }
.menu-item .mi-ico svg { width:17px; height:17px; position:relative; }
.menu-item .arrow { margin-left:auto; color:var(--mut); font-weight:400; }
.g1a { background:linear-gradient(150deg,#5AA0FF,#1F5EDD); } .g1b { background:linear-gradient(150deg,#4FD0EE,#199FD6); }
.g1c { background:linear-gradient(150deg,#8CA4FF,#4A63E8); } .g1d { background:linear-gradient(150deg,#3D7EFF,#0E2A66); }
.g1e { background:linear-gradient(150deg,#57D9A3,#1FA97A); } .g1f { background:linear-gradient(150deg,#FFB35C,#F0812E); }
.g1r { background:linear-gradient(150deg,#FF8A70,#E5533C); }

/* 渐变头（子页通用 hero 条） */
.page-hero { background:linear-gradient(160deg,#2F6BE6,#0E2A66); color:#fff; padding:6px 18px 20px; border-radius:0 0 24px 24px;
  position:relative; overflow:hidden; }
.page-hero::after { content:""; position:absolute; right:-40px; top:-60px; width:180px; height:180px; border-radius:50%; background:rgba(255,255,255,.1); }
