/* =====================================================
   AIplain 共享样式
   暗色：绿黑墨底 + 上升绿磷光字符 + 黄色磷光玻璃 UI
   亮色：白/极浅底 + 黄色透明玻璃 UI（无暗色字符场）
   不要使用 AIbotone 计算橙 #f08a00 或品牌紫 #6d5bff
   ===================================================== */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2");
}

/* ---------- 设计变量 ---------- */
:root {
  --hue: 80;
  --radius-large: 0.75rem;
  --radius-medium: 0.55rem;
  --radius-small: 0.38rem;
  --page-width: 75rem;
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --font-ui: "JetBrains Mono", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --primary: #c9a227;
  --primary-dark: #8f7010;
  --primary-light: #e8c14d;
  --on-primary: #1a1208;

  --page-bg: #f5f6f2;
  --card-bg: rgba(255, 252, 245, 0.62);
  --card-bg-hover: rgba(255, 248, 230, 0.8);
  --float-panel-bg: rgba(255, 252, 245, 0.78);
  --tube-ivory: rgba(255, 252, 245, 0.78);
  --glass-bg: rgba(255, 252, 245, 0.56);
  --glass-bg-strong: rgba(255, 252, 245, 0.78);
  --glass-border: rgba(201, 162, 39, 0.34);
  --glass-highlight: rgba(255, 255, 255, 0.72);
  --glass-blur: blur(18px) saturate(1.2);

  --btn-content: #8f7010;
  --btn-regular-bg: rgba(201, 162, 39, 0.14);
  --btn-regular-bg-hover: rgba(201, 162, 39, 0.24);
  --btn-plain-bg-hover: rgba(201, 162, 39, 0.14);
  --btn-card-bg-hover: rgba(201, 162, 39, 0.1);

  --text-main: #1c1a12;
  --text-secondary: #5a5646;
  --title-active: #8f7010;

  --line-color: rgba(201, 162, 39, 0.32);
  --line-divider: rgba(201, 162, 39, 0.2);
  --meta-divider: rgba(201, 162, 39, 0.36);

  --link-underline: rgba(201, 162, 39, 0.45);
  --link-hover: #8f7010;
  --selection-bg: rgba(201, 162, 39, 0.28);
  --inline-code-bg: rgba(80, 56, 12, 0.08);
  --inline-code-color: #1c1a12;

  --banner-bg: linear-gradient(120deg, #3a2a12, #1a1208);
  --shadow-card: 0 1px 2px rgba(28, 26, 18, 0.05), 0 8px 24px rgba(28, 26, 18, 0.06), 0 0 20px rgba(201, 162, 39, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --shadow-card-hover: 0 4px 16px rgba(28, 26, 18, 0.08), 0 0 0 1px rgba(201, 162, 39, 0.32), 0 0 28px rgba(201, 162, 39, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --navbar-bg: rgba(255, 252, 245, 0.55);
  --announce-bg: #1c1a12;
  --announce-text: #f6f0d8;
  --gold: #c9a227;
  --green: #6a8f2e;

  --glow-text: 0 0 12px rgba(201, 162, 39, 0.28);
  --glow-box: 0 0 28px rgba(201, 162, 39, 0.12);

  color-scheme: light;
  font-family: var(--font-ui);

  --primary: #f3d24a;
  --primary-dark: #d4b33a;
  --primary-light: #ffe98a;
  --on-primary: #0b0c0a;

  --page-bg: #0b100e;
  --card-bg: rgba(16, 18, 14, 0.56);
  --card-bg-hover: rgba(24, 26, 18, 0.72);
  --float-panel-bg: rgba(14, 16, 12, 0.72);
  --tube-ivory: rgba(16, 18, 14, 0.72);
  --glass-bg: rgba(16, 18, 14, 0.52);
  --glass-bg-strong: rgba(16, 18, 14, 0.72);
  --glass-border: rgba(243, 210, 74, 0.28);
  --glass-highlight: rgba(255, 233, 138, 0.16);

  --btn-content: #f3d24a;
  --btn-regular-bg: rgba(243, 210, 74, 0.08);
  --btn-regular-bg-hover: rgba(243, 210, 74, 0.16);
  --btn-plain-bg-hover: rgba(243, 210, 74, 0.1);
  --btn-card-bg-hover: rgba(243, 210, 74, 0.1);

  --text-main: #eee9d4;
  --text-secondary: #9a9578;
  --title-active: #f3d24a;

  --line-color: rgba(243, 210, 74, 0.22);
  --line-divider: rgba(243, 210, 74, 0.14);
  --meta-divider: rgba(243, 210, 74, 0.28);

  --link-underline: rgba(243, 210, 74, 0.45);
  --link-hover: #ffe98a;
  --selection-bg: rgba(243, 210, 74, 0.28);
  --inline-code-bg: rgba(243, 210, 74, 0.1);
  --inline-code-color: #ffe98a;

  --banner-bg: linear-gradient(120deg, #16170f, #0c0d0a);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 24px rgba(243, 210, 74, 0.06), inset 0 1px 0 rgba(255, 233, 138, 0.12);
  --shadow-card-hover: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(243, 210, 74, 0.3), 0 0 36px rgba(243, 210, 74, 0.14), inset 0 1px 0 rgba(255, 233, 138, 0.18);
  --navbar-bg: rgba(10, 12, 9, 0.5);
  --announce-bg: #060a09;
  --announce-text: #eee9d4;
  --gold: #f3d24a;
  --green: #b7c96a;

  --glow-text: 0 0 18px rgba(243, 210, 74, 0.42);
  --glow-box: 0 0 36px rgba(243, 210, 74, 0.16);

  color-scheme: dark;
}

:root:not(.dark) {
  --hue: 80;
  --radius-large: 0.75rem;
  --radius-medium: 0.55rem;
  --radius-small: 0.38rem;
  --page-width: 75rem;
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --font-ui: "JetBrains Mono", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --primary: #c9a227;
  --primary-dark: #8f7010;
  --primary-light: #e8c14d;
  --on-primary: #1a1208;

  --page-bg: #f5f6f2;
  --card-bg: rgba(255, 252, 245, 0.62);
  --card-bg-hover: rgba(255, 248, 230, 0.8);
  --float-panel-bg: rgba(255, 252, 245, 0.78);
  --tube-ivory: rgba(255, 252, 245, 0.78);
  --glass-bg: rgba(255, 252, 245, 0.56);
  --glass-bg-strong: rgba(255, 252, 245, 0.78);
  --glass-border: rgba(201, 162, 39, 0.34);
  --glass-highlight: rgba(255, 255, 255, 0.72);
  --glass-blur: blur(18px) saturate(1.2);

  --btn-content: #8f7010;
  --btn-regular-bg: rgba(201, 162, 39, 0.14);
  --btn-regular-bg-hover: rgba(201, 162, 39, 0.24);
  --btn-plain-bg-hover: rgba(201, 162, 39, 0.14);
  --btn-card-bg-hover: rgba(201, 162, 39, 0.1);

  --text-main: #1c1a12;
  --text-secondary: #5a5646;
  --title-active: #8f7010;

  --line-color: rgba(201, 162, 39, 0.32);
  --line-divider: rgba(201, 162, 39, 0.2);
  --meta-divider: rgba(201, 162, 39, 0.36);

  --link-underline: rgba(201, 162, 39, 0.45);
  --link-hover: #8f7010;
  --selection-bg: rgba(201, 162, 39, 0.28);
  --inline-code-bg: rgba(80, 56, 12, 0.08);
  --inline-code-color: #1c1a12;

  --banner-bg: linear-gradient(120deg, #3a2a12, #1a1208);
  --shadow-card: 0 1px 2px rgba(28, 26, 18, 0.05), 0 8px 24px rgba(28, 26, 18, 0.06), 0 0 20px rgba(201, 162, 39, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --shadow-card-hover: 0 4px 16px rgba(28, 26, 18, 0.08), 0 0 0 1px rgba(201, 162, 39, 0.32), 0 0 28px rgba(201, 162, 39, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --navbar-bg: rgba(255, 252, 245, 0.55);
  --announce-bg: #1c1a12;
  --announce-text: #f6f0d8;
  --gold: #c9a227;
  --green: #6a8f2e;

  --glow-text: 0 0 12px rgba(201, 162, 39, 0.28);
  --glow-box: 0 0 28px rgba(201, 162, 39, 0.12);

  color-scheme: light;
  font-family: var(--font-ui);
}


:root.dark {
  --primary: #f3d24a;
  --primary-dark: #d4b33a;
  --primary-light: #ffe98a;
  --on-primary: #0b0c0a;

  --page-bg: #0b100e;
  --card-bg: rgba(16, 18, 14, 0.56);
  --card-bg-hover: rgba(24, 26, 18, 0.72);
  --float-panel-bg: rgba(14, 16, 12, 0.72);
  --tube-ivory: rgba(16, 18, 14, 0.72);
  --glass-bg: rgba(16, 18, 14, 0.52);
  --glass-bg-strong: rgba(16, 18, 14, 0.72);
  --glass-border: rgba(243, 210, 74, 0.28);
  --glass-highlight: rgba(255, 233, 138, 0.16);

  --btn-content: #f3d24a;
  --btn-regular-bg: rgba(243, 210, 74, 0.08);
  --btn-regular-bg-hover: rgba(243, 210, 74, 0.16);
  --btn-plain-bg-hover: rgba(243, 210, 74, 0.1);
  --btn-card-bg-hover: rgba(243, 210, 74, 0.1);

  --text-main: #eee9d4;
  --text-secondary: #9a9578;
  --title-active: #f3d24a;

  --line-color: rgba(243, 210, 74, 0.22);
  --line-divider: rgba(243, 210, 74, 0.14);
  --meta-divider: rgba(243, 210, 74, 0.28);

  --link-underline: rgba(243, 210, 74, 0.45);
  --link-hover: #ffe98a;
  --selection-bg: rgba(243, 210, 74, 0.28);
  --inline-code-bg: rgba(243, 210, 74, 0.1);
  --inline-code-color: #ffe98a;

  --banner-bg: linear-gradient(120deg, #16170f, #0c0d0a);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 24px rgba(243, 210, 74, 0.06), inset 0 1px 0 rgba(255, 233, 138, 0.12);
  --shadow-card-hover: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(243, 210, 74, 0.3), 0 0 36px rgba(243, 210, 74, 0.14), inset 0 1px 0 rgba(255, 233, 138, 0.18);
  --navbar-bg: rgba(10, 12, 9, 0.5);
  --announce-bg: #060a09;
  --announce-text: #eee9d4;
  --gold: #f3d24a;
  --green: #b7c96a;

  --glow-text: 0 0 18px rgba(243, 210, 74, 0.42);
  --glow-box: 0 0 36px rgba(243, 210, 74, 0.16);

  color-scheme: dark;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  max-width: 100%;
  scroll-padding-bottom: var(--dock-space, 5.25rem);
  background-color: var(--page-bg);
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-main);
  overflow-x: hidden;
  max-width: 100%;
  line-height: 1.7;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
}

::selection { background: var(--selection-bg); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

body::-webkit-scrollbar { width: 8px; }
body::-webkit-scrollbar-thumb { background: var(--line-color); border-radius: 8px; }

.hidden { display: none !important; }

/* ---------- 公告条 ---------- */
.announce-bar {
  background: var(--announce-bg);
  color: var(--announce-text);
  font-size: 0.8125rem;
  position: relative;
  z-index: 60;
}

.announce-bar.hidden-bar { display: none; }

.announce-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
}

.announce-icon { color: var(--gold); display: inline-flex; }

.announce-link {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 0.8125rem;
  padding: 0;
  margin-left: 0.25rem;
}
.announce-link:hover { text-decoration: underline; }

.announce-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  display: inline-flex;
  padding: 0.15rem;
}
.announce-close:hover { opacity: 1; }

/* ---------- 顶栏 ---------- */
.navbar-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.5rem clamp(0.75rem, 3vw, 1.5rem) 0.25rem;
}

.navbar {
  max-width: var(--page-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  border-radius: var(--radius-large);
  padding: 0.45rem 0.9rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line-divider);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-right: 0.5rem;
}

.brand-logo { display: inline-flex; }

.brand-name b { color: var(--primary); font-weight: 700; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-main);
  background: transparent;
  border: none;
  white-space: nowrap;
  transition: background-color 0.22s var(--ease-out), color 0.22s var(--ease-out);
}

.nav-link:hover { background: var(--btn-plain-bg-hover); }

.nav-link.active {
  background: var(--primary);
  color: var(--on-primary);
}

.nav-link .caret { opacity: 0.7; transition: transform 0.18s ease; }

/* 工具箱下拉 */
.nav-dropdown { position: relative; }

.nav-dropdown.open .dropdown-toggle .caret { transform: rotate(180deg); }

.dropdown-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 300px;
  background: var(--float-panel-bg);
  border: 1px solid var(--line-divider);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-card);
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out), visibility 0.22s;
  z-index: 55;
}

.nav-dropdown.open .dropdown-panel,
.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-small);
}

.dropdown-item:hover { background: var(--btn-plain-bg-hover); }

.di-icon {
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-small);
  background: var(--btn-regular-bg);
  color: var(--btn-content);
  font-size: 0.7rem;
  font-weight: 700;
}

.di-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  flex: none;
}

.di-text { display: flex; flex-direction: column; min-width: 0; }
.di-text b { font-size: 0.875rem; font-weight: 600; }
.di-text i {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

/* 右侧操作区 */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--btn-regular-bg);
  color: var(--text-main);
  font-size: 0.8125rem;
  border: none;
  white-space: nowrap;
  transition: background-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}

.pill-btn:hover { background: var(--btn-regular-bg-hover); }

.codex-icon { color: var(--gold); display: inline-flex; }

.codex-value {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.codex-value .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.login-pill {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--btn-content);
}

.login-pill:hover {
  background: color-mix(in srgb, var(--primary) 22%, transparent);
}

.theme-btn {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-regular-bg);
  color: var(--text-main);
  transition: background-color 0.18s ease;
}

.theme-btn:hover { background: var(--btn-regular-bg-hover); }

.theme-btn .icon-light,
.theme-btn .icon-dark,
.theme-btn .icon-system { display: none; }

:root:not(.dark) .theme-btn .icon-light { display: inline-flex; }
:root.dark .theme-btn .icon-dark { display: inline-flex; }

.menu-btn {
  display: none;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  border: none;
  align-items: center;
  justify-content: center;
  background: var(--btn-regular-bg);
  color: var(--text-main);
}

/* ---------- 移动端抽屉 ---------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s;
  z-index: 70;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(84vw, 340px);
  background: var(--float-panel-bg);
  z-index: 75;
  transform: translateX(100%);
  transition: transform 0.24s ease;
  padding: 1rem;
  overflow-y: auto;
}

.drawer-mask.open,
.drawer.open { opacity: 1; visibility: visible; transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.drawer-title { font-weight: 700; font-size: 1rem; }

.drawer-close {
  background: var(--btn-regular-bg);
  color: var(--text-main);
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drawer-nav { display: flex; flex-direction: column; gap: 0.15rem; }

.drawer-nav a {
  padding: 0.7rem 0.7rem;
  min-height: 44px;
  border-radius: var(--radius-small);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.drawer-nav a:hover { background: var(--btn-plain-bg-hover); }

.drawer-nav a i {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.drawer-nav.small a { font-size: 0.85rem; }

.drawer-sec {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 1rem 0 0.35rem;
}

.theme-seg {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--btn-regular-bg);
  border-radius: 999px;
  padding: 0.2rem;
  gap: 0.15rem;
}

.theme-seg button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 0.45rem 0;
  min-height: 44px;
  border-radius: 999px;
}

.theme-seg button.active {
  background: var(--primary);
  color: var(--on-primary);
}

/* ---------- 两栏布局 ---------- */
.layout {
  max-width: var(--page-width);
  margin: 1rem auto 0;
  padding: 0 clamp(0.75rem, 3vw, 1.5rem) 2.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.sidebar {
  width: 280px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 4.2rem;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line-divider);
  transition: background-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

/* ---------- 侧栏卡片 ---------- */
.profile-card { padding: 1.4rem 1.2rem; text-align: center; }

.avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 0.8rem;
  border-radius: 1.3rem;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.profile-name { margin: 0 0 0.4rem; font-size: 1.15rem; }

.profile-bio {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.profile-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: filter 0.18s ease;
}

.mini-btn:hover { filter: brightness(1.08); }

.mini-btn.primary { background: var(--primary); color: var(--on-primary); }
.mini-btn.gold { background: var(--gold); color: #1f2937; }

/* 二维码卡 */
.qr-card { padding: 0.75rem; }

.qr-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--btn-regular-bg);
  border-radius: 999px;
  padding: 0.2rem;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
}

.qr-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  padding: 0.35rem 0;
  border-radius: 999px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.qr-tab.active { background: var(--primary); color: var(--on-primary); }

.qr-body {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 0.6rem;
}

.qr-canvas {
  display: block;
  border-radius: var(--radius-small);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.qr-canvas svg { display: block; }

.qr-caption {
  width: 100%;
  border: none;
  background: var(--btn-regular-bg);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 0.42rem 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.qr-caption:hover { background: var(--btn-regular-bg-hover); }

.qr-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* 分类 / 标签小卡 */
.widget-card { padding: 1rem 1.1rem; }

.widget-title {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.widget-title::before {
  content: "";
  width: 3px;
  height: 0.95rem;
  border-radius: 3px;
  background: var(--primary);
}

.cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.cat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.15rem;
  border-radius: var(--radius-small);
}

.cat-list li + li { border-top: 1px solid var(--line-divider); }

.cat-list a { font-size: 0.875rem; }
.cat-list a:hover { color: var(--title-active); }

.count {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 1.4rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 9.2rem;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.tag-cloud.expanded { max-height: 60rem; }

.tag {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--btn-regular-bg);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tag:hover { background: var(--btn-regular-bg-hover); color: var(--btn-content); }

.tag-more {
  margin-top: 0.6rem;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 0.3rem 0;
}

.tag-more:hover { color: var(--title-active); }

/* 主题色滑块 */
.hue-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hue-row input[type="range"] {
  flex: 1;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right,
    oklch(0.7 0.12 0), oklch(0.7 0.12 60), oklch(0.7 0.12 120),
    oklch(0.7 0.12 180), oklch(0.7 0.12 240), oklch(0.7 0.12 300), oklch(0.7 0.12 360));
  outline: none;
}

.hue-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  cursor: pointer;
}

.hue-value {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 2rem;
  text-align: right;
}

/* ---------- Hero ---------- */
.hero-card { position: relative; overflow: hidden; isolation: isolate; padding: 1.85rem 1.75rem 1.55rem; }

.hero-card h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.hero-sub {
  margin: 0 0 1.1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}

.hero-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-medium);
  background: var(--btn-regular-bg);
  transition: background-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.hero-item:hover {
  background: var(--btn-card-bg-hover);
  transform: translateY(-2px);
}

.hi-icon {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: var(--radius-small);
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--btn-content);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hi-text { display: flex; flex-direction: column; min-width: 0; }
.hi-text b { font-size: 0.83rem; font-weight: 600; }
.hi-text i {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.12rem;
}

/* ---------- 月赛横幅 ---------- */
.banner-card {
  position: relative;
  border-radius: var(--radius-large);
  background: var(--banner-bg);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.banner-deco {
  position: absolute;
  inset: 0 0 0 42%;
  opacity: 0.9;
  pointer-events: none;
}

.banner-content {
  position: relative;
  padding: 1.6rem 1.7rem;
  max-width: 62%;
}

.banner-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.banner-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  color: #fff;
}

.banner-desc {
  margin: 0 0 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.83rem;
  line-height: 1.6;
}

.banner-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.bs { display: flex; align-items: baseline; gap: 0.3rem; }
.bs b { color: var(--primary-light); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.bs i { font-style: normal; color: rgba(255, 255, 255, 0.65); font-size: 0.72rem; }

.banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.banner-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }

