:root {
  color-scheme: light;
  --bg: #EAF6FF;
  --surface: #FFFFFF;
  --surface-raised: #E3F2FF;
  --line: #C3DDF1;
  --text: #10243A;
  --muted: #536E86;
  --primary: #1677D2;
  --accent: #087F97;
  --violet: #7555CF;
  --pink: #C94A78;
  --amber: #A96600;
  --danger: #C43F59;
  --success: #137A4D;
  --radius: 14px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --tap: 44px;
  --font: -apple-system, "PingFang SC", "HarmonyOS Sans", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  --maxw: 520px;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 18% -12%, rgba(80, 185, 255, .34), transparent 62%),
    radial-gradient(760px 460px at 104% 2%, rgba(139, 123, 255, .16), transparent 70%),
    radial-gradient(640px 440px at -18% 40%, rgba(47, 207, 196, .18), transparent 72%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(22, 119, 210, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 119, 210, .055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .6), transparent 64%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app-shell {
  width: min(100%, var(--maxw));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 58px;
  padding: 7px var(--space-4);
  border-bottom: 1px solid rgba(173, 205, 231, .75);
  background: rgba(246, 252, 255, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--violet), var(--pink), var(--amber), var(--accent), transparent);
  opacity: .75;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  min-height: var(--tap);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(57, 230, 208, .5);
  background: linear-gradient(145deg, rgba(57, 230, 208, .25), rgba(91, 157, 255, .3) 48%, rgba(167, 139, 250, .3));
  color: #EFFFFC;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.04em;
  box-shadow: 0 0 18px rgba(57, 230, 208, .18);
}
.brand-name { font-weight: 750; letter-spacing: -.01em; }
.sample-badge {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid rgba(255, 92, 122, .42);
  border-radius: 999px;
  color: #FF9BAE;
  background: rgba(255, 92, 122, .08);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
  white-space: nowrap;
}
.topbar-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: var(--tap);
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}
.sample-badge + .topbar-help { margin-left: 0; }

.sample-banner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: var(--space-3) var(--space-4) 0;
  padding: 10px var(--space-3);
  border: 1px solid rgba(255, 92, 122, .30);
  border-left: 3px solid var(--danger);
  border-radius: 10px;
  background: rgba(255, 92, 122, .07);
  font-size: 12px;
  line-height: 1.55;
}
.sample-banner strong { color: #FFB3C1; }
.sample-banner span { color: var(--muted); }

main {
  flex: 1;
  width: 100%;
  padding: var(--space-4) var(--space-4) calc(86px + env(safe-area-inset-bottom));
  outline: none;
}

.boot-placeholder {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--muted);
  font-size: 13px;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--maxw));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px var(--space-4) calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(173, 205, 231, .9);
  background: rgba(247, 252, 255, .94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.bottom-nav a {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--muted);
  font-size: 11px;
  border-radius: 10px;
}
.bottom-nav a:hover { color: var(--text); text-decoration: none; }
.bottom-nav a[aria-current="page"] { color: var(--accent); }
.nav-icon { font-size: 17px; line-height: 1.2; }

