/**
 * Planet X Pixel Suite — shared styles for login, character creator, and any
 * page that opts in with body class `.pxs`. Scoped to avoid bleeding into
 * other pages that still use the old CSS.
 */

.pxs, .pxs *, .pxs *::before, .pxs *::after { box-sizing: border-box; margin: 0; padding: 0; }
.pxs a { color: inherit; text-decoration: none; }
.pxs button { font: inherit; cursor: pointer; border: 0; background: 0; color: inherit; }

.pxs {
  --bg: #1a1b2e;
  --bg-1: #232542;
  --bg-2: #2e3156;
  --bg-3: #3a3d70;
  --ink: #f2e9dc;
  --dim: #a8a5c0;
  --mute: #6e6b8a;
  --line: #3d3f66;
  --line-2: #5a5d85;
  --cyan: #4ec9ff;
  --pink: #ff6bb3;
  --yellow: #ffd966;
  --green: #8aff7a;
  --red: #ff6b6b;
  --violet: #b48cff;
  --orange: #ffa15e;

  background:
    radial-gradient(2px 2px at 20px 30px, rgba(255,217,102,0.25) 50%, transparent),
    radial-gradient(2px 2px at 60px 90px, rgba(255,107,179,0.2) 50%, transparent),
    radial-gradient(2px 2px at 140px 50px, rgba(78,201,255,0.2) 50%, transparent),
    radial-gradient(2px 2px at 200px 120px, rgba(138,255,122,0.15) 50%, transparent),
    var(--bg);
  background-size: 240px 160px;
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.pxs .pixel { font-family: "Press Start 2P", monospace; }
.pxs .mono { font-family: "VT323", monospace; font-size: 18px; }
.pxs-wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }

/* nav */
.pxs-nav { border-bottom: 2px solid var(--line-2); background: var(--bg-1); position: sticky; top: 0; z-index: 40; }
.pxs-nav-row { display: flex; align-items: center; gap: 20px; height: 60px; }
.pxs-brand { font-family: "Press Start 2P", monospace; font-size: 13px; color: var(--yellow); letter-spacing: 0.04em; display: flex; align-items: center; gap: 10px; }
.pxs-brand .sp { color: var(--pink); }
.pxs-brand .slash { color: var(--mute); margin: 0 6px; }
.pxs-brand .sec { color: var(--cyan); }
.pxs-nav-links { display: flex; gap: 20px; font-family: "VT323", monospace; font-size: 20px; color: var(--dim); margin-left: 16px; }
.pxs-nav-links a:hover, .pxs-nav-links a.on { color: var(--cyan); }
.pxs-spacer { flex: 1; }