/* ---------- 新手必读 ---------- */
.sec-title {
  margin: 0.4rem 0 0.75rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-main);
}

.sec-title svg { color: var(--btn-content); }

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.feature-card { padding: 1.1rem 1.2rem; display: block; }

.feature-card:hover {
  background: var(--card-bg-hover);
  transform: translateY(-2px);
}

.fc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.fc-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--btn-content);
  background: color-mix(in srgb, var(--primary) 13%, transparent);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
}

.fc-read {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.feature-card:hover .fc-read { color: var(--title-active); }

.feature-card h4 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  line-height: 1.45;
}

.feature-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 文章列表 ---------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-card {
  position: relative;
  padding: 1.2rem 1.3rem;
}

.post-card:hover { background: var(--card-bg-hover); }

/* Whole card is the hit target; title link stretches via ::after. Tags stay non-links. */
.post-card .pc-title a {
  position: static;
  color: inherit;
  text-decoration: none;
}

.post-card .pc-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.pc-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.pc-cat {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
}

.pc-tag {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--btn-regular-bg);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

.pc-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.45;
}

.pc-title a:hover { color: var(--title-active); }

.pc-excerpt {
  margin: 0 0 0.8rem;
  color: var(--text-secondary);
  font-size: 0.83rem;
  line-height: 1.7;
}

.pc-meta-bottom {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pc-meta-bottom time { font-variant-numeric: tabular-nums; }

.pc-meta-bottom span::before {
  content: "·";
  margin-right: 0.9rem;
  color: var(--meta-divider);
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0 0.5rem;
}

.page-num {
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.4rem;
  border-radius: var(--radius-small);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
  transition: background-color 0.15s ease;
}

a.page-num:hover { background: var(--btn-plain-bg-hover); }

.page-num.current {
  background: var(--primary);
  color: var(--on-primary);
}

/* ---------- 页脚 ---------- */
.site-footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.9;
  padding: 1.2rem 0.9rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

.site-footer p { margin: 0; }

.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--title-active); }

.footer-note { opacity: 0.65; margin-top: 0.3rem !important; }

/* ---------- 悬浮客服 ---------- */
.float-chat {
  position: fixed;
  right: 1.2rem;
  bottom: 1.4rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  color: var(--btn-content);
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 65;
  transition: transform 0.18s ease;
}

.float-chat:hover { transform: translateY(-2px); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  z-index: 90;
}

.modal-mask.open { opacity: 1; visibility: visible; }

.modal {
  width: min(640px, 92vw);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-mask.open .modal { transform: translateY(0); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem 0;
}

.modal-head h3 { margin: 0; font-size: 1.05rem; }

.modal-close {
  border: none;
  background: var(--btn-regular-bg);
  color: var(--text-main);
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  font-size: 0.8rem;
}

.modal-body {
  padding: 0.9rem 1.3rem 1.1rem;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--text-main);
}

.modal-body p { margin: 0.4rem 0; }
.modal-date { color: var(--text-secondary); }

.modal-body ol,
.modal-body ul { padding-left: 1.3rem; margin: 0.4rem 0; }
.modal-body li { margin: 0.25rem 0; }

.modal-foot {
  padding: 0 1.3rem 1.1rem;
  display: flex;
  justify-content: flex-end;
}

.ghost-btn {
  border: none;
  background: var(--btn-regular-bg);
  color: var(--btn-content);
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
}

.ghost-btn:hover { background: var(--btn-regular-bg-hover); }

/* 二维码弹窗 */
.qr-modal {
  width: min(340px, 90vw);
  align-items: center;
  padding-bottom: 1.2rem;
  position: relative;
}

.qr-close { position: absolute; top: 0.9rem; right: 0.9rem; }

.qr-modal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--btn-regular-bg);
  border-radius: 999px;
  padding: 0.2rem;
  gap: 0.15rem;
  margin: 1.2rem 1.2rem 0.9rem;
  width: calc(100% - 2.4rem);
}

.qr-modal-body { display: flex; justify-content: center; }

.qr-modal-body canvas {
  border-radius: var(--radius-small);
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.qr-modal-tip {
  margin: 0.8rem 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 0 1.2rem;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .sidebar { display: none; }
  .hero-grid { grid-template-columns: repeat(2, 1fr); }
  .banner-content { max-width: 80%; }
  .banner-deco { opacity: 0.35; }
}

@media (max-width: 900px) {
  .nav-links { display: none; } /* 后台仍用顶栏+抽屉；前台底栏在文末「置底导航浮窗」覆盖 */
  .codex-label { display: none; }
  .navbar .codex-pill { display: none; }
  .menu-btn { display: inline-flex; }
  .navbar-wrap {
    padding: 0.4rem 0.6rem 0.15rem;
    padding-top: max(0.4rem, env(safe-area-inset-top, 0px));
  }
  .navbar {
    padding: 0.28rem 0.45rem;
    gap: 0.3rem;
    width: 100%;
    min-width: 0;
  }
  .brand { font-size: 1.05rem; margin-right: 0; flex: none; }
  .nav-actions { gap: 0.2rem; flex: none; min-width: 0; }
  .pill-btn { padding: 0 0.7rem; min-height: 44px; }
  .login-pill {
    padding: 0 0.7rem;
    height: 44px;
    min-height: 44px;
  }
  .login-pill .login-pill-extra { display: none; }
  .theme-btn,
  .menu-btn,
  .navbar .nav-actions > a.pill-btn:not(.login-pill),
  .navbar .nav-actions > button.pill-btn.account-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    gap: 0;
    justify-content: center;
  }
  .navbar .nav-actions > a.pill-btn:not(.login-pill) { font-size: 0; }
  .account-btn #accountName,
  .account-btn .caret { display: none; }
  .drawer {
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }
  .drawer-close { width: 44px; height: 44px; }
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .banner-deco { display: none; }
  .banner-content { max-width: 100%; }
  .banner-stats { gap: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 文章详情页 ---------- */
.crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.crumb a { color: var(--text-secondary); text-decoration: none; }
.crumb a:hover { color: var(--title-active); }
.crumb-sep { color: var(--text-secondary); opacity: 0.55; }
.crumb-current {
  color: var(--text-main);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.article-card { padding: 1.6rem 1.7rem 1.4rem; }

.article-title {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  line-height: 1.4;
  letter-spacing: 0.01em;
  font-weight: 750;
}

.article-meta { margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-divider); }

.article-body {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-main);
  overflow-wrap: break-word;
  max-width: 46rem;
}

.article-body h2 {
  margin: 1.6rem 0 0.7rem;
  font-size: 1.15rem;
  line-height: 1.45;
}

.article-body h3 { margin: 1.2rem 0 0.6rem; font-size: 1rem; }

.article-body p { margin: 0.6rem 0; }

.article-body ul,
.article-body ol { margin: 0.6rem 0; padding-left: 1.5rem; }
.article-body li { margin: 0.3rem 0; }

.article-body a {
  color: var(--btn-content);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
}
.article-body a:hover { color: var(--link-hover); }

.article-body strong { font-weight: 600; }

.article-body blockquote {
  margin: 1rem 0;
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--primary);
  background: var(--btn-regular-bg);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  color: var(--text-secondary);
}
.article-body blockquote p { margin: 0; }

.article-body code {
  font-family: "JetBrains Mono", Consolas, ui-monospace, monospace;
  font-size: 0.82em;
  background: var(--inline-code-bg);
  color: var(--inline-code-color);
  padding: 0.15em 0.45em;
  border-radius: 4px;
}

.article-body pre {
  margin: 0.9rem 0;
  padding: 0.9rem 1rem;
  background: #121310;
  color: #eee9d4;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: var(--radius-medium);
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.6;
  box-shadow: inset 0 0 24px rgba(243, 210, 74, 0.05);
}

.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* 正文配图 */
.article-body figure {
  margin: 1.1rem 0;
}
.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.article-body figcaption {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 上一篇 / 下一篇 */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.post-nav .pn-item:only-child { grid-column: 1 / -1; }

.pn-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
}

.pn-item:hover { background: var(--card-bg-hover); }

.pn-item i { font-style: normal; font-size: 0.72rem; color: var(--text-secondary); }
.pn-item b { font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.pn-next { text-align: right; }

@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .pn-next { text-align: left; }
}

/* ---------- 归档页 ---------- */
.archive-head { padding: 1.4rem 1.5rem 1.2rem; }

.archive-head h1 { margin: 0 0 0.4rem; font-size: 1.5rem; }

.archive-head p { margin: 0 0 0.9rem; font-size: 0.82rem; color: var(--text-secondary); }

.archive-head .tag-cloud { max-height: none; }

.archive-tags .tag-filter { border: none; cursor: pointer; }

.archive-tags .tag-filter.active {
  background: var(--primary);
  color: var(--on-primary);
}

.archive-list { display: flex; flex-direction: column; gap: 0.9rem; }

.arch-item { display: block; padding: 1.05rem 1.25rem; }
.arch-item:hover { background: var(--card-bg-hover); }

.ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.ai-head time { font-variant-numeric: tabular-nums; }

.arch-item h3 { margin: 0 0 0.4rem; font-size: 1.02rem; line-height: 1.45; }

.arch-item p {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-foot { font-size: 0.72rem; color: var(--text-secondary); }

/* ---------- 关于 / 建设中 ---------- */
.about-card { padding: 1.6rem 1.7rem; max-width: 46rem; }

.about-card h1 { margin: 0 0 0.8rem; font-size: 1.4rem; }
.about-card h2 { margin: 1.2rem 0 0.5rem; font-size: 1.05rem; }
.about-card p, .about-card li { font-size: 0.9rem; line-height: 1.8; color: var(--text-main); }
.about-card a { color: var(--btn-content); }
.about-card a:hover { color: var(--link-hover); }
.about-note { color: var(--text-secondary) !important; font-size: 0.78rem !important; }

.soon-card {
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.soon-icon { font-size: 2.6rem; display: block; margin-bottom: 0.6rem; }

.soon-card h1 { margin: 0 0 0.5rem; font-size: 1.4rem; }

.soon-card p { margin: 0 auto 1.2rem; max-width: 26rem; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; }

/* ---------- 登录 / 注册 / 查询 / 账户 ---------- */
.auth-card { padding: 1.5rem 1.6rem 1.2rem; max-width: 28rem; }

.page-title { margin: 0 0 0.4rem; font-size: 1.3rem; letter-spacing: 0.02em; font-weight: 700; }
.page-sub { margin: 0 0 1rem; font-size: 0.84rem; color: var(--text-secondary); line-height: 1.7; }
.page-sub a { color: var(--btn-content); }
.page-sub a:hover { color: var(--link-hover); }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--btn-regular-bg);
  border-radius: 999px;
  padding: 0.2rem;
  gap: 0.15rem;
  margin-bottom: 1.1rem;
}

.auth-tab {
  border: none; background: transparent; color: var(--text-secondary);
  font-size: 0.9rem; padding: 0.45rem 0; border-radius: 999px;
}
.auth-tab.active { background: var(--primary); color: var(--on-primary); }

.auth-form { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 0.6rem; }

.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field span { font-size: 0.78rem; color: var(--text-secondary); }

.field input {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-main);
  background: var(--btn-regular-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  padding: 0.55rem 0.7rem;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.field input:focus { border-color: var(--primary); background: var(--card-bg); }
.field input[readonly] { color: var(--text-secondary); }

.form-msg { min-height: 1.1em; margin: 0; font-size: 0.78rem; color: var(--green); }
.form-msg.err { color: #ef4444; }

.btn-primary {
  border: none; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  font-size: 0.92rem; font-weight: 600;
  padding: 0.6rem 1.25rem; border-radius: 999px;
  box-sizing: border-box;
  transition: filter 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}
.btn-primary:hover { filter: brightness(1.08); }

.auth-note { margin: 0.9rem 0 0; font-size: 0.75rem; color: var(--text-secondary); }
.auth-alt { margin: 0.3rem 0 0; font-size: 0.78rem; color: var(--text-secondary); }
.auth-alt a, .auth-note a { color: var(--btn-content); }

.query-hints { margin-top: 1rem; font-size: 0.78rem; color: var(--text-secondary); display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.query-login-gate { margin: 0.4rem 0 0.2rem; }
a.query-login-btn, a.btn-primary.query-login-btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 0.85rem; text-decoration: none; width: auto; padding-left: 1.2rem; padding-right: 1.2rem;
}

.query-hints .demo-no { cursor: pointer; }

/* 订单卡片 */
.order-item { padding: 1rem 1.2rem; margin-bottom: 0.8rem; }

.oi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.45rem; }
.oi-head b { font-size: 0.95rem; }

.status-badge {
  font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.65rem; border-radius: 999px;
}
.status-badge.done { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.status-badge.processing { background: rgba(245, 158, 11, 0.18); color: #d97706; }
.status-badge.pending { background: rgba(245, 158, 11, 0.18); color: #d97706; }
.status-badge.cancelled { background: rgba(107, 114, 128, 0.2); color: #4b5563; }
:root.dark .status-badge.done { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
:root.dark .status-badge.processing,
:root.dark .status-badge.pending { background: rgba(245, 158, 11, 0.22); color: #fbbf24; }
:root.dark .status-badge.cancelled { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

.oi-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  font-size: 0.75rem; color: var(--text-secondary);
  margin-bottom: 0.55rem;
}

.key-row {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--btn-regular-bg);
  border-radius: var(--radius-small);
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.35rem;
}
.key-row code {
  flex: 1; font-family: "JetBrains Mono", Consolas, ui-monospace, monospace;
  font-size: 0.8rem; color: var(--inline-code-color);
  word-break: break-all;
}

.copy-btn {
  border: none; cursor: pointer;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--btn-content);
  font-size: 0.72rem; font-weight: 600;
  padding: 0.3rem 0.7rem; border-radius: 999px;
}
.copy-btn:hover { background: color-mix(in srgb, var(--primary) 24%, transparent); }

.key-hint { margin: 0.2rem 0 0; font-size: 0.72rem; color: var(--text-secondary); }
.key-hint a { color: var(--btn-content); }

.oi-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.order-item .cancel-order-btn { color: #b45309; }
:root.dark .order-item .cancel-order-btn { color: #fbbf24; }

.pay-done-label {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}
#payDone .kv-row {
  align-items: center;
  margin: 0.7rem 0 0.15rem;
}
#payDone .pay-done-no {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
#payDone .pay-done-no b { text-align: right; }


/* 账户中心 */
.acct-tabs {
  display: flex; gap: 0.3rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-divider);
  padding-bottom: 0.6rem; margin-bottom: 1.1rem;
}

.acct-tab {
  border: none; cursor: pointer;
  background: transparent; color: var(--text-secondary);
  font-size: 0.85rem; padding: 0.4rem 0.9rem; border-radius: 999px;
}
.acct-tab:hover { background: var(--btn-plain-bg-hover); color: var(--text-main); }
.acct-tab.active { background: var(--primary); color: var(--on-primary); }

.acct-panel .auth-form { max-width: 22rem; }

.ref-stats { display: flex; gap: 1.4rem; margin-top: 0.9rem; }

/* 导航栏账户下拉 */
.account-drop .dropdown-panel { left: auto; right: 0; min-width: 230px; }

.account-btn .caret { opacity: 0.7; margin-left: 0.15rem; }
.account-drop.open .account-btn .caret { transform: rotate(180deg); }

.as-btn {
  display: flex; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  font-family: inherit;
}
.as-btn:hover { background: var(--btn-plain-bg-hover); }

/* ---------- AI 商店 ---------- */
.store-head { padding: 1.4rem 1.5rem 1.2rem; }
.store-head h1 { margin: 0 0 0.45rem; font-size: 1.5rem; }
.store-head p { margin: 0; font-size: 0.84rem; color: var(--text-secondary); line-height: 1.7; }
.store-head a { color: var(--btn-content); }

.store-cat-tabs {
  display: none;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.35rem;
  position: sticky;
  top: 3.6rem;
  z-index: 40;
  background: var(--page-bg);
  scrollbar-width: none;
}
.store-cat-tabs::-webkit-scrollbar { display: none; }
.store-cat-tab {
  flex: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--btn-regular-bg);
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}
.store-cat-tab.is-active {
  background: var(--primary);
  color: var(--on-primary);
}

/* Desktop: larger left category nav */
.store-sidebar {
  width: 316px;
}
.store-sidebar .widget-card {
  padding: 1.2rem 0.95rem 1.05rem;
}
.store-sidebar .widget-title {
  font-size: 1.08rem;
  margin-bottom: 0.9rem;
}
.store-sidebar .widget-title::before {
  width: 3.5px;
  height: 1.1rem;
}
.store-sidebar .cat-list { gap: 0.28rem; }
.store-sidebar .cat-list li {
  display: block;
  padding: 0;
  border-radius: 0;
}
.store-sidebar .cat-list li + li { border-top: none; }

#storeCatNav a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.78rem 0.85rem;
  min-height: 3.4rem;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}
#storeCatNav li { cursor: pointer; }
#storeCatNav a:hover {
  background: var(--btn-plain-bg-hover);
  color: var(--title-active);
}
#storeCatNav a.is-active {
  background: color-mix(in srgb, var(--primary) 8%, var(--card-bg));
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line-divider));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
  color: var(--title-active);
  font-weight: 750;
}
#storeCatNav a.is-active .store-cat-cn { color: var(--title-active); }

.store-section { scroll-margin-top: 5.2rem; }
.store-section-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.15rem 0 0.55rem;
}
.store-section-head h2 { margin: 0; font-size: 1.12rem; }
.store-section-en { font-size: 0.78rem; color: var(--text-secondary); }

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.product-card { padding: 1.2rem 1.25rem; display: flex; flex-direction: column; }
.product-card:hover { background: var(--card-bg-hover); }
.product-card.sold-out {
  background: color-mix(in srgb, var(--card-bg) 88%, var(--text-secondary));
  box-shadow: none;
}
.product-card.sold-out:hover {
  background: color-mix(in srgb, var(--card-bg) 88%, var(--text-secondary));
  transform: none;
  box-shadow: none;
}
.product-card.sold-out .pi-icon,
.product-card.sold-out h3,
.product-card.sold-out .pi-desc,
.product-card.sold-out .price {
  opacity: 0.5;
  filter: grayscale(1);
}

.pi-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 6px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
  margin-bottom: 0.6rem;
  background: color-mix(in srgb, var(--primary) 8%, var(--card-bg));
  color: var(--title-active);
  font-size: 0;
  line-height: 0;
}
.pi-icon svg,
.pi-icon img {
  width: 24px;
  height: 24px;
  display: block;
}
.pi-icon.pi-icon-section {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  margin-bottom: 0;
}
.pi-icon.pi-icon-section svg,
.pi-icon.pi-icon-section img {
  width: 20px;
  height: 20px;
}
.pi-icon-openai {
  background: linear-gradient(135deg, rgba(16, 163, 127, 0.1) 0%, rgba(16, 163, 127, 0.03) 100%);
  border-color: rgba(16, 163, 127, 0.18);
}
.pi-icon-claude {
  background: linear-gradient(135deg, rgba(217, 119, 87, 0.1) 0%, rgba(217, 119, 87, 0.03) 100%);
  border-color: rgba(217, 119, 87, 0.18);
}
.pi-icon-google {
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.1) 0%, rgba(66, 133, 244, 0.03) 100%);
  border-color: rgba(66, 133, 244, 0.18);
}
.pi-icon-gemini {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.03) 100%);
  border-color: rgba(99, 102, 241, 0.18);
}
.pi-icon-perplexity {
  background: linear-gradient(135deg, rgba(32, 128, 141, 0.1) 0%, rgba(32, 128, 141, 0.03) 100%);
  border-color: rgba(32, 128, 141, 0.18);
  color: #20808d;
}
.pi-icon-sms {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.03) 100%);
  border-color: rgba(139, 92, 246, 0.18);
}
.pi-icon-muse {
  background: linear-gradient(135deg, rgba(0, 130, 251, 0.1) 0%, rgba(0, 100, 224, 0.03) 100%);
  border-color: rgba(0, 130, 251, 0.18);
}
.pi-icon-wechat {
  background: linear-gradient(135deg, rgba(7, 193, 96, 0.12) 0%, rgba(7, 193, 96, 0.03) 100%);
  border-color: rgba(7, 193, 96, 0.2);
}
.pi-icon-aiplain {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, transparent) 0%, color-mix(in srgb, var(--primary) 4%, transparent) 100%);
  border-color: color-mix(in srgb, var(--primary) 22%, transparent);
}
:root.dark .pi-icon {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.2);
}
:root.dark .pi-icon-perplexity { color: #3fbccb; }

.store-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.store-cat-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.store-cat-icon svg,
.store-cat-icon img {
  width: 22px;
  height: 22px;
  display: block;
}
.store-cat-text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
  flex: 1;
}
.store-cat-cn {
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.store-cat-en {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
  letter-spacing: 0.02em;
}
#storeCatNav .count {
  margin-left: auto;
  flex: none;
  font-size: 0.78rem;
  min-width: 1.55rem;
  height: 1.55rem;
  font-weight: 700;
}
.store-cat-tab { display: inline-flex; align-items: center; }

