/* ══════════════════════════════════════════════════════════════
   晓岩 / 观澜 · 移动端（微信小程序同构 H5）
   现代东方 · 高级 · 克制 · 建盏文化感
   ══════════════════════════════════════════════════════════════ */
:root {
  --ink: #1C1A17;
  --ink-2: #2A2420;
  --paper: #F7F5F0;
  --paper-2: #FFFFFF;
  --paper-3: #F1EDE5;
  --line: #E7E1D6;
  --gold: #B08A4A;
  --gold-2: #C9A063;
  --gold-soft: #F5EDDC;
  --tea: #6E5A42;
  --text: #24201C;
  --text-2: #6B6259;
  --text-3: #9C948B;
  --danger: #A83A2B;
  --ok: #2F7A4F;
  --nav-h: 56px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Songti SC",
               "Microsoft YaHei", serif;
  background: #E8E4DC; color: var(--text); font-size: 14px; line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  display: flex; justify-content: center;
}
/* 桌面端用手机框呈现 */
#phone {
  width: 100%; max-width: 430px; min-height: 100vh; background: var(--paper);
  position: relative; box-shadow: 0 0 60px rgba(28,26,23,.18); overflow-x: hidden;
}
#app { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); min-height: 100vh; }
img { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 0; }

.hide { display: none !important; }
.muted { color: var(--text-3); font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }

