/*
 * Shrinebound Display: Lilita One with the Polish letters it lacks (tools/art/src/displayFont.py).
 * Nunito comes in two files (latin, latin-ext): each needs its own @font-face with its range —
 * listed together in one src, the browser used only the first and drew a–z in a fallback font.
 */
@font-face {
  font-family: 'Shrinebound Display';
  src: url('/assets/shrinebound-display.woff') format('woff');
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 600;
  src: url('/assets/nunito-latin-600-normal.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 600;
  src: url('/assets/nunito-latin-ext-600-normal.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 800;
  src: url('/assets/nunito-latin-800-normal.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 800;
  src: url('/assets/nunito-latin-ext-800-normal.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  font-display: swap;
}

:root {
  --bg: #0d1130;
  --panel: rgba(30, 36, 86, 0.82);
  --line: rgba(255, 255, 255, 0.14);
  --ink: #fffaf0;
  --muted: #b8c0e8;
  --gold: #ffcf4d;
  --gold-deep: #c76a00;
  --mint: #6ff5c8;
  --display: 'Shrinebound Display', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 600;
  line-height: 1.6;
  background:
    linear-gradient(180deg, rgba(9, 11, 34, 0.35), rgba(9, 11, 34, 0.92) 520px),
    url('/assets/bg_lobby.webp') top center / 1200px auto no-repeat,
    var(--bg);
}

a {
  color: var(--gold);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.wrap {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px;
}

header.site .brand img {
  height: 44px;
  width: auto;
  display: block;
}

.lang {
  display: flex;
  gap: 6px;
}

.lang button {
  min-width: 44px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font: inherit;
  font-family: var(--display);
  cursor: pointer;
}

.lang button[aria-pressed='true'] {
  color: #4a2300;
  background: linear-gradient(180deg, #ffe991, #ffb52e);
  border-color: transparent;
}

.panel {
  padding: 24px clamp(16px, 4vw, 32px);
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 16px 40px rgba(3, 5, 22, 0.5);
  backdrop-filter: blur(12px);
}

.doc h1 {
  font-size: clamp(30px, 5vw, 42px);
  margin: 8px 0 4px;
}

.doc h2 {
  font-size: 22px;
  margin: 28px 0 6px;
  color: var(--gold);
}

.doc p,
.doc li {
  max-width: 72ch;
  color: #e9ecfb;
}

.doc .meta {
  color: var(--muted);
  font-size: 14px;
}

.fill {
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255, 90, 110, 0.25);
  border: 1px dashed rgba(255, 150, 160, 0.7);
  color: #ffd6dc;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.note {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 207, 77, 0.12);
  border: 1px solid rgba(255, 207, 77, 0.35);
  color: #fff3c4;
  font-size: 14px;
}

footer.site {
  padding-block: 32px 48px;
  color: var(--muted);
  font-size: 14px;
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 10px;
}

footer.site a {
  color: var(--ink);
  text-decoration: none;
}

footer.site a:hover {
  color: var(--gold);
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- landing */

.home main {
  overflow-x: clip;
}

/* The big logo is in the hero; the header keeps only the language switch. */
.home header.site .brand {
  visibility: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
  padding-block: 12px 48px;
}

.hero__logo {
  width: min(100%, 440px);
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

.hero__tagline {
  font-size: clamp(30px, 4.6vw, 46px);
  margin: 10px 0 14px;
  color: var(--gold);
  text-shadow:
    0 3px 0 rgba(90, 40, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.45);
}

.hero__lead {
  color: #e9ecfb;
  max-width: 50ch;
  margin: 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 14px 26px;
  border-radius: 18px;
  color: #4a2300;
  font-family: var(--display);
  font-size: 22px;
  text-decoration: none;
  background: linear-gradient(180deg, #ffe991 0%, #ffc93d 46%, #ff9d1a 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.65),
    0 6px 0 var(--gold-deep),
    0 12px 22px rgba(0, 0, 0, 0.4);
}

.cta small {
  font-family: var(--body);
  font-weight: 800;
  font-size: 13px;
  opacity: 0.8;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.stats li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.stats b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

/* The trailer in a phone body. */
.phone {
  position: relative;
  justify-self: center;
  width: min(100%, 320px);
  margin: 0;
  padding: 10px;
  border-radius: 40px;
  background: linear-gradient(160deg, #3b3f78, #15183d 60%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.18),
    0 30px 60px rgba(0, 0, 0, 0.6),
    0 0 90px rgba(111, 245, 200, 0.18);
  transform: rotate(2deg);
}

.phone video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 31px;
  background: #000;
}

.sound {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(10, 12, 40, 0.7);
  color: var(--ink);
  font: inherit;
  font-family: var(--display);
  font-size: 15px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.sound svg {
  width: 20px;
  height: 20px;
}

.sound .sound__on,
.sound[aria-pressed='true'] .sound__off {
  display: none;
}

.sound[aria-pressed='true'] .sound__on {
  display: inline;
}

.sound:focus-visible,
.lang button:focus-visible,
.arenas:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Two rows of cards drifting in opposite directions. */
.parade {
  display: grid;
  gap: 14px;
  padding-block: 8px 24px;
  transform: rotate(-2deg);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.parade__row {
  overflow: hidden;
}

.parade__track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: parade 60s linear infinite;
}

.parade__row--back .parade__track {
  animation-direction: reverse;
  animation-duration: 70s;
}

.parade img {
  width: 132px;
  height: 176px;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid rgba(255, 207, 77, 0.75);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

@keyframes parade {
  to {
    transform: translateX(calc(-50% - 7px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .parade__track {
    animation: none;
  }

  .parade__row {
    overflow-x: auto;
  }
}

.block {
  padding-block: 28px;
}

.block__title {
  font-size: clamp(26px, 3.6vw, 36px);
  margin: 0 0 18px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px 20px;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
  color: rgba(255, 207, 77, 0.35);
}

.step img,
.mode__icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.step h3,
.mode h3 {
  margin: 0;
  font-size: 22px;
}

.step p,
.mode p {
  margin: 0;
  color: var(--muted);
}

.moon {
  margin: 14px 0 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(190, 30, 60, 0.35), rgba(190, 30, 60, 0.08));
  border: 1px solid rgba(255, 110, 130, 0.35);
  color: #ffe1e6;
}

.moon b {
  font-family: var(--display);
  font-weight: 400;
  color: #ff8fa3;
}

/* Arena banners: a strip that scrolls sideways, starting at the content edge. */
.arenas {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: max(16px, calc((100% - 920px) / 2));
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.arenas figure {
  flex: 0 0 auto;
  width: min(78vw, 340px);
  margin: 0;
  scroll-snap-align: start;
  scroll-margin-inline: 16px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.arenas img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.arenas figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 26px 14px 10px;
  font-family: var(--display);
  font-size: 19px;
  background: linear-gradient(180deg, transparent, rgba(8, 10, 30, 0.85));
}

.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mode {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  min-width: 0;
}

.mode--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.mode--wide > :first-child {
  flex: 0 0 46%;
  min-width: 0;
}

.bosses {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.bosses img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin-right: -14px;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
}

.mode__art {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center 35%;
  border-radius: 14px;
  margin-bottom: 4px;
}

.finale {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px 28px;
  flex-wrap: wrap;
  padding-block: 40px 24px;
  text-align: left;
}

.finale__chest {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5));
}

.finale__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.2;
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    gap: 32px;
  }

  .hero__logo {
    width: min(100%, 340px);
  }

  .hero__lead {
    margin-inline: auto;
  }

  .stats {
    justify-content: center;
  }

  .phone {
    width: min(82%, 300px);
  }

  .steps,
  .modes {
    grid-template-columns: minmax(0, 1fr);
  }

  .mode--wide {
    flex-direction: column;
    align-items: stretch;
  }

  .parade img {
    width: 102px;
    height: 136px;
  }

  .finale {
    text-align: center;
  }
}

/* ---------------------------------------------------------------- odds */

.picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.picker button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  color: var(--ink);
  font: inherit;
  font-family: var(--display);
  cursor: pointer;
}

.picker button img {
  width: 34px;
  height: 34px;
}

.picker button[aria-pressed='true'] {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 207, 77, 0.35);
}

select {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: var(--ink);
  font: inherit;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.facts div {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.facts dt {
  color: var(--muted);
  font-size: 13px;
}

.facts dd {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.r-common {
  color: #c3cdea;
}
.r-rare {
  color: #ffb54d;
}
.r-epic {
  color: #d58cff;
}
.r-legendary {
  color: #5ff2d6;
}
