/* REFIK.PL
   The site borrows the game's own screens: the title screen on top, the server list for game modes, chat for
   whatever the server says, inventory panels and slots for the shop.
   Pixel type (Jersey 10) sits on the font's own grid: one font pixel is 1/18.667 em, so 18.667 px draws it at
   1 px, 37.333 px at 2 px, 56 px at 3 px and so on. Every pixel text gets the game's one-pixel drop shadow in
   a quarter of its own colour. Long copy is Inter. */

@font-face {
  font-family: 'Jersey 10';
  src: url('/fonts/Jersey10.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* surfaces */
  --page: #1b1b1f;
  --panel: #2e2e35;
  --panel-hi: #4c4c57;
  --panel-lo: #1c1c21;
  --slot: #18181c;
  --slot-hi: #3f3f49;
  --slot-lo: #0b0b0d;
  --rule: rgba(255, 255, 255, .1);
  /* text */
  --text: #f4f4f4;
  --text-2: #c3c3cb;
  --mute: #92929d;
  --dim: #6a6a75;
  /* the game's chat colours */
  --gold: #ffaa00;
  --yellow: #ffff55;
  --green: #55ff55;
  --red: #ff5555;
  --aqua: #55ffff;
  --grey: #aaaaaa;
  /* buttons */
  --btn: #6c6c6c;
  --btn-hi: #a6a6a6;
  --btn-lo: #454545;
  --go: #3c8527;
  --go-hi: #6cc349;
  --go-lo: #1d4d13;
  /* type */
  --pix: 'Jersey 10', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, monospace;
  --f1: calc(56px / 3);
  --f15: 28px;
  --f2: calc(112px / 3);
  --f3: 56px;
  --f4: calc(224px / 3);
  --f5: calc(280px / 3);
  --shadow: .0536em .0536em 0 color-mix(in srgb, currentColor 25%, #000);
  /* layout */
  --wrap: 1136px;
  --gutter: 24px;
  --top: 60px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top) + 20px);
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page) url('/img/tile.png') 0 0 / 64px 64px;
  color: var(--text);
  font: 400 15px/1.6 var(--sans);
  font-feature-settings: 'cv11', 'ss03', 'calt';
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  outline: none;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

p {
  margin: 0;
}

::selection {
  background: #fff;
  color: #000;
  text-shadow: none;
}

.px {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 8px 12px;
  background: #fff;
  color: #000;
}

.noscript {
  padding: 40px;
  text-align: center;
}

.boot {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

.boot img {
  animation: bob 1.2s steps(4, end) infinite alternate;
}

@keyframes bob {
  to {
    transform: translateY(-8px);
  }
}

/* ── Type ──────────────────────────────────────────────────────────────────── */

h1,
h2,
h3,
h4,
.pix {
  margin: 0;
  font-family: var(--pix);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: var(--shadow);
}

h1 {
  font-size: var(--f4);
}

h2 {
  font-size: var(--f3);
}

h3 {
  font-size: var(--f2);
}

h4 {
  font-size: var(--f1);
  color: var(--grey);
}

.lead {
  max-width: 600px;
  margin-top: 14px;
  color: var(--text-2);
  font-size: 16px;
}

.muted {
  color: var(--mute);
}

.small {
  font-size: 13px;
}

.mono {
  font-family: var(--mono);
  font-size: .92em;
}

.gold {
  color: var(--gold);
}

a.gold:hover,
.prose a:hover {
  color: var(--yellow);
}

/* a command or a config key, the way chat shows it */
.kbd {
  display: inline-block;
  padding: 0 6px;
  background: rgba(0, 0, 0, .55);
  color: var(--yellow);
  font: 400 var(--f1) / 22px var(--pix);
  text-shadow: var(--shadow);
  white-space: nowrap;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.band {
  padding: 84px 0;
}

/* the darker strip the game puts behind its lists, with the two-pixel separators above and below */
.band.dark {
  background: rgba(0, 0, 0, .42);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .7), inset 0 4px 0 var(--rule), inset 0 -2px 0 var(--rule), inset 0 -4px 0 rgba(0, 0, 0, .7);
}

.band-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: 36px;
}

.band-head p {
  max-width: 460px;
  color: var(--text-2);
}

.band-head h2 + p {
  margin-top: 12px;
}

.page-head {
  padding-top: 56px;
}

.page-head h1 + .lead {
  margin-top: 14px;
}

.page-end {
  height: 96px;
}

.section {
  padding: 56px 0;
}

