/* ============================================================================
   Idmanos 后台 UI 设计系统（统一字体/字号/间距/组件尺寸）
   仅用于后台页面；不影响前台站点。
   —— 所有数值集中在这里，其它样式只引用变量，避免各页面各写一套。
   ============================================================================ */

:root {
  /* ---- 颜色 ---- */
  --ui-bg: #f7f7f6;
  --ui-sheet: #ffffff;
  --ui-sheet-2: #fbfbfa;
  --ui-ink: #141414;
  --ui-ink-2: #3d3d3d;
  --ui-ink-3: #6b6b6b;
  --ui-muted: #8e8e8e;
  --ui-faint: #a9a9a9;
  --ui-line: #e6e5e3;
  --ui-line-soft: #f1f0ee;
  --ui-line-strong: #d5d4d1;
  --ui-accent: #141414;
  --ui-accent-ink: #ffffff;
  --ui-focus: #141414;
  --ui-ok: #1f7a4d;
  --ui-warn: #8a6d1f;
  --ui-danger: #b3261e;

  /* ---- 字体 ---- */
  --ui-font: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --ui-font-mono: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;

  /* ---- 字号阶梯（桌面）---- */
  --ui-fs-display: 26px;   /* 页面大标题 */
  --ui-fs-h1: 19px;        /* 区块标题 */
  --ui-fs-h2: 15px;        /* 面板标题 */
  --ui-fs-h3: 13px;        /* 小标题 / 分组标签 */
  --ui-fs-body: 14px;      /* 正文 */
  --ui-fs-sm: 13px;        /* 次要正文 / 控件文字 */
  --ui-fs-xs: 12px;        /* 辅助说明 */
  --ui-fs-2xs: 11px;       /* 角标 / 尺寸 */

  --ui-lh-tight: 1.3;
  --ui-lh: 1.6;
  --ui-lh-loose: 1.75;

  --ui-fw-light: 300;
  --ui-fw-reg: 400;
  --ui-fw-med: 500;
  --ui-fw-semi: 600;
  --ui-fw-bold: 700;

  /* ---- 间距阶梯（4 的倍数）---- */
  --ui-s1: 4px;
  --ui-s2: 8px;
  --ui-s3: 12px;
  --ui-s4: 16px;
  --ui-s5: 20px;
  --ui-s6: 24px;
  --ui-s7: 32px;
  --ui-s8: 40px;

  /* ---- 圆角 ---- */
  --ui-r-sm: 8px;
  --ui-r-md: 10px;
  --ui-r-lg: 14px;
  --ui-r-pill: 999px;

  /* ---- 组件尺寸（桌面基准，保证可点击）---- */
  --ui-ctl-h: 40px;        /* 输入框 / 下拉框 / 按钮标准高度 */
  --ui-ctl-h-sm: 34px;     /* 小号控件 */
  --ui-ctl-h-lg: 46px;     /* 主按钮 */
  --ui-ctl-px: 14px;       /* 控件左右内边距 */
  --ui-tap: 44px;          /* 最小触控尺寸 */
}

/* 字体引入：Inter（可变字重），失败回落系统字体 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: local('Inter');
}

/* ============================================================================
   基础
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body.adm {
  margin: 0;
  background: var(--ui-bg);
  color: var(--ui-ink);
  font-family: var(--ui-font);
  font-size: var(--ui-fs-body);
  font-weight: var(--ui-fw-reg);
  line-height: var(--ui-lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* 键盘可访问性 */
:focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 2px;
  border-radius: var(--ui-r-sm);
}

/* ============================================================================
   文字角色
   ============================================================================ */
.ui-title { font-size: var(--ui-fs-display); font-weight: var(--ui-fw-semi); letter-spacing: -.02em; line-height: var(--ui-lh-tight); margin: 0; }
.ui-h1 { font-size: var(--ui-fs-h1); font-weight: var(--ui-fw-semi); letter-spacing: -.01em; line-height: var(--ui-lh-tight); margin: 0; }
.ui-h2 { font-size: var(--ui-fs-h2); font-weight: var(--ui-fw-semi); line-height: var(--ui-lh-tight); margin: 0; }
.ui-h3 { font-size: var(--ui-fs-h3); font-weight: var(--ui-fw-semi); letter-spacing: .04em; text-transform: uppercase; color: var(--ui-ink-3); margin: 0; }
.ui-body { font-size: var(--ui-fs-body); line-height: var(--ui-lh); color: var(--ui-ink-2); }
.ui-sub { font-size: var(--ui-fs-sm); line-height: var(--ui-lh); color: var(--ui-ink-3); }
.ui-note { font-size: var(--ui-fs-xs); line-height: var(--ui-lh); color: var(--ui-muted); }

/* ============================================================================
   控件
   ============================================================================ */
.adm-input, .adm-select, .adm-textarea {
  width: 100%;
  min-height: var(--ui-ctl-h);
  padding: 0 var(--ui-ctl-px);
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-r-md);
  background: var(--ui-sheet);
  font-size: var(--ui-fs-sm);
  color: var(--ui-ink);
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.adm-textarea { padding: 10px var(--ui-ctl-px); min-height: 92px; resize: vertical; line-height: var(--ui-lh); }
.adm-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236b6b6b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}
.adm-input:hover, .adm-select:hover, .adm-textarea:hover { border-color: var(--ui-ink-3); }
.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
  border-color: var(--ui-focus);
  box-shadow: 0 0 0 3px rgba(20, 20, 20, .08);
}
.adm-input::placeholder, .adm-textarea::placeholder { color: var(--ui-faint); }

/* 数字输入窄版 */
.adm-input.is-num { width: 96px; min-width: 96px; text-align: center; font-variant-numeric: tabular-nums; }

/* 按钮 */
.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-s2);
  min-height: var(--ui-ctl-h);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--ui-r-pill);
  background: var(--ui-accent);
  color: var(--ui-accent-ink);
  font-size: var(--ui-fs-sm);
  font-weight: var(--ui-fw-med);
  white-space: nowrap;
  transition: opacity .16s, background .16s, border-color .16s, transform .1s;
}
.adm-btn:hover { opacity: .88; }
.adm-btn:active { transform: translateY(1px); }
.adm-btn.ghost { background: var(--ui-sheet); color: var(--ui-ink); border-color: var(--ui-line-strong); }
.adm-btn.ghost:hover { border-color: var(--ui-ink); opacity: 1; }
.adm-btn.quiet { background: transparent; border-color: transparent; color: var(--ui-ink-3); }
.adm-btn.quiet:hover { background: var(--ui-line-soft); color: var(--ui-ink); }
.adm-btn.sm { min-height: var(--ui-ctl-h-sm); padding: 0 13px; font-size: var(--ui-fs-xs); }
.adm-btn.lg { min-height: var(--ui-ctl-h-lg); padding: 0 24px; font-size: var(--ui-fs-body); }
.adm-btn.block { width: 100%; }
.adm-btn.danger { background: var(--ui-sheet); color: var(--ui-danger); border-color: #e8cdca; }
.adm-btn.danger:hover { background: #fdf5f4; opacity: 1; }
.adm-btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }

/* 滑块 */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: var(--ui-tap);
  background: transparent;
  cursor: pointer;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  /* 一整条衰减条：当前位置(pct)最黑最高，两侧逐渐变透明 */
  background:
    radial-gradient(120% 100% at var(--wp-pct, 50%) 50%,
      #141414 0%,
      rgba(20,20,20,.55) 28%,
      rgba(20,20,20,.16) 62%,
      rgba(20,20,20,0) 100%);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1px; height: 30px;
  margin-top: 0;
  border: 0;
  background: transparent;   /* 不要圆点：整条即进度条，凸起处=当前位置 */
  box-shadow: none;
  cursor: pointer;
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.08); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: radial-gradient(120% 100% at var(--wp-pct,50%) 50%, #141414 0%, rgba(20,20,20,.55) 28%, rgba(20,20,20,.16) 62%, rgba(20,20,20,0) 100%); }
input[type="range"]::-moz-range-thumb { width: 1px; height: 30px; border-radius: 0; background: transparent; border: 0; box-shadow: none; }

/* 复选框 */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--ui-line-strong);
  border-radius: 5px;
  background: var(--ui-sheet);
  cursor: pointer;
  flex: none;
  position: relative;
  transition: background .14s, border-color .14s;
}
input[type="checkbox"]:checked { background: var(--ui-ink); border-color: var(--ui-ink); }
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px; top: 2.5px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"]:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }

