:root {
  --bg: #f5f8f3;
  --bg-grad-a: #fbfdfa;
  --bg-grad-b: #f1f6ef;
  --panel: #ffffff;
  --panel-2: #f8fbf7;
  --panel-3: #edf3ea;
  --line: #dbe6d7;
  --line-soft: #e9f0e6;
  --text: #203024;
  --muted: #5e7361;
  --muted-2: #627661;
  --green: #2f8f4e;
  --green-2: #267c42;
  --green-dim: rgba(47, 143, 78, 0.10);
  --amber: #a96814;
  --red: #cc4a3f;
  --radius: 14px;
  --shadow: 0 8px 26px rgba(38, 74, 44, 0.07);
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background:
    radial-gradient(1100px 560px at 12% -8%, rgba(96, 176, 112, 0.10), transparent 62%),
    radial-gradient(880px 480px at 92% -2%, rgba(126, 190, 158, 0.09), transparent 58%),
    linear-gradient(180deg, var(--bg-grad-a), var(--bg-grad-b) 45%, var(--bg));
  background-color: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 26px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }

.logo {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #45a363, #25743e);
  color: #ffffff;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 14px rgba(47, 143, 78, 0.22);
}

.brand h1 { font-size: 15px; font-weight: 700; letter-spacing: 0.2px; }
.brand p { font-size: 11px; color: var(--muted-2); line-height: 1.2; }

