/* 四页统一画布 2560×1280：窗口不滚，缩放由 --stage-scale 整页等比；P5 全局统一金色变量 */
:root {
  --stage-w: 2560px;
  --stage-h: 1280px;
  --stage-scale: 1;
  --header-h: 93px;
  --fluid-header-h: clamp(60px, calc(60px + (100vw - 1024px) * 0.021484), 93px);
  --gold-primary: #d4be88;
  --gold-glow: rgba(212, 190, 136, 0.25);
  --bg-dark: #07080a;
  --capsule-bg: rgba(14, 16, 22, 0.72);
  --border-fine: rgba(255, 255, 255, 0.08);
}
html.stage-locked,
html.stage-locked body {
  height: 100%;
  overflow: hidden;
  min-height: 0;
}
/* P10-8/P10-9: 流式自适应页 (.page-fluid) 顶栏与全屏 Flex 物理流基础声明 */
html.page-fluid,
html.page-fluid body {
  width: 100%;
  min-height: 100dvh;
}
.stage-paper {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: var(--stage-w);
  height: var(--stage-h);
  transform: translate(-50%, -50%) scale(var(--stage-scale, 1));
  transform-origin: center center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.stage-paper > .ambient-stage {
  flex: 1;
  min-height: 0;
}
/* 锁定舞台内的主内容滚动区：舞台恒 2560×1280 不滚（六页统一，顶栏宽度全等），
   超长内容收进这里滚——滚动条只出现在内容区右缘，永不挤压顶栏。 */
.stage-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}
.stage-scroll-body::-webkit-scrollbar { width: 8px; }
.stage-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(212, 190, 136, 0.35);
  border-radius: 8px;
}

/* 全站统一顶栏：保留 1px 香槟金精致微光分界线，层次分明，以线界序 */
.shared-header {
  position: relative;
  z-index: 200;
  flex: 0 0 auto;
  height: var(--header-h);
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 56px 0 16px;
  background: #07080b;
  border-bottom: 1px solid rgba(212, 190, 136, 0.16) !important;
  box-shadow: none;
}

/* 出图页工作区从顶部铺满，顶栏贴顶通栏悬浮其上 */
.app .shared-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  box-sizing: border-box;
  padding: 0 56px 0 16px;
}

.shared-header-left {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0;
  flex: 1;
}

.shared-header #currentProjectBadge {
  display: none;
  align-items: center;
  height: 32px;
  gap: 8px;
  min-width: 0;
  max-width: 420px;
  color: #838896;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 2px;
  font-family: "Montserrat", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.shared-header #currentProjectBadge:hover,
.shared-header #currentProjectBadge:hover strong {
  color: #ffffff;
}

.shared-header #currentProjectBadge > span {
  opacity: 1;
}