/* ============================================================================
   外壳 / 导航
   ============================================================================ */
.adm-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }

.adm-side {
  border-right: 1px solid var(--ui-line);
  background: var(--ui-sheet);
  padding: var(--ui-s5) var(--ui-s3);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.adm-side .brand { display: flex; align-items: center; gap: 9px; padding: 0 var(--ui-s2) var(--ui-s5); }
.adm-side .brand img { height: 18px; width: auto; }
.adm-side .brand em, .adm-side .brand span {
  font-style: normal; font-size: var(--ui-fs-2xs); letter-spacing: .16em;
  color: var(--ui-faint); font-weight: var(--ui-fw-med);
}
.adm-nav { display: flex; flex-direction: column; gap: 2px; }
.adm-nav button, .adm-nav a.adm-navlink {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: var(--ui-ctl-h); padding: 0 var(--ui-s3);
  border: 0; background: none; border-radius: var(--ui-r-md);
  font-size: var(--ui-fs-sm); color: var(--ui-ink-2); text-align: left;
  transition: background .16s, color .16s;
}
.adm-nav button:hover, .adm-nav a.adm-navlink:hover { background: var(--ui-line-soft); color: var(--ui-ink); }
.adm-nav button.on, .adm-nav a.adm-navlink.on { background: var(--ui-accent); color: var(--ui-accent-ink); }
.adm-nav .sep { height: 1px; background: var(--ui-line-soft); margin: var(--ui-s2) var(--ui-s2); }
.adm-nav .grp {
  font-size: var(--ui-fs-2xs); letter-spacing: .12em; color: var(--ui-faint);
  text-transform: uppercase; padding: var(--ui-s3) var(--ui-s3) var(--ui-s1);
  font-weight: var(--ui-fw-med);
}

.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ui-s4);
  padding: var(--ui-s3) var(--ui-s6); border-bottom: 1px solid var(--ui-line);
  background: rgba(247, 247, 246, .92);
  backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20;
  min-height: 64px;
}
.adm-top h2 { margin: 0; font-size: var(--ui-fs-h1); font-weight: var(--ui-fw-semi); letter-spacing: -.01em; }
.adm-top .who { display: flex; align-items: center; gap: var(--ui-s2); font-size: var(--ui-fs-xs); color: var(--ui-muted); }
.adm-body { padding: var(--ui-s5) var(--ui-s6) var(--ui-s8); }

/* ============================================================================
   面板 / 卡片
   ============================================================================ */
.adm-panel, .wp-panel {
  background: var(--ui-sheet);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-r-lg);
  padding: var(--ui-s4) var(--ui-s5);
  margin-bottom: var(--ui-s4);
  min-width: 0;
}
.adm-panel h3 { margin: 0 0 var(--ui-s3); font-size: var(--ui-fs-h3); font-weight: var(--ui-fw-semi); letter-spacing: .02em; }
.adm-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ui-s3); margin-bottom: var(--ui-s5); }
.adm-card { background: var(--ui-sheet); border: 1px solid var(--ui-line); border-radius: var(--ui-r-lg); padding: var(--ui-s4); min-width: 0; }
.adm-card .k { font-size: var(--ui-fs-2xs); letter-spacing: .08em; color: var(--ui-muted); text-transform: uppercase; margin-bottom: var(--ui-s2); font-weight: var(--ui-fw-med); }
.adm-card .v { font-size: 26px; font-weight: var(--ui-fw-semi); letter-spacing: -.02em; line-height: 1.15; }
.adm-card .s { font-size: var(--ui-fs-xs); color: var(--ui-faint); margin-top: 6px; }
.adm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ui-s4); }

.adm-tools { display: flex; align-items: center; gap: var(--ui-s2); margin-bottom: var(--ui-s3); flex-wrap: wrap; }
.adm-tools .grow { flex: 1; min-width: 180px; font-size: var(--ui-fs-xs); color: var(--ui-muted); line-height: var(--ui-lh); }

/* ============================================================================
   壁纸生成器布局
   ============================================================================ */
.wp-grid {
  display: grid;
  grid-template-columns: 348px minmax(0, 1fr);
  gap: var(--ui-s5);
  align-items: start;
}

/* ---- 左侧步骤 ---- */
.wp-side {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: var(--ui-s3);
  max-height: calc(100vh - 96px);
  overflow-y: auto; overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: none;
}
.wp-side::-webkit-scrollbar { width: 0; }

.wp-panel { padding: var(--ui-s4) var(--ui-s4) var(--ui-s3); }
.wp-panel h3 {
  display: flex; align-items: center; gap: var(--ui-s2);
  margin: 0 0 var(--ui-s4);
  font-size: var(--ui-fs-h2); font-weight: var(--ui-fw-semi);
  letter-spacing: -.005em; text-transform: none; color: var(--ui-ink);
  padding-bottom: var(--ui-s3);
  border-bottom: 1px solid var(--ui-line-soft);
}
.wp-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ui-ink); color: #fff;
  font-size: var(--ui-fs-xs); font-weight: var(--ui-fw-semi);
  flex: none; font-variant-numeric: tabular-nums;
}
.wp-panel.done .wp-step { background: var(--ui-ok); }

/* 字段：标签在上、控件在下（桌面），保证文字不被压缩 */
.wp-opt { display: block; margin-bottom: var(--ui-s4); }
.wp-opt:last-child { margin-bottom: 0; }
.wp-opt > label {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ui-s2);
  font-size: var(--ui-fs-sm); font-weight: var(--ui-fw-med); color: var(--ui-ink-2);
  margin-bottom: var(--ui-s2); line-height: var(--ui-lh-tight);
}
.wp-opt > label b {
  font-size: var(--ui-fs-xs); font-weight: var(--ui-fw-semi); color: var(--ui-ink);
  font-variant-numeric: tabular-nums;
  background: var(--ui-line-soft); border-radius: var(--ui-r-pill);
  padding: 2px 9px; min-width: 44px; text-align: center;
}
.wp-opt > .adm-select,
.wp-opt > .adm-input { width: 100%; }
.wp-opt > input[type="range"] { display: block; margin-top: -4px; }

/* 内联勾选：标签 + 开关同一行 */
.wp-opt.is-check { display: flex; align-items: center; justify-content: space-between; gap: var(--ui-s3); }
.wp-opt.is-check > label { margin: 0; flex: 1; }

/* 一行多个控件 */
.wp-row { display: flex; gap: var(--ui-s2); flex-wrap: wrap; align-items: center; margin-bottom: var(--ui-s3); }
.wp-row:last-child { margin-bottom: 0; }
.wp-row > .adm-btn { flex: 1 1 auto; min-width: 0; }
.wp-row > .adm-input, .wp-row > .adm-select { flex: 1 1 0; min-width: 0; width: auto; }
.wp-row > .wp-opt { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
.wp-row > .wp-opt > label { font-size: var(--ui-fs-xs); }

/* 颜色行 */
.wp-color-row { display: flex; align-items: center; gap: var(--ui-s2); }
.wp-color-chip {
  width: var(--ui-ctl-h); height: var(--ui-ctl-h); flex: none;
  border-radius: var(--ui-r-md); border: 1px solid var(--ui-line-strong);
  padding: 0; overflow: hidden; cursor: pointer; position: relative; background: #fff;
}
.wp-color-chip input[type=color] {
  position: absolute; inset: -8px; width: 160%; height: 160%;
  border: 0; padding: 0; cursor: pointer; background: none;
}
.wp-hex {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--ui-font-mono); font-size: var(--ui-fs-sm);
  text-transform: uppercase; letter-spacing: .02em;
}

