/* 许愿网 - 响应式导航外壳（无 JS 缩放） */
:root {
  --brand: #C04728;
  --brand-dark: #a83c21;
  --brand-soft: #fdf0e9;
  --brand-hover: #faf5ef;
  --brand-ring: rgba(192,71,40,.08);
  --line: #e6e0d6;
  --line-soft: #f0ece5;
  --ink: #2c2c2a;
  --muted: #6b6259;
  --light: #9a9086;
  --label: #4a443e;
  --side-text: #5a5149;
  --page-bg: #f7f5f1;
  --surface: #fff;
  --canvas: #faf8f5;
  --canvas-alt: #f2efea;
  --accent: #c9a227;
  --accent-soft: #f3d9a5;
  --accent-dark: #8a5a1e;
  --user-bg: #fdf0e9;
  --avatar-bg: #C04728;
  --font-head: "PingFang SC","Microsoft YaHei",sans-serif;
  --radius: 10px;
}
html[data-theme="jade"] {
  --brand: #2e6b5e;
  --brand-dark: #235348;
  --brand-soft: #e9f2ef;
  --brand-hover: #f2f8f6;
  --brand-ring: rgba(46,107,94,.08);
  --line: #dfe8e4;
  --line-soft: #e8efec;
  --ink: #24332f;
  --muted: #60736d;
  --light: #93a29c;
  --label: #40534d;
  --side-text: #4d615b;
  --page-bg: #f4f7f5;
  --canvas: #eff4f1;
  --canvas-alt: #e8efec;
  --accent: #b98a3e;
  --accent-soft: #eadfc4;
  --accent-dark: #6f5324;
  --user-bg: #e9f2ef;
  --avatar-bg: #2e6b5e;
  --font-head: "Songti SC","STSong",serif;
}
html[data-theme="indigo"] {
  --brand: #4561c8;
  --brand-dark: #33499f;
  --brand-soft: #eef1fb;
  --brand-hover: #f4f6fd;
  --brand-ring: rgba(69,97,200,.08);
  --line: #e5e9f2;
  --line-soft: #eef1f7;
  --ink: #232b3a;
  --muted: #667085;
  --light: #98a1b2;
  --label: #3b465c;
  --side-text: #4b5568;
  --page-bg: #f6f8fc;
  --canvas: #f7f9fd;
  --canvas-alt: #eef1f7;
  --accent: #d08a2e;
  --accent-soft: #f2e2c2;
  --accent-dark: #7e561c;
  --user-bg: #eef1fb;
  --avatar-bg: #4561c8;
  --font-head: "PingFang SC","Microsoft YaHei",sans-serif;
}
html[data-theme="sand"] {
  --brand: #b07b3e;
  --brand-dark: #91612d;
  --brand-soft: #fbf1e4;
  --brand-hover: #fdf8f1;
  --brand-ring: rgba(176,123,62,.10);
  --line: #eadfcd;
  --line-soft: #f2ece2;
  --ink: #3b3128;
  --muted: #7a6a58;
  --light: #a29484;
  --label: #5b4c3d;
  --side-text: #685847;
  --page-bg: #f9f5ee;
  --surface: #fff;
  --canvas: #faf6ef;
  --canvas-alt: #f1e9dd;
  --accent: #d2a44b;
  --accent-soft: #f4e5c8;
  --accent-dark: #8a6423;
  --user-bg: #f7efe3;
  --avatar-bg: #b07b3e;
  --font-head: "PingFang SC","Microsoft YaHei",sans-serif;
}
html[data-theme="sakura"] {
  --brand: #c86b8b;
  --brand-dark: #a85072;
  --brand-soft: #fdeef3;
  --brand-hover: #fdf6f9;
  --brand-ring: rgba(200,107,139,.10);
  --line: #f0dde4;
  --line-soft: #f8eff3;
  --ink: #3d2c33;
  --muted: #806c73;
  --light: #ab939b;
  --label: #624a52;
  --side-text: #6f555e;
  --page-bg: #fcf6f8;
  --surface: #fff;
  --canvas: #fdf7f9;
  --canvas-alt: #f7e8ee;
  --accent: #e2a8bd;
  --accent-soft: #f8dfe8;
  --accent-dark: #a15d77;
  --user-bg: #fbeef3;
  --avatar-bg: #c86b8b;
  --font-head: "PingFang SC","Microsoft YaHei",sans-serif;
}
html[data-theme="lake"] {
  --brand: #2b8a9c;
  --brand-dark: #216e7d;
  --brand-soft: #e7f4f6;
  --brand-hover: #f2fafb;
  --brand-ring: rgba(43,138,156,.10);
  --line: #d8e9ec;
  --line-soft: #eaf4f6;
  --ink: #233b40;
  --muted: #5d7a80;
  --light: #8aa4a9;
  --label: #3f5b61;
  --side-text: #4a686e;
  --page-bg: #f4fafb;
  --surface: #fff;
  --canvas: #f3fafb;
  --canvas-alt: #e3f1f4;
  --accent: #7fb8c4;
  --accent-soft: #d7edf1;
  --accent-dark: #3d7885;
  --user-bg: #eaf5f7;
  --avatar-bg: #2b8a9c;
  --font-head: "PingFang SC","Microsoft YaHei",sans-serif;
}
html[data-theme="wood"] {
  --brand: #7b5a42;
  --brand-dark: #614331;
  --brand-soft: #f2eae3;
  --brand-hover: #faf5f1;
  --brand-ring: rgba(123,90,66,.10);
  --line: #e4d7ca;
  --line-soft: #f1e9e1;
  --ink: #3a2e26;
  --muted: #756457;
  --light: #a08c7c;
  --label: #594738;
  --side-text: #655140;
  --page-bg: #f7f3ef;
  --surface: #fff;
  --canvas: #f8f4f0;
  --canvas-alt: #eee4d9;
  --accent: #b08d6b;
  --accent-soft: #eddfd0;
  --accent-dark: #846143;
  --user-bg: #f4ece4;
  --avatar-bg: #7b5a42;
  --font-head: "Songti SC","STSong",serif;
}
html[data-theme="mist"] {
  --brand: #6b7280;
  --brand-dark: #545b67;
  --brand-soft: #eef0f3;
  --brand-hover: #f7f8fa;
  --brand-ring: rgba(107,114,128,.10);
  --line: #e0e4e9;
  --line-soft: #edf0f3;
  --ink: #2f343a;
  --muted: #6b7280;
  --light: #9aa3af;
  --label: #4a515b;
  --side-text: #555d68;
  --page-bg: #f6f7f9;
  --surface: #fff;
  --canvas: #f7f8fa;
  --canvas-alt: #eceff3;
  --accent: #9aa3af;
  --accent-soft: #e6e9ee;
  --accent-dark: #5f6875;
  --user-bg: #eef0f3;
  --avatar-bg: #6b7280;
  --font-head: "PingFang SC","Microsoft YaHei",sans-serif;
}
html[data-theme="midnight"] {
  --brand: #7aa2f7;
  --brand-dark: #5c82d6;
  --brand-soft: #222c42;
  --brand-hover: #1c2434;
  --brand-ring: rgba(122,162,247,.16);
  --line: #313b4f;
  --line-soft: #262e3d;
  --ink: #e6eaf2;
  --muted: #a8b2c4;
  --light: #7f8ba0;
  --label: #c6cede;
  --side-text: #c6cede;
  --page-bg: #151a24;
  --surface: #1c2230;
  --canvas: #1a2030;
  --canvas-alt: #242c3d;
  --accent: #f0c674;
  --accent-soft: #3a3325;
  --accent-dark: #f0c674;
  --user-bg: #202a3c;
  --avatar-bg: #7aa2f7;
  --font-head: "PingFang SC","Microsoft YaHei",sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  display: flex;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--ink);
  font-family: '微软雅黑', 'Microsoft YaHei', Verdana, Arial, sans-serif;
  font-size: 14px;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 196px;
  flex: 0 0 196px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 2000;
}
.sidebar-logo {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.sidebar-logo img { width: 160px; height: auto; }
.sidebar nav { padding: 18px 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 20px;
  color: var(--side-text);
  font-size: 14px;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--brand-hover); color: var(--brand); }