.product-card h3 { margin: 0 0 0.4rem; font-size: 1rem; line-height: 1.45; }

.pi-desc {
  flex: 1; margin: 0 0 0.9rem;
  font-size: 0.78rem; color: var(--text-secondary); line-height: 1.65;
}

.pi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  min-width: 0;
}

.pi-foot-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.price { font-size: 1.2rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }

.buy-btn {
  border: none; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  font-size: 0.8rem; font-weight: 600;
  padding: 0.45rem 0.9rem; border-radius: 999px;
  transition: filter 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}
a.buy-btn:hover { color: var(--on-primary); }
.buy-btn:hover { filter: brightness(1.1); }
.buy-btn:disabled { opacity: 0.6; cursor: wait; }
.product-card.sold-out .buy-btn,
.buy-btn.sold-out {
  background: color-mix(in srgb, var(--text-secondary) 38%, var(--card-bg));
  color: var(--text-secondary);
  filter: grayscale(1);
  cursor: not-allowed;
  opacity: 0.72;
}
.product-card.sold-out .buy-btn:hover,
.buy-btn.sold-out:hover {
  filter: grayscale(1);
}
.product-card.sold-out .buy-btn:disabled,
.buy-btn.sold-out:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.pi-foot .stock-tag {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--text-secondary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-secondary) 28%, transparent);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px);
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--line-color);
  font-size: 0.82rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 120;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-err { background: #b91c1c; }

@media (max-width: 1100px) {
  .store-layout .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  /* Keep the store category sidebar visible; other site sidebars stay hidden. */
  .store-layout .store-sidebar { display: flex; }
  .store-cat-tabs { display: none; }
}

@media (max-width: 900px) {
  .store-layout {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.45rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .store-sidebar {
    width: 100%;
    position: sticky;
    top: 3.55rem;
    z-index: 45;
    gap: 0;
  }
  .store-sidebar .widget-title { display: none; }
  .store-sidebar .widget-card {
    padding: 0.35rem 0 0.45rem;
    background: color-mix(in srgb, var(--page-bg) 88%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: none;
    border-radius: 0;
  }
  .store-sidebar .cat-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.5rem;
    width: 100%;
    padding: 0.1rem 0.05rem 0.2rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .store-sidebar .cat-list::-webkit-scrollbar { display: none; }
  .store-sidebar .cat-list li { flex: none; }
  #storeCatNav a {
    width: auto;
    min-width: auto;
    min-height: 44px;
    padding: 0 0.95rem;
    border-radius: 999px;
    gap: 0.4rem;
    background: var(--btn-regular-bg);
    font-weight: 650;
    box-shadow: none;
  }
  #storeCatNav a.is-active {
    background: var(--primary);
    color: var(--on-primary);
    border-color: transparent;
    box-shadow: none;
  }
  #storeCatNav a.is-active .store-cat-cn { color: inherit; }
  .store-cat-en,
  #storeCatNav .count { display: none; }
  .store-cat-icon {
    width: 18px;
    height: 18px;
  }
  .store-cat-icon svg,
  .store-cat-icon img {
    width: 16px;
    height: 16px;
  }
  .store-cat-cn { font-size: 0.88rem; font-weight: 650; }

  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .store-section { scroll-margin-top: 7rem; }
}

@media (max-width: 768px) {
  .store-head { padding: 0.95rem 1rem 0.85rem; }
  .store-head h1 { font-size: 1.2rem; margin-bottom: 0.25rem; }
  .store-head p { font-size: 0.78rem; line-height: 1.55; }
  .store-section-head { gap: 0.45rem; margin: 0.1rem 0 0.45rem; }
  .store-section-head h2 { font-size: 1rem; }
  .store-section-en { display: none; }
  .pi-icon.pi-icon-section { width: 32px; height: 32px; border-radius: 9px; }
  .pi-icon.pi-icon-section svg,
  .pi-icon.pi-icon-section img { width: 16px; height: 16px; }

  .product-card { padding: 0.85rem 0.8rem 0.75rem; }
  .pi-icon { width: 36px; height: 36px; border-radius: 11px; margin-bottom: 0.45rem; }
  .pi-icon svg,
  .pi-icon img { width: 20px; height: 20px; }
  .product-card h3 {
    font-size: 0.88rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
  }
  .pi-desc,
  .pi-more { display: none; }
  .price { font-size: 1.05rem; }
  .buy-btn {
    min-height: 44px;
    padding: 0 0.85rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 640px) {
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .auth-card { padding: 1.2rem 1.1rem; }
  .store-section { scroll-margin-top: 7.2rem; }
}

@media (max-width: 480px) {
  .store-layout {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
  .store-sidebar { top: 3.25rem; }
  .store-grid { gap: 0.5rem; }
  .product-card { padding: 0.75rem 0.7rem 0.7rem; }
  .product-card h3 { font-size: 0.82rem; }
  .price { font-size: 1rem; }
  .pi-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .pi-foot-actions {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .buy-btn { width: 100%; min-height: 44px; }
}

@media (max-width: 359px) {
  .login-pill {
    font-size: 0;
    gap: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    justify-content: center;
  }
  .navbar-wrap { padding-left: 0.45rem; padding-right: 0.45rem; }
  .navbar { padding-left: 0.35rem; padding-right: 0.35rem; gap: 0.2rem; }
  .brand { font-size: 1rem; gap: 0.35rem; }
  .nav-actions { gap: 0.15rem; }
}

/* ---------- 发货管理后台 ---------- */
.admin-body {
  min-height: 100vh;
  padding: 0;
  background: var(--page-bg);
  display: flex;
  flex-direction: column;
}

.admin-body .navbar { max-width: 88rem; }
.admin-body .navbar-wrap {
  padding-left: clamp(0.75rem, 3vw, 1.5rem);
  padding-right: clamp(0.75rem, 3vw, 1.5rem);
}

.admin-wrap {
  max-width: 88rem;
  margin: 0.75rem auto 0;
  padding: 0 clamp(0.75rem, 3vw, 1.5rem) 2rem;
  width: 100%;
  flex: 1 0 auto;
}

.admin-card {
  padding: 1.6rem 1.7rem 1.2rem;
  max-width: 28rem;
  margin: 1.6rem auto 0;
}

.admin-body .site-footer { margin-top: auto; }

.admin-main { padding: 1.5rem 1.75rem 1.5rem; }

.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-tools { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.admin-main .acct-tabs { gap: 0.35rem; margin-bottom: 1.2rem; }
.admin-main .acct-tab { padding: 0.45rem 1rem; }

.admin-order { margin-bottom: 0.9rem; }

.admin-keys { margin-bottom: 0.55rem; line-height: 2; }

.key-chip {
  display: inline-block;
  font-family: "JetBrains Mono", Consolas, ui-monospace, monospace;
  font-size: 0.75rem;
  background: var(--inline-code-bg);
  color: var(--inline-code-color);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-right: 0.3rem;
}

.admin-deliver {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}
.admin-deliver-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.admin-deliver .cancel-order-btn,
.admin-deliver .cancel-ship-btn {
  white-space: nowrap;
  height: 34px;
  min-height: 34px;
  padding: 0 0.9rem;
  color: #b45309;
}
:root.dark .admin-deliver .cancel-order-btn,
:root.dark .admin-deliver .cancel-ship-btn {
  color: #fbbf24;
}
.deliver-input {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text-main);
  background: var(--btn-regular-bg);
  border: 1px solid var(--line-color, var(--line-divider));
  border-radius: var(--radius-small);
  padding: 0.5rem 0.7rem;
  outline: none;
  resize: vertical;
  min-width: 0;
  min-height: 2.6rem;
}
.deliver-input:focus { border-color: var(--primary); }

.admin-deliver .deliver-btn {
  padding: 0 1.05rem;
  height: 34px;
  min-height: 34px;
  white-space: nowrap;
}

.batch-text {
  width: 100%;
  font-family: "JetBrains Mono", Consolas, ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--btn-regular-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-medium);
  padding: 0.7rem 0.85rem;
  outline: none;
  resize: vertical;
}
.batch-text:focus { border-color: var(--primary); }

.batch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.batch-btn { padding: 0.55rem 1.4rem; min-height: 38px; }

.batch-actions .btn-primary,
.batch-actions .copy-btn { min-height: 38px; }

.batch-actions input[type="file"] {
  font-size: 0.75rem; color: var(--text-secondary); max-width: 18rem;
  flex: 1 1 12rem;
}

#batchResult .order-item { margin-top: 0.9rem; }

/* 后台表格（商品、用户、管理员等统一） */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
  margin-top: 0;
}

.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line-divider);
  vertical-align: middle;
  word-break: normal;
  overflow-wrap: anywhere;
}

.admin-table th {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: color-mix(in srgb, var(--text-secondary) 7%, var(--card-bg));
}

.admin-table tbody tr:last-child th,
.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table tbody tr:hover { background: var(--btn-plain-bg-hover); }

/* 验证码行（输入框 + 发送按钮） */
.code-row { display: flex; gap: 0.45rem; }

.code-row input {
  flex: 1; min-width: 0;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-main);
  background: var(--btn-regular-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  padding: 0.55rem 0.7rem;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.code-row input:focus { border-color: var(--primary); background: var(--card-bg); }

.code-send {
  white-space: nowrap; flex: none;
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
}

.field-select {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-main);
  background: var(--btn-regular-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  padding: 0.55rem 0.7rem;
  outline: none;
}

.qr-slot { min-height: 190px; display: flex; align-items: center; justify-content: center; }

.pay-highlight {
  background: var(--btn-regular-bg);
  border-radius: var(--radius-small);
  padding: 0.6rem 0.9rem;
  margin: 0.6rem 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- IP 诊断 ---------- */
.ip-card { padding: 1.4rem 1.5rem 1.2rem; }
.ip-card .btn-primary { margin-bottom: 1rem; }
.ip-card-title { margin: 0 0 0.6rem; font-size: 1.02rem; }

.kv-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: 0.45rem 0.1rem;
  border-bottom: 1px solid var(--line-divider);
  font-size: 0.84rem;
}
.kv-row:last-child { border-bottom: none; }
.kv-row span { color: var(--text-secondary); flex: none; }
.kv-row b { font-weight: 500; word-break: break-all; text-align: right; }

.verdict-row {
  font-size: 0.85rem; line-height: 1.6;
  padding: 0.5rem 0.8rem; border-radius: var(--radius-small);
  margin-bottom: 0.4rem;
}
.verdict-ok { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.verdict-warn { background: rgba(245, 158, 11, 0.14); color: #b45309; }

.lat-good { color: #16a34a; font-weight: 600; }
.lat-slow { color: #d97706; font-weight: 600; }
.lat-bad { color: #ef4444; font-weight: 600; }


/* ---------- 后台商品与管理员 ---------- */
.admin-role-badge {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.1rem 0 0.75rem;
}
.admin-toolbar input,
.admin-toolbar select {
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-main);
  background: var(--btn-regular-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  padding: 0.45rem 0.7rem;
  outline: none;
  min-width: 10rem;
}
.admin-toolbar input { flex: 1 1 14rem; min-width: 12rem; height: 38px; box-sizing: border-box; }
.admin-toolbar select { height: 38px; min-width: 8.5rem; box-sizing: border-box; }
.admin-toolbar .btn-primary { height: 38px; min-height: 38px; white-space: nowrap; flex: none; }
.admin-toolbar input:focus,
.admin-toolbar select:focus { border-color: var(--primary); background: var(--card-bg); }

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1rem;
}
@media (max-width: 720px) {
  .admin-form-grid { grid-template-columns: 1fr; }
}

.admin-cat-hint {
  margin: 0.15rem 0 0.7rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.admin-cat-hint.err { color: #b45309; }
:root.dark .admin-cat-hint.err { color: #fbbf24; }

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.35rem 0 0.55rem;
  border: 1px solid var(--line-color, var(--line-divider));
  border-radius: 12px;
  background: var(--card-bg);
}

.admin-product-table { min-width: 960px; }
.admin-product-table td:nth-child(1) { min-width: 10.5rem; }
.admin-product-table td:nth-child(2) {
  white-space: nowrap;
  overflow-wrap: normal;
  font-family: "JetBrains Mono", Consolas, ui-monospace, monospace;
  font-size: 0.75rem;
}

.admin-table td.num,
.admin-table th.num {
  text-align: right;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

.admin-table th.col-status,
.admin-table td.col-status {
  text-align: center;
  white-space: nowrap;
  overflow-wrap: normal;
}
.admin-table td.col-status .status-badge,
.admin-table td .status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.4rem;
  line-height: 1.2;
}

.admin-prod-actions,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 11rem;
  word-break: normal;
  overflow-wrap: normal;
}
.admin-actions-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.admin-prod-actions .copy-btn,
.admin-actions .copy-btn,
.admin-actions .btn-primary {
  height: 30px;
  min-height: 30px;
  padding: 0 0.72rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.admin-actions .action-danger { color: #b45309; }
:root.dark .admin-actions .action-danger { color: #fbbf24; }

.admin-sort-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--btn-regular-bg);
  border-radius: 8px;
  padding: 2px;
  min-width: 5.8rem;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  vertical-align: middle;
}
.admin-sort-cell .sort-val {
  min-width: 1.7rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 0.8rem;
}
.admin-sort-cell .sort-btn,
.admin-sort-cell .copy-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  line-height: 1;
}

#adminPanel-paycfg .auth-form,
#adminPanel-staff .auth-form { max-width: 36rem; }

#adminPanel-users .admin-table { min-width: 640px; }

.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.7rem;
}
.admin-stats b { color: var(--text-main); font-weight: 600; }

#productEditor { margin-top: 1.2rem; }
#stockPanel { margin-top: 1.2rem; }
#pfId[readonly] { opacity: 0.75; }


/* ---------- 工具箱跳转模块 / 本站体检 ---------- */
body:not(.sms-module-on) .sms-module { display: none !important; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--btn-regular-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  padding: 0.55rem 1rem;
  text-decoration: none;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--btn-regular-bg-hover); }
.btn-secondary:disabled,
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.jump-hero { padding: 1.5rem 1.5rem 1.35rem; }
.jump-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-transform: none;
}
.jump-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0 0.2rem;
}
.jump-actions .btn-primary,
.jump-actions .btn-secondary {
  display: inline-flex;
  width: auto;
  text-decoration: none;
  padding: 0.55rem 1.15rem;
}
.jump-sec { margin: 1.25rem 0 0.5rem; }
.jump-sec-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.12rem;
}
.jump-sec-head p {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.jump-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.85rem;
}
.jump-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--card-bg);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  padding: 1rem 1.05rem 0.95rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
}
.jump-card:hover { background: var(--card-bg-hover); transform: translateY(-1px); }
.jump-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-main);
}
.jump-card p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.jc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}
.jc-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--btn-content);
  background: var(--btn-regular-bg);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}
.jc-host {
  font-size: 0.7rem;
  color: var(--text-secondary);
  word-break: break-all;
}
.jc-tag {
  margin: 0;
  font-size: 0.75rem;
  color: var(--title-active);
  font-weight: 600;
}
.jc-go {
  margin-top: auto;
  padding-top: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--title-active);
}
.jump-card.compact { min-height: auto; padding: 0.85rem 1rem; }

.jump-steps { padding: 1.2rem 1.4rem; }
.jump-steps h2,
.jump-steps h3 { margin: 0 0 0.7rem; font-size: 1.05rem; }
.jump-steps ol { margin: 0; padding-left: 1.15rem; }
.jump-steps li {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.jump-steps li b { color: var(--text-main); font-weight: 600; }

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}
.model-card {
  background: var(--btn-regular-bg);
  border-radius: var(--radius-small);
  padding: 0.85rem 0.95rem;
}
.model-card h3 { margin: 0 0 0.2rem; font-size: 0.95rem; }
.model-card p { margin: 0; font-size: 0.8rem; line-height: 1.55; color: var(--text-secondary); }

.local-tools { margin-top: 1.2rem; }
.local-tools .ip-card-title { margin-top: 1rem; }
.card-mask {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.probe-table,
.ping-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin: 0.2rem 0 0.5rem;
}
.probe-table td,
.ping-table th,
.ping-table td {
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid var(--line-divider);
  text-align: left;
}
.ping-table th { color: var(--text-secondary); font-weight: 500; }
.dim { color: var(--text-secondary); font-style: italic; font-weight: 400; }
.bad { color: #ef4444; }
.res-pending { font-size: 0.84rem; color: var(--text-secondary); }
.tool-note { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.55; }

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
}
.svc {
  background: var(--btn-regular-bg);
  border-radius: var(--radius-small);
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.svc b { font-size: 0.85rem; }
.svc span { font-size: 0.75rem; color: var(--text-secondary); }
.svc.up { box-shadow: inset 3px 0 0 #22c55e; }
.svc.down { box-shadow: inset 3px 0 0 #ef4444; }

/* ---------- 商品详情页 / 商店卡片可点击 ---------- */
.product-card { cursor: pointer; position: relative; }
.product-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.product-card-link:hover h3,
.product-card-link:focus-visible h3 { color: var(--title-active); }
.product-card-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 8px; }
.pi-more {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.85;
}
.product-card:not(.sold-out):hover .pi-more { color: var(--title-active); }

.pdp-layout { grid-template-columns: minmax(0, 1fr); }
.pdp-main { width: 100%; max-width: 75rem; }
.pdp-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
}
.pdp-crumb a { color: var(--btn-content); text-decoration: none; }
.pdp-crumb a:hover { text-decoration: underline; }
.pdp-crumb-sep { opacity: 0.6; }
#pdpCrumbTitle { color: var(--text-main); font-weight: 600; }

.pdp-skel-grid {
  display: grid;
  grid-template-columns: 1fr 22.5rem;
  gap: 1.6rem;
  align-items: start;
}
.skel {
  background: color-mix(in srgb, var(--text-secondary) 14%, var(--card-bg));
  border-radius: 12px;
  animation: pdpSkel 1.2s ease-in-out infinite;
}
.skel-banner { aspect-ratio: 16 / 7.5; border-radius: 18px; }
.skel-title { height: 28px; width: 55%; margin-top: 1rem; }
.skel-line { height: 14px; width: 35%; margin-top: 0.7rem; }
.skel-panel { height: 140px; margin-top: 1rem; }
.skel-price { height: 42px; width: 40%; }
.skel-btn { height: 50px; margin-top: 1.2rem; }
@keyframes pdpSkel {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.pdp-grid {
  display: grid;
  grid-template-columns: 1fr 22.5rem;
  gap: 2rem;
  align-items: start;
}
.pdp-info { display: flex; flex-direction: column; gap: 1.15rem; min-width: 0; }
.pdp-banner {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 9.5;
  background: transparent;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line-color);
}
@media (min-width: 769px) {
  .pdp-banner { aspect-ratio: 16 / 7.5; }
}
.pdp-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pdp-product-info { display: flex; flex-direction: column; gap: 0.65rem; }
.pdp-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.pdp-title-row .pi-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  margin-bottom: 0;
}
.pdp-title-row .pi-icon svg,
.pdp-title-row .pi-icon img {
  width: 26px;
  height: 26px;
}
.pdp-title-row .p-title { flex: 1; min-width: 0; }
.p-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
.p-lead {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.p-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.pdp-badge {
  font-size: 0.76rem;
  padding: 4px 11px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pdp-badge-feat {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}
.pdp-badge-stock,
.pdp-badge-low,
.pdp-badge-out,
.mobile-stock-badge { display: inline-flex; align-items: center; gap: 5px; }
.pdp-badge-stock::before,
.pdp-badge-low::before,
.pdp-badge-out::before,
.mobile-stock-badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.pdp-badge-stock, .mobile-stock-badge.ok {
  background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;
}
.pdp-badge-out, .mobile-stock-badge.out {
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca;
}
.pdp-badge-low, .mobile-stock-badge.few {
  background: #fffbeb; color: #b45309; border: 1px solid #fcd34d;
}
:root.dark .pdp-badge-stock, :root.dark .mobile-stock-badge.ok {
  background: rgba(16,185,129,.14); color: #34d399; border-color: rgba(16,185,129,.35);
}
:root.dark .pdp-badge-out, :root.dark .mobile-stock-badge.out {
  background: rgba(239,68,68,.14); color: #f87171; border-color: rgba(239,68,68,.35);
}
:root.dark .pdp-badge-low, :root.dark .mobile-stock-badge.few {
  background: rgba(245,158,11,.14); color: #fbbf24; border-color: rgba(245,158,11,.35);
}

.pdp-panel {
  background: var(--card-bg);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-large);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.pdp-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-color);
  font-weight: 800;
  font-size: 0.96rem;
  background: var(--btn-regular-bg);
}
.pdp-panel-head svg { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; }
.pdp-panel-body { padding: 1.3rem 1.4rem; }
.pdp-desc { margin: 0; font-size: 0.92rem; line-height: 1.75; color: var(--text-main); }