.tabs { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; }
.tabs::-webkit-scrollbar { display: none; }

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 8px 15px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.tab:hover { color: var(--text); background: rgba(47, 143, 78, 0.07); }
.tab.active { color: #ffffff; background: var(--green); font-weight: 600; }

.lang-switch {
  display: inline-flex; gap: 2px; padding: 2px; flex-shrink: 0;
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px;
}
.lang-switch button {
  appearance: none; border: 0; background: none; color: var(--muted);
  font: inherit; font-size: 11.5px; padding: 5px 9px; border-radius: 6px;
  cursor: pointer; white-space: nowrap; transition: color 0.14s, background 0.14s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.on { background: var(--green); color: #ffffff; font-weight: 700; }

/* ---------- 中英对照 ---------- */
body[data-lang="cn"] .l-en,
body[data-lang="en"] .l-zh { display: none !important; }

body[data-lang="both"] .l-en {
  font-size: 0.84em;
  font-weight: 400;
  color: var(--muted-2);
  margin-left: 0.16em;
  letter-spacing: 0;
}
/* 控件里的英文换行显示，避免撑宽 */
body[data-lang="both"] .tab .l-en { display: block; font-size: 9.5px; margin: 1px 0 0; line-height: 1.2; }
body[data-lang="both"] .seg button .l-en,
body[data-lang="both"] .btn .l-en { display: block; font-size: 9.5px; margin: 1px 0 0; line-height: 1.25; }
body[data-lang="both"] .stat .k .l-en,
body[data-lang="both"] .mini-stats span .l-en,
body[data-lang="both"] .metric .k .l-en { display: block; font-size: 9.5px; margin: 0; line-height: 1.3; }
body[data-lang="both"] .panel-head h2 .l-en { display: block; font-size: 10.5px; margin: 0; line-height: 1.3; }
body[data-lang="both"] .hint .l-en { display: block; font-size: 10px; margin: 0; line-height: 1.35; }

/* ---------- 布局 ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 26px 26px 70px; }
.view { display: none; }
.view.active { display: block; animation: fade 0.22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }

.panel {
  background: linear-gradient(180deg, #ffffff, #fafcfa);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel + .panel { margin-top: 16px; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.panel-head h2 { font-size: 13px; font-weight: 600; letter-spacing: 0.4px; color: var(--text); }
.panel-head .hint { font-size: 11.5px; color: var(--muted-2); }

.sticky { position: sticky; top: 86px; }
@media (max-width: 1000px) { .sticky { position: static; } }

/* ---------- 品种选择 ---------- */
.weed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }

.weed {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.weed:hover { border-color: #a9cda2; transform: translateY(-1px); }
.weed.active { border-color: var(--green-2); background: var(--green-dim); }
.weed .n { font-size: 13px; font-weight: 600; line-height: 1.25; }
.weed .n .l-en { display: block; font-size: 10.5px; font-weight: 400; color: var(--muted-2); font-family: var(--mono); margin: 0; }
body[data-lang="en"] .weed .n .l-en { display: inline; font-size: 13px; font-weight: 600; color: var(--text); font-family: inherit; }
.weed .m { font-size: 11px; color: var(--muted-2); font-family: var(--mono); }
.weed.active .n { color: var(--green); }
.weed.active .n .l-en { color: var(--green); opacity: 0.7; }

/* ---------- 物质选择 ---------- */
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 7px; }

.sub-chip {
  display: flex; flex-direction: column; gap: 1px;
  border: 1px solid var(--line-soft);
  background: var(--panel-2);
  border-radius: 9px;
  padding: 7px 9px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: left;
  transition: border-color 0.14s, background 0.14s, transform 0.1s;
}
.sub-chip:hover { border-color: #a9cda2; background: var(--panel-3); transform: translateY(-1px); }
.sub-chip:active { transform: scale(0.98); }
.sub-chip .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; width: 100%; }
.sub-chip .nm { display: flex; flex-direction: column; min-width: 0; }
.sub-chip .nm .l-zh { font-size: 12.5px; font-weight: 600; line-height: 1.3; word-break: break-word; }
.sub-chip .nm .l-en {
  font-size: 10px; color: var(--muted-2); font-weight: 400; margin: 0; line-height: 1.3;
  white-space: normal; overflow: visible; text-overflow: clip; word-break: break-word;
}
body[data-lang="en"] .sub-chip .nm .l-en { font-size: 12.5px; font-weight: 600; color: var(--text); }
.sub-chip .p { font-size: 10px; font-family: var(--mono); color: var(--muted-2); flex-shrink: 0; }

/* ---------- 配方构建区 ---------- */
.mixbar { display: flex; flex-direction: column; gap: 9px; min-height: 72px; }

.round {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.72);
}
.round-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.round-head span { font-size: 11px; color: var(--muted-2); letter-spacing: 0.5px; }
.round-head button {
  border: 0; background: none; color: var(--muted-2); cursor: pointer; font-size: 11px; font-family: inherit;
}
.round-head button:hover { color: var(--red); }

.ing-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.ing {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel-3);
  border: 1px solid #cfe0c7;
  border-radius: 999px;
  padding: 4px 8px 4px 11px;
  font-size: 12px;
}
.ing b { font-weight: 600; }
.ing .idx { color: var(--muted-2); font-family: var(--mono); font-size: 10px; }
.ing button {
  border: 0; background: rgba(47, 143, 78, 0.09); color: var(--muted);
  width: 16px; height: 16px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1;
  display: grid; place-items: center;
}
.ing button:hover { background: var(--red); color: #fff; }

.empty-hint { color: var(--muted-2); font-size: 12px; padding: 6px 2px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.btn {
  appearance: none; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text);
  font: inherit; font-size: 12.5px;
  padding: 8px 14px; border-radius: 9px; cursor: pointer;
  transition: all 0.15s;
}
.btn:hover { border-color: var(--green-2); color: var(--green); }
.btn-primary {
  background: linear-gradient(180deg, var(--green), var(--green-2));
  color: #ffffff; border-color: transparent; font-weight: 700;
}
.btn-primary:hover { color: #ffffff; filter: brightness(1.05); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- 结果 ---------- */
.result-effects { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }

.eff {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 7px; padding: 3px 9px;
  font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent;
  cursor: default;
  white-space: nowrap;
}
.eff .l-en { font-size: 9.5px; opacity: 0.88; font-weight: 400; margin-left: 5px; letter-spacing: 0; }
td .eff { flex-wrap: wrap; white-space: normal; max-width: 100%; padding: 3px 8px; }
.eff.sel { outline: 2px solid var(--green); outline-offset: 1px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 16px; }
.stat {
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 10px 12px;
}
.stat .k { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.4px; }
.stat .v { font-size: 19px; font-weight: 700; font-family: var(--mono); letter-spacing: -0.5px; }
.stat .v.green { color: var(--green); }
.stat .v.amber { color: var(--amber); }

.meter { margin-top: 14px; }
.meter-bar { height: 5px; background: var(--panel-3); border-radius: 99px; overflow: hidden; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--green-2), var(--green)); border-radius: 99px; transition: width 0.35s; }
.meter-label { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted-2); margin-top: 5px; }

