/**
 * 王牌竞速芯片计算器 · 社区与本地方案库样式
 * community-plans.css (v2.2 深度重构版)
 * 
 * 100% 遵循宿主 Design System v4 规范体系：
 * 1. 【第 0 号最高复用准则】：大容器卡片直接复用 .card，无缝继承半透明玻璃底色 (--surface)、
 *    180°顶光微渐变、--surface-rim 高光内描边与柔和投影，彻底告别突兀实心纯色！
 * 2. 排序下拉框完全复用 .dropdown-container / .dropdown-menu / .dropdown-option 规范，告别原生 select；
 * 3. 分段控制完全复用 .chip-seg 规范；
 * 4. 方案卡片完全对齐 .chip-tile 毛玻璃晶莹质感与品质色微混光悬停上浮；
 * 5. 全响应式适配：移动端 (≤640px)、平板端 (641px~1024px)、PC 宽屏端 (≥1025px)。
 */

/* ==========================================================================
   1. 主卡片容器 (.card.cp-plans-card)
   严格挂载于「选择车辆」卡片 (.desktop-layout.cp-hero) 正下方
   ========================================================================== */
.ds-c .cp-plans-card {
  margin-top: 4px;
  margin-bottom: 24px;
  position: relative;
  /* 继承宿主 .card 的 background-color: var(--surface)、渐变与投影，绝不写死纯色 */
}

/* 卡片标题栏微调 (复用 .card-title) */
.ds-c .cp-plans-card.pv-collapsible > .card-title::after,
.ds-c .cp-plans-card.pv-collapsible > .cp-card-title::after {
  content: none !important;
  display: none !important;
}

.ds-c .cp-plans-card > .cp-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding-bottom: 11px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--sep);
  width: 100%;
  flex-wrap: nowrap;
}

.ds-c .cp-plans-card.pv-collapsed > .cp-card-title,
.ds-c #communityPlansContainer.pv-collapsed .cp-plans-card > .cp-card-title {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.ds-c .cp-title-left {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-start;
}

.ds-c .cp-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--acc);
}

.ds-c .cp-badge-icon .ico {
  width: 20px;
  height: 20px;
}

.ds-c .cp-title-text {
  flex: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.ds-c .cp-car-badge {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--acc-ink, var(--ink));
  background: var(--acc-soft, var(--fill));
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--surface-edge);
}

/* 顶部操作按钮组 */
.ds-c .cp-actions-bar {
  order: 2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: 0;
  flex: none;
  white-space: nowrap;
  transform-origin: right center;
}

.ds-c .cp-actions-bar .cp-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.ds-c .cp-fold-btn {
  order: 3;
  flex: none;
}

.ds-c .cp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--r-sm, 10px);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.ds-c .cp-btn .ico {
  width: 15px;
  height: 15px;
}

.ds-c .cp-btn-save,
.ds-c .cp-btn-undo {
  background-color: color-mix(in oklab, var(--acc) 22%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--acc) 60%, transparent);
  color: var(--ink);
  box-shadow: inset 0 1px 0 var(--surface-rim), 0 2px 8px color-mix(in oklab, var(--acc) 25%, transparent);
}

.ds-c .cp-btn-save:hover,
.ds-c .cp-btn-undo:hover {
  background-color: color-mix(in oklab, var(--acc) 30%, var(--surface));
  border-color: var(--acc);
  transform: translateY(-1px);
}

.ds-c .cp-btn-save.is-loading,
.ds-c .cp-btn-save.is-success {
  cursor: default;
  transform: none !important;
}

.ds-c .cp-btn-save.is-loading {
  opacity: .88;
  background-color: color-mix(in oklab, var(--acc) 18%, var(--surface));
}

.ds-c .cp-btn-save.is-success {
  opacity: 1 !important;
  background-color: color-mix(in oklab, var(--acc) 34%, var(--surface));
  background-image: linear-gradient(180deg, color-mix(in oklab, var(--acc) 18%, transparent), transparent);
  border-color: var(--acc);
  color: var(--ink);
  box-shadow: inset 0 1px 0 var(--surface-rim), 0 0 14px color-mix(in oklab, var(--acc) 32%, transparent);
}

@keyframes cpBtnSpin {
  to { transform: rotate(360deg); }
}

@keyframes cpCheckPop {
  0%   { opacity: 0; transform: scale(.4) rotate(-28deg); }
  65%  { opacity: 1; transform: scale(1.18) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.ds-c .cp-spin-ico {
  animation: cpBtnSpin .75s linear infinite;
}

.ds-c .cp-save-ok-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--acc);
}

.ds-c .cp-btn-save.is-success .cp-save-ok-ico .ico {
  animation: cpCheckPop .32s cubic-bezier(.34, 1.56, .64, 1);
}

.ds-c .cp-icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm, 10px);
}

.ds-c .cp-icon-btn .ico {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   第三个模式（support 辅助供能模式）物理隐藏方案库
   ========================================================================== */
body[data-calc-mode="support"] #communityPlansContainer {
  display: none !important;
}

/* ==========================================================================
   折叠卡片交互 (复用全站 .pv-collapsible)
   ========================================================================== */
.ds-c .cp-plans-card.pv-collapsible > .cp-card-title {
  cursor: pointer;
  user-select: none;
}

/* 遵循全站统一折叠规范：动画完全由原生 __pvMorph 测量真实起止高度驱动，
   .pv-shut 仅负责立即旋转箭头，.pv-collapsed 仅在折叠静态生效时隐藏非标题节点与操作栏，
   严禁给 padding / margin-bottom 额外加 transition，避免高度测量失真造成收尾顿跳 */
.ds-c .cp-plans-card.pv-collapsed > :not(.cp-card-title) {
  display: none !important;
}

.ds-c .cp-plans-card.pv-collapsed > .cp-card-title {
  margin-bottom: 0 !important;
}

/* 折叠指示箭头（严格复用全站原生 .pv-collapsible 贝塞尔缓动，展开向上 180deg，折叠向下 0deg） */
.ds-c .cp-fold-btn {
  padding: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ds-c .cp-fold-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--ink-2);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}

.ds-c .cp-fold-indicator .ico {
  width: 16px;
  height: 16px;
}

.ds-c .cp-plans-card:not(.pv-shut) .cp-fold-indicator,
.ds-c #communityPlansContainer:not(.pv-shut) .cp-fold-indicator {
  transform: rotate(180deg);
}

.ds-c .cp-plans-card.pv-shut .cp-fold-indicator,
.ds-c #communityPlansContainer.pv-shut .cp-fold-indicator {
  transform: rotate(0deg);
}

/* 仅在静态折叠态 (.pv-collapsed) 隐藏操作按钮栏，避免动画首帧/尾帧布局高度突变 */
.ds-c .cp-plans-card.pv-collapsed .cp-actions-bar {
  display: none !important;
}

/* ==========================================================================
   2. 流式竖排分类组 (Categorized Stream Sections - 参考 TouchGal 分组框设计)
   ========================================================================== */
.ds-c .cp-sections-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 方案库固定高度内部滚动视口（对齐「选择赋能」面板，避免页面无限拉长） */
.ds-c .cp-scroll-viewport {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-height: 860px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 2px 4px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--fill-2) transparent;
}
@media (max-width: 849px) {
  .ds-c .cp-scroll-viewport {
    max-height: 860px;
  }
}
.ds-c .cp-scroll-viewport::-webkit-scrollbar {
  width: 5px;
}
.ds-c .cp-scroll-viewport::-webkit-scrollbar-track {
  background: transparent;
}
.ds-c .cp-scroll-viewport::-webkit-scrollbar-thumb {
  background: var(--fill-2);
  border-radius: 999px;
}
.ds-c .cp-scroll-viewport::-webkit-scrollbar-thumb:hover {
  background: var(--ink-3);
}

