/* ==========================================================================
   翰墨AI · 构件层
   全站共用构件：按钮 / 上传区 / 下拉选择 / 分段按钮组 / 色块 / 换装卡片 /
   滑杆 / 勾选 / 规格读数 / 任务栏 / 对照 / 说明列表 / 场景条 / 面板 / 表格
   ========================================================================== */

/* ---------- 按钮（韩系风格：胶囊圆角、柔和阴影、按压 scale） ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--g2);
  min-height: 44px; padding: 0 20px;
  border-radius: var(--r-full);
  font-size: var(--t-sm); font-weight: 600; letter-spacing: -0.005em;
  white-space: nowrap; cursor: pointer;
  transition: background-color var(--d2) var(--ease), color var(--d2) var(--ease),
              box-shadow var(--d2) var(--ease), scale var(--d2) var(--ease-enter),
              border-color var(--d2) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active:not(:disabled) { scale: 0.975; }

/* 主行动按钮：明亮紫罗兰渐变底 + 白字 + 柔光晕。
   注意与 `background` 简写的顺序——这里用 background-color + background-image，
   避免被别处的 background 简写清掉渐变。
   韩系按压靠 scale：hover 微抬，active 微缩。 */
.btn--brand { background-color: var(--brand); background-image: var(--grad-brand); color: var(--on-brand); box-shadow: var(--glow-brand); }
.btn--brand:hover { background-color: var(--brand); background-image: var(--grad-brand); box-shadow: 0 12px 28px -8px rgba(10, 168, 149, 0.4), 0 3px 10px -2px rgba(10, 168, 149, 0.25); transform: translateY(-1px); }
.btn--brand:active:not(:disabled) { transform: none; }
/* 禁用态：底色降为 sunk（比 well 浅一档），文字用 ink-2——
   既明显区分"不可点"，文字对比度也达标。 */
.btn--brand:disabled { background-image: none; background-color: var(--sunk); color: var(--ink-2); box-shadow: none; }

.btn--ink { background: var(--ink); color: var(--on-dark); }
.btn--ink:hover { background: var(--dark-2); }

.btn--line { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--line:hover { background: var(--sunk); box-shadow: inset 0 0 0 1px var(--ink-4); }

.btn--quiet { color: var(--ink-2); padding-inline: 14px; }
.btn--quiet:hover { background: var(--sunk); color: var(--ink); }

.btn--sm { min-height: 36px; padding-inline: 14px; font-size: var(--t-xs); }
.btn--lg { min-height: 52px; padding-inline: 28px; font-size: var(--t-body); }
.btn--block { width: 100%; }

/* 按钮内的单价芯片：价格长在行动上 */
.btn__cost {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 2px; padding: 2px 8px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.2);
  font-size: var(--t-xs); font-weight: 700; font-variant-numeric: tabular-nums;
}
.btn--line .btn__cost, .btn--quiet .btn__cost { background: var(--ln-tint); color: var(--ln-deep); }

/* ---------- 面板（韩系风格：大圆角、细腻阴影） ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-1);
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--g4);
  padding: var(--g4) var(--g5);
  border-bottom: 1px solid var(--line);
}
.panel__title {
  display: inline-flex; align-items: center; gap: var(--g2);
  font-size: var(--t-sm); font-weight: 700;
}
.panel__title .line-dot { width: 8px; height: 8px; }
.panel__body { padding: var(--g5); }
.panel__foot {
  display: flex; align-items: center; gap: var(--g3); flex-wrap: wrap;
  padding: var(--g4) var(--g5);
  border-top: 1px solid var(--line);
}
.panel--flush { border-radius: var(--r-xl); overflow: hidden; }





/* ---------- 字段 ---------- */

.field { padding-block: var(--g4); border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field__top {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--g3);
  margin-bottom: var(--g3);
}
.field__label { font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.field__suffix { font-size: var(--t-min); font-weight: 400; color: var(--ink-3); }
.field__hint { font-size: var(--t-xs); color: var(--ink-3); text-align: right; }

/* ---------- 色版样票（本世界的签名参数控件，韩系风格） ---------- */

.plates { display: grid; gap: var(--g3); }
.plates--2 { grid-template-columns: repeat(2, 1fr); }
.plates--3 { grid-template-columns: repeat(3, 1fr); }
.plates--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) {
  .plates--3, .plates--4 { grid-template-columns: repeat(2, 1fr); }
}

