:root {
  color-scheme: light;
  --bg: #f4f3f0;
  --surface-1: #fcfcfb;
  --surface-2: #f0efec;
  --border: #e2e1dc;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #7a7974;
  --accent: #2a78d6;
  --series-1: #2a78d6;
  --grid: #e7e6e1;
  --good: #1a7f37;
  --warning: #9a6700;
  --critical: #c62828;
  --good-bg: #e6f4ea;
  --warning-bg: #fff4d6;
  --critical-bg: #fde8e8;
  /* cores de qualidade de item (convenção do WoW, ajustadas p/ contraste) */
  --q0: #7a7974; --q1: #3b3b3b; --q2: #12800c; --q3: #0062c4;
  --q4: #8a2fcf; --q5: #c45f00; --q6: #9a7a3a; --q7: #0083a8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211; --surface-1: #1a1a19; --surface-2: #232321; --border: #2f2f2c;
    --text-primary: #ffffff; --text-secondary: #c3c2b7; --text-muted: #8f8e86;
    --accent: #3987e5; --series-1: #3987e5; --grid: #2a2a28;
    --good: #4ac26b; --warning: #d6a93a; --critical: #ff7b72;
    --good-bg: #16301e; --warning-bg: #33290f; --critical-bg: #3a1a1a;
    --q0: #9d9d9d; --q1: #ffffff; --q2: #1eff00; --q3: #3f9bff;
    --q4: #b86bf5; --q5: #ff8000; --q6: #e6cc80; --q7: #00ccff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211; --surface-1: #1a1a19; --surface-2: #232321; --border: #2f2f2c;
  --text-primary: #ffffff; --text-secondary: #c3c2b7; --text-muted: #8f8e86;
  --accent: #3987e5; --series-1: #3987e5; --grid: #2a2a28;
  --good: #4ac26b; --warning: #d6a93a; --critical: #ff7b72;
  --good-bg: #16301e; --warning-bg: #33290f; --critical-bg: #3a1a1a;
  --q0: #9d9d9d; --q1: #ffffff; --q2: #1eff00; --q3: #3f9bff;
  --q4: #b86bf5; --q5: #ff8000; --q6: #e6cc80; --q7: #00ccff;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { margin: 0; font-weight: 600; }
h1 { font-size: 20px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); margin-bottom: 12px; }
.muted { color: var(--text-muted); }
button, select {
  font: inherit; color: var(--text-primary); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; cursor: pointer;
}
button.ghost { background: transparent; }
button:hover { border-color: var(--accent); }