.feat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.feat-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-main);
}
.feat-check, .feat-warn { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; }
.feat-check { color: #10b981; }
.feat-warn { color: #f59e0b; }
.feat-check svg, .feat-warn svg { width: 100%; height: 100%; }

.pdp-sidebar {
  position: sticky;
  top: 5rem;
  background: var(--card-bg);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}
.pdp-price-val {
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pdp-price-val .unit {
  font-size: 1.2rem;
  font-weight: 700;
  margin-right: 2px;
  color: var(--primary);
}
.pdp-side-stock { font-size: 0.88rem; font-weight: 650; }
.pdp-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.pdp-qty-main { display: none; }
.pdp-qty-label {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text-secondary);
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-color);
  border-radius: 10px;
  background: var(--btn-regular-bg);
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
  line-height: 1;
}
.qty-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--btn-regular-bg-hover);
}
.qty-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.qty-val {
  min-width: 1.6rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.pdp-sep { border: none; border-top: 1px solid var(--line-color); margin: 0; }
.pdp-buy-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}
.pdp-buy-btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 13px;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s, opacity 0.2s;
  font-family: inherit;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 20px rgba(7, 193, 96, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.pdp-buy-btn .wx-pay-ico,
.pdp-buy-btn .ali-pay-ico {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}
.pdp-buy-btn .wx-pay-ico svg,
.pdp-buy-btn .ali-pay-ico svg,
.pdp-buy-btn .ali-pay-ico img,
.ali-open-pay-btn .ali-pay-ico img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}
.pdp-buy-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(7, 193, 96, 0.45); filter: brightness(1.05); }
.pdp-buy-btn:active { transform: translateY(0); }
.pdp-buy-btn.pdp-buy-alipay {
  background: linear-gradient(135deg, #1677ff, #0f5ed7);
  box-shadow: 0 6px 20px rgba(22, 119, 255, 0.35);
}
.pdp-buy-btn.pdp-buy-alipay:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(22, 119, 255, 0.45);
  filter: brightness(1.05);
}
.pdp-buy-btn.pdp-buy-alipay:active { transform: translateY(0); }
.pdp-buy-btn:disabled,
.pdp-buy-btn.sold-out,
.pdp-buy-btn[aria-disabled="true"] {
  background: color-mix(in srgb, var(--text-secondary) 38%, var(--card-bg));
  color: var(--text-secondary);
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(1);
}
.pdp-buy-btn:disabled:hover,
.pdp-buy-btn.sold-out:hover,
.pdp-buy-btn[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: none;
  filter: grayscale(1);
}
.pdp-pay-hint {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.pdp-missing {
  max-width: 440px;
  margin: 3rem auto;
  padding: 2.2rem 1.5rem;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
}
.pdp-missing-icon {
  width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  color: #b45309; background: #fffbeb; border: 1px solid #fcd34d;
}
:root.dark .pdp-missing-icon {
  color: #fbbf24; background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.35);
}
.pdp-missing-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.pdp-missing-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.pdp-missing-btn {
  display: inline-flex; align-items: center; height: 42px; padding: 0 22px;
  border-radius: 10px; background: var(--primary); color: var(--on-primary);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.pdp-missing-btn:hover { filter: brightness(1.08); }

.mobile-p-price-row { display: none; }
.mobile-sticky-buy-bar { display: none; }

@media (max-width: 900px) {
  .pdp-grid, .pdp-skel-grid { grid-template-columns: 1fr; gap: 1rem; }
  .pdp-sidebar { position: static; top: auto; }
  .p-title { font-size: 1.3rem; }
}

@media (max-width: 768px) {
  .pdp-sidebar { display: none; }
  .p-title { overflow-wrap: anywhere; }
  .mobile-p-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 4px;
    padding: 10px 12px;
    background: color-mix(in srgb, var(--text-secondary) 6%, var(--card-bg));
    border: 1px solid var(--line-color);
    border-radius: 12px;
  }
  .pdp-qty-main {
    display: flex;
    margin-top: 0.65rem;
    padding: 0 2px;
  }
  .qty-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .p-badges .pdp-badge-stock,
  .p-badges .pdp-badge-low,
  .p-badges .pdp-badge-out { display: none; }
  .mobile-price-val {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .mobile-price-val .unit { font-size: 15px; color: var(--primary); margin-right: 1px; font-weight: 700; }
  .mobile-stock-badge { font-size: 11px; font-weight: 600; padding: 2.5px 8px; border-radius: 999px; }
  .pdp-panel-head { padding: 11px 14px; font-size: 13.5px; }
  .pdp-panel-body { padding: 12px 14px; }
  .feat-list li { font-size: 12.5px; }
  .mobile-sticky-buy-bar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 90;
    background: var(--card-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid var(--line-color);
    padding: 8px max(14px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .mobile-sticky-buy-bar .mobile-sticky-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
  }
  .mobile-sticky-buy-bar .pdp-buy-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }
  .mobile-sticky-buy-bar .pdp-buy-btn {
    width: auto;
    min-width: 0;
    max-width: none;
    height: 44px;
    padding: 0 0.55rem;
    flex: 1 1 0;
    font-size: 0.88rem;
  }
  .mobile-sticky-buy-bar .pdp-buy-btn .wx-pay-ico,
  .mobile-sticky-buy-bar .pdp-buy-btn .ali-pay-ico {
    width: 1.05rem;
    height: 1.05rem;
  }
  .mobile-sticky-buy-bar .mobile-sticky-price {
    min-width: 0;
    flex: 0 1 auto;
  }
  .pdp-layout { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
  @media (max-width: 400px) {
    .mobile-sticky-buy-bar { flex-wrap: wrap; }
    .mobile-sticky-buy-bar .mobile-sticky-price { flex: 1 1 100%; }
    .mobile-sticky-buy-bar .pdp-buy-actions { flex: 1 1 100%; }
    .pdp-layout { padding-bottom: calc(7.25rem + env(safe-area-inset-bottom, 0px)); }
  }
  body:has(.mobile-sticky-buy-bar) .toast {
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }
  body:has(.mobile-sticky-buy-bar) .site-footer {
    padding-bottom: 0.5rem;
  }
}

/* ---------- 商店返利规格 / 购买须知 / 风险提示 / 免责声明 ---------- */
.store-legal { margin: 1.25rem 0 0.35rem; }
.pdp-wrap > .store-legal { margin-top: 1.6rem; }

.store-legal .referral-banner {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--line-divider);
  border-radius: 14px;
  padding: 0;
  margin: 0 0 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
.store-legal .referral-banner-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.35rem;
  gap: 1.25rem;
}
.store-legal .referral-banner-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 1;
  min-width: 0;
}
.store-legal .referral-banner-content { min-width: 0; }
.store-legal .referral-banner-title {
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--text-main);
}
.store-legal .referral-banner-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  line-height: 1.45;
}
.store-legal .referral-banner-highlights {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}
.store-legal .referral-hl {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #475569;
}
.store-legal .referral-banner-action { flex-shrink: 0; }
.store-legal .referral-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #0f172a;
  color: #ffffff !important;
  font-weight: 650;
  font-size: 0.84rem;
  padding: 0.55rem 1.15rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  text-decoration: none !important;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.store-legal .referral-banner-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.store-legal .referral-btn-arrow {
  font-size: 0.95rem;
  transition: transform 0.15s;
}
.store-legal .referral-banner-btn:hover .referral-btn-arrow {
  transform: translateX(2px);
}
.store-legal .rebate-notes {
  list-style: none;
  padding: 0 1.35rem 1rem;
  margin: 0;
}
.store-legal .rebate-notes li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.28rem;
}
.store-legal .rebate-notes li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.store-legal .rebate-notes li:last-child { margin-bottom: 0; }

.store-legal .store-collapsible {
  margin-top: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
}
.store-legal .store-collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.62rem 0.9rem;
  border: none;
  background: rgba(0, 0, 0, 0.02);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  color: inherit;
  font: inherit;
}
.store-legal .store-collapsible-header:hover { background: rgba(0, 0, 0, 0.04); }
.store-legal .store-legal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  padding: 0;
  border: none;
  color: rgba(0, 0, 0, 0.8);
}
.store-legal .store-collapsible-arrow {
  font-size: 1.3rem;
  color: rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
  display: inline-block;
  line-height: 1;
}
.store-legal .store-collapsible-arrow.expanded { transform: rotate(90deg); }
.store-legal .store-collapsible-body { padding: 0 0.9rem 0.85rem; }

.store-legal .notice-box {
  padding: 1rem 1.2rem;
  border-radius: 10px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.2);
}
.store-legal .notice-list { list-style: none; padding: 0; margin: 0; }
.store-legal .notice-list li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.65);
  margin-bottom: 0.4rem;
  line-height: 1.6;
}
.store-legal .notice-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #e8590c;
  font-weight: 700;
}
.store-legal .notice-list li:last-child { margin-bottom: 0; }

.store-legal .risk-box {
  padding: 1.2rem 1.4rem;
  border-radius: 10px;
  background: rgba(220, 50, 50, 0.04);
  border: 1px solid rgba(220, 50, 50, 0.15);
}
.store-legal .risk-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.store-legal .risk-icon { font-size: 1.2rem; color: #e03131; }
.store-legal .risk-title {
  font-size: 16px;
  font-weight: 700;
  color: #e03131;
}
.store-legal .risk-list { list-style: none; padding: 0; margin: 0; }
.store-legal .risk-list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.store-legal .risk-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #e03131;
  font-weight: 700;
}
.store-legal .risk-list li:last-child { margin-bottom: 0; }
.store-legal .risk-list li strong { color: rgba(0, 0, 0, 0.8); }

.store-legal .disclaimer-box {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.store-legal .disclaimer-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 0.5rem;
}
.store-legal .disclaimer-box p {
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.45);
  line-height: 1.8;
  margin: 0;
}
.store-legal .disclaimer-box p + p { margin-top: 0.65rem; }
.store-legal .disclaimer-emphasis {
  font-weight: 700;
  color: #e03131;
}

.store-legal .risk-accept-line {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: center;
}
.store-legal .legal-short-note {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--line-divider);
}

:root.dark .store-legal .referral-banner {
  background: var(--card-bg);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
:root.dark .store-legal .referral-hl {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}
:root.dark .store-legal .referral-banner-btn {
  background: #f8fafc;
  color: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.15);
}
:root.dark .store-legal .store-collapsible { border-color: rgba(255, 255, 255, 0.08); }
:root.dark .store-legal .store-collapsible-header { background: rgba(255, 255, 255, 0.02); }
:root.dark .store-legal .store-collapsible-header:hover { background: rgba(255, 255, 255, 0.04); }
:root.dark .store-legal .store-collapsible-arrow { color: rgba(255, 255, 255, 0.55); }
:root.dark .store-legal .store-legal-title { color: rgba(255, 255, 255, 0.95); }
:root.dark .store-legal .notice-box {
  background: rgba(255, 193, 7, 0.06);
  border-color: rgba(255, 193, 7, 0.15);
}
:root.dark .store-legal .notice-list li { color: rgba(255, 255, 255, 0.65); }
:root.dark .store-legal .notice-list li::before { color: #ffa94d; }
:root.dark .store-legal .risk-box {
  background: rgba(255, 70, 70, 0.06);
  border-color: rgba(255, 70, 70, 0.15);
}
:root.dark .store-legal .risk-icon,
:root.dark .store-legal .risk-title { color: #ff6b6b; }
:root.dark .store-legal .risk-list li { color: rgba(255, 255, 255, 0.55); }
:root.dark .store-legal .risk-list li strong { color: rgba(255, 255, 255, 0.8); }
:root.dark .store-legal .disclaimer-box {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}
:root.dark .store-legal .disclaimer-title { color: rgba(255, 255, 255, 0.5); }
:root.dark .store-legal .disclaimer-box p { color: rgba(255, 255, 255, 0.35); }
:root.dark .store-legal .disclaimer-emphasis { color: #ff6b6b; }
:root.dark .store-legal .risk-accept-line { color: rgba(255, 255, 255, 0.5); }
:root.dark .store-legal .legal-short-note {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .store-legal { margin-top: 1rem; }
  .store-legal .referral-banner { margin-bottom: 0.65rem; }
  .store-legal .referral-banner-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 0.85rem 1rem 0.8rem;
    gap: 0.6rem;
  }
  .store-legal .referral-banner-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .store-legal .referral-banner-title { font-size: 0.92rem; letter-spacing: -0.01em; }
  .store-legal .referral-banner-desc { font-size: 0.74rem; margin-top: 0.1rem; }
  .store-legal .referral-banner-highlights {
    gap: 0.35rem;
    margin-top: 0.35rem;
  }
  .store-legal .referral-hl { font-size: 0.68rem; padding: 0.15rem 0.45rem; border-radius: 5px; }
  .store-legal .referral-banner-action { width: 100%; margin-top: 0.2rem; }
  .store-legal .referral-banner-btn {
    width: 100%;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    border-radius: 8px;
  }
  .store-legal .rebate-notes { padding: 0 1rem 0.85rem; }
  .store-legal .store-collapsible { margin-top: 0.5rem; }
  .store-legal .store-collapsible-header { padding: 0.56rem 0.72rem; }
  .store-legal .store-collapsible-body { padding: 0 0.72rem 0.75rem; }
  .store-legal .store-legal-title { font-size: 0.98rem; }
  .store-legal .notice-box,
  .store-legal .risk-box { padding: 0.85rem 0.95rem; }
  .store-legal .disclaimer-box { padding: 0.85rem 0.95rem; }
  .pdp-wrap > .store-legal { margin-bottom: 0.5rem; }
}

/* ---------- 谷歌账号发货说明（详情页内嵌 + 打开即弹窗） ---------- */
body.pdp-guide-open { overflow: hidden; }

.pdp-guide {
  margin-top: 1.2rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line-color);
}
.pdp-guide-title {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-main);
}
.pdp-guide-note,
.pdp-guide-lead {
  margin: 0 0 0.8rem;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.pdp-guide-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line-color);
  background: #fff;
}

.pdp-guide-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(0.75rem, env(safe-area-inset-right, 0px)) max(0.75rem, env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.pdp-guide-mask.open {
  opacity: 1;
  visibility: visible;
}
.pdp-guide-dialog {
  width: min(720px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}
.pdp-guide-mask.open .pdp-guide-dialog { transform: translateY(0); }
.pdp-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1rem 1.15rem 0.7rem;
  flex-shrink: 0;
}
.pdp-guide-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}
.pdp-guide-body {
  padding: 0 1.15rem 0.6rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.pdp-guide-lead { margin-bottom: 0.75rem; }
.pdp-guide-foot {
  padding: 0.7rem 1.15rem 1.05rem;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}
.pdp-guide-ok {
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: var(--on-primary);
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  min-width: 7.5rem;
}
.pdp-guide-ok:hover { filter: brightness(1.05); }
.pdp-guide-ok:focus-visible,
.pdp-guide-mask .modal-close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .pdp-guide-dialog { width: 100%; max-height: min(92vh, 100%); }
  .pdp-guide-ok { width: 100%; min-height: 44px; }
  .pdp-guide-foot { justify-content: stretch; }
  .pdp-guide-head { padding: 0.85rem 0.95rem 0.55rem; }
  .pdp-guide-body { padding: 0 0.95rem 0.5rem; }
  .pdp-guide-foot { padding: 0.55rem 0.95rem calc(0.85rem + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 移动端体验细化（20261124q） ---------- */
@media (max-width: 900px) {
  .field input,
  .field-select,
  .auth-form input,
  .acct-panel input {
    min-height: 44px;
    font-size: 16px;
    padding: 0.55rem 0.75rem;
  }
  .btn-primary {
    min-height: 44px;
    font-size: 1rem;
    scroll-margin-bottom: 1.25rem;
  }
  .auth-tab,
  .acct-tab {
    min-height: 44px;
    padding: 0.45rem 0.85rem;
  }
  .store-sidebar .widget-card { position: relative; }
  .store-sidebar .widget-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0.2rem;
    width: 1.35rem;
    pointer-events: none;
    background: linear-gradient(to right, color-mix(in srgb, var(--page-bg) 0%, transparent), var(--page-bg));
    border-radius: 0;
  }
  #storeCatNav a { padding: 0 0.9rem; }
}

@media (max-width: 768px) {
  .store-legal .store-collapsible-header {
    min-height: 44px;
    padding: 0.6rem 0.8rem;
  }
  .store-legal .referral-banner-btn {
    min-height: 44px;
    padding: 0.55rem 0.9rem;
  }
  .copy-btn {
    min-height: 36px;
    min-width: 44px;
    padding: 0.35rem 0.75rem;
  }
  .oi-head { gap: 0.45rem; align-items: flex-start; }
  .oi-head b { min-width: 0; overflow-wrap: anywhere; }
}

@media (max-width: 640px) {
  .auth-card { max-width: 100%; }
  .qr-slot { width: 100%; max-width: 100%; }
  .qr-slot canvas,
  .qr-slot img,
  #payQrArea canvas,
  #payQrArea img:not(.wx-pay-qr-img) {
    max-width: min(220px, 100%);
    height: auto;
  }
  .kv-row { gap: 0.5rem; }
  .kv-row span { flex: 0 0 auto; }
  .kv-row b { min-width: 0; }
  .layout:has(.auth-card) {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  }
  .article-card,
  .about-card,
  .archive-head,
  .ip-card { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 480px) {
  .store-head { padding: 0.85rem 0.9rem 0.75rem; }
  .footer-note { padding: 0 0.4rem; overflow-wrap: anywhere; }
}

@media (max-width: 900px) {
  .admin-body { padding: 0; }
  .admin-main { padding: 1.15rem 1rem 1.2rem; }
  .admin-wrap { max-width: 100%; padding: 0 0.7rem 2.2rem; }
  .admin-card { margin-top: 1.1rem; padding: 1.3rem 1.15rem 1.1rem; }
  .admin-table th, .admin-table td { padding: 0.58rem 0.65rem; }
}

/* ---------- 手机端唤起微信支付（20261125a） ---------- */
.pay-jump-actions { margin: 0.85rem 0 0.35rem; }
.wx-open-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #07c160, #06ad56);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 20px rgba(7, 193, 96, 0.35);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.wx-open-pay-btn .wx-pay-ico {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}
.wx-open-pay-btn .wx-pay-ico svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.wx-open-pay-btn:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(7, 193, 96, 0.45); }
.wx-open-pay-btn:active { transform: translateY(1px); }
.wx-open-pay-btn:disabled { opacity: 0.72; cursor: wait; box-shadow: none; transform: none; }
.ali-open-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #1677ff, #0f5ed7);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 20px rgba(22, 119, 255, 0.35);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.ali-open-pay-btn .ali-pay-ico {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}
.ali-open-pay-btn .ali-pay-ico svg,
.ali-open-pay-btn .ali-pay-ico img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  fill: currentColor;
}
.ali-open-pay-btn:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(22, 119, 255, 0.45); }
.ali-open-pay-btn:active { transform: translateY(1px); }
.ali-open-pay-btn:disabled { opacity: 0.72; cursor: wait; box-shadow: none; transform: none; }
.pay-method-tabs {
  max-width: 260px;
  margin: 0 auto 0.85rem;
}
.pay-jump-hint {
  text-align: center;
  line-height: 1.7;
  margin: 0.35rem 0 0.6rem;
}
.pay-qr-backup {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line-divider);
}
.pay-qr-backup-label {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0 0 0.35rem;
}
.wx-pay-qr-img {
  display: block;
  width: 280px;
  height: auto;
  max-width: 100%;
  background: #fff;
  border-radius: 0;
  -webkit-touch-callout: default !important;
  -webkit-user-select: auto !important;
  user-select: auto !important;
  pointer-events: auto !important;
  -webkit-user-drag: auto;
}
@media (max-width: 640px) {
  .wx-open-pay-btn, .ali-open-pay-btn { min-height: 48px; font-size: 1.08rem; }
  .wx-pay-qr-img { width: min(280px, 100%); height: auto; }
}


