/* =========================================================
 * 黏土调色器 — 样式
 * 气质：手作笔记。纸感、圆角、留白多、字大。
 * 铁律：界面自己不能抢戏——整个 App 都在展示颜色，底色必须安静。
 * 强制浅色：颜色判断需要一致的观察环境，不给深色模式。
 * ========================================================= */

:root {
  --paper:  #FAF7F2;
  --card:   #FFFFFF;
  --ink:    #2E2A26;
  --dim:    #8B8178;
  --line:   #E8E0D5;
  --accent: #E9B949;
  --good:   #5A9367;
  --ok:     #7A9A5B;
  --warn:   #D98E3C;
  --bad:    #C7513F;
  --r:      16px;
  --tabh:   62px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  overscroll-behavior-y: contain;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px calc(var(--tabh) + env(safe-area-inset-bottom) + 24px);
  min-height: 100vh;
}

.hidden { display: none !important; }
.dim { color: var(--dim); }

h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 19px; font-weight: 700; margin: 0 0 14px; }

.hd { padding: calc(env(safe-area-inset-top) + 22px) 0 18px; }
.hd-row { display: flex; align-items: center; gap: 12px; }
.hd-row h1 { flex: 1; }

/* ---------- 横幅 ---------- */
.banner {
  display: flex; gap: 10px; align-items: flex-start;
  background: #FFF6DE; border: 1px solid #F0DFA8;
  border-radius: 14px; padding: 12px 14px;
  margin-top: calc(env(safe-area-inset-top) + 12px);
  font-size: 14px; line-height: 1.5;
}
.banner-txt { flex: 1; }
.banner-x {
  border: 0; background: transparent; color: var(--dim);
  font-size: 22px; line-height: 1; padding: 0 2px; cursor: pointer;
}

/* ---------- 目标色块 ---------- */
.swatch-wrap { position: relative; }
.swatch-big {
  width: 100%; aspect-ratio: 4/3;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 2px 14px rgba(60,45,25,.07);
  background: #E8B4B8;
  transition: background .18s ease;
}
/* 光靠下划线不够——圆角把两端吃掉，只剩中间一小截，还是看不出能输入。
   改成框内挂一支笔：用户见过一万个这样的"可编辑"提示。 */