.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; background: color-mix(in srgb, var(--surface-1) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.sub { color: var(--text-secondary); font-size: 13px; }
.status { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.pill.live i { background: var(--good); box-shadow: 0 0 0 3px var(--good-bg); }
.pill.err i { background: var(--critical); }

main { max-width: 1400px; margin: 0 auto; padding: 20px 24px 48px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.kpi .label { font-size: 12px; color: var(--text-secondary); }
.kpi .value { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .hint { font-size: 12px; color: var(--text-muted); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 16px; min-width: 0; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
@media (max-width: 1000px) { .grid { grid-template-columns: 1fr; } .span-2, .span-3 { grid-column: auto; } }
@media (max-width: 600px) { main { padding: 16px; } .topbar { padding: 10px 16px; } }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-head h2 { margin-bottom: 12px; }

.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 2px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }

/* Vault */
.vault { display: grid; gap: 10px; }
.vrow { display: grid; grid-template-columns: 130px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.vrow .vname { font-weight: 600; align-self: center; font-size: 13px; }
.vslot { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); }
.vslot.done { border-color: var(--good); background: var(--good-bg); }
.vslot.empty { visibility: hidden; }
.vslot .top { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); }
.vslot .lvl { font-weight: 650; font-size: 15px; color: var(--text-primary); }
.bar { height: 4px; border-radius: 4px; background: var(--grid); margin-top: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 4px; background: var(--series-1); }
.vslot.done .bar > span { background: var(--good); }
.vslot .reward { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.vslot .reward b { color: var(--text-primary); }
.vdetail { grid-column: 2 / -1; align-items: center; font-size: 12px; margin-top: -2px; }
.chip.key { border-color: var(--accent); }
@media (max-width: 600px) { .vdetail { grid-column: 1 / -1; } }
@media (max-width: 600px) { .vrow { grid-template-columns: 1fr 1fr 1fr; } .vrow .vname { grid-column: 1 / -1; } }

/* Alerts */
.alert { display: flex; gap: 10px; padding: 10px; border-radius: 10px; margin-bottom: 8px; font-size: 13px; }
.alert .ico { font-weight: 700; flex: none; width: 18px; text-align: center; }
.alert.warn { background: var(--warning-bg); } .alert.warn .ico { color: var(--warning); }
.alert.crit { background: var(--critical-bg); } .alert.crit .ico { color: var(--critical); }
.alert.ok { background: var(--good-bg); } .alert.ok .ico { color: var(--good); }
.alert b { display: block; }

/* Tabelas */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; color: var(--text-muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
thead th { cursor: pointer; user-select: none; }
thead th:hover { color: var(--text-primary); }
thead th[data-sort="asc"]::after { content: " ▲"; font-size: 9px; }
thead th[data-sort="desc"]::after { content: " ▼"; font-size: 9px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tbody tr:hover { background: var(--surface-2); }
.q0 { color: var(--q0); } .q1 { color: var(--q1); } .q2 { color: var(--q2); } .q3 { color: var(--q3); }
.q4 { color: var(--q4); } .q5 { color: var(--q5); } .q6 { color: var(--q6); } .q7 { color: var(--q7); }
.item { font-weight: 550; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
a.item:hover { text-decoration: underline; }
.item .ico { width: 22px; height: 22px; flex: none; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-2); }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary); white-space: nowrap; }
.tag.warn { background: var(--warning-bg); border-color: transparent; color: var(--text-primary); }
.tag.good { background: var(--good-bg); border-color: transparent; color: var(--text-primary); }
.meter { display: inline-block; width: 60px; height: 4px; background: var(--grid); border-radius: 4px; vertical-align: middle; margin-left: 6px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }

/* Barras de secundários */
.hbar { display: grid; grid-template-columns: 48px 1fr 56px; gap: 8px; align-items: center; margin: 8px 0; font-size: 13px; }
.hbar .track { height: 14px; }
.hbar .track span { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-secondary); }

.empty-note { color: var(--text-muted); font-size: 13px; padding: 24px 0; text-align: center; }

/* Grupo */
.member { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--grid); font-size: 13px; }
.member:last-child { border-bottom: 0; }
.member .n { font-weight: 600; }
.member.gone, tr.gone { opacity: .55; }
.member.pick { cursor: pointer; border-radius: 8px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.member.pick:hover { background: var(--surface-2); }
.member.pick.sel { background: color-mix(in srgb, var(--accent) 14%, var(--surface-1)); box-shadow: inset 3px 0 0 var(--accent); }
.player-info .pname { margin-right: 6px; }
.tbl tr.me td { background: color-mix(in srgb, var(--accent) 14%, var(--surface-1)); }
.tbl tr.me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.member.me .n { color: var(--accent); }
.member .perf { display: flex; gap: 8px; align-items: center; font-size: 12px; margin-top: 2px; color: var(--text-secondary); }
.pidx { padding: 0 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.pidx.up { background: var(--good-bg); border-color: transparent; }
.pidx.down { background: var(--warning-bg); border-color: transparent; }
.pidx.weak { border-style: dashed; }
.gsub { font-size: 12px; margin: -6px 0 6px; }
.gone-h { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .05em; }

/* Histórico de grupos */
.gsess { border-top: 1px solid var(--grid); }
.gsess:first-child { border-top: 0; }
.gsess summary { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 2fr) 60px; gap: 12px; align-items: center;
  padding: 10px 4px; cursor: pointer; list-style: none; font-size: 13px; border-radius: 8px; }
.gsess summary::-webkit-details-marker { display: none; }
.gsess summary:hover { background: var(--surface-2); }
.gsess .nmsg { text-align: right; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.chip i { font-style: normal; color: var(--text-muted); margin-left: 4px; font-size: 11px; }
.chip.gone { opacity: .5; text-decoration: line-through; }
.gbody { padding: 4px 4px 16px; }
.chat.gchat { height: auto; min-height: 0; max-height: 320px; }
@media (max-width: 700px) { .gsess summary { grid-template-columns: 1fr; gap: 4px; } .gsess .nmsg { text-align: left; } }

/* Chat */
.chat { height: calc(100vh - 330px); min-height: 320px; overflow-y: auto; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.msg { display: grid; grid-template-columns: 44px 72px minmax(0, 1fr); gap: 8px; padding: 3px 4px; border-radius: 6px; }
.msg:hover { background: var(--surface-2); }
.msg .time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.msg .ch { color: var(--text-secondary); font-size: 12px; }
.msg .from { font-weight: 600; }
.msg .from .realm { font-weight: 400; color: var(--text-muted); }
.msg.me .from { color: var(--accent); }
.msg .body { overflow-wrap: anywhere; }

.simc { max-height: 360px; overflow: auto; margin: 0; font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  background: var(--surface-2); border-radius: 8px; padding: 10px; color: var(--text-secondary); white-space: pre; }

/* Recomendados (coluna da tabela de equipamento) */
.recs { display: flex; flex-direction: column; gap: 2px; font-size: 11px; line-height: 1.3; min-width: 220px; max-width: 320px; }
.rec { display: flex; align-items: center; gap: 4px; text-decoration: none; min-width: 0; }
.rec:hover .nm { text-decoration: underline; }
.rec .n { width: 14px; flex: none; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rec.have .n { color: var(--good); font-weight: 700; }
.rec img { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.rec .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.rec .src { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 0; min-width: 40px; }
.rec .src::before { content: "· "; }
.rec.have { opacity: .7; }
/* Onde conseguir upgrades */
.places { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.places li { counter-increment: p; padding: 10px 0 10px 34px; border-top: 1px solid var(--grid); position: relative; }
.places li:first-child { border-top: 0; }
.places li::before { content: counter(p); position: absolute; left: 0; top: 10px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.places li:first-child::before { background: var(--accent); color: #fff; border-color: transparent; }
.places .ph { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.places .cnt { margin-left: auto; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.places .chip { text-decoration: none; font-weight: 550; white-space: normal; }
.places .chip i { color: var(--text-muted); font-weight: 400; font-style: normal; }

/* Gráfico de evolução */
.chart { position: relative; height: 240px; margin-top: 8px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--text-muted); font-size: 11px; }
.chart .axis.sub { font-size: 10px; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.adj { stroke-dasharray: 5 4; opacity: .55; }
.chart .dot { fill: var(--series-1); stroke: var(--surface-1); stroke-width: 2; }
.chart .dot.raid { fill: var(--surface-1); stroke: var(--series-1); }
.chart .cross { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.my-kpis { margin-bottom: 4px; }
.btn-row { align-items: center; }
.seg { display: inline-flex; gap: 4px; }
.seg button { padding: 2px 10px; font-size: 12px; border-radius: 999px; }
.seg button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-1)); }
.chart .legend { position: absolute; right: 0; top: -4px; display: flex; gap: 12px; font-size: 11px; color: var(--text-muted); }
.chart { padding-top: 14px; }
.chart:has(.empty-note) { height: auto; }
.legend .sw { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--series-1); vertical-align: middle; margin-right: 4px; }
.legend .sw.adj { border-top-style: dashed; opacity: .6; }
.legend .sw.ring { width: 8px; height: 8px; border: 2px solid var(--series-1); border-radius: 50%; }
.my-kpis .kpi { background: var(--surface-2); }
.kpi .value.good { color: var(--good); } .kpi .value.warn { color: var(--warning); }

/* Diagnóstico */
.tips { margin: 8px 0 14px; padding-left: 20px; font-size: 13px; line-height: 1.5; }
.tips li { margin: 4px 0; }
.tips li:first-child { font-weight: 600; }
.tal > div { margin: 6px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.pick-row { cursor: pointer; }
.tbl tr.pick-row.sel td { background: color-mix(in srgb, var(--accent) 12%, var(--surface-1)); }
.tbl tr.nolog td { opacity: .75; }
.eff-list { max-height: 420px; overflow-y: auto; }
.chk { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; }

/* Abas principais */
.nav { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.nav button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  padding: 8px 14px; color: var(--text-secondary); font-weight: 550; white-space: nowrap; margin-bottom: -1px; }
.nav button:hover { color: var(--text-primary); }
.nav button[aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--accent); }
.nav .count { font-size: 11px; color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.nav .dot::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%;
  background: var(--accent); vertical-align: middle; }
.panel { align-items: start; }
.panel[hidden] { display: none; }

.toast { position: fixed; right: 20px; bottom: 20px; background: var(--text-primary); color: var(--surface-1);
  padding: 10px 14px; border-radius: 10px; font-size: 13px; opacity: 0; transform: translateY(8px);
  transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

.tip { position: fixed; z-index: 20; max-width: 320px; pointer-events: none; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px;
  box-shadow: 0 6px 24px rgb(0 0 0 / .18); white-space: pre-line; color: var(--text-secondary); }
.tip b { color: var(--text-primary); }

.player-info { font-size: 13px; color: var(--text-secondary); margin: 4px 0 8px; }
.player-info b { color: var(--text-primary); }

.btn-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* site (Django): links-botão, formulários, páginas de conta */
a.btn { display: inline-block; text-decoration: none; color: var(--text-primary); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; font-size: 14px; }
a.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
form.inline { display: inline; margin: 0; }
.status { flex-wrap: wrap; justify-content: flex-end; }
.page { max-width: 880px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.page .card p { margin: 6px 0; color: var(--text-secondary); }
.page ol { margin: 6px 0 0; padding-left: 20px; color: var(--text-secondary); }
.page ol li { margin: 8px 0; }
.page code, .page pre { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.page pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px;
  white-space: pre-wrap; word-break: break-all; margin: 8px 0; }
.page code { background: var(--surface-2); border-radius: 4px; padding: 1px 4px; }
.form { display: grid; gap: 10px; max-width: 360px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.form input, .row-form input { font: inherit; color: var(--text-primary); background: var(--surface-1);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.errorlist { color: var(--critical); margin: 0; padding-left: 18px; font-size: 13px; }
.helptext, .form .helptext { font-size: 12px; color: var(--text-muted); }
.msg { border-radius: 8px; padding: 10px 12px; background: var(--good-bg); color: var(--good); }
.msg.info { background: var(--surface-2); color: var(--text-secondary); }
.token-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.token-box code { font-size: 14px; padding: 6px 8px; user-select: all; }
.auth { max-width: 380px; margin: 8vh auto; padding: 16px; }
.auth h1 { margin-bottom: 4px; }

/* Leveling (Forever) */
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tips li { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--border); font-size: 14px; }
.tips li.crit { border-left-color: var(--critical); }
.tips li.warn { border-left-color: var(--warning, #d6a02a); }
.tips .tip-tag { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.tbl.kv th { width: 40%; color: var(--text-secondary); font-weight: 500; font-size: 13px; }
ul.plain { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.skill { margin-bottom: 10px; font-size: 13px; }
.skill .row { display: flex; justify-content: space-between; }
.small { font-size: 12px; }

/* Mapa (Forever) */
.map-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.map-f { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: 12px; }
.map-f.off { opacity: .45; }
.map-box { position: relative; width: 100%; aspect-ratio: 1002 / 668; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); }
.map-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.map-grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 10% 10%; opacity: .35; }
.mk { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700;
  line-height: 1; color: #fff; background: #555; border: 1.5px solid rgba(0,0,0,.6); box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.map-box .mk { position: absolute; transform: translate(-50%, -50%); cursor: default; }
.mk.m-turnin { background: #e0a800; color: #222; }
.mk.m-obj { background: #d64545; width: 12px; height: 12px; font-size: 0; }
.mk.m-explore { background: #8a5cd6; }
.mk.m-avail { background: #f2c94c; color: #222; }
.mk.m-svc { background: #2a78d6; }
.mk.m-me { width: 16px; height: 16px; background: #22c55e; border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(34,197,94,.45); z-index: 5; }
ul.plain .mk { width: 16px; height: 16px; font-size: 10px; vertical-align: -3px; }

.map-box.leaf { aspect-ratio: auto; height: min(70vh, 640px); background: #0b1620; }
.map-box.leaf .mk { position: static; transform: none; }
.map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 12px; }
.map-tools input[type=range] { vertical-align: middle; width: 120px; }
.leaflet-tooltip { font-size: 12px; }

.map-label span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 600 13px/1.2 Georgia, serif;
  color: #ffe9a8; text-shadow: 0 0 3px #000, 0 0 6px #000; letter-spacing: .03em; pointer-events: none; }

.mk.m-grave { background: #868e96; }
.mk.m-rare { background: #ae3ec9; }
.mk.m-elite { background: #f08c00; color: #222; }
.map-quests { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.map-q { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: 12px; }
.map-q.off { opacity: .45; }
.map-q .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }

/* ficha de NPC */
.npc-card .npc-back { margin-bottom: 8px; }
.npc-name { margin: 0; font-size: 17px; }
.npc-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.npc-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.npc-tabs button { font-size: 12px; padding: 4px 10px; }
.npc-tabs button.on { border-color: var(--accent); color: var(--accent); }
.npc-loot td { padding: 5px 6px; }
.chance { position: relative; min-width: 74px; height: 18px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.chance i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.chance b { position: relative; font-weight: 600; font-size: 12px; padding: 0 6px; line-height: 18px; }
.tag-q { font-size: 10px; text-transform: uppercase; padding: 0 5px; border-radius: 4px; background: #f2c94c; color: #222; }
.npc-spells li { display: block; padding: 4px 0; }
.npc-spells .ico, .npc-loot .ico { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; border-radius: 3px; }
.leaflet-interactive { cursor: pointer; }

.npc-more { margin-top: 8px; font-size: 13px; }
.npc-more summary { cursor: pointer; color: var(--text-secondary); padding: 4px 0; }

.npc-target { margin: 4px 0 8px; font-size: 12px; color: var(--text-secondary); }
.tag-t { font-size: 10px; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: #d6336c; color: #fff; }
.hpbar { position: relative; height: 16px; margin-top: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.hpbar i { position: absolute; inset: 0 auto 0 0; background: #2f9e44; opacity: .55; }
.hpbar b { position: relative; padding: 0 6px; font-size: 11px; line-height: 16px; }

.mk.m-target { background: #d6336c; box-shadow: 0 0 0 4px rgba(214,51,108,.35); }
.npc-note { font-size: 12px; margin: 6px 0; padding: 6px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-secondary); }
.npc-note.warn { border-left: 3px solid var(--warning, #d6a02a); }

.mk-img { display: inline-grid; place-items: center; width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.8)); }
.mk-img img { width: 22px; height: 22px; object-fit: contain; }
.mk-img.sm, .mk-img.sm img { width: 16px; height: 16px; vertical-align: -3px; }
.mk-img.noimg { width: 18px; height: 18px; border-radius: 50%; background: #555; color: #fff; font-size: 11px; font-weight: 700; }
.mk-img.m-target img { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.25); } }

.npc-model { position: relative; height: 240px; margin: 8px 0; border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, #3a4250 0%, #161a20 75%); }
.npc-model canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.npc-model-msg { position: absolute; inset: 0; display: grid; place-items: center; color: #cfd6e0; }
.npc-variants { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.npc-variants button { font-size: 11px; padding: 2px 8px; }
.npc-variants button.on { border-color: var(--accent); color: var(--accent); }

.mk.m-live { width: 14px; height: 14px; font-size: 0; background: #40c057; border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(64,192,87,.35); }
.mk.m-live.hostile { background: #e03131; box-shadow: 0 0 0 3px rgba(224,49,49,.35); }
.mk.m-live.dead { background: #868e96; box-shadow: none; opacity: .8; }
ul.plain .mk.m-live { width: 10px; height: 10px; vertical-align: 0; }

.me-arrow { display: block; width: 26px; height: 26px; transition: transform .4s ease; filter: drop-shadow(0 0 2px #000); }
.me-arrow svg path { fill: #ffd43b; stroke: #000; stroke-width: 1.5; }
.me-arrow.nofacing svg path { fill: #22c55e; }
.mk.m-step { width: auto; min-width: 20px; padding: 0 4px; box-sizing: border-box; border-radius: 10px; height: 20px; font-size: 11px; background: #3b3218; color: #f2c94c; border: 2px solid #f2c94c; }
.mk.m-step.on { background: #f2c94c; color: #222; box-shadow: 0 0 0 4px rgba(242,201,76,.35); }
.mk.m-step.arrow { background: #ff7a1a; border-color: #fff; color: #fff; box-shadow: 0 0 0 4px rgba(255,122,26,.45); }
ol.rxp-steps { counter-reset: none; }
ol.rxp-steps li { display: block; padding: 3px 0; }
ol.rxp-steps li.on { font-weight: 600; }
ol.rxp-steps .mk.m-step { width: auto; min-width: 18px; height: 18px; font-size: 10px; vertical-align: -3px; }
.mk.m-party { width: 14px; height: 14px; font-size: 0; border: 2px solid #fff; }
.mk.m-pin { background: #e8590c; }

/* mapa em tela cheia */
.card:fullscreen, .card.pseudo-full { display: flex; flex-direction: column; padding: 10px 14px; background: var(--surface-1); overflow: auto; }
.card.pseudo-full { position: fixed; inset: 0; z-index: 9000; border-radius: 0; }
.card:fullscreen .map-box.leaf, .card.pseudo-full .map-box.leaf { flex: 1; height: auto; min-height: 0; }
.card:fullscreen #mapCredit, .card.pseudo-full #mapCredit { display: none; }
.map-exit { display: none; position: absolute; top: 10px; right: 10px; z-index: 1000; font-size: 16px; line-height: 1;
  padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.card:fullscreen .map-exit, .card.pseudo-full .map-exit { display: block; }

.map-float { position: absolute; top: 56px; right: 10px; z-index: 1000; width: min(290px, 36vw); max-height: calc(100% - 70px);
  display: flex; flex-direction: column; background: color-mix(in srgb, var(--surface-1) 94%, transparent);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); backdrop-filter: blur(4px); }
.map-float-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 12px;
  color: var(--text-secondary); border-bottom: 1px solid var(--border); cursor: default; }
.map-float-head button { padding: 0 8px; font-size: 14px; }
.map-float #mapLists { overflow: auto; padding: 8px 10px; }
.map-float.min #mapLists { display: none; }
.map-float .npc-model { height: 130px; }
/* caixa flutuante compacta */
.map-float #mapLists { font-size: 11.5px; padding: 6px 8px; }
.map-float .map-float-head { padding: 4px 8px; font-size: 11px; }
.map-float .gone-h { font-size: 10.5px; margin: 6px 0 3px; }
.map-float ul.plain, .map-float ol.rxp-steps { gap: 2px; font-size: 11.5px; }
.map-float ol.rxp-steps li, .map-float .npc-spells li { padding: 1px 0; }
.map-float .npc-name { font-size: 14px; }
.map-float .npc-facts { gap: 4px; margin: 4px 0 6px; }
.map-float .chip { font-size: 10.5px; padding: 0 6px; }
.map-float .npc-tabs button { font-size: 10.5px; padding: 2px 7px; }
.map-float .npc-back { font-size: 11px; padding: 2px 8px; margin-bottom: 4px; }
.map-float .npc-loot td { padding: 3px 4px; font-size: 11px; }
.map-float .npc-loot th { font-size: 10px; padding: 3px 4px; }
.map-float .npc-loot .ico, .map-float .npc-spells .ico { width: 14px; height: 14px; }
.map-float .chance { min-width: 54px; height: 14px; }
.map-float .chance b { font-size: 10px; line-height: 14px; }
.map-float .hpbar { height: 12px; }
.map-float .hpbar b { font-size: 10px; line-height: 12px; }
.map-float .mk, .map-float .mk-img.sm, .map-float .mk-img.sm img { transform: scale(.85); }
.map-float p.small { font-size: 10px; }

/* dinheiro (bolsas: vendedor / leilão) */
.money { white-space: nowrap; }
.money a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--text-muted); }
.m-g { color: #c9a227; } .m-s { color: #9aa3ad; } .m-c { color: #b87333; }
#bags span.good { color: var(--good); font-weight: 600; }
#ahInfo { margin: -4px 0 8px; }
.route-scale { display: inline-flex; gap: 4px; align-items: center; margin-left: 6px; font-size: 11px; }
.route-scale i { display: inline-block; width: 18px; height: 6px; border-radius: 3px; }
