/* Rankings (/rangliste), player comparison (/vergleich) and the record tiles of the
   server start page. Needs server.css and components.css. Classes: st- (rankings, shared),
   cmp- (comparison). */

:root {
  --st-grid: #eceeeb;
  --st-axis: #c9cfca;
  --st-track: #eef1ee;
}

/* The selection bar and + buttons are also used on the old player list without server.css. */
.cmp-bar, .cmp-add {
  --srv-card: #ffffff;
  --srv-text: #1b1f1d;
  --srv-muted: #5c6862;
  --srv-border: #dfe3df;
  --srv-green: #2fbf62;
  --srv-green-dark: #1f8f47;
  --srv-night: #0f1512;
}

.srv-page.srv-page-wide { max-width: 1140px; }
.st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.st-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 8px;
}
.st-head .srv-lead { margin-bottom: 16px; }

/* segmented control (links on the pages, buttons in the chart) */
.st-periods {
  display: inline-flex;
  padding: 3px;
  margin-bottom: 16px;
  border: 1px solid var(--srv-border);
  border-radius: 10px;
  background: var(--srv-card);
}
.st-periods a, .st-periods button {
  padding: 6px 14px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--srv-muted);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.st-periods a:hover, .st-periods button:hover { color: var(--srv-text); background: var(--srv-bg); }
.st-periods [aria-current="page"], .st-periods [aria-pressed="true"],
.st-periods [aria-current="page"]:hover, .st-periods [aria-pressed="true"]:hover {
  background: var(--srv-night);
  color: #fff;
}

.st-hint {
  margin: 0 0 8px;
  padding: 10px 14px;
  border-left: 3px solid var(--srv-green);
  background: var(--srv-card);
  border-radius: 0 8px 8px 0;
  color: var(--srv-muted);
  font-size: 15px;
}

.st-group { margin-top: 36px; }
.st-group > h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--srv-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.st-group > h2::after { content: ""; flex: 1; height: 1px; background: var(--srv-border); }

.st-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.st-board {
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 14px;
  padding: 18px 18px 12px;
}
.srv-page .st-board h3 { font-size: 18px; margin-bottom: 10px; }
.st-empty { color: var(--srv-muted); font-size: 15px; margin: 4px 0 8px; }

/* one ranking row: rank, head, name + bar, value, + */
.st-list { list-style: none; margin: 0; padding: 0; }
.st-row {
  display: grid;
  grid-template-columns: 26px 28px minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--st-grid);
}
.st-row:first-child { border-top: 0; }
.st-row[hidden] { display: none; }
.st-rank {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--srv-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.st-first .st-rank { color: var(--srv-green-dark); }
.st-avatar { width: 28px; height: 28px; border-radius: 5px; image-rendering: pixelated; }
.st-who { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.st-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--srv-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
/* the prefix gives way before the name does */
.st-name .mcc-prefix { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.st-name > span:last-child { flex: 0 0 auto; max-width: calc(100% - 34px); overflow: hidden; text-overflow: ellipsis; }
.st-name > span:only-child { max-width: 100%; }
.st-name:hover { text-decoration: underline; }
.st-bar { display: block; height: 4px; border-radius: 2px; background: var(--st-track); }
.st-bar span { display: block; height: 100%; min-width: 3px; border-radius: 2px; background: var(--srv-green); }
.st-first .st-bar span { background: var(--srv-green-dark); }
.st-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.st-add, .cmp-add, .pl-star {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--srv-border);
  border-radius: 7px;
  background: var(--srv-card);
  color: var(--srv-muted);
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.pl-star[aria-pressed="true"] { color: #b8860b; border-color: #e6c35c; background: #fff8e1; }
.st-add:hover, .cmp-add:hover, .pl-star:hover { border-color: var(--srv-green); color: var(--srv-green-dark); }
.st-add[aria-pressed="true"], .cmp-add[aria-pressed="true"] {
  background: var(--srv-green);
  border-color: var(--srv-green);
  color: #fff;
}
.st-toggle {
  margin-top: 6px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--srv-green-dark);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.st-toggle:hover { text-decoration: underline; }

/* phones: prefix and name in two lines instead of cutting both, bigger + buttons */
@media (max-width: 600px) {
  .st-board { padding: 14px 14px 8px; }
  .st-row { grid-template-columns: 22px 28px minmax(0, 1fr) auto 36px; gap: 8px; padding: 8px 0; }
  .st-name { flex-wrap: wrap; gap: 2px 6px; }
  .st-name .mcc-prefix { flex: none; max-width: 100%; }
  .st-name > span:last-child { flex: 1 1 100%; }
  .st-value { font-size: 14px; }
  .st-add, .cmp-add, .pl-star { width: 36px; height: 36px; }
  .st-toggle { min-height: 40px; }
}

/* ---------------------------------------------------------------- selection bar (compare.js) */
.cmp-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  padding: 10px 16px;
  background: var(--srv-night);
  color: #fff;
  box-shadow: 0 -8px 24px rgba(15, 21, 18, 0.2);
  font-family: var(--font-body);
}
.cmp-bar.open { display: block; }
body.cmp-bar-open { padding-bottom: 64px; }
.cmp-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.cmp-bar-label {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.cmp-bar-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.cmp-bar-list li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 15px;
  font-weight: 700;
}
.cmp-bar-list button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.cmp-bar-list button:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.cmp-bar-note { color: rgba(255, 255, 255, 0.65); font-size: 14px; }
.cmp-bar-go {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--srv-green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.cmp-bar-go:hover { background: var(--srv-green-dark); color: #fff; }
.cmp-bar-go.disabled { background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.5); cursor: default; }

/* ---------------------------------------------------------------- comparison: picker */
.srv-page .cmp-picker { padding: 18px 20px; margin-bottom: 0; }
.cmp-picker-head { display: flex; gap: 10px; align-items: center; }
.cmp-search-label { font-weight: 700; }
.cmp-search { flex: 1; min-width: 0; }
.cmp-picker-note { margin: 8px 0 10px; color: var(--srv-muted); font-size: 14px; min-height: 1.2em; }
.cmp-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 172px;
  overflow-y: auto;
}
.cmp-options li[hidden] { display: none; }
.cmp-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--srv-border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  user-select: none;
}
.cmp-options label:hover { border-color: var(--srv-muted); }
.cmp-options input { position: absolute; opacity: 0; width: 0; height: 0; }
.cmp-options img { border-radius: 4px; image-rendering: pixelated; }
.cmp-options label:has(input:checked) { background: var(--srv-night); border-color: var(--srv-night); color: #fff; }
.cmp-options label:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.cmp-options label:has(input:focus-visible) { outline: 2px solid var(--srv-green); outline-offset: 2px; }

.srv-page .st-empty-card { margin-top: 20px; }

/* ---------------------------------------------------------------- comparison: numbers */
.cmp-table {
  width: 100%;
  min-width: calc(190px + var(--cols) * 150px);
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 14px;
  font-size: 15px;
}
.cmp-table th, .cmp-table td { padding: 10px 16px; text-align: left; }
.cmp-table thead th { vertical-align: bottom; border-bottom: 1px solid var(--srv-border); }
.cmp-metric-col { width: 26%; }
.cmp-player { position: relative; padding-top: 18px !important; }
.cmp-player::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--c);
}
.cmp-player img { display: block; width: 44px; height: 44px; border-radius: 7px; image-rendering: pixelated; margin-bottom: 8px; }
.cmp-player a {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--srv-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.cmp-player a:hover { text-decoration: underline; }
.cmp-player > span { display: block; margin-top: 4px; }
.cmp-wins { color: var(--srv-muted); font-size: 13px; font-weight: 400; }
.cmp-wins strong { font-family: var(--font-display); font-size: 16px; color: var(--srv-text); }
.cmp-group th {
  padding-top: 18px !important;
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--srv-muted);
  border-bottom: 1px solid var(--srv-border);
}
.cmp-table tbody tr:not(.cmp-group) th { font-weight: 700; }
.cmp-table tbody tr:not(.cmp-group) > * { border-bottom: 1px solid var(--st-grid); }
.cmp-table tbody:last-child tr:last-child > * { border-bottom: 0; }
.cmp-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cmp-best .cmp-value { font-weight: 700; }
.cmp-best-mark {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e7f8ee;
  color: #135f31;
}
.cmp-best-mark > span[aria-hidden] { display: none; }
.cmp-note { display: block; color: var(--srv-muted); font-size: 13px; font-weight: 400; }
.cmp-split { display: block; margin-top: 4px; color: var(--srv-muted); font-size: 13px; }
.cmp-detail-note { margin: -4px 0 14px; color: var(--srv-muted); font-size: 15px; max-width: 760px; }
.cmp-board-note { margin: -4px 0 8px; color: var(--srv-muted); font-size: 14px; }
.cmp-meter { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--st-track); }
.cmp-meter span { display: block; height: 100%; border-radius: 3px; background: var(--c); }

