/* ==========================================================================
   主题层 · theme.css
   --------------------------------------------------------------------------
   两套皮肤，只换"看起来怎么样"，不动任何布局、功能与交互：

     :root                       现代（默认，取值与原界面完全一致）
     html[data-theme="tailor"]   古代裁缝铺（宣纸 / 栗木 / 朱砂 / 楷体）

   切换入口由 theme.js 注入顶栏，选择记在 localStorage.doll_theme，
   四个页面共用同一个开关，切过去也切得回来。
   ========================================================================== */

/* -------------------------------------------------------------- 现代（兜底）
   图片量体页不引 styles.css，这里补一份同值兜底，保证 4 个页面都能换肤 */
:root {
  /* 娃衣的世界不该是科技蓝。
     奶油底 + 莓果玫瑰 + 大圆角 + 绒面噪点：
     像一块摊开的软垫，娃娃和布料都搁在上面。
     只改观感，布局与功能一律不动。 */
  --bg: #f5ece1;
  --panel: #fffdfa;
  --surface: #fffdfa;
  --surface-2: #f6ece1;
  --surface-3: #fdf8f2;
  --surface-4: #faf3ec;
  --surface-sunken: #fdf7f1;
  --hover-bg: #fbf3ea;
  --field-bg: #fffefc;
  --thumb-bg: #f6ece1;

  /* 暖线：比灰线更像棉布上的折痕 */
  --line: #ecdfd2;
  --line-strong: #dcc8b6;
  --line-soft: #f5ece2;

  /* 可可字 */
  --text: #3b322d;
  --text-2: #6d5f56;
  --text-3: #a2918a;

  /* 草莓粉：比原来的莓果亮一档，甜但不刺眼，白字仍然压得住 */
  --brand: #c94a72;
  --brand-hover: #b23f65;
  --brand-soft: #fdeef4;
  --brand-weak: rgba(201, 74, 114, .10);
  --brand-ring: rgba(201, 74, 114, .18);
  --brand-line: #f6cedd;
  --on-brand: #fffdfc;
  --btn-disabled-bg: #edcdd8;

  /* 糖果七色：只用于点缀（顶栏、色带、圆点、数字），
     不用于正文与表格底色——斑斓是外壳的事，数据要看得清 */
  --candy-1: #f0669b;   /* 草莓 */
  --candy-2: #ef6a52;   /* 珊瑚（那件红领子） */
  --candy-3: #f7a83c;   /* 蜜橘 */
  --candy-4: #f2c93f;   /* 柠檬 */
  --candy-5: #3fbf9a;   /* 薄荷 */
  --candy-6: #5aa9e6;   /* 天蓝 */
  --candy-7: #9b8ce0;   /* 葡萄（那条蓝紫格裙） */
  --candy-rainbow: linear-gradient(90deg,
    var(--candy-1) 0%, var(--candy-2) 18%, var(--candy-3) 34%, var(--candy-4) 50%,
    var(--candy-5) 66%, var(--candy-6) 82%, var(--candy-7) 100%);

  /* 状态 */
  --ok: #4f8a6b;
  --ok-bg: #eef7f1;
  --warn: #b8722e;
  --warn-bg: #fdf4e6;
  --warn-line: #f0d9b3;

  /* 裁片 */
  --piece-line: #b8617a;
  --piece-fill: #fdf1f4;
  --seam-line: #ddb3c1;
  --grain-line: #b8a294;

  /* 奶油顶栏 */
  --topbar-bg: linear-gradient(180deg, #fffdfa 0%, #fdf5ed 100%);
  --logo-bg: linear-gradient(135deg, #eeacbc, #b8617a);
  --logo-ink: #fffdfb;
  --pill-glass: rgba(255, 253, 250, .95);
  --overlay: rgba(59, 50, 45, .38);

  /* 圆一点，软一点：毛绒没有锐角 */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font-ui: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: inherit;
  /* 标题字体（站酷快乐体，本地自托管，见 fonts/zkq/font.css）。
     只给"看的字"用——品牌名、步骤名、弹窗标题、主按钮。
     表格、金额、尺寸、输入框一律不换：那部分要等宽、要一眼看清。 */
  --font-fun: "ZKQ", "ZCOOL KuaiLe", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------------------------------------------------------------- 主题开关 */
.theme-switch {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  font-size: 11.5px; font-family: inherit; line-height: 1;
  cursor: pointer; white-space: nowrap; flex: 0 0 auto;
  transition: border-color .12s, color .12s, background .12s;
}
.theme-switch:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.theme-switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.theme-switch svg { width: 13px; height: 13px; display: block; flex: 0 0 auto; }
.theme-switch .ts-label { letter-spacing: .2px; }

/* ==========================================================================
   毛绒（Plush）
   --------------------------------------------------------------------------
   古风靠"木 vs 纸"的明暗差分层；毛绒靠"绒布台面 vs 奶油软垫"的圆润感：
   底板是燕麦色短绒，面板是一块块浮起来的软垫，没有一处锐角。
   全部用背景、圆角、阴影与伪元素完成 —— 不碰尺寸与位置。
   ========================================================================== */

/* 台面：燕麦底 + 一层短绒 + 顶部柔光，像娃娃躺的绒布 */
html:not([data-theme="tailor"]) body {
  background-color: var(--bg);
  background-image:
    url("deco-fuzz.svg?v=2"),
    radial-gradient(130% 78% at 50% -8%, rgba(255, 250, 241, .92) 0%, rgba(255, 250, 241, 0) 64%),
    radial-gradient(100% 70% at 50% 118%, rgba(198, 165, 143, .18) 0%, rgba(198, 165, 143, 0) 62%);
  background-size: 260px 260px, 100% 100%, 100% 100%;
  background-repeat: repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed;
}

/* 顶栏：一条奶油帘子，下沿一道软影 */
html:not([data-theme="tailor"]) .topbar {
  border-bottom-color: var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 10px 20px -18px rgba(122, 92, 74, .8);
}
/* 招牌是一颗毛球，不是方块 */
html:not([data-theme="tailor"]) .topbar .logo {
  border-radius: 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 3px 9px -3px rgba(184, 97, 122, .7);
}

/* 面板：奶油软垫 —— 中间略鼓、边缘略沉，下沿压出一条"厚度"，才像塞了棉 */
html:not([data-theme="tailor"]) .panel,
html:not([data-theme="tailor"]) .lib-panel,
html:not([data-theme="tailor"]) .atlas,
html:not([data-theme="tailor"]) .save-dlg {
  border-color: var(--line);
  background-image: radial-gradient(130% 105% at 50% -6%,
    #ffffff 0%, var(--panel) 52%, #fdf7f0 100%);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -4px 8px -7px rgba(170, 138, 118, .45),
    0 3px 0 -1px #f3e5d8,
    0 9px 20px -12px rgba(122, 92, 74, .75);
}

/* 面板标题：软垫顶端那一段受光 */
html:not([data-theme="tailor"]) .panel-head {
  background: linear-gradient(180deg, #fffefd 0%, #fdf8f3 100%);
}

/* 主按钮：圆成一颗糖，底下还压着一层糖衣的厚度 */
html:not([data-theme="tailor"]) .primary {
  border-radius: 999px;
  background: linear-gradient(180deg, #c9758d 0%, var(--brand) 58%, #ab5570 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .32),
    0 2px 0 #9a4a61,
    0 8px 16px -9px rgba(184, 97, 122, .9);
}
html:not([data-theme="tailor"]) .primary:hover {
  background: linear-gradient(180deg, #bd6780 0%, var(--brand-hover) 58%, #96435c 100%);
}
html:not([data-theme="tailor"]) .primary:active {
  box-shadow:
    inset 0 2px 6px rgba(110, 55, 74, .32),
    0 1px 0 #9a4a61;
}

/* 分段按钮与标签：比面板更圆，但不至于变成药丸 */
html:not([data-theme="tailor"]) .segmented button { border-radius: 10px; }
html:not([data-theme="tailor"]) .cat-tabs button { border-radius: 999px; }

/* 输入框：压进软垫里的一点点凹陷 */
html:not([data-theme="tailor"]) input[type="number"],
html:not([data-theme="tailor"]) input[type="text"],
html:not([data-theme="tailor"]) select {
  box-shadow: inset 0 1px 2px rgba(122, 92, 74, .07);
}

/* 舞台：一块内凹的软垫，娃娃躺在上面 */
html:not([data-theme="tailor"]) .stage {
  background: var(--surface-4);
  box-shadow:
    inset 0 2px 9px rgba(122, 92, 74, .09),
    inset 0 0 0 1px rgba(236, 223, 210, .9);
}

/* 面板标题：不用硬线断开，改用一道软影，像软垫上压出的折痕 */
html:not([data-theme="tailor"]) .panel-head {
  border-bottom-color: rgba(236, 223, 210, .95);
  box-shadow: 0 2px 4px -3px rgba(122, 92, 74, .45);
}

/* 内包边：软垫沿边压出来的一圈白线 */
html:not([data-theme="tailor"]) .panel {
  outline: 1px solid rgba(255, 255, 255, .72);
  outline-offset: -4px;
}

/* 滑块：粉色的圆糖，轨道压进软垫里 */
html:not([data-theme="tailor"]) input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 18px; background: transparent; cursor: pointer;
}
html:not([data-theme="tailor"]) input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 1px 2px rgba(122, 92, 74, .16);
}
html:not([data-theme="tailor"]) input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px; margin-top: -4.5px;
  border-radius: 50%;
  background: linear-gradient(180deg, #cb7890, var(--brand));
  border: 2px solid #fffdfa;
  box-shadow: 0 2px 5px -1px rgba(184, 97, 122, .75);
}

/* 主题开关也做成一颗浅色小糖 */
html:not([data-theme="tailor"]) .theme-switch {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(122, 92, 74, .07), inset 0 1px 0 #fff;
}

/* 滚动条：细、暖、不抢眼 */
html:not([data-theme="tailor"]) ::-webkit-scrollbar { width: 9px; height: 9px; }
html:not([data-theme="tailor"]) ::-webkit-scrollbar-track { background: transparent; }
html:not([data-theme="tailor"]) ::-webkit-scrollbar-thumb {
  background: #dcc9b8; border-radius: 999px;
  border: 2px solid transparent; background-clip: content-box;
}
html:not([data-theme="tailor"]) ::-webkit-scrollbar-thumb:hover { background: #c9ae99; background-clip: content-box; }

/* 空白处：右下角搁一个毛线球、两根棒针和一颗纽扣，不跟居中提示文字抢地方。
   空态给一个最小高度，水印才有落脚的地方（也避免矮面板里被裁成半截） */
html:not([data-theme="tailor"]) .result-col .empty { min-height: 150px; }
html:not([data-theme="tailor"]) .result-col .empty,
html:not([data-theme="tailor"]) .lib-empty { position: relative; overflow: hidden; }
html:not([data-theme="tailor"]) .result-col .empty::after,
html:not([data-theme="tailor"]) .lib-empty::after {
  content: "";
  position: absolute;
  right: 14px; bottom: 10px;
  width: 112px; height: 71px;
  background: url("deco-plush.svg?v=1") no-repeat right bottom / contain;
  opacity: .22;
  pointer-events: none;
}

/* ==========================================================================
   糖果斑斓
   --------------------------------------------------------------------------
   "娃衣该是色彩斑斓、可爱的东西"——所以台面不是一块奶油，是一张撒了糖霜的
   手工桌：粉、天蓝、薄荷、柠檬、葡萄五团光斑压在最底下，绒布纹还在上面。

   分寸只有一条：**颜色进外壳，不进数据**。
   顶栏、logo、面板上沿、面板标题、圆点、选中的按钮可以随便花；
   表格、数字、尺寸一律保持深字浅底——再可爱，算错一块钱也没人觉得可爱。
   ========================================================================== */

/* 台面：奶油底上撒五团糖霜，缓慢流动，像光从窗帘缝里晒进来 */
html:not([data-theme="tailor"]) body {
  background-color: #fdf6f1;
  background-image:
    url("deco-fuzz.svg?v=2"),
    radial-gradient(820px 540px at -2% -12%, rgba(255, 154, 198, .78), rgba(255, 154, 198, 0) 66%),
    radial-gradient(760px 500px at 102% -8%, rgba(150, 202, 255, .70), rgba(150, 202, 255, 0) 64%),
    radial-gradient(820px 560px at 48% 114%, rgba(144, 236, 200, .70), rgba(144, 236, 200, 0) 66%),
    radial-gradient(600px 460px at 94% 66%, rgba(255, 226, 132, .66), rgba(255, 226, 132, 0) 64%),
    radial-gradient(580px 440px at 4% 80%, rgba(196, 172, 255, .60), rgba(196, 172, 255, 0) 66%),
    radial-gradient(130% 78% at 50% -8%, rgba(255, 252, 246, .55), rgba(255, 252, 246, 0) 62%);
  background-size: 260px 260px, auto, auto, auto, auto, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed, fixed, fixed, fixed, fixed;
}

/* 顶栏：白帘子，底下一道会流动的彩虹线 */
html:not([data-theme="tailor"]) .topbar {
  position: relative;
  background:
    linear-gradient(100deg,
      rgba(255, 210, 230, .58) 0%,
      rgba(255, 233, 210, .46) 20%,
      rgba(255, 249, 210, .40) 40%,
      rgba(212, 246, 230, .46) 62%,
      rgba(212, 231, 255, .46) 82%,
      rgba(231, 218, 255, .52) 100%),
    linear-gradient(180deg, #ffffff 0%, #fffaf6 100%);
  border-bottom-color: transparent;
  box-shadow:
    inset 0 1px 0 #fff,
    0 1px 0 rgba(240, 214, 226, .9),
    0 8px 18px -16px rgba(201, 74, 114, .6);
}
html:not([data-theme="tailor"]) .topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background-image: var(--candy-rainbow);
  background-size: 100% 100%;
  box-shadow: 0 2px 10px -2px rgba(240, 102, 155, .55);
  pointer-events: none;
}

/* 招牌：一颗彩虹糖。外圈七彩、内芯奶油、字用深粉，
   26px 的时候看不出颜色，所以放大到 34px——它现在是"娃咔咔"的脸 */
html:not([data-theme="tailor"]) .topbar .logo {
  width: 34px; height: 34px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 46%, #fffdfb 0 54%, rgba(255, 253, 251, 0) 55%),
    conic-gradient(from 12deg,
      var(--candy-1), var(--candy-2), var(--candy-3), var(--candy-4),
      var(--candy-5), var(--candy-6), var(--candy-7), var(--candy-1));
  color: #b23f65;
  font-size: 15px; font-weight: 800; letter-spacing: -.5px;
  text-shadow: 0 1px 0 #fff;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .92),
    0 4px 12px -3px rgba(201, 74, 114, .55),
    0 1px 0 rgba(255, 255, 255, .9);
  transform: rotate(-5deg);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
html:not([data-theme="tailor"]) .topbar .logo:hover { transform: rotate(5deg) scale(1.06); }
a.logo { text-decoration: none; }

/* 品牌名：三个字三种颜色，像三颗不同口味的糖 */
html:not([data-theme="tailor"]) .brand { font-size: 15px; font-weight: 700; letter-spacing: .6px; }
html:not([data-theme="tailor"]) .brand-name { display: inline-flex; }
html:not([data-theme="tailor"]) .brand-name i {
  font-style: normal;
  background: linear-gradient(135deg, var(--c1, var(--candy-1)), var(--c2, var(--candy-2)));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: none;
}
html:not([data-theme="tailor"]) .brand-name i:nth-child(1) { --c1: #f2739f; --c2: #d93a6c; }
html:not([data-theme="tailor"]) .brand-name i:nth-child(2) { --c1: #f9a63f; --c2: #ee6a4f; }
html:not([data-theme="tailor"]) .brand-name i:nth-child(3) { --c1: #a892ea; --c2: #6f8fe4; }
html:not([data-theme="tailor"]) .brand small { font-size: 11px; color: var(--text-3); margin-top: 1px; }

/* 面板：上沿一条彩虹，像每块布都露出一道包边 */
html:not([data-theme="tailor"]) .panel,
html:not([data-theme="tailor"]) .lib-panel,
html:not([data-theme="tailor"]) .atlas,
html:not([data-theme="tailor"]) .save-dlg {
  position: relative;
}
html:not([data-theme="tailor"]) .panel::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background-image: var(--candy-rainbow);
  background-size: 160% 100%;
  opacity: .95;
  pointer-events: none;
  z-index: 2;
}

/* 三列各偏一个色系：左边粉、中间柠檬、右边薄荷。
   只染到极淡——淡到打印出来仍是白纸，但在屏幕上一眼分得出三块 */
html:not([data-theme="tailor"]) .layout > :nth-child(1) .panel,
html:not([data-theme="tailor"]) .layout > :nth-child(1).panel {
  background-image: radial-gradient(135% 108% at 50% -8%, #ffffff 0%, #fffafd 48%, #fdeff6 100%);
}
html:not([data-theme="tailor"]) .layout > :nth-child(2) .panel,
html:not([data-theme="tailor"]) .layout > :nth-child(2).panel {
  background-image: radial-gradient(135% 108% at 50% -8%, #ffffff 0%, #fffdf6 48%, #fdf5e2 100%);
}
html:not([data-theme="tailor"]) .layout > :nth-child(3) .panel,
html:not([data-theme="tailor"]) .layout > :nth-child(3).panel {
  background-image: radial-gradient(135% 108% at 50% -8%, #ffffff 0%, #fafefc 48%, #eaf8f2 100%);
}

/* 三列各偏一个色系，一眼分得出"看模特 / 调参数 / 看结果" */
html:not([data-theme="tailor"]) .layout > :nth-child(1) .panel-head {
  background: linear-gradient(180deg, #fffafc 0%, #fdeff6 100%);
}
html:not([data-theme="tailor"]) .layout > :nth-child(2) .panel-head {
  background: linear-gradient(180deg, #fffdf7 0%, #fdf6e6 100%);
}
html:not([data-theme="tailor"]) .layout > :nth-child(3) .panel-head {
  background: linear-gradient(180deg, #f9fdfb 0%, #ecf9f3 100%);
}

/* 面板标题前那颗糖 */
html:not([data-theme="tailor"]) .panel-head::before {
  content: "";
  flex: 0 0 auto;
  width: 7px; height: 7px; border-radius: 50%;
  background: conic-gradient(from 0deg,
    var(--candy-1), var(--candy-3), var(--candy-4), var(--candy-5),
    var(--candy-6), var(--candy-7), var(--candy-1));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 1px 3px rgba(201, 74, 114, .28);
}

/* 标题下面走一道虚线：像裁缝画在布上的粉笔线，比实线软 */
html:not([data-theme="tailor"]) .panel-head {
  border-bottom: 1px dashed rgba(201, 74, 114, .26);
}

/* 品类页签：没选中的也不是一片米灰，各是各的淡彩 */
html:not([data-theme="tailor"]) .cat-tabs button { border-color: transparent; }
html:not([data-theme="tailor"]) .cat-tabs button:nth-child(2):not(.active) { background: #fdeef4; color: #a85171; }
html:not([data-theme="tailor"]) .cat-tabs button:nth-child(3):not(.active) { background: #fdf4e2; color: #9a7534; }
html:not([data-theme="tailor"]) .cat-tabs button:nth-child(4):not(.active) { background: #eaf7f1; color: #3f7f68; }
html:not([data-theme="tailor"]) .cat-tabs button:nth-child(5):not(.active) { background: #eef4fd; color: #3f6b96; }
html:not([data-theme="tailor"]) .cat-tabs button:nth-child(6):not(.active) { background: #f3f0fd; color: #6a5a9c; }

/* 模特卡片：左边一条细细的彩色书签，按顺序换味。
   放左边是因为右上角永远被「实测/旧版」标签占着，圆点会打架。
   它只是标记，不参与任何状态——选中态仍然靠粉底和描边 */
html:not([data-theme="tailor"]) .model-card { border-radius: 12px; }
html:not([data-theme="tailor"]) .model-card .card-fig {
  background: radial-gradient(circle at 50% 64%, rgba(255, 210, 230, .85), rgba(255, 210, 230, 0) 72%);
  border-radius: 10px;
}
/* 图例里的人形也换成暖粉：蓝灰色的小人搁在糖果桌上，像没上色的样衣 */
html:not([data-theme="tailor"]) .model-card .card-fig svg .fig-body {
  fill: #ffe4ef; stroke: #d79cb6;
}
html:not([data-theme="tailor"]) .model-card::after {
  content: "";
  position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--candy-1); opacity: .7;
}
html:not([data-theme="tailor"]) .model-card:nth-child(6n+2)::after { background: var(--candy-3); }
html:not([data-theme="tailor"]) .model-card:nth-child(6n+3)::after { background: var(--candy-5); }
html:not([data-theme="tailor"]) .model-card:nth-child(6n+4)::after { background: var(--candy-6); }
html:not([data-theme="tailor"]) .model-card:nth-child(6n+5)::after { background: var(--candy-7); }
html:not([data-theme="tailor"]) .model-card:nth-child(6n)::after { background: var(--candy-4); }
html:not([data-theme="tailor"]) .model-card.selected {
  background: linear-gradient(180deg, #fff8fb 0%, #fdeaf2 100%);
  box-shadow: 0 0 0 1px var(--brand) inset, 0 4px 12px -8px rgba(201, 74, 114, .8);
}
html:not([data-theme="tailor"]) .model-card.selected::after { opacity: 1; }

/* 选中的按钮：一颗草莓软糖，压一层糖衣厚度 */
html:not([data-theme="tailor"]) .segmented button.active,
html:not([data-theme="tailor"]) .cat-tabs button.active {
  background: linear-gradient(180deg, #e8698e 0%, var(--brand) 62%, #b23f65 100%);
  border-color: transparent;
  color: var(--on-brand);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    0 2px 0 #a83a5e,
    0 6px 14px -8px rgba(201, 74, 114, .9);
}
html:not([data-theme="tailor"]) .segmented button.active { text-shadow: 0 1px 0 rgba(140, 44, 74, .35); }

/* 主按钮：同一颗糖的加大版 */
html:not([data-theme="tailor"]) .primary {
  background: linear-gradient(180deg, #ea6c90 0%, var(--brand) 58%, #b23f65 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    0 2px 0 #a83a5e,
    0 8px 18px -9px rgba(201, 74, 114, .85);
}
html:not([data-theme="tailor"]) .primary:hover {
  background: linear-gradient(180deg, #e05f85 0%, var(--brand-hover) 58%, #a03659 100%);
}

/* 顶栏的胶囊：白底彩边，各是各的颜色 */
html:not([data-theme="tailor"]) .topbar .chip {
  background: #fff;
  border: 1px solid #f2dfe8;
  box-shadow: 0 1px 2px rgba(160, 110, 130, .08);
}
html:not([data-theme="tailor"]) .topbar .chip .dot.on { background: var(--candy-5); box-shadow: 0 0 0 3px rgba(63, 191, 154, .16); }
html:not([data-theme="tailor"]) .topbar .chip .dot.off { background: var(--candy-2); box-shadow: 0 0 0 3px rgba(239, 106, 82, .16); }
html:not([data-theme="tailor"]) .topbar .tryon-chip {
  background: linear-gradient(180deg, #f7f2ff, #efe7ff);
  border-color: #e0d3ff;
  color: #6a4dbb;
}
html:not([data-theme="tailor"]) .topbar .lib-entry {
  border-color: #d9e9ff;
  background: linear-gradient(180deg, #f7fbff, #eaf4ff);
  color: #3f76b5;
}
html:not([data-theme="tailor"]) .topbar .lib-entry:hover {
  border-color: var(--candy-6); color: #2f66a5; background: #eaf4ff;
}
html:not([data-theme="tailor"]) .topbar .lib-badge {
  /* 天蓝是"图库"这条入口的专属色，不跟草莓抢；
     但做成一颗糖：斜向渐变 + 顶部高光 + 一点点自己的影子 */
  background: linear-gradient(160deg, #7cc0f5, #4689d4);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 1px 3px -1px rgba(70, 137, 212, .7);
}
html:not([data-theme="tailor"]) .topbar .link-btn:hover {
  border-color: var(--brand); color: var(--brand);
  background: linear-gradient(180deg, #fff8fb, #fdeef4);
}

/* 指标数字：四个数四种颜色。数字本身不变，只是让"高/胸/用量/成本"别糊成一片 */
html:not([data-theme="tailor"]) .metrics { background: #f7e9f0; }
html:not([data-theme="tailor"]) .metric:nth-child(1) .v { color: #d94570; }
html:not([data-theme="tailor"]) .metric:nth-child(2) .v { color: #d9822a; }
html:not([data-theme="tailor"]) .metric:nth-child(3) .v { color: #2f9a7c; }
html:not([data-theme="tailor"]) .metric:nth-child(4) .v { color: #3d7fbf; }

/* 表头：一层极淡的粉，让长表格也有"手账"的感觉，但字仍然是深色 */
html:not([data-theme="tailor"]) th {
  background: #fdf4f8;
  color: #9c7181;
}
html:not([data-theme="tailor"]) tbody tr:nth-child(even) td { background: #fffbfe; }

/* 没被选中的分段按钮：淡粉的边，别是一片惨白 */
html:not([data-theme="tailor"]) .segmented button:not(.active) {
  background: #fffdfe;
  border-color: #f2dfe9;
}
html:not([data-theme="tailor"]) .segmented button:not(.active):hover {
  border-color: var(--brand); color: var(--brand); background: #fff8fb;
}

/* 总价：糖果红，比周围都重 */
html:not([data-theme="tailor"]) .cost { background: linear-gradient(180deg, #fffafc, #fdf0f5); }
html:not([data-theme="tailor"]) .cost .v { color: #c43663; }

/* 滚动条：从粉走到紫的一条小糖纸 */
html:not([data-theme="tailor"]) ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f6b8cd, #d9c6f5);
  background-clip: content-box;
}
html:not([data-theme="tailor"]) ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f093b4, #c3a8ee);
  background-clip: content-box;
}

/* 空态水印后面垫一团糖霜，别让大白块显得冷 */
html:not([data-theme="tailor"]) .result-col .empty {
  background:
    radial-gradient(300px 200px at 50% 0%, rgba(255, 214, 232, .5), rgba(255, 214, 232, 0) 70%),
    radial-gradient(260px 180px at 20% 100%, rgba(206, 232, 255, .45), rgba(206, 232, 255, 0) 72%);
}

/* 主题开关：一颗浅色小糖，旁边写"布庄" */
html:not([data-theme="tailor"]) .theme-switch:hover {
  border-color: var(--brand); color: var(--brand);
  background: linear-gradient(180deg, #fff8fb, #fdeef4);
}

/* 换装页：三栏也各偏一个色系，栏顶照例一条彩虹包边。
   样衣台粉、开单柠檬、试衣镜薄荷——和算料页同一套语言，切过来不觉得换了软件 */
html:not([data-theme="tailor"]) .tryon-rail,
html:not([data-theme="tailor"]) .tryon-side {
  background-image:
    var(--candy-rainbow),
    radial-gradient(120% 92% at 50% 0%, #ffffff 0%, #fffafd 46%, #fdeff6 100%);
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 3px, 100% 100%;
  background-position: top left, top left;
}
html:not([data-theme="tailor"]) .tryon-side {
  background-image:
    var(--candy-rainbow),
    radial-gradient(120% 92% at 50% 0%, #ffffff 0%, #fffdf6 46%, #fdf5e4 100%);
}
html:not([data-theme="tailor"]) .tryon-main { background: #f7fdfa; }
html:not([data-theme="tailor"]) .tryon-main .stage {
  background-image:
    var(--candy-rainbow),
    radial-gradient(120% 96% at 50% 0%, #ffffff 0%, #fbfefd 52%, #eefaf5 100%);
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 3px, 100% 100%;
  background-position: top left, top left;
}
html:not([data-theme="tailor"]) .tryon-main .stage.idle {
  background-image:
    var(--candy-rainbow),
    radial-gradient(520px 320px at 50% 20%, rgba(255, 214, 232, .55), rgba(255, 214, 232, 0) 70%),
    radial-gradient(420px 280px at 12% 100%, rgba(168, 226, 255, .4), rgba(168, 226, 255, 0) 72%),
    radial-gradient(120% 96% at 50% 0%, #ffffff 0%, #fbfefd 52%, #eefaf5 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: 100% 3px, auto, auto, 100% 100%;
  background-position: top left, center, bottom left, top left;
}

/* 报价单列表：跟模特卡一样，左边一条彩色书签，一行一个味 */
html:not([data-theme="tailor"]) .q-item {
  position: relative; border-radius: 12px; overflow: hidden;
}
html:not([data-theme="tailor"]) .q-item::before {
  content: "";
  position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--candy-1); opacity: .7;
}
html:not([data-theme="tailor"]) .q-item:nth-child(4n+2)::before { background: var(--candy-6); }
html:not([data-theme="tailor"]) .q-item:nth-child(4n+3)::before { background: var(--candy-5); }
html:not([data-theme="tailor"]) .q-item:nth-child(4n)::before { background: var(--candy-7); }
html:not([data-theme="tailor"]) .q-item.selected {
  background: linear-gradient(180deg, #fff8fb 0%, #fdeaf2 100%);
  box-shadow: 0 0 0 1px var(--brand) inset, 0 4px 12px -8px rgba(201, 74, 114, .8);
}
html:not([data-theme="tailor"]) .q-thumb { border-radius: 10px; }

/* ==========================================================================
   字形与图标：把"看的字"也圆起来
   --------------------------------------------------------------------------
   用户原话："这些字有更网红的字体吗"，配的是手写马克笔的店招照片。
   落到网页上最接近那口气的，是站酷快乐体——笔画圆、字面胖、带一点手写的歪，
   正好是娃衣该有的样子（小红书 / 手账那一挂，不是公文那一挂）。

   字体本地自托管（fonts/zkq），Google Fonts 把中文按 unicode-range 切成 93 片，
   这里全下下来了，浏览器只取页面上真正出现的那几片，通常 2~4 片。
   CDN 挂、断网都照样显示，不会突然退回宋体。

   边界还是那条：**只换"看的字"，不换"对的数"**。
   表格、金额、尺寸、输入框一律原样——圆体没有等宽数字，排一列价格会歪，
   而这一页最重要的就是那几列数。
   ========================================================================== */

html:not([data-theme="tailor"]) .brand-name,
html:not([data-theme="tailor"]) .brand-name i,
html:not([data-theme="tailor"]) .panel-head,
html:not([data-theme="tailor"]) .step-head,
html:not([data-theme="tailor"]) .step-head i,
html:not([data-theme="tailor"]) .lib-entry,
html:not([data-theme="tailor"]) .lib-badge,
html:not([data-theme="tailor"]) .chip,
html:not([data-theme="tailor"]) .link-btn,
html:not([data-theme="tailor"]) .mini-link,
html:not([data-theme="tailor"]) .recent-more,
html:not([data-theme="tailor"]) .drop-hint b,
html:not([data-theme="tailor"]) .lib-pill,
html:not([data-theme="tailor"]) button.primary,
html:not([data-theme="tailor"]) h3 {
  font-family: var(--font-fun);
}

/* 品牌名：放大一点、拉开字距，三个字才有"招牌"感。
   字重必须给 400——快乐体只有一档粗细，写 700 会让浏览器自己"加粗"，
   「嘟」这种左右结构的字会糊成一团的小方块，18px 下最明显。 */
html:not([data-theme="tailor"]) .brand { font-size: 18px; letter-spacing: 2px; }
html:not([data-theme="tailor"]) .brand-name { font-weight: 400; }
html:not([data-theme="tailor"]) .brand-name i { padding-right: 1px; }
html:not([data-theme="tailor"]) .brand small { letter-spacing: 0; }

html:not([data-theme="tailor"]) .panel-head { font-size: 13.5px; letter-spacing: .4px; }
html:not([data-theme="tailor"]) .step-head { font-size: 13.5px; letter-spacing: .3px; }
/* 快乐体本身笔画就厚，再让浏览器合成粗体会把「想」「款」这类多笔画的字糊死。
   标题统一 400——看着反而更"手写"，也更清楚。 */
html:not([data-theme="tailor"]) .step-head,
html:not([data-theme="tailor"]) .panel-head,
html:not([data-theme="tailor"]) h3 { font-weight: 400; }
html:not([data-theme="tailor"]) .step-hint { font-family: var(--font-ui); font-size: 10.5px; letter-spacing: 0; }
html:not([data-theme="tailor"]) .chip { font-size: 12px; letter-spacing: .2px; }
html:not([data-theme="tailor"]) .link-btn { font-size: 12.5px; letter-spacing: .3px; }
html:not([data-theme="tailor"]) h3 { letter-spacing: .3px; }

/* 主按钮：字也可以胖一点，但字距不能太松，否则按下去的那一下显得软 */
html:not([data-theme="tailor"]) button.primary { letter-spacing: .8px; }

/* --------------------------------------------------------------- 步骤编号
   原来是一枚 18px 的粉色圆圈加数字，像表单里的序号。
   现在做成一颗歪着的糖：径向高光 + 白描边 + 自己的彩色投影，
   四步四个味（草莓 / 蜜橘 / 薄荷 / 葡萄）。hover 时轻轻摆正，
   像有人用手指碰了它一下。 */
html:not([data-theme="tailor"]) .step-head i {
  --nb1: #ff9bbe; --nb2: #c94a72; --ns: rgba(201, 74, 114, .8);
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 13.5px; font-weight: 400; line-height: 1;
  padding-top: 1px;   /* 圆体数字重心偏上，grid 居中后仍差 1px */
  color: #fff; text-shadow: 0 1px 1px rgba(110, 20, 48, .38);
  background: linear-gradient(160deg, var(--nb1), var(--nb2));
  box-shadow:
    0 0 0 1.5px #fff,
    0 2px 7px -2px var(--ns),
    inset 0 -2px 4px rgba(120, 15, 55, .22),
    inset 0 2px 3px rgba(255, 255, 255, .6);
  transform: rotate(-7deg);
  transition: transform .18s ease;
}
html:not([data-theme="tailor"]) .step:hover .step-head i { transform: rotate(3deg) scale(1.07); }
html:not([data-theme="tailor"]) .tryon-rail .step:nth-of-type(2) .step-head i {
  --nb1: #ffc471; --nb2: #ee7a3c; --ns: rgba(238, 122, 60, .75);
}
html:not([data-theme="tailor"]) .tryon-rail .step:nth-of-type(3) .step-head i {
  --nb1: #7fdcc0; --nb2: #2aa88a; --ns: rgba(42, 168, 138, .7);
}
html:not([data-theme="tailor"]) .tryon-side .step:first-of-type .step-head i {
  --nb1: #b3a4ee; --nb2: #7b6bd0; --ns: rgba(123, 107, 208, .7);
}

/* --------------------------------------------------------------- 图库入口
   「图库 25」那枚徽标原来是一块平涂的蓝，和糖果主题不是一套。
   改成一颗糖：渐变底 + 顶部高光 + 一点点外发光。 */
html:not([data-theme="tailor"]) .lib-entry {
  font-size: 12.5px; letter-spacing: .3px;
  border-color: var(--brand-line);
  background: linear-gradient(180deg, #ffffff, #fff5f9);
}
html:not([data-theme="tailor"]) .lib-entry:hover { background: var(--brand-soft); }
html:not([data-theme="tailor"]) .lib-badge {
  background: linear-gradient(160deg, #ff8fb6, var(--brand));
  font-size: 10.5px; padding: 3px 6px; letter-spacing: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 1px 3px -1px rgba(201, 74, 114, .6);
}

/* --------------------------------------------------------------- 空槽图标
   上传槽空着的时候原来只有两行字，看上去像"这里什么都没有"。
   补一枚手绘线条的小图（裙子 / 娃娃 / 相机），不写字也认得出这一步要放什么。 */
html:not([data-theme="tailor"]) .drop-empty { gap: 6px; }
html:not([data-theme="tailor"]) .drop-ico {
  width: 36px; height: 36px; display: block;
  color: var(--brand); opacity: .5;
  margin-bottom: -1px;
  transition: opacity .15s, transform .15s;
}
html:not([data-theme="tailor"]) .drop:hover .drop-ico { opacity: .8; transform: translateY(-1px) rotate(-3deg); }
html:not([data-theme="tailor"]) .drop-hint b { font-size: 12.5px; }

/* ==========================================================================
   古代裁缝铺
   ========================================================================== */
html[data-theme="tailor"] {
  color-scheme: light;

  /* 木与铜：桌面、匾额、框边 */
  --wood-deep: #1c1006;
  --wood: #2c1a0f;
  --wood-line: #6b4a2a;
  --brass: #b9903f;
  --brass-light: #ddc07a;

  /* 纸与墨 */
  --bg: #2c1a0f;              /* 页面底色＝木案；纸只铺在面板上 */
  --panel: #fbf5e6;
  --surface: #fbf5e6;
  --surface-2: #f0e4c9;
  --surface-3: #f7efdb;
  --surface-4: #f3e9d2;
  --surface-sunken: #f7efdc;
  --hover-bg: #f5ebd4;
  --field-bg: #fdf9ee;
  --thumb-bg: #efe3c8;
  --line: #cdb894;
  --line-strong: #b8a06f;
  --line-soft: #e2d3b2;
  --text: #2c2318;
  --text-2: #5b4a34;
  --text-3: #8f7c5c;

  /* 朱砂印泥 */
  --brand: #9c3a2a;
  --brand-hover: #7d2a1d;
  --brand-soft: #f7e5de;
  --brand-weak: rgba(156, 58, 42, .11);
  --brand-ring: rgba(156, 58, 42, .16);
  --brand-line: #dcb3a2;
  --on-brand: #fdf5e3;
  --btn-disabled-bg: #cbb894;

  /* 状态色压暗一档，配纸底不刺眼 */
  --ok: #4a6b45;
  --ok-bg: #eef2e0;
  --warn: #8a5a1c;
  --warn-bg: #fbf0d4;
  --warn-line: #dcc08a;

  /* 版片图 */
  --piece-line: #9c3a2a;
  --piece-fill: #f8e9df;
  --seam-line: #d3a48f;
  --grain-line: #b09a72;

  /* 木与金 */
  --topbar-bg: linear-gradient(180deg, #4e3826 0%, #3a2819 58%, #2f2013 100%);
  --logo-bg: #9c3a2a;
  --logo-ink: #fdf5e3;
  --pill-glass: rgba(251, 245, 230, .95);
  --overlay: rgba(44, 35, 24, .5);

  /* 方角、宋楷 */
  --radius: 4px;
  --radius-sm: 3px;
  --radius-xs: 2px;
  --font-ui: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  --font-display: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", "STSong", "SimSun", serif;
}

/* ------------------------------------------------------------ 桌面与字
   底色不是纸，是一张上了年头的木案：面板像一张张纸页搁在上面。
   以前全身米黄，层次全靠描边；现在靠"木 vs 纸"的明度差分层，才压得住。 */
html[data-theme="tailor"] body {
  background-color: var(--wood);
  background-image:
    /* 真木纹：deco-wood.svg 里是一层横向拉长的分形噪波，soft-light 叠在棕色底上 */
    url("deco-wood.svg?v=2"),
    /* 顶光：靠上亮一点，木面才不是一块死板的色块 */
    radial-gradient(125% 78% at 50% -8%, rgba(168, 116, 58, .34), transparent 64%),
    linear-gradient(180deg, #3b2614 0%, #2c1a0b 58%, #231405 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  background-blend-mode: soft-light, normal, normal;
  background-attachment: fixed;
  font-family: var(--font-ui);
  font-size: 13.5px;
}
/* 纸页铺满桌面：三栏等高，木色只留在缝里和页边，不留大片空桌 */
html[data-theme="tailor"] .layout {
  align-items: stretch;
  min-height: calc(100vh - 56px);   /* 纸页至少铺满一屏，不留大片空桌 */
}
html[data-theme="tailor"] .layout > .panel,
html[data-theme="tailor"] .layout > .result-col { min-height: 0; }
/* 结果列最后一张纸吃掉剩余高度：宁可留白纸，也不留黑桌面 */
html[data-theme="tailor"] .result-col > .panel:last-child { flex: 1 1 auto; }
/* 量体页（.wrap）：右栏最后一张纸也吃掉剩余高度；顺带修掉 6px 的溢出 */
html[data-theme="tailor"] .wrap { height: calc(100vh - 54px); }
/* 右栏最后缺一块就补一张空白纸，别让桌面从下面露出来 */
html[data-theme="tailor"] .wrap > .side::after {
  content: "";
  flex: 1 1 auto;
  min-height: 36px;
  background:
    url("deco-tools.svg?v=3") no-repeat center / 150px 96px,
    var(--surface);
  border: 1px solid var(--wood-line);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
}

html[data-theme="tailor"] h1,
html[data-theme="tailor"] h2,
html[data-theme="tailor"] h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: .4px;
}

/* ------------------------------------------------------------ 顶栏：匾额
   匾要压得住桌面：木纹 + 上下两道铜线，字用楷体拉开字距，像阴刻填金 */
html[data-theme="tailor"] .topbar {
  background-color: #2a1809;
  background-image:
    url("deco-wood.svg?v=2"),
    linear-gradient(180deg, #4c3220 0%, #35210f 56%, #211204 100%);
  background-size: 100% 100%, 100% 100%;
  background-blend-mode: soft-light, normal;
  color: #f2e4c6;
  border-bottom: 2px solid #140a03;
  box-shadow:
    inset 0 1px 0 rgba(221, 192, 122, .30),
    0 10px 26px rgba(0, 0, 0, .45);
}
/* 匾额下沿一道黄铜压条 */
html[data-theme="tailor"] .topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg,
    rgba(185, 144, 63, .30), #d8b972 16%, #a8853f 50%, #d8b972 84%, rgba(185, 144, 63, .30));
  opacity: .95;
  pointer-events: none;
}

/* 挂在匾额左边的招牌：一块「成衣」木牌 + 一把裁缝剪。
   纯装饰，pointer-events 关掉；窄屏收起，别挤掉店名 */
html[data-theme="tailor"] .topbar { padding-left: 98px; }
html[data-theme="tailor"] .topbar::before {
  content: "";
  position: absolute;
  left: 6px; top: 0;
  width: 84px; height: 56px;
  background: url("deco-sign.svg?v=3") no-repeat left top / 84px 56px;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .5));
}
@media (max-width: 1180px) {
  html[data-theme="tailor"] .topbar { padding-left: 18px; }
  html[data-theme="tailor"] .topbar::before { display: none; }
}
html[data-theme="tailor"] .topbar .logo {
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255, 240, 214, .3), 0 1px 2px rgba(0, 0, 0, .35);
}
html[data-theme="tailor"] .topbar .brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: .8px;
  color: #f7ebd2;
}
html[data-theme="tailor"] .topbar .brand small {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .2px;
  color: rgba(240, 225, 196, .5);
  margin-top: 1px;
}
html[data-theme="tailor"] .topbar .chip {
  background: rgba(246, 233, 205, .08);
  border: 1px solid rgba(201, 165, 95, .26);
  border-radius: 3px;
  color: rgba(246, 236, 214, .8);
}
html[data-theme="tailor"] .topbar .chip .dot.on { background: #8fbf7a; }
html[data-theme="tailor"] .topbar .chip .dot.off { background: #e08573; }
html[data-theme="tailor"] .topbar .demo-chip {
  background: rgba(201, 165, 95, .16);
  border-color: rgba(201, 165, 95, .38);
  color: #e8c887;
}
html[data-theme="tailor"] .topbar .tryon-chip {
  background: rgba(201, 165, 95, .14);
  border-color: rgba(201, 165, 95, .34);
  color: #e8c887;
}
html[data-theme="tailor"] .topbar .link-btn,
html[data-theme="tailor"] .topbar .lib-entry,
html[data-theme="tailor"] .topbar button.link-btn.clear-all {
  background: rgba(246, 233, 205, .07);
  border: 1px solid rgba(201, 165, 95, .28);
  border-radius: 3px;
  color: #f0e2c4;
}
html[data-theme="tailor"] .topbar .link-btn:hover,
html[data-theme="tailor"] .topbar .lib-entry:hover,
html[data-theme="tailor"] .topbar button.link-btn.clear-all:hover {
  background: rgba(246, 233, 205, .18);
  border-color: #c9a55f;
  color: #fff6e0;
}
html[data-theme="tailor"] .topbar .lib-badge {
  background: #c9a55f;
  color: #3a2819;
  font-weight: 700;
}
html[data-theme="tailor"] .theme-switch {
  background: rgba(246, 233, 205, .07);
  border-color: rgba(201, 165, 95, .28);
  border-radius: 3px;
  color: #f0e2c4;
}
html[data-theme="tailor"] .theme-switch:hover {
  background: rgba(246, 233, 205, .18);
  border-color: #c9a55f;
  color: #fff6e0;
}

/* ------------------------------------------------------- 面板：纸页搁在木案 */
html[data-theme="tailor"] .panel,
html[data-theme="tailor"] .lib-panel,
html[data-theme="tailor"] .atlas,
html[data-theme="tailor"] .save-dlg {
  background: var(--surface);
  border: 1px solid var(--wood-line);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .34),
    inset 0 0 0 1px rgba(255, 248, 232, .55);
}
/* 空白纸面：垫一组裁缝工具的线稿（剪刀 / 皮尺 / 线轴 / 划粉 / 大头针），
   像铺子里压箱底的纸，有人用过的痕迹 */
html[data-theme="tailor"] .result-col .empty { min-height: 380px; padding-top: 46px; }
html[data-theme="tailor"] .result-col .empty,
html[data-theme="tailor"] .lib-empty { position: relative; overflow: hidden; }
html[data-theme="tailor"] .result-col .empty::after,
html[data-theme="tailor"] .lib-empty::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  width: min(290px, 72%);
  aspect-ratio: 220 / 140;
  background: url("deco-tools.svg?v=3") no-repeat center / contain;
  pointer-events: none;
}
/* 开单栏表单下面那块留白，也放一件工具 */
html[data-theme="tailor"] .side-scroll {
  background-image: url("deco-tools.svg?v=3");
  background-repeat: no-repeat;
  background-position: right 2px bottom 6px;
  background-size: 168px 107px;
}

/* 内框线：朱红虚线，像沿边跑的一道针脚 */
html[data-theme="tailor"] .panel {
  outline: 1px dashed rgba(156, 58, 42, .26);
  outline-offset: -5px;
}
/* 舞台是立轴：外一圈栗木框，里一道铜线，纸上才亮得起来 */
html[data-theme="tailor"] .stage {
  background: var(--surface);
  border: 1px solid var(--wood-line);
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 8px #5a3c23,          /* 框料比桌面浅一档，才看得出是"框" */
    inset 0 0 0 9px rgba(221, 192, 122, .60),
    inset 0 0 0 10px #4a3120,
    inset 0 0 26px rgba(74, 49, 32, .12),
    0 16px 34px rgba(0, 0, 0, .38);
}
/* 面板头改成抽屉面：深木底、填金字 */
html[data-theme="tailor"] .panel-head {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 1px;
  color: #f3e3c0;
  background-color: #33200f;
  background-image: linear-gradient(180deg, #4a3120, #33200f);
  border-bottom: 2px solid #1b0f05;
  box-shadow: inset 0 1px 0 rgba(221, 192, 122, .26);
}
html[data-theme="tailor"] .panel-head .count {
  font-family: var(--font-ui);
  letter-spacing: 0;
  color: rgba(240, 223, 186, .55);
}
/* ------------------------------------------- 换装页三栏：三张纸页搁在木案上 */
html[data-theme="tailor"] .tryon-layout { padding: 16px; gap: 16px; }
html[data-theme="tailor"] .tryon-rail,
html[data-theme="tailor"] .tryon-side {
  border: 1px solid var(--wood-line);
  border-radius: 3px;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .34),
    inset 0 0 0 1px rgba(255, 248, 232, .5);
}
html[data-theme="tailor"] .tryon-main { padding: 0; }
html[data-theme="tailor"] .side-foot {
  background: #f2e6cb;
  border-top: 1px solid var(--line-strong);
}

/* 栏目标签：像账本上的栏目线 */
html[data-theme="tailor"] .col-tab {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 11px; padding-bottom: 7px;
  font-family: var(--font-display); font-size: 15px; letter-spacing: 3px;
  color: #6b4a2a;
  border-bottom: 1px solid var(--line);
}
html[data-theme="tailor"] .col-tab em {
  font: 400 10.5px var(--font-ui);
  font-style: normal; letter-spacing: .4px; color: var(--text-3);
}
html[data-theme="tailor"] .col-tab::after {
  content: ""; flex: 1 1 auto; height: 1px; align-self: center;
  background: linear-gradient(90deg, var(--brass), transparent);
  opacity: .5;
}

/* 步骤标题：柜台上的小木牌，左压一道朱线；序号换成大写 */
html[data-theme="tailor"] .step-head {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .8px;
  padding: 4px 9px 4px 7px;
  margin-bottom: 9px;
  background: linear-gradient(180deg, #f9f0da, #f0e3c6);
  border: 1px solid var(--line);
  border-left: 2px solid var(--brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
html[data-theme="tailor"] .step-head i {
  width: 21px; height: 21px;
  border-radius: 2px;
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 214, .34);
  font-family: var(--font-display);
  font-size: 0;                 /* 藏掉阿拉伯数字，下面换成大写 */
}
html[data-theme="tailor"] .step-head i::before {
  content: attr(data-cn);
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: 0;
}
html[data-theme="tailor"] .step-hint,
html[data-theme="tailor"] .acc-head .step-hint {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--text-3);
}
html[data-theme="tailor"] .acc-head {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: .5px;
}

/* ------------------------------------------------------------ 表单控件 */
html[data-theme="tailor"] select,
html[data-theme="tailor"] input[type="text"],
html[data-theme="tailor"] input[type="number"],
html[data-theme="tailor"] textarea {
  background: var(--field-bg);
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgba(120, 95, 60, .07);
}
html[data-theme="tailor"] select:focus,
html[data-theme="tailor"] input[type="text"]:focus,
html[data-theme="tailor"] input[type="number"]:focus,
html[data-theme="tailor"] textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-weak);
  outline: none;
}
html[data-theme="tailor"] .field > label,
html[data-theme="tailor"] .check,
html[data-theme="tailor"] .checks label,
html[data-theme="tailor"] .auto-save {
  color: var(--text-2);
}
html[data-theme="tailor"] input[type="range"] {
  background: var(--line-strong);
  height: 3px;
  border-radius: 1px;
}
html[data-theme="tailor"] input[type="range"]::-webkit-slider-thumb {
  width: 13px; height: 17px;
  border-radius: 2px;
  background: var(--brand);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 3px rgba(80, 50, 30, .35);
}
html[data-theme="tailor"] input[type="range"]::-moz-range-thumb {
  width: 11px; height: 15px;
  border-radius: 2px;
  background: var(--brand);
  border: 2px solid var(--surface);
}
html[data-theme="tailor"] .range-legend { color: var(--text-3); }
html[data-theme="tailor"] .cat-tabs button { border-radius: 3px; }
html[data-theme="tailor"] .cat-tabs button.active {
  box-shadow: inset 0 0 0 1px rgba(255, 240, 214, .3);
}

/* ------------------------------------------------------------ 按钮 */
html[data-theme="tailor"] .primary,
html[data-theme="tailor"] button.primary {
  background: linear-gradient(180deg, #a83d2d, #8d2f21);
  border: 1px solid #78261a;
  color: var(--on-brand);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 1.2px;
  box-shadow:/n    inset 0 0 0 1px rgba(255, 226, 180, .20),
    inset 0 1px 0 rgba(255, 226, 190, .30),
    0 2px 4px rgba(60, 20, 10, .28);
}
html[data-theme="tailor"] .primary:hover,
html[data-theme="tailor"] button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #b64634, #9c3a2a);
}
html[data-theme="tailor"] .primary:disabled,
html[data-theme="tailor"] button.primary:disabled {
  background: #eadfc6;
  border-color: #d3c2a0;
  color: #7a6847;
  box-shadow: none;
  letter-spacing: 1px;
}
html[data-theme="tailor"] button.ghost,
html[data-theme="tailor"] .mini-btn,
html[data-theme="tailor"] .link-btn,
html[data-theme="tailor"] .lib-pill,
html[data-theme="tailor"] .fb-chip,
html[data-theme="tailor"] .lib-tabs button,
html[data-theme="tailor"] .segmented button,
html[data-theme="tailor"] button.link-btn.clear-all {
  background: #faf3e2;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-family: var(--font-ui);
}
html[data-theme="tailor"] button.ghost:hover,
html[data-theme="tailor"] .mini-btn:hover,
html[data-theme="tailor"] .link-btn:hover,
html[data-theme="tailor"] .lib-pill:hover,
html[data-theme="tailor"] .fb-chip:hover:not(:disabled),
html[data-theme="tailor"] .segmented button:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}
html[data-theme="tailor"] .segmented button.active,
html[data-theme="tailor"] .cat-tabs button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}
html[data-theme="tailor"] .ghost.on {
  border-color: #a8bd8a;
  background: var(--ok-bg);
  color: var(--ok);
}
html[data-theme="tailor"] .link-btn { text-decoration: none; }

/* ------------------------------------------------------------ 上传槽 */
html[data-theme="tailor"] .drop {
  background-color: #f8f0dd;
  background-image: repeating-linear-gradient(45deg, rgba(190, 160, 110, .07) 0 6px, transparent 6px 12px);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}
html[data-theme="tailor"] .drop:hover,
html[data-theme="tailor"] .drop.over {
  border-color: var(--brand);
  background-color: var(--brand-soft);
}
html[data-theme="tailor"] .drop.filled {
  border-style: solid;
  background-image: none;
  background-color: var(--surface);
}
html[data-theme="tailor"] .drop-hint b { color: var(--text-2); font-weight: 600; }
html[data-theme="tailor"] .role-tag { border-radius: 2px; }
html[data-theme="tailor"] .recent-thumb { border-radius: 2px; }
html[data-theme="tailor"] .drop-x { border-radius: 2px; }
html[data-theme="tailor"] .lib-pill.bottom { border-color: var(--line-strong); }

/* ------------------------------------------------------------ 卡片 */
html[data-theme="tailor"] .model-card,
html[data-theme="tailor"] .q-item,
html[data-theme="tailor"] .scene-card {
  border-radius: var(--radius-sm);
}
html[data-theme="tailor"] .model-card.selected,
html[data-theme="tailor"] .q-item.selected {
  box-shadow: inset 0 0 0 1px var(--brand);
  position: relative;
}
/* 选中卡片左侧一枚朱红书签 */
html[data-theme="tailor"] .model-card.selected::before,
html[data-theme="tailor"] .q-item.selected::before {
  content: "";
  position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px;
  background: var(--brand);
  border-radius: 2px;
}
html[data-theme="tailor"] .tag { border-radius: 2px; }
html[data-theme="tailor"] .tag.measured { background: var(--ok-bg); color: var(--ok); }
html[data-theme="tailor"] .tag.derived { background: var(--warn-bg); color: var(--warn); }
html[data-theme="tailor"] .badge { background: var(--brand); color: var(--on-brand); }

/* ------------------------------------------------------------ 表格与指标 */
html[data-theme="tailor"] th {
  background: #f2e6cd;
  letter-spacing: .3px;
}
html[data-theme="tailor"] .metrics { background: var(--line); }
html[data-theme="tailor"] .metric .v { letter-spacing: -.2px; }
html[data-theme="tailor"] .cost { background: var(--surface-sunken); }
html[data-theme="tailor"] .save-sum { background: var(--surface-4); }

/* ------------------------------------------------------------ 版片图 */
html[data-theme="tailor"] .sheet-frame,
html[data-theme="tailor"] .cmp-wrap {
  border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------ 模特图例
   figure.js 生成的 SVG 用 CSS 类上色，随主题切换 */
html[data-theme="tailor"] .model-card .card-fig svg .fig-body,
html[data-theme="tailor"] .atlas-fig svg .fig-body,
html[data-theme="tailor"] .doll-fig .fig-body,
html[data-theme="tailor"] .cmp-wrap svg .fig-body {
  fill: #ecdfc6;
  stroke: #9c8560;
}

/* 报价单状态签：换成纸上的朱批 / 松绿 / 赭红 */
html[data-theme="tailor"] .st-pending { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
html[data-theme="tailor"] .st-approved { background: var(--ok-bg); color: var(--ok); border: 1px solid #bccd9d; }
html[data-theme="tailor"] .st-rejected { background: #f7e0da; color: #8f2c20; border: 1px solid #e0b6ab; }
html[data-theme="tailor"] .fig-dim { stroke: #cbb894; }
html[data-theme="tailor"] .fig-ruler { stroke: #b6a17a; }
html[data-theme="tailor"] .fig-lbl { fill: #7a6849; }
html[data-theme="tailor"] .fig-lbl-strong { fill: #2c2318; }
html[data-theme="tailor"] .fig-lbl-dim { fill: #a08e6c; }

/* ------------------------------------------------------------ 空态插画
   内联 SVG 写死了浅蓝灰，用属性选择器换成本色系，不动 HTML */
html[data-theme="tailor"] .idle-fig rect[fill="#eef2f8"] { fill: #f3e8d1; stroke: #d8c7a4; }
html[data-theme="tailor"] .idle-fig rect[fill="#fff"] { fill: #fdf8ec; stroke: #d8c7a4; }
html[data-theme="tailor"] .idle-fig circle[fill="#cfd9e8"] { fill: #ddcaa6; }
html[data-theme="tailor"] .idle-fig circle[fill="#e7dccb"] { fill: #e3cba0; }
html[data-theme="tailor"] .idle-fig path[fill="#dbe4f0"] { fill: #ecdcbc; }
html[data-theme="tailor"] .idle-fig path[fill="#f3c9d6"] { fill: #e6b3a0; }
html[data-theme="tailor"] .idle-fig path[stroke="#94a3b8"] { stroke: #a08e6c; }
html[data-theme="tailor"] .scene-art.plus svg path[stroke="#94a3b8"] { stroke: #b0996f; }

/* ------------------------------------------------------------ 弹层与浮层 */
html[data-theme="tailor"] .lib-panel,
html[data-theme="tailor"] .save-dlg,
html[data-theme="tailor"] .peek {
  box-shadow: 0 22px 54px rgba(44, 35, 24, .32);
}
html[data-theme="tailor"] .lib-foot { background: var(--surface-3); }
html[data-theme="tailor"] .lib-thumb { border-radius: var(--radius-sm); }
html[data-theme="tailor"] .lib-check { border-radius: 2px; }
html[data-theme="tailor"] .lib-tabs button.on {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
  font-weight: 600;
}
html[data-theme="tailor"] .prompt-box {
  background: #33261a;
  color: #dcc9a8;
  border-radius: var(--radius-sm);
}
html[data-theme="tailor"] .toast {
  background: rgba(51, 38, 26, .94);
  border-radius: var(--radius-sm);
  color: #f7ebd2;
}
html[data-theme="tailor"] .fb-tag {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 2px;
}
html[data-theme="tailor"] .ai-row { border-radius: var(--radius-sm); }
html[data-theme="tailor"] .ai-row.ok { color: var(--brand); }
html[data-theme="tailor"] .ai-dot { border-radius: 1px; }
html[data-theme="tailor"] .ai-badge { border-radius: 2px; }
html[data-theme="tailor"] .spinner { border-color: var(--line); border-top-color: var(--brand); }
html[data-theme="tailor"] .watermark,
html[data-theme="tailor"] .peek-hint,
html[data-theme="tailor"] .lib-role,
html[data-theme="tailor"] .lib-del { border-radius: 2px; }
html[data-theme="tailor"] .scene-card.on { box-shadow: 0 0 0 2px var(--brand-ring); }
html[data-theme="tailor"] .scene-name { color: var(--text-2); }

/* ------------------------------------------------------------ 滚动条 */
html[data-theme="tailor"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="tailor"] ::-webkit-scrollbar-track { background: #f0e6cf; }
html[data-theme="tailor"] ::-webkit-scrollbar-thumb {
  background: #bba072;
  border-radius: 5px;
  border: 2px solid #f0e6cf;
}
html[data-theme="tailor"] ::-webkit-scrollbar-thumb:hover { background: #b39a6f; }

/* ------------------------------------------------------------ 图片量体页
   这一页的样式写在 HTML 里、且没引 styles.css，用高特异性单独对齐 */
html[data-theme="tailor"] .btn {
  background: #faf3e2;
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text-2);
}
html[data-theme="tailor"] .btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
html[data-theme="tailor"] .btn.primary {
  background: linear-gradient(180deg, #a83d2d, #8d2f21);
  border-color: #78261a;
  color: var(--on-brand);
  font-family: var(--font-display);
  letter-spacing: 1px;
}
html[data-theme="tailor"] .btn.primary:hover { background: linear-gradient(180deg, #b64634, #9c3a2a); color: #fff6e0; }

/* 空槽里的小图：古风这版用朱砂淡描，不能让它以纯黑实心出现 */
html[data-theme="tailor"] .drop-ico {
  width: 34px; height: 34px; display: block;
  color: var(--brand); opacity: .38; margin-bottom: 2px;
}
html[data-theme="tailor"] .drop-empty { gap: 7px; }
