:root {
  --bg: #0b0b0f;
  --bg-2: #121219;
  --panel: #16161f;
  --panel-2: #1c1c27;
  --line: #2a2a38;
  --text: #e9e6df;
  --muted: #9a96a6;
  --dim: #6c6878;
  --gold: #e8b54d;
  --gold-2: #f6d58e;
  --accent: #2f6fdf;
  --up: #3ecf7a;
  --down: #f0555f;
  --blue: #5aa9ff;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);

  --q-poor: #9d9d9d; --q-common: #ffffff; --q-uncommon: #1eff00; --q-rare: #0070dd; --q-epic: #a335ee; --q-legendary: #ff8000;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(47, 111, 223, .16), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(232, 181, 77, .08), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, sans-serif;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: 'JetBrains Mono', monospace; font-size: .9em; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
h1, h2, h3 { font-family: Cinzel, Georgia, serif; letter-spacing: .02em; margin: 0; }
h2 { font-size: 1.05rem; color: var(--gold-2); }
.mono, .num { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(16px, calc((100vw - 1240px) / 2));
  background: rgba(11, 11, 15, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-name { font-family: Cinzel, serif; font-weight: 800; font-size: 1.2rem; color: var(--gold); white-space: nowrap; }
.nav { display: flex; gap: 4px; overflow-x: auto; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a.active { color: var(--gold-2); background: var(--panel-2); }

.demo-banner { background: #2a1d08; color: var(--gold-2); border-bottom: 1px solid #4a3410; text-align: center; padding: 7px 16px; font-size: .85rem; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px 16px 48px; flex: 1; }
.loading, .empty { color: var(--muted); padding: 40px 0; text-align: center; }
.footer { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding: 16px max(16px, calc((100vw - 1240px) / 2)); color: var(--dim); font-size: .8rem; border-top: 1px solid var(--line); }

/* ---------- layout ---------- */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-2, .g-main { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .g-3, .g-4 { grid-template-columns: 1fr 1fr; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt { margin-top: 16px; }

.panel { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head .sub { color: var(--muted); font-size: .8rem; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); padding: 36px 28px; margin-bottom: 20px;
  background: linear-gradient(120deg, rgba(47, 111, 223, .35), rgba(12, 14, 22, .9) 55%), repeating-linear-gradient(45deg, rgba(255, 255, 255, .02) 0 2px, transparent 2px 10px), var(--panel); }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); color: var(--gold); text-shadow: 0 2px 0 #000, 0 0 30px rgba(232, 181, 77, .25); line-height: 1.1; }
.hero .tagline { color: var(--muted); margin: 8px 0 16px; font-style: italic; }
.hero img.crest { position: absolute; right: -20px; top: 50%; transform: translateY(-50%); width: 240px; opacity: .12; pointer-events: none; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .35); color: var(--text); }
.badge.pvp { border-color: var(--accent); color: #8ab4ff; }
.badge.horde { border-color: #8c1c1c; color: #ff6b6b; }
.badge.alliance { border-color: #1c4c8c; color: #78b0ff; }
.badge.gold { border-color: #6b5016; color: var(--gold-2); }

/* ---------- stat tiles ---------- */
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.tile .label { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.tile .value { font-size: 1.6rem; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .hint { color: var(--dim); font-size: .8rem; margin-top: 2px; }

.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--muted); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; user-select: none; }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--text); }
th.sorted::after { content: ' ▾'; color: var(--gold); }
th.sorted.asc::after { content: ' ▴'; }
td.num, th.num { text-align: right; }
tbody tr:hover { background: rgba(255, 255, 255, .025); }
tbody tr.clickable { cursor: pointer; }

.char { font-weight: 700; }
.rank-pill { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); padding: 1px 8px; border-radius: 999px; }

/* class colors */
.c-warrior { color: #c69b6d; } .c-paladin { color: #f48cba; } .c-hunter { color: #aad372; } .c-rogue { color: #fff468; }
.c-priest { color: #ffffff; } .c-shaman { color: #0070dd; } .c-mage { color: #3fc7eb; } .c-warlock { color: #8788ee; }
.c-druid { color: #ff7c0a; } .c-death-knight { color: #c41e3a; }
.q-poor { color: var(--q-poor); } .q-common { color: var(--q-common); } .q-uncommon { color: var(--q-uncommon); }
.q-rare { color: var(--q-rare); } .q-epic { color: var(--q-epic); } .q-legendary { color: var(--q-legendary); }

/* money */
.money { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money .g { color: #f2c94c; } .money .s { color: #c7ced6; } .money .c { color: #d0874a; }
.money i { font-style: normal; font-size: .75em; margin: 0 3px 0 1px; opacity: .85; }

/* inputs */
.input, .select { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); padding: 8px 10px; border-radius: 8px; font: inherit; font-size: .9rem; min-width: 0; }
.input:focus, .select:focus { outline: 2px solid rgba(232, 181, 77, .5); outline-offset: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; color: var(--muted); padding: 6px 12px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--panel-2); color: var(--gold-2); }
.btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); padding: 7px 12px; border-radius: 8px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.btn:hover { border-color: var(--gold); }
.btn.on { color: var(--gold-2); border-color: var(--gold); }

/* ---------- honor board ---------- */
.countdown { display: flex; gap: 8px; }
.countdown .cd { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; text-align: center; min-width: 58px; }
.countdown .cd b { display: block; font-family: 'JetBrains Mono', monospace; font-size: 1.3rem; color: var(--gold-2); }
.countdown .cd span { font-size: .65rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; margin: 8px 0 20px; }
.podium .step { text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 16px 10px; background: var(--panel); min-width: 0; }
.podium .step .place { font-family: Cinzel, serif; font-weight: 800; font-size: 1.8rem; }
.podium .step .who { font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .step .hk { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; color: var(--text); }
.podium .p1 { padding-top: 28px; border-color: #8a6a1f; background: linear-gradient(180deg, rgba(232, 181, 77, .18), var(--panel)); }
.podium .p1 .place { color: var(--gold); }
.podium .p2 .place { color: #c9d1d9; }
.podium .p3 .place { color: #cd7f32; }
@media (max-width: 520px) { .podium { grid-template-columns: 1fr; } .podium .p1 { order: -1; } }

.bar { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 99px; }

.medal { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: .75rem; font-weight: 800; background: var(--panel-2); color: var(--muted); }
.medal.m1 { background: #6b5016; color: var(--gold-2); } .medal.m2 { background: #3d434a; color: #e6edf3; } .medal.m3 { background: #5a3a1a; color: #f0b27a; }

/* ---------- market ---------- */
.tape { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #08080b; margin-bottom: 16px; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.tape-inner { display: inline-flex; gap: 28px; padding: 9px 0; white-space: nowrap; animation: tape 90s linear infinite; }
.tape:hover .tape-inner { animation-play-state: paused; }
.tape a { color: var(--text); font-size: .85rem; }
.tape a b { font-weight: 600; margin-right: 6px; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape-inner { animation: none; } }

.big-num { font-size: 2.2rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; line-height: 1.1; }
.chg { font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.signal { display: inline-block; font-weight: 800; letter-spacing: .1em; padding: 4px 12px; border-radius: 6px; font-size: .9rem; }
.signal.BUY { background: rgba(62, 207, 122, .15); color: var(--up); border: 1px solid rgba(62, 207, 122, .4); }
.signal.SELL { background: rgba(240, 85, 95, .15); color: var(--down); border: 1px solid rgba(240, 85, 95, .4); }
.signal.HOLD { background: rgba(154, 150, 166, .12); color: var(--muted); border: 1px solid var(--line); }
.chart-box { position: relative; height: 320px; }
.chart-box.sm { height: 180px; }
.chart-box.xs { height: 120px; }
canvas.spark { width: 90px; height: 26px; display: block; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.disclaimer { color: var(--dim); font-size: .78rem; margin-top: 10px; }

/* ---------- character ---------- */
.char-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.char-head h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.char-head .meta { color: var(--muted); }
.class-bars { display: flex; flex-direction: column; gap: 8px; }
.class-bars .cb { display: grid; grid-template-columns: 70px 1fr 28px; align-items: center; gap: 10px; font-size: .85rem; }
.class-bars .cb .bar > i { background: currentColor; }

/* ---------- auth ---------- */
.topbar { flex-wrap: wrap; }
.auth { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.auth .who { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.btn.sm { padding: 5px 10px; font-size: .8rem; }
.btn.bnet { background: #0074e0; border-color: #148eff; color: #fff; }
.btn.bnet:hover { background: #148eff; border-color: #fff; text-decoration: none; }
.nav a.locked::after { content: ' 🔒'; font-size: .7em; opacity: .7; }
.locked { max-width: 560px; margin: 40px auto; text-align: center; padding: 28px; }
.locked h2 { font-size: 1.4rem; margin-bottom: 10px; }
.locked p { margin: 10px 0; }
.lock-icon { font-size: 2.2rem; }
span.char { cursor: default; }

/* ---------- discord widget ---------- */
.btn.discord-btn { background: #5865f2; border-color: #7983f5; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.discord-btn:hover { background: #6f7af5; border-color: #fff; text-decoration: none; }
.discord { position: relative; overflow: hidden; gap: 0; background:
  radial-gradient(420px 160px at 100% 0%, rgba(88, 101, 242, .22), transparent 70%), linear-gradient(180deg, var(--panel), var(--bg-2)); }
.discord::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, #5865f2, #7983f5 60%, transparent); }
.d-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.d-head svg { flex: none; }
.d-title { min-width: 0; }
.d-kicker { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.d-head h2 { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .85rem; white-space: nowrap;
  padding: 4px 10px; border: 1px solid rgba(35, 165, 90, .45); background: rgba(35, 165, 90, .1); color: #5fd68f; border-radius: 999px; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #23a55a; }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #23a55a; opacity: 0; animation: dPulse 2s ease-out infinite; }
@keyframes dPulse { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse::after { animation: none; } }

.d-bar { display: flex; gap: 2px; height: 6px; border-radius: 99px; overflow: hidden; background: var(--bg-2); }
.d-bar i { display: block; min-width: 0; }
.d-bar i.on { background: #23a55a; } .d-bar i.idle { background: #f0b232; } .d-bar i.dnd { background: #f23f43; }
.d-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.d-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: .74rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .02); }
.d-chip.wow { color: #8ab4ff; border-color: rgba(47, 111, 223, .55); background: rgba(47, 111, 223, .12); }
.d-chip.idle { color: #f0b232; } .d-chip.dnd { color: #ff7a85; }
.d-section { margin: 14px 0 4px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.d-note { margin: 0 0 14px; color: var(--muted); font-size: .88rem; line-height: 1.5; }

.d-av { position: relative; flex: none; width: var(--s, 28px); height: var(--s, 28px); display: grid; place-items: center; border-radius: 50%;
  background: var(--panel-2); font-weight: 800; font-size: .72rem; color: var(--muted); }
.d-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.d-av .dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--panel); margin: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.dot.on, .dot.online { background: #23a55a; } .dot.idle { background: #f0b232; } .dot.dnd { background: #f23f43; }

.d-voice { border-left: 3px solid #5865f2; background: rgba(88, 101, 242, .08); padding: 8px 10px; margin-top: 6px; }
.d-vname { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; color: #aab2ff; }
.d-vname b { margin-left: auto; font-size: .75rem; color: var(--muted); }
.d-vlist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.d-vlist li { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; background: rgba(0, 0, 0, .25); border-radius: 999px; font-size: .8rem; max-width: 100%; }
.d-vlist li > span:not(.d-av) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted-ic { display: inline-flex; color: #f23f43; }

.d-list { list-style: none; margin: 0; padding: 0; max-height: 244px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.d-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(42, 42, 56, .6); min-width: 0; }
.d-list li:last-child { border-bottom: 0; }
.d-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.d-game { margin-left: auto; color: var(--dim); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42%; }
.d-tag { margin-left: auto; flex: none; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; }
.d-tag.wow { color: #8ab4ff; background: rgba(47, 111, 223, .18); border: 1px solid rgba(47, 111, 223, .5); }
.d-more { margin-top: 8px; font-size: .78rem; color: var(--dim); }

.d-actions { display: flex; gap: 8px; margin-top: 16px; }
.d-actions .discord-btn { flex: 1; }
.btn.d-copy { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn.d-copy:hover { border-color: #5865f2; color: var(--text); }
@media (max-width: 420px) { .d-copy span { display: none; } }
/* keep nav items on one baseline (the lock glyph has a taller line box) */
.nav { align-items: center; }
.nav a { display: inline-flex; align-items: center; gap: 4px; line-height: 1.2; }
.nav a.locked::after { content: ''; width: 9px; height: 10px; margin-left: 2px; opacity: .6;
  background: currentColor; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 10"><path d="M2 4V3a2.5 2.5 0 0 1 5 0v1h1v6H1V4zm1 0h3V3a1.5 1.5 0 0 0-3 0z"/></svg>') center/contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 10"><path d="M2 4V3a2.5 2.5 0 0 1 5 0v1h1v6H1V4zm1 0h3V3a1.5 1.5 0 0 0-3 0z"/></svg>') center/contain no-repeat; }

/* ---------- professions ---------- */
.prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.prof-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); }
.prof-card:hover { border-color: var(--gold); text-decoration: none; }
.prof-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 24px rgba(47, 111, 223, .2); background: linear-gradient(180deg, rgba(47, 111, 223, .14), var(--bg-2)); }
.pc-name { font-family: Cinzel, serif; font-weight: 800; color: var(--gold-2); font-size: .95rem; min-width: 0; overflow-wrap: anywhere; }
.pc-count { font-size: 1.7rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; grid-row: span 2; align-self: center; }
.pc-sub { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pc-best { grid-column: 1 / -1; margin-top: 8px; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.prof-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; color: var(--muted); text-decoration: none; }
.prof-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.prof-chip:hover { border-color: var(--gold); color: var(--text); text-decoration: none; }
.prof-chip.on { border-color: var(--accent); color: var(--text); background: rgba(47, 111, 223, .14); }
.skill { display: flex; align-items: center; gap: 10px; }
.skill .bar { flex: 1; min-width: 90px; }
.skill .bar.maxed > i { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.skill .mono { white-space: nowrap; font-size: .85rem; }
.recipe-list { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; }
.recipe-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
[data-tip] { cursor: help; }
.recipe-list li:last-child { border-bottom: 0; }
.rc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-name { font-weight: 700; }
.rc-crafters { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: .86rem; }
.rc-crafter { font-weight: 600; text-decoration: none; }
.rc-crafter:hover { text-decoration: underline; }
.prof-rows { display: flex; flex-direction: column; }
.prof-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 90px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.prof-row:last-child { border-bottom: 0; }
.prof-row:hover { background: rgba(255, 255, 255, .02); text-decoration: none; }
.pr-name { font-weight: 600; } .pr-rc { text-align: right; font-size: .8rem; }
@media (max-width: 600px) { .prof-row { grid-template-columns: 1fr; gap: 4px; } .pr-rc { text-align: left; } }

/* ---------- level board ---------- */
.lv-list { list-style: none; margin: 0; padding: 0; }
.lv-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.lv-list li:last-child { border-bottom: 0; }
.lv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.lv-right { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.lv-lvl { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .9rem; }
.lv-tag { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1200; font-weight: 800; font-size: .72rem; padding: 1px 7px; border-radius: 4px; }
.lv-when { font-size: .75rem; }
.lv-bar { height: 4px; margin-top: 6px; min-width: 0; }
.lv-divider { border-bottom: 0 !important; padding: 10px 0 0 !important; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

/* ---------- equipped gear (paper doll) ---------- */
.gear-stats { align-items: start; }
.doll-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.doll-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.doll-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.slot { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 6px 4px 4px; border-radius: 8px; border: 1px solid transparent; cursor: default; }
.slot[data-gear] { cursor: help; }
.slot[data-gear]:hover, .slot[data-gear]:focus-visible { background: rgba(255, 255, 255, .05); border-color: var(--line); outline: none; }
.slot.empty { opacity: .45; }
.gi { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 7px; overflow: hidden;
  background: #0b0b12; border: 2px solid var(--qc, var(--line)); box-shadow: 0 0 10px -2px var(--qc, transparent), inset 0 0 0 1px rgba(0, 0, 0, .6); }
.gi img { width: 100%; height: 100%; display: block; object-fit: cover; }
.gi b { font-family: Cinzel, serif; font-size: 1.1rem; color: var(--qc); }
.gi.empty { border-style: dashed; box-shadow: none; }
.si { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sn { font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss { font-size: .74rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .doll-cols { grid-template-columns: 1fr; } }

/* item tooltip (WoW style) */
#item-tip { position: fixed; z-index: 1000; display: none; min-width: 230px; max-width: 320px; padding: 10px 12px; pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 14, 24, .98), rgba(6, 6, 12, .98)); border: 1px solid #5a5a70; border-radius: 6px;
  box-shadow: 0 0 0 1px #000, 0 14px 40px rgba(0, 0, 0, .7); font-size: 13px; line-height: 1.45; color: #fff; }
#item-tip .tt-name { font-size: 15px; font-weight: 700; margin-bottom: 1px; }
#item-tip .tt-row { display: flex; justify-content: space-between; gap: 18px; }
#item-tip .tt-gold { color: #ffd100; }
#item-tip .tt-green { color: #1eff00; }
#item-tip .tt-miss { color: #8a8a96; }
#item-tip .tt-have { color: #ffff98; }
#item-tip .tt-set { margin-top: 8px; }
#item-tip .tt-set > div { padding-left: 8px; }
#item-tip .tt-set > div:first-child { padding-left: 0; }
#item-tip .tt-desc { margin-top: 6px; }
#item-tip .tt-reagent { display: flex; align-items: center; gap: 6px; padding-left: 8px; }
#item-tip .tt-reagent img { border-radius: 3px; }
#item-tip .tt-sell { margin-top: 6px; display: flex; align-items: center; gap: 6px; color: #d8d8e0; }

/* ---------- character stats ---------- */
.panel.stats { display: flex; flex-direction: column; gap: 12px; }
.vitals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vital { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 10px 12px 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.vital::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--vc), color-mix(in srgb, var(--vc) 45%, #000)); }
.vital .vl { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.vital .vv { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.sc { background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--sc, var(--line)); border-radius: 8px; padding: 10px 12px 8px; min-width: 0; }
.sc-h { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sc, var(--muted)); margin-bottom: 4px; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.sc-grid > .sc:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 4px 10px; padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, .05); font-size: .88rem; }
.sr:first-of-type { border-top: 0; }
.sl { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.sv small { display: block; font-weight: 400; font-size: .7rem; color: var(--dim); }
.sd { font-size: .72rem; font-weight: 700; min-width: 40px; text-align: right; white-space: nowrap; }
.vital .sd { position: absolute; top: 10px; right: 12px; min-width: 0; }
.at { display: grid; grid-template-columns: 76px minmax(0, 1fr) 46px 44px; align-items: center; gap: 8px; padding: 4px 0; font-size: .88rem; }
.at .al { color: var(--muted); }
.at .ab { height: 8px; background: rgba(255, 255, 255, .07); border-radius: 99px; overflow: hidden; }
.at .ab i { display: block; height: 100%; background: linear-gradient(90deg, #2a58b8, var(--accent)); border-radius: 99px; }
.at.main .ab i { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.at.main .al { color: var(--gold-2); font-weight: 700; }
.at .av { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.rchips { display: flex; flex-wrap: wrap; gap: 6px; }
.rchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: .8rem; border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--rc) 10%, transparent); }
.rchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }
.rchip b { font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .vitals { grid-template-columns: 1fr 1fr; } .vital:last-child { grid-column: 1 / -1; } .at { grid-template-columns: 70px minmax(0, 1fr) 40px 40px; } }
