/* BreadSMP website, drawn like the game: its lettering, its chat colours, its buttons, slots,
   tooltips and toasts. Font sizes are multiples of 8px so every letter pixel lands on the screen's. */

@font-face { font-family: "Site Pixel"; src: url("/pixel.ttf") format("truetype"); font-weight: 400; font-display: block; }
@font-face { font-family: "Site Pixel"; src: url("/pixel-bold.ttf") format("truetype"); font-weight: 700; font-display: block; }

:root {
  /* The game's chat colours: white, gray (7), dark gray (8), gold (6), yellow (e), green (a), red (c), aqua (b). */
  --white: #ffffff;
  --gray: #aaaaaa;
  --dgray: #6b6b6b;
  --gold: #ffaa00;
  --yellow: #ffff55;
  --hover: #ffffa0;
  --green: #55ff55;
  --red: #ff5555;
  --aqua: #55ffff;
  --silver: #d8d8d8;
  --bronze: #ff8b3d;
  /* Dark panels, like the ladder sites. */
  --bg: #121212;
  --bg-2: #0d0d0d;
  --panel: #1a1a1a;
  --panel-2: #212121;
  --panel-3: #2a2a2a;
  --row: #1d1d1d;
  --line: #2b2b2b;
  --line-2: #3c3c3c;
  /* Text shadows are the text's colour at a quarter brightness. */
  --sh: #3f3f3f;
  --font: "Site Pixel", ui-monospace, monospace;
  --stone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect width='16' height='16' fill='%23707070'/%3E%3Cpath fill='%237c7c7c' d='M1 1h2v1H1zM6 3h1v1H6zM11 1h2v1h-2zM3 6h1v2H3zM9 7h2v1H9zM14 5h1v1h-1zM5 11h2v1H5zM12 10h1v2h-1zM1 13h1v1H1zM8 14h2v1H8zM15 9h1v1h-1z'/%3E%3Cpath fill='%23646464' d='M4 2h1v1H4zM13 3h1v1h-1zM7 5h1v1H7zM1 9h2v1H1zM10 12h1v1h-1zM14 13h1v1h-1zM6 8h1v1H6zM3 14h1v1H3zM11 5h1v1h-1z'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; text-shadow: .125em .125em 0 var(--sh); }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--white); font-family: var(--font); font-size: 16px; line-height: 20px;
  font-synthesis: none; -webkit-font-smoothing: none; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
