/* New Bro City site: shared look for every page (top bar, colours, buttons, cards). */
:root {
  --bg: #f4f1ea; --surface: #fffdf8; --text: #1d1b16; --muted: #6b6558;
  --line: #e2dccd; --accent: #2f7d4a; --accent-text: #ffffff; --warn: #8a5a00; --warn-bg: #fdf2d8;
  --bad: #a3362a; --bad-bg: #fbe6e2; --good-bg: #e2f2e7; --plan: #2b5c9e; --plan-bg: #e3ecf8;
  --bar: #1d1b16; --bar-text: #f4f1ea; --bar-muted: #b9b2a2; --bar-hover: #2f2c25;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14130f; --surface: #1d1c17; --text: #ece7da; --muted: #a39d8e;
    --line: #2e2c25; --accent: #4fb072; --accent-text: #0d1a11; --warn: #f0c46a; --warn-bg: #2b2412;
    --bad: #ef8a7c; --bad-bg: #2e1814; --good-bg: #15291c; --plan: #8db6ec; --plan-bg: #172338;
    --bar: #0c0b09; --bar-text: #ece7da; --bar-muted: #a39d8e; --bar-hover: #24221c;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 720px; margin: 0 auto; padding: 28px 16px 64px; }
h1 { font-size: 2rem; margin: 0 0 4px; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 1.15rem; margin: 36px 0 10px; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sub { color: var(--muted); margin: 0 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.label { color: var(--muted); font-size: 0.85rem; display: block; }

/* Top bar */
.topbar { background: var(--bar); color: var(--bar-text); }
.topbar-in { max-width: 1040px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center;
             gap: 6px 16px; flex-wrap: wrap; }
.brand { color: var(--bar-text); text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em;
         padding: 6px 0; margin-right: auto; white-space: nowrap; }
.site-nav { display: flex; gap: 2px; flex-wrap: wrap; order: 3; width: 100%; margin: 0 -10px; }
.site-nav a { color: var(--bar-muted); text-decoration: none; font-weight: 600; padding: 7px 10px; border-radius: 8px; }
.site-nav a:hover { color: var(--bar-text); background: var(--bar-hover); }
.site-nav a[aria-current="page"] { color: var(--bar-text); background: var(--bar-hover); }
.online { display: inline-flex; align-items: center; gap: 7px; color: var(--bar-muted); text-decoration: none;
          font-size: 0.85rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--bar-hover);
          white-space: nowrap; }
.online:hover { color: var(--bar-text); }
.online .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bar-muted); }
.online.up .dot { background: #4fb072; box-shadow: 0 0 0 3px rgba(79, 176, 114, 0.25); }
.online.down .dot { background: #ef8a7c; }
@media (min-width: 760px) {
  .brand { margin-right: 8px; }
  .site-nav { order: 0; width: auto; margin: 0; flex: 1; }
}

/* Buttons and cards */
.btn { display: inline-block; margin-top: 8px; padding: 10px 16px; border-radius: 10px; text-decoration: none;
       background: var(--accent); color: var(--accent-text); font-weight: 600; border: 1px solid var(--accent); }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn:disabled { opacity: 0.6; cursor: default; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.note { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 14px; margin-top: 8px; font-size: 0.93rem; }
.err { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 8px 12px; margin-top: 10px; }

/* Server address with copy button */
.server { background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
          padding: 12px 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.server code { font-size: 1.05rem; font-weight: 600; word-break: break-all; }
.copy { padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); font-weight: 600;
        font-size: 0.9rem; }

/* Player heads */
.avatar { width: 24px; height: 24px; border-radius: 4px; image-rendering: pixelated; vertical-align: middle; }

/* Old builds */
img.map { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
table.sites { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
table.sites th, table.sites td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
table.sites th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; border-top: 0; }
table.sites td:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
