/* 8bitic — navy arcade style */
:root {
  --bg: #0b0f2a; --panel: #141a3d; --line: #2a3160; --line2: #1c2350;
  --ink: #f4e9c8; --muted: #8a90b8; --yellow: #ffd23f; --red: #d7182a;
  --win: #57cc99; --loss: #e63946; --party: #f4e9c8;
  --px: 'Press Start 2P', 'Courier New', monospace;
  --body: 'VT323', 'Courier New', monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 4px);
  font-family: var(--body); font-size: 22px; line-height: 1.25;
}
a { color: var(--yellow); }
a:hover { color: #fff; }
img.sprite { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.px { font-family: var(--px); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 24px 56px; display: flex; flex-direction: column; gap: 32px; }
.pf { border: 4px solid var(--ink); box-shadow: 6px 6px 0 #000; background: var(--panel); }
.w { color: var(--win); } .l { color: var(--loss); } .n { color: var(--muted); }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.h2 { font-family: var(--px); font-size: 14px; color: var(--yellow); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 18px; }

/* top bar */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo { font-family: var(--px); font-size: 20px; color: var(--yellow); text-decoration: none; text-shadow: 4px 4px 0 var(--red); }
.logo.big { font-size: 40px; text-shadow: 6px 6px 0 var(--red), 12px 12px 0 #000; }
.tagline { font-family: var(--px); font-size: 13px; margin-top: 14px; }
.nav { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { font-family: var(--px); font-size: 11px; padding: 14px 16px; text-decoration: none; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.btn.hot { background: var(--red); color: #fff; border-color: #fff; }
.btn:hover { color: var(--yellow); }
.btn.hot:hover { color: var(--yellow); }

/* filters */
.filters { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-family: var(--px); font-size: 9px; padding: 10px 12px; border: 3px solid var(--ink); background: var(--bg); color: var(--ink); cursor: pointer; min-height: 36px; }
.chip.on, .chip:hover { background: var(--yellow); color: var(--bg); border-color: var(--yellow); }
.search { font-family: var(--body); font-size: 24px; padding: 8px 14px; width: 280px; max-width: 100%; background: var(--panel); color: var(--ink); border: 4px solid var(--ink); outline: none; }
.search::placeholder { color: var(--muted); }
.search:focus { border-color: var(--yellow); }

/* roster grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 28px; }
.card { border-color: var(--party); padding: 20px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); transition: transform .08s steps(2); }
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 #000; }
.card .sprite { width: 128px; height: 192px; }
.card .name { font-family: var(--px); font-size: 11px; text-align: center; line-height: 1.6; }
.card .party { font-family: var(--px); font-size: 8px; color: var(--partytext, var(--muted)); text-align: center; }
.card .rec { display: flex; gap: 14px; font-size: 22px; }
.card[hidden] { display: none; }
.empty { text-align: center; color: var(--muted); padding: 40px; font-family: var(--px); font-size: 11px; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-family: var(--px); font-size: 9px; color: var(--muted); line-height: 1.8; }

/* profile */
.hero { display: flex; gap: 32px; align-items: stretch; flex-wrap: wrap; }
.portrait { border-color: var(--party); padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.portrait .sprite { width: 192px; height: 288px; }
.who { display: flex; flex-direction: column; gap: 14px; flex: 1 1 320px; justify-content: center; }
.who h1 { font-family: var(--px); font-size: 24px; line-height: 1.5; margin: 0; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-family: var(--px); font-size: 8px; padding: 6px 8px; border: 2px solid var(--muted); color: var(--ink); text-decoration: none; line-height: 1.4; }
a.tag:hover { border-color: var(--yellow); color: var(--yellow); }
.tag.on { background: var(--yellow); color: var(--bg); border-color: var(--yellow); }
.kind { font-family: var(--px); font-size: 8px; padding: 6px 8px; background: var(--yellow); color: var(--bg); }
.panel { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 12px 48px; }
.stat { display: grid; grid-template-columns: 150px 216px 1fr; gap: 14px; align-items: center; }
.stat .lbl { font-family: var(--px); font-size: 9px; color: var(--muted); }
.stat .val { font-family: var(--px); font-size: 12px; text-align: right; white-space: nowrap; }
.track { width: 216px; height: 18px; overflow: hidden; background: repeating-linear-gradient(90deg, var(--line) 0 14px, transparent 14px 18px); }
.fill { height: 18px; width: 0; background: repeating-linear-gradient(90deg, var(--yellow) 0 14px, transparent 14px 18px); transition: width .6s steps(12); }
.fill.w { background: repeating-linear-gradient(90deg, var(--win) 0 14px, transparent 14px 18px); }
.fill.l { background: repeating-linear-gradient(90deg, var(--loss) 0 14px, transparent 14px 18px); }
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .stat { grid-template-columns: 1fr 70px; }
  .stat .lbl { grid-column: 1 / -1; }
  .track { width: 100%; max-width: 216px; }
}

table.rec { border-collapse: collapse; width: 100%; font-size: 21px; }
table.rec th { font-family: var(--px); font-size: 9px; color: var(--muted); text-align: left; padding: 10px 10px; border-bottom: 3px solid var(--line); }
table.rec td { padding: 7px 10px; border-bottom: 2px solid var(--line2); vertical-align: top; }
.tablewrap { overflow-x: auto; }
.verify { font-family: var(--px); font-size: 7px; color: var(--muted); border: 1px solid var(--muted); padding: 2px 4px; margin-left: 6px; vertical-align: middle; }

.stmt { display: flex; gap: 18px; border-left: 6px solid var(--yellow); padding: 4px 0 4px 18px; }
.stmt .when { font-family: var(--px); font-size: 10px; width: 100px; flex-shrink: 0; color: var(--muted); line-height: 1.8; }
.stmt .body { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.stmt .text { font-size: 26px; }
.stmt .quote { font-size: 22px; color: var(--muted); font-style: italic; border-left: 3px solid var(--line); padding-left: 10px; }
.stmt .meta { font-size: 19px; color: var(--muted); }
.stmt .then { display: flex; gap: 12px; background: var(--bg); padding: 10px 14px; border: 2px dashed var(--line); font-size: 21px; }
.stmt .then .px { font-size: 8px; color: var(--muted); width: 100px; flex-shrink: 0; line-height: 1.8; }
.stmt .by { font-size: 20px; }
@media (max-width: 520px) { .stmt { flex-direction: column; gap: 8px; } .stmt .when { width: auto; } }

/* vs */
.vs-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.vs-slot { padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; border-color: var(--party); }
.vs-slot .sprite { width: 160px; height: 240px; }
.vs-slot.right .sprite { transform: scaleX(-1); }
.vs-slot .name { font-family: var(--px); font-size: 12px; text-align: center; line-height: 1.6; }
.vs-slot select { font-family: var(--body); font-size: 20px; background: var(--bg); color: var(--ink); border: 3px solid var(--ink); padding: 6px 10px; max-width: 100%; }
.vs-mark { font-family: var(--px); font-size: 64px; color: var(--yellow); text-shadow: 8px 8px 0 var(--red), 16px 16px 0 #000; letter-spacing: 4px; text-align: center; }
.vs-note { font-family: var(--px); font-size: 9px; color: var(--muted); text-align: center; line-height: 1.8; margin-top: 16px; }
.vs-rows { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.vs-row { display: grid; grid-template-columns: 80px 216px 150px 216px 80px; gap: 12px; align-items: center; width: 100%; max-width: 780px; margin: 0 auto; }
.vs-row .lbl { font-family: var(--px); font-size: 9px; color: var(--muted); text-align: center; }
.vs-row .val { font-family: var(--px); font-size: 12px; }
.vs-row .val.left { text-align: right; }
.vs-row .val.top { color: var(--yellow); }
.trackL { display: flex; justify-content: flex-end; }
.fillL { background: repeating-linear-gradient(270deg, var(--a, #00a2e0) 0 14px, transparent 14px 18px); }
.fillR { background: repeating-linear-gradient(90deg, var(--b, #6f8fe0) 0 14px, transparent 14px 18px); }
.vs-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.mini { display: flex; flex-direction: column; gap: 6px; font-size: 20px; }
.mini div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--line2); padding-bottom: 4px; }
.sources { word-break: break-all; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .vs-slot { padding: 10px; gap: 8px; }
  .vs-slot .sprite { width: 96px; height: 144px; }
  .vs-slot .name { font-size: 9px; }
  .vs-slot select { font-size: 16px; width: 100%; }
  .vs-mark { font-size: 40px; text-shadow: 5px 5px 0 var(--red), 10px 10px 0 #000; }
  .vs-note { font-size: 7px; }
  .vs-row { grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr) 60px; grid-template-areas: "lbl lbl lbl lbl" "va ta tb vb"; gap: 6px 8px; }
  .vs-row .lbl { grid-area: lbl; font-size: 8px; }
  .vs-row .val.left { grid-area: va; }
  .vs-row .val:not(.left) { grid-area: vb; }
  .vs-row .trackL { grid-area: ta; }
  .vs-row .trackR { grid-area: tb; }
  .vs-row .track { width: auto; }
  .vs-row .val { font-size: 9px; }
  .vs-top { gap: 12px; }
}
@media (max-width: 860px) {
  .vs-top { grid-template-columns: 1fr 1fr; }
  .vs-mid { grid-column: 1 / -1; order: -1; }
  .vs-two { grid-template-columns: 1fr; }
}
@media (min-width: 601px) and (max-width: 860px) {
  .vs-row { grid-template-columns: 60px minmax(0, 1fr) 90px minmax(0, 1fr) 60px; }
  .vs-row .lbl { font-size: 7px; }
  .vs-row .track { width: auto; }
}