/* buttons */
.pxs-btn { padding: 10px 16px; background: var(--bg-2); color: var(--ink); border: 2px solid var(--line-2); box-shadow: 3px 3px 0 #000; font-family: "Press Start 2P", monospace; font-size: 10px; letter-spacing: 0.04em; cursor: pointer; transition: transform .06s, box-shadow .06s; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.pxs-btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 #000; }
.pxs-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 #000; }
.pxs-btn.pri { background: var(--yellow); color: #1a1b2e; border-color: var(--yellow); }
.pxs-btn.pink { background: var(--pink); color: #1a1b2e; border-color: var(--pink); }
.pxs-btn.cyan { background: var(--cyan); color: #1a1b2e; border-color: var(--cyan); }
.pxs-btn.sm { padding: 6px 10px; font-size: 9px; box-shadow: 2px 2px 0 #000; }
.pxs-btn.ghost { background: transparent; box-shadow: none; }
.pxs-btn.ghost:hover { background: var(--bg-2); box-shadow: none; transform: none; }
.pxs-btn.lg { padding: 14px 22px; font-size: 12px; }

.pxs-box { background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 4px 4px 0 #000; }
.pxs-box-h { padding: 12px 14px; border-bottom: 2px solid var(--line-2); background: var(--bg-2); font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--yellow); letter-spacing: 0.06em; }

/* ============ PIXEL SPRITE (shared login + creator) ============ */
.cc-sprite {
  width: 160px; height: 186px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(14, 1fr);
  image-rendering: pixelated;
}
.cc-sprite i { display: block; }
.cc-sprite .sk { background: #e8c39c; }
.cc-sprite .sk-2 { background: #c89975; }
.cc-sprite .hr { background: #6b4f2a; }
.cc-sprite .eye { background: #1a1b2e; }
.cc-sprite .arm { background: #8a5a2a; }
.cc-sprite .bod { background: #c85a3a; }
.cc-sprite .belt { background: #3a2a1a; }
.cc-sprite .leg { background: #5a4a7a; }
.cc-sprite .boot { background: #3a2a1a; }
.cc-sprite .wp { background: var(--yellow); }
.cc-sprite .blank { background: transparent; }

/* ============ LOGIN ============ */
.login-page {
  min-height: calc(100vh - 62px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  align-items: stretch;
}
.login-art {
  position: relative;
  background: linear-gradient(135deg, #2e3156 0%, #1a1b2e 100%);
  border-right: 2px solid var(--line-2);
  overflow: hidden;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-art::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,217,102,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(78,201,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.login-art .tag { position: relative; font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--cyan); letter-spacing: 0.1em; margin-bottom: 16px; }
.login-art h1 { position: relative; font-family: "Press Start 2P", monospace; font-size: 32px; line-height: 1.4; margin-bottom: 18px; text-shadow: 4px 4px 0 var(--pink); }
.login-art p { position: relative; font-family: "VT323", monospace; font-size: 22px; color: var(--dim); max-width: 460px; line-height: 1.5; }
.login-scene { position: relative; flex: 1; display: grid; place-items: center; margin: 30px 0; }

.login-hero-base {
  width: 220px; height: 40px;
  background: repeating-linear-gradient(90deg, var(--bg-3) 0 8px, var(--bg-2) 8px 16px);
  border: 2px solid var(--line-2);
  box-shadow: 4px 4px 0 #000;
  margin: 20px auto 0;
  position: relative;
}
.login-hero-base::before {
  content: "SHARD-01";
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--yellow);
}
.login-art .stats-strip {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.login-art .stat-cell { padding: 14px; background: rgba(35,37,66,0.6); border: 2px solid var(--line); font-family: "VT323", monospace; font-size: 17px; color: var(--dim); }
.login-art .stat-cell b { display: block; font-family: "Press Start 2P", monospace; font-size: 16px; color: var(--yellow); margin-bottom: 4px; }

.login-form-wrap { padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.login-form { max-width: 440px; width: 100%; margin: 0 auto; }
.login-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--line-2); }
.login-tab { padding: 14px 18px; font-family: "Press Start 2P", monospace; font-size: 11px; color: var(--dim); border-bottom: 4px solid transparent; margin-bottom: -2px; cursor: pointer; letter-spacing: 0.04em; }
.login-tab.on { color: var(--yellow); border-bottom-color: var(--yellow); }
.login-tab:hover:not(.on) { color: var(--ink); }

.login-h2 { font-family: "Press Start 2P", monospace; font-size: 16px; color: var(--yellow); margin-bottom: 8px; text-shadow: 2px 2px 0 var(--pink); }
.login-sub { font-family: "VT323", monospace; font-size: 18px; color: var(--dim); margin-bottom: 28px; }

.fgroup { margin-bottom: 16px; position: relative; }
.fgroup label { display: block; font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--cyan); margin-bottom: 8px; letter-spacing: 0.04em; }
.fgroup input, .fgroup textarea, .fgroup select { width: 100%; background: var(--bg-2); border: 2px solid var(--line-2); color: var(--ink); padding: 12px 14px; font-family: "VT323", monospace; font-size: 20px; outline: 0; box-shadow: inset 2px 2px 0 rgba(0,0,0,0.3); }
.fgroup input:focus, .fgroup textarea:focus, .fgroup select:focus { border-color: var(--yellow); }
.fgroup .frow { display: flex; gap: 0; }
.fgroup .frow input:first-child { flex: 1; }
.fgroup .peek { padding: 0 14px; background: var(--bg-3); border: 2px solid var(--line-2); border-left: 0; font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--dim); cursor: pointer; }
.fgroup .peek:hover { color: var(--yellow); }
.fgroup .hint { font-family: "VT323", monospace; font-size: 15px; color: var(--mute); margin-top: 6px; }
.fgroup .hint.ok { color: var(--green); }
.fgroup .hint.err { color: var(--red); }

.login-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 22px; font-family: "VT323", monospace; font-size: 17px; color: var(--dim); gap: 14px; }
.login-row .chk { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.chkbox {
  width: 18px; height: 18px; background: var(--bg-2);
  border: 2px solid var(--line-2); display: grid; place-items: center;
  color: var(--yellow); font-family: "Press Start 2P", monospace; font-size: 9px;
  flex-shrink: 0;
}
.chkbox.on::after { content: "✓"; color: var(--yellow); }
.login-link { color: var(--cyan); border-bottom: 1px dotted var(--cyan); }

.login-submit { width: 100%; padding: 16px; font-family: "Press Start 2P", monospace; font-size: 13px; }

.form-error { font-family: "VT323", monospace; font-size: 16px; color: var(--red); min-height: 22px; margin-bottom: 6px; }

.oauth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0 16px;
  font-family: "Press Start 2P", monospace; font-size: 9px; color: var(--mute); letter-spacing: 0.1em;
}
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 2px; background: var(--line-2); }
.oauth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.login-footer-links { margin-top: 24px; font-family: "VT323", monospace; font-size: 17px; color: var(--mute); text-align: center; }
.login-footer-links a { color: var(--cyan); border-bottom: 1px dotted var(--cyan); }

.pw-strength { margin-top: 8px; display: flex; gap: 4px; }
.pw-bar { flex: 1; height: 6px; background: var(--bg-2); border: 1px solid var(--line); }
.pw-bar.weak { background: var(--red); border-color: var(--red); }
.pw-bar.fair { background: var(--orange); border-color: var(--orange); }
.pw-bar.good { background: var(--yellow); border-color: var(--yellow); }
.pw-bar.strong { background: var(--green); border-color: var(--green); }

/* ============ CHARACTER CREATOR ============ */
.cc-page { padding: 24px 0 60px; }
.cc-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap; gap: 16px;
}
.cc-top h1 { font-family: "Press Start 2P", monospace; font-size: 18px; color: var(--yellow); text-shadow: 3px 3px 0 var(--pink); }
.cc-steps { display: flex; gap: 8px; font-family: "Press Start 2P", monospace; font-size: 9px; flex-wrap: wrap; }
.cc-step { padding: 6px 10px; background: var(--bg-1); border: 2px solid var(--line-2); color: var(--dim); }
.cc-step.done { background: var(--green); color: #1a1b2e; border-color: var(--green); }
.cc-step.cur { background: var(--yellow); color: #1a1b2e; border-color: var(--yellow); }

.cc-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: start;
}
.cc-preview {
  background: var(--bg-1);
  border: 2px solid var(--line-2);
  box-shadow: 5px 5px 0 #000;
  padding: 24px;
  position: sticky; top: 80px;
}
.cc-stage {
  background:
    linear-gradient(to bottom, rgba(78,201,255,0.08), rgba(255,107,179,0.08)),
    repeating-linear-gradient(0deg, var(--bg-2) 0 2px, var(--bg-3) 2px 4px);
  border: 2px solid var(--line-2);
  box-shadow: inset 4px 4px 0 rgba(0,0,0,0.4);
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  image-rendering: pixelated;
}
.cc-stage::before {
  content: "";
  position: absolute; inset: 0 0 0 0;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.2) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.cc-stage .ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 64px;
  background:
    repeating-linear-gradient(90deg, #3a3d70 0 32px, #2e3156 32px 64px),
    repeating-linear-gradient(0deg, #3a3d70 0 8px, transparent 8px 16px);
  border-top: 2px solid var(--line-2);
}
.cc-stage .hero-slot {
  position: absolute; left: 50%; bottom: 60px;
  transform: translateX(-50%);
  display: grid; place-items: center;
}

.cc-shadow { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); width: 90px; height: 12px; background: radial-gradient(ellipse, rgba(0,0,0,0.6), transparent 70%); }

.cc-controls { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.cc-ident { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px; }
.cc-stat-tile { padding: 12px 10px; background: var(--bg-2); border: 2px solid var(--line); text-align: center; }
.cc-stat-tile .sn { font-family: "VT323", monospace; font-size: 15px; color: var(--mute); letter-spacing: 0.06em; text-transform: uppercase; }
.cc-stat-tile .sv { font-family: "Press Start 2P", monospace; font-size: 14px; color: var(--yellow); margin-top: 4px; }

.cc-sum {
  margin-top: 18px;
  display: grid; grid-template-columns: auto 1fr; gap: 10px;
  font-family: "VT323", monospace; font-size: 18px;
  padding: 14px; background: var(--bg-2); border: 2px dotted var(--line-2);
}
.cc-sum .k { color: var(--mute); text-transform: uppercase; font-size: 14px; font-family: "VT323", monospace; }
.cc-sum .v { color: var(--ink); }

.cc-right { display: flex; flex-direction: column; gap: 20px; }
.cc-section { background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 4px 4px 0 #000; padding: 20px; }
.cc-section h3 { font-family: "Press Start 2P", monospace; font-size: 12px; color: var(--yellow); margin-bottom: 14px; letter-spacing: 0.04em; }
.cc-section h3 small { font-family: "VT323", monospace; font-size: 15px; color: var(--mute); margin-left: 8px; letter-spacing: 0; }

.cc-class-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-class {
  padding: 14px; background: var(--bg-2);
  border: 2px solid var(--line-2); cursor: pointer;
  display: grid; grid-template-columns: 40px 1fr; gap: 12px;
  align-items: start;
}
.cc-class:hover { border-color: var(--cyan); }
.cc-class.on { border-color: var(--yellow); background: rgba(255,217,102,0.08); box-shadow: inset 2px 2px 0 rgba(255,217,102,0.1); }
.cc-class .ico { width: 40px; height: 40px; display: grid; place-items: center; font-family: "Press Start 2P", monospace; font-size: 16px; color: #1a1b2e; box-shadow: 2px 2px 0 rgba(0,0,0,0.4); }
.cc-class.c-warrior .ico { background: var(--red); }
.cc-class.c-smith .ico { background: var(--orange); }
.cc-class.c-scholar .ico { background: var(--cyan); }
.cc-class.c-scout .ico { background: var(--green); }
.cc-class .name { font-family: "Press Start 2P", monospace; font-size: 11px; color: var(--ink); margin-bottom: 6px; }
.cc-class .desc { font-family: "VT323", monospace; font-size: 16px; color: var(--dim); line-height: 1.3; }

.slider-row { display: grid; grid-template-columns: 90px 1fr 50px; gap: 10px; align-items: center; margin-bottom: 12px; font-family: "VT323", monospace; font-size: 18px; }
.slider-row .lbl { color: var(--dim); }
.slider-row .val { font-family: "Press Start 2P", monospace; font-size: 11px; color: var(--yellow); text-align: right; }
.slider-track { height: 14px; background: var(--bg-2); border: 2px solid var(--line-2); position: relative; box-shadow: inset 2px 2px 0 rgba(0,0,0,0.3); cursor: pointer; }
.slider-fill { position: absolute; inset: 0 auto 0 0; background: var(--yellow); border-right: 2px solid var(--ink); }

.palette-row { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch {
  width: 28px; height: 28px;
  border: 2px solid var(--line-2);
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.4);
}
.swatch:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 rgba(0,0,0,0.5); }
.swatch.on { border-color: var(--yellow); box-shadow: 0 0 0 2px var(--yellow), 2px 2px 0 rgba(0,0,0,0.4); }

.stat-alloc { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 12px; align-items: center; margin-bottom: 8px; font-family: "VT323", monospace; font-size: 18px; }
.stat-alloc .lbl { color: var(--dim); }
.stat-alloc .lbl b { color: var(--ink); font-family: "Press Start 2P", monospace; font-size: 11px; margin-right: 8px; }
.stat-alloc .stepper { display: flex; }
.stat-alloc .step-btn { width: 28px; height: 28px; background: var(--bg-2); border: 2px solid var(--line-2); display: grid; place-items: center; font-family: "Press Start 2P", monospace; font-size: 11px; color: var(--dim); cursor: pointer; }
.stat-alloc .step-btn:hover { color: var(--yellow); border-color: var(--yellow); }
.stat-alloc .step-val { width: 40px; padding: 0; text-align: center; font-family: "Press Start 2P", monospace; font-size: 12px; background: var(--bg-2); border: 2px solid var(--line-2); border-left: 0; border-right: 0; color: var(--yellow); }
.stat-alloc .meta { font-family: "VT323", monospace; font-size: 15px; color: var(--mute); }
.points-left { padding: 10px 12px; background: var(--bg-2); border: 2px dotted var(--line-2); font-family: "VT323", monospace; font-size: 17px; color: var(--dim); margin-top: 10px; display: flex; justify-content: space-between; }
.points-left b { color: var(--yellow); font-family: "Press Start 2P", monospace; font-size: 12px; }

.cc-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 20px; border-top: 2px dotted var(--line-2); margin-top: 8px; flex-wrap: wrap; }

/* ============ ADMIN DROPDOWN (injected when user.isAdmin) ============ */
.pxs .admin-nav-dropdown { position: relative; display: inline-block; }
.pxs .admin-nav-dropdown-btn {
  background: var(--bg-2);
  color: var(--yellow);
  border: 2px solid var(--yellow);
  box-shadow: 3px 3px 0 #000;
  padding: 8px 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform .06s, box-shadow .06s;
  white-space: nowrap;
}
.pxs .admin-nav-dropdown-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #000; }
.pxs .admin-nav-dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 6px); right: 0;
  min-width: 220px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-1);
  border: 2px solid var(--yellow);
  box-shadow: 5px 5px 0 #000;
  padding: 8px 0;
  z-index: 1000;
}
.pxs .admin-nav-dropdown:hover .admin-nav-dropdown-content,
.pxs .admin-nav-dropdown:focus-within .admin-nav-dropdown-content { display: block; }
.pxs .admin-nav-dropdown-group {
  padding: 10px 14px 6px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: var(--yellow);
  letter-spacing: 0.08em;
  border-top: 1px solid var(--line-2);
  margin-top: 4px;
}
.pxs .admin-nav-dropdown-group:first-child { border-top: 0; margin-top: 0; }
.pxs .admin-nav-dropdown-content a {
  display: block;
  padding: 6px 14px;
  color: var(--dim);
  font-family: "VT323", monospace;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.pxs .admin-nav-dropdown-content a:hover { background: var(--bg-2); color: var(--cyan); }

/* ============ NAV SEARCH (wiki/leaderboard nav-bar input) ============ */
.pxs-search-wrap { display: flex; align-items: center; }
.pxs-search-input {
  background: var(--bg-2); color: var(--ink);
  border: 2px solid var(--line-2); padding: 6px 10px;
  font-family: "VT323", monospace; font-size: 16px;
  outline: 0; min-width: 220px;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.3);
}
.pxs-search-input:focus { border-color: var(--yellow); }
.pxs-search-input::placeholder { color: var(--mute); }

/* ============ BOX ALIASES (un-prefixed, used by wiki/leaderboard markup) ============ */
.pxs .box { background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 4px 4px 0 #000; }
.pxs .box-h { padding: 12px 14px; border-bottom: 2px solid var(--line-2); background: var(--bg-2); font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--yellow); letter-spacing: 0.06em; }

/* ============ CANVAS PREVIEW INSIDE AVATAR BOXES ============ */
.pxs .pcard-av.has-preview > .pcard-av-letter,
.pxs .pcard-av.has-preview > .pcard-av-mono { display: none; }
.pxs .pcard-av canvas,
.pxs .pcard-av .lb-entity-preview-canvas,
.pxs .pcard-av .lb-entity-preview-image,
.pxs .pcard-av .lb-preview-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated;
}
.pxs .pcard-av .lb-entity-preview-image { object-fit: contain; padding: 2px; }
.pxs .pcard-av .lb-preview-fallback { display: grid; place-items: center; font-size: inherit; color: inherit; }
.pxs .podium .pav { position: relative; overflow: hidden; }
.pxs .podium .pav.has-preview > .pav-letter { display: none; }
.pxs .podium .pav canvas,
.pxs .podium .pav .lb-entity-preview-canvas,
.pxs .podium .pav .lb-entity-preview-image,
.pxs .podium .pav .lb-preview-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated;
}
.pxs .podium .pav .lb-entity-preview-image { object-fit: contain; padding: 4px; }
.pxs .rank-row .av { position: relative; overflow: hidden; }
.pxs .rank-row .av.has-preview > .av-letter { display: none; }
.pxs .rank-row .av canvas,
.pxs .rank-row .av .lb-entity-preview-canvas,
.pxs .rank-row .av .lb-entity-preview-image,
.pxs .rank-row .av .lb-preview-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated;
}

/* ============ PLAYER CARDS (leaderboard-style avatar tiles, shared) ============ */
.pxs .pcard-av {
  position: relative; display: grid; place-items: center;
  font-family: "Press Start 2P", monospace; color: #1a1b2e;
  box-shadow: 4px 4px 0 #000;
  border: 2px solid rgba(0,0,0,0.4);
  flex: 0 0 auto;
}
.pxs .pcard-av::after {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.08) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 4px);
  pointer-events: none;
}
.pxs .pcard-av .ring {
  position: absolute; inset: -6px; border: 2px solid rgba(0,0,0,0.6);
  pointer-events: none;
}
.pxs .pcard-av .dot {
  position: absolute; top: 4px; right: 4px; width: 10px; height: 10px;
  background: var(--green); border: 2px solid #1a1b2e;
  box-shadow: 0 0 8px var(--green);
  z-index: 2;
}
.pxs .pcard-av .dot.idle { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.pxs .pcard-av .dot.off { background: var(--mute); box-shadow: none; }

.pxs .pcard {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 14px;
  background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 4px 4px 0 #000;
}
.pxs .pcard .pcard-av { width: 56px; height: 56px; font-size: 18px; }
.pxs .pcard .who { font-family: "VT323", monospace; font-size: 19px; color: var(--ink); line-height: 1.15; min-width: 0; }
.pxs .pcard .who .h { display: block; }
.pxs .pcard .who .h .tag { font-family: "Press Start 2P", monospace; font-size: 8px; padding: 2px 5px; margin-left: 6px; color: var(--cyan); border: 1px solid var(--cyan); white-space: nowrap; }
.pxs .pcard .who .h .tag.dev { color: var(--yellow); border-color: var(--yellow); background: rgba(255,217,102,0.1); }
.pxs .pcard .who .meta { display: block; font-family: "Press Start 2P", monospace; font-size: 8px; letter-spacing: 0.08em; color: var(--mute); margin-top: 4px; }
.pxs .pcard .who .meta b { color: var(--dim); }
.pxs .pcard .lvl {
  text-align: right; font-family: "Press Start 2P", monospace; font-size: 14px; color: var(--yellow);
}
.pxs .pcard .lvl small { display: block; font-family: "VT323", monospace; font-size: 13px; color: var(--mute); letter-spacing: 0.06em; margin-top: 4px; }
.pxs .pcard.featured {
  border-color: var(--yellow); box-shadow: 5px 5px 0 #000, 0 0 0 1px var(--yellow) inset;
  background: linear-gradient(180deg, rgba(255,217,102,0.08), transparent);
}
.pxs .pcard.featured .lvl { color: var(--yellow); }

/* ============ LOGIN: SHARD FEED ============ */
.pxs .shard-feed {
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; gap: 12px;
}
.pxs .shard-feed-h {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: var(--bg-2); border: 2px solid var(--line-2); box-shadow: 4px 4px 0 #000;
  font-family: "Press Start 2P", monospace; font-size: 9px; color: var(--mute); letter-spacing: 0.08em;
}
.pxs .shard-feed-h .live { display: inline-flex; align-items: center; gap: 6px; color: var(--green); }
.pxs .shard-feed-h .live::before { content: ""; width: 8px; height: 8px; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pxs-pulse 1.6s infinite; }
@keyframes pxs-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.pxs .last-login {
  padding: 8px 14px; background: var(--bg-2); border: 2px solid var(--line-2); border-top: 0;
  font-family: "VT323", monospace; font-size: 15px; color: var(--dim);
  margin-top: -12px; box-shadow: 4px 4px 0 #000;
}
.pxs .last-login b { color: var(--cyan); }

/* ============ CHARACTER CREATOR: HERO CARD ============ */
.pxs .cc-herocard {
  position: relative;
  background:
    linear-gradient(180deg, rgba(78,201,255,0.06), rgba(255,107,179,0.04)),
    var(--bg-1);
  border: 2px solid var(--line-2); box-shadow: 5px 5px 0 #000;
  padding: 24px;
  overflow: hidden;
}
.pxs .cc-herocard::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(78,201,255,0.10), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,107,179,0.08), transparent 50%),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255,255,255,0.02) 12px 13px);
  pointer-events: none;
}
.pxs .cc-herocard-row {
  position: relative; display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center;
}
.pxs .cc-herocard .pcard-av {
  width: 140px; height: 140px; font-size: 56px;
  box-shadow: 6px 6px 0 #000;
}
.pxs .cc-herocard-info { min-width: 0; }
.pxs .cc-herocard-info .uname {
  font-family: "Press Start 2P", monospace; font-size: 18px; color: var(--ink);
  text-shadow: 2px 2px 0 var(--pink);
  line-height: 1.3; word-break: break-word;
}
.pxs .cc-herocard-info .uname .at { color: var(--mute); }
.pxs .cc-herocard-info .role {
  margin-top: 8px;
  font-family: "VT323", monospace; font-size: 18px; color: var(--cyan); letter-spacing: 0.06em;
}
.pxs .cc-herocard-info .role b { color: var(--ink); }
.pxs .cc-herocard-info .chips {
  margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap;
}
.pxs .cc-herocard-info .chips .c {
  font-family: "Press Start 2P", monospace; font-size: 8px; padding: 4px 7px;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--dim); letter-spacing: 0.06em;
}
.pxs .cc-herocard-info .chips .c b { color: var(--ink); }
.pxs .cc-herocard-info .chips .c.cls { border-color: var(--yellow); color: var(--yellow); }