.head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 24px;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
  --b: var(--btn);
  --hi: var(--btn-hi);
  --lo: var(--btn-lo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 18px 2px;
  border: 2px solid #000;
  background: var(--b);
  box-shadow: inset 2px 2px 0 var(--hi), inset -2px -4px 0 var(--lo);
  color: #fff;
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.btn:hover,
.btn:focus-visible {
  border-color: #fff;
  outline: none;
}

.btn:active {
  padding: 2px 18px 0;
  box-shadow: inset 2px 4px 0 var(--lo), inset -2px -2px 0 var(--hi);
}

.btn[disabled] {
  --b: #2d2d2d;
  --hi: #3a3a3a;
  --lo: #222;
  border-color: #000;
  color: #a0a0a0;
  cursor: not-allowed;
}

.btn-go {
  --b: var(--go);
  --hi: var(--go-hi);
  --lo: var(--go-lo);
}

.btn-danger {
  --b: #8f2a2a;
  --hi: #c85050;
  --lo: #561616;
}

.btn-ghost {
  --b: rgba(0, 0, 0, .35);
  --hi: transparent;
  --lo: transparent;
  border-color: #6a6a6a;
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px 2px;
}

.btn-sm:active {
  padding: 2px 12px 0;
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px 2px;
  font-size: var(--f15);
}

.btn-lg:active {
  padding: 2px 24px 0;
}

.btn-block {
  width: 100%;
}

.btn img {
  width: 16px;
  height: 16px;
}

/* ── Fields ────────────────────────────────────────────────────────────────── */

.field {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 2px solid #a0a0a0;
  border-radius: 0;
  background: #000;
  color: #fff;
  font-size: 15px;
}

.field::placeholder {
  color: var(--dim);
}

.field:focus {
  outline: none;
  border-color: #fff;
}

.field.bad {
  border-color: var(--red);
}

label.label {
  display: block;
  margin-bottom: 8px;
  color: var(--grey);
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.check input,
.variant input {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid #a0a0a0;
  border-radius: 0;
  background: #000;
  cursor: pointer;
}

.check input:hover,
.check input:focus-visible,
.variant input:focus-visible {
  border-color: #fff;
  outline: none;
}

/* a pixel tick: three squares down, five up */
.check input:checked {
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath fill='%2355ff55' d='M1 4h1v1h1v1h1V5h1V4h1V3h1V2h1v1H7v1H6v1H5v1H4v1H3V6H2V5H1z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

.check a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Small parts ───────────────────────────────────────────────────────────── */

/* inventory panel and the slot cut into it */
.panel,
.card,
.tile,
.buy-box,
.summary,
.login-card,
.menu,
.toast,
.kpi {
  border: 2px solid #000;
  background: var(--panel);
  box-shadow: inset 2px 2px 0 var(--panel-hi), inset -2px -2px 0 var(--panel-lo);
}

.slot,
.art,
.thumb {
  display: grid;
  place-items: center;
  background: var(--slot);
  box-shadow: inset 2px 2px 0 var(--slot-lo), inset -2px -2px 0 var(--slot-hi);
}

/* status in a chat colour, with a square in front */
.pill {
  --c: var(--grey);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c);
  font: 400 var(--f1) / 20px var(--pix);
  text-shadow: var(--shadow);
  white-space: nowrap;
}

.pill::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--c);
  box-shadow: 1px 1px 0 color-mix(in srgb, var(--c) 25%, #000);
}

.pill.ok {
  --c: var(--green);
}

.pill.wait {
  --c: var(--yellow);
}

.pill.bad {
  --c: var(--red);
}

.pill.info {
  --c: var(--aqua);
}

.pill.live::before {
  animation: blink 1.2s steps(2, jump-none) infinite;
}

@keyframes blink {
  50% {
    opacity: .2;
  }
}

/* the server list's signal bars */
.bars {
  display: inline-flex;
  flex: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.bars i {
  width: 2px;
  background: #4a4a4a;
  box-shadow: 1px 1px 0 #111;
}

.bars i:nth-child(1) { height: 2px; }
.bars i:nth-child(2) { height: 5px; }
.bars i:nth-child(3) { height: 8px; }
.bars i:nth-child(4) { height: 11px; }
.bars i:nth-child(5) { height: 14px; }

.bars.on i {
  background: var(--green);
  box-shadow: 1px 1px 0 #153f15;
}

.bars.off i {
  background: var(--red);
  box-shadow: 1px 1px 0 #3f1515;
}

.notice {
  --c: var(--yellow);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 2px solid color-mix(in srgb, var(--c) 55%, #000);
  background: rgba(0, 0, 0, .5);
  color: var(--text-2);
  font-size: 14px;
}

.notice strong {
  color: var(--c);
  font-weight: 650;
}

.notice.bad {
  --c: var(--red);
}

.notice.ok {
  --c: var(--green);
}

.notice.info {
  --c: var(--aqua);
}

.notice.sale {
  --c: var(--gold);
}

.band .notice.sale {
  margin: 0 0 24px;
}

.notice > .px {
  flex: none;
  width: 24px;
  height: 24px;
}

.notice a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.notice a:hover {
  color: var(--yellow);
}

.head {
  display: inline-block;
  flex: none;
  width: 40px;
  height: 40px;
  background: #000 url('/img/icons/people.png') center / 50% no-repeat;
  image-rendering: pixelated;
}

img.head {
  object-fit: cover;
}

.copy {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-shadow: inherit;
  text-decoration: underline dotted var(--dim);
  text-underline-offset: 3px;
  cursor: pointer;
}

.copy:hover {
  color: var(--yellow);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--dim);
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
}

.crumbs a,
a.crumbs {
  color: var(--grey);
}

.crumbs a:hover,
a.crumbs:hover {
  color: var(--yellow);
}

.empty {
  padding: 56px 24px;
  background: rgba(0, 0, 0, .42);
  color: var(--mute);
  text-align: center;
}

.empty > .px {
  width: 64px;
  height: 64px;
}

.empty h3 {
  margin: 18px 0 8px;
  color: var(--text);
}

.empty .btn {
  margin-top: 18px;
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--top);
  background: rgba(0, 0, 0, .62);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .8), 0 2px 0 var(--rule);
}

.top .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  flex: none;
}

