/* DealRadar web · design D (calm, editorial, data-rich).
   Ground warm off-white; serif headings; mono numbers.
   sage = best / buy · amber = wait · slate = searching · blue = "you opened this / you are here"
   terracotta = only the user's own target. */

:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --side: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f1eee7;
  --ph: #ebe6dc;
  --line: #e7e3da;
  --line-soft: #efebe3;
  --line-strong: #d6d1c6;
  --rail: #ece8df;
  --ink: #18201e;
  --ink-2: #3a4240;
  --muted: #5c6461;
  --faint: #8c9591;
  --sage: #2f6b4f;
  --sage-ink: #245a40;
  --sage-bg: #e2efe6;
  --sage-soft: #9fc6b0;
  --sage-hatch-a: #d8eadf;
  --sage-hatch-b: #c3dccc;
  --amber: #7a520f;
  --amber-bg: #f7ecd6;
  --amber-bar: #c9952f;
  --slate: #46525a;
  --slate-bg: #e9ecee;
  --blue: #2d4c78;
  --blue-bg: #e6ecf5;
  --blue-dot: #5d7fae;
  --terra: #b4532a;
  --terra-ink: #9a431f;
  --danger: #9a2f1f;
  --danger-bg: #f8e6e2;
  --inverse: #18201e;
  --inverse-ink: #ffffff;
  --inverse-muted: #c9d1ce;
  --inverse-text: #e7ecea;
  --inverse-sage: #a9d9bd;
  --inverse-amber: #f0d29a;
  --inverse-track: #2a3431;
  --bar-buy: #6fbf93;
  --bar-wait: #e0b25c;
  --bar-find: #9aa6ad;
  --bar-cart: #8eaad6;
  --overlay: rgba(24, 32, 30, .42);
  --shadow: 0 1px 2px rgba(24, 32, 30, .04), 0 8px 24px rgba(24, 32, 30, .06);
  --focus: #2d4c78;
  --chart-ink: #18201e;
  --band: #f1eee7;
  --event: #b4c0bb;

  /* System fonts only: nothing is loaded from a third party (no visitor IP leaves for a font CDN). */
  --serif: ui-serif, 'New York', 'Songti SC', 'Noto Serif CJK SC', 'Source Han Serif SC', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Roboto Mono', 'Liberation Mono', monospace;
  --radius: 18px;
  --radius-sm: 13px;
}

