/* EFT Tracker – styled after the in-game menus (dark default, light variant) */
:root {
  --bg: #0b0c0d; --bg2: #121315; --panel: #16171a; --panel2: #1f2124; --line: #2c2f33; --line2: #484c51;
  --text: #cfcdc3; --muted: #8b8980; --head: #efeee8;
  --accent: #bfae7c; --accent2: #8f8260; --accent-ink: #111111;
  --ok: #86a95f; --ok-bg: rgba(134,169,95,.14); --warn: #d2a543; --bad: #c4553f; --bad-bg: rgba(196,85,63,.14);
  --kappa: #b58ad6; --event: #e07b39; --season: #4fa3a5; --lk: #6fa8dc; --side: #7d93ab; --side-ink: #a3afbb;
  /* in-game task list */
  --row: #43341f; --row-h: #51402a; --row-ink: #ecebe6; --row-done: #26321f; --row-lock: #1b1c1e; --row-lock-ink: #86857f;
  --sel-bg: #e4e3de; --sel-ink: #0d0d0d; --gh-bg: #0d0d0e; --gh-ink: #f1f0ec; --gh-line: #6a6b6c;
  --bar: #3b3d3c; --bar-ink: #eeeeea; --box: #2b2d30; --box-line: #595c60;
  --shadow: 0 10px 30px rgba(0,0,0,.5);
  --radius: 0px;
  --font: 'Barlow', system-ui, sans-serif; --font-h: 'Rajdhani', 'Barlow Condensed', 'Arial Narrow', sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #e7e5df; --bg2: #dedcd5; --panel: #f4f3ef; --panel2: #ebe9e3; --line: #cbc8bf; --line2: #aeaba1;
    --text: #25241f; --muted: #6a675d; --head: #16150f;
    --accent: #7d6a33; --accent2: #9b8750; --accent-ink: #fbf8ef;
    --ok: #4d7a2a; --ok-bg: rgba(77,122,42,.12); --warn: #9a6f0a; --bad: #a83a25; --bad-bg: rgba(168,58,37,.1);
    --kappa: #7a4ea3; --event: #b5561a; --season: #2c7c7e; --lk: #336f9e; --side: #557392; --side-ink: #556170;
    --row: #d6c5a4; --row-h: #cdb994; --row-ink: #1e1b14; --row-done: #c8d7ba; --row-lock: #dddbd4; --row-lock-ink: #7b786e;
    --sel-bg: #1d1e20; --sel-ink: #f3f2ee; --gh-bg: #232426; --gh-ink: #f1f0ec; --gh-line: #6a6b6c;
    --bar: #d0cec6; --bar-ink: #1b1a16; --box: #e4e2db; --box-line: #a9a69c;
    --shadow: 0 10px 28px rgba(40,35,20,.18);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #e7e5df; --bg2: #dedcd5; --panel: #f4f3ef; --panel2: #ebe9e3; --line: #cbc8bf; --line2: #aeaba1;
  --text: #25241f; --muted: #6a675d; --head: #16150f;
  --accent: #7d6a33; --accent2: #9b8750; --accent-ink: #fbf8ef;
  --ok: #4d7a2a; --ok-bg: rgba(77,122,42,.12); --warn: #9a6f0a; --bad: #a83a25; --bad-bg: rgba(168,58,37,.1);
  --kappa: #7a4ea3; --event: #b5561a; --season: #2c7c7e; --lk: #336f9e; --side: #557392; --side-ink: #556170;
  --row: #d6c5a4; --row-h: #cdb994; --row-ink: #1e1b14; --row-done: #c8d7ba; --row-lock: #dddbd4; --row-lock-ink: #7b786e;
  --sel-bg: #1d1e20; --sel-ink: #f3f2ee; --gh-bg: #232426; --gh-ink: #f1f0ec; --gh-line: #6a6b6c;
  --bar: #d0cec6; --bar-ink: #1b1a16; --box: #e4e2db; --box-line: #a9a69c;
  --shadow: 0 10px 28px rgba(40,35,20,.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); min-height: 100vh; overflow-x: hidden;
  background-image: radial-gradient(1400px 700px at 50% -15%, color-mix(in srgb, var(--head) 5%, transparent), transparent 70%), repeating-linear-gradient(0deg, color-mix(in srgb, var(--head) 1.4%, transparent) 0 1px, transparent 1px 3px); background-attachment: fixed; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-h); color: var(--head); letter-spacing: .03em; margin: 0; font-weight: 700; }
h1 { font-size: 32px; text-transform: uppercase; }
h2 { font-size: 21px; text-transform: uppercase; }
h3 { font-size: 17px; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
button { font: inherit; color: inherit; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
img { max-width: 100%; }
.noimg { display: inline-block; background: var(--panel2); border: 1px dashed var(--line); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; padding: 8px 16px; flex-wrap: wrap; padding-right: 110px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-h); font-weight: 700; font-size: 20px; color: var(--head); text-transform: uppercase; letter-spacing: .06em; }
.brand-ic { width: 22px; height: 22px; color: var(--accent); fill: color-mix(in srgb, var(--accent) 30%, transparent); }
.hdr-ctrls { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.lvl { display: flex; align-items: center; gap: 6px; font-family: var(--font-h); text-transform: uppercase; color: var(--muted); }
.lvl input { width: 56px; }
input[type=number], input[type=search], select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; font: inherit; min-height: 34px; }
select { cursor: pointer; }
.tabs { display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; scrollbar-width: thin; }
.tab { font-family: var(--font-h); text-transform: uppercase; letter-spacing: .05em; font-size: 16px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 9px 14px 8px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--head); border-bottom-color: var(--accent); background: linear-gradient(to top, color-mix(in srgb, var(--accent) 12%, transparent), transparent); }
.tab-n { font-size: 12px; color: var(--accent); margin-left: 4px; }

/* segmented + buttons */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex-wrap: wrap; }
.seg.multi { border: 0; gap: 6px; }
.seg-b { background: var(--panel); border: 0; border-right: 1px solid var(--line); padding: 6px 12px; cursor: pointer; font-family: var(--font-h); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; min-height: 34px; }
.seg.multi .seg-b { border: 1px solid var(--line); border-radius: var(--radius); }
.seg-b:last-child { border-right: 0; }
.seg.multi .seg-b:last-child { border-right: 1px solid var(--line); }
.seg-b.on { background: var(--accent); color: var(--accent-ink); }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line2); color: var(--text); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; font-family: var(--font-h); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; text-decoration: none; min-height: 34px; }
.btn:hover { border-color: var(--accent); }
.btn-p { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-d.btn-p { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-d { color: var(--bad); }
.btn-s { padding: 3px 8px; min-height: 26px; font-size: 13px; }
.btn.more { display: flex; margin: 14px auto; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; font-size: inherit; }
.ibtn { display: inline-grid; place-items: center; width: 34px; height: 34px; background: transparent; border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; color: var(--muted); flex: none; }
.ibtn:hover { color: var(--head); border-color: var(--line); background: var(--panel2); }
.ibtn .ic { width: 18px; height: 18px; }
.chev .ic { transition: transform .15s; }
.chev.rot .ic { transform: rotate(90deg); }
.tog { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.tog input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- layout ---------- */
.main { max-width: 1320px; margin: 0 auto; padding: 18px 16px 60px; outline: none; }
.tab-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.lede { margin: 4px 0 0; color: var(--muted); max-width: 720px; }
.head-stat { display: grid; gap: 6px; min-width: min(360px, 100%); }
.th-with-img { display: flex; align-items: center; gap: 14px; }
.kappa-img { width: 64px; height: 64px; object-fit: contain; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.panel-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid12 { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 16px; }
@media (max-width: 800px) { .grid2, .grid12 { grid-template-columns: 1fr; } }
.chips.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tr-ic, .qc-tr, .tt-tr, .tt-big, .ll-ic, .info-tr, .mp-tr { object-fit: cover; object-position: 50% 12%; }
.sub-h { font-family: var(--font-h); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 600; font-size: 14px; margin: 12px 0 6px; }
.count-line { color: var(--muted); font-size: 13px; margin: 6px 0; }
.empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--panel); border: 1px solid var(--warn); border-left-width: 4px; padding: 10px 14px; margin-bottom: 16px; border-radius: var(--radius); }
.foot { max-width: 1320px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
ul.plain { margin: 0; padding-left: 18px; }
ul.plain li { margin: 2px 0; }
blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--accent2); color: var(--muted); font-style: italic; background: var(--panel2); }
details summary { cursor: pointer; color: var(--accent); font-family: var(--font-h); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; margin: 6px 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
.tbl th { font-family: var(--font-h); text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tbl tr.cur td { background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* progress */
.pbar { position: relative; height: 22px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pbar-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent2), var(--accent)); opacity: .55; }
.pbar-txt { position: relative; z-index: 1; font-size: 12px; font-weight: 600; padding: 0 8px; line-height: 20px; white-space: nowrap; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.search { position: relative; display: flex; align-items: center; flex: 1 1 220px; }
.search .ic { position: absolute; left: 9px; color: var(--muted); }
.search input { width: 100%; padding-left: 30px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-h); text-transform: uppercase; letter-spacing: .04em; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 2px; border: 1px solid currentColor; line-height: 16px; white-space: nowrap; }
.badge .ic { width: 12px; height: 12px; }
.b-done { color: var(--ok); } .b-av { color: var(--warn); } .b-lock { color: var(--muted); }
.b-kappa { color: var(--kappa); } .b-kappa-sub { color: var(--kappa); opacity: .7; border-style: dashed; }
.b-event { color: var(--event); } .b-active { color: var(--ok); border-style: double; } .b-season { color: var(--season); } .b-lk { color: var(--lk); }
.b-fac, .b-ed, .b-choice, .b-muted { color: var(--muted); } .b-req { color: var(--accent); }
.fir { display: inline-block; font-family: var(--font-h); font-weight: 700; font-size: 11px; letter-spacing: .04em; color: var(--bad); border: 1px solid var(--bad); padding: 0 4px; border-radius: 2px; line-height: 15px; vertical-align: 1px; }
.c-red, .c-red a { color: var(--bad); } .c-green { color: var(--ok); } .c-orange { color: var(--warn); }

/* ---------- quest cards ---------- */
.qlist { display: grid; gap: 6px; }
.qcard, .chcard { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line2); border-radius: var(--radius); }
.qcard.qs-available { border-left-color: var(--warn); }
.qcard.qs-done, .chcard.is-done { border-left-color: var(--ok); opacity: .78; }
.qcard.qs-locked { border-left-color: var(--line); }
.qcard.qs-blocked { opacity: .5; border-left-style: dotted; }
.qcard.open, .chcard.open { opacity: 1; }
.qc-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.qc-main { flex: 1; min-width: 0; cursor: pointer; }
.qc-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; font-size: 16px; }
.qc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13px; margin-top: 2px; align-items: center; }
.qc-tr, .ch-ic { width: 36px; height: 36px; object-fit: cover; border-radius: 2px; border: 1px solid var(--line); flex: none; background: var(--panel2); }
.qc-body { padding: 4px 14px 14px 56px; border-top: 1px solid var(--line); }
.leads { font-size: 13px; color: var(--muted); margin-top: 8px; }
.ql { cursor: pointer; border-bottom: 1px dotted var(--line2); }
.ql:hover { color: var(--head); border-bottom-color: var(--accent); }
.ql-done { color: var(--ok); }
.ql-locked { color: var(--muted); }
a.wl { cursor: pointer; color: var(--accent); text-decoration: none; border-bottom: 1px dotted color-mix(in srgb, var(--accent) 50%, transparent); }
a.wl:hover { border-bottom-style: solid; }