/* ---------- 步骤日志 ---------- */
.log { margin-top: 4px; display: flex; flex-direction: column; gap: 1px; }
.log-item {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12px;
}
.log-item:last-child { border-bottom: 0; }
.log-item .n { font-family: var(--mono); color: var(--muted-2); font-size: 10px; width: 16px; flex-shrink: 0; }
.log-item .who { font-weight: 600; flex-shrink: 0; }
.log-item .flow { color: var(--muted); font-size: 11.5px; }
.log-item .flow em { font-style: normal; }
.log-item.wasted .who { color: var(--red); text-decoration: line-through; }
.log-item .tag {
  font-size: 9.5px; padding: 1px 5px; border-radius: 4px;
  background: rgba(204, 74, 63, 0.10); color: var(--red); margin-left: auto;
}

/* ---------- 反向查询 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.3px; }

.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.seg button {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px;
  padding: 5px 12px; border-radius: 7px; cursor: pointer;
}
.seg button.on { background: var(--green-dim); color: var(--green); font-weight: 600; }

.target-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.target-grid::-webkit-scrollbar { width: 6px; }
.target-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.sol {
  border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; margin-bottom: 9px;
  background: var(--panel-2); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.sol:hover { border-color: var(--green-2); background: var(--panel-3); }
.sol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 7px; }
.sol-path { font-size: 12.5px; font-weight: 600; min-width: 0; }
.sol-path .arrow { color: var(--muted-2); margin: 0 5px; font-weight: 400; }
.sol-money { font-family: var(--mono); font-size: 12.5px; color: var(--green); flex-shrink: 0; }
.sol .result-effects .eff { font-size: 11px; padding: 2px 7px; }

/* ---------- 图鉴 ---------- */
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 9px; }

.card {
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: var(--panel-2);
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.card-top .name { font-size: 13px; font-weight: 700; }
.card-top .price { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.card .sub { font-size: 10.5px; color: var(--muted-2); font-family: var(--mono); margin-bottom: 7px; }
.card .rules { font-size: 11px; color: var(--muted); line-height: 1.75; }
.card .rules div { padding-left: 10px; position: relative; }
.card .rules div::before { content: "▸"; position: absolute; left: 0; color: var(--green-2); opacity: 0.6; }
.card .rules .dim { color: var(--muted-2); }

table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 640px; }
th { text-align: left; font-weight: 500; color: var(--muted-2); font-size: 11px; padding: 6px 8px; border-bottom: 1px solid var(--line); letter-spacing: 0.3px; }
td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); }
tr:last-child td { border-bottom: 0; }
td.mono, th.mono { font-family: var(--mono); font-size: 11px; }