/* ---------------------------------------------------------------- comparison: chart */
.srv-page .cmp-chart-card { padding: 20px 22px; }
.cmp-chart-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.cmp-chart-controls .mcc-select { width: auto; max-width: 100%; }
.cmp-chart-controls .st-periods { margin: 0; }
.cmp-chart-sub { margin: 10px 0 6px; color: var(--srv-muted); font-size: 15px; }
.cmp-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 8px; padding: 0; font-size: 15px; font-weight: 700; }
.cmp-legend li { display: inline-flex; align-items: center; gap: 8px; }
.cmp-legend li::before { content: ""; width: 16px; height: 3px; border-radius: 2px; background: var(--c); }
.cmp-chart { position: relative; min-height: 120px; }
.cmp-chart svg { display: block; overflow: visible; }
.cmp-grid { stroke: var(--st-grid); stroke-width: 1; }
.cmp-axis { stroke: var(--st-axis); stroke-width: 1; }
.cmp-tick { fill: var(--srv-muted); font-family: var(--font-body); font-size: 12px; font-variant-numeric: tabular-nums; }
.cmp-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cmp-dot { stroke: var(--srv-card); stroke-width: 2; }
.cmp-cross { stroke: var(--srv-muted); stroke-width: 1; }
.cmp-hit { cursor: crosshair; outline: none; touch-action: pan-y; }  /* sideways drags scrub, up and down scrolls */
.cmp-hit:focus-visible { stroke: var(--srv-green); stroke-width: 2; }
.cmp-tip {
  position: absolute;
  pointer-events: none;
  min-width: 140px;
  padding: 8px 12px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 21, 18, 0.12);
  font-size: 14px;
}
.cmp-tip-date { color: var(--srv-muted); font-size: 13px; margin-bottom: 4px; }
.cmp-tip-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.cmp-tip-row::before { content: ""; width: 12px; height: 2px; background: var(--c); flex: none; }
.cmp-tip-row strong { font-family: var(--font-display); }
.cmp-tip-row span { color: var(--srv-muted); }
.cmp-chart-table { margin-top: 12px; font-size: 15px; }
.cmp-chart-table summary { cursor: pointer; color: var(--srv-green-dark); font-weight: 700; }
.cmp-chart-table .mcc-table-wrap { max-height: 320px; overflow-y: auto; margin-top: 8px; }