.nav-item.active {
  background: var(--brand-soft);
  border-left-color: var(--brand);
  color: var(--brand);
  font-weight: 500;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; }
.sidebar-stats {
  margin: auto 12px 8px;
  padding: 14px 14px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.stats-title { font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.stats-line { font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.stats-line b { color: var(--brand); font-weight: 500; }
.stats-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.stats-dots i {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--line); margin-right: 4px; vertical-align: middle;
}
.stats-dots i:first-child { width: 14px; border-radius: 3px; background: var(--brand); }
.stats-badge { padding: 4px 10px; background: var(--canvas-alt); color: var(--light); border-radius: 6px; font-size: 12px; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  margin: 0 12px 12px; padding: 8px 10px;
  background: var(--user-bg); border-radius: 10px;
}
.user-avatar {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px;
  background: var(--avatar-bg); color: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.user-name { font-size: 13px; font-weight: 500; flex: 1; }
.user-actions { display: flex; gap: 14px; color: var(--muted); }
.user-actions i { font-size: 16px; cursor: pointer; }
.user-actions i:hover { color: var(--brand); }

/* ---------- 主内容区 ---------- */
.main { flex: 1; min-width: 0; }
.stage { width: 100%; padding: 0; margin: 0; background: var(--surface); }
body.home-page .stage { background: var(--surface); }

/* 页面标题 */
.page-head {
  height: 92px;
  box-sizing: border-box;
  padding: 0 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--line-soft);
  margin: 0;
  width: 100%;
}
.page-head h1 { margin: 0 0 6px; font-size: 24px; font-weight: 500; color: var(--ink); }
.page-head p { margin: 0; font-size: 13px; color: var(--light); }

/* ---------- 表单页两栏布局 ---------- */
.wish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px;
  padding: 28px 36px 40px;
  align-items: start;
  max-width: 1600px;
  margin: 0 auto;
}
.preview-card { min-width: 0; overflow: hidden; }
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
  width: 100%;
  margin: 0;
}
.wish-form { width: 100%; }