.brand img {
  display: block;
  width: auto;
  height: 34px;
}

.brand:hover img {
  animation: hop .3s steps(3, end);
}

@keyframes hop {
  50% {
    transform: translateY(-4px);
  }
}

.nav {
  display: flex;
  gap: 4px;
  height: 100%;
}

.nav a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #e0e0e0;
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
}

.nav a:hover {
  color: #ffffa0;
}

.nav a.on {
  color: var(--yellow);
}

.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.server-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: #e0e0e0;
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
  cursor: pointer;
}

.server-chip .addr {
  color: var(--grey);
}

.server-chip:hover,
.server-chip:hover .addr {
  color: #ffffa0;
}

.me {
  position: relative;
}

.me-btn {
  padding: 0 14px 2px 4px;
}

.me-btn:active {
  padding: 2px 14px 0 4px;
}

.me-btn .head {
  width: 28px;
  height: 28px;
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  min-width: 232px;
  padding: 6px;
}

.me.open .menu {
  display: block;
}

.menu a,
.menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px 10px;
  border: 0;
  background: none;
  color: #e0e0e0;
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
}

.menu a:hover,
.menu button:hover {
  background: rgba(255, 255, 255, .1);
  color: #ffffa0;
}

.menu .px {
  width: 16px;
  height: 16px;
}

.menu hr {
  margin: 6px 0;
  border: 0;
  border-top: 2px solid var(--panel-lo);
  border-bottom: 2px solid var(--panel-hi);
}

.burger {
  display: none;
  width: 40px;
  padding: 0;
}

.burger:active {
  padding: 2px 0 0;
}

.burger span {
  width: 16px;
  height: 2px;
  background: #fff;
  box-shadow: 0 5px 0 #fff, 0 -5px 0 #fff;
}

/* ── Home: the title screen ────────────────────────────────────────────────── */

.title {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: clamp(640px, 100svh, 1000px);
  margin-top: calc(-1 * var(--top));
  padding-top: var(--top);
  overflow: hidden;
  background: #6aaffe url('/img/hub-clean.jpg') 50% 50% / cover no-repeat;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .8);
}

.title-logo {
  position: relative;
  flex: 0 1 46%;
  width: 100%;
  min-height: 0;
}

.title-logo canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.title-logo.live canvas {
  opacity: 1;
}

.logo-still {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(86%, 720px);
  height: auto;
  transform: translate(-50%, -50%);
  animation: float 2.8s ease-in-out infinite alternate;
}

.title-logo.live .logo-still {
  display: none;
}

@keyframes float {
  to {
    transform: translate(-50%, calc(-50% - 8px));
  }
}

/* the yellow line next to the game's logo, tilted and breathing the same way */
.splash {
  position: absolute;
  left: calc(50% + min(34vw, 318px));
  top: 76%;
  margin: 0;
  color: #ffff00;
  font-size: var(--f15);
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-20deg);
  opacity: 0;
}

.title-logo.built .splash {
  opacity: 1;
  animation: splash .5s ease-in-out infinite alternate;
}

@keyframes splash {
  to {
    transform: translate(-50%, -50%) rotate(-20deg) scale(.93);
  }
}

.title-menu {
  display: grid;
  gap: 8px;
  width: min(440px, 100% - 32px);
  margin-top: auto;
  margin-bottom: clamp(56px, 9vh, 96px);
}

.title-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ip-label {
  color: #fff;
  font-size: var(--f1);
}

.ip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.ip code {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 14px 2px;
  border: 2px solid #a0a0a0;
  background: #000;
  color: #fff;
  font: 400 var(--f2) / 1 var(--pix);
  text-shadow: var(--shadow);
  cursor: pointer;
}

.ip code:hover {
  border-color: #fff;
}

/* the cursor of the game's text fields */
.ip code::after {
  content: '_';
  margin-left: 4px;
  animation: blink 1s steps(2, jump-none) infinite;
}

.title-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: 36px;
  padding: 0 14px 2px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: var(--f1);
}

.title-foot span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ── Home: who is on, game modes ───────────────────────────────────────────── */

.now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: -12px 0 28px;
}

.now .pix {
  margin-right: 10px;
  color: var(--green);
  font-size: var(--f1);
}

.now .head {
  width: 32px;
  height: 32px;
}

.now .more {
  margin-left: 8px;
  color: var(--grey);
  font-size: var(--f1);
}

/* one row of the server list: icon, name, two grey lines, signal on the right */
.servers {
  display: grid;
  gap: 8px;
}

.server {
  --a: #fff;
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 16px 16px 14px;
  border: 2px solid #000;
  background: rgba(0, 0, 0, .5);
}

.server .slot {
  width: 72px;
  height: 72px;
}

.server .slot img {
  width: 48px;
  height: 48px;
}

.server h3 {
  padding-right: 132px;
  color: var(--a);
  font-size: var(--f2);
}

.server p {
  max-width: 680px;
  margin-top: 6px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}

.server-live {
  position: absolute;
  right: 16px;
  top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--grey);
  font-size: var(--f1);
}

.server-live.on {
  color: var(--green);
}

/* a mode that is not out yet: grey like its keeper on the hub, yellow "WKRÓTCE!" like the hub logo under it */
.server.soon h3 {
  color: var(--grey);
}

.server.soon p {
  color: var(--grey);
}

.server.soon .slot img {
  filter: grayscale(1);
  opacity: .55;
}