.plate {
  position: relative; display: block;
  padding: var(--g4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color var(--d2) var(--ease), background-color var(--d2) var(--ease),
              box-shadow var(--d2) var(--ease), transform var(--d2) var(--ease-enter);
}
.plate:hover { border-color: var(--line-2); background: var(--sunk); }
.plate input { position: absolute; opacity: 0; pointer-events: none; }
.plate__name { display: block; font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.plate__desc { display: block; margin-top: 4px; font-size: var(--t-xs); color: var(--ink-3); line-height: 1.55; }
.plate__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--g2);
  margin-top: var(--g3); padding-top: var(--g3);
  border-top: 1px dashed var(--line-2);
}
.plate__cost { font-size: var(--t-xs); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ln-deep); }
.plate__time { font-size: var(--t-xs); color: var(--ink-3); }
/* 选中：抬出槽位 + 品牌色边 + 色号角标 */
.plate:has(input:checked) {
  border-color: var(--ln);
  background: var(--ln-tint);
  box-shadow: var(--sh-2);
  transform: translateY(-2px);
}
.plate:has(input:checked) .plate__name { color: var(--ln-deep); }
/* 选中角标：底用 `--ln-deep`（而非本色）——本色偏亮时白字不足 4.5:1，
   深档对白 ≥5.5，品牌作用域（本色的 on 字是深棕）与色相作用域都能读清。 */
.plate__tag {
  display: none;
  position: absolute; top: -9px; right: var(--g3);
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--ln-deep); color: #fff;
  font-size: var(--t-min); font-weight: 700;
}
.plate:has(input:checked) .plate__tag { display: inline-block; }
.plate__swatch {
  display: flex; align-items: center; gap: var(--g2);
  margin-bottom: var(--g3);
}
.plate__chip { width: 22px; height: 22px; border-radius: var(--r-xs); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.plate__code { font-size: var(--t-min); font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 色标条（chip，韩系风格：胶囊圆角） ---------- */

.chips { display: flex; flex-wrap: wrap; gap: var(--g2); }
.chip {
  position: relative; display: inline-flex; flex-direction: column;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  cursor: pointer;
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-2);
  transition: border-color var(--d2) var(--ease), background-color var(--d2) var(--ease),
              color var(--d2) var(--ease), transform var(--d2) var(--ease-enter);
}
.chip:hover { border-color: var(--line-2); background: var(--sunk); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip b { font-size: var(--t-min); font-weight: 500; color: var(--ink-3); }
.chip:has(input:checked) {
  border-color: var(--ln); background: var(--ln-tint); color: var(--ln-deep);
  transform: translateY(-1px);
}
.chip:has(input:checked) b { color: var(--ln-deep); opacity: 0.78; }

/* ---------- 下拉（韩系风格：圆角、柔和阴影） ---------- */

.select {
  width: 100%; min-height: 46px; padding: 0 42px 0 15px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  font-size: var(--t-sm); font-weight: 500;
  appearance: none; cursor: pointer;
  transition: border-color var(--d2) var(--ease), box-shadow var(--d2) var(--ease);
}
.select:hover { border-color: var(--ink-4); }
.select:focus { border-color: var(--brand-deep); box-shadow: var(--ring); outline: none; }

.input, .area {
  width: 100%; padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  font-size: var(--t-sm); line-height: 1.6;
  transition: border-color var(--d2) var(--ease), box-shadow var(--d2) var(--ease);
}
.input:focus, .area:focus { border-color: var(--brand-deep); box-shadow: var(--ring); outline: none; }
.area { resize: vertical; min-height: 92px; }

/* ---------- 滑杆（韩系风格：圆润轨道、圆形把手） ---------- */

.slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; background: transparent; cursor: pointer;
}
.slider::-webkit-slider-runnable-track {
  height: 7px; border-radius: var(--r-full);
  background: linear-gradient(to right, var(--ln) 0 var(--fill, 50%), var(--well) var(--fill, 50%) 100%);
}
.slider::-moz-range-track { height: 7px; border-radius: var(--r-full); background: var(--well); }
.slider::-moz-range-progress { height: 7px; border-radius: var(--r-full); background: var(--ln); }
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px; margin-top: -6.5px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 3px solid var(--ln);
  box-shadow: var(--sh-2);
  transition: scale var(--d2) var(--ease-enter);
}
.slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: var(--r-full); background: var(--surface);
  border: 3px solid var(--ln); box-shadow: var(--sh-2);
}
.slider:active::-webkit-slider-thumb { scale: 1.14; }
.slider__out {
  min-width: 62px; text-align: right;
  font-size: var(--t-sm); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ln-deep);
}

/* ---------- 开关（韩系风格：圆润轨道） ---------- */

