:root {
  --bg: #0f1216;
  --panel: #171b21;
  --panel2: #1f242c;
  --line: #2a313b;
  --text: #cfd3d8;
  --muted: #8a919b;
  --gold: #ffd100;
  --link: #9ecbff;
  --green: #1eff00;
  --new: #58d68d;
  --mod: #f5b041;
  --q0: #9d9d9d; --q1: #ffffff; --q2: #1eff00; --q3: #0070dd; --q4: #a335ee; --q5: #ff8000; --q6: #e6cc80; --q7: #00ccff;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
header { display: flex; align-items: center; gap: 18px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.brand { font-size: 20px; font-weight: 700; color: var(--gold); letter-spacing: .5px; }
.brand span { color: var(--text); font-weight: 300; }
nav { display: flex; gap: 14px; flex-wrap: wrap; }
nav a { color: var(--text); padding: 4px 2px; }
nav a.hl { color: var(--new); }
.search { position: relative; margin-left: auto; min-width: 260px; flex: 1; max-width: 420px; }
.search input { width: 100%; padding: 7px 10px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; font-size: 14px; }
#qres { position: absolute; top: 36px; left: 0; right: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; max-height: 60vh; overflow: auto; z-index: 30; }
#qres a { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid var(--line); }
#qres a:hover, #qres a.sel { background: #2b323c; text-decoration: none; }
#qres .kind { margin-left: auto; color: var(--muted); font-size: 12px; }
main { max-width: 1240px; margin: 0 auto; padding: 18px 16px 60px; }
h1 { color: var(--gold); font-size: 24px; margin: 0 0 10px; }
h2 { color: var(--gold); font-size: 18px; margin: 22px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
h3 { font-size: 15px; margin: 18px 0 6px; color: #e8e2c8; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.col { flex: 1; min-width: 300px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px; color: var(--text); }
.tile:hover { background: var(--panel2); text-decoration: none; }
.tile .sub { color: var(--muted); font-size: 12px; }
.ico { width: 18px; height: 18px; vertical-align: -4px; border-radius: 3px; border: 1px solid #000; margin-right: 4px; background: #222; }
.ico.medium { width: 22px; height: 22px; vertical-align: -6px; }
.ico.large { width: 56px; height: 56px; vertical-align: middle; margin-right: 8px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; cursor: pointer; user-select: none; }
th.s-asc::after { content: " ▲"; } th.s-desc::after { content: " ▼"; }
tr:hover td { background: #161a20; }
td.num { text-align: right; white-space: nowrap; }
.q0 { color: var(--q0); } .q1 { color: var(--q1); } .q2 { color: var(--q2); } .q3 { color: var(--q3); } .q4 { color: var(--q4); } .q5 { color: var(--q5); } .q6 { color: var(--q6); } .q7 { color: var(--q7); }
.badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; margin-left: 6px; vertical-align: middle; letter-spacing: .3px; }
.badge.new { background: #1d5c33; color: var(--new); }
.badge.mod { background: #5c3f0e; color: var(--mod); }
.sk-o { color: #ff8040; } .sk-y { color: #ffff00; } .sk-g { color: #40bf40; } .sk-x { color: #808080; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0 14px; }
.filters input, .filters select { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; font-size: 13px; }
.filters label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 4px; }
button { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; cursor: pointer; }
button:hover { background: #2b323c; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0; }
.tabs a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--text); background: var(--panel); }
.tabs a.on { background: #2b323c; color: var(--gold); }

/* tooltip */
.tt { background: rgba(8, 10, 14, .97); border: 1px solid #3c4553; border-radius: 6px; padding: 10px 12px; min-width: 260px; max-width: 380px; font-size: 13px; line-height: 1.35; color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.6); }
.tt .name { font-size: 15px; font-weight: 600; }
.tt .two { display: flex; justify-content: space-between; gap: 12px; }
.tt .g { color: var(--green); }
.tt .y { color: #ffd100; }
.tt .r { color: #ff5050; }
.tt .d { color: #ffd100; font-style: italic; white-space: pre-wrap; }
.tt .grey { color: #9d9d9d; }
.tt .desc { white-space: pre-wrap; }
.tt .set { color: #ffd100; margin-top: 4px; }
.tt .setitem { color: #9d9d9d; padding-left: 10px; }
.tt .setbonus { color: #9d9d9d; padding-left: 10px; }
.tt .money { margin-top: 4px; }
#tip { position: fixed; z-index: 100; pointer-events: none; }
.money .g::after { content: "g"; color: #ffd100; margin: 0 3px 0 1px; font-size: 11px; }
.money .s::after { content: "s"; color: #c7c7cf; margin: 0 3px 0 1px; font-size: 11px; }
.money .c::after { content: "c"; color: #eda55f; margin: 0 3px 0 1px; font-size: 11px; }
.tt .money .g, .tt .money .s, .tt .money .c { color: #fff; }
.money .g, .money .s, .money .c { color: var(--text); }
.detail .tt { max-width: 420px; }
.reag { display: inline-block; margin-right: 8px; white-space: nowrap; }
.ext { color: var(--muted); font-size: 12px; }
.cat { background: var(--panel2); }
.cat td { color: var(--gold); font-weight: 600; }
.chg { color: var(--mod); font-size: 12px; }
.side-h { color: #ff6b6b; } .side-a { color: #6bb2ff; } .side-b { color: var(--muted); }
.chain summary { cursor: pointer; color: var(--gold); white-space: nowrap; }
.chain ol { margin: 4px 0 0; padding-left: 18px; }
.chain li { padding: 1px 0; }
.chain-cur { font-weight: 700; color: var(--gold); }
tr.hl td { background: #2a2610; }
.side-tabs { display: inline-flex; margin: 0; }
.side-tabs a { font-weight: 600; padding: 6px 14px; }
.side-tabs a.on { background: #3a2f10; border-color: var(--gold); color: var(--gold); }
h4 { margin: 12px 0 4px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.mapwrap { position: relative; margin: 10px 0 16px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.mapwrap img { display: block; width: 100%; height: auto; }
.maprect { position: absolute; border: 1px solid rgba(255, 209, 0, .35); border-radius: 3px; color: #fff; font-size: 11px; text-shadow: 0 0 3px #000, 0 0 3px #000; display: flex; align-items: center; justify-content: center; text-align: center; }
.maprect:hover { background: rgba(255, 209, 0, .18); border-color: var(--gold); text-decoration: none; }
.maprect span { padding: 2px; }
.maprect.area { border-color: transparent; }
.maprect.area span { opacity: 0; }
.maprect.area:hover span { opacity: 1; }
.pin { position: absolute; width: 9px; height: 9px; margin: -5px 0 0 -5px; border-radius: 50%; background: #ffd100; border: 1px solid #000; box-shadow: 0 0 4px #000; }
.zones ul { columns: 3; list-style: none; padding: 0; margin: 0; }
.zones ul ul { columns: 1; padding-left: 14px; }
.zones li { break-inside: avoid; padding: 2px 0; }
@media (max-width: 800px) { .zones ul { columns: 1; } .search { max-width: none; } }
tr:has(+ tr.chain-next) td { border-bottom-color: transparent; }
tr.chain-next td:first-child { padding-left: 18px; }
/* dungeon prep guides (#/prep/<zone>) */
.prep-callout { margin: 6px 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 6px; background: #1a1d24; }
.prep-summary { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #15181e; margin: 10px 0 18px; }
.prep-summary p { margin: 6px 0; }
.prep-num { display: inline-block; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; background: var(--gold); color: #000; font-size: 15px; margin-right: 6px; }
ol.prep-stops { list-style: none; padding: 0; margin: 0; }
.prep-stop { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 12px 14px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #15181e; }
.prep-stop-text { flex: 1 1 auto; min-width: 0; }
.prep-stop-head { font-size: 16px; }
.prep-step { display: inline-block; min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-size: 13px; }
.prep-quests { margin: 8px 0 0; padding-left: 18px; }
.prep-quests li { margin: 0 0 8px; }
.prep-rew { font-size: 12px; margin-top: 2px; }
.prep-then { margin: 6px 0 0; color: #cfc6a8; }
.prepmap { flex: 0 0 auto; width: 100%; margin: 0; }
.prep-chain ol { padding-left: 22px; }
.prep-chain li { margin: 0 0 6px; }
.prep-chain li.inside { color: var(--gold); }
.prep-chain li.inside a { color: var(--gold); font-weight: 600; }
.prep-where { font-size: 11px; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--line); color: #aab; margin-left: 4px; }
ul.prep-inside { list-style: none; padding: 0; }
ul.prep-inside li { padding: 6px 0; border-bottom: 1px solid var(--line); }
ul.prep-inside label { cursor: pointer; }
@media (max-width: 700px) { .prep-stop { flex-direction: column; } .prepmap { max-width: none !important; } }
.prep-group { margin: 8px 0 0; padding: 6px 10px 4px; border-left: 3px solid #4a5060; border-radius: 4px; background: #1a1d24; }
.prep-group.chain { border-left-color: var(--gold); }
.prep-group .prep-quests { margin-top: 4px; }
.prep-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; vertical-align: 1px; }
.prep-tag.chain { background: var(--gold); color: #000; }
.prep-tag.solo { background: #3a4050; color: #dde; }
.prep-stepno { font-size: 11px; color: var(--gold); font-weight: 600; }
.prep-next { margin: 0 0 4px; color: #cfc6a8; }
/* crafted gear by spec (#/bop) */
.bop-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #15181e; margin: 10px 0; }
.bop-ctl { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #aab; }
.bop-ctl select, .bop-ctl input { min-width: 120px; }
.bop-ctl input[type=number] { width: 70px; min-width: 0; }
.bop-chk { font-size: 13px; padding-bottom: 4px; }
.bop-views { margin: 8px 0 10px; }
.bop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.bop-card { border: 1px solid var(--line); border-left: 3px solid #4a5060; border-radius: 8px; padding: 10px 12px; background: #15181e; display: flex; flex-direction: column; gap: 5px; }
.bop-card.great { border-left-color: #3fbf5f; }
.bop-card.ok { border-left-color: #d9b64a; }
.bop-card.poor { border-left-color: #c0504d; opacity: .85; }
.bop-card-name { font-size: 15px; color: var(--gold); }
.bop-fit.great b { color: #5fd67f; } .bop-fit.ok b { color: #e8c65a; } .bop-fit.poor b { color: #e07470; }
.bop-totals { color: #dfe3ea; }
.bop-setbonus { color: #7fd17f; }
.pill-s { display: inline-block; font-size: 11px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; color: #cfd3dc; }
.bop-pieces summary { cursor: pointer; color: #aab; }
table.bop-mini { width: 100%; margin-top: 4px; font-size: 12px; }
table.bop-mini td { padding: 3px 4px; }
tr.bop-no td { opacity: .45; }
.bop-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
.bop-slot { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #15181e; }
.bop-slot-name { font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.bop-slot-item { padding: 5px 0; }
.bop-slot-item.alt { border-top: 1px dashed var(--line); opacity: .85; }
.bop-lv a { padding: 2px 8px; }
.bop-pick { padding: 14px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }
.bop-model { margin-top: 18px; }
.dq-details { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 6px; }
.dq-details > summary { list-style: none; cursor: pointer; }
.dq-details > summary::-webkit-details-marker { display: none; }
.dq-details > summary h2 { display: inline; }
.dq-details > summary h2::before { content: '▸ '; color: var(--gold); }
.dq-details[open] > summary h2::before { content: '▾ '; }
