:root {
  --bg: #f2ede3;
  --bg-2: #ebe4d6;
  --paper: #fffdf8;
  --paper-2: #faf6ed;
  --paper-3: #f6f0e4;
  --ink: #2a2621;
  --ink-2: #554d43;
  --muted: #8a8174;
  --line: #e4dac8;
  --line-2: #d5c7b0;
  --walnut: #7a5236;
  --walnut-deep: #463022;
  --terra: #b45f43;
  --sage: #6f7f66;
  --gold: #ad874c;
  --good: #4e7a59;
  --warn: #a9752c;
  --bad: #a34a3e;
  --shadow: 0 1px 2px rgba(70, 48, 34, .04), 0 10px 30px -18px rgba(70, 48, 34, .25);
  --shadow-lg: 0 24px 70px -34px rgba(70, 48, 34, .45);
  --r: 16px;
  --r-sm: 10px;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  background:
    radial-gradient(900px 500px at 85% -5%, rgba(180, 95, 67, .07), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(111, 127, 102, .08), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}
a { color: var(--walnut); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.1em; }
::selection { background: rgba(180, 95, 67, .18); }

/* ---------- shell ---------- */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, #f7f2e8 0%, #f1ebdf 100%);
  border-right: 1px solid var(--line);
}
.brand { display: flex; gap: 11px; align-items: center; padding: 4px 6px 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--walnut-deep); color: #f6efe2; font-family: var(--serif); font-size: 19px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-family: var(--serif); font-size: 16px; letter-spacing: .04em; }
.brand-text small { color: var(--muted); font-size: 10.5px; letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink-2); font-size: 13.5px; text-align: left; transition: .15s ease;
}
.nav button:hover { background: rgba(122, 82, 54, .07); color: var(--ink); }
.nav button.active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.nav button.active .ico { color: var(--terra); }
.nav-tag {
  margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: rgba(180, 95, 67, .1); color: var(--terra);
}
.ico { width: 16px; height: 16px; flex: none; display: inline-grid; place-items: center; color: var(--muted); }
.ico svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rail-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.rail-foot p { margin-top: 8px; line-height: 1.55; }
.dot-line { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 11.5px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.good { background: var(--good); box-shadow: 0 0 0 3px rgba(78,122,89,.12); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(169,117,44,.12); }
.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 30px; background: rgba(242, 237, 227, .82);
  backdrop-filter: blur(14px); border-bottom: 1px solid rgba(228, 218, 200, .8);
}
.crumb { font-family: var(--serif); font-size: 15px; letter-spacing: .06em; color: var(--ink-2); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,248,.7);
  color: var(--muted); font-size: 11px;
}
.app { padding: 26px 30px 64px; max-width: 1440px; }

