/* ============================================================
   以油护肤调香室 · 样式
   ============================================================ */

:root {
  --bg: #F7F3EC;
  --bg-2: #FCF9F3;
  --panel: #FFFDFA;
  --ink: #2A241C;
  --ink-2: #5B5245;
  --ink-3: #958A77;
  --line: #E6DACA;
  --line-2: #F0E7D9;
  --gold: #B8863B;
  --danger: #B9413A;
  --danger-soft: #FBEDEA;
  --warn: #A9762A;
  --warn-soft: #FBF2E2;
  --ok: #4E7A56;
  --ok-soft: #EDF5EE;
  --accent: #6B7BB5;
  --accent-soft: #EDEFF8;
  --accent-deep: #414B78;
  --radius: 16px;
  --serif: "Source Han Serif CN", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Source Han Sans CN", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(255, 255, 255, .9), transparent 60%),
    radial-gradient(900px 500px at 92% 0%, var(--accent-soft), transparent 62%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color .5s ease;
}

::selection { background: var(--accent); color: #fff; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  flex: none;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  background: rgba(250, 247, 241, .82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(155deg, #fff, #F2E8D8);
  border: 1px solid var(--line);
  color: var(--gold);
  box-shadow: 0 2px 6px -3px rgba(120, 90, 40, .4);
}
.brand-mark svg { width: 15px; height: 19px; }

.brand-text h1 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .04em;
  margin: 0;
  line-height: 1.2;
}
.brand-text p {
  margin: 2px 0 0;
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.brand-text .sep { margin: 0 6px; opacity: .6; }

.top-right { display: flex; align-items: center; gap: 9px; }

.live-badge {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px;
  font-family: var(--mono);
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  white-space: nowrap;
}
.live-badge .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .04);
}
.live-badge.ok { border-color: #C8DCC9; background: var(--ok-soft); color: var(--ok); }
.live-badge.ok .pulse { background: var(--ok); box-shadow: 0 0 0 3px rgba(78, 122, 86, .16); animation: blink 2.4s infinite; }
.live-badge.danger { border-color: #E7C0BA; background: var(--danger-soft); color: var(--danger); }
.live-badge.danger .pulse { background: var(--danger); box-shadow: 0 0 0 3px rgba(185, 65, 58, .16); animation: blink 1.2s infinite; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.btn {
  font-family: var(--sans);
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: .18s ease;
  white-space: nowrap;
}
.btn:hover { border-color: #D6C7B1; color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 15px; height: 15px; }
.btn.primary {
  background: linear-gradient(165deg, var(--accent), var(--accent-deep));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px -10px var(--accent-deep);
}
.btn.primary:hover { color: #fff; filter: brightness(1.06); }
.btn.ghost { background: rgba(255, 255, 255, .6); }
.btn.tiny { font-size: 11.5px; padding: 5px 10px; border-radius: 8px; }
.btn.wide { width: 100%; justify-content: center; padding: 11px; font-size: 13px; }
.btn.done { background: var(--ok-soft); border-color: #C8DCC9; color: var(--ok); }

/* ---------------- 分享提示条 ---------------- */
.share-banner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--accent-deep);
}
.share-banner.on { display: flex; }
.share-banner p { margin: 0; flex: 1; }
.sb-icon { font-size: 13px; opacity: .8; }

/* ---------------- 主布局 ---------------- */
.lab {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 332px minmax(0, 1fr) 398px;
  gap: 15px;
  padding: 15px 20px 0;
  align-items: stretch;
}

.col {
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 26px;
  scrollbar-width: thin;
  scrollbar-color: #DCCFBB transparent;
}
.col::-webkit-scrollbar { width: 7px; }
.col::-webkit-scrollbar-thumb { background: #DDD0BC; border-radius: 99px; }
.col::-webkit-scrollbar-track { background: transparent; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 14px 34px -28px rgba(90, 70, 40, .55);
}
.panel + .panel { margin-top: 13px; }

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.panel-head h2 {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 600;
  margin: 0;
  letter-spacing: .02em;
}
.ph-note { font-size: 10.5px; color: var(--ink-3); font-family: var(--mono); }

.sub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 15px 0 7px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
}
.sub-head h3 { margin: 0; font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; }
.sub-head span { font-size: 10px; color: var(--ink-3); }

.panel-intro {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-3);
  margin: -3px 0 11px;
}

.empty {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.7;
  margin: 8px 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
}

/* ---------------- 场景 ---------------- */
.scn-list { display: flex; flex-direction: column; gap: 6px; }

.scn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  font-family: var(--sans);
  transition: .16s ease;
  position: relative;
}
.scn:hover { border-color: #D6C7B1; }
.scn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.scn-main b { font-size: 13px; font-weight: 600; color: var(--ink); }
.scn-main i { font-style: normal; font-size: 10.5px; color: var(--ink-3); line-height: 1.4; }
.scn-cap {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  padding: 2px 6px;
  border-radius: 5px;
  background: #F6F1E8;
  white-space: nowrap;
}
.scn.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .02);
}
.scn.on .scn-cap { background: #fff; color: var(--accent-deep); }
.scn.on::before {
  content: "";
  position: absolute;
  left: -1px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

/* ---------------- 通用小组件 ---------------- */
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }

.chip {
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: .16s ease;
  text-align: left;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
}
.chip em { font-style: normal; font-size: 9px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chip:hover { border-color: #D6C7B1; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.chip.on em { color: var(--accent); }

.mood-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }

.mood {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  font-family: var(--sans);
  transition: .16s ease;
  flex-wrap: wrap;
}
.mood i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.mood b { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.mood em { font-style: normal; font-size: 9px; color: var(--ink-3); width: 100%; margin-top: -1px; line-height: 1.2; }
.mood:hover { border-color: #D6C7B1; }
.mood.on { border-color: var(--accent); background: var(--accent-soft); }
.mood.on b { color: var(--accent-deep); }

.size-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }

.pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  transition: .16s ease;
  text-align: center;
}
.pill:hover { border-color: #D6C7B1; }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.size-custom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 3px;
  font-size: 10px;
  color: var(--ink-3);
}
.size-custom span { font-size: 10px; color: var(--ink-3); }
.size-custom input {
  width: 46px;
  border: 0;
  border-bottom: 1px dashed var(--line);
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  text-align: right;
  outline: none;
  padding-bottom: 1px;
  -moz-appearance: textfield;
}
.size-custom input:focus { border-bottom-color: var(--accent); }
.size-custom input::-webkit-outer-spin-button,
.size-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.size-custom i { font-style: normal; font-size: 10px; color: var(--ink-3); }

.mini-row { display: flex; flex-wrap: wrap; gap: 4px; }
.mini-row.scroll-x {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}
.mini-row.scroll-x::-webkit-scrollbar { height: 0; }

.mini {
  font-family: var(--sans);
  font-size: 10.5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-3);
  cursor: pointer;
  white-space: nowrap;
  transition: .14s ease;
}
.mini:hover { color: var(--ink-2); border-color: #D6C7B1; }
.mini.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------- 基底油 ---------------- */
.car-selected { margin: 9px 0 0; display: flex; flex-direction: column; gap: 7px; }

.car-row {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 10px 8px;
  background: linear-gradient(180deg, #fff, #FDFAF4);
}
.car-head { display: flex; align-items: center; gap: 6px; }
.car-head b { font-size: 12.5px; font-weight: 600; }
.car-ml { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line-2); }

.x {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 5px;
}
.x:hover { color: var(--danger); background: var(--danger-soft); }

.ratio-line { display: flex; align-items: center; gap: 8px; margin: 7px 0 5px; }
.ratio-val { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); width: 34px; text-align: right; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: #EDE3D3;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
}
input[type="range"]:disabled { opacity: .45; }

.car-foot { font-size: 9.5px; color: var(--ink-3); font-family: var(--mono); }

.car-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }

.car-card {
  font-family: var(--sans);
  text-align: left;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: .15s ease;
}
.car-card:hover { border-color: #D6C7B1; transform: translateY(-1px); }
.car-card.on { border-color: var(--accent); background: var(--accent-soft); }
.cc-name { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.cc-en { font-size: 8.5px; color: var(--ink-3); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-foot { display: flex; gap: 5px; margin-top: 3px; }
.cc-foot i { font-style: normal; font-size: 9px; color: var(--ink-3); }
.cc-load { font-family: var(--mono); color: var(--gold) !important; }
.car-card.on .cc-load { color: var(--accent-deep) !important; }

/* ---------------- 提示面板 ---------------- */
.tip-panel h3 {
  font-family: var(--serif);
  font-size: 13px;
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--ink-2);
}
.tip-panel ol { margin: 0; padding-left: 15px; }
.tip-panel li { font-size: 11px; line-height: 1.75; color: var(--ink-2); margin-bottom: 3px; }
.disclaimer {
  font-size: 10px;
  line-height: 1.7;
  color: var(--ink-3);
  margin: 11px 0 0;
  padding-top: 9px;
  border-top: 1px dashed var(--line-2);
}

/* ---------------- 精油托盘 ---------------- */
.tray-head { position: sticky; top: 0; z-index: 12; }

.search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
  transition: .18s ease;
}
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-wrap svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.search-wrap input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.search-wrap input::placeholder { color: #B7AB97; }

.tray-hint { font-size: 10px; color: var(--ink-3); margin: 8px 0 0; }
.tray-hint b { font-family: var(--mono); color: var(--ink-2); }

.oil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(111px, 1fr));
  gap: 7px;
  margin-top: 13px;
}

.oil-card {
  position: relative;
  padding: 9px 9px 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 78px;
  transition: border-color .15s ease, transform .15s ease, background .15s ease, box-shadow .15s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.oil-card:hover { border-color: #D6C7B1; transform: translateY(-1px); box-shadow: 0 8px 18px -16px rgba(90, 70, 40, .8); }
.oil-card:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.oil-card.on { border-color: var(--accent); background: var(--accent-soft); }
.oil-card.on:hover { background: var(--accent-soft); }

.oc-top { display: flex; align-items: center; gap: 5px; padding-right: 13px; }
.oc-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; opacity: .8; }
.oc-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oil-card.on .oc-name { color: var(--accent-deep); }

.oc-en {
  font-size: 8.5px;
  color: var(--ink-3);
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 10px;
}

.oc-meta { display: flex; gap: 4px; align-items: center; margin-top: auto; padding-left: 10px; padding-right: 2px; }
.oc-cap { font-style: normal; font-family: var(--mono); font-size: 8.5px; color: var(--gold); flex: none; }
.oc-flag { font-style: normal; font-size: 8px; color: var(--danger); background: var(--danger-soft); padding: 0 3px; border-radius: 3px; white-space: nowrap; }
.oil-card.on .oc-cap { color: var(--accent-deep); }
.oil-card.on .oc-flag { background: #fff; }

.oc-note {
  font-style: normal;
  font-size: 8px;
  width: 12px; height: 12px;
  display: grid; place-items: center;
  border-radius: 3px;
  flex: none;
  color: var(--ink-3);
  background: #F5EFE4;
  font-family: var(--mono);
}
.oc-note.n-前调 { color: #B07A2C; background: #FBF1DD; }
.oc-note.n-中调 { color: #8A5C93; background: #F6EEF8; }
.oc-note.n-后调 { color: #4F7060; background: #EDF4F0; }

.oc-drop {
  position: absolute;
  right: 6px; bottom: 6px;
  min-width: 17px;
  height: 15px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 9px;
  border-radius: 99px;
  box-shadow: 0 2px 6px -3px var(--accent-deep);
}

.oc-info {
  position: absolute;
  top: 6px; right: 6px;
  width: 13px; height: 13px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 8.5px;
  font-style: italic;
  font-family: Georgia, serif;
  color: var(--ink-3);
  background: rgba(0, 0, 0, .04);
  opacity: .5;
  transition: .15s ease;
}
.oil-card:hover .oc-info { opacity: 1; }
.oc-info:hover { background: var(--ink); color: #fff; }

/* ---------------- 右栏 · 浓度 ---------------- */
.gauge-panel { background: linear-gradient(180deg, #fff, #FDFAF3); }

.gauge-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.conc-block { display: flex; align-items: baseline; flex-wrap: wrap; padding-top: 6px; }
.conc-num {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--ink);
  transition: color .2s ease;
}
.conc-num.over { color: var(--danger); }
.conc-unit { font-size: 17px; color: var(--ink-3); margin-left: 3px; font-family: var(--serif); }
.conc-label { width: 100%; font-style: normal; font-size: 10.5px; color: var(--ink-3); letter-spacing: .12em; margin-top: 5px; }

.vessel-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vessel-wrap { width: 100px; position: relative; }
.vessel { width: 100%; height: auto; display: block; filter: saturate(1.1); }
.vessel-meta { display: flex; gap: 6px; font-family: var(--mono); font-size: 8.5px; color: var(--ink-3); }
.vessel-meta .red { color: var(--danger); }

.drop-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 12px; }
.fall-drop {
  position: absolute;
  top: 14%;
  width: 6px; height: 9px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  opacity: .95;
  animation: dropfall .85s cubic-bezier(.4, .1, .7, .9) forwards;
}
@keyframes dropfall {
  0% { transform: translateY(0) scale(.7); opacity: 0; }
  18% { opacity: .95; }
  75% { opacity: .95; }
  100% { transform: translateY(108px) scale(1.15); opacity: 0; }
}

/* 浓度尺 */
.scale { margin: 17px 0 0; }
.scale-track {
  position: relative;
  height: 9px;
  border-radius: 99px;
  background: #EDE2D0;
  box-shadow: inset 0 1px 3px rgba(120, 90, 40, .14);
}
.gauge-fill {
  height: 100%;
  border-radius: 99px;
  background-color: var(--accent);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(0, 0, 0, .05));
  transition: width .35s cubic-bezier(.3, .8, .4, 1), background-color .3s ease;
  min-width: 3px;
  box-shadow: 0 0 12px -4px var(--accent);
}
.gauge-fill.over {
  background-color: var(--danger);
  box-shadow: 0 0 12px -3px var(--danger);
}
.gauge-cap {
  position: absolute;
  top: -5px;
  width: 2px;
  height: 19px;
  background: var(--ink-2);
  border-radius: 2px;
  transform: translateX(-1px);
  transition: left .3s ease;
}
.gauge-cap::after {
  content: "";
  position: absolute;
  top: -4px; left: -3px;
  width: 8px; height: 4px;
  border-radius: 2px 2px 0 0;
  background: var(--ink-2);
}
.gauge-cap-label {
  position: absolute;
  top: -23px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1.5;
  white-space: nowrap;
  transition: left .3s ease;
  box-shadow: 0 1px 2px rgba(90, 70, 40, .06);
  z-index: 2;
}
.scale-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-3);
}

.gauge-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 10.5px; color: var(--ink-3); }
.gauge-foot p { margin: 0; }
.gauge-foot b { font-family: var(--mono); color: var(--ink); font-weight: 600; }
.red { color: var(--danger) !important; }

/* ---------------- 配方盘 ---------------- */
.meta-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin-bottom: 11px; }
.meta-cell { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; background: #FAF6EE; border-radius: 7px; }
.meta-cell i { font-style: normal; font-size: 9px; color: var(--ink-3); }
.meta-cell b { font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--ink); }

.fm-list { display: flex; flex-direction: column; gap: 2px; }

.fm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line-2);
}
.fm-row:last-child { border-bottom: 0; }
.fm-row.over { background: var(--danger-soft); border-radius: 8px; padding-left: 7px; padding-right: 7px; }
.fm-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.fm-main { flex: 1; min-width: 0; }
.fm-line { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.fm-line b { font-size: 12px; font-weight: 600; }
.fm-line em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); }
.fm-bar { height: 4px; border-radius: 99px; background: #EFE7D9; margin: 4px 0 3px; overflow: hidden; }
.fm-bar i { display: block; height: 100%; border-radius: 99px; transition: width .3s ease; }
.fm-sub { font-size: 9px; color: var(--ink-3); font-family: var(--mono); }
.fm-row.over .fm-sub { color: var(--danger); }

.stepper { display: flex; align-items: center; gap: 1px; background: #F7F2E8; border-radius: 8px; padding: 2px; }
.stepper button {
  width: 20px; height: 20px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: .14s ease;
  display: grid; place-items: center;
  box-shadow: 0 1px 2px rgba(90, 70, 40, .08);
}
.stepper button:hover { background: var(--accent); color: #fff; }
.stepper span { min-width: 20px; text-align: center; font-family: var(--mono); font-size: 11px; font-weight: 600; }
.stepper.big button { width: 34px; height: 34px; font-size: 17px; }
.stepper.big span { min-width: 38px; font-size: 15px; }

/* ---------------- 报告 ---------------- */
.report-panel { padding-bottom: 13px; }
.rp-badge {
  font-size: 9.5px;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 99px;
  background: #F5EFE4;
  color: var(--ink-3);
  letter-spacing: .04em;
}
.rp-badge.ok { background: var(--ok-soft); color: var(--ok); }
.rp-badge.danger { background: var(--danger-soft); color: var(--danger); }
.report-stamp { font-size: 9.5px; color: var(--ink-3); margin: -4px 0 12px; font-family: var(--mono); }

.rp-sec { padding: 11px 0; border-top: 1px dashed var(--line-2); }
.rp-sec:first-child { border-top: 0; padding-top: 2px; }
.rp-sec h4 {
  margin: 0 0 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .06em;
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.rp-sec h4 span { font-size: 9px; color: var(--ink-3); font-weight: 400; letter-spacing: 0; font-family: var(--mono); }

.rp-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rp-meta div { display: flex; flex-direction: column; gap: 1px; }
.rp-meta i { font-style: normal; font-size: 9px; color: var(--ink-3); }
.rp-meta b { font-family: var(--mono); font-size: 11px; font-weight: 600; }
.rp-note { font-size: 10px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.6; }
.rp-empty { font-size: 10.5px; color: var(--ink-3); margin: 0; padding: 8px 0; }

.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.bar-row span { font-size: 10px; color: var(--ink-2); width: 56px; flex: none; }
.bar-row .bar { flex: 1; height: 5px; border-radius: 99px; background: #F2EADC; overflow: hidden; }
.bar-row .bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #E0CB9E, var(--accent));
  transition: width .4s ease;
}
.bar-row em { font-style: normal; font-family: var(--mono); font-size: 9px; color: var(--ink-3); width: 30px; text-align: right; flex: none; }

.nt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.nt-row span { font-size: 10px; color: var(--ink-2); width: 30px; }
.nt-row .bar { flex: 1; height: 5px; border-radius: 99px; background: #F2EADC; overflow: hidden; }
.nt-row .bar i { display: block; height: 100%; border-radius: 99px; background: var(--gold); }
.nt-row em { font-style: normal; font-family: var(--mono); font-size: 9px; color: var(--ink-3); width: 30px; text-align: right; }

.warn-item {
  border-radius: 9px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-left: 2.5px solid var(--line);
  background: #FAF7F1;
}
.warn-item b { display: block; font-size: 10.5px; font-weight: 600; margin-bottom: 3px; color: var(--ink-2); }
.warn-item p { margin: 0; font-size: 9.5px; line-height: 1.65; color: var(--ink-3); }
.warn-item.danger { border-left-color: var(--danger); background: var(--danger-soft); }
.warn-item.danger b { color: var(--danger); }
.warn-item.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.warn-item.warn b { color: var(--warn); }
.warn-item.info { border-left-color: #C3B49A; }

.concl p { font-size: 10.5px; line-height: 1.85; color: var(--ink-2); margin: 0 0 7px; }
.concl p:last-child { margin-bottom: 0; }

.report-actions { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line-2); }

/* ---------------- 弹层 ---------------- */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(40, 32, 22, .42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 24px;
  overflow-y: auto;
}
.modal-mask.on { display: flex; align-items: center; justify-content: center; }

.modal {
  position: relative;
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 30px 70px -30px rgba(40, 25, 5, .6);
  animation: pop .24s cubic-bezier(.2, .9, .3, 1);
  margin: auto;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

.modal h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 6px; font-weight: 600; }
.modal-sub { font-size: 11.5px; line-height: 1.7; color: var(--ink-3); margin: 0 0 15px; }

.modal-x {
  position: absolute;
  top: 14px; right: 14px;
  width: 26px; height: 26px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.modal-x:hover { color: var(--danger); border-color: #E7C0BA; }

.share-summary {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 11.5px;
  color: var(--accent-deep);
  margin-bottom: 15px;
  line-height: 1.6;
}
.share-summary b { font-family: var(--mono); }

.field-label { display: block; font-size: 10px; color: var(--ink-3); letter-spacing: .1em; margin-bottom: 5px; }

#shareLink {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-2);
  background: #FBF7EF;
  resize: none;
  outline: none;
  word-break: break-all;
}
#shareLink:focus { border-color: var(--accent); }

.modal-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 13px; }
.modal-tip { font-size: 9.5px; color: var(--ink-3); line-height: 1.6; margin: 12px 0 0; }

/* 精油详情 */
.oil-modal { width: min(500px, 100%); }
.od-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.od-swatch { width: 44px; height: 44px; border-radius: 12px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.od-head h3 { margin: 0; font-size: 19px; }
.od-head p { margin: 1px 0 0; font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.od-head em { font-style: italic; font-size: 9.5px; color: var(--ink-3); }

.od-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.od-tags i {
  font-style: normal;
  font-size: 9.5px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #F5EFE4;
  color: var(--ink-2);
}
.od-tags .flag { background: var(--danger-soft); color: var(--danger); }
.od-tags .flag.ok { background: var(--ok-soft); color: var(--ok); }

.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 12px; }
.od-grid div { display: flex; flex-direction: column; gap: 2px; }
.od-grid i { font-style: normal; font-size: 9px; color: var(--ink-3); }
.od-grid b { font-size: 11px; font-weight: 500; color: var(--ink-2); line-height: 1.5; }

.od-care {
  font-size: 10.5px;
  line-height: 1.75;
  color: var(--ink-2);
  background: #FAF6EE;
  border-radius: 9px;
  padding: 10px 12px;
  margin: 0 0 15px;
}
.od-actions { display: flex; align-items: center; gap: 12px; }
.od-actions .btn { flex: 1; justify-content: center; padding: 10px; }

/* ---------------- 页脚 ---------------- */
.foot {
  display: none;
  gap: 8px;
  justify-content: center;
  padding: 18px 20px 26px;
  font-size: 9.5px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.foot i { font-style: normal; opacity: .5; }
.mono { font-family: var(--mono); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1440px) {
  .lab { grid-template-columns: 310px minmax(0, 1fr) 372px; gap: 13px; padding: 13px 16px 0; }
  .conc-num { font-size: 44px; }
}

@media (max-width: 1200px) {
  .lab { grid-template-columns: 300px minmax(0, 1fr); }
  .col-right { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; align-items: start; }
  .col-right .panel + .panel { margin-top: 0; }
  .report-panel { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  body { display: block; overflow-x: hidden; }
  .topbar { height: auto; padding: 10px 13px; flex-wrap: wrap; gap: 8px; position: sticky; top: 0; }
  .brand-text h1 { font-size: 16px; }
  .brand-text p { font-size: 9px; }
  .top-right { width: 100%; justify-content: space-between; gap: 6px; }
  .live-badge { font-size: 10.5px; padding: 5px 9px; }
  .lab { display: flex; flex-direction: column; gap: 12px; height: auto; padding: 12px 12px 0; }
  .col { display: contents; }
  .panel + .panel { margin-top: 0; }
  .col-left .panel:nth-child(1) { order: 1; }
  .col-left .panel:nth-child(2) { order: 2; }
  .col-mid .tray-head { order: 3; }
  .col-mid .oil-grid { order: 4; margin-top: 0; }
  .col-right .gauge-panel { order: 5; }
  .col-right .panel:nth-of-type(2) { order: 6; }
  .col-right .report-panel { order: 7; }
  .col-left .tip-panel { order: 8; }
  .tray-head { position: static; }
  .oil-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .foot { display: flex; }
  .modal { padding: 20px; }
  .share-banner { padding: 8px 14px; font-size: 11px; }
}

@media (max-width: 420px) {
  .scn-main i { display: none; }
  .oil-grid { grid-template-columns: repeat(3, 1fr); }
  .chips { grid-template-columns: 1fr 1fr; }
}

@media print {
  body { background: #fff; }
  .topbar, .col-left, .col-mid, .report-actions, .foot, .share-banner { display: none !important; }
  .lab { display: block; padding: 0; height: auto; }
}