/* ---------- 售后交流群浮窗（右侧辉光管图标轨） ---------- */
.wechat-float-wrap {
  position: fixed;
  top: 62%;
  right: 0;
  bottom: auto;
  z-index: 9990;
  transform: translateY(-40%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  width: auto;
  height: auto;
  pointer-events: none;
  font-family: var(--font-ui);
}
.wechat-float-wrap > * { pointer-events: auto; }

.wechat-float-btn {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 999px;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--primary);
  cursor: pointer;
  box-shadow: var(--shadow-card), 0 0 16px color-mix(in srgb, var(--primary) 22%, transparent);
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.wechat-float-btn:hover,
.wechat-float-btn:focus-visible {
  box-shadow: 0 0 0 1px rgba(243, 210, 74, 0.5), 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 22px rgba(243, 210, 74, 0.28);
}
.wechat-float-btn:focus-visible {
  outline: 1px solid #d4b33a;
  outline-offset: 2px;
}
.wechat-float-btn:active { transform: scale(0.96); }
.wechat-float-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.wf-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  padding: 0.32rem 0.22rem 0.32rem 0.26rem;
  width: 3.05rem;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-right: 0;
  border-radius: 1.15rem 0 0 1.15rem;
  box-shadow: var(--shadow-card), 0 0 18px color-mix(in srgb, var(--primary) 16%, transparent);
}
.wf-rail-btn {
  position: relative;
  width: 2.55rem;
  height: 2.55rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.wf-rail-btn:hover,
.wf-rail-btn:focus-visible {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.wf-rail-btn:focus-visible {
  outline: 1px solid var(--primary-dark);
  outline-offset: 1px;
}
.wf-rail-btn.is-on {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
}
.wf-rail-btn svg {
  width: 1.28rem;
  height: 1.28rem;
  display: block;
}
.wf-rail-btn.wf-wx { color: #07c160; }
.wf-rail-btn.wf-wx.is-on,
.wf-rail-btn.wf-wx:hover { box-shadow: 0 0 14px rgba(7, 193, 96, 0.3); }
.wf-rail-btn.wf-qq { color: #12b7f5; }
.wf-rail-btn.wf-qq img {
  width: 1.6rem;
  height: 1.6rem;
  display: block;
  border-radius: 0.36rem;
}

.wf-rail-btn.wf-qq.is-on,
.wf-rail-btn.wf-qq:hover { box-shadow: 0 0 14px rgba(18, 183, 245, 0.3); }
.wf-rail-btn.wf-mail { color: var(--primary); }
.wf-rail-btn.wf-mail:hover,
.wf-rail-btn.wf-mail:focus-visible { box-shadow: 0 0 14px color-mix(in srgb, var(--primary) 36%, transparent); }

.wf-rail-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  right: calc(100% + 0.55rem);
  top: 50%;
  transform: translateY(-50%);
  padding: 0.18rem 0.45rem;
  border-radius: 0.28rem;
  background: var(--glass-bg-strong);
  color: var(--primary);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 2;
}
.wf-rail-btn[data-tip]:hover::after,
.wf-rail-btn[data-tip]:focus-visible::after { opacity: 1; }

.wechat-float-panel {
  display: none;
  position: absolute;
  right: calc(100% + 0.65rem);
  top: 50%;
  left: auto;
  bottom: auto;
  width: 13.6rem;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 0.55rem;
  box-shadow: var(--shadow-card), 0 0 24px color-mix(in srgb, var(--primary) 12%, transparent);
  overflow: hidden;
  transform: translateY(-50%);
  transform-origin: center right;
}
.wechat-float-panel.is-open {
  display: block;
  animation: wfPanelIn 0.2s ease;
}
.wf-panel-head {
  margin: 0.7rem 0.85rem 0;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 0 10px rgba(243, 210, 74, 0.28);
}
.wsg-stage {
  position: relative;
  width: 150px;
  max-width: calc(100% - 1.5rem);
  height: 150px;
  aspect-ratio: 1 / 1;
  margin: 0.65rem auto 0;
}
.wsg-qr {
  position: absolute;
  inset: 0;
  border-radius: 0.45rem;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
  background: #fff;
  padding: 0.35rem;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent);
  overflow: hidden;
  cursor: pointer;
}
.wsg-qr.wsg-on {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.wsg-qr a,
.wsg-qr img,
.wsg-qr button {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.45rem;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.wsg-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0.55rem 0.75rem 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.4rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  transition: background 0.3s, color 0.3s;
}
.wsg-stage {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: 0.55rem;
  padding: 0.35rem;
  box-sizing: content-box;
  height: auto;
  min-height: 150px;
}
.wsg-qr img {
  background: #fff;
  padding: 0.2rem;
  box-sizing: border-box;
}
.wsg-mail {
  margin: 0.7rem 0.85rem 0.15rem;
  padding: 0.9rem 0.7rem;
  border-radius: 0.45rem;
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  text-align: center;
}
.wsg-mail[hidden] { display: none !important; }
.wsg-mail-address {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: var(--primary);
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
  word-break: break-all;
  overflow-wrap: anywhere;
}

@keyframes wfPanelIn {
  0% { opacity: 0; transform: translateY(-50%) scale(0.94); }
  to { opacity: 1; transform: translateY(-50%) scale(1); }
}

@media (max-width: 900px) {
  .wechat-float-wrap {
    top: auto;
    right: max(0.7rem, env(safe-area-inset-right, 0px));
    bottom: calc(var(--dock-space) + 0.75rem);
    transform: none;
  }
  .wechat-float-btn { display: inline-flex; }
  .wf-rail {
    display: none;
    border-right: 1px solid rgba(243, 210, 74, 0.28);
    border-radius: 1.15rem;
    padding: 0.32rem 0.26rem;
  }
  .wechat-float-wrap.is-expanded .wf-rail { display: flex; }
  .wf-rail-btn[data-tip]::after { display: none; }
  .wechat-float-panel {
    right: 0;
    top: auto;
    bottom: calc(100% + 0.5rem);
    transform: none;
    width: min(13.6rem, calc(100vw - 1.6rem));
    max-width: calc(100vw - 1.6rem);
    max-height: calc(100dvh - var(--dock-space) - 8.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body:has(.mobile-sticky-buy-bar) .wechat-float-panel {
    max-height: calc(100dvh - var(--dock-space) - 13rem);
  }
  .wsg-stage {
    width: min(150px, calc(100% - 1.5rem));
    min-height: min(150px, 42vw);
  }
  .wechat-float-panel.is-open {
    animation: wfPanelInMobile 0.2s ease;
  }
  @keyframes wfPanelInMobile {
    0% { opacity: 0; transform: translateY(8px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .wf-rail-btn,
  .wsg-qr,
  .wsg-hint,
  .wechat-float-btn { transition: none; }
  .wechat-float-panel,
  .wechat-float-panel.is-open { animation: none; }
  .wf-rail-btn[data-tip]::after { transition: none; }
}

/* 全屏大图（手机长按保存 / 桌面也可点开） */
.wechat-float-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: color-mix(in srgb, var(--page-bg) 28%, rgba(6, 7, 5, 0.72));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  pointer-events: auto;
}
.wechat-float-modal.is-open { display: flex; }
.wechat-float-modal-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.25rem 1.15rem;
  max-width: 90vw;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 0.55rem;
  box-shadow: var(--shadow-card), 0 0 28px color-mix(in srgb, var(--primary) 14%, transparent);
}
.wechat-float-modal-close {
  position: absolute;
  top: -0.55rem;
  right: -0.55rem;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 20%, transparent);
  -webkit-tap-highlight-color: transparent;
}
.wechat-float-modal-frame {
  background: #fff;
  border-radius: 0.55rem;
  padding: 0.85rem;
}
.wechat-float-modal-frame a { display: block; }
#wechat-float-modal-qr {
  width: 70vw;
  max-width: 280px;
  height: auto;
  border-radius: 0.35rem;
  display: block;
  cursor: pointer;
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
  pointer-events: auto;
}
.wechat-float-modal-caption {
  text-align: center;
  color: var(--text-main);
  font-family: var(--font-ui);
}
.wechat-float-modal-caption .wf-modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
  text-shadow: var(--glow-text);
}
.wechat-float-modal-caption .wf-modal-sub {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 0.25rem;
  color: var(--text-secondary);
}

/* ---------- UI 优化（20261130a） ---------- */
h1, h2, h3, .pc-title, .sec-title, .profile-name, .store-head h1, .banner-title, .store-section-head h2 {
  letter-spacing: 0.02em;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 78% 70% at 10% -12%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 58%),
    radial-gradient(ellipse 55% 50% at 100% 112%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 55%),
    linear-gradient(to right, color-mix(in srgb, var(--primary) 5%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--primary) 5%, transparent) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 28%, #000 28%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 28%, #000 28%, transparent 78%);
  opacity: 0.85;
}

.hero-card > * { position: relative; z-index: 1; }

:root.dark .hero-card::before {
  opacity: 1;
  background:
    radial-gradient(ellipse 78% 70% at 8% -10%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 58%),
    radial-gradient(ellipse 55% 50% at 100% 112%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 55%),
    linear-gradient(to right, color-mix(in srgb, var(--primary-light) 8%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--primary-light) 8%, transparent) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
}

.feature-card:hover,
.post-card:hover,
a.card:hover,
.product-card:not(.sold-out):hover,
.hero-item:hover,
.arch-item:hover,
.offer-card:hover,
.model-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

:root.dark .btn-primary,
:root.dark .mini-btn.primary,
:root.dark .nav-link.active,
:root.dark .theme-seg button.active,
:root.dark .buy-btn:not(.sold-out):not(:disabled) {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent), 0 8px 22px rgba(224, 177, 58, 0.28);
}

.dropdown-panel {
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.drawer {
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  transition: transform 0.32s var(--ease-out);
}

.drawer-mask {
  transition: opacity 0.28s var(--ease-out), visibility 0.28s;
}


/* ---------- 置底导航浮窗（仅前台、≤900px；电脑端改用顶部胶囊栏；后台 .admin-body 保持原顶栏） ---------- */
:root {
  --dock-space: 0px;
}

body:not(.admin-body) {
  padding-bottom: var(--dock-space);
}

body:not(.admin-body) .site-footer {
  padding-bottom: 1.15rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.95rem;
  margin-top: 0.2rem !important;
}

body:not(.admin-body) .menu-btn {
  display: none !important;
}

/* 以下底栏视觉仅在手机端（≤900px）生效；电脑端见文末顶部胶囊栏 */
@media (max-width: 900px) {
body:not(.admin-body) .nav-links {
  position: fixed !important;
  top: auto !important;
  right: auto !important;
  left: 50% !important;
  bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  overflow: visible;
  align-items: stretch;
  justify-content: center;
  gap: 0.15rem;
  flex: none;
  width: max-content;
  max-width: calc(100vw - 1.5rem);
  margin: 0;
  padding: 0.32rem 0.38rem;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  border-radius: 999px;
  box-shadow: var(--shadow-card), 0 8px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--line-divider);
}

:root.dark body:not(.admin-body) .nav-links {
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 10px 28px rgba(0, 0, 0, 0.32);
}

body:not(.admin-body) .nav-links > a.nav-link[href*="about"] {
  display: none;
}

body:not(.admin-body) .nav-links > .nav-link,
body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.12rem;
  min-width: 3.85rem;
  min-height: 44px;
  padding: 0.28rem 0.7rem 0.22rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: transparent;
}

body:not(.admin-body) .nav-links > .nav-link:hover,
body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle:hover {
  background: var(--btn-plain-bg-hover);
  color: var(--text-main);
}

body:not(.admin-body) .nav-links > .nav-link.active,
body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle.active,
body:not(.admin-body) .nav-links > .nav-dropdown.open > .dropdown-toggle {
  background: var(--primary);
  color: var(--on-primary);
}

body:not(.admin-body) .nav-links > .nav-link.active:hover,
body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle.active:hover,
body:not(.admin-body) .nav-links > .nav-dropdown.open > .dropdown-toggle:hover {
  background: var(--primary-dark);
  color: var(--on-primary);
}

body:not(.admin-body) .nav-links > .nav-link:focus-visible,
body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body:not(.admin-body) .nav-ico {
  display: inline-flex !important;
  width: 1.45rem;
  height: 1.45rem;
  min-width: 1.45rem;
  min-height: 1.45rem;
  align-items: center;
  justify-content: center;
  flex: none;
  flex-shrink: 0;
  overflow: visible;
  color: inherit;
  background: none;
  -webkit-mask: none;
  mask: none;
}
body:not(.admin-body) .nav-ico svg {
  display: block !important;
  width: 1.45rem !important;
  height: 1.45rem !important;
  min-width: 1.45rem;
  min-height: 1.45rem;
  stroke: currentColor;
  fill: none;
  overflow: visible;
}

body:not(.admin-body) .nav-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.admin-body) .nav-links .caret {
  display: none;
}

/* 工具箱面板：相对整条底栏向上展开，避免贴边溢出 */
body:not(.admin-body) .nav-links .nav-dropdown {
  position: static;
}

body:not(.admin-body) .nav-links .dropdown-panel {
  top: auto;
  left: 50%;
  right: auto;
  bottom: calc(100% + 0.55rem);
  min-width: min(22rem, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: min(70vh, calc(100dvh - var(--dock-space) - 4.5rem));
  overflow-y: auto;
  transform: translateX(-50%) translateY(8px);
  z-index: 2;
}

body:not(.admin-body) .nav-links .nav-dropdown:hover .dropdown-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

body:not(.admin-body) .nav-links .nav-dropdown.open .dropdown-panel,
body:not(.admin-body) .nav-links .nav-dropdown.open:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
}

.dock-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out), visibility 0.2s;
}

.dock-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.admin-body .dock-backdrop {
  display: none !important;
}

/* 旧客服钮、Toast：抬到导航浮窗之上。售后图标轨桌面垂直居中，仅窄屏贴在底栏上方。 */
body:not(.admin-body) .float-chat {
  bottom: calc(var(--dock-space) + 0.75rem);
}

body:not(.admin-body) .toast {
  bottom: calc(var(--dock-space) + 0.75rem);
  z-index: 130;
}

@media (max-width: 900px) {
  :root {
    /* 预留底栏高度 + 系统安全区 + 手机浏览器底栏，避免页尾和表格最后几行被挡住 */
    --dock-space: calc(7rem + env(safe-area-inset-bottom, 0px));
    /* 底栏实际占用（距视口底到 dock 顶），支付实底栏贴到底部时用来给按钮让位 */
    --dock-clearance: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }
  body:not(.admin-body) .wechat-float-wrap {
    top: auto;
    bottom: calc(var(--dock-space) + 0.75rem);
    transform: none;
  }
  body:not(.admin-body) .nav-links {
    display: flex !important;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    left: 50% !important;
    top: auto !important;
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0.28rem 0.28rem calc(0.28rem + 0px);
    border-radius: 1.35rem;
    gap: 0;
    background: color-mix(in srgb, var(--card-bg) 94%, transparent);
  }
  :root.dark body:not(.admin-body) .nav-links {
    background: color-mix(in srgb, var(--card-bg) 94%, transparent);
  }

  body:not(.admin-body) .nav-links > .nav-link,
  body:not(.admin-body) .nav-links > .nav-dropdown {
    flex: 1 1 0;
    min-width: 0;
  }

  body:not(.admin-body) .nav-links > .nav-link,
  body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0.22rem 0.15rem 0.18rem;
    gap: 0.1rem;
    font-size: 0.64rem;
  }
}

@media (max-width: 768px) {
  body:not(.admin-body) .mobile-sticky-buy-bar {
    bottom: 0;
    padding-bottom: calc(var(--dock-clearance, 4.25rem) + 8px);
    background: var(--card-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 90;
  }

  body:not(.admin-body) .pdp-layout {
    padding-bottom: calc(var(--dock-space) + 5.5rem);
  }

  body:not(.admin-body):has(.mobile-sticky-buy-bar) {
    padding-bottom: calc(var(--dock-space) + 4.25rem);
  }

  body:not(.admin-body):has(.mobile-sticky-buy-bar) .toast {
    bottom: calc(var(--dock-space) + 5rem);
  }

  body:not(.admin-body):has(.mobile-sticky-buy-bar) .wechat-float-wrap,
  body:not(.admin-body):has(.mobile-sticky-buy-bar) .float-chat {
    bottom: calc(var(--dock-space) + 4.25rem + 0.75rem);
  }

  body:not(.admin-body):has(.mobile-sticky-buy-bar) .site-footer {
    padding-bottom: 1.15rem;
  }
}

@media (max-width: 640px) {
  /* 覆盖原先售后浮窗在窄屏自己抬高的规则，统一用 --dock-space */
  body:not(.admin-body) .wechat-float-wrap {
    bottom: calc(var(--dock-space) + 0.75rem);
  }

  body:not(.admin-body):has(.mobile-sticky-buy-bar) .wechat-float-wrap {
    bottom: calc(var(--dock-space) + 4.25rem + 0.75rem);
  }
}

@media (max-width: 400px) {
  body:not(.admin-body) .pdp-layout {
    padding-bottom: calc(var(--dock-space) + 7.25rem);
  }
  body:not(.admin-body):has(.mobile-sticky-buy-bar) {
    padding-bottom: calc(var(--dock-space) + 6rem);
  }
  body:not(.admin-body):has(.mobile-sticky-buy-bar) .toast {
    bottom: calc(var(--dock-space) + 6.75rem);
  }
  body:not(.admin-body):has(.mobile-sticky-buy-bar) .wechat-float-wrap,
  body:not(.admin-body):has(.mobile-sticky-buy-bar) .float-chat {
    bottom: calc(var(--dock-space) + 6rem + 0.75rem);
  }
}

@media (max-width: 359px) {
  body:not(.admin-body) .nav-links {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    padding: 0.2rem;
    border-radius: 1.15rem;
  }

  body:not(.admin-body) .nav-links > .nav-link,
  body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle {
    font-size: 0.58rem;
    padding: 0.18rem 0.08rem 0.12rem;
  }

  body:not(.admin-body) .nav-ico,
  body:not(.admin-body) .nav-ico svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
    min-width: 1.25rem;
    min-height: 1.25rem;
    display: block !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dock-backdrop,
  body:not(.admin-body) .nav-links .dropdown-panel {
    transition: none;
  }
}

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
}
.post-list .sec-head { margin-bottom: 0.95rem; }
.sec-head .sec-title { margin: 0; }
.sec-more {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--title-active);
  text-decoration: none;
  white-space: nowrap;
}
.sec-more:hover { text-decoration: underline; }