/* ---------- 说明 ---------- */
.prose { max-width: 780px; font-size: 13.5px; line-height: 1.9; color: #425744; }
.prose h3 { font-size: 14px; margin: 22px 0 8px; color: var(--green); font-weight: 600; }
.prose h3:first-child { margin-top: 0; }
.prose p { margin-bottom: 10px; }
.prose ul { margin: 0 0 12px 20px; }
.prose li { margin-bottom: 5px; }
.prose code { font-family: var(--mono); font-size: 12px; background: var(--panel-3); padding: 1px 5px; border-radius: 4px; color: var(--green); }
.prose .warn {
  border-left: 3px solid var(--amber); background: rgba(169, 104, 20, 0.07);
  padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 12.5px; color: #7d5a24; margin: 14px 0;
}

/* 说明页：中英逐段对照 */
body[data-lang="both"] .prose p .l-en,
body[data-lang="both"] .prose h3 .l-en,
body[data-lang="both"] .prose li .l-en,
body[data-lang="both"] .prose .warn .l-en {
  display: block; margin: 5px 0 0; color: var(--muted-2); font-size: 12px; line-height: 1.75;
}
body[data-lang="both"] .prose h3 .l-en { font-size: 12.5px; letter-spacing: 0; font-weight: 500; }
body[data-lang="both"] .prose li .l-en { margin: 2px 0 7px; }
body[data-lang="both"] .prose p .l-en { margin: 4px 0 0; }
body[data-lang="en"] .prose .l-en { font-size: inherit; color: #425744; margin: 0; }
body[data-lang="en"] .prose .warn .l-en { color: #7d5a24; }

/* ---------- 杂项 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 14px);
  background: var(--panel-3); border: 1px solid var(--green-2); color: var(--text);
  padding: 9px 18px; border-radius: 10px; font-size: 12.5px;
  opacity: 0; pointer-events: none; transition: all 0.22s; z-index: 200;
  box-shadow: var(--shadow);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

footer {
  max-width: 1280px; margin: 0 auto; padding: 0 26px 40px;
  font-size: 11.5px; color: var(--muted-2); line-height: 1.8;
}
footer a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--line); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 反向查询（分档选择器 / 方案卡） ---------- */
.seg-wrap { flex-wrap: wrap; border: 0; background: none; padding: 0; gap: 6px; }
.seg-wrap button {
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 5px 11px;
}
.seg-wrap button.on { border-color: var(--green-2); background: var(--green-dim); }

.tier { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); }
.tier:last-child { border-bottom: 0; }
.tier-label {
  flex-shrink: 0; width: 26px; padding-top: 4px;
  font-size: 10.5px; font-family: var(--mono); color: var(--muted-2); letter-spacing: 0.5px;
}
.tier-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.mini-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-soft);
}
.mini-stats div { display: flex; flex-direction: column; gap: 1px; }
.mini-stats span { font-size: 10.5px; color: var(--muted-2); }
.mini-stats b { font-size: 13px; font-family: var(--mono); font-weight: 700; }

.add-bar { height: 4px; background: var(--panel-3); border-radius: 99px; overflow: hidden; margin-top: 9px; }
.add-fill { height: 100%; width: 0; background: var(--green); border-radius: 99px; transition: width 0.3s, background 0.3s; }

