/* The guild dashboard's look: index.html and report.html share it. */
:root {
  --bg: #0f0d0b; --panel: #1a1714; --panel-2: #221e1a; --line: #3a322a; --text: #ece4d6; --muted: #a39683;
  --gold: #d8a94a; --gold-2: #f2cf7d; --good: #6fbf73; --bad: #d9614c; --info: #6fa8dc; --violet: #b48ce0;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f1e7; --panel: #fffdf8; --panel-2: #f3ece0; --line: #ddd1bd; --text: #2a231b; --muted: #7a6c58;
    --gold: #a87a1e; --gold-2: #8a6212; --shadow: 0 6px 18px rgba(80,60,20,.08);
  }
}
:root[data-theme="light"] {
  --bg: #f6f1e7; --panel: #fffdf8; --panel-2: #f3ece0; --line: #ddd1bd; --text: #2a231b; --muted: #7a6c58;
  --gold: #a87a1e; --gold-2: #8a6212; --shadow: 0 6px 18px rgba(80,60,20,.08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; }
header { padding: 28px 16px 8px; max-width: 1280px; margin: 0 auto; display: flex; gap: 16px; align-items: center; }
header svg { flex: none; }
h1 { font-family: Cinzel, Georgia, serif; font-size: clamp(22px, 4vw, 34px); margin: 0; color: var(--gold-2); letter-spacing: .5px; }
.sub { color: var(--muted); margin-top: 2px; }
main { max-width: 1280px; margin: 0 auto; padding: 8px 16px 48px; }
h2 { font-family: Cinzel, Georgia, serif; font-size: 18px; color: var(--gold); margin: 28px 0 12px; display: flex; align-items: baseline; gap: 10px; }
h2 small { font: 500 12px Inter, sans-serif; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.tile .v { font: 700 26px Cinzel, Georgia, serif; color: var(--gold-2); }
.tile .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); position: relative; }
.card.off { opacity: .62; }
.row { display: flex; align-items: center; gap: 12px; }
.ring { flex: none; }
.name { font: 600 16px Inter, sans-serif; }
.cls { font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--muted); }
.dot.on { background: var(--good); box-shadow: 0 0 8px var(--good); }
.meta { color: var(--muted); font-size: 12px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 6px; background: var(--panel-2); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.bar.aa i { background: linear-gradient(90deg, #7d5cc4, var(--violet)); }
.mapbtn { flex: none; align-self: flex-start; font: 600 12px Inter, sans-serif; color: var(--bg); background: var(--gold);
  border-radius: 8px; padding: 5px 10px; text-decoration: none; }
.mapbtn:hover { background: var(--gold-2); }
.btns { flex: none; align-self: flex-start; display: flex; flex-direction: column; gap: 6px; }
.mapbtn.ghost { background: transparent; color: var(--gold-2); border: 1px solid var(--gold); text-align: center; }
.mapbtn.ghost:hover { background: var(--panel-2); }
.stat { display: grid; grid-template-columns: 70px 1fr 44px; gap: 8px; align-items: center; font-size: 12px; margin-top: 6px; color: var(--muted); }
.stat b { color: var(--text); font-weight: 600; text-align: right; }
.stat.plain { grid-template-columns: 70px 1fr; }  /* a number with no top to measure it against: no bar */
.stat.plain b { text-align: left; }
.bots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-size: 11px; padding: 3px 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.chip b { color: var(--gold-2); font-weight: 600; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.two { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
svg.chart { width: 100%; height: 260px; display: block; }
svg.chart text { fill: var(--muted); font: 11px Inter, sans-serif; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 3px; border-radius: 2px; background: currentColor; margin-right: 5px; vertical-align: middle; }
.timeline { max-height: 420px; overflow: auto; }
.ev { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev .t { color: var(--muted); font-size: 11px; }
.ev .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--panel-2); }
.k-level .ic { color: var(--gold-2); } .k-death .ic { color: var(--bad); } .k-named .ic { color: var(--violet); }
.k-goal .ic { color: var(--good); } .k-zone .ic { color: var(--info); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
.empty { color: var(--muted); padding: 18px; text-align: center; }
.err { color: var(--bad); }
.toggle { background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.report { margin-left: auto; background: var(--panel); color: var(--gold-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 12px; text-decoration: none; white-space: nowrap; }
.report:hover { border-color: var(--gold); }
.report + .report { margin-left: 8px; }
.scroll { overflow-x: auto; }
.tier { font-size: 11px; color: var(--muted); white-space: nowrap; }
.up { color: var(--good); font-weight: 600; } .down { color: var(--muted); }
tr.next td { background: color-mix(in srgb, var(--gold) 10%, transparent); }
.badge { font: 600 10px Inter, sans-serif; color: var(--bg); background: var(--gold); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.note { color: var(--muted); font-size: 11px; margin-top: 2px; }
.tierbox { border-bottom: 1px solid var(--line); padding: 6px 0; }
.tierbox summary { cursor: pointer; padding: 4px 2px; display: flex; gap: 10px; align-items: baseline; }
.tierbox table { margin-top: 6px; }
