/* WorldMapGuessr – Statistik-Seite */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--outside);
  color: var(--ink);
  font: 14px/1.45 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.head h1 { margin: 4px 0 2px; font-size: 24px; letter-spacing: 0.01em; }
.back { color: var(--ink-soft); text-decoration: none; font-size: 13px; }
.back:hover { color: var(--ink); }
.summary { margin: 0; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.summary b { color: var(--ink); font-weight: 600; }

.btn {
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font: 600 13px/1 "Instrument Sans", system-ui, sans-serif;
  padding: 9px 12px;
  cursor: pointer;
}
.btn:hover { background: var(--panel-line); }
.btn:focus-visible, .segmented button:focus-visible, th:focus-visible, .search input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
}
.segmented button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font: 600 13px/1 "Instrument Sans", system-ui, sans-serif;
  padding: 7px 12px;
  cursor: pointer;
}
.segmented button[aria-checked="true"] { background: var(--ink); color: var(--outside); }
.search { flex: 1 1 220px; }
.search input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.table-wrap {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
}
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; text-align: left; white-space: nowrap; }
th {
  position: sticky;
  top: 0;
  background: var(--panel);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--panel-line);
  cursor: pointer;
  user-select: none;
}
th:hover { color: var(--ink); }
th[aria-sort] { color: var(--ink); }
th[aria-sort="ascending"]::after { content: " ▲"; font-size: 9px; }
th[aria-sort="descending"]::after { content: " ▼"; font-size: 9px; }
td { border-bottom: 1px solid var(--panel-line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--panel-line); }
.num { text-align: right; }
td.mono, td .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; }
td.muted { color: var(--ink-soft); }
.kind {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--panel-line);
  color: var(--ink-soft);
}
.kind.continent { border-color: var(--piece); color: var(--piece); }

/* Trefferquote: Zahl + Balken */
.rate { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar { width: 64px; height: 6px; border-radius: 3px; background: var(--panel-line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--good); }
.bar.low i { background: var(--bad); }

.uid { cursor: copy; }
.empty { margin: 0; padding: 24px; text-align: center; color: var(--ink-soft); }

.raw summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; }
.raw a { color: var(--focus); }
.raw pre {
  max-height: 420px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  font: 12px/1.5 "IBM Plex Mono", ui-monospace, monospace;
}
