/* Cinzel and Inter, bundled (SIL Open Font License, static/fonts/OFL.txt): the page makes no outside request. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 600; font-display: swap; src: url(fonts/cinzel-latin-600.woff2) format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 700; font-display: swap; src: url(fonts/cinzel-latin-700.woff2) format("woff2"); }

/* SquidBots: a dark, gold-trimmed control room.
 *
 * Everything is drawn in CSS: dark stone panels with gold hairlines and bevelled red buttons.
 * No game art is used or loaded.
 */
:root {
  color-scheme: dark;
  /* The SquidBots launcher's "Abyss" palette (launcher/public/css/abyss.css). */
  --page: #020a11;
  --page-glow: rgba(63, 224, 197, .10);
  --surface: #0c171e;
  --surface-2: rgba(19, 42, 56, .55);
  --surface-3: rgba(25, 55, 72, .6);
  --text-primary: #e4f3f4;
  --text-secondary: #b6d3d6;
  --text-muted: #92b3ba;
  --border: rgba(106, 237, 234, .26);
  --hairline: rgba(106, 237, 234, .13);
  --grid: #10242f;
  --axis: #2b4f5c;
  --gold: #e8b04a;
  --gold-bright: #f6cf72;
  --gold-deep: #b9802a;
  --blood: #0e6c63;
  --blood-deep: #083c42;
  --alliance: #4b8df0;
  --horde: #e2503d;
  --accent: #3fe0c5;
  --accent-deep: #0e6c63;
  --accent-ink: #032320;
  --accent-glow: rgba(63, 224, 197, .38);
  --tint: rgba(138, 255, 249, .06);
  --tint-strong: rgba(138, 255, 249, .12);
  --well: rgba(6, 12, 15, .62);
  --input: rgba(5, 9, 11, .75);
  --good: #4ade9c;
  --bad: #ff6b7a;
  --mana: #3a73e8;
  --rare: #3b8cff;
  --epic: #b36df2;
  --legendary: #ff8a1e;
  --shadow: 0 14px 34px rgba(0, 0, 0, .4);
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --radius: 14px;
  --nav-width: 232px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  font: 14px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 600px at 60% -200px, var(--page-glow), transparent 70%),
    radial-gradient(900px 700px at -10% 110%, rgba(120, 30, 16, .16), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 6px),
    var(--page);
  background-attachment: fixed;
}
.num { font-variant-numeric: tabular-nums; }
a { color: var(--gold); }

/* ---------- app frame ---------- */
.app { display: grid; grid-template-columns: var(--nav-width) minmax(0, 1fr); min-height: 100vh; }
.content { padding: 0 28px 48px; min-width: 0; }
.page { max-width: 1400px; }
.page[hidden] { display: none; }

/* ---------- side nav ---------- */
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px; padding: 18px 12px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0) 85%, rgba(0, 0, 0, .35)),
    linear-gradient(180deg, #1c150e, #110d09 60%, #0d0a07);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 rgba(0, 0, 0, .7), 8px 0 30px rgba(0, 0, 0, .45);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 18px; margin-bottom: 8px;
  text-decoration: none; border-bottom: 1px solid var(--hairline); }
