:root {
  /* 主题色：换成骏和屋官网的颜色只需改这三行 */
  --accent: #1C2189;
  --accent-dark: #13176A;
  --accent-soft: #E8E9F6;
  --ok: #1F7A4D;
  --ok-soft: #E4F2EA;
  --ink: #1A1C2B;
  --ink-2: #444A5C;
  --quiet: #5F6475;
  --ground: #F3F4F8;
  --card: #FFFFFF;
  --line: #ECEDF3;
  --track: #E3E5F0;
  --field: #D6D9E4;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: 'Noto Sans SC', system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: 32px; }
a { color: var(--accent); }
button, input { font-family: inherit; font-size: 15px; }
.loading { padding: 40px 16px; text-align: center; color: var(--quiet); }

/* 顶部 */
.hero { background: var(--accent); color: #fff; padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.hero.ok { background: var(--ok); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brand { font-size: 20px; font-weight: 900; }
.pill { font-size: 12px; background: rgba(0,0,0,.22); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.hero label { font-size: 13px; }
.row { display: flex; gap: 8px; }
.row > input { flex: 1; min-width: 0; }
.hero input { height: 46px; border: none; border-radius: 10px; padding: 0 12px; }
.back { width: 44px; height: 44px; margin-left: -10px; display: inline-flex; align-items: center; justify-content: center; color: inherit; text-decoration: none; }
.titlebar { display: flex; align-items: center; gap: 4px; }
.titlebar h1 { margin: 0; font-size: 17px; font-weight: 700; }
.big { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.big b { font-size: 44px; font-weight: 900; line-height: 1; }
.segs { display: grid; gap: 6px; }
.segs i { height: 10px; border-radius: 999px; background: rgba(255,255,255,.32); }
.segs i.on { background: #fff; }
.hero-meta { display: flex; justify-content: space-between; font-size: 13px; gap: 8px; }

/* 主体 */
main { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.sec-title { display: flex; justify-content: space-between; align-items: baseline; }
.sec-title h2 { margin: 0; font-size: 17px; }
.sec-title span, .muted { font-size: 12px; color: var(--quiet); }
.card { background: var(--card); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.link { text-decoration: none; color: var(--ink); }
.card h3 { margin: 0; font-size: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tag { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px; white-space: nowrap; background: var(--accent-soft); color: var(--accent-dark); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.plain { background: #EEF0F5; color: var(--ink-2); font-weight: 500; }
.bar { height: 12px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.bar.sm { height: 8px; }
.meta { display: flex; justify-content: space-between; font-size: 13px; gap: 8px; }
.hint { margin: 0; font-size: 13px; color: var(--ink-2); background: #F5F6FA; padding: 8px 10px; border-radius: 8px; line-height: 1.6; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.avatars { display: flex; gap: 6px; flex-wrap: wrap; }
.av { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.av.lg { width: 36px; height: 36px; font-size: 14px; }
.av.empty { border: 1.5px dashed #B9BDCC; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 999px; border: none; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn.block { width: 100%; height: 52px; font-size: 16px; }
.btn.dark { background: var(--ink); }
.btn.green { background: var(--ok); }
.btn.line { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn[disabled] { opacity: .5; cursor: default; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.done-link { background: var(--card); border-radius: 14px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.done-link b { font-size: 15px; }
.empty-state { text-align: center; color: var(--quiet); font-size: 14px; padding: 24px 8px; }

/* 选店 */
.product { display: flex; gap: 12px; flex-direction: row; }
.product .ph { width: 72px; height: 72px; border-radius: 10px; background: #E6E8F0; flex-shrink: 0; }
.product .t { font-size: 15px; font-weight: 700; line-height: 1.4; }
.opt { background: var(--card); border: 2px solid transparent; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.opt.sel { border-color: var(--accent); }
.opt-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.opt-head label { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.opt-head input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.price { font-size: 18px; font-weight: 900; white-space: nowrap; }
.opt.sel .price { color: var(--accent); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.preview { font-size: 12px; color: var(--ink-2); }
.form { background: var(--card); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--ink-2); }
.field input { height: 44px; border: 1px solid var(--field); border-radius: 10px; padding: 0 10px; background: #fff; width: 100%; }
.qty { display: flex; align-items: center; justify-content: space-between; }
.qty div { display: flex; align-items: center; gap: 4px; }
.qty button { width: 44px; height: 44px; border: 1px solid var(--field); background: #fff; border-radius: 10px; font-size: 18px; cursor: pointer; }
.qty span { width: 32px; text-align: center; font-weight: 700; }

/* 成员列表 */
.list { background: var(--card); border-radius: 14px; padding: 4px 14px; }
.list-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--quiet); padding: 10px 0 6px; }
.li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.li .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.li .mid b { font-size: 15px; }
.li .mid span { font-size: 12px; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.li .end b { font-size: 15px; }
.good { font-size: 12px; font-weight: 700; color: var(--ok); }
.bad { font-size: 12px; font-weight: 700; color: #B4421A; }
.mini { height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--field); background: #fff; font-size: 12px; cursor: pointer; white-space: nowrap; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 6px; border-top: 1.5px solid var(--ink); }
.total b { font-size: 20px; font-weight: 900; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.stats div { display: flex; flex-direction: column; gap: 2px; }
.stats span { font-size: 12px; color: var(--quiet); }
.stats b { font-size: 17px; font-weight: 900; }

/* 弹层 */
.sheet-wrap { position: fixed; inset: 0; background: rgba(26,28,43,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet-wrap[hidden] { display: none; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.sheet h2 { margin: 0; font-size: 17px; }
.sheet p { margin: 0; font-size: 13px; color: var(--quiet); }
.pin-input { height: 56px; font-size: 24px; letter-spacing: 16px; text-align: center; border: 1.5px solid var(--ink); border-radius: 12px; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 20; max-width: 90vw; }
.toast[hidden] { display: none; }

/* 后台 */
.admin-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-row input { height: 40px; border: 1px solid var(--field); border-radius: 8px; padding: 0 8px; width: 110px; }
.admin-row input.wide { flex: 1; min-width: 180px; }

/* 精简版补充 */
.product-title { font-size: 15px; font-weight: 700; line-height: 1.4; padding: 4px 2px; }
.opt { gap: 6px; padding: 12px 14px; }
.preview.strong { color: var(--accent-dark); font-weight: 700; }
.sub { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 0 10px; font-size: 13px; }
.big b { font-size: 36px; }
.list > .li:first-child { border-top: none; }

/* 首页：搜索框 + 分店列表 */
.topbar { position: sticky; top: 0; z-index: 5; background: var(--accent); color: #fff; padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.topbar-row { display: flex; justify-content: space-between; align-items: center; }
.topbar .brand { font-size: 18px; }
.topbar .muted { color: rgba(255,255,255,.85); }
.search { display: flex; align-items: center; gap: 8px; background: #fff; color: var(--quiet); border-radius: 999px; padding: 0 4px 0 14px; height: 44px; }
.search input { flex: 1; min-width: 0; border: none; outline: none; height: 100%; background: transparent; color: var(--ink); }
.search button { height: 36px; padding: 0 16px; border: none; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.thumb { width: 44px; height: 44px; border-radius: 8px; background: #E6E8F0; flex-shrink: 0; overflow: hidden; display: inline-block; }
.thumb.lg { width: 72px; height: 72px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop { flex-direction: row; align-items: flex-start; gap: 12px; }
.shop-img { position: relative; flex-shrink: 0; }
.shop-img .more { position: absolute; right: 4px; bottom: 4px; background: rgba(26,28,43,.72); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 6px; }
.shop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.shop-body h3 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.meta { font-size: 12px; }
.product { display: flex; gap: 12px; align-items: center; }
.sub { justify-content: flex-start; }
.sub-t { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; font-size: 12px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* 详情页顶部：结论 + 数字对比 */
.hero-title { font-size: 20px; font-weight: 900; line-height: 1.35; }
.vs { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 8px; background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px 12px; }
.vs div { display: flex; flex-direction: column; gap: 2px; }
.vs div:last-child { text-align: right; }
.vs span { font-size: 12px; color: rgba(255,255,255,.8); }
.vs b { font-size: 22px; font-weight: 900; }
.vs i { font-style: normal; font-size: 18px; color: rgba(255,255,255,.7); }
.tag.mine { font-size: 11px; padding: 1px 6px; vertical-align: 2px; }

/* ---------- lite 风格：首页 ---------- */
body { background: #EDEDEF; }
.lite-head { padding: 28px 20px 8px; display: flex; flex-direction: column; gap: 18px; }
.lite-row { display: flex; justify-content: space-between; align-items: baseline; }
.lite-brand { font-size: 22px; font-weight: 500; letter-spacing: .5px; color: var(--ink); }
.lite-meta { font-size: 13px; color: #8A8D99; }
.lite-search { display: flex; align-items: center; height: 52px; border-radius: 999px; background: #fff; border: 1px solid #E0E1E6; padding: 0 6px 0 20px; transition: border-color .2s, box-shadow .2s; }
.lite-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(28,33,137,.08); }
.lite-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 15px; color: var(--ink); height: 100%; }
.lite-search input::placeholder { color: #A3A6B2; }
.lite-search button { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lite-main { padding: 8px 20px 40px; display: flex; flex-direction: column; gap: 10px; }
.lite-cap { margin: 18px 0 2px; font-size: 13px; color: #8A8D99; letter-spacing: .5px; }
.lite-empty { margin: 0; padding: 22px 24px; border-radius: 999px; background: #E4E5E9; color: #A3A6B2; font-size: 14px; }
.pills { display: flex; flex-direction: column; gap: 10px; }
.pill { min-width: 0; max-width: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 68px; padding: 10px 22px; border-radius: 999px; background: #E4E5E9; border: 1px solid #DCDDE2; color: #55596A; text-decoration: none; transition: width .5s cubic-bezier(.2,.8,.2,1), transform .15s; }
.pill:active { transform: scale(.985); }
.pill-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pill-l b { font-weight: 400; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-l small { font-size: 11.5px; color: #8A8D99; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-r { flex-shrink: 0; font-size: 24px; font-weight: 300; line-height: 1.05; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -.3px; display: flex; flex-direction: column; align-items: flex-end; }
.pill-r small { font-size: 11px; font-weight: 400; color: #8A8D99; letter-spacing: 0; }
.pill.lead { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill.lead .pill-l small, .pill.lead .pill-r small { color: rgba(255,255,255,.7); }
.pill.lead .pill-r { color: #fff; }
.pill.done { background: transparent; border-style: dashed; }
.pill.done .pill-r { font-size: 15px; color: var(--ok); }
@media (min-width: 640px) { .lite-head, .lite-main { padding-left: 32px; padding-right: 32px; } }

/* ---------- lite 风格：二级页与通用组件 ---------- */
.lite-head.sub { padding: 14px 12px 4px 8px; position: sticky; top: 0; z-index: 5; background: rgba(237,237,239,.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.lite-head.sub .lite-row { align-items: center; justify-content: flex-start; gap: 2px; }
.lite-back { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); border-radius: 50%; }
.lite-back:active { background: rgba(0,0,0,.05); }
.lite-title { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loading { color: #A3A6B2; font-size: 14px; }

.product { display: flex; gap: 14px; align-items: center; padding: 6px 0 2px; }
.product .thumb.lg { width: 64px; height: 64px; border-radius: 16px; background: #E1E2E7; }
.product-title { font-size: 15px; font-weight: 400; line-height: 1.5; color: var(--ink); padding: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
button.pill { font: inherit; text-align: left; cursor: pointer; }
.opt { border-radius: 999px; padding: 10px 22px; gap: 10px; }
.opt .pill-r { font-size: 22px; }
.preview-line { margin: 2px 0 0; min-height: 20px; font-size: 13px; color: var(--accent); padding-left: 22px; }

.lite-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.lf { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lf > span { font-size: 12px; color: #8A8D99; padding-left: 16px; }
.lf input { height: 50px; border-radius: 999px; border: 1px solid #E0E1E6; background: #fff; padding: 0 18px; font-size: 16px; color: var(--ink); width: 100%; outline: none; transition: border-color .2s, box-shadow .2s; }
.lf input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(28,33,137,.08); }
.lf input[type=password] { letter-spacing: 6px; }
.stepper { height: 50px; border-radius: 999px; border: 1px solid #E0E1E6; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.stepper button { width: 42px; height: 42px; border-radius: 50%; border: none; background: transparent; font-size: 20px; color: var(--ink); cursor: pointer; }
.stepper button:active { background: #F0F1F4; }
.stepper b { font-weight: 400; font-size: 16px; }

.btn { height: 52px; border-radius: 999px; font-weight: 500; font-size: 15px; letter-spacing: .5px; background: var(--accent); transition: transform .15s, opacity .2s; }
.btn:active { transform: scale(.985); }
.btn.line { background: transparent; color: var(--ink); border: 1px solid #D3D5DC; }
.btn.danger { background: #B4421A; }
.grid2 { gap: 10px; }

.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 4px 6px; }
.stat small { font-size: 13px; color: #8A8D99; }
.stat b { font-size: 56px; font-weight: 200; line-height: 1.05; color: var(--accent); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: #55596A; }
.stat.ok b { color: var(--ok); }
.stat.muted b { color: #8A8D99; }
.track { height: 10px; border-radius: 999px; background: #DFE0E5; overflow: hidden; margin: 8px 0 0; }
.track i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.stat-meta { display: flex; justify-content: space-between; font-size: 12px; color: #8A8D99; padding: 6px 2px 8px; }

.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 8px 22px; border-radius: 999px; background: #E4E5E9; border: 1px solid #DCDDE2; }
.row-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; text-decoration: none; color: inherit; }
.row-l b { font-weight: 400; font-size: 15px; color: #2B2E3A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-l small { font-size: 11.5px; color: #8A8D99; }
.row-r { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; line-height: 1.1; }
.row-r small { font-size: 11px; color: #8A8D99; }
.row-r span { font-size: 20px; font-weight: 300; color: var(--accent); font-variant-numeric: tabular-nums; }
.row-r.over span, .row-r.over small { color: #B4421A; }
.rows.white .row { background: #fff; border-color: #E6E7EB; border-radius: 20px; padding: 10px 12px 10px 10px; }
.row.item .thumb { width: 44px; height: 44px; border-radius: 12px; background: #ECEDF1; }
.link-btn { border: none; background: transparent; color: #8A8D99; font-size: 13px; padding: 10px 8px; cursor: pointer; }
.link-btn:active { color: #B4421A; }

.sheet { border-radius: 28px 28px 0 0; padding: 26px 20px calc(24px + env(safe-area-inset-bottom)); gap: 16px; }
.sheet h2 { font-size: 18px; font-weight: 500; }
.sheet-wrap { background: rgba(20,22,40,.32); backdrop-filter: blur(2px); }
.toast { border-radius: 999px; padding: 10px 18px; background: rgba(26,28,43,.92); }

.lite-main .card { background: #fff; border-radius: 22px; border: 1px solid #E6E7EB; }
.lite-main .card h3 { font-weight: 500; }
.lite-head { align-items: stretch; }
button.pill.opt { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
button.pill.opt .pill-l small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loading { text-align: left; padding: 20px 4px; }
.toast { top: calc(16px + env(safe-area-inset-top)); bottom: auto; }
.pill.done.ordered .pill-r { color: #8A8D99; }
.sheet p { margin: -6px 0 0; font-size: 13px; color: #8A8D99; }