/* 上传区 */
.wp-drop {
  border: 1.5px dashed var(--ui-line-strong); border-radius: var(--ui-r-lg);
  background: var(--ui-sheet-2);
  padding: var(--ui-s7) var(--ui-s4);
  text-align: center; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.wp-drop:hover, .wp-drop.over { border-color: var(--ui-ink); background: #f5f5f4; }
.wp-drop .big { font-size: var(--ui-fs-body); font-weight: var(--ui-fw-med); color: var(--ui-ink); margin-bottom: 6px; }
.wp-drop .sub { font-size: var(--ui-fs-xs); color: var(--ui-muted); line-height: var(--ui-lh); }
.wp-drop.has-file { border-style: solid; border-color: var(--ui-line); background: var(--ui-sheet); text-align: left; padding: var(--ui-s3); }
.wp-file { display: flex; align-items: center; gap: var(--ui-s3); }
.wp-file .pv { width: 52px; height: 52px; border-radius: var(--ui-r-sm); border: 1px solid var(--ui-line); object-fit: cover; background: #f4f4f4; flex: none; }
.wp-file .name { font-size: var(--ui-fs-sm); font-weight: var(--ui-fw-med); word-break: break-all; line-height: var(--ui-lh-tight); }
.wp-file .meta { font-size: var(--ui-fs-xs); color: var(--ui-faint); margin-top: 3px; }

/* 说明文字 */
.wp-note {
  font-size: var(--ui-fs-xs); color: var(--ui-muted); line-height: var(--ui-lh);
  margin-top: var(--ui-s3); padding: var(--ui-s2) var(--ui-s3);
  background: var(--ui-sheet-2); border-radius: var(--ui-r-sm);
  border: 1px solid var(--ui-line-soft);
}

/* 颜色小样 */
.wp-swatches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: var(--ui-s2); }
.wp-swatch { width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(0,0,0,.1); cursor: pointer; padding: 0; transition: transform .14s; }
.wp-swatch:hover { transform: translateY(-2px); }

/* ============================================================================
   设备预览区
   ============================================================================ */
.wp-devices {
  display: grid;
  /* 一行最多 3 个 */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ui-s5);
  align-items: stretch;
}
.wp-card {
  background: var(--ui-sheet); border: 1px solid var(--ui-line);
  border-radius: var(--ui-r-lg); padding: var(--ui-s3);
  display: flex; flex-direction: column; gap: var(--ui-s3); min-width: 0; height: 100%;
}
.wp-card.sel { border-color: var(--ui-ink); box-shadow: 0 0 0 1px var(--ui-ink); }
.wp-card-head { display: flex; align-items: center; gap: var(--ui-s2); min-height: 28px; }
.wp-card-head label { display: flex; align-items: center; gap: var(--ui-s2); font-size: var(--ui-fs-sm); font-weight: var(--ui-fw-med); min-width: 0; flex: 1; }
.wp-card-head label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-dim { font-size: var(--ui-fs-2xs); color: var(--ui-faint); margin-left: auto; white-space: nowrap; font-family: var(--ui-font-mono); }

.wp-stage-wrap {
  display: flex; align-items: center; justify-content: center;
  background: var(--ui-sheet-2); border-radius: var(--ui-r-md);
  padding: var(--ui-s3); overflow: visible; position: relative;
}
.wp-stage { position: relative; display: flex; align-items: center; justify-content: center; }
.wp-frame { display: block; cursor: grab; touch-action: none; border-radius: var(--ui-r-md); overflow: hidden; background: #fff; }
.wp-frame > svg { display: block; width: 100%; height: 100%; }
.wp-frame:active { cursor: grabbing; }
.wp-frame.watch, .wp-frame.avatar { border-radius: 22px; }
.wp-frame.avatar { border-radius: 50%; }
.wp-shell { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.wp-shell > svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* 卡片底栏 */
.wp-card-foot { display: flex; flex-direction: column; gap: var(--ui-s2); }
.wp-card-foot input[type="range"] { width: 100%; height: 34px; }
.wp-card-foot-title { font-size: var(--ui-fs-2xs); color: var(--ui-faint); letter-spacing: .04em; text-transform: uppercase; }
.wp-card-presets { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wp-card-presets select { flex: 1 1 0; min-width: 0; height: var(--ui-ctl-h-sm); min-height: var(--ui-ctl-h-sm); font-size: var(--ui-fs-xs); padding: 0 26px 0 10px; }
.wp-card-presets button { flex: 0 0 auto; min-height: var(--ui-ctl-h-sm); padding: 0 12px; font-size: var(--ui-fs-xs); }

/* 中线辅助线 */
.wp-guide { position: absolute; display: none; background: #ff3b30; opacity: .9; pointer-events: none; z-index: 6; }
.wp-guide-v { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-.5px); }
.wp-guide-h { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-.5px); }
.wp-guide.on { display: block; }

/* 吸色 */

/* ============================================================================
   步骤标签（小屏）
   ============================================================================ */
.wp-tabs { display: none; }

/* ============================================================================
   预设列表 / 进度 / 抽屉 / toast
   ============================================================================ */
.wp-myrow { display: flex; align-items: center; gap: var(--ui-s2); padding: var(--ui-s2) 0; border-bottom: 1px dashed var(--ui-line-soft); }
.wp-myrow:last-child { border-bottom: 0; }
.wp-myrow span { flex: 1; min-width: 0; font-size: var(--ui-fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-myrow-on span { font-weight: var(--ui-fw-semi); }

.wp-progress { position: fixed; inset: 0; background: rgba(247,247,246,.86); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 200; }
.wp-progress[hidden] { display: none !important; }
.wp-progress .box { background: var(--ui-sheet); border: 1px solid var(--ui-line); border-radius: var(--ui-r-lg); padding: var(--ui-s6) var(--ui-s7); text-align: center; min-width: 260px; }
.wp-progress .box .t { font-size: var(--ui-fs-sm); margin-bottom: var(--ui-s3); font-weight: var(--ui-fw-med); }
.wp-bar { height: 4px; background: var(--ui-line); border-radius: 2px; overflow: hidden; }
.wp-bar i { display: block; height: 100%; width: 0; background: var(--ui-ink); transition: width .2s; }

.adm-overlay { position: fixed; inset: 0; background: rgba(20,20,20,.3); opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 100; }
.adm-overlay.on { opacity: 1; pointer-events: auto; }
.adm-drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(600px, 100vw); background: var(--ui-sheet); border-left: 1px solid var(--ui-line); z-index: 101; transform: translateX(101%); transition: transform .26s cubic-bezier(.22,.61,.36,1); display: flex; flex-direction: column; }
.adm-drawer.on { transform: translateX(0); }
.adm-drawer header { display: flex; align-items: center; justify-content: space-between; padding: var(--ui-s4) var(--ui-s5); border-bottom: 1px solid var(--ui-line); }
.adm-drawer header h3 { margin: 0; font-size: var(--ui-fs-h2); font-weight: var(--ui-fw-semi); }
.adm-drawer .body { flex: 1; overflow-y: auto; padding: var(--ui-s5); }
.adm-drawer footer { display: flex; gap: var(--ui-s2); justify-content: flex-end; padding: var(--ui-s3) var(--ui-s5); border-top: 1px solid var(--ui-line); }
.adm-icon-btn { border: 0; background: none; font-size: 20px; color: var(--ui-muted); line-height: 1; padding: 6px 8px; border-radius: var(--ui-r-sm); }
.adm-icon-btn:hover { color: var(--ui-ink); background: var(--ui-line-soft); }
.adm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ui-s3); }

.adm-toast { position: fixed; left: 50%; top: 22px; transform: translate(-50%, -12px); background: var(--ui-ink); color: #fff; padding: 11px 22px; border-radius: var(--ui-r-pill); font-size: var(--ui-fs-sm); opacity: 0; pointer-events: none; transition: .22s; z-index: 300; box-shadow: 0 10px 30px rgba(0,0,0,.18); max-width: 88vw; text-align: center; }
.adm-toast.on { opacity: 1; transform: translate(-50%, 0); }
.adm-toast.err { background: #7a1f18; }

.adm-empty { padding: var(--ui-s8) var(--ui-s5); text-align: center; color: var(--ui-faint); font-size: var(--ui-fs-sm); }

/* 登录 */
.adm-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--ui-s6); }
.adm-login { width: 100%; max-width: 400px; background: var(--ui-sheet); border: 1px solid var(--ui-line); border-radius: var(--ui-r-lg); padding: var(--ui-s7) var(--ui-s6); }
.adm-login .brand { display: flex; align-items: center; gap: var(--ui-s2); margin-bottom: var(--ui-s5); }
.adm-login .brand img { height: 20px; }
.adm-login h1 { margin: 0 0 var(--ui-s2); font-size: var(--ui-fs-h1); font-weight: var(--ui-fw-semi); }
.adm-login p.hint { margin: 0 0 var(--ui-s5); font-size: var(--ui-fs-sm); line-height: var(--ui-lh); color: var(--ui-muted); }
.adm-field { margin-bottom: var(--ui-s3); }
.adm-field label { display: block; font-size: var(--ui-fs-xs); font-weight: var(--ui-fw-med); color: var(--ui-ink-3); margin-bottom: 6px; }

/* ============================================================================
   响应式：平板 ≤1180 / 小屏 ≤900 / 手机 ≤600
   ============================================================================ */

/* 中等屏：左栏收窄，预览仍并排 */
@media (max-width: 1180px) {
  .wp-grid { grid-template-columns: 300px minmax(0, 1fr); gap: var(--ui-s4); }
  .wp-devices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 小屏：改为上「步骤标签」下「预览」，步骤面板一次只显示一个 */
@media (max-width: 900px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--ui-line); padding: var(--ui-s3) var(--ui-s3); }
  .adm-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
  .adm-nav button, .adm-nav a.adm-navlink { white-space: nowrap; width: auto; min-height: 38px; padding: 0 var(--ui-s3); }
  .adm-nav .sep, .adm-nav .grp { display: none; }
  .adm-body { padding: var(--ui-s3) var(--ui-s3) var(--ui-s8); }
  .adm-top { padding: var(--ui-s2) var(--ui-s3); min-height: 56px; }

  .wp-grid { grid-template-columns: 1fr; gap: var(--ui-s3); }
  .wp-side { position: static; max-height: none; overflow: visible; padding-right: 0; gap: var(--ui-s2); }

  /* 步骤标签：可横向滑动的一行，不换行不挤压 */
  .wp-tabs {
    display: flex; gap: 6px; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    position: sticky; top: 0; z-index: 8;
    background: var(--ui-bg); padding: var(--ui-s2) 0 var(--ui-s3);
    margin-bottom: var(--ui-s1);
    scrollbar-width: none;
  }
  .wp-tabs::-webkit-scrollbar { height: 0; }
  .wp-tab {
    flex: 0 0 auto; min-height: 38px; padding: 0 16px;
    border: 1px solid var(--ui-line-strong); border-radius: var(--ui-r-pill);
    background: var(--ui-sheet); font-size: var(--ui-fs-sm); font-weight: var(--ui-fw-med);
    color: var(--ui-ink-2); white-space: nowrap; cursor: pointer;
  }
  .wp-tab.on { background: var(--ui-accent); color: var(--ui-accent-ink); border-color: var(--ui-accent); }

  /* 一次只显示当前步骤面板 */
  .wp-side > .wp-panel { display: none; }
  .wp-side > .wp-panel.on { display: block; }
  .wp-panel h3 { margin-bottom: var(--ui-s3); padding-bottom: var(--ui-s2); }

  .wp-devices { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--ui-s3); }
  .wp-opt { margin-bottom: var(--ui-s3); }
}

