/* stats.prizemc.net — one stylesheet for every page. No build step. */

@font-face {
  font-family: "Inter";
  src: url("/vendor/inter-5.3.0/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/vendor/inter-5.3.0/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Minecraft's own font (tryashtar/minecraft-ttf, generated from the game). One font pixel is 1/12 of the
   font size, so every size using it sits on that grid: 12 px = 1x, 18 px = 1.5x, 24 px = 2x, 36 px = 3x. */
@font-face {
  font-family: "Mojangles";
  src: url("/vendor/minecraft-ttf-1.6/MinecraftDefault-Regular.ttf") format("truetype");
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: dark;
  /* deepslate */
  --bg: #25282d;
  --bg-sunk: #1f2226;
  --panel: #2e3137;
  --raised: #383c43;
  --line: #474b54;
  --line-soft: #363940;
  /* bone */
  --text: #ece8de;
  --muted: #aaa79e;
  --faint: #807e77;
  /* HorizonMines = diamond */
  --accent: #55d8cb;
  --accent-ink: #0e2b28;
  --accent-soft: rgba(85, 216, 203, 0.14);
  /* medal ingots */
  --gold: #f4c64f;
  --iron: #d5d9dc;
  --copper: #dc8a5c;
  --danger: #ff8f80;

  /* buttons (beyondthehorizon.xyz style): ink outline, see-through fill, hard drop shadow when lifted */
  --btn-ink: rgba(236, 232, 222, 0.6);
  --btn-fill: rgba(31, 34, 38, 0.55);
  --btn-drop: rgba(0, 0, 0, 0.55);

  --pixel: "Mojangles", ui-monospace, "Cascadia Mono", monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 3px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #e8eae6;
  --bg-sunk: #dcdfda;
  --panel: #f6f7f4;
  --raised: #ffffff;
  --line: #c3c8c1;
  --line-soft: #d6dad4;
  --text: #1c1f22;
  --muted: #535a5f;
  --faint: #737a7e;
  --accent: #0b7f75;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 127, 117, 0.12);
  --gold: #b07d00;
  --iron: #6f777c;
  --copper: #a8562a;
  --danger: #b3261e;
  --btn-ink: #1c1f22;
  --btn-fill: rgba(255, 255, 255, 0.45);
  --btn-drop: rgba(28, 31, 34, 0.28);
}

[data-server="prison"] {
  /* Prison Escape = jumpsuit orange */
  --accent: #ff9e4a;
  --accent-ink: #331a05;
  --accent-soft: rgba(255, 158, 74, 0.14);
}
:root[data-theme="light"] [data-server="prison"],
:root[data-theme="light"][data-server="prison"] {
  --accent: #b35400;
  --accent-ink: #ffffff;
  --accent-soft: rgba(179, 84, 0, 0.12);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* always draw the scrollbar track, so pages that don't scroll sit exactly where the others do and the
     right edge never shows a blank strip */
  overflow-y: scroll;
}

body {
  position: relative;
  overflow-x: clip;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--sans);
  font-feature-settings: "cv11", "ss01";
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 1px;
}

button, input, select { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--pixel);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}
h1 { font-size: 36px; text-shadow: 0.0833em 0.0833em 0 rgba(0, 0, 0, 0.45); }
h2 { font-size: 24px; text-shadow: 0.0833em 0.0833em 0 rgba(0, 0, 0, 0.35); }
h3 { font-size: 24px; }
:root[data-theme="light"] :is(h1, h2) { text-shadow: 0.0833em 0.0833em 0 rgba(0, 0, 0, 0.12); }
@media (max-width: 760px) {
  h1 { font-size: 24px; }
}