/* checkbox button */
.cb { width: 28px; height: 28px; flex: none; display: grid; place-items: center; background: var(--bg2); border: 1px solid var(--line2); border-radius: 2px; cursor: pointer; color: transparent; }
.cb:hover { border-color: var(--accent); color: color-mix(in srgb, var(--accent) 45%, transparent); }
.cb.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.cb .ic { width: 18px; height: 18px; stroke-width: 3; }
.cb-s { width: 22px; height: 22px; }
.cb-s .ic { width: 14px; height: 14px; }

/* objectives */
.objs { list-style: none; margin: 8px 0 0; padding: 0; }
.obj { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.obj.d2 { margin-left: 28px; } .obj.d3 { margin-left: 56px; }
.obj.is-done .obj-t { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.obj.opt .obj-t { color: var(--muted); }
.obj-t { flex: 1; min-width: 0; }
.opt-tag { font-family: var(--font-h); font-size: 11px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line2); border-radius: 2px; padding: 0 4px; margin-right: 6px; }
.obj-cond { margin: 10px 0 4px; font-weight: 600; color: var(--warn); font-size: 14px; }
.obj-sec { margin: 14px 0 6px; padding-top: 8px; border-top: 1px solid var(--line); font-family: var(--font-h); text-transform: uppercase; color: var(--head); letter-spacing: .03em; }
.obj-sec img { display: none; }
.obj-note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.mchip { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 2px; padding: 0 6px; cursor: pointer; color: var(--muted); vertical-align: 1px; }
.mchip:hover { color: var(--head); border-color: var(--accent); }
.mchip .ic { width: 12px; height: 12px; }
.seasonal-box, .seasonal-note { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--season); background: color-mix(in srgb, var(--season) 12%, transparent); border-radius: var(--radius); padding: 8px 10px; margin: 8px 0; font-size: 14px; }
.seasonal-note { padding: 4px 8px; margin: 4px 0; font-size: 13px; }
.seasonal-inline { color: var(--season); }
.rew ul { margin: 4px 0; padding-left: 20px; font-size: 14px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.mini { display: inline-flex; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 3px 6px 3px 3px; font-size: 14px; }
.chip-s { padding: 1px 5px 1px 1px; font-size: 12px; gap: 4px; }
.chip-img { width: 34px; height: 34px; object-fit: contain; background: color-mix(in srgb, var(--bg) 60%, #000 10%); border-radius: 2px; }
.chip-s .chip-img { width: 22px; height: 22px; }
.chip-name { cursor: pointer; }
.chip-name:hover { color: var(--head); text-decoration: underline; }
.ic-count { font-weight: 700; color: var(--head); font-variant-numeric: tabular-nums; }
.chip-done { border-color: var(--ok); background: var(--ok-bg); }
.chip-opt { border-style: dashed; opacity: .8; }
.chip-opt::after { content: 'optional'; font-size: 10px; text-transform: uppercase; color: var(--muted); }
.ctr { display: inline-flex; gap: 2px; }
.ctr-b { width: 24px; height: 24px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 2px; cursor: pointer; color: var(--text); padding: 0; }
.ctr-b:hover { border-color: var(--accent); }
.ctr-b .ic { width: 14px; height: 14px; }
.ctr-v { min-width: 26px; text-align: center; font-weight: 700; line-height: 24px; }

/* story */
.endings { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.ending { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-family: var(--font-h); font-size: 18px; text-transform: uppercase; font-weight: 600; letter-spacing: .04em; }
.ending.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--head); }
.ending-ic { width: 40px; height: 40px; object-fit: contain; }
.choices { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 10px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.choice { display: inline-flex; align-items: center; gap: 6px; }
.choice .seg-b { min-height: 28px; padding: 3px 10px; font-size: 13px; }
.ending-card { background: var(--panel); border: 1px solid var(--line); padding: 10px 14px; margin-bottom: 16px; border-radius: var(--radius); }
.ending-quote { color: var(--muted); font-style: italic; }
.chapters { display: grid; gap: 8px; }
.chcard.ch-opt { border-left-style: dashed; }
.ch-name { font-family: var(--font-h); font-size: 20px; text-transform: uppercase; letter-spacing: .03em; }

/* traders */
.trader-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.trader-tab { display: grid; justify-items: center; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; cursor: pointer; min-width: 84px; }
.trader-tab.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.tt-big { width: 56px; height: 56px; object-fit: cover; border-radius: 2px; }
.tn { font-family: var(--font-h); font-weight: 600; text-transform: uppercase; font-size: 14px; }
.tp { font-size: 12px; color: var(--muted); }
.trader-hero { display: flex; gap: 16px; align-items: flex-start; }
.trader-portrait { width: 160px; max-height: 220px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); }
.trader-info { flex: 1; display: grid; gap: 8px; }
@media (max-width: 640px) { .trader-hero { flex-direction: column; } .trader-portrait { width: 120px; } }
.ll-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ll-pill { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 2px; padding: 2px 6px 2px 2px; font-weight: 600; font-size: 13px; color: var(--muted); }
.ll-pill.ok { color: var(--ok); border-color: var(--ok); }
.ll-ic, .tr-ic { width: 22px; height: 22px; object-fit: cover; border-radius: 2px; }

/* hideout */
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.hcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; align-content: start; }
.hcard.maxed { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.hc-head { display: flex; gap: 10px; align-items: center; }
.h-ic { width: 48px; height: 48px; object-fit: contain; }
.hc-title { flex: 1; display: grid; gap: 4px; }
.hc-title b { font-family: var(--font-h); font-size: 18px; text-transform: uppercase; color: var(--head); letter-spacing: .03em; }
.pips { display: flex; gap: 3px; flex-wrap: wrap; }
.pip, .pip0 { width: 28px; height: 24px; border: 1px solid var(--line2); background: var(--bg2); border-radius: 2px; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); padding: 0; }
.pip.on { background: var(--ok); color: #fff; border-color: var(--ok); }
.pip0 { width: 22px; }
.pip0.on { background: var(--panel2); color: var(--head); border-color: var(--accent); }
.hl { border-top: 1px solid var(--line); padding-top: 6px; }
.hl-next { border-top: 0; padding-top: 0; }
.hl.built { opacity: .6; }
.hl-h { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.hreq { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.hreq li.ok { color: var(--ok); } .hreq li.no { color: var(--bad); } .hreq li.na { color: var(--muted); }
.hreq .ic { width: 13px; height: 13px; }
.maxed-note { color: var(--ok); font-weight: 600; }

/* prestige */
.plist { display: grid; gap: 12px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.pcard.is-done { border-color: var(--ok); }
.pc-head { display: flex; align-items: center; gap: 12px; }
.pc-head > div { flex: 1; }
.p-ic { width: 56px; height: 56px; object-fit: contain; }
.conds { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.conds li { display: flex; gap: 8px; align-items: center; }
.conds li.ok { color: var(--ok); } .conds li.no { color: var(--text); }
.conds .st { width: 22px; display: grid; place-items: center; }
.conds li.no .st { color: var(--bad); }

/* battlepass */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.doc { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.doc-ic { width: 42px; height: 42px; object-fit: contain; }
.doc-t { flex: 1; min-width: 0; }
.bp-page h2 { margin: 18px 0 8px; }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.bp-lv { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 8px; cursor: pointer; }
.bp-lv:hover { border-color: var(--accent); }
.bp-lv.on { border-color: var(--ok); background: var(--ok-bg); }
.bp-n { position: absolute; top: 4px; left: 6px; font-family: var(--font-h); font-weight: 700; color: var(--muted); }
.bp-ic { width: 72px; height: 72px; object-fit: contain; }
.bp-name { font-weight: 600; font-size: 14px; }
.bp-price { font-size: 12px; color: var(--accent); font-weight: 600; }
.bp-check { position: absolute; top: 4px; right: 6px; color: var(--ok); }

/* achievements */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.acard { display: flex; gap: 10px; text-align: left; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line2); border-radius: var(--radius); padding: 8px; cursor: pointer; }
.acard.r-rare { border-left-color: #4a86c5; } .acard.r-leg { border-left-color: var(--kappa); }
.acard.on { background: var(--ok-bg); border-color: var(--ok); }
.a-ic { width: 60px; height: 60px; object-fit: contain; flex: none; }
.acard:not(.on) .a-ic { filter: grayscale(.8) brightness(.8); }
.a-body { flex: 1; display: grid; gap: 2px; }
.a-name { font-weight: 700; color: var(--head); }
.a-desc { font-size: 13px; }
.a-check { color: transparent; }
.acard.on .a-check { color: var(--ok); }
.rar { font-weight: 600; }

/* items */
.ilist { display: grid; gap: 4px; }
.irow { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; }
.i-ic { width: 48px; height: 48px; object-fit: contain; background: var(--bg2); border-radius: 2px; flex: none; }
.i-main { flex: 1; min-width: 0; }
.i-name { font-weight: 600; }
.i-src { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted); }
.i-num { display: grid; justify-items: end; gap: 2px; font-size: 20px; font-family: var(--font-h); color: var(--head); }
.stat { color: var(--muted); }
.stat b { color: var(--head); }

/* tooltip */
.tooltip { position: fixed; z-index: 80; max-width: 420px; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; font-size: 13px; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tooltip.show { opacity: 1; transform: none; }
.tt-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.tt-head > div { flex: 1; }
.tt-title { font-weight: 700; color: var(--head); font-size: 15px; }
.tt-sub { color: var(--muted); }
.tt-tr { width: 34px; height: 34px; object-fit: cover; border-radius: 2px; }
.tt-item { width: 48px; height: 48px; object-fit: contain; }
.tt-sec { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }
.tt-h { font-family: var(--font-h); text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.tt-row { margin: 2px 0; }
.tt-req { display: flex; gap: 6px; align-items: baseline; }
.tt-req > span:first-child { flex: none; }
.t-ok { color: var(--ok); } .t-no { color: var(--bad); }
.t-ok .ic, .t-no .ic { width: 13px; height: 13px; }
.tt-seasonal { border: 1px solid var(--season); padding: 4px 6px; margin-top: 6px; color: var(--season); }
.tt-foot { margin-top: 6px; }
.tooltip a.wl { color: var(--accent); }

/* drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 60; background: var(--panel); border-left: 1px solid var(--line2); box-shadow: var(--shadow); transform: translateX(105%); transition: transform .2s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.drawer-title { flex: 1; display: flex; gap: 10px; align-items: center; font-family: var(--font-h); font-size: 22px; text-transform: uppercase; color: var(--head); font-weight: 600; min-width: 0; }
.drawer-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-ic { width: 36px; height: 36px; object-fit: contain; flex: none; }
.drawer-b { flex: 1; overflow-y: auto; padding: 12px 16px 40px; }
.banner { margin: -12px -16px 10px; }
.banner-img { width: 100%; display: block; max-height: 220px; object-fit: cover; }
.info-meta { display: flex; gap: 10px; align-items: center; }
.info-tr { width: 48px; height: 48px; object-fit: cover; border-radius: 2px; }
.info-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.item-hero { display: flex; gap: 14px; align-items: center; }
.item-big { width: 110px; height: 110px; object-fit: contain; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); }
.loading { color: var(--muted); padding: 10px 0; }
.wiki-html { font-size: 14px; }
.wiki-html img { max-width: 100%; height: auto; border-radius: 2px; }
.wiki-html .gallery, .wiki-html ul.gallery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.wiki-html .gallerybox, .wiki-html li.gallerybox { width: auto !important; }
.wiki-html .gallerybox > div { width: auto !important; }
.wiki-html .thumb, .wiki-html .gallerytext { font-size: 12px; color: var(--muted); }
.wiki-html table { border-collapse: collapse; width: 100%; font-size: 13px; }
.wiki-html th, .wiki-html td { border: 1px solid var(--line); padding: 4px 6px; }
.wiki-html li[style] { display: block !important; }

/* modal */
.modal-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); box-shadow: var(--shadow); width: min(520px, 100%); max-height: 86vh; display: flex; flex-direction: column; }
.modal-h { font-family: var(--font-h); font-size: 22px; text-transform: uppercase; color: var(--head); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-b { padding: 12px 16px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.dep-list { max-height: 240px; overflow: auto; font-size: 14px; }
.set-grid { display: grid; gap: 10px; }
.set-row { display: flex; gap: 8px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); z-index: 95; background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius); padding: 10px 16px; box-shadow: var(--shadow); opacity: 0; transition: .2s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* banner */
.banner-slot { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.banner-ev { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; padding: 8px 10px; background: color-mix(in srgb, var(--event) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--event) 55%, var(--line)); border-radius: var(--radius); }
.banner-ev.season { background: color-mix(in srgb, var(--season) 12%, var(--panel)); border-color: color-mix(in srgb, var(--season) 55%, var(--line)); display: block; }
.ev-img { width: 120px; height: 56px; object-fit: cover; border-radius: 2px; flex: none; }
.ev-main { flex: 1; min-width: 0; }
.ev-main details ul { margin: 4px 0; padding-left: 18px; }
.ev-tag { font-family: var(--font-h); font-weight: 700; text-transform: uppercase; font-size: 12px; background: var(--event); color: #fff; padding: 1px 6px; border-radius: 2px; }
.season .ev-tag { background: var(--season); }
@media (max-width: 600px) { .ev-img { display: none; } }

/* open-quest setup */
.as-bar { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.as-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.as-list { display: grid; gap: 6px; }
.as-g .sub-h { display: flex; align-items: center; gap: 6px; }
.as-row { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 2px; cursor: pointer; font-size: 14px; }
.as-row:hover { background: var(--bg2); }
.as-row.on { background: var(--ok-bg); }
.as-row.is-done { opacity: .5; }
.as-row input { accent-color: var(--ok); width: 16px; height: 16px; }

/* speedrun */
.raids { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: none; }
.raid { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 10px 12px; }
.raid-h { display: flex; align-items: center; gap: 12px; }
.raid-n { display: grid; place-items: center; width: 36px; height: 36px; flex: none; background: var(--accent); color: var(--accent-ink); font-family: var(--font-h); font-weight: 700; font-size: 20px; border-radius: 2px; }
.raid-t { flex: 1; min-width: 0; }
.raid-t h2 { font-size: 22px; }
.raid-bring { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0 48px; }
.raid-b { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin: 8px 0 0 48px; }
.raid-q { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; }
.raid-q.tour-q { border-color: var(--accent2); }
.raid-qh { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.raid-qh .ibtn { margin-left: auto; width: 26px; height: 26px; }
.raid-q .objs { margin-top: 4px; }
.raid-after { margin: 8px 0 0 48px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
@media (max-width: 600px) { .raid-bring, .raid-b, .raid-after { margin-left: 0; } }

/* season perks */
.perk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--season) 40%, var(--line)); }
.perk-lbl { font-family: var(--font-h); text-transform: uppercase; font-weight: 700; font-size: 13px; color: var(--season); }
.perk-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; border: 1px solid var(--line); border-radius: 2px; padding: 1px 6px 1px 2px; background: var(--panel); }
.perk-chip.positive { border-color: var(--ok); } .perk-chip.negative { border-color: var(--bad); }
.perk-ic { width: 22px; height: 22px; object-fit: contain; }
.perk-list { display: grid; gap: 6px; }
.perk { display: flex; gap: 10px; align-items: flex-start; padding: 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.perk.on { border-color: var(--season); background: color-mix(in srgb, var(--season) 10%, var(--bg2)); }
.perk input { accent-color: var(--season); width: 18px; height: 18px; margin-top: 4px; flex: none; }
.perk-cb.fixed { color: var(--season); margin-top: 4px; }
.perk-big { width: 44px; height: 44px; object-fit: contain; flex: none; }
.perk-b { display: grid; gap: 2px; }
.perk-pts { font-weight: 700; font-size: 13px; }
.perk-pts.neg { color: var(--bad); } .perk-pts.pos { color: var(--ok); }
.perk-eff { color: var(--season); }
.perk-eff .ic { width: 12px; height: 12px; }
.perk-sum { padding: 8px 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; }
.perk-notice { border-color: var(--season); }
.rw { display: inline-flex; align-items: center; gap: 6px; }

/* map panel */
.mappanel { position: fixed; top: 8px; right: 12px; z-index: 50; }
.mappanel:not(.collapsed) { top: 96px; }
.mp-toggle { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius); padding: 8px 12px; cursor: pointer; font-family: var(--font-h); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; box-shadow: var(--shadow); }
.mappanel:not(.collapsed) .mp-toggle { display: none; }
.mappanel.collapsed .mp-box { display: none; }
.mp-box { width: min(760px, calc(100vw - 24px)); height: min(540px, calc(100vh - 110px)); background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.mappanel.big { top: 8px; }
.mappanel.big .mp-box { width: calc(100vw - 24px); height: calc(100vh - 16px); }
.mp-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mp-status { flex: 1; min-width: 0; }
.mp-body { flex: 1; display: grid; grid-template-columns: 1fr 260px; min-height: 0; }
.mp-map, .mp-map.leaflet-container { min-height: 0; background: #1c1d19; }
.mp-list { overflow-y: auto; border-left: 1px solid var(--line); padding: 8px; font-size: 13px; }
@media (max-width: 700px) { .mp-body { grid-template-columns: 1fr; grid-template-rows: 1fr 40%; } .mp-list { border-left: 0; border-top: 1px solid var(--line); } }
.mp-lh { margin-bottom: 6px; color: var(--muted); }
.mp-q { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; margin-bottom: 6px; background: var(--bg2); }
.mp-q.focus { border-color: var(--accent); }
.mp-qh { display: flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.mp-qh .ql { flex: 1; }
.mp-tr { width: 22px; height: 22px; object-fit: cover; border-radius: 2px; }
.mp-pin { color: var(--accent); }
.mp-q ul { margin: 4px 0; padding-left: 16px; }
.mp-foot { padding: 4px 8px; border-top: 1px solid var(--line); }
.mk span { display: block; width: 100%; height: 100%; }
.mk-obj span { background: #c9a227; border: 2px solid #1a1a14; border-radius: 50%; box-shadow: 0 0 0 2px rgba(201,162,39,.35); }
.mk-item { display: grid; place-items: center; }
.mk-item img { width: 26px; height: 26px; object-fit: contain; background: rgba(20,20,16,.85); border: 2px solid #c9a227; border-radius: 3px; }
.mk-item span { background: #d06b3a; border: 2px solid #1a1a14; border-radius: 3px; }
.mk-focus span, .mk-focus img { box-shadow: 0 0 0 3px #f2c14e, 0 0 12px #f2c14e; }
.mk-ex span { display: inline-block; white-space: nowrap; font-size: 11px; font-weight: 700; color: #e9ffe0; background: rgba(40,90,30,.85); border: 1px solid #7fa35a; padding: 0 4px; border-radius: 2px; transform: translate(-50%, -50%); }
.mk-shared span { background: rgba(80,70,20,.85); border-color: #c9a227; }
.mk-loot span { background: #4fa3a5; border: 2px solid #10201f; border-radius: 50%; }
.mk-lock span { display: grid; place-items: center; color: #e6d3ff; background: rgba(20,20,16,.85); border: 2px solid #b58ad6; border-radius: 4px; }
.leaflet-container { background: #1c1d19; font: inherit; }
.leaflet-popup-content { font-size: 13px; }

/* boot / refresh */
.boot { max-width: 520px; margin: 80px auto; display: grid; gap: 12px; text-align: center; }
.boot-t { font-family: var(--font-h); font-size: 22px; text-transform: uppercase; color: var(--head); }
.rb { height: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.rb-f { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.refresh-bar { position: fixed; left: 16px; bottom: 16px; z-index: 70; width: 320px; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); padding: 8px 10px; box-shadow: var(--shadow); display: grid; gap: 6px; font-size: 13px; }

@media (max-width: 720px) {
  .top-row { padding-right: 16px; }
  .mappanel { top: auto; bottom: 12px; right: 12px; }
  .mappanel:not(.collapsed) { top: 8px; left: 8px; right: 8px; bottom: 8px; }
  .mappanel:not(.collapsed) .mp-box { width: 100%; height: 100%; }
  .qc-body { padding-left: 12px; }
  .hgrid, .agrid { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .hdr-ctrls { margin-left: 0; }
}
@media (max-width: 600px) {
  .qc-head { gap: 6px; padding: 6px 8px; }
  .qc-head > .badge { display: none; }
  .qc-tr, .ch-ic { width: 28px; height: 28px; }
  .qc-meta .chips.mini { display: none; }
  .qc-title { font-size: 15px; }
  .ibtn { width: 30px; height: 30px; }
  .filters select { flex: 1 1 140px; }
  .tab { padding: 8px 10px 7px; font-size: 15px; }
  .brand span { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- loot (speedrun, map panel, item info) ---------- */
.raid-loot { margin: 8px 0 0 48px; padding: 6px 8px; background: var(--bg2); border: 1px dashed var(--line2); border-radius: var(--radius); }
.raid-lh { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.raid-lh .ic { width: 16px; height: 16px; color: var(--accent); flex: none; }
.raid-loot .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.raid-more summary { font-size: 12px; margin: 4px 0; }
.lchip { border-left-width: 3px; }
.lchip.lp3, .lp-row.lp3, .ml-row.lp3 { border-left-color: var(--accent); }
.lchip.lp2, .lp-row.lp2, .ml-row.lp2 { border-left-color: var(--accent2); }
.lchip .ibtn-s, .ibtn-s { width: 22px; height: 22px; }
.lchip .ibtn-s .ic { width: 14px; height: 14px; }
.lbest { display: inline-grid; color: var(--accent); }
.lbest .ic { width: 13px; height: 13px; fill: currentColor; }
.lplan { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 6px; }
.lp-row { display: flex; gap: 8px; align-items: flex-start; background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: var(--radius); padding: 6px 8px; }
.lp-row .i-ic { width: 38px; height: 38px; object-fit: contain; flex: none; }
.lp-main { min-width: 0; display: grid; gap: 2px; }
.c-acc { color: var(--accent); }
@media (max-width: 600px) { .raid-loot { margin-left: 0; } .lplan { grid-template-columns: 1fr; } }

.mp-tabs { display: flex; gap: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.mp-tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 6px 10px; cursor: pointer; font-family: var(--font-h); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.mp-tab .ic { width: 15px; height: 15px; }
.mp-tab.on { color: var(--head); border-bottom-color: var(--accent); }
.ml-conts { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.ml-c { cursor: pointer; color: var(--text); padding: 2px 6px; }
.ml-c.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--bg2)); }
.ml-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.search-s { flex: 1 1 140px; }
.search-s input { min-height: 30px; padding-top: 3px; padding-bottom: 3px; }
.seg-s .seg-b { min-height: 28px; padding: 3px 8px; font-size: 12px; }
.ml-list { display: grid; gap: 3px; }
.ml-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: var(--radius); background: var(--bg2); cursor: pointer; }
.ml-row:hover { border-color: var(--line2); }
.ml-row.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg2)); }
.ml-ic { width: 32px; height: 32px; object-fit: contain; flex: none; }
.ml-main { flex: 1; min-width: 0; }
.ml-n { font-weight: 600; overflow-wrap: anywhere; }
.ml-need { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 2px; padding: 0 4px; white-space: nowrap; }
.ml-v { white-space: nowrap; text-align: right; }
.mk-loot.mk-hl span { background: #f2c14e; border-color: #2a1f05; box-shadow: 0 0 0 2px rgba(242, 193, 78, .35); }
.sp-t { width: 100%; border-collapse: collapse; }
.sp-t td { border-bottom: 1px solid var(--line); padding: 4px 6px; vertical-align: middle; }
.sp-t td:last-child { text-align: right; white-space: nowrap; }
.mp-box.loot .mp-body { grid-template-columns: 1fr 360px; }
@media (max-width: 700px) { .mp-box.loot .mp-body { grid-template-columns: 1fr; } }
.raid-done { opacity: .6; border-left-color: var(--ok); }
.raid-done .raid-n { background: var(--ok); }
.sr-stale { border-color: var(--accent); }
.as-steps { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; }
.as-lvl { width: 64px; min-height: 28px; padding: 2px 6px; }
.as-gh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.as-ll { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; text-transform: none; letter-spacing: 0; font-family: var(--font); }
.as-llb { min-width: 24px; height: 24px; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 2px; cursor: pointer; font-weight: 600; }
.as-llb.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* =====================================================================
   In-game menu look – overrides + task screen
   ===================================================================== */
/* header like the game's top menu */
.top { background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 70%, #000), color-mix(in srgb, var(--bg) 94%, transparent)); border-bottom: 1px solid var(--gh-line); }
.brand { font-size: 22px; letter-spacing: .12em; }
.brand-ic { color: var(--head); fill: none; }
.tabs { gap: 4px; padding: 6px 12px 8px; }
.tab { font-size: 15px; font-weight: 700; letter-spacing: .05em; padding: 6px 11px 5px; color: var(--muted); background: color-mix(in srgb, var(--panel) 85%, transparent); border: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tab:hover { color: var(--head); border-color: var(--line2); background: var(--panel2); }
.tab.on { color: var(--sel-ink); background: var(--sel-bg); border-color: var(--sel-bg); }
.tab.on .tab-n { color: inherit; opacity: .7; }
.seg { border-color: var(--line2); }
.seg-b { font-size: 15px; font-weight: 700; background: var(--panel2); }
.seg-b:hover { color: var(--head); }
.seg-b.on { background: var(--sel-bg); color: var(--sel-ink); }
.btn { font-size: 15px; font-weight: 700; background: var(--panel2); border-color: var(--line2); }
.btn:hover { border-color: var(--head); color: var(--head); }
.btn-p { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.btn-p:hover { color: var(--sel-ink); filter: brightness(1.08); }
.btn.on { border-color: var(--ok); color: var(--ok); }
input[type=number], input[type=search], select { background: var(--bg2); border-color: var(--line2); }
.panel, .filters, .notice, .qcard, .chcard, .hcard, .pcard, .acard, .irow, .raid, .chip, .modal, .drawer, .tooltip, .mp-box, .toast { border-radius: 0; }
.panel-h h2, .raid-t h2 { letter-spacing: .05em; }
.sub-h { font-size: 15px; font-weight: 700; color: var(--head); border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.tab-head h1 { border-left: 4px solid var(--sel-bg); padding-left: 10px; }
.cb { border-radius: 0; border-width: 2px; }
.cb.on { background: var(--ok); border-color: var(--ok); }
.drawer-h { background: var(--gh-bg); border-bottom: 1px solid var(--gh-line); }
.drawer-title { color: var(--gh-ink); font-weight: 700; }
.drawer-h .ibtn { color: var(--gh-ink); }
.modal-h { background: var(--gh-bg); color: var(--gh-ink); border-bottom-color: var(--gh-line); }
.qc-head { min-height: 48px; }
.chcard > .qc-head { background: var(--gh-bg); color: var(--gh-ink); }
.chcard > .qc-head .ch-name { color: var(--gh-ink); }
.chcard > .qc-head .qc-meta { color: #a3a29b; }
.chcard > .qc-head .ibtn { color: var(--gh-ink); }
.chcard.is-done > .qc-head { background: color-mix(in srgb, var(--row-done) 80%, #000); }
.pbar { border-radius: 0; background: var(--bg2); }
.pbar-fill { background: linear-gradient(90deg, color-mix(in srgb, var(--sel-bg) 55%, transparent), color-mix(in srgb, var(--sel-bg) 85%, transparent)); opacity: .45; }
.pbar-txt { font-family: var(--font-h); font-size: 14px; font-weight: 700; letter-spacing: .03em; }
.badge { border-radius: 0; font-size: 13px; }
.hc-title b, .ch-name, .ending, .raid-n, .tn { font-family: var(--font-h); }
.raid-n { background: var(--sel-bg); color: var(--sel-ink); }
.raid { border-left-color: var(--sel-bg); }

/* ---------- trader strip (like the traders screen) ---------- */
.tr-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; scrollbar-width: thin; }
.tr-card { flex: none; width: 100px; padding: 0; background: var(--bg2); border: 1px solid var(--line); color: var(--text); cursor: pointer; text-align: center; }
.tr-card:hover { border-color: var(--line2); }
.tr-card.on { border-color: var(--sel-bg); box-shadow: 0 0 0 1px var(--sel-bg); background: var(--panel2); }
.tr-pic { position: relative; display: block; }
.tr-portrait { display: block; width: 100%; height: 98px; object-fit: cover; object-position: 50% 14%; }
.tr-card.locked .tr-portrait { filter: grayscale(1) brightness(.5); }
.tr-ll { position: absolute; left: 4px; top: 4px; min-width: 24px; height: 22px; padding: 0 4px; display: grid; place-items: center; background: var(--sel-bg); color: var(--sel-ink); font: 700 14px/1 var(--font-h); clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%); }
.tr-lock { position: absolute; inset: 0; display: grid; place-items: center; color: #eee; }
.tr-lock .ic { width: 26px; height: 26px; }
.tr-name { display: block; padding: 4px 4px 0; font: 700 15px/1.1 var(--font-h); text-transform: uppercase; letter-spacing: .04em; color: var(--head); }
.tr-prog { display: block; padding: 0 4px 5px; font-size: 12px; color: var(--muted); }
.tr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 8px 12px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); }
.tr-bar-name { display: grid; line-height: 1.15; }
.tr-bar-name b { font: 700 22px var(--font-h); text-transform: uppercase; letter-spacing: .05em; color: var(--head); }
.tr-bar-prog { flex: 1 1 220px; max-width: 360px; }
.tr-llsel { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-family: var(--font-h); text-transform: uppercase; font-weight: 600; }
.tr-llb { width: 34px; height: 30px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font: 700 15px var(--font-h); cursor: pointer; }
.tr-llb:hover { border-color: var(--head); }
.tr-llb.on { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.tr-notes { flex-basis: 100%; }

/* ---------- task screen ---------- */
.ts { background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); }
.ts-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 8px 12px; background: var(--bar); color: var(--bar-ink); }
.ts-cb { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: 600 17px var(--font-h); white-space: nowrap; }
.ts-cb input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ts-box { width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid var(--bar-ink); color: transparent; flex: none; }
.ts-box .ic { width: 16px; height: 16px; stroke-width: 3; }
.ts-cb input:checked + .ts-box { color: var(--bar-ink); }
.ts-cb input:focus-visible + .ts-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.ts-bar .search-s { flex: 1 1 180px; max-width: 320px; }
.ts-bar select { min-height: 30px; padding: 3px 6px; }
.ts-views { display: inline-flex; gap: 4px; margin-left: auto; }
.ts-vb { width: 36px; height: 32px; display: grid; place-items: center; border: 1px solid transparent; background: color-mix(in srgb, var(--bar-ink) 12%, transparent); color: var(--bar-ink); cursor: pointer; }
.ts-vb.on { background: color-mix(in srgb, var(--bar-ink) 70%, transparent); color: var(--bar); }
.ts-vb .ic { width: 18px; height: 18px; }
.ts-body { display: grid; grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); align-items: start; }
.ts-list, .ts-detail { max-height: calc(100vh - 150px); min-height: 420px; overflow-y: auto; scrollbar-width: thin; }
.ts-list { padding: 0 0 10px; border-right: 1px solid var(--line); }
.ts-grp + .ts-grp { margin-top: 4px; }
.ts-gh { position: sticky; top: 0; z-index: 2; width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--gh-bg); color: var(--gh-ink); border: 0; border-bottom: 1px solid var(--gh-line); cursor: pointer; font: 700 18px var(--font-h); text-transform: uppercase; letter-spacing: .05em; text-align: left; }
.ts-roman .ic { width: 16px; height: 16px; }
.ts-roman { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 3px; background: var(--gh-ink); color: #111; font: 700 15px/1 var(--font-h); clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%); }
.ts-gimg { width: 28px; height: 28px; object-fit: cover; object-position: 50% 12%; }
.ts-gl { flex: 1; min-width: 0; }
.ts-gc { font-size: 14px; color: #a9a8a1; font-weight: 600; letter-spacing: .02em; }
.ts-chev .ic { width: 18px; height: 18px; transform: rotate(-90deg); transition: transform .15s; }
.ts-chev.col .ic { transform: rotate(90deg); }
.ts-rows { display: grid; gap: 6px; padding: 6px 0 2px; }
.ts-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 6px 12px 6px 14px; border: 0; background: var(--row); color: var(--row-ink); cursor: pointer; text-align: left; font: 600 19px/1.15 var(--font-h); letter-spacing: .01em; }
.ts-row:hover { background: var(--row-h); }
.ts-row:focus-visible { outline: 2px solid var(--sel-bg); outline-offset: -2px; }
.ts-row.st-done { background: var(--row-done); }
.ts-row.st-locked, .ts-row.st-blocked { background: var(--row-lock); color: var(--row-lock-ink); }
.ts-row.st-blocked .ts-name { text-decoration: line-through; }
.ts-row.sel, .ts-row.sel:hover { background: var(--sel-bg); color: var(--sel-ink); }
.ts-ti { display: grid; place-items: center; width: 28px; flex: none; }
.ts-ti .tt-ic, .ts-ti .ic { width: 28px; height: 28px; }
.ts-ti .ic { width: 22px; height: 22px; }
.ts-name { flex: 1; min-width: 0; }
.ts-k { font: 700 11px/16px var(--font-h); padding: 0 4px; color: var(--kappa); border: 1px solid currentColor; }
.ts-row.sel .ts-k { color: #6c3f98; }
.ts-tag { font: 700 12px/16px var(--font-h); padding: 0 5px; background: var(--ok); color: #0c1208; text-transform: uppercase; letter-spacing: .04em; }
.ts-hint { font: 600 13px var(--font-h); opacity: .75; white-space: nowrap; }
.ts-go { display: grid; opacity: 0; }
.ts-go .ic { width: 20px; height: 20px; stroke-width: 2.6; }
.ts-row.sel .ts-go { opacity: 1; }
.ts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 6px; }
.ts-tile { padding: 0; border: 2px solid transparent; background: var(--row); color: var(--row-ink); cursor: pointer; text-align: left; display: grid; }
.ts-tile.st-done { background: var(--row-done); }
.ts-tile.st-locked, .ts-tile.st-blocked { background: var(--row-lock); color: var(--row-lock-ink); }
.ts-tile.st-locked .ts-timg { filter: grayscale(1) brightness(.5); }
.ts-tile.sel { border-color: var(--sel-bg); }
.ts-timg { display: block; width: 100%; height: 84px; object-fit: cover; }
.ts-tname { display: flex; align-items: center; gap: 6px; padding: 4px 6px 6px; font: 600 15px/1.1 var(--font-h); }
.ts-tname .tt-ic, .ts-tname .ic { width: 18px; height: 18px; flex: none; }
.ts-empty { padding: 30px 16px; color: var(--muted); text-align: center; }

/* detail pane */
.ts-detail { background: color-mix(in srgb, var(--bg2) 80%, transparent); }
.td-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--gh-bg); color: var(--gh-ink); border-bottom: 1px solid var(--gh-line); }
.td-type .tt-ic { width: 34px; height: 34px; }
.td-ht { flex: 1; min-width: 0; }
.td-ht h2 { color: var(--gh-ink); font-size: 25px; line-height: 1.1; }
.td-sub { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #b3b2ab; flex-wrap: wrap; }
.td-tr { width: 22px; height: 22px; object-fit: cover; object-position: 50% 12%; }
.td-status { font: 700 14px var(--font-h); text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border: 1px solid currentColor; white-space: nowrap; }
.td-status.s-available { color: #e0c48a; } .td-status.s-done { color: #9ccf6b; } .td-status.s-locked, .td-status.s-blocked { color: #9a9993; } .td-status.s-active { color: #9ccf6b; background: rgba(156,207,107,.12); }
.td-img { background: #000; }
.td-banner { display: block; width: 100%; max-height: 250px; object-fit: cover; }
.td.st-locked .td-banner { filter: grayscale(.8) brightness(.7); }
.td-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 4px; }
.td-badges { padding: 4px 14px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.td-badges:empty { display: none; }
.td > .seasonal-box { margin: 8px 14px; }
.td-sec { padding: 0 14px; margin-top: 14px; }
.gs-shots { display: grid; gap: 10px; max-width: 760px; }
.qc-body .gs-shots { margin: 8px 0; }
.gs-shot { margin: 0; }
.gs-shot a { display: block; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; background: #000; }
.gs-img { display: block; width: 100%; height: auto; }
.gs-shot a:hover .gs-img { opacity: .9; }
.gs-shot figcaption { margin-top: 4px; }
.td-sec h3 { display: flex; gap: 8px; align-items: baseline; font-size: 18px; padding-bottom: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--line2); }
.td-sec h3 .muted { font-size: 15px; }
.td-req { display: grid; gap: 4px; background: var(--box); border-left: 3px solid var(--box-line); padding: 8px 10px; }
.td .objs { margin: 0; display: grid; gap: 4px; }
.td .obj { background: var(--box); border-left: 3px solid var(--box-line); padding: 8px 10px; align-items: center; }
.td .obj.is-done { border-left-color: var(--ok); }
.td .obj.is-done .obj-t { text-decoration: none; color: var(--muted); }
.td .obj.d2 { margin-left: 18px; } .td .obj.d3 { margin-left: 36px; }
.td .obj-cond, .td .obj-sec { background: none; border: 0; }
.td .needs .chips { gap: 6px; }
.td-rew { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.td-rew > li { background: var(--box); border-left: 3px solid var(--box-line); padding: 6px 10px; }
.td-rew ul { margin: 2px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.td-next { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 16px; }
.ts-mini { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--row); color: var(--row-ink); border: 0; cursor: pointer; font: 600 16px var(--font-h); }
.ts-mini:hover { background: var(--row-h); }
.ts-mini .tt-ic { width: 18px; height: 18px; }
.td > :last-child { margin-bottom: 18px; }

@media (max-width: 900px) {
  .ts-body { grid-template-columns: 1fr; }
  .ts-list, .ts-detail { max-height: none; min-height: 0; overflow: visible; }
  .ts-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 60vh; overflow-y: auto; }
  .ts-views { margin-left: 0; }
  .td-h { position: static; }
}
@media (max-width: 600px) {
  .ts-row { font-size: 17px; min-height: 46px; }
  .tr-card { width: 84px; } .tr-portrait { height: 84px; }
  .ts-bar { gap: 6px 12px; }
  .ts-cb { font-size: 15px; }
}
.ts-chic { width: 26px; height: 26px; object-fit: contain; filter: brightness(1.4) grayscale(.3); }
.ts-row.sel .ts-chic { filter: invert(1) grayscale(1); }
.td-chic { width: 36px; height: 36px; object-fit: contain; }
.td-sec blockquote { margin: 0; }
.td .obj-sec { font-size: 16px; margin: 10px 0 2px; padding-top: 6px; }
.td .obj-cond { margin: 8px 0 2px; }
@media (max-width: 720px) {
  .top { position: static; }
  .top-row { gap: 8px; }
  .tabs { padding: 4px 8px 6px; }
}
.hist { display: grid; gap: 4px; }
.hist-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--box); border-left: 3px solid var(--box-line); }
.hist-row:first-child { border-left-color: var(--sel-bg); }
.hist-t { font: 600 14px var(--font-h); color: var(--muted); white-space: nowrap; }
.hist-l { flex: 1; min-width: 0; font-size: 14px; }

/* ---------- needed items: icon grid ---------- */
.ig-sec { margin-bottom: 18px; }
.ig-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 19px; padding-bottom: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--line2); }
.ig-h .small { text-transform: none; letter-spacing: 0; font-family: var(--font); font-weight: 400; }
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 4px; }
.ig-t { position: relative; aspect-ratio: 1; padding: 4px; border: 1px solid var(--line2); background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--panel2) 70%, #fff 6%), var(--bg2)); cursor: pointer; display: grid; place-items: center; }
.ig-t:hover { border-color: var(--head); }
.ig-t.p3 { border-color: color-mix(in srgb, var(--accent) 75%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.ig-t.sel { outline: 2px solid var(--sel-bg); outline-offset: 1px; }
.ig-t.got { opacity: .45; }
.ig-t { overflow: hidden; }
.ig-img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; pointer-events: none; }
.ig-n { position: absolute; right: 3px; bottom: 1px; font: 700 17px/1 var(--font-h); color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000, 1px 1px 0 #000; }
.ig-n .ic { width: 18px; height: 18px; color: var(--ok); stroke-width: 3; }
.ig-fir { position: absolute; left: 2px; top: 2px; font: 700 10px/1 var(--font-h); color: #fff; background: var(--bad); padding: 1px 3px; }
.ig-have { position: absolute; left: 3px; bottom: 1px; font: 600 11px/1 var(--font-h); color: #d8d8d0; text-shadow: 0 0 3px #000; }
.ig-act { position: absolute; right: 2px; top: 2px; font: 700 12px/1 var(--font-h); color: #0c1208; background: var(--ok); padding: 1px 4px; }
.irow.p3 { border-left: 3px solid var(--accent); }
.ipop { position: fixed; z-index: 85; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(460px, calc(100vw - 24px)); background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.ipop-h { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--gh-bg); color: var(--gh-ink); border-bottom: 1px solid var(--gh-line); }
.ipop-h .ibtn { color: var(--gh-ink); }
.ipop-img { width: 44px; height: 44px; object-fit: contain; }
.ipop-t { flex: 1; min-width: 0; display: grid; }
.ipop-t b { font: 700 18px var(--font-h); }
.ipop-c { display: flex; align-items: center; gap: 6px; padding: 10px; flex-wrap: wrap; }
.ipop-c input { width: 74px; font: 700 18px var(--font-h); text-align: center; }
.ipop-of { font: 700 18px var(--font-h); color: var(--muted); }
.ipop-s { padding: 0 10px 8px; display: grid; gap: 2px; max-height: 160px; overflow-y: auto; }
.ipop-f { padding: 6px 10px 10px; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .ig-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); } }
.hchk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 4px 12px; }
.hchk-row { display: flex; align-items: center; gap: 8px; padding: 3px 6px; background: var(--box); border-left: 3px solid var(--box-line); }
.hchk-row.max { border-left-color: var(--ok); }
.hchk-ic { width: 28px; height: 28px; object-fit: contain; flex: none; }
.hchk-n { flex: 1; min-width: 0; font: 600 16px var(--font-h); text-transform: uppercase; letter-spacing: .02em; }
.hchk-bx { display: inline-flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.hchk-b { width: 30px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line2); background: var(--bg2); color: var(--muted); font: 700 15px var(--font-h); cursor: pointer; }
.hchk-b:hover { border-color: var(--head); color: var(--head); }
.hchk-b.on { background: var(--ok); border-color: var(--ok); color: #0c1208; }
.hchk-b.on .ic { width: 16px; height: 16px; stroke-width: 3; }
.hchk-b.rdy { border-color: var(--accent); color: var(--accent); }
.mk-bp span { display: grid; place-items: center; width: 100%; height: 100%; font: 700 10px/1 var(--font-h); color: #fff; background: #6a3fa0; border: 1px solid #e3d4ff; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
/* speedrun: storylines */
.c-story { color: #d9534f; }
.raid-story { border-color: #c9433c; border-left-color: #c9433c; box-shadow: 0 0 0 1px #c9433c; }
.b-story { color: #e0615b; }
.raid-q.story-q { border-color: #c9433c; background: color-mix(in srgb, #c9433c 9%, var(--bg2)); display: grid; gap: 6px; align-content: start; }
.raid-q.story-q .btn { justify-self: start; }
.ch-mini { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; }
.sr-story { display: grid; gap: 4px; }
.sr-blocked { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.sr-blocked li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 8px; background: var(--box); border-left: 3px solid #c9433c; }
.sr-si li { border-left-color: #c9a43c; }
.sr-items .chips + .raid-side-h { margin-top: 10px; }
/* ---------- Needed items: all at once ---------- */
.ig-t.p2 { border-color: color-mix(in srgb, #6fa0c8 70%, transparent); }
.ig-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 6px; }
.ig-leg span { display: inline-flex; align-items: center; gap: 5px; }
.ig-leg .lg { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line2); }
.ig-leg .lg.p3 { border-color: var(--accent); }
.ig-leg .lg.p2 { border-color: #6fa0c8; }
.lg-b { font: 700 10px/1 var(--font-h); padding: 1px 3px; color: #fff; }
.lg-b.act { background: var(--ok); color: #0c1208; }
.lg-b.fir { background: var(--bad); }
.lg-b.gs, .ig-gs { background: #8a6424; }
.ig-gs { position: absolute; right: 2px; top: 2px; font: 700 10px/1 var(--font-h); color: #fff; padding: 1px 3px; }
.ig-t.here::after { content: ''; position: absolute; left: 0; bottom: 0; border-left: 11px solid #4fb477; border-top: 11px solid transparent; pointer-events: none; }
.ig-here { display: none; }
.ig-t.here .ig-have { left: 12px; }
.ig-grid.fit { grid-template-columns: repeat(auto-fill, var(--ig-s, 64px)); gap: 3px; justify-content: start; }
.ig-grid.fit .ig-t { width: var(--ig-s, 64px); height: var(--ig-s, 64px); aspect-ratio: auto; padding: 0; }
.ig-grid.fit .ig-img { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
.ig-grid.fit .ig-n { font-size: calc(var(--ig-s, 64px) * .22 + 4px); }
.ig-grid.fit.sm .ig-have { display: none; }
.ig-grid.fit.sm .ig-fir, .ig-grid.fit.sm .ig-act, .ig-grid.fit.sm .ig-gs { font-size: 8px; padding: 0 2px; }
.ig-grid.fit.xs .ig-fir { left: 0; top: 0; width: 0; height: 0; padding: 0; font-size: 0; background: none; border-top: 9px solid var(--bad); border-right: 9px solid transparent; }
.ig-grid.fit.xs .ig-n .ic { width: 12px; height: 12px; }
/* ---------- In-Raid split view ---------- */
body.tab-raid .main { max-width: none; padding: 8px 10px 0; }
body.tab-raid .banner-slot, body.tab-raid .foot, body.tab-raid .mappanel, .mappanel.away { display: none; }
.ir { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 56fr) minmax(0, 44fr); gap: 8px; height: calc(100vh - var(--ir-top, 130px)); min-height: 460px; }
.ir-items { grid-row: 1 / 3; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); padding: 8px; overflow: hidden; }
.ir-items .ig-fitwrap { flex: 1; min-height: 0; overflow: auto; }
.ir-map { min-height: 0; display: flex; }
.ir-map .mp-box { width: 100%; height: 100%; }
.ir-todo { min-height: 0; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); padding: 8px; }
.ir-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; }
.ir-h h2 { margin: 0; font-size: 19px; }
.ir-h .seg-b { padding: 4px 8px; }
.ir-h .seg-b .ic { width: 14px; height: 14px; }
.ir-hl { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 3px 8px; background: color-mix(in srgb, var(--accent) 14%, var(--bg2)); border-left: 3px solid var(--accent); }
.ir-hl .ic { width: 14px; height: 14px; }
.ir-maps { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.ir-maps .chip { cursor: pointer; padding: 3px 6px; color: var(--text); font: inherit; font-size: 13px; }
.ir-maps .chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--bg2)); color: var(--head); }
.ir-maps .chip.story { box-shadow: inset 3px 0 0 #c9433c; }
.ir-todo .raid-bring, .ir-todo .raid-b { margin-left: 0; }
.ir-todo .raid-b { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mp-box.docked { box-shadow: none; }
.mp-box.docked [data-mp="size"], .mp-box.docked [data-mp="toggle"], .mp-box.docked .mp-foot, .mp-box.docked .mp-list { display: none; }
.mp-box.docked .mp-body { grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; }
@media (max-width: 900px) {
  .ir { grid-template-columns: 1fr; grid-template-rows: 55vh auto 75vh; height: auto; }
  .ir-items { grid-row: auto; order: 3; }
  .ir-map { order: 1; }
  .ir-todo { order: 2; overflow: visible; }
}

/* =====================================================================
   Setup assistant
   ===================================================================== */
.wiz-wrap { position: fixed; inset: 0; z-index: 75; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 14px; }
body.wiz-on { overflow: hidden; }
.wiz { background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); width: min(1180px, 100%); height: min(860px, calc(100vh - 28px)); display: flex; flex-direction: column; min-height: 0; }
.wiz-h { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--gh-bg); color: var(--gh-ink); border-bottom: 1px solid var(--gh-line); }
.wiz-h .ibtn { color: var(--gh-ink); }
.wiz-ttl { flex: 1; display: flex; align-items: center; gap: 10px; font: 700 21px var(--font-h); text-transform: uppercase; letter-spacing: .06em; min-width: 0; }
.wiz-ttl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-ttl .ic { width: 22px; height: 22px; }
.wiz-steps { list-style: none; margin: 0; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.wiz-st { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 4px 10px 4px 4px; cursor: pointer; font: 700 14px var(--font-h); text-transform: uppercase; letter-spacing: .04em; min-height: 30px; }
.wiz-st:hover { color: var(--head); border-color: var(--line2); }
.wiz-st.on { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.wiz-st.past { color: var(--text); }
.wiz-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; background: var(--panel2); color: var(--text); font-size: 12px; }
.wiz-st.on .wiz-n { background: var(--sel-ink); color: var(--sel-bg); }
.wiz-st.past .wiz-n { background: var(--ok); color: #fff; }
.wiz-n .ic { width: 12px; height: 12px; }
.wiz-b { flex: 1; overflow-y: auto; padding: 14px 18px 24px; min-height: 0; outline: none; }
.wiz-f { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--bg2); }
.wiz-f .grow, .grow { flex: 1; }
.wiz-h2 { margin: 4px 0 8px; font-size: 22px; }
.wiz-h2 ~ .wiz-h2 { margin-top: 22px; }
.wiz-h3 { font-size: 16px; text-transform: uppercase; margin: 16px 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wiz-b > p, .wiz-b > .small { max-width: 860px; }
.wiz-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; max-width: 860px; }
.wiz-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; text-align: left; padding: 14px; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); cursor: pointer; }
.wiz-card .ic { width: 22px; height: 22px; color: var(--accent); grid-row: span 2; }
.wiz-card b { font: 700 19px var(--font-h); text-transform: uppercase; color: var(--head); letter-spacing: .04em; }
.wiz-card span { grid-column: 2; color: var(--muted); }
.wiz-card:hover { border-color: var(--head); }
.wiz-card.on { border-color: var(--sel-bg); box-shadow: inset 0 0 0 1px var(--sel-bg); background: color-mix(in srgb, var(--sel-bg) 10%, var(--bg2)); }
.wiz-row { display: flex; gap: 30px; flex-wrap: wrap; }
.wiz-lvl { width: 90px; min-height: 34px; font-size: 16px; padding: 4px 8px; }
.wiz-end { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; max-width: 1060px; }
.wiz-end .ending { text-align: left; }
.wiz-end .ending > span { display: grid; gap: 2px; }
.wiz-tag { font: 500 13px var(--font); text-transform: none; letter-spacing: 0; color: var(--muted); }
.wiz-chs { display: grid; gap: 4px; max-width: 900px; }
.wiz-ch { display: flex; align-items: center; gap: 10px; padding: 5px 8px; background: var(--bg2); border: 1px solid var(--line); flex-wrap: wrap; }
.wiz-ch.done { border-left: 4px solid var(--ok); }
.wiz-ch.started { border-left: 4px solid var(--warn); }
.wiz-chic { width: 28px; height: 28px; }
.wiz-chn { flex: 1 1 200px; font: 700 17px var(--font-h); text-transform: uppercase; letter-spacing: .03em; color: var(--head); }
.wiz-ch .seg-b { min-height: 28px; padding: 3px 10px; font-size: 13px; }
.wiz-lls { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px; }
.wiz-ll { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--bg2); border: 1px solid var(--line); }
.wiz-ll b { font: 700 17px var(--font-h); text-transform: uppercase; }
.wiz-tr { width: 34px; height: 34px; object-fit: cover; }
.wiz-ll .as-llb { min-width: 30px; height: 30px; font-size: 15px; }
.wiz-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; max-width: 900px; margin-bottom: 14px; }
.wiz-sum > div { display: grid; gap: 2px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); }
.wiz-sum b { font: 700 19px var(--font-h); color: var(--head); }
.wiz-next { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
kbd { font: 600 12px var(--font); padding: 0 4px; border: 1px solid var(--line2); border-bottom-width: 2px; background: var(--bg2); }
/* open quests step */
.wq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "a r" "c r"; grid-template-rows: auto 1fr; gap: 4px 16px; align-items: start; }
.wq-a { grid-area: a; } .wq-ap { grid-area: c; } .wq-r { grid-area: r; }
.wq-sec { min-width: 0; }
.wq-num { display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--sel-bg); color: var(--sel-ink); font-size: 14px; }
.wq-drop { display: flex; align-items: center; gap: 12px; padding: 18px; border: 2px dashed var(--line2); background: var(--bg2); cursor: pointer; color: var(--text); }
.wq-drop .ic { width: 26px; height: 26px; color: var(--accent); flex: none; }
.wq-drop:hover, .wq-drop:focus, .wq-drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg2)); outline: none; }
.wq-jobs { display: grid; gap: 6px; margin-top: 8px; max-height: 340px; overflow-y: auto; }
.wq-job { display: flex; gap: 8px; align-items: flex-start; padding: 6px; background: var(--bg2); border: 1px solid var(--line); }
.wq-thumb { width: 64px; height: 48px; object-fit: cover; object-position: left top; border: 1px solid var(--line); flex: none; }
.wq-jb { flex: 1; min-width: 0; display: grid; gap: 4px; }
.wq-found { display: flex; flex-wrap: wrap; gap: 3px; }
.wq-f { font-size: 12px; padding: 0 5px; border: 1px solid var(--line2); background: var(--panel); }
.wq-f.st-open { border-color: var(--ok); }
.wq-f.st-done { color: var(--muted); }
.wq-f.st-locked, .wq-f.st-failed { color: var(--muted); text-decoration: line-through; }
.wq-un { margin: 4px 0; padding-left: 18px; color: var(--muted); }
.wq-r { position: sticky; top: 0; display: flex; flex-direction: column; min-height: 0; max-height: calc(min(860px, 100vh - 28px) - 190px); }
.wq-trs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.wq-tr { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 2px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); cursor: pointer; font: 700 13px var(--font-h); text-transform: uppercase; letter-spacing: .03em; min-height: 30px; }
.wq-tr:hover { border-color: var(--line2); color: var(--head); }
.wq-tr.on { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.wq-tr.none { opacity: .75; }
.wq-tri { width: 24px; height: 24px; object-fit: cover; }
.wq-c { min-width: 18px; padding: 0 4px; background: var(--ok); color: #fff; font-size: 12px; text-align: center; }
.wq-c.none { background: var(--muted); }
.wq-c .ic { width: 11px; height: 11px; }
.wq-search { flex: none; margin-bottom: 6px; }
.wq-search input { min-height: 30px; }
.wq-th { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; background: var(--gh-bg); color: var(--gh-ink); }
.wq-th b { font: 700 17px var(--font-h); text-transform: uppercase; }
.wq-th .muted { color: color-mix(in srgb, var(--gh-ink) 60%, transparent); }
.wq-th .btn { margin-left: auto; }
.wq-sub { margin: 4px 0; }
.wq-list { overflow-y: auto; min-height: 120px; border: 1px solid var(--line); background: var(--bg2); padding: 2px; flex: 1; }
.wq-row { border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); padding: 4px 6px; }
.wq-n { flex: 1; min-width: 0; }
.wq-b { font: 700 11px var(--font-h); padding: 0 4px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.wq-b.wq-k { color: var(--kappa); border-color: var(--kappa); }
.wq-shot .ic { width: 13px; height: 13px; color: var(--accent); }
.wq-none { padding: 14px; color: var(--ok); }
.wq-pv { display: grid; gap: 6px; }
.wq-pvl { margin: 0; padding-left: 18px; }
.wq-strict summary { cursor: pointer; }
.wq-sg { margin: 6px 0; }
.wq-sl { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.wq-s { font-size: 12px; padding: 1px 5px; border: 1px solid var(--line2); background: var(--bg2); }
.wq-s.risk { border-color: var(--warn); }
.wq-warn { margin: 0; }
.wq-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.wq-more summary { cursor: pointer; padding: 6px 0; color: var(--muted); }
.wq-more[open] { display: flex; flex-wrap: wrap; gap: 6px; }
.wq-more[open] summary { width: 100%; }
.wq-applied { padding: 6px 8px; border: 1px solid var(--ok); background: var(--ok-bg); }
.c-ok { color: var(--ok); }
@media (max-width: 900px) {
  .wq { grid-template-columns: 1fr; grid-template-areas: "a" "r" "c"; grid-template-rows: auto; }
  .wq-r { position: static; max-height: none; }
  .wq-list { max-height: 60vh; }
  .wiz-wrap { padding: 0; }
  .wiz { height: 100vh; border: 0; }
  .wiz-hint { display: none; }
}
body.wiz-on .mappanel, body.wiz-on .mp-box { visibility: hidden; }
.wq-tg { cursor: pointer; color: var(--text); font: inherit; font-size: 12px; }
.wq-tg:hover { border-color: var(--ok); }
.wq-tg.on { border-color: var(--ok); background: var(--ok-bg); }
.wq-tg .ic { width: 11px; height: 11px; color: var(--ok); }
.hchk-b.ed { display: inline-grid; place-items: center; cursor: default; background: color-mix(in srgb, var(--accent) 22%, var(--panel)); border-color: var(--accent); color: var(--head); }
.hchk-b.ed .ic { width: 13px; height: 13px; }
.wq-zero { margin-left: auto; color: color-mix(in srgb, var(--gh-ink) 70%, transparent); }
.wq-c.none { background: var(--panel2); color: var(--muted); }

/* Speedrun / In-Raid: side quests (not needed for Story / Kappa) – own colour, below */
.raid-side-h { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 4px; padding-top: 6px; border-top: 1px dashed color-mix(in srgb, var(--side) 60%, var(--line)); color: var(--side); }
.raid-side-h > span:first-child { font: 700 14px var(--font-h); text-transform: uppercase; letter-spacing: .06em; }
.raid-q.side { background: color-mix(in srgb, var(--side) 9%, var(--bg2)); border-color: color-mix(in srgb, var(--side) 40%, var(--line)); border-style: dashed; }
.raid-q.side, .raid-q.side .ql, .raid-q.side .obj-t { color: var(--side-ink); }
.raid-q.side .raid-qh { font-weight: 500; }
.chip.side { border-style: dashed; border-color: color-mix(in srgb, var(--side) 50%, var(--line)); color: var(--side-ink); background: color-mix(in srgb, var(--side) 7%, var(--panel)); }
.chip.side .ql { color: var(--side-ink); }
.side-n, .side-n .ql { color: var(--side); }
.ic-count .side-n { margin-left: 2px; font-weight: 500; }