/* 手机 */
@media (max-width: 600px) {
  :root {
    --ui-fs-display: 21px;
    --ui-fs-h1: 17px;
    --ui-fs-h2: 15px;
    --ui-ctl-h: 44px;
    --ui-ctl-px: 13px;
  }
  .adm-top h2 { font-size: var(--ui-fs-h1); }
  .adm-top .who .mail { display: none; }
  .adm-cards { grid-template-columns: 1fr 1fr; }
  .adm-grid2, .adm-form-row { grid-template-columns: 1fr; }
  .wp-panel { padding: var(--ui-s3) var(--ui-s3) var(--ui-s2); }
  .wp-devices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ui-s2); }
  .wp-card { padding: var(--ui-s2); gap: var(--ui-s2); }
  .wp-card-head label { font-size: var(--ui-fs-xs); }
  .wp-card-presets { flex-wrap: nowrap; }

  /* 工具条在手机上换行，文案不撑宽 */
  .adm-tools { gap: 6px; }
  .adm-tools .grow { flex: 1 1 100%; min-width: 0; }
  .adm-tools .adm-btn { flex: 1 1 0; }

  /* 预设按钮行不换行、不溢出：缩小内边距、允许下拉收缩 */
  .wp-card-presets { gap: 4px; }
  .wp-card-presets select { min-width: 0; }
  .wp-card-presets button { padding: 0 9px; font-size: 11px; min-height: 32px; }

  /* 一行三按钮在窄屏改为等分不换行 */
  .wp-row { gap: 6px; }
  .wp-row > .adm-btn { flex: 1 1 0; min-width: 0; padding: 0 8px; font-size: var(--ui-fs-xs); }
  .wp-row > .adm-input.is-num { flex: 1 1 0; width: auto; min-width: 0; }

  .adm-drawer { width: 100vw; }
}

/* 超窄 */
@media (max-width: 400px) {
  .wp-devices { grid-template-columns: 1fr !important; }
  .wp-tab { padding: 0 13px; font-size: var(--ui-fs-xs); }
}

/* ============================================================================
   小屏兜底：任何容器都不允许被子元素撑出横向滚动
   ============================================================================ */
@media (max-width: 900px) {
  .adm-shell, .adm-main, .adm-body, .wp-grid, .wp-side, .wp-panel,
  .wp-devices, .wp-card, .wp-card-presets, .wp-row, .adm-tools { min-width: 0; max-width: 100%; }
  .wp-side, .wp-panel, .adm-tools { overflow-x: clip; }
  .adm-tools .grow { overflow: hidden; text-overflow: ellipsis; }

  /* 设备网格在两列时用 minmax(0,1fr)，否则 auto-fill 的最小宽度会把卡片压扁 */
  .wp-devices { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  .adm-top { flex-wrap: nowrap; }
  .adm-top h2 { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .adm-top .who { flex: 0 0 auto; gap: 6px; }
  .adm-top .who .adm-btn { padding: 0 12px; }
}

/* ============================================================================
   文本对齐 / 换行 / 溢出规则（长文本不突然断行、不裁剪、不溢出）
   ============================================================================ */

/* 标签：与数值徽标两端对齐，标题过长时省略而不是挤压徽标换行 */
.wp-opt > label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--ui-s2);
}
.wp-opt > label > b,
.wp-opt > label > span { justify-self: end; }
/* 标签第一列文字：单行省略，避免“突然分行” */
.wp-opt > label { white-space: nowrap; }

/* 面板标题：图标不压缩，标题文本单行省略 */
.wp-panel h3 { min-width: 0; }
.wp-panel h3 .wp-step { flex: none; }