/* 表单行：覆盖原站 .xw-form-row 固定高度 */
.wish-form .xw-form-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 40px;
  height: auto;
  margin-bottom: 18px;
  line-height: 1.7;
}
.wish-form .xw-form-row > span:first-child {
  flex: 0 0 92px;
  text-align: right;
  color: var(--label);
  font-size: 14px;
  padding-top: 6px;
  white-space: nowrap;
}
.wish-form .xw-form-row > span:last-child { flex: 1; min-width: 0; }

/* 输入框、下拉、文本域 */
.wish-form input[type=text],
.wish-form input[type=number],
.wish-form select,
.pay-form input[type=number] {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  max-width: 100%;
}
.pay-form input[type=number]::placeholder { color: var(--light); }
.wish-form input:focus,
.wish-form select:focus,
.wish-form textarea:focus,
.pay-form input:focus { border-color: var(--brand); }
.wish-form select { min-width: 150px; max-width: 100%; }
.wish-form textarea {
  width: 100%;
  height: 124px;
  min-height: 124px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.8;
  resize: vertical;
  outline: none;
}

/* 单选、颜色块 */
.wish-form .xw-form-row label { margin-right: 18px; cursor: pointer; }
.wish-form select_color, .wish-form .xw-color-picker { line-height: 0; }
.wish-form .xw-color-picker a div { width: 24px; height: 24px; border-radius: 4px; margin-right: 5px; }
.wish-form .xw-color-label { vertical-align: middle; font-size: 14px; color: var(--label); }