.switch { display: inline-flex; align-items: center; gap: var(--g3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  position: relative; width: 48px; height: 28px; flex: none;
  border-radius: var(--r-full);
  background: var(--well);
  transition: background-color var(--d3) var(--ease);
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: var(--r-full);
  background: var(--surface);
  box-shadow: var(--sh-2);
  transition: transform var(--d3) var(--ease-enter);
}
.switch input:checked + .switch__track { background: var(--ln); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }
.switch__text { font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- 上传井（韩系风格：柔和虚线、温润底色、功能色相高亮） ---------- */

.dropzone {
  display: grid; place-items: center; gap: var(--g2);
  padding: var(--g7) var(--g5);
  background-color: var(--ln-tint);
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--ln) 12%, transparent) 0%, transparent 70%);
  border: 2px dashed color-mix(in srgb, var(--ln) 52%, var(--line-2));
  border-radius: var(--r-lg);
  text-align: center; cursor: pointer;
  transition: border-color var(--d2) var(--ease), background-color var(--d2) var(--ease), box-shadow var(--d2) var(--ease);
}
/* 悬停/拖入只改底色与描边：background-color 而非 background 简写，
   否则会把功能签名表面（signature.css）的纹理一起清掉。 */
.dropzone:hover { border-color: var(--ln); background-color: var(--ln-tint); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--ln) 55%, transparent); }
.dropzone[data-over="true"] { border-color: var(--ln); background-color: var(--ln-tint); border-style: solid; box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--ln) 55%, transparent); }
/* 上传图标：明亮紫罗兰实心圆 + 白图标 + 柔光晕，是页面上最该被看见的行动入口。
   底用明亮紫罗兰 --brand：白图标在其上 4.5:1，配合光晕清晰可辨。 */
.dropzone__ico {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: var(--r-full);
  background-color: var(--brand); background-image: var(--grad-brand); color: var(--on-brand);
  box-shadow: 0 6px 16px -6px rgba(10, 168, 149, 0.4);
}
.dropzone__ico svg { width: 22px; height: 22px; }
.dropzone__t { font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.dropzone__h { font-size: var(--t-xs); color: var(--ink-3); max-width: 40ch; }

.fileline {
  display: flex; align-items: center; gap: var(--g3);
  padding: var(--g3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.fileline + .fileline { margin-top: var(--g2); }
.fileline__thumb {
  width: 40px; height: 40px; flex: none;
  border-radius: var(--r-sm); object-fit: cover;
  background: var(--well);
}
.fileline__del {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  border-radius: var(--r-full);
  color: var(--ink-3);
  transition: background-color var(--d2) var(--ease), color var(--d2) var(--ease);
}
.fileline__del:hover { background: var(--danger); color: #fff; }
.fileline__del svg { width: 16px; height: 16px; }

/* ---------- 消耗行（本次消耗：页面最该被看见的一行信息） ---------- */

.readout { border-radius: var(--r-md); }
/* 本次消耗：功能色相渐变背景 + 加粗描边 + 柔光晕，让它在面板上"跳"出来 */
.readout__total {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--g3);
  padding: 10px var(--g3);
  background: linear-gradient(135deg, var(--ln-tint) 0%, color-mix(in srgb, var(--ln) 12%, var(--surface)) 100%);
  border-radius: var(--r-sm);
  border: 2px solid color-mix(in srgb, var(--ln) 35%, transparent);
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--ln) 20%, transparent);
}
.readout__k { font-size: var(--t-min); color: var(--ink-2); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.readout__total b {
  font-size: var(--t-body); font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--ln-deep); letter-spacing: -0.01em;
}

/* 提交按钮：使用功能色相作为主行动色，让操作区与当前功能强关联 */
.btn--ln { background-color: var(--ln); color: var(--ln-on); box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--ln) 55%, transparent); }
.btn--ln:hover { background-color: var(--ln-deep); box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--ln) 65%, transparent); transform: translateY(-1px); }
.btn--ln:active:not(:disabled) { transform: none; }
.btn--ln:disabled { background-color: var(--sunk); color: var(--ink-2); box-shadow: none; }

/* 右侧浮动坞（分享／客服／历史记录 + 处理进度） ----------
   贴在视口右边缘、纵向放在偏下约 40% 处（top: 58%）。默认收起：只露出右侧一条竖向标签，
   鼠标移入（或键盘聚焦）才横向展开，移开自动缩回——避免被其它软件的弹窗盖住，也不挡内容。
   窄屏（单列）改为文档流内一行，不做固定浮层。 */