.pxs .cc-equip {
  position: relative; margin-top: 18px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
}
.pxs .cc-equip .slot {
  aspect-ratio: 1 / 1;
  background: var(--bg-2); border: 2px solid var(--line-2);
  display: grid; place-items: center;
  font-family: "Press Start 2P", monospace; font-size: 7px; color: var(--mute);
  text-align: center; line-height: 1.3;
  position: relative;
}
.pxs .cc-equip .slot.has { background: var(--bg-3); color: var(--ink); border-color: var(--cyan); }
.pxs .cc-equip .slot.has::after {
  content: ""; position: absolute; bottom: 4px; right: 4px; width: 6px; height: 6px;
  background: var(--cyan);
}
.pxs .cc-equip .slot .gx { font-size: 16px; line-height: 1; margin-bottom: 4px; }

.pxs .cc-bars { position: relative; margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.pxs .cc-bars .bar { display: grid; grid-template-columns: 36px 1fr 60px; gap: 10px; align-items: center; font-family: "Press Start 2P", monospace; font-size: 8px; color: var(--mute); }
.pxs .cc-bars .bar .track { height: 10px; background: var(--bg-2); border: 1px solid var(--line-2); }
.pxs .cc-bars .bar .fill { height: 100%; }
.pxs .cc-bars .bar .v { text-align: right; color: var(--ink); }
.pxs .cc-bars .bar.hp .fill { background: var(--red); }
.pxs .cc-bars .bar.mp .fill { background: var(--cyan); }
.pxs .cc-bars .bar.xp .fill { background: var(--yellow); }

/* ============ WIKI ============ */
.pxs .wiki-page { padding: 24px 0 80px; display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.pxs .wiki-side { display: flex; flex-direction: column; gap: 20px; }
.pxs .wiki-main { min-width: 0; }

.pxs .wiki-hero {
  background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 5px 5px 0 #000;
  padding: 26px; margin-bottom: 20px; position: relative; overflow: hidden;
}
.pxs .wiki-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(2px 2px at 30px 20px, var(--cyan) 50%, transparent),
    radial-gradient(2px 2px at 120px 60px, var(--pink) 50%, transparent),
    radial-gradient(2px 2px at 220px 30px, var(--yellow) 50%, transparent),
    radial-gradient(2px 2px at 320px 80px, var(--green) 50%, transparent);
  background-size: 400px 120px; opacity: 0.5; pointer-events: none;
}
.pxs .wiki-hero h1 { font-family: "Press Start 2P", monospace; font-size: 22px; text-shadow: 2px 2px 0 var(--pink); margin-bottom: 10px; position: relative; }
.pxs .wiki-hero p { font-family: "VT323", monospace; font-size: 20px; color: var(--dim); position: relative; max-width: 720px; }
.pxs .wiki-search-big { display: flex; margin-top: 16px; border: 2px solid var(--line-2); background: var(--bg-2); box-shadow: 3px 3px 0 #000; position: relative; }
.pxs .wiki-search-big input { flex: 1; background: transparent; border: 0; outline: 0; padding: 14px 16px; color: var(--ink); font-family: "VT323", monospace; font-size: 22px; }
.pxs .wiki-search-big input::placeholder { color: var(--mute); }
.pxs .wiki-search-big button { padding: 0 24px; background: var(--yellow); color: #1a1b2e; font-family: "Press Start 2P", monospace; font-size: 12px; border: 0; cursor: pointer; }

.pxs .wiki-cat-list { list-style: none; padding: 0; margin: 0; }
.pxs .wiki-cat { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px dotted var(--line-2); font-family: "VT323", monospace; font-size: 19px; color: var(--dim); cursor: pointer; }
.pxs .wiki-cat:last-child { border-bottom: 0; }
.pxs .wiki-cat:hover { background: var(--bg-2); color: var(--ink); }
.pxs .wiki-cat.on { background: var(--bg-2); color: var(--ink); border-left: 4px solid var(--yellow); padding-left: 10px; }
.pxs .wiki-cat .dot { width: 10px; height: 10px; justify-self: center; box-shadow: 1px 1px 0 rgba(0,0,0,0.4); }
.pxs .wiki-cat.c-items .dot { background: var(--yellow); }
.pxs .wiki-cat.c-creatures .dot { background: var(--red); }
.pxs .wiki-cat.c-abilities .dot { background: var(--cyan); }
.pxs .wiki-cat.c-skills .dot { background: var(--green); }
.pxs .wiki-cat.c-factions .dot { background: var(--violet); }
.pxs .wiki-cat.c-tiles .dot { background: var(--orange); }
.pxs .wiki-cat.c-mechanics .dot { background: var(--pink); }
.pxs .wiki-cat.c-proposals .dot { background: var(--ink); }
.pxs .wiki-cat .n { font-family: "Press Start 2P", monospace; font-size: 9px; color: var(--mute); }

.pxs .wiki-section-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 28px;
}
.pxs .wiki-tile {
  background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 4px 4px 0 #000;
  padding: 18px; position: relative; overflow: hidden;
  cursor: pointer; transition: transform .06s, box-shadow .06s;
  text-decoration: none; color: inherit;
}
.pxs .wiki-tile:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 #000; border-color: var(--yellow); }
.pxs .wiki-tile .ico-big {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  font-family: "Press Start 2P", monospace; font-size: 18px; color: #1a1b2e;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
  margin-bottom: 12px;
}
.pxs .wiki-tile.c-items .ico-big { background: var(--yellow); }
.pxs .wiki-tile.c-creatures .ico-big { background: var(--red); }
.pxs .wiki-tile.c-abilities .ico-big { background: var(--cyan); }
.pxs .wiki-tile.c-skills .ico-big { background: var(--green); }
.pxs .wiki-tile.c-factions .ico-big { background: var(--violet); }
.pxs .wiki-tile.c-tiles .ico-big { background: var(--orange); }
.pxs .wiki-tile.c-mechanics .ico-big { background: var(--pink); }
.pxs .wiki-tile.c-proposals .ico-big { background: var(--ink); color: #1a1b2e; }
.pxs .wiki-tile .n { font-family: "Press Start 2P", monospace; font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.pxs .wiki-tile .sub { font-family: "VT323", monospace; font-size: 16px; color: var(--dim); line-height: 1.4; margin-bottom: 10px; }
.pxs .wiki-tile .count { font-family: "VT323", monospace; font-size: 15px; color: var(--cyan); }

.pxs .shead {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px dotted var(--line-2);
  flex-wrap: wrap; gap: 10px;
}
.pxs .shead h2 { font-family: "Press Start 2P", monospace; font-size: 14px; color: var(--cyan); letter-spacing: 0.04em; }
.pxs .shead a { font-family: "VT323", monospace; font-size: 17px; color: var(--yellow); border-bottom: 1px dotted var(--yellow); }

.pxs .featured-item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.pxs .item-card {
  background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 4px 4px 0 #000;
  padding: 16px; display: grid; grid-template-columns: 72px 1fr; gap: 14px; cursor: pointer;
  text-decoration: none; color: inherit;
}
.pxs .item-card:hover { border-color: var(--yellow); transform: translate(-1px,-1px); box-shadow: 5px 5px 0 #000; }
.pxs .item-card .sprite {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border: 2px solid var(--line);
  display: grid; place-items: center;
  font-family: "Press Start 2P", monospace; font-size: 24px;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}
.pxs .item-card .sprite img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.pxs .item-card .sprite.r-common { color: var(--ink); }
.pxs .item-card .sprite.r-rare { color: var(--cyan); border-color: var(--cyan); }
.pxs .item-card .sprite.r-epic { color: var(--violet); border-color: var(--violet); }
.pxs .item-card .sprite.r-legendary { color: var(--yellow); border-color: var(--yellow); box-shadow: inset 2px 2px 0 rgba(0,0,0,0.3), 0 0 0 2px rgba(255,217,102,0.3); }
.pxs .item-card .info { min-width: 0; }
.pxs .item-card .info .name { font-family: "Press Start 2P", monospace; font-size: 11px; color: var(--ink); margin-bottom: 4px; line-height: 1.3; }
.pxs .item-card:hover .info .name { color: var(--yellow); }
.pxs .item-card .info .tag-row { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.pxs .item-card .info .tg { font-family: "Press Start 2P", monospace; font-size: 8px; padding: 2px 6px; }
.pxs .item-card .info .tg.rare { background: var(--cyan); color: #1a1b2e; }
.pxs .item-card .info .tg.epic { background: var(--violet); color: #1a1b2e; }
.pxs .item-card .info .tg.legend { background: var(--yellow); color: #1a1b2e; }
.pxs .item-card .info .tg.common { background: var(--bg-3); color: var(--dim); }
.pxs .item-card .info .stats { font-family: "VT323", monospace; font-size: 15px; color: var(--dim); line-height: 1.4; }
.pxs .item-card .info .stats b { color: var(--cyan); }

.pxs .creature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.pxs .creature-card {
  background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 4px 4px 0 #000;
  padding: 14px; text-align: center; cursor: pointer;
  text-decoration: none; color: inherit; display: block;
}
.pxs .creature-card:hover { border-color: var(--red); transform: translate(-1px,-1px); box-shadow: 5px 5px 0 #000; }
.pxs .creature-card .cs {
  width: 64px; height: 64px; margin: 0 auto 10px;
  background: var(--bg-2); border: 2px solid var(--line);
  display: grid; place-items: center;
  font-family: "Press Start 2P", monospace; font-size: 22px; color: var(--red);
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.3);
  overflow: hidden;
}
.pxs .creature-card .cs img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.pxs .creature-card .n { font-family: "Press Start 2P", monospace; font-size: 10px; margin-bottom: 4px; }
.pxs .creature-card .lvl { font-family: "VT323", monospace; font-size: 15px; color: var(--mute); }
.pxs .creature-card .lvl b { color: var(--red); font-family: "Press Start 2P", monospace; font-size: 9px; }

.pxs .recent-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pxs .recent-item {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 3px 3px 0 #000;
  font-family: "VT323", monospace; font-size: 17px;
}
.pxs .recent-item .d { width: 10px; height: 10px; justify-self: center; }
.pxs .recent-item .what .k { font-family: "Press Start 2P", monospace; font-size: 9px; color: var(--yellow); margin-right: 6px; }
.pxs .recent-item .what .n { color: var(--ink); }
.pxs .recent-item .when { font-family: "VT323", monospace; font-size: 15px; color: var(--mute); }

/* ============ LEADERBOARD ============ */
.pxs .lb-page { padding: 24px 0 80px; }
.pxs .lb-hero {
  background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 5px 5px 0 #000;
  padding: 26px; margin-bottom: 20px; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
}
.pxs .lb-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(2px 2px at 30px 20px, var(--yellow) 50%, transparent),
    radial-gradient(2px 2px at 120px 60px, var(--cyan) 50%, transparent),
    radial-gradient(2px 2px at 220px 30px, var(--pink) 50%, transparent);
  background-size: 400px 120px; opacity: 0.5; pointer-events: none;
}
.pxs .lb-hero-text { position: relative; }
.pxs .lb-hero h1 { font-family: "Press Start 2P", monospace; font-size: 24px; text-shadow: 3px 3px 0 var(--pink); margin-bottom: 10px; }
.pxs .lb-hero p { font-family: "VT323", monospace; font-size: 20px; color: var(--dim); }
.pxs .lb-season {
  position: relative;
  padding: 14px 18px; background: var(--bg-2); border: 2px solid var(--yellow); box-shadow: 3px 3px 0 #000;
  font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--yellow); text-align: center;
  min-width: 180px;
}
.pxs .lb-season .rem { display: block; margin-top: 6px; color: var(--ink); font-size: 14px; }
.pxs .lb-season .lbl { display: block; margin-top: 4px; color: var(--mute); font-family: "VT323", monospace; font-size: 14px; letter-spacing: 0.1em; }

.pxs .lb-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.pxs .lb-tab { padding: 10px 14px; background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 3px 3px 0 #000; font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--dim); cursor: pointer; letter-spacing: 0.04em; }
.pxs .lb-tab:hover { color: var(--ink); }
.pxs .lb-tab.on { background: var(--yellow); color: #1a1b2e; border-color: var(--yellow); }
.pxs .lb-tab[disabled] { opacity: 0.4; cursor: not-allowed; }
.pxs .lb-tab[disabled]:hover { color: var(--dim); }

.pxs .podium {
  display: grid; grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px; margin-bottom: 24px;
  align-items: end;
}
.pxs .podium-col {
  background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 5px 5px 0 #000;
  padding: 20px 16px; text-align: center; position: relative;
  text-decoration: none; color: inherit; display: block;
}
.pxs .podium-col.one { border-color: var(--yellow); padding: 28px 18px; }
.pxs .podium-col.two { border-color: var(--dim); }
.pxs .podium-col.three { border-color: var(--orange); }
.pxs .podium-col .crown {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-family: "Press Start 2P", monospace; font-size: 20px;
}
.pxs .podium-col.one .crown { color: var(--yellow); font-size: 26px; }
.pxs .podium-col.two .crown { color: var(--dim); }
.pxs .podium-col.three .crown { color: var(--orange); }
.pxs .podium .rank-num { font-family: "Press Start 2P", monospace; font-size: 32px; margin-top: 12px; margin-bottom: 14px; }
.pxs .podium-col.one .rank-num { color: var(--yellow); font-size: 40px; text-shadow: 3px 3px 0 var(--pink); }
.pxs .podium-col.two .rank-num { color: var(--dim); }
.pxs .podium-col.three .rank-num { color: var(--orange); }
.pxs .podium .pav {
  width: 80px; height: 80px; margin: 0 auto 12px;
  display: grid; place-items: center;
  font-family: "Press Start 2P", monospace; font-size: 24px; color: #1a1b2e;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
}
.pxs .podium .pname { font-family: "Press Start 2P", monospace; font-size: 12px; margin-bottom: 8px; word-break: break-word; }
.pxs .podium .pstats { font-family: "VT323", monospace; font-size: 17px; color: var(--dim); }
.pxs .podium .pstats b { color: var(--cyan); font-family: "Press Start 2P", monospace; font-size: 13px; display: block; margin-top: 4px; }
.pxs .podium .pbadges { display: flex; gap: 4px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.pxs .pbadge { font-family: "Press Start 2P", monospace; font-size: 8px; padding: 3px 5px; background: var(--bg-3); color: var(--yellow); }

.pxs .lb-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }

.pxs .rank-table {
  background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 5px 5px 0 #000;
  overflow: hidden;
}
.pxs .rank-filters { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--bg-2); border-bottom: 2px solid var(--line-2); flex-wrap: wrap; gap: 10px; }
.pxs .rank-filters .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pxs .rank-filters .chip { padding: 5px 10px; background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 2px 2px 0 #000; font-family: "Press Start 2P", monospace; font-size: 9px; color: var(--dim); cursor: pointer; }
.pxs .rank-filters .chip.on { background: var(--yellow); color: #1a1b2e; border-color: var(--yellow); }
.pxs .rank-filters .srch { flex: 1; min-width: 180px; display: flex; border: 2px solid var(--line-2); background: var(--bg-1); }
.pxs .rank-filters .srch input { flex: 1; background: transparent; border: 0; outline: 0; padding: 6px 10px; color: var(--ink); font-family: "VT323", monospace; font-size: 16px; }

.pxs .rank-row {
  display: grid;
  grid-template-columns: 60px 40px 1fr 110px 110px 90px 70px;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px dotted var(--line-2);
  font-family: "VT323", monospace; font-size: 17px; color: var(--dim);
  text-decoration: none;
}
.pxs .rank-row:last-child { border-bottom: 0; }
.pxs .rank-row.h { background: var(--bg-2); font-family: "Press Start 2P", monospace; font-size: 9px; color: var(--mute); letter-spacing: 0.06em; border-bottom: 2px solid var(--line-2); }
.pxs .rank-row.me { background: rgba(255,217,102,0.1); border-left: 4px solid var(--yellow); padding-left: 12px; }
a.pxs .rank-row:not(.h):hover, .pxs a.rank-row:not(.h):hover, .pxs .rank-row:not(.h):hover { background: var(--bg-2); }
.pxs .rank-row .rn { font-family: "Press Start 2P", monospace; font-size: 12px; color: var(--dim); }
.pxs .rank-row .rn.g1 { color: var(--yellow); }
.pxs .rank-row .rn.g2 { color: var(--dim); }
.pxs .rank-row .rn.g3 { color: var(--orange); }
.pxs .rank-row .rn .delta { font-family: "VT323", monospace; font-size: 13px; color: var(--green); margin-left: 4px; }
.pxs .rank-row .rn .delta.down { color: var(--red); }
.pxs .rank-row .av {
  width: 36px; height: 36px; display: grid; place-items: center;
  font-family: "Press Start 2P", monospace; font-size: 12px; color: #1a1b2e;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.4);
}
.pxs .rank-row .who { font-family: "VT323", monospace; font-size: 18px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pxs .rank-row .who .tag { font-family: "Press Start 2P", monospace; font-size: 8px; color: var(--cyan); margin-left: 6px; padding: 2px 5px; border: 1px solid var(--cyan); }
.pxs .rank-row .who .tag.dev { color: var(--yellow); border-color: var(--yellow); background: rgba(255,217,102,0.1); }
.pxs .rank-row .cls { font-family: "VT323", monospace; font-size: 15px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.pxs .rank-row .score { font-family: "Press Start 2P", monospace; font-size: 12px; color: var(--yellow); text-align: right; }
.pxs .rank-row .bar-cell { position: relative; }
.pxs .rank-row .bar-bg { height: 8px; background: var(--bg-2); border: 1px solid var(--line-2); }
.pxs .rank-row .bar-fill { height: 100%; background: var(--cyan); }

.pxs .lb-side { display: flex; flex-direction: column; gap: 20px; }
.pxs .hof-box { background: var(--bg-1); border: 2px solid var(--line-2); box-shadow: 4px 4px 0 #000; }
.pxs .hof-list { list-style: none; padding: 0; margin: 0; }
.pxs .hof-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px dotted var(--line-2); font-family: "VT323", monospace; font-size: 17px; }
.pxs .hof-row:last-child { border-bottom: 0; }
.pxs .hof-row .medal { font-family: "Press Start 2P", monospace; font-size: 16px; text-align: center; color: var(--mute); }
.pxs .hof-row .medal.gold { color: var(--yellow); }
.pxs .hof-row .medal.silver { color: var(--dim); }
.pxs .hof-row .medal.bronze { color: var(--orange); }
.pxs .hof-row .name { color: var(--ink); }
.pxs .hof-row .name small { display: block; font-size: 13px; color: var(--mute); margin-top: 2px; }
.pxs .hof-row .num { color: var(--cyan); font-family: "Press Start 2P", monospace; font-size: 10px; }

.pxs .record-row { padding: 12px 14px; border-bottom: 1px dotted var(--line-2); font-family: "VT323", monospace; font-size: 17px; }
.pxs .record-row:last-child { border-bottom: 0; }
.pxs .record-row .title { font-family: "Press Start 2P", monospace; font-size: 10px; color: var(--yellow); margin-bottom: 4px; }
.pxs .record-row .val { color: var(--ink); }
.pxs .record-row .by { color: var(--mute); font-size: 15px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .pxs .login-page { grid-template-columns: 1fr; min-height: auto; }
  .pxs .login-art { padding: 40px; border-right: 0; border-bottom: 2px solid var(--line-2); }
  .pxs .cc-grid { grid-template-columns: 1fr; }
  .pxs .cc-preview { position: static; }
  .pxs .wiki-page, .pxs .lb-grid { grid-template-columns: 1fr; }
  .pxs .wiki-section-grid { grid-template-columns: repeat(2,1fr); }
  .pxs .creature-grid { grid-template-columns: repeat(2,1fr); }
  .pxs .featured-item-grid { grid-template-columns: 1fr; }
  .pxs .rank-row { grid-template-columns: 50px 40px 1fr 90px 70px; }
  .pxs .rank-row .cls, .pxs .rank-row .bar-cell { display: none; }
  .pxs .rank-row.h > div:nth-child(4),
  .pxs .rank-row.h > div:nth-child(6) { display: none; }
  .pxs .lb-hero { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pxs-nav-links { display: none; }
  .pxs .cc-class-grid { grid-template-columns: 1fr; }
  .pxs .oauth-grid { grid-template-columns: 1fr; }
  .pxs .login-art, .pxs .login-form-wrap { padding: 32px 20px; }
  .pxs .podium { grid-template-columns: 1fr; }
  .pxs .cc-herocard-row { grid-template-columns: 1fr; text-align: center; }
  .pxs .cc-herocard .pcard-av { margin: 0 auto; }
}