.server-live.soon {
  color: var(--yellow);
}

.server.big {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
}

.server.big .tags {
  margin-top: 10px;
  color: var(--grey);
  font-size: var(--f1);
  line-height: 22px;
}

.server.big .tags i {
  padding: 0 2px;
  color: var(--dim);
  font-style: normal;
}

.server-art {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 26px 8px 0 24px;
}

.server-art img {
  width: 96px;
  height: 96px;
}

.server-art img:first-child {
  width: 64px;
  height: 64px;
}

/* ── Product tiles ─────────────────────────────────────────────────────────── */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
  gap: 12px;
}

.tile {
  --a: #fff;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.tile:hover,
.tile:focus-visible {
  border-color: #fff;
  outline: none;
}

.art {
  position: relative;
  height: 148px;
  overflow: hidden;
}

.tile:hover .art {
  background: #222228;
}

.art .badge-img {
  height: 63px;
}

.art .item-img {
  width: 96px;
  height: 96px;
}

.art .icon-img {
  width: 96px;
  height: 96px;
}

.art-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.art-stack .lead-img {
  height: 36px;
}

.art-stack div {
  display: flex;
  gap: 12px;
}

.art-stack div img {
  width: 48px;
  height: 48px;
}

.ribbon {
  position: absolute;
  top: 8px;
  left: 10px;
  color: var(--yellow);
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
}

.tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 6px 6px;
}

.tile-body h3 {
  color: var(--a);
  font-size: var(--f15);
}

.tile-body p {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
}

.variants-mini {
  margin-top: 10px;
  color: var(--grey);
  font: 400 var(--f1) / 20px var(--pix);
  text-shadow: var(--shadow);
}

.variants-mini i {
  padding: 0 1px;
  color: var(--dim);
  font-style: normal;
}

.tile-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price small {
  color: var(--mute);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.price b {
  color: var(--gold);
  font: 400 var(--f2) / 28px var(--pix);
  text-shadow: var(--shadow);
}

.zl {
  font-size: var(--f1);
}

/* ── Shop ──────────────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px 0 16px;
}

.tab {
  min-height: 44px;
}

.tab.on {
  --b: #000;
  --hi: transparent;
  --lo: transparent;
  border-color: #fff;
  color: var(--yellow);
}

.tab .count {
  color: var(--grey);
}

.tab.on .count {
  color: #fff;
}

.cat-info {
  max-width: 720px;
  margin-bottom: 24px;
  color: var(--text-2);
}

.shop-notice {
  margin-top: 24px;
}

.shop-notice:empty {
  display: none;
}

.pay-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 32px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid rgba(0, 0, 0, .7);
  box-shadow: inset 0 2px 0 var(--rule);
  color: var(--text-2);
  font-size: 14px;
}

.pay-strip .item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pay-strip .px {
  flex: none;
  width: 24px;
  height: 24px;
}

.pay-strip b {
  color: var(--text);
  font-weight: 650;
}

/* ── Product page ──────────────────────────────────────────────────────────── */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 24px;
}

.product-art {
  padding: 10px;
}

.product-art .art {
  height: auto;
  aspect-ratio: 1.3;
}

.product-art .art .badge-img {
  height: 108px;
}

.product-art .art .item-img {
  width: 192px;
  height: 192px;
}

.product-art .art .icon-img {
  width: 160px;
  height: 160px;
}

.product-art .art-stack {
  gap: 26px;
}

.product-art .art-stack .lead-img {
  height: 72px;
}

.product-art .art-stack div {
  gap: 20px;
}

.product-art .art-stack div img {
  width: 96px;
  height: 96px;
}

/* what a rank gives, as the tooltip of an item: name in its colour, then the lines */
.tooltip {
  --a: #fff;
  margin-top: 16px;
  padding: 14px 16px 16px;
  border: 2px solid #2a0a5e;
  background: rgba(16, 0, 16, .92);
  box-shadow: 0 0 0 2px rgba(16, 0, 16, .92);
  font: 400 var(--f1) / 24px var(--pix);
  text-shadow: var(--shadow);
}

.tooltip b {
  display: block;
  margin-bottom: 4px;
  color: var(--a);
  font-weight: 400;
}

.tooltip ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--grey);
}

.tooltip li {
  padding-left: 18px;
  text-indent: -18px;
}

.tooltip li::before {
  content: '+ ';
  color: var(--green);
}

.product-side h1 {
  --a: #fff;
  margin-top: 4px;
  color: var(--a);
}

.variants {
  display: grid;
  gap: 6px;
  margin-top: 24px;
}

.variant {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border: 2px solid #000;
  background: rgba(0, 0, 0, .5);
  cursor: pointer;
}

.variant.solo {
  grid-template-columns: minmax(0, 1fr) auto;
  cursor: default;
}

.variant:hover {
  border-color: #808080;
}

.variant.on {
  border-color: #fff;
  background: #000;
}

.variant input:checked {
  background: #000 linear-gradient(#fff, #fff) center / 8px 8px no-repeat;
  border-color: #fff;
}

.v-name {
  font-weight: 650;
}

.v-sub {
  display: block;
  margin-top: 2px;
  color: var(--mute);
  font-size: 13px;
}

.v-price {
  color: var(--gold);
  font: 400 var(--f15) / 1 var(--pix);
  text-shadow: var(--shadow);
  text-align: right;
}

