/* Craftstuebchen Stats. Same look as the wiki (wikiops: dark Material theme of the forum, accent #8bc34a),
   with its own layout for dashboards and toplists. No frameworks, no external fonts. */

:root {
  --bg: #2d3238;
  --block: #383c42;
  --block-2: #42464d;
  --line: rgba(255, 255, 255, .12);
  --text: rgba(255, 255, 255, .9);
  --muted: rgba(188, 190, 183, .9);
  --faint: rgba(150, 153, 143, .9);
  --accent: #8bc34a;
  --accent-hover: #a4d070;
  --accent-soft: rgba(139, 195, 74, .12);
  --warn: #ffb300;
  --danger: #e55353;
  --radius: 4px;
  --shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .12), 0 1px 5px 0 rgba(0, 0, 0, .2);
  --shadow-raised: 0 5px 10px 0 rgba(0, 0, 0, .35);
  --navbar-h: 3.25rem;
  --max: 84rem;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; scrollbar-color: var(--block-2) transparent; scrollbar-width: thin; }

/* Blurred screenshot behind the whole page, same as forum and wiki (pre-blurred image). */
html { background: var(--bg) url("img/background.png") center / cover fixed; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
::selection { background: var(--accent); color: #fff; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { line-height: 1.3; }
h1 { margin: 0 0 1.25rem; font-size: 2rem; font-weight: 400; }
h2 { margin: 2.25rem 0 1rem; padding-bottom: .45rem; font-size: 1.4rem; font-weight: 600; border-bottom: 1px solid var(--line); }
h3 { margin: 1.5rem 0 .6rem; font-size: 1.15rem; font-weight: 600; color: var(--accent); }

code {
  padding: .12em .45em;
  color: #c5e1a5;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(139, 195, 74, .18);
  border-radius: 3px;
  font: .88em/1.4 var(--mono);
}
pre {
  margin: 1rem 0;
  padding: .9rem 1.1rem;
  overflow-x: auto;
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
pre code { padding: 0; background: none; border: 0; }
table.api-endpoints td:first-child { width: 15rem; white-space: nowrap; }
@media (max-width: 600px) {
  table.api-endpoints thead { display: none; }
  table.api-endpoints tr, table.api-endpoints td { display: block; width: auto; }
  table.api-endpoints td:first-child { padding-bottom: 0; border-bottom: 0; }
}

/* --- Header, navigation, footer ------------------------------------------ */

.inner { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

.site-header .inner { display: flex; align-items: flex-end; gap: .75rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.logo { display: block; }
.logo:hover { text-decoration: none; }
.logo img { display: block; width: auto; height: 4.5rem; max-width: 100%; }
.logo-tag {
  margin-bottom: .55rem;
  padding: .1rem .6rem;
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--accent);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
}
.navbar .inner { display: flex; align-items: center; gap: .5rem; height: var(--navbar-h); }
.navbar-brand, .nav-links a {
  display: flex;
  align-items: center;
  gap: .5rem;
  height: var(--navbar-h);
  padding: 0 .9rem;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.navbar-brand { margin-left: -1.25rem; padding: 0 1.1rem; background: rgba(0, 0, 0, .12); }
.navbar-brand img { width: 1.75rem; height: 1.75rem; }
.navbar-brand:hover, .nav-links a:hover { color: #fff; text-decoration: none; background: rgba(0, 0, 0, .12); }
.nav-links { display: flex; min-width: 0; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.nav-links a[aria-current="page"] { background: rgba(0, 0, 0, .2); box-shadow: inset 0 -3px 0 #fff; }

.search { flex: none; margin-left: auto; width: min(16rem, 40vw); }
.search input {
  width: 100%;
  padding: .45rem .85rem;
  color: #fff;
  font: inherit;
  font-size: .95rem;
  background: rgba(0, 0, 0, .18);
  border: 0;
  border-radius: var(--radius);
  outline: none;
}
.search input::placeholder { color: rgba(255, 255, 255, .75); }
.search input:focus { background: rgba(0, 0, 0, .3); }

.layout {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 1.5rem auto 2.5rem;
  padding: 2rem 2.25rem 2.5rem;
  background: var(--block);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
}

.footer { background: var(--block); box-shadow: 0 -1px 0 var(--line); }
.footer .inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  color: var(--muted);
  font-size: .85rem;
}
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }

/* --- Components (same look as the wiki's) -------------------------------- */

.lead { font-size: 1.1rem; color: var(--muted); }
.muted { color: var(--faint); }

.button, button {
  display: inline-block;
  padding: .5rem 1.25rem;
  color: #fff;
  font: inherit;
  font-weight: 600;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.button:hover, button:hover { color: #fff; background: var(--accent-hover); text-decoration: none; }

.callout {
  position: relative;
  max-width: 50rem;
  padding: .85rem 1rem .85rem 2.9rem;
  background: rgba(139, 195, 74, .08);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout::before {
  content: "i";
  position: absolute;
  left: .9rem;
  top: .9rem;
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  color: #1b1b1b;
  font: 700 .8rem/1 Georgia, serif;
  background: var(--accent);
  border-radius: 50%;
}
.callout.warning { background: rgba(255, 179, 0, .08); border-left-color: var(--warn); }
.callout.warning::before { content: "!"; background: var(--warn); font-family: inherit; }
.callout.danger { background: rgba(229, 83, 83, .1); border-left-color: var(--danger); }
.callout.danger::before { content: "!"; background: var(--danger); color: #fff; font-family: inherit; }

/* Key numbers in a row. */
.facts { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1.75rem; padding: 0; }
.facts div { padding: .55rem 1rem; background: var(--block-2); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }
.facts dt { color: var(--faint); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.facts dd { margin: 0; font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Dashboard tiles. */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: 1rem; margin: 1.25rem 0; }
.tile { padding: 1rem 1.15rem; background: var(--block-2); border-top: 3px solid var(--accent); border-radius: var(--radius); }
.tile h3 { margin: 0 0 .6rem; color: var(--text); font-size: 1.05rem; }
.tile > :last-child { margin-bottom: 0; }

/* Link cards (start page). */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr)); gap: 1rem; margin: 2rem 0 0; }
.card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.25rem;
  color: var(--muted);
  background: var(--block-2);
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card strong { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.card span { font-size: .9rem; line-height: 1.5; }
a.card:hover { color: var(--muted); text-decoration: none; transform: translateY(-2px); border-top-color: var(--accent); box-shadow: var(--shadow-raised); }
a.card:hover strong { color: var(--accent); }

ul.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; padding: 0; list-style: none; }
ul.chips li { padding: .1rem .55rem; font-size: .85rem; background: rgba(255, 255, 255, .06); border-radius: 3px; }

/* Tables and toplists. */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .55rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child > td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .03); }
thead th {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--block-2);
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --- Minecraft text (mc package: §-codes, MiniMessage, rank glyphs) ------- */

/* The dark game colours are lightened (same hue) so they stay readable on the dark
   background, as in the wiki; the light ones are as in game. */
.mc-0 { color: #9e9e9e; }
.mc-1 { color: #7b84ff; }
.mc-2 { color: #4fc24f; }
.mc-3 { color: #3fc8c8; }
.mc-4 { color: #ef6b6e; }
.mc-5 { color: #d58ad5; }
.mc-6 { color: #fa0; }
.mc-7 { color: #aaa; }
.mc-8 { color: #8c8c8c; }
.mc-9 { color: #55f; }
.mc-a { color: #5f5; }
.mc-b { color: #5ff; }
.mc-c { color: #f55; }
.mc-d { color: #f5f; }
.mc-e { color: #ff5; }
.mc-f { color: #fff; }
.mc-l { font-weight: 700; }
.mc-o { font-style: italic; }
.mc-n { text-decoration: underline; }
.mc-m { text-decoration: line-through; }
.mc-n.mc-m { text-decoration: underline line-through; }
.mc-k { font-family: var(--mono); }
.mc-glyph { display: inline-block; width: auto; height: 1em; margin-right: .15em; vertical-align: -.12em; image-rendering: pixelated; }

/* --- Lists, navigation inside a section ----------------------------------- */

.tabs { position: relative; display: flex; gap: .25rem; margin: 0 0 1.5rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: .55rem 1rem; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--text); text-decoration: none; background: rgba(255, 255, 255, .04); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
@media (min-width: 901px) { .tabs-wrap { flex-wrap: wrap; overflow: visible; } }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.filters a { padding: .25rem .8rem; color: var(--muted); font-size: .9rem; background: var(--block-2); border-radius: 999px; }
.filters a:hover { color: var(--text); text-decoration: none; }
.filters a[aria-current="page"] { color: #fff; background: var(--accent); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem; margin: 1.25rem 0; }
.pagination a, .pagination span { padding: .35rem .75rem; border-radius: var(--radius); }
.pagination a { color: var(--text); background: var(--block-2); }
.pagination a:hover { color: #fff; background: var(--accent); text-decoration: none; }
.pagination span { color: var(--faint); }
.pagination .pagination-pos { color: var(--muted); }

.updated { margin: 1.5rem 0 0; color: var(--faint); font-size: .8rem; text-align: right; }
.count { margin-left: .35rem; padding: .05rem .5rem; color: var(--muted); font-size: .8rem; font-weight: 600; vertical-align: middle;
  background: var(--block-2); border-radius: 999px; }

.inline-search { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1rem; }
.inline-search input, .hero-search input {
  width: min(22rem, 100%);
  padding: .55rem .9rem;
  color: var(--text);
  font: inherit;
  background: var(--block-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}
.inline-search input:focus, .hero-search input:focus { border-color: var(--accent); }

/* Name suggestions under the search fields (stats.js). */
.suggest {
  position: absolute;
  z-index: 50;
  max-height: 22rem;
  margin: 0;
  padding: .25rem 0;
  overflow-y: auto;
  list-style: none;
  background: var(--block);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
}
.suggest a { display: flex; align-items: center; gap: .6rem; padding: .35rem .8rem; color: var(--text); }
.suggest .head { flex: none; width: 20px; height: 20px; }
.suggest a:hover, .suggest [aria-selected="true"] a { color: var(--text); text-decoration: none; background: var(--block-2); }
.suggest [aria-selected="true"] a { box-shadow: inset 3px 0 0 var(--accent); }

/* List filter (stats.js). */
.filter { margin: 1rem 0; }
.filter input {
  width: min(22rem, 100%);
  padding: .5rem .9rem;
  color: var(--text);
  font: inherit;
  background: var(--block-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}
.filter input:focus { border-color: var(--accent); }
.filter-empty { margin: .75rem 0 0; }

/* Player heads and names. */
.head { image-rendering: pixelated; border-radius: 2px; }
.player { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.player .head { flex: none; width: 16px; height: 16px; }
.player-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.player-header h1 { margin: 0; }
.player-header p { margin: 0; }

/* Punishment tables. */
td.nowrap { white-space: nowrap; }
td.reason { min-width: 10rem; }
.badge { display: inline-block; padding: .05rem .55rem; font-size: .78rem; font-weight: 700; white-space: nowrap; border-radius: 999px;
  color: var(--muted); background: rgba(255, 255, 255, .08); }
.badge-aktiv { color: #ff8a80; background: rgba(229, 83, 83, .18); }
.badge-aufgehoben { color: var(--accent-hover); background: var(--accent-soft); }
.lifted { display: block; margin-top: .2rem; color: var(--faint); font-size: .8rem; }

/* Rules. */
.page-index { margin: 1.25rem 0 2rem; padding: 1rem 1.25rem; background: var(--block-2); border-radius: var(--radius); }
.page-index ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); gap: .2rem 1.5rem;
  margin: 0; padding: 0; list-style: none; }
.page-index a { color: var(--text); }
.page-index a:hover { color: var(--accent); }
.para { margin-right: .35rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.rules { max-width: 52rem; }
.rules h2, .rules h3, .rules h4 { scroll-margin-top: calc(var(--navbar-h) + 1rem); }
.rules h3 { color: var(--text); }
.rules h4 { margin: 1.25rem 0 .4rem; font-size: 1rem; }
.rules h2 .para, .rules h3 .para, .rules h4 .para { font-weight: 600; }
.rule-text p { margin: .4rem 0; line-height: 1.7; }
.rule-text ul { margin: .4rem 0; padding-left: 1.3rem; }

/* Team. */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: .75rem; margin: 1rem 0; padding: 0; list-style: none; }
.team-member { display: flex; align-items: center; gap: .85rem; padding: .75rem 1rem; background: var(--block-2); border-radius: var(--radius); }
.team-member .head { flex: none; }
.team-member strong { display: block; }
.team-member ul.chips { margin: .25rem 0 0; }
h2 .mc-glyph { height: .9em; margin-right: .5rem; vertical-align: -.05em; }

/* --- Charts (server-rendered SVG, see internal/web/chart.go) -------------- */

.chart-figure { margin: 1rem 0 1.5rem; }
/* The wide chart on screens from 700px, the narrow one (fewer columns, same text size) below. */
.chart { display: block; width: 100%; height: auto; }
.chart-narrow { display: none; }
@media (max-width: 700px) {
  .chart-wide { display: none; }
  .chart-narrow { display: block; }
}
.chart .grid { stroke: rgba(255, 255, 255, .07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .axis { stroke: rgba(255, 255, 255, .25); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .tick { text-anchor: end; }
.chart .xl, .chart .val { text-anchor: middle; }
.chart .val { fill: var(--text); font-weight: 600; }
.chart .bar { fill: var(--accent); }
.chart .running .bar { fill: var(--accent); opacity: .45; }
.chart .hit { fill: transparent; }
.chart .col:hover .bar { fill: var(--accent-hover); opacity: 1; }
.chart .col:hover .hit { fill: rgba(255, 255, 255, .04); }
.chart-table summary { color: var(--muted); font-size: .85rem; cursor: pointer; }
.chart-table summary:hover { color: var(--accent); }
.chart-table .table-wrap { max-width: 26rem; max-height: 22rem; overflow-y: auto; }

/* --- Vote ------------------------------------------------------------------ */

.tiles.wide { grid-template-columns: repeat(auto-fill, minmax(min(26rem, 100%), 1fr)); }
table.toplist { font-size: .92rem; }
table.toplist td { padding: .35rem .4rem; border-bottom: 1px solid var(--line); }
table.toplist tr:last-child td { border-bottom: 0; }
td.rank { width: 2.5rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.unit { color: var(--faint); font-size: .8em; }
p.more { margin: .6rem 0 0; font-size: .9rem; }

ul.vote-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: .75rem; margin: .75rem 0 0; padding: 0; list-style: none; }
ul.vote-links a { display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem; color: var(--muted); background: var(--block-2);
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }
ul.vote-links a:hover { text-decoration: none; background: rgba(139, 195, 74, .12); }
ul.vote-links strong { color: var(--text); }
ul.vote-links strong::after { content: " ↗"; color: var(--accent); }
ul.vote-links span { font-size: .85rem; }

table.shop .reward { font-weight: 600; }

ul.streak-tiers { margin: .5rem 0; padding: 0; list-style: none; }
ul.streak-tiers > li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
ul.streak-tiers .days { min-width: 5rem; color: var(--accent); font-weight: 700; }
ul.streak-tiers ul.chips { margin: 0; }

/* --- Skyblock --------------------------------------------------------------- */

.challenges { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); gap: .85rem; margin: 1rem 0 1.5rem; }
.challenge { display: flex; flex-direction: column; padding: .9rem 1rem; background: var(--block-2); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; }
.challenge h3 { margin: 0 0 .35rem; color: var(--text); font-size: 1rem; }
.challenge-desc { flex: 1; margin: 0 0 .6rem; font-size: .88rem; line-height: 1.5; }
.challenge-done { display: flex; align-items: center; gap: .6rem; margin: 0; color: var(--muted); font-size: .8rem; }
/* Share as a meter: the fill on a lighter track of the same hue. */
.meter { flex: 0 0 5rem; height: .4rem; overflow: hidden; background: rgba(139, 195, 74, .18); border-radius: 999px; }
.meter > span { display: block; height: 100%; min-width: 2px; background: var(--accent); border-radius: 999px; }
.page-index .mc-4, .page-index .mc-6 { font-weight: 600; }

/* --- Citybuild, Creative, Pets, warps ------------------------------------- */

/* Second line under a name in tables: descriptions, lore. */
td .lore { display: block; margin-top: .15rem; color: var(--muted); font-size: .85rem; line-height: 1.45; }
table.warps code { white-space: nowrap; }
.stars { color: #ffca28; }
ul.couples { margin: 0; padding: 0; list-style: none; }
ul.couples li { padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
ul.couples li:last-child { border-bottom: 0; }
.couple { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.heart { color: #ef6b6e; }

/* Horizontal bars: label, meter, value. */
ul.bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr)); gap: .3rem 2rem; margin: .75rem 0; padding: 0; list-style: none; }
ul.bars li { display: grid; grid-template-columns: 9.5rem 1fr 3.5rem; align-items: center; gap: .75rem; font-size: .92rem; }
ul.bars .meter { flex: none; height: .55rem; }
ul.bars .num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- MineZ ------------------------------------------------------------------ */

.note { margin-left: .35rem; font-size: .85rem; }
.crew h3 .badge { margin-left: .35rem; vertical-align: middle; }
ul.crew-members { margin: .6rem 0 0; padding: 0; list-style: none; }
ul.crew-members li { display: flex; justify-content: space-between; gap: .5rem; padding: .25rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
ul.crew-members li:last-child { border-bottom: 0; }
.meter.inline { display: inline-block; width: 4rem; vertical-align: middle; }
dl.mini-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: .25rem 0 .5rem; }
dl.mini-facts dt { color: var(--faint); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
dl.mini-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- Player profile ---------------------------------------------------------- */

.profile-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.profile-header h1 { margin: 0; }
.profile-header .head { flex: none; }
.team-rank { margin: .2rem 0 0; font-weight: 600; }
.profile-title { margin: -.2rem 0 .6rem; font-weight: 600; }
dl.profile-stats { margin: 0; }
dl.profile-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
dl.profile-stats > div:last-child { border-bottom: 0; }
dl.profile-stats dt { color: var(--muted); font-size: .9rem; }
dl.profile-stats dd { margin: 0; text-align: right; }
.stat-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-rank { display: block; color: var(--faint); font-size: .78rem; }
ul.pet-list { margin: 0; padding: 0; list-style: none; }
ul.pet-list li { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline; padding: .35rem 0; border-bottom: 1px solid var(--line); }
ul.pet-list li:last-child { border-bottom: 0; }
ul.pet-list .num { margin-left: auto; color: var(--muted); font-size: .88rem; }
ul.search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .4rem 1rem; padding: 0; list-style: none; }

/* --- Pages ---------------------------------------------------------------- */

.hero { padding: 1rem 0 .5rem; text-align: center; }
.hero h1 { margin-bottom: .75rem; }
.hero .lead { max-width: 42rem; margin: 0 auto 1.5rem; }
.hero-search { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }

.error-page { padding: 2rem 0; text-align: center; }
.error-page .error-code { margin: 0; color: var(--accent); font-size: 4rem; font-weight: 700; line-height: 1; }

/* --- Small screens and print ---------------------------------------------- */

@media (max-width: 900px) {
  .site-header .inner { padding-top: 1rem; padding-bottom: 1rem; }
  .logo img { height: auto; width: min(22rem, 70vw); }
  .navbar .inner { padding-right: .5rem; }
  .navbar-brand span { display: none; }
  .nav-links a { padding: 0 .65rem; }
  .search { width: 9rem; }
  .layout { margin: 0; padding: 1.5rem 1rem 2rem; border-radius: 0; }
  h1 { font-size: 1.7rem; }
}

/* Phones: player search gets its own row below the links. */
@media (max-width: 600px) {
  .navbar .inner { flex-wrap: wrap; height: auto; gap: 0 .5rem; }
  .nav-links { flex: 1; }
  .search { order: 3; width: 100%; margin: 0 0 .5rem; }
  .logo-tag { display: none; }
}

@media print {
  html, body { background: #fff; color: #000; }
  .site-header, .navbar, .footer { display: none; }
  .layout { margin: 0; padding: 0; background: #fff; box-shadow: none; }
}
