:root {
  --bg: #15171a;
  --panel: #1d2024;
  --panel2: #24282d;
  --line: #2e3339;
  --text: #dde1e5;
  --muted: #8d949b;
  --accent: #e3823a;
  --accent2: #f09a55;
  --teal: #4fa58f;
  --red: #d9534f;
  --radius: 4px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; }
h1 { font-size: 30px; }
h2 { font-size: 20px; }
.mono { font-family: Consolas, "SF Mono", Menlo, monospace; }
.muted { color: var(--muted); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 18px; }

/* ---------- header ---------- */
.nav { background: #111315; border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 54px; }
.brand { color: var(--text); font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 18px; flex: 1; }
.nav-links a { color: var(--muted); font-size: 14px; }
.nav-links a:hover, .nav-links a.on { color: var(--text); text-decoration: none; }
.nav-user { display: flex; align-items: center; gap: 8px; }
.avatar { width: 28px; height: 28px; border-radius: 3px; background: var(--panel2); object-fit: cover; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel2); color: var(--text);
  font: inherit; font-size: 14px;
  cursor: pointer;
}
.btn:hover { background: #2b3036; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent2); }
.btn.teal { background: transparent; }
.btn.danger { color: #f08c89; }
.btn.sm { padding: 3px 9px; font-size: 13px; }
.btn.steam { background: #2a3f5a; border-color: #2a3f5a; }

/* ---------- home header ---------- */
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-condensed-700.woff2") format("woff2");
}
.hero { background: #1b1e22; border-bottom: 3px solid var(--accent); }
.hero-in { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-top: 56px; padding-bottom: 52px; }
.hero-text { max-width: 640px; }
.kicker { margin: 0 0 10px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.hero-title {
  margin: 0 0 14px;
  font: 700 clamp(56px, 9vw, 104px)/.9 "Barlow Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase; letter-spacing: .01em; color: #e9ecef;
}
.hero-sub { margin: 0 0 22px; font-size: 18px; color: #a7adb4; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-actions .btn { padding: 9px 18px; font-size: 15px; font-weight: 600; }
.hero-mark { width: 280px; height: auto; flex: none; }
@media (max-width: 760px) {
  .hero-in { padding-top: 34px; padding-bottom: 32px; }
  .hero-mark { display: none; }
}
.status-strip {
  display: flex; align-items: center; gap: 10px 28px; flex-wrap: wrap;
  margin-top: 22px; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px;
}
.status-strip .status-line { margin-right: auto; }
.status-strip .stat b { font-weight: 600; }

/* ---------- home ---------- */
.notice {
  margin: 22px 0 0;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
}
.top { display: grid; grid-template-columns: 1fr 320px; gap: 22px; margin-top: 26px; align-items: start; }
.intro h1 { margin-bottom: 8px; }
.intro p { margin: 0 0 14px; color: #c3c8cd; max-width: 620px; }
.intro .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.facts { margin: 12px 0 0; padding: 0; list-style: none; display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.facts b { color: var(--text); font-weight: 600; }

.status-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.status-line { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); display: inline-block; }
.dot.on { background: #5cb85c; }
.addr { margin: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; }
.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv td { padding: 4px 0; border: 0; }
.kv td:last-child { text-align: right; }

section.block { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.section-head small { display: none; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel.pad { padding: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 280px; gap: 16px; }
.grid2.even { grid-template-columns: 1fr 1fr; }
.grid2 > * { min-width: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ---------- map ---------- */
.map-wrap { position: relative; height: 520px; overflow: hidden; }
.map-wrap canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.map-legend { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 12px; background: rgba(21, 23, 26, .85); padding: 3px 9px; border-radius: 3px; font-size: 13px; }
.map-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.map-tools { position: absolute; right: 10px; top: 10px; display: flex; gap: 4px; }

.plist { list-style: none; margin: 0; padding: 0; max-height: 470px; overflow: auto; }
.plist li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.plist li:last-child { border-bottom: 0; }
.plist .name { flex: 1; }
.tag { font-size: 12px; padding: 0 6px; border-radius: 3px; background: var(--panel2); color: var(--muted); white-space: nowrap; }
.tag.pvp { background: #4a2a18; color: #f0a46a; }
.tag.safe { background: #1f3a33; color: #8fd1bf; }
.tag.admin { background: #3e3620; color: #e8cf7d; }
.tag.verified { background: #22314a; color: #9ebbe8; }
.tag.rk.r1 { background: #233446; color: #8fb6d9; }
.tag.rk.r2 { background: #1f3a33; color: #8fd1bf; }
.tag.rk.r3 { background: #42341a; color: #e6b866; }
.tag.rk.r4 { background: #4a2a18; color: #f0a46a; }
.cmd-table td:first-child { white-space: nowrap; }
.panel-title { padding: 9px 12px; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; justify-content: space-between; }
.empty { padding: 22px 12px; color: var(--muted); text-align: center; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.rank { color: var(--muted); width: 40px; }
.who { display: flex; align-items: center; gap: 8px; }

/* ---------- info ---------- */
.cmds { width: 100%; }
.cmds td:first-child { width: 170px; white-space: nowrap; }
code { font-family: Consolas, "SF Mono", Menlo, monospace; color: var(--accent2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
.chip { font-family: Consolas, monospace; font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 1px 8px; }
.team-card { padding: 12px; display: flex; gap: 10px; align-items: center; color: var(--text); }
.team-card:hover { text-decoration: none; background: var(--panel2); }
.team-card .avatar { width: 40px; height: 40px; }
.team-card b { display: block; }
ol.rules { margin: 0; padding: 12px 12px 12px 34px; }
ol.rules li { margin: 3px 0; }

footer { margin-top: 50px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 16px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 7px 12px; font: inherit; cursor: pointer; }
.tabs button.on { color: var(--text); border-color: var(--accent); }
.tab { display: none; }
.tab.on { display: block; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
input, select, textarea {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 10px; font: inherit; outline: none;
}
input:focus { border-color: #4b5560; }
.toolbar { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar input { flex: 1; min-width: 200px; }
.scroll { max-height: 560px; overflow: auto; }
.log-line { padding: 5px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-line .t { color: var(--muted); font-family: Consolas, monospace; font-size: 12px; margin-right: 8px; }
.log-line .src { font-size: 12px; margin-right: 6px; color: #8fd1bf; }
.log-line .src.discord { color: #9ebbe8; }
.chat-feed { max-height: 320px; overflow: auto; }
.members { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.members ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.map-lock { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px 8px 14px; font-size: 14px; white-space: nowrap; }
.map-lock[hidden], .members[hidden] { display: none; }
.toast { position: fixed; bottom: 16px; right: 16px; background: var(--panel2); border: 1px solid var(--line); padding: 9px 14px; border-radius: var(--radius); z-index: 99; opacity: 0; transition: opacity .15s; }
.toast.show { opacity: 1; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.settings-grid label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.settings-grid input { width: 100%; }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; padding: 28px 0 18px; }
.profile-head .avatar { width: 72px; height: 72px; }
.eyebrow { color: var(--muted); font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.stat-grid div { padding: 12px; }
.stat-grid b { display: block; font-size: 20px; }
.stat-grid span { color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .top, .grid2, .grid2.even { grid-template-columns: 1fr; }
  .panel { overflow-x: auto; }
  .status-strip .status-line { width: 100%; }
  .grid3, .stat-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
.preview-bar { background: #3e3620; color: #e8cf7d; text-align: center; font-size: 13px; padding: 6px 12px; }
.rank-card { margin-bottom: 12px; }
.rank-card .tag { font-size: 13px; margin-right: 8px; }
.bar { height: 6px; background: var(--panel2); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent, #e67e22); }
.stat-grid.stats4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .stat-grid.stats4 { grid-template-columns: 1fr 1fr; } }