.v-price s {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font: 500 12px/1 var(--sans);
  text-shadow: none;
}

.tag {
  margin-left: 8px;
  color: var(--yellow);
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
  white-space: nowrap;
}

.tag-custom {
  color: var(--grey);
}

.custom-keys-panel {
  display: none;
  margin-top: 6px;
  padding: 16px;
  border: 2px solid #fff;
  background: #000;
}

.custom-keys-panel.open {
  display: block;
}

.custom-keys-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}

.custom-keys-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-keys-title img {
  width: 16px;
  height: 16px;
}

.custom-keys-rate {
  color: var(--mute);
  font-size: 13px;
}

.custom-keys-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-step {
  width: 40px;
  padding: 0 0 2px;
  font-size: var(--f15);
}

.btn-step:active {
  padding: 2px 0 0;
}

.custom-keys-controls .custom-field {
  width: 88px;
  height: 40px;
  padding: 0 6px;
  color: var(--yellow);
  font: 400 var(--f15) / 1 var(--pix);
  text-shadow: var(--shadow);
  text-align: center;
  -moz-appearance: textfield;
}

.custom-field::-webkit-outer-spin-button,
.custom-field::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.chips-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.custom-keys-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid #2a2a2a;
  font-size: 14px;
}

.custom-keys-summary strong {
  font: 400 var(--f15) / 1 var(--pix);
  text-shadow: var(--shadow);
  vertical-align: -3px;
}

.gets {
  margin-top: 28px;
}

.gets h4,
.card h4 {
  margin-bottom: 12px;
}

.grant-list {
  display: grid;
  gap: 4px;
}

.grant {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px 6px 6px;
  background: rgba(0, 0, 0, .5);
  font-size: 14px;
  font-weight: 600;
}

.grant .icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--slot);
  box-shadow: inset 2px 2px 0 var(--slot-lo), inset -2px -2px 0 var(--slot-hi);
}

.grant .px {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.grant .px.badge {
  width: auto;
  height: 18px;
}

.grant .where {
  margin-left: auto;
  color: var(--mute);
  font-size: 13px;
  font-weight: 400;
  text-align: right;
}

.buy-box {
  margin-top: 20px;
  padding: 20px;
}

.buy-box .who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--panel-lo);
  box-shadow: 0 2px 0 var(--panel-hi);
  color: var(--text-2);
  font-size: 14px;
}

.buy-box .who b {
  color: var(--text);
}

.buy-box .who .head {
  width: 32px;
  height: 32px;
}

.buy-box .who a {
  margin-left: auto;
  color: var(--mute);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.buy-box .who a:hover {
  color: var(--yellow);
}

.buy-box .btn-lg {
  margin-top: 18px;
}

.buy-box .btn-ghost {
  margin-top: 8px;
}

.buy-box .fine {
  margin-top: 12px;
  color: var(--mute);
  font-size: 12px;
  text-align: center;
}

.form-error {
  margin-top: 14px;
}

.block {
  margin-top: 64px;
}

.block .head-row p {
  max-width: 380px;
}

.odds {
  --a: var(--gold);
  display: grid;
  gap: 2px;
}

.odd {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px;
  gap: 16px;
  align-items: center;
  padding: 9px 14px;
  background: rgba(0, 0, 0, .5);
  font-size: 14px;
}

.odd .bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--a) 22%, transparent);
}

.odd span {
  position: relative;
}

.odd b {
  position: relative;
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
  text-align: right;
}

.odd.rare span,
.odd.rare b {
  color: var(--gold);
}

/* ── Chat ──────────────────────────────────────────────────────────────────── */

.chat {
  font: 400 var(--f1) / 24px var(--pix);
  text-shadow: var(--shadow);
}

.chat p {
  padding: 0 8px;
  background: rgba(0, 0, 0, .55);
}

.chat .say {
  margin-top: 8px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, .75);
}

.chat .say::after {
  content: '_';
  animation: blink 1s steps(2, jump-none) infinite;
}

.c6 { color: var(--gold); }
.c7 { color: var(--grey); }
.c8 { color: #555; }
.ce { color: var(--yellow); }
.ca { color: var(--green); }

.chat .pin {
  color: var(--yellow);
  letter-spacing: .1em;
}

/* purchases, announced the way the server announces them */
.feed {
  margin: 0;
  padding: 0;
  list-style: none;
  font: 400 var(--f1) / 20px var(--pix);
  text-shadow: var(--shadow);
}

.feed li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0, 0, 0, .5);
}

.feed li + li {
  margin-top: 2px;
}

.feed .head {
  width: 24px;
  height: 24px;
}

.feed .what {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed time {
  color: var(--dim);
}

/* ── How to buy ────────────────────────────────────────────────────────────── */

.how {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 56px;
  align-items: start;
}

.steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 52px;
  counter-increment: step;
}

.steps li + li {
  margin-top: 22px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 36px;
  color: var(--yellow);
  font: 400 var(--f3) / 44px var(--pix);
  text-shadow: var(--shadow);
  text-align: center;
}

.steps b {
  display: block;
  font-size: 16px;
  font-weight: 650;
}

.steps p {
  margin-top: 4px;
  color: var(--text-2);
}

.how h3 {
  margin-bottom: 16px;
}

.how .steps + .chat {
  margin: 20px 0 0 52px;
}

.how .btn {
  margin-top: 28px;
}