/* Dark: a deep green-black ground; data colours lifted to stay ≥ 4.5:1 on surfaces. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111513; --side: #151a18; --surface: #1a201e; --surface-2: #232a27; --ph: #262d2a;
    --line: #2c3532; --line-soft: #262e2b; --line-strong: #3a4541; --rail: #2f3835;
    --ink: #ecefe9; --ink-2: #cdd3cf; --muted: #a3aca8; --faint: #7d8783;
    --sage: #7fcfa0; --sage-ink: #9fdcb7; --sage-bg: #1d3528; --sage-soft: #3f7a5a; --sage-hatch-a: #1f3a2c; --sage-hatch-b: #2a4a38;
    --amber: #f0c97a; --amber-bg: #3a2e17; --amber-bar: #d9a645;
    --slate: #b9c4cb; --slate-bg: #2a3136;
    --blue: #a9c1e8; --blue-bg: #1f2b3d; --blue-dot: #7d9fd0;
    --terra: #e08a62; --terra-ink: #eda283;
    --danger: #f19c8b; --danger-bg: #3a201b;
    --inverse: #0b0e0d; --inverse-ink: #f4f6f3; --inverse-muted: #b5bfbb; --inverse-text: #dfe5e2; --inverse-track: #252e2b;
    --overlay: rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --focus: #a9c1e8; --chart-ink: #ecefe9; --band: #252d2a; --event: #56635e;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111513; --side: #151a18; --surface: #1a201e; --surface-2: #232a27; --ph: #262d2a;
  --line: #2c3532; --line-soft: #262e2b; --line-strong: #3a4541; --rail: #2f3835;
  --ink: #ecefe9; --ink-2: #cdd3cf; --muted: #a3aca8; --faint: #7d8783;
  --sage: #7fcfa0; --sage-ink: #9fdcb7; --sage-bg: #1d3528; --sage-soft: #3f7a5a; --sage-hatch-a: #1f3a2c; --sage-hatch-b: #2a4a38;
  --amber: #f0c97a; --amber-bg: #3a2e17; --amber-bar: #d9a645;
  --slate: #b9c4cb; --slate-bg: #2a3136;
  --blue: #a9c1e8; --blue-bg: #1f2b3d; --blue-dot: #7d9fd0;
  --terra: #e08a62; --terra-ink: #eda283;
  --danger: #f19c8b; --danger-bg: #3a201b;
  --inverse: #0b0e0d; --inverse-ink: #f4f6f3; --inverse-muted: #b5bfbb; --inverse-text: #dfe5e2; --inverse-track: #252e2b;
  --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --focus: #a9c1e8; --chart-ink: #ecefe9; --band: #252d2a; --event: #56635e;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html[lang="en"] body { font-size: 15px; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--blue); }
h1, h2, h3, p { margin: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- type */
.h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: .005em; }
.h2 { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.3; }
.h3 { font-size: 15px; font-weight: 600; }
.serif { font-family: var(--serif); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.big { font-family: var(--mono); font-size: 32px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.src { font-size: 12.5px; color: var(--muted); }
.eyebrow { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.body { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.best { color: var(--sage); }
.terra { color: var(--terra-ink); }
.you { color: var(--blue); }
.strike { font-family: var(--mono); font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.danger-text { color: var(--danger); }

/* ---------- shell */
.shell { min-height: 100vh; display: flex; background: linear-gradient(90deg, var(--side) 0 231px, var(--line) 231px 232px, var(--bg) 232px); }
.side {
  position: sticky; top: 0; height: 100vh; width: 232px; flex: 0 0 232px;
  padding: 28px 16px 20px; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--line); background: var(--side);
}
.logo { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 20px 10px; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.logo span { color: var(--sage); }
.nav {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px;
  font-size: 14.5px; color: var(--ink-2); text-decoration: none; transition: background .15s;
}
.nav svg { width: 20px; height: 20px; flex: none; }
.nav:hover { background: var(--surface-2); }
.nav[aria-current="page"] { background: var(--ink); color: var(--bg); font-weight: 600; }
.nav .count { margin-left: auto; font-family: var(--mono); font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--sage-bg); color: var(--sage-ink); }
.nav[aria-current="page"] .count { background: rgba(255, 255, 255, .16); color: inherit; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 0 10px; }
.side-prefs { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.side-prefs .lang-select { align-self: stretch; }
.lang-select .select { height: 34px; font-size: 13px; padding: 0 28px 0 10px; background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; max-width: 100%; }
.side-prefs .lang-select .select { width: 100%; }
.main { flex: 1 1 auto; min-width: 0; padding: 32px clamp(16px, 3.2vw, 44px) 64px; }
.main:focus { outline: none; }
.wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.wrap.narrow { max-width: 760px; }
.topbar { display: none; }
.tabs { display: none; }

@media (max-width: 720px) {
  .shell { display: block; background: var(--bg); }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 5; padding: 12px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  }
  .topbar .logo { margin: 0; font-size: 19px; }
  .main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tabs {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
    padding: 8px 4px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
  }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; font-size: 11px; color: var(--muted); text-decoration: none; padding: 4px 2px; border-radius: 10px; min-width: 0; }
  .tab span { max-width: 100%; text-align: center; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; }
  .tab svg { width: 22px; height: 22px; }
  .tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
  .h1 { font-size: 26px; }
  .big { font-size: 28px; }
}

/* ---------- layout helpers */
.row-between { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.row-base { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hstack { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vstack { display: flex; flex-direction: column; gap: 10px; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-14 { gap: 14px; } .gap-18 { gap: 18px; }
.grow { flex: 1 1 auto; min-width: 0; }
.two { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.two > .l { flex: 1 1 300px; min-width: 0; }
.two.detail > .l { max-width: 380px; }
@media (max-width: 860px) { .two.detail > .l { max-width: none; } }
.two > .r { flex: 2 1 440px; min-width: 0; }
.sticky-col { position: sticky; top: 24px; }
@media (max-width: 960px) { .sticky-col { position: static; } }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .grid.one-sm { grid-template-columns: minmax(0, 1fr); } }

/* ---------- surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 18px; }
.pad-sm { padding: 12px 14px; }
.inverse { background: var(--inverse); color: var(--inverse-ink); border-radius: var(--radius); padding: 18px 20px; }
.inverse .muted { color: var(--inverse-muted); }
.inverse .ok { color: var(--inverse-sage); }
.inverse .warn { color: var(--inverse-amber); }
:root[data-theme="dark"] .inverse { border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .inverse { border: 1px solid var(--line); } }
.ph { background: var(--ph); display: flex; align-items: center; justify-content: center; border-radius: 14px; overflow: hidden; color: var(--faint); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.contain img { object-fit: contain; background: #fff; }
.divider { height: 1px; background: var(--line-soft); border: 0; margin: 0; }
.note { font-size: 13px; line-height: 1.6; color: var(--muted); }
.callout { border-radius: 14px; padding: 12px 14px; background: var(--surface-2); font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.callout.blue { background: var(--blue-bg); color: var(--blue); }
.callout.amber { background: var(--amber-bg); color: var(--amber); }
.callout.danger { background: var(--danger-bg); color: var(--danger); }

/* ---------- pills, tags, chips */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; white-space: nowrap; line-height: 1.3; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.buy { background: var(--sage-bg); color: var(--sage-ink); }
.pill.wait { background: var(--amber-bg); color: var(--amber); }
.pill.find { background: var(--slate-bg); color: var(--slate); }
.pill.cart { background: var(--blue-bg); color: var(--blue); }
.pill.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 8px; border-radius: 7px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--sage-bg); color: var(--sage-ink); }
.tag.you { background: var(--blue-bg); color: var(--blue); }
.tag.ai { background: var(--blue-bg); color: var(--blue); font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; padding: 2px 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 7px 13px; min-height: 36px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"], .chip.on, .chip[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- buttons, fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--radius-sm);
  background: var(--ink); color: var(--bg); font-size: 14.5px; font-weight: 500; border: 1px solid var(--ink); text-decoration: none; text-align: center; line-height: 1.25;
  transition: transform .06s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger { background: var(--surface); color: var(--danger); border-color: var(--line-strong); }
.btn.danger.solid { background: var(--danger); color: var(--surface); border-color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }
.link { border: 0; background: none; color: var(--blue); font-size: 13.5px; font-weight: 500; padding: 0; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
.back { align-self: flex-start; font-size: 14px; }
.field {
  height: 48px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center;
  padding: 0 14px; gap: 8px; flex: 1 1 260px; min-width: 0; color: var(--muted);
}
.field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.field input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; height: 100%; font-size: 15px; color: var(--ink); }
.field input::placeholder { color: var(--muted); opacity: 1; }
.field svg { width: 17px; height: 17px; flex: none; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row .btn { flex: 0 0 auto; }
@media (max-width: 480px) { .form-row .btn { flex: 1 1 100%; } }
.select {
  height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 32px 0 12px; font-size: 13.5px;
  appearance: none; -webkit-appearance: none; color: var(--ink);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-size: 5px 5px; background-repeat: no-repeat;
}
.label { font-size: 13px; color: var(--muted); font-weight: 500; }
.text-input { height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 12px; font-size: 15px; width: 100%; color: var(--ink); }
.text-input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.code-input { font-family: var(--mono); font-size: 26px; letter-spacing: .5em; text-align: center; height: 60px; padding-left: .5em; }

/* ---------- list rows */
.rows { padding: 4px 18px; }
.lrow {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 2px; border: 0; border-bottom: 1px solid var(--line-soft);
  background: none; width: 100%; text-align: left; font-size: 14.5px; color: var(--ink); text-decoration: none;
}
.lrow:last-child { border-bottom: 0; }
a.lrow:hover .lrow-label, button.lrow:hover .lrow-label { text-decoration: underline; text-underline-offset: 3px; }
.lrow-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lrow-label { font-weight: 500; }
.chev { color: var(--faint); flex: none; }

/* ---------- summary strip (清单) */
.strip { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; }
.strip .stat { display: flex; flex-direction: column; gap: 2px; }
.strip .stat .k { font-size: 13px; color: var(--inverse-muted); }
.strip .stat .v { font-family: var(--serif); font-size: 21px; }
.strip .stat .v.num { font-family: var(--mono); }
.stack-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--inverse-track); }
.stack-bar span { display: block; min-width: 4px; }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12px; color: var(--inverse-muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.seg-buy { background: var(--bar-buy); } .seg-wait { background: var(--bar-wait); } .seg-find { background: var(--bar-find); } .seg-cart { background: var(--bar-cart); }

/* ---------- product card (清单 / 挑选) */
.pcard { position: relative; display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.pcard:hover { box-shadow: var(--shadow); }
.pcard .media { position: relative; height: 168px; border-radius: 0; }
.pcard.tall .media { height: 220px; }
.pcard .media .pill { position: absolute; left: 10px; top: 10px; max-width: calc(100% - 64px); white-space: normal; border-radius: 12px; }
.pcard .media img { mix-blend-mode: multiply; }
:root[data-theme="dark"] .pcard .media img { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pcard .media img { mix-blend-mode: normal; } }
.pcard .body-c { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .cover { position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.pcard .cover:focus-visible { outline-offset: -3px; }
.pcard .above { position: relative; z-index: 2; }
.pcard .title { font-size: 14px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .ptitle { font-family: var(--serif); font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .price { font-family: var(--mono); font-size: 18px; font-weight: 500; white-space: nowrap; }
/* Price + note on a card: a long note (French, German, …) drops below the price instead of a thin column. */
.pcard .body-c .row-base { flex-wrap: wrap; row-gap: 2px; }
.pcard .body-c .row-base > .src { flex: 1 1 8em; min-width: 0; }
.pcard .media-act { position: absolute; right: 10px; top: 10px; z-index: 2; display: flex; gap: 6px; }
.pcard .media-act .icon-btn { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
@media (max-width: 720px) {
  .pcard .media { height: 138px; }
  .pcard.tall .media { height: 160px; }
  .pcard .body-c { padding: 9px 10px 11px; gap: 5px; }
  .pcard .price { font-size: 16px; }
  .pcard .title { font-size: 13px; }
  .pcard .ptitle { font-size: 13.5px; }
  .pcard .media .pill { left: 8px; top: 8px; font-size: 11px; padding: 3px 8px; max-width: calc(100% - 52px); }
}

/* ---------- rails, gauges, dots */
.rail { position: relative; height: 4px; border-radius: 999px; background: var(--rail); }
.rail .fill { position: absolute; left: 0; top: 0; height: 4px; border-radius: 999px; }
.rail .tmark { position: absolute; top: -4px; width: 2px; height: 12px; background: var(--terra); border-radius: 1px; transform: translateX(-1px); }
.rail .range { position: absolute; top: 0; height: 4px; background: var(--sage-soft); border-radius: 999px; }
.rail.dashed { background: repeating-linear-gradient(90deg, var(--rail) 0 6px, transparent 6px 10px); }
.dot { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid var(--surface); background: var(--faint); }
.dot.best { background: var(--sage); width: 17px; height: 17px; }
.dot.you { background: var(--blue-dot); }
.fill.ok { background: var(--sage); }
.fill.over { background: var(--amber-bar); }

/* ---------- channel dot plot */
.dotplot { position: relative; display: flex; flex-direction: column; }
.dp-row { display: grid; grid-template-columns: minmax(104px, 160px) minmax(0, 1fr) 88px var(--dp-open, 72px); align-items: center; gap: 14px; padding: 8px 0; }
.dp-row + .dp-row { border-top: 1px solid var(--line-soft); }
.dp-store { display: flex; flex-direction: column; min-width: 0; }
.dp-store .name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-store .src { font-size: 11.5px; line-height: 1.35; }
.dp-track { position: relative; height: 30px; }
.dp-track .rail { position: absolute; left: 0; right: 0; top: 13px; }
.dp-track .tline { position: absolute; top: -9px; bottom: -9px; border-left: 1.5px dashed var(--terra); }
.dp-track .dot { top: 15px; }
.dp-price { text-align: right; font-size: 14px; }
.dp-open { display: flex; justify-content: flex-end; }
.dp-open .btn { padding: 0 10px; max-width: 100%; }
.dp-price .size-note { display: block; font-family: var(--sans); font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
.dp-axis { display: grid; grid-template-columns: minmax(104px, 160px) minmax(0, 1fr) 88px var(--dp-open, 72px); gap: 14px; padding-top: 6px; }
.dp-axis .scale { position: relative; height: 18px; font-size: 11.5px; }
.dp-axis .scale span { position: absolute; top: 0; white-space: nowrap; }
.dp-row.here { background: linear-gradient(90deg, var(--blue-bg), transparent 70%); border-radius: 10px; }
.dp-row.out .name { color: var(--muted); }
@media (max-width: 720px) {
  .dp-row { grid-template-columns: minmax(0, 1fr) 88px; grid-template-areas: "store price" "track open"; gap: 4px 12px; padding: 10px 0; }
  .dp-row .dp-store { grid-area: store; }
  .dp-row .dp-track { grid-area: track; height: 26px; }
  .dp-row .dp-price { grid-area: price; }
  .dp-row .dp-open { grid-area: open; }
  .dp-axis { grid-template-columns: minmax(0, 1fr) 88px; gap: 4px 12px; }
  .dp-open { text-align: right; }
  .dp-axis .pad-l, .dp-axis .pad-r2 { display: none; }
}

/* ---------- breakdown bar */
.bd-bar { display: flex; height: 28px; border-radius: 8px; overflow: hidden; font-family: var(--mono); font-size: 12px; }
.bd-pay { background: var(--sage); color: var(--surface); display: flex; align-items: center; padding-left: 10px; white-space: nowrap; overflow: hidden; }
:root[data-theme="dark"] .bd-pay { background: #2f6b4f; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bd-pay { background: #2f6b4f; color: #fff; } }
.bd-save { background: repeating-linear-gradient(135deg, var(--sage-hatch-a) 0 5px, var(--sage-hatch-b) 5px 10px); color: var(--sage-ink); display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; min-width: 44px; }
.bd-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; font-size: 13.5px; margin-top: 12px; }
.bd-list .amt { font-family: var(--mono); text-align: right; }
.bd-list .minus { color: var(--sage); }
.bd-list .total { font-weight: 600; border-top: 1px solid var(--line-soft); padding-top: 8px; }

/* ---------- history chart */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--sans); font-size: 11px; fill: var(--muted); }
.chart .mono { font-family: var(--mono); }
.chart-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.chart-legend .sw { display: inline-block; width: 14px; height: 0; vertical-align: middle; margin-right: 6px; }
.sw.line { border-top: 2px solid var(--chart-ink); }
.sw.target { border-top: 1.5px dashed var(--terra); }
.sw.band { height: 10px; background: var(--band); border: 1px solid var(--line); border-radius: 2px; }
.sw.today { width: 9px; height: 9px; border-radius: 50%; background: var(--sage); }

/* ---------- bars (savings, brief changes) */
.vbars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; align-items: end; }
.vbar { display: flex; flex-direction: column; gap: 6px; justify-content: flex-end; }
.vbar .b { border-radius: 5px; background: var(--sage-soft); min-height: 4px; }
.vbar .b.cur { background: var(--sage); }
.vbar .b.zero { background: var(--rail); }
.changes { display: grid; grid-template-columns: minmax(70px, 150px) minmax(0, 1fr) 64px; gap: 9px 14px; align-items: center; font-size: 13px; color: var(--inverse-muted); max-width: 640px; }
.changes .track { height: 8px; border-radius: 4px; background: var(--inverse-track); }
.changes .bar { height: 8px; border-radius: 4px; }
.changes .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--inverse-text); text-decoration: none; }
.changes a.name:hover { text-decoration: underline; }
.changes .d { text-align: right; }

/* ---------- tabs (挑选) */
.vtabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.vtabs::-webkit-scrollbar { display: none; }
.vtab { border: 0; background: none; padding: 4px 0 10px; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.vtab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.vtab .soon { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 500; }

/* ---------- store cards */
.scard { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.scard .name { font-family: var(--serif); font-size: 17px; font-weight: 600; }

/* ---------- brand toggles */
.btoggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; min-height: 58px; }
.btoggle[aria-pressed="true"] { background: var(--sage-bg); border-color: color-mix(in srgb, var(--sage) 30%, var(--line)); }
.btoggle .name { font-family: var(--serif); font-size: 16px; }
.btoggle .state { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.btoggle[aria-pressed="true"] .state { color: var(--sage-ink); }

/* ---------- radio rows */
.radio-row { display: flex; align-items: center; gap: 14px; padding: 15px 2px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.radio-row:last-child { border-bottom: 0; }
.radio-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-row .mark { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; display: flex; align-items: center; justify-content: center; }
.radio-row input:checked + .mark { border-color: var(--sage); }
.radio-row input:checked + .mark::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--sage); }
.radio-row input:focus-visible + .mark { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- switch */
.switch { position: relative; width: 46px; height: 28px; border-radius: 999px; border: 0; background: var(--line-strong); flex: none; transition: background .15s; padding: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch[aria-checked="true"] { background: var(--sage); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

/* ---------- segmented (theme) */
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 5px 9px; border-radius: 8px; font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 600; }
.seg svg { width: 14px; height: 14px; }

/* ---------- dialog, toast */
.overlay { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 30; animation: fade .15s; }
.modal { background: var(--surface); color: var(--ink); border-radius: 20px; max-width: 460px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); animation: rise .18s; }
.facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 14px; background: var(--bg); border-radius: 12px; padding: 14px; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--sage-ink); color: #fff; border-radius: 999px; padding: 12px 20px; font-size: 14px; z-index: 40; max-width: calc(100vw - 32px); text-align: center; box-shadow: var(--shadow); animation: rise .2s; }
.toast.err { background: var(--danger); }
:root[data-theme="dark"] .toast { background: #245a40; } :root[data-theme="dark"] .toast.err { background: #7a2a1c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #245a40; } :root:not([data-theme="light"]) .toast.err { background: #7a2a1c; } }
@media (max-width: 720px) { .toast { bottom: calc(86px + env(safe-area-inset-bottom)); border-radius: 16px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translate(var(--tx, 0), 8px); } }
.toast { --tx: -50%; }

/* ---------- loading / empty */
.skel { background: linear-gradient(90deg, var(--surface-2), var(--line-soft), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 36px 22px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty .h2 { max-width: 30ch; }
.empty p { max-width: 46ch; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- sign-in / first-run */
.hero { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.hero-l { padding: clamp(28px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; gap: 22px; background: var(--side); border-right: 1px solid var(--line); }
.hero-r { padding: clamp(20px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.hero-title { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); line-height: 1.22; font-weight: 600; max-width: 18em; }
.hero-points { display: flex; flex-direction: column; gap: 14px; max-width: 30em; padding: 0; margin: 0; list-style: none; }
.hero-points li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.hero-points li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; background: var(--c, var(--sage)); }
.signin { max-width: 420px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); } .hero-l { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 16px; } .hero-r { padding: 24px 16px 48px; } }

.first { max-width: 760px; margin: 0 auto; padding: clamp(24px, 6vw, 72px) 16px 64px; display: flex; flex-direction: column; gap: 18px; }
.result { overflow: hidden; }
.result .top { display: flex; }
.result .top .ph { width: 180px; flex: none; height: auto; min-height: 220px; border-radius: 0; }
.result .top .info { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.result .bottom { padding: 14px 18px 18px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 520px) { .result .top .ph { width: 122px; min-height: 170px; } .result .top .info { padding: 12px; } }

/* ---------- misc */
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 18px; font-size: 14px; align-items: baseline; }
.avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; flex: none; }
.bignum { font-family: var(--mono); font-size: 44px; letter-spacing: .14em; font-weight: 500; }
.ext::after { content: '↗'; font-size: .85em; margin-left: 3px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 14px; }
.stat-grid .n { font-family: var(--mono); font-size: 26px; line-height: 1.1; }
.stat-grid .k { font-size: 12.5px; color: var(--inverse-muted); hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 720px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; } .stat-grid .n { font-size: 20px; } .stat-grid .k { font-size: 11px; } }
.group-title { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .03em; margin: 6px 2px 0; }
.alert-row { display: flex; gap: 14px; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.alert-row:last-child { border-bottom: 0; }
.alert-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.alert-row.unread .ttl { font-weight: 600; }
a.alert-row:hover .ttl { text-decoration: underline; text-underline-offset: 3px; }
.mini-thumb { width: 52px; height: 64px; border-radius: 10px; flex: none; }
.err-box { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.dev-badge { font-size: 11px; font-family: var(--mono); color: var(--muted); }
@media (max-width: 720px) {
  .btoggle { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; }
  .btoggle .name { font-size: 15px; }
  .pcard .media-act .icon-btn { width: 30px; height: 30px; }
}
.meta-row { flex-wrap: wrap; row-gap: 2px; }
.meta-row > span { white-space: nowrap; }
.dp-price .src { font-family: var(--sans); letter-spacing: 0; display: block; line-height: 1.35; }
.bd-save { min-width: 72px; padding: 0 6px; }