.ds-c .cp-lazy-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: var(--r-sm, 8px);
  background: color-mix(in oklab, var(--fill) 65%, transparent);
  border: 1px dashed var(--surface-edge);
  font-size: 12px;
  color: var(--ink-2);
}
.ds-c .cp-lazy-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ds-c .cp-lazy-btn {
  height: 28px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--r-sm, 6px);
  border: 1px solid color-mix(in oklab, var(--acc) 45%, var(--surface-edge));
  background: color-mix(in oklab, var(--acc) 14%, var(--surface));
  color: var(--acc-ink, var(--acc));
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.ds-c .cp-lazy-btn:hover:not(:disabled) {
  background: color-mix(in oklab, var(--acc) 24%, var(--surface));
  border-color: var(--acc);
  transform: translateY(-1px);
}
.ds-c .cp-lazy-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.ds-c .cp-section {
  --cp-tree-color: #60a5fa;
  --cp-tree-line: color-mix(in oklab, var(--cp-tree-color) 42%, var(--surface-edge));
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: cpRiseIn .24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ds-c .cp-section-pro {
  --cp-tree-color: #fbbf24;
}

.ds-c .cp-section-partner {
  --cp-tree-color: #2dd4bf;
}

.ds-c .cp-section-community {
  --cp-tree-color: #60a5fa;
}

.ds-c .cp-section-mine {
  --cp-tree-color: var(--acc);
}

.ds-c .cp-section-official {
  --cp-tree-color: #38bdf8;
}

.ds-c.light-mode .cp-section-official {
  --cp-tree-color: #0284c7;
}

:root[data-theme="light"] .ds-c .cp-section-pro {
  --cp-tree-color: #d97706;
}

:root[data-theme="light"] .ds-c .cp-section-partner {
  --cp-tree-color: #0d9488;
}

:root[data-theme="light"] .ds-c .cp-section-community {
  --cp-tree-color: #2563eb;
}

/* 分类组头部：树状根节点（极简开放式单行：锚点图标 + 主标题 + 计数 + 延伸细线，避免嵌套大框套小框） */
.ds-c .cp-sec-header {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.ds-c .cp-sec-icon-box {
  width: 28px;
  height: 28px;
  margin-top: 0;
  flex: none;
  position: relative;
  z-index: 2;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: color-mix(in oklab, var(--cp-tree-color) 14%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--cp-tree-color) 40%, var(--surface-edge));
  color: var(--cp-tree-color);
  box-shadow: inset 0 1px 0 var(--surface-rim);
}

.ds-c .cp-section-pro .cp-sec-icon-box {
  width: auto;
  height: auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.ds-c .cp-sec-icon-pro {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.ds-c .cp-sec-pro-icon {
  width: 28px;
  height: 28px;
  margin-top: 0;
  position: relative;
  z-index: 2;
  object-fit: contain;
  display: inline-block;
  flex: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
  transition: transform .25s cubic-bezier(.2,.8,.25,1);
}

.ds-c .cp-sec-icon-box .ico {
  width: 15px;
  height: 15px;
}

.ds-c .cp-sec-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.ds-c .cp-sec-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.ds-c .cp-sec-title-row::after {
  content: '';
  flex: 1;
  min-width: 16px;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in oklab, var(--cp-tree-color) 45%, transparent), transparent);
  margin-left: 4px;
}

.ds-c .cp-sec-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.ds-c .cp-sec-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--cp-tree-color) 16%, var(--surface));
  color: var(--cp-tree-color);
  border: 1px solid color-mix(in oklab, var(--cp-tree-color) 38%, transparent);
  flex: none;
}

.ds-c .cp-section-mine .cp-sec-count {
  color: var(--ink);
}

.ds-c .cp-sec-desc {
  display: none;
}

/* 分类下的方案卡片列表：全端统一流式竖向单列排列 */
.ds-c .cp-site-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: var(--r-sm, 10px);
  background: color-mix(in oklab, var(--acc) 10%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--acc) 35%, transparent);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.5;
}

.ds-c .cp-site-banner.is-warn {
  background: color-mix(in oklab, var(--warn, #e5a14b) 14%, var(--surface));
  border-color: color-mix(in oklab, var(--warn, #e5a14b) 42%, transparent);
}

.ds-c .cp-site-banner.is-success {
  background: color-mix(in oklab, #10b981 12%, var(--surface));
  border-color: color-mix(in oklab, #10b981 40%, transparent);
}

.ds-c .cp-site-banner .ico {
  width: 15px;
  height: 15px;
  color: var(--acc);
  flex-shrink: 0;
}

.ds-c .cp-site-banner.is-warn .ico {
  color: var(--warn, #e5a14b);
}

.ds-c .cp-site-banner.is-success .ico {
  color: #34d399;
}

.ds-c .cp-site-banner.is-clickable {
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.ds-c .cp-site-banner.is-clickable:hover {
  transform: translateY(-1px);
  border-color: color-mix(in oklab, var(--acc) 55%, transparent);
}

.ds-c .cp-site-banner-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-c .cp-site-banner-more {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in oklab, var(--acc) 16%, transparent);
  color: var(--acc);
}

.ds-c .cp-fixed-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ds-c .cp-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--sep);
}

.ds-c .cp-ctrl-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.ds-c .cp-controls-hint {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
}

/* 平滑滑动胶囊分段器（轻透无重框，减少与页面其他边线的视觉压迫） */
.ds-c .cp-seg-track {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: color-mix(in oklab, var(--fill) 78%, transparent);
  border: 1px solid color-mix(in oklab, var(--surface-edge) 55%, transparent);
  gap: 2px;
  user-select: none;
  -webkit-user-select: none;
}

.ds-c .cp-seg-thumb {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: 7px;
  pointer-events: none;
  background: color-mix(in oklab, var(--acc) 18%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--acc) 40%, transparent);
  box-shadow: inset 0 1px 0 var(--surface-rim), 0 2px 6px rgba(0, 0, 0, .1);
  opacity: 0;
  transition: transform .24s cubic-bezier(.22, 1, .36, 1), width .24s cubic-bezier(.22, 1, .36, 1), height .2s ease, opacity .15s ease;
}

.ds-c .cp-seg-thumb.is-ready {
  opacity: 1;
}

.ds-c .cp-seg-thumb.no-anim {
  transition: none !important;
}

.ds-c .cp-seg-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  padding: 4px 11px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s ease;
}

.ds-c .cp-seg-btn:hover {
  color: var(--ink);
}

.ds-c .cp-seg-btn.is-on {
  color: var(--acc-ink, var(--acc));
}

.ds-c .cp-seg-btn:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 1px;
}

.ds-c .cp-sec-list {
  --cp-tree-pad: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 0;
  padding-left: var(--cp-tree-pad);
  border-left: none;
  position: relative;
}

/* 统一单图层 SVG 树形弧线：整组做透明度合成，彻底消除主干与圆弧交汇处叠亮、伪元素撕裂断点 */
.ds-c .cp-tree-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
  color: var(--cp-tree-color);
  opacity: 0.46;
}

:root[data-theme="light"] .ds-c .cp-tree-svg {
  opacity: 0.42;
}

.ds-c .cp-tree-svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: butt;
  stroke-linejoin: round;
}