.sol-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  background: var(--panel-2);
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.sol-card.best { border-color: rgba(47, 143, 78, 0.5); background: linear-gradient(180deg, rgba(47, 143, 78, 0.07), #ffffff); }
.sol-card.best .sol-badge {
  position: absolute; top: -9px; left: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  background: var(--green); color: #ffffff; padding: 2px 8px; border-radius: 99px;
}

.steps { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.step {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel-3); border: 1px solid #cfe0c7;
  border-radius: 7px; padding: 3px 8px; font-size: 12px; font-weight: 500;
}
.step .i { font-family: var(--mono); font-size: 9.5px; color: var(--muted-2); }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 11px; }
.metric { background: rgba(47, 143, 78, 0.045); border: 1px solid var(--line-soft); border-radius: 8px; padding: 6px 9px; }
.metric .k { font-size: 10px; color: var(--muted-2); }
.metric .v { font-size: 14px; font-weight: 700; font-family: var(--mono); letter-spacing: -0.3px; }

.sol-actions { margin-top: 10px; display: flex; gap: 6px; }
.btn-sm { padding: 5px 11px; font-size: 11.5px; }

/* ---------- 双语名称（紧凑位置） ---------- */
.ing b .l-en,
.step .l-en,
.log-item .who .l-en { font-size: 9.5px; font-weight: 400; opacity: 0.62; margin-left: 4px; }
.sol-path .l-en { font-size: 10px; font-weight: 400; opacity: 0.65; }
.card-top .name { display: flex; flex-direction: column; line-height: 1.25; }
.card-top .name .l-en { font-size: 10px; font-weight: 400; color: var(--muted-2); margin: 0; font-family: var(--mono); }
body[data-lang="en"] .card-top .name .l-en { font-size: 13px; font-weight: 700; color: var(--text); font-family: inherit; }
td .desc-en { display: block; color: var(--muted-2); opacity: 0.8; }

/* ---------- 双语细节 ---------- */
.seed .pr, .weed .pr { font-family: var(--mono); font-size: 10px; color: var(--muted-2); margin-top: 1px; }
.weed .fx { font-size: 10.5px; margin-top: 3px; color: var(--muted-2); }
.weed .fx .l-en { font-size: 0.92em; }
.weed .fx .l-zh { font-weight: 400; }
body[data-lang="both"] .weed .fx .l-en,
body[data-lang="both"] .weed .pr .l-en { display: block; margin: 0; line-height: 1.4; }

.p-path { font-size: 11.5px; color: var(--muted); margin: 2px 0 6px; line-height: 1.6; }
body[data-lang="both"] .p-path .l-en { display: block; margin: 2px 0 0; font-size: 10.5px; }

.log-item .price { margin-left: auto; font-size: 10.5px; color: var(--muted-2); font-family: var(--mono); }
.log-item .tag + .price { margin-left: 7px; }
.log-item .tag { display: inline-flex; flex-direction: column; align-items: flex-end; }
.log-item .tag .l-en { display: block; font-size: 8.5px; margin: 0; line-height: 1.2; }
body[data-lang="both"] .log-item .flow .l-en { display: block; margin: 1px 0 0; font-size: 10.5px; }

.edesc { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
body[data-lang="both"] .edesc .l-en { display: block; margin: 1px 0 0; opacity: 0.85; }

td.src { font-size: 11.5px; color: var(--muted); }
td.src .lbl { color: var(--muted-2); }
td.src .lbl .l-en { display: inline; margin-left: 3px; }
body[data-lang="both"] td.src .l-en { display: block; margin: 2px 0 0; }
body[data-lang="both"] td.src .lbl .l-en { display: inline; margin: 0 0 0 3px; }

.preset-name { color: var(--green); font-size: 11px; margin-right: 6px; }

body[data-lang="both"] .card .rules .l-en { display: block; margin: 1px 0 3px; font-size: 10px; opacity: 0.95; color: var(--muted-2); }
body[data-lang="both"] .empty-hint .l-en { display: block; font-size: 10.5px; margin: 1px 0 0; }
body[data-lang="both"] .toast .l-en { display: block; font-size: 11px; margin: 0; }
body[data-lang="both"] .round-head span .l-en,
body[data-lang="both"] .round-head button .l-en { display: inline; font-size: 10px; margin: 0; }
body[data-lang="both"] .metric .v .l-en { display: block; font-size: 9px; margin: 0; font-weight: 400; color: var(--muted-2); }
body[data-lang="both"] .sol-badge .l-en { font-size: 8.5px; margin-left: 4px; opacity: 0.7; }
body[data-lang="both"] .card-top .price { flex-shrink: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
  .brand { flex: 1; min-width: 0; }
  .brand h1 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lang-switch { margin-left: auto; }
  .tabs { order: 3; width: 100%; flex: 0 0 100%; gap: 4px; padding-bottom: 2px; }
  .tab { padding: 7px 11px; font-size: 12.5px; }
  main { padding: 16px 14px 56px; }
  footer { padding: 0 14px 32px; }
  .panel { padding: 14px; border-radius: 12px; }
  .split { gap: 14px; }
  .weed-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .sub-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .stat-row { gap: 6px; }
  .stat { padding: 8px 9px; }
  .stat .v { font-size: 16px; }
  .codex-grid { grid-template-columns: 1fr; }
  .sol-head { flex-wrap: wrap; }
  .target-grid { max-height: 210px; }
}

@media (max-width: 420px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat:last-child { grid-column: span 2; }
  .ing { font-size: 11.5px; padding: 3px 7px 3px 9px; }
}
