/* ==========================================
   婚匠网 · 兰州备婚工作台
   品牌色：暖色系（橙 / 玫红 / 红 / 金黄）
   ========================================== */

:root {
  --c-primary: #E8543F;
  --c-primary-dark: #C93E2C;
  --c-primary-light: #FF7A5C;
  --c-rose: #D94B6E;
  --c-rose-light: #F5A8BC;
  --c-gold: #E8A33D;
  --c-gold-light: #F7D08A;
  --c-wine: #8E2B3E;
  --c-cream: #FFF9F4;
  --c-cream-2: #FDF3EA;
  --c-line: #F0DFD2;
  --c-ink: #3A2A26;
  --c-ink-2: #7A6459;
  --c-ink-3: #A89486;
  --c-white: #FFFFFF;
  --c-ok: #C0392B;
  --c-warn: #E8A33D;
  --grad-warm: linear-gradient(135deg, #E8543F 0%, #D94B6E 55%, #E8A33D 100%);
  --grad-soft: linear-gradient(135deg, #FFF3EC 0%, #FDECEF 100%);
  --shadow-s: 0 1px 3px rgba(142, 43, 62, .06), 0 2px 8px rgba(142, 43, 62, .05);
  --shadow-m: 0 4px 16px rgba(142, 43, 62, .08), 0 1px 4px rgba(142, 43, 62, .05);
  --shadow-l: 0 12px 40px rgba(142, 43, 62, .14);
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  background: var(--c-cream);
  color: var(--c-ink);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* ============ 顶部导航 ============ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 249, 244, .94);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--c-line);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 10px 20px 11px;
  display: flex; flex-direction: column; gap: 10px;
}
.topbar-top { display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad-warm);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: 0 3px 10px rgba(232, 84, 63, .3);
  letter-spacing: -.5px;
}
.brand-text b { display: block; font-size: 15px; letter-spacing: .5px; line-height: 1.25; }
.brand-text span { display: block; font-size: 11px; color: var(--c-ink-3); letter-spacing: 1.5px; }

/* 当前所在模块名（右侧，随时告知用户位置） */
.topbar-loc {
  margin-left: auto; font-size: 12.5px; color: var(--c-ink-3);
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.topbar-loc b { color: var(--c-primary); font-weight: 700; font-size: 13px; }
.topbar-loc svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* Tab 行：横向可滚动 + 两侧渐隐提示 */
.nav-wrap { position: relative; }
.nav-wrap::before, .nav-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 30px;
  pointer-events: none; z-index: 2; opacity: 0; transition: opacity .25s;
}
.nav-wrap::before { left: 0; background: linear-gradient(90deg, rgba(255,249,244,.98), rgba(255,249,244,0)); }
.nav-wrap::after { right: 0; background: linear-gradient(270deg, rgba(255,249,244,.98), rgba(255,249,244,0)); }
.nav-wrap.can-left::before { opacity: 1; }
.nav-wrap.can-right::after { opacity: 1; }

/* 滚动提示箭头 (PC) */
.nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--c-line); background: #fff; color: var(--c-ink-2);
  display: none; place-items: center; cursor: pointer; z-index: 3;
  box-shadow: var(--shadow-s); transition: all .18s;
}
.nav-arrow:hover { background: var(--c-primary); color: #fff; border-color: transparent; }
.nav-arrow svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav-arrow.left { left: -4px; }
.nav-arrow.right { right: -4px; }

.nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.nav::-webkit-scrollbar { display: none; }

/* 导航按钮：图标 + 文字，明确的可点击 Tab 视觉 */
.nav button {
  border: 1.5px solid var(--c-line); background: #fff; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--c-ink-2); font-weight: 500;
  padding: 7px 13px; border-radius: 22px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .18s;
}
.nav button svg {
  width: 15px; height: 15px; flex-shrink: 0;
  stroke: currentColor; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.nav button:hover { border-color: var(--c-rose-light); color: var(--c-primary); background: var(--c-cream); }
.nav button.on {
  background: var(--grad-warm); color: #fff; font-weight: 700;
  border-color: transparent; box-shadow: 0 3px 12px rgba(232,84,63,.3);
}

/* 「全部模块」按钮 + 底部面板（仅手机显示） */
.nav-all { display: none; }
.navsheet-mask, .navsheet { display: none; }

/* ============ 城市切换器 ============ */
.city-pick { position: relative; flex-shrink: 0; }
.city-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--c-line); background: #fff; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--c-ink);
  padding: 7px 12px; border-radius: 22px; transition: all .18s;
}
.city-btn:hover { border-color: var(--c-rose-light); color: var(--c-primary); background: var(--c-cream); }
.city-btn > svg:first-child { width: 15px; height: 15px; stroke: var(--c-primary); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.city-btn .caret { width: 14px; height: 14px; stroke: var(--c-ink-3); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.city-btn[aria-expanded="true"] { border-color: var(--c-primary-light); color: var(--c-primary); }
.city-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }

.city-menu {
  position: absolute; left: 0; top: calc(100% + 7px); z-index: 150;
  min-width: 150px; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--r-m); box-shadow: var(--shadow-l);
  padding: 7px; display: none; animation: pop .2s ease;
}
.city-menu.on { display: block; }
.city-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--c-ink);
  padding: 10px 12px; border-radius: var(--r-s); text-align: left;
  transition: background .16s; white-space: nowrap;
}
.city-item:hover { background: var(--c-cream); }
.city-item.on { background: var(--grad-soft); color: var(--c-primary-dark); font-weight: 700; }
.city-item svg { width: 16px; height: 16px; stroke: var(--c-primary); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.city-menu-tip {
  font-size: 11.5px; color: var(--c-ink-3); padding: 8px 12px 4px;
  border-top: 1px dashed var(--c-line); margin-top: 5px; line-height: 1.6;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 26px 20px 80px; }
.view { display: none; animation: fadeUp .35s ease; }
.view.on { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ 通用卡片 ============ */
.card {
  background: var(--c-white); border-radius: var(--r-m);
  padding: 22px; box-shadow: var(--shadow-s);
  border: 1px solid var(--c-line);
}
.card + .card { margin-top: 16px; }
.card-h {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--c-cream-2);
}
.card-h .ic {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: var(--grad-soft); border: 1px solid var(--c-line);
  display: grid; place-items: center; font-size: 15px; color: var(--c-primary);
}
.card-h .ic svg, .entry .e-ic svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card-h h3 { font-size: 16.5px; font-weight: 700; letter-spacing: .3px; }
.card-h .sub { font-size: 12.5px; color: var(--c-ink-3); margin-left: auto; }

/* ============ 首页 Hero ============ */
.hero {
  background: var(--grad-warm);
  border-radius: var(--r-l);
  padding: 40px 34px;
  color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-l);
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -70px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.hero::before {
  content: ""; position: absolute; right: 50px; bottom: -90px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.hero-in { position: relative; z-index: 2; }
.hero .tag {
  display: inline-block; font-size: 11.5px; letter-spacing: 2px;
  background: rgba(255,255,255,.2); padding: 4px 12px; border-radius: 20px;
  margin-bottom: 14px; border: 1px solid rgba(255,255,255,.28);
}
.hero h1 { font-size: 30px; line-height: 1.3; letter-spacing: .5px; margin-bottom: 10px; font-weight: 800; }
.hero p { font-size: 14.5px; opacity: .93; max-width: 640px; line-height: 1.8; }
.hero-stats { display: flex; gap: 34px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats div b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.hero-stats div span { font-size: 12px; opacity: .85; }

/* ============ 今天要处理（首页置顶区） ============ */
.today {
  margin-top: 20px; background: var(--c-white);
  border: 1px solid var(--c-line); border-left: 4px solid var(--c-primary);
  border-radius: var(--r-m); padding: 16px 20px 18px;
  box-shadow: var(--shadow-m);
}
.today-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.today-h .ic {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff;
  background: var(--grad-warm); box-shadow: 0 3px 10px rgba(232,84,63,.26);
}
.today-h .ic svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.today-h h3 { font-size: 15.5px; font-weight: 700; }
.today-n {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--c-primary); color: #fff; font-size: 12px; font-weight: 700;
  display: inline-grid; place-items: center; line-height: 1;
}
.today-h .sub { font-size: 12px; color: var(--c-ink-3); margin-left: auto; }
.today-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.today-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--c-cream); border: 1px solid var(--c-line);
}
.today-item.over { background: #FEF1EE; border-color: #F6C9BE; }
.today-item.soon { background: #FFF8EA; border-color: #F3DCB0; }
.today-item .t-flag {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px;
  background: var(--c-ink-3); color: #fff; letter-spacing: .3px;
}
.today-item.over .t-flag { background: var(--c-primary); }
.today-item.soon .t-flag { background: var(--c-gold); }
.today-item .t-tx { flex: 1 1 auto; font-size: 13.5px; line-height: 1.6; color: var(--c-ink); }
.today-item .t-tx b { color: var(--c-ink); font-weight: 700; }
.today-item .t-tx em { font-style: normal; color: var(--c-ink-3); font-size: 12px; }
.today-item .t-go {
  flex: 0 0 auto; height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1.5px solid var(--c-primary); background: #fff; color: var(--c-primary);
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all .18s;
}
.today-item .t-go:hover { background: var(--c-primary); color: #fff; }
.today-done { font-size: 13px; color: var(--c-ink-2); padding: 6px 2px; }

/* 从「今天要处理」跳到时间表后，目标项闪一下，让用户一眼找到 */
@keyframes hxjFlash {
  0%, 100% { background: transparent; }
  25%, 75% { background: #FFF1D6; }
}
.chk.flash { animation: hxjFlash 1.6s ease; border-radius: 8px; }

/* ============ 首页功能入口 ============ */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 22px; }
.entry {
  background: var(--c-white); border: 1px solid var(--c-line);
  border-radius: var(--r-m); padding: 20px; cursor: pointer;
  transition: all .22s; text-align: left; font-family: inherit;
  box-shadow: var(--shadow-s); position: relative; overflow: hidden;
}
.entry::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grad-warm); opacity: 0; transition: opacity .22s;
}
.entry:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: var(--c-rose-light); }
.entry:hover::before { opacity: 1; }
.entry .e-ic {
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 12px;
  display: grid; place-items: center; color: #fff;
  background: var(--grad-warm); box-shadow: 0 4px 12px rgba(232, 84, 63, .24);
}
.entry .e-ic svg { width: 20px; height: 20px; }
.entry h4 { font-size: 15.5px; margin-bottom: 5px; font-weight: 700; }
.entry p { font-size: 12.5px; color: var(--c-ink-3); line-height: 1.6; }