/* 字数、按钮、注释 */
.wish-form .form-counter { margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.wish-form .form-counter > span:first-child { padding-top: 0; }
/* 剩余字数：覆盖内联 width:25px 与通用输入框 padding，避免 188 被裁成 1 位 */
.wish-form input[name=remLen] {
  width: 32px !important;
  height: auto !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: center;
  color: var(--brand);
  font-weight: 600;
  vertical-align: baseline;
}
.wish-form .form-actions { margin-top: 6px; }
.wish-form .form-actions > span:first-child { padding-top: 0; }
.wish-form input[type=submit], .wish-form input[name=Submit2] {
  height: 40px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-right: 12px;
}
.wish-form input[type=submit] { background: var(--brand); color: var(--surface); }
.wish-form input[type=submit]:hover { background: var(--brand-dark); }
.wish-form input[name=Submit2] { background: var(--line-soft); color: var(--side-text); }
.preview-column { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.form-notes {
  display: block;
  margin: 0 !important;
  padding: 16px 18px;
  background: var(--canvas);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
}
.form-notes a { color: var(--brand); }

/* ---------- 预览卡片 ---------- */
.preview-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
  position: static;
  width: 100%;
  margin: 0;
}
.preview-head { font-size: 15px; font-weight: 500; margin-bottom: 18px; }
.preview-head i { color: var(--brand); margin-right: 6px; }
.preview-head span { float: right; font-size: 12px; color: var(--light); font-weight: 400; }
.preview-stage {
  position: relative;
  background: var(--canvas);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  container-type: inline-size;
}
/* 小许愿牌：挂绳 / 牌面 / 挂坠 三段独立图片，宽度自适应 */
.mini-card {
  width: 14cqw;
  max-width: 42px;
  min-width: 24px;
  flex-shrink: 0;
}
.mini-card .seg-cord,
.mini-card .seg-face,
.mini-card .seg-tassel { width: 100%; position: relative; }
.mini-card .seg-cord img,
.mini-card .seg-face img,
.mini-card .seg-tassel img { width: 100%; height: auto; display: block; }
.mini-card .seg-face span {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl;
  color: #FFFF00;
  font-size: clamp(9px, 2.4cqw, 15px);
  line-height: 1.2;
  word-break: break-all;
  text-align: center;
}

/* ---------- 愿望牌 / 愿望卡：快捷选择区 ---------- */
.wish-form .card-picker { margin-bottom: 18px; }
.wish-form .quick-area {
  display: block; width: 100%; min-height: 210px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); padding: 10px 12px;
}
/* 原站全局 div{margin:0 auto} 会让快捷区里的 div 居中，这里清掉 */
.wish-form .quick-area div { margin-left: 0 !important; margin-right: 0 !important; }
/* 但愿望牌三段小图需要 auto 左右外边距居中（上面的 !important 会误伤它） */
.wish-form .quick-area .qa-mini { margin-left: auto !important; margin-right: auto !important; }
.wish-form .qa-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.wish-form .qa-title { font-size: 13px; font-weight: 500; }
.wish-form .qa-title b { color: var(--brand); font-weight: 500; }
.wish-form .qa-title small { font-weight: 400; color: var(--light); font-size: 11px; margin-left: 6px; }
.wish-form .qa-more {
  border: 0; background: none; color: var(--brand); font-size: 12px;
  cursor: pointer; font-family: inherit; padding: 0;
}
.wish-form .qa-more:hover { text-decoration: underline; }
.wish-form .qa-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.wish-form .qa-item {
  position: relative; flex: 1 1 0; min-width: 0; width: auto; height: 158px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  text-align: center; padding: 6px 4px; cursor: pointer; transition: .15s;
}
.wish-form .qa-item:hover { border-color: var(--brand); background: var(--brand-soft); }
.wish-form .qa-item.selected {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 0 0 2px var(--brand-ring);
}
.wish-form .qa-check {
  display: none; position: absolute; top: 4px; right: 4px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--brand); color: var(--surface); font-size: 10px; line-height: 15px;
}
.wish-form .qa-item.selected .qa-check { display: block; }
.wish-form .qa-mini { width: 18px; margin: 2px auto 0; }
.wish-form .qa-mini > div { width: 100%; }
.wish-form .qa-mini img { display: block; width: 100%; height: auto; }
.wish-form .qa-card { display: block; width: 100%; max-width: 72px; height: auto; border-radius: 3px; margin: 42px auto 0; }
.wish-form .qa-name { display: block; font-size: 11.5px; margin-top: 3px; white-space: nowrap; }
/* 末尾「查看更多」选项：点开完整弹窗 */
.wish-form .qa-more-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--brand); background: var(--brand-soft);
  border-style: dashed;
}
.wish-form .qa-more-item:hover { background: var(--brand-hover); }
.wish-form .qa-more-item i { font-size: 22px; }
.wish-form .qa-more-item .qa-name { margin: 0; }