/* 按钮文字：短文本居中，绝不换行；过长时省略 */
.adm-btn, .adm-select, .adm-input {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-textarea { white-space: pre-wrap; overflow: auto; text-overflow: clip; }

/* 下拉选项文字过长：保持单行 */
.adm-select option { white-space: normal; }

/* 说明文字：自动换行但不断词、行距舒适、不裁剪 */
.wp-note, .adm-tools .grow, .adm-drawer .body p {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: var(--ui-lh);
  overflow: visible;
  max-height: none;
}

/* 卡片标题：单行省略 + 尺寸右对齐 */
.wp-card-head { min-width: 0; }
.wp-card-head label { min-width: 0; }
.wp-card-head label span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-dim { flex: none; }

/* 预设行：名称单行省略，按钮不换行不裁剪 */
.wp-card-presets { min-width: 0; }
.wp-card-presets select { min-width: 0; white-space: nowrap; text-overflow: ellipsis; }
.wp-card-presets button { flex: none; white-space: nowrap; }

/* 顶部工具条：说明文字两端对齐，按钮固定不换行 */
.adm-tools { align-items: center; }
.adm-tools .grow { text-align: left; }
.adm-tools .adm-btn { flex: none; }

/* 数值徽标：等宽数字，右对齐，不随标签长度抖动 */
.wp-opt > label > b { font-variant-numeric: tabular-nums; text-align: right; }

/* 抽屉里的信息行：键值两端对齐 */
.adm-drawer .adm-field label { text-align: left; }

/* ============================================================================
   卡片底栏修正：预设行按钮不被挤压；预览高度自适应，避免卡片过高
   ============================================================================ */
.wp-card-presets { display: grid; grid-template-columns: minmax(86px, 1fr) 36px 36px 36px; gap: 4px; align-items: center; }
.wp-card-presets select { width: 100%; min-width: 0; }
.wp-card-presets button { min-width: 0; width: 100%; padding: 0; }
.wp-card-foot input[type="range"] { height: 22px; }
@media (max-width: 900px) {
  .wp-card-presets { grid-template-columns: minmax(60px, 1fr) 32px 32px 32px; gap: 4px; }
  .wp-card-presets button { font-size: 11px; }
  }
@media (max-width: 600px) {
    .wp-card-presets button { font-size: 11px; }
}

/* ============================================================================
   第二轮微调：日期/时间重叠、滑杆更紧凑、圆点无描边、预设下拉自绘
   ============================================================================ */

/* 1) 日期/时间：原生控件在窄容器里会互相压住 —— 强制换行 + 可收缩 */
input[type="date"], input[type="time"], input[type="datetime-local"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}
/* iOS Safari 对 date/time 有自己的内部布局，禁掉它的内部伸缩 */
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value { text-align: left; min-width: 0; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { margin: 0; opacity: .55; }

/* 并排的日期/时间：窄屏一律竖排，绝不挤在一行 */
.wp-row > .wp-opt { flex: 1 1 140px; min-width: 0; }
.wp-row > .wp-opt:has(> input[type="date"]),
.wp-row > .wp-opt:has(> input[type="time"]) { flex: 1 1 140px; }

/* 2) 滑杆：圆点更小、无描边无投影；行高收紧 */
input[type="range"] { height: 22px; }
input[type="range"]::-webkit-slider-thumb {
  width: 14px; height: 14px; margin-top: -5px;
  border: 0; background: var(--ui-ink);
  box-shadow: none;
}
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; background: var(--ui-ink); box-shadow: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #141414 0%, rgba(20,20,20,.22) var(--wp-pct,50%), var(--ui-line) var(--wp-pct,50%), var(--ui-line) 100%); }

/* 3) 布局面板：滑杆字段上下间距收紧（原 16px → 10px） */
#appView .wp-panel .wp-opt { margin-bottom: 10px; }
#appView .wp-panel .wp-opt > label { margin-bottom: 2px; }
#appView .wp-panel .wp-opt > input[type="range"] { margin-top: -6px; }
/* 数值徽标更小更贴 */
#appView .wp-panel .wp-opt > label > b { padding: 1px 7px; min-width: 40px; font-size: 11px; }

/* 4) 预设下拉：统一自绘（不用系统样式），宽度保证能显示文字 */
.wp-card-presets select {
  -webkit-appearance: none; appearance: none;
  height: var(--ui-ctl-h-sm);
  min-height: var(--ui-ctl-h-sm);
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-r-sm);
  background: var(--ui-sheet)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b6b6b' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 8px center;
  padding: 0 22px 0 9px;
  font-size: var(--ui-fs-xs);
  color: var(--ui-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}
.wp-card-presets select:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 1px; }

/* ============================================================================
   整个后台：统一边界与防溢出
   ============================================================================ */
.adm-* { min-width: 0; }
.adm-panel, .adm-card, .adm-table-wrap, .wp-panel, .wp-card { min-width: 0; max-width: 100%; }
.adm-table-wrap { overflow-x: auto; }
.adm-table { min-width: 0; }
.adm-table th, .adm-table td { overflow: hidden; text-overflow: ellipsis; }
.adm-kv .v { overflow-wrap: anywhere; }

/* 长文本统一：不突然断行、不裁剪 */
.adm-card .v, .adm-panel h3, .adm-top h2, .adm-drawer header h3 {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.adm-card .k, .adm-card .s { overflow-wrap: anywhere; }

/* 表格小屏：横向滑动，不撑破 */
@media (max-width: 900px) {
  .adm-body { padding: var(--ui-s3) var(--ui-s3) var(--ui-s6); }
  .adm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .adm-cards { grid-template-columns: 1fr 1fr; gap: var(--ui-s2); }
  .adm-card { padding: var(--ui-s3); }
  .adm-card .v { font-size: 20px; }
  .adm-tools .adm-input, .adm-tools .adm-select { min-width: 0; }
}

/* ============================================================================
   隐藏所有滚动条（保留滚动能力，不占位、不显示）
   ============================================================================ */
html, body, * {
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE / 旧 Edge */
}
html::-webkit-scrollbar, body::-webkit-scrollbar,
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* 卡片两个滑杆（图形缩放 / 水印大小）之间间距收紧 —— 手机端尤其明显 */
.wp-card-foot { gap: 2px; }
.wp-card-foot-title { margin: 0; }
.wp-card-foot input[type="range"] { height: 20px; margin: -2px 0; }
@media (max-width: 900px) {
  .wp-card-foot { gap: 0; }
  .wp-card-foot input[type="range"] { height: 18px; margin: -3px 0; }
}

/* 强制：滑块没有任何可见圆点/方块（整条即衰减条） */
input[type="range"]::-webkit-slider-thumb,
input[type="range"]:active::-webkit-slider-thumb,
input[type="range"]:focus::-webkit-slider-thumb,
input[type="range"]:hover::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 0 !important; height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
}
input[type="range"]::-moz-range-thumb {
  width: 0 !important; height: 0 !important; border: 0 !important;
  background: transparent !important; opacity: 0 !important;
}
input[type="range"] { -webkit-tap-highlight-color: transparent; }

/* ============================================================================
   滑杆最终定义（整条=衰减条，无圆点；凸起处即当前值，最黑，两侧渐隐）
   —— 放在文件末尾以覆盖前面所有零散规则
   ============================================================================ */
input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  display: block !important;
  cursor: pointer !important;
}
/* 轨道：8px 高度，以 --wp-pct 为峰值，中间黑→两端透明 */
input[type="range"]::-webkit-slider-runnable-track {
  -webkit-appearance: none !important;
  height: 8px !important;
  border-radius: 4px !important;
  border: 0 !important;
  background:
    linear-gradient(to right,
      rgba(20,20,20,0)   0%,
      rgba(20,20,20,.10) calc(var(--wp-pct,50%) * .45),
      rgba(20,20,20,.42) calc(var(--wp-pct,50%) * .78),
      #141414            var(--wp-pct,50%),
      rgba(20,20,20,.42) calc(var(--wp-pct,50%) + (100% - var(--wp-pct,50%)) * .22),
      rgba(20,20,20,.10) calc(var(--wp-pct,50%) + (100% - var(--wp-pct,50%)) * .55),
      rgba(20,20,20,0)   100%
    ) !important;
}
/* 拇指（无圆点） */
input[type="range"]::-webkit-slider-thumb,
input[type="range"]:active::-webkit-slider-thumb,
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  width: 0 !important; height: 0 !important;
  margin: 0 !important; border: 0 !important;
  background: transparent !important; opacity: 0 !important;
}
/* Firefox */
input[type="range"]::-moz-range-track {
  height: 8px !important; border-radius: 4px !important; border: 0 !important;
  background: linear-gradient(to right,
      rgba(20,20,20,0) 0%,
      rgba(20,20,20,.10) calc(var(--wp-pct,50%) * .45),
      rgba(20,20,20,.42) calc(var(--wp-pct,50%) * .78),
      #141414 var(--wp-pct,50%),
      rgba(20,20,20,.42) calc(var(--wp-pct,50%) + (100% - var(--wp-pct,50%)) * .22),
      rgba(20,20,20,0) 100%) !important;
}
input[type="range"]::-moz-range-thumb { width: 0 !important; height: 0 !important; border: 0 !important; background: transparent !important; }

/* 卡片两个滑杆之间与行高压缩 */
.wp-card-foot { gap: 0 !important; }
.wp-card-foot-title { margin: 0 !important; line-height: 1.2 !important; }
.wp-card-foot input[type="range"] { height: 20px !important; }
@media (max-width: 900px) {
  .wp-card-foot input[type="range"] { height: 20px !important; }
}
/* 面板内滑杆字段更大更松，方便拇指操作（虽无圆点但触控区域足够） */
.wp-panel .wp-opt > input[type="range"] { margin-top: 0 !important; }