.crest {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 22px;
  background: radial-gradient(circle at 35% 30%, #5a1a10, #2a0a05 70%);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 2px #1a0f06, 0 0 14px rgba(63, 224, 197, .25), inset 0 0 10px rgba(0, 0, 0, .7);
}
.brand-words { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: .02em;
  color: var(--text-primary); text-shadow: 0 2px 2px #000; line-height: 1.1; }
.brand-name b { color: var(--gold-bright); }
.tagline { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.nav-link {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 4px;
  font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .03em;
  color: var(--text-secondary); text-decoration: none; border: 1px solid transparent;
  text-shadow: 0 1px 1px #000;
}
.nav-link:hover { color: var(--gold-bright); background: rgba(106, 237, 234, .06); border-color: var(--hairline); }
.nav-link[aria-current="page"] {
  color: var(--gold-bright);
  background: linear-gradient(90deg, rgba(14, 108, 99, .55), rgba(14, 108, 99, .08));
  border-color: var(--border);
  box-shadow: inset 3px 0 0 var(--gold-bright), 0 0 16px rgba(63, 224, 197, .08);
}

/* A 32px icon in a gold rim. Client art fills it; otherwise a glyph stands in. */
.ico {
  width: 32px; height: 32px; flex: none; border-radius: 4px; display: grid; place-items: center;
  font-style: normal; font-size: 17px; line-height: 1;
  background: #06121a center / cover no-repeat;
  border: 1px solid var(--gold-deep);
  box-shadow: 0 0 0 1px #000, inset 0 0 6px rgba(0, 0, 0, .8);
}
.ico[data-icon="world"]::before { content: "🗺"; }
.ico[data-icon="bots"]::before { content: "👥"; }
.ico[data-icon="stats"]::before { content: "📜"; }
.ico[data-icon="chat"]::before { content: "💬"; }
.ico[data-icon="pvp"]::before { content: "⚔"; }
.ico[data-icon="settings"]::before { content: "⚙"; }

/* Class icons (class-<id>.png), drawn only with the client art. */

/* ---------- top bar ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 26px 0 20px; }
.topbar h1 {
  margin: 0 auto 0 0; font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: .03em;
  color: var(--gold-bright); line-height: 1.1;
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(63, 224, 197, .25);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 3px;
  background: rgba(10, 8, 6, .75); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary);
}
.pill.quiet { color: var(--text-muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; box-shadow: 0 0 6px currentColor; color: var(--good); }
.dot.off { background: var(--bad); color: var(--bad); }
.dot.live { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dot.live { animation: none; } }

/* ---------- buttons ---------- */
.btn, button.ghost, button.primary {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .05em;
  color: #ffd66b; text-shadow: 0 1px 1px #000; cursor: pointer; white-space: nowrap;
  min-height: 28px; padding: 5px 16px; border-radius: 3px;
  background: linear-gradient(180deg, #a52414, #6e1409 55%, #4d0c06);
  border: 1px solid #1c0603;
  box-shadow: inset 0 1px 0 rgba(255, 190, 140, .35), inset 0 -2px 0 rgba(0, 0, 0, .35),
              0 0 0 1px rgba(106, 237, 234, .45), 0 2px 4px rgba(0, 0, 0, .6);
}
.btn:hover, button.ghost:hover, button.primary:hover { filter: brightness(1.18); color: #ffe7a3; }
.btn:active, button.ghost:active, button.primary:active { transform: translateY(1px); filter: brightness(.9); }
.btn:disabled, button.ghost:disabled, button.primary:disabled {
  cursor: default; filter: grayscale(.9) brightness(.7); color: #b8ad95; transform: none; }
.btn.small { min-height: 24px; padding: 3px 11px; font-size: 11px; }

/* ---------- panels ---------- */
.card {
  position: relative; margin-bottom: 20px; padding: 18px 20px;
  background: linear-gradient(180deg, rgba(10, 30, 42, .78), rgba(4, 14, 20, .82));
  border: 1px solid var(--border); border-radius: 4px; box-shadow: var(--shadow);
}
.card::before {
  /* a faint gold rule under the top edge, like an engraved bezel */
  content: ""; position: absolute; left: 10px; right: 10px; top: 3px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(63, 224, 197, .25), transparent);
}

.card > h2 {
  margin: 0 0 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .04em;
  color: var(--gold-bright); text-shadow: 0 1px 0 #000;
}
.card > h2.later { margin-top: 22px; }
.card > h2 .sub { font-family: var(--body); font-size: 12px; font-weight: 450; letter-spacing: 0; color: var(--text-muted); }
.grid { display: grid; gap: 20px; }
.grid > .card { margin-bottom: 0; }
.grid + .grid, .grid + .card { margin-top: 20px; }
@media (min-width: 980px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
  .grid.wide { grid-template-columns: 1.35fr 1fr; }
}

/* ---------- hero figures ---------- */
.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
@media (min-width: 700px) { .figures { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .figures { grid-template-columns: repeat(6, 1fr); } }
.figure {
  padding: 13px 15px 12px; border-radius: 4px;
  background: linear-gradient(180deg, rgba(12, 36, 48, .75), rgba(5, 16, 22, .82));
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.figure .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.figure .value { font-family: var(--display); font-size: 27px; font-weight: 700; margin-top: 5px; line-height: 1;
  color: var(--gold-bright); text-shadow: 0 2px 0 #000; }
.figure .foot { font-size: 12px; color: var(--text-secondary); margin-top: 7px; min-height: 18px; }

/* ---------- splits ---------- */
.splits { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.split { display: flex; height: 14px; border-radius: 2px; overflow: hidden; background: #03090d; gap: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .8), 0 0 0 1px var(--hairline); }
.split i { display: block; height: 100%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -3px 4px rgba(0, 0, 0, .35); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--text-secondary); }
.legend b { color: var(--text-primary); font-weight: 620; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; vertical-align: -1px; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: .07em;
  padding: 9px 8px; border-bottom: 1px solid var(--border); }
td { padding: 8px 8px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
tbody tr:hover td { background: rgba(106, 237, 234, .05); }
tbody tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.rank { color: var(--text-muted); width: 28px; font-variant-numeric: tabular-nums; }
.name { font-weight: 600; }
.meta { color: var(--text-muted); font-size: 12px; }
.faction-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.bar { position: relative; height: 8px; border-radius: 2px; background: #03090d; overflow: hidden; min-width: 56px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .8); }
.bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); }
.offline { opacity: .55; }
.empty { color: var(--text-muted); font-size: 13px; padding: 12px 2px; margin: 0; }
.scroll { overflow-x: auto; }

.banner { margin: 0 0 18px; padding: 11px 15px; border-radius: 3px; font-size: 13px;
  background: rgba(8, 60, 66, .55); border: 1px solid rgba(226, 80, 61, .45); color: var(--text-secondary); }
.banner strong { color: var(--text-primary); }

/* ---------- world page ---------- */
.world-layout { display: grid; gap: 20px; align-items: start; }
.world-layout > .card { margin-bottom: 0; min-width: 0; }
@media (min-width: 1180px) { .world-layout { grid-template-columns: minmax(0, 1fr) 330px; } }
.map-layout { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
#mapHolder { flex: 0 1 auto; position: relative; }
#mapZones { flex: 1 1 240px; min-width: 220px; max-height: 62vh; overflow-y: auto; }
.map-svg { height: 62vh; min-height: 360px; width: auto; max-width: 100%; display: block;
  border-radius: 10px; box-shadow: 0 0 0 1px var(--border), 0 10px 30px rgba(0, 0, 0, .6); }
@media (max-width: 700px) { .map-svg { height: auto; min-height: 0; width: 100%; } }
.zone-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 3px;
  font-size: 13px; cursor: pointer; border-top: 1px solid var(--hairline); }
.zone-row:first-child { border-top: 0; }
.zone-row:hover { background: rgba(106, 237, 234, .07); }
.zone-row.active { background: rgba(14, 108, 99, .35); box-shadow: inset 2px 0 0 var(--gold-bright); }
.zone-row .zn { flex: 1 1 auto; color: var(--text-secondary); }
.zone-row.has .zn { color: var(--text-primary); }
.zone-row .zc { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.zone-row .bar { width: 70px; height: 6px; }
.zone-row .bar i { display: block; height: 100%; }
.map-svg image { image-rendering: auto; }
.map-hit { fill: transparent; stroke: none; cursor: pointer; }
/* No map image (the public copy, or maps not extracted yet): the zone rectangles draw the continent. */
.map-svg.no-art .map-hit { fill: rgba(106, 237, 234, .05); stroke: var(--border); stroke-width: 1; }
.map-hit:hover { fill: rgba(63, 224, 197, .20); stroke: var(--gold-bright); stroke-width: 2; }
.map-hit.active { fill: rgba(63, 224, 197, .10); stroke: var(--gold-bright); stroke-width: 2; }
.map-crumb { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.map-bot { stroke: #050c11; stroke-width: 1px; vector-effect: non-scaling-stroke; cursor: pointer; }
.map-bot:hover, .map-bot:focus { stroke: var(--gold-bright); outline: none; }
.map-bot.stale { opacity: .55; }
.map-bot.focused { stroke: #fff; stroke-width: 2.5px; }
.map-bot.alliance { fill: var(--alliance); }
.map-bot.horde { fill: var(--horde); }
.map-empty { padding: 28px 4px; color: var(--text-muted); font-size: 13px; }
#mapElsewhere { margin-top: 10px; font-size: 12px; color: var(--text-muted); }

/* ---------- hover card (a WoW tooltip) ---------- */
.bot-card {
  position: absolute; z-index: 5; width: 250px; max-width: calc(100% - 8px);
  background: rgba(4, 14, 20, .94); color: var(--text-primary);
  border: 1px solid rgba(106, 237, 234, .3); border-radius: 5px; box-shadow: 0 8px 26px rgba(0, 0, 0, .7);
  padding: 9px 12px; font-size: 12.5px; pointer-events: none;
}

.bot-card.pinned { pointer-events: auto; border-color: var(--gold-bright); }
.bot-card .bc-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.bot-card .bc-lvl { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.bot-card .bc-who { color: var(--text-secondary); margin: 2px 0 8px; }
.bot-card .bc-task { font-weight: 600; margin-bottom: 8px; color: var(--gold-bright); }
.bot-card .bc-task.combat { color: var(--bad); }
.bot-card .bc-task.dead { color: var(--text-muted); }
.bot-card .bc-meter { display: grid; grid-template-columns: 52px 1fr 38px; align-items: center; gap: 6px; margin: 3px 0; color: var(--text-secondary); }
.bot-card .bc-meter b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.bot-card .bc-track, .focus-meter .bc-track { height: 8px; border-radius: 1px; background: #02070a; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .08); }
.bc-track i { display: block; height: 100%; }
.bc-track i.hp { background: linear-gradient(180deg, #4ee06f, #13891f); }
.bc-track i.pw { background: linear-gradient(180deg, #5f94ff, #1a3fb0); }
.bot-card .bc-line { margin-top: 6px; color: var(--text-secondary); }
.bot-card .bc-quests { margin-top: 6px; color: var(--text-secondary); }
.bot-card .bc-quests ul { margin: 2px 0 0; padding-left: 16px; }
.bot-card .bc-foot { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .08); color: var(--text-muted); font-size: 12px; }
.bot-card .bc-chat { margin-top: 6px; color: var(--text-secondary); }
.bot-card .bc-chat ul { list-style: none; margin: 2px 0 0; padding: 0; max-height: 180px; overflow-y: auto; }
.bot-card .bc-chat li { padding: 2px 0; overflow-wrap: anywhere; }
.bot-card .bc-chat time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.bot-card .bc-chat b { color: var(--text-primary); font-weight: 600; }
.bot-card .bc-chat p { margin: 2px 0 0; }
/* In the focus panels (World and Bots pages) the same card sits in the flow, not over the map. */
[data-focus-card] .bot-card { position: static; width: auto; max-width: none; pointer-events: auto; }

/* ---------- settings ---------- */
.settings-group { margin-top: 18px; }
.settings-group h3 { margin: 0 0 6px; padding-bottom: 5px; font-family: var(--display); font-size: 14px; font-weight: 700;
  letter-spacing: .04em; color: var(--gold); border-bottom: 1px solid var(--border); }
.settings-row { display: flex; align-items: flex-start; gap: 16px; padding: 10px 0; border-top: 1px solid var(--hairline); }
.settings-row:first-of-type { border-top: 0; }
.set-text { flex: 1 1 auto; min-width: 0; }
.settings-row label { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.set-help { margin: 2px 0 0; font-size: 12.5px; color: var(--text-secondary); max-width: 70ch; }
.set-warn { margin: 6px 0 0; padding: 5px 9px; font-size: 12px; color: #ffcf8a; max-width: 70ch;
  background: rgba(14, 108, 99, .28); border-left: 2px solid var(--gold-bright); }
.settings-row .key { display: block; margin-top: 3px; font-size: 10.5px; color: var(--text-muted); opacity: .8; }
.set-control { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 2px; }
.when { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.recipes { display: grid; gap: 14px; margin-top: 6px; }
@media (min-width: 980px) { .recipes { grid-template-columns: 1fr 1fr; } }
.recipe { padding: 12px 14px; border-radius: 3px; background: rgba(3, 10, 15, .55); border: 1px solid var(--border); }
.recipe-title { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--gold-bright); }
.recipe .meta { margin: 8px 0 0; }
.recipe-foot { margin-top: 10px; }
.recipe-done { margin: 8px 0 0; font-size: 12px; color: var(--good); }
table.diff { margin-top: 8px; font-size: 12.5px; }
table.diff td { padding: 4px 6px; }
table.diff .arrow { color: var(--gold); width: 18px; text-align: center; }
table.diff .to { color: var(--gold-bright); font-weight: 700; }
input, select {
  font: inherit; font-size: 13px; padding: 5px 9px; border-radius: 2px;
  border: 1px solid var(--border); background: #050c11; color: var(--text-primary);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8);
}
input:focus, select:focus { outline: none; border-color: var(--gold-bright); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8), 0 0 0 2px rgba(63, 224, 197, .18); }
.settings-row input, .settings-row select { width: 120px; }
.settings-row.changed input, .settings-row.changed select { border-color: var(--gold-bright); }
.set-missing { margin: 6px 0 0; font-size: 11px; color: var(--text-muted); }
.settings-actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
#settingsStatus { font-size: 12px; color: var(--text-muted); }
#settingsNotes { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.q3 { color: var(--rare); font-weight: 600; }
.q4 { color: var(--epic); font-weight: 600; }
.q5 { color: var(--legendary); font-weight: 600; }

/* ---------- watch and levels ---------- */
.watch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 4px; }
.watch div { padding: 11px 13px; border-radius: 3px; background: rgba(3, 10, 15, .6); border: 1px solid var(--hairline); }
.watch .n { font-family: var(--display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold-bright); }
.watch .n.alert { color: var(--bad); }
.watch .k { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; }
.events { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13px; }
.events li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--hairline); color: var(--text-secondary); }
.events li time { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.levels { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 16px; }
.levels div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.levels i { display: block; width: 100%; border-radius: 2px 2px 0 0; min-height: 2px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.levels span { font-size: 11px; color: var(--text-muted); }
.levels b { font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- search and bot sheet ---------- */
.search { position: relative; }
.search input { width: 200px; }
.search input::placeholder, input::placeholder { color: var(--text-muted); }
.results { position: absolute; top: 38px; right: 0; width: 280px; max-height: 340px; overflow-y: auto; z-index: 20;
  background: rgba(4, 14, 20, .96); border: 1px solid rgba(106, 237, 234, .3); border-radius: 5px; box-shadow: 0 12px 30px rgba(0, 0, 0, .7); padding: 6px; }
.results button { display: block; width: 100%; text-align: left; font: inherit; font-size: 13px; cursor: pointer;
  background: transparent; border: 0; border-radius: 3px; padding: 7px 10px; color: var(--text-primary); }
.results button:hover { background: rgba(63, 224, 197, .1); }
dialog {
  border: 1px solid var(--border); border-radius: 4px; color: var(--text-primary); padding: 0;
  background: linear-gradient(180deg, #211a12, #140f0b); box-shadow: 0 20px 60px rgba(0, 0, 0, .8);
  max-width: 440px; width: calc(100% - 32px);
}

dialog::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(3px); }
.sheet { padding: 20px 22px 18px; }
.sheet h3 { margin: 0; font-family: var(--display); font-size: 21px; color: var(--gold-bright); }
.sheet .who { color: var(--text-muted); font-size: 13px; margin: 4px 0 16px; }
.sheet dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 0; }
.sheet dt { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; }
.sheet dd { margin: 2px 0 0; font-size: 17px; font-weight: 620; font-variant-numeric: tabular-nums; }
.sheet .close { margin-top: 18px; }
.clickable { cursor: pointer; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.clickable:hover { text-decoration-color: var(--gold-bright); color: var(--gold-bright); }

/* ---------- tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; margin: 12px 0 6px; width: fit-content; max-width: 100%;
  background: rgba(2, 8, 12, .7); border: 1px solid var(--hairline); border-radius: 3px; }
.tabs button { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .03em;
  padding: 5px 13px; border-radius: 2px; border: 1px solid transparent; cursor: pointer; background: transparent; color: var(--text-muted); }
.tabs button:hover { color: var(--text-primary); }
.tabs button[aria-selected="true"] { color: var(--gold-bright); border-color: var(--border);
  background: linear-gradient(180deg, rgba(14, 108, 99, .6), rgba(8, 60, 66, .6)); text-shadow: 0 1px 1px #000; }

/* ---------- roster ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 6px; }
.toolbar input { width: 240px; max-width: 100%; }
.toolbar .tabs { margin: 0; }
#roster tr { cursor: pointer; }
#roster tr.focused td { background: rgba(14, 108, 99, .35); }
#roster td.fighting { color: var(--bad); font-weight: 600; }
.hp-cell { width: 110px; }

/* ---------- live chat feed ---------- */
/* The kinds take the game's own chat colours: say white, yell red, whisper pink, party blue,
   guild green, channels rose. Off-screen bot talk reads in the dashboard's gold. */
.feed { max-height: 480px; overflow: auto; }
.feed .feed-time { white-space: nowrap; width: 1%; }
.feed .feed-who { white-space: nowrap; width: 1%; }
.feed .feed-kind { white-space: nowrap; width: 1%; font-size: 12px; }
.feed .feed-text { overflow-wrap: anywhere; color: var(--text-primary); }
.chat-say .feed-kind { color: #ffffff; }
.chat-yell .feed-kind { color: #ff4040; }
.chat-whisper .feed-kind { color: #ff80ff; }
.chat-party .feed-kind { color: #aaaaff; }
.chat-guild .feed-kind { color: #40ff40; }
.chat-channel .feed-kind { color: #ffc0c0; }
.chat-offscreen .feed-kind { color: var(--gold); }
.chat-other .feed-kind { color: var(--text-muted); }

/* ---------- bots page ---------- */
.bots-layout { display: grid; gap: 20px; align-items: start; }
.bots-layout > .card { margin-bottom: 0; min-width: 0; }
@media (min-width: 1180px) { .bots-layout { grid-template-columns: minmax(0, 1fr) 340px; } .bots-layout > .focus { position: sticky; top: 16px; } }

/* ---------- game art ---------- */

.bad-text { color: #ff8f7a; }

/* ---------- chart ---------- */
.chart { position: relative; margin-top: 10px; }
.chart svg { width: 100%; height: auto; display: block; }
.tip { position: absolute; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: rgba(4, 14, 20, .95); border: 1px solid rgba(106, 237, 234, .3); border-radius: 4px; box-shadow: 0 8px 20px rgba(0, 0, 0, .7);
  padding: 7px 10px; font-size: 12px; color: var(--text-secondary); white-space: nowrap; z-index: 5; }
.tip b { display: block; color: var(--text-primary); font-size: 13px; font-variant-numeric: tabular-nums; }
footer { color: var(--text-muted); font-size: 12px; text-align: center; padding: 18px 0 0; }

/* ---------- phone: the nav becomes a bottom bar ---------- */
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 0 16px 92px; }
  .side {
    position: fixed; z-index: 30; top: auto; bottom: 0; left: 0; right: 0; height: auto;
    flex-direction: row; justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(0, 0, 0, .6);
    overflow: visible;
  }
  .brand { display: none; }
  .nav-link { flex-direction: column; gap: 3px; padding: 3px 2px; font-size: 9.5px; letter-spacing: 0; min-width: 0; flex: 1 1 0; text-align: center; }
  .nav-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .nav-link[aria-current="page"] { box-shadow: inset 0 3px 0 var(--gold-bright); }
  .ico { width: 28px; height: 28px; font-size: 15px; }
  .topbar { padding: 18px 0 14px; }
  .topbar h1 { font-size: 23px; width: 100%; }
  .search { flex: 1 1 auto; }
  .search input { width: 100%; }
  .results { width: 100%; }
  
  .card { padding: 14px 12px; }
  .settings-row { flex-wrap: wrap; gap: 8px; }
  .set-control { flex-direction: row; align-items: center; gap: 10px; }
}

/* The build band: only a test realm shows it (see renderBuild). */
.buildband {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 18px;
}
.buildhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.buildhead strong { font-size: 15px; font-weight: 650; color: var(--gold-bright); }
.buildmeta { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.prs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.prs .pr {
  display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%;
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px;
  font-size: 12px; text-decoration: none; color: var(--text-primary);
}
.prs .pr:hover { border-color: var(--gold); }
.prs .pr span { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prs .pr em { font-style: normal; font-size: 11px; opacity: .75; }
@media (max-width: 640px) { .prs .pr span { display: none; } }

/* The Maps panel (private version only). */
.art-prompt { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 3px;
  background: rgba(3, 10, 15, .55); }
.art-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 6px; }
.art-row input { flex: 1 1 280px; min-width: 0; }
.art-progress { display: flex; align-items: center; gap: 12px; margin: 8px 0; font-size: 12.5px; color: var(--text-secondary); }
.art-progress .bar { flex: 0 0 220px; }
.art-progress .bar i { display: block; height: 100%; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); transition: width .4s; }

/* ---------- PvP ---------- */
#pvp td.r { white-space: nowrap; }
#pvp .tabs { margin-top: 0; }
.arena-switches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.arena-switch { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; cursor: pointer; user-select: none;
  font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .04em; color: var(--text-muted);
  background: #03090d; border: 1px solid var(--border); border-radius: 3px; transition: color .15s, border-color .15s; }
.arena-switch:hover { color: var(--text-primary); }
.arena-switch:has(input:checked) { color: var(--gold-bright); border-color: var(--gold); background: rgba(106, 237, 234, .08); }
.arena-switch input { accent-color: var(--gold); margin: 0; }
.arena-switches .btn { margin-left: 8px; }

/* ---------------- the armory (static/armory.js) ---------------- */
.ico[data-icon="armory"]::before { content: "🛡"; }
.wide-input { width: 100%; box-sizing: border-box; margin-bottom: 12px; }
.armory-note { margin: 0 0 12px; font-size: 13px; color: var(--text-secondary); }
.how { margin: 18px 0 4px; border: 1px solid var(--hairline); border-radius: 4px; background: rgba(3, 10, 15, .55); }
.how > summary { cursor: pointer; padding: 10px 14px; font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: .05em; color: var(--gold); list-style: none; }
.how > summary::-webkit-details-marker { display: none; }
.how > summary::before { content: "▸ "; }
.how[open] > summary::before { content: "▾ "; }
.how > p { margin: 0 14px 12px; font-size: 13px; line-height: 1.55; color: var(--text-secondary); max-width: 90ch; }
.how code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; color: var(--gold-bright);
  background: #050c11; padding: 0 4px; border-radius: 2px; }
table.details th { width: 42%; padding: 6px 8px 6px 0; }
table.details td { padding: 6px 0; }
ul.events { list-style: none; margin: 0; padding: 0; }
ul.events li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
ul.events .dot { margin-top: 5px; }

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.char-card { padding: 12px 14px; border: 1px solid var(--border); border-radius: 4px; background: rgba(3, 10, 15, .6);
  display: flex; flex-direction: column; gap: 5px; }
.char-head { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.char-head .bc-lvl { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.badge { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted); }

/* Item quality colours, as the game shows them: poor, common, uncommon, rare, epic, legendary, artifact, heirloom. */
.q0 { --q: #9d9d9d; } .q1 { --q: #ffffff; } .q2 { --q: #1eff00; } .q3 { --q: #0070dd; }
.q4 { --q: #a335ee; } .q5 { --q: #ff8000; } .q6, .q7 { --q: #e6cc80; }
.gear-name[class*=" q"], .tip-name { color: var(--q, var(--text-primary)); }
.q3.gear-name, .q3.tip-name { color: #3b8cff; }          /* the game's blue, a touch lighter on a dark page */

a.char-card.link { text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
a.char-card.link:hover { border-color: var(--gold); background: rgba(106, 237, 234, .06); }
.back-link { margin: 0 0 10px; }
.back-link a { color: var(--gold); text-decoration: none; font-size: 13px; }
#armory { position: relative; }

.sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.sheet-crest { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--gold-bright);
  border: 2px solid var(--gold); background: radial-gradient(circle at 35% 30%, #3a2a14, #140e08 70%); }
.sheet-who { min-width: 0; margin-right: auto; }
.sheet-name { margin: 0 0 3px; font-family: var(--display); font-size: 26px; color: var(--gold-bright); }
.sheet-who .meta { font-size: 13px; color: var(--text-secondary); }
.sheet-ilvl { display: flex; flex-direction: column; align-items: center; margin-right: 6px; }
.sheet-ilvl b { font-family: var(--display); font-size: 28px; color: var(--gold-bright); line-height: 1; }
.sheet-ilvl span { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-top: 3px; }

.card.doll { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) minmax(0, 1fr); gap: 10px 18px; }
.doll-side { display: flex; flex-direction: column; gap: 6px; }
.doll-middle { padding: 12px 14px; border: 1px solid var(--hairline); border-radius: 4px; background: rgba(3, 10, 15, .55);
  align-self: start; }
.doll-middle h3 { margin: 0 0 8px; font-family: var(--display); font-size: 15px; color: var(--gold); }
.doll-middle .meta { margin: 10px 0 0; line-height: 1.45; }
.doll-bottom { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 18px;
  padding-top: 10px; border-top: 1px solid var(--hairline); }
.gear-slot { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 3px; border-radius: 3px; outline: none; }
.gear-slot[data-slot] { cursor: default; }
.gear-slot[data-slot]:hover, .gear-slot[data-slot]:focus { background: rgba(106, 237, 234, .07); }
.doll-side.right .gear-slot { flex-direction: row-reverse; text-align: right; }
.gear-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 3px;
  font-family: var(--display); font-size: 12px; font-weight: 700; color: var(--q, var(--text-muted));
  border: 2px solid var(--q, var(--hairline)); background: #050c11;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .8), 0 0 6px color-mix(in srgb, var(--q, transparent) 25%, transparent); }
.gear-slot.empty .gear-icon { border-style: dashed; border-color: var(--hairline); }
/* Item icons from the game client (webapp/icons.py), inside the quality-coloured frame. */
.gear-icon.has-icon { padding: 0; overflow: hidden; }
.gear-icon img { width: 100%; height: 100%; display: block; }
.gear-text { display: flex; flex-direction: column; min-width: 0; }
.gear-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear-slot.empty .gear-name { color: var(--text-muted); font-weight: 400; }

.item-tip { position: absolute; z-index: 20; width: 280px; padding: 10px 12px; font-size: 12.5px; line-height: 1.45;
  color: var(--text-primary); background: rgba(4, 14, 20, .97); border: 1px solid #5a5a7a; border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .7); pointer-events: none; }
.tip-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.tip-ilvl { color: #ffd100; }
.tip-row { display: flex; justify-content: space-between; gap: 10px; }
.tip-green { color: #1eff00; }
.tip-gem { color: #b9b9ff; }

.skill { margin: 8px 0 12px; }
.skill-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.skill-bar { height: 6px; background: #050c11; border: 1px solid var(--hairline); border-radius: 3px; overflow: hidden; }
.skill-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); }

@media (max-width: 980px) {
  .card.doll { grid-template-columns: 1fr; }
  .doll-side.right .gear-slot { flex-direction: row; text-align: left; }
  .doll-middle { order: 3; }
  .doll-bottom { grid-template-columns: 1fr; }
  .item-tip { display: none; }
}

/* ---------- realms (2.8): one accent per realm, the launcher's own colours ---------- */
:root, .mode-coa, body[data-shown-realm="coa"] { --realm: #e8b04a; --realm-glow: rgba(232, 176, 74, .28); }
.mode-wildcard, body[data-shown-realm="wildcard"] { --realm: #c27bff; --realm-glow: rgba(194, 123, 255, .30); }
.mode-reborn, body[data-shown-realm="reborn"] { --realm: #ff8a3d; --realm-glow: rgba(255, 138, 61, .30); }
.mode-dawnrise, body[data-shown-realm="dawnrise"] { --realm: #5cc8ff; --realm-glow: rgba(92, 200, 255, .30); }
.ico[data-icon="realms"]::before { content: "🏰"; }
.ico[data-icon="server"]::before { content: "📈"; }
.ico[data-icon="market"]::before { content: "💰"; }
.ico[data-icon="gm"]::before { content: "🛡"; }
.nav-link[hidden] { display: none; }

.gem { width: 10px; height: 10px; flex: none; transform: rotate(45deg); border-radius: 2px;
  background: linear-gradient(135deg, #fff8 0, var(--realm) 45%, #0006 100%); box-shadow: 0 0 8px var(--realm-glow), 0 0 0 1px #000; }
.gem.big { width: 18px; height: 18px; border-radius: 3px; }

.realm-switch { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; padding: 0 0 12px; border-bottom: 1px solid var(--hairline); }
.realm-switch[hidden] { display: none; }
.realm-pick { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 9px; cursor: pointer; text-align: left;
  font: 600 12.5px var(--body); color: var(--text-secondary); background: rgba(0, 0, 0, .25);
  border: 1px solid var(--hairline); border-radius: 4px; transition: border-color .15s, background .15s; }
.realm-pick:hover { color: var(--text-primary); border-color: var(--realm); }
.realm-pick.current { color: var(--text-primary); border-color: var(--realm);
  background: linear-gradient(90deg, var(--realm-glow), rgba(0, 0, 0, .2) 70%); box-shadow: inset 3px 0 0 var(--realm); }
.rp-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-state { font: 600 11px var(--body); font-variant-numeric: tabular-nums; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.rp-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); }
.rp-state.running::before { background: var(--good); box-shadow: 0 0 6px var(--good); }
.rp-state.starting::before { background: var(--gold-bright); animation: pulse 1.2s ease-in-out infinite; }
.rp-state.disabled::before { background: transparent; border: 1px solid var(--text-muted); }

.realm-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; margin-right: auto;
  font: 600 12px var(--body); color: var(--realm); border: 1px solid var(--realm); background: rgba(0, 0, 0, .35);
  box-shadow: 0 0 14px var(--realm-glow); }
.realm-chip[hidden] { display: none; }
.realm-chip::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); background: var(--realm); }
.topbar h1:has(+ .realm-chip:not([hidden])) { margin-right: 0; }

.realm-totals { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .realm-totals { grid-template-columns: repeat(4, 1fr); } }
.realm-grid { display: grid; gap: 20px; }
@media (min-width: 1100px) { .realm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 760px) and (max-width: 1099px) { .realm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.realm-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; cursor: pointer; overflow: hidden;
  background: radial-gradient(420px 180px at 0 0, var(--realm-glow), transparent 70%),
              linear-gradient(180deg, rgba(10, 30, 42, .78), rgba(4, 14, 20, .82));
  border: 1px solid var(--border); border-top: 3px solid var(--realm); border-radius: 4px; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.realm-card:hover, .realm-card:focus-visible { transform: translateY(-2px); outline: none;
  box-shadow: var(--shadow), 0 0 0 1px var(--realm), 0 10px 30px var(--realm-glow); }
.realm-card.stopped, .realm-card.disabled { filter: saturate(.55); }
.realm-card header { display: flex; align-items: center; gap: 12px; }
.realm-card h3 { margin: 0; font: 700 18px/1.2 var(--display); color: var(--text-primary); letter-spacing: .02em; }
.realm-card footer { margin-top: auto; display: flex; justify-content: flex-end; }
.state-badge { margin-left: auto; padding: 2px 9px; border-radius: 999px; font: 600 11px var(--body); letter-spacing: .04em;
  text-transform: uppercase; border: 1px solid currentColor; color: var(--text-muted); white-space: nowrap; }
h2 .state-badge { margin-left: 8px; vertical-align: 3px; }
.state-badge.running { color: var(--good); box-shadow: 0 0 10px rgba(54, 199, 95, .25); }
.state-badge.starting { color: var(--gold-bright); }
.state-badge.stopped { color: var(--bad); }
.realm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 1700px) { .realm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rt { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 3px; background: rgba(0, 0, 0, .28); border: 1px solid var(--hairline); min-width: 0; }
.rt .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt b { font: 700 19px/1.2 var(--display); color: var(--text-primary); margin-top: 2px; }
.rt.good b, .figure.good .value { color: var(--good); }
.rt.warn b, .figure.warn .value { color: var(--gold-bright); }
.rt.bad b, .figure.bad .value { color: var(--bad); }
.realm-spark { display: flex; flex-direction: column; gap: 2px; }
.spark { width: 100%; height: 44px; display: block; }

/* ---------- server health ---------- */
.server-head { display: flex; align-items: center; gap: 14px; border-left: 3px solid var(--realm); }
.server-head h2 { margin: 0; }
.perf-charts { display: grid; gap: 18px; }
@media (min-width: 1300px) { .perf-charts { grid-template-columns: 1fr 1fr; } }
.chart-title { margin: 6px 0 0; font: 600 12px var(--body); color: var(--text-secondary); text-transform: uppercase; letter-spacing: .07em; }
.hints, .events, .gm-journal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hint { padding: 9px 12px 9px 34px; position: relative; border-radius: 3px; font-size: 13px; background: rgba(0, 0, 0, .3); border: 1px solid var(--hairline); }
.hint::before { position: absolute; left: 11px; top: 8px; font-size: 14px; }
.hint.good::before { content: "✔"; color: var(--good); }
.hint.warn::before { content: "⚠"; color: var(--gold-bright); }
.hint.bad::before { content: "✖"; color: var(--bad); }
.hint.bad { border-color: rgba(226, 80, 61, .45); }
.event { display: flex; gap: 10px; align-items: baseline; font-size: 13px; padding-left: 14px; position: relative; }
.event::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); }
.event.start::before { background: var(--good); }
.event.stop::before { background: var(--gold-deep); }
.event.crash::before, .event.down::before { background: var(--bad); box-shadow: 0 0 6px var(--bad); }
.when { color: var(--text-muted); font-size: 12px; min-width: 92px; }

/* ---------- auction house ---------- */
.coin { font-variant-numeric: tabular-nums; margin-right: 4px; white-space: nowrap; }
.coin::after { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 3px; vertical-align: 0; }
.coin.g::after { background: radial-gradient(circle at 35% 35%, #fff3b0, #d9a520 60%, #7c5c1f); }
.coin.s::after { background: radial-gradient(circle at 35% 35%, #ffffff, #b8c0c8 60%, #5d6670); }
.coin.c::after { background: radial-gradient(circle at 35% 35%, #ffd2a8, #b8692e 60%, #5d2f12); }
.figure .value .coin { font-size: 21px; }

/* ---------- game master ---------- */
.gm-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.gm-console textarea, .gm-filter, .gm-row input, .gm-row select {
  font: 13px var(--body); color: var(--text-primary); background: #03090d; border: 1px solid var(--border); border-radius: 3px; padding: 6px 9px; }
.gm-console textarea { width: 100%; resize: vertical; }
.gm-filter { width: 100%; margin-bottom: 10px; }
.gm-buttons, .gm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.gm-row input[type="number"] { width: 92px; }
.gm-row input[type="text"] { flex: 1 1 120px; min-width: 0; }
.gm-row.danger { padding-top: 10px; border-top: 1px dashed rgba(226, 80, 61, .35); }
.gm-what { font-size: 12px; color: var(--text-muted); min-width: 70px; }
.gm-result { margin: 10px 0 0; font-size: 12.5px; min-height: 18px; color: var(--text-secondary); white-space: pre-wrap; }
.gm-result.ok { color: var(--good); }
.gm-result.bad { color: var(--bad); }
.gm-table tbody tr { cursor: pointer; }
.gm-table tbody tr.picked td { background: var(--realm-glow); }
.tag { display: inline-block; padding: 0 6px; margin-left: 4px; border-radius: 3px; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .05em; border: 1px solid var(--border); color: var(--gold); }
.tag.bad { color: var(--bad); border-color: var(--bad); }
.tag.warn { color: var(--gold-bright); border-color: var(--gold-bright); }
.gold { color: var(--gold-bright); }
.gm-journal li { font-size: 12.5px; padding: 7px 9px; border-radius: 3px; background: rgba(0, 0, 0, .28); border-left: 3px solid var(--good); }
.gm-journal li.bad { border-left-color: var(--bad); }
.gm-journal code { font-family: Consolas, "Cascadia Mono", monospace; color: var(--text-primary); }

@media (max-width: 760px) {
  .realm-switch { display: none; }
  .realm-chip { margin: 0; }
}

/* ================================================================== launcher theme (2.8) ====
   The SquidBots launcher's own look ("Abyss"): deep navy water, teal light, the gold of the crest kept for the
   crest and the titles; Inter for the text, Cinzel for the titles, rounded glass panels. */
body {
  font-family: var(--body);
  background:
    radial-gradient(90% 70% at 35% 0%, #0b3a52, transparent 72%),
    radial-gradient(70% 60% at 100% 100%, rgba(29, 150, 128, .10), transparent 70%),
    var(--page);
  background-attachment: fixed;
}
::selection { background: rgba(63, 224, 197, .3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(106, 237, 234, .22); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(66, 240, 223, .55); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
a { color: var(--accent); }

/* ---- side bar: dark glass, the crest on top ---- */
.side {
  background: linear-gradient(180deg, rgba(4, 12, 18, .92), rgba(3, 9, 14, .86));
  border-right: 1px solid var(--hairline); box-shadow: 8px 0 30px rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
}
.brand { flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 12px; }
.brand .logo { display: block; width: 100%; max-width: 196px; height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .75)) drop-shadow(0 0 16px rgba(66, 240, 235, .22)); }
.brand .crest, .brand .brand-name { display: none; }
.brand-words { align-items: center; }
.tagline { text-align: center; color: var(--text-muted); letter-spacing: .02em; }
.nav-link {
  font-family: var(--body); font-weight: 600; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); text-shadow: none; border-radius: 10px; padding: 6px 10px;
}
.nav-link:hover { color: var(--text-primary); background: var(--tint); border-color: var(--hairline); }
.nav-link[aria-current="page"] {
  color: #f2fffd; background: linear-gradient(90deg, rgba(63, 224, 197, .22), rgba(63, 224, 197, .04));
  border-color: var(--border); box-shadow: inset 3px 0 0 var(--accent), 0 0 18px rgba(63, 224, 197, .10);
}
.ico { border-radius: 9px; border: 1px solid var(--hairline); background-color: rgba(6, 18, 26, .9);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, .6); width: 30px; height: 30px; font-size: 15px; }
.nav-link[aria-current="page"] .ico { border-color: rgba(63, 224, 197, .55); box-shadow: 0 0 12px rgba(63, 224, 197, .25); }

/* ---- top bar ---- */
.topbar h1 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: #f2fffd; text-shadow: 0 2px 0 rgba(0, 0, 0, .6), 0 0 30px rgba(66, 240, 223, .22); }
.pill { border-radius: 999px; background: rgba(4, 12, 18, .78); border-color: var(--hairline); backdrop-filter: blur(6px); }
.search input, .toolbar input, .gm-filter, .gm-row input, .gm-row select, .gm-console textarea, .art-row input,
input[type="search"], input[type="text"], input[type="number"], select, textarea {
  font-family: var(--body); color: var(--text-primary); background: var(--input); border: 1px solid var(--hairline);
  border-radius: 10px; padding: 7px 11px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63, 224, 197, .16); }
.results { border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.results button:hover { background: var(--tint-strong); }

/* ---- buttons: teal like the launcher's, the gold one kept for the main action ---- */
.btn, button.ghost, button.primary {
  font-family: var(--display); font-weight: 700; letter-spacing: .06em; border-radius: 10px;
  color: #f2fffd; text-shadow: 0 1px 0 rgba(1, 61, 99, .7);
  background: linear-gradient(180deg, #2fb8ad, #0f7480); border: 1px solid #3fd0c0;
  box-shadow: inset 0 1px 0 rgba(170, 255, 240, .35), 0 6px 18px rgba(40, 200, 190, .18);
}
.btn:hover, button.ghost:hover, button.primary:hover { filter: brightness(1.12); color: #fff; }
.btn.gold, button.primary.gold { color: #231400; text-shadow: none; border-color: rgba(255, 236, 190, .45);
  background: linear-gradient(180deg, #f7d17b, var(--gold) 55%, var(--gold-deep)); box-shadow: 0 8px 22px rgba(232, 176, 74, .3); }
.gm-row.danger .btn, [data-gm="ban"], [data-gm="gmlevel"], [data-ahbot="empty"] {
  background: linear-gradient(180deg, #c2414f, #7a1f2b); border-color: #ff6b7a; box-shadow: 0 6px 16px rgba(255, 107, 122, .18); }

/* ---- panels ---- */
.card, .figure, .realm-card, .rt {
  border-radius: var(--radius); backdrop-filter: blur(8px);
}
.card {
  background: linear-gradient(160deg, rgba(10, 30, 42, .78), rgba(4, 14, 20, .82));
  border: 1px solid var(--hairline); box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.card::before { left: 18px; right: 18px; top: 0; background: linear-gradient(90deg, transparent, rgba(63, 224, 197, .35), transparent); }
.card > h2 { font-family: var(--display); font-size: 13.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); text-shadow: none; }
.card > h2 .sub { text-transform: none; letter-spacing: 0; }
.card h3, .chart-title { color: var(--text-secondary); }
.figure { background: linear-gradient(160deg, rgba(12, 36, 48, .75), rgba(5, 16, 22, .82)); border: 1px solid var(--hairline);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
.figure .label { color: var(--text-muted); letter-spacing: .08em; }
.figure .value { font-family: var(--body); font-weight: 700; font-size: 26px; color: #f2fffd; text-shadow: none; }
.banner { border-radius: 12px; background: rgba(255, 107, 122, .10); border-color: rgba(255, 107, 122, .4); }

/* ---- tabs: the launcher's well with a lit tab ---- */
.tabs { border-radius: 12px; background: var(--well); border: 1px solid var(--hairline); }
.tabs button { font-family: var(--body); font-weight: 600; font-size: 12.5px; letter-spacing: .02em; border-radius: 9px;
  color: var(--text-muted); border: 1px solid transparent; background: none; }
.tabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow); text-shadow: none; }

/* ---- tables, bars, lists ---- */
th { color: var(--text-muted); border-bottom-color: var(--hairline); }
td { border-bottom-color: rgba(106, 237, 234, .07); }
tbody tr:hover td { background: var(--tint); }
.bar, .split, .skill-bar { border-radius: 999px; background: rgba(2, 8, 12, .85); }
.bar i { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); box-shadow: 0 0 10px rgba(63, 224, 197, .35); }
.skill-bar i { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
.hint, .gm-journal li, .rt { border-radius: 10px; }
.state-badge.running { color: var(--good); }

/* ---- map ---- */
.map-hit:hover { fill: rgba(63, 224, 197, .16); stroke: var(--accent); }
.map-hit.active { fill: rgba(63, 224, 197, .08); stroke: var(--accent); }
.map-svg.no-art .map-hit { fill: rgba(63, 224, 197, .04); stroke: rgba(106, 237, 234, .24); }
.zone-row.active { background: rgba(63, 224, 197, .14); box-shadow: inset 2px 0 0 var(--accent); }
.bot-card { border-radius: 12px; border-color: var(--border); background: rgba(4, 14, 20, .95); }
.bot-card.pinned { border-color: var(--accent); }

/* ---- the octopus crest (the launcher's own art, js/logo.js), abyss colours ---- */
.logo .lg-arm { fill: none; stroke: url(#lg-arm); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.logo .lg-back .lg-arm { stroke-width: 9; }
.logo .lg-rim { fill: none; stroke: #042940; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.logo .lg-back .lg-rim { stroke-width: 13; }
.logo .lg-sucker { fill: #fff0c8; opacity: .75; }
.logo .lg-rays { fill: url(#lg-gold); opacity: .9; }
.logo .lg-plate { fill: url(#lg-plate); stroke: url(#lg-gold); stroke-width: 3.5; stroke-linejoin: round; }
.logo .lg-plate-line { fill: none; stroke: #d9a24c; stroke-width: 1; opacity: .55; }
.logo .lg-gem { fill: #c8321e; stroke: url(#lg-gold); stroke-width: 1.6; }
.logo .lg-head { fill: url(#lg-head); stroke: #043e63; stroke-width: 2.2; }
.logo .lg-shine { fill: none; stroke: #fff6da; stroke-width: 3; stroke-linecap: round; opacity: .7; }
.logo .lg-spots ellipse { fill: #1d9d98; opacity: .55; }
.logo .lg-brow { fill: none; stroke: #033351; stroke-width: 3; stroke-linecap: round; }
.logo .lg-eye ellipse, .logo .lg-eye .lg-socket { fill: #03131e; stroke: #043e63; stroke-width: 1.2; }
.logo .lg-eye .lg-iris { fill: url(#lg-iris); stroke: none; }
.logo .lg-eye .lg-pupil { fill: #011019; stroke: none; }
.logo .lg-glint { fill: #fff; }
.logo .lg-name { font: 700 30px var(--display); letter-spacing: 4px; fill: url(#lg-gold); stroke: #021d2e; stroke-width: .9; paint-order: stroke; }

@media (max-width: 760px) {
  .side { background: rgba(3, 10, 15, .96); }
  /* Eleven pages on a phone: the icons alone, the page title says where you are. */
  .nav-link span { display: none; }
  .nav-link { padding: 6px 0; }
}

/* the launcher's line icons in the menu */
.ico[data-icon]:has(svg)::before { content: none; }
.ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-link .ico { color: var(--text-muted); }
.nav-link:hover .ico { color: var(--text-primary); }
.nav-link[aria-current="page"] .ico { color: var(--accent); }

/* ---------- the Armory window over the Bots page ---------- */
dialog.armory-popup { width: min(1100px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 48px); padding: 22px 22px 18px; overflow: auto;
  color: var(--text-primary); background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .7); }
.armory-popup::backdrop { background: rgba(0, 0, 0, .6); }
.armory-popup-close { position: sticky; top: 0; float: right; z-index: 2; }
.armory-popup-body { position: relative; }
.armory-btn { padding: 3px 10px; font-size: 11.5px; }