.pixel {
  font-family: var(--pixel);
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}
.num { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 8px; top: -48px;
  z-index: 50;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

img.pixelated, canvas.pixelated { image-rendering: pixelated; image-rendering: crisp-edges; }

/* Scrollbars: a thick PrizeMC-orange block (the logo's orange) with a pixel bevel, on a sunk track. Chrome,
   Edge and Safari draw the ::-webkit-scrollbar parts; Firefox only takes colours, so it gets those alone
   (setting them for Chrome too would switch its custom scrollbar off). */
:root {
  --scroll-thumb: #e8860c;
  --scroll-light: #ffb43a;
  --scroll-dark: #9c4f04;
}
::-webkit-scrollbar { width: 16px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-sunk); box-shadow: inset 2px 0 0 var(--line-soft); }
::-webkit-scrollbar-track:horizontal { box-shadow: inset 0 2px 0 var(--line-soft); }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 0;
  box-shadow: inset 3px 3px 0 var(--scroll-light), inset -3px -3px 0 var(--scroll-dark);
}
::-webkit-scrollbar-thumb:hover { background: #f5961c; }
::-webkit-scrollbar-thumb:active {
  background: #d27608;
  box-shadow: inset 3px 3px 0 var(--scroll-dark), inset -3px -3px 0 var(--scroll-light);
}
::-webkit-scrollbar-corner { background: var(--bg-sunk); }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: var(--scroll-thumb) var(--bg-sunk); }
}

/* ------------------------------------------------------------------ header */

.site-header {
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-sunk);
  position: relative;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 24px;
  white-space: nowrap;
  color: var(--text);
}
.brand .brand-mark {
  width: 20px; height: 20px;
  align-self: center;
}
.brand small { font-size: 0.8125rem; color: var(--muted); }

.search {
  position: relative;
  margin-left: auto;
  width: min(360px, 100%);
}
.search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 42px;
  font-family: var(--pixel);
  font-size: 18px;
  font-variant-ligatures: none;
  color: var(--text);
  /* the same box as the buttons: 2px ink outline, see-through fill; the server colour while typing */
  background: var(--btn-fill);
  border: 2px solid var(--btn-ink);
  border-radius: 2px;
  outline: none;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); }
/* the game's own search icon (12 px sprite at exactly 2x) */
.search .search-icon {
  position: absolute;
  left: 10px; top: 8px;
  width: 24px; height: 24px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  margin: 0; padding: 4px;
  list-style: none;
  background: var(--raised);
  border: 2px solid var(--btn-ink);
  border-radius: 2px;
  box-shadow: 5px 5px 0 var(--btn-drop);
  max-height: 60vh;
  overflow-y: auto;
}
.search-results[hidden] { display: none; }
.search-results li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 0;
  cursor: pointer;
}
.search-results li[aria-selected="true"] { background: var(--accent-soft); }
.search-results .face { width: 24px; height: 24px; flex: none; }
.search-results .r-name { font-family: var(--pixel); font-variant-ligatures: none; font-size: 18px; }
.search-results .r-was { color: var(--muted); font-size: 0.8125rem; }
.search-results .r-empty { color: var(--muted); cursor: default; }

.theme-toggle {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
}
/* 13 px pixel art drawn at exactly 2x, so every "pixel" lands on whole screen pixels. Dark theme shows
   the sun (switch to light), light theme the moon (switch to dark). */
.theme-toggle svg {
  width: 26px;
  height: 26px;
  transition: transform 160ms ease, opacity 160ms ease;
}
.theme-toggle .icon-sun { color: var(--gold); }
.theme-toggle:hover .icon-sun { color: inherit; transform: rotate(45deg); }
.theme-toggle:hover .icon-moon { transform: rotate(-12deg); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg { transition: none; }
  .theme-toggle:hover svg { transform: none; }
}

@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .search { order: 3; width: 100%; margin-left: 0; }
  .theme-toggle { margin-left: auto; }
}

/* ------------------------------------------------------------------ shared controls */

main { flex: 1; padding: 28px 0 56px; }

