/* 裝備類圖鑑共用 */
.eq__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.eq__bar { position: sticky; top: 72px; z-index: 20; display: grid; gap: 10px; padding: 12px 14px; box-shadow: var(--shadow); }
.eq__row1 { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 10px 14px; align-items: center; }
.eq__row2 { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.eq__row2:empty { display: none; }
.select { height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.lvrange { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.input--sm { width: 74px; height: 36px; padding: 0 10px; }
.chip small { margin-left: 6px; color: var(--faint); font: 600 11.5px var(--mono); }
.chip[aria-pressed="true"] small { color: inherit; opacity: .8; }
.chip--sm { height: 30px; font-size: 13px; }
.muted { color: var(--faint); }
.linkish { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.linkish:hover { text-decoration: underline; }

.eq__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 18px; margin-top: 16px; align-items: start; }
.eq__count { margin: 0 0 8px; color: var(--faint); font-size: 12.5px; }
.eq__list { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.eq-gh { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 12px 14px 8px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 14.5px; position: sticky; top: 0; }
.eq-gh:first-child { border-top: 0; }
.eq-gh small { color: var(--faint); font: 600 12px var(--mono); }
.eq-gh span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.eq-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(0, 1.6fr) auto; gap: 4px 12px; align-items: center; padding: 9px 12px 9px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.eq-gh + .eq-row { border-top: 0; }
.eq-row:hover { background: var(--surface-2); }
.eq-row.is-sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.eq-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.eq-row__main { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.eq-row__main strong { font-size: 14.5px; overflow-wrap: anywhere; }
.eq-row__main small { flex-basis: 100%; color: var(--faint); font-size: 12px; }
.eq-row__st { display: flex; flex-wrap: wrap; gap: 3px 12px; color: var(--muted); font-size: 12.5px; }
.eq-row__st b { color: var(--text); font-variant-numeric: tabular-nums; }
.eq-cmpbtn { height: 28px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.eq-cmpbtn:hover { border-color: var(--accent); color: var(--accent); }
.eq-cmpbtn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.more { display: block; width: 100%; margin: 12px 0; height: 42px; border: 1px dashed var(--line-strong); border-radius: 10px; background: transparent; color: var(--accent); font-weight: 700; cursor: pointer; }
.more[hidden] { display: none; }
.empty { padding: 40px 20px; text-align: center; color: var(--faint); }

/* 物品名稱顏色（遊戲的品質色） */
[data-c="黃"] strong, h2[data-c="黃"] { color: #f4c443; }
html:is([data-theme="light"],[data-theme="paper"]) [data-c="黃"] strong, html:is([data-theme="light"],[data-theme="paper"]) h2[data-c="黃"] { color: #a86b00; }
[data-c="藍"] strong, h2[data-c="藍"] { color: var(--r-英雄); }
[data-c="綠"] strong, h2[data-c="綠"] { color: var(--r-精英); }
[data-c="紫"] strong, h2[data-c="紫"] { color: var(--r-史詩, #b06cff); }
[data-c="紅"] strong, h2[data-c="紅"] { color: var(--r-太古); }

/* 詳細 */
.eq__detail { position: sticky; top: 200px; max-height: calc(100vh - 216px); overflow-y: auto; padding: 18px 20px; scrollbar-width: thin; }
body.has-tray .eq__detail { max-height: calc(100vh - 280px); }
.eq-d__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eq-d__head h2 { margin: 0; font-size: 21px; }
.eq-d__meta { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.eq-d__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn--on { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.eq-h { margin: 18px 0 8px; color: var(--faint); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; }
.eq-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; margin: 0; }
.eq-stats div { padding: 7px 10px; border-radius: 8px; background: var(--surface-2); }
.eq-stats dt { color: var(--faint); font-size: 12px; }
.eq-stats dd { margin: 1px 0 0; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.eq-desc, .sp__d { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.num { color: var(--text); font-weight: 700; }
.tc2 { color: var(--amber); font-weight: 700; } .tc5 { color: var(--faint); } .tc6 { color: var(--accent); } .tc7 { color: var(--r-太古); }
.tc1, .tc3, .tc4, .tc8, .tc9 { color: var(--r-英雄); }
.eq-trig { margin-bottom: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; }
.eq-trig__k { margin-right: 8px; color: var(--faint); font-size: 12px; }
.sp { margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.sp summary { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; font-weight: 800; font-size: 14px; cursor: pointer; }
.sp summary small { color: var(--amber); font-weight: 700; font-size: 12px; }
.sp > :not(summary) { margin: 0 12px 10px; }
.sp__fx { display: flex; flex-wrap: wrap; gap: 5px; }
.fx { padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
.fx b { color: var(--text); }
.sp__sub { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--line-strong); }
.sp__lbl { margin: 6px 0 0; color: var(--faint); font-size: 12px; }
.eq-raw { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.eq-raw summary { color: var(--faint); font-size: 13px; cursor: pointer; }
.eq-raw dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; margin: 10px 0 0; font-size: 12.5px; }
.eq-raw dt { color: var(--faint); }
.eq-raw dd { margin: 0; overflow-wrap: anywhere; }

/* 比較列 */
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; border-top: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
.tray[hidden] { display: none; }
.tray__bar { display: flex; align-items: center; gap: 12px; max-width: 1400px; margin: 0 auto; padding: 10px 20px; }
.tray__toggle { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--accent); color: var(--bg); font: inherit; font-weight: 800; cursor: pointer; }
.tray__chips { display: flex; gap: 6px; flex: 1; overflow-x: auto; scrollbar-width: thin; }
.tray__chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; white-space: nowrap; font-size: 13px; }
.tray__chip button:last-child { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.tray__body { max-height: 46vh; overflow: auto; border-top: 1px solid var(--line); }
.tray__scroll { max-width: 1400px; margin: 0 auto; padding: 8px 20px 16px; }
.cmp { border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.cmp th, .cmp td { padding: 6px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.cmp thead th { position: sticky; top: 0; background: var(--surface); text-align: right; font-size: 13.5px; }
.cmp thead th small { display: block; color: var(--faint); font-weight: 500; font-size: 11.5px; }
.cmp tbody th { position: sticky; left: 0; background: var(--surface); text-align: left; color: var(--muted); font-weight: 600; }
.cmp td.is-max { color: var(--accent); font-weight: 800; }
.cmp__sp { white-space: normal !important; min-width: 120px; }
.cmp__sp small { display: block; color: var(--faint); font-size: 11.5px; }
body.has-tray main { padding-bottom: 90px; }

@media (max-width: 900px) {
  .eq__bar { position: static; }
  .eq__row1 { grid-template-columns: 1fr; }
  .eq__layout { grid-template-columns: 1fr; }
  .eq__detail { position: static; max-height: none; }
  .eq-row { grid-template-columns: 1fr auto; }
  .eq-row__st { grid-column: 1 / -1; grid-row: 2; }
  .tray__bar { padding: 8px 12px; }
}
.eq__row1--two { grid-template-columns: minmax(220px, 1fr) auto; }
@media (max-width: 900px) { .eq__row1--two { grid-template-columns: 1fr; } }