.shared-header #currentProjectBadge strong {
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shared-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-family: "Montserrat", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.shared-crest {
  width: 51px;
  height: 51px;
  flex: 0 0 51px;
  min-width: 51px;
  align-self: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shared-crest svg {
  display: block;
  width: 51px;
  height: 51px;
  overflow: visible;
}

/* LOGO C型线条方案B：微晶光核+物理连续散射，彻底消灭硬拼断点，呈现同款生成按钮连续质感 */
.crest-beam-tail,
.crest-beam-body {
  display: none !important;
}

.crest-beam-head {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  opacity: 0.95;
  filter: 
    drop-shadow(0 0 1px #ffffff) 
    drop-shadow(0 0 2.5px rgba(255, 248, 236, 0.9)) 
    drop-shadow(0 0 5px rgba(230, 200, 139, 0.6))
    drop-shadow(0 0 8px rgba(168, 138, 84, 0.35));
}

html[data-theme="light"] .crest-beam-head {
  stroke: #fffdf5;
  stroke-width: 3.2;
  opacity: 0.95;
  filter: 
    drop-shadow(0 0 1px #fff6e0) 
    drop-shadow(0 0 2px #b88d3b) 
    drop-shadow(0 0 4px rgba(138, 106, 47, 0.5));
}

/* 极致小微光核：仅 6px / 5px，两端 round 自然收弧，配合多级 drop-shadow 形成完全平滑无断点的流动光芒，恢复原版 5s 线性匀速 */
.crest-beam-1-head { stroke-dasharray: 6 240; animation: crest-p1-smooth 5s linear infinite; }
.crest-beam-2-head { stroke-dasharray: 5 240; animation: crest-p2-smooth 5s linear infinite; }

@keyframes crest-p1-smooth {
  0% { stroke-dashoffset: 6; opacity: 0; }
  3% { opacity: 0.95; }
  47% { opacity: 0.95; }
  50% { stroke-dashoffset: -96; opacity: 0; }
  100% { stroke-dashoffset: -96; opacity: 0; }
}

@keyframes crest-p2-smooth {
  0%, 51% { stroke-dashoffset: 5; opacity: 0; }
  54% { opacity: 0.95; }
  90% { opacity: 0.95; }
  93% { stroke-dashoffset: -76; opacity: 0; }
  100% { stroke-dashoffset: -76; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .crest-beam-tail,
  .crest-beam-body,
  .crest-beam-head { display: none; }
}

.shared-brand-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
}

.shared-brand-title {
  font-size: 29px;
  font-weight: 300;
  letter-spacing: 5px;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1;
  display: block;
  font-family: inherit;
}

.shared-brand-subtitle {
  font-size: 15.3px;
  font-weight: 400;
  letter-spacing: 2.5px;
  color: var(--gold-primary, #d4be88);
  text-transform: uppercase;
  margin-top: 0;
  opacity: 0.92;
  display: block;
  line-height: 1;
  font-family: inherit;
}

.shared-header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.shared-nav {
  display: flex;
  gap: 36px;
  align-items: center;
}

.shared-nav a {
  color: #838896;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
  font-family: "Montserrat", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  transition: all 0.3s ease;
  position: relative;
  padding: 6px 0;
}

.shared-nav a:hover,
.shared-nav a.active {
  color: #ffffff;
}

.shared-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-primary);
}

/* P5: 头像下拉菜单 */
.shared-avatar-wrap {
  position: relative;
}

/* 黑金高定用户资产卡 Popover (全面收敛为 4 档黄金字号：15/17/20/24px · 1:1对称) */
.shared-user-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  background: #0e1117 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.85) !important;
  z-index: 1000;
  box-sizing: border-box;
}

.shared-user-menu::-webkit-scrollbar {
  width: 4px;
}
.shared-user-menu::-webkit-scrollbar-thumb {
  background: rgba(212, 190, 136, 0.3);
  border-radius: 4px;
}
.shared-user-menu::-webkit-scrollbar-track {
  background: transparent;
}

.shared-user-menu.show {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: popoverFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 用户信息区 */
.user-popover-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-popover-avatar {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--gold-primary);
  background: rgba(212, 190, 136, 0.12);
  color: var(--gold-primary);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--gold-glow);
}

.user-popover-meta {
  flex: 1;
  min-width: 0;
}

.user-popover-nick-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-popover-nick {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
  letter-spacing: 0.5px;
}

.btn-edit-nick {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer;
  padding: 0 4px !important;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary, #d4be88) !important;
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease;
  line-height: 1;
  flex: 0 0 auto;
}

.btn-edit-nick:hover {
  opacity: 1;
  transform: scale(1.15);
  color: var(--gold-primary, #d4be88) !important;
  background: transparent !important;
}

html[data-theme="light"] .btn-edit-nick {
  color: #8f6e2b !important;
}

.user-popover-edit-box {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.input-edit-nick {
  flex: 1;
  height: 32px;
  background: #181b24;
  border: 1px solid var(--gold-primary);
  border-radius: 5px;
  padding: 0 8px;
  color: #fff;
  font-size: 15px;
  outline: none;
}

.btn-nick-save,
.btn-nick-cancel {
  height: 32px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-nick-save {
  background: linear-gradient(135deg, #dfcb9a 0%, #c4aa6e 100%) !important;
  color: #08090c !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(196, 170, 110, 0.3) !important;
  cursor: pointer !important;
}

.btn-nick-save:not(:disabled):hover {
  background: linear-gradient(135deg, #ebdcb0 0%, #d4be88 100%) !important;
  box-shadow: 0 4px 12px rgba(196, 170, 110, 0.45) !important;
}

.btn-nick-save:disabled {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #64748b !important;
  cursor: not-allowed !important;
  opacity: 0.55 !important;
  box-shadow: none !important;
}

html[data-theme="light"] .btn-nick-save:disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  opacity: 0.65 !important;
  box-shadow: none !important;
}

.btn-nick-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #9aa3b2;
}

.user-popover-phone {
  font-size: 15px;
  color: #9aa3b2;
  margin-top: 3px;
  letter-spacing: 0.5px;
}

/* 分割线 */
.user-popover-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  width: 100%;
}

/* 积分与等级统计（1:1 绝对等宽对称，380px宽度单行绝不折行） */
.user-popover-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.user-popover-stat-item {
  background: rgba(8, 9, 13, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 4px;
  min-width: 0;
}

.user-popover-stat-label {
  font-size: 15px;
  color: #b8becd;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-align: left;
}

.user-popover-stat-val {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-primary);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.user-popover-stat-val small {
  font-size: 15px;
  font-weight: 400;
  color: #9aa3b2;
  margin-left: 2px;
}

.user-popover-stat-badge {
  font-size: 20px;
  font-weight: 600;
  color: var(--gold-primary);
  padding: 1px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 10px rgba(212, 190, 136, 0.25);
  line-height: 1.15;
  text-align: left;
}

/* 自有积分与推广赠送细分卡片：双列等分网格，中线严格50%绝对居中，推广赠送紧靠中线靠左 */
.user-popover-sub-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 2px;
  box-sizing: border-box;
}

.user-popover-sub-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: #94a3b8;
  white-space: nowrap;
}

.user-popover-sub-item:first-child {
  justify-content: flex-start;
  padding-right: 6px;
}

.user-popover-sub-item:last-child {
  justify-content: flex-start;
  padding-left: 12px;
}

.user-popover-sub-item .sub-stat-val {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--gold-primary, #d4be88);
}

.user-popover-sub-divider {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
}

/* 到期时间与冷冻保护分别独立分行 */
.user-popover-dates {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 2px;
}

.user-popover-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: #d1d5db;
  line-height: 1.4;
}

.user-popover-date-row.freeze {
  color: #d1d5db;
}

.user-popover-date-dot {
  font-size: 16px;
  color: var(--gold-primary, #d4be88);
  opacity: 0.85;
  line-height: 1;
}

.user-popover-note {
  font-size: 12.5px;
  color: #8c92a2;
  line-height: 1.5;
  padding-left: 2px;
  margin-top: 2px;
}

/* 快捷操作区：纯文字高定设计，彻底切除任何彩色 Emoji */
.user-popover-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-popover-subscribe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  background: linear-gradient(135deg, #e8d7a8 0%, #d4be88 48%, #c4a96e 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  border-radius: 8px;
  color: #12151c !important;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 16px rgba(212, 190, 136, 0.28) !important;
  box-sizing: border-box;
  width: 100%;
}

.btn-popover-subscribe .btn-arrow {
  display: inline-block;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-popover-subscribe:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #eee1b8 0%, #deb878 48%, #cca262 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 24px rgba(212, 190, 136, 0.38) !important;
}

.btn-popover-subscribe:hover .btn-arrow {
  transform: translateX(3px);
}

/* 积分明细与主题切换：底图质感100%保持严格一致，高度38px，圆角8px */
.btn-popover-bills,
.popover-theme-chips {
  height: 38px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.btn-popover-bills {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-popover-bills:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9;
}

/* 主题纯文字三段切换条（同款底图质感，三等分，纯字色区分） */
.popover-theme-chips {
  display: flex !important;
  align-items: center !important;
  justify-content: stretch !important;
  padding: 2px !important;
  gap: 0 !important;
}

.popover-theme-chip {
  flex: 1 1 0 !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  border-radius: 6px !important;
  color: #94a3b8 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: color 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  font-family: inherit !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.popover-theme-chip[data-theme-choice="system"] {
  font-size: 0 !important;
}
.popover-theme-chip[data-theme-choice="system"]::after {
  content: "系统" !important;
  font-size: 15px !important;
}

.popover-theme-chip:hover:not(.active) {
  color: #f1f5f9 !important;
}

.popover-theme-chip.active {
  background: transparent !important;
  color: var(--gold-primary, #d4be88) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.btn-popover-logout {
  width: 100%;
  height: 34px;
  background: transparent;
  border: none;
  color: #9aa3b2;
  font-size: 17px;
  cursor: pointer;
  text-align: center;
  transition: color 0.2s;
}

.btn-popover-logout:hover {
  color: #e5e8f0;
}

/* 版本号专区：15px 第1档微注，居中呈现系统排障凭据 */
.user-popover-version {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  color: #64748b;
  text-align: center;
  letter-spacing: 0.5px;
  line-height: 1.2;
  user-select: text;
  cursor: default;
  white-space: nowrap;
  margin-top: 2px;
}

/* 用户中心版本号下方：精要更新摘要微晶舱 */
.version-release-notes {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  text-align: left;
}
.release-notes-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-primary, #eeddb2);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.release-notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.release-notes-item {
  font-size: 12px;
  line-height: 1.45;
  color: #94a3b8;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}
.release-notes-item::before {
  content: "✦";
  font-size: 9px;
  color: var(--gold-primary, #eeddb2);
  margin-top: 2px;
  flex-shrink: 0;
  opacity: 0.85;
}
html[data-theme="light"] .version-release-notes {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .release-notes-title {
  color: #855d14;
}
html[data-theme="light"] .release-notes-item {
  color: #475569;
}

/* ═══════════════════════════════════════════════════════════════
   浅色模式 (Light Theme) 下的用户资产卡高品质自适应
   ═══════════════════════════════════════════════════════════════ */
html[data-theme="light"] .shared-user-menu {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12) !important;
}

html[data-theme="light"] .shared-brand-title {
  color: #0f172a !important;
}

html[data-theme="light"] .shared-brand-subtitle {
  color: #9b7c38 !important;
}

html[data-theme="light"] .shared-brand-subtitle {
  color: #9b7c38 !important;
}

html[data-theme="light"] .user-popover-avatar {
  background: rgba(212, 190, 136, 0.2);
  border-color: #b88a44;
  color: #9b7c38;
  box-shadow: 0 0 10px rgba(212, 190, 136, 0.3);
}

html[data-theme="light"] .user-popover-nick {
  color: #0f172a;
}

html[data-theme="light"] .user-popover-phone {
  color: #64748b;
}

html[data-theme="light"] .user-popover-divider {
  background: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .user-popover-stat-item {
  background: rgba(212, 190, 136, 0.12);
  border: 1px solid rgba(180, 140, 80, 0.25);
}

html[data-theme="light"] .user-popover-stat-label {
  color: #64748b;
}

html[data-theme="light"] .user-popover-stat-val {
  color: #9b7c38;
}

html[data-theme="light"] .user-popover-stat-val small {
  color: #78716c;
}

html[data-theme="light"] .user-popover-stat-badge {
  color: #9b7c38;
  text-shadow: none;
}

html[data-theme="light"] .user-popover-sub-stats {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .user-popover-sub-item .sub-stat-val {
  color: #9b7c38;
}

html[data-theme="light"] .user-popover-sub-divider {
  background: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .user-popover-date-row {
  color: #475569;
}

html[data-theme="light"] .user-popover-date-row.freeze {
  color: #475569;
}

html[data-theme="light"] .user-popover-note {
  color: #64748b;
}

html[data-theme="light"] .btn-popover-subscribe {
  background: linear-gradient(135deg, #fbf7ee 0%, #f4ebd7 100%) !important;
  color: #5a4110 !important;
  border: 1px solid rgba(180, 140, 80, 0.45) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 10px rgba(180, 140, 80, 0.15) !important;
}

html[data-theme="light"] .btn-popover-subscribe:hover {
  background: linear-gradient(135deg, #ffffff 0%, #f7eee0 100%) !important;
  border-color: rgba(180, 140, 80, 0.65) !important;
  color: #3d2b07 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 14px rgba(180, 140, 80, 0.22) !important;
}

html[data-theme="light"] .btn-popover-bills,
html[data-theme="light"] .popover-theme-chips {
  height: 38px !important;
  background: #f8f9fa !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

html[data-theme="light"] .btn-popover-bills {
  color: #64748b !important;
}

html[data-theme="light"] .btn-popover-bills:hover {
  background: #edf0f4 !important;
  border-color: rgba(0, 0, 0, 0.16) !important;
  color: #0f172a !important;
}

html[data-theme="light"] .popover-theme-chip {
  color: #64748b !important;
  background: transparent !important;
}

html[data-theme="light"] .popover-theme-chip:hover:not(.active) {
  color: #0f172a !important;
}

html[data-theme="light"] .popover-theme-chip.active {
  background: transparent !important;
  color: #9b7c38 !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

html[data-theme="light"] .btn-popover-logout {
  color: #64748b;
}

html[data-theme="light"] .btn-popover-logout:hover {
  color: #0f172a;
}

html[data-theme="light"] .user-popover-version {
  color: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════
   笔记本与 iPad 紧凑工坊：原生物理尺寸自适应（彻底拔除 scale 变形与闪烁病根）
   盒模型原生计算为 326px 物理宽度，零变形、零缩放、零尺寸突变！
   ═══════════════════════════════════════════════════════════════ */
@media (max-height: 860px), (max-width: 1440px) {
  .shared-user-menu {
    width: 326px !important;
    padding: 12px 14px !important;
    top: calc(100% + 6px) !important;
  }
  .shared-user-menu.show {
    gap: 7px !important;
  }
  .user-popover-header {
    gap: 10px !important;
  }
  .user-popover-avatar {
    width: 40px !important;
    height: 40px !important;
    font-size: 17px !important;
  }
  .user-popover-nick {
    font-size: 17px !important;
    max-width: 190px !important;
  }
  .user-popover-phone {
    font-size: 12.5px !important;
    margin-top: 1px !important;
  }
  .user-popover-stats {
    gap: 8px !important;
  }
  .user-popover-stat-item {
    padding: 7px 10px !important;
    gap: 2px !important;
  }
  .user-popover-stat-label {
    font-size: 13px !important;
  }
  .user-popover-stat-val {
    font-size: 20px !important;
  }
  .user-popover-stat-badge {
    font-size: 16px !important;
  }
  .user-popover-sub-stats {
    padding: 6px 10px !important;
    margin-top: 1px !important;
  }
  .user-popover-sub-item {
    font-size: 12px !important;
    gap: 4px !important;
  }
  .user-popover-sub-item:last-child {
    padding-left: 10px !important;
  }
  .user-popover-dates {
    gap: 4px !important;
  }
  .user-popover-date-row {
    font-size: 12.5px !important;
    gap: 6px !important;
  }
  .user-popover-note {
    font-size: 11.5px !important;
    margin-top: 1px !important;
    line-height: 1.4 !important;
  }
  .user-popover-actions {
    gap: 6px !important;
  }
  .btn-popover-subscribe,
  .btn-popover-bills,
  .popover-theme-chips {
    height: 33px !important;
    border-radius: 6px !important;
  }
  .btn-popover-subscribe {
    font-size: 14px !important;
  }
  .btn-popover-bills,
  .popover-theme-chips .popover-theme-chip {
    font-size: 13.5px !important;
  }
  .btn-popover-logout {
    height: 26px !important;
    font-size: 12px !important;
  }
}

.shared-user-menu a:hover,
.shared-user-menu button:hover {
  background: rgba(212, 190, 136, 0.1);
  color: var(--gold-primary);
}

/* P5: 用户状态栏 */
.shared-status {
  font-size: 16px;
  color: #8c92a2;
  letter-spacing: 0.5px;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: rgba(14, 16, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.shared-status.show {
  display: flex;
}