/* Every button on the site: a standalone outlined box (as on beyondthehorizon.xyz). Hover inverts it and
   lifts it onto a hard shadow; pressing pushes it back down. The chosen option of a switch is filled
   with the server's colour. */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.seg button, .seg a, .btn, .theme-toggle, .refresh, .skin-toggle {
  appearance: none;
  border: 2px solid var(--btn-ink);
  border-radius: 2px;
  background: var(--btn-fill);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 180ms cubic-bezier(0.2, 0.8, 0.3, 1),
    background-color 180ms, color 180ms, border-color 180ms;
}
.seg button, .seg a, .btn {
  font-family: var(--pixel);
  font-size: 18px;
  font-variant-ligatures: none;
  line-height: 1.2;
  padding: 6px 12px;
  white-space: nowrap;
}
:is(.seg button, .seg a, .btn, .theme-toggle, .refresh, .skin-toggle):is(:hover, :focus-visible) {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--btn-drop);
}
:is(.seg button, .seg a, .btn, .theme-toggle, .refresh, .skin-toggle):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
:is(.seg button, .seg a, .btn, .theme-toggle, .refresh, .skin-toggle):active {
  transform: none;
  box-shadow: 0 0 0 transparent;
  transition-duration: 60ms;
}
.seg :is([aria-pressed="true"], [aria-selected="true"], [aria-current="true"]),
.seg :is([aria-pressed="true"], [aria-selected="true"], [aria-current="true"]):hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: none;
  box-shadow: none;
  cursor: default;
}
.seg :is([aria-disabled="true"], button:disabled),
.seg :is([aria-disabled="true"], button:disabled):hover {
  background: transparent;
  border-color: var(--line);
  color: var(--faint);
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}
.seg .dim:not(:hover):not(:focus-visible) { color: var(--faint); border-color: var(--line); }
.seg .live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 6px;
  vertical-align: 2px;
  background: currentColor;
}
@media (prefers-reduced-motion: reduce) {
  :is(.seg button, .seg a, .btn, .theme-toggle, .refresh, .skin-toggle):is(:hover, :focus-visible, :active) {
    transform: none;
    box-shadow: none;
  }
}