.dock {
  /* 窄屏默认：文档流内一行，直接铺开（窄屏没有可用的侧边空间） */
  display: flex; flex-direction: column; align-items: center; gap: var(--g2);
  width: 100%; max-width: var(--wrap); margin: var(--g3) auto 0; padding-inline: var(--g6);
}
.dock__tab { display: none; }
.dock__panel { display: contents; }

@media (min-width: 1001px) {
  .dock {
    position: fixed; right: 0; top: 58%; transform: translateY(-50%);
    z-index: var(--z-drop);
    width: auto; max-width: none; margin: 0; padding-inline: 0;
    display: flex; flex-direction: row; align-items: center; gap: 0;
    /* 收起时面板平移到视口右侧之外，靠这里裁掉，避免出现横向滚动 */
    overflow: hidden;
    /* 容器本身不接收指针事件：收起态的面板只是被 translateX 移出视口，
       其**布局盒**仍有约 420px 宽，若由 .dock 判定 hover，鼠标进入这片
       看不见的空白就会误触展开。改由可见的标签与展开后的面板触发。 */
    pointer-events: none;
  }
  /* 收起态的竖向标签：贴右边缘（只一个箭头图标，不带文字）——唯一常驻的 hover 触发源 */
  .dock__tab {
    display: flex; align-items: center; gap: 4px;
    order: 2;
    padding: 16px 5px;
    background: var(--surface);
    border: 1px solid var(--line); border-right: 0;
    border-radius: var(--r-full) 0 0 var(--r-full);
    box-shadow: var(--sh-2);
    color: var(--ink-3);
    cursor: pointer;
    pointer-events: auto;
    transition: background-color var(--d2) var(--ease), color var(--d2) var(--ease);
  }
  /* 「更多」文字不显示（用户要求去掉），无障碍读 dock__tab 的 aria-label */
  .dock__tab-txt { display: none; }
  .dock__tab .dock__tab-ico { width: 14px; height: 14px; transform: rotate(180deg); }
  .dock:hover .dock__tab, .dock:focus-within .dock__tab { background: var(--ln-tint); color: var(--ln-deep); }
  .dock:hover .dock__tab .dock__tab-ico { transform: none; }
  /* 面板：宽度固定，收起时整体向右平移出视口之外（只动 transform/opacity，不触发布局抖动）。
     收起态 pointer-events: none，因此它既不可见、也不参与 hover 判定。 */
  .dock__panel {
    display: flex; flex-direction: column; align-items: flex-end; gap: var(--g2);
    order: 1;
    width: min(420px, 46vw);
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
    transition: opacity var(--d2) var(--ease), transform var(--d3) var(--ease-soft);
  }
  .dock:hover .dock__panel, .dock:focus-within .dock__panel {
    opacity: 1; transform: none; pointer-events: auto;
  }
}
.dock__acts {
  display: flex; align-items: center; gap: 2px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  box-shadow: var(--sh-3);
  white-space: nowrap;
}
.dock__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: var(--r-full);
  font-size: var(--t-xs); font-weight: 600; color: var(--ink-2);
  cursor: pointer;
  transition: background-color var(--d2) var(--ease), color var(--d2) var(--ease);
}
.dock__link:hover { background: var(--ln-tint); color: var(--ln-deep); }
.dock__link svg { width: 16px; height: 16px; flex: none; }
/* 进度区：折叠时不占位；有记录后展开 */
.dock__status {
  order: -1;
  width: 100%;
  max-width: min(360px, 42vw);
  max-height: 240px; overflow-y: auto;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  animation: dock-in var(--d4) var(--ease-enter) both;
}
.dock__status[data-empty="true"] { display: none; }
@keyframes dock-in { from { opacity: 0; transform: translateY(8px); } }
.dock__empty { margin: 0; font-size: var(--t-xs); color: var(--ink-3); }
.wo__line {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: baseline; gap: var(--g2);
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  animation: wo-in var(--d4) var(--ease-enter) both;
}
.wo__line:last-child { border-bottom: 0; padding-bottom: 0; }
.wo__line:first-child { padding-top: 0; }
@keyframes wo-in { from { opacity: 0; transform: translateY(5px); } }
.wo__t { font-size: var(--t-min);` color: var(--ink-3); font-variant-numeric: tabular-nums; }
.wo__m { font-size: var(--t-xs); color: var(--ink); }
.wo__s { font-size: var(--t-min); font-weight: 600; }
.wo__line[data-state="run"] .wo__s { color: var(--brand-deep); }
.wo__line[data-state="done"] .wo__s { color: var(--ok-deep); }
.wo__line[data-state="fail"] .wo__s { color: var(--danger-deep); }
.wo__line[data-state="wait"] .wo__s { color: var(--warn-deep); }
.wo__line[data-state="run"] .wo__m::after {
  content: ""; display: inline-block; width: 7px; height: 14px;
  margin-left: 6px; vertical-align: -3px;
  background: var(--ln); opacity: 0.7;
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
/* 窄屏：坞在文档流内一行。空间紧，只留图标（文字隐藏，标题属性仍可读），避免折行 */
@media (max-width: 620px) {
  .dock { padding-inline: var(--g4); }
  .dock__acts { padding: 4px; }
  .dock__link span { display: none; }
  .dock__link { padding: 8px 11px; }
  .dock__link svg { width: 18px; height: 18px; }
}

/* ---------- 套准对照（拖动分隔对比前后） ---------- */

.compare { position: relative; user-select: none; touch-action: pan-y; }
.compare__stage {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--well);
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
}
/* 底图与上图都**绝对定位铺满 stage**：保证两层的"参照盒"完全一致。
   若只给底图 `width:100%;height:100%`，替换元素会优先保持内在纵横比，
   在 stage 高 ≠ 图高 时底图被压/纵向溢出（实测 738×572 容器里 900×788 图渲染成 738×646，
   纵向超出 74px 被 overflow:hidden 截掉，而 absolute+inset:0 的上图层仍是 738×572）——
   两图内绘区域不同 → 底大图小、错位。改为两层都用 inset:0 后，任何原图都同尺同位。 */
.compare__stage > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.compare__after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--x, 50%)); }
.compare__after img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.compare__seam {
  position: absolute; top: 0; bottom: 0; left: var(--x, 50%);
  width: 2px; margin-left: -1px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--hairline);
  pointer-events: none;
}
.compare__handle {
  position: absolute; top: 50%; left: var(--x, 50%);
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-full);
  background: var(--surface); color: var(--ink);
  box-shadow: var(--sh-3);
  cursor: ew-resize;
  transition: scale var(--d2) var(--ease-enter);
}
.compare__handle:hover { scale: 1.06; }
.compare__handle svg { width: 20px; height: 20px; }
.compare__tag {
  position: absolute; bottom: 12px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--scrim);
  color: #fff; font-size: var(--t-xs); font-weight: 600;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.compare__tag--l { left: 12px; }
.compare__tag--r { right: 12px; }
.compare__range { position: absolute; inset: 0; opacity: 0; pointer-events: none; }

/* 矢量转换：EPS/DXF/PDF 等浏览器无法渲染的格式，在对照区中央给出「不支持预览」提示 */
.compare__nopreview {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background: rgba(14, 47, 45, .42);
  backdrop-filter: blur(2px);
}
.compare__nopreview-card {
  max-width: 340px; padding: 24px 26px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); text-align: center;
  box-shadow: var(--sh-3);
}
.compare__nopreview-ico {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--brand-tint); color: var(--brand-deep);
}
.compare__nopreview-ico svg { width: 22px; height: 22px; }
.compare__nopreview-t { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.compare__nopreview-d { display: block; margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--ink-3); }

/* ---------- 说明列表（特性说明，韩系风格：顶部细线） ---------- */

.deflist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--g7); }
@media (max-width: 760px) { .deflist { grid-template-columns: 1fr; } }
.deflist__item { padding: var(--g5) 0; border-top: 2px solid var(--ink); }
.deflist__item h3 { font-size: var(--t-h3); margin-bottom: var(--g2); font-weight: 700; }
.deflist__item p { font-size: var(--t-sm); color: var(--ink-2); max-width: 52ch; }

/* ---------- 场景条（图文左右交替，韩系风格） ---------- */

.scene {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: var(--g7);
  padding: var(--g7) 0;
  border-bottom: 1px solid var(--line);
}
.scene:nth-child(even) .scene__media { order: 2; }
.scene:last-child { border-bottom: 0; }
@media (max-width: 800px) {
  .scene { grid-template-columns: 1fr; gap: var(--g4); }
  .scene:nth-child(even) .scene__media { order: 0; }
}
.scene__media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
}
.scene__body h3 { display: flex; align-items: baseline; gap: var(--g3); font-size: var(--t-h3); margin-bottom: var(--g3); font-weight: 700; }
.scene__no {
  font-size: var(--t-min); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ln-deep); background: var(--ln-tint);
  padding: 3px 9px; border-radius: var(--r-full);
}
.scene__body p { font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- 效果图框（韩系风格：圆角、柔和阴影） ---------- */

.frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
}
.frame img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.frame__cap {
  display: flex; align-items: center; justify-content: space-between; gap: var(--g3);
  padding: var(--g3) var(--g4);
  border-top: 1px solid var(--line);
  font-size: var(--t-xs); color: var(--ink-3);
}
.frame__tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-min); font-weight: 600; color: var(--ln-deep);
}
.frame__tag::before {
  content: ""; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--ln);
}

/* 双联对照 */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--g3); }
.duo figure { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--well); }
.duo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.duo figcaption {
  position: absolute; left: 8px; bottom: 8px;
  padding: 3px 10px; border-radius: var(--r-full);
  background: var(--scrim); color: #fff;
  font-size: var(--t-min); font-weight: 600;
}

/* ---------- 折叠（规格与限制，韩系风格） ---------- */

.acc { border-top: 1px solid var(--line); }
.acc__row { border-bottom: 1px solid var(--line); }
.acc__row summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--g4);
  padding: var(--g4) 0;
  font-size: var(--t-body); font-weight: 600;
  list-style: none;
  cursor: pointer;
  transition: color var(--d2) var(--ease);
}
.acc__row summary:hover { color: var(--ink-2); }
.acc__row summary::after {
  content: ""; width: 18px; height: 18px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform var(--d3) var(--ease);
}
.acc__row[open] summary::after { transform: rotate(45deg); }
.acc__body { padding: 0 0 var(--g5); font-size: var(--t-sm); color: var(--ink-2); max-width: 74ch; }

/* ---------- 相关功能卡片（韩系风格：柔和悬停） ---------- */

.opcard {
  display: block; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform var(--d3) var(--ease-enter), border-color var(--d3) var(--ease);
}
.opcard:hover { transform: translateY(-3px); border-color: var(--ln-tint); }
.opcard__media { position: relative; }
.opcard__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.opcard__line {
  position: absolute; left: 10px; top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.94);
  font-size: var(--t-min); font-weight: 700; color: var(--ln-deep);
  box-shadow: var(--sh-1);
}
.opcard__line::before { content: ""; width: 7px; height: 7px; border-radius: var(--r-full); background: var(--ln); }
.opcard__body { padding: var(--g4); }
.opcard__body h3 { font-size: var(--t-body); margin-bottom: 4px; font-weight: 700; }
.opcard__body p { font-size: var(--t-xs); color: var(--ink-3); }
.opcard__spec { display: inline-block; margin-top: var(--g3); font-size: var(--t-min); color: var(--ink-3); }

/* ---------- 表格（韩系风格：细线、柔和悬停） ---------- */

.tbl { font-size: var(--t-sm); }
.tbl th, .tbl td { padding: 12px var(--g4); text-align: left; border-bottom: 1px solid var(--line); }
.tbl thead th {
  background: var(--sunk);
  font-size: var(--t-min); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ine-3);
}
.tbl tbody tr:hover { background: var(--sunk); }
.tbl td.tbl__num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.tbl__name { font-weight: 600; }
.tbl__wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 徽标 / 状态（韩系风格：胶囊圆角） ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-full);
  background: var(--ln-tint); color: var(--ln-deep);
  font-size: var(--t-min); font-weight: 700;
}
.badge--neutral { background: var(--sunk); color: var(--ink-2); }
.badge--ok { background: var(--ok-tint); color: var(--ok-deep); }
.dot { width: 8px; height: 8px; border-radius: var(--r-full); background: currentColor; }

/* ---------- 分段按钮组（源站的"2 格 / 3 格 / 4 格"选择） ---------- */

.seg { display: grid; gap: var(--g2); }
.seg--1 { grid-template-columns: 1fr; }
.seg--2 { grid-template-columns: repeat(2, 1fr); }
.seg--3 { grid-template-columns: repeat(3, 1fr); }
.seg--4 { grid-template-columns: repeat(4, 1fr); }
/* 分段列数：3/4 列在 480px 以下才折成 2 列。
   原先阈值是 560px，但 560px 宽下 3 列每格仍有约 160px、4 列约 120px，
   放「2 张」「4K」「通用」这类短标签绰绰有余——过早折行会让分段凭空多占一行，
   把提交按钮挤出首屏（560×844 实测 vector-convert 超出 91px）。 */
@media (max-width: 480px) { .seg--3, .seg--4 { grid-template-columns: repeat(2, 1fr); } }

.seg__btn {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 2px;
  padding: 11px var(--g4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--d2) var(--ease), background-color var(--d2) var(--ease),
              transform var(--d2) var(--ease-enter);
}
.seg__btn:hover { border-color: var(--line-2); background: var(--sunk); }
.seg--1 .seg__btn { padding: var(--g4); }
.seg__l {font-size: var(--t-sm); font-weight: 600; color: var(--ink);text-align:center}
.seg__b, .seg__d { font-size: var(--t-min); color: var(--ink-3); line-height: 1.45; }
.seg__cost { font-size: var(--t-min); font-weight: 600; color: var(--ln-deep); font-variant-numeric: tabular-nums; }
.seg__time { font-size: var(--t-min);` color: var(--ink-3); }
/* 「分辨率 + 积分 + 耗时」三段并存的分段（超清放大的目标分辨率）。
   按钮内宽仅约 93px，两段文字并排放不下（会折行更乱），因此用**三行竖排 + 明确层级**：
     ① 分辨率——主标签，明显更大更重（这是用户在选的东西）
     ② 积分——强调色，中等
     ③ 耗时——弱化，上方一条细线把它与"这次要花多少"分隔开
   原样式三行同字号、等距堆叠，看不出主次（被判"样式有点乱"）。 */