.hex-box {
  position: absolute; left: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px;
  padding-right: 9px;
  cursor: text;
  overflow: hidden;              /* input 自带的白底会盖住左边圆角，裁掉 */
}
.hex-pen { font-size: 13px; color: var(--accent); line-height: 1; }
.hex-input {
  width: 108px;
  -webkit-appearance: none; appearance: none;
  background: transparent;
  border: 0; border-radius: 0;
  padding: 8px 4px 8px 10px;
  font: 600 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
  letter-spacing: .04em;
  backdrop-filter: blur(6px);
}
.hex-input:focus { outline: 0; }
.hex-box:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- 取色按钮行 ---------- */
.pick-row { display: flex; gap: 10px; margin: 16px 0 4px; }
.pick-btn {
  flex: 1; border: 1px solid var(--line); background: var(--card);
  border-radius: 14px; padding: 13px 4px;
  font-size: 15px; font-weight: 600; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer;
}
.pick-btn:active { background: #F3EEE6; }
.ico { font-size: 21px; line-height: 1; }

/* ---------- 总量 ---------- */
.total-row {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 18px;
  font-size: 16px;
}
.total-box {
  display: flex; align-items: center;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 12px; overflow: hidden;
}
.total-box input {
  width: 74px; border: 0; text-align: center;
  font: 700 19px/1 inherit; color: var(--ink);
  padding: 11px 0; background: transparent;
  -moz-appearance: textfield;
}
.total-box input::-webkit-outer-spin-button,
.total-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step {
  border: 0; background: transparent; color: var(--dim);
  font-size: 21px; width: 40px; height: 44px; cursor: pointer;
}
.step:active { background: #F3EEE6; }
.unit { color: var(--dim); }

/* ---------- 主按钮 ---------- */
.primary {
  width: 100%; border: 0; border-radius: 15px;
  background: var(--ink); color: #FFF9EC;
  font-size: 18px; font-weight: 700; letter-spacing: .12em;
  padding: 17px; cursor: pointer;
}
.primary:active { transform: translateY(1px); }
.primary.small { width: auto; padding: 12px 22px; font-size: 16px; letter-spacing: .02em; }
.ghost {
  border: 0; background: transparent; color: var(--dim);
  font-size: 16px; padding: 8px 4px; cursor: pointer;
}
.ghost.strong { color: var(--ink); font-weight: 700; }
.back {
  border: 1px solid var(--line); background: var(--card);
  width: 38px; height: 38px; border-radius: 12px;
  font-size: 19px; color: var(--ink); cursor: pointer;
}

.hint-foot { font-size: 13px; color: var(--dim); text-align: center; margin: 14px 0 0; }

/* ---------- 对比条 ---------- */
.compare {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px; margin-bottom: 14px;
}
.cmp { text-align: center; }
.cmp-sw {
  width: 62px; height: 62px; border-radius: 13px;
  border: 1px solid rgba(0,0,0,.08); margin-bottom: 5px;
}
.cmp span { font-size: 12px; color: var(--dim); }
.cmp-de { flex: 1; text-align: right; }
.cmp-de b { display: block; font-size: 25px; font-weight: 700; line-height: 1.1; }
.cmp-de span { font-size: 13px; color: var(--dim); }
.cmp-de.good b { color: var(--good); }
.cmp-de.ok   b { color: var(--ok); }
.cmp-de.warn b { color: var(--warn); }
.cmp-de.bad  b { color: var(--bad); }

/* ---------- 提醒框 ---------- */
.alert {
  border-radius: 14px; padding: 13px 15px; margin-bottom: 14px;
  font-size: 14.5px; line-height: 1.55;
}
.alert > b:first-child { display: block; margin-bottom: 3px; }
.alert.warn { background: #FFF3E2; border: 1px solid #F2D9AF; }
.alert.bad  { background: #FDECE9; border: 1px solid #F2C9C1; }
.alert .act {
  display: inline-block; margin-top: 8px;
  background: var(--ink); color: #FFF9EC; border: 0;
  border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 600;
  cursor: pointer;
}

/* ---------- 配方卡 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 6px 16px 16px;
}
.card-tag {
  font-size: 12.5px; color: var(--dim);
  padding: 10px 0 8px; border-bottom: 1px dashed var(--line);
}
.card-tag b { color: var(--ink); }

.part {
  display: flex; align-items: center; gap: 13px;
  padding: 15px 0; border-bottom: 1px solid #F2ECE2;
  cursor: pointer; user-select: none;
}
.part:last-child { border-bottom: 0; }
.chk {
  width: 30px; height: 30px; border-radius: 9px;
  border: 2px solid var(--line); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: transparent; transition: .12s;
}
.part.done .chk { background: var(--ink); border-color: var(--ink); color: #FFF9EC; }
.part.done .p-name, .part.done .p-g { opacity: .4; text-decoration: line-through; }
/* 白色黏土在纸底上会消失，边框必须够重才看得见是哪一管 */
.p-dot {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  border: 1px solid rgba(0,0,0,.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.p-name { flex: 1; font-size: 17px; font-weight: 600; }
.p-g { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.p-g em { font-size: 14px; font-weight: 600; font-style: normal; color: var(--dim); margin-left: 2px; }
.part.black-warn { background: #FFFBF0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.p-tip { font-size: 12px; color: var(--warn); display: block; font-weight: 500; }

/* ---------- 预混 ---------- */
.premix {
  background: #F4F6F3; border: 1px solid #DCE3D8;
  border-radius: 14px; padding: 14px 15px; margin-top: 12px;
  font-size: 14.5px; line-height: 1.6;
}
.premix > b:first-child { display: block; margin-bottom: 5px; }
.premix li b { font-variant-numeric: tabular-nums; }
.premix ol { margin: 8px 0 0; padding-left: 20px; }
.premix li { margin-bottom: 4px; }

/* ---------- 总量滑块 ---------- */
.total-slider {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 16px 6px; margin: 14px 0;
}
.ts-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.ts-head b { font-size: 19px; font-variant-numeric: tabular-nums; }
input[type=range] {
  width: 100%; margin: 10px 0 4px; -webkit-appearance: none; background: transparent;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 3px; background: var(--line);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 27px; height: 27px; border-radius: 50%;
  background: var(--ink); margin-top: -11px; border: 3px solid var(--card);
  box-shadow: 0 1px 5px rgba(0,0,0,.2);
}
input[type=range]::-moz-range-track { height: 5px; border-radius: 3px; background: var(--line); }
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 3px solid var(--card);
}

/* ---------- 备选 ---------- */
.alts { margin-top: 18px; }
.alts summary {
  cursor: pointer; font-size: 15px; color: var(--dim);
  padding: 12px 0; list-style: none;
}
.alts summary::-webkit-details-marker { display: none; }
.alts summary::before { content: '▾ '; }
.alts[open] summary::before { content: '▴ '; }
.alt-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; padding: 13px 15px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.alt-sw { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(0,0,0,.08); flex: none; }
.alt-body { flex: 1; min-width: 0; }
.alt-parts { font-size: 14.5px; font-weight: 600; }
.alt-meta { font-size: 12.5px; color: var(--dim); }
.alt-use { font-size: 13px; color: var(--dim); }

/* ---------- 配方本 ---------- */
.book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.book-item { cursor: pointer; }
.book-sw {
  width: 100%; aspect-ratio: 1;
  border-radius: 15px; border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 1px 8px rgba(60,45,25,.06);
}
.book-name {
  font-size: 15px; font-weight: 600; margin-top: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.book-meta { font-size: 12px; color: var(--dim); }
.empty { text-align: center; color: var(--dim); margin-top: 60px; line-height: 1.9; }

/* ---------- tab ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabh) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: rgba(250,247,242,.94);
  backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.tab {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11.5px; color: var(--dim); font-weight: 600;
}
.tab span { font-size: 21px; line-height: 1; filter: grayscale(1); opacity: .55; }
.tab.active { color: var(--ink); }
.tab.active span { filter: none; opacity: 1; }

/* ---------- 弹层 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  background: var(--paper);
  display: flex; flex-direction: column;
}
.modal.center {
  background: rgba(40,34,28,.42);
  align-items: center; justify-content: center; padding: 24px;
}
.modal-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 12px) 18px 12px;
  font-size: 15px; color: var(--dim); border-bottom: 1px solid var(--line);
}
.canvas-wrap {
  flex: 1; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #2A2622; touch-action: none;
}
#picCanvas { max-width: 100%; max-height: 100%; display: block; touch-action: none; }
/* 标记层：跟 #picCanvas 严格同尺寸同位置叠在上面。
   pointer-events:none —— 拖动事件还是要落到底下那张去。 */
#picOverlay { position: absolute; display: block; pointer-events: none; }
.loupe {
  position: absolute; width: 120px; height: 120px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 3px 14px rgba(0,0,0,.4);
  overflow: hidden; pointer-events: none; display: none;
}
.pick-foot, .wheel-foot {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 18px calc(env(safe-area-inset-bottom) + 14px);
  border-top: 1px solid var(--line); background: var(--card);
}
.pick-sw { width: 50px; height: 50px; border-radius: 13px; border: 1px solid rgba(0,0,0,.1); flex: none; }
.pick-info { flex: 1; min-width: 0; }
.pick-info b { display: block; font: 700 17px/1.3 ui-monospace, Menlo, monospace; }
.pick-info span { font-size: 12px; }
.ring-size { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--dim); }

.wheel-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  touch-action: none; padding: 20px;
}
#wheelCanvas { touch-action: none; max-width: 100%; }
.light-row {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 22px calc(env(safe-area-inset-bottom) + 18px);
  background: var(--card); font-size: 13px; color: var(--dim);
}
.light-row input { margin: 0; flex: 1; }
.light-row span { flex: none; }

/* ---------- sheet ---------- */
.sheet {
  background: var(--card); border-radius: 20px; padding: 22px;
  width: 100%; max-width: 400px; max-height: 82vh; overflow-y: auto;
  position: relative;   /* 右上角那个 ✕ 要靠它定位 */
}
.name-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.name-input {
  flex: 1; border: 0; border-bottom: 2px solid var(--line);
  font-size: 19px; padding: 9px 2px; background: transparent; color: var(--ink);
}
.name-input:focus { outline: 0; border-bottom-color: var(--accent); }
.sheet-btns { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }

/* 关闭挪到右上角：那是弹层关闭键的标准位，底部那排留给"删除/再来一次"这种真动作。
   44px 是拇指热区下限，手上沾着黏土的时候更别指望点得准。 */
.d-x {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--dim);
  font-size: 19px; line-height: 1; cursor: pointer;
}
.d-x:active { background: #F2ECE2; }
.d-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; padding-right: 40px; }
.d-sw { width: 66px; height: 66px; border-radius: 15px; border: 1px solid rgba(0,0,0,.08); flex: none; }
.d-name { font-size: 21px; font-weight: 700; }
.d-meta { font-size: 13px; color: var(--dim); }
.d-list { border-top: 1px solid var(--line); margin-bottom: 16px; }
.d-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0; border-bottom: 1px solid #F2ECE2;
}
.d-row .p-dot { width: 22px; height: 22px; }
.d-row .p-name { font-size: 15.5px; }
.d-row .p-g { font-size: 18px; }
.d-del { color: var(--bad); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabh) + 28px);
  transform: translateX(-50%); z-index: 90;
  background: rgba(46,42,38,.94); color: #FFF9EC;
  padding: 11px 20px; border-radius: 12px; font-size: 15px;
  max-width: 84vw; text-align: center;
}


/* =========================================================
 * 基准色 / 设置 —— 2026-08-08
 * 低频区，气质要比调色页更安静：不抢戏、不加色、只排版。
 * ========================================================= */

/* 齿轮原来是"一个图案"，不是"一个按钮"——问题不在细，在看不出能点。
   给它圆底+描边，凑够 44px 热区。 */
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--card); color: var(--ink);
  font-size: 20px; line-height: 1; padding: 0; cursor: pointer;
}
.icon-btn:active { background: #F3EDE3; transform: translateY(1px); }

.lead { font-size: 14.5px; color: var(--dim); line-height: 1.65; margin: 0 0 20px; }
.lead b { color: var(--ink); font-weight: 600; }

/* ---------- 设置行 ---------- */
.set-group {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; margin-bottom: 18px;
}
.set-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 15px 16px; border: 0; background: transparent;
  border-bottom: 1px solid var(--line);
  font-family: inherit; font-size: 17px; color: var(--ink);
  text-align: left; cursor: pointer;
}
.set-row:last-child { border-bottom: 0; }
.set-row:active { background: #FBF8F3; }
.set-main { flex: 1; min-width: 0; }
.set-label { font-size: 16.5px; }
.set-sub { font-size: 13px; color: var(--dim); margin-top: 1px; }
.set-arrow { color: #C9BFB2; font-size: 20px; flex: none; }
.set-label.danger { color: var(--bad); }

/* 语言：不做二级页，两个 pill 直接点。
   当前语言必须一眼看出来——切错了的人往往是看不懂另一种语言的那个。 */
.lang-row { cursor: default; }
.lang-row:active { background: transparent; }
.lang-pills { display: flex; gap: 6px; flex: none; }
.lang-pill {
  border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 6px 13px;
  font-family: inherit; font-size: 14px; color: var(--dim);
  cursor: pointer; white-space: nowrap;
}
.lang-pill.on {
  background: var(--ink); border-color: var(--ink);
  color: #FFF9EC; font-weight: 600;
}

/* 清除数据的确认弹窗：先说清楚删掉的是什么，再给按钮 */
.wipe-what {
  font-size: 15px; line-height: 1.7; color: var(--ink);
  margin: 0 0 10px; white-space: pre-line;
}
.wipe-warn { font-size: 14px; color: var(--bad); margin: 0 0 20px; }
.primary.wipe-go { background: var(--bad); color: #fff; }

/* 五个小色点：一眼看出这套基准色长什么样 */
.dots { display: flex; gap: 4px; flex: none; }
.dots i {
  width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.1); display: block;
}

/* ---------- 基准色列表 ---------- */
.prof-list { display: flex; flex-direction: column; gap: 11px; margin-bottom: 18px; }
.prof-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px 16px;
  font-family: inherit; text-align: left; cursor: pointer; color: var(--ink);
}
.prof-item.on { border-color: var(--accent); background: #FFFDF6; }
.prof-body { flex: 1; min-width: 0; }
.prof-name { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.prof-meta { font-size: 12.5px; color: var(--dim); margin-top: 3px; }
.prof-item .dots { margin-top: 7px; }
.prof-check {
  color: var(--accent); font-size: 20px; font-weight: 700;
  flex: none; width: 20px; text-align: center;
}
/* 详情页也要一眼看出"是不是当前这套"——原来靠"用这一套"按钮没出现来暗示，太弱 */
.using-now {
  background: #FFFDF3; border: 1px solid #F0DFA8;
  border-radius: 12px; padding: 10px 13px;
  font-size: 14px; margin-bottom: 16px;
}
.using-now b { margin-right: 6px; }
.tag {
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 2px 7px; border-radius: 6px; background: #F2ECE0; color: var(--dim);
}
.tag.live { background: #FBEFC9; color: #96702A; }

.outline {
  width: 100%; padding: 15px; border-radius: 14px;
  border: 1.5px dashed var(--line); background: transparent;
  font-family: inherit; font-size: 16px; color: var(--dim); cursor: pointer;
}
.outline:active { background: #F6F1E8; }

/* 次级入口：能点，但明显不是主路。
   用在"从相册选"这种给路不推荐的动作上——做成按钮就等于说两条路一样好。 */
.linkish {
  width: 100%; padding: 13px; border: 0; background: transparent;
  font-family: inherit; font-size: 15px; color: var(--dim); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
  /* 默认的 skip-ink:auto 会给 g/p/y 这些下伸字母让路，下划线被切成好几截。
     中文没有下伸部分所以看不出来，英文版（"Choose an existing photo"）一眼就是断的。
     这是条次级入口，下划线本身就是它唯一的可点线索，必须连续。 */
  text-decoration-skip-ink: none;
}
.linkish:active { color: var(--ink); }

/* ---------- 向导 ---------- */
.np-steps { display: flex; gap: 6px; margin-bottom: 20px; }
.np-steps i {
  flex: 1; height: 3px; border-radius: 2px; background: var(--line); display: block;
}
.np-steps i.on { background: var(--accent); }
.np-foot { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }

/* 五色勾选：色块要大，因为用户要拿实物贴着屏幕比 */
.swatch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.sw-card {
  border: 2px solid var(--line); border-radius: 15px; overflow: hidden;
  background: var(--card); padding: 0; cursor: pointer;
  font-family: inherit; text-align: left; color: var(--ink);
}
.sw-card.on { border-color: var(--accent); }
.sw-card.locked { opacity: .5; }
.sw-block { height: 78px; display: block; }
.sw-foot { padding: 9px 11px; display: flex; align-items: center; gap: 7px; }
.sw-nm { font-size: 15.5px; font-weight: 600; flex: 1; }
.sw-hex { font: 12px/1 ui-monospace, Menlo, monospace; color: var(--dim); }
.sw-box {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  border: 1.5px solid var(--line); display: grid; place-items: center;
  font-size: 13px; color: #fff;
}
.sw-card.on .sw-box { background: var(--accent); border-color: var(--accent); }

/* 摆法示意 */
.layout-demo {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px; margin-bottom: 16px;
}
.layout-row { display: flex; gap: 8px; margin-bottom: 12px; }
.layout-row span {
  flex: 1; height: 46px; border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08); display: grid; place-items: center;
  font-size: 11px; color: rgba(0,0,0,.4);
}
.tips { margin: 0; padding-left: 19px; font-size: 14px; color: var(--dim); line-height: 1.75; }
.tips b { color: var(--ink); font-weight: 600; }

/* 取色队列进度 */
.pick-queue {
  display: flex; gap: 7px; padding: 10px 16px;
  background: #201D1A; border-bottom: 1px solid rgba(255,255,255,.08);
  overflow-x: auto;
}
.pq {
  display: flex; align-items: center; gap: 6px; flex: none;
  padding: 5px 11px; border-radius: 20px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.55); font-size: 13px;
}
.pq.on   { background: var(--accent); color: #3A2C08; font-weight: 600; }
.pq.done { color: rgba(255,255,255,.85); }
.pq i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); }

/* 新旧对比 */
.cmp-list { display: flex; flex-direction: column; gap: 10px; }
.cmp-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.cmp-pair { display: flex; flex: none; }
.cmp-pair span {
  width: 38px; height: 38px; border: 1px solid rgba(0,0,0,.1);
}
.cmp-pair span:first-child { border-radius: 10px 0 0 10px; }
.cmp-pair span:last-child  { border-radius: 0 10px 10px 0; border-left: 0; }
.cmp-body { flex: 1; min-width: 0; }
.cmp-nm { font-size: 15.5px; font-weight: 600; }
.cmp-sub { font-size: 12.5px; color: var(--dim); }
.cmp-sub.same { color: var(--good); }

.notice {
  background: #FFF6DE; border: 1px solid #F0DFA8;
  border-radius: 13px; padding: 12px 14px; font-size: 14px;
  line-height: 1.6; margin-bottom: 16px;
}
.notice.bad { background: #FDF0ED; border-color: #F0CFC8; }

/* ---------- 微调滑块 ---------- */
.tune-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.tune-sw {
  width: 78px; height: 78px; border-radius: 18px; flex: none;
  border: 1px solid rgba(0,0,0,.09);
}
.tune-row { margin-bottom: 15px; }
.tune-lb {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--dim); margin-bottom: 5px;
}
.tune-row input { width: 100%; margin: 0; }

/* ---------- 说明页 ---------- */
.doc { font-size: 15.5px; line-height: 1.8; padding-bottom: 20px; }
.doc h2 { font-size: 17px; margin: 26px 0 8px; }
.doc h2:first-child { margin-top: 0; }
.doc p  { margin: 0 0 14px; color: #4A443D; }
.doc ul { margin: 0 0 14px; padding-left: 20px; color: #4A443D; }
.doc li { margin-bottom: 7px; }
.doc b  { color: var(--ink); }
.doc .dim { font-size: 14px; }
.doc a { color: #8A6A1F; }

/* 配方本上的基准色角标 */
.book-tag {
  font-size: 11px; color: var(--dim); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.book-tag.other { color: #C08A4A; }

/* 设置那一层没有底部 tab，把给 tab 留的位子收回来 */
#app.no-tab { padding-bottom: calc(env(safe-area-inset-bottom) + 28px); }

/* 一组按钮上方的小标题：告诉用户这几个是一伙的（拍照/相册/色轮都是取色） */
.group-label {
  font-size: 12.5px; color: var(--dim);
  margin: 18px 0 -6px; letter-spacing: .02em;
}

/* modal 头部的确认键。原来是纯文字，取色是关键动作，得长得像个按钮 */
.solid {
  border: 0; border-radius: 10px;
  background: var(--ink); color: #FFF9EC;
  font-family: inherit; font-size: 15px; font-weight: 700;
  padding: 9px 16px; min-height: 38px; cursor: pointer;
}
.solid:active { transform: translateY(1px); }
.modal-hd .ghost { min-height: 38px; padding: 8px 10px; }   /* 左侧取消键热区补齐 */