.article-end {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
}
.end-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--btn-regular-bg);
  color: var(--text-main);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.end-link:hover { background: var(--btn-regular-bg-hover); color: var(--title-active); }

/* 前台顶栏：用户/设置图标下方小字 */
body:not(.admin-body) .nav-actions {
  align-items: flex-end;
}
body:not(.admin-body) .nav-actions > a.pill-btn,
body:not(.admin-body) .nav-actions .account-btn,
body:not(.admin-body) .nav-actions .theme-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-width: 3.2rem;
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 0.2rem 0.35rem 0.18rem;
  border-radius: 0.8rem;
  font-size: inherit;
  line-height: 1.15;
  background: transparent;
}
body:not(.admin-body) .nav-actions > a.pill-btn:hover,
body:not(.admin-body) .nav-actions .account-btn:hover,
body:not(.admin-body) .nav-actions .theme-btn:hover {
  background: var(--btn-plain-bg-hover);
}
body:not(.admin-body) .nav-actions .action-text {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--text-secondary);
}
body:not(.admin-body) .login-pill .action-text,
body:not(.admin-body) .account-btn .action-text {
  color: var(--btn-content);
}
body:not(.admin-body) .nav-actions .login-pill .login-pill-extra,
body:not(.admin-body) .nav-actions .account-btn #accountName,
body:not(.admin-body) .nav-actions .account-btn .caret {
  display: none;
}
body:not(.admin-body) .nav-actions .theme-btn {
  width: auto;
}
body:not(.admin-body) .nav-actions .codex-pill {
  flex-direction: row;
  min-width: 0;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--btn-regular-bg);
  gap: 0.35rem;
}
body:not(.admin-body) .nav-actions .codex-pill .action-text { display: none; }

/* 后台保持横排胶囊，不显示「用户中心」小字以免挡住用户名 */
.admin-body .nav-actions .action-text { display: none; }
.admin-body .account-btn #accountName { display: inline; }

@media (max-width: 900px) {
  body:not(.admin-body) .nav-actions > a.pill-btn:not(.login-pill),
  body:not(.admin-body) .nav-actions > a.pill-btn.login-pill,
  body:not(.admin-body) .nav-actions .account-btn,
  body:not(.admin-body) .nav-actions .theme-btn {
    width: auto;
    min-width: 3.1rem;
    height: auto;
    min-height: 44px;
    padding: 0.15rem 0.2rem 0.16rem;
    font-size: inherit;
    gap: 0.1rem;
    justify-content: center;
  }
  body:not(.admin-body) .nav-actions > a.pill-btn:not(.login-pill) { font-size: inherit; }
  body:not(.admin-body) .nav-actions .action-text { display: block; font-size: 0.58rem; }
}

@media (max-width: 359px) {
  body:not(.admin-body) .login-pill {
    font-size: inherit;
    width: auto;
    min-width: 2.6rem;
    height: auto;
    padding: 0.15rem 0.15rem 0.16rem;
    justify-content: center;
  }
  body:not(.admin-body) .login-pill .action-text { display: block; }
}

/* 顶栏图标不被挤压；主题切换的显示/隐藏仍由上方原规则控制 */
body:not(.admin-body) .nav-actions svg,
body:not(.admin-body) .theme-btn svg {
  flex-shrink: 0;
  overflow: visible;
}

/* 默认隐藏电脑端专属品牌副文案与分隔线，避免手机端或后台露出 */
.brand-lockup { display: contents; }
.brand-domain,
.nav-divider { display: none; }

/* ---------- 电脑端顶部胶囊导航（≥901px，对齐现有码头 900px 断点；仅前台） ---------- */
@media (min-width: 901px) {
  body:not(.admin-body) {
    padding-bottom: 0;
  }

  body:not(.admin-body) .navbar-wrap {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 0.35rem clamp(0.9rem, 2.6vw, 1.75rem) 0.55rem;
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--primary-light) 22%, var(--page-bg)) 0%,
        color-mix(in srgb, var(--page-bg) 82%, transparent) 55%,
        rgba(245, 246, 242, 0) 100%);
  }

  :root.dark body:not(.admin-body) .navbar-wrap {
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--primary) 24%, var(--page-bg)) 0%,
        color-mix(in srgb, var(--page-bg) 80%, transparent) 72%,
        rgba(0, 0, 0, 0) 100%);
  }

  body:not(.admin-body) .navbar {
    max-width: var(--page-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.28rem 0.5rem 0.28rem 0.55rem;
    border-radius: 0.7rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card);
  }

  :root.dark body:not(.admin-body) .navbar {
    background: color-mix(in srgb, var(--card-bg) 88%, transparent);
    border-color: var(--line-divider);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 10px 28px rgba(0, 0, 0, 0.28), 0 0 24px rgba(243, 210, 74, 0.08);
  }

  body:not(.admin-body) .brand {
    gap: 0.55rem;
    margin-right: 0;
    flex: none;
    font-size: 1rem;
  }

  body:not(.admin-body) .brand-logo {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 12%, var(--page-bg));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
  }

  :root.dark body:not(.admin-body) .brand-logo {
    background: color-mix(in srgb, var(--primary) 22%, var(--card-bg));
  }

  body:not(.admin-body) .brand-logo svg {
    width: 1.15rem;
    height: 1.15rem;
  }

  body:not(.admin-body) .brand-lockup {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
    min-width: 0;
  }

  body:not(.admin-body) .brand-name {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
  }

  body:not(.admin-body) .brand-domain {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
  }

  body:not(.admin-body) .nav-divider {
    display: block;
    width: 1px;
    align-self: stretch;
    min-height: 1.5rem;
    margin: 0.35rem 0.1rem;
    background: var(--line-divider);
    flex: none;
  }

  body:not(.admin-body) .nav-links {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    gap: 0.12rem;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
    z-index: auto;
  }

  body:not(.admin-body) .nav-links > a.nav-link[href*="about"] {
    display: none;
  }

  body:not(.admin-body) .nav-ico,
  body:not(.admin-body) .nav-ico svg {
    display: none !important;
  }

  body:not(.admin-body) .nav-links .caret {
    display: inline-flex;
    width: 0.7rem;
    height: 0.7rem;
    margin-left: 0.08rem;
    opacity: 0.55;
  }

  body:not(.admin-body) .nav-links > .nav-link,
  body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    min-width: 0;
    min-height: 0;
    width: auto;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.2;
    color: var(--text-secondary);
    background: transparent;
  }

  body:not(.admin-body) .nav-links > .nav-link:hover,
  body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle:hover {
    background: transparent;
    color: var(--text-main);
  }

  body:not(.admin-body) .nav-links > .nav-link.active,
  body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle.active,
  body:not(.admin-body) .nav-links > .nav-dropdown.open > .dropdown-toggle {
    background: transparent;
    color: var(--text-main);
    font-weight: 650;
  }

  body:not(.admin-body) .nav-links > .nav-link.active:hover,
  body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle.active:hover,
  body:not(.admin-body) .nav-links > .nav-dropdown.open > .dropdown-toggle:hover {
    background: transparent;
    color: var(--text-main);
  }

  /* 只有工具箱在电脑端把短标签「工具」换成「工具箱」。白嫖算力保持按钮原文。 */
  body:not(.admin-body) .nav-links > #toolboxDrop > .dropdown-toggle .nav-text {
    font-size: 0;
  }

  body:not(.admin-body) .nav-links > #toolboxDrop > .dropdown-toggle .nav-text::after {
    content: "工具箱";
    font-size: 0.92rem;
    font-weight: 500;
  }

  body:not(.admin-body) .nav-links > #toolboxDrop > .dropdown-toggle.active .nav-text::after,
  body:not(.admin-body) .nav-links > #toolboxDrop.open > .dropdown-toggle .nav-text::after {
    font-weight: 650;
  }

  body:not(.admin-body) .nav-links .nav-dropdown {
    position: relative;
  }

  body:not(.admin-body) .nav-links .dropdown-panel {
    top: calc(100% + 0.55rem);
    left: 0;
    right: auto;
    bottom: auto;
    min-width: 20rem;
    max-width: min(24rem, calc(100vw - 2rem));
    max-height: min(70vh, calc(100dvh - 6rem));
    overflow-y: auto;
    transform: translateY(-6px);
    pointer-events: none;
    z-index: 60;
  }

  body:not(.admin-body) .nav-links .nav-dropdown:hover .dropdown-panel,
  body:not(.admin-body) .nav-links .nav-dropdown.open .dropdown-panel,
  body:not(.admin-body) .nav-links .nav-dropdown.open:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  body:not(.admin-body) .dock-backdrop,
  body:not(.admin-body) .dock-backdrop.open {
    display: none !important;
  }

  body:not(.admin-body) .nav-actions {
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    flex: none;
  }

  body:not(.admin-body) .nav-actions > a.pill-btn,
  body:not(.admin-body) .nav-actions .account-btn,
  body:not(.admin-body) .nav-actions .theme-btn,
  body:not(.admin-body) .nav-actions .codex-pill {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 2.4rem;
    min-width: 0;
    min-height: 2.4rem;
    padding: 0 0.9rem 0 0.6rem;
    gap: 0.35rem;
    border-radius: 999px;
    background: var(--btn-regular-bg);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
  }

  body:not(.admin-body) .nav-actions > a.pill-btn:hover,
  body:not(.admin-body) .nav-actions .account-btn:hover,
  body:not(.admin-body) .nav-actions .theme-btn:hover,
  body:not(.admin-body) .nav-actions .codex-pill:hover {
    background: var(--btn-regular-bg-hover);
  }

  body:not(.admin-body) .nav-actions .action-text,
  body:not(.admin-body) .nav-actions .codex-label {
    display: inline;
    font-size: 0.84rem;
    font-weight: 600;
    color: inherit;
    line-height: 1;
    white-space: nowrap;
  }

  body:not(.admin-body) .nav-actions .codex-value,
  body:not(.admin-body) .nav-actions .login-pill-extra,
  body:not(.admin-body) .nav-actions .account-btn #accountName,
  body:not(.admin-body) .nav-actions .account-btn .caret {
    display: none;
  }

  body:not(.admin-body) .login-pill {
    width: auto;
    min-width: 0;
    height: 2.4rem;
    min-height: 2.4rem;
    padding: 0 0.9rem 0 0.6rem;
    border-radius: 999px;
    gap: 0.35rem;
    background: color-mix(in srgb, var(--primary) 12%, var(--page-bg));
    color: var(--primary);
    font-size: 0.84rem;
  }

  :root.dark body:not(.admin-body) .login-pill {
    background: color-mix(in srgb, var(--primary) 22%, var(--card-bg));
    color: var(--primary-light);
  }

  body:not(.admin-body) .login-pill .action-text {
    display: inline;
    font-size: 0.84rem;
    font-weight: 600;
    color: inherit;
    line-height: 1;
  }

  body:not(.admin-body) .login-pill:hover {
    background: color-mix(in srgb, var(--primary) 18%, var(--page-bg));
  }

  :root.dark body:not(.admin-body) .login-pill:hover {
    background: color-mix(in srgb, var(--primary) 30%, var(--card-bg));
  }
}

@media (max-width: 900px) {
  body:not(.admin-body) .brand-lockup {
    display: contents;
  }

  body:not(.admin-body) .brand-domain,
  body:not(.admin-body) .nav-divider {
    display: none !important;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  body:not(.admin-body) .nav-links > .nav-link,
  body:not(.admin-body) .nav-links > .nav-dropdown > .dropdown-toggle {
    padding: 0.4rem 0.5rem;
    font-size: 0.86rem;
  }

  body:not(.admin-body) .nav-links > #toolboxDrop > .dropdown-toggle .nav-text::after {
    font-size: 0.86rem;
  }
}

/* =====================================================
   前台透明玻璃 UI + 科技感背景（后台 .admin-body 保持克制）
   ===================================================== */

/* 前台地面：暗色绿黑墨 + 顶部淡绿光晕；亮色浅底 + 淡网格。字符场由 #aiplain-bg 绘制。 */
body:not(.admin-body) {
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
  isolation: isolate;
  background-color: var(--page-bg);
}

:root.dark body:not(.admin-body) {
  background-color: #0b100e;
  background-image: radial-gradient(1200px 700px at 50% -10%, rgba(65, 255, 139, 0.05), transparent 60%);
  background-repeat: no-repeat;
}

:root:not(.dark) body:not(.admin-body) {
  background-color: #f5f6f2;
  background-image:
    radial-gradient(1100px 640px at 50% -10%, rgba(201, 162, 39, 0.05), transparent 62%),
    linear-gradient(to right, rgba(28, 26, 18, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28, 26, 18, 0.035) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
}

#aiplain-bg {
  position: fixed;
  inset: 0;
  z-index: 0; /* 不要用 -1：会画到不透明页面底色下面，看起来像纯黑 */
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* 前台内容抬到字符场之上（与 Codex Reset 的 .shell { z-index:1 } 同一做法）。
   不改 navbar-wrap / drawer / 客服浮层 / 底栏：它们已是 sticky/fixed 且 z-index 更高。 */
body:not(.admin-body) > .layout,
body:not(.admin-body) > .main,
body:not(.admin-body) > .site-footer,
body:not(.admin-body) > .auth-form,
body:not(.admin-body) > .form-msg,
body:not(.admin-body) > .auth-note,
body:not(.admin-body) > .auth-alt,
body:not(.admin-body) > .skill-sheet,
body:not(.admin-body) > .skill-toast,
body:not(.admin-body) > .field,
body:not(.admin-body) > .am-opt,
body:not(.admin-body) > .btn-primary,
body:not(.admin-body) > form,
body:not(.admin-body) > p,
body:not(.admin-body) > label,
body:not(.admin-body) > span,
body:not(.admin-body) > button {
  position: relative;
  z-index: 1;
}

:root:not(.dark) #aiplain-bg,
.admin-body #aiplain-bg {
  display: none;
}

body:not(.admin-body)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 46%, rgba(28, 26, 18, 0.1) 100%);
}

:root.dark body:not(.admin-body)::after {
  background: radial-gradient(ellipse at center, transparent 44%, rgba(6, 10, 9, 0.42) 100%);
}

body:not(.admin-body) h1,
body:not(.admin-body) h2,
body:not(.admin-body) .page-title,
body:not(.admin-body) .brand-name,
body:not(.admin-body) .nav-text,
body:not(.admin-body) .action-text {
  letter-spacing: 0.04em;
}

/* 前台玻璃铬：导航、卡片、浮层、抽屉、弹窗 */
body:not(.admin-body) .navbar,
body:not(.admin-body) .card,
body:not(.admin-body) .jump-card,
body:not(.admin-body) .product-card,
body:not(.admin-body) .offer-card,
body:not(.admin-body) .hero-item,
body:not(.admin-body) .hero-card,
body:not(.admin-body) .arch-item,
body:not(.admin-body) .model-card,
body:not(.admin-body) .dropdown-panel,
body:not(.admin-body) .drawer,
body:not(.admin-body) .modal,
body:not(.admin-body) .am-dialog,
body:not(.admin-body) .wf-rail,
body:not(.admin-body) .wechat-float-panel,
body:not(.admin-body) .wechat-float-btn,
body:not(.admin-body) .mobile-sticky-buy-bar {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-card);
}

body:not(.admin-body) .card,
body:not(.admin-body) .jump-card,
body:not(.admin-body) .product-card,
body:not(.admin-body) .offer-card,
body:not(.admin-body) .hero-item,
body:not(.admin-body) .arch-item,
body:not(.admin-body) .model-card,
body:not(.admin-body) .hero-card {
  box-shadow: var(--shadow-card), inset 0 1px 0 var(--glass-highlight);
}

body:not(.admin-body) .dropdown-panel,
body:not(.admin-body) .drawer,
body:not(.admin-body) .modal,
body:not(.admin-body) .am-dialog {
  background: var(--glass-bg-strong);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body:not(.admin-body) .navbar,
  body:not(.admin-body) .card,
  body:not(.admin-body) .jump-card,
  body:not(.admin-body) .product-card,
  body:not(.admin-body) .offer-card,
  body:not(.admin-body) .hero-item,
  body:not(.admin-body) .hero-card,
  body:not(.admin-body) .arch-item,
  body:not(.admin-body) .model-card,
  body:not(.admin-body) .dropdown-panel,
  body:not(.admin-body) .drawer,
  body:not(.admin-body) .modal,
  body:not(.admin-body) .am-dialog,
  body:not(.admin-body) .wf-rail,
  body:not(.admin-body) .wechat-float-panel,
  body:not(.admin-body) .wechat-float-btn,
  body:not(.admin-body) .mobile-sticky-buy-bar {
    background: var(--glass-bg-strong);
  }
}

:root.dark body:not(.admin-body) h1,
:root.dark body:not(.admin-body) .page-title {
  text-shadow: var(--glow-text);
}

body:not(.admin-body) .btn-primary,
body:not(.admin-body) .mini-btn.primary,
body:not(.admin-body) .buy-btn:not(.sold-out):not(:disabled) {
  text-shadow: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent), var(--glow-box);
}

body:not(.admin-body) .nav-link.active,
body:not(.admin-body) .theme-seg button.active {
  box-shadow: 0 0 16px color-mix(in srgb, var(--primary) 30%, transparent);
}

.hue-widget { display: none; }