.seg__btn:has(.seg__cost):has(.seg__time) { gap: 1px; padding: 9px 11px 8px; }
.seg__btn:has(.seg__cost):has(.seg__time) .seg__l {
  font-size: var(--t-h3); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25;
}
.seg__btn:has(.seg__cost):has(.seg__time) .seg__cost {
  font-size: var(--t-xs); font-weight: 700; line-height: 1.35;
}
.seg__btn:has(.seg__cost):has(.seg__time) .seg__time {
  width: 100%; margin-top: 3px; padding-top: 3px;
  border-top: 1px solid var(--line); font-size: var(--t-min); line-height: 1.3;
}
.seg__badge {
  position: absolute; top: 6px; right: 6px;
  padding: 2px 7px; border-radius: var(--r-full);
  background: var(--ln-tint); color: var(--ln-deep);
  font-size: 10px; font-weight: 700;
}
/* 选中态：加一圈本色描边 + 一层带偏移的本色柔光晕，让"选了哪个"一眼可见
   （此前只有淡底 + 1px 描边，在提亮后的近白底上几乎看不出）。 */
.seg__btn[aria-checked="true"] {
  border-color: var(--ln); background: var(--ln-tint);
  box-shadow: 0 0 0 1.5px var(--ln), 0 6px 16px -8px color-mix(in srgb, var(--ln) 55%, transparent);
}
.seg__btn[aria-checked="true"] .seg__l { color: var(--ln-deep); }
.seg__btn[aria-checked="true"] .seg__b,
.seg__btn[aria-checked="true"] .seg__d { color: var(--ln-deep); opacity: 0.85; }