/* ---------- primitives ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px 22px; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 22px 0; }
.card-h h2, .card-h h3 { font-size: 18px; }
.card-b { padding: 16px 22px 20px; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.small { font-size: 12.5px; }
.ink2 { color: var(--ink-2); }
.mono { font-variant-numeric: tabular-nums; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1.55fr) minmax(320px, .8fr); align-items: start; }
.g-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.kbd {
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--paper-3); border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 6px; color: var(--ink-2);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 500;
  transition: .16s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--walnut); transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--walnut-deep); border-color: var(--walnut-deep); color: #f7f1e4; }
.btn.primary:hover { background: #5a3e2b; }
.btn.terra { background: var(--terra); border-color: var(--terra); color: #fff8f1; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper-2);
  color: var(--ink-2); font-size: 12px; transition: .15s ease; white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); background: var(--paper); text-decoration: none; }
.chip.active { background: var(--walnut-deep); color: #f7f1e4; border-color: var(--walnut-deep); }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px;
  background: var(--paper-3); color: var(--ink-2); font-size: 10.5px; letter-spacing: .02em;
}
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px;
  border-radius: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  background: var(--paper-3); color: var(--ink-2); border: 1px solid transparent;
}
.badge.good { background: rgba(78,122,89,.1); color: var(--good); }
.badge.warn { background: rgba(169,117,44,.12); color: var(--warn); }
.badge.bad { background: rgba(163,74,62,.1); color: var(--bad); }
.badge.ref { background: rgba(138,129,116,.08); color: var(--muted); border-color: var(--line); }
.badge.jd { background: rgba(180,60,50,.1); color: #a53a2f; }
.badge.ghost { border-color: var(--line); background: transparent; }

.callout {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: rgba(173,135,76,.08); border: 1px solid rgba(173,135,76,.22);
  color: var(--ink-2); font-size: 12px; line-height: 1.6;
}
.callout.sage { background: rgba(111,127,102,.08); border-color: rgba(111,127,102,.22); }
.callout.terra { background: rgba(180,95,67,.07); border-color: rgba(180,95,67,.2); }
.callout .ci { color: var(--gold); font-family: var(--serif); font-size: 15px; line-height: 1.2; }

/* ---------- overview ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 30px 32px; border-radius: 20px; color: #f8f2e6;
  background:
    radial-gradient(700px 300px at 92% 10%, rgba(180, 95, 67, .38), transparent 60%),
    radial-gradient(500px 260px at 15% 100%, rgba(111,127,102,.32), transparent 60%),
    linear-gradient(135deg, #3c2a1e 0%, #5b3e2a 58%, #6c4a32 100%);
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px;
  border: 1px solid rgba(255,255,255,.09); border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(255,255,255,.02), 0 0 0 90px rgba(255,255,255,.015);
}
.hero-kicker { font-size: 11px; letter-spacing: .18em; color: rgba(248,242,230,.62); text-transform: uppercase; }
.hero h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.18; margin: 10px 0 8px; font-weight: 500; }
.hero h1 em { font-style: normal; color: #e6b98c; }
.hero-sub { max-width: 640px; color: rgba(248,242,230,.72); font-size: 13px; line-height: 1.75; }
.hero-ask {
  position: relative; z-index: 1; margin-top: 22px; display: flex; gap: 8px;
  max-width: 640px; padding: 6px; border-radius: 12px;
  background: rgba(255,253,248,.1); border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
}
.hero-ask input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  color: #fff8ec; padding: 8px 10px; font-size: 13px;
}
.hero-ask input::placeholder { color: rgba(248,242,230,.45); }
.hero-ask .btn { background: #f3e6d2; border-color: #f3e6d2; color: #4a3323; }
.hero-chips { position: relative; z-index: 1; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.hero-chips a, .hero-chips button {
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06);
  color: rgba(255,248,236,.82); border-radius: 999px; padding: 5px 10px; font-size: 11.5px;
}
.hero-chips a:hover, .hero-chips button:hover { background: rgba(255,255,255,.12); text-decoration: none; }

.stat { padding: 16px 18px; }
.stat-k { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.stat-v { font-family: var(--serif); font-size: 27px; line-height: 1.25; margin-top: 4px; }
.stat-v small { font-size: 12px; color: var(--muted); font-family: var(--sans); margin-left: 3px; }
.stat-d { margin-top: 4px; font-size: 11px; color: var(--ink-2); }

.task { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.task:last-child { border-bottom: 0; }
.task input { accent-color: var(--walnut); margin-top: 3px; }
.task.done .t-text { color: var(--muted); text-decoration: line-through; }
.t-text { font-size: 12.5px; line-height: 1.55; }

.mini-pick { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; }
.mini-pick .thumb { width: 64px; height: 64px; border-radius: 10px; flex: none; }
.mini-pick b { font-size: 14px; display: block; }

/* ---------- decide ---------- */
.score-ring {
  --score: 0; --ring: var(--sage);
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--ring) calc(var(--score) * 1%), var(--line) 0);
}
.score-ring::before { content: ""; position: absolute; inset: 5px; background: var(--paper); border-radius: 50%; }
.score-ring span { position: relative; font-family: var(--serif); font-size: 16px; color: var(--ink); }
.score-ring span small { font-size: 9px; color: var(--muted); }
.prod-card {
  position: relative; padding: 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--paper); transition: .16s ease; cursor: pointer;
}
.prod-card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.prod-card.selected { border-color: var(--walnut); box-shadow: 0 0 0 2px rgba(122,82,54,.12); }
.prod-card.pick::after {
  content: "首选"; position: absolute; top: -1px; right: 12px;
  background: var(--terra); color: #fff8f1; font-size: 9.5px; letter-spacing: .08em;
  padding: 3px 7px; border-radius: 0 0 6px 6px;
}
.prod-top { display: flex; gap: 12px; align-items: flex-start; }
.prod-name { font-family: var(--serif); font-size: 15.5px; line-height: 1.35; }
.prod-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.prod-price { margin-top: 10px; display: flex; align-items: baseline; gap: 7px; }
.prod-price b { font-family: var(--serif); font-size: 23px; font-weight: 600; }
.prod-price span { font-size: 10.5px; color: var(--muted); }
.prod-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.prod-specs div { background: var(--paper-2); border-radius: 7px; padding: 6px 7px; }
.prod-specs i { display: block; font-style: normal; font-size: 9.5px; color: var(--muted); }
.prod-specs b { font-size: 11.5px; font-weight: 600; }
.prod-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; gap: 8px; }
.fit-line { font-size: 11px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.fit-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.fit-dot.warn { background: var(--warn); }
.fit-dot.bad { background: var(--bad); }

.rec {
  position: sticky; top: 82px; padding: 20px; border-radius: var(--r);
  background: linear-gradient(180deg, #fffdf8, #faf5ea); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.rec-kicker { font-size: 10.5px; letter-spacing: .14em; color: var(--terra); }
.rec h3 { font-size: 22px; margin: 5px 0 2px; }
.rec-bars { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.rec-bar { display: grid; grid-template-columns: 58px 1fr 32px; gap: 8px; align-items: center; font-size: 11px; color: var(--ink-2); }
.bar { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--sage); }
.rec-bar b { text-align: right; font-weight: 600; color: var(--ink); font-size: 10.5px; }
.reasons { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.reasons div { display: flex; gap: 7px; font-size: 11.5px; line-height: 1.55; color: var(--ink-2); }
.reasons div::before { content: "·"; color: var(--terra); font-weight: 700; }

.slider-row { display: grid; grid-template-columns: 52px 1fr 34px; gap: 9px; align-items: center; font-size: 11px; color: var(--ink-2); }
input[type="range"] { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 99px; background: var(--line); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--walnut); border: 2px solid var(--paper); box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; }

/* ---------- compare ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
table.cmp { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
table.cmp th, table.cmp td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 12px; }
table.cmp thead th { position: sticky; top: 0; background: var(--paper-2); z-index: 2; font-family: var(--serif); font-weight: 600; }
table.cmp th:first-child, table.cmp td:first-child { position: sticky; left: 0; background: var(--paper); z-index: 1; width: 138px; color: var(--muted); font-weight: 500; }
table.cmp thead th:first-child { background: var(--paper-2); z-index: 3; }
table.cmp tr:last-child td { border-bottom: 0; }
table.cmp td.best { background: rgba(111,127,102,.07); font-weight: 600; color: var(--good); }
table.cmp td.bad { color: var(--bad); }
.cmp-head { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.cmp-head b { font-size: 13.5px; }
.cmp-head span { font-size: 10.5px; color: var(--muted); font-family: var(--sans); }

/* ---------- space ---------- */
.plan-wrap { background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.plan-wrap svg { display: block; width: 100%; height: auto; max-width: 620px; margin: 0 auto; }
.fit-verdict { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-2); }
.fit-verdict .big { font-family: var(--serif); font-size: 25px; line-height: 1.1; flex: none; white-space: nowrap; }
.fit-verdict > div:last-child { min-width: 0; }
.fit-verdict.good { background: rgba(78,122,89,.07); border-color: rgba(78,122,89,.25); }
.fit-verdict.warn { background: rgba(169,117,44,.08); border-color: rgba(169,117,44,.25); }
.fit-verdict.bad { background: rgba(163,74,62,.07); border-color: rgba(163,74,62,.22); }
.clearance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.clearance { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; }
.clearance i { font-style: normal; display: block; font-size: 10px; color: var(--muted); }
.clearance b { font-size: 16px; font-family: var(--serif); }
.clearance small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.input-row { display: grid; grid-template-columns: 1fr 112px; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.input-row.wide { grid-template-columns: 1fr; gap: 4px; align-items: start; }
.input-row.wide .seg { justify-self: start; }
.input-row:last-child { border-bottom: 0; }
.input-row label { font-size: 11.5px; color: var(--ink-2); }
.input-row input, .input-row select {
  width: 100%; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 7px;
  background: var(--paper); font-size: 12px; outline: none;
}
.input-row input:focus, .input-row select:focus { border-color: var(--walnut); }
.seg { display: inline-flex; padding: 3px; background: var(--paper-3); border: 1px solid var(--line); border-radius: 9px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 9px; border-radius: 6px; font-size: 11px; color: var(--muted); }
.seg button.active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.idea-list { display: flex; flex-direction: column; gap: 8px; }
.idea { display: flex; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.idea .n { width: 20px; height: 20px; flex: none; border-radius: 6px; background: var(--paper-3); display: grid; place-items: center; font-size: 10px; color: var(--terra); font-family: var(--serif); }
.idea b { display: block; font-size: 12px; }
.idea p { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 1px; }

/* ---------- viewer ---------- */
.viewer-shell {
  position: relative; height: clamp(420px, 62vh, 680px); border-radius: var(--r);
  overflow: hidden; background: #e9e1d2; border: 1px solid var(--line);
}
.viewer-shell canvas { display: block; width: 100%; height: 100%; }
.viewer-hud { position: absolute; inset: 0; pointer-events: none; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.hud-row { display: flex; gap: 7px; align-items: flex-start; justify-content: space-between; }
.hud-group { display: flex; gap: 5px; flex-wrap: wrap; pointer-events: auto; }
.hud-btn {
  padding: 5px 9px; border-radius: 7px; border: 1px solid rgba(70,48,34,.15);
  background: rgba(255,253,248,.82); color: var(--ink-2); font-size: 10.5px;
  backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(70,48,34,.08);
}
.hud-btn.active, .hud-btn:hover { background: var(--walnut-deep); color: #f7f1e4; border-color: var(--walnut-deep); }
.hud-note { pointer-events: auto; align-self: flex-start; max-width: 360px; padding: 6px 9px; border-radius: 7px; background: rgba(255,253,248,.78); color: var(--ink-2); font-size: 10.5px; backdrop-filter: blur(6px); }

/* ---------- xhs ---------- */
.note-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.note-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); transition: .16s ease; }
.note-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.note-cover {
  position: relative; aspect-ratio: 4/3; background:
    linear-gradient(135deg, rgba(180,95,67,.18), rgba(111,127,102,.18)),
    var(--paper-3);
  display: grid; place-items: center; color: rgba(70,48,34,.4); font-family: var(--serif); font-size: 22px;
  overflow: hidden;
}
.note-cover img { width: 100%; height: 100%; object-fit: cover; }
.note-body { padding: 11px 12px 12px; }
.note-title { font-size: 12.5px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 10px; color: var(--muted); }
.note-cats { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 7px; }
.note-cats span { font-size: 9.5px; padding: 1px 5px; border-radius: 4px; background: var(--paper-3); color: var(--ink-2); }
.empty {
  text-align: center; padding: 42px 20px; border: 1px dashed var(--line-2);
  border-radius: 14px; background: var(--paper-2);
}
.empty-art { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; color: var(--terra); }
.empty-art svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.empty h3 { font-size: 17px; }
.empty p { max-width: 460px; margin: 6px auto 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

/* ---------- prices ---------- */
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
.price-table th { color: var(--muted); font-weight: 500; font-size: 10.5px; letter-spacing: .05em; background: var(--paper-2); }
.price-table tr:last-child td { border-bottom: 0; }
.spark { width: 92px; height: 24px; display: block; }
.spark polyline { fill: none; stroke: var(--sage); stroke-width: 1.5; }
.spark .area { fill: rgba(111,127,102,.1); stroke: none; }
.price-now { font-family: var(--serif); font-size: 15px; }

/* ---------- kujiale / steps ---------- */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.step:last-child { border-bottom: 0; }
.step .n { width: 26px; height: 26px; border-radius: 8px; background: var(--paper-3); display: grid; place-items: center; font-family: var(--serif); color: var(--terra); font-size: 12px; }
.step b { font-size: 13px; }
.step p { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 2px; }
pre.brief {
  max-height: 460px; overflow: auto; padding: 16px; border-radius: 10px;
  background: #2f251d; color: #e9dfd0; font: 11.5px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  padding: 9px 14px; border-radius: 9px; background: var(--walnut-deep); color: #f7f1e4;
  font-size: 12px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: .22s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: relative; height: auto; display: grid; grid-template-columns: 1fr; gap: 8px; padding: 9px 12px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-text small { display: none; }
  .brand { padding: 0; }
  .brand-text b { white-space: nowrap; font-size: 14px; }
  .nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 2px; width: 100%; }
  .nav button { width: auto; justify-content: center; white-space: nowrap; padding: 6px 4px; font-size: 11.5px; gap: 5px; }
  .nav-tag, .rail-foot { display: none; }
  .app { padding: 18px 16px 50px; }
  .topbar { padding: 11px 16px; }
  .g-side, .g2, .g3, .g-list, .two-col { grid-template-columns: 1fr; }
  .rec { position: static; }
}
@media (max-width: 640px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 24px; }
  .hero { padding: 20px 18px; }
  .note-grid { grid-template-columns: 1fr; }
  .hero { padding: 22px 20px; }
  .hero-ask { flex-direction: column; }
  .prod-specs { grid-template-columns: repeat(2, 1fr); }
  .clearance-grid { grid-template-columns: 1fr 1fr; }
  .top-actions .status-pill { display: none; }
}

/* ---------- extras ---------- */
.mini-note { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-2); color: var(--ink); }
.mini-note:hover { text-decoration: none; border-color: var(--line-2); background: var(--paper); }
.mini-note b { font-size: 12px; line-height: 1.45; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-note span { font-size: 10px; color: var(--muted); }
.budget-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.budget-top b { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.budget-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--line); }
.budget-bar i { display: block; height: 100%; }
.budget-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 10.5px; color: var(--muted); }
.budget-legend span { display: flex; align-items: center; gap: 5px; }
.budget-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.budget-legend b { color: var(--ink-2); font-weight: 600; }
.cmp-check { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); cursor: pointer; user-select: none; }
.cmp-check input { accent-color: var(--walnut); }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "＋"; float: right; color: var(--muted); font-family: var(--sans); }
details[open] > summary::after { content: "－"; }