main { flex: 1; outline: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { image-rendering: pixelated; }
svg.px, img.px { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }
img.item { object-fit: contain; -webkit-user-drag: none; user-select: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
::selection { background: #3f3fff; color: #fff; }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #8b8b8b; border: 2px solid; border-color: #c6c6c6 #555 #555 #c6c6c6; }
::-webkit-scrollbar-corner { background: #000; }

.skip { position: absolute; left: -999px; top: 8px; background: #000; color: var(--yellow); padding: 8px 12px; z-index: 100; border: 2px solid #fff; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--gray); --sh: #2a2a2a; }
.faint { color: var(--dgray); --sh: #1a1a1a; }
.y, .gold { color: var(--gold); --sh: #3f2a00; }
.yl { color: var(--yellow); --sh: #3f3f15; }
.num { font-variant-numeric: tabular-nums; }

/* ── header ───────────────────────────────────────────────────────── */

.top { position: sticky; top: 0; z-index: 40; background: rgba(18, 18, 18, .97); border-bottom: 2px solid #000; box-shadow: 0 2px 0 #262626; }
.top-in { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 40px; width: auto; display: block; image-rendering: auto; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .6)); }
.brand:hover img { filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .6)) brightness(1.08); }
.nav { display: flex; gap: 8px; }
.nav a { padding: 8px 10px; color: var(--gray); --sh: #2a2a2a; position: relative; }
.nav a:hover { color: var(--white); --sh: #3f3f3f; }
.nav a.on { color: var(--gold); --sh: #3f2a00; }
.nav a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -14px; height: 4px; background: var(--gold); box-shadow: 0 -2px 0 #3f2a00 inset; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* The game's text field: black, a grey frame that turns white when typing. */
.search { position: relative; width: 248px; }
.search input, .field {
  width: 100%; height: 40px; padding: 0 12px 0 40px; background: #000; color: var(--white); border: 2px solid #a0a0a0; outline: none; font-size: 16px; border-radius: 0;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder, .field::placeholder { color: #808080; }
.search input:focus, .field:focus { border-color: #fff; }
.search input::-webkit-search-cancel-button { display: none; }
.search-ico { position: absolute; left: 10px; top: 10px; width: 20px; height: 20px; pointer-events: none; }
.results {
  position: absolute; top: 44px; left: 0; right: 0; background: rgba(16, 0, 16, .96); border: 2px solid transparent;
  border-image: linear-gradient(180deg, #5000ff, #28007f) 1; outline: 2px solid rgba(16, 0, 16, .96); z-index: 50; max-height: 360px; overflow: auto;
}
.results a, .results .none { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.results a:hover, .results a.on { background: rgba(255, 255, 255, .08); color: var(--hover); }
.results .none { color: var(--gray); }

.burger { display: none; width: 44px; height: 40px; padding: 10px; cursor: pointer; background: #707070 var(--stone) 0 0 / 32px; border: 2px solid #000; box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .3), inset -2px -4px 0 rgba(0, 0, 0, .32); }
.burger span { display: block; height: 4px; background: #fff; margin: 0 0 4px; box-shadow: 2px 2px 0 #3f3f3f; }
.burger span:last-child { margin: 0; }

/* ── buttons: stone, a light top edge, a heavy bottom one; white frame and yellow text on hover ── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; cursor: pointer; white-space: nowrap; user-select: none;
  background: #707070 var(--stone) 0 0 / 32px 32px; color: var(--white); border: 2px solid #000; position: relative;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .32), inset -2px -4px 0 rgba(0, 0, 0, .34);
}
.btn:hover { border-color: #fff; color: var(--hover); --sh: #3f3f28; background-color: #7a7a7a; }
.btn:active { box-shadow: inset 2px 4px 0 rgba(0, 0, 0, .34), inset -2px -2px 0 rgba(255, 255, 255, .2); }
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn[disabled], .btn.off { background: #2c2c2c; color: #a0a0a0; --sh: #282828; border-color: #000; box-shadow: none; pointer-events: none; }
.btn-y, .btn-gray { }
.btn-lg { height: 48px; padding: 0 24px; }
.btn-wide { width: 100%; }
.link { color: var(--gold); --sh: #3f2a00; display: inline-flex; align-items: center; gap: 8px; }
.link::after { content: ">"; }
.link:hover { color: var(--yellow); --sh: #3f3f15; }

/* ── panels and tables ─────────────────────────────────────────── */

.panel { background: var(--panel); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 48px; background: var(--panel-2); border-bottom: 2px solid #0a0a0a; }
.panel-h h3 { font-size: 16px; }
.panel-h .ico { width: 24px; height: 24px; flex: none; }
.panel-h .side { margin-left: auto; color: var(--gray); --sh: #2a2a2a; display: flex; align-items: center; gap: 10px; }
.panel-b { padding: 16px; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; color: var(--gray); --sh: #2a2a2a; font-weight: 400; padding: 0 16px; height: 40px; background: var(--panel-2); border-bottom: 2px solid #0a0a0a; }
.tbl td { padding: 0 16px; height: 48px; background: var(--panel); border-bottom: 1px solid #222; }
.tbl tr:nth-child(even) td { background: var(--row); }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--panel-3); }
.tbl tbody tr.me td { background: #2b2410; }
.tbl .r { text-align: right; }
.tbl .rank { width: 64px; color: var(--gray); --sh: #2a2a2a; }
.tbl .v { text-align: right; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face { width: 32px; height: 32px; flex: none; background: #2a2a2a; image-rendering: pixelated; box-shadow: 2px 2px 0 rgba(0, 0, 0, .5); }
.face.sm { width: 24px; height: 24px; }
.face.lg { width: 48px; height: 48px; }
.r1 { color: var(--gold) !important; --sh: #3f2a00 !important; }
.r2 { color: var(--silver) !important; --sh: #363636 !important; }
.r3 { color: var(--bronze) !important; --sh: #3f220f !important; }
.tag-be { color: var(--aqua); --sh: #153f3f; flex: none; }
.dot { width: 8px; height: 8px; background: var(--green); flex: none; box-shadow: 2px 2px 0 #153f15; }
.dot.off { background: #555; box-shadow: 2px 2px 0 #151515; }

/* Value tags on the small boards, like ladder tiers. */
.chip { display: inline-block; height: 24px; line-height: 20px; padding: 2px 6px 0; background: #e2793a; color: #2a1406; --sh: transparent; box-shadow: inset 0 -2px 0 #9a4718, 0 0 0 2px #0a0a0a; white-space: nowrap; }
.chip.g { background: var(--gold); color: #2b1c00; box-shadow: inset 0 -2px 0 #a56e00, 0 0 0 2px #0a0a0a; }
.chip.s { background: #cfcfcf; color: #222; box-shadow: inset 0 -2px 0 #8a8a8a, 0 0 0 2px #0a0a0a; }
.chip.dim { background: #2c2c2c; color: var(--gray); box-shadow: inset 0 -2px 0 #1c1c1c, 0 0 0 2px #0a0a0a; }

/* An item in a frame, for page headers. */
.frame { width: 64px; height: 64px; flex: none; padding: 12px; background: #4a321c; border: 2px solid #000; box-shadow: inset 0 0 0 4px #8d6338, inset 0 0 0 6px #5e4024, 4px 4px 0 rgba(0, 0, 0, .5); }

/* ── page header like the ladder pages ─────────────────────────── */

.ph { display: flex; align-items: center; gap: 24px; padding: 40px 0 24px; border-bottom: 2px solid var(--line); margin-bottom: 32px; flex-wrap: wrap; }
.ph h1 { font-size: 48px; line-height: 48px; --sh: #3f3f3f; }
.ph .sub { color: var(--gray); --sh: #2a2a2a; margin-top: 8px; }
.kpis { margin-left: auto; display: flex; gap: 40px; text-align: right; }
.kpi b { display: block; font-size: 32px; line-height: 32px; font-weight: 400; }
.kpi span { color: var(--gray); --sh: #2a2a2a; display: block; margin-top: 4px; }

.crumbs { display: flex; gap: 8px; color: var(--dgray); --sh: #1a1a1a; padding-top: 24px; flex-wrap: wrap; }
.crumbs a { color: var(--gray); --sh: #2a2a2a; }
.crumbs a:hover { color: var(--gold); --sh: #3f2a00; }

/* ── the home page: the title screen ───────────────────────────── */

.hero { position: relative; overflow: hidden; border-bottom: 2px solid #000; min-height: 720px; display: flex; flex-direction: column; }
.hero canvas, .hero .shot { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.hero .shot { object-fit: cover; filter: brightness(.6); }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 50% 42%, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15) 70%, transparent); pointer-events: none; }
.title-screen { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; padding: 48px 24px 32px; }
.logo-wrap { position: relative; width: min(560px, 86vw); }
.logo-wrap img { width: 100%; height: auto; display: block; image-rendering: auto; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .35)); }
.splash {
  position: absolute; right: -6%; bottom: 10%; color: var(--yellow); --sh: #3f3f15; font-size: 24px; line-height: 24px; white-space: nowrap;
  transform: rotate(-20deg); transform-origin: 50% 50%; animation: splash .5s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes splash { from { transform: rotate(-20deg) scale(1); } to { transform: rotate(-20deg) scale(1.1); } }
.menu { width: min(416px, 100%); display: flex; flex-direction: column; gap: 8px; margin-top: 32px; }
.menu .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu .btn { width: 100%; }

/* The entry in the game's server list. */
.server {
  width: min(624px, 100%); margin-top: 32px; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 12px; padding: 4px; cursor: pointer;
  background: rgba(0, 0, 0, .6); border: 2px solid #808080; text-align: left; color: inherit; font: inherit; position: relative;
}
.server:hover, .server:focus-visible { border-color: #fff; outline: none; }
.server .icon { grid-row: span 3; width: 64px; height: 64px; position: relative; background: #000; }
.server .icon img { width: 64px; height: 64px; display: block; object-fit: contain; image-rendering: auto; }
.server .icon::after { content: ""; position: absolute; inset: 0; background: rgba(160, 160, 160, .35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23fff' d='M5 3h2v1h1v1h1v1h1v1h1v2h-1v1h-1v1h-1v1H7v1H5z'/%3E%3C/svg%3E") center / 40px no-repeat; opacity: 0; }
.server:hover .icon::after { opacity: 1; }
.server .name { padding-top: 2px; }
.server .motd { grid-column: 2 / 4; color: var(--gray); --sh: #2a2a2a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server .motd.l2 { color: var(--gold); --sh: #3f2a00; }
.server .ping { grid-row: 1; grid-column: 3; display: flex; align-items: center; gap: 8px; color: var(--gray); --sh: #2a2a2a; padding-top: 2px; }
.server .ping b { font-weight: 400; color: var(--white); --sh: #3f3f3f; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.bars i { width: 2px; background: var(--green); box-shadow: 2px 2px 0 #153f15; display: block; }
.bars i:nth-child(1) { height: 4px; } .bars i:nth-child(2) { height: 6px; } .bars i:nth-child(3) { height: 8px; } .bars i:nth-child(4) { height: 12px; } .bars i:nth-child(5) { height: 16px; }
.server .addr-line { grid-column: 1 / 4; color: var(--gray); --sh: #2a2a2a; border-top: 2px solid rgba(255, 255, 255, .08); padding: 8px 4px 4px; }
.server .addr-line b { color: var(--white); --sh: #3f3f3f; font-weight: 400; }

/* The week's top player, on a grass block, under a boss bar. */
.champion { position: absolute; z-index: 2; right: max(24px, calc(50% - 600px)); bottom: 56px; display: flex; flex-direction: column; align-items: center; }
.champion .sk { cursor: grab; }
.champion .sk.sk-drag { cursor: grabbing; }
.boss { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 8px; pointer-events: none; }
.boss-name { white-space: nowrap; }
.boss-name b { font-weight: 700; color: var(--gold); --sh: #3f2a00; margin-right: 4px; }
.boss-bar { position: relative; width: 240px; height: 10px; background: #403400; box-shadow: 0 0 0 2px #000, 0 4px 0 2px rgba(0, 0, 0, .25); overflow: hidden; }
.boss-bar i { position: absolute; inset: 0; background: linear-gradient(#fff4a3 0 2px, #f4d22c 2px 8px, #b08f00 8px 10px); animation: boss-fill 1.4s steps(24) both .2s; }
@keyframes boss-fill { from { width: 0; } to { width: 100%; } }
.boss-sub { color: var(--gray); --sh: #2a2a2a; white-space: nowrap; }

.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 32px; background: var(--panel); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); }
.strip > div { padding: 20px 24px; border-right: 2px solid #0a0a0a; display: flex; gap: 16px; align-items: center; }
.strip > div:last-child { border-right: none; }
.strip .ico { width: 40px; height: 40px; flex: none; }
.strip b { display: block; font-size: 32px; line-height: 32px; font-weight: 400; }
.strip span { color: var(--gray); --sh: #2a2a2a; display: block; margin-top: 4px; }

.sec { padding: 64px 0 0; }
.sec-h { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-h h2 { font-size: 32px; line-height: 32px; }
.sec-h p { color: var(--gray); --sh: #2a2a2a; }
.sec-h .link { margin-left: auto; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.split { display: grid; grid-template-columns: minmax(0, 472px) minmax(0, 1fr); gap: 24px; align-items: start; }


.heads { display: flex; flex-wrap: wrap; gap: 8px; }
.heads a { display: block; }
.heads .face { width: 40px; height: 40px; }
.heads a:hover .face { outline: 2px solid #fff; }
.empty { color: var(--gray); --sh: #2a2a2a; padding: 16px 0; }

.chart { width: 100%; height: 152px; display: block; }
.chart rect.bar { fill: #4a3500; }
.chart rect.bar.hi { fill: var(--gold); }
.chart rect.bar:hover { fill: var(--yellow); }
.chart line { stroke: #2a2a2a; stroke-width: 2; }
.chart text { fill: var(--dgray); font-family: var(--font); font-size: 16px; }

.news-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-card { background: var(--panel); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.post-card:hover { box-shadow: 0 0 0 2px #fff; }
.post-card h3 { font-size: 16px; color: var(--white); }
.post-card:hover h3 { color: var(--hover); --sh: #3f3f28; }
.post-card p { color: var(--gray); --sh: #2a2a2a; line-height: 24px; }
.post-card .meta { display: flex; align-items: center; gap: 12px; color: var(--dgray); --sh: #1a1a1a; margin-top: auto; }
.ntag { color: var(--gold); --sh: #3f2a00; text-transform: uppercase; }
.ntag::before { content: "["; } .ntag::after { content: "]"; }
.ntag.event { color: var(--bronze); --sh: #3f220f; }
.ntag.season { color: #ff55ff; --sh: #3f153f; }
.ntag.announcement { color: var(--yellow); --sh: #3f3f15; }
.ntag.maintenance { color: var(--gray); --sh: #2a2a2a; }
.pin { color: var(--yellow); --sh: #3f3f15; }

.cta { margin: 64px 0 0; padding: 32px; background: rgba(0, 0, 0, .4); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { font-size: 32px; line-height: 32px; margin-bottom: 8px; }
.cta p { color: var(--gray); --sh: #2a2a2a; }
.cta .join { margin-left: auto; }

/* Copy the address: a text field and a button, like adding a server. */
.join { display: flex; align-items: stretch; gap: 8px; }
.join .ipbox { display: flex; flex-direction: column; justify-content: center; }
.join small { display: block; color: var(--gray); --sh: #2a2a2a; margin-bottom: 4px; font-size: 16px; }
.join .ip { height: 40px; min-width: 248px; padding: 0 12px; background: #000; border: 2px solid #a0a0a0; display: flex; align-items: center; white-space: nowrap; }
.join .btn { align-self: flex-end; }

/* ── the board picker: the game's creative inventory ─────────── */
/* --u is one pixel of the game's screens: every size below is in those pixels, like its textures. */

.inv-wrap { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.inv-wrap::-webkit-scrollbar { display: none; }
.inv { --u: 2px; display: inline-flex; flex-direction: column; align-items: flex-start; vertical-align: top; }
.inv.big { --u: 3px; }
.inv * { --sh: transparent; }
.inv-tabs { display: flex; gap: var(--u); padding: 0 calc(var(--u) * 2); margin-bottom: calc(var(--u) * -2); }
.inv-tab {
  position: relative; z-index: 0; top: calc(var(--u) * 2); width: calc(var(--u) * 26); height: calc(var(--u) * 28); padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: #8b8b8b; border: var(--u) solid #000; border-bottom: none;
  box-shadow: inset var(--u) var(--u) 0 #b4b4b4, inset calc(var(--u) * -1) 0 0 #5b5b5b;
}
.inv-tab:hover { background: #9c9c9c; }
.inv-tab .ico { width: calc(var(--u) * 16); height: calc(var(--u) * 16); }
.inv-tab.on { z-index: 2; top: 0; height: calc(var(--u) * 31); background: #c6c6c6; box-shadow: inset calc(var(--u) * 2) calc(var(--u) * 2) 0 #fff, inset calc(var(--u) * -2) 0 0 #555; }
.inv-panel {
  position: relative; z-index: 1; background: #c6c6c6; border: var(--u) solid #000; padding: calc(var(--u) * 5) calc(var(--u) * 7) calc(var(--u) * 7);
  box-shadow: inset calc(var(--u) * 2) calc(var(--u) * 2) 0 #fff, inset calc(var(--u) * -2) calc(var(--u) * -2) 0 #555;
}
.inv-title { color: #404040; font-size: calc(var(--u) * 8); line-height: calc(var(--u) * 10); margin: 0 0 calc(var(--u) * 2) var(--u); }
.inv-grid { display: grid; grid-template-columns: repeat(9, calc(var(--u) * 18)); }
.cell {
  --u: inherit; width: calc(var(--u, 2px) * 18); height: calc(var(--u, 2px) * 18); flex: none; position: relative; display: flex; align-items: center; justify-content: center;
  background: #8b8b8b; box-shadow: inset var(--u, 2px) var(--u, 2px) 0 #373737, inset calc(var(--u, 2px) * -1) calc(var(--u, 2px) * -1) 0 #fff;
}
.cell .ico { width: calc(var(--u, 2px) * 16); height: calc(var(--u, 2px) * 16); }
a.cell:hover::after, a.cell:focus-visible::after { content: ""; position: absolute; inset: var(--u, 2px); background: rgba(255, 255, 255, .5); }
a.cell:focus-visible { outline: none; }
a.cell.on::before { content: ""; position: absolute; z-index: 1; inset: calc(var(--u, 2px) * -1); border: var(--u, 2px) solid #fff; box-shadow: 0 0 0 var(--u, 2px) #000; pointer-events: none; }
.cell.big { --u: 3px; }

.picker-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: stretch; }
.pv { display: flex; flex-direction: column; min-width: 0; }
.pv-h { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--panel-2); border-bottom: 2px solid #0a0a0a; }
.pv-h h3 { font-size: 24px; line-height: 24px; }
.pv-h p { color: var(--gray); --sh: #2a2a2a; margin-top: 8px; }
.pv-row { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-top: 1px solid #222; cursor: pointer; }
.pv-row:hover { background: var(--panel-3); }
.pv-row.first { background: linear-gradient(90deg, rgba(255, 170, 0, .16), transparent 70%); }
.pv-row .rk { width: 20px; color: var(--gray); --sh: #2a2a2a; }
.pv-row .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-row .v { margin-left: auto; white-space: nowrap; }
.pv-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 2px solid #0a0a0a; color: var(--dgray); --sh: #1a1a1a; }

/* The current #1 of each board, big. */
.champs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.champ { display: flex; flex-direction: column; background: var(--panel); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); }
.champ:hover { box-shadow: 0 0 0 2px #fff; }
.champ-h { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--panel-2); border-bottom: 2px solid #0a0a0a; }
.champ-h .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ:hover .champ-h .t { color: var(--hover); --sh: #3f3f28; }
.champ-1 { display: flex; align-items: center; gap: 12px; padding: 16px 12px; background: linear-gradient(90deg, rgba(255, 170, 0, .15), transparent 80%); }
.champ-1.none { color: var(--dgray); --sh: #1a1a1a; }
.champ-1 .who { min-width: 0; }
.champ-1 .crown { color: var(--gold); --sh: #3f2a00; }
.champ-1 b { display: block; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.champ-1 .v { display: block; color: var(--yellow); --sh: #3f3f15; margin-top: 4px; }
.champ-r { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-top: 1px solid #222; color: var(--gray); --sh: #2a2a2a; }
.champ-r .rk { width: 16px; }
.champ-r .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-r .v { margin-left: auto; color: var(--white); --sh: #3f3f3f; }

.seg { display: inline-flex; gap: 8px; max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  height: 40px; padding: 0 16px; cursor: pointer; white-space: nowrap; flex: none; color: var(--white);
  background: #707070 var(--stone) 0 0 / 32px; border: 2px solid #000; box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .32), inset -2px -4px 0 rgba(0, 0, 0, .34);
}
.seg button:hover { border-color: #fff; color: var(--hover); --sh: #3f3f28; }
.seg button.on { background: #2c2c2c; color: var(--gold); --sh: #3f2a00; box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5); border-color: #fff; }
.seg button[disabled] { background: #2c2c2c; color: #6b6b6b; --sh: #1a1a1a; box-shadow: none; cursor: not-allowed; border-color: #000; }
.bar-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.bar-row .resets { color: var(--dgray); --sh: #1a1a1a; }

/* Small boards, two to a row, like kit ladders. */
.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mini .panel-h { height: 44px; }
.mini .panel-h h3 { display: flex; align-items: center; }
.mini .panel-h h3::after { content: ">"; color: var(--dgray); --sh: #1a1a1a; margin-left: 8px; }
.mini a.panel-h:hover h3 { color: var(--hover); --sh: #3f3f28; }
.mini .panel-h .ico { width: 24px; height: 24px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 40px; border-top: 1px solid #222; cursor: pointer; }
.mini-row:hover { background: var(--panel-3); }
.mini-row .rk { width: 16px; color: var(--gray); --sh: #2a2a2a; }
.mini-row .face { width: 24px; height: 24px; }
.mini-row .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row.none { color: var(--dgray); --sh: #1a1a1a; cursor: default; }
.mini-row.none:hover { background: none; }

/* A board on its own. */
.board-layout { display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: 24px; align-items: start; }
.board-head { display: flex; align-items: center; gap: 20px; }
.board-head h1 { font-size: 48px; line-height: 48px; }
.board-head p { color: var(--gray); --sh: #2a2a2a; margin-top: 8px; }
.board-head .sum { margin-left: auto; text-align: right; }
.board-head .sum b { display: block; font-size: 32px; line-height: 32px; font-weight: 400; }
.board-head .sum span { color: var(--gray); --sh: #2a2a2a; display: block; margin-top: 4px; }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 16px; margin: 0 0 24px; padding: 32px 24px 0; background: radial-gradient(ellipse at 50% 100%, rgba(255, 170, 0, .1), transparent 70%), var(--bg-2); border: 2px solid #0a0a0a; border-bottom: none; box-shadow: 0 0 0 1px var(--line); }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; min-width: 0; }
.pod .pn { background: rgba(0, 0, 0, .25); padding: 2px 8px 0; margin-bottom: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod:hover .pn { color: var(--hover); --sh: #3f3f28; }
.block { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; padding-top: 16px; border: 2px solid #000; border-bottom: none; image-rendering: pixelated; background-size: 64px 64px; }
.block b, .block span { background: rgba(0, 0, 0, .5); padding: 2px 8px 0; }
.block b { font-size: 32px; line-height: 32px; font-weight: 400; padding: 4px 10px 0; }
.pod.p1 .block { height: 144px; background-color: #f5c32c; box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .35), inset -4px 0 0 rgba(0, 0, 0, .25); color: #fff; --sh: #3f3000; }
.pod.p2 .block { height: 116px; background-color: #d6d6d6; box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .45), inset -4px 0 0 rgba(0, 0, 0, .2); color: #fff; --sh: #3a3a3a; }
.pod.p3 .block { height: 96px; background-color: #c77845; box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .3), inset -4px 0 0 rgba(0, 0, 0, .25); color: #fff; --sh: #3f1e0b; }
.pod.empty-pod { visibility: hidden; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; border-top: 2px solid #0a0a0a; }
.pager > span { color: var(--gray); --sh: #2a2a2a; }

.side-list .grp-h { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px; color: var(--gray); --sh: #2a2a2a; background: var(--panel-2); border-top: 2px solid #0a0a0a; }
.side-list .grp-h .ico { width: 20px; height: 20px; }
.side-list a { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 36px; }
.side-list a .ico { width: 20px; height: 20px; flex: none; }
.side-list a:hover { background: var(--panel-3); color: var(--hover); --sh: #3f3f28; }
.side-list a.on { background: #2b2410; color: var(--gold); --sh: #3f2a00; box-shadow: inset 4px 0 0 var(--gold); }

.note { color: var(--dgray); --sh: #1a1a1a; margin-top: 16px; line-height: 24px; }

/* ── player ─────────────────────────────────────────────────── */

.pl-top { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 24px; padding: 32px 0; border-bottom: 2px solid var(--line); margin-bottom: 32px; }
.pl-model { background: radial-gradient(ellipse at 50% 85%, rgba(255, 170, 0, .1), transparent 65%), var(--bg-2); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 32px 0 16px; min-height: 456px; position: relative; overflow: hidden; }
.pl-model .hint { position: absolute; top: 8px; right: 12px; color: var(--dgray); --sh: #1a1a1a; }
.pl-model .sk { cursor: grab; }
.pl-name { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pl-name h1 { font-size: 48px; line-height: 48px; word-break: break-all; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.badge { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 2px 10px 0; background: rgba(0, 0, 0, .4); border: 2px solid #3a3a3a; color: var(--gray); --sh: #2a2a2a; font: inherit; }
.badge b { color: var(--white); --sh: #3f3f3f; font-weight: 400; }
.badge.on { color: var(--green); --sh: #153f15; border-color: #2a5a2a; }
button.badge { cursor: pointer; }
button.badge:hover { border-color: #fff; color: var(--hover); --sh: #3f3f28; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.tile { background: var(--panel); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); padding: 16px; }
.tile span { display: block; color: var(--gray); --sh: #2a2a2a; }
.tile b { display: block; font-size: 32px; line-height: 32px; font-weight: 400; margin: 8px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile small { color: var(--dgray); --sh: #1a1a1a; font-size: 16px; }
.places { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.place { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 2px 10px 0 6px; background: rgba(0, 0, 0, .4); border: 2px solid #3a3a3a; cursor: pointer; }
.place:hover { border-color: #fff; }
.place .ico { width: 20px; height: 20px; }
.place b { font-weight: 400; }

.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.srow { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 44px; border-top: 1px solid #222; cursor: pointer; }
.srow:first-of-type { border-top: none; }
.srow:hover { background: var(--panel-3); }
.srow .ico { width: 24px; height: 24px; flex: none; }
.srow .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .val { text-align: right; white-space: nowrap; }
.srow .rk { width: 56px; text-align: right; color: var(--dgray); --sh: #1a1a1a; }
.srow .about { color: var(--dgray); --sh: #1a1a1a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }

.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 16px); grid-auto-columns: 16px; justify-content: start; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 16px; height: 16px; background: #222; display: block; box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .3); }
.heat i.l1 { background: #5c4100; }
.heat i.l2 { background: #9c6d00; }
.heat i.l3 { background: var(--gold); }
.heat i.l4 { background: var(--yellow); }
.heat i.future { background: transparent; box-shadow: none; }
.heat-key { display: flex; align-items: center; gap: 4px; color: var(--dgray); --sh: #1a1a1a; margin-top: 12px; }
.heat-key i { width: 16px; height: 16px; display: inline-block; }

/* ── staff, vote, join, news ───────────────────────────────── */

.staff-grp { margin-bottom: 40px; }
.staff-grp h2 { font-size: 32px; line-height: 32px; display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.staff-grp h2 small { color: var(--dgray); --sh: #1a1a1a; font-size: 16px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); }
.person:hover { box-shadow: 0 0 0 2px #fff; }
.person .face { width: 48px; height: 48px; }
.person b { display: block; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }
.person span { color: var(--gray); --sh: #2a2a2a; display: flex; align-items: center; gap: 8px; }

.sites { display: grid; gap: 12px; }
.site { display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 16px; background: var(--panel); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); }
.site .n { font-size: 32px; line-height: 32px; color: var(--gold); --sh: #3f2a00; width: 32px; }
.site small { color: var(--dgray); --sh: #1a1a1a; font-size: 16px; display: block; margin-top: 4px; }
.site .btn { margin-left: auto; }

.steps { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 8px; line-height: 24px; }
.steps li::before { content: counter(s) "."; color: var(--gold); --sh: #3f2a00; width: 20px; flex: none; }
.addr { display: flex; align-items: stretch; gap: 8px; margin-top: 16px; }
.addr code { flex: 1; height: 40px; padding: 0 12px; display: flex; align-items: center; background: #000; border: 2px solid #a0a0a0; font-family: var(--font); min-width: 0; overflow: hidden; white-space: nowrap; }
.port { color: var(--gray); --sh: #2a2a2a; margin-top: 12px; }

.faq details { border-top: 2px solid #0a0a0a; }
.faq details:first-child { border-top: none; }
.faq summary { list-style: none; cursor: pointer; padding: 0 16px; height: 48px; display: flex; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--gold); --sh: #3f2a00; width: 16px; flex: none; }
.faq details[open] summary::before { content: "-"; }
.faq summary:hover { background: var(--panel-3); color: var(--hover); --sh: #3f3f28; }
.faq .a { padding: 0 16px 16px 44px; color: var(--gray); --sh: #2a2a2a; line-height: 24px; }

.article { max-width: 768px; }
.article h1 { font-size: 48px; line-height: 56px; margin: 16px 0; }
.article .meta { display: flex; align-items: center; gap: 12px; color: var(--dgray); --sh: #1a1a1a; margin-bottom: 32px; flex-wrap: wrap; }
.prose { color: #e0e0e0; --sh: #383838; line-height: 24px; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--gold); }
.prose strong { color: var(--yellow); --sh: #3f3f15; font-weight: 400; }
.prose em { color: var(--aqua); --sh: #153f3f; font-style: normal; }
.prose a { color: var(--gold); --sh: #3f2a00; text-decoration: underline; text-underline-offset: 4px; }
.prose h3 { font-size: 24px; line-height: 32px; margin: 32px 0 12px; color: var(--white); }

/* ── footer, tooltip, toast ────────────────────────────────── */

.foot { margin-top: 96px; background: var(--bg-2); border-top: 2px solid #000; box-shadow: 0 -2px 0 #262626; }
.foot-in { display: flex; gap: 48px; padding: 40px 24px; flex-wrap: wrap; align-items: flex-start; }
.foot-in .brand img { height: 56px; }
.foot-in p { color: var(--dgray); --sh: #1a1a1a; max-width: 336px; margin-top: 16px; line-height: 24px; }
.foot-in nav { display: flex; flex-direction: column; gap: 8px; }
.foot-in nav b { color: var(--gray); --sh: #2a2a2a; font-weight: 400; margin-bottom: 4px; }
.foot-in nav a { color: var(--dgray); --sh: #1a1a1a; }
.foot-in nav a:hover { color: var(--hover); --sh: #3f3f28; }
.foot .legal { border-top: 2px solid #1c1c1c; color: #555; --sh: #151515; padding: 16px 24px; }

/* The game's item tooltip. */
.tip {
  position: fixed; z-index: 90; pointer-events: none; max-width: 320px; padding: 6px 8px 4px; line-height: 20px;
  background: rgba(16, 0, 16, .94); border: 2px solid transparent; border-image: linear-gradient(180deg, #5000ff, #28007f) 1; outline: 2px solid rgba(16, 0, 16, .94);
}
.tip .t { color: var(--white); }
.tip .l { color: var(--gray); --sh: #2a2a2a; }
.tip .a { color: var(--gold); --sh: #3f2a00; }

/* An advancement toast, top right. */
.toast {
  position: fixed; right: 16px; top: 80px; z-index: 95; width: 320px; min-height: 64px; display: flex; align-items: center; gap: 16px; padding: 12px 16px;
  background: #212121; border: 2px solid #000; box-shadow: inset 0 0 0 2px #555, inset 0 0 0 4px #1a1a1a, 4px 4px 0 rgba(0, 0, 0, .4);
  animation: toast-in .35s steps(6) both;
}
.toast.out { animation: toast-out .3s steps(5) both; }
.toast .ico { width: 32px; height: 32px; flex: none; }
.toast b { display: block; color: var(--yellow); --sh: #3f3f15; font-weight: 400; margin-bottom: 2px; }
.toast span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes toast-in { from { transform: translateX(360px); } to { transform: none; } }
@keyframes toast-out { to { transform: translateX(360px); } }

/* ── loading, the death screen for errors ─────────────────────── */

.loading { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 160px 0; color: var(--gray); --sh: #2a2a2a; }
.loading .bar { width: 256px; height: 12px; border: 2px solid #fff; padding: 2px; }
.loading .bar i { display: block; height: 100%; width: 40%; background: #fff; animation: load 1s steps(8) infinite; }
@keyframes load { from { margin-left: 0; } to { margin-left: 60%; } }
.died { position: relative; text-align: center; padding: 120px 24px 160px; background: linear-gradient(180deg, rgba(120, 0, 0, .55), rgba(60, 0, 0, .35)); }
.died h1 { font-size: 64px; line-height: 64px; color: #fff; }
.died p { margin: 32px 0 8px; }
.died .score { color: var(--white); margin-bottom: 40px; }
.died .score b { color: var(--yellow); --sh: #3f3f15; font-weight: 400; }
.died .menu { margin: 0 auto; width: min(400px, 100%); }
.fade { animation: fade .2s steps(3) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── 3D player model (skin.js) ─────────────────────────────── */

.sk { width: var(--sk-w); height: var(--sk-h); position: relative; user-select: none; -webkit-user-select: none; flex: none; }
.sk * { text-shadow: none; }
.sk-scene { width: 100%; height: 100%; perspective: 1100px; perspective-origin: 50% 40%; }
.sk-model { position: absolute; left: 50%; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.sk-p, .sk-l { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.sk-f { position: absolute; left: 0; top: 0; display: block; transform-origin: 0 0; background-repeat: no-repeat; image-rendering: pixelated; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.sk-bf { background-size: 100% 100%; }
.sk-missing .sk-f:not(.sk-bf) { background-image: none !important; background-color: #3a3a40; }
.sk-missing .sk-l { display: none; }
.pose-idle .sk-rarm { animation: armA 3.4s ease-in-out infinite; }
.pose-idle .sk-larm { animation: armB 3.4s ease-in-out infinite; }
.pose-idle .sk-head { animation: look 7s ease-in-out infinite; }
.pose-wave .sk-rarm { animation: wave 1.6s ease-in-out infinite; }
.pose-wave .sk-larm { animation: armB 3.4s ease-in-out infinite; }
.pose-wave .sk-head { animation: look 7s ease-in-out infinite; }
@keyframes armA { 0%, 100% { transform: rotateX(5deg) rotateZ(2deg); } 50% { transform: rotateX(-5deg) rotateZ(3deg); } }
@keyframes armB { 0%, 100% { transform: rotateX(-5deg) rotateZ(-2deg); } 50% { transform: rotateX(5deg) rotateZ(-3deg); } }
@keyframes look { 0%, 100% { transform: rotateY(0) rotateX(0); } 30% { transform: rotateY(14deg) rotateX(-4deg); } 65% { transform: rotateY(-10deg) rotateX(3deg); } }
@keyframes wave { 0%, 100% { transform: rotateZ(150deg) rotateX(0); } 50% { transform: rotateZ(128deg) rotateX(-8deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── narrower screens ─────────────────────────────────────── */

@media (max-width: 1160px) {
  .champion { display: none; }
}
@media (max-width: 1080px) {
  .nav a { padding: 8px 6px; }
  .search { width: 200px; }
  .board-layout { grid-template-columns: minmax(0, 1fr); }
  .split, .picker-row { grid-template-columns: minmax(0, 1fr); }
  .champs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip > div:nth-child(2) { border-right: none; }
  .strip > div:nth-child(-n+2) { border-bottom: 2px solid #0a0a0a; }
}
@media (max-width: 900px) {
  .burger { display: block; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 2px solid #000; flex-direction: column; padding: 8px 16px 16px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 24px; line-height: 24px; }
  .nav a.on::after { display: none; }
  .hide-sm { display: none !important; }
  .two, .groups, .news-list { grid-template-columns: minmax(0, 1fr); }
  .pl-top { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { margin-left: 0; text-align: left; gap: 24px; }
  .cta .join { margin-left: 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top-in { gap: 12px; }
  .brand img { height: 32px; }
  .search { width: auto; flex: 1; min-width: 0; }
  .top-right { flex: 1; justify-content: flex-end; min-width: 0; }
  #store-btn { display: none !important; }
  .hero { min-height: 0; }
  .title-screen { padding: 32px 16px 56px; }
  .splash { font-size: 16px; right: -2%; }
  .server { grid-template-columns: 48px minmax(0, 1fr); }
  .server .icon, .server .icon img { width: 48px; height: 48px; }
  .server .ping { grid-row: auto; grid-column: 2; }
  .server .addr-line { grid-column: 1 / 3; }
  .ph h1, .board-head h1, .pl-name h1, .article h1 { font-size: 32px; line-height: 40px; }
  .mini-grid { grid-template-columns: minmax(0, 1fr); }
  .join { flex-direction: column; align-items: stretch; }
  .join .ip { min-width: 0; }
  .join .btn { align-self: stretch; }
  .podium { padding: 24px 8px 0; gap: 6px; }
  .block b { font-size: 24px; line-height: 24px; }
  .tbl td, .tbl th { padding: 0 8px; }
  .tbl .rank { width: 40px; }
  .board-head .sum { display: none; }
  .inv.big { --u: 2px; }
  .champs { grid-template-columns: minmax(0, 1fr); }
  .strip { grid-template-columns: minmax(0, 1fr); }
  .strip > div { border-right: none; border-bottom: 2px solid #0a0a0a; }
  .cta { padding: 24px; }
  .srow .about { display: none; }
  .toast { left: 16px; right: 16px; width: auto; }
}

/* ── the little things: hovering, clicking ───────────────────────── */

.h2 { font-size: 32px; line-height: 32px; margin-right: 8px; }
.frame .ico { width: 100%; height: 100%; }
.ico { position: relative; display: inline-block; }

/* The enchantment glint: a purple shine sliding over an item, only where the item is (masked to its picture). */
.ico.it::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 0 30%, rgba(130, 70, 255, .55) 42%, rgba(214, 170, 255, .85) 50%, rgba(130, 70, 255, .55) 58%, transparent 70%) 0 0 / 300% 300%;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
a.cell:hover .ico.it::after, a.cell:focus-visible .ico.it::after, .champ:hover .champ-h .ico.it::after, .srow:hover .ico.it::after, .place:hover .ico.it::after,
.inv-tab:hover .ico.it::after, .strip > div:hover .ico.it::after, .frame:hover .ico.it::after, .pv-h:hover .ico.it::after, .panel-h:hover .ico.it::after,
.card:hover .ico.it::after, .btn:hover .ico.it::after {
  opacity: 1; animation: glint 1.6s linear infinite;
}
@keyframes glint { from { background-position: 100% 100%; } to { background-position: -50% -50%; } }

/* Things you can open lift a step when the pointer is on them, the way buttons answer in the game. */
.champ, .post-card, .person, .site, .place, .tile, .strip > div, .pv-row, .mini-row, .srow { transition: transform .12s steps(2), background-color .1s; }
.champ:hover, .post-card:hover, .person:hover, .place:hover { transform: translateY(-4px); }
.tile:hover, .strip > div:hover { background: var(--panel-2); }
.tbl tbody tr:hover .face, .pv-row:hover .face, .champ-r:hover .face, .mini-row:hover .face { transform: scale(1.25); box-shadow: 0 0 0 2px #fff, 2px 2px 0 rgba(0, 0, 0, .5); }
.face { transition: transform .1s steps(2); }
.tbl tbody tr:hover td:first-child { box-shadow: inset 4px 0 0 var(--gold); }
.link::after { transition: transform .15s steps(2); }
.link:hover::after { transform: translateX(4px); }

/* The nav's underline grows in steps. */
.nav a::before { content: ""; position: absolute; left: 10px; right: 10px; bottom: -14px; height: 4px; background: var(--gray); transform: scaleX(0); transform-origin: left; transition: transform .2s steps(4); }
.nav a:hover::before { transform: scaleX(1); }
.nav a.on::before { display: none; }

/* Hovering the server makes its signal bars "ping", as the game does while it asks a server. */
.server:hover .bars i { animation: ping 1.1s steps(1) infinite; }
.server:hover .bars i:nth-child(2) { animation-delay: .1s; }
.server:hover .bars i:nth-child(3) { animation-delay: .2s; }
.server:hover .bars i:nth-child(4) { animation-delay: .3s; }
.server:hover .bars i:nth-child(5) { animation-delay: .4s; }
@keyframes ping { 0% { background: #555; box-shadow: 2px 2px 0 #151515; } 50% { background: var(--green); box-shadow: 2px 2px 0 #153f15; } }

/* The splash: click for another; it pops in. */
.splash { pointer-events: auto; cursor: pointer; user-select: none; }
.splash.pop { animation: splash-pop .25s steps(3), splash .5s ease-in-out .25s infinite alternate; }
@keyframes splash-pop { from { transform: rotate(-20deg) scale(.4); } to { transform: rotate(-20deg) scale(1); } }
.logo-wrap img { transition: transform .2s ease-out; transform-origin: 50% 60%; }

/* Tooltips arrive in two steps. */
.tip:not([hidden]) { animation: tip-in .1s steps(2); }
@keyframes tip-in { from { opacity: 0; } to { opacity: 1; } }

/* The player card: a tooltip with a turning head. */
.pcard {
  position: fixed; z-index: 91; pointer-events: none; display: flex; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; min-width: 240px;
  background: rgba(16, 0, 16, .95); border: 2px solid transparent; border-image: linear-gradient(180deg, #5000ff, #28007f) 1; outline: 2px solid rgba(16, 0, 16, .95);
  animation: tip-in .12s steps(2);
}
.pcard .pc-head { width: 60px; height: 60px; flex: none; }
.pcard .pc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pcard .pc-name { font-weight: 400; color: var(--white); }
.pcard .pc-name.gold { color: var(--gold); --sh: #3f2a00; }
.pcard span { color: var(--gray); --sh: #2a2a2a; white-space: nowrap; }
.pcard .on { color: var(--green); --sh: #153f15; }
.pcard .ed { color: var(--aqua); --sh: #153f3f; }
.sk-spin { animation: head-spin 6s linear infinite; }
@keyframes head-spin { from { transform: rotateX(-18deg) rotateY(0deg); } to { transform: rotateX(-18deg) rotateY(360deg); } }

/* Experience orbs from Copy IP. */
.orb {
  position: fixed; left: -5px; top: -5px; z-index: 96; width: 10px; height: 10px; pointer-events: none;
  background: #c8ff3a; box-shadow: inset -2px -2px 0 #6fbf00, inset 2px 2px 0 #f2ffb0, 0 0 8px rgba(190, 255, 60, .7);
}

/* The footer's sound switch. */
.foot .legal { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.btn.snd { height: 32px; padding: 0 12px; }
@media (max-width: 900px) {
  .nav a::before { display: none; }
}
/* The item sits above the slot's hover highlight, so its glint shows. */
.cell .ico { z-index: 1; }

/* ── bug reports ───────────────────────────────────────────────── */
/* How to report and the form only: the reports themselves are for staff (the staff panel). */

.ok { color: var(--green); --sh: #153f15; }
.kpi b.ok { color: var(--green); --sh: #153f15; }
:is(.bug-step, .bug-alt, .steps, .pre) code { font-family: var(--font); color: var(--yellow); --sh: #3f3f15; background: #000; padding: 0 4px; box-shadow: 0 0 0 2px #2a2a2a; }
.btn.sq { width: 40px; padding: 0; flex: none; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 24px; color: #e0e0e0; --sh: #383838; }

.bug-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bug-step { display: flex; gap: 16px; align-items: flex-start; padding: 16px; background: var(--panel); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); }
.bug-step > div { flex: 1; min-width: 0; }
.bug-step b { display: block; font-weight: 400; margin-bottom: 8px; }
.bug-step p { color: var(--gray); --sh: #2a2a2a; line-height: 24px; }
.step-n { width: 32px; height: 32px; flex: none; display: flex; align-items: center; justify-content: center; background: #2c2c2c; color: var(--gold); --sh: #3f2a00;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5), 0 0 0 2px #0a0a0a; }
.bug-alt { color: var(--dgray); --sh: #1a1a1a; margin: 16px 0 0; }

.bugs-grid { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 24px; align-items: start; margin-top: 40px; }
.bugs-main, .bugs-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* The report form (and the kinds of bug on the how-to page, where they're only shown). */
.as { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.as b { display: block; font-weight: 400; }
.as span { display: block; }
.warnbox { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 24px; background: rgba(255, 170, 0, .1); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px #5a4210; line-height: 24px; }
.warnbox.x { background: rgba(255, 85, 85, .1); box-shadow: 0 0 0 1px #5a1a1a; margin: 16px 0 0; }
.warnbox .ico { width: 32px; height: 32px; flex: none; }
.bf { display: flex; flex-direction: column; gap: 32px; max-width: 880px; }
.bf-h { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.bf-h h3 { font-size: 24px; line-height: 32px; }
.bf-h .hint { color: var(--gray); --sh: #2a2a2a; margin-top: 4px; }
.bf-h .step-n { margin-top: 0; }
.bf-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 8px; }
.kind { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; cursor: pointer; color: var(--white);
  background: var(--panel); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); }
.kind .cell { --u: 2px; }
.kind b { display: block; font-weight: 400; }
.kind small { display: block; font-size: 16px; color: var(--gray); --sh: #2a2a2a; margin-top: 4px; line-height: 20px; }
.kind:not(.info):hover { box-shadow: 0 0 0 2px #8b8b8b; }
.kind:not(.info):hover b { color: var(--hover); --sh: #3f3f28; }
.kind.info { cursor: default; }
.kind.on { box-shadow: 0 0 0 2px #fff; background: var(--panel-3); }
.kind.on b { color: var(--gold); --sh: #3f2a00; }
.kind.x b { color: var(--red); --sh: #3f1515; }
/* The game's text field: black, a grey frame that turns white when typing. */
.tf { display: block; width: 100%; padding: 10px 12px; background: #000; color: var(--white); border: 2px solid #a0a0a0; outline: none; font: inherit; line-height: 24px;
  border-radius: 0; caret-color: #fff; resize: vertical; -webkit-appearance: none; appearance: none; }
.tf::placeholder { color: #5f5f5f; }
.tf:focus { border-color: #fff; }
.tf.bad { border-color: var(--red); }
textarea.tf { min-height: 152px; }
.tf-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 6px; color: var(--dgray); --sh: #1a1a1a; }
.tf-msg { color: var(--red); --sh: #3f1515; }
.count.near { color: var(--gold); --sh: #3f2a00; }
.bf-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.lbl { display: block; color: var(--gray); --sh: #2a2a2a; margin-bottom: 8px; }

/* Video proof: a field per link that says which site it is, and the sites that work as little slots. */
.vp-rows { display: flex; flex-direction: column; gap: 12px; }
.vp-row { display: flex; gap: 8px; align-items: flex-start; }
.vp-row .tf { flex: 1; min-width: 0; }
.vp-row .btn.sq { height: 48px; }
.vp-state { min-height: 24px; margin-top: 4px; color: var(--dgray); --sh: #1a1a1a; }
.vp-state.ok { color: var(--green); --sh: #153f15; }
.vp-state.bad { color: var(--red); --sh: #3f1515; }
.vp-foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.vp-sites { margin-top: 24px; }
.vp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vp-chip { padding: 4px 12px; color: var(--gray); --sh: #2a2a2a; background: var(--panel); border: 2px solid #0a0a0a; box-shadow: 0 0 0 1px var(--line); }
.vp-chip.on { color: var(--green); --sh: #153f15; box-shadow: 0 0 0 2px var(--green); }
.panel-b .vp-chips { margin-top: 16px; }
.bf .seg { flex-wrap: wrap; }
.bf-send { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding-top: 24px; border-top: 2px solid var(--line); }
.bf-err { color: var(--red); --sh: #3f1515; }
.bf-done { text-align: center; padding: 96px 24px 64px; display: flex; flex-direction: column; align-items: center; }
.bf-done h1 { font-size: 48px; line-height: 56px; margin: 24px 0 16px; color: var(--green); --sh: #153f15; }
.bf-done p { color: var(--gray); --sh: #2a2a2a; max-width: 560px; line-height: 24px; margin-bottom: 8px; }
.bf-done .cell.big { animation: done-pop .4s steps(4) both; }
@keyframes done-pop { from { transform: scale(.4); } 70% { transform: scale(1.15); } to { transform: none; } }

@media (max-width: 1080px) {
  .bugs-grid { grid-template-columns: minmax(0, 1fr); }
  .bug-how { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .bf-two { grid-template-columns: minmax(0, 1fr); }
  .as { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bf-done .cell.big { animation: none; }
}

/* The Bedrock steps on the join page: phone or console. */
#bed-tabs { flex-wrap: wrap; margin-bottom: 16px; }
