:root {
  --ink: #101935;
  --ink-2: #1b2750;
  --page: #eef2f9;
  --surface: #ffffff;
  --line: #d8dfed;
  --text: #18203a;
  --muted: #5a6480;
  --red: #ec3a47;
  --red-deep: #c42634;
  --blue: #2c69ee;
  --blue-deep: #1b4ec2;
  --gold: #b97a00;
  --gold-bg: #fff1c9;
  --ok: #15994a;
  --radius: 14px;
  --display: "Russo One", "Arial Black", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 17px/1.6 var(--body);
}
a { color: var(--blue-deep); }
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: #e6ebf6;
  padding: 0.08em 0.4em;
  border-radius: 6px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px;
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font: 18px/1 var(--display); letter-spacing: 0.02em;
}
.brand img { border-radius: 7px; }
.topbar { flex-wrap: wrap; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 6px 12px; border-radius: 999px;
  color: #c9d3f2; font-size: 15px; font-weight: 600; text-decoration: none;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.14); }

.arena-slim { padding-bottom: 46px; }
.arena-slim h1 { margin-bottom: 10px; }
.lede { margin: 0 auto; max-width: 560px; color: #dfe5f7; font-size: 18px; }

/* arena hero */
.arena {
  background:
    radial-gradient(circle at 50% 118%, transparent 0 118px, rgba(255, 255, 255, 0.07) 119px 121px, transparent 122px),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.07) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, rgba(236, 58, 71, 0.22), transparent 38%, transparent 62%, rgba(44, 105, 238, 0.24)),
    var(--ink);
  color: #fff;
  padding: 34px 16px 40px;
}
.arena-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.kicker {
  margin: 0 0 6px;
  color: #aebbe6; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
}
h1 {
  margin: 0 0 22px;
  font: clamp(34px, 7vw, 54px)/1.05 var(--display);
  letter-spacing: 0.01em;
}
.scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: 560px; margin: 0 auto;
}
.side {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 12px 14px;
  border-radius: var(--radius);
}
.side-red { background: linear-gradient(160deg, var(--red), var(--red-deep)); margin-right: -14px; padding-right: 26px; }
.side-blue { background: linear-gradient(200deg, var(--blue), var(--blue-deep)); margin-left: -14px; padding-left: 26px; }
.side-num { font: clamp(40px, 9vw, 60px)/1 var(--display); }
.side-label { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.92; }
.vs {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 50%;
  background: #fff; color: var(--ink);
  font: 20px/1 var(--display);
  box-shadow: 0 0 0 5px var(--ink);
}
.checked { margin: 18px 0 0; color: #c9d3f2; font-size: 15px; }
.checked strong { color: #fff; font-family: var(--mono); }

main { max-width: 820px; margin: 0 auto; padding: 0 16px 40px; }

/* code cards */
.codes { margin-top: -18px; position: relative; }
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px;
}
.card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 16px 16px 14px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(16, 25, 53, 0.07);
}
.card.is-new { border-color: var(--red); }
.tag-new {
  position: absolute; top: -11px; right: 12px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--red); color: #fff;
  font: 12px/1.3 var(--display); letter-spacing: 0.08em; text-transform: uppercase;
}
.card-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.card-code { font: 30px/1.1 var(--display); letter-spacing: 0.04em; color: var(--ink); }
.card-reward {
  padding: 2px 10px; border-radius: 999px;
  background: var(--gold-bg); color: var(--gold);
  font-size: 14px; font-weight: 800;
}
.card-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.pip { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.card-status.is-fresh { color: #a35c00; font-weight: 600; }
.card-status.is-fresh .pip { background: #f0a500; }
.copy {
  align-self: stretch; margin-top: 6px;
  padding: 10px 12px; border: 0; border-radius: 10px;
  background: var(--ink); color: #fff;
  font: 15px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer;
}
.copy:hover { background: var(--blue-deep); }
.copy:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.copy.done { background: var(--ok); }
.report {
  align-self: center; margin-top: 2px; padding: 2px 4px;
  border: 0; background: none; color: var(--muted);
  font: 13px/1.3 var(--body); text-decoration: underline; cursor: pointer;
}
.report:hover { color: var(--red-deep); }
.report:disabled { text-decoration: none; cursor: default; color: var(--ok); }

.method { margin-top: 14px; color: var(--muted); font-size: 15px; }
.method summary { cursor: pointer; font-weight: 700; color: var(--text); }
.method p { margin: 8px 0 0; }

/* panels */
.panel {
  margin-top: 22px; padding: 22px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-quiet { background: #f7f9fd; }
h2 { margin: 0 0 12px; font: 24px/1.2 var(--display); color: var(--ink); }
h3 { margin: 18px 0 4px; font-size: 18px; }
.panel p { margin: 0 0 12px; }

.steps { list-style: none; margin: 0 0 12px; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.steps li::before {
  content: counter(step);
  flex: 0 0 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red); color: #fff; font: 16px/1 var(--display);
}
.steps li:nth-child(even)::before { background: var(--blue); }
.steps li span { padding-top: 3px; }
.note { color: var(--muted); font-size: 15px; }

.facts { margin: 0 0 8px; padding-left: 20px; }
.facts li { margin: 6px 0; }
.facts li::marker { color: var(--red); }

.answer {
  padding: 12px 14px;
  border-left: 4px solid var(--red);
  background: #fff3f4;
  border-radius: 0 10px 10px 0;
  font-size: 18px;
}
figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.45; }
figcaption a { color: inherit; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 14px; }
.shot { margin: 4px 0 16px; max-width: 680px; }
.shot-small { max-width: 480px; margin-top: 10px; }

.table-wrap { overflow-x: auto; margin: 0 0 16px; }
.gacha { width: 100%; border-collapse: collapse; font-size: 15px; white-space: nowrap; }
.gacha th, .gacha td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.gacha thead th { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.gacha tbody th { font-weight: 700; }

.arena-slim + main > .panel:first-child { margin-top: -22px; position: relative; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chip {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #f7f9fd; color: var(--text); font: 600 14px/1.2 var(--body); cursor: pointer;
}
.chip span { color: var(--muted); font-weight: 500; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-on span { color: #c9d3f2; }
.balls { width: 100%; border-collapse: collapse; font-size: 15px; }
.balls th, .balls td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.balls thead th { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.balls tbody th { white-space: nowrap; font-weight: 700; }
.balls q { font-style: italic; }
.muted { color: var(--muted); }
.rarity { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.r-rare { background: #e3ecff; color: #1b4ec2; }
.r-epic { background: #f1e3ff; color: #7a2cc4; }
.r-legendary { background: #fff0d6; color: #a35c00; }
.r-mythic { background: #ffe0e3; color: #b3202d; }
.chip.r-rare, .chip.r-epic, .chip.r-legendary, .chip.r-mythic { border-color: transparent; }
.mark { color: var(--ok); font-weight: 800; }
.legend { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.legend li { margin: 4px 0; }
.tips { margin: 0; padding-left: 22px; }
.tips li { margin: 6px 0; }

.expired-list { margin: 0; padding-left: 20px; }
.faq h3:first-child { margin-top: 0; }
.faq p { margin: 0 0 6px; }

.sources { margin-top: 26px; color: var(--muted); font-size: 14px; }
.sources h2 { font-size: 16px; margin-bottom: 6px; }
.sources a { color: inherit; }

.footer { padding: 22px 16px 30px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.footer p { margin: 0; }

.lost { max-width: 560px; margin: 60px auto; padding: 0 16px; text-align: center; }
.lost .copy { display: inline-block; text-decoration: none; padding: 12px 20px; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .topbar { padding: 10px 16px; }
  .topbar { justify-content: center; row-gap: 6px; }
  .site-nav a { padding: 5px 10px; font-size: 14px; }
  .lede { font-size: 16px; }
  .balls { font-size: 14px; }
  .balls th, .balls td { padding: 8px 6px; }
  .balls thead th:nth-child(4), .balls td:nth-child(4) { display: none; }
  .balls tbody th { white-space: normal; min-width: 80px; }
  .arena { padding: 26px 16px 34px; }
  .side-label { font-size: 11px; }
  .vs { width: 46px; height: 46px; font-size: 16px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 14px 12px 12px; }
  .card-code { font-size: 24px; }
  .panel { padding: 18px 16px 14px; }
  .shots { grid-template-columns: 1fr; }
  .answer { font-size: 17px; }
  h2 { font-size: 21px; }
}