.page { animation: enter .18s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 16px; height: 1px; background: var(--accent); opacity: .7; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: var(--space-2); font-size: clamp(26px, 7.6vw, 34px); line-height: 1.22; letter-spacing: -.035em; }
h2 { margin-bottom: var(--space-3); font-size: 20px; line-height: 1.35; letter-spacing: -.02em; }
h3 { margin-bottom: var(--space-2); font-size: 16px; line-height: 1.45; }
.lead { margin-bottom: var(--space-6); color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.danger { color: var(--danger); }
.success { color: var(--success); }
.accent { color: var(--accent); }

.hero { padding: var(--space-3) 0 var(--space-6); }
.hero-badges { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(23, 32, 51, .64);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.pill.accent { color: var(--accent); border-color: rgba(57, 230, 208, .32); background: rgba(57, 230, 208, .07); }
.pill.danger { color: #FF9BAE; border-color: rgba(255, 92, 122, .32); background: rgba(255, 92, 122, .07); }
.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.card {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(23, 32, 51, .72), rgba(17, 24, 38, .94));
}
.card + .card { margin-top: var(--space-3); }
.card-flat { background: var(--surface); }
.card-accent { border-color: rgba(57, 230, 208, .28); box-shadow: 0 0 0 1px rgba(57, 230, 208, .04) inset; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-2); }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.wrap { flex-wrap: wrap; }

.btn {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 650;
  font-size: 14px;
  text-align: center;
  transition: border-color .15s, background .15s, transform .1s;
}
.btn:hover { border-color: #4B6389; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  border-color: rgba(57, 230, 208, .6);
  background: linear-gradient(135deg, #4C8DFF, #3B6EF5 46%, #24C8B5);
  color: #fff;
  box-shadow: 0 8px 26px rgba(57, 230, 208, .16);
}
.btn-primary:hover { border-color: var(--accent); filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-danger { color: #FF9BAE; border-color: rgba(255, 92, 122, .34); background: rgba(255, 92, 122, .06); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 var(--space-3); font-size: 12px; border-radius: 9px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-size: 13px; }

.actions { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.actions > * { flex: 1; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: var(--space-2) 0 var(--space-4);
}
.step {
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.step[data-state="done"] { background: var(--primary); }
.step[data-state="current"] { background: linear-gradient(90deg, var(--primary) 42%, var(--line) 42%); }
.step-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: var(--space-2); }
.step-meta .mono { color: var(--text); }

.question-step { animation: enter .16s ease-out; }
.step-heading { margin-bottom: var(--space-4); }
.step-heading p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.field {
  padding: var(--space-4) 0;
  border-top: 1px solid rgba(36, 49, 70, .65);
}
.field:first-of-type { border-top: 0; padding-top: 0; }
.field-label { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); font-weight: 650; font-size: 14px; }
.required { color: var(--accent); font-family: var(--mono); font-size: 11px; }
.optional { color: var(--muted); font-size: 11px; font-weight: 450; }
.why { margin: 0 0 var(--space-3); color: var(--muted); font-size: 12px; line-height: 1.6; }
.help { margin: var(--space-2) 0 0; color: var(--muted); font-size: 11px; }
.error-text { margin: var(--space-2) 0 0; color: var(--danger); font-size: 12px; }

.input {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(16, 24, 39, .7);
  color: var(--text);
  outline: none;
  font-variant-numeric: tabular-nums;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(57, 230, 208, .09); }
.input::placeholder { color: #66758e; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.number-row { display: flex; align-items: center; gap: var(--space-2); }
.unit { color: var(--muted); font-size: 12px; min-width: 24px; }
.unknown-row { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.checkline { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 12px; cursor: pointer; }
.checkline input { width: 16px; height: 16px; accent-color: var(--accent); }

.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.options.one-col,
.options.has-figures { grid-template-columns: 1fr; }
.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap);
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(16, 24, 39, .46);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  transition: border-color .12s, background .12s;
}
.option:hover { border-color: #3a4c68; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-mark {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 1px solid #485a76;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: transparent;
}
.option[data-multi="true"] .option-mark { border-radius: 5px; }
.option.is-selected {
  border-color: rgba(57, 230, 208, .58);
  background: rgba(57, 230, 208, .085);
  box-shadow: 0 0 0 1px rgba(57, 230, 208, .1) inset;
}
.option.is-selected .option-mark { color: #031018; border-color: var(--accent); background: var(--accent); }
.option-order {
  margin-left: auto;
  min-width: 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
}
.option-hint { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; }
.option-copy { min-width: 0; }
.option.has-image { align-items: flex-start; flex-wrap: wrap; padding: 10px; background: linear-gradient(160deg, rgba(91, 157, 255, .07), rgba(16, 24, 39, .5)); }
.option.has-image.is-selected { background: linear-gradient(160deg, rgba(57, 230, 208, .13), rgba(16, 24, 39, .55)); }
.option-figure { flex: 0 0 100%; width: 100%; height: auto; margin-top: 7px; border: 1px solid #C0DBEE; border-radius: 8px; }

.budget-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-2); }
.budget-sep { color: var(--muted); font-family: var(--mono); }
.quick-budgets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-2); }
.chip {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.chip:hover, .chip.is-active { color: var(--accent); border-color: rgba(57, 230, 208, .45); background: rgba(57, 230, 208, .07); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--tap); }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #94A3B8; transition: transform .15s, background .15s; }
.switch input:checked + .switch-track { background: rgba(57, 230, 208, .35); }
.switch input:checked + .switch-track::after { transform: translateX(20px); background: var(--accent); }

.form-footer {
  position: sticky;
  z-index: 10;
  bottom: calc(62px + env(safe-area-inset-bottom));
  display: flex;
  gap: var(--space-3);
  margin: var(--space-4) calc(var(--space-4) * -1) 0;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid rgba(36, 49, 70, .7);
  background: linear-gradient(to bottom, rgba(16, 24, 39, .82), rgba(16, 24, 39, .98));
  backdrop-filter: blur(12px);
}
.form-footer .btn { flex: 1; }
.form-footer .btn-back { flex: 0 0 86px; }

.result-head { margin-bottom: var(--space-4); }
.result-head .lead { margin-bottom: var(--space-3); }
.profile-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: var(--space-3);
  border-top: 1px dashed var(--line);
}
.profile-strip .pill { padding: 2px 7px; font-size: 10px; }

.relax-note {
  margin: var(--space-3) 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 196, 87, .34);
  border-radius: 10px;
  background: rgba(255, 196, 87, .06);
  color: #FFD58C;
  font-size: 12px;
}