/* ── Login ─────────────────────────────────────────────────────────────────── */

.login {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 72px;
  align-items: start;
  padding-top: 64px;
  padding-bottom: 96px;
}

.login-card {
  padding: 28px;
}

.login-card h1 {
  font-size: var(--f3);
}

.login-card .lead {
  margin-top: 10px;
  font-size: 15px;
}

.login-form {
  margin-top: 26px;
}

.login-form > * + * {
  margin-top: 18px;
}

.with-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
}

.with-head .head {
  width: 52px;
  height: 52px;
}

.with-head .field {
  height: 52px;
  font: 400 var(--f15) / 1 var(--pix);
  text-shadow: var(--shadow);
}

.with-head .field::placeholder {
  text-shadow: none;
}

.pin-field {
  position: relative;
}

.pin-field .field {
  height: 60px;
  border-color: transparent;
  background: none;
  color: transparent;
  caret-color: transparent;
}

.pin-cells {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  pointer-events: none;
}

.pin-cells span {
  position: relative;
  display: grid;
  place-items: center;
  border: 2px solid #a0a0a0;
  background: #000;
  color: #fff;
  font: 400 var(--f2) / 1 var(--pix);
  text-shadow: var(--shadow);
}

.pin-field .field:focus + .pin-cells span {
  border-color: #d0d0d0;
}

.pin-field .field.bad + .pin-cells span {
  border-color: var(--red);
}

.pin-cells span.cur {
  border-color: #fff;
}

.pin-cells span.cur::after {
  content: '_';
  animation: blink 1s steps(2, jump-none) infinite;
}

.hint {
  margin-top: 12px;
  color: var(--mute);
  font-size: 13px;
}

.howto h2 {
  font-size: var(--f2);
}

.howto .steps {
  margin-top: 24px;
}

.howto .chat {
  margin-top: 10px;
}

/* ── Account and orders ────────────────────────────────────────────────────── */

.profile {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding: 48px 0 40px;
  border-bottom: 2px solid rgba(0, 0, 0, .7);
  box-shadow: 0 2px 0 var(--rule);
}

/* the black box the inventory shows your character in */
.body-render {
  display: grid;
  place-items: end center;
  width: 152px;
  height: 196px;
  background: #000 url('/img/icons/people.png') center / 48px no-repeat;
  box-shadow: inset 2px 2px 0 var(--slot-lo), inset -2px -2px 0 var(--slot-hi);
  image-rendering: pixelated;
  overflow: hidden;
}

.body-render img {
  width: auto;
  height: 180px;
  margin-bottom: 6px;
}

.profile h1 {
  word-break: break-all;
}

.rank-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--text-2);
  font-size: 14px;
}

.rank-line img {
  height: 27px;
}

.actions-col {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orders {
  display: grid;
  gap: 4px;
}

.order-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr) 110px auto;
  gap: 18px;
  align-items: center;
  padding: 8px 14px 8px 8px;
  border: 2px solid #000;
  background: rgba(0, 0, 0, .5);
}

.order-row:hover {
  border-color: #fff;
}

/* every row is its own grid: equal buttons keep the columns in line from row to row */
.order-row .btn {
  min-width: 104px;
}

.thumb {
  width: 56px;
  height: 56px;
}

.thumb img {
  width: auto;
  height: 18px;
}

.thumb img.item {
  width: 40px;
  height: 40px;
}

.order-row .name {
  font-weight: 650;
}

.order-row .sub {
  margin-top: 2px;
  color: var(--mute);
  font-size: 13px;
}

.order-row .amount {
  color: var(--gold);
  font: 400 var(--f15) / 1 var(--pix);
  text-shadow: var(--shadow);
  text-align: right;
}

.support {
  margin-top: 28px;
}

.status-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: start;
  padding: 56px 0 96px;
}

.status-hero h1 {
  margin-top: 10px;
  font-size: var(--f3);
}

.order-id {
  color: var(--grey);
  font-size: var(--f1);
}

.status-hero .notice {
  margin-top: 22px;
}

.pay-again {
  margin-top: 22px;
}

.timeline {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 26px;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 28px;
  bottom: 4px;
  width: 4px;
  background: #000;
}

.timeline li:last-child::before {
  display: none;
}

.timeline li.done::before {
  background: #1d4d13;
}

.timeline .mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #555;
  background: #000;
}

.timeline li.done .mark {
  border-color: #000;
  background: var(--go);
  box-shadow: inset 2px 2px 0 var(--go-hi), inset -2px -2px 0 var(--go-lo);
}

.timeline li.now .mark {
  border-color: var(--yellow);
}

.timeline li.now .mark::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--yellow);
  animation: blink 1s steps(2, jump-none) infinite;
}

.timeline li.fail .mark {
  border-color: var(--red);
}

.timeline li.fail .mark::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--red);
}

.timeline b {
  display: block;
  font-size: 16px;
  font-weight: 650;
}

.timeline p {
  margin-top: 4px;
  color: var(--mute);
  font-size: 14px;
}

.order-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary {
  padding: 10px;
}

.summary .art {
  height: 148px;
}

.summary-body {
  padding: 16px 8px 8px;
}

dl.rows {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  margin: 18px 0 0;
  font-size: 14px;
}

dl.rows dt {
  color: var(--mute);
}

dl.rows dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

/* ── Legal ─────────────────────────────────────────────────────────────────── */