/* ---------- kujiale api ---------- */
.mini-field { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; color: var(--muted); }
.mini-field input { padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--paper); font-size: 12px; color: var(--ink); outline: none; width: 100%; }
.mini-field input:focus { border-color: var(--walnut); }
.kjl-log { margin-top: 8px; max-height: 170px; overflow: auto; padding: 8px 10px; border-radius: 8px; background: var(--paper-2); border: 1px solid var(--line); font: 10.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); }
.kjl-log .t { color: var(--muted); margin-right: 5px; }
.kjl-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.kjl-imgs a { display: flex; flex-direction: column; gap: 4px; font-size: 10px; color: var(--muted); }
.kjl-imgs a:hover { text-decoration: none; }
.kjl-imgs img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); background: var(--paper-3); }

/* ---------- login gate ---------- */
.login-gate { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(700px 400px at 70% 10%, rgba(180,95,67,.12), transparent 60%), rgba(243,239,230,.96); backdrop-filter: blur(8px); }
.login-gate[hidden] { display: none; }
.login-card { width: min(360px, 100%); padding: 26px 24px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-lg); text-align: center; }
.login-card h2 { font-size: 24px; margin: 0; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--paper-2); font-size: 13px; text-align: center; letter-spacing: .08em; outline: none; }
.login-card input:focus { border-color: var(--walnut); }