/* ---------------------------------------------------------------- comparison: details */
.cmp-details { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.cmp-detail-table th:not(:first-child), .cmp-detail-table td.num { text-align: right; }
.cmp-detail-table td { vertical-align: middle; padding: 7px 8px; }
.cmp-detail-table th { padding: 6px 8px; }
.cmp-detail-table th img { border-radius: 4px; vertical-align: middle; image-rendering: pixelated; }
.cmp-key { display: inline-block; width: 12px; height: 3px; border-radius: 2px; background: var(--c); vertical-align: middle; margin-right: 6px; }
.cmp-detail-table td.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp-detail-table td.cmp-best { font-weight: 700; color: #135f31; }
.mcc-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- start page records */
.st-records { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.st-record {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 12px;
  color: var(--srv-text);
  text-decoration: none;
}
.st-record:hover { border-color: var(--srv-green); }
.st-record-label { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--srv-muted); font-weight: 700; }
.st-record-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.2; }
.st-record-who { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; min-width: 0; }
.st-record-who img { border-radius: 4px; image-rendering: pixelated; }
.st-record-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.st-section-head a { color: var(--srv-green-dark); font-weight: 700; text-decoration: none; white-space: nowrap; }
.st-section-head a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .st-records { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .st-head { display: block; }
  .cmp-picker-head { flex-wrap: wrap; }
  .cmp-search-label { display: none; }
  .cmp-bar-go { margin-left: 0; }
}
@media (max-width: 460px) {
  .st-records { grid-template-columns: 1fr; }
}
/* narrow screens: the best value is marked with a star only (the word is read out) */
@media (max-width: 800px) {
  .cmp-value { flex-wrap: wrap; gap: 2px 6px; white-space: normal; }
  .cmp-best-mark { padding: 0 4px; font-size: 12px; }
  .cmp-best-mark > span[aria-hidden] { display: inline; }
  .cmp-best-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
/* phones: no sideways scrolling; the players are a sticky row of columns, every metric a label over its values */
@media (max-width: 640px) {
  .mcc-table-wrap:has(> .cmp-table) { overflow: visible; }
  .cmp-table, .cmp-table thead, .cmp-table tbody { display: block; }
  .cmp-table { min-width: 0 !important; border-radius: 12px; }
  .cmp-table tr { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 0 10px; padding: 0 12px; }
  .cmp-table thead { position: sticky; top: 56px; z-index: 3; background: var(--srv-card); border-radius: 12px 12px 0 0;
                     border-bottom: 1px solid var(--srv-border); }
  .cmp-table thead th { border-bottom: 0; padding: 12px 0 10px !important; min-width: 0; }
  .cmp-table .cmp-metric-col { display: none; }
  .cmp-player::before { left: 0; right: 0; }
  .cmp-player img { width: 28px; height: 28px; margin-bottom: 4px; }
  .cmp-player a { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
  .cmp-player > span:not(.cmp-wins) { display: none; }
  .cmp-wins { font-size: 12px; }
  .cmp-wins strong { font-size: 14px; }
  .cmp-table tbody tr:not(.cmp-group) > * { border-bottom: 0; }
  .cmp-table tbody tr:not(.cmp-group) { border-bottom: 1px solid var(--st-grid); padding-bottom: 10px; }
  .cmp-table tbody tr:not(.cmp-group) th {
    grid-column: 1 / -1;
    position: static;
    min-width: 0;
    padding: 10px 0 4px;
    box-shadow: none;
    background: none;
    font-size: 15px;
  }
  .cmp-note { display: inline; margin-left: 4px; }
  .cmp-table td { padding: 0; min-width: 0; }
  .cmp-value { font-size: 15px; line-height: 1.25; }
  .cmp-split { font-size: 12px; }
  .cmp-group th { grid-column: 1 / -1; padding: 16px 0 6px !important; }
  .srv-page .cmp-chart-card { padding: 16px; }
  .cmp-chart-controls .mcc-select { width: 100%; }
  .cmp-options { max-height: 140px; }
}
/* the metric names stay visible while the players scroll sideways */
@media (min-width: 641px) and (max-width: 800px) {
  .cmp-table tbody tr:not(.cmp-group) th, .cmp-metric-col {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--srv-card);
    min-width: 120px;
    box-shadow: 1px 0 0 var(--srv-border);
  }
  .cmp-table { min-width: calc(140px + var(--cols) * 140px); }
  .cmp-table th, .cmp-table td { padding: 10px 12px; }
}
.list-group-item .cmp-add { width: 36px; height: 36px; flex: none; }

/* ---------------------------------------------------------------- player list (/spieler) */
.srv-page .pl-tools { padding: 16px 18px; margin-bottom: 16px; }
.pl-tools-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.pl-search { flex: 1 1 220px; width: auto; }
.pl-tools .st-periods { margin: 0; }
.pl-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pl-filters button {
  padding: 5px 12px;
  border: 1px solid var(--srv-border);
  border-radius: 999px;
  background: var(--srv-card);
  color: var(--srv-text);
  font: inherit;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.pl-filters button:hover { border-color: var(--srv-muted); }
.pl-filters button span { margin-left: 4px; color: var(--srv-muted); font-family: var(--font-heading); font-weight: 600; }
.pl-filters button[aria-pressed="true"] { background: var(--srv-night); border-color: var(--srv-night); color: #fff; }
.pl-filters button[aria-pressed="true"] span { color: rgba(255, 255, 255, 0.7); }

.pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pl-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 12px;
}
.pl-row > .pl-avatar, .pl-row > button { flex: none; }
.pl-row[hidden] { display: none; }
.pl-avatar { width: 44px; height: 44px; border-radius: 7px; image-rendering: pixelated; }
.pl-main { min-width: 0; flex: 1; }
.pl-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pl-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--srv-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.pl-name:hover { text-decoration: underline; }
.pl-badge { padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.pl-badge-mod { background: #e7f8ee; color: #135f31; }
.pl-badge-op { background: #eef0ff; color: #3b44a8; }
.pl-badge-ban { background: #fdecec; color: #8f1f1f; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--srv-muted); font-size: 14px; margin-top: 2px; }
.pl-tops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pl-top {
  padding: 1px 8px 1px 2px;
  border: 1px solid var(--srv-border);
  border-radius: 6px;
  color: var(--srv-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.pl-top b {
  display: inline-block;
  margin-right: 4px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--srv-night);
  color: #6ee79a;
  font-family: var(--font-display);
}
.pl-top:hover { border-color: var(--srv-green); }
.pl-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--srv-muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: default;
}
.pl-status span:first-child { width: 8px; height: 8px; border-radius: 50%; background: #c9cfca; }
.pl-online { color: var(--srv-green-dark); }
.pl-online span:first-child { background: var(--srv-green); box-shadow: 0 0 0 3px rgba(47, 191, 98, 0.18); }
.srv-page .pl-empty { margin-top: 8px; color: var(--srv-muted); }

@media (max-width: 600px) {
  .pl-row { flex-wrap: wrap; gap: 8px 12px; padding: 12px; }
  .pl-avatar { width: 40px; height: 40px; }
  .pl-status { order: 5; flex-basis: 100%; padding-left: 52px; }
}

/* ---------------------------------------------------------------- player page extras (old template) */
.pi-extra {
  --srv-card: #ffffff;
  --srv-text: #1b1f1d;
  --srv-muted: #5c6862;
  --srv-border: #dfe3df;
  --srv-green: #2fbf62;
  --srv-green-dark: #1f8f47;
  --srv-night: #0f1512;
  box-sizing: border-box;
  max-width: 1010px;
  margin: 48px auto 0;
  padding: 0 16px;
  font-family: var(--font-body);
  color: var(--srv-text);
  text-align: left;
}
.pi-extra *, .pi-extra *::before { box-sizing: border-box; }
.pi-extra h2 {
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--srv-muted);
  margin: 32px 0 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.pi-extra h2::after { content: ""; flex: 1; height: 1px; background: var(--srv-border); }
.pi-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.pi-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 12px;
  color: var(--srv-text);
  text-decoration: none;
}
.pi-tile-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--srv-muted); font-weight: 700; }
.pi-tile-value { font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1.25; }
.pi-tile-detail { color: var(--srv-muted); font-size: 14px; }
a.pi-tile:hover { border-color: var(--srv-green); }
.pi-rank { display: flex; align-items: baseline; gap: 6px; }
.pi-rank b { font-family: var(--font-display); font-size: 28px; line-height: 1.1; }
.pi-rank span { color: var(--srv-muted); font-size: 14px; }
.pi-rank-1 b { color: var(--srv-green-dark); }

.pi-activity { padding: 18px 20px; background: var(--srv-card); border: 1px solid var(--srv-border); border-radius: 12px; }
.pi-activity-sum { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-bottom: 12px; color: var(--srv-muted); font-size: 15px; }
.pi-activity-sum strong { display: block; font-family: var(--font-display); font-size: 22px; color: var(--srv-text); }
.pi-chart { position: relative; }
.pi-chart svg { display: block; overflow: visible; }
.pi-bar { fill: var(--srv-green); pointer-events: none; }
.pi-nodata { pointer-events: none; }
.pi-bar-hit { fill: transparent; cursor: default; outline: none; }
.pi-bar-hit:hover + .pi-bar, .pi-bar-hit:focus-visible + .pi-bar { fill: var(--srv-green-dark); }
.pi-nodata { fill: #eef1ee; }
.pi-chart .cmp-tick { fill: var(--srv-muted); font-size: 12px; font-family: var(--font-body); }
.pi-chart .cmp-grid { stroke: #eceeeb; }
.pi-chart .cmp-axis { stroke: #c9cfca; }
.pi-chart .cmp-tip { top: 0; }

/* ---------------------------------------------------------------- server statistics (/server-statistik) */
.ss-numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ss-note { color: var(--srv-muted); font-size: 14px; }
.ss-live { color: var(--srv-green-dark); }
.srv-page .ss-card { padding: 18px 20px; margin-bottom: 0; }
.ss-line { stroke: var(--srv-green-dark); }
.ss-area { fill: rgba(47, 191, 98, 0.1); }
.ss-dot { fill: var(--srv-green-dark); }
.ss-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ss-two .st-group { min-width: 0; }

.ss-heat-wrap { padding-top: 4px; }
.ss-heat { border-collapse: separate; border-spacing: 2px; width: 100%; table-layout: fixed; }
.ss-heat th { font-size: 12px; font-weight: 700; color: var(--srv-muted); text-align: left; padding: 0 2px; }
.ss-heat thead th { text-align: left; font-weight: 400; font-variant-numeric: tabular-nums; }
.ss-heat tr > th:first-child { width: 30px; }
.ss-heat td { height: 26px; border-radius: 4px; background: var(--heat, #eef1ee); position: relative; outline: none; }
.ss-heat td:hover, .ss-heat td:focus-visible { box-shadow: inset 0 0 0 2px var(--srv-night); }
.ss-heat td:hover::after, .ss-heat td:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 2;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  white-space: nowrap;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 21, 18, 0.12);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}
/* tooltips of the outer columns open inwards */
.ss-heat td:nth-child(-n+6)::after { left: 0; transform: none; }
.ss-heat td:nth-child(n+20)::after { left: auto; right: 0; transform: none; }
.ss-legend { display: flex; align-items: center; gap: 3px; margin-top: 10px; color: var(--srv-muted); font-size: 13px; }
.ss-legend > span:first-child { margin-right: 6px; }
.ss-legend > span:last-child { margin-left: 6px; }
.ss-legend-cell { width: 18px; height: 12px; border-radius: 3px; background: var(--heat); }

.ss-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.ss-total {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 10px;
}
.ss-total span { color: var(--srv-muted); font-size: 14px; }
.ss-total strong { font-family: var(--font-display); font-size: 20px; }

@media (max-width: 900px) {
  .ss-numbers { grid-template-columns: repeat(2, 1fr); }
  .ss-two { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ss-heat { border-spacing: 1px; }
  .ss-heat td { height: 20px; border-radius: 2px; }
  .ss-heat tr > th:first-child { width: 24px; }
  .ss-heat thead th { font-size: 11px; }
}

/* ---------------------------------------------------------------- weekly recap (start page) */
.rc-card { background: var(--srv-night); color: #fff; border-radius: 14px; padding: 22px 24px; }
.rc-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.rc-head h2 { font-size: 26px; margin: 0; }
.rc-sub { color: rgba(255, 255, 255, 0.7); font-size: 15px; }
.rc-sum { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 10px 0 16px; color: rgba(255, 255, 255, 0.8); font-size: 15px; }
.rc-sum strong { font-family: var(--font-display); color: #fff; }
.rc-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rc-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
}
.rc-tile:hover { border-color: var(--srv-green); }
.rc-tile-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #6ee79a; font-weight: 700; }
.rc-tile-who { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 19px; font-weight: 700; min-width: 0; }
.rc-tile-who img { border-radius: 4px; image-rendering: pixelated; }
.rc-tile-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-tile-text { color: rgba(255, 255, 255, 0.75); font-size: 14px; }
.rc-tile:first-child { background: rgba(47, 191, 98, 0.16); border-color: rgba(47, 191, 98, 0.45); }
@media (max-width: 900px) { .rc-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .rc-tiles { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- inactive players (moderation) */
.in-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.in-tools .st-periods { margin: 0; }
.in-count { color: var(--srv-muted); font-size: 15px; }
.in-table td { vertical-align: middle; }
.in-table img { border-radius: 4px; image-rendering: pixelated; vertical-align: middle; margin-right: 8px; }
.in-table tr[hidden] { display: none; }
.in-commands { margin-top: 14px; }
.in-table [hidden] { display: none !important; }  /* also in the phone layout (mcc-stack cells are blocks) */
.in-table td[data-role="wl-col"] { text-align: right; }

/* ---------------------------------------------------------------- teams (/teams) */
.tm-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 18px; }
.tm-pick .mcc-select { width: auto; min-width: 220px; }
.tm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tm-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 12px;
}
.tm-rank { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--srv-muted); text-align: right; }
.tm-first .tm-rank { color: var(--srv-green-dark); }
.tm-first .st-bar span { background: var(--srv-green-dark); }
.tm-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tm-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 18px; }
.tm-count { color: var(--srv-muted); font-size: 14px; }
.tm-members { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.tm-members img { display: block; border-radius: 4px; image-rendering: pixelated; }
.tm-value { text-align: right; }
.tm-value strong { display: block; font-family: var(--font-display); font-size: 20px; white-space: nowrap; }
.tm-value span { color: var(--srv-muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 600px) {
  .tm-row { grid-template-columns: 28px minmax(0, 1fr); gap: 8px 12px; }
  .tm-value { grid-column: 2; text-align: left; }
}

/* ---------------------------------------------------------------- competitions */
.cp-row { grid-template-columns: 26px 28px minmax(0, 1fr) auto; }
.cp-board { position: relative; }
.cp-meta { color: var(--srv-muted); font-size: 14px; margin: -4px 0 10px; }
.cp-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e7f8ee;
  color: #135f31;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cp-badge-soon { background: #eef0ff; color: #3b44a8; }
.cp-running { border-color: var(--srv-green); box-shadow: 0 0 0 1px var(--srv-green); }

.cp-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 32px;
  align-items: center;
  padding: 24px 28px;
  background: var(--srv-card);
  border: 1px solid var(--srv-green);
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--srv-green);
}
.cp-banner h2 { font-size: 28px; margin: 0 0 4px; }
.cp-banner .cp-meta { margin: 0 0 16px; }
.cp-podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cp-podium li {
  display: grid;
  grid-template-columns: 26px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--srv-bg);
}
.cp-podium li:first-child { background: #e7f8ee; }
.cp-podium img { border-radius: 4px; image-rendering: pixelated; }
.cp-place { font-family: var(--font-display); font-weight: 700; font-size: 18px; text-align: center; }
.cp-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-value { font-family: var(--font-display); font-weight: 600; white-space: nowrap; }
.cp-podium .cp-none { display: block; color: var(--srv-muted); }
@media (max-width: 800px) { .cp-banner { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- achievements (player page) */
.ac-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.ac-tile { gap: 6px; border-top: 3px solid var(--tier, var(--srv-border)); }
.ac-locked { background: #fafbfa; }
.ac-locked .ac-name { color: var(--srv-muted); }
.ac-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ac-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.ac-tier { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--tier); }
.ac-pips { display: flex; gap: 4px; }
.ac-pips span { flex: 1; height: 5px; border-radius: 3px; background: #e6e9e6; }
.ac-next { display: flex; flex-direction: column; gap: 4px; color: var(--srv-muted); font-size: 13px; }
.ac-done { color: var(--srv-green-dark); font-weight: 700; }

/* ---------------------------------------------------------------- profile, privacy, sharing */
.pi-top { margin-top: -30px; margin-bottom: 36px; text-align: center; }
.pi-bio { font-size: 18px; color: var(--srv-muted); font-style: italic; margin: 0 0 14px; }
.pi-top .st-hint { text-align: left; max-width: 760px; margin: 0 auto 14px; }
.pi-top .st-hint a, .pv-card a:not(.mcc-btn) { color: var(--srv-green-dark); }
.pi-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pi-fav[aria-pressed="true"] { color: #8a6500; border-color: #e6c35c; background: #fff8e1; }
.srv-page .pv-card { display: flex; gap: 24px; align-items: flex-start; }
.pv-card img { border-radius: 10px; image-rendering: pixelated; }
.pv-card h1 { margin: 6px 0 4px; }
.pv-card .pi-bio { text-align: left; }
.pf-check { display: flex !important; gap: 12px; align-items: flex-start; font-weight: 400 !important; margin-top: 20px !important; cursor: pointer; }
.pf-check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--srv-green); flex: none; }
.pf-favs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pf-favs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--srv-border);
  border-radius: 999px;
  color: var(--srv-text);
  font-weight: 700;
  text-decoration: none;
}
.pf-favs img { border-radius: 4px; image-rendering: pixelated; }
.cmp-mine { margin: 10px 0 0; }
.cmp-mine a { color: var(--srv-green-dark); font-weight: 700; text-decoration: none; }
.cmp-mine a:hover { text-decoration: underline; }
@media (max-width: 600px) { .srv-page .pv-card { flex-direction: column; } }

/* ---------------------------------------------------------------- activity feed (start page) */
.fd-list { list-style: none; margin: 0; padding: 0; background: var(--srv-card); border: 1px solid var(--srv-border); border-radius: 14px; }
.fd-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--st-grid); }
.fd-item:first-child { border-top: 0; }
.fd-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--srv-bg);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--srv-muted);
}
.fd-icon img { width: 32px; height: 32px; border-radius: 7px; image-rendering: pixelated; }
.fd-text { flex: 1; min-width: 0; }
.fd-text b { font-family: var(--font-display); }
.fd-time { flex: none; color: var(--srv-muted); font-size: 14px; white-space: nowrap; }
.fd-tier { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }
.fd-empty { padding: 16px 18px; color: var(--srv-muted); }
.fd-text a { color: var(--srv-text); text-decoration: none; }
.fd-text a:hover { text-decoration: underline; }
.srv-lead a, .srv-page .mcc-hint a { color: var(--srv-green-dark); }

/* ---------------------------------------------------------------- server health (moderation) */
.hl-alert-soft { background: #fff8e1; color: #6b4e00; }
.hl-alert code { font-family: var(--font-mono); font-size: 14px; }
.ac-updated { animation: ac-flash 1.6s ease-out; }
@keyframes ac-flash { from { background: #e7f8ee; } to { background: transparent; } }
.fd-new { animation: ac-flash 1.6s ease-out; }
@media (prefers-reduced-motion: reduce) { .ac-updated, .fd-new { animation: none; } }
.hl-alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; background: #fdecec; color: #8f1f1f; }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.hl-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--srv-border); border-radius: 10px; }
.hl-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--srv-muted); font-weight: 700; }
.hl-item strong { font-family: var(--font-display); font-size: 22px; }
.hl-sub { color: var(--srv-muted); font-size: 13px; }
.hl-status { font-size: 13px; font-weight: 700; }
.hl-good { color: #0b7a0b; }
.hl-warning { color: #8a5a00; }
.hl-critical { color: #b42323; }
.hl-ping-good, .cl-ping-good { color: #0b7a0b; }
.hl-ping-ok, .cl-ping-ok { color: #8a5a00; }
.hl-ping-bad, .cl-ping-bad { color: #b42323; }
:root[data-dark] .hl-good, :root[data-dark] .hl-ping-good, :root[data-dark] .cl-ping-good { color: #6ee09a; }
:root[data-dark] .hl-warning, :root[data-dark] .hl-ping-ok, :root[data-dark] .cl-ping-ok { color: #ffd27a; }
:root[data-dark] .hl-critical, :root[data-dark] .hl-ping-bad, :root[data-dark] .cl-ping-bad { color: #ffaaaa; }

/* connections and clients (moderation, players) */
.cl-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.cl-box { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--srv-border); border-radius: 10px; }
.cl-box strong { font-family: var(--font-display); font-size: 26px; }
.cl-shares { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 5px; font-size: 14px; }
.cl-shares li { display: grid; grid-template-columns: minmax(0, 1fr) 60px 24px; align-items: center; gap: 8px; }
.cl-share-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-share-bar { height: 6px; border-radius: 3px; background: var(--st-track, #eef1ee); overflow: hidden; }
.cl-share-bar i { display: block; height: 100%; background: var(--srv-green); }
.cl-share-n { text-align: right; color: var(--srv-muted); font-variant-numeric: tabular-nums; }
.hl-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin: 18px 0 8px; }
.hl-charts h3 { font-size: 15px !important; color: var(--srv-muted); }
@media (max-width: 800px) {
  .hl-grid { grid-template-columns: 1fr 1fr; }
  .hl-charts { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- moderation log */
.lg-search { margin-bottom: 10px; }
.lg-table td { vertical-align: top; }
.lg-when { white-space: nowrap; color: var(--srv-muted); font-variant-numeric: tabular-nums; }
.lg-details { color: var(--srv-muted); font-size: 14px; }
.lg-table a { color: var(--srv-green-dark); }
.lg-action { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef0ee; white-space: nowrap; }
.lg-ban, .lg-ingame_ban { background: #fdecec; color: #8f1f1f; }
.lg-unban, .lg-ingame_unban { background: #e7f8ee; color: #135f31; }
.lg-mod_add, .lg-mod_remove { background: #eef0ff; color: #3b44a8; }
.lg-table tr[hidden] { display: none; }

/* ---------------------------------------------------------------- notes (player page, moderators) */
.nt-card { background: #fffbea; border: 1px solid #efd98a; border-radius: 12px; padding: 16px 18px; }
.nt-note { padding: 8px 0; border-bottom: 1px solid #efe2a8; }
.nt-note p { margin: 4px 0 0; white-space: pre-line; }
.nt-head { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.nt-head span { color: var(--srv-muted); }
.nt-delete { margin-left: auto; border: 0; background: none; color: #8f1f1f; font: inherit; font-size: 13px; cursor: pointer; }
.nt-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }
.nt-form textarea { flex: 1; resize: vertical; font-family: var(--font-body); }
.nt-log { margin-top: 12px; font-size: 14px; }
.nt-log summary { cursor: pointer; font-weight: 700; }
.nt-log ul { margin: 8px 0 0; padding-left: 18px; }
.nt-log li span { color: var(--srv-muted); }

/* ---------------------------------------------------------------- hall of fame (/ruhmeshalle) */
.hf-records { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.hf-records .st-record-value { font-size: 22px; }
.hf-row { grid-template-columns: minmax(26px, auto) 28px minmax(0, 1fr) auto; }
.hf-row .st-value { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.hf-sub { font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--srv-muted); }
.hf-week { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--srv-muted); white-space: nowrap; }
.hf-medal {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--medal, var(--srv-border));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}
.hf-timeline { list-style: none; margin: 0; padding: 0; }
.hf-timeline li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 8px 0;
  border-top: 1px solid var(--st-grid);
  font-size: 15px;
}
.hf-timeline li:first-child { border-top: 0; }
.hf-when { grid-column: 1 / -1; color: var(--srv-muted); font-size: 12px; }
.hf-what a { color: var(--srv-text); text-decoration: none; }
.hf-what a:hover { text-decoration: underline; }
.hf-value { font-family: var(--font-display); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hf-goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hf-goals li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 16px; }

/* ---------------------------------------------------------------- community goals */
.gl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.gl-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 14px;
}
.srv-page .gl-card h3, .gl-card h3 { font-size: 19px; margin: 0; }
.gl-meta { color: var(--srv-muted); font-size: 14px; margin: 0; }
.gl-progress { display: block; height: 12px; border-radius: 6px; background: var(--st-track); overflow: hidden; }
.gl-progress span { display: block; height: 100%; min-width: 4px; border-radius: 6px; background: var(--srv-green); }
.gl-done .gl-progress span { background: var(--srv-green-dark); }
.gl-numbers { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.gl-numbers > span:last-child { white-space: nowrap; }
.gl-numbers b { font-family: var(--font-display); font-size: 18px; }
.gl-top { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; color: var(--srv-muted); font-size: 13px; }
.gl-top img { width: 16px; height: 16px; border-radius: 3px; image-rendering: pixelated; vertical-align: -3px; margin-right: 4px; }
.gl-failed { opacity: 0.75; }
.gl-status { align-self: flex-start; }
.gl-status-failed { background: #fdecec; color: #8f1f1f; }

/* ---------------------------------------------------------------- trophy cabinet (player page) */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.tc-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 12px;
  text-align: left;
}
.tc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.tc-list li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tc-list li > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-list small { color: var(--srv-muted); white-space: nowrap; }
.tc-big { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.1; }
.tc-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-badge-streak { background: #fff4e0; color: #8a4b00; }
.pl-badge-anniversary { background: #f1ecff; color: #54349a; }

/* ---------------------------------------------------------------- fun facts (/server-statistik) */
.ff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.ff-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-left: 4px solid var(--srv-green);
  border-radius: 12px;
}
.ff-value { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.2; }
.ff-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--srv-muted); font-weight: 700; }
.ff-text { font-size: 15px; }

/* ---------------------------------------------------------------- duels (/duelle), reports */
.du-form-card { margin-bottom: 8px; }
.du-sides { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; }
.du-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.du-side img { border-radius: 5px; image-rendering: pixelated; }
.du-side:last-child { align-items: flex-end; text-align: right; }
.du-side:last-child .st-bar { width: 100%; direction: rtl; }
.du-value { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.du-lead .du-value { color: var(--srv-green-dark); }
.du-vs { align-self: center; color: var(--srv-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.du-result { margin: 12px 0 0; font-weight: 700; }
.du-actions { display: flex; gap: 8px; margin-top: 14px; }
.du-badge-off { background: #eef1ee; color: var(--srv-muted); }
.pf-sidebar { margin-top: 10px; }
.rp-done td { color: var(--srv-muted); }

/* ---------------------------------------------------------------- community: events, polls, gallery, guestbook */
.ev-list { display: grid; gap: 12px; }
.ev-card, .cm-card {
  display: flex;
  gap: 18px;
  padding: 18px 20px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 14px;
}
.ev-running { border-color: var(--srv-green); box-shadow: 0 0 0 1px var(--srv-green); }
.ev-date {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 62px;
  border-radius: 10px;
  background: var(--srv-night);
  color: #fff;
  line-height: 1.1;
}
.ev-date span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #6ee79a; font-weight: 700; }
.ev-date b { font-family: var(--font-display); font-size: 26px; }
.ev-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.srv-page .ev-body h3 { margin: 0; font-size: 20px; }
.ev-text { margin: 0; white-space: pre-line; }
.ev-people { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--srv-muted); font-size: 14px; }
.ev-heads { display: flex; gap: 3px; }
.ev-heads img { border-radius: 4px; image-rendering: pixelated; }
.ev-past { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ev-past span { color: var(--srv-muted); font-variant-numeric: tabular-nums; }

.cm-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.cm-card { align-items: center; color: var(--srv-text); text-decoration: none; }
.cm-card:hover { border-color: var(--srv-green); }
.cm-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-body b { font-family: var(--font-display); font-size: 18px; }
.cm-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--srv-green-dark); font-weight: 700; }
.cm-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 58px;
  height: 62px;
  border-radius: 10px;
  background: #eef0ff;
  color: #3b44a8;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
}

.po-boards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.ev-list + .st-hint, .st-boards + .st-hint { margin-top: 12px; }
.po-options { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.po-option {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--srv-border);
  border-radius: 9px;
  background: var(--srv-card);
  color: var(--srv-text);
  font: inherit;
  text-align: left;
  overflow: hidden;
}
button.po-option { cursor: pointer; }
button.po-option:hover { border-color: var(--srv-green); }
.po-fill { position: absolute; inset: 0 auto 0 0; background: var(--st-track); }
.po-mine { border-color: var(--srv-green); box-shadow: 0 0 0 1px var(--srv-green); }
.po-mine .po-fill, .po-winner .po-fill { background: #d9f3e2; }
.po-winner { font-weight: 700; }
.po-text, .po-percent { position: relative; }
.po-percent { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.po-total { margin: 0; }

.bg-upload { margin-bottom: 8px; }
.bg-upload summary { cursor: pointer; }
.bg-waiting { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bg-waiting li { display: flex; align-items: center; gap: 12px; }
.bg-waiting img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; }
.bg-waiting span { flex: 1; }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.bg-grid-small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.bg-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 12px;
  overflow: hidden;
  color: var(--srv-text);
  text-decoration: none;
}
.bg-open { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.bg-item img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.bg-item figcaption { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; text-align: left; }
.bg-item figcaption b { font-family: var(--font-display); font-size: 17px; }
.bg-meta { color: var(--srv-muted); font-size: 13px; }
.bg-meta a { color: inherit; }
.bg-text { font-size: 14px; }
.bg-caption { padding: 8px 12px; font-size: 14px; font-weight: 700; text-align: left; }
.bg-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.bg-like, .bg-remove {
  padding: 4px 10px;
  border: 1px solid var(--srv-border);
  border-radius: 999px;
  background: var(--srv-card);
  color: var(--srv-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.bg-like[aria-pressed="true"] { color: #b3261e; border-color: #f0b4ae; background: #fdecec; }
.bg-likes { color: var(--srv-muted); font-size: 14px; font-weight: 700; }

.gb-section { text-align: left; }
.gb-form { display: flex; gap: 8px; }
.gb-form .mcc-input { flex: 1; }
.gb-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.gb-entry {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 14px;
  background: var(--srv-card);
  border: 1px solid var(--srv-border);
  border-radius: 10px;
}
.gb-entry img { border-radius: 5px; image-rendering: pixelated; }
.gb-entry p { margin: 2px 0 0; font-size: 16px; overflow-wrap: anywhere; }
.gb-head { font-size: 14px; }
.gb-head a { color: var(--srv-text); }
.gb-head span { color: var(--srv-muted); }
.gb-actions button { border: 0; background: none; color: var(--srv-muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.gb-actions button:disabled { cursor: default; text-decoration: none; }

.xr-flag { color: #8f1f1f; font-weight: 700; }
.rl-text p { margin: 0 0 12px; white-space: pre-line; }
.rl-text p:last-child { margin-bottom: 0; }
.rl-faq { display: grid; gap: 8px; }
.rl-faq details { padding: 14px 18px; }
.rl-faq summary { cursor: pointer; }
.rl-faq p { margin: 10px 0 0; white-space: pre-line; }
nav.md-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; background: none; }
.md-nav a {
  padding: 4px 12px;
  border: 1px solid var(--srv-border);
  border-radius: 999px;
  background: var(--srv-card);
  color: var(--srv-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.md-nav a:hover { border-color: var(--srv-green); }
.md-nav b { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #fdecec; color: #8f1f1f; font-size: 12px; }
.md-builds { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.md-builds li { display: flex; gap: 14px; align-items: flex-start; }
.md-builds img { width: 180px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.md-builds div { display: flex; flex-direction: column; gap: 4px; }
.md-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
@media (max-width: 600px) { .md-builds li { flex-direction: column; } .gb-form { flex-direction: column; } }
.wn-card { margin-top: 12px; }
.wn-head { margin-bottom: 8px; }
.wn-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; font-size: 15px; }
.wn-list span:first-child { color: var(--srv-muted); }
.wn-card .nt-form { margin-top: 8px; }
.nt-form input.mcc-input { flex: 1; }
td.md-actions { display: table-cell; white-space: nowrap; }
td.md-actions .mcc-btn { margin: 2px 0; }
#access h3 { margin-top: 28px; }

/* ---------------------------------------------------------------- year in review (/rueckblick) */
.yr { max-width: 640px; margin: 0 auto; outline: none; }
.yr-stage {
  position: relative;
  min-height: 460px;
  padding: 36px 36px 32px;
  border-radius: 18px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 40px),
    var(--srv-night);
  color: #fff;
  cursor: pointer;
  user-select: none;
}
.yr-slide { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 392px; justify-content: center; }
.yr-slide[hidden] { display: none; }
.yr-kicker { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: #6ee79a; font-weight: 700; }
.srv-page .yr h1, .srv-page .yr h2 { font-size: 40px; line-height: 1.1; color: #fff; }
.yr-intro img { image-rendering: pixelated; margin-bottom: 8px; }
.yr-intro p { margin: 0; color: rgba(255, 255, 255, 0.75); font-size: 18px; }
.yr-big { font-family: var(--font-display); font-size: clamp(48px, 12vw, 76px); line-height: 1; font-weight: 700; }
.yr-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: rgba(255, 255, 255, 0.9); }
.yr-lines { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; color: rgba(255, 255, 255, 0.8); font-size: 17px; }
.yr-lines li::before { content: "▸ "; color: #6ee79a; }
.yr-rank { margin-top: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(110, 231, 154, 0.15); color: #6ee79a; font-weight: 700; font-size: 15px; }
.yr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; width: 100%; margin: 8px 0; }
.yr-grid div { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 8px; }
.yr-grid dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.6); font-weight: 700; }
.yr-grid dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.yr-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.yr-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.yr-nav {
  width: 44px;
  height: 44px;
  border: 1px solid var(--srv-border);
  border-radius: 50%;
  background: var(--srv-card);
  color: var(--srv-text);
  font-size: 20px;
  cursor: pointer;
}
.yr-nav:disabled { opacity: 0.35; cursor: default; }
.yr-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.yr-dots span { width: 22px; height: 4px; border-radius: 2px; background: var(--srv-border); }
.yr-dots span.yr-on { background: var(--srv-green); }
@media (max-width: 600px) { .yr-stage { padding: 26px 22px; } .srv-page .yr h1, .srv-page .yr h2 { font-size: 30px; } }

/* moderation: tabs of the sub pages, open tasks, newest log entries */
nav.md-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 22px; padding: 4px; background: var(--srv-card);
  border: 1px solid var(--srv-border); border-radius: 12px; }
.md-tabs a { padding: 8px 14px; border-radius: 9px; color: var(--srv-muted); font-weight: 700; font-size: 15px; text-decoration: none; }
.md-tabs a:hover { color: var(--srv-text); background: var(--srv-bg); }
.md-tabs a[aria-current="page"] { background: var(--srv-night); color: #fff; }
.md-tabs b { margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #fdecec; color: #8f1f1f; font-size: 12px; }
.md-tasks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.md-tasks a { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border: 1px solid var(--srv-border);
  border-left: 3px solid #d04545; border-radius: 10px; color: var(--srv-text); text-decoration: none; }
.md-tasks a:hover { border-color: var(--srv-green); border-left-color: #d04545; }
.md-tasks b { font-size: 22px; }
.md-recent { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.md-recent .lg-when { color: var(--srv-muted); margin-right: 4px; }
@media (max-width: 600px) { .md-tabs a { flex: 1 1 auto; text-align: center; padding: 8px 10px; } }
details.md-create { margin: 4px 0 12px; }
details.md-create > summary { display: inline-block; cursor: pointer; padding: 7px 14px; border-radius: 9px;
  background: var(--srv-green); color: #0b1a10; font-weight: 700; list-style: none; }
details.md-create > summary::-webkit-details-marker { display: none; }
details.md-create[open] > summary { background: var(--srv-night); color: #fff; }
details.md-create[open] > .mcc-form { margin-top: 12px; padding: 14px; border: 1px solid var(--srv-border); border-radius: 10px; }

/* /profil: join message */
.jm-levels { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.jm-level { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--srv-border); color: var(--srv-muted); font-size: 14px; font-weight: 700; }
.jm-reached { color: var(--srv-text); border-color: var(--srv-green); }
.jm-current { background: var(--srv-green); color: #0b1a10; }
.jm-preview { margin: 12px 0; padding: 12px 14px; border-radius: 8px; background: #1d1f1e; font-family: ui-monospace, Menlo, monospace;
  font-size: 15px; line-height: 1.7; }
.jm-title { margin: 16px 0 6px; font-size: 15px; }
.jm-options { display: flex; flex-wrap: wrap; gap: 6px; }
.jm-options button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--srv-border);
  border-radius: 8px; background: var(--srv-card); color: var(--srv-text); font: inherit; font-size: 14px; cursor: pointer; }
.jm-options button[aria-pressed="true"] { border-color: var(--srv-green); box-shadow: inset 0 0 0 1px var(--srv-green); font-weight: 700; }
.jm-options button:disabled { opacity: 0.45; cursor: not-allowed; }
.jm-swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.3); }
.jm-mutes { margin-top: 18px; }

/* /profil: under the name (looks like a name tag in the game) */
.nb-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; width: fit-content; min-width: 180px; margin: 14px auto;
  padding: 8px 16px; border-radius: 4px; background: rgba(0, 0, 0, 0.72); color: #fff; font-family: ui-monospace, Menlo, monospace;
  font-size: 15px; line-height: 1.4; }
.nb-line { display: inline-block; min-height: 20px; white-space: pre; }  /* keeps the spaces between the values */
.nb-empty { color: #8a8a8a; font-size: 13px; }
.nb-options { margin-top: 6px; }
.jm-mutes summary { cursor: pointer; color: var(--srv-muted); font-size: 14px; }
.jm-muted { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }

/* moderation: reward level editor */
.rw-level { margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--srv-border); border-radius: 10px; }
.rw-level > summary { cursor: pointer; font-size: 16px; }
.rw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.rw-name { max-width: 260px; }
.rw-condition { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.rw-condition .mcc-select { width: auto; max-width: 320px; }
.rw-condition .mcc-input { width: 120px; }
.rw-unlocks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; padding: 8px 10px; border: 1px solid var(--srv-border); border-radius: 8px; }
.rw-unlocks legend { padding: 0 4px; font-weight: 700; font-size: 14px; }
.rw-option { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 400; }
.rw-texts { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 4px; font-size: 15px; }
.rw-texts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.rw-add { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rw-add .mcc-input { flex: 1 1 280px; }
.rw-add .mcc-select { width: auto; }
.rw-group { padding: 8px 10px; border: 1px dashed var(--srv-border); border-radius: 8px; }
.rw-group > .mcc-hint { margin: 0 0 4px; }
.rw-or { margin: 6px 0; font-weight: 700; color: var(--srv-muted); text-transform: uppercase; font-size: 13px; letter-spacing: 0.05em; }
.rw-inherited { opacity: 0.45; cursor: default; }
.rw-from { font-size: 12px; color: var(--srv-muted); }

/* moderation: own icons (pixel editor) */
.ic-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ic-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--srv-border); border-radius: 8px; }
.ic-thumb { width: 36px; height: 36px; vertical-align: middle; background: #2a2d33; border-radius: 4px; padding: 3px; box-sizing: content-box; }
.ic-editor { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.ic-editor > div:first-child { flex: 0 1 330px; max-width: 330px; }
.ic-grid { display: grid; grid-template-columns: repeat(9, 30px); grid-template-rows: repeat(9, 30px); gap: 1px; width: fit-content;
  padding: 1px; background: var(--srv-border); border-radius: 4px; touch-action: none; user-select: none; }
.ic-cell { width: 30px; height: 30px; padding: 0; border: 0; cursor: crosshair; }
.ic-cell.ic-empty { background: repeating-conic-gradient(#d9d9d9 0 25%, #f2f2f2 0 50%) 0 0 / 10px 10px; }
.ic-cell:focus-visible { outline: 2px solid var(--srv-green); outline-offset: -2px; }
.ic-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ic-color { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.ic-color input { width: 36px; height: 28px; padding: 0; border: 1px solid var(--srv-border); border-radius: 4px; background: none; }
.ic-palette { display: grid; grid-template-columns: repeat(8, 20px); gap: 3px; }
.ic-swatch { width: 20px; height: 20px; padding: 0; border: 1px solid rgba(0, 0, 0, 0.35); border-radius: 3px; cursor: pointer; }
.ic-upload { position: relative; overflow: hidden; cursor: pointer; }
.ic-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ic-form { flex: 1 1 260px; min-width: 240px; }
.ic-fallback { max-width: 80px; }
.ic-form [hidden] { display: none; }
.ic-preview { display: grid; gap: 6px; padding: 12px 14px; border-radius: 8px; background: #1d1f1e; font-family: ui-monospace, Menlo, monospace; font-size: 15px; }
.ic-preview img { image-rendering: pixelated; vertical-align: -3px; }
.ic-big img { width: 72px; height: 72px; }
@media (max-width: 560px) {
  .ic-grid { grid-template-columns: repeat(9, 26px); grid-template-rows: repeat(9, 26px); }
  .ic-cell { width: 26px; height: 26px; }
}
@media (max-width: 600px) {
  /* reward conditions: the selects shrink with the screen instead of keeping the width of their longest option */
  .rw-condition .mcc-select, .rw-add .mcc-select { flex: 1 1 auto; min-width: 0; max-width: 100%; }
  .rw-condition .mcc-input { flex: 1 1 90px; }
  .rw-name { max-width: 100%; }
}

/* ---------------------------------------------------------------- discoveries (addon Discoveries) */
.dc-head { display: flex; align-items: center; gap: 10px; }
.dc-head .ac-tier { margin-left: auto; }
.dc-head .icon-minecraft { flex: none; }
.dc-letter { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px;
  background: #e6e9e6; color: var(--srv-muted); font-family: var(--font-display); font-weight: 700; }
.dc-first { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dc-first img { border-radius: 3px; }
.dc-first a { color: inherit; font-weight: 700; }

/* section navigation inside a page (moderation, events): the current entry */
.md-nav a[aria-current="page"] { background: var(--srv-night); border-color: var(--srv-night); color: #fff; }
.md-subnav { margin-top: -10px; }
.srv-page .ev-sub { margin: 22px 0 10px; font-size: 17px; }
.srv-page .ev-sub:first-of-type { margin-top: 0; }
.pf-wearing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 10px 14px; margin: 4px 0 10px; border-radius: 10px; background: var(--srv-bg); }
.pf-wearing p { margin: 0 !important; }

/* page header of tabbed pages (moderation, profile): heading, tabs and section chips as three clear levels */
.srv-page h1 + nav.md-tabs { margin-top: 18px; }
nav.md-tabs { width: fit-content; max-width: 100%; box-sizing: border-box; margin-bottom: 18px; }
nav.md-tabs + nav.md-nav, nav.md-subnav + nav.md-nav { margin-top: 0; }
nav.md-nav { margin-bottom: 26px; }
.md-subnav { margin-top: -4px; }
.md-nav a { border-color: var(--srv-border); transition: border-color 0.15s ease, background-color 0.15s ease; }
.md-nav a[aria-current="location"] { background: var(--srv-night); border-color: var(--srv-night); color: #fff; }
:root[data-dark] .md-nav a[aria-current="page"], :root[data-dark] .md-nav a[aria-current="location"] {
  background: rgba(0, 230, 118, 0.12); border-color: rgba(0, 230, 118, 0.45); color: #00e676; }
@media (max-width: 600px) { nav.md-tabs { width: auto; } }

/* analysis of connections and clients (moderators, /analyse) */
.an-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.an-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.srv-page .an-chart-card { margin: 0; padding: 18px 20px; }
.srv-page .an-chart-card h3, .srv-page .an-worst h3 { font-size: 15px; color: var(--srv-muted); margin-bottom: 10px; }
.an-wide { grid-column: 1 / -1; margin-top: 16px !important; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 10px; }
.an-grid .cl-box { background: var(--srv-card); }
.an-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.an-list li b { margin: 0 6px; }
.an-search { max-width: 420px; margin-bottom: 12px; }
.srv-page .an-table { padding: 8px 16px; }
.an-name { display: flex; align-items: center; gap: 14px; }
.an-name img { border-radius: 8px; image-rendering: pixelated; }
.an-back { margin: 0 0 6px; }
.an-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.srv-page .an-details .srv-card { margin: 0; }
.an-dl { margin: 0; display: grid; gap: 0; }
.an-dl div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--srv-border); }
.an-dl div:last-child { border-bottom: 0; }
.an-dl dt { color: var(--srv-muted); }
.an-dl dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.an-mods { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.an-flag { display: inline-block; margin: 0 4px 2px 0; padding: 1px 8px; border-radius: 999px; font-size: 12px;
  font-weight: 700; background: rgba(229, 57, 53, 0.12); color: #c62828; border: 1px solid rgba(229, 57, 53, 0.35); }
:root[data-dark] .an-flag { color: #ff8a80; }
.srv-page .an-details .an-wide { margin-top: 0 !important; }
.an-details .an-wide .an-dl { max-width: 560px; margin-bottom: 16px; }
.an-details .an-wide .an-charts { margin: 8px 0 0; }
@media (max-width: 800px) { .an-charts { grid-template-columns: 1fr; } }

/* tickets (addon Tickets, page /tickets) */
.tk-filter { margin-top: -14px; }
.tk-card { margin-bottom: 16px; }
.tk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tk-head h2 { margin: 0; }
.tk-cat { padding: 1px 10px; border: 1px solid var(--srv-border); border-radius: 999px; color: var(--srv-text); font-size: 13px; font-weight: 600; }
.tk-badge-closed { background: #eceff1; color: #4a5358; }
:root[data-dark] .tk-badge-closed { background: rgba(255, 255, 255, 0.1); color: #c4ccd0; }
.tk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0 0; color: var(--srv-muted); font-size: 14px; }
.tk-player { display: inline-flex; align-items: center; gap: 6px; color: var(--srv-text); font-weight: 600; text-decoration: none; }
.tk-player img { border-radius: 4px; image-rendering: pixelated; }
.tk-message { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-events { margin: 14px 0 0; padding: 0 0 0 14px; border-left: 3px solid var(--srv-border); list-style: none; }
.tk-events li { margin: 0 0 8px; overflow-wrap: anywhere; }
.tk-events .tk-event-closed, .tk-events .tk-event-reopened { color: var(--srv-muted); font-size: 14px; }
.tk-when { display: block; color: var(--srv-muted); font-size: 12px; }
.tk-form { margin-top: 14px; }
.tk-form .mcc-actions { margin-top: 8px; }
.tk-closed .tk-message { color: var(--srv-muted); }

/* Weltkarte (/karte): the server's BlueMap in an iframe, as tall as the window allows */
.km-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.km-frame { display: block; width: 100%; height: calc(100vh - 220px); min-height: 420px; margin-top: 12px;
  border: 1px solid var(--srv-border); border-radius: 8px; background: var(--srv-border); }
.tk-map { font-weight: 600; }
