:root {
  --bg: #0f1115;
  --bg-soft: #161a22;
  --bg-panel: #1b2028;
  --bg-input: #10131a;
  --line: #2b323d;
  --line-soft: #232932;  /* 主题可覆盖 */
  --fg: #e6e9ef;
  --fg-dim: #9aa4b2;
  --fg-faint: #6b7684;
  --accent: #f0a020;
  --accent-2: #6ea8fe;
  --ok: #4ec97e;
  --warn: #e5b567;
  --bad: #e06c75;
  --W: #f7f4e0;
  --U: #7cc3f0;
  --B: #b09ac6;
  --R: #f08a6e;
  --G: #7fce9b;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: var(--bg-code); padding: 1px 5px; border-radius: 4px;
  font-family: Consolas, "Cascadia Mono", monospace; font-size: 14.5px;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 12px 22px;
  background: var(--topbar);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 32px; line-height: 1; }
.brand h1 { margin: 0; font-size: 19px; letter-spacing: .3px; }
.tagline { margin: 0; font-size: 14px; color: var(--fg-faint); }

.tabs { display: flex; gap: 6px; margin-left: auto; }
.tab {
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--fg-dim);
  border: 1px solid transparent; font-size: 15.5px; font-family: inherit;
  transition: all .15s;
}
.tab:hover { color: var(--fg); background: var(--bg-soft); }
.tab.active {
  color: #10131a; background: var(--accent); font-weight: 600;
  border-color: var(--accent);
}
.status { font-size: 14px; color: var(--fg-faint); min-width: 150px; text-align: right; }
.status.ok { color: var(--ok); }
.status.err { color: var(--bad); }

/* ---------------- 面板 ---------------- */
main { padding: 20px 22px 60px; max-width: 1500px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.panel-head { margin-bottom: 16px; }
.panel-head h2 { margin: 0 0 6px; font-size: 22px; }
.hint { margin: 0; color: var(--fg-dim); font-size: 15px; }

/* ---------------- 表单 ---------------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  padding: 14px 16px; background: var(--bg-panel);
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px;
}
.field { display: flex; flex-direction: column; gap: 5px; font-size: 14.5px; color: var(--fg-dim); }
.field > span { font-size: 14px; }
.field.wide { flex: 1 1 320px; min-width: 260px; }
.field.checkbox { flex-direction: row; align-items: center; gap: 7px; padding-bottom: 8px; }
.field.checkbox span { color: var(--fg-dim); font-size: 14.5px; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.actions { flex-direction: row; gap: 8px; }

input[type="text"], input[type="number"], select, textarea {
  background: var(--bg-input); color: var(--fg);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-family: inherit; font-size: 15.5px;
  outline: none; transition: border-color .15s;
}
input[type="text"]:focus, select:focus, textarea:focus { border-color: var(--accent); }
select { cursor: pointer; }
input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; width: 15px; height: 15px; }

.filters {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  padding: 16px; background: var(--bg-panel);
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px;
}

.colors { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-input); font-size: 14.5px;
  transition: all .15s;
}
.chip:hover { border-color: var(--fg-faint); }
.chip input { display: none; }
.chip.w:has(input:checked) { background: rgba(247,244,224,.16); border-color: var(--W); color: var(--W); }
.chip.u:has(input:checked) { background: rgba(124,195,240,.16); border-color: var(--U); color: var(--U); }
.chip.b:has(input:checked) { background: rgba(176,154,198,.16); border-color: var(--B); color: var(--B); }
.chip.r:has(input:checked) { background: rgba(240,138,110,.16); border-color: var(--R); color: var(--R); }
.chip.g:has(input:checked) { background: rgba(127,206,155,.16); border-color: var(--G); color: var(--G); }
.chip.c:has(input:checked) { background: rgba(154,164,178,.16); border-color: var(--fg-dim); color: var(--fg); }

/* ---------------- 按钮 ---------------- */
.btn {
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 15.5px; font-weight: 500;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--fg);
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--fg-faint); background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hi); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 11px; font-size: 14.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------------- 分栏 ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }

.pane {
  display: flex; flex-direction: column;
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; min-height: 320px;
}
.pane-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px; color: var(--fg-dim); background: var(--bg-sub);
}
.pane-head .count { color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.pane-foot {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-top: 1px solid var(--line-soft); background: var(--bg-sub);
}
#cv-input, #cv-output, #rt-input {
  flex: 1; border: none; border-radius: 0; background: var(--bg-input);
  resize: vertical; min-height: 300px; padding: 12px 14px;
  font-family: Consolas, "Cascadia Mono", Menlo, monospace;
  font-size: 15px; line-height: 1.75;
}
#cv-output { color: var(--ok-text); }