/* ---------- 色块（证件照背景色，编辑风格：矩形代替胶囊） ---------- */

.swatches { display: flex; gap: var(--g3); }
.swatchbtn {
  display: inline-flex; align-items: center; gap: var(--g2);
  padding: 7px 12px 7px 8px;
  border: 2px solid var(--line-2);
  border-radius: 0;
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--d2) var(--ease), background-color var(--d2) var(--ease), box-shadow var(--d2) var(--ease), transform var(--d2) var(--ease);
}
.swatchbtn:hover { border-color: var(--ink); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(10,10,10,0.12); }
.swatchbtn__dot { width: 20px; height: 20px; border-radius: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.swatchbtn__l { font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.swatchbtn[aria-checked="true"] { border-color: var(--ln); background: var(--ln-tint); box-shadow: 0 0 0 1.5px var(--ln), 0 5px 14px -8px color-mix(in srgb, var(--ln) 55%, transparent); }
.swatchbtn[aria-checked="true"] .swatchbtn__l { color: var(--ln-deep); }

/* ---------- 换装卡片（带缩略图 + 女装/男装分组，韩系风格） ---------- */

.cardpick__tabs { display: flex; gap: var(--g2); margin-bottom: var(--g3); }
.cardpick__tab {
  padding: 6px 16px; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface);
  font-size: var(--t-xs); font-weight: 600; color: var(--ink-2);
  cursor: pointer;
}
/* 选中的分组 tab：底用 `--ln-deep`（而非本色）——本色偏浅时白字不足 4.5:1
   （青绿 h4 本色白字仅 3.74），deep 档对白 ≥5.4:1。 */
.cardpick__tab.is-on { background: var(--ln-deep); color: #fff; border-color: var(--ln-deep); }
.cardpick__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--g2); }
@media (max-width: 900px) { .cardpick__grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .cardpick__grid { grid-template-columns: repeat(3, 1fr); } }
.cardpick__item {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--sunk);
  overflow: hidden; cursor: pointer; padding: 0;
  transition: border-color var(--d2) var(--ease), transform var(--d2) var(--ease-enter);
}
.cardpick__item:hover { border-color: var(--line-2); transform: translateY(-1px); }
.cardpick__item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.cardpick__none {
  display: grid; place-items: center;
  width: 100%; aspect-ratio: 3/4;
  background: var(--sunk); color: var(--ln-deep);
  font-size: var(--t-xs); font-weight: 600;
}
.cardpick__name {
  display: block; padding: 5px 6px;
  font-size: 10px; color: var(--ink-3); line-height: 1.35;
  background: var(--surface);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cardpick__item[aria-pressed="true"] { border-color: var(--ln); box-shadow: 0 0 0 2px var(--ln-tint); }
.cardpick__item[aria-pressed="true"] .cardpick__name { color: var(--ln-deep); font-weight: 600; }

/* ---------- 下拉选择按钮（源站的"选择 xxx"按钮 + 弹出列表，韩系风格） ---------- */

.pickrow { position: relative; }
.pickbtn {
  display: inline-flex; align-items: center; gap: var(--g2);
  min-height: 42px; padding: 0 14px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  font-size: var(--t-sm); font-weight: 600; color: var(--ink);
  cursor: pointer; text-align: left;
  transition: border-color var(--d2) var(--ease);
}
.pickbtn:hover { border-color: var(--ink-4); }
.pickbtn__swatch { width: 18px; height: 18px; border-radius: var(--r-xs); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); flex: none; }
.pickbtn__chev { width: 16px; height: 16px; margin-left: auto; opacity: 0.6; transition: transform var(--d2) var(--ease); }
.pickrow[data-open="true"] .pickbtn__chev { transform: rotate(180deg); }
.picklist {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: var(--z-drop);
  max-height: min(320px, calc(100vh - 160px)); overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-4);
  padding: var(--g2);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--d2) var(--ease-enter), transform var(--d2) var(--ease-enter), visibility 0s linear var(--d2);
}
.pickrow[data-open="true"] .picklist { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
/* 下方空间不足时向上翻转（core.js 写入 data-flip） */
.pickrow[data-open="true"][data-flip="up"] .picklist {
  top: auto; bottom: calc(100% + 6px);
  transform-origin: bottom;
}
.picklist__opt {
  display: flex; align-items: center; gap: var(--g2);
  width: 100%; padding: 9px 10px;
  border-radius: var(--r-sm);
  text-align: left; cursor: pointer;
  transition: background-color var(--d2) var(--ease);
}
.picklist__opt:hover { background: var(--sunk); }
.picklist__swatch { width: 16px; height: 16px; border-radius: var(--r-xs); flex: none; }
.picklist__text { min-width: 0; }
.picklist__text b { display: block; font-size: var(--t-sm); font-weight: 600; }
.picklist__text small { font-size: var(--t-min); color: var(--ink-3); }
.picklist__cost { margin-left: auto; font-size: var(--t-min); font-weight: 600; color: var(--ln-deep); font-variant-numeric: tabular-nums; }
.picklist__tick { width: 16px; height: 16px; color: var(--ln); opacity: 0; }
.picklist__opt[aria-selected="true"] { background: var(--ln-tint); }
.picklist__opt[aria-selected="true"] .picklist__tick { opacity: 1; }

/* ---------- 滑杆（源站的刻度滑杆，带刻度说明） ---------- */

.slider-field__top { display: flex; align-items: baseline; justify-content: space-between; }
.slider-field__out {
  font-size: var(--t-xs); font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--ink); margin-left: auto;
}
.slider-field__scale {
  display: flex; justify-content: space-between;
  margin-top: 2px;
  font-size: 10px;` color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.slider-field__hint { margin-top: 5px; font-size: 10px; line-height: 1.4;` color: var(--ink-3); }

/* ---------- 勾选行 ---------- */

.checkline {
  display: flex; align-items: flex-start; gap: var(--g3);
  cursor: pointer;
}
.checkline input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--ink); flex: none; }
.checkline b { display: block; font-size: var(--t-sm); font-weight: 600; }
.checkline small { display: block; margin-top: 2px; font-size: var(--t-min); color: var(--ink-3); }

/* ---------- 字段（半宽） ---------- */

.field--half { flex: 1 1 0; min-width: 0; }

/* ---------- 色标行 ---------- */

.swatch { display: inline-flex; align-items: center; gap: var(--g2); }
.swatch__chip {
  width: 14px; height: 14px; flex: none;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.swatch__code { font-size: var(--t-min); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 墨条（笔刷档位示意） ---------- */

.brushstroke {
  display: block; width: 100%; height: var(--h, 8px);
  border-radius: 0;
  background: linear-gradient(90deg, var(--ln), var(--ln-deep));
  opacity: 0.85;
}