/* 后台：实体面板、无扫描线/光球/强模糊，保证表单对比度 */
.admin-body {
  --page-bg: #f3f4f0;
  --card-bg: #f7f6f1;
  --card-bg-hover: #eeede6;
  --float-panel-bg: #f7f6f1;
  --navbar-bg: rgba(247, 246, 241, 0.94);
  --glass-bg: #f7f6f1;
  --glass-bg-strong: #f7f6f1;
  --glass-blur: none;
  background: var(--page-bg);
}
:root.dark .admin-body {
  --page-bg: #0a0b09;
  --card-bg: #121310;
  --card-bg-hover: #181910;
  --float-panel-bg: #10110e;
  --navbar-bg: rgba(10, 11, 9, 0.92);
  --glass-bg: #121310;
  --glass-bg-strong: #121310;
}
.admin-body .card,
.admin-body table,
.admin-body input,
.admin-body select,
.admin-body textarea {
  text-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ---------- 手机端（≤900px 底栏断点）玻璃与浮窗适配 ---------- */
@media (max-width: 900px) {
  :root {
    --glass-blur: blur(12px) saturate(1.12);
  }

  body:not(.admin-body) h1,
  body:not(.admin-body) h2,
  body:not(.admin-body) .page-title,
  body:not(.admin-body) .brand-name,
  body:not(.admin-body) .nav-text,
  body:not(.admin-body) .action-text {
    letter-spacing: 0.02em;
  }

  body:not(.admin-body) .layout,
  body:not(.admin-body) .main,
  body:not(.admin-body) .card,
  body:not(.admin-body) .hero-card,
  body:not(.admin-body) .pdp-layout {
    max-width: 100%;
  }

  body:not(.admin-body) .nav-links {
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-color: var(--glass-border);
  }

  body:not(.admin-body) .wechat-float-wrap {
    z-index: 125;
  }
}

@media (max-width: 430px) {
  body:not(.admin-body) .hero-card {
    padding: 1.25rem 1rem 1.15rem;
  }
  body:not(.admin-body) .page-title,
  body:not(.admin-body) .hero-card h1 {
    overflow-wrap: anywhere;
  }
}


/* =====================================================
   手机端修正：顶栏/底栏不再重合；客服钮可拖动；默认深色底已在 :root
   ===================================================== */
@media (max-width: 900px) {
  /* backdrop-filter / filter / transform 会让 position:fixed 的底栏相对顶栏定位，两者叠在一起 */
  body:not(.admin-body) .navbar-wrap,
  body:not(.admin-body) .navbar {
    transform: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    contain: none;
    will-change: auto;
  }

  body:not(.admin-body) .navbar-wrap {
    position: sticky;
    top: 0;
    bottom: auto;
    left: auto;
    right: auto;
    z-index: 50;
  }

  /* 顶栏只保留图标，桌面端的「重置 / 订单查询 / 用户中心 / 主题」文字不要铺到手机顶栏或底栏上 */
  body:not(.admin-body) .nav-actions .action-text,
  body:not(.admin-body) .nav-actions .codex-label,
  body:not(.admin-body) .nav-actions .codex-value {
    display: none !important;
  }
  body:not(.admin-body) .nav-actions > a.pill-btn:not(.login-pill),
  body:not(.admin-body) .nav-actions > a.pill-btn.login-pill,
  body:not(.admin-body) .nav-actions .account-btn,
  body:not(.admin-body) .nav-actions .theme-btn,
  body:not(.admin-body) .nav-actions .codex-pill {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    gap: 0;
    font-size: 0;
    justify-content: center;
  }

  body:not(.admin-body) .wechat-float-btn,
  body:not(.admin-body) .wf-rail {
    touch-action: none;
  }
  body:not(.admin-body) .wechat-float-wrap.is-dragged,
  body:not(.admin-body) .wechat-float-wrap.is-dragging {
    transform: none !important;
    top: auto;
    bottom: auto;
    right: auto;
    left: auto;
  }
  body:not(.admin-body) .wechat-float-wrap.is-dragging {
    z-index: 9998;
    user-select: none;
    -webkit-user-select: none;
  }
}


/* ---------- WeChat Native 付款卡（请使用微信扫一扫） ---------- */
#payMain.wx-native-checkout > .kv-row,
#payMain.wx-native-checkout > #payDeadline {
  display: none;
}
.auth-card.wx-native-checkout > .page-title {
  display: none;
}
.auth-card.wx-native-checkout {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  max-width: 28rem;
  overflow: visible;
}

.wx-pay-sheet {
  margin: 0 auto;
  max-width: 28rem;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.wx-pay-sheet-head {
  background: #1c1c1e;
  color: #fff;
  text-align: center;
  padding: 0.95rem 1.1rem 0.85rem;
}

.wx-pay-sheet-title {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.wx-pay-sheet-host {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.01em;
  word-break: break-all;
}

.wx-pay-sheet-card {
  background: #fff;
  color: #111;
  text-align: center;
  padding: 1.25rem 1.15rem 1.35rem;
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
  pointer-events: auto;
}

.wx-pay-brand {
  color: #07c160;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.wx-pay-amount {
  margin: 0.35rem 0 0.85rem;
  color: #111;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.wx-pay-qr-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.95rem;
  padding: 0;
  background: #fff;
  position: relative;
  z-index: 1;
  max-width: 100%;
  /* 不要在码上盖透明层，以免影响扫码 */
  pointer-events: auto;
  -webkit-touch-callout: default;
}

.wx-pay-qr-wrap .wx-pay-qr-img {
  margin: 0 auto;
}

.wx-pay-tip,
.wx-pay-tip-sub,
.wx-pay-tip-desk,
.wx-pay-valid,
.wx-pay-orderno {
  margin: 0 auto;
  max-width: 22rem;
  color: #4b5563;
  font-size: 0.8rem;
  line-height: 1.7;
  text-align: center;
}

.wx-pay-tip {
  color: #1f2937;
  font-size: 0.84rem;
  font-weight: 550;
}

.wx-pay-tip-sub { margin-top: 0.15rem; }

.wx-pay-tip-desk { margin-top: 0.2rem; color: #6b7280; }

.wx-pay-valid {
  margin-top: 0.55rem;
  color: #6b7280;
}

.wx-pay-orderno {
  margin-top: 0.15rem;
  color: #9ca3af;
  font-size: 0.75rem;
  word-break: break-all;
}

.wx-pay-waiting {
  margin: 0.7rem 0 0.35rem;
  color: #f59e0b;
  font-size: 0.95rem;
  font-weight: 650;
}

.wx-pay-back {
  display: inline-block;
  margin-top: 0.15rem;
  color: #6b7280;
  font-size: 0.84rem;
  text-decoration: none;
}
.wx-pay-back:hover { color: #111; }

/* 付款码所在区域不要被全局的 user-select:none 或浮窗指针事件影响 */
#payQrArea,
#payQrArea .wx-pay-sheet,
#payQrArea .wx-pay-sheet-card,
#payQrArea .wx-pay-qr-wrap,
#payQrArea .wx-pay-qr-img {
  -webkit-touch-callout: default !important;
  -webkit-user-select: auto !important;
  user-select: auto !important;
  pointer-events: auto !important;
}

@media (max-width: 640px) {
  .auth-card.wx-native-checkout { max-width: 100%; }
  .wx-pay-sheet { border-radius: 14px; }
  .wx-pay-amount { font-size: 1.85rem; }
  .wx-pay-qr-img { width: min(280px, calc(100vw - 4.5rem)); }
}

#payMain.wx-native-checkout #paidBtn,
#payMain.wx-native-checkout #repayBtn,
#payMain.wx-native-checkout #payMsg,
#payMain.wx-native-checkout #payNote {
  margin-left: 1rem;
  margin-right: 1rem;
}
#payMain.wx-native-checkout #paidBtn,
#payMain.wx-native-checkout #repayBtn {
  margin-top: 0.9rem;
}

#payMain #paidBtn,
#payMain #repayBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  margin-top: 0.75rem;
  padding: 0.7rem 1.25rem;
  white-space: nowrap;
  overflow: visible;
  line-height: 1.2;
}
#repayBtn .repay-ico {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}
#repayBtn .repay-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}
#repayBtn .repay-label {
  min-width: 0;
  font-weight: 700;
  letter-spacing: 0;
}

.home-relay {
  padding: 1.15rem 1.2rem 1.25rem;
  margin: 0 0 1.2rem;
}
.home-relay .sec-head { margin-bottom: 0.45rem; }
.home-relay-lead {
  margin: 0 0 0.95rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.home-relay-grid { margin: 0; }
@media (max-width: 640px) {
  #payMain #paidBtn,
  #payMain #repayBtn {
    font-size: 0.95rem;
    padding: 0.7rem 1.1rem;
  }
}


/* ---------- 账户中心推广返利 / 排行榜 ---------- */
.ref-center { display: flex; flex-direction: column; gap: 0.9rem; }
.ref-title { font-size: 1.15rem; margin: 0 0 0.2rem; color: var(--text-main); }
.ref-card {
  background: var(--card-bg);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-medium);
  padding: 0.95rem 1rem 1rem;
  box-shadow: var(--shadow-card);
}
.ref-card-head, .ref-invite-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--title-active);
  margin-bottom: 0.4rem;
}
.ref-code-row {
  display: flex; align-items: center; gap: 0.7rem;
  margin-bottom: 0.8rem;
}
.ref-code-row strong {
  font-size: 1.35rem; letter-spacing: 0.08em; color: var(--text-main);
}
.ref-hint, .ref-card-note {
  font-size: 0.78rem; color: var(--text-secondary); line-height: 1.6; margin: 0.35rem 0 0;
}
.ref-share-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.65rem; }
.ref-slug-preview {
  font-size: 0.82rem; color: var(--text-secondary);
  margin-bottom: 0.5rem; word-break: break-all;
}
.ref-slug-preview strong { color: var(--title-active); }
.ref-qr-box { text-align: center; margin-top: 0.7rem; }
.ref-qr-tip { font-size: 0.75rem; color: var(--text-secondary); margin: 0.35rem 0; }
.ref-toggle {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--text-main); font: inherit; font-weight: 700;
}
.ref-toggle.is-open span:last-child { transform: rotate(90deg); }
.ref-toggle span:last-child { transition: transform 0.15s var(--ease-out); }
.ref-badge {
  display: inline-block; min-width: 1.2rem; padding: 0 0.3rem;
  margin-left: 0.25rem; border-radius: 999px;
  background: var(--btn-regular-bg); color: var(--btn-content);
  font-size: 0.7rem; font-weight: 700; text-align: center;
}
.ref-stats { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; margin-top: 0.2rem; }
.ref-tier-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0; }
.ref-tier-tag {
  border: 1px solid var(--line-color); border-radius: 999px;
  padding: 0.15rem 0.55rem; font-size: 0.72rem; color: var(--text-secondary);
}
.ref-tier-tag.is-on { border-color: var(--primary); color: var(--title-active); background: var(--btn-regular-bg); }
.ref-rules { margin-top: 0.7rem; }
.ref-rules-table { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 0.4rem; }
.ref-rules-row, .ref-order-row {
  display: grid; gap: 0.4rem; align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line-divider);
  font-size: 0.8rem;
}
.ref-rules-row { grid-template-columns: minmax(6rem, 1.4fr) repeat(3, minmax(3.5rem, 1fr)); }
.ref-rules-row.is-head { font-weight: 700; color: var(--text-secondary); border-bottom-style: solid; }
.ref-rules-row span small, .ref-order-row small {
  display: block; font-weight: 400; color: var(--text-secondary); font-size: 0.7rem;
}
.ref-rules-row span.is-on { color: var(--title-active); font-weight: 700; }
.ref-order-list { margin-top: 0.5rem; }
.ref-order-row { grid-template-columns: 1.5fr 0.8fr 0.8fr; }
.ref-empty { color: var(--text-secondary); font-size: 0.8rem; padding: 0.6rem 0; }
.ref-table-wrap { margin-top: 0.45rem; }
.ref-lb-mine { font-size: 0.85rem; color: var(--text-main); line-height: 1.6; }
.ref-lb-mine p { margin: 0.35rem 0 0; color: var(--text-secondary); font-size: 0.78rem; }

.rank-hero, .rank-board, .rank-rules, .rank-prizes, .rank-note {
  background: var(--card-bg);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-medium);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
}
.rank-hero h1 { margin: 0.3rem 0 0.4rem; font-size: 1.4rem; }
.rank-badge { font-size: 0.75rem; color: var(--title-active); font-weight: 700; }
.rank-summary { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; margin-top: 0.8rem; }
.rank-summary div { min-width: 5rem; }
.rank-summary strong { display: block; font-size: 1.15rem; color: var(--text-main); }
.rank-summary span { font-size: 0.72rem; color: var(--text-secondary); }
.rank-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin: 1rem 0; }
.rank-steps div { background: var(--btn-regular-bg); border-radius: var(--radius-small); padding: 0.7rem; }
.rank-steps b { display: inline-block; margin-right: 0.3rem; color: var(--title-active); }
.rank-row, .rank-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.6fr 1.1fr;
  gap: 0.5rem; align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line-divider);
  font-size: 0.82rem;
}
.rank-head { font-weight: 700; color: var(--text-secondary); border-bottom-style: solid; }
.rank-row.is-qualified { background: rgba(106, 143, 46, 0.08); }
.rank-row.rank-more { display: none; }
.rank-board.is-show-all .rank-row.rank-more { display: grid; }
.rank-pos { font-weight: 700; margin-right: 0.4rem; color: var(--title-active); }
.rank-prizes-grid, .rank-miles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.55rem;
}
.rank-prize, .rank-mile {
  border: 1px solid var(--line-color); border-radius: var(--radius-small);
  padding: 0.6rem 0.7rem;
}
.rank-prize strong, .rank-mile b { display: block; color: var(--title-active); margin-top: 0.2rem; }
.rank-prize small, .rank-mile span { display: block; font-size: 0.72rem; color: var(--text-secondary); }
.rank-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.7rem; }
.rank-tabs button {
  border: 1px solid var(--line-color); background: transparent; color: inherit;
  border-radius: 999px; padding: 0.2rem 0.7rem; cursor: pointer; font: inherit; font-size: 0.78rem;
}
.rank-tabs button.is-on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.rank-closed { text-align: center; color: var(--text-secondary); padding: 2rem 1rem; }

@media (max-width: 720px) {
  .ref-rules-row, .ref-order-row, .rank-row, .rank-head, .rank-steps {
    grid-template-columns: 1fr 1fr;
  }
  .ref-rules-row.is-head span:nth-child(n+4),
  .rank-head span:nth-child(n+3) { display: none; }
  .rank-steps { grid-template-columns: 1fr; }
}