.report { margin-top: 14px; }
.report:empty { display: none; }

.card {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
}
.card h3 { margin: 0 0 10px; font-size: 16px; color: var(--fg); }
.card.warn { border-color: var(--warn-border); background: var(--warn-bg); }

ul.plain { margin: 0; padding-left: 18px; font-size: 15px; color: var(--fg-dim); }
ul.plain li { margin: 2px 0; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 14.5px; }

/* ---------------- 结果区 ---------------- */
.results { padding: 14px; overflow: auto; }
.results .empty { color: var(--fg-faint); text-align: center; padding: 40px 0; }

.score-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.score {
  background: var(--bg-input); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 10px 12px; text-align: center;
}
.score .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; }
.score .k { font-size: 13.5px; color: var(--fg-faint); margin-top: 2px; }
.score .sub { font-size: 13px; color: var(--fg-faint); }

.bracket-bar { display: flex; gap: 4px; margin: 8px 0 4px; }
.bracket-bar .seg {
  flex: 1; padding: 7px 4px; text-align: center; font-size: 13.5px;
  background: var(--bg-input); border: 1px solid var(--line-soft);
  border-radius: 6px; color: var(--fg-faint); transition: all .15s;
}
.bracket-bar .seg.hit { font-weight: 700; color: var(--on-accent); }
.bracket-bar .seg.hit[data-b="1"] { background: #7fce9b; border-color: #7fce9b; }
.bracket-bar .seg.hit[data-b="2"] { background: #6ea8fe; border-color: #6ea8fe; }
.bracket-bar .seg.hit[data-b="3"] { background: #f0a020; border-color: #f0a020; }
.bracket-bar .seg.hit[data-b="4"] { background: #f08a6e; border-color: #f08a6e; }
.bracket-bar .seg.hit[data-b="5"] { background: #e06c75; border-color: #e06c75; }

.kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); font-size: 15px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--fg-dim); }
.kv .v { font-variant-numeric: tabular-nums; }

/* ---------------- 卡组网格 ---------------- */
.resultbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 15px; color: var(--fg-dim);
}
.resultbar .spacer { flex: 1; }

.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }

.deck {
  display: flex; flex-direction: column;
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.deck:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }

.deck-img {
  position: relative; height: 128px; background: var(--bg-art) center/cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.deck-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, var(--img-shade) 100%); }
.deck-bracket {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  padding: 3px 9px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: var(--overlay); color: #fff; backdrop-filter: blur(4px);
}
.deck-price {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  padding: 3px 9px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--overlay); color: var(--ok); backdrop-filter: blur(4px);
}
.deck-cmd {
  position: absolute; bottom: 6px; left: 10px; right: 10px; z-index: 2;
  font-size: 15.5px; font-weight: 600; text-shadow: 0 1px 4px var(--shadow-fg);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.deck-body { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.deck-title { font-size: 16px; font-weight: 600; line-height: 1.35; }
.deck-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 14px; color: var(--fg-faint); }
.deck-meta b { color: var(--fg-dim); font-weight: 500; }
.deck-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 13px; padding: 1px 7px; border-radius: 999px;
  background: var(--bg-code); color: var(--fg-dim); border: 1px solid var(--line-soft);
}
.deck-actions { padding: 10px 12px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; }
.deck-actions .btn { flex: 1; justify-content: center; }

.pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.pip {
  width: 14px; height: 14px; border-radius: 50%; display: inline-block;
  border: 1px solid var(--pip-border); font-size: 11px; line-height: 13px; text-align: center;
  color: var(--pip-fg); font-weight: 700;
}
.pip.W { background: var(--W); } .pip.U { background: var(--U); }
.pip.B { background: var(--B); } .pip.R { background: var(--R); }
.pip.G { background: var(--G); } .pip.C { background: var(--C); }

.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pager button {
  min-width: 38px; padding: 7px 11px; border-radius: 8px;
  background: var(--bg-panel); border: 1px solid var(--line);
  color: var(--fg-dim); cursor: pointer; font-family: inherit; font-size: 15px;
}
.pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--fg); }
.pager button.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.pager button:disabled { opacity: .35; cursor: not-allowed; }
.pager .ellipsis { color: var(--fg-faint); padding: 0 4px; }

