:root {
  --bg: #1b1712;
  --panel: #2a241c;
  --panel-2: #332b21;
  --border: #4a3f30;
  --text: #ece3d0;
  --muted: #a89a80;
  --accent: #ff981f;
  --gp: #f5d36b;
  --link: #ffb860;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  padding: 14px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.brand { color: var(--accent); font-weight: 700; font-size: 18px; }

main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 16px; }

h1 { margin: 0 0 4px; }
h2 { margin: 0 0 12px; font-size: 17px; color: var(--accent); }
h3 { margin: 18px 0 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.muted { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); font-style: italic; }
.gp { color: var(--gp); font-weight: 600; margin-left: 4px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 24px; font-weight: 700; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}
.card.wide { grid-column: 1 / -1; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--panel-2); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.feed li:last-child { border-bottom: 0; }
.feed.compact li { align-items: center; padding: 5px 0; flex-wrap: wrap; gap: 6px; }

.icon { width: 32px; height: 32px; object-fit: contain; flex: none; image-rendering: pixelated; }

.tier {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  flex: none;
}
.tier-easy { color: #9ecb6a; }
.tier-medium { color: #6ab0cb; }
.tier-hard { color: #c9a0ff; }
.tier-elite { color: #ff9b6a; }
.tier-master { color: #ff6a6a; }
.tier-grandmaster { color: #ffd84a; }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier-box {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-head { margin-top: 8px; }

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: repeat(2, 1fr); }
}