/* ============ 进度环 ============ */
.ring-wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring-c {
  position: absolute; inset: 0; display: grid; place-items: center;
  text-align: center;
}
.ring-c b { font-size: 27px; font-weight: 800; color: var(--c-primary); display: block; line-height: 1.1; }
.ring-c span { font-size: 11px; color: var(--c-ink-3); letter-spacing: 1px; }

/* ============ 表单元素 ============ */
label.fl { display: block; font-size: 12.5px; color: var(--c-ink-2); margin-bottom: 6px; font-weight: 600; letter-spacing: .3px; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=tel], select, textarea {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--c-ink);
  padding: 10px 12px; border: 1.5px solid var(--c-line); border-radius: var(--r-s);
  background: var(--c-cream); outline: none; transition: all .18s;
}
/* 行内小输入（如宾客列表的礼金框）：不吃通用宽度/内边距/高度 */
input.gift-input {
  width: 56px; padding: 0 6px; min-height: 0; height: 24px;
  border-radius: 6px; background: #fff; font-size: 13px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--c-primary-light); background: #fff;
  box-shadow: 0 0 0 3px rgba(232, 84, 63, .1);
}
select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%237A6459' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.row { display: grid; gap: 14px; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c3 { grid-template-columns: repeat(3, 1fr); }
.row.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .row.c2, .row.c3, .row.c4 { grid-template-columns: 1fr; } }