.tier-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-bottom: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.tier-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--tier-color, var(--primary)); }
.tier-card[data-tier="stable"] { --tier-color: var(--success); }
.tier-card[data-tier="value"] { --tier-color: var(--amber); }
.tier-card[data-tier="advanced"] { --tier-color: var(--violet); }
.tier-card-top { padding: var(--space-4); }
.tier-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: var(--space-2);
  color: var(--tier-color, var(--accent));
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.tier-label::before { content: "◆"; font-size: 7px; }
.item-brand { color: var(--muted); font-size: 11px; }
.item-name { margin: 1px 0 var(--space-2); padding-right: 68px; font-size: 20px; font-weight: 750; line-height: 1.3; letter-spacing: -.02em; }
.score-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  text-align: right;
}
.score-badge strong { display: block; color: var(--tier-color, var(--accent)); font-family: var(--mono); font-size: 23px; line-height: 1; font-variant-numeric: tabular-nums; }
.score-badge span { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.reasons { margin: var(--space-3) 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.reasons li { position: relative; padding-left: 16px; color: #C9D5E6; font-size: 12px; line-height: 1.55; }
.reasons li::before { content: "›"; position: absolute; left: 2px; top: -1px; color: var(--tier-color, var(--accent)); font-weight: 800; }
.price-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: var(--space-3) 0; }
.price-main { font-family: var(--mono); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-main small { font-size: 11px; font-weight: 450; color: var(--muted); }
.price-used { color: var(--muted); font-size: 11px; }
.fit-line { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--space-2); margin: var(--space-3) 0; padding: 8px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); font-size: 11px; }
.fit-line dt { color: var(--muted); }
.fit-line dd { margin: 0; color: var(--text); }
.tradeoff { padding: 8px 10px; border-radius: 8px; background: rgba(255, 92, 122, .055); color: #D6B3BB; font-size: 11px; }
.tradeoff strong { color: #FF9BAE; }
.tier-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-top: var(--space-3); }
.tier-actions .btn { min-height: 40px; font-size: 12px; }

.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
.compare-wrap table { table-layout: fixed; }
.compare-wrap th, .compare-wrap td { padding: 8px 5px; font-size: 10px; white-space: normal; }
.compare-wrap th:first-child { width: 56px; }
th, td { padding: 9px 10px; border-bottom: 1px solid rgba(36, 49, 70, .65); text-align: left; vertical-align: top; white-space: nowrap; }
th { position: sticky; left: 0; background: var(--surface); color: var(--muted); font-weight: 500; }
thead th { color: var(--text); font-weight: 650; }
tr:last-child > * { border-bottom: 0; }

.fallback-list { margin: 0; padding: 0; list-style: none; }
.fallback-list li { display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid rgba(36, 49, 70, .55); font-size: 12px; }
.fallback-list li:last-child { border-bottom: 0; }
.fallback-list .reason { color: var(--muted); font-size: 11px; line-height: 1.55; }
.empty { padding: var(--space-6) var(--space-3); text-align: center; color: var(--muted); font-size: 13px; }

.breadcrumb { display: flex; align-items: center; gap: 6px; margin-bottom: var(--space-3); color: var(--muted); font-size: 11px; }
.breadcrumb a { color: var(--muted); }
.detail-head { margin-bottom: var(--space-4); }
.detail-head h1 { font-size: 28px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: var(--space-2); }
.section { margin-top: var(--space-6); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.section-title h2 { margin-bottom: 0; font-size: 17px; }
.section-title span { color: var(--muted); font-family: var(--mono); font-size: 10px; }

.spec-group { margin-bottom: var(--space-3); }
.spec-group h3 { margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 550; letter-spacing: .06em; }
.spec-grid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.spec-cell { padding: 8px 10px; background: var(--surface); }
.spec-cell dt { color: var(--muted); font-size: 10px; }
.spec-cell dd { margin: 1px 0 0; font-size: 12px; word-break: break-word; }
.source-note { margin-top: var(--space-2); color: var(--muted); font-size: 10px; }

.issue {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.issue + .issue { margin-top: var(--space-2); }
.issue blockquote { margin: var(--space-2) 0; padding-left: 10px; border-left: 2px solid var(--danger); color: #D8BFc5; font-size: 12px; }
.issue-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; color: var(--muted); font-size: 10px; }
.confidence-low { color: #FFC46B; }

.article { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.article h1 { font-size: 26px; }
.article h2 { margin-top: var(--space-6); font-size: 16px; color: var(--accent); }
.article p { color: #C7D2E2; font-size: 13px; line-height: 1.85; }
.article ul { padding-left: 18px; color: #C7D2E2; font-size: 13px; line-height: 1.8; }
.article li + li { margin-top: 4px; }
.measure-figure { margin: var(--space-4) 0; padding: var(--space-3); border: 1px solid var(--line); border-radius: 10px; background: rgba(16, 24, 39, .55); }
.measure-figure figcaption { margin-top: var(--space-2); color: var(--muted); font-size: 10px; text-align: center; }
.callout { margin: var(--space-4) 0; padding: 10px 12px; border: 1px solid rgba(57, 230, 208, .24); border-radius: 10px; background: rgba(57, 230, 208, .05); color: #BDEAF1; font-size: 12px; }

.note { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(16, 24, 39, .48); color: var(--muted); font-size: 11px; }
.load-error { margin-top: var(--space-6); padding: var(--space-4); border: 1px solid rgba(255, 92, 122, .34); border-radius: var(--radius); background: rgba(255, 92, 122, .06); }
.load-error pre { white-space: pre-wrap; word-break: break-word; font-size: 11px; color: #FFB3C1; }

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(360px, calc(100vw - 32px));
  padding: 9px 14px;
  border: 1px solid rgba(57, 230, 208, .3);
  border-radius: 10px;
  background: #172033;
  color: var(--text);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .45);
  font-size: 12px;
  text-align: center;
}
.noscript { margin: 24px; color: var(--danger); text-align: center; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 421px) {
  main { padding-left: var(--space-6); padding-right: var(--space-6); }
  .topbar { padding-left: var(--space-6); padding-right: var(--space-6); }
  .sample-banner { margin-left: var(--space-6); margin-right: var(--space-6); }
  .form-footer { margin-left: calc(var(--space-6) * -1); margin-right: calc(var(--space-6) * -1); padding-left: var(--space-6); padding-right: var(--space-6); }
}

/* ---- 淡蓝主题收口：覆盖旧深色层 ---- */
body {
  background:
    radial-gradient(760px 420px at 10% -8%, rgba(66, 183, 255, .28), transparent 64%),
    radial-gradient(620px 420px at 105% 8%, rgba(148, 132, 255, .14), transparent 72%),
    radial-gradient(520px 380px at -12% 45%, rgba(48, 207, 196, .13), transparent 76%),
    var(--bg);
}
body::before { opacity: .55; }
.topbar { box-shadow: 0 6px 24px rgba(51, 112, 163, .06); }
.brand-mark {
  border-color: rgba(12, 126, 172, .22);
  background: linear-gradient(145deg, #BEEBFF, #DCE9FF 46%, #EDE5FF);
  color: #0B5C82;
}
.bottom-nav { box-shadow: 0 -8px 30px rgba(42, 94, 140, .08); }
.bottom-nav a[aria-current="page"] { color: #087F97; }
.pill { background: rgba(255, 255, 255, .72); }
.pill.accent { color: #076F83; border-color: rgba(8, 127, 151, .22); background: rgba(14, 165, 183, .09); }
.pill.danger { color: #A92F49; border-color: rgba(196, 63, 89, .22); background: rgba(196, 63, 89, .07); }
.card {
  background: linear-gradient(165deg, rgba(255, 255, 255, .96), rgba(245, 251, 255, .9));
  box-shadow: 0 8px 28px rgba(46, 101, 148, .06);
}
.card-flat { background: var(--surface); }
.btn { background: #F7FCFF; border-color: #B7D6EC; }
.btn:hover { border-color: #6EA9D2; }
.btn-primary {
  border-color: #0B7FCE;
  background: linear-gradient(135deg, #1689E8, #0D74C8 48%, #0A9FAD);
  color: #fff;
  box-shadow: 0 8px 22px rgba(15, 116, 190, .22);
}
.btn-danger { color: #A92F49; border-color: rgba(196, 63, 89, .25); background: rgba(196, 63, 89, .06); }
.input { background: rgba(255, 255, 255, .9); border-color: #BED9EC; }
.input:focus { border-color: #1689E8; box-shadow: 0 0 0 3px rgba(22, 137, 232, .1); }
.input::placeholder { color: #7C93A8; }
.field { border-top-color: rgba(170, 204, 230, .58); }
.option { background: rgba(255, 255, 255, .68); border-color: #C5DDEF; }
.option:hover { border-color: #75AFD7; }
.option-mark { border-color: #8FB4CE; }
.option.is-selected { border-color: rgba(8, 127, 151, .55); background: rgba(34, 196, 205, .1); box-shadow: 0 0 0 1px rgba(8, 127, 151, .08) inset; }
.option.is-selected .option-mark { color: #fff; border-color: #087F97; background: #087F97; }
.option.has-image { background: linear-gradient(160deg, rgba(231, 246, 255, .9), rgba(255, 255, 255, .94)); }
.option.has-image.is-selected { background: linear-gradient(160deg, rgba(219, 248, 250, .94), rgba(255, 255, 255, .96)); }
.option-figure { border-color: #C0DBEE; }
.form-footer {
  border-top-color: rgba(170, 204, 230, .6);
  background: linear-gradient(to bottom, rgba(240, 249, 255, .82), rgba(246, 252, 255, .98));
}
.chip:hover, .chip.is-active { color: #076F83; border-color: rgba(8, 127, 151, .32); background: rgba(14, 165, 183, .08); }
.switch-track { background: #C3D9E8; }
.switch-track::after { background: #fff; box-shadow: 0 1px 4px rgba(29, 75, 110, .22); }
.switch input:checked + .switch-track { background: rgba(8, 127, 151, .35); }
.switch input:checked + .switch-track::after { background: #087F97; }
.tier-card { background: #fff; box-shadow: 0 8px 28px rgba(46, 101, 148, .07); }
.tier-card[data-tier="stable"] { --tier-color: #137A4D; }
.tier-card[data-tier="value"] { --tier-color: #A96600; }
.tier-card[data-tier="advanced"] { --tier-color: #7555CF; }
.reasons li { color: #334E66; }
.tradeoff { background: rgba(196, 63, 89, .055); color: #7C4552; }
.tradeoff strong { color: #A92F49; }
.relax-note { border-color: rgba(169, 102, 0, .25); background: rgba(255, 196, 87, .13); color: #7A4B00; }
.article { background: rgba(255, 255, 255, .88); box-shadow: 0 8px 28px rgba(46, 101, 148, .06); }
.article p, .article ul { color: #334E66; }
.article p,
.article li { overflow-wrap: anywhere; }
.article a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.article .btn { color: var(--text); text-decoration: none; }
.article .btn-primary { color: #fff; }
.article h2 { color: #076F83; }
.measure-figure { background: rgba(239, 249, 255, .85); }
.callout { border-color: rgba(8, 127, 151, .2); background: rgba(14, 165, 183, .07); color: #17576A; }
.sample-badge { color: #A92F49; background: #FFF0F4; border-color: rgba(196, 63, 89, .24); }
.note { background: rgba(245, 251, 255, .92); }
.sample-banner { background: #FFF3F6; border-color: rgba(196, 63, 89, .22); border-left-color: #C43F59; }
.sample-banner strong { color: #A92F49; }
.brand-mark { box-shadow: 0 3px 10px rgba(12, 126, 172, .1); }

.issue blockquote { color: #67434B; }
.load-error pre { color: #9B2F47; }
.toast { background: #FFFFFF; box-shadow: 0 12px 36px rgba(45, 92, 130, .2); }
th { background: #F4FAFF; }
th, td { border-bottom-color: rgba(170, 204, 230, .6); }
.fallback-list li { border-bottom-color: rgba(170, 204, 230, .55); }
.confidence-low { color: #9A5A00; }
.article-sources li, .source-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 7px 0; border-bottom: 1px dashed rgba(170, 204, 230, .65); font-size: 12px; }
.article-sources li span, .source-list li span { color: var(--muted); font-size: 10px; }
.article-sources ol, .source-list { margin: 0; padding-left: 18px; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: var(--space-3); }

/* 首页 */
.home { padding-top: 4px; }
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 20px 18px;
  border: 1px solid rgba(174, 211, 238, .9);
  border-radius: 22px;
  background:
    radial-gradient(280px 210px at 92% 4%, rgba(34, 181, 255, .22), transparent 70%),
    radial-gradient(240px 190px at 6% 104%, rgba(115, 219, 208, .2), transparent 72%),
    linear-gradient(160deg, rgba(255, 255, 255, .96), rgba(237, 249, 255, .92));
  box-shadow: 0 18px 44px rgba(38, 104, 155, .1);
}
.home-kicker { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; color: #0A6C87; font-size: 11px; font-weight: 650; letter-spacing: .04em; }
.home-kicker .dot { width: 6px; height: 6px; background: #0A9FAD; box-shadow: 0 0 0 4px rgba(10, 159, 173, .12); }
.home-hero h1 { margin: 0 0 12px; font-size: clamp(42px, 12vw, 54px); line-height: 1.02; letter-spacing: -.06em; }
.home-hero h1 span { background: linear-gradient(100deg, #0C72C9 8%, #0A9FAD 58%, #4A7CDB 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-lead { max-width: 300px; margin-bottom: 18px; color: #3E5C75; font-size: 13px; line-height: 1.75; }
.home-cta { width: 100%; min-height: 50px; font-size: 15px; border-radius: 13px; }
.home-facts { display: flex; gap: 16px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.home-facts b { color: #0B5C82; font-family: var(--mono); font-size: 12px; }
.home-install { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 12px; padding: 0 13px; border: 1px solid #A9CFE8; border-radius: 999px; background: rgba(255, 255, 255, .78); color: #0A6C87; font-size: 12px; font-weight: 700; text-decoration: none; }
.home-install:hover { border-color: #6EA9D2; background: #fff; text-decoration: none; }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.home-card { position: relative; display: flex; flex-direction: column; min-height: 132px; padding: 14px; border: 1px solid rgba(173, 210, 237, .92); border-radius: 16px; color: var(--text); overflow: hidden; }
.home-card:hover { text-decoration: none; transform: translateY(-1px); }
.home-card strong { margin-top: 8px; font-size: 16px; letter-spacing: -.02em; }
.home-card small { margin-top: 3px; color: #4E6A82; font-size: 10px; line-height: 1.55; }
.home-card-index { color: rgba(16, 75, 112, .5); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.home-card-arrow { position: absolute; right: 13px; bottom: 11px; color: #0C6F92; font-size: 16px; }
.home-card-blue { background: linear-gradient(150deg, #E1F2FF, #F7FCFF); }
.home-card-cyan { background: linear-gradient(150deg, #DDF8F6, #F8FFFF); }
.home-card-violet { background: linear-gradient(150deg, #EEE9FF, #FBF9FF); }
.home-card-amber { background: linear-gradient(150deg, #FFF3D8, #FFFDF7); }
.home-section { margin-top: var(--space-6); }
.grip-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grip-tile { margin: 0; overflow: hidden; border: 1px solid #C4DEF1; border-radius: 13px; background: #fff; }
.grip-tile img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1.06; object-fit: cover; }
.grip-tile figcaption { display: flex; flex-direction: column; padding: 7px 8px 9px; }
.grip-tile strong { font-size: 12px; }
.grip-tile span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.home-note { margin: 10px 0 0; color: var(--muted); font-size: 10px; }
.home-manifesto { padding: 18px; border: 1px solid #C4DEF1; border-radius: 18px; background: rgba(255, 255, 255, .65); }
.manifesto-grid { display: grid; gap: 10px; }
.manifesto-grid div { padding: 10px 12px; border-radius: 10px; background: rgba(231, 246, 255, .75); }
.manifesto-grid b { display: block; font-size: 12px; }
.manifesto-grid span { display: block; margin-top: 2px; color: #4E6A82; font-size: 10px; line-height: 1.55; }

/* 知识库 */
.hub-head { padding: 8px 0 16px; }
.hub-head .lead { margin-bottom: 0; }
.knowledge-group { margin-bottom: var(--space-6); }
.knowledge-group-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.knowledge-group-head > span { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; background: #DDF6F6; color: #076F83; font-family: var(--mono); font-size: 10px; }
.knowledge-group-head h2 { margin: 0; font-size: 17px; }
.knowledge-group-head p { margin: 1px 0 0; color: var(--muted); font-size: 10px; }
.knowledge-group-head b { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 450; white-space: nowrap; }
.knowledge-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid #C4DEF1; border-radius: 13px; background: rgba(255, 255, 255, .82); color: var(--text); }
.knowledge-card:hover { text-decoration: none; border-color: #71ACD4; }
.knowledge-card strong { font-size: 13px; }
.knowledge-card p { margin: 2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.knowledge-meta { flex: 0 0 auto; color: #0A6C87; font-family: var(--mono); font-size: 9px; }
.article h2 { margin-top: var(--space-6); }
.article-sources, .related { margin-top: var(--space-6); }

/* 品牌 */
.brand-list { display: flex; flex-direction: column; gap: 9px; }
.brand-card { display: grid; grid-template-columns: 28px 1fr 16px; align-items: center; gap: 9px; padding: 14px; border: 1px solid #C4DEF1; border-radius: 14px; background: rgba(255, 255, 255, .84); color: var(--text); }
.brand-card:hover { text-decoration: none; border-color: #71ACD4; }
.brand-rank { color: #6B93AF; font-family: var(--mono); font-size: 10px; }
.brand-card strong { font-size: 15px; }
.brand-card p { margin: 2px 0 7px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.pill-row { display: flex; flex-wrap: wrap; gap: 5px; }
.brand-detail .section p, .brand-detail .lead { color: #3D5A72; font-size: 13px; line-height: 1.8; }

/* 反馈 */
.feedback-form { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid #C4DEF1; border-radius: 16px; background: rgba(255, 255, 255, .84); }
.feedback-form .field-label { margin-top: 8px; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.65; }
.feedback-consent { align-items: flex-start; margin-top: 10px; line-height: 1.55; }
.feedback-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.feedback-form .btn { margin-top: 10px; }

@media (max-width: 350px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-card { min-height: 104px; }
}

/* ---- catalog, search, desktop ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.topbar-nav { display: none; min-height: 40px; padding: 0 9px; align-items: center; color: var(--muted); font-size: 12px; border-radius: 10px; }
.topbar-nav:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.topbar-help { margin-left: 0; font-size: 12px; }
.topbar-icon, .topbar-install { min-height: 40px; padding: 0 9px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; }
.topbar-icon:hover, .topbar-install:hover { border-color: var(--line); background: var(--surface); color: var(--text); }
.topbar-install { border-color: #A9D5F2; color: var(--primary); font-weight: 650; }
.topbar-search { position: absolute; top: 100%; left: 0; right: 0; z-index: 19; display: flex; gap: 8px; padding: 10px var(--space-4) 12px; background: rgba(246, 252, 255, .98); border-bottom: 1px solid var(--line); box-shadow: 0 14px 20px rgba(38, 91, 135, .08); }
.topbar-search input { flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.topbar-search button { min-height: 42px; padding: 0 14px; border: 0; border-radius: 11px; background: var(--primary); color: #fff; font-weight: 650; }
.bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bottom-nav a { font-size: 10px; }
.home-note-grip { margin: 14px 2px 0; font-size: 12px; color: var(--muted); }
.home-note-grip a { white-space: nowrap; }
.home-install { display: none; }

.catalog-page .hub-head { padding-bottom: 10px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.catalog-start { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 650; }
.catalog-start:hover { text-decoration: none; background: #0F67BC; }
.filter-panel { margin-bottom: var(--space-4); border: 1px solid #C4DEF1; border-radius: 14px; background: rgba(255, 255, 255, .75); }
.filter-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 14px; cursor: pointer; font-weight: 650; font-size: 13px; }
.filter-panel summary span { color: var(--muted); font-size: 11px; font-weight: 400; }
.filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0 12px 10px; }
.filter-field { display: flex; flex-direction: column; gap: 3px; }
.filter-field > span { color: var(--muted); font-size: 10px; }
.filter-field select { min-height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12px; }
.filter-check { display: flex; align-items: center; gap: 7px; min-height: 40px; font-size: 12px; }
.filter-check input { width: 17px; height: 17px; }
.filter-panel .back-link { margin: 0 12px 12px; }
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mouse-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid #C4DEF1; border-radius: 14px; background: rgba(255, 255, 255, .9); color: var(--text); min-width: 0; }
.mouse-card:hover { text-decoration: none; border-color: #71ACD4; transform: translateY(-1px); }
.mouse-media { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 8px; background: linear-gradient(150deg, #F4FBFF, #E5F4FF); overflow: hidden; }
.mouse-media img { width: 100%; height: 100%; object-fit: contain; }
.mouse-media.placeholder, .mouse-media.broken { background: linear-gradient(145deg, #E4F4FF, #D6F3F0); }
.mouse-media.placeholder span { color: #477792; font-family: var(--mono); font-size: 10px; font-weight: 600; }
.mouse-media.broken::after { content: "暂无图"; color: #6F9EBC; font-size: 10px; }
.mouse-card-body { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px 11px; min-width: 0; }
.mouse-brand { color: var(--accent); font-size: 10px; font-weight: 650; }
.mouse-card strong { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.mouse-sub { color: var(--muted); font-size: 9px; line-height: 1.3; overflow-wrap: anywhere; }
.mouse-meta { display: flex; flex-wrap: wrap; gap: 4px 7px; margin: 4px 0 3px; color: #37566F; font-family: var(--mono); font-size: 9px; }
.mouse-card .pill { min-height: 20px; padding: 1px 6px; font-size: 9px; }
.brand-en { display: block; margin: -4px 0 8px; color: var(--muted); font-size: 12px; font-family: var(--mono); }
.detail-hero { display: grid; grid-template-columns: 1fr; gap: 10px; }
.detail-hero .mouse-media { border: 1px solid #C4DEF1; border-radius: 16px; aspect-ratio: 16 / 9; }
.detail-desc { margin: 10px 0 14px; color: #3D5A72; font-size: 13px; }
.detail-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 12px; }
.spec-fold { border: 1px solid #C4DEF1; border-radius: 14px; padding: 0 12px 12px; background: rgba(255, 255, 255, .7); }
.spec-fold > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; font-weight: 700; font-size: 17px; }
.spec-fold > summary span:last-child { color: var(--muted); font-size: 10px; font-weight: 400; }
.search-page-form { display: flex; gap: 8px; margin: 12px 0 18px; }
.search-page-form input { flex: 1; min-width: 0; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.search-page-form .btn { width: auto; min-width: 82px; }

@media (min-width: 900px) {
  :root { --maxw: 1180px; }
  .app-shell { padding: 0 28px; }
  .topbar { padding-left: 0; padding-right: 0; }
  .page { max-width: 760px; margin: 0 auto; padding-bottom: 90px; }
  .page.catalog-page, .page.brands-page, .page.brand-detail, .page.search-page { max-width: 1080px; }
  .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-hero h1 { font-size: 54px; }
  .topbar-nav { display: inline-flex; }
  .bottom-nav { display: none; }
  .page { padding-bottom: 24px; }
  .detail-hero { grid-template-columns: 1fr 360px; align-items: center; }
  .detail-hero .mouse-media { aspect-ratio: 4 / 3; }
  .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.load-more { margin-top: 16px; width: 100%; }