/* ---------- Codex 重置置顶概率条（模板 nav-radar，AIplain 黄玻璃配色） ---------- */
body:not(.admin-body) .nav-radar {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  height: 1.7rem;
  padding: 0 0.45rem 0 0.28rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(243, 210, 74, 0.1);
  color: var(--gold);
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
  transition: color .4s, background .4s, border-color .4s;
}
body:not(.admin-body) .nav-radar[hidden] { display: none !important; }
body:not(.admin-body) .nav-radar:hover { background: rgba(243, 210, 74, 0.18); }
body:not(.admin-body) .nav-radar.nr-calm {
  color: #64748b;
  border-color: rgba(100, 116, 139, .35);
  background: rgba(100, 116, 139, .08);
}
html.dark body:not(.admin-body) .nav-radar.nr-calm {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, .3);
  background: rgba(148, 163, 184, .08);
}
body:not(.admin-body) .nav-radar.nr-mild {
  color: #8f7010;
  border-color: rgba(201, 162, 39, .45);
  background: rgba(201, 162, 39, .1);
  animation: nrBreath 3s ease-in-out infinite;
}
html.dark body:not(.admin-body) .nav-radar.nr-mild { color: #f3d24a; }
body:not(.admin-body) .nav-radar.nr-warm {
  color: #8f7010;
  border-color: rgba(243, 210, 74, .55);
  background: rgba(243, 210, 74, .14);
  animation: nrGlow 1.8s ease-in-out infinite;
}
html.dark body:not(.admin-body) .nav-radar.nr-warm { color: #ffe98a; }
body:not(.admin-body) .nav-radar.nr-hot {
  color: #1c1a12;
  border-color: transparent;
  background: linear-gradient(90deg, #c9a227, #f3d24a, #ffe98a, #c9a227);
  background-size: 300% 100%;
  animation: nrFlow 2.4s linear infinite, nrWave 1.1s ease-out infinite;
  text-shadow: 0 0 6px rgba(255, 255, 255, .45);
}
body:not(.admin-body) .nav-radar.nr-hot .nav-radar-pct { animation: nrFlicker 1.1s ease-in-out infinite; }
body:not(.admin-body) .nav-radar.nr-max {
  color: #1c1a12;
  border-color: transparent;
  background: linear-gradient(90deg, #8f7010, #f3d24a, #ffe98a, #8f7010);
  background-size: 300% 100%;
  animation: nrFlow 3s linear infinite, nrCheer 1.6s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(255, 233, 138, .7);
}
body:not(.admin-body) .nav-radar.nr-max .nr-val { filter: drop-shadow(0 0 3px #fff); }
body:not(.admin-body) .nav-radar.nr-max::before,
body:not(.admin-body) .nav-radar.nr-max::after {
  content: "✦";
  position: absolute;
  font-size: 9px;
  color: #ffe98a;
  text-shadow: 0 0 4px #f3d24a;
  pointer-events: none;
  animation: nrTwinkle 1.4s ease-in-out infinite;
}
body:not(.admin-body) .nav-radar.nr-max::before { top: -7px; left: 22%; }
body:not(.admin-body) .nav-radar.nr-max::after { bottom: -7px; right: 18%; animation-delay: .7s; }
body:not(.admin-body) .nr-sweep {
  position: absolute; inset: 0; border-radius: 50%; opacity: 0; pointer-events: none;
}
body:not(.admin-body) .nr-mild .nr-sweep {
  opacity: 1;
  background: conic-gradient(from 0deg, rgba(243, 210, 74, .55), transparent 25%);
  animation: nrSpin 2.6s linear infinite;
}
body:not(.admin-body) .nr-hot .nr-sweep {
  opacity: 1;
  background: conic-gradient(from 0deg, transparent 60%, rgba(255, 255, 255, .95) 92%, transparent);
  animation: nrSpin .9s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 56%);
  mask: radial-gradient(circle, transparent 52%, #000 56%);
}
body:not(.admin-body) .nr-calm .nr-dot { animation: nrBlink 2.6s ease-in-out infinite; }
body:not(.admin-body) .nr-hot .nr-dot { animation-duration: .7s; }
body:not(.admin-body) .nav-radar-ring {
  position: relative; width: 0.9rem; height: 0.9rem; flex-shrink: 0;
}
body:not(.admin-body) .nav-radar-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
body:not(.admin-body) .nr-track { fill: none; stroke: currentColor; stroke-opacity: .15; stroke-width: 3.5; }
body:not(.admin-body) .nr-val {
  fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round;
  stroke-dasharray: 94.25; stroke-dashoffset: 94.25;
}
body:not(.admin-body) .nr-dot {
  position: absolute; left: 50%; top: 50%; width: 3px; height: 3px;
  margin: -1.5px 0 0 -1.5px; border-radius: 50%; background: currentColor;
  animation: navRadarPulse 1.6s ease-out infinite;
}
body:not(.admin-body) .nav-radar-pct {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.66rem;
  min-width: 3ch;
  text-align: right;
}
body:not(.admin-body) .nav-radar-label { display: none; }
@media (min-width: 1024px) {
  body:not(.admin-body) .nav-radar-label { display: inline; }
}
@media (max-width: 380px) {
  body:not(.admin-body) .nav-radar-ring { width: 0.85rem; height: 0.85rem; }
  body:not(.admin-body) .nav-radar { gap: 0.18rem; padding-left: 0.22rem; height: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.admin-body) .nr-dot,
  body:not(.admin-body) .nr-sweep,
  body:not(.admin-body) .nav-radar,
  body:not(.admin-body) .nav-radar-pct,
  body:not(.admin-body) .nav-radar::before,
  body:not(.admin-body) .nav-radar::after { animation: none !important; }
}
@keyframes nrBreath { 50% { border-color: rgba(201, 162, 39, .8); } }
@keyframes nrGlow { 50% { box-shadow: 0 0 0 3px rgba(243, 210, 74, .18), 0 0 10px rgba(243, 210, 74, .35); } }
@keyframes nrFlow { to { background-position: 300% 0; } }
@keyframes nrWave { 0% { box-shadow: 0 0 0 0 rgba(201, 162, 39, .45); } 100% { box-shadow: 0 0 0 7px rgba(201, 162, 39, 0); } }
@keyframes nrFlicker { 50% { text-shadow: 0 0 10px rgba(255, 255, 255, .95), 0 0 2px #fff; } }
@keyframes nrCheer { 50% { box-shadow: 0 0 0 3px rgba(243, 210, 74, .3), 0 0 14px rgba(243, 210, 74, .45); } }
@keyframes nrTwinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(90deg); } }
@keyframes nrSpin { to { transform: rotate(360deg); } }
@keyframes nrBlink { 50% { opacity: .25; } }
@keyframes navRadarPulse { 0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; } 100% { box-shadow: 0 0 0 4px transparent; opacity: .6; } }

/* 不再在窄屏隐藏置顶概率条（旧 .codex-pill 在 ≤900px 被整颗隐藏）。 */
@media (max-width: 900px) {
  body:not(.admin-body) .navbar .nav-radar { display: inline-flex; }
  body:not(.admin-body) .navbar .nav-radar[hidden] { display: none !important; }
}


/* ---------- 后台销售监测 ---------- */
.admin-body .sales-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0.4rem 0 1.2rem;
}
.admin-body .sales-kpi {
  padding: 1rem 1.05rem 0.9rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid rgba(201, 162, 39, 0.22);
  box-shadow: 0 8px 24px rgba(28, 26, 18, 0.06);
  backdrop-filter: blur(14px);
}
html.dark .admin-body .sales-kpi {
  border-color: rgba(243, 210, 74, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.admin-body .sales-kpi h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.admin-body .sales-kpi b {
  display: block;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}
.admin-body .sales-kpi p {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.admin-body .sales-delta { font-weight: 600; }
.admin-body .sales-delta.is-up { color: #2f8f4e; }
.admin-body .sales-delta.is-down { color: #c4473a; }
html.dark .admin-body .sales-delta.is-up { color: #7dce8f; }
html.dark .admin-body .sales-delta.is-down { color: #f0a097; }
.admin-body .sales-chart-card {
  padding: 1rem 1.1rem 0.8rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid rgba(201, 162, 39, 0.18);
  margin-bottom: 1.2rem;
}
.admin-body .sales-chart-card .admin-toolbar {
  align-items: center;
  margin-bottom: 0.4rem;
}
.admin-body .sales-chart-card .ip-card-title { margin: 0; flex: 1; }
.admin-body .sales-chart-tabs { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.admin-body .sales-range.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: transparent;
}
.admin-body .sales-chart { height: 220px; width: 100%; }
.admin-body .sales-chart svg { width: 100%; height: 100%; display: block; }
.admin-body .sales-chart .sales-bar { fill: var(--primary); opacity: 0.88; }
.admin-body .sales-chart .sales-bar:hover { opacity: 1; }
.admin-body .sales-chart .sales-axis,
.admin-body .sales-chart .sales-label {
  fill: var(--text-secondary);
  font-size: 10px;
}
.admin-body .sales-empty { padding: 2rem 1rem; text-align: center; }
.admin-body .sales-top { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-body .sales-top th,
.admin-body .sales-top td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.16);
}
.admin-body .sales-top th { color: var(--text-secondary); font-weight: 600; }
.admin-body .sales-top td.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-body .sales-top th.num { text-align: right; }
@media (max-width: 900px) {
  .admin-body .sales-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .admin-body .sales-kpis { grid-template-columns: 1fr; }
  .admin-body .sales-chart { height: 180px; }
}


/* =====================================================
   20261202b 手机端顶栏 / 客服浮窗对齐（仅前台 ≤900px）
   根因见 /workspace/aiplain-deploy/publish/NOTES-float-align-20261202.md
   ===================================================== */
@media (max-width: 900px) {
  /* 底栏 .nav-links 是 position:fixed，本不应占顶栏文档流；
     但写了 width: calc(100vw - 20px)，若引擎仍把它当 flex 项参与排版，
     会把 .navbar 撑满，.nav-actions 被拉宽。再叠加
     body:not(.admin-body) .nav-actions { align-items: flex-end }
     且没有 justify-content: flex-end，首个子项 .nav-radar 就会落在
     Logo 与右侧图标之间的空白里（截图像是「漂在顶栏中间」）。 */
  body:not(.admin-body) .navbar {
    justify-content: flex-start;
    align-items: center;
  }

  body:not(.admin-body) .navbar > .nav-links {
    position: fixed !important;
    flex: none !important;
    margin: 0 !important;
  }

  body:not(.admin-body) .nav-actions {
    display: flex;
    flex: none;
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: auto;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: 0;
    justify-content: flex-end;
    align-items: center;
    gap: 0.15rem;
  }

  body:not(.admin-body) .nav-actions > .nav-radar,
  body:not(.admin-body) .navbar .nav-radar {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    margin: 0;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    box-sizing: border-box;
    vertical-align: middle;
  }

  body:not(.admin-body) .nav-actions > .nav-radar + *,
  body:not(.admin-body) .nav-actions > a.pill-btn,
  body:not(.admin-body) .nav-actions .account-btn,
  body:not(.admin-body) .nav-actions .theme-btn {
    margin-left: 0;
  }

  body:not(.admin-body) .nav-radar-ring {
    width: 1rem;
    height: 1rem;
    aspect-ratio: 1;
    flex: none;
  }

  /* 客服钮：贴在真实底栏上方 10px，不用 --dock-space（7rem 预留给页尾避让，会把钮抬得太高叠到内容卡上） */
  body:not(.admin-body) .wechat-float-wrap {
    top: auto;
    left: auto;
    right: max(0.7rem, env(safe-area-inset-right, 0px));
    bottom: calc(0.5rem + 3.6rem + 10px + env(safe-area-inset-bottom, 0px));
    transform: none;
  }

  body:not(.admin-body):has(.mobile-sticky-buy-bar) .wechat-float-wrap {
    bottom: calc(0.5rem + 3.6rem + 4.25rem + 10px + env(safe-area-inset-bottom, 0px));
  }

  body:not(.admin-body) .wechat-float-btn {
    display: inline-flex;
    box-sizing: border-box;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    aspect-ratio: 1;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
  }

  body:not(.admin-body) .wechat-float-btn svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    flex: none;
  }

  body:not(.admin-body) .wechat-float-wrap.is-expanded .wf-rail,
  body:not(.admin-body) .wf-rail {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  body:not(.admin-body) .wf-rail-btn {
    width: 2.55rem;
    height: 2.55rem;
    min-width: 2.55rem;
    min-height: 2.55rem;
    padding: 0;
    aspect-ratio: 1;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* Codex 页大圈盘保持 1:1，避免列向 flex + align-items:stretch 把圈拉扁 */
body:not(.admin-body) .cr-gauge-wrap {
  aspect-ratio: 1;
  flex: none;
  flex-shrink: 0;
  align-self: center;
  box-sizing: border-box;
  width: 190px;
  height: 190px;
  max-width: 100%;
}

body:not(.admin-body) .cr-gauge {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  transform-origin: center center;
}

@media (max-width: 520px) {
  body:not(.admin-body) .cr-gauge-wrap {
    width: 170px;
    height: 170px;
    aspect-ratio: 1;
    flex: none;
    align-self: center;
  }
}


/* =====================================================
   20261202c 手机底栏可点；载入数据后 93% 胶囊不再放大走形
   ===================================================== */
@media (max-width: 900px) {
  /* 挂到 body 后离开 sticky .navbar-wrap（z-index:50）的层叠上下文，
     才能点到视口底部的 fixed 底栏；并压过 .dock-backdrop(110)。 */
  body:not(.admin-body) .nav-links,
  body:not(.admin-body) .nav-links[data-dock-portaled="1"] {
    position: fixed !important;
    z-index: 130;
    pointer-events: auto;
  }

  .dock-backdrop:not(.open) {
    pointer-events: none !important;
    visibility: hidden;
  }

  /* 底栏移出后，顶栏只剩 logo + .nav-actions，收缩并贴右，与 44px 图标齐平 */
  body:not(.admin-body) .nav-actions {
    display: flex !important;
    flex: none !important;
    width: max-content;
    max-width: calc(100% - 5.5rem);
    margin-left: auto !important;
    margin-right: 0 !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 0.15rem !important;
  }

  body:not(.admin-body) .nav-actions > .nav-radar,
  body:not(.admin-body) .navbar .nav-radar {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    flex: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    overflow: hidden;
    box-shadow: none !important;
    animation: none !important;
    filter: none;
  }

  body:not(.admin-body) .nav-radar-label { display: none !important; }

  body:not(.admin-body) .nav-radar-ring {
    width: 1.05rem;
    height: 1.05rem;
    aspect-ratio: 1;
    flex: none;
  }

  body:not(.admin-body) .nav-radar-pct {
    font-size: 0.7rem;
    line-height: 1;
    animation: none !important;
  }

  /* 载入 brief 后 93% 会套 nr-hot（nrFlow + nrWave 外扩 7px 光晕）。窄屏关掉外扩/扫光，保留配色。
     不要写 transform:none 到 ring 里的 svg（仍需 rotate(-90deg)）。 */
  body:not(.admin-body) .nav-radar.nr-mild,
  body:not(.admin-body) .nav-radar.nr-warm,
  body:not(.admin-body) .nav-radar.nr-hot,
  body:not(.admin-body) .nav-radar.nr-max,
  body:not(.admin-body) .nav-radar.nr-hot .nav-radar-pct,
  body:not(.admin-body) .nav-radar.nr-max .nr-val {
    animation: none !important;
    box-shadow: none !important;
    filter: none;
  }

  body:not(.admin-body) .nav-radar .nr-sweep,
  body:not(.admin-body) .nav-radar::before,
  body:not(.admin-body) .nav-radar::after {
    display: none !important;
    animation: none !important;
  }

  /* 客服层在底栏之上，但包装本身不接收点击，避免透明大盒子挡住底栏 */
  body:not(.admin-body) .wechat-float-wrap {
    pointer-events: none !important;
    z-index: 140;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    overflow: visible;
  }

  body:not(.admin-body) .wechat-float-wrap > .wechat-float-btn,
  body:not(.admin-body) .wechat-float-wrap > .wf-rail,
  body:not(.admin-body) .wechat-float-wrap > .wechat-float-panel {
    pointer-events: auto;
  }

  body:not(.admin-body) .wechat-float-modal:not(.is-open) {
    display: none !important;
    pointer-events: none !important;
  }
}

/* =====================================================
   20261202d 手机顶栏拉满，与内容卡左右对齐（仅前台 ≤900px）
   ===================================================== */
@media (max-width: 900px) {
  /* 金条已用宽度比内容卡窄一截（约 47 CSS px）且左对齐：
     1) ≤900px 的 .navbar 写了 width:100% 又写了 min-width:0，在
        body { overflow-x: hidden; max-width:100% } + sticky 顶栏里，
        百分宽度可按可收缩的循环百分比解析，条本身比包裹盒更窄；
     2) .navbar-wrap 左右是 0.6rem，.layout 是 clamp(0.75rem, 3vw, 1.5rem)，
        即便拉满包裹盒也不会和卡片右缘对齐。
     这里强制包裹盒与金条拉满，并把左右内边距改成和 .layout 同一套。
     不改底栏门户、z-index、点击，也不改 44px 雷达或配色。 */
  body:not(.admin-body) .navbar-wrap {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: clamp(0.75rem, 3vw, 1.5rem);
    padding-right: clamp(0.75rem, 3vw, 1.5rem);
  }

  body:not(.admin-body) .navbar {
    display: flex;
    box-sizing: border-box;
    width: auto;
    min-width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    flex: none;
    align-self: stretch;
  }
}

/* =====================================================
   20261202e 载入雷达后顶栏宽度不再收缩（仅前台 ≤900px）
   ===================================================== */
@media (max-width: 900px) {
  /* 20261202d 用 min-width/max-width:100% 拉满金条。#nav-radar 初始 hidden，
     首屏只有 logo 和三个图标，条能铺满；brief 载入后去掉 hidden 并套 nr-hot，
     循环百分宽度的已用宽度会按胶囊宽度收缩，右侧空出一截。
     这里取消循环百分比，改用 flex 拉满包裹盒。 */
  body:not(.admin-body) .navbar-wrap {
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: clamp(0.75rem, 3vw, 1.5rem);
    padding-right: clamp(0.75rem, 3vw, 1.5rem);
  }

  body:not(.admin-body) .navbar {
    display: flex;
    box-sizing: border-box;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    align-self: stretch;
    width: -webkit-fill-available;
    width: stretch;
  }

  body:not(.admin-body) .nav-actions {
    flex: none;
    margin-left: auto;
  }

  /* 0%→93% / nr-hot 不改变盒子；窄屏不显示标签 */
  body:not(.admin-body) .nav-actions > .nav-radar,
  body:not(.admin-body) .navbar .nav-radar {
    flex: none;
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    overflow: hidden;
    box-shadow: none !important;
  }

  body:not(.admin-body) .nav-radar-pct {
    min-width: 3ch;
    font-variant-numeric: tabular-nums;
  }

  body:not(.admin-body) .nav-radar-label { display: none !important; }
}

/* =====================================================
   20261202f 载入数据后 Codex 卡片不再撑出主栏（仅前台 ≤900px）
   ===================================================== */
@media (max-width: 900px) {
  /* 20261202e 已把金条拉满，左右与 .layout 内边距对齐（400 CSS px 时
     金条 left 12 / right 388）。#codexRadar.cr 是 .main（column flex）
     的子项，默认 min-width:auto；占位文案短时卡片能待在栏内，brief
     载入后长 verdict/source/timer 抬高 min-content，卡片画到视口右缘
     （实测 width 473.63，右缘 485.63）。这里让栏和卡片可收缩，长子项
     折行，不改顶栏填充、底栏门户、客服浮层、44px 雷达或配色。 */
  body:not(.admin-body) .layout,
  body:not(.admin-body) .main {
    min-width: 0;
    max-width: 100%;
  }

  body:not(.admin-body) .cr,
  body:not(.admin-body) #codexRadar,
  body:not(.admin-body) .main > .card,
  body:not(.admin-body) .main > .hero-card,
  body:not(.admin-body) .main > .jump-card,
  body:not(.admin-body) .main > .product-card,
  body:not(.admin-body) .main > .offer-card,
  body:not(.admin-body) .main > .hero-item,
  body:not(.admin-body) .main > .arch-item,
  body:not(.admin-body) .main > .model-card {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  body:not(.admin-body) .cr,
  body:not(.admin-body) #codexRadar {
    overflow-x: hidden;
  }

  body:not(.admin-body) .cr-top,
  body:not(.admin-body) .cr-src,
  body:not(.admin-body) .cr-live,
  body:not(.admin-body) .cr-title,
  body:not(.admin-body) .cr-verdict,
  body:not(.admin-body) .cr-verdict-row,
  body:not(.admin-body) .cr-gauge-panel,
  body:not(.admin-body) .cr-gauge-side,
  body:not(.admin-body) .cr-bar-row,
  body:not(.admin-body) .cr-last-panel,
  body:not(.admin-body) .cr-ago,
  body:not(.admin-body) .cr-signal-text,
  body:not(.admin-body) .cr-signal-head,
  body:not(.admin-body) .cr-signal-foot,
  body:not(.admin-body) .cr-panel,
  body:not(.admin-body) .cr-main,
  body:not(.admin-body) .cr-cols,
  body:not(.admin-body) .cr-stats,
  body:not(.admin-body) .cr-v,
  body:not(.admin-body) .cr-note,
  body:not(.admin-body) .cr-foot,
  body:not(.admin-body) .cr-promo,
  body:not(.admin-body) .cr-promo > span,
  body:not(.admin-body) .cr-meta,
  body:not(.admin-body) .cr-tx,
  body:not(.admin-body) .cr-stat-v,
  body:not(.admin-body) .cr-h2,
  body:not(.admin-body) .cr-banked,
  body:not(.admin-body) .cr-error,
  body:not(.admin-body) .cr-rhythm,
  body:not(.admin-body) .cr-chips {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  body:not(.admin-body) .cr-src,
  body:not(.admin-body) .cr-live,
  body:not(.admin-body) .cr-title,
  body:not(.admin-body) .cr-verdict,
  body:not(.admin-body) .cr-ago,
  body:not(.admin-body) .cr-signal-text,
  body:not(.admin-body) .cr-v,
  body:not(.admin-body) .cr-note,
  body:not(.admin-body) .cr-foot,
  body:not(.admin-body) .cr-meta,
  body:not(.admin-body) .cr-tx,
  body:not(.admin-body) .cr-stat-v,
  body:not(.admin-body) .cr-h2,
  body:not(.admin-body) .cr-banked,
  body:not(.admin-body) .cr-error,
  body:not(.admin-body) .cr-promo,
  body:not(.admin-body) .cr-promo > span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body:not(.admin-body) .cr-bar-row {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  }

  body:not(.admin-body) .cr-promo {
    flex-wrap: wrap;
  }

  /* 圈盘本身不纵向裁剪，只允许在窄栏里不超过父级宽度。 */
  body:not(.admin-body) .cr-gauge-wrap {
    max-width: 100%;
  }
}

/* ---------- 发货后台 · 邀请码接力码池 ----------
   分享次数不要放进 .admin-toolbar：那条规则是 flex: 1 1 14rem，
   而 .field 是纵向 flex，14rem 会变成输入框高度。 */
#adminPanel-relay .relay-admin-pools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 0.85rem;
  align-items: start;
  margin: 0 0 1.15rem;
}
#adminPanel-relay .relay-admin-pool {
  min-width: 0;
  padding: 0.8rem 0.9rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line-color);
  background: color-mix(in srgb, var(--primary) 6%, var(--card-bg));
}
#adminPanel-relay .relay-admin-pool.is-closed {
  border-color: var(--line-divider);
}
#adminPanel-relay .relay-admin-pool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}
#adminPanel-relay .relay-admin-pool-head .ip-card-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.3;
}
#adminPanel-relay .relay-admin-stats {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-secondary);
}
#adminPanel-relay .relay-admin-pool-head .copy-btn {
  flex: none;
  min-height: 30px;
  padding: 0.22rem 0.65rem;
}
#adminPanel-relay .relay-admin-deposit {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
}
#adminPanel-relay .relay-admin-deposit-grid {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.45rem 0.7rem;
  align-items: start;
}
#adminPanel-relay .relay-admin-share {
  width: 6.5rem;
  max-width: 100%;
}
#adminPanel-relay .relay-admin-share input[type="number"] {
  width: 100%;
  height: 2.15rem;
  min-height: 2.15rem;
  max-height: 2.15rem;
  flex: 0 0 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.2rem 0.45rem;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
#adminPanel-relay .relay-admin-range {
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--text-secondary);
}
#adminPanel-relay .relay-admin-codes .batch-text {
  min-height: 4.6rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
}
#adminPanel-relay .relay-admin-actions {
  display: flex;
  justify-content: flex-start;
}
#adminPanel-relay .relay-admin-actions .btn-primary {
  width: auto;
  align-self: flex-start;
  min-height: 34px;
  padding: 0.35rem 0.95rem;
  font-size: 0.82rem;
}
#adminPanel-relay .relay-admin-sub {
  margin: 0.75rem 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-secondary);
}
#adminPanel-relay .relay-admin-empty {
  margin: 0.1rem 0 0.15rem;
}
#adminPanel-relay .relay-admin-records {
  display: flex;
  flex-direction: column;
}
#adminPanel-relay .relay-admin-record {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(4.2rem, 0.7fr) auto;
  gap: 0.35rem 0.55rem;
  align-items: center;
  padding: 0.38rem 0;
  border-bottom: 1px dashed var(--line-divider);
  font-size: 0.78rem;
}
#adminPanel-relay .relay-admin-record:last-child { border-bottom: none; }
#adminPanel-relay .relay-admin-record b {
  font-family: "JetBrains Mono", Consolas, ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}
#adminPanel-relay .relay-admin-record small {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-secondary);
}
#adminPanel-relay .relay-admin-record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
}
#adminPanel-relay .relay-admin-record-actions .copy-btn {
  min-height: 28px;
  padding: 0.18rem 0.55rem;
}
#adminPanel-relay .relay-admin-untrust {
  max-width: 40rem;
  margin-bottom: 0.35rem;
}
#adminPanel-relay .relay-admin-untrust-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem 0.75rem;
}
#adminPanel-relay .relay-admin-untrust input {
  width: 100%;
  height: 2.15rem;
  min-height: 2.15rem;
  max-height: 2.15rem;
  flex: 0 0 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}
@media (max-width: 720px) {
  #adminPanel-relay .relay-admin-pools { grid-template-columns: 1fr; }
  #adminPanel-relay .relay-admin-deposit-grid { grid-template-columns: 1fr; }
  #adminPanel-relay .relay-admin-share { width: 6.5rem; }
  #adminPanel-relay .relay-admin-untrust-grid { grid-template-columns: 1fr; }
  #adminPanel-relay .relay-admin-record {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  #adminPanel-relay .relay-admin-record-meta { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  #adminPanel-relay .relay-admin-share input[type="number"],
  #adminPanel-relay .relay-admin-untrust input {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    font-size: 16px;
  }
  #adminPanel-relay .relay-admin-actions .btn-primary {
    min-height: 44px;
    font-size: 0.95rem;
  }
}