/* ============ 按钮 ============ */
.btn {
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--r-s); border: 0;
  cursor: pointer; transition: all .18s; letter-spacing: .3px;
}
.btn-p { background: var(--grad-warm); color: #fff; box-shadow: 0 3px 12px rgba(232,84,63,.28); }
.btn-p:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(232,84,63,.34); }
.btn-g { background: var(--c-cream-2); color: var(--c-ink-2); border: 1.5px solid var(--c-line); }
.btn-g:hover { background: #fff; color: var(--c-primary); border-color: var(--c-rose-light); }
.btn-s { padding: 6px 13px; font-size: 12.5px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.seed-tip {
  margin: 12px 0 0; padding: 10px 14px; font-size: 12.5px; line-height: 1.7;
  color: #7A5A50; background: var(--c-cream);
  border: 1px dashed var(--c-line); border-radius: 12px;
}
.seed-tip b { color: var(--c-primary); font-weight: 700; }

/* ============ 数据备份卡片 ============ */
.bk-row { display: flex; gap: 12px; margin: 14px 0 4px; flex-wrap: wrap; }
.bk-stat {
  flex: 1 1 130px;
  background: var(--grad-soft);
  border: 1px solid var(--c-line);
  border-radius: var(--r-m);
  padding: 12px 15px;
}
.bk-stat b {
  display: block; font-size: 21px; font-weight: 800;
  color: var(--c-primary-dark); line-height: 1.25;
}
.bk-stat span { font-size: 12px; color: var(--c-ink-3); }

/* 两种方式的排版分组 */
.bk-sec {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px dashed var(--c-line);
}
.bk-sec-h { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.bk-sec-h b { font-size: 14.5px; color: var(--c-ink); font-weight: 800; }
.bk-num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--grad-warm); color: #fff;
  font-size: 12px; font-weight: 800; line-height: 20px; text-align: center;
}
.bk-tag {
  margin-left: auto; flex-shrink: 0;
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  color: var(--c-ink-3); background: var(--c-cream-2); border: 1px solid var(--c-line);
}
.bk-tag.on { color: #fff; background: var(--grad-warm); border-color: transparent; }
.bk-tag.warn { color: var(--c-primary-dark); background: #FFF1EE; border-color: #F8CFC6; }
.bk-sec-p { margin: 0 0 4px; font-size: 12.5px; line-height: 1.75; color: #7A5A50; }
.bk-sec-p b { color: var(--c-primary); }
.note-warn {
  margin: 12px 0 0; padding: 11px 14px; font-size: 12.5px; line-height: 1.75;
  color: #8A4A38; background: #FFF7F4;
  border: 1px solid #F8D6CB; border-left: 3px solid var(--c-primary);
  border-radius: 10px;
}
.note-warn b { color: var(--c-primary-dark); }

/* 同步码展示 */
.sync-code-box {
  margin: 14px 0 0; padding: 14px 16px; border-radius: var(--r-m);
  background: var(--grad-soft); border: 1px dashed var(--c-rose-light);
}
.sync-code-lb { font-size: 11.5px; letter-spacing: 1px; color: var(--c-ink-3); margin-bottom: 7px; }
.sync-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 19px; font-weight: 800; letter-spacing: 1.6px;
  color: var(--c-primary-dark); word-break: break-all; line-height: 1.45;
}
.sync-code.hide { filter: blur(5px); user-select: none; }
.sync-code-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sync-meta {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px;
}
.sync-meta > div {
  flex: 1 1 140px; padding: 10px 13px; border-radius: var(--r-s);
  background: var(--c-cream); border: 1px solid var(--c-line);
}
.sync-meta span { display: block; font-size: 11.5px; color: var(--c-ink-3); margin-bottom: 3px; }
.sync-meta b { font-size: 12.5px; color: var(--c-ink); font-weight: 700; }
.btn-o {
  background: #fff; color: var(--c-ink-3);
  border: 1.5px solid var(--c-line); font-size: 13px;
}
.btn-o:hover { color: var(--c-primary); border-color: var(--c-rose-light); }

/* 同步码输入框（HXJ- 为固定前缀，不参与输入，避免边打边串位） */
.sync-input-wrap {
  display: flex; align-items: center;
  border: 1.5px solid var(--c-line); border-radius: var(--r-s);
  background: #fff; overflow: hidden; transition: border-color .18s;
}
.sync-input-wrap:focus-within { border-color: var(--c-primary); }
.sync-prefix {
  flex-shrink: 0; padding: 13px 0 13px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px; font-weight: 800; letter-spacing: 1.4px;
  color: var(--c-primary-dark); user-select: none;
}
.sync-input {
  flex: 1 1 auto; min-width: 0; box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px !important; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase;
  padding: 13px 14px 13px 2px;
  border: 0; background: transparent; color: var(--c-ink); outline: none;
}
.sync-input::placeholder { color: #C9B8AC; letter-spacing: 1.4px; font-weight: 600; }
.sync-input-wrap.err { border-color: var(--c-primary); background: #FFF7F4; }
.sm-hint { margin: 8px 0 0; font-size: 12px; color: var(--c-ink-3); line-height: 1.6; }
.sm-hint.err { color: var(--c-primary-dark); font-weight: 600; }
.sm-chk {
  display: flex; align-items: center; gap: 8px; margin: 13px 0 0;
  font-size: 13px; color: var(--c-ink-2); cursor: pointer; user-select: none;
}
.sm-chk input { width: 17px; height: 17px; accent-color: var(--c-primary); cursor: pointer; }
.modal-sync { max-width: 460px; }
.modal .btn:disabled { cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn-o:disabled, .btn-p:disabled, .btn-g:disabled { opacity: .6; }

@media (max-width: 640px) {
  .bk-stat { padding: 10px 12px; }
  .bk-stat b { font-size: 19px; }
  .sync-code { font-size: 16px; letter-spacing: 1.1px; }
  .bk-sec-h b { font-size: 13.8px; }
  .sync-input, .sync-prefix { font-size: 16px !important; letter-spacing: 1px; }
}

/* ============ 表格 ============ */
.tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tb th {
  text-align: left; padding: 11px 12px; font-size: 12.5px; font-weight: 700;
  color: var(--c-ink-2); background: var(--c-cream-2);
  border-bottom: 1.5px solid var(--c-line); white-space: nowrap;
}
.tb th:first-child { border-radius: var(--r-s) 0 0 0; }
.tb th:last-child { border-radius: 0 var(--r-s) 0 0; }
.tb td { padding: 11px 12px; border-bottom: 1px solid var(--c-cream-2); vertical-align: top; }
.tb tr:last-child td { border-bottom: 0; }
.tb tbody tr:hover { background: var(--c-cream); }
.tb-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--r-m); background: #fff; }

/* ============ 复选框清单 ============ */
.chk {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 13px; border-radius: var(--r-s); cursor: pointer;
  transition: background .15s; border: 1px solid transparent;
}
.chk:hover { background: var(--c-cream); }
.chk input { display: none; }
.chk .box {
  width: 19px; height: 19px; border-radius: 6px; flex-shrink: 0; margin-top: 2px;
  border: 1.8px solid var(--c-line); background: #fff;
  display: grid; place-items: center; transition: all .18s;
}
.chk .box::after {
  content: ""; width: 9px; height: 5px; border-left: 2.2px solid #fff;
  border-bottom: 2.2px solid #fff; transform: rotate(-45deg) scale(0);
  transition: transform .18s; margin-top: -2px;
}
.chk input:checked + .box { background: var(--grad-warm); border-color: transparent; }
.chk input:checked + .box::after { transform: rotate(-45deg) scale(1); }
.chk .tx { font-size: 13.8px; line-height: 1.65; color: var(--c-ink); flex: 1; }
.chk .tx small { display: block; font-size: 12px; color: var(--c-ink-3); margin-top: 2px; line-height: 1.55; }
.chk input:checked ~ .tx { color: var(--c-ink-3); text-decoration: line-through; text-decoration-color: var(--c-rose-light); }

/* ============ 徽标 ============ */
.pill {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 20px; letter-spacing: .5px;
  background: var(--grad-soft); color: var(--c-wine); border: 1px solid var(--c-line);
}
.pill.hot { background: linear-gradient(135deg,#FFE8E3,#FFD9E0); color: var(--c-primary-dark); }
.pill.gold { background: linear-gradient(135deg,#FFF3DC,#FFE8C2); color: #A06A10; }

/* ============ 提示条 ============ */
.note {
  background: var(--grad-soft); border-left: 3px solid var(--c-primary);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  padding: 13px 16px; font-size: 13.2px; line-height: 1.75; color: var(--c-ink-2);
  margin: 14px 0;
}
.note b { color: var(--c-primary-dark); }
.note.warn { background: linear-gradient(135deg,#FFF8E8,#FFF1DC); border-left-color: var(--c-gold); }
.note.warn b { color: #A06A10; }

/* ============ 预算条 ============ */
.bud-row {
  margin-bottom: 14px; padding: 14px 16px;
  border: 1px solid var(--c-line); border-radius: var(--r-m);
  background: #fff; transition: border-color .2s, box-shadow .2s;
}
.bud-row:hover { border-color: var(--c-rose-light); box-shadow: var(--shadow-s); }
.bud-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; gap: 12px; flex-wrap: wrap; }
.bud-top .nm { font-size: 14px; font-weight: 600; }
.bud-top .nm em { font-style: normal; font-size: 11.5px; color: var(--c-ink-3); margin-left: 8px; }
.bud-top .num { font-size: 14.5px; font-weight: 700; color: var(--c-primary); font-variant-numeric: tabular-nums; }
.bud-bar { height: 7px; background: var(--c-cream-2); border-radius: 20px; overflow: hidden; margin-bottom: 11px; }
.bud-bar i { display: block; height: 100%; border-radius: 20px; background: var(--grad-warm); transition: width .5s cubic-bezier(.4,0,.2,1); }
.bud-bar i.over { background: linear-gradient(90deg,#C0392B,#8E2B3E); }

/* 预算行内的紧凑输入框 */
.bud-in { display: flex; align-items: center; gap: 9px; }
.bud-in .pfx { font-size: 13px; color: var(--c-ink-3); font-weight: 600; flex-shrink: 0; }
.bud-in input {
  width: 150px; font-size: 13.5px; padding: 7px 10px;
  background: var(--c-cream); border-radius: var(--r-s);
}
.bud-in .hint { font-size: 11.5px; color: var(--c-ink-3); margin-left: auto; }
.bud-in .hint b { color: var(--c-ink-2); font-weight: 600; }

/* ============ 大数字卡 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat {
  background: var(--grad-soft); border: 1px solid var(--c-line);
  border-radius: var(--r-m); padding: 15px 17px;
}
.stat span { display: block; font-size: 12px; color: var(--c-ink-3); margin-bottom: 5px; letter-spacing: .5px; }
.stat b { font-size: 21px; font-weight: 800; color: var(--c-primary-dark); font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat b small { font-size: 12.5px; font-weight: 600; color: var(--c-ink-2); margin-left: 2px; }

/* ============ 时间表 ============ */
.tl { position: relative; padding-left: 30px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--c-primary), var(--c-rose-light), var(--c-gold-light)); border-radius: 2px; }
.tl-item { position: relative; margin-bottom: 22px; }
.tl-item::before {
  content: ""; position: absolute; left: -26px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-cream);
}
.tl-item.done::before { background: var(--c-primary); }
.tl-item.done .tl-h { color: var(--c-ink-3); }
.tl-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tl-h b { font-size: 14.8px; font-weight: 700; }
.tl-h .dd { font-size: 12px; color: var(--c-ink-3); }

/* ============ 吉日 ============ */
.day-good, .day-bad {
  display: flex; gap: 10px; padding: 11px 13px; border-radius: var(--r-s);
  font-size: 13.2px; margin-bottom: 8px; align-items: flex-start;
}
.day-good { background: linear-gradient(135deg,#FFF3EC,#FDECEF); border: 1px solid var(--c-line); }
.day-bad { background: linear-gradient(135deg,#FFF0E6,#FDE8E3); border: 1px solid #F5D5CC; }
.day-good b, .day-bad b { font-size: 18px; line-height: 1.2; flex-shrink: 0; }

/* ============ 宾客桌位 ============ */
.g-toolbar { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.g-toolbar input, .g-toolbar select { font-size: 13.5px; padding: 9px 12px; }

/* 宾客行（PC 表格 / 手机卡片） */
.g-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: var(--r-m);
  border: 1px solid var(--c-line); background: #fff;
  margin-bottom: 9px; transition: all .18s;
}
.g-row:hover { border-color: var(--c-rose-light); box-shadow: var(--shadow-s); }
.g-row.g-off { opacity: .5; background: var(--c-cream-2); }
.g-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 15px; font-weight: 700; color: #fff;
  background: var(--grad-warm); letter-spacing: 0;
}
.g-main { flex: 1; min-width: 0; }
.g-name { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-meta { font-size: 12.5px; color: var(--c-ink-3); margin-top: 5px; line-height: 1.6; word-break: break-word; overflow-wrap: anywhere; }
/* 人数 + 礼金 + 备注：各段独立成块，避免礼金输入框被拆行 */
.g-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.g-meta .gm-seg { display: inline-flex; align-items: center; flex-wrap: nowrap; flex: 0 0 auto; }
.g-meta .gm-note { flex: 1 1 100%; margin-top: 2px; }
.g-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.g-act {
  border: 0; background: var(--c-cream-2); color: var(--c-ink-2);
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  display: grid; place-items: center; transition: all .16s;
}
.g-act:hover { background: var(--c-primary); color: #fff; }
.g-act svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 分组筛选胶囊 */
.g-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.g-chip {
  border: 1.5px solid var(--c-line); background: #fff; color: var(--c-ink-2);
  font-family: inherit; font-size: 12.5px; padding: 6px 13px; border-radius: 20px;
  cursor: pointer; transition: all .16s; white-space: nowrap;
}
.g-chip:hover { border-color: var(--c-rose-light); color: var(--c-primary); }
.g-chip.on { background: var(--grad-warm); color: #fff; border-color: transparent; font-weight: 600; }

/* 桌位看板 */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 13px; }
.t-card {
  border: 1px solid var(--c-line); border-radius: var(--r-m); background: #fff;
  overflow: hidden; transition: all .2s;
}
.t-card:hover { border-color: var(--c-rose-light); box-shadow: var(--shadow-m); }
.t-card.t-full { border-color: var(--c-gold-light); }
.t-card.t-empty { opacity: .62; border-style: dashed; }
.t-head {
  display: flex; align-items: center; gap: 9px; padding: 11px 14px;
  background: var(--grad-soft); border-bottom: 1px solid var(--c-line);
}
.t-head b { font-size: 14px; font-weight: 700; }
.t-head .t-cnt {
  margin-left: auto; font-size: 12px; font-weight: 700; color: var(--c-primary-dark);
  background: #fff; padding: 2px 10px; border-radius: 20px; border: 1px solid var(--c-line);
  font-variant-numeric: tabular-nums;
}
.t-body { padding: 10px 12px 12px; }
.t-p { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 7px; font-size: 13px; margin-bottom: 3px; background: var(--c-cream); }
.t-p span.nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-p em { font-style: normal; font-size: 11.5px; color: var(--c-ink-3); flex-shrink: 0; }
.t-p .mv { border: 0; background: transparent; color: var(--c-ink-3); cursor: pointer; font-size: 14px; padding: 0 3px; line-height: 1; }
.t-p .mv:hover { color: var(--c-primary); }
.t-void { text-align: center; font-size: 12.5px; color: var(--c-ink-3); padding: 12px 0; }
.t-void b { color: var(--c-primary); }

/* 席位卡 */
.card-item {
  border: 1px solid var(--c-line); border-radius: var(--r-m);
  padding: 14px 16px; margin-bottom: 11px; background: var(--c-cream);
}
.card-item h5 {
  font-size: 14px; margin-bottom: 7px; color: var(--c-wine);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.card-item p { font-size: 13.2px; color: var(--c-ink-2); line-height: 1.8; }

/* 桌位卡：侧别汇总标签 */
.sc-tags { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; }
.sc-tag {
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
/* 桌位卡：每位宾客一行（侧别标签 + 姓名 + 人数） */
.sc-list { display: flex; flex-direction: column; }
.sc-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px dashed var(--c-line);
  font-size: 13.2px;
}
.sc-row:last-child { border-bottom: 0; }
.sc-side {
  flex-shrink: 0; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px; border: 1px solid transparent;
  white-space: nowrap;
}
.sc-nm { flex: 1 1 auto; font-weight: 600; color: var(--c-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-cnt { flex-shrink: 0; font-size: 11.5px; color: var(--c-ink-3); }

@media (max-width: 640px) {
  .card-item { padding: 12px 13px; }
  .sc-row { font-size: 12.8px; gap: 6px; }
  .sc-side { font-size: 10px; padding: 2px 5px; }
}

/* ============ 礼金台账 ============ */
.side-pill {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px; vertical-align: middle;
}
/* 礼金输入区：整体不可断行；宽度自适应内容 */
.gift-inline {
  display: inline-flex; align-items: center; gap: 3px;
  white-space: nowrap; flex-wrap: nowrap; vertical-align: middle;
}
.gift-input {
  width: 56px; flex: 0 0 auto; font-size: 13px; font-weight: 700; text-align: right;
  height: 24px; min-height: 0; padding: 0 6px;
  border: 1px solid var(--c-line); border-radius: 6px;
  background: #fff; color: var(--c-primary-dark); outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s; font-family: inherit;
  box-sizing: border-box; line-height: 22px;
}
.gift-inline .gi-unit { flex: 0 0 auto; font-size: 12px; }
.gift-inline .gi-tag { flex: 0 0 auto; font-size: 12px; color: var(--c-ink-3); }
.gift-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(232,84,63,.1); }
.gift-input.saved { background: #EAF7EE; border-color: #9FD8B0; }
.gift-input::placeholder { color: #C9B8AC; font-weight: 400; }
/* 去掉数字输入框的上下箭头，省空间 */
.gift-input::-webkit-outer-spin-button,
.gift-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gift-input[type=number] { -moz-appearance: textfield; }

.gift-sum { margin: 14px 0 4px; }
.gift-total {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: var(--grad-soft); border: 1px solid var(--c-line);
  border-radius: var(--r-m); padding: 14px 18px;
}
.gift-total span { font-size: 13px; color: var(--c-ink-3); }
.gift-total b { font-size: 26px; font-weight: 800; color: var(--c-primary-dark); letter-spacing: .5px; }
.gift-total i { font-size: 12px; color: var(--c-ink-3); font-style: normal; margin-left: auto; }
.gift-sides { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.gift-side {
  flex: 1 1 120px; border: 1px solid var(--c-line); border-radius: var(--r-s);
  padding: 11px 14px; display: flex; flex-direction: column; gap: 2px;
}
.gift-side span { font-size: 12px; font-weight: 700; }
.gift-side b { font-size: 19px; font-weight: 800; line-height: 1.25; }
.gift-side i { font-size: 11px; font-style: normal; opacity: .75; }
.gift-hint { margin-top: 10px; font-size: 12px; color: var(--c-ink-3); }

@media (max-width: 640px) {
  .gift-total { padding: 12px 14px; gap: 6px; }
  .gift-total b { font-size: 22px; }
  .gift-total i { margin-left: 0; flex-basis: 100%; }
  /* 行内礼金框：保持小尺寸，只放大字号与轻触高度（不撑满整行） */
  .gift-input, input.gift-input { width: 58px; font-size: 13.5px; height: 26px; line-height: 24px; padding: 0 6px; }
  .gift-inline { gap: 4px; }
  .gift-side { flex: 1 1 calc(50% - 5px); padding: 9px 11px; }
  .gift-side b { font-size: 17px; }
}

/* 宾客编辑弹窗 */
.modal-guest { max-width: 520px; }
.gm-seat {
  margin-top: 14px; padding: 10px 14px; border-radius: var(--r-s);
  background: var(--c-cream); border: 1px dashed var(--c-line);
  font-size: 12.5px; color: var(--c-ink-2);
}


/* ==========================================
   移动端优化
   ========================================== */

/* 平板 */
@media (max-width: 900px) {
  .row.c4 { grid-template-columns: 1fr 1fr; }
  /* 平板起 Tab 行改为可滚动 */
  .nav { overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { padding: 7px 12px; font-size: 12.5px; gap: 5px; }
  .nav button svg { width: 14px; height: 14px; }
}

@media (max-width: 768px) {
  /* 表格改为卡片列表（宾客/比价/区域表） */
  .tb thead { display: none; }
  .tb, .tb tbody, .tb tr, .tb td { display: block; width: 100%; }
  .tb tr {
    border: 1px solid var(--c-line); border-radius: var(--r-m);
    margin-bottom: 10px; padding: 12px 14px; background: #fff;
  }
  .tb tr:hover { background: #fff; }
  .tb td {
    border: 0; padding: 4px 0; display: flex; align-items: flex-start; gap: 10px;
    justify-content: space-between; text-align: right;
  }
  .tb td::before {
    content: attr(data-th);
    font-size: 12px; color: var(--c-ink-3); font-weight: 600;
    flex-shrink: 0; text-align: left; padding-top: 1px;
  }
  .tb td:empty { display: none; }

  /* 供应商比价：手机走 .vd-m 横滑卡，PC 表格在此处隐藏（见 .vd-m/.vd-pc） */
  .vd-tb td[data-th=""]::before { display: none; }
  .vd-tb td.vd-op { justify-content: flex-end; padding-top: 8px; border-top: 1px dashed var(--c-line); margin-top: 6px; }
  .vd-tb td.vd-op .btn { width: auto; }
}

/* ============ 四大金刚比价：双端布局 ============ */
.vd-group { margin-bottom: 24px; }
.vd-group:last-child { margin-bottom: 4px; }
.vd-group-h {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-bottom: 11px; padding-bottom: 9px;
  border-bottom: 2px solid var(--c-cream-2);
}
.vd-group-h > b { font-size: 15.5px; }

/* 手机横滑卡：默认隐藏，PC 表格默认显示 */
.vd-m { display: none; }
.vd-pc { display: block; }

@media (max-width: 768px) {
  /* 手机：表格隐藏，改用单列紧凑条目 */
  .vd-pc { display: none !important; }
  .vd-m { display: block; }
  .vd-group-h { gap: 7px; margin-bottom: 9px; padding-bottom: 8px; }
  .vd-group-h > b { font-size: 15px; }

  /* 单列条目：一家一行，上下留白压到最小，一屏能看 3-4 家 */
  .vd-row {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 8px 11px; border-radius: 11px;
    border: 1px solid var(--c-line); background: #fff;
    margin-bottom: 7px;
  }
  .vd-row:last-child { margin-bottom: 0; }
  /* 排名徽标：直接告诉你哪家最便宜 */
  .vd-rank {
    flex: 0 0 22px; width: 22px; height: 22px; border-radius: 7px;
    display: grid; place-items: center; margin-top: 0;
    font-size: 11.5px; font-weight: 800;
    background: var(--c-cream-2); color: var(--c-ink-3);
  }
  .vd-row.vd-best { border-color: var(--c-primary); background: linear-gradient(180deg,#FFF7F4,#fff 60%); }
  .vd-row.vd-best .vd-rank { background: var(--grad-warm); color: #fff; box-shadow: 0 2px 7px rgba(232,84,63,.32); }

  .vd-body { flex: 1; min-width: 0; }

  /* 第一行：供应商名 + 报价 */
  .vd-l1 { display: flex; align-items: baseline; gap: 9px; justify-content: space-between; }
  .vd-l1 .vd-name {
    font-size: 14.5px; font-weight: 700; color: var(--c-ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
  }
  .vd-l1 .vd-price {
    flex-shrink: 0; font-size: 16.5px; font-weight: 800;
    color: var(--c-primary-dark); letter-spacing: -.3px;
    display: inline-flex; align-items: baseline; gap: 5px;
  }
  .vd-l1 .vd-price em {
    font-style: normal; font-size: 10.5px; font-weight: 700;
    padding: 1px 5px; border-radius: 10px; letter-spacing: 0;
  }
  .vd-l1 .vd-price em.low { color: #fff; background: var(--grad-warm); }
  .vd-l1 .vd-price em.up { color: #B4453A; background: #FDECEA; }
  .vd-l1 .vd-price em.down { color: #2E7D4F; background: #EAF7EE; }

  /* 第二行：时长 / 状态 / 偏高 / 删除 */
  .vd-l2 {
    display: flex; align-items: center; gap: 6px;
    margin-top: 3px; font-size: 11.8px; color: var(--c-ink-3);
    min-width: 0;
  }
  .vd-l2 .vd-dur { flex: 0 0 auto; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vd-l2 .pill { font-size: 10.5px; padding: 1px 7px; }
  .vd-l2 .vd-del {
    flex-shrink: 0; margin-left: auto;
    border: 0; background: transparent; cursor: pointer; padding: 4px;
    display: inline-flex; align-items: center; color: var(--c-ink-3);
    border-radius: 7px; transition: all .16s;
  }
  .vd-l2 .vd-del:active { background: #FDECEA; color: #B4453A; }
  .vd-l2 .vd-del svg {
    width: 15px; height: 15px; stroke: currentColor; fill: none;
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  }

  /* 备注：跟在第二行末尾，单行省略，不额外占高度 */
  .vd-note {
    flex: 1 1 40px; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--c-ink-3); opacity: .85;
  }
}

@media (max-width: 640px) {
  .wrap { padding: 14px 12px calc(80px + env(safe-area-inset-bottom)); }
  .card { padding: 16px 14px; border-radius: 12px; }
  .card + .card { margin-top: 12px; }
  .card-h { margin-bottom: 13px; padding-bottom: 10px; }
  .card-h h3 { font-size: 15.5px; }
  .card-h .sub { font-size: 11.5px; }

  /* 手机端顶部栏：品牌 / 城市 / 全部模块 一行，当前模块名移到 Tab 行 */
  .topbar-inner { padding: 8px 12px 8px; gap: 8px; }
  .brand-logo { width: 32px; height: 32px; font-size: 15px; border-radius: 10px; }
  .brand-text b { font-size: 13.5px; }
  .brand-text span { display: none; }
  /* 「当前：XXX」在手机上很占位，收成 Tab 行左侧的小徽标 */
  .topbar-loc {
    display: inline-flex; font-size: 0;
    margin-left: auto; flex-shrink: 0;
  }
  .topbar-loc b {
    font-size: 12px; padding: 4px 10px; border-radius: 20px;
    background: var(--c-cream-2); color: var(--c-primary);
    max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  /* 「全部模块」按钮：手机才出现 */
  .nav-all {
    display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
    border: 1.5px solid var(--c-line); background: #fff; cursor: pointer;
    font-family: inherit; font-size: 12px; font-weight: 700; color: var(--c-ink-2);
    padding: 6px 11px; min-height: 32px; border-radius: 20px;
    transition: all .18s;
  }
  .nav-all svg {
    width: 14px; height: 14px; stroke: currentColor; fill: none;
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  }
  .nav-all:active { background: var(--c-cream); border-color: var(--c-rose-light); color: var(--c-primary); }

  /* 城市切换器：手机端紧凑，菜单对齐右侧防溢出 */
  .topbar-top { gap: 8px; flex-wrap: nowrap; overflow: visible; }
  .city-btn { font-size: 12.5px; padding: 6px 11px; min-height: 32px; }
  .city-btn > svg:first-child { width: 14px; height: 14px; }
  .city-menu { min-width: 132px; }
  .city-item { font-size: 14px; padding: 11px 12px; min-height: 44px; }

  /* Tab 行：手机端只保留「当前模块 + 相邻模块」，其余收进「全部模块」面板 */
  .nav { margin-left: 0; gap: 6px; -webkit-overflow-scrolling: touch;
    overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav button {
    padding: 7px 12px; font-size: 12.5px; min-height: 38px; gap: 5px;
  }
  .nav button svg { width: 14px; height: 14px; }
  .nav-wrap::before, .nav-wrap::after { width: 22px; }
  .nav-arrow { display: none !important; }

  /* ---- 底部「全部模块」面板 ---- */
  .navsheet-mask {
    display: block; position: fixed; inset: 0; z-index: 300;
    background: rgba(58, 42, 34, .42);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .24s;
  }
  .navsheet-mask.on { opacity: 1; pointer-events: auto; }
  .navsheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 301;
    background: #fff; border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(120, 80, 60, .22);
    padding: 8px 14px calc(18px + env(safe-area-inset-bottom));
    transform: translateY(102%); transition: transform .28s cubic-bezier(.22,.9,.3,1);
    max-height: 76vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .navsheet.on { transform: translateY(0); }
  .navsheet-grab {
    width: 38px; height: 4px; border-radius: 4px; background: var(--c-line);
    margin: 2px auto 10px;
  }
  .navsheet-h {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 10px; margin-bottom: 12px;
    border-bottom: 1px solid var(--c-cream-2);
  }
  .navsheet-h b { font-size: 15px; }
  .navsheet-x {
    border: 0; background: var(--c-cream-2); color: var(--c-ink-2);
    width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
    display: grid; place-items: center;
  }
  .navsheet-x svg {
    width: 15px; height: 15px; stroke: currentColor; fill: none;
    stroke-width: 2.2; stroke-linecap: round;
  }
  .navsheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
  .navsheet-item {
    border: 1.5px solid var(--c-line); background: #fff; cursor: pointer;
    font-family: inherit; border-radius: 13px;
    padding: 13px 4px 11px; min-height: 76px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    transition: all .16s;
  }
  .navsheet-item svg {
    width: 21px; height: 21px; stroke: var(--c-primary); fill: none;
    stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round;
  }
  .navsheet-item span {
    font-size: 11.5px; color: var(--c-ink-2); font-weight: 600;
    line-height: 1.2; text-align: center; letter-spacing: -.2px;
  }
  .navsheet-item.on {
    background: var(--grad-warm); border-color: transparent;
    box-shadow: 0 4px 14px rgba(232,84,63,.3);
  }
  .navsheet-item.on svg { stroke: #fff; }
  .navsheet-item.on span { color: #fff; }

  /* Hero */
  .hero { padding: 24px 18px; border-radius: 18px; }
  .hero .tag { font-size: 10.5px; padding: 3px 10px; margin-bottom: 11px; }
  .hero h1 { font-size: 21px; line-height: 1.35; }
  .hero p { font-size: 13.5px; line-height: 1.75; }
  .hero-stats { gap: 0; margin-top: 20px; }
  .hero-stats div { flex: 1; min-width: 0; }
  .hero-stats div b { font-size: 19px; }
  .hero-stats div span { font-size: 11px; }

  /* 表单：单列 + 大触控区 + 防 iOS 缩放 */
  .row.c2, .row.c3, .row.c4 { grid-template-columns: 1fr; gap: 12px; }
  input[type=text], input[type=number], input[type=date], input[type=time], input[type=tel], select, textarea {
    font-size: 16px; padding: 12px 13px; min-height: 46px;
  }
  /* 行内礼金框例外：不吃 46px 高度和 12px 内边距，保持小巧，避免撑破一行 */
  input.gift-input, .gift-input {
    width: 58px; height: 26px; min-height: 0; padding: 0 6px;
    font-size: 13.5px; line-height: 24px;
  }
  label.fl { font-size: 13px; margin-bottom: 5px; }
  .btn {
    min-height: 46px; font-size: 14.5px; padding: 11px 18px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .btn-row { gap: 9px; }
  .btn-row .btn { flex: 1 1 auto; }
  .btn-s { min-height: 44px; padding: 8px 15px; font-size: 13px; }

  /* 功能入口：两列更紧凑 */
  .entry-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
  .entry { padding: 15px 13px; border-radius: 12px; }
  .entry .e-ic { width: 34px; height: 34px; border-radius: 10px; margin-bottom: 9px; }
  .entry .e-ic svg { width: 17px; height: 17px; }
  .entry h4 { font-size: 14px; margin-bottom: 4px; }
  .entry p { font-size: 11.5px; line-height: 1.5; }

  /* 统计卡：两列 */
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat { padding: 12px 13px; border-radius: 11px; }
  .stat span { font-size: 11px; }
  .stat b { font-size: 18px; }

  /* 进度环：横排 */
  .ring-wrap { gap: 16px; }
  .ring { width: 96px; height: 96px; }
  .ring svg { width: 96px; height: 96px; }
  .ring-c b { font-size: 21px; }
  .ring-c span { font-size: 10px; }

  /* 预算行 */
  .bud-row { padding: 12px 13px; border-radius: 11px; margin-bottom: 11px; }
  .bud-top { flex-direction: column; align-items: flex-start; gap: 3px; }
  .bud-top .nm { font-size: 13.5px; }
  .bud-top .nm em { display: block; margin: 2px 0 0; font-size: 11px; }
  .bud-top .num { font-size: 14px; align-self: flex-end; margin-top: -18px; }
  .bud-in { flex-wrap: wrap; gap: 7px; }
  .bud-in input { width: 100%; flex: 1; min-width: 110px; font-size: 16px; }
  .bud-in .hint { margin-left: 0; width: 100%; text-align: right; }

  /* 时间表 */
  .tl { padding-left: 24px; }
  .tl::before { left: 7px; }
  .tl-item::before { left: -21px; width: 10px; height: 10px; }
  .tl-h { gap: 7px; }
  .tl-h b { font-size: 14.5px; }
  .tl-h .dd { font-size: 11px; }

  /* 清单勾选：加大触摸区域 */
  .chk { padding: 11px 10px; min-height: 46px; align-items: flex-start; }
  .chk .box { width: 21px; height: 21px; }
  .chk .tx { font-size: 14px; line-height: 1.6; }
  .chk .tx small { font-size: 12.5px; line-height: 1.6; }

  /* 宾客 */
  .g-toolbar { grid-template-columns: 1fr; gap: 8px; }
  .g-toolbar input, .g-toolbar select { font-size: 16px; }
  .g-chips { gap: 6px; }
  .g-chip { font-size: 12.5px; padding: 7px 13px; min-height: 36px; display: inline-flex; align-items: center; }
  .g-row { padding: 10px 12px 8px; gap: 6px 11px; border-radius: 11px; flex-wrap: wrap; }
  .g-avatar { width: 34px; height: 34px; font-size: 14px; }
  /* 头像右侧主体占满剩余宽度；操作按钮换到第二行右对齐，紧凑不空档 */
  .g-main { flex: 1 1 calc(100% - 45px); min-width: 0; }
  .g-right { flex: 0 0 100%; justify-content: flex-end; margin-top: -6px; }
  .g-right .g-act { width: 32px; height: 32px; }
  .g-name { font-size: 14px; }
  .g-meta { font-size: 12px; margin-top: 3px; }
  .g-act { width: 34px; height: 34px; }

  /* 桌位看板：单列 */
  .t-grid { grid-template-columns: 1fr; gap: 10px; }
  .t-head { padding: 10px 13px; }
  .t-head b { font-size: 13.5px; }
  .t-p {
    font-size: 13px; padding: 8px 9px; gap: 8px;
    min-height: 44px;
  }
  .t-p span.nm { font-size: 13.5px; }
  .t-p .mv {
    font-size: 16px; padding: 4px 9px; min-width: 36px; min-height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border-radius: 8px; border: 1px solid var(--c-line);
    color: var(--c-ink-2);
  }
  .t-p .mv:active { background: var(--c-primary); color: #fff; border-color: transparent; }

  /* 表格（若未被卡片化） */
  .tb { font-size: 13px; }
  .tb th, .tb td { padding: 9px 10px; }

  /* 弹窗 */
  .mask { padding: 16px; align-items: flex-end; }
  .modal { padding: 22px 18px; border-radius: var(--r-l) var(--r-l) 0 0; max-width: 100%; }
  .modal h3 { font-size: 17.5px; }
  .wx-box b { font-size: 20px; }
  .gift-list li { font-size: 13px; }
  .modal .btn-row .btn { flex: 1; }

  /* 悬浮按钮：移动端更紧凑，避开安全区 */
  .fab {
    right: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
    padding: 10px 16px; font-size: 12.5px; border-radius: 30px;
  }
  .fab svg { width: 15px; height: 15px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); font-size: 13px; padding: 10px 18px; white-space: normal; max-width: 88vw; text-align: center; }

  .note { padding: 11px 13px; font-size: 12.8px; }
  .empty { padding: 26px 16px; font-size: 13px; }
}

/* 超窄屏（小屏手机 320-360px） */
@media (max-width: 380px) {
  .entry-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 19px; }
  .hero-stats { flex-wrap: wrap; gap: 14px 0; }
  .hero-stats div { flex: 1 0 40%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .fab { padding: 9px 13px; font-size: 12px; }
}

/* 横屏手机 */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 20px; }
  .fab { bottom: 10px; }
}

/* 触屏设备：去掉 hover 位移，避免误触残留 */
@media (hover: none) {
  .entry:hover, .btn-p:hover, .fab:hover { transform: none; }
  .g-row:hover { box-shadow: none; border-color: var(--c-line); }
  .t-card:hover { box-shadow: none; }
}

/* ============ 悬浮咨询 ============ */
.fab {
  position: fixed; right: 22px; bottom: 24px; z-index: 200;
  background: var(--grad-warm); color: #fff;
  border: 0; border-radius: 40px; padding: 13px 22px;
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 26px rgba(232,84,63,.38);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; flex-shrink: 0;
  transition: all .22s;
}
.fab:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 34px rgba(232,84,63,.46); }

/* 移动端：收成圆形小图标，仅显示图标不遮表单；点开才展开文字 */
@media (max-width: 640px) {
  .fab {
    right: 14px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    padding: 0; width: 46px; height: 46px; border-radius: 50%;
    justify-content: center; gap: 0; font-size: 0; overflow: hidden;
  }
  .fab svg { width: 19px; height: 19px; }
  /* 展开态：短暂显示文字 */
  .fab.expand { width: auto; padding: 11px 16px; border-radius: 40px; font-size: 13px; gap: 7px; }
  .fab.expand svg { width: 16px; height: 16px; }
}
@media (max-width: 380px) {
  .fab { right: 12px; width: 44px; height: 44px; }
}

/* ============ 弹窗 ============ */
.mask {
  position: fixed; inset: 0; z-index: 300; background: rgba(58,42,38,.5);
  backdrop-filter: blur(4px); display: none; place-items: center; padding: 20px;
}
.mask.on { display: grid; }
.modal {
  background: #fff; border-radius: var(--r-l); padding: 28px;
  max-width: 440px; width: 100%; box-shadow: var(--shadow-l);
  animation: pop .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(14px); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 19px; margin-bottom: 6px; }
.modal .sub { font-size: 13.5px; color: var(--c-ink-3); margin-bottom: 18px; line-height: 1.7; }
.wx-box {
  background: var(--grad-soft); border: 1.5px dashed var(--c-primary-light);
  border-radius: var(--r-m); padding: 18px; text-align: center; margin: 16px 0;
}
.wx-box span { font-size: 12px; color: var(--c-ink-2); display: block; margin-bottom: 6px; letter-spacing: 1px; }
.wx-box b { font-size: 22px; font-weight: 800; color: var(--c-primary-dark); letter-spacing: 1.5px; font-family: "SF Mono", Menlo, monospace; }
.gift-list { list-style: none; }
.gift-list li { font-size: 13.5px; padding: 9px 0; border-bottom: 1px dashed var(--c-line); display: flex; gap: 9px; align-items: flex-start; }
.gift-list li:last-child { border-bottom: 0; }
.gift-list li::before {
  content: ""; flex-shrink: 0; width: 14px; height: 14px; margin-top: 3px;
  background: currentColor; opacity: .85;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M20 12v9H4v-9M2 7h20v5H2zM12 21V7M12 7H7.5a2.5 2.5 0 1 1 0-5C11 2 12 7 12 7zm0 0h4.5a2.5 2.5 0 1 0 0-5C13 2 12 7 12 7z'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M20 12v9H4v-9M2 7h20v5H2zM12 21V7M12 7H7.5a2.5 2.5 0 1 1 0-5C11 2 12 7 12 7zm0 0h4.5a2.5 2.5 0 1 0 0-5C13 2 12 7 12 7z'/></svg>") center/contain no-repeat;
  color: var(--c-primary);
}

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: var(--c-ink); color: #fff; font-size: 13.5px; padding: 11px 22px;
  border-radius: 30px; z-index: 400; opacity: 0; pointer-events: none;
  transition: all .28s; white-space: nowrap; font-weight: 500;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty { text-align: center; padding: 34px 20px; color: var(--c-ink-3); font-size: 13.5px; }
.empty .big { font-size: 30px; display: block; margin-bottom: 10px; opacity: .5; }

/* ============ 页脚 ============ */
.site-foot {
  margin-top: 28px; padding: 26px 22px calc(30px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--c-line); background: rgba(255,255,255,.6);
}
.foot-inner { max-width: 1180px; margin: 0 auto; display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
/* 桌面端：右下角悬浮按钮常驻，给页脚文字留出避让，避免遮挡 */
@media (min-width: 641px) {
  .foot-note { padding-right: 130px; }
}
.foot-brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.foot-logo {
  width: 38px; height: 38px; border-radius: 11px; background: var(--grad-warm);
  color: #fff; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.foot-brand b { display: block; font-size: 14px; }
.foot-brand span { font-size: 12px; color: var(--c-ink-3); }
.foot-note { flex: 1; min-width: 280px; }
.foot-privacy {
  font-size: 12.5px; line-height: 1.85; color: var(--c-ink-2);
  background: var(--c-cream); border-left: 3px solid var(--c-gold);
  border-radius: 8px; padding: 11px 14px;
}
.foot-privacy b { color: var(--c-primary); font-weight: 700; }
.foot-copy { font-size: 12px; color: var(--c-ink-3); margin-top: 11px; }

@media (max-width: 640px) {
  .site-foot { margin-top: 20px; padding: 20px 14px calc(24px + env(safe-area-inset-bottom)); }
  .foot-inner { gap: 16px; }
  .foot-privacy { font-size: 12px; padding: 10px 12px; }
  .foot-logo { width: 34px; height: 34px; font-size: 15px; }
}

/* ==========================================
   婚礼当天分工
   ========================================== */
.r-list { display: flex; flex-direction: column; gap: 10px; }

.r-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 14px; border-radius: var(--r-m);
  background: var(--c-cream); border: 1.5px solid transparent;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.r-row:hover { border-color: var(--c-rose-light); box-shadow: var(--shadow-s); }
.r-row.r-done { opacity: .55; background: var(--c-cream-2); }
.r-row.r-done .r-task { text-decoration: line-through; }

/* 圆形勾选框 */
.r-chk {
  flex: 0 0 auto; width: 26px; height: 26px; margin-top: 1px;
  border-radius: 50%; border: 2px solid var(--c-rose-light);
  background: #fff; cursor: pointer; padding: 0;
  display: grid; place-items: center;
  transition: background .18s, border-color .18s, transform .12s;
}
.r-chk:hover { border-color: var(--c-primary); transform: scale(1.08); }
.r-chk svg {
  width: 15px; height: 15px; fill: none;
  stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transition: opacity .18s;
}
.r-row.r-done .r-chk { background: var(--c-primary); border-color: var(--c-primary); }
.r-row.r-done .r-chk svg { opacity: 1; }

.r-body { flex: 1 1 auto; min-width: 0; }
.r-top {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 5px;
}
.r-time {
  font-size: 13px; font-weight: 700; color: var(--c-primary);
  font-variant-numeric: tabular-nums; letter-spacing: .3px;
}
.r-badge {
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px;
  background: var(--c-cream-2); color: var(--c-ink-2);
  border: 1px solid var(--c-line); white-space: nowrap;
}
.r-person { font-size: 13.5px; font-weight: 600; color: var(--c-ink); }
.r-task {
  font-size: 13px; line-height: 1.6; color: var(--c-ink-2);
  word-break: break-word;
}
.r-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 6px; font-size: 12px; color: var(--c-ink-3);
}
.r-phone { font-variant-numeric: tabular-nums; }
.r-phone.r-none { opacity: .55; }
.r-note {
  padding-left: 10px; border-left: 2px solid var(--c-line);
  color: var(--c-ink-3);
}
.r-right { flex: 0 0 auto; display: flex; gap: 4px; }

/* 编辑弹窗 */
.modal-role { max-width: 520px; }

/* 移动端 */
@media (max-width: 768px) {
  .r-row { padding: 12px 12px; gap: 10px; }
  .r-chk { width: 28px; height: 28px; }
  .r-top { gap: 6px; }
  .r-time { font-size: 12.5px; }
  .r-badge { font-size: 11px; padding: 2px 8px; }
  .r-person { font-size: 13px; }
  .r-task { font-size: 12.5px; }
  .r-foot { gap: 8px; font-size: 11.5px; }
  .r-right { gap: 2px; }
  .r-right .g-act { width: 38px; height: 38px; }

  /* 今天要处理：手机单列，按钮加高到 40px 更好点 */
  .today { padding: 14px 14px 16px; margin-top: 16px; }
  .today-h h3 { font-size: 15px; }
  .today-h .sub { display: none; }
  .today-item { padding: 10px 11px; gap: 8px; flex-wrap: wrap; }
  .today-item .t-tx { flex: 1 1 100%; font-size: 13px; }
  .today-item .t-flag { order: 0; }
  .today-item .t-go { order: 1; margin-left: auto; height: 40px; padding: 0 16px; font-size: 13px; }
}

/* 超窄屏 */
@media (max-width: 380px) {
  .r-badge { font-size: 10.5px; }
  .r-task { font-size: 12px; }
}