.card-modal-mask {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(30,25,20,.48); backdrop-filter: blur(2px);
}
.card-modal-mask.show { display: flex; }
/* 原站全局 div{margin:0 auto} 会让弹窗内 div 被水平居中，此处统一清掉 */
.card-modal div { margin-left: 0 !important; margin-right: 0 !important; }
.card-modal {
  width: min(900px, 100%); max-height: min(760px, 90vh);
  background: var(--surface); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
  display: flex; flex-direction: column; overflow: hidden;
  animation: cm-pop .18s ease-out;
}
@keyframes cm-pop {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.cm-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 28px 16px; border-bottom: 1px solid var(--canvas-alt);
}
.cm-head h3 { margin: 0; font-size: 19px; font-weight: 500; }
.cm-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--light); }
.cm-close {
  border: 0; background: var(--canvas-alt); color: var(--muted);
  width: 30px; height: 30px; border-radius: 8px;
  font-size: 19px; line-height: 1; cursor: pointer; font-family: inherit;
}
.cm-close:hover { background: var(--brand-soft); color: var(--brand); }
.cm-tabs { display: flex; gap: 4px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.cm-tab {
  position: relative; border: 0; background: none; cursor: pointer; font-family: inherit;
  padding: 13px 18px 14px; font-size: 14px; color: var(--muted);
}
.cm-tab:hover { color: var(--brand); }
.cm-tab.active { color: var(--brand); font-weight: 600; }
.cm-tab.active::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: -1px;
  height: 3px; border-radius: 3px; background: var(--brand);
}
.cm-tab em { font-style: normal; font-size: 11px; color: var(--light); margin-left: 3px; }
.cm-body { padding: 20px 28px 24px; overflow: auto; flex: 1; }
.cm-panel { display: none; }
.cm-panel.active { display: block; }
.cm-tip { font-size: 12.5px; color: var(--light); margin-bottom: 14px; }
.cm-grid { display: grid; gap: 14px; }
.cm-suit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cm-item-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cm-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cm-card-option .cm-thumb { height: auto; background: none; }
.cm-card-option .cm-thumb img { display: block; width: 100%; max-width: 170px; height: auto; border-radius: 4px; }
.cm-option {
  position: relative; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); padding: 12px 10px 11px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.cm-option:hover { border-color: var(--brand); background: var(--brand-soft); }
.cm-option.selected {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 0 0 2px var(--brand-ring);
}
.cm-check {
  display: none; position: absolute; top: 8px; right: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); color: var(--surface); font-size: 11px; line-height: 18px;
}
.cm-option.selected .cm-check { display: block; }
.cm-badge {
  position: absolute; top: -7px; left: 8px; padding: 1px 7px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-dark); font-size: 10px; line-height: 16px;
}
.cm-thumb {
  height: 108px; border-radius: 8px; margin-bottom: 9px;
  background: linear-gradient(180deg, var(--canvas), var(--canvas-alt));
  display: flex; align-items: center; justify-content: center;
}
.cm-thumb .cm-mini { width: 17px; }
.cm-mini > div { width: 100%; }
.cm-mini img { display: block; width: 100%; height: auto; }
.cm-thumb img.cm-single { display: block; width: 36px; height: auto; max-height: 90px; }
.cm-name { font-size: 13px; font-weight: 500; }
.cm-desc { font-size: 11.5px; color: var(--light); margin-top: 2px; }
.cm-suit-option { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 10px; }
.cm-suit-option .cm-thumb { flex: 0 0 44px; width: 44px; height: 120px; margin: 0; }
.cm-suit-info { flex: 1; min-width: 0; }
.cm-suit-info .cm-desc { margin-top: 4px; line-height: 1.5; }
.cm-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px; border-top: 1px solid var(--line); background: var(--surface);
}
.cm-summary { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cm-summary .cm-mini { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: auto; }
.cm-summary .cm-mini > div { width: 12px; }
.cm-summary-text span { display: block; font-size: 11.5px; color: var(--light); }
.cm-summary-text b { display: block; font-size: 13.5px; font-weight: 500; margin-top: 1px; }
.cm-btns { display: flex; gap: 10px; }
.cm-btn {
  border-radius: 8px; padding: 9px 22px; font-size: 13px; cursor: pointer;
  font-family: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--side-text);
}
.cm-btn:hover { background: var(--canvas); }
.cm-btn.primary { border-color: var(--brand); background: var(--brand); color: var(--surface); }
.cm-btn.primary:hover { background: var(--brand-dark); }

