:root { --ground: #0B0E14; --surface: #141A24; --surface-2: #1B2330; --ink: #E9E5DA; --muted: #8A93A6; --rule: #26303F; --gold: #D9A441; --gold-soft: #3A2F16;
  --green: #5FD068; --red: #E06060; --blue: #6FA8F5; --amber: #E0A85A; --teal: #3FD0C9;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif; --body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif; --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --glass: rgba(14, 18, 26, .86); color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 14px; line-height: 1.45; overflow: hidden; display: flex; flex-direction: column; height: 100dvh; }
button { font: inherit; color: inherit; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }

/* header */
.top { display: flex; align-items: center; gap: 10px 14px; padding: 8px 14px; border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, #121826, var(--ground)); flex-wrap: wrap; position: relative; z-index: 30; }
.brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.brand .mark { width: 28px; height: 28px; border-radius: 6px; border: 2px solid var(--gold); display: grid; place-items: center; font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--gold); line-height: 1; }
.brand .bname { font-family: var(--display); font-size: 22px; font-weight: 700; }
.brand:hover .bname { color: var(--gold); }
.title { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--gold); letter-spacing: .03em; padding-left: 12px; border-left: 1px solid var(--rule); }
.picker { display: flex; gap: 6px; min-width: 0; }
.picker select { max-width: 230px; }
.picker select, .field select, .search input { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--rule); border-radius: 4px; padding: 6px 9px; }
.picker select:focus-visible, .field select:focus-visible, .search input:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: var(--gold); }
.search { position: relative; flex: 1 1 260px; max-width: 460px; min-width: 0; }
.search input { width: 100%; }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.6); max-height: min(60vh, 440px); overflow: auto; z-index: 40; }
.results li { display: grid; grid-template-columns: 22px 1fr auto; gap: 2px 8px; align-items: center; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.results li .ic { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rule); }
.results li b { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.results li b mark { background: none; color: var(--gold); }
.results li small { grid-column: 2 / 4; font-family: var(--mono); font-size: 11px; line-height: 1.35; color: var(--muted); overflow-wrap: break-word; }
.results li .mk { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.results li[aria-selected="true"], .results li:hover { background: var(--surface-2); }
.results li[aria-selected="true"] b { color: var(--gold); }
.results .empty { color: var(--muted); cursor: default; display: block; }
.top-actions { display: flex; gap: 6px; margin-left: auto; }
.btn { font-size: 12.5px; padding: 6px 11px; border-radius: 4px; border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--gold); }
.btn:focus-visible, .hbtn:focus-visible, .seg button:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.btn.primary { background: var(--gold); color: #1a1408; border-color: var(--gold); font-weight: 600; }
.btn.ghost { background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); }
.btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.btn:disabled { opacity: .45; cursor: default; border-color: var(--rule); }
.btn.tiny { font-family: var(--mono); font-size: 11px; padding: 2px 7px; }

/* stage */
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.map { position: absolute; inset: 0; outline: none; touch-action: none; cursor: grab; background: radial-gradient(ellipse at 50% 40%, #121a28, #07090d 75%); -webkit-user-select: none; user-select: none; }
.map.dragging { cursor: grabbing; }
.map.tool-measure, .map.tool-pin { cursor: crosshair; }
.map:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.label { position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: auto; cursor: pointer; will-change: transform; padding: 1px 4px; border-radius: 3px; }
.label span { text-shadow: 0 0 3px #000, 0 0 6px #000, 0 1px 2px #000; }
.label.k-zone span { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: .05em; color: #f3ead2; text-transform: uppercase; }
.label.k-city span { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: .04em; color: var(--gold); }
.label.k-subzone span { font-family: var(--body); font-size: 12.5px; font-weight: 500; color: #e9e5da; }
.label.k-instance span { font-family: var(--body); font-size: 11.5px; font-weight: 600; color: #bff0c4; }
.label.k-feature span { font-family: var(--body); font-size: 11px; color: #cfd6e4; }
.label.k-pin span { font-family: var(--body); font-size: 12px; font-weight: 600; color: #ffe3a6; background: rgba(11,14,20,.72); padding: 1px 5px; border-radius: 3px; text-shadow: none; }
.label:hover span, .label.hover span { color: var(--gold); }
.map.dragging .label { pointer-events: none; }
.tip { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--glass); border: 1px solid var(--rule); border-radius: 4px; padding: 4px 8px; font-size: 12.5px; z-index: 5; width: max-content; max-width: min(340px, calc(100% - 16px)); line-height: 1.35; overflow-wrap: break-word; }
.tip small { display: block; color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.tip .tip-k { display: block; font-weight: 600; } .tip .tip-l { display: block; font-variant-numeric: tabular-nums; }
.status { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: var(--glass); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 14px; font-size: 12.5px; color: var(--muted); pointer-events: none; z-index: 6; }
.status:empty { display: none; }
.map::after { content: ""; position: absolute; left: 50%; bottom: 44px; width: 60px; height: 2px; margin-left: -30px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); background-size: 200% 100%; opacity: 0; transition: opacity .3s; pointer-events: none; }
.map.loading::after { opacity: .8; animation: loadbar 1s linear infinite; }
@keyframes loadbar { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .map.loading::after { animation: none; } }
.status.err { color: var(--red); border-color: var(--red); pointer-events: auto; }

/* panel */
.panel { position: absolute; left: 12px; top: 12px; width: 300px; max-height: calc(100% - 64px); display: flex; flex-direction: column; background: var(--glass); border: 1px solid var(--rule); border-radius: 8px; backdrop-filter: blur(6px); z-index: 10; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.panel-toggle { display: flex; align-items: center; justify-content: space-between; background: none; border: 0; padding: 8px 12px 4px; cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.panel-toggle::after { content: "▾"; font-size: 12px; transition: transform .15s; }
.panel-toggle[aria-expanded="false"]::after { transform: rotate(-90deg); }
.panel-toggle:hover { color: var(--ink); }
.panel-body { overflow: auto; padding: 0 12px 12px; display: grid; gap: 10px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 5px 8px; font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: .03em; color: var(--muted); cursor: pointer; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }
.tab { display: grid; gap: 8px; }
.layer-list { display: grid; gap: 1px; }
.layer { display: grid; grid-template-columns: 18px 22px 1fr auto; gap: 8px; align-items: center; padding: 4px 4px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.layer:hover { background: var(--surface-2); }
.layer input { margin: 0; accent-color: var(--gold); width: 15px; height: 15px; }
.layer .sw { width: 20px; height: 20px; display: grid; place-items: center; }
.layer .sw canvas { width: 20px; height: 20px; }
.layer .sw i { display: block; width: 18px; height: 4px; border-radius: 2px; }
.layer .n { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.layer.off { opacity: .5; }
.layer.empty { opacity: .45; cursor: default; }
.layer-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 2px; }
/* Per-kind sub-filter under a layer that holds many kinds (buildings, services seen in the beta). */
.layer-kinds { display: flex; flex-wrap: wrap; gap: 3px; margin: 1px 0 5px 40px; }
.kchip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface-2); font-size: 11px; cursor: pointer; }
.kchip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kchip b { font-family: var(--mono); font-size: 10px; font-weight: 400; color: var(--muted); }
.kchip:hover { border-color: var(--gold); }
.kchip:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 1px; }
.kchip.off { opacity: .45; text-decoration: line-through; }
/* Mob tracker: the list under the "Mobs seen in beta" layer. Shown only while that layer is on. */
.mobs { border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 6px; display: grid; gap: 5px; }
.mobs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mobs-head b { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.mobs-head .n { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.mobs-filter { flex-wrap: nowrap; }
.mobs-filter input { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 4px; color: var(--ink); padding: 3px 7px; }
.mobs-filter input:focus { outline: 1px solid var(--gold); }
.mobs-filter select { font-size: 12px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 4px; color: var(--ink); padding: 3px 4px; }
.mob-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.mob-list .empty { color: var(--muted); font-size: 12.5px; padding: 4px 2px; }
.mob-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 7px; align-items: center; width: 100%; text-align: left;
  background: none; border: 1px solid transparent; border-radius: 4px; padding: 3px 5px; color: inherit; font: inherit; cursor: pointer; }
.mob-row:hover { background: var(--surface-2); }
.mob-row.on { background: var(--surface-2); border-color: var(--teal); }
.mob-row:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.mob-lv { font-family: var(--mono); font-size: 11.5px; text-align: right; color: var(--muted); }
.mob-lv.c-elite, .mob-lv.c-rareelite { color: var(--gold); }
.mob-lv.c-rare { color: #d5dce8; }
.mob-lv.c-worldboss { color: var(--red); }
.mob-n { min-width: 0; display: grid; }
.mob-n b { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mob-n small { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mob-seen { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.slider label { font-size: 12.5px; color: var(--muted); }
.slider input { flex: 1; accent-color: var(--gold); }
.slider output { font-family: var(--mono); font-size: 11.5px; min-width: 34px; text-align: right; }
.fine { margin: 0; font-size: 11.5px; color: var(--muted); }
.field { display: grid; gap: 3px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field select { text-transform: none; letter-spacing: 0; font-family: var(--body); width: 100%; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.seg button { background: var(--surface-2); border: 0; padding: 5px 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--gold-soft); color: var(--gold); }
.out { font-size: 13px; display: grid; gap: 4px; }
.out:empty { display: none; }
.out .big { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--gold); line-height: 1.1; }
.out ol { margin: 0; padding-left: 20px; display: grid; gap: 1px; font-size: 12.5px; }
.out ol li::marker { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.out .speeds { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; font-size: 12.5px; }
.out .speeds span:nth-child(odd) { color: var(--muted); }
.out .speeds span:nth-child(even) { font-family: var(--mono); font-size: 12px; text-align: right; }
.out .warn { color: var(--amber); font-size: 12.5px; }
.pin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pin-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 4px; align-items: center; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 4px; padding: 4px 6px; }
.pin-list li.shared { border-style: solid; }
.pin-list input { font: inherit; font-size: 12.5px; background: none; border: 0; color: var(--ink); min-width: 0; padding: 2px; }
.pin-list input:focus { outline: 1px solid var(--gold); border-radius: 2px; }
.pin-list button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 5px; font-size: 12px; }
.pin-list button:hover { color: var(--gold); }
.pin-list .empty { color: var(--muted); font-size: 12.5px; background: none; border: 0; display: block; }

/* hud */
.hud { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; z-index: 10; }
.hud .seg { background: var(--glass); }
.hbtn { width: 36px; height: 36px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--rule); border-radius: 6px; color: var(--ink); cursor: pointer; font-size: 18px; line-height: 1; padding: 0; }
.hbtn:hover { border-color: var(--gold); color: var(--gold); }
.hgroup { display: flex; flex-direction: column; }
.hgroup .hbtn:first-child { border-radius: 6px 6px 0 0; }
.hgroup .hbtn:last-child { border-radius: 0 0 6px 6px; border-top: 0; }
.compass { border-radius: 50%; width: 40px; height: 40px; }
.compass span { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--gold); position: relative; transition: transform .05s linear; }
.compass span::before { content: ""; position: absolute; left: 50%; top: 3px; transform: translateX(-50%); border: 5px solid transparent; border-bottom: 8px solid var(--red); border-top: 0; }

/* info card */
.card { position: absolute; right: var(--hud-clear, 90px); top: 12px; width: 300px; max-width: calc(100% - 84px); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; z-index: 12; box-shadow: 0 14px 40px rgba(0,0,0,.55); display: grid; gap: 6px; max-height: calc(100% - 70px); overflow: auto; }
.card h3 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.1; padding-right: 24px; }
.card .kind { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card .kind b { font-weight: 500; }
.card .kind .alliance { color: var(--blue); } .card .kind .horde { color: var(--red); } .card .kind .neutral { color: var(--gold); }
.card p { margin: 0; font-size: 13px; }
.card .meta { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; font-size: 12.5px; }
.card .meta dt { color: var(--muted); } .card .meta dd { margin: 0; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.card .src { font-family: var(--mono); font-size: 10.5px; color: var(--muted); overflow-wrap: anywhere; }
.card .warn { margin: 0; font-size: 11.5px; color: var(--amber); }
.card .acts { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.card .x { position: absolute; right: 8px; top: 8px; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; width: 26px; height: 26px; }
.card .x:hover { color: var(--gold); }
.card .bosses { margin: 0; padding-left: 22px; font-size: 12.5px; }
.card .bosses.two { columns: 2; column-gap: 34px; }
.card .bosses li { break-inside: avoid; }
.card .acts a.btn { text-decoration: none; display: inline-block; }
.card textarea { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--rule); border-radius: 4px; padding: 6px 8px; width: 100%; resize: vertical; }

/* readout */
.readout { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: center; gap: 10px; pointer-events: none; z-index: 9; min-width: 0; }
.readout > * { pointer-events: auto; }
.readout .where, .readout .coords { background: var(--glass); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 9px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readout .where { min-width: 0; flex: 0 1 auto; }
.readout .where b { font-weight: 600; } .readout .where span { color: var(--muted); }
.readout .coords { font-family: var(--mono); font-size: 12px; color: var(--gold); flex: none; }
.readout .coords:empty { display: none; }
.readout .hint { margin-left: auto; font-size: 11.5px; color: var(--muted); background: var(--glass); padding: 3px 8px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crosshair { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; pointer-events: none; z-index: 4; opacity: .7; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: var(--ink); box-shadow: 0 0 2px #000; }
.crosshair::before { left: 8px; top: 0; width: 2px; height: 18px; } .crosshair::after { top: 8px; left: 0; height: 2px; width: 18px; }

/* about, toast */
.about { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 60; display: grid; place-items: center; padding: 16px; }
.about-in { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; max-width: 620px; max-height: calc(100dvh - 32px); overflow: auto; display: grid; gap: 10px; }
.about h2 { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 600; }
.about p { margin: 0; color: var(--muted); } .about p b { color: var(--ink); font-weight: 500; }
.about .btn { justify-self: end; }
.toast { position: fixed; left: 50%; bottom: 56px; transform: translate(-50%, 8px); background: var(--surface); border: 1px solid var(--gold); color: var(--ink); padding: 6px 14px; border-radius: 999px; font-size: 13px; z-index: 70; opacity: 0; transition: opacity .18s, transform .18s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 20px; }

/* report menu and dialog (copied from the hub) */
.fe-btn { font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 4px; border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.fe-btn:hover { border-color: var(--gold); } .fe-btn.primary { background: var(--gold); color: #1a1408; border-color: var(--gold); font-weight: 600; }
.fe-btn:disabled { opacity: .5; cursor: default; }
.fe-dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.fe-dialog::backdrop { background: rgba(0,0,0,.6); }
.fe-dialog form { display: grid; gap: 10px; padding: 18px 20px 16px; }
.fe-dialog h3 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 600; }
.fe-dialog .fe-ctx { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--ground); border: 1px solid var(--rule); border-radius: 4px; padding: 6px 10px; display: grid; gap: 2px; }
.fe-dialog .fe-ctx .fe-under b { color: var(--gold); font-weight: 500; } .fe-dialog .fe-ctx .fe-path { opacity: .6; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-dialog label { display: grid; gap: 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); } .fe-dialog label small { text-transform: none; letter-spacing: 0; }
.fe-dialog input, .fe-dialog select, .fe-dialog textarea { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--rule); border-radius: 4px; padding: 7px 10px; width: 100%; letter-spacing: 0; text-transform: none; }
.fe-dialog textarea { resize: vertical; } .fe-dialog .fe-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.fe-dialog .fe-fallback { font-family: var(--mono); font-size: 11.5px; }
.fe-dialog .fe-msg { min-height: 1.2em; font-size: 13px; color: var(--muted); } .fe-dialog .fe-msg.err { color: var(--red); } .fe-dialog .fe-msg.ok { color: var(--green); }
.fe-dialog .fe-actions { display: flex; justify-content: flex-end; gap: 8px; }
.fe-menu { position: fixed; z-index: 90; min-width: 200px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 5px; box-shadow: 0 12px 32px rgba(0,0,0,.55); display: grid; }
.fe-menu button { font: inherit; font-size: 13px; text-align: left; background: none; border: 0; color: var(--ink); padding: 7px 12px; border-radius: 4px; cursor: pointer; }
.fe-menu button:hover, .fe-menu button:focus-visible { background: var(--surface-2); color: var(--gold); outline: none; }
.fe-menu hr { border: 0; border-top: 1px solid var(--rule); margin: 4px 6px; }
body.fe-shift .stage, body.fe-shift .top { cursor: help; }

/* narrower screens */
@media (max-width: 1100px) { .readout .hint { display: none; } }
@media (max-width: 860px) {
  .title { display: none; }
  .brand .bname { display: none; }
}
@media (max-width: 720px) {
  .top { padding: 6px 10px; gap: 6px 8px; }
  .search { order: 5; flex: 1 1 140px; max-width: none; }
  .top-actions { order: 6; }
  .picker { flex: 1 1 calc(100% - 44px); }   /* brand mark and both map menus on the first row, search and actions below */
  .picker select { max-width: none; min-width: 0; flex: 1 1 50%; padding: 6px 6px; }
  .picker #mapGroup { flex: 0 1 auto; }
  .top-actions .btn { padding: 5px 9px; }
  .panel { left: 8px; right: 52px; top: auto; bottom: 44px; width: auto; max-height: 55%; }
  .panel-body { padding: 0 10px 10px; }
  .hud { right: 8px; top: 8px; gap: 4px; }
  .hbtn { width: 34px; height: 34px; font-size: 16px; }
  .compass { width: 38px; height: 38px; }
  .card { left: 8px; right: 52px; top: 8px; width: auto; max-width: none; max-height: 60%; }
  .readout { left: 8px; right: 8px; bottom: 6px; gap: 6px; }
  .readout .where { font-size: 12px; }
}
@media (max-width: 380px) { .hgroup.rot { display: none; } }

/* money: amounts with Blizzard's coin icons (img/coins, from interface/moneyframe) */
.money { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; color: var(--ink); white-space: nowrap; vertical-align: -2px; }
.money .coin { display: inline-flex; align-items: center; gap: 2px; }
.money img { width: 13px; height: 13px; image-rendering: auto; }
.out .fare { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.out ol.legs { gap: 4px; }
.out ol.legs li b { font-weight: 500; display: block; }
.out ol.legs li small { color: var(--muted); font-size: 11.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.card .routes { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 220px; overflow: auto; }
.card .routes li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px solid var(--rule); }
.card .routes li b { font-weight: 500; font-size: 13px; display: block; }
.card .routes li small { color: var(--muted); font-size: 11.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
/* what a mob or a chest gave our own character. Item quality is the site's existing palette (prototypes/talents,
   prototypes/pvp, prototypes/hub/sections.css): the class sets --qc and the name takes its colour from it. */
.iq0 { --qc: #9d9d9d; } .iq1 { --qc: #ffffff; } .iq2 { --qc: #1eff00; } .iq3 { --qc: #0070dd; } .iq4 { --qc: #a335ee; } .iq5 { --qc: #ff8000; } .iq6 { --qc: #e6cc80; } .iq7 { --qc: #00ccff; }
.card .drops { max-height: 260px; }
.card .drops li { align-items: flex-start; }
.card .drops li > span { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.card .drops .drop-n { color: var(--qc, var(--ink)); }
.card .drops small { flex-basis: 100%; }
.card .drops .tag { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-soft); border-radius: 3px; padding: 0 4px; }
.card .drops .tag.qty { color: var(--muted); border-color: var(--rule); text-transform: none; letter-spacing: 0; }
.mob-drop { font-size: 10.5px; color: var(--teal); }

/* flight overlay: bottom of the map, above the tools panel, so it works with the panel collapsed and at phone width */
.flightbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 24; width: min(640px, calc(100% - 132px)); background: linear-gradient(180deg, rgba(24, 30, 42, .94), rgba(12, 16, 23, .94)); border: 1px solid rgba(217, 164, 65, .55); border-radius: 12px; padding: 14px 18px 12px; display: grid; gap: 12px; box-shadow: 0 18px 48px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04); backdrop-filter: blur(8px); }
body.flying .readout { display: none; }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; }
.fb-route { display: grid; min-width: 0; }
.fb-kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.fb-route b { font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-route b i { font-style: normal; color: var(--gold); padding: 0 6px; }
.fb-cancel { flex: none; font-size: 13.5px; font-weight: 600; padding: 8px 14px; border-radius: 6px; border: 1px solid rgba(224, 96, 96, .55); background: rgba(224, 96, 96, .12); color: #F2B8B8; cursor: pointer; }
.fb-cancel:hover { background: rgba(224, 96, 96, .25); color: #fff; }
.fb-cancel:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fb-track { position: relative; height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); }
.fb-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: linear-gradient(90deg, #A8782A, var(--gold)); box-shadow: 0 0 10px rgba(217,164,65,.45); }
.fb-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.fb-dot.done { border-color: var(--gold); background: var(--gold); }
.fb-stats { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; }
.fb-stat { display: grid; gap: 1px; min-width: 0; }
.fb-stat span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fb-stat b { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-stat small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-stat small:empty { display: none; }
#flightTime { font-family: var(--mono); font-size: 22px; color: var(--gold); line-height: 1.15; }
.fb-end { text-align: right; }
.fb-speed { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--rule); }
.fb-speed input { flex: 1; accent-color: var(--gold); min-width: 0; height: 18px; cursor: pointer; }
.fb-speed output { font-family: var(--mono); font-size: 15px; font-weight: 600; min-width: 40px; text-align: right; color: var(--gold); letter-spacing: 0; }
@media (max-width: 720px) {
  .flightbar { left: 8px; right: 8px; bottom: 8px; transform: none; width: auto; padding: 12px 14px 10px; gap: 10px; }
  .fb-route b { font-size: 19px; }
  .fb-stats { grid-template-columns: auto 1fr; gap: 8px 14px; }
  .fb-end { grid-column: 1 / -1; text-align: left; }
  #flightTime { font-size: 19px; }
}

/* controls guide: shown on a first visit and from the ? button, just left of the HUD */
.help { position: absolute; right: var(--hud-clear, 62px); top: var(--help-top, 54px); z-index: 13; width: 330px; max-height: calc(100% - var(--help-top, 54px) - 46px); overflow: auto; background: linear-gradient(180deg, rgba(24, 30, 42, .96), rgba(12, 16, 23, .96)); border: 1px solid rgba(217, 164, 65, .5); border-radius: 12px; padding: 16px 16px 14px; box-shadow: 0 18px 48px rgba(0,0,0,.6); display: grid; gap: 12px; }
.help h2 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.1; }
.help h3 { margin: 2px 0 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.help ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.help li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; }
.help li .ico { display: grid; place-items: center; height: 40px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--rule); color: var(--ink); font-size: 16px; }
.help li .ico svg { width: 26px; height: 32px; }
.help li b { display: block; font-size: 13.5px; font-weight: 600; }
.help li small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.help kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); color: var(--ink); }
.help .keys { font-size: 12px; color: var(--muted); line-height: 1.9; margin: 0; }
.help .foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.help .foot small { color: var(--muted); font-size: 11.5px; }
.help .got { font-size: 13.5px; font-weight: 600; padding: 7px 16px; border-radius: 6px; border: 1px solid var(--gold); background: var(--gold); color: #1a1406; cursor: pointer; }
.help .got:hover { filter: brightness(1.08); }
.help .got:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.m-body { fill: none; stroke: currentColor; stroke-width: 1.6; }
.m-on { fill: var(--gold); }
@media (max-width: 720px) { .help { left: 8px; right: 52px; top: 8px; width: auto; max-height: calc(100% - 96px); } }

/* first-view loading card (js/loadbar.js) */
.loadcard { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 7; width: min(320px, calc(100% - 48px)); display: grid; gap: 8px; padding: 14px 18px 12px; background: var(--glass); border: 1px solid rgba(217, 164, 65, .45); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.55); backdrop-filter: blur(6px); pointer-events: none; transition: opacity .4s; }
.loadcard b { font-family: var(--display); font-size: 19px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loadcard small { font-family: var(--mono); font-size: 11.5px; color: var(--muted); min-height: 1em; }
.lb-track { position: relative; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.lb-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: linear-gradient(90deg, #A8782A, var(--gold)); transition: width .25s ease-out; }
.lb-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: lbsheen 1.1s linear infinite; }
@keyframes lbsheen { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.loadcard.done { opacity: 0; }
@media (max-width: 720px) { .loadcard { left: 8px; right: 52px; width: auto; transform: translateY(-50%); } }   /* clear of the map buttons */
@media (prefers-reduced-motion: reduce) { .lb-fill::after { animation: none; } .lb-fill { transition: none; } }