.server-switch button { padding: 7px 14px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
a.chip:hover { border-color: var(--accent); color: var(--text); }
.chip b { font-weight: 600; color: var(--text); }
.chip .pixel { color: var(--text); }

.prestige {
  display: inline-block;
  padding: 0 6px;
  border-radius: 2px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--pixel);
  font-variant-ligatures: none;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.nodata { color: var(--faint); }

.state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.state h2 { color: var(--text); margin-bottom: 8px; }
.state p { margin: 0 auto; max-width: 46ch; }
.state .actions { margin-top: 16px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.loading {
  color: var(--faint);
  font-family: var(--pixel);
  font-size: 18px;
  font-variant-ligatures: none;
  padding: 32px 0;
  text-align: center;
}

.face {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: var(--raised);
}

/* ------------------------------------------------------------------ leaderboards */

.lb-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

/* The board list and the board share one backing, split by a hairline, so the rows stay readable where
   the season picture is still bright. */
.lb-grid {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-radius: var(--radius);
}

.board-list {
  padding: 10px 8px;
  border-right: 1px solid var(--line-soft);
}
.board-list ul {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Square blocks like the buttons: the pixel font, a 2px outline on hover, the current board a solid block
   in the server's colour. */
.board-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 5px 10px;
  border: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--pixel);
  font-size: 18px;
  font-variant-ligatures: none;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms, color 120ms, border-color 120ms;
}
.board-list button img,
.board-list button .item {
  flex: none;
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.board-list button:hover { color: var(--text); border-color: var(--btn-ink); background: var(--btn-fill); }
.board-list button[aria-current="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  cursor: default;
}
.board-list .sep { height: 2px; background: var(--line-soft); margin: 5px 2px; }

.board { min-width: 0; padding: 14px 20px 18px; }

.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 18px 0 6px;
}
.board-head .sub { color: var(--muted); font-size: 0.9375rem; }
.board-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.875rem;
}
.board-note::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 8px;
  vertical-align: 2px;
  background: var(--accent);
}
.board-tabs { margin: 10px 0 4px; }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.lb-table th {
  text-align: left;
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--faint);
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}
.lb-table td {
  padding: 0 10px;
  height: 44px;
  border-bottom: 1px solid var(--line-soft);
}
.lb-table tbody tr:hover { background: var(--panel); }
.lb-table tr.hl { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.lb-table .c-rank {
  width: 64px;
  font-family: var(--pixel);
  font-variant-ligatures: none;
  color: var(--muted);
  font-size: 18px;
}
.lb-table th.c-rank { font-family: var(--sans); font-size: 0.8125rem; color: var(--faint); }
.lb-table .c-rank.r1 { color: var(--gold); }
.lb-table .c-rank.r2 { color: var(--iron); }
.lb-table .c-rank.r3 { color: var(--copper); }
.lb-table .c-val, .lb-table th.c-val {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.lb-table .c-val .prestige { margin-right: 10px; font-weight: 400; }
.lb-table .c-sub { color: var(--muted); font-weight: 400; font-size: 0.875rem; text-align: right; white-space: nowrap; }
.lb-table td.c-player { width: 100%; max-width: 0; }
.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.player-cell .face { width: 24px; height: 24px; flex: none; }
.player-cell a {
  font-family: var(--pixel);
  font-size: 18px;
  font-variant-ligatures: none;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-cell a:hover { text-decoration: underline; text-underline-offset: 3px; }

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.pager .count { color: var(--muted); font-size: 0.875rem; }
.pager .seg button { min-width: 40px; }
.pager .seg button[aria-hidden="true"] { border-color: transparent; background: none; } /* the "…" gap */

@media (max-width: 860px) {
  .lb-grid { grid-template-columns: minmax(0, 1fr); }
  .board-list { padding: 8px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .board-list ul {
    position: static;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .board-list li { flex: none; }
  .board-list ul { flex-direction: row; }
  .board-list .sep { width: 2px; height: auto; margin: 6px 3px; }
  .board-list button { white-space: nowrap; }
  .board { padding: 12px 12px 16px; }
}
@media (max-width: 560px) {
  .lb-table .c-rank { width: 44px; }
  .lb-table td { padding: 0 6px; }
  .lb-table .hide-sm { display: none; }
  .lb-table .c-val .prestige { display: block; width: fit-content; margin: 2px 0 0 auto; }
}

/* ------------------------------------------------------------------ player: hero scene */

/* The hero has no background of its own: the season picture behind the top of the page (.page-art)
   shows through behind the skin and the name. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  align-items: center;
  gap: 8px 32px;
  padding: 24px clamp(16px, 4vw, 40px) 0;
  min-height: 380px;
  color: #fff;
  isolation: isolate;
}
/* soft contact shadow where the feet meet the picture's ground */
.skin-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 120px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.skin-stage {
  position: relative;
  align-self: end;
  height: 340px; /* the model's feet land on the grass strip */
}
.skin-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.skin-stage canvas:active { cursor: grabbing; }
.skin-stage .skin-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.skin-stage .skin-fallback img { width: 96px; height: 96px; }
.skin-toggle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
}
.skin-toggle[data-state="paused"]:not(:hover):not(:focus-visible) { color: var(--accent); }
.skin-toggle svg { width: 18px; height: 18px; } /* 9 px art at exactly 2x */

.identity {
  align-self: center;
  padding-bottom: 44px;
  min-width: 0;
}
.tabrow { display: block; max-width: 100%; }
.tabrow canvas { display: block; image-rendering: pixelated; }

/* Under the name tag on a profile: Minecraft chat lines. Each line is the chat's black-at-50 % strip with the
   game's text at 2x; labels in chat grey (§7), values white (§f), each with its own drop shadow (a quarter of
   its colour, one font pixel down and right), as the game draws it. */
.chat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: 10px;
}
.chat-line {
  max-width: 100%;
  margin: 0;
  padding: 2px 8px 2px 6px;
  background: rgba(0, 0, 0, 0.5);
  font-family: var(--pixel);
  font-variant-ligatures: none;
  font-size: 24px;
  line-height: 1.25;
  color: #ffffff;
  text-shadow: 0.0833em 0.0833em 0 #3f3f3f;
}
.chat-line .c7 { color: #aaaaaa; text-shadow: 0.0833em 0.0833em 0 #2a2a2a; }
.chat-line [title] { cursor: help; }
@media (max-width: 760px) {
  .chat-line { font-size: 18px; }
}

/* Compare: the profile's bottom-right corner, level with the skin's pause button and in line with the season
   buttons below. A phone has no room beside the skin: there it is a full-width row of its own under it, edge to
   edge with the switches. */
.hero-compare { position: absolute; right: 0; bottom: 8px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 20px; }
  .identity { order: -1; padding-bottom: 0; }
  .skin-stage { height: 300px; width: min(260px, 100%); justify-self: center; }
  .hero-compare {
    position: static;
    justify-self: stretch;
    justify-content: center;
    margin: 12px calc(-1 * clamp(16px, 4vw, 40px)) 0; /* out to the page edges, past the hero's padding */
  }
}

/* ------------------------------------------------------------------ player: stats */

.player-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 0;
}
.season-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 16px;
}
/* the chosen season's dates, quiet text beside the switch */
.season-pick .when {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Two columns of groups; each group is a heading and plain rows: icon + label, value, board rank. */
.groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  align-items: start;
}
.groups .col { min-width: 0; }
.group { padding-top: 24px; min-width: 0; }
.group h3 {
  font-size: 24px;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
.stat-list { margin: 0; }
.stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 8ch;
  align-items: center;
  column-gap: 16px;
  min-height: 40px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line-soft);
}
.stat dt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}
.stat dt > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat.sub dt { padding-left: 26px; }
.stat .item {
  flex: none;
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.stat dd { margin: 0; }
.stat .val {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat .val .of { color: var(--faint); font-weight: 400; }
.stat .val .nodata { font-weight: 400; }
.stat .rank { text-align: right; white-space: nowrap; }
.gang-link { text-decoration: none; font-size: 18px; }
.gang-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Board rank: plain text in its own column, the medal colour for the top three. */
.rank-no {
  color: var(--faint);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
a.rank-no:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.rank-no.r1 { color: var(--gold); font-weight: 700; }
.rank-no.r2 { color: var(--iron); font-weight: 700; }
.rank-no.r3 { color: var(--copper); font-weight: 700; }

/* PrisonEscape: one column per role, with the same rules as the groups */
.roles { padding-top: 32px; }
.role-wrap { overflow-x: auto; }
.role-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.role-table th,
.role-table td {
  height: 40px;
  padding: 0 0 0 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}
.role-table thead th {
  height: auto;
  padding-bottom: 8px;
  vertical-align: bottom;
  border-bottom: 2px solid var(--line);
  font-family: var(--pixel);
  font-variant-ligatures: none;
  font-weight: 400;
  font-size: 24px;
  color: var(--text);
}
.role-table thead th.dim { color: var(--faint); }
.role-table th:first-child { text-align: left; padding-left: 0; }
.role-table tbody th { font-weight: 400; color: var(--muted); font-size: 0.9375rem; }
.role-table td { width: 20%; font-weight: 600; }
.role-table td.na { color: var(--faint); font-weight: 400; }
.role-table .of { color: var(--faint); font-weight: 400; }
.role-table .rank-slot { display: inline-block; width: 48px; text-align: right; }
.role-table thead th + th { padding-right: 48px; }
.role-table tr.rule > * { border-top: 1px solid var(--line); }

.mines-group .empty { margin: 10px 0 0; }
.mines { margin: 6px 0 0; padding: 0; list-style: none; columns: 2 280px; column-gap: 48px; }
.mines li {
  display: grid;
  grid-template-columns: minmax(64px, 30%) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 0.9375rem;
  break-inside: avoid;
}
.mines .m-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mines .m-bar { height: 8px; background: var(--bg-sunk); }
.mines .m-bar span { display: block; height: 100%; background: var(--line); }
.mines li.fav .m-name { color: var(--text); font-weight: 600; }
.mines li.fav .m-bar span { background: var(--accent); }
.mines .m-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.mines-more { margin-top: 6px; }
.mines-more summary { cursor: pointer; color: var(--muted); font-size: 0.9375rem; }

.not-played {
  margin-top: 24px;
  padding: 28px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .groups { grid-template-columns: minmax(0, 1fr); }
  .season-pick { justify-content: flex-start; }
  .stat { column-gap: 12px; grid-template-columns: minmax(0, 1fr) auto 7ch; }
}

/* ------------------------------------------------------------------ gang page */

/* The gang's name over the season picture, its facts as chat lines, then the members on the same backing
   as a leaderboard. */
.gang-hero { padding: 8px 0 32px; }
.gang-hero .crumb { margin-bottom: 20px; }
.gang-hero canvas { display: block; image-rendering: pixelated; max-width: 100%; }
.gang-members {
  padding: 14px 20px 18px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
}
.members-head { margin: 0; }

/* ------------------------------------------------------------------ compare */

/* Each side keeps one colour everywhere: its name box, its bars and its value when it is ahead. The two servers' own colours, so both read in either theme. */
:root { --side-a: #55d8cb; --side-b: #ff9e4a; }
:root[data-theme="light"] { --side-a: #0b7f75; --side-b: #b35400; }
.side-a { --side: var(--side-a); }
.side-b { --side: var(--side-b); }

.cmp-intro { padding: 12px 0 20px; text-align: center; color: #fff; }
.cmp-intro .chat { align-items: center; }

/* the two name boxes, the swap button between them, then Compare */
.cmp-pick {
  position: relative;
  z-index: 5; /* the name lists open over the models below */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  max-width: 820px;
  margin: 0 auto;
}
.cmp-pick .search { flex: 1 1 220px; width: auto; margin: 0; order: 0; }
.cmp-pick .search input:focus { border-color: var(--side); }
.cmp-pick .btn { height: 40px; }
.cmp-swap { padding: 0 6px; }
.cmp-swap svg { width: 24px; height: 24px; } /* 12 px art at exactly 2x */

/* Skins facing each other over the season picture, the name tags under them, "VS" between. */
.cmp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 0 16px;
  max-width: 820px;
  margin: 16px auto 0;
  color: #fff;
}
.cmp-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.cmp-stage { align-self: center; width: min(260px, 100%); height: 340px; } /* not the profile's align-self: end */
.cmp-vs {
  align-self: center;
  padding-bottom: 72px;
  font-family: var(--pixel);
  font-variant-ligatures: none;
  font-size: 36px;
  line-height: 1;
  text-shadow: 0.0833em 0.0833em 0 #3f3f3f;
}
.cmp-tag { display: block; max-width: 100%; margin-top: 10px; text-decoration: none; }
.cmp-tag canvas { display: block; image-rendering: pixelated; margin: 0 auto; }
.cmp-tag .pixel { font-size: 24px; color: #fff; }

/* Rows: the label in the middle, a value on each side, and a bar under them in two halves that grow out from
   the centre, each as long as its value is next to the larger one. The value that is ahead takes its side's
   colour; the other goes quiet. */
.cmp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cmp-head .face { width: 24px; height: 24px; flex: none; }
.cmp-list { margin: 0; }
.cmp-row {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
  grid-template-areas: "a label b" "bar bar bar";
  align-items: center;
  gap: 6px 12px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--line-soft);
}
.cmp-row.no-bar { grid-template-areas: "a label b"; min-height: 40px; padding: 4px 0; }
.cmp-row dt {
  grid-area: label;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}
.cmp-row.sub dt { font-size: 0.875rem; color: var(--faint); }
.cmp-row .item { flex: none; width: 16px; height: 16px; image-rendering: pixelated; image-rendering: crisp-edges; }
.cmp-row dd { margin: 0; }
.cmp-val {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cmp-val.a { --side: var(--side-a); grid-area: a; justify-content: flex-start; }
.cmp-val.b { --side: var(--side-b); grid-area: b; justify-content: flex-end; }
.cmp-val .of { color: var(--faint); font-weight: 400; }
.cmp-val .nodata { font-weight: 400; }
.cmp-val .rank-no { font-size: 0.8125rem; }
.cmp-val.lead .v { color: var(--side); font-weight: 700; }
.cmp-val.trail .v { color: var(--muted); font-weight: 500; }
.cmp-val.text .v { font-weight: 600; }
.cmp-bar {
  grid-area: bar;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  height: 6px;
}
.cmp-bar span { display: flex; background: var(--bg-sunk); }
.cmp-bar .a { justify-content: flex-end; }
.cmp-bar i { display: block; height: 100%; }
.cmp-bar .a i { background: var(--side-a); }
.cmp-bar .b i { background: var(--side-b); }
.cmp-bar .trail i { opacity: 0.4; }

/* How many rows each of them won: one row above the groups, numbers in the game's font. One of them not
   playing the season says so here instead. */
.cmp-sum { max-width: 536px; margin: 24px auto 0; }
.cmp-sum .cmp-row { border-bottom: 0; padding: 0; row-gap: 8px; }
.cmp-sum dt {
  font-family: var(--pixel);
  font-variant-ligatures: none;
  font-size: 24px;
  color: var(--text);
  text-shadow: 0.0833em 0.0833em 0 rgba(0, 0, 0, 0.35);
}
.cmp-sum .cmp-val .v {
  font-family: var(--pixel);
  font-variant-ligatures: none;
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
  text-shadow: 0.0833em 0.0833em 0 rgba(0, 0, 0, 0.35);
}
.cmp-sum .cmp-bar { height: 8px; }
:root[data-theme="light"] .cmp-sum :is(dt, .v) { text-shadow: 0.0833em 0.0833em 0 rgba(0, 0, 0, 0.12); }
.cmp-note { margin: 24px 0 0; text-align: center; color: var(--muted); }

/* PrisonEscape's roles: a group each, side by side under the rest */
.cmp-roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  column-gap: 48px;
  align-items: start;
}

.cmp-choices { list-style: none; margin: 16px auto 0; padding: 0; display: grid; gap: 8px; justify-content: center; }
.cmp-choices .btn .face { width: 24px; height: 24px; }
.cmp-choices .c-sub { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); }
.cmp-choices .btn:is(:hover, :focus-visible) .c-sub { color: inherit; }

@media (max-width: 760px) {
  .cmp-hero { gap: 0 8px; }
  .cmp-stage { height: 220px; }
  .cmp-vs { font-size: 24px; padding-bottom: 56px; }
  .cmp-tag .pixel { font-size: 18px; }
  .cmp-sum dt { font-size: 18px; }
  .cmp-sum .cmp-val .v { font-size: 24px; }
}
@media (max-width: 480px) {
  .cmp-row { column-gap: 8px; }
  .cmp-row dt .item { display: none; }
  .cmp-val { gap: 6px; }
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 0.8125rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 18px;
  padding-bottom: 24px;
}
.site-footer .disclaimer { margin: 0; }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }

/* Server status bubble: the same pixel bubble as horizonmines.net, Minecraft chat green / red. */
.server-status { display: inline-flex; align-items: center; gap: 8px; }
.server-status[hidden] { display: none; }
.server-status .bubble {
  --bubble: #7a7f7b;
  --bubble-dark: #4a4e4b;
  width: 6px;
  height: 6px;
  margin: 2px;
  background: var(--bubble);
  box-shadow:
    -2px 0 0 0 var(--bubble-dark), 2px 0 0 0 var(--bubble-dark),
    0 -2px 0 0 var(--bubble-dark), 0 2px 0 0 var(--bubble-dark),
    inset -2px -2px 0 0 var(--bubble-dark);
}
.server-status[data-state="online"] .bubble { --bubble: #55ff55; --bubble-dark: #1f8f2f; }
.server-status[data-state="offline"] .bubble { --bubble: #ff5555; --bubble-dark: #9c2323; }

.refresh {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
}
/* 12 px pixel arrow at exactly 2x; it spins in quarter turns so the pixels stay square */
.refresh img { width: 24px; height: 24px; image-rendering: pixelated; image-rendering: crisp-edges; }
.refresh.spinning img { animation: refresh-spin 800ms steps(4) infinite; }
/* a light grey arrow would vanish on the inverted (bone) hover: this button keeps its dark fill and lifts */
.refresh:is(:hover, :focus-visible) { background: var(--btn-fill); border-color: var(--text); }
:root[data-theme="light"] .refresh img { filter: brightness(0.45); }
@keyframes refresh-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ season picture behind the page top */

/* Full width under the header, fading into the page colour so everything below it reads on the plain
   background. Filled by chrome.js setPageArt() on the player page and the leaderboards. */
.page-art {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 680px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.page-art-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 400ms ease;
}
.page-art-layer.shown { opacity: 1; }
.page-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 10%, transparent) 0%,
    color-mix(in srgb, var(--bg) 30%, transparent) 40%,
    color-mix(in srgb, var(--bg) 78%, transparent) 72%,
    var(--bg) 100%);
}
main,
.site-footer { position: relative; z-index: 1; }

/* Leaderboards: the title sits on the picture. */


@media (prefers-reduced-motion: reduce) {
  .page-art-layer { transition: none; }
}

/* ------------------------------------------------------------------ pre-rendered first paint */

/* Written by sync/pages.py: what crawlers and visitors without JS read (a player's stats per season, the
   leaderboards' top 10s). The page scripts replace it with the full page. */
.prerender { padding: 24px 0 8px; }
.prerender h1 { margin-bottom: 10px; }
.prerender > p { color: var(--muted); max-width: 72ch; }
.prerender h2 { margin: 28px 0 0; }
.prerender a { color: var(--text); text-underline-offset: 3px; }
.prerender a:hover { color: var(--accent); }
.pr-scroll { overflow-x: auto; }
.prerender .lb-table th[scope="row"] { text-align: left; font-weight: 400; color: var(--muted); white-space: nowrap; }
.prerender .lb-table thead th.c-val { text-align: right; }
.pr-board ol { margin: 10px 0 0; padding-left: 2.5em; columns: 2 240px; column-gap: 32px; }
.pr-board li { padding: 3px 0; break-inside: avoid; }
.pr-board li a { font-family: var(--pixel); font-size: 18px; }
.pr-board .c-sub { color: var(--muted); font-size: 0.875rem; }