/* ==========================================================================
   3. 统一三层结构化方案卡片（无碎框堆叠，跨设备 100% 清晰对齐）
   ========================================================================== */
.ds-c .cp-card-item {
  position: relative;
  background-color: var(--surface);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 68px);
  border: 1px solid var(--surface-edge);
  box-shadow: inset 0 1px 0 var(--surface-rim), 0 3px 12px rgba(0, 0, 0, .08);
  border-radius: var(--r-md, 10px);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  width: 100%;
  contain: layout style;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease, opacity .18s ease;
}

.ds-c.light-mode .cp-card-item {
  background-image: none;
}

.ds-c .cp-card-item:hover {
  background-color: color-mix(in oklab, var(--acc) 5%, var(--surface));
  border-color: color-mix(in oklab, var(--acc) 45%, var(--surface-edge));
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 var(--surface-rim), 0 8px 20px -6px color-mix(in oklab, var(--acc) 22%, transparent);
}

/* 国服顶尖微光质感 */
.ds-c .cp-card-item.is-pro {
  border-color: color-mix(in oklab, #ffd700 32%, var(--surface-edge));
}

.ds-c .cp-card-item.is-pro:hover {
  border-color: color-mix(in oklab, #ffd700 68%, var(--surface-edge));
  box-shadow: inset 0 1px 0 var(--surface-rim), 0 8px 24px -6px rgba(255, 215, 0, 0.25);
}

/* 正在生效/已套用状态 */
.ds-c .cp-card-item.is-applied {
  border-color: var(--acc);
  background-color: color-mix(in oklab, var(--acc) 12%, var(--surface));
  box-shadow: inset 0 1px 0 var(--surface-rim), 0 0 0 1.5px var(--acc), 0 8px 24px -6px color-mix(in oklab, var(--acc) 32%, transparent);
}

/* 模式不兼容灰态（如在「先机汇能」模式下查看「团魂获能」专属方案） */
.ds-c .cp-card-item.is-mode-disabled {
  opacity: 0.56;
  filter: grayscale(0.85);
  background-color: color-mix(in oklab, var(--fill) 65%, var(--surface));
  border-color: var(--surface-edge);
}

.ds-c .cp-card-item.is-mode-disabled:hover {
  transform: none;
  background-color: color-mix(in oklab, var(--fill) 65%, var(--surface));
  border-color: var(--surface-edge);
  box-shadow: inset 0 1px 0 var(--surface-rim), 0 3px 12px rgba(0, 0, 0, .08);
}

.ds-c .cp-card-item.is-mode-disabled .cp-spec-val.is-acc,
.ds-c .cp-card-item.is-mode-disabled .cp-spec-extra-v.is-acc {
  color: var(--ink-2);
}

/* 第一层：卡片头部 (标题 + 徽章 + 纯文本元数据) */
.ds-c .cp-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ds-c .cp-card-header-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ds-c .cp-card-item .cp-card-title {
  flex: 1 1 160px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-bottom: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  word-break: break-word;
  width: auto;
}

.ds-c .cp-card-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex: none;
}

/* 归属明确的分区内隐藏与分区标题/驳回横幅重复的装饰性徽章，只保留差异化状态标识 */
.ds-c .cp-section-mine .cp-badge-local,
.ds-c .cp-section-pro .cp-badge-pro,
.ds-c .cp-section-partner .cp-badge-partner,
.ds-c .cp-card-item:has(.cp-card-reject-banner) .cp-badge-rejected {
  display: none;
}

.ds-c .cp-card-badges:empty {
  display: none;
}

.ds-c .cp-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.35;
}

.ds-c .cp-author-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--ink);
}

/* 昵称旁友站勋章按钮：柔和清雅的青玉微章，点击跳转到合作友站 */
.ds-c .cp-author-partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #2dd4bf;
  background: color-mix(in oklab, #14b8a6 11%, var(--surface));
  border: 1px solid color-mix(in oklab, #14b8a6 28%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
  transition: color .15s, background-color .15s, border-color .15s, transform .15s;
}

.ds-c .cp-author-partner-badge:hover,
.ds-c .cp-author-partner-badge:focus-visible {
  color: #ffffff;
  background: #0d9488;
  border-color: #14b8a6;
  transform: translateY(-1px);
  outline: none;
}

.ds-c .cp-author-partner-badge:active {
  transform: translateY(0);
}

.ds-c .cp-author-partner-badge .ico {
  width: 10.5px;
  height: 10.5px;
  opacity: 0.9;
}

:root[data-theme="light"] .ds-c .cp-author-partner-badge,
:root[data-theme="light"] .ds-c .cp-section-partner .cp-sec-icon-box,
:root[data-theme="light"] .ds-c .cp-section-partner .cp-sec-count,
:root[data-theme="light"] .ds-c .cp-badge-partner {
  color: #0d9488;
}

:root[data-theme="light"] .ds-c .cp-author-partner-badge:hover,
:root[data-theme="light"] .ds-c .cp-author-partner-badge:focus-visible {
  color: #ffffff;
}

.ds-c .cp-pro-helmet-badge {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.45));
}

.ds-c .cp-author-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  margin-left: 6px;
}

.ds-c .cp-author-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--acc) 32%, var(--surface-edge));
  background: color-mix(in oklab, var(--acc) 10%, var(--surface));
  color: var(--acc-ink, var(--acc));
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  word-break: keep-all;
  line-height: 1;
  transition: color .15s, background-color .15s, border-color .15s, transform .15s;
}