.prose {
  max-width: 808px;
  padding-top: 24px;
  padding-bottom: 96px;
  color: var(--text-2);
}

.prose h2 {
  margin: 44px 0 12px;
  color: var(--text);
  font-size: var(--f15);
}

.prose p,
.prose li {
  font-size: 15px;
  line-height: 1.75;
}

.prose ol,
.prose ul {
  padding-left: 22px;
}

.prose li + li {
  margin-top: 6px;
}

.prose a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose .meta {
  color: var(--mute);
  font-size: 13px;
}

/* ── Support panel ─────────────────────────────────────────────────────────── */

.panel-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 44px;
}

.panel-top h1 {
  margin-top: 8px;
  font-size: var(--f3);
}

.panel-top .who {
  display: flex;
  align-items: center;
  gap: 20px;
}

.panel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 14px;
}

.subnav {
  display: flex;
  gap: 4px;
  margin: 24px 0 28px;
  border-bottom: 2px solid rgba(0, 0, 0, .7);
  box-shadow: 0 2px 0 var(--rule);
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav a {
  padding: 12px 14px 14px;
  color: var(--grey);
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
  white-space: nowrap;
}

.subnav a:hover {
  color: #ffffa0;
}

.subnav a.on {
  color: var(--yellow);
  box-shadow: inset 0 -4px 0 var(--yellow);
}

.subnav .badge-count {
  margin-left: 8px;
  color: var(--red);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.kpis + .kpis {
  margin-top: 8px;
}

.player-kpis {
  margin-top: 28px;
}

.kpi {
  display: block;
  padding: 16px 18px 18px;
}

a.kpi:hover {
  border-color: #fff;
}

.kpi dt {
  color: var(--grey);
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
}

.kpi dd {
  margin: 10px 0 0;
  font: 400 var(--f2) / 1 var(--pix);
  text-shadow: var(--shadow);
}

.kpi dd.small-value {
  font-size: var(--f15);
}

.kpi dd img {
  display: block;
  height: 36px;
}

.kpi .sub {
  margin-top: 8px;
  color: var(--mute);
  font-size: 13px;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.card {
  padding: 18px 20px 20px;
}

.card + .card {
  margin-top: 8px;
}

.card .mono {
  word-break: break-all;
}

.card .who {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card .who b {
  font-size: 17px;
}

.card .grant-list {
  margin-top: 16px;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 180px;
  padding-top: 8px;
}

.chart .col {
  position: relative;
  display: flex;
  flex: 1;
  align-items: flex-end;
  height: 100%;
}

.chart .col i {
  display: block;
  width: 100%;
  min-height: 2px;
  background: var(--gold);
}

.chart .col.zero i {
  background: var(--panel-lo);
}

.chart .col:hover i {
  background: var(--yellow);
}

.chart .tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 2;
  display: none;
  padding: 6px 8px;
  border: 2px solid #2a0a5e;
  background: rgba(16, 0, 16, .94);
  font-size: 12px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.chart .col:hover .tip {
  display: block;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--mute);
  font-size: 12px;
}

.list-rows {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.list-rows .r {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.list-rows .r span:first-child {
  color: var(--text-2);
}

.setup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 2px solid var(--panel-lo);
  font-size: 14px;
}

.setup-row:last-of-type {
  border-bottom: 0;
}

.card .note-line {
  margin-top: 14px;
}

.heads-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
}

.heads-row .head {
  width: 28px;
  height: 28px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar .field {
  max-width: 400px;
  height: 40px;
  font-size: 14px;
}

.chip {
  min-height: 34px;
  padding: 0 12px 2px;
}

.chip:active {
  padding: 2px 12px 0;
}

.chip.on,
.chip.active {
  --b: #000;
  --hi: transparent;
  --lo: transparent;
  border-color: #fff;
  color: var(--yellow);
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, .5);
  font-size: 14px;
}

.table th {
  padding: 12px 14px 10px;
  border-bottom: 2px solid #000;
  color: var(--grey);
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 10px 14px;
  border-bottom: 2px solid rgba(0, 0, 0, .5);
  vertical-align: middle;
}

.table tr.link {
  cursor: pointer;
}

.table tr.link:hover td {
  background: rgba(255, 255, 255, .07);
}

.table .who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.table .who .head {
  width: 28px;
  height: 28px;
}

.table .rank {
  display: block;
  height: 18px;
}

.table .num {
  text-align: right;
  white-space: nowrap;
}

.table .flag {
  color: var(--red);
  font-weight: 650;
}

.table-count {
  margin: 12px 0;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 8px;
  margin-top: 28px;
}

.detail .notice {
  margin-bottom: 8px;
}

.events {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.events li {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
  border-bottom: 2px solid var(--panel-lo);
}

.events li:last-child {
  border-bottom: 0;
}

.events time {
  color: var(--mute);
  font-family: var(--mono);
  font-size: 12px;
}

.events .t {
  color: var(--text);
  font-weight: 600;
}

.events .x {
  color: var(--text-2);
  word-break: break-word;
}

.notes textarea {
  display: block;
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  border: 2px solid #a0a0a0;
  border-radius: 0;
  background: #000;
  font-size: 14px;
  resize: vertical;
}

.notes textarea:focus {
  outline: none;
  border-color: #fff;
}

.notes .btn {
  margin-top: 8px;
}

.note {
  margin-bottom: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, .4);
  font-size: 14px;
}

.note small {
  display: block;
  margin-bottom: 4px;
  color: var(--mute);
  font-size: 12px;
}

.actions {
  display: grid;
  gap: 8px;
}

.panel-section {
  padding-top: 40px;
}

.panel-section h2 {
  margin-bottom: 16px;
  font-size: var(--f2);
}

/* ── Footer ────────────────────────────────────────────────────────────────── */

.foot {
  padding: 48px 0 24px;
  background: rgba(0, 0, 0, .62);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .8), inset 0 4px 0 var(--rule);
  color: var(--mute);
  font-size: 14px;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.foot-grid > div > img {
  display: block;
  width: auto;
  height: 40px;
}

.foot-grid p {
  max-width: 360px;
  margin-top: 14px;
}

.foot h5 {
  margin: 0 0 14px;
  color: var(--text);
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
}

.foot ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot a:hover {
  color: var(--yellow);
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid rgba(0, 0, 0, .7);
  box-shadow: inset 0 2px 0 var(--rule);
  color: var(--dim);
  font-size: 12px;
}

/* ── Toasts, loading, errors ───────────────────────────────────────────────── */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  display: grid;
  gap: 8px;
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 16px 12px;
  font: 400 var(--f1) / 1 var(--pix);
  text-shadow: var(--shadow);
  animation: rise .16s steps(4, end);
}

.toast.ok::before,
.toast.bad::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--green);
}