.loading { text-align: center; padding: 44px 0; color: var(--fg-dim); }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 10px;
  border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, var(--bg-panel) 25%, var(--bg-hover) 50%, var(--bg-panel) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 6px; color: transparent; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px);
  background: var(--bg-hover); color: var(--fg); border: 1px solid var(--line);
  padding: 11px 20px; border-radius: 10px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .22s; z-index: 999;
  font-size: 15.5px; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: var(--ok); }
.toast.err, .toast.bad { border-color: var(--bad); }
.toast.warn { border-color: var(--warn); }

/* ================================================================ */
/* ③ 卡组卡片（与 find.js 生成的 DOM 对应）                          */
/* ================================================================ */
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }

.deck-card {
  display: flex; flex-direction: column;
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.deck-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.deck-card[data-loaded] .cmdr { color: var(--accent); }

.deck-art {
  position: relative; height: 148px; background: var(--bg-art);
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.deck-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.deck-art .noart {
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--fg-faint); font-size: 14.5px;
  background: repeating-linear-gradient(45deg, var(--stripe-a) 0 12px, var(--stripe-b) 12px 24px);
}

.deck-body { padding: 11px 13px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.deck-name { font-size: 16.5px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-owner { font-size: 14px; color: var(--fg-faint); }
.deck-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14.5px; }
.deck-line.muted { color: var(--fg-faint); }
.deck-line.small { font-size: 14px; }
.deck-line .cmdr { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.deck-line .cmdr-icon { font-size: 14px; }
.deck-line .price { color: var(--ok); font-weight: 600; font-variant-numeric: tabular-nums; }
.deck-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.bracket { padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--on-accent); }
.bracket.b1 { background: #7fce9b; } .bracket.b2 { background: #6ea8fe; }
.bracket.b3 { background: #f0a020; } .bracket.b4 { background: #f08a6e; }
.bracket.b5 { background: #e06c75; }

.deck-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.deck-actions .btn { flex: 1; text-align: center; display: inline-flex; align-items: center; justify-content: center; }

.pager .pageno { padding: 0 8px; color: var(--fg-dim); font-size: 15px; }
.empty.bad { color: var(--bad); }
.muted { color: var(--fg-faint); }
.small { font-size: 14px; }
.bad { color: var(--bad); }
.pill {
  font-size: 12.5px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; vertical-align: middle;
}

/* ================================================================ */
/* ① 转换报告                                                        */
/* ================================================================ */
.rep-line { font-size: 15px; color: var(--fg-dim); }
.rep-failed { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--bad-border); background: var(--bad-bg); border-radius: 8px; }
.rep-sub { font-size: 14.5px; color: var(--fg-dim); margin-bottom: 4px; }
.rep-failed ul { margin: 4px 0 0; padding-left: 18px; }
.rep-failed li { font-size: 14.5px; color: var(--fg-dim); margin: 2px 0; }

/* ================================================================ */
/* ② 强度分析结果                                                    */
/* ================================================================ */
.rate-hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px;
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px;
}
.hero-label { font-size: 14px; color: var(--fg-faint); letter-spacing: .5px; text-transform: uppercase; }
.hero-value { font-size: 48px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent); }
.hero-value.small { font-size: 28px; color: var(--accent-2); }
.hero-max { font-size: 20px; color: var(--fg-faint); font-weight: 500; margin-left: 2px; }
.hero-main .bar { height: 8px; border-radius: 999px; background: var(--bg-input); overflow: hidden; margin-top: 8px; }
.hero-main .bar i { display: block; height: 100%; background: linear-gradient(90deg, #7fce9b, #f0a020, #e06c75); }
.hero-side { display: flex; flex-direction: column; gap: 3px; justify-content: center; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat {
  background: var(--bg-panel); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 10px 13px; display: flex; flex-direction: column; gap: 1px;
}
.stat span { font-size: 13.5px; color: var(--fg-faint); }
.stat b { font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.stat i { font-size: 13px; color: var(--fg-faint); font-style: normal; }

.rate-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1000px) { .rate-cols { grid-template-columns: 1fr; } .rate-hero { grid-template-columns: 1fr; } }

table.mini { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.mini th, table.mini td { text-align: left; padding: 5px 7px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.mini th { color: var(--fg-faint); font-weight: 500; font-size: 13.5px; }
table.mini td.num, table.mini th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.mini tr.detail td { font-size: 13.5px; color: var(--fg-faint); border-bottom: 1px solid var(--line-soft); padding-top: 0; }
table.mini tr.na td { color: var(--fg-faint); }
table.mini .en { color: var(--fg-faint); font-size: 13px; margin-left: 5px; }
table.mini td .en { display: inline; }

.kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); font-size: 15px; }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--fg-dim); }
.kv b { font-variant-numeric: tabular-nums; }
.card h4 { margin: 14px 0 6px; font-size: 14.5px; color: var(--fg-dim); }

ul.taglist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 15px; }
ul.taglist li { padding: 4px 8px; background: var(--bg-input); border-radius: 6px; border: 1px solid var(--line-soft); }
ul.taglist .en, .en { color: var(--fg-faint); font-size: 13.5px; margin-left: 6px; }

.producers { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14.5px; color: var(--fg-dim); align-items: center; }
.producers .pip { margin-right: 3px; }

.notes { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.notes p { margin: 4px 0; font-size: 14px; color: var(--fg-faint); }

/* ---------------- 顶栏右侧（状态 + 分享） ---------------- */
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.tabs { margin-left: 0; }

/* ---------------- 操作按钮放输入框上方 ---------------- */
.pane-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft); background: var(--bg-sub);
}

/* ---------------- 弹窗（分享给朋友） ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .6);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow: auto;
}
.modal[hidden] { display: none; }
.modal-box {
  position: relative; width: min(760px, 100%);
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px 26px;
}
.modal-box h3 { margin: 0 0 4px; font-size: 20px; }
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: transparent; border: none; color: var(--fg-dim);
  font-size: 19px; cursor: pointer; line-height: 1; padding: 4px;
}
.modal-close:hover { color: var(--fg); }
.modal-body h4 { margin: 20px 0 8px; font-size: 16px; color: var(--accent); }
.modal-body h4:first-child { margin-top: 8px; }

.share-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-input); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 8px 10px; margin: 6px 0;
}
.share-line code { background: transparent; padding: 0; font-size: 15px; word-break: break-all; }
.share-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.share-item {
  background: var(--bg-input); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 12px 14px;
}
.share-url { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-url code { font-size: 16px; }
.qr { display: block; margin: 10px 0 4px; border-radius: 8px; background: #fff; padding: 6px; }
.share-details { margin-top: 10px; }
.share-details summary { cursor: pointer; color: var(--accent-2); font-size: 15px; }
.share-option {
  border-left: 3px solid var(--line); padding: 8px 0 8px 14px; margin: 12px 0;
}
.share-option strong { font-size: 15.5px; }
.modal-body .pill {
  font-size: 12.5px; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-chip); color: var(--fg-dim); margin-left: 6px;
}

/* ---------------- ③ 中继不可用时的降级卡片 ---------------- */
.offline-box {
  grid-column: 1 / -1;
  background: var(--bg-panel); border: 1px solid var(--line);
  border-left: 4px solid var(--warn, #d6800e);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}
.offline-box h3 { margin: 0 0 10px; font-size: 18px; }
.offline-box p { margin: 8px 0; font-size: 15px; line-height: 1.6; }
.offline-box ul { margin: 6px 0 10px; padding-left: 22px; font-size: 15px; line-height: 1.7; }
.offline-box .good { color: var(--ok, #168c54); }
.offline-box code { font-size: 14px; }
.offline-box details.relay-set { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.offline-box details.relay-set summary { cursor: pointer; color: var(--accent-2); font-size: 15px; }
.relay-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.relay-row input {
  flex: 1 1 260px; min-width: 200px;
  background: var(--bg-input); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; color: var(--fg); font-size: 14.5px;
}


/* ================= ② 两卡组合技面板 ================= */
.card.wide { grid-column: 1 / -1; }
ul.combos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.combos li {
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  padding: 8px 11px; border-radius: 9px;
  background: var(--bg-sub); border: 1px solid var(--line-soft);
}
ul.combos li b { font-size: 14.5px; color: var(--fg); }
.cb {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; letter-spacing: .5px;
  padding: 2px 8px; border-radius: 999px; color: #fff; align-self: center;
}
.cb.early { background: var(--bad); }
.cb.late { background: var(--warn); }
.cbf { font-size: 12.5px; color: var(--fg-dim); }
.cbm { font-size: 11.5px; color: var(--fg-faint); margin-left: auto; white-space: nowrap; }
@media (max-width: 700px) { .cbm { margin-left: 0; } }