.ds-c .cp-author-link-btn .ico {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.ds-c .cp-author-link-btn:hover {
  color: #fff;
  background: var(--acc);
  border-color: var(--acc);
  transform: translateY(-1px);
}

.ds-c .cp-author-link-btn.is-bili {
  border-color: color-mix(in oklab, #fb7299 42%, var(--surface-edge));
  background: color-mix(in oklab, #fb7299 12%, var(--surface));
  color: #fb7299;
}

.ds-c .cp-author-link-btn.is-bili:hover {
  background: #fb7299;
  border-color: #fb7299;
  color: #fff;
}

.ds-c .cp-author-link-btn.is-douyin {
  border-color: color-mix(in oklab, #38bdf8 40%, var(--surface-edge));
  background: color-mix(in oklab, #38bdf8 10%, var(--surface));
  color: #38bdf8;
}

.ds-c .cp-author-link-btn.is-douyin:hover {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
}

.ds-c .cp-player-id {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: none;
  border-bottom: 1px dashed color-mix(in oklab, var(--ink-3) 45%, transparent);
  background: transparent;
  font-size: 11.5px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}

.ds-c .cp-player-id:hover,
.ds-c .cp-player-id.is-copied {
  color: var(--acc);
  border-bottom-color: var(--acc);
}

.ds-c .cp-copy-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
}

.ds-c .cp-copy-icon .ico {
  position: absolute;
  width: 11px;
  height: 11px;
  opacity: .75;
  transition: transform .24s cubic-bezier(.34, 1.56, .64, 1), opacity .16s ease;
}

.ds-c .cp-copy-icon .cp-ico-ok {
  opacity: 0;
  transform: rotate(90deg) scale(.4);
  color: var(--acc);
}

.ds-c .cp-player-id.is-copied .cp-copy-icon .cp-ico-def {
  opacity: 0;
  transform: rotate(-90deg) scale(.4);
}

.ds-c .cp-player-id.is-copied .cp-copy-icon .cp-ico-ok {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.ds-c .cp-meta-time {
  color: var(--ink-3);
  font-size: 11.5px;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* 徽章组 */
.ds-c .cp-badge-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}

.ds-c .cp-card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ds-c .cp-badge-pro {
  background: color-mix(in oklab, #ffd700 22%, var(--surface));
  color: #ffd700;
  border: 1px solid color-mix(in oklab, #ffd700 50%, transparent);
}

.ds-c .cp-badge-pro .ico {
  width: 12px;
  height: 12px;
}

.ds-c .cp-badge-partner {
  background: color-mix(in oklab, #14b8a6 14%, var(--surface));
  color: #2dd4bf;
  border: 1px solid color-mix(in oklab, #14b8a6 34%, transparent);
}

.ds-c .cp-badge-partner .ico {
  width: 11px;
  height: 11px;
}

.ds-c .cp-badge-local {
  background: var(--fill);
  color: var(--ink-2);
  border: 1px solid var(--surface-edge);
}

.ds-c .cp-badge-community {
  background: color-mix(in oklab, #06b6d4 18%, var(--surface));
  color: #06b6d4;
  border: 1px solid color-mix(in oklab, #06b6d4 45%, transparent);
}

.ds-c .cp-badge-mode-team {
  background: color-mix(in oklab, #8b5cf6 18%, var(--surface));
  color: #a78bfa;
  border: 1px solid color-mix(in oklab, #8b5cf6 42%, transparent);
}

.ds-c .cp-badge-mode-team.is-disabled {
  background: var(--fill);
  color: var(--ink-3);
  border-color: var(--surface-edge);
}

.ds-c .cp-badge-active {
  background: color-mix(in oklab, #10b981 20%, var(--surface));
  color: #10b981;
  border: 1px solid color-mix(in oklab, #10b981 50%, transparent);
}

.ds-c .cp-badge-active .ico {
  width: 11px;
  height: 11px;
}

/* 审核状态徽章 (支持交互与反馈查看) */
.ds-c .cp-badge-pending {
  background: color-mix(in oklab, #f59e0b 20%, var(--surface));
  color: #f59e0b;
  border: 1px solid color-mix(in oklab, #f59e0b 50%, transparent);
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}

.ds-c .cp-badge-pending:hover {
  background: color-mix(in oklab, #f59e0b 32%, var(--surface));
  transform: translateY(-1px);
}

.ds-c .cp-badge-rejected {
  background: color-mix(in oklab, #ef4444 22%, var(--surface));
  color: #f87171;
  border: 1px solid color-mix(in oklab, #ef4444 55%, transparent);
  cursor: pointer;
  animation: cp-pulse-red 2.5s infinite;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.ds-c .cp-badge-rejected:hover {
  background: color-mix(in oklab, #ef4444 38%, var(--surface));
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

@keyframes cp-pulse-red {
  0%, 100% { border-color: color-mix(in oklab, #ef4444 55%, transparent); }
  50% { border-color: #ef4444; }
}

.ds-c .cp-badge-approved {
  background: color-mix(in oklab, #10b981 22%, var(--surface));
  color: #34d399;
  border: 1px solid color-mix(in oklab, #10b981 50%, transparent);
}

.ds-c .cp-badge-cleaned {
  background: color-mix(in oklab, var(--ink-3, #888) 16%, var(--surface));
  color: var(--ink-2);
  border: 1px solid color-mix(in oklab, var(--ink-3, #888) 38%, transparent);
}

.ds-c .cp-card-reject-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 6px 9px;
  border-radius: 4px;
  background: color-mix(in oklab, #ef4444 9%, transparent);
  border: none;
  border-left: 2px solid color-mix(in oklab, #ef4444 65%, transparent);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.45;
  transition: background-color .15s ease;
}

.ds-c .cp-card-reject-banner:hover {
  background: color-mix(in oklab, #ef4444 22%, var(--surface));
  border-color: color-mix(in oklab, #ef4444 58%, transparent);
}

.ds-c .cp-reject-banner-lbl {
  flex-shrink: 0;
  font-weight: 700;
  color: #f87171;
}

.ds-c .cp-reject-banner-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
}

.ds-c .cp-reject-banner-more {
  flex-shrink: 0;
  font-weight: 600;
  color: #f87171;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 审核驳回详情微光弹窗 */
.ds-c .cp-reject-feedback-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ds-c .cp-reject-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  background: color-mix(in oklab, #ef4444 14%, var(--surface));
  border: 1px solid color-mix(in oklab, #ef4444 35%, transparent);
}

.ds-c .cp-reject-status-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13.5px;
  color: #f87171;
}

.ds-c .cp-reject-reason-body {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--fill);
  border: 1px solid var(--surface-edge);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
}

.ds-c .cp-reject-tip {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* 第二层：统一参数矩阵面板 (无边框轻量底板，彻底减少“框套框”视觉噪音) */
.ds-c .cp-specs-panel {
  background: color-mix(in oklab, var(--fill) 48%, transparent);
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 顶部黄色高亮同行区（先机、汇能、团魂(模式2)、反制：全端包括手机端始终稳排在同一行） */
.ds-c .cp-specs-hl-row {
  display: grid;
  grid-template-columns: repeat(var(--hl-cols, 3), minmax(0, 1fr));
  gap: 4px 8px;
  align-items: end;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--surface-edge);
}

.ds-c .cp-specs-hl-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.ds-c .cp-spec-hl-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ds-c .cp-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 5px 8px;
  align-items: end;
}

.ds-c .cp-spec-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ds-c .cp-spec-cell.is-wide {
  grid-column: span 2;
}

.ds-c .cp-spec-lbl {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
  line-height: 1.2;
}

.ds-c .cp-spec-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-c .cp-spec-cell .cp-spec-val {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
}

.ds-c .cp-spec-val.is-acc {
  color: var(--acc);
}

.ds-c .cp-specs-extra {
  padding-top: 5px;
  border-top: 1px dashed var(--surface-edge);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ds-c .cp-spec-extra-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.4;
}

.ds-c .cp-spec-extra-k {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  min-width: 26px;
}

.ds-c .cp-spec-extra-v {
  color: var(--ink-2);
  font-weight: 500;
  word-break: break-word;
  min-width: 0;
}

.ds-c .cp-spec-extra-v.is-acc {
  color: var(--acc-ink, var(--acc));
  font-weight: 600;
}

/* 方案备注区：纯透明无底盒左竖条引导，消除面板内部套娃方块感 */
.ds-c .cp-card-note-box {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 2px 0 2px 8px;
  border-radius: 0;
  background: transparent;
  border: none;
  border-left: 2px solid color-mix(in oklab, var(--acc) 55%, transparent);
  font-size: 11.5px;
  line-height: 1.45;
}

.ds-c .cp-note-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--acc-ink, var(--acc));
  background: color-mix(in oklab, var(--acc) 16%, transparent);
  padding: 1px 6px;
  border-radius: 5px;
  margin-top: 1px;
}

.ds-c .cp-note-text {
  flex: 1;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.ds-c .cp-modal-textarea {
  resize: vertical;
  min-height: 68px;
  max-height: 160px;
  line-height: 1.5;
  padding-top: 8px;
  padding-bottom: 8px;
}

.ds-c .cp-setting-switch-row.is-disabled {
  opacity: 0.65;
  pointer-events: none;
}

/* 第三层：卡片底栏交互区 */
.ds-c .cp-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--surface-edge);
}

.ds-c .cp-foot-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ds-c .cp-vote-btn {
  position: relative;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-sm, 8px);
  background-color: var(--surface);
  background-image: none;
  border: 1px solid var(--surface-edge);
  box-shadow: inset 0 1px 0 var(--surface-rim);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.ds-c .cp-vote-btn:active:not(.is-author) {
  transform: scale(.94);
}

.ds-c .cp-vote-ico-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: none;
}

.ds-c .cp-vote-btn .ico {
  width: 14px;
  height: 14px;
  transform-origin: center;
}

.ds-c .cp-vote-btn.is-bursting .cp-vote-ico-wrap .ico {
  animation: cpVotePop .38s cubic-bezier(.34, 1.56, .64, 1);
}

.ds-c .cp-vote-btn.is-unvoting .cp-vote-ico-wrap .ico {
  animation: cpVoteUnpop .24s cubic-bezier(.22, 1, .36, 1);
}

@keyframes cpVotePop {
  0%   { transform: scale(1) rotate(0deg); }
  28%  { transform: scale(.74) rotate(8deg); }
  62%  { transform: scale(1.28) rotate(-12deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes cpVoteUnpop {
  0%   { transform: scale(1); }
  45%  { transform: scale(.8); }
  100% { transform: scale(1); }
}

.ds-c .cp-vote-spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--sz, 4px);
  height: var(--sz, 4px);
  border-radius: 50%;
  pointer-events: none;
  background: var(--sp-color, var(--acc));
  box-shadow: 0 0 6px color-mix(in oklab, var(--acc) 75%, transparent);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  animation: cpVoteSpark .46s cubic-bezier(.16, 1, .3, 1) var(--delay, 0ms) forwards;
}

@keyframes cpVoteSpark {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  22%  { opacity: 1; transform: translate(calc(-50% + var(--tx) * .38), calc(-50% + var(--ty) * .38)) scale(1.1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(.15); }
}

.ds-c .cp-vote-count {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1ch;
  height: 1.25em;
  line-height: 1.25em;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}

.ds-c .cp-vote-num-cur {
  display: inline-block;
  line-height: 1.25em;
}

.ds-c .cp-vote-roll {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.25em;
  line-height: 1.25em;
}

.ds-c .cp-vote-roll-old {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ds-c .cp-vote-roll-new {
  display: inline-block;
}

.ds-c .cp-vote-roll[data-dir="up"] .cp-vote-roll-old {
  animation: cpCountOutUp .22s cubic-bezier(.22, 1, .36, 1) forwards;
}
.ds-c .cp-vote-roll[data-dir="up"] .cp-vote-roll-new {
  animation: cpCountInUp .22s cubic-bezier(.22, 1, .36, 1) forwards;
}
.ds-c .cp-vote-roll[data-dir="down"] .cp-vote-roll-old {
  animation: cpCountOutDown .22s cubic-bezier(.22, 1, .36, 1) forwards;
}
.ds-c .cp-vote-roll[data-dir="down"] .cp-vote-roll-new {
  animation: cpCountInDown .22s cubic-bezier(.22, 1, .36, 1) forwards;
}

@keyframes cpCountOutUp {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to   { opacity: 0; transform: translate3d(0, -100%, 0); }
}
@keyframes cpCountInUp {
  from { opacity: .25; transform: translate3d(0, 100%, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes cpCountOutDown {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to   { opacity: 0; transform: translate3d(0, 100%, 0); }
}
@keyframes cpCountInDown {
  from { opacity: .25; transform: translate3d(0, -100%, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.ds-c .cp-vote-btn:hover {
  color: var(--ink);
  background-color: color-mix(in oklab, var(--acc) 12%, var(--surface));
  border-color: color-mix(in oklab, var(--acc) 40%, var(--surface-edge));
}

.ds-c .cp-vote-btn.is-voted {
  color: #ef4444;
  background-color: color-mix(in oklab, #ef4444 14%, var(--surface));
  border-color: color-mix(in oklab, #ef4444 38%, transparent);
}

.ds-c .cp-vote-btn.is-author {
  opacity: 0.65;
  cursor: not-allowed;
}

.ds-c .cp-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ds-c .cp-del-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background-color: color-mix(in oklab, var(--ink) 9%, transparent);
  border: 1px solid color-mix(in oklab, var(--ink) 14%, transparent);
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.ds-c .cp-del-btn .ico {
  width: 14px;
  height: 14px;
}

.ds-c .cp-del-btn:hover {
  color: var(--warn);
  background-color: var(--warn-soft);
}

/* 编辑按钮：与删除按钮同规格图标按钮，悬停走宿主强调色（不写死纯色） */
.ds-c .cp-edit-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background-color: color-mix(in oklab, var(--ink) 9%, transparent);
  border: 1px solid color-mix(in oklab, var(--ink) 14%, transparent);
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.ds-c .cp-edit-btn .ico {
  width: 14px;
  height: 14px;
}

.ds-c .cp-edit-btn:hover {
  color: var(--acc-ink);
  background-color: var(--acc-soft);
}

/* 上传按钮：与编辑/删除同规格图标按钮，悬停走宿主通过色 --pass */
.ds-c .cp-upload-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background-color: color-mix(in oklab, var(--ink) 9%, transparent);
  border: 1px solid color-mix(in oklab, var(--ink) 14%, transparent);
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.ds-c .cp-upload-btn .ico {
  width: 14px;
  height: 14px;
}

.ds-c .cp-upload-btn:hover {
  color: var(--pass);
  background-color: var(--pass-soft);
}

/* ==========================================================================
   站长批注（仅方案提交人可见）
   复用宿主 .card 的玻璃底色、--surface-rim 内描边与 --r-md 圆角，不写死纯色
   ========================================================================== */
.ds-c .cp-anno-wrap {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md, 10px);
  background: color-mix(in oklab, var(--acc) 6%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--acc) 22%, transparent);
  box-shadow: inset 0 1px 0 var(--surface-rim);
}

.ds-c .cp-anno-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--acc-ink);
}

.ds-c .cp-anno-item {
  padding-left: 10px;
  margin-bottom: 10px;
  border-left: 2px solid color-mix(in oklab, var(--acc) 45%, transparent);
}

.ds-c .cp-anno-item:last-child {
  margin-bottom: 0;
}

.ds-c .cp-anno-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--ink-3);
}

.ds-c .cp-anno-meta b {
  color: var(--ink-2);
  font-weight: 700;
}

.ds-c .cp-anno-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink);
  word-break: break-word;
}

.ds-c .cp-anno-replies {
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid var(--sep);
}

.ds-c .cp-anno-replies .cp-anno-text {
  font-size: 12px;
  color: var(--ink-2);
}

.ds-c .cp-anno-form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.ds-c .cp-anno-input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  background: var(--fill);
  border: 1px solid var(--sep);
  color: var(--ink);
  font-family: inherit;
}

.ds-c .cp-anno-input:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--acc) 55%, transparent);
}

.ds-c .cp-anno-send {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background-color: color-mix(in oklab, var(--acc) 20%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--acc) 60%, transparent);
  box-shadow: inset 0 1px 0 var(--surface-rim);
  cursor: pointer;
}

.ds-c .cp-anno-send:hover {
  background-color: color-mix(in oklab, var(--acc) 32%, var(--surface));
}

@media (max-width: 640px) {
  .ds-c .cp-anno-wrap { padding: 9px 10px; }
  .ds-c .cp-anno-form { flex-wrap: wrap; }
  .ds-c .cp-anno-send { flex: 0 0 auto; }
}

.ds-c .cp-apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-sm, 8px);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background-color: color-mix(in oklab, var(--acc) 20%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--acc) 60%, transparent);
  box-shadow: inset 0 1px 0 var(--surface-rim);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.ds-c .cp-apply-btn .ico {
  width: 13px;
  height: 13px;
  color: var(--acc);
}

.ds-c .cp-apply-btn:hover {
  background-color: color-mix(in oklab, var(--acc) 30%, var(--surface));
  border-color: var(--acc);
  transform: translateY(-1px);
}

.ds-c .cp-apply-btn.is-applied {
  background-color: color-mix(in oklab, #10b981 20%, var(--surface));
  border-color: color-mix(in oklab, #10b981 60%, transparent);
  color: #34d399;
}

.ds-c .cp-apply-btn.is-applied .ico {
  color: #34d399;
}

.ds-c .cp-apply-btn.is-disabled,
.ds-c .cp-apply-btn[disabled] {
  background-color: var(--fill);
  border-color: var(--surface-edge);
  color: var(--ink-3);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.78;
}

.ds-c .cp-apply-btn.is-disabled:hover,
.ds-c .cp-apply-btn[disabled]:hover {
  transform: none;
  background-color: var(--fill);
  border-color: var(--surface-edge);
}

/* 空状态占位箱 */
.ds-c .cp-empty-box {
  grid-column: 1 / -1;
  padding: 36px 16px;
  text-align: center;
  background-color: var(--surface);
  border: 1px dashed var(--surface-edge);
  border-radius: var(--r-md, 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: cpRiseIn .24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ds-c .cp-empty-icon {
  width: 44px;
  height: 44px;
  color: var(--ink-3);
  opacity: 0.6;
}

.ds-c .cp-empty-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.ds-c .cp-empty-desc {
  font-size: 12.5px;
  color: var(--ink-2);
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 6px;
}

/* ==========================================================================
   4. 保存配装弹窗 (Modal)
   ========================================================================== */
body.cp-modal-locked {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

.cp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overscroll-behavior: contain;
  animation: cpFadeIn .2s ease;
}

@keyframes cpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cp-modal-dialog {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--r-lg, 16px);
  padding: 20px;
  animation: cpScaleIn .22s cubic-bezier(.2, .8, .2, 1);
}

@keyframes cpScaleIn {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: none; }
}

.cp-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cp-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.cp-modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink) !important;
  background: var(--fill) !important;
  border: 1px solid var(--surface-edge) !important;
  transition: background-color .15s ease, border-color .15s ease;
}

.cp-modal-close:hover {
  background: var(--fill-hover, rgba(255, 255, 255, .12)) !important;
  border-color: var(--acc) !important;
}

.cp-modal-close .ico {
  width: 16px;
  height: 16px;
}

/* 所有弹窗关闭按钮统一为正圆：压过 .ds-c .select-btn（height:46px / width:100% / 两端对齐）的覆盖 */
.ds-c .cp-modal-close,
.ds-c .select-btn.cp-modal-close {
  flex: none;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  gap: 0;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 var(--surface-rim);
}

.cp-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cp-summary-bar {
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--fill);
  padding: 10px 12px;
  border-radius: var(--r-sm, 10px);
  border: 1px solid var(--surface-edge);
}

.cp-summary-val {
  color: var(--acc);
  font-weight: 600;
}

.cp-form-group {
  margin-bottom: 0 !important;
}

.cp-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cp-input-count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
}

.cp-input-count.is-limit {
  color: var(--warn);
}

.cp-check-anon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}

/* 规范开关行组件：100% 对齐 UI-SPEC 规范 */
.ds-c .cp-setting-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--r-md, 12px);
  background: var(--fill);
  border: 1px solid var(--surface-edge);
  transition: background-color .2s, border-color .2s;
}

.ds-c .cp-setting-switch-row:hover {
  background-color: var(--fill-hover);
}

.ds-c .cp-setting-switch-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ds-c .cp-setting-switch-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.ds-c .cp-setting-switch-desc {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
}

.ds-c .cp-switch-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.ds-c .cp-switch-label-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

/* 社区方案上传配置容器 */
.ds-c .cp-community-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: cpSlideDownFade .2s ease-out;
}

/* 国服顶尖申请与双截图凭证卡片 */
.ds-c .cp-pro-apply-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md, 12px);
  background: color-mix(in oklab, #ffd700 4%, var(--surface));
  border: 1px solid color-mix(in oklab, #ffd700 30%, var(--surface-edge));
  box-shadow: inset 0 1px 0 var(--surface-rim);
  animation: cpSlideDownFade .22s ease-out;
}

@keyframes cpSlideDownFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cpRiseIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ds-c .cp-pro-apply-badge-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-c .cp-proof-alert-card {
  padding: 10px 12px;
  border-radius: var(--r-sm, 8px);
  background: rgba(229, 161, 75, 0.08);
  border: 1px solid rgba(229, 161, 75, 0.25);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}

.ds-c .cp-proof-alert-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--warn, #e5a14b);
  margin-bottom: 4px;
}

.ds-c .cp-proof-alert-list {
  margin: 0;
  padding-left: 18px;
}

.ds-c .cp-proof-alert-list li + li {
  margin-top: 3px;
}

.ds-c .cp-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 600px) {
  .ds-c .cp-proof-grid {
    grid-template-columns: 1fr;
  }
}

.ds-c .cp-proof-card {
  position: relative;
  border-radius: var(--r-sm, 10px);
  border: 1.5px dashed var(--surface-edge);
  background: var(--fill);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
  min-height: 120px;
  justify-content: center;
}

.ds-c .cp-proof-card:hover {
  border-color: var(--acc);
  background: var(--fill-hover);
}

.ds-c .cp-proof-card.has-file {
  border-style: solid;
  border-color: var(--pass, #4cd964);
  background: color-mix(in oklab, var(--pass) 6%, var(--fill));
  padding: 8px;
}

.ds-c .cp-proof-card-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--raise);
  color: var(--acc);
  border: 1px solid var(--surface-edge);
  margin-bottom: 6px;
}

.ds-c .cp-proof-thumb-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ds-c .cp-proof-thumb {
  max-width: 100%;
  max-height: 100px;
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ds-c .cp-proof-btn-reupload {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--raise);
  color: var(--ink-2);
  border: 1px solid var(--surface-edge);
  cursor: pointer;
}

.ds-c .cp-proof-btn-reupload:hover {
  color: var(--ink);
  background: var(--fill-hover);
}

.ds-c .cp-proof-card-desc {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.35;
  margin-top: 4px;
}

.ds-c .cp-proof-file-input {
  display: none;
}

.cp-modal-input {
  height: 42px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.cp-links-input-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cp-link-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-link-input-wrap.is-valid .cp-modal-input {
  border-color: color-mix(in oklab, #10b981 55%, var(--surface-edge));
}

.cp-link-input-wrap.is-error .cp-modal-input {
  border-color: var(--fail, #ff4757);
  box-shadow: 0 0 0 2px rgba(255, 71, 87, .16);
}

.cp-link-parse-msg {
  padding-left: 30px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--ink-3);
  min-height: 0;
}

.cp-link-parse-msg:empty {
  display: none;
}

.cp-link-input-wrap.is-valid .cp-link-parse-msg {
  color: #10b981;
}

.cp-link-input-wrap.is-error .cp-link-parse-msg {
  color: var(--fail, #ff4757);
}

.cp-link-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cp-link-idx {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cp-turnstile-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--surface-edge);
  background: var(--fill);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.cp-turnstile-box.is-error {
  border-color: var(--fail, #ff4757);
  box-shadow: 0 0 0 2px rgba(255, 71, 87, .16);
}

.cp-turnstile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
}

.cp-turnstile-title {
  font-weight: 600;
  color: var(--ink);
}

.cp-turnstile-status {
  font-size: 11.5px;
  color: var(--ink-3);
}

.cp-turnstile-status.is-ok {
  color: var(--ok, #2ed573);
  font-weight: 600;
}

.cp-turnstile-status.is-err {
  color: var(--fail, #ff4757);
}

.cp-turnstile-widget-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 65px;
  overflow-x: auto;
}

.cp-turnstile-retry {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--surface-edge);
  background: transparent;
  color: var(--acc);
  font-size: 11.5px;
  cursor: pointer;
}

.cp-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--surface-edge);
}

/* 全站公告弹窗专属排版 */
.cp-ann-dialog {
  max-width: 540px;
  border: 1px solid var(--surface-edge);
}

.cp-ann-dialog.is-warn {
  border-color: color-mix(in oklab, var(--warn, #e5a14b) 45%, var(--surface-edge));
}

.cp-ann-dialog.is-success {
  border-color: color-mix(in oklab, #10b981 45%, var(--surface-edge));
}

.cp-ann-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.cp-ann-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
  background: color-mix(in oklab, var(--acc) 16%, transparent);
  color: var(--acc);
  border: 1px solid color-mix(in oklab, var(--acc) 35%, transparent);
}

.cp-ann-level-pill .ico {
  width: 13px;
  height: 13px;
}

.cp-ann-level-pill.is-warn {
  background: color-mix(in oklab, var(--warn, #e5a14b) 18%, transparent);
  color: var(--warn, #e5a14b);
  border-color: color-mix(in oklab, var(--warn, #e5a14b) 42%, transparent);
}

.cp-ann-level-pill.is-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.38);
}

.ds-c.light-mode .cp-ann-level-pill.is-success {
  color: #047857;
}

.cp-ann-body-card {
  padding: 14px 16px;
  border-radius: var(--r-sm, 10px);
  background: var(--fill, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--surface-edge);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.72;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 48vh;
  overflow-y: auto;
}

.ds-c.light-mode .cp-ann-body-card {
  background: rgba(15, 23, 42, 0.04);
}

.cp-ann-footer {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.cp-ann-footer-left {
  display: flex;
  align-items: center;
}

.cp-ann-dismiss-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}

.cp-ann-dismiss-label input {
  width: 15px;
  height: 15px;
  accent-color: var(--acc);
  cursor: pointer;
}

.cp-ann-force-hint {
  font-size: 12px;
  color: var(--ink-2);
}

.cp-ann-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.cp-ann-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.cp-ann-cta-btn .ico {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   5. 多端响应式适配 (UI 适配与健壮性)
   ========================================================================== */
/* 移动端 (≤640px) */
@media (max-width: 640px) {
  .ds-c .cp-plans-card .cp-card-title {
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }

  .ds-c .cp-plans-card .cp-title-left {
    order: 1;
    min-width: 0;
    flex: 1 1 auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 5px;
    overflow: hidden;
  }

  .ds-c .cp-plans-card .cp-title-text {
    flex: none;
    font-size: 14px;
    white-space: nowrap;
  }

  .ds-c .cp-plans-card .cp-car-badge {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 7px;
    font-size: 10.5px;
  }

  .ds-c .cp-plans-card .cp-actions-bar {
    order: 2;
    flex: none;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-left: 0;
    flex-wrap: nowrap;
  }

  .ds-c .cp-plans-card .cp-fold-btn {
    order: 3;
    margin-left: 0 !important;
    flex: none !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    border-radius: var(--r-sm, 10px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .ds-c .cp-plans-card .cp-actions-bar .cp-btn-save,
  .ds-c .cp-plans-card .cp-actions-bar .cp-btn-undo,
  .ds-c .cp-plans-card .cp-actions-bar .cp-icon-btn {
    flex: none !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: var(--r-sm, 10px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .ds-c .cp-plans-card .cp-actions-bar .cp-btn .cp-btn-label {
    display: none !important;
  }

  .ds-c .cp-controls-bar {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 10px;
    padding-bottom: 11px;
    margin-bottom: 12px;
  }

  .ds-c .cp-ctrl-group {
    flex-wrap: nowrap;
    min-width: 0;
    gap: 0;
  }

  .ds-c .cp-controls-hint {
    display: none;
  }

  .ds-c .cp-seg-track {
    flex-wrap: nowrap;
  }

  .ds-c .cp-seg-btn {
    padding: 4px 7.5px;
    font-size: 11px;
  }

  .ds-c .cp-sec-list,
  .ds-c .cp-card-list {
    display: flex;
    flex-direction: column;
  }

  .ds-c .cp-section {
    padding: 0;
  }

  .ds-c .cp-sec-icon-box,
  .ds-c .cp-sec-pro-icon {
    width: 24px;
    height: 24px;
  }

  .ds-c .cp-sec-list {
    --cp-tree-pad: 22px;
    gap: 9px;
    margin-left: 0;
  }

  .cp-modal-dialog {
    max-height: 85vh;
    padding: 16px;
  }
}

/* ==========================================================================
   超窄屏与侧边栏嵌入场景深度适配 (≤480px / 侧边栏 Webview)
   ========================================================================== */
@media (max-width: 480px) {
  .ds-c .cp-scroll-viewport {
    max-height: 860px;
  }

  .ds-c .cp-card-item {
    padding: 9px 10px;
    gap: 6px;
  }

  .ds-c .cp-specs-panel {
    padding: 7px 8px;
  }

  .ds-c .cp-meta-time {
    margin-left: 0;
  }

  .ds-c .cp-author-links {
    margin-left: 0;
  }

  .cp-modal-dialog {
    width: 95% !important;
    max-width: 95% !important;
    max-height: 90vh !important;
    padding: 12px 10px !important;
    overflow-y: auto !important;
  }

  .ds-c .cp-proof-grid {
    grid-template-columns: 1fr !important;
  }

  .ds-c .cp-specs-hl-row {
    gap: 4px 6px;
  }

  .ds-c .cp-specs-hl-row .cp-spec-lbl {
    font-size: 10.5px;
  }

  .ds-c .cp-specs-hl-row .cp-spec-val {
    font-size: 13px;
  }

  .ds-c .cp-card-note-box {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 374px) {
  .ds-c .cp-seg-btn {
    padding: 4px 6px;
    font-size: 10.5px;
  }
}

body.ds-c.performance-mode .cp-vote-btn,
body.ds-c.performance-mode .cp-vote-ico-wrap .ico,
body.ds-c.performance-mode .cp-vote-spark,
body.ds-c.performance-mode .cp-vote-roll-old,
body.ds-c.performance-mode .cp-vote-roll-new,
body.ds-c.performance-mode .cp-player-id,
body.ds-c.performance-mode .cp-copy-icon .ico,
body.ds-c.performance-mode .cp-btn-save.is-success .cp-save-ok-ico .ico,
body.ds-c.performance-mode .cp-section,
body.ds-c.performance-mode .cp-empty-box,
body.ds-c.performance-mode .cp-community-section,
body.ds-c.performance-mode .cp-pro-apply-box {
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ds-c .cp-vote-btn,
  .ds-c .cp-vote-ico-wrap .ico,
  .ds-c .cp-vote-spark,
  .ds-c .cp-vote-roll-old,
  .ds-c .cp-vote-roll-new,
  .ds-c .cp-player-id,
  .ds-c .cp-copy-icon .ico,
  .ds-c .cp-btn-save.is-success .cp-save-ok-ico .ico,
  .ds-c .cp-section,
  .ds-c .cp-empty-box,
  .ds-c .cp-community-section,
  .ds-c .cp-pro-apply-box {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================
   官方 AI 推荐补充微调（全面复用 .cp-card-item / .cp-specs-* / .cp-apply-btn）
   ========================================== */
.ds-c .cp-badge-official {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.32);
}

.ds-c.light-mode .cp-badge-official {
  color: #0369a1;
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(2, 132, 199, 0.3);
}

.ds-c .cp-badge-official .ico {
  width: 12px;
  height: 12px;
}

.ds-c .cp-off-specs-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 6px;
}

.ds-c .cp-off-chip-cell {
  position: relative;
  overflow: hidden;
  padding: 6px 8px;
  transition: border-color 0.2s ease, transform 0.18s ease;
}

.ds-c .cp-off-chip-cell:hover {
  border-color: color-mix(in oklab, var(--cp-tree-color) 45%, transparent);
  transform: translateY(-1px);
}

.ds-c .cp-off-chip-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0.03));
  pointer-events: none;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ds-c.light-mode .cp-off-chip-progress {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.14), rgba(2, 132, 199, 0.03));
}

.ds-c .cp-off-chip-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.ds-c .cp-off-pv-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: none;
}

.ds-c .cp-off-pv-chip .pv-chip {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ds-c .cp-off-pv-chip .pv-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.ds-c .cp-off-chip-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
  flex: none;
}

.ds-c .cp-off-chip-fallback {
  font-size: 11px;
  font-weight: 700;
  flex: none;
}

.ds-c .cp-off-chip-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.ds-c .cp-off-chip-score {
  flex: none;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink2);
}

@media (max-width: 760px) {
  .ds-c .cp-off-specs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ds-c .cp-official-item .cp-apply-btn {
    flex: none;
    white-space: nowrap;
  }
}

/* ==========================================================================
   顶部通知入口 + 通知中心
   复用宿主 .nav-btn 胶囊规格、.cp-ann-dialog 公告弹窗排版与 --pass/--fail/--warn 语义色
   ========================================================================== */
.ds-c .notif-toggle-wrapper {
  display: inline-flex;
  align-items: center;
}

.ds-c .notif-toggle-wrapper[hidden] {
  display: none !important;
}

.ds-c #notifBtn {
  position: relative;
  width: 38px;
  padding: 0;
  justify-content: center;
}

.ds-c .notif-ico-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ds-c .notif-ico-wrap .ico {
  width: 18px;
  height: 18px;
}

.ds-c .notif-dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fail);
  box-shadow: 0 0 0 2px var(--cell);
}

.ds-c .notif-dot[hidden] {
  display: none;
}

/* 通知列表（弹窗内与收信箱共用） */
.ds-c .cp-notif-list {
  display: block;
}

/* 与 .cp-card-note-box 一致：透明底、无圆角、左侧一条细直线，不用彩色竖条 */
.ds-c .cp-notif-item {
  display: block;
  padding: 1px 0 1px 9px;
  border: none;
  border-radius: 0;
  background: transparent;
  border-left: 2px solid color-mix(in oklab, var(--acc) 42%, transparent);
}

.ds-c .cp-notif-item + .cp-notif-item {
  margin-top: 12px;
}

.ds-c .cp-notif-body {
  flex: 1;
  min-width: 0;
}

.ds-c .cp-notif-title {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 2px;
  font-size: 11.5px;
  line-height: 1.45;
}

.ds-c .cp-notif-title b {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.ds-c .cp-notif-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
  margin-top: 1px;
}

.ds-c .cp-notif-tag.is-approved { color: var(--pass); background: var(--pass-soft); }
.ds-c .cp-notif-tag.is-rejected { color: var(--fail); background: var(--fail-soft); }
.ds-c .cp-notif-tag.is-annotation { color: var(--info-ink); background: var(--info-soft); }
.ds-c .cp-notif-tag.is-removed { color: var(--warn); background: var(--warn-soft); }

.ds-c .cp-notif-text {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-2);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ds-c .cp-notif-time {
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 3px;
}

.ds-c .cp-notif-empty {
  padding: 26px 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}

@media (max-width: 640px) {
  .ds-c #notifBtn { width: 34px; }
  .ds-c .cp-notif-item { padding: 10px; }
}

/* ==========================================================================
   编辑态顶部提示条：复用宿主 --surface / --surface-rim / --acc / --r-md
   ========================================================================== */
.ds-c .cp-editing-bar,
.cp-editing-bar {
  position: fixed;
  left: 50%;
  top: 10px;
  z-index: 2147482500;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 14px;
  width: -moz-max-content;
  width: max-content;
  max-width: calc(100vw - 20px);
  padding: 9px 12px;
  border-radius: var(--r-md, 10px);
  background: var(--surface-2, var(--surface));
  border: 1px solid color-mix(in oklab, var(--acc) 45%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .32), inset 0 1px 0 var(--surface-rim);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translate(-50%, -14px);
  opacity: 0;
  transition: opacity .22s var(--ease-out), transform .26s var(--ease-spring);
}

.cp-editing-bar.is-show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.cp-eb-ico {
  display: inline-flex;
  color: var(--acc-ink, var(--acc));
  flex-shrink: 0;
}

.cp-eb-ico .ico {
  width: 16px;
  height: 16px;
}

/* 文字区保底宽度，超出走省略号；min-width:0 会让 flex 把它压成 0，这里不能用 */
.cp-eb-text {
  display: block;
  flex: 0 1 auto;
  min-width: 5.5em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12.5px;
  line-height: 1.4;
}

.cp-eb-text b {
  margin-right: 6px;
}

.cp-eb-text b {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}


.cp-eb-text span {
  display: inline-block;
  vertical-align: baseline;
  color: var(--ink-2);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(22ch, 30vw);
}

.cp-eb-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}

.cp-eb-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-sm, 8px);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--sep);
  background: var(--fill);
  color: var(--ink-2);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.cp-eb-btn.is-ghost:hover {
  background: var(--fill-hover, var(--fill));
  color: var(--ink);
}

.cp-eb-btn.is-primary {
  color: var(--ink);
  background: color-mix(in oklab, var(--acc) 20%, var(--surface));
  border-color: color-mix(in oklab, var(--acc) 60%, transparent);
}

.cp-eb-btn.is-primary:hover {
  background: color-mix(in oklab, var(--acc) 30%, var(--surface));
}

@media (max-width: 640px) {
  .cp-editing-bar { top: 8px; padding: 8px 10px; gap: 8px; }
  .cp-eb-text span { display: none; }
  .cp-eb-btn { padding: 0 10px; }
}