/* ============================================================================
   滚动条彻底隐藏（含所有伪元素、所有滚动容器、不占位）
   —— 放在文件末尾，最高优先级
   ============================================================================ */
html, body, .adm, .adm-shell, .adm-side, .adm-main, .adm-body, .adm-nav,
.adm-drawer, .adm-drawer .body, .wp-side, .wp-tabs, .wp-grid,
.wp-devices, .adm-table-wrap, .adm-overlay, textarea, .adm-textarea {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  scrollbar-gutter: auto !important;
}
html::-webkit-scrollbar, body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important; height: 0 !important; display: none !important;
  background: transparent !important;
}
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-button,
*::-webkit-scrollbar-corner,
*::-webkit-scrollbar-track-piece {
  display: none !important; width: 0 !important; height: 0 !important;
  background: transparent !important; border: 0 !important;
}

/* ============================================================================
   滑杆「衰减线」外观：SVG 曲线在底层，range 透明可拖；降低整体高度
   ============================================================================ */
.wp-range-wrap {
  position: relative;
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
}
.wp-range-wrap > .wp-range-svg {
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 20px;
  pointer-events: none;
  overflow: visible;
}
/* range 完全透明但可交互，覆盖在 SVG 上 */
.wp-range-wrap > input[type="range"] {
  position: relative;
  z-index: 2;
  height: 22px !important;
  margin: 0 !important;
  background: transparent !important;
}
.wp-range-wrap > input[type="range"]::-webkit-slider-runnable-track,
.wp-range-wrap > input[type="range"]::-moz-range-track { background: transparent !important; height: 22px !important; }
.wp-range-wrap > input[type="range"]::-webkit-slider-thumb { opacity: 0 !important; width: 0 !important; height: 0 !important; }

/* 卡片里这两条更紧凑 */
.wp-card-foot .wp-range-wrap { height: 20px; }
.wp-card-foot .wp-range-svg { height: 18px; }
.wp-card-foot .wp-range-wrap > input[type="range"] { height: 20px !important; }

/* 卡片滑杆组：标题与线之间、两组之间给足呼吸感但不过分 */
.wp-card-foot { gap: 0 !important; }
.wp-card-foot-title { margin: 0 !important; line-height: 1.15 !important; font-size: 10px !important; letter-spacing: .04em; }
.wp-card-foot .wp-range-wrap { height: 26px; margin: -2px 0 4px; }
.wp-card-foot .wp-range-svg { height: 22px; }
.wp-card-foot .wp-range-wrap > input[type="range"] { height: 26px !important; }
.wp-card-foot-title + .wp-range-wrap { margin-top: -4px; }
.wp-card-foot .wp-range-wrap + .wp-card-foot-title { margin-top: 4px !important; }
@media (max-width: 900px) {
  .wp-card-foot .wp-range-wrap { height: 24px; margin: -2px 0 3px; }
  .wp-card-foot .wp-range-svg { height: 20px; }
  .wp-card-foot .wp-range-wrap > input[type="range"] { height: 24px !important; }
}

/* ============================================================================
   提示条间距 + 重置按钮间距（舞台高度不再限制，保持底板比例 3:4 等不压缩）
   ============================================================================ */
.adm-tools { margin-bottom: var(--ui-s2); }
.wp-grid > section { display: flex; flex-direction: column; }
#hintBar { margin: 0; line-height: 1.4; }
/* 卡片：预设行与重置按钮之间留间距 */
.wp-card-presets { margin-bottom: 8px; }
.wp-card-foot { gap: 8px; }
.wp-card-foot > [data-reset] { margin-top: 0; }

/* ============================================================================
   滑杆交互修复：拇指透明但有可拖区域；SVG 不抢占事件；去掉灰框
   ============================================================================ */
.wp-range-wrap > .wp-range-svg {
  pointer-events: none !important;
  border: 0 !important;
  background: none !important;
}
.wp-range-wrap > input[type="range"] {
  position: relative; z-index: 2;
  height: 26px !important;
  background: transparent !important;
  -webkit-appearance: none; appearance: none;
}
/* 关键：拇指不能是 0×0，否则无法抓取拖动 —— 用透明但 20px 的圆做命中区 */
.wp-range-wrap > input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px !important; height: 24px !important;
  margin-top: -11px !important;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  opacity: 0 !important;
  cursor: grab;
}
.wp-range-wrap > input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }
.wp-range-wrap > input[type="range"]::-webkit-slider-runnable-track {
  height: 26px !important; background: transparent !important; border: 0 !important;
}
.wp-range-wrap > input[type="range"]::-moz-range-thumb {
  width: 24px !important; height: 24px !important; border: 0 !important;
  background: transparent !important; opacity: 0 !important; cursor: grab;
}
.wp-range-wrap > input[type="range"]::-moz-range-track {
  height: 26px !important; background: transparent !important; border: 0 !important;
}
/* 面板里的大滑杆同样处理（它们也被 wrap 包裹） */
.wp-range-wrap { height: 26px; }
.wp-range-svg { height: 20px; }

/* 第二组标题（水印大小）与上方鼓包之间的间距再收紧 */
.wp-card-foot .wp-range-wrap + .wp-card-foot-title { margin-top: -2px !important; }
.wp-card-foot .wp-range-wrap { margin-bottom: 1px !important; }

/* 提示条已移除：工具条紧凑，内容整体上移 */
.adm-tools { margin-bottom: 4px; padding: 0; min-height: 0; }
#hintBar[hidden] { display: none !important; }

/* ============================================================================
   工具条上间距加大、下间距减小；步骤区底部 padding/margin 收紧
   ============================================================================ */
.adm-tools { margin-top: 2px !important; margin-bottom: 10px !important; }
.wp-side > .wp-panel:last-child { margin-bottom: 0 !important; }
.wp-side { padding-bottom: 0 !important; }
@media (max-width: 900px) {
  .adm-tools { margin-top: 0 !important; margin-bottom: 12px !important; }
  .wp-side { padding-bottom: 4px !important; }
}

/* ============================================================================
   步骤侧栏不被高预览拉伸：消除下方大量空白
   ============================================================================ */
.wp-side { align-self: start !important; }
.wp-grid { align-items: start !important; }
/* 小屏上下排列时，步骤区之后不再被 grid 撑出大片空白 */
@media (max-width: 900px) {
  .wp-grid { align-content: start !important; }
  .wp-side { align-self: stretch !important; }
  .adm-body { padding-bottom: 20px !important; }
}

/* ============================================================================
   手机端：步骤面板与「全选/全不选」之间空隙收紧
   ============================================================================ */
@media (max-width: 900px) {
  .wp-grid { gap: 0 !important; }
  .wp-side { gap: 6px !important; padding-bottom: 0 !important; }
  .wp-side > .wp-panel { margin-bottom: 6px !important; padding-bottom: 4px !important; }
  .wp-side > .wp-panel:last-child { margin-bottom: 0 !important; }
  /* section 内的工具条（全选）上边距压到最小 */
  .wp-grid > section .adm-tools { margin-top: 0 !important; margin-bottom: 8px !important; }
  .wp-grid > section { margin-top: 0 !important; }
}

/* 手机端步骤面板内边距再收，减少与工具条之间的视觉空隙 */
@media (max-width: 900px) {
  .wp-side > .wp-panel { padding: 10px 10px 8px !important; }
  .wp-panel h3 { margin: 0 0 8px !important; padding-bottom: 6px !important; }
  .wp-drop { padding: 14px 12px !important; }
}

/* ============================================================================
   主后台全站统一修正
   ============================================================================ */

/* 1) 工具条里的下拉/输入与按钮同高，视觉整齐 */
.adm-tools { align-items: center; }
.adm-tools .adm-select,
.adm-tools .adm-input { min-height: var(--ui-ctl-h-sm); height: var(--ui-ctl-h-sm); padding-top: 0; padding-bottom: 0; font-size: var(--ui-fs-sm); }
.adm-tools .adm-btn { min-height: var(--ui-ctl-h-sm); }
.adm-tools .grow { flex: 1 1 220px; min-width: 0; }