/* 愿望卡：view.png 背景 + 百分比定位文字，完全流式无缩放 */
.wish-card {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 500px;
  aspect-ratio: 500 / 410;
  background: url('images/view.png') center / 100% 100% no-repeat;
}
.wish-card > div { position: absolute; color: var(--surface); }
.wc-number {
  top: 21%; left: 51%; width: 45%;
  text-align: center; font-size: clamp(9px, 2.5cqw, 14px); white-space: nowrap;
}
.wc-number em { color: #FFFF00; font-style: normal; }
.wc-type {
  top: 29%; left: 51%; width: 45%;
  text-align: center; font-family: '楷体_GB2312','KaiTi',serif;
  font-size: clamp(13px, 4.5cqw, 24px); font-weight: 500; line-height: 1.1;
}
.wc-body {
  top: 43%; left: 51%; width: 45%;
  color: #FFFF00 !important; font-size: clamp(10px, 2.6cqw, 15px);
  line-height: 1.7; word-break: break-all;
}
.wc-sign {
  top: 78%; left: 51%; width: 45%;
  text-align: right; font-size: clamp(9px, 2.3cqw, 13px); line-height: 1.6;
}
.wc-sign b { color: #FFFF00; font-weight: 500; }
.wc-foot {
  top: 92%; left: 51%; width: 45%;
  text-align: right; color: #FFFF00 !important; font-size: clamp(8px, 2cqw, 12px);
  white-space: nowrap;
}

/* ---------- 首页树图：等比自适应 ---------- */
.home-wrap {
  width: 100%;
  container-type: inline-size;
  overflow: hidden;
}
.home-wrap .xw-tree-canvas {
  width: 1400px;
  height: 1100px;
  margin: 0 !important; /* 覆盖原站 div{margin:0 auto}，避免宽屏下树图被水平居中产生左间距 */
  transform-origin: top left;
  scale: calc(100cqw / 1400px);
  background-size: 100% 100%;
}
/* 用占位撑开容器高度，避免缩放后父级塌陷 */
.home-wrap::after {
  content: '';
  display: block;
  height: calc(1100 / 1400 * 100cqw);
  margin-top: -1100px;
}

/* ---------- 还愿页表单（重构：欢迎区 + 分组 + 支付方式） ---------- */
.pay-form { line-height: 1.7; font-size: 14px; color: var(--label); }

/* 欢迎区 */
.pay-form .pay-intro {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; margin-bottom: 24px;
  background: var(--brand-soft); border: 1px solid var(--line);
  border-radius: 10px;
}
.pay-form .pay-intro-icon {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%;
  background: var(--brand); color: var(--surface);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.pay-form .pay-intro-body { min-width: 0; }
.pay-form .pay-intro-body h2 { margin: 0 0 4px; font-size: 17px; color: var(--brand); font-weight: 600; }
.pay-form .pay-intro-body p { margin: 0; font-size: 13px; color: var(--side-text); }
.pay-form .pay-intro-body p b { color: var(--brand); }

/* 分组 */
.pay-form .pay-group { padding-top: 4px; margin-bottom: 26px; }
.pay-form .pay-group:last-of-type { margin-bottom: 8px; }
.pay-form .pay-group-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  padding-bottom: 10px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.pay-form .pay-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--brand); color: var(--surface); font-size: 12px;
}
.pay-form .pay-row { display: flex; align-items: center; gap: 16px; }
.pay-form .pay-row-label {
  flex: 0 0 92px; text-align: right; font-size: 14px; color: var(--label);
}
.pay-form .pay-row-control { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.pay-form .pay-input { flex: 1; min-width: 0; height: 38px; }
.pay-form .pay-amount-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.pay-form .pay-amount-wrap .pay-input { width: 100%; padding-right: 30px; }
.pay-form .pay-amount-wrap em {
  position: absolute; right: 12px; font-style: normal; font-size: 13px; color: var(--light);
}
.pay-form .pay-tip { margin: 8px 0 0 108px; font-size: 12px; color: var(--light); }

/* 预览按钮 */
.pay-form .pay-preview-btn {
  flex: 0 0 auto; height: 38px; padding: 0 20px; margin: 0;
  border: 0; border-radius: 7px; background: var(--brand); color: var(--surface);
  font-size: 14px; font-family: inherit; cursor: pointer; transition: .15s;
}
.pay-form .pay-preview-btn:hover { background: var(--brand-dark); }

/* 支付方式 */
.pay-form .pay-methods { display: flex; gap: 14px; margin-top: 18px; }
.pay-form .pay-method {
  flex: 1; min-width: 0; height: 70px; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  cursor: pointer; transition: .15s;
}
.pay-form .pay-method:hover {
  border-color: var(--brand); background: var(--brand-hover);
  box-shadow: 0 0 0 2px var(--brand-ring);
}
.pay-form .pay-method img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- 还愿页：微信支付二维码弹窗（重构为居中卡片） ---------- */
/* 覆盖原站 css/style.css 的固定 500x680 + 图片背景 */
.pay-page .xw-qr-overlay,
body.form-page .xw-qr-overlay {
  position: fixed; inset: 0; width: auto; height: auto; left: 0; top: 0;
  display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0,0,0,.5); z-index: 10000;
}
body.form-page .xw-qr-overlay.show { display: flex; }
.xw-qr-modal {
  width: 100%; max-width: 360px; background: var(--surface);
  border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.22); overflow: hidden;
}
.xw-qr-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  font-size: 15px; font-weight: 500; color: var(--ink);
}
.xw-qr-modal-head i.fa-wechat { color: #09bb07; margin-right: 7px; }
.xw-qr-close {
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--light); font-size: 15px; transition: .15s;
}
.xw-qr-close:hover { background: var(--brand-soft); color: var(--brand); }
.xw-qr-modal-body { padding: 24px 20px 22px; text-align: center; }
/* 覆盖原站给这两个容器加的固定偏移 */
.xw-qr-modal .xw-qr-code { margin: 0 auto; width: 200px; max-width: 100%; }
.xw-qr-modal .xw-qr-code img {
  display: block; width: 200px; height: 200px; max-width: 100%;
  margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.xw-qr-guide { margin: 16px 0 10px; font-size: 14px; color: var(--ink); }
.xw-qr-modal .xw-qr-hint {
  margin: 0 auto; max-width: 100%; font-size: 12.5px; color: var(--light);
  line-height: 1.7; word-break: break-all;
}

/* ---------- 响应式断点 ---------- */
@media (max-width: 1100px) {
  .wish-layout { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .preview-card { position: static; }
  .preview-stage { min-height: 0; }
}
@media (max-width: 760px) {
  body { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: static;
    flex-direction: row; flex-wrap: wrap; align-items: center;
  }
  .sidebar-logo { height: 60px; border-bottom: 0; border-right: 1px solid var(--line); padding: 0 12px; }
  .sidebar-logo img { width: 120px; }
  .sidebar nav { padding: 0; display: flex; }
  .nav-item { height: 60px; padding: 0 12px; border-left: 0; border-bottom: 3px solid transparent; }
  .nav-item.active { border-bottom-color: var(--brand); }
  .nav-item span { display: none; }
  .sidebar-stats, .sidebar-user { display: none; }
  .page-head { padding: 20px; }
  body.form-page .main { width: 100%; margin: 0; }
  .wish-layout { padding: 16px; gap: 16px; }
  .form-card { padding: 18px; }
  .wish-form .xw-form-row > span:first-child { flex-basis: 76px; font-size: 13px; }
  .card-modal-mask { padding: 12px; }
  .cm-head, .cm-body, .cm-foot { padding-left: 16px; padding-right: 16px; }
  .cm-tabs { padding: 0 8px; }
  .cm-tab { padding: 11px 9px; font-size: 13px; }
  .cm-suit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cm-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wish-form .quick-area { width: 100%; }
  .cm-foot { flex-direction: column; align-items: stretch; }
  .cm-btns { justify-content: flex-end; }
}