.toast.bad::before {
  background: var(--red);
}

@keyframes rise {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
}

.loading {
  display: grid;
  place-items: center;
  min-height: 50vh;
}

.loader {
  display: flex;
  gap: 6px;
}

.loader i {
  width: 10px;
  height: 10px;
  background: #fff;
  animation: load .9s steps(3, end) infinite;
}

.loader i:nth-child(2) {
  animation-delay: .15s;
}

.loader i:nth-child(3) {
  animation-delay: .3s;
}

@keyframes load {
  50% {
    transform: translateY(-8px);
    opacity: .4;
  }
}

/* the game's "connection lost" screen: grey title, white reason, one button */
.err-page {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 18vh 0;
  text-align: center;
}

.err-page h1 {
  color: var(--grey);
  font-size: var(--f2);
}

.err-page p {
  max-width: 480px;
  font-size: var(--f1);
  line-height: 24px;
}

.err-page .btn {
  min-width: 300px;
  margin-top: 14px;
}

/* ── Smaller screens ───────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .product,
  .status-hero,
  .detail,
  .panel-grid,
  .how {
    grid-template-columns: minmax(0, 1fr);
  }

  .login {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .login-card,
  .summary {
    max-width: 520px;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .server-art {
    display: none;
  }

  .server.big {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .nav,
  .hide-m {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .top .wrap {
    gap: 12px;
  }

  .top.open .nav {
    position: absolute;
    top: var(--top);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 8px var(--gutter) 14px;
    background: rgba(0, 0, 0, .92);
    box-shadow: 0 2px 0 var(--rule);
  }

  .top.open .nav a {
    padding: 14px 4px;
  }

  .me-btn {
    padding: 0 4px 2px;
  }

  .band-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .profile {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 20px;
  }

  .body-render {
    width: 112px;
    height: 148px;
  }

  .body-render img {
    height: 134px;
  }

  .profile .actions-col {
    grid-column: 1 / -1;
  }

  .pay-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  h1 {
    font-size: var(--f3);
  }

  h2 {
    font-size: var(--f2);
  }

  .band {
    padding: 56px 0;
  }

  .page-head {
    padding-top: 36px;
  }

  .hide-s {
    display: none;
  }

  .brand img {
    height: 28px;
  }

  .title {
    height: clamp(600px, 100svh, 820px);
  }

  .title-logo {
    flex-basis: 38%;
  }

  .splash {
    left: 76%;
    top: 78%;
    font-size: var(--f1);
  }

  .ip code {
    font-size: var(--f15);
  }

  .server {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .server.big {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .server .slot {
    width: 56px;
    height: 56px;
  }

  .server .slot img {
    width: 40px;
    height: 40px;
  }

  .server h3 {
    padding-right: 0;
    font-size: var(--f15);
  }

  .server-live {
    position: static;
    grid-column: 2;
  }

  .feed li {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .feed time {
    grid-column: 2;
  }

  .feed .what {
    white-space: normal;
  }

  .login {
    padding-top: 32px;
  }

  .login-card {
    padding: 20px 16px;
  }

  .pin-cells {
    gap: 4px;
  }

  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .subnav a {
    padding: 12px 10px 14px;
  }

  .events li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .product-art .art-stack .lead-img {
    height: 54px;
  }

  .product-art .art-stack div img {
    width: 64px;
    height: 64px;
  }

  .variant {
    padding: 12px;
    gap: 12px;
  }

  .grant .where {
    display: none;
  }

  .err-page .btn {
    min-width: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* REFIK: its badge (a crown + the name) is twice as wide as the others: whole-pixel sizes that fit, never squeezed */
.art .badge-img[src$="/refik.png"] {
  height: 54px;
  object-fit: contain;
}

.product-art .art .badge-img[src$="/refik.png"] {
  height: 81px;
}

.grant .icon:has(> .px.badge[src$="/refik.png"]) {
  width: auto;
  padding: 0 8px;
}