/* 2) 表格操作列：按钮之间留白，不挤在一起；右上角对齐 */
.adm-table td.acts { white-space: nowrap; }
.adm-table td.acts .adm-btn { margin: 2px 0 2px 6px; }
.adm-table td.acts .adm-btn:first-child { margin-left: 0; }
/* 表格行更紧凑，减少竖向占位 */
.adm-table th, .adm-table td { padding: 9px 12px; }

/* 3) 表格里的内容列：超长省略，不撑高行 */
.adm-table td > div[style*="max-width"] { max-width: 100% !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 4) 小屏：卡片式堆叠表格更紧凑、按钮在右上角一排 */
@media (max-width: 720px) {
  .adm-table.stack tr { position: relative; padding: 12px 12px 10px; }
  .adm-table.stack tr td.acts {
    display: flex !important; flex-wrap: wrap; gap: 6px;
    padding-top: 8px; margin-top: 4px; border-top: 1px dashed var(--ui-line-soft);
  }
  .adm-table.stack tr td.acts .adm-btn { margin: 0; flex: 0 0 auto; }
  /* 隐藏空的标签前缀 */
  .adm-table.stack td.acts::before { content: "" !important; flex: 0 0 0 !important; }

  /* 5) 侧栏不再保留多余底部空白 */
  .adm-side { padding-bottom: 8px !important; min-height: 0 !important; height: auto !important; }
  .adm-nav { padding-bottom: 0 !important; }
}

/* 6) 移动端侧栏导航：可横向滚动（不是拖动，是横向滑动） */
@media (max-width: 900px) {
  .adm-side { position: static !important; height: auto !important; min-height: 0 !important; padding-bottom: 8px !important; }
  .adm-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .adm-nav::-webkit-scrollbar { height: 0; }
}

/* ============================================================================
   手机端整体优化（主后台所有页面）
   ============================================================================ */
@media (max-width: 720px) {
  /* 顶栏更紧凑 */
  .adm-top { min-height: 52px; padding: 10px 14px; }
  .adm-top h2 { font-size: 17px; }
  .adm-top .who { gap: 6px; }
  .adm-top .who .adm-btn { min-height: 34px; padding: 0 12px; font-size: 12px; }

  /* 侧栏：顶部导航横滑、可滑动提示、紧凑 */
  .adm-side { padding: 12px 12px 6px !important; }
  .adm-side .brand { padding-bottom: 10px; }
  .adm-nav {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    gap: 6px; padding-bottom: 6px;
    scroll-snap-type: x proximity;
    /* 右侧渐隐提示“还能滑” */
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, #000 92%, transparent 100%);
  }
  .adm-nav button, .adm-nav a.adm-navlink {
    flex: 0 0 auto; min-height: 36px; padding: 0 14px;
    border: 1px solid var(--ui-line-strong); border-radius: var(--ui-r-pill);
    background: var(--ui-sheet); font-size: 13px; scroll-snap-align: start;
  }
  .adm-nav button.on, .adm-nav a.adm-navlink.on { border-color: var(--ui-accent); }

  /* 内容区留白收紧 */
  .adm-body { padding: 12px 12px 28px !important; }

  /* 统计卡片：更紧凑、字号适配 */
  .adm-cards { gap: 10px; }
  .adm-card { padding: 14px 14px; border-radius: 12px; }
  .adm-card .k { font-size: 11px; margin-bottom: 6px; }
  .adm-card .v { font-size: 24px; }
  .adm-card .s { font-size: 11px; margin-top: 4px; }

  /* 面板 */
  .adm-panel { padding: 14px; border-radius: 12px; margin-bottom: 12px; }
  .adm-panel h3 { font-size: 14px; margin-bottom: 12px; }

  /* 工具条：搜索框独占一行，下拉与按钮并排 */
  .adm-tools { gap: 8px; }
  .adm-tools .grow { flex: 1 1 100%; }
  .adm-tools .adm-select, .adm-tools .adm-btn { flex: 0 0 auto; }

  /* 表格卡片化：行内留白更合理 */
  .adm-table.stacked-mobile tr { padding: 12px 12px; }
  .adm-table.stacked-mobile td { font-size: 13px; padding: 4px 0; }
  .adm-table.stacked-mobile td::before { flex: 0 0 72px; font-size: 12px; }
  .adm-table.stacked-mobile td.acts { padding-top: 10px; }

  /* 空状态 */
  .adm-empty { padding: 32px 16px; font-size: 13px; }
}

/* 极窄 */
@media (max-width: 380px) {
  .adm-cards { grid-template-columns: 1fr !important; }
  .adm-card .v { font-size: 22px; }
}

/* 手机端表格操作按钮：允许文字完整显示，不被裁切；可换行 */
@media (max-width: 720px) {
  .adm-table.stacked-mobile td.acts { flex-wrap: wrap; gap: 8px; }
  .adm-table.stacked-mobile td.acts .adm-btn {
    flex: 0 0 auto; max-width: 100%;
    white-space: nowrap; overflow: visible; text-overflow: clip;
    padding: 0 14px; min-height: 38px; font-size: 13px;
  }
}

/* 手机端表格操作按钮：等宽两列网格，整齐对齐 */
@media (max-width: 720px) {
  .adm-table.stacked-mobile td.acts {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--ui-line-soft);
  }
  .adm-table.stacked-mobile td.acts::before { content: none !important; }
  .adm-table.stacked-mobile td.acts .adm-btn {
    width: 100%; max-width: none;
    padding: 0 10px; min-height: 40px; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    justify-content: center;
  }
  /* 只有 3 个按钮时，最后一个跨两列，不留空洞 */
  .adm-table.stacked-mobile td.acts .adm-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ============================================================================
   手机端表格操作：卡片右侧纵向排列（信息左、操作右）
   ============================================================================ */
@media (max-width: 720px) {
  .adm-table.stacked-mobile tr {
    position: relative;
    display: block;
    padding: 12px 12px 12px;
    padding-right: 112px;              /* 给右侧纵向按钮留出固定宽度 */
  }
  /* 操作列：绝对定位到右侧，纵向排列 */
  .adm-table.stacked-mobile td.acts {
    position: absolute !important;
    top: 12px; right: 12px;
    width: 96px;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch;
    gap: 8px;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
  }
  .adm-table.stacked-mobile td.acts::before { content: none !important; }
  .adm-table.stacked-mobile td.acts .adm-btn {
    width: 100% !important;
    min-height: 36px;
    padding: 0 8px;
    font-size: 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    justify-content: center;
  }
  /* 信息字段：单行两段，不被按钮遮挡 */
  .adm-table.stacked-mobile td:not(.acts) { padding: 3px 0; }
}

/* 修正：右侧操作按钮完整落在卡片内，不被边缘裁切 */
@media (max-width: 720px) {
  .adm-table.stacked-mobile tr { padding-right: 104px !important; }
  .adm-table.stacked-mobile td.acts {
    right: 10px !important;
    width: 90px !important;
    top: 12px !important;
  }
  .adm-table.stacked-mobile td.acts .adm-btn {
    min-height: 34px; font-size: 11.5px; padding: 0 6px;
  }
}

/* 右侧操作列加宽，保证「推送到 Gumroad」完整显示 */
@media (max-width: 720px) {
  .adm-table.stacked-mobile tr { padding-right: 118px !important; }
  .adm-table.stacked-mobile td.acts { right: 10px !important; width: 104px !important; }
  .adm-table.stacked-mobile td.acts .adm-btn {
    min-height: 34px; font-size: 11px; padding: 0 4px; letter-spacing: -.02em;
  }
}

/* ============================================================================
   手机端表格操作按钮：右侧纵向、严格对齐、不溢出（最终版）
   ============================================================================ */
@media (max-width: 720px) {
  .adm-table.stacked-mobile tr {
    position: relative !important;
    display: block !important;
    padding: 12px !important;
    padding-right: 108px !important;
  }
  .adm-table.stacked-mobile td.acts {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    width: 92px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 7px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-sizing: border-box !important;
  }
  .adm-table.stacked-mobile td.acts::before { content: none !important; }
  .adm-table.stacked-mobile td.acts .adm-btn {
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;             /* 关键：清掉表格按钮的 margin，消除错位 */
    min-height: 34px !important;
    padding: 0 4px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    letter-spacing: -.02em;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis;
    justify-content: center;
    box-sizing: border-box !important;
  }
  /* 其它单元格内容不被右侧按钮压住 */
  .adm-table.stacked-mobile td:not(.acts) { max-width: calc(100% - 0px); padding-right: 0 !important; }
}

