/* ============================================================
 * 口红搭档 LipPartner 样式
 * ============================================================ */
:root {
  --primary: #c94f5e;
  --primary-dark: #a63a48;
  --primary-light: #fbe9ec;
  --bg: #faf7f5;
  --card: #ffffff;
  --text: #3a2e30;
  --muted: #93838a;
  --border: #f0e2e4;
  --ok: #4caf7d;
  --warn: #e0a63c;
  --bad: #e05c5c;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(180, 90, 100, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
/* 三栏布局仅用于试色推荐页，其余页签卡片仍保持窄版阅读宽度 */
#tab-dupe .card, #tab-cabinet .card, #tab-report .card, #reportArea .card { max-width: 960px; margin-left: auto; margin-right: auto; }
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- header ---------- */
.site-header {
  background: linear-gradient(135deg, #a63a48, #c94f5e 60%, #d97a6c);
  color: #fff;
  padding: 20px 0 0;
  box-shadow: var(--shadow);
}
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 260px; }
.logo-mark { font-size: 34px; }
.logo h1 { font-size: 22px; line-height: 1.2; }
.logo h1 small { font-size: 13px; font-weight: 400; opacity: .85; margin-left: 6px; }
.slogan { font-size: 12px; opacity: .85; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  background: rgba(255,255,255,.14); color: #fff; border: none;
  padding: 9px 16px; border-radius: 10px 10px 0 0; cursor: pointer;
  font-size: 14px; transition: background .2s;
}
.tab:hover { background: rgba(255,255,255,.25); }
.tab.active { background: var(--bg); color: var(--primary-dark); font-weight: 600; }

/* ---------- layout ---------- */
main { padding: 20px 0 40px; }
.panel { display: none; }
.panel.active { display: block; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px;
}
.card h2 { font-size: 18px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
em.privacy-note {
  font-style: normal; font-size: 12px; color: var(--ok);
  background: #eaf7f0; border-radius: 20px; padding: 2px 10px;
}
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 14px; flex: none;
}
.tag {
  background: var(--primary-light); color: var(--primary-dark);
  font-size: 13px; padding: 2px 10px; border-radius: 20px; font-weight: 500;
}

/* ---------- buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; cursor: pointer;
  padding: 9px 18px; font-size: 14px; transition: all .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff; color: var(--primary-dark); border: 1px solid var(--primary); }
.btn-ghost:hover { background: var(--primary-light); }
.btn-lg { font-size: 16px; padding: 13px 30px; border-radius: 24px; }
.btn-mini {
  padding: 4px 10px; font-size: 12px; border-radius: 8px;
  background: var(--primary-light); color: var(--primary-dark); border: none; cursor: pointer;
}
.btn-mini:hover { background: #f6d5da; }
.btn-mini.tryon-on { background: var(--primary-dark, #c2185b); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 14px; transition: all .15s;
}
.chip:hover { border-color: var(--primary); }
.chip.active {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500;
}
.chip-btn {
  padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 13px;
}
.chip-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.chip-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- step1 检测 ---------- */
/* 一屏三栏：卡片1 检测 | 卡片2 偏好 | 卡片3 推荐（最右） */
.match-grid {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(300px, 1fr) minmax(300px, 1.05fr);
  gap: 14px; align-items: start;
}
.match-grid .card { margin-bottom: 0; }
@media (max-width: 1080px) { .match-grid { grid-template-columns: 1fr; } .match-grid .card { margin-bottom: 16px; } }
.photo-stage {
  position: relative; background: #f5eef0; border: 2px dashed #dcc4c8;
  border-radius: var(--radius); min-height: 300px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.photo-stage canvas { max-width: 100%; max-height: 340px; display: block; cursor: crosshair; }
.photo-remove {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px;
  line-height: 30px; text-align: center; cursor: pointer; padding: 0;
}
.photo-remove:hover { background: rgba(0, 0, 0, .78); }
.photo-badge-wrap {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.photo-badge {
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, .55); border-radius: 10px;
  padding: 3px 10px; pointer-events: none;
}
.photo-switch {
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px; padding: 4px 14px; cursor: pointer;
  transition: background .15s ease, transform .08s ease;
}
.photo-switch:hover { background: rgba(0, 0, 0, .8); }
.photo-switch:active { transform: scale(.94); }
.photo-empty { color: var(--muted); text-align: center; font-size: 14px; padding: 20px; }
.photo-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.photo-actions label { cursor: pointer; }
.photo-purpose { flex-basis: 100%; line-height: 1.6; }
.photo-hint { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detect-status {
  flex-basis: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 15px; font-weight: 700;
  color: #1e7a4f;
  background: #eaf7f0;
  border-left: 4px solid var(--ok);
  border-radius: 8px;
}
.detect-status:empty { display: none; }
.detect-status.err { color: #b3261e; background: #fdecec; border-left-color: #b3261e; }

/* ---------- 查图片：照片（左）与检测卡片（右）左右布局 ---------- */
.photo-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: start;
}
.photo-main { min-width: 0; }
.photo-main .photo-purpose { display: inline-block; margin-top: 8px; }
/* 上传胶囊按钮：浮在图片正中间（pointer-events 让点击穿透到画布，仅按钮本身可点） */
.photo-upload {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 16px; text-align: center; pointer-events: none;
}
.photo-upload .photo-empty { padding: 0; }
.photo-upload-btn { pointer-events: auto; border-radius: 999px; padding: 10px 24px; box-shadow: 0 4px 14px rgba(169, 58, 72, .3); }
/* 照片载入后：中间按钮隐藏，右上角显示「上传照片 / 清空照片」（上下堆叠） */
.photo-stage.has-img .photo-upload { display: none; }
.photo-corner {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
}
.photo-corner-btn {
  font-family: inherit; line-height: 1.2;
  height: 28px; padding: 0 12px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px; cursor: pointer;
  transition: background .15s ease, transform .08s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.photo-corner-btn:hover { background: rgba(0, 0, 0, .8); }
.photo-corner-btn:active { transform: scale(.94); }
/* 右侧检测卡片：状态 + 自动定位/手动点选 + 检测结果 */
.photo-side {
  background: #fdf8f8; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px;
}
.photo-side .detect-status { margin-top: 0; }
.photo-side .photo-hint { margin-top: 16px; }
.photo-side .dupe-divider { margin: 14px 0 10px; }
.photo-side > .muted { margin-top: 8px; }
/* 「从照片提取的唇色」卡：白底浮于浅粉卡片上；取色编辑器与标题同行（色块即取色器本身，不另放大色块） */
.photo-side .img-picked {
  display: block; background: #fff; border: 1px solid var(--border);
  padding: 12px 14px; margin-bottom: 0;
}
.img-picked-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.img-picked-caption { flex: 1 1 auto; min-width: 110px; font-weight: 500; }
.img-picked-meta { margin-top: 2px; line-height: 1.7; }
.img-color-edit { flex: 0 0 auto; margin-bottom: 0; }

.detect-result { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.detect-block { background: #fdf8f8; border-radius: 10px; padding: 10px 12px; }
.detect-block h3 { font-size: 14px; color: var(--primary-dark); margin-bottom: 6px; }
.tone-options { display: flex; flex-wrap: wrap; gap: 6px; }
.tone-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
/* 每档三个肤色一行展示，档位名内含「A | B」；不出现滚动条，空间不足时兜底换行 */
.tone-band {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px; margin-bottom: 8px;
}
.tone-band:last-child { margin-bottom: 0; }
.tone-band-title { font-size: 12px; font-weight: 600; color: var(--primary-dark); flex: none; margin-right: 2px; }
.tone-band .chip-btn { padding: 5px 9px; font-size: 12px; }
.tone-guide { font-size: 12px; margin: 2px 0 6px; }
.detect-tip { font-size: 12px; line-height: 1.5; color: var(--ok); background: #eaf7f0; border-radius: 6px; padding: 6px 8px; margin: 2px 0 8px; }
.detect-tip:empty { display: none; }

/* ---------- step2 偏好 ---------- */
.pref-row { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; flex-wrap: wrap; }
.pref-label { font-size: 14px; color: var(--muted); width: 70px; flex: none; padding-top: 7px; }
.pref-row-btn { margin-top: 18px; }
.pref-sub {
  font-size: 15px; color: var(--primary-dark); font-weight: 600;
  margin: 14px 0 10px; padding-top: 12px; border-top: 1px dashed var(--border);
}
.match-card2 .detect-result { margin-top: 0; }

/* ---------- 卡片3 推荐结果（右侧栏紧凑化） ---------- */
.result-placeholder { color: var(--muted); font-size: 13px; padding: 24px 8px; text-align: center; }
.match-card3 .tryon-area { gap: 14px; margin: 10px 0 14px; flex-wrap: nowrap; justify-content: flex-start; }
.match-card3 .tryon-item { flex: 1; min-width: 0; }
.match-card3 .lips-svg { width: 100%; height: auto; }
.match-card3 .result-card { grid-template-columns: 56px 1fr; padding: 10px 12px; }
.match-card3 .swatch { width: 56px; height: 56px; }
.match-card3 .result-list { gap: 8px; }
.match-card3 .result-body h3 { font-size: 14px; margin: 0 0 2px; }
.match-card3 .de-row { margin: 2px 0; font-size: 12px; }
.match-card3 .de-bar { height: 5px; }
.match-card3 .explain-row { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.match-card3 .explain { font-size: 12px; padding: 4px 8px; flex: 1 1 auto; min-width: 0; }
.match-card3 .explain.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-card3 .detail-toggle {
  display: inline-block;
  flex: 0 0 auto;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--primary-dark);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}
.match-card3 .detail-toggle:hover { background: rgba(0,0,0,.05); }
.match-card3 .result-actions { margin-top: 6px; gap: 6px; flex-wrap: nowrap; }
.match-card3 .result-actions .btn-mini { flex: 0 1 auto; white-space: nowrap; }
.match-card3 .result-card.self { border: 1.5px dashed #8b7be8; background: #faf8ff; }
.match-card3 .result-card.self .rank-badge.self-badge { background: #6b5bd6; }

/* ---------- 自选色号：模糊搜索口红，选择即对比 ---------- */
.self-add-wrap {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  margin: 6px 0 12px;
}
/* 搜索行：左侧「搜口红对比」+ 右侧「只看自选」开关 */
.self-add-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.self-search { position: relative; flex: 1 1 240px; max-width: 340px; min-width: 0; }
.self-search-input {
  width: 100%; box-sizing: border-box; font-size: 13px;
  border: 1px solid #c9bef2; border-radius: 999px; padding: 7px 30px 7px 14px;
  outline: none; background: #faf8ff; color: #4b3f86;
}
.self-search-input::placeholder { color: #a99fd6; }
.self-search-input:focus { border-color: #6b5bd6; background: #fff; }
.self-search-icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 12px; opacity: .55; pointer-events: none;
}
.self-search-dropdown {
  position: absolute; left: 0; top: calc(100% + 6px); width: 300px; max-width: 82vw;
  max-height: 300px; overflow-y: auto; background: #fff;
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(60,40,120,.16); z-index: 50; padding: 4px;
}
.self-result-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px;
  cursor: pointer; font-size: 12px; color: #333;
}
.self-result-item:hover { background: #f3ebff; }
.self-result-item .sri-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); flex: none; }
.self-result-item .sri-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.self-result-item .sri-name b { font-weight: 600; }
.self-result-item .sri-meta { color: var(--muted); font-size: 11px; flex: none; }
.self-search-empty { padding: 12px; font-size: 12px; color: var(--muted); text-align: center; }
.self-search-intent { padding: 8px 12px; font-size: 11px; font-weight: 600; color: #6b5bd6; background: #f7f3ff; border-bottom: 1px solid #ece4ff; }
/* 「只看自选」开关（默认关）：打开后推荐列表只展示自选色号 */
.self-only-toggle {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  flex: none; cursor: pointer; user-select: none;
  font-size: 13px; color: #5a4bb0;
  padding: 5px 12px 5px 8px; border-radius: 999px;
  border: 1px solid #e2d9f8; background: #faf8ff;
  transition: border-color .15s, background .15s, color .15s;
}
.self-only-toggle:hover { border-color: #b9a9ec; background: #f5f0ff; }
.self-only-toggle.on { border-color: #6b5bd6; background: #f0eaff; color: #4b3f86; font-weight: 600; }
.self-only-checkbox { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.toggle-track {
  position: relative; width: 34px; height: 20px; border-radius: 999px;
  background: #d6cdeb; transition: background .18s; flex: none;
}
.toggle-thumb {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(60,40,120,.3); transition: transform .18s;
}
.self-only-checkbox:checked + .toggle-track { background: #6b5bd6; }
.self-only-checkbox:checked + .toggle-track .toggle-thumb { transform: translateX(14px); }
.self-only-checkbox:focus-visible + .toggle-track { outline: 2px solid rgba(107,91,214,.45); outline-offset: 2px; }
/* 「只看自选」空态：开关打开但暂无自选色号 */
/* 榜单空态（只看自选无自选 / 推荐被全部关闭共用） */
.result-empty {
  padding: 22px 16px; text-align: center; font-size: 13px; color: var(--muted);
  border: 1px dashed #d9d0f5; border-radius: 12px; background: #faf8ff;
}
/* 自选（你选的）卡：紫色虚线边框 + 紫色徽标 */
.result-card.self { border: 1px dashed #b9a9ec; background: #fcfaff; }
.rank-badge.self-badge { background: #6b5bd6; }

/* ---------- 品牌多选筛选（试色推荐 / 平替查询共用，2026-10-25） ---------- */
/* 多选筛选组件（品牌 / 质地共用）：触发按钮 + 绝对定位下拉面板
   （[搜索] / 全选·清空 / 多选列表）。
   面板 z-index 60：桌面三栏下需压过吸顶的卡3（sticky 形成叠层上下文但
   z-auto，60 > 0 可稳赢）；.card 无 overflow:hidden，面板可越出卡片边界。 */
.mfilter { position: relative; flex: 1 1 220px; min-width: 0; }
.mfilter-trigger {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 14px; transition: border-color .15s, color .15s;
}
.mfilter-trigger:hover { border-color: var(--primary); }
.mfilter.has-filter .mfilter-trigger {
  border-color: var(--primary); color: var(--primary-dark); font-weight: 500;
}
.mfilter-trigger .mf-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mfilter-trigger .mf-caret { font-size: 11px; color: var(--muted); flex: none; }
.mfilter-panel {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 60;
  width: 272px; max-width: 86vw; background: #fff;
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(60,40,120,.16); padding: 10px;
}
.mfilter-panel.hidden { display: none; }
.mf-search {
  width: 100%; box-sizing: border-box; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; outline: none;
}
.mf-search:focus { border-color: var(--primary); }
.mf-tools { display: flex; align-items: center; gap: 6px; margin: 8px 0 6px; }
.mf-total { margin-left: auto; font-size: 11px; color: var(--muted); }
.mf-list { max-height: 236px; overflow-y: auto; scrollbar-width: thin; }
.mf-note { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line, #e5e0ee); font-size: 11px; line-height: 1.5; color: var(--muted); }
.mf-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.mf-item:hover { background: #f7f3ff; }
.mf-item input { flex: none; accent-color: var(--primary); cursor: pointer; }
.mf-item .mf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-item .mf-count { font-size: 11px; color: var(--muted); flex: none; }
.mf-empty { padding: 14px 0; text-align: center; font-size: 12px; color: var(--muted); }
/* 筛选提示行：试色推荐结果区（卡3 顶部）/ 平替区（触发器右侧）共用 */
.mfilter-note { font-size: 12px; color: var(--primary-dark); margin: 0 0 10px; }
.mfilter-note.hidden { display: none; }
/* 平替筛选行：品牌 + 质地两个触发器并列，提示行跟随其后（窄屏整行换行） */
.dupe-filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.dupe-filter-row .mfilter { flex: 0 1 260px; }
.dupe-filter-row .mfilter-note { margin: 0; }

/* ---------- 卡3：整卡一屏高，色号列表在卡内垂直滚动 ---------- */
/* 桌面三栏：卡3 吸顶且上限一屏高，卡内 flex 分三层——
   顶部（标题+试色图+搜索行）固定、中部色号列表滚动（自带滚动条，
   不借用页面滚动条）、底部（付费墙/反馈/上一步）钉在卡底。
   max-height 而非 height：占位态（结果未生成）卡片仍按内容高，不撑成一屏空卡。
   此处 128px 只是 JS 介入前的回退值（≈页头 112px + 12px 边距）；精确限高由
   app.js fitCard3() 按卡片实时顶边计算，保证卡片底边永不出视口。
   overflow:hidden 只为圆角裁切内部滚动条；搜索下拉在顶块内向下展开，
   不会超出卡边界，不会被裁。 */
.match-card3 {
  position: sticky; top: 12px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 128px);
  max-height: calc(100dvh - 128px);
  overflow: hidden;
}
#resultArea { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.result-top { flex: none; }
.result-bottom { flex: none; }

/* ---------- 试色展示 ---------- */
.tryon-area {
  display: flex; gap: 30px; justify-content: center; align-items: flex-end;
  margin: 10px 0 18px; flex-wrap: wrap;
}
.tryon-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lips-svg { width: 170px; height: 100px; }
.match-card3 .lip-crop { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.lip-path-shape { stroke: rgba(0,0,0,.12); stroke-width: 1.2; }
.lip-line { fill: none; stroke: rgba(0,0,0,.28); stroke-width: 2; stroke-linecap: round; }

/* ---------- 推荐结果 ---------- */
/* 卡3 中部滚动区：flex:1 吃满剩余高度，min-height:0 允许被压缩，
   overflow-y:auto 提供列表自己的垂直滚动条（页面滚动条只归左栏）。 */
.result-list {
  display: flex; flex-direction: column; gap: 12px;
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto;
  /* 首卡「TOP N」徽标是 top:-8px 的外凸样式，滚动区上缘会切掉它；
     留 10px 内边距让初始视图徽标完整露出 */
  padding-top: 10px;
  scrollbar-width: thin; scrollbar-color: #e3c9cd transparent;
}
.result-list::-webkit-scrollbar { width: 6px; }
.result-list::-webkit-scrollbar-thumb { background: #e3c9cd; border-radius: 3px; }
.result-list::-webkit-scrollbar-track { background: transparent; }
.result-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  display: grid; grid-template-columns: 76px 1fr; gap: 14px; position: relative;
}
.result-card.locked .result-body { filter: blur(5px); user-select: none; pointer-events: none; }
.result-card .rank-badge {
  position: absolute; top: -8px; left: -6px; background: var(--primary-dark);
  color: #fff; font-size: 11px; border-radius: 8px; padding: 1px 8px;
}
/* 卡片右上角关闭按钮：移除该色号（自选卡持久移除 / 算法卡会话级关闭）。
   z-index 压过 .lock-overlay——付费锁定的卡片也允许直接关掉。 */
.result-card .card-close {
  position: absolute; top: 8px; right: 8px; z-index: 5;
  width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.05); color: #a38d92;
  font-size: 12px; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s;
}
.result-card .card-close:hover { background: #f6e3e6; color: var(--primary-dark); }
/* 标题行右侧留出关闭按钮宽度，长色号名不与其重叠 */
.result-card .result-body h3 { padding-right: 26px; }
.swatch {
  width: 76px; height: 76px; border-radius: 12px; cursor: pointer;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), var(--shadow);
}
.result-body h3 { font-size: 15px; }
.result-body h3 small { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
.de-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.de-value { font-family: Consolas, monospace; color: var(--primary-dark); font-weight: 600; }
.de-bar {
  flex: 1; height: 7px; border-radius: 4px; overflow: hidden;
  background: #f3e5e7; position: relative;
}
.de-bar i { display: block; height: 100%; border-radius: 4px; transition: width .5s; }
.de-threshold {
  position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgba(0,0,0,.25);
}
.explain { font-size: 13px; color: #6b5a5e; background: #fdf8f8; border-radius: 8px; padding: 8px 10px; margin-top: 6px; }
.result-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.lock-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  background: rgba(255,255,255,.25); border-radius: 12px;
}

/* ---------- 反馈 ---------- */
.feedback-box {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border);
  display: flex; align-items: center; gap: 10px; font-size: 14px; flex-wrap: wrap;
}
.fb-thanks { color: var(--ok); font-size: 13px; }

/* ---------- 付费 ---------- */
.paywall-box {
  margin-top: 14px; text-align: center; padding: 18px;
  background: linear-gradient(135deg, #fdf3f0, #fceef2);
  border-radius: 12px; border: 1px dashed #e8b9c0;
}
.paywall-box p { font-size: 14px; margin-bottom: 10px; color: var(--primary-dark); }

/* ---------- 搜索行 ---------- */
.search-row { display: flex; gap: 10px; margin-bottom: 14px; }
.search-row input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; outline: none;
}
.search-row input:focus { border-color: var(--primary); }
.picked-shade {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #fdf8f8; border-radius: 10px; margin-bottom: 12px;
}
.picked-shade .swatch { width: 44px; height: 44px; }
/* 「你输入的」卡片（查色号模式）：与结果卡 dupe-item 同构的三列网格——
   色块 | 信息 | 价格+按钮；粉色底保留以区分「基准 vs 候选」。
   仅 #dupePicked 使用；查颜色的裸 hex 卡同列宽（第三列空），
   查图片的 img-picked 在 photo-side 内已有 display:block 覆盖，不受影响。 */
.picked-shade.dupe-picked {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
}
.picked-shade.dupe-picked .swatch { width: 52px; height: 52px; }

/* ---------- 平替列表 ---------- */
.dupe-item {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px;
}
.dupe-item .swatch { width: 52px; height: 52px; border-radius: 10px; }
/* 平替卡操作区：口红柜 / 试色（横排右对齐，与价格同列） */
.dupe-item-actions { display: flex; flex-direction: row; align-items: center; gap: 6px; margin-top: 6px; }
/* 跳转试色定位高亮：闪烁一次的玫红描边（自选卡 / chips 通用） */
.result-card.flash { animation: flashHL 1.8s ease; }
@keyframes flashHL {
  0%, 100% { box-shadow: none; }
  30% { box-shadow: 0 0 0 3px rgba(179, 31, 49, .45); }
}
.dupe-de { font-family: Consolas, monospace; font-weight: 600; color: var(--ok); font-size: 15px; }
.dupe-de.warn { color: var(--warn); }
.dupe-meta { font-size: 12px; color: var(--muted); }
.dupe-price { font-size: 13px; color: var(--primary-dark); font-weight: 600; }
/* 平替兼容性标签：严格 / 较接近 / 仅颜色接近 */
.dupe-tag { display: inline-block; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 999px; margin: 2px 6px 2px 0; vertical-align: middle; font-weight: 600; }
.dupe-tag.ok { background: var(--ok-soft, #e6f6ec); color: var(--ok, #1a9c54); }
.dupe-tag.warn { background: #fff4e0; color: #b8740a; }
.dupe-tag.bad { background: #fdeaea; color: #c0392b; }
/* 场景维度标签：适合当前场景 / 规则推算适合 / 不适合当前场景（后者用中性灰——
   不是「坏」，只是不适配这个场合；红色 bad 留给「质地不同」这类硬冲突） */
.dupe-tag.scene-ok { background: var(--ok-soft, #e6f6ec); color: var(--ok, #1a9c54); }
.dupe-tag.scene-fit { background: #fff4e0; color: #b8740a; }
.dupe-tag.scene-no { background: #eef0f2; color: #6b7078; }
/* 不适合原因（LAB 读数语言，跟在 ✗ 标签后） */
.dupe-scene-fail { display: inline-block; font-size: 12px; color: var(--muted); margin: 2px 6px 2px 0; }
.dupe-empty { text-align: center; color: var(--muted); padding: 24px 0; font-size: 14px; }

/* ---------- 颜色输入模式（直接输颜色找平替） ---------- */
.dupe-divider {
  display: flex; align-items: center; gap: 10px; margin: 16px 0 10px;
  color: var(--muted); font-size: 13px;
}
.dupe-divider::before, .dupe-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.color-input-row { align-items: center; }
.color-input-row input[type="color"] {
  width: 46px; height: 42px; padding: 2px; flex: 0 0 auto;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer;
}
.color-input-row #dupeHex { flex: 1 1 140px; min-width: 120px; text-transform: uppercase; letter-spacing: .5px; }
/* 常见颜色快捷选项：点击后取色器切换到对应色相区间 */
.color-presets { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.color-preset {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 6px 8px 4px; cursor: pointer; font-size: 11px; color: var(--muted);
  transition: all .15s; min-width: 52px; line-height: 1.2;
}
.color-preset:hover { border-color: var(--primary); color: var(--primary-dark); }
.color-preset.active { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-light, #fdf0f3); }
.color-preset i {
  display: block; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
/* 通用小色块（报告复用） */
.swatch-mini { display: inline-block; vertical-align: -3px; }

/* ---------- 口红柜 ---------- */
.cabinet-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.stat-chip {
  background: var(--primary-light); color: var(--primary-dark);
  font-size: 12px; border-radius: 8px; padding: 4px 10px;
}
.cabinet-item {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px;
}
.cabinet-item .swatch { width: 52px; height: 52px; border-radius: 10px; }
.fav-btn { background: none; border: none; font-size: 18px; cursor: pointer; opacity: .35; }
.fav-btn.on { opacity: 1; }
.dupe-check-result .dupe-item { border-color: #f2c4c4; background: #fdf5f5; }
.check-ok { color: var(--ok); font-weight: 600; }
.check-warn { color: var(--bad); font-weight: 600; }
.cabinet-empty, .dupe-empty { color: var(--muted); text-align: center; padding: 18px; font-size: 14px; }

/* ---------- 平替传图取色 ---------- */
.dupe-img-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.dupe-img-row .muted { font-size: 12px; }
.dupe-img-wrap { margin-bottom: 14px; }
#dupeImgCanvas {
  max-width: 100%; max-height: 340px; display: block;
  border-radius: 12px; border: 1px solid #eee; cursor: crosshair;
}
#dupeImgHint { margin-top: 6px; font-size: 13px; }

/* ---------- 平替子页签（查色号 / 查颜色 / 查图片） ---------- */
.subtabs { display: flex; gap: 6px; margin: 4px 0 16px; flex-wrap: wrap; }
.subtab {
  flex: 1 1 0; min-width: 90px; padding: 10px 12px; font-size: 14px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--muted);
  transition: all .15s; font-weight: 500;
}
.subtab:hover { border-color: var(--primary); color: var(--primary-dark); }
.subtab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.dupe-pane { margin-top: 4px; }
.dupe-pane.hidden { display: none; }
/* 查图片：色块/取色输入大写显示，与查颜色保持一致 */
.color-input-row #dupeImgHex { flex: 1 1 140px; min-width: 120px; text-transform: uppercase; letter-spacing: .5px; }

/* ---------- 报告 ---------- */
.report-sec { margin-bottom: 14px; }
.report-sec h3 {
  font-size: 15px; color: var(--primary-dark); margin-bottom: 8px;
  padding-left: 10px; border-left: 3px solid var(--primary);
}
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.report-tile { background: #fdf8f8; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.report-tile b { display: block; font-size: 14px; margin-bottom: 2px; }
.report-tile .swatch-mini {
  display: inline-block; width: 14px; height: 14px; border-radius: 4px;
  vertical-align: -2px; margin-right: 4px;
}
.report-line { font-size: 13px; margin: 4px 0; }
.report-actions { text-align: center; margin-top: 8px; }

/* ---------- footer / toast ---------- */
.site-footer {
  background: #f2ebea; color: var(--muted); font-size: 12px;
  padding: 18px 0; margin-top: 20px;
}
.site-footer p { margin-bottom: 4px; }
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: rgba(58, 46, 48, .92); color: #fff; font-size: 14px;
  padding: 10px 22px; border-radius: 24px; z-index: 99; animation: fadein .25s;
}
@keyframes fadein { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes sheetin { from { opacity: 0; } }

/* ---------- 导出试色卡弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(30, 20, 22, .55);
  z-index: 90; display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fadein .2s;
}
.modal-box {
  background: var(--card); border-radius: var(--radius);
  width: min(430px, 100%); max-height: 92vh; overflow: auto;
  padding: 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close {
  border: none; background: none; font-size: 18px; color: var(--muted);
  cursor: pointer; padding: 4px 8px; line-height: 1;
}
.modal-mode { display: flex; gap: 8px; margin-bottom: 12px; }
.modal-preview img {
  width: 100%; display: block; border-radius: 10px;
  border: 1px solid var(--border); background: #17181c;
}
.modal-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 10px; }

/* ---------- 生成笔记弹窗（成品笔记预览，模拟小红书排版） ---------- */
.note-figure {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px; margin-bottom: 12px; background: var(--bg);
}
.note-figure img { display: none; border-radius: 8px; background: #17181c; max-height: 34vh; width: auto; margin: 0 auto; }
.note-figure.has-img img { display: block; }
.note-figure-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 8px;
}
.note-figure.has-img .note-figure-bar { margin-top: 8px; }
.note-figure-meta { font-size: 12px; color: var(--muted); line-height: 1.5; flex: 1; }
.note-figure:not(.has-img) { border-style: dashed; }
.note-figure:not(.has-img) .note-figure-bar { margin-top: 0; }
.note-figure:not(.has-img) #btnDownloadFig { display: none; }
.note-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 16px 14px; max-height: 44vh; overflow: auto;
}
.note-title {
  font-size: 17px; font-weight: 700; line-height: 1.5;
  margin: 0 0 12px; color: var(--text);
}
.note-card p { font-size: 13.5px; line-height: 1.9; margin: 0 0 10px; color: #4a3b3e; }
.note-card p:last-child { margin-bottom: 0; }
.note-pt b { color: var(--primary-dark); }
.note-data {
  background: var(--primary-light); border-radius: 8px; padding: 8px 10px;
  font-size: 13px; color: var(--primary-dark); font-family: Consolas, monospace;
}
.note-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.note-tags span {
  font-size: 12.5px; color: #1a4a8a; background: #eaf1fa;
  border-radius: 4px; padding: 2px 7px;
}
.note-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- 操作按钮组（生成推荐 + 导出档案卡 + 生成笔记 一排等宽） ---------- */
.btn-row3 { display: flex; gap: 10px; justify-content: center; flex-wrap: nowrap; width: 100%; }
.btn-row3 .btn { flex: 1 1 0; min-width: 0; padding-left: 12px; padding-right: 12px; white-space: nowrap; }

/* ---------- 色彩报告照片开关与照片 ---------- */
.report-photo-toggle { vertical-align: middle; margin-left: 8px; }
.report-photo { display: flex; justify-content: center; margin: 12px 0 4px; }
.report-photo img {
  max-width: 260px; width: 100%; display: block;
  border-radius: 12px; border: 1px solid var(--border); background: #17181c;
}

/* ============================================================
 * 封面工坊（2026-10-26）：双栏（控制卡 + 预览卡）
 * ============================================================ */
.cover-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 400px;
  gap: 14px; align-items: start;
}
.cover-grid .card { margin-bottom: 0; }
.cover-controls h2 { font-size: 18px; margin-bottom: 6px; }
.cover-controls > .muted { display: block; margin-bottom: 14px; line-height: 1.7; }

/* 模板选择（A 避雷对比 / B 直男人设） */
.cover-tpl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.cover-tpl {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 12px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--border); background: #fff; color: var(--text);
  transition: border-color .15s, background .15s;
}
.cover-tpl:hover { border-color: var(--primary); }
.cover-tpl.active { border-color: var(--primary); background: var(--primary-light); }
.cover-tpl b { font-size: 14px; color: var(--primary-dark); }
.cover-tpl span { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* 字段行（标签 + 主体，复用 pref-label 宽度） */
.cover-field { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.cover-field-body { flex: 1; min-width: 0; }
.cover-hint { font-size: 12px; margin-top: 6px; line-height: 1.6; }

/* 当前试色对象 */
.cover-shade-current { font-size: 13px; color: var(--primary-dark); font-weight: 600; margin-top: 8px; min-height: 20px; }
.cover-shade-current .csc-meta { color: var(--muted); font-weight: 400; margin-left: 6px; }

/* 结论条件选择器（肤色/唇色/场景/季节） */
.cover-ctx-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cover-sel {
  flex: 1 1 calc(50% - 4px); min-width: 0; font-size: 13px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; background: #fff; color: var(--text); outline: none;
  cursor: pointer;
}
.cover-sel:focus { border-color: var(--primary); }

/* 大字标题输入 */
.cover-title-row { display: flex; gap: 8px; align-items: center; }
.cover-title-input {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px; outline: none; background: #fff; color: var(--text);
}
.cover-title-input:focus { border-color: var(--primary); }

/* 人话翻译预览 */
.cover-plain {
  background: var(--primary-light); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; line-height: 1.9; color: #6e3a44;
}
.cover-plain p { margin: 0; }
.cover-plain p + p { margin-top: 4px; }

/* 标注工具条 */
.cover-mark-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 操作按钮 */
.cover-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.cover-actions .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; }

/* 预览卡 */
.cover-preview-card { padding: 12px; }
.cover-preview { position: relative; background: #17181c; border-radius: 10px; overflow: hidden; }
.cover-preview canvas {
  display: block; width: 100%; height: auto;
  touch-action: none; /* 标注拖动不吃页面手势 */
}
.cover-preview.tpl-A canvas { cursor: crosshair; }
.cover-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #9aa0ab; font-size: 13px; text-align: center; padding: 24px; line-height: 1.8;
}
.cover-meta { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }

@media (max-width: 1080px) {
  .cover-grid { grid-template-columns: 1fr; }
  .cover-grid .card { margin-bottom: 16px; }
}

/* ============================================================
 * 移动端独立布局（≤768px）
 * ============================================================ */
.tabbar, .m-steps, .m-nav { display: none; }

@media (max-width: 768px) {
  /* --- 顶部导航 → 底部 tab 栏 --- */
  .tabs { display: none; }
  .tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
    display: flex; background: var(--card);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(180, 90, 100, .10);
  }
  .tabbar .tab {
    flex: 1; border-radius: 0; background: none; color: var(--muted);
    font-size: 12px; padding: 10px 0 8px;
  }
  .tabbar .tab.active { background: none; color: var(--primary-dark); font-weight: 600; }

  main { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .wrap { padding: 0 12px; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
  main { padding-top: 12px; }

  /* --- 试色推荐：分步向导 --- */
  .match-grid { display: block; }
  .match-grid[m-step] .step-card { display: none; }
  .match-grid[m-step="1"] .match-card1,
  .match-grid[m-step="2"] .match-card2 { display: block; }
  /* 卡3 必须保持 flex 列布局（色号列表卡内滚动依赖 flex 链），
     不能用 display:block，否则 #resultArea/.result-list 的 flex 收缩全部失效 */
  .match-grid[m-step="3"] .match-card3 { display: flex; flex-direction: column; }

  .m-steps {
    display: flex; gap: 6px; margin-bottom: 12px;
  }
  .m-steps span {
    flex: 1; text-align: center; font-size: 13px; color: var(--muted);
    background: var(--card); border-radius: 20px; padding: 6px 0;
    border: 1px solid var(--border);
  }
  .m-steps span.on {
    background: var(--primary); border-color: var(--primary);
    color: #fff; font-weight: 600;
  }

  .photo-stage canvas { max-height: 46vh; }
  .photo-stage { min-height: 220px; }
  /* 查图片：照片与检测卡片改为上下堆叠 */
  .photo-layout { grid-template-columns: 1fr; }

  /* --- 触控目标与间距 --- */
  .chip, .chip-btn { padding: 9px 14px; }
  .btn { min-height: 40px; }
  .btn-lg { min-height: 46px; }
  .modal-close, .photo-remove { width: 40px; height: 40px; font-size: 17px; line-height: 40px; }
  .photo-corner-btn { height: 34px; padding: 0 14px; }
  .card { padding: 14px; }
  .m-nav { display: inline-flex; }
  #mNext1 { width: 100%; margin-top: 12px; }
  .btn-row3 { gap: 6px; }
  .btn-row3 .btn { font-size: 14px; padding: 11px 8px; }

  /* --- 试色对比区 --- */
  .match-card3 .tryon-area { flex-wrap: wrap; gap: 10px; justify-content: center; }
  .lips-svg { width: 150px; height: 88px; }
  /* 搜索行窄屏：搜索框尽量占满，开关换行到右侧 */
  .self-add-row { gap: 8px; }
  .self-search { flex: 1 1 180px; max-width: none; }
  /* 卡3 移动端：向导单卡态（m-step=3）的精确限高由 app.js fitCard3() 算
     （要扣除页头与底部 tabbar，都是运行时高度）；非向导态走基础规则
     calc(100dvh - 128px)。此处只关掉吸顶（单卡场景页面不滚）。 */
  .match-card3 { position: static; }

  /* --- 弹窗 bottom sheet --- */
  .modal-mask { align-items: flex-end; padding: 0; animation: sheetin .2s; }
  .modal-box {
    width: 100%; max-height: 88dvh; padding: 14px;
    border-radius: 16px 16px 0 0;
  }

  /* --- 列表/结果 --- */
  .result-card { grid-template-columns: 60px 1fr; padding: 10px 12px; }
  .search-row { flex-wrap: wrap; }
  .search-row .btn { flex-basis: 100%; }
}