/* ── 顶部导航 ── */
.navbar {
  position: sticky; top: 0; z-index: 40; height: 52px; display: flex; align-items: center;
  padding: 0 14px; background: rgba(247,245,240,.94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.navbar .back { width: 32px; height: 32px; display: grid; place-items: center; font-size: 19px;
  color: var(--text); cursor: pointer; margin-left: -6px; }
.navbar h1 { flex: 1; font-size: 16px; font-weight: 600; text-align: center; letter-spacing: .5px; }
.navbar .act { min-width: 32px; text-align: right; font-size: 13px; color: var(--tea); cursor: pointer; }
.navbar.dark { background: rgba(28,26,23,.9); border-bottom-color: rgba(255,255,255,.08); color: #F4F1EA; }
.navbar.dark .back, .navbar.dark .act { color: #E8E1D6; }
.navbar.dark h1 { color: #F4F1EA; }

/* ── 底部 TabBar ── */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; max-width: 430px; margin: 0 auto;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255,255,255,.97); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); display: flex; z-index: 50;
}
.tabbar .t { flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; color: var(--text-3); cursor: pointer; position: relative; }
.tabbar .t .ic { font-size: 19px; line-height: 1; }
.tabbar .t .lb { font-size: 10.5px; letter-spacing: .5px; }
.tabbar .t.on { color: var(--tea); }
.tabbar .t.on .ic { color: var(--gold); }
.tabbar .badge {
  position: absolute; top: 6px; right: 50%; margin-right: -22px; background: var(--danger);
  color: #fff; border-radius: 9px; font-size: 10px; line-height: 15px; padding: 0 5px; min-width: 15px;
  text-align: center;
}

/* ── 首页 ── */
.hero {
  background: linear-gradient(160deg, #1C1A17 0%, #2A2420 58%, #141210 100%);
  color: #F4F1EA; padding: 22px 18px 26px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -40px; width: 240px; height: 240px;
  border-radius: 50%; border: 1px solid rgba(201,160,99,.28);
  box-shadow: inset 0 0 60px rgba(201,160,99,.10);
}
.hero .brandline { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.hero .mark { width: 32px; height: 32px; border-radius: 50%; border: 1.3px solid var(--gold-2);
  display: grid; place-items: center; color: var(--gold-2); font-family: Georgia, serif; font-size: 14px; }
.hero h2 { font-size: 21px; letter-spacing: 6px; font-weight: 600; }
.hero .en { font-size: 9.5px; letter-spacing: 3px; color: var(--gold-2); }
.hero .slogan { font-size: 14.5px; color: #D9D2C7; margin: 12px 0 4px; letter-spacing: .5px; line-height: 1.7; }
.hero .sub { font-size: 11.5px; color: #938B80; letter-spacing: .8px; }
.hero .stats { display: flex; gap: 22px; margin-top: 18px; position: relative; z-index: 1; }
.hero .stats div b { display: block; font-size: 17px; color: var(--gold-2); font-weight: 600; }
.hero .stats div span { font-size: 10.5px; color: #8E867B; letter-spacing: .5px; }

.searchbar { padding: 0 14px; margin-top: -18px; position: relative; z-index: 2; }
.searchbar .box {
  display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 22px;
  padding: 10px 16px; box-shadow: 0 6px 22px rgba(28,26,23,.10); border: 1px solid rgba(176,138,74,.16);
}
.searchbar input { flex: 1; border: none; outline: none; background: transparent; }
.searchbar .ic { color: var(--gold); font-size: 15px; }

.quickcats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 16px 10px 8px; }
.quickcats .q { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px;
  border-radius: 10px; cursor: pointer; }
.quickcats .q:active { background: var(--paper-3); }
.quickcats .q .cir {
  width: 46px; height: 46px; border-radius: 14px; background: var(--paper-3); display: grid;
  place-items: center; font-size: 17px; color: var(--tea); border: 1px solid var(--line);
}
.quickcats .q span { font-size: 11.5px; color: var(--text-2); }
.quickcats .q .n { font-size: 10px; color: var(--text-3); }

.section { margin-top: 22px; }
.section-h { display: flex; align-items: flex-end; gap: 9px; padding: 0 16px 12px; }
.section-h .bar { width: 3px; height: 15px; background: var(--gold); border-radius: 2px; }
.section-h h3 { font-size: 16px; font-weight: 600; letter-spacing: .8px; }
.section-h .en { font-size: 9.5px; letter-spacing: 2.2px; color: var(--text-3); padding-bottom: 2px; }
.section-h .more { margin-left: auto; font-size: 12px; color: var(--text-3); cursor: pointer; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 4px; scroll-snap-type: x mandatory; }
.hscroll .pcard { flex: 0 0 152px; scroll-snap-align: start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }

.pcard {
  background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  cursor: pointer; position: relative;
}
.pcard:active { transform: scale(.985); }
.pcard .img { width: 100%; aspect-ratio: 1; background: #1C1A17; display: block; object-fit: cover; }
.pcard .bd { padding: 9px 10px 11px; }
.pcard .nm { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .cd { font-size: 10.5px; color: var(--text-3); font-family: ui-monospace, monospace; margin-top: 1px; }
.pcard .pr { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; }
.pcard .pr b { color: var(--danger); font-size: 15px; font-weight: 600; }
.pcard .pr small { font-size: 10.5px; color: var(--text-3); }
.pcard .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.pcard .stock { position: absolute; top: 8px; left: 8px; background: rgba(28,26,23,.72); color: #EDE7DC;
  font-size: 10px; padding: 2px 7px; border-radius: 10px; backdrop-filter: blur(4px); }

.tag { display: inline-block; padding: 1px 7px; border-radius: 20px; font-size: 10.5px;
  border: 1px solid var(--line); background: var(--paper-3); color: var(--text-2); }
.tag.gold { background: var(--gold-soft); border-color: #E8D7B6; color: #8A6A2E; }
.tag.ok { background: #E9F3EC; border-color: #CFE4D7; color: var(--ok); }
.tag.danger { background: #FBEAE6; border-color: #EED0C9; color: var(--danger); }
.tag.ink { background: var(--ink); border-color: var(--ink); color: #F4F1EA; }

.banner { margin: 0 16px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }

/* ── 列表 / 筛选 ── */
.filterbar {
  position: sticky; top: 52px; z-index: 30; background: rgba(247,245,240,.96);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.filterbar .chips { display: flex; gap: 8px; overflow-x: auto; padding: 9px 14px; }
.chip {
  flex: 0 0 auto; padding: 5px 13px; border-radius: 16px; background: #fff; border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #F4F1EA; }
.chip.gold.on { background: var(--gold); border-color: var(--gold); color: #fff; }

.filterpanel { padding: 14px; background: #fff; border-bottom: 1px solid var(--line); }
.filterpanel .grp { margin-bottom: 14px; }
.filterpanel .grp > label { font-size: 12.5px; color: var(--text-2); display: block; margin-bottom: 8px; }
.filterpanel .opts { display: flex; flex-wrap: wrap; gap: 7px; }

.plist { padding: 12px 14px; }
.plist .pcard { display: flex; gap: 12px; padding: 10px; margin-bottom: 10px; }
.plist .pcard .img { width: 104px; height: 104px; flex: 0 0 104px; border-radius: 9px; }
.plist .pcard .bd { padding: 0; flex: 1; min-width: 0; }
.plist .pcard .pr b { font-size: 17px; }
.tierline { display: flex; gap: 5px; overflow-x: auto; margin-top: 6px; }
.tierline .t { flex: 0 0 auto; font-size: 10.5px; color: var(--tea); background: var(--gold-soft);
  border-radius: 5px; padding: 1px 6px; }

/* ── 详情 ── */
.gallery { position: relative; background: #1C1A17; }
.gallery .swiper { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.gallery .swiper img { flex: 0 0 100%; width: 100%; aspect-ratio: 1; object-fit: cover; scroll-snap-align: center; }
.gallery .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex;
  justify-content: center; gap: 5px; }
.gallery .dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.4); }
.gallery .dots i.on { background: var(--gold-2); width: 14px; border-radius: 3px; }
.gallery .code {
  position: absolute; top: 12px; left: 12px; background: rgba(28,26,23,.66); color: #EDE7DC;
  font-size: 11px; padding: 3px 9px; border-radius: 10px; font-family: ui-monospace, monospace;
  backdrop-filter: blur(4px);
}

.detail-head { background: #fff; padding: 15px 16px; }
.detail-head h2 { font-size: 19px; font-weight: 600; line-height: 1.4; }
.detail-head .sub { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.pricebox { background: #fff; padding: 0 16px 16px; }
.pricebox .now { display: flex; align-items: baseline; gap: 8px; }
.pricebox .now b { color: var(--danger); font-size: 27px; font-weight: 700; font-family: Georgia, serif; }
.pricebox .now .lbl { font-size: 11.5px; color: var(--tea); background: var(--gold-soft);
  padding: 2px 8px; border-radius: 10px; }
.pricebox .retail { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.tiertable { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tiertable .tr { display: flex; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.tiertable .tr:last-child { border-bottom: none; }
.tiertable .tr.head { background: var(--paper-3); color: var(--text-2); font-size: 11.5px; }
.tiertable .tr > div { flex: 1; padding: 7px 10px; text-align: center; }
.tiertable .tr > div:first-child { flex: 1.3; text-align: left; }
.tiertable .tr.on { background: var(--gold-soft); }
.tiertable .tr.on > div:first-child { color: var(--tea); font-weight: 600; }

.block { background: #fff; margin-top: 10px; padding: 16px; }
.block h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.block h4::before { content: ""; width: 3px; height: 13px; background: var(--gold); border-radius: 2px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; font-size: 12.5px; }
.specs .s { display: flex; gap: 6px; }
.specs .s span:first-child { color: var(--text-3); flex: 0 0 62px; }
.specs .s span:last-child { color: var(--text); }
.points { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); }
.points .pt { display: flex; gap: 8px; }
.points .pt::before { content: "·"; color: var(--gold); font-weight: 700; font-size: 17px; line-height: 1.1; }
.prose { font-size: 13.5px; color: var(--text-2); line-height: 1.95; }
.channels { display: flex; flex-wrap: wrap; gap: 7px; }

.detailbar {
  position: fixed; bottom: 0; left: 0; right: 0; max-width: 430px; margin: 0 auto;
  background: rgba(255,255,255,.98); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; z-index: 60;
}
.detailbar .icbtn { flex: 0 0 auto; width: 50px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; font-size: 10px; color: var(--text-2); cursor: pointer; }
.detailbar .icbtn .i { font-size: 17px; }
.detailbar .icbtn.on { color: var(--gold); }
.detailbar .btn { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px;
  border-radius: 24px; border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 14px; cursor: pointer; white-space: nowrap;
}
.btn:active { opacity: .78; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #F7F5F0; }
.btn.gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); border-color: var(--gold); color: #fff; }
.btn.outline-gold { border-color: var(--gold); color: var(--tea); background: #fff; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 18px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; }

/* ── 购物车 / 订单 / 表单 ── */
.list-item { background: #fff; border-radius: 12px; padding: 13px; margin-bottom: 10px;
  border: 1px solid var(--line); }
.list-item .top { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 12.5px; padding-bottom: 9px; border-bottom: 1px dashed var(--line); margin-bottom: 9px; }
.list-item .prod { display: flex; gap: 11px; }
.list-item .prod img { width: 76px; height: 76px; border-radius: 8px; flex: 0 0 76px; background: var(--ink); object-fit: cover; }
.list-item .prod .info { flex: 1; min-width: 0; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stepper button { width: 30px; height: 27px; border: none; background: #fff; color: var(--text); cursor: pointer; font-size: 15px; }
.stepper button:active { background: var(--paper-3); }
.stepper input { width: 44px; height: 27px; border: none; border-left: 1px solid var(--line);
  border-right: 1px solid var(--line); text-align: center; outline: none; font-size: 13px; }

.field { margin-bottom: 14px; }
.coderow { display: flex; align-items: center; gap: 8px; }
.coderow .input { flex: 1; min-width: 0; }
.coderow .codebtn { flex: none; }
.coderow .codebtn:disabled { opacity: .55; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.field label .req { color: var(--danger); margin-left: 3px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; outline: none; transition: .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); }
.textarea { min-height: 76px; resize: vertical; line-height: 1.7; }
.switchline { display: flex; align-items: center; justify-content: space-between; padding: 11px 0;
  border-bottom: 1px solid var(--line); }
.switchline:last-child { border-bottom: none; }
.switch { width: 44px; height: 25px; border-radius: 14px; background: #DCD5C9; position: relative;
  transition: .18s; cursor: pointer; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: .18s; }
.switch.on { background: var(--gold); }
.switch.on::after { transform: translateX(19px); }

.steps { display: flex; padding: 14px 4px; overflow-x: auto; }
.steps .st { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }
.steps .st .d { width: 7px; height: 7px; border-radius: 50%; background: #DCD5C9; }
.steps .st.on { color: var(--text); }
.steps .st.on .d { background: var(--gold); }
.steps .st.done .d { background: var(--ok); }
.steps .ln { width: 18px; height: 1px; background: var(--line); margin: 0 5px; }

.empty { padding: 70px 30px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty .ic { font-size: 40px; opacity: .28; display: block; margin-bottom: 12px; }
.empty .btn { margin-top: 18px; }

/* ── 我的 ── */
.profile-head {
  background: linear-gradient(160deg, #1C1A17 0%, #2A2420 70%); color: #F4F1EA;
  padding: 24px 18px 28px; position: relative; overflow: hidden;
}
.profile-head::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 190px; height: 190px;
  border-radius: 50%; border: 1px solid rgba(201,160,99,.2); }
.profile-head .who { display: flex; align-items: center; gap: 13px; }
.profile-head .av { width: 52px; height: 52px; border-radius: 50%; background: rgba(201,160,99,.16);
  border: 1.4px solid rgba(201,160,99,.5); display: grid; place-items: center; font-size: 19px;
  color: var(--gold-2); font-family: Georgia, serif; }
.profile-head h2 { font-size: 17px; font-weight: 600; }
.profile-head .meta { font-size: 11.5px; color: #9A9287; margin-top: 3px; }
.profile-head .lvtags { display: flex; gap: 6px; margin-top: 8px; }
.profile-head .lvtags .tag { background: rgba(201,160,99,.16); border-color: rgba(201,160,99,.34); color: var(--gold-2); }
.pstats { display: flex; background: #fff; border-bottom: 1px solid var(--line); }
.pstats .s { flex: 1; padding: 13px 0; text-align: center; border-right: 1px solid var(--line); }
.pstats .s:last-child { border-right: none; }
.pstats .s b { display: block; font-size: 17px; font-weight: 600; }
.pstats .s span { font-size: 11px; color: var(--text-3); }
.menu { background: #fff; margin-top: 10px; }
.menu .m { display: flex; align-items: center; gap: 11px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); cursor: pointer; }
.menu .m:last-child { border-bottom: none; }
.menu .m:active { background: var(--paper-3); }
.menu .m .i { width: 20px; text-align: center; color: var(--tea); }
.menu .m .t { flex: 1; }
.menu .m .v { font-size: 12.5px; color: var(--text-3); }
.menu .m .arrow { color: #C9C1B5; font-size: 15px; }

/* ── 对比 ── */
.cmp { overflow-x: auto; }
.cmp table { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.cmp th, .cmp td { border: 1px solid var(--line); padding: 8px 9px; text-align: center; white-space: nowrap; }
.cmp th { background: var(--paper-3); position: sticky; top: 0; }
.cmp td.label { background: var(--paper-3); text-align: left; color: var(--text-2); position: sticky; left: 0; }
.cmp th img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; margin: 0 auto 5px; background: var(--ink); }
.cmp .low { color: var(--danger); font-weight: 600; }

/* ── 弹层 ── */
.sheet-mask { position: fixed; inset: 0; background: rgba(28,26,23,.44); z-index: 90; display: none; }
.sheet-mask.on { display: block; }
.sheet {
  position: fixed; bottom: 0; left: 0; right: 0; max-width: 430px; margin: 0 auto;
  background: var(--paper); border-radius: 18px 18px 0 0; z-index: 100; max-height: 86vh;
  display: flex; flex-direction: column; transform: translateY(102%);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
}
.sheet.on { transform: none; }
.sheet-h { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.sheet-h h3 { flex: 1; font-size: 16px; font-weight: 600; }
.sheet-h .x { color: var(--text-3); font-size: 18px; cursor: pointer; }
.sheet-b { flex: 1; overflow-y: auto; padding: 16px 18px 22px; }
.sheet-f { padding: 11px 18px calc(13px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
  display: flex; gap: 9px; background: #fff; }

.toasts { position: fixed; top: 70px; left: 0; right: 0; z-index: 300; display: flex;
  flex-direction: column; align-items: center; pointer-events: none; }
.toast { background: rgba(28,26,23,.92); color: #F4F1EA; padding: 9px 19px; border-radius: 20px;
  font-size: 13px; margin-bottom: 8px; animation: tin .2s ease; max-width: 86%; text-align: center; }
.toast.ok { background: rgba(47,122,79,.94); }
.toast.err { background: rgba(168,58,43,.94); }
@keyframes tin { from { opacity: 0; transform: translateY(-7px); } }

.skeleton { background: linear-gradient(90deg, #EFEBE3 25%, #F7F5F0 50%, #EFEBE3 75%);
  background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

.fab {
  position: fixed; right: calc(50% - 205px); bottom: calc(var(--nav-h) + 20px); z-index: 55;
  background: var(--ink); color: #F4F1EA; border-radius: 24px; padding: 10px 16px; font-size: 13px;
  box-shadow: 0 6px 20px rgba(28,26,23,.28); cursor: pointer; display: flex; gap: 6px; align-items: center;
}
@media (max-width: 460px) { .fab { right: 16px; } }

.login-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 0 26px 60px; background: linear-gradient(170deg, #1C1A17 0%, #2A2420 46%, #F7F5F0 46.1%, #F7F5F0 100%); }
.login-wrap .brand { text-align: center; margin-bottom: 30px; }
.login-wrap .brand .mark { width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid var(--gold-2);
  display: grid; place-items: center; color: var(--gold-2); font-family: Georgia, serif; font-size: 22px; margin: 0 auto 12px; }
.login-wrap .brand h2 { color: #F4F1EA; font-size: 23px; letter-spacing: 8px; font-weight: 600; }
.login-wrap .brand p { color: var(--gold-2); font-size: 10px; letter-spacing: 3px; margin-top: 5px; }
.login-card { background: #fff; border-radius: 16px; padding: 22px 20px 26px; box-shadow: 0 12px 40px rgba(28,26,23,.14); }
.login-card h3 { font-size: 17px; margin-bottom: 5px; }
.login-card .tip { font-size: 12.5px; color: var(--text-3); margin-bottom: 18px; }
.typegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.typegrid .ty { padding: 9px 4px; text-align: center; border: 1px solid var(--line); border-radius: 9px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.typegrid .ty.on { border-color: var(--gold); background: var(--gold-soft); color: #7A5C2E; font-weight: 600; }

.tabs { display: flex; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 52px; z-index: 30; }
.tabs .t { flex: 1; text-align: center; padding: 11px 0; font-size: 13.5px; color: var(--text-2);
  border-bottom: 2px solid transparent; cursor: pointer; }
.tabs .t.on { color: var(--tea); border-bottom-color: var(--gold); font-weight: 600; }

.notice { background: var(--gold-soft); border: 1px solid #E8D7B6; border-radius: 10px; padding: 10px 13px;
  font-size: 12.5px; color: #7A5C2E; line-height: 1.8; }

/* ── 布局补充 ── */
#app.notab { padding-bottom: 0; }
.detailbar.above-tab { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); }
.padbar { height: 66px; }
.padbar-tab { height: calc(var(--nav-h) + 62px); }
.pad16 { padding: 16px; }
.pad14 { padding: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tag-row { display: flex; gap: 5px; flex-wrap: wrap; }
.price-lg { color: var(--danger); font-size: 20px; font-weight: 700; font-family: Georgia, serif; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
.linkbtn { color: var(--tea); font-size: 12.5px; cursor: pointer; }
.mini-note { font-size: 11.5px; color: var(--text-3); line-height: 1.75; }
.cmp-bar {
  position: fixed; left: 0; right: 0; max-width: 430px; margin: 0 auto;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  background: rgba(28,26,23,.95); color: #F4F1EA; padding: 10px 14px; display: flex;
  align-items: center; gap: 10px; z-index: 58; border-radius: 0; font-size: 12.5px;
}
.cmp-bar .thumbs { display: flex; gap: 6px; flex: 1; overflow-x: auto; }
.cmp-bar .thumbs img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; background: #2A2420; }
.cmp-bar .btn { flex: 0 0 auto; padding: 7px 15px; font-size: 12.5px; border-radius: 18px; }
.stars { display: flex; gap: 4px; }
.stars i { font-style: normal; font-size: 22px; color: #DCD5C9; cursor: pointer; }
.stars i.on { color: var(--gold); }
.swiper-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; background: #fff; }
.swiper-thumbs img { width: 52px; height: 52px; border-radius: 7px; object-fit: cover; border: 1.4px solid transparent; background: var(--ink); flex: 0 0 auto; }
.swiper-thumbs img.on { border-color: var(--gold); }
.sec-card { background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 13px; margin-bottom: 10px; }
.sec-card .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.sec-card .hd b { font-size: 13.5px; }
.qty-inline { display: flex; align-items: center; gap: 9px; margin-top: 9px; }
.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel .f { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.funnel .f .n { flex: 0 0 62px; color: var(--text-2); }
.funnel .f .b { flex: 1; height: 15px; background: var(--paper-3); border-radius: 8px; overflow: hidden; }
.funnel .f .b i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.funnel .f .v { flex: 0 0 62px; text-align: right; color: var(--text-3); font-family: ui-monospace, monospace; }

/* ══════════════════════════════════════════════════════════════
   PWA / 添加到主屏幕（APP 模式）
   ══════════════════════════════════════════════════════════════ */
/* 独立窗口：让出系统状态栏（iOS black-translucent 内容延伸至状态栏） */
html.pwa body { padding-top: env(safe-area-inset-top, 0px); }
html.pwa .navbar { top: env(safe-area-inset-top, 0px); }
html.pwa .chips-row,
html.pwa .tabs { top: calc(52px + env(safe-area-inset-top, 0px)); }

/* 「添加到桌面」引导条 */
.install-bar {
  display: flex; align-items: center; gap: 10px; margin: 12px 14px 0;
  padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.5;
  background: var(--gold-soft); border: 1px solid rgba(176,138,74,.35); color: var(--tea);
}
.install-bar .ic { font-size: 17px; }
.install-bar .tx { flex: 1; min-width: 0; }
.install-bar .tx b { display: block; font-size: 13px; color: var(--text); }
.install-bar .go { flex: 0 0 auto; font-weight: 600; color: var(--gold); cursor: pointer; padding: 4px 6px; }
.install-bar .x { flex: 0 0 auto; color: var(--text-3); cursor: pointer; padding: 4px 2px 4px 8px; }

/* ══════════════════════════════════════════════════════════════
   我的消息（消息中心）
   ══════════════════════════════════════════════════════════════ */
.notice-item {
  background: #fff; margin: 10px 14px 0; border-radius: 12px;
  border: 1px solid var(--line); padding: 13px 14px; cursor: pointer;
}
.notice-item.unread {
  border-color: rgba(176,138,74,.5);
  background: linear-gradient(180deg, #FFFDF8, #FFFFFF);
}
.notice-item .hd { display: flex; align-items: baseline; gap: 8px; }
.notice-item .hd b { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--text); }
.notice-item .hd .tm { flex: none; font-size: 11px; color: var(--text-3); }
.notice-item .ct { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.72; }
.notice-item .ft { margin-top: 9px; display: flex; align-items: center; gap: 8px; }
.notice-item .unread-dot { font-size: 11px; color: var(--gold); letter-spacing: .5px; }