/* ============================================================================
   修正：移动端侧栏必须 auto 高度、不 sticky（否则 100vh 会把顶栏顶下去）
   ============================================================================ */
@media (max-width: 1024px) {
  .adm-side {
    position: static !important;
    top: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
  }
}
/* 桌面：用 dvh 兼容移动端地址栏 */
@media (min-width: 1025px) {
  .adm-side { height: 100vh; height: 100dvh; }
}

/* ============================================================================
   终极兜底：任何页面/表格都不横向撑破视口
   ============================================================================ */
html, body { max-width: 100%; overflow-x: hidden; }
.adm-shell, .adm-main, .adm-body, .adm-grid2, .adm-panel {
  max-width: 100%; min-width: 0; overflow-x: clip;
}
.adm-table-wrap {
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}
/* 长串（订单号/uuid/邮箱）允许断行，不再撑宽表格 */
.adm-table td, .adm-table th,
.adm-table .t, .adm-table .d { overflow-wrap: anywhere; word-break: break-word; }
/* 未卡片化的表格（桌面或异常情况）也不要超过容器 */
@media (max-width: 900px) {
  .adm-table:not(.stacked-mobile):not(.stack) { min-width: 0 !important; max-width: 100%; }
}

/* ============================================================================
   修正：手机端 adm-shell 单列、列宽锁 100%、不拉伸子项（根治侧栏被撑高）
   ============================================================================ */
@media (max-width: 1024px) {
  .adm-shell {
    display: block !important;         /* 放弃 grid，改用块级堆叠，彻底避免列宽被撑 */
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .adm-side { width: 100% !important; max-width: 100% !important; }
  .adm-main { width: 100% !important; max-width: 100% !important; display: block !important; }
  .adm-body { width: 100% !important; max-width: 100% !important; }
  /* 表格容器允许内部横向滚动，但自身不超宽 */
  .adm-table-wrap { width: 100% !important; max-width: 100% !important; }
}

/* ============================================================================
   操作列：主按钮 + ⋯ 更多菜单
   ============================================================================ */
.adm-table td.acts { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.adm-act-more { position: relative; display: inline-block; }
.adm-act-toggle { min-width: 34px; padding: 0 8px; font-size: 16px; line-height: 1; }
.adm-act-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 130px; background: var(--ui-sheet); border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-r-md); box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 6px; z-index: 60;
}
.adm-act-more.open .adm-act-menu { display: block; }
.adm-act-item {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 9px 12px; border-radius: var(--ui-r-sm); font-size: 13px; color: var(--ui-ink);
  cursor: pointer; white-space: nowrap;
}
.adm-act-item:hover { background: var(--ui-line-soft); }
.adm-act-item[data-act="del"]:hover { background: #fdf5f4; color: var(--ui-danger); }

/* 手机端：操作区收窄为「主按钮 + ⋯」，内容获得更多宽度 */
@media (max-width: 720px) {
  .adm-table.stacked-mobile tr { padding-right: 96px !important; }
  .adm-table.stacked-mobile td.acts {
    position: absolute !important; top: 12px !important; right: 10px !important;
    width: 78px !important; left: auto !important;
    display: flex !important; flex-direction: column !important; align-items: stretch !important;
    gap: 6px !important; padding: 0 !important; margin: 0 !important; border: 0 !important;
  }
  .adm-table.stacked-mobile td.acts::before { content: none !important; }
  .adm-table.stacked-mobile td.acts .adm-btn {
    width: 100% !important; min-height: 32px !important; margin: 0 !important;
    padding: 0 6px !important; font-size: 11px !important; white-space: nowrap !important;
    justify-content: center;
  }
  .adm-table.stacked-mobile td.acts .adm-act-toggle { min-height: 30px !important; }
  .adm-table.stacked-mobile .adm-act-menu {
    position: fixed; left: 50%; right: auto; transform: translateX(-50%);
    bottom: 24px; top: auto; min-width: 200px; z-index: 200;
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
  }
}

/* ============================================================================
   手机端卡片：单元格内的 .t(主值)/.d(副值) 纵向堆叠、占满宽度，不横向挤压
   ============================================================================ */
@media (max-width: 720px) {
  .adm-table.stacked-mobile td {
    display: grid !important;
    grid-template-columns: 74px minmax(0, 1fr) !important;
    align-items: start !important;
    column-gap: 10px !important;
    padding: 5px 0 !important;
    font-size: 13px;
    white-space: normal !important;
    word-break: break-word;
  }
  .adm-table.stacked-mobile td::before {
    content: attr(data-label) !important;
    color: var(--ui-faint);
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .adm-table.stacked-mobile td[data-label=""]::before { content: "" !important; }
  /* 主值 / 副值纵向排列，各自占满第二列 */
  .adm-table.stacked-mobile td .t,
  .adm-table.stacked-mobile td .d { grid-column: 2; }
  .adm-table.stacked-mobile td .t { font-weight: 500; }
  .adm-table.stacked-mobile td .d { font-size: 11.5px; color: var(--ui-faint); }
  /* 纯文本单元格（无 .t/.d）直接放第二列 */
  .adm-table.stacked-mobile td > *:not(.t):not(.d) { grid-column: 2; }
  /* 操作列不套网格 */
  .adm-table.stacked-mobile td.acts { display: flex !important; grid-template-columns: none !important; }
}

/* ============================================================================
   手机端卡片单元格：第2列内容纵向排列（.t 在上 .d 在下），不再横向挤压
   用 grid 自动行流：::before 占第1列第1行，其余子元素占第2列各自新行
   ============================================================================ */
@media (max-width: 720px) {
  .adm-table.stacked-mobile td {
    display: grid !important;
    grid-template-columns: 74px minmax(0, 1fr) !important;
    grid-auto-rows: auto;
    column-gap: 10px !important;
    row-gap: 2px;
    align-items: start;
    padding: 5px 0 !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .adm-table.stacked-mobile td::before {
    content: attr(data-label) !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    color: var(--ui-faint);
    font-size: 12px; line-height: 1.5;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .adm-table.stacked-mobile td[data-label=""]::before { content: "" !important; }
  /* 每个直接子元素各占第2列、自动往下排（不同行） */
  .adm-table.stacked-mobile td > * {
    grid-column: 2 !important;
    min-width: 0;
  }
  .adm-table.stacked-mobile td .t { font-weight: 500; }
  .adm-table.stacked-mobile td .d { font-size: 11.5px; color: var(--ui-faint); }
  /* 操作列不参与网格 */
  .adm-table.stacked-mobile td.acts { display: flex !important; grid-template-columns: none !important; grid-auto-rows: auto !important; }
  .adm-table.stacked-mobile td.acts::before { content: none !important; }
}

/* 状态徽标在卡片里保持自身宽度，不拉伸整行 */
@media (max-width: 720px) {
  .adm-table.stacked-mobile td .adm-tag {
    justify-self: start !important;
    width: auto !important;
    max-width: 100%;
  }
  /* 让第2列内容左对齐、不被拉伸 */
  .adm-table.stacked-mobile td > * { justify-self: start !important; width: auto; max-width: 100%; }
  /* 但长文本值仍可占满以便换行 */
  .adm-table.stacked-mobile td .t,
  .adm-table.stacked-mobile td .d { justify-self: stretch !important; width: 100% !important; }
}

/* 状态徽标：强制自身宽度、左对齐（提高优先级） */
@media (max-width: 720px) {
  .adm-table.stacked-mobile td > .adm-tag,
  .adm-table.stacked-mobile td .adm-tag {
    justify-self: start !important;
    align-self: start !important;
    width: fit-content !important;
    max-width: 100% !important;
    display: inline-block !important;
  }
}


/* ===== Duo 开合面板：统一间距 ===== */
.wp-fold-grid{display:grid;grid-template-columns:1fr;gap:10px;margin:12px 0 4px}
.wp-fold-grid .wp-opt{margin:0}
.wp-fold-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;align-items:center}
.wp-fold-row .adm-btn{min-width:auto;padding:6px 12px}
.wp-fold-row .adm-select{height:32px}
#foldFrame{margin-top:12px}
