:root {
  --bg: #0f0d0b;
  --panel: #1a1714;
  --panel-2: #221e1a;
  --line: #3a322a;
  --text: #e8e0d4;
  --muted: #9a8f80;
  --accent: #c8a252;
  --accent-ink: #1a1408;
  --unique: #c7b377;
  --set: #3ccf4e;
  --runeword: #d9a35b;
  --rare: #e6dc5c;
  --charm: #7aa2ff;
  --good: #5fbf6a;
  --warn: #e0a040;
  --bad: #d65a4a;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.45 Inter, system-ui, sans-serif; min-height: 100vh; }
h1, h2, h3 { font-family: Cinzel, Georgia, serif; letter-spacing: .02em; margin: 0; }
button, select, input, textarea { font: inherit; color: inherit; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(15,13,11,.94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.brand h1 { font-size: 22px; color: var(--accent); }
.brand .sub { color: var(--muted); font-size: 12px; }
.roster { display: flex; gap: 8px; align-items: center; flex: 1; justify-content: flex-end; min-width: 260px; }
.roster select { flex: 1; max-width: 280px; }

select, input[type=text], input[type=number], input[type=password], input[type=search], textarea {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; min-height: 40px; width: 100%;
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px;
  padding: 8px 14px; min-height: 40px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 13px; }

.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: 46px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px; display: grid; min-width: 190px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.menu-pop button, .menu-pop .file-label {
  background: none; border: 0; text-align: left; padding: 10px; border-radius: 6px; cursor: pointer;
}
.menu-pop button:hover, .menu-pop .file-label:hover { background: var(--panel-2); }
.menu-pop .file-label input { display: none; }
.menu-pop .danger { color: var(--bad); }

main { max-width: 1100px; margin: 0 auto; padding: 16px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.char-head { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

.tabs { display: flex; gap: 4px; margin: 16px 0 12px; overflow-x: auto; }
.tab {
  background: none; border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; cursor: pointer;
  color: var(--muted); font-weight: 600; white-space: nowrap;
}
.tab[aria-selected=true] { color: var(--text); background: var(--panel); border-color: var(--line); }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.slot h3 { font-size: 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.slot .stats { font-size: 13px; color: var(--muted); margin: 8px 0; min-height: 1.2em; }
.slot .note { font-size: 13px; min-height: 36px; }

.badge { font: 600 11px Inter, sans-serif; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.badge.t0 { color: #c9b9a3; }
.badge.t1 { color: var(--warn); border-color: var(--warn); }
.badge.t2 { color: var(--good); border-color: var(--good); }
.badge.off { color: var(--bad); border-color: var(--bad); }

.n-unique { color: var(--unique); }
.n-set { color: var(--set); }
.n-runeword { color: var(--runeword); }
.n-rare { color: var(--rare); }
.n-charm { color: var(--charm); }
.runes { font-size: 12px; color: var(--muted); }

.summary { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 12px; }
.stat-big { font: 700 26px Cinzel, serif; }
.bar { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.bps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.bps span { font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--panel-2); color: var(--muted); }
.bps span.hit { background: rgba(95,191,106,.18); color: var(--good); }
.bps span.target { outline: 1px solid var(--accent); }

.up { margin-bottom: 10px; }
.up h3 { font-size: 15px; margin-bottom: 6px; }
.up .now { font-size: 13px; color: var(--muted); }
.sugg { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.sugg li { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.sugg .s-stats { font-size: 12px; color: var(--muted); }
.ok { color: var(--good); }
.badges { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.badge.stash { color: var(--charm); border-color: var(--charm); }
.ext { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--accent); text-decoration: none; }
.ext:hover { text-decoration: underline; }
.stash-card { border-color: var(--charm); }
.grp { font-size: 14px; color: var(--accent); margin: 14px 0 2px; }
.grp:first-child { margin-top: 0; }
.row-btns { display: flex; gap: 6px; }
.row-btns.end { justify-content: flex-end; }

/* accounts / login */
body.locked .roster { display: none; }
.login { display: grid; gap: 12px; max-width: 520px; margin: 0 auto; }
.login h2 { font-size: 18px; margin-bottom: 8px; }
.readme { border-color: var(--accent); }
.readme > summary { font: 700 18px Cinzel, Georgia, serif; letter-spacing: .02em; color: var(--accent); cursor: pointer; min-height: 24px; }
.readme[open] > summary { margin-bottom: 8px; }
.readme h3 { font-size: 15px; margin: 14px 0 6px; }
.readme p { margin: 6px 0; }
.readme ul { margin: 6px 0; padding-left: 20px; }
.readme li { margin: 3px 0; }
.readme img { display: block; max-width: 100%; height: auto; margin: 8px 0 14px; border: 1px solid var(--line); border-radius: 8px; }
.readme img[src*="mobile"] { max-width: min(100%, 320px); }
.readme a { color: var(--accent); overflow-wrap: anywhere; }
.readme code { font-size: 12px; background: var(--panel-2); padding: 1px 4px; border-radius: 4px; overflow-wrap: anywhere; }
.stack { display: grid; gap: 10px; margin-top: 10px; }
.stack .field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.acct-list { display: grid; gap: 6px; }
.acct {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-height: 44px; font-weight: 600;
}
.acct.on { border-color: var(--accent); color: var(--accent); }
.acct-ico { font-size: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.err { color: var(--bad); font-size: 13px; margin: 0; min-height: 1em; }
.file-btn { display: inline-flex; align-items: center; margin-top: 8px; }
.file-btn input { display: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; width: min(92vw, 400px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { font-size: 18px; }

/* photo scan */
.scan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.scan-btn input { display: none; }
.scan-row .btn { cursor: pointer; }
.scan-dialog { width: min(94vw, 480px); max-height: 92vh; overflow-y: auto; }
.scan-thumb { width: 100%; max-height: 200px; object-fit: contain; background: #000; border-radius: 8px; }
.cands { display: grid; gap: 6px; }
.cand { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; }
.cand:has(input:checked) { border-color: var(--accent); }
.raw summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.raw pre { white-space: pre-wrap; font-size: 12px; color: var(--muted); background: var(--panel-2); padding: 8px; border-radius: 6px; max-height: 160px; overflow: auto; }
[hidden] { display: none !important; }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50;
  background: var(--panel); border: 1px solid var(--accent); color: var(--text);
  padding: 10px 16px; border-radius: 99px; box-shadow: 0 8px 24px rgba(0,0,0,.5); font-size: 14px;
}

.inv { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: 10px 0; }
.inv i { aspect-ratio: 1; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); }
.inv i.f { background: rgba(122,162,255,.35); border-color: var(--charm); }
.inv i.k { background: rgba(200,162,82,.3); border-color: var(--accent); }
.kept-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 6px; }
.kept { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.kept input { accent-color: var(--accent); width: 18px; height: 18px; }
.inv i.over { background: rgba(214,90,74,.4); border-color: var(--bad); }

.charm-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.charm-row:first-child { border-top: 0; }
.charm-row .note { margin-top: 6px; }
.charm-row[hidden], .sgrp[hidden] { display: none; }
.stash-find { margin-bottom: 8px; }
.stash-find input { font-size: 16px; }
.add-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }

.empty { text-align: center; padding: 40px 16px; }
.empty p { color: var(--muted); }
.notes { font-size: 13px; color: var(--muted); margin-top: 10px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 40px; }

@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .brand { display: flex; align-items: baseline; gap: 10px; }
  .roster { min-width: 0; flex-basis: 100%; }
  .roster select { max-width: none; }
}
.cand input { width: auto; min-height: 0; margin: 0; accent-color: var(--accent); }

/* tooltip-style item block */
.tip {
  margin-top: 10px; background: #0b0a09; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 14px;
}
.empty-tip { color: var(--muted); font-size: 13px; }
.tip-top { display: flex; gap: 10px; align-items: flex-start; }
.tip-head { min-width: 0; flex: 1; }
.tip-name { font: 700 16px/1.25 Cinzel, Georgia, serif; }
.tip-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tip-runes { font-size: 13px; color: var(--runeword); margin-top: 2px; letter-spacing: .02em; }
.tip-h { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 10px 0 2px; }
.tip-stats { list-style: none; margin: 8px 0 0; padding: 0; }
.tip-stats li { color: #8f9bff; padding: 3px 0; border-top: 1px solid rgba(255,255,255,.05); line-height: 1.35; }
.tip-stats li:first-child { border-top: 0; }
.tip-stats.mine li { color: #aab4ff; font-weight: 500; }
.typ summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-top: 8px; }
.typ .tip-stats li { color: var(--muted); font-size: 13px; }
.tip-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; }
.link { background: none; border: 0; padding: 4px 0; color: var(--accent); font-size: 13px; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--bad); }
.tip .note { margin-top: 8px; font-size: 14px; }
.ph { flex: none; width: 72px; height: 72px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #000; cursor: zoom-in; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-flag { font-size: 13px; }
.charm-row > div:first-child { min-width: 0; }
.charm-row .tip { margin-top: 4px; }
.loc-field { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.loc-field > span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.loc-field input { flex: 1; min-width: 0; font-size: 16px; padding: 6px 8px; }
.loc-tag { color: var(--charm); }
.loc-wrap { position: relative; }
.loc-sugg { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 2px; display: flex; flex-direction: column; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.35); overflow: hidden; }
.loc-sugg[hidden] { display: none; }
.loc-opt { text-align: left; padding: 10px 12px; font: inherit; font-size: 15px; color: inherit; background: transparent; border: 0; border-top: 1px solid var(--line); cursor: pointer; }
.loc-opt:first-child { border-top: 0; }
.loc-opt:hover, .loc-opt:focus { background: rgba(127,127,127,.15); }
.charm-row .row-btns { flex-direction: column; align-items: flex-end; }
.photo-view { width: min(96vw, 900px); padding: 12px; }
.photo-view img { width: 100%; max-height: 80vh; object-fit: contain; background: #000; border-radius: 6px; display: block; }
.pv-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tip-divider { border: 0; border-top: 2px solid var(--accent); margin: 12px 0 4px; opacity: .8; }
.tip-stats.mine li { color: #c9d0ff; }
.item-ico { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.06), transparent 70%), #070606; }
.item-ico svg { width: 36px; height: 36px; }
.add-row:has(.add-pick) { align-items: end; }
.add-pick { margin-top: 0; }

/* item search */
.isearch { position: relative; margin-bottom: 8px; }
.isearch-in { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 40px; }
.isearch-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.isearch-res {
  list-style: none; margin: 4px 0 0; padding: 4px; position: absolute; left: 0; right: 0; z-index: 30;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.6);
  max-height: 340px; overflow-y: auto;
}
.isearch-res button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 6px; border-radius: 6px; cursor: pointer; }
.isearch-res button:hover, .isearch-res button:focus { background: var(--panel-2); outline: none; }
.isearch-res .item-ico { width: 36px; height: 36px; }
.isearch-res .item-ico svg { width: 26px; height: 26px; }
.isearch-res small { display: block; color: var(--muted); font-size: 12px; }
.isearch-res .none { color: var(--muted); padding: 8px; font-size: 13px; }

/* stash goods + custom items */
.n-rune { color: #ffa800; }
.n-gem { color: #e8e8e8; }
.n-jewel { color: #8f9bff; }
.n-magic { color: #8080ff; }
.n-misc { color: #c8b89a; }
.custom-add { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.custom-add summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.tip-stats.mine li.check-line { color: var(--warn); }
.chk { margin-left: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--warn); border-radius: 99px; padding: 0 6px; vertical-align: 1px; }
.charm-row.flash .tip { animation: flash 2.2s ease-out; }
@keyframes flash { 0%, 30% { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* skill plan */
.sk-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.sk-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; background: var(--panel-2); border-radius: 8px; padding: 8px 10px; }
.sk-row.sk-pre { background: transparent; border: 1px dashed var(--line); }
.sk-n { font: 700 14px Cinzel, serif; color: var(--accent); text-align: center; }
.sk-name { font-weight: 600; }
.sk-note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sk-bar { height: 4px; background: rgba(255,255,255,.06); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.sk-bar i { display: block; height: 100%; background: var(--accent); }
.sk-bar i.rest { background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px); opacity: .6; }
.sk-pts { font: 700 16px Cinzel, serif; color: var(--text); min-width: 40px; text-align: right; }
.sk-src { margin-top: 12px; font-size: 12px; }
.stat-plan { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 10px 0 0; }
.stat-plan dt { font-weight: 600; color: var(--accent); }
.stat-plan dd { margin: 0; color: var(--text); }

/* Runewords tab */
.rw-card { padding: 12px 0; border-top: 1px solid var(--line); }
.rw-card:first-of-type { border-top: 0; }
.rw-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rw-name { font-weight: 700; font-size: 17px; }
.rw-runes { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.rune-chip { font: 600 13px Inter, sans-serif; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); }
.rune-chip.have { color: var(--good); border-color: currentColor; background: rgba(95,191,106,.1); }
.rune-chip.need { color: var(--muted); border-style: dashed; }
.rw-miss .ext { margin-right: 8px; }
.rw-stats summary { cursor: pointer; color: var(--accent); font-size: 14px; margin-top: 4px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.rw-qty { font: 700 14px Inter, sans-serif; color: var(--good); border: 1px solid var(--good); border-radius: 99px; padding: 1px 9px; }
.rw-qty small { font-weight: 500; font-size: 11px; opacity: .85; }
.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 1px; }
.qty .btn { min-width: 34px; padding: 4px 0; border: 0; font-size: 18px; line-height: 1; }
.qty .qn { min-width: 26px; text-align: center; font-weight: 700; }
input.qn { width: 46px; min-width: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-weight: 700; text-align: center; padding: 4px 2px; cursor: text; }
input.qn:hover { border-color: var(--line); }
input.qn:focus { outline: none; border-color: var(--accent); background: rgba(127,127,127,.12); }
.add-qty { align-self: flex-start; }

/* Gems & Cube tab */
.cube-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.cube-row:first-of-type { border-top: 0; }
.cube-recipe { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cube-recipe .arrow { color: var(--muted); font-size: 18px; }
.rune-chip.out { color: var(--accent); border-color: var(--accent); background: rgba(200,162,82,.12); }
.gem-chip { font: 600 13px Inter, sans-serif; padding: 3px 10px; border-radius: 99px; border: 1px solid currentColor; }
.gem-chip.need { border-style: dashed; opacity: .8; }
.gem-chip.out { background: rgba(255,255,255,.06); }
.gem-topaz { color: #e8c44a; } .gem-amethyst { color: #b07ee0; } .gem-sapphire { color: #6c9cf0; }
.gem-ruby { color: #e0605a; } .gem-emerald { color: #4fc27a; } .gem-diamond { color: #dfe6ee; } .gem-skull { color: #c9bfae; }
.gem-grid { display: grid; gap: 4px; margin-top: 8px; font-size: 14px; }
.gem-grid > div { display: grid; grid-template-columns: 1.3fr repeat(5, 1fr); gap: 4px; align-items: center; }
.gg-h span { color: var(--muted); font-size: 11px; text-align: center; }
.gg-r span { text-align: center; } .gg-r .gem-name { text-align: left; font-weight: 600; }
.gg-r .n { font-weight: 700; } .gg-r .z { color: var(--line); }
.cube-ref summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.cube-ref-row { font-size: 14px; padding: 3px 0; color: var(--muted); } .cube-ref-row b { color: var(--text); }
.cube-meta { font-size: 14px; color: var(--muted); }


/* Runeword planner */
.rw-pick { margin: 6px 0 4px; }
.rw-pick-row { display: flex; gap: 8px; align-items: center; }
.rw-pick-row input { flex: 1; min-width: 0; }
.rw-plan .rw-card { border-top: 1px solid var(--line); margin-top: 10px; }
.rw-plan-btn { margin-left: auto; }
.rw-sum { margin-top: 6px; }
.rw-sub { font: 600 13px Inter, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 2px; }

/* Rune upgrade checker */
.rc-pick { display: grid; grid-template-columns: 1fr 96px; gap: 10px; margin-top: 6px; }
.rune-check .rw-head .badge, .rune-check .rw-head .rw-qty { margin-left: 4px; }

/* Stats & resists summary */
.stat-sum { margin-bottom: 12px; }
.ss-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.res-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.res-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); text-align: center; }
.rt-name { font-size: 12px; color: var(--muted); }
.res-fire .rt-name { color: #e0734f; } .res-cold .rt-name { color: #6fa8e6; } .res-light .rt-name { color: #e6cf5a; } .res-poison .rt-name { color: #6fc36f; }
.rt-val { font: 700 22px Cinzel, serif; }
.rt-cap { font-size: 11px; color: var(--muted); line-height: 1.2; }
.res-tile.ok .rt-val { color: var(--good); }
.res-tile.low .rt-val { color: var(--accent); }
.res-tile.bad .rt-val { color: #e05a5a; }
.ss-other { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 14px; margin: 12px 0 4px; }
.ss-other div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 3px 0; }
.ss-other dt { color: var(--muted); font-size: 14px; } .ss-other dd { margin: 0; font-weight: 600; }
.ss-src summary { cursor: pointer; color: var(--accent); font-size: 14px; margin-top: 8px; }
.ss-src ul { list-style: none; padding: 0; margin: 8px 0; }
.ss-src li { padding: 6px 0; border-top: 1px solid var(--line); }
@media (max-width: 420px) { .rt-val { font-size: 19px; } }

/* Mercenary header */
.merc-head { margin-bottom: 12px; }
.merc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 8px; }
.merc-sum .res-tile .rt-val { color: var(--text, inherit); }

/* Breakpoint panels */
.stat-big .frames { font: 500 13px Inter, sans-serif; color: var(--muted); margin-left: 6px; }
.bps span small { opacity: .7; margin-left: 2px; }
.ias-ctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }

/* Bases in the stash */
.base-opts { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.base-opts .field { min-width: 120px; }
.eth-check, .base-ctl .check { display: inline-flex; gap: 6px; align-items: center; padding-bottom: 8px; }
.base-ctl { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; }
.base-ctl .field { min-width: 110px; }
.base-fits { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.base-fits small { opacity: .75; }
.rw-base { margin-top: 2px; }
.rw-base.ok { color: var(--good); }

/* Socket fillers */
.sockets { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.sockets summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.sock-n { margin: 8px 0 4px; max-width: 200px; }
.sock-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.sock-row select { flex: 1; min-width: 160px; }
.sock-row input { flex: 1; min-width: 160px; }
.sock-adds { margin-top: 8px; }
.sock-extra { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; }

/* Android beta call-out (website only) */
.beta-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  margin: 10px auto 0; width: calc(100% - 24px); max-width: 1100px; box-sizing: border-box; padding: 10px 14px; border: 1px solid var(--accent); border-radius: 10px;
  background: rgba(201, 162, 75, 0.10); font-size: 14px; line-height: 1.4; }
.beta-banner[hidden] { display: none; }
.beta-actions { display: inline-flex; align-items: center; gap: 12px; }
.beta-how { color: inherit; opacity: .85; font-size: 13px; }
.beta-x { background: none; border: 0; color: inherit; opacity: .7; font-size: 16px; cursor: pointer; padding: 4px; }
.beta-x:hover { opacity: 1; }
