:root {
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --dark-bg: #070710;
  --text-main: #f4eee0;
  --text-muted: #b7ab95;
  --panel: rgba(9, 10, 18, 0.72);
  --line: rgba(201, 168, 76, 0.2);
  --gold-dark: #8a7233;
  --gold-glow: rgba(201, 168, 76, 0.25);
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--dark-bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--dark-bg);
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(46, 207, 176, 0.08), transparent),
    radial-gradient(ellipse 60% 42% at 82% 78%, rgba(201, 168, 76, 0.06), transparent),
    #080810;
  color: var(--text-main);
  font-family: "Crimson Text", Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
}

body.index-page {
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(46, 207, 176, 0.08), transparent),
    radial-gradient(ellipse 60% 42% at 82% 78%, rgba(201, 168, 76, 0.06), transparent),
    #080810;
}

body.classement-page {
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(46, 207, 176, 0.08), transparent),
    radial-gradient(ellipse 60% 42% at 82% 78%, rgba(201, 168, 76, 0.06), transparent),
    #080810;
}

body.tutoriel-page {
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(46, 207, 176, 0.08), transparent),
    radial-gradient(ellipse 60% 42% at 82% 78%, rgba(201, 168, 76, 0.06), transparent),
    #080810;
}

body.cartes-page {
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(46, 207, 176, 0.08), transparent),
    radial-gradient(ellipse 60% 42% at 82% 78%, rgba(201, 168, 76, 0.06), transparent),
    #080810;
}

body.set-detail-page,
body.sets-page {
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(46, 207, 176, 0.08), transparent),
    radial-gradient(ellipse 60% 42% at 82% 78%, rgba(201, 168, 76, 0.06), transparent),
    #080810;
}

body.set-detail-page {
  display: flex;
  flex-direction: column;
}

body.info-page {
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(46, 207, 176, 0.08), transparent),
    radial-gradient(ellipse 60% 42% at 82% 78%, rgba(201, 168, 76, 0.06), transparent),
    #080810;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    url("../ui/filigrane.png") center / min(920px, 82vw) no-repeat,
    radial-gradient(1px 1px at 10% 15%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 25% 40%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 74% 20%, rgba(255, 255, 255, 0.58), transparent),
    radial-gradient(2px 2px at 18% 50%, rgba(201, 168, 76, 0.34), transparent);
  opacity: 0.55;
}

body.index-page::before {
  background: url("../ui/background%20index.png") center / cover no-repeat fixed;
  opacity: 0.3;
}

body.tutoriel-page::before {
  background: url("../ui/tutoriel%20background.png") center / cover no-repeat fixed;
  opacity: 0.3;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50000 !important;
  width: 100%;
}

.site-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  padding: 0.9rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(7, 7, 12, 0.9);
  backdrop-filter: blur(12px);
  overflow: visible;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.85rem;
  color: #f8f1df;
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-width: 0;
  overflow: visible;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(201, 168, 76, 0.34);
  background: rgba(8, 13, 27, 0.72);
  color: #f8f1df;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.header-action:hover,
.header-action:focus-visible {
  border-color: rgba(225, 195, 91, 0.72);
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-light);
  outline: none;
  transform: translateY(-1px);
}

.header-social {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.header-social:hover,
.header-social:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.header-social svg {
  display: block;
}

.header-social-discord {
  border: 1px solid rgba(88, 101, 242, 0.4);
  background: rgba(88, 101, 242, 0.2);
}

.header-social-discord:hover,
.header-social-discord:focus-visible {
  background: rgba(88, 101, 242, 0.35);
}

.header-social-discord svg {
  width: 18px;
  height: 18px;
  fill: #cfd4ff;
}

.header-social-github {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.header-social-github:hover,
.header-social-github:focus-visible {
  background: rgba(255, 255, 255, 0.15);
}

.header-social-github svg {
  width: 17px;
  height: 17px;
  fill: #f5f5f5;
}

.header-action-login {
  min-height: 32px;
  padding: 8px 14px;
  border-color: rgba(225, 195, 91, 0.7);
  background: rgba(8, 13, 27, 0.72);
  color: #f8f1df;
  font-size: 0.72rem;
  line-height: 1;
}

.header-action-login:hover,
.header-action-login:focus-visible {
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-light);
}

.btn-daily-top {
  min-width: 142px;
  justify-content: center;
  white-space: nowrap;
}

.btn-daily-top.btn-daily-ready {
  border-color: rgba(225, 195, 91, 0.88);
  background: rgba(201, 168, 76, 0.14);
  color: var(--gold-light);
}

.btn-daily-top.btn-daily-wait {
  border-color: rgba(225, 195, 91, 0.46);
  color: rgba(248, 241, 223, 0.78);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f3efe4;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  background: rgba(201, 168, 76, 0.09);
  color: var(--gold-light);
  outline: none;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
  z-index: 50001;
}

.nav-dropdown-trigger::after {
  content: "▾";
  font-family: "Jost", sans-serif;
  font-size: 0.68rem;
  line-height: 1;
  opacity: 0.74;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50002 !important;
  min-width: 190px;
  padding: 7px;
  border: 1px solid rgba(201, 168, 76, 0.32);
  background: linear-gradient(180deg, rgba(12, 14, 24, 0.98), rgba(7, 8, 13, 0.98));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateY(0);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0.58rem 0.7rem;
  color: #f3efe4;
  font-family: "Cinzel", serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible,
.nav-dropdown-menu a.is-active {
  outline: none;
  background: rgba(201, 168, 76, 0.1);
  color: var(--gold-light);
}

.nav-play {
  background: transparent;
}

.home-main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 72px);
  padding: clamp(1.6rem, 4vw, 3.4rem) clamp(1rem, 5vw, 4.5rem) 4rem;
}

.blank-page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 72px);
}

.info-main {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 6rem) clamp(1rem, 4vw, 2rem) 4rem;
}

.info-hero {
  width: min(760px, 100%);
  margin: 0 auto clamp(18px, 2.4vw, 34px);
  text-align: center;
}

.info-hero h1 {
  margin-top: 0.45rem;
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 22px 58px rgba(0, 0, 0, 0.58);
}

.info-hero p:not(.page-kicker) {
  width: min(680px, 100%);
  margin: 1rem auto 0;
  color: var(--text-main);
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
}

.info-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.info-jump a {
  min-height: 42px;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(165, 190, 255, 0.3);
  border-radius: var(--radius);
  background: rgba(8, 15, 40, 0.6);
  color: #fff8e8;
  font-family: "Jost", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.info-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 1.6rem);
  margin-top: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 32%),
    rgba(7, 8, 15, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  scroll-margin-top: 90px;
}

.info-number {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(201, 168, 76, 0.26);
  border-radius: 50%;
  background: rgba(8, 15, 40, 0.62);
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.info-card h2 {
  margin-top: 0.35rem;
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1;
}

.info-card p {
  margin-top: 0.9rem;
  color: var(--text-main);
  font-size: 1.05rem;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.credits-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 168, 76, 0.18);
}

.credits-list p {
  margin-top: 0;
}

.credits-list strong {
  color: var(--gold-light);
}

.contact-list a {
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold-light);
  font-family: "Jost", sans-serif;
  font-weight: 700;
}

.legal-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.legal-list p {
  margin-top: 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-list strong {
  color: var(--gold-light);
}

.ranking-page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 72px);
  padding: clamp(2.8rem, 5vw, 5.5rem) clamp(1rem, 5vw, 4.5rem) 4rem;
}

.rank-page {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 4.8rem) clamp(1rem, 4vw, 2rem) 4rem;
}

.rank-heading {
  width: min(760px, 100%);
  margin: 0 auto clamp(18px, 2.4vw, 34px);
  text-align: center;
}

.rank-heading h1 {
  margin-top: 0.45rem;
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 22px 58px rgba(0, 0, 0, 0.58);
}

.rank-heading p:not(.page-kicker) {
  width: min(680px, 100%);
  margin: 1rem auto 0;
  color: var(--text-main);
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
}

.rank-board {
  display: grid;
  gap: 1rem;
}

.rank-categories {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid rgba(201, 168, 76, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(8, 8, 16, 0.72);
}

.rank-category {
  min-height: 44px;
  border: 1px solid rgba(201, 168, 76, 0.18);
  background: transparent;
  color: #f6f2e7;
  cursor: pointer;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.rank-category:hover,
.rank-category:focus-visible,
.rank-category.is-active {
  border-color: rgba(232, 201, 122, 0.58);
  background: rgba(201, 168, 76, 0.1);
  color: var(--gold-light);
  outline: none;
}

.rank-focus {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
}

.rank-winner,
.rank-summary,
.rank-list {
  border: 1px solid rgba(201, 168, 76, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 30%, rgba(0, 0, 0, 0.24)),
    rgba(8, 8, 16, 0.74);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.rank-winner {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 0.65rem;
  padding: 1.6rem;
  text-align: center;
}

.rank-crown {
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.rank-avatar,
.rank-initials {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.95), rgba(46, 207, 176, 0.52));
  color: #080810;
  font-family: "Jost", sans-serif;
  font-weight: 800;
}

.rank-avatar {
  width: 82px;
  height: 82px;
  font-size: 1.25rem;
}

.rank-winner h2,
.rank-summary h2 {
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1;
}

.rank-winner p,
.rank-summary p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.rank-summary {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: clamp(1.3rem, 3vw, 2rem);
}

.rank-list {
  display: grid;
  padding: 0.6rem;
}

.rank-list-head,
.rank-entry {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 120px 150px;
  gap: 1rem;
  align-items: center;
}

.rank-list-head {
  min-height: 44px;
  padding: 0 0.9rem;
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rank-entry {
  min-height: 66px;
  padding: 0 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #f4eee0;
  font-family: "Jost", sans-serif;
}

.rank-entry strong {
  color: var(--gold-light);
}

.rank-player {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  font-weight: 700;
}

.rank-initials {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  font-size: 0.72rem;
}

.top-entry {
  background: rgba(201, 168, 76, 0.06);
}

.tutorial-page-main {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 4.8rem) clamp(1rem, 4vw, 2rem) 4rem;
}

.tutorial-heading {
  width: min(760px, 100%);
  margin: 0 auto clamp(18px, 2.4vw, 34px);
  text-align: center;
}

.tutorial-heading h1 {
  margin-top: 0.45rem;
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 22px 58px rgba(0, 0, 0, 0.58);
}

.tutorial-heading p:not(.page-kicker) {
  width: min(700px, 100%);
  margin: 1rem auto 0;
  color: var(--text-main);
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
}

.tutorial-section {
  margin-top: 1rem;
  padding: clamp(1.25rem, 3vw, 2.1rem);
  border: 1px solid rgba(201, 168, 76, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%, rgba(0, 0, 0, 0.24)),
    rgba(8, 8, 16, 0.76);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.tutorial-section-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.tutorial-section-head > span {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(201, 168, 76, 0.34);
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 1rem;
  font-weight: 700;
}

.tutorial-section h2 {
  margin-top: 0.25rem;
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1;
}

.tutorial-lead {
  width: min(900px, 100%);
  margin: 0 0 1.15rem 72px;
  color: var(--text-main);
  font-size: 1.05rem;
}

.tutorial-lead a {
  color: var(--gold-light);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 76, 0.5);
  text-underline-offset: 0.18em;
}

.tutorial-grid-new,
.command-grid-new {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.tutorial-card-new,
.command-grid-new article,
.tutorial-cycle-new article {
  border: 1px solid rgba(201, 168, 76, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    rgba(6, 7, 14, 0.58);
}

.tutorial-card-new {
  display: grid;
  align-content: start;
  min-height: 210px;
  padding: 1.2rem;
}

.tutorial-card-new span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border: 1px solid rgba(201, 168, 76, 0.32);
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  font-weight: 700;
}

.tutorial-card-new h3,
.command-grid-new h3 {
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tutorial-card-new p,
.command-grid-new p,
.tutorial-cycle-new p {
  margin-top: 0.65rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.tutorial-cycle-new {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.tutorial-cycle-new article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  min-height: 82px;
  padding: 0.95rem;
}

.tutorial-cycle-new strong {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
}

.tutorial-cycle-new p {
  margin-top: 0;
}

.command-grid-new article {
  min-height: 128px;
  padding: 1.05rem;
}

.command-grid-new p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.command-grid-new code {
  display: inline-flex;
  padding: 0.22rem 0.48rem;
  border: 1px solid rgba(201, 168, 76, 0.2);
  background: rgba(201, 168, 76, 0.07);
  color: #f8f1df;
  font-family: "Jost", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

.ranking-hero {
  width: min(1040px, 100%);
  margin: 0 auto clamp(1.8rem, 4vw, 3rem);
  text-align: center;
}

.page-kicker,
.panel-kicker {
  display: inline-flex;
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ranking-hero h1 {
  margin: 0.45rem 0 0;
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: clamp(3.3rem, 7vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
}

.ranking-hero p:not(.page-kicker) {
  width: min(680px, 100%);
  margin: 1rem auto 0;
  color: #f4eee0;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(1rem, 2vw, 1.35rem);
  width: min(1240px, 100%);
  margin: 0 auto;
}

.leaderboard-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.ranking-main,
.ranking-aside {
  min-width: 0;
}

.ranking-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: var(--radius);
  background: rgba(7, 7, 14, 0.72);
  backdrop-filter: blur(12px);
}

.ranking-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(8, 15, 40, 0.58);
  color: #f3efe4;
  cursor: pointer;
  font-family: "Jost", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.leaderboard-active-label {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-family: "Jost", sans-serif;
  font-size: 0.92rem;
  text-align: center;
}

.ranking-tab:hover,
.ranking-tab:focus-visible,
.ranking-tab.is-active {
  transform: translateY(-1px);
  border-color: rgba(201, 168, 76, 0.55);
  background: rgba(201, 168, 76, 0.16);
  color: var(--gold-light);
  outline: none;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.podium-card,
.aside-panel,
.aside-stats,
.ranking-table {
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 32%),
    rgba(7, 8, 15, 0.76);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.podium-card {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  min-height: 218px;
  padding: 1.25rem;
  text-align: center;
}

.podium-first {
  min-height: 270px;
  border-color: rgba(232, 201, 122, 0.55);
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 168, 76, 0.22), transparent 45%),
    rgba(7, 8, 15, 0.82);
}

.podium-rank {
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.avatar-mark,
.avatar-mini {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.95), rgba(79, 137, 173, 0.86));
  color: #080810;
  font-family: "Jost", sans-serif;
  font-weight: 800;
}

.avatar-mark {
  width: 72px;
  height: 72px;
  font-size: 1.15rem;
}

.podium-card h2 {
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.1;
}

.podium-card p {
  color: var(--text-muted);
  font-family: "Jost", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
}

.ranking-table {
  overflow: hidden;
  padding: 0.45rem;
}

.ranking-row {
  display: grid;
  grid-template-columns: 76px minmax(180px, 1fr) 120px 140px;
  gap: 1rem;
  align-items: center;
  min-height: 64px;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  color: #f4eee0;
  font-family: "Jost", sans-serif;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-row:not(.ranking-head):hover {
  transform: translateY(-1px);
  border-color: rgba(201, 168, 76, 0.24);
  background: rgba(201, 168, 76, 0.06);
}

.ranking-head {
  min-height: 46px;
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ranking-row strong {
  color: var(--gold-light);
}

.player-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  font-weight: 700;
}

.avatar-mini {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  font-size: 0.72rem;
}

.ranking-aside {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.aside-panel {
  padding: 1.4rem;
}

.aside-panel h2 {
  margin-top: 0.35rem;
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: 1.45rem;
  line-height: 1.12;
}

.aside-copy {
  margin-top: 1rem;
  color: var(--text-muted);
}

.season-meter {
  overflow: hidden;
  height: 10px;
  margin-top: 1.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.season-meter span {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #75c7b7);
}

.aside-stats {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.aside-stats div {
  display: grid;
  gap: 0.18rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.aside-stats span {
  color: var(--text-muted);
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.aside-stats strong {
  color: #fff8e8;
  font-family: "Jost", sans-serif;
  font-size: 1.2rem;
}

.hero {
  display: grid;
  min-height: auto;
  place-items: center;
}

.hero-inner {
  width: 100%;
  max-width: 920px;
  min-width: 0;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(201, 168, 76, 0.26);
  background: rgba(7, 7, 12, 1);
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 980px;
  margin: 0 auto;
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: clamp(2.65rem, 7vw, 6.6rem);
  font-weight: 700;
  line-height: 0.94;
  text-shadow: 0 20px 56px rgba(0, 0, 0, 0.78);
}

.hero-rule {
  position: relative;
  width: min(520px, 76%);
  height: 1px;
  margin: 1.25rem auto 0;
  background: linear-gradient(
    to right,
    transparent,
    rgba(201, 168, 76, 0.84) 18%,
    rgba(201, 168, 76, 0.84) calc(50% - 22px),
    transparent calc(50% - 22px),
    transparent calc(50% + 22px),
    rgba(201, 168, 76, 0.84) calc(50% + 22px),
    rgba(201, 168, 76, 0.84) 82%,
    transparent
  );
}

.hero-rule::after {
  position: absolute;
  left: 50%;
  top: 50%;
  content: "✦";
  transform: translate(-50%, -50%);
  color: var(--gold-light);
  font-size: 0.86rem;
  line-height: 1;
  text-shadow: 0 0 14px rgba(201, 168, 76, 0.42), 0 2px 10px rgba(0, 0, 0, 0.9);
}

.gold {
  color: var(--gold-light);
}

.hero-copy {
  max-width: 670px;
  margin-right: auto;
  margin-left: auto;
  margin-top: 1.35rem;
  color: var(--text-main);
  font-size: clamp(1.06rem, 2vw, 1.32rem);
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
}

.hero-actions {
  display: grid;
  justify-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2.4rem;
}

.hero-actions .button-ghost {
  min-width: 160px;
}

.hero-actions .button-play {
  min-width: 460px;
  min-height: 92px;
  margin-top: 0;
  padding: 28px 110px;
  font-size: 1.55rem;
}

.hero-actions {
  grid-template-columns: 1fr;
}

.hero-actions .button-play {
  grid-column: auto;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.8rem;
  width: min(1280px, 100%);
  margin: clamp(4rem, 10vh, 7rem) auto clamp(3rem, 6vw, 5rem);
}

.stat-item {
  display: grid;
  grid-column: span 2;
  min-height: 96px;
  align-content: center;
  gap: 0.25rem;
  padding: 1rem 0.8rem;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 36%),
    rgba(8, 8, 16, 1);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.24);
  text-align: center;
}

.stat-item:nth-child(6) {
  grid-column: 2 / span 2;
}

.stat-item strong {
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: clamp(1.16rem, 1.8vw, 1.55rem);
  line-height: 1;
}

.stat-item span {
  color: var(--text-muted);
  font-family: "Cinzel", serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-section {
  width: min(1280px, 100%);
  margin: 0 auto clamp(3.5rem, 7vw, 6rem);
}

.home-section-heading {
  width: min(760px, 100%);
  margin: 0 auto clamp(1.4rem, 4vw, 2rem);
  text-align: center;
}

.home-section-heading h2 {
  color: #fff7df;
  font-family: "Cinzel", serif;
  font-size: clamp(1.45rem, 2.8vw, 2.35rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.75), 0 0 18px rgba(201, 168, 76, 0.18);
  white-space: nowrap;
}

.home-section-heading p {
  margin-top: 0.8rem;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
}

.home-rule {
  position: relative;
  width: min(520px, 76%);
  height: 1px;
  margin: 1.05rem auto 0.35rem;
  background: linear-gradient(
    to right,
    transparent,
    rgba(201, 168, 76, 0.84) 18%,
    rgba(201, 168, 76, 0.84) calc(50% - 22px),
    transparent calc(50% - 22px),
    transparent calc(50% + 22px),
    rgba(201, 168, 76, 0.84) calc(50% + 22px),
    rgba(201, 168, 76, 0.84) 82%,
    transparent
  );
}

.home-rule::after {
  position: absolute;
  left: 50%;
  top: 50%;
  content: "✦";
  transform: translate(-50%, -50%);
  color: var(--gold-light);
  font-size: 0.86rem;
  line-height: 1;
  text-shadow: 0 0 14px rgba(201, 168, 76, 0.42), 0 2px 10px rgba(0, 0, 0, 0.9);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.sets-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1rem;
}

.sets-grid > .set-card {
  grid-column: span 2;
}

.sets-grid > .set-card:nth-last-child(3):nth-child(4n + 1) {
  grid-column: 2 / span 2;
}

.feature-card,
.set-card {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 230px;
  padding: 1.35rem;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 30%, rgba(0, 0, 0, 0.32)),
    rgba(8, 8, 16, 1);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    background 0.24s ease;
}

.feature-card::before,
.set-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(to right, transparent, rgba(201, 168, 76, 0.38), transparent) top / 78% 1px no-repeat,
    radial-gradient(circle at 18% 0%, rgba(201, 168, 76, 0.12), transparent 42%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.feature-card:hover,
.set-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 201, 122, 0.48);
}

.feature-card:hover::before,
.set-card:hover::before {
  opacity: 1;
}

.feature-icon,
.set-card span {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 1rem;
  border: 1px solid rgba(201, 168, 76, 0.28);
  border-radius: 50%;
  background: rgba(8, 8, 16, 0.72);
  font-size: 1.45rem;
}

.feature-card h3,
.set-card h3 {
  position: relative;
  z-index: 1;
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.18;
  text-transform: uppercase;
}

.feature-card p,
.set-card p {
  position: relative;
  z-index: 1;
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.set-card strong {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 1rem;
  color: var(--gold-light);
  font-family: "Jost", sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.set-card-next {
  border-style: dashed;
}

.site-footer {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 2rem 1rem;
  border-top: 1px solid rgba(201, 168, 76, 0.18);
  color: var(--text-muted);
  text-align: center;
}

.site-footer p {
  margin: 0.35rem 0;
}

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

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 0.7rem;
  font-family: "Cinzel", serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.completion-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  width: min(1240px, calc(100% - 32px));
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0 4rem;
}

.completion-main > .site-footer {
  margin-top: auto;
}

.sets-main {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 5vw, 4rem) 1rem 0;
}

.sets-landing .home-section-heading h1 {
  color: #fff7df;
  font-family: "Cinzel", serif;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 22px 58px rgba(0, 0, 0, 0.58);
}

.completion-back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  flex: 0 0 auto;
  width: fit-content;
  min-height: 40px;
  margin-bottom: 1.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(201, 168, 76, 0.28);
  background: rgba(8, 8, 16, 0.7);
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.completion-hero {
  padding-bottom: clamp(1.6rem, 4vw, 2.6rem);
  border-bottom: 1px solid rgba(201, 168, 76, 0.18);
  text-align: center;
}

.completion-kicker {
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.completion-hero h1 {
  margin-top: 0.45rem;
  color: #fff7df;
  font-family: "Cinzel", serif;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 22px 58px rgba(0, 0, 0, 0.58);
}

.completion-description {
  width: min(780px, 100%);
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
}

.completion-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.completion-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.38rem 0.7rem;
  border: 1px solid rgba(201, 168, 76, 0.22);
  background: rgba(8, 8, 16, 0.72);
  color: #f8f1df;
  font-family: "Jost", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.completion-rarity-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.completion-rarity-filter {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 34px;
  padding: 0.32rem 0.58rem;
  border: 1px solid rgba(242, 214, 142, 0.9);
  background: rgba(201, 168, 76, 0.5);
  color: #fff9df;
  box-shadow: 0 0 0 1px rgba(8, 8, 16, 0.44), 0 8px 22px rgba(0, 0, 0, 0.28);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease,
    transform 0.18s ease;
}

.completion-rarity-filter:hover,
.completion-rarity-filter:focus-visible {
  border-color: rgba(255, 231, 168, 1);
  background: rgba(225, 195, 91, 0.62);
  outline: none;
  transform: translateY(-1px);
}

.completion-rarity-filter.is-muted {
  border-color: rgba(225, 195, 91, 0.34);
  background: rgba(8, 8, 16, 0.9);
  color: rgba(248, 241, 223, 0.82);
  opacity: 1;
}

.completion-rarity-filter:disabled {
  cursor: not-allowed;
  opacity: 0.36;
  transform: none;
}

.completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.75rem;
}

.completion-option-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.38rem 0.72rem;
  border: 1px solid rgba(242, 214, 142, 0.76);
  background: rgba(18, 82, 54, 0.86);
  color: #eaffef;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(8, 8, 16, 0.44), 0 8px 22px rgba(0, 0, 0, 0.28);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.completion-option-button:hover,
.completion-option-button:focus-visible {
  border-color: rgba(177, 255, 197, 0.95);
  background: rgba(22, 112, 70, 0.94);
  outline: none;
  transform: translateY(-1px);
}

.completion-option-button.is-muted {
  border-color: rgba(225, 195, 91, 0.34);
  background: rgba(8, 8, 16, 0.9);
  color: rgba(248, 241, 223, 0.82);
}

.completion-content {
  display: grid;
  flex: 1 0 auto;
  align-content: start;
  gap: 1rem;
  margin-top: clamp(1.4rem, 4vw, 2rem);
}

.completion-loading,
.completion-error {
  padding: 1.1rem;
  border: 1px solid rgba(201, 168, 76, 0.2);
  background: rgba(8, 8, 16, 0.74);
  color: var(--text-muted);
}

.completion-rarity {
  border: 1px solid rgba(201, 168, 76, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 28%),
    rgba(6, 7, 14, 0.84);
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.34);
}

.completion-rarity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.18);
  background: rgba(0, 0, 0, 0.12);
}

.completion-rarity-head > div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.completion-rarity-code {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(201, 168, 76, 0.34);
  background: rgba(201, 168, 76, 0.12);
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.completion-rarity-head h2 {
  color: #fff8e8;
  font-family: "Cinzel", serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.completion-rarity-head strong {
  flex: 0 0 auto;
  color: var(--gold-light);
  font-family: "Jost", sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.completion-card-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  list-style: none;
}

.completion-card-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-height: 72px;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.18);
}

.completion-card-row.is-hidden-collected {
  display: none;
}

.completion-card-row.is-collected {
  background: rgba(23, 102, 65, 0.24);
}

.completion-card-thumb,
.completion-card-thumb img,
.completion-card-placeholder {
  width: 48px;
  height: 48px;
}

.completion-card-thumb {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 168, 76, 0.18);
  background: rgba(0, 0, 0, 0.3);
}

.completion-card-row.is-collected .completion-card-thumb {
  border-color: rgba(89, 235, 129, 0.95);
  background: rgba(22, 112, 70, 0.38);
  box-shadow: inset 0 0 0 1px rgba(178, 255, 198, 0.24), 0 0 18px rgba(72, 220, 112, 0.28);
}

.completion-card-row.is-collected .completion-card-thumb::after {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(203, 255, 214, 0.95);
  border-radius: 999px;
  background: #179b4f;
  color: #f2fff5;
  content: "✓";
  font-family: "Jost", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.34);
}

.completion-card-thumb img {
  object-fit: contain;
}

.completion-card-placeholder {
  display: block;
  background: rgba(201, 168, 76, 0.12);
}

.completion-card-info {
  min-width: 0;
}

.completion-card-info strong {
  display: block;
  overflow: hidden;
  color: #fff8e8;
  font-family: "Jost", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completion-card-info span {
  display: block;
  overflow: hidden;
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-family: "Jost", sans-serif;
  font-size: 0.78rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 28px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: "Jost", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  box-shadow: 0 4px 20px var(--gold-glow);
  color: #0b0b18;
}

.button-gold:hover,
.button-gold:focus-visible {
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.35);
  color: #0b0b18;
}

.button-ghost {
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(8, 8, 16, 0.58);
  color: #f6f2e7;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: rgba(232, 201, 122, 0.58);
  background:
    linear-gradient(180deg, rgba(201, 168, 76, 0.1), transparent),
    rgba(8, 8, 16, 0.72);
  color: var(--gold-light);
}

@media (max-width: 860px) {
  .site-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 100vw;
    overflow: visible;
  }

  .top-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: visible;
    overflow-y: visible;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    flex: 0 0 auto;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .header-action {
    flex: 0 0 auto;
  }

  .home-main {
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    padding: 1.8rem 1.5rem 3rem;
  }

  .hero,
  .hero-inner {
    width: calc(100vw - 3rem);
    max-width: calc(100vw - 3rem);
  }

  .stats-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-item,
  .stat-item:nth-child(6) {
    grid-column: auto;
  }

  .features-grid,
  .sets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sets-grid > .set-card,
  .sets-grid > .set-card:nth-last-child(3):nth-child(4n + 1) {
    grid-column: span 1;
  }

  .completion-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-page {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 2.2rem 1rem 3rem;
  }

  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .podium {
    grid-template-columns: 1fr;
  }

  .podium-first,
  .podium-card {
    min-height: 190px;
  }

  .podium-first {
    order: -1;
  }

  .ranking-row {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0.5rem 0.8rem;
    min-height: auto;
    padding: 0.85rem;
  }

  .ranking-row > span:nth-child(3),
  .ranking-row > span:nth-child(4) {
    grid-column: 2;
  }

  .ranking-head {
    display: none;
  }

  .ranking-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ranking-tab {
    width: 100%;
  }

  .rank-page {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 2.2rem 1rem 3rem;
  }

  .rank-categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rank-focus {
    grid-template-columns: 1fr;
  }

  .rank-list-head {
    display: none;
  }

  .rank-entry {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0.4rem 0.75rem;
    min-height: auto;
    padding: 0.9rem;
  }

  .rank-entry > span:nth-child(3),
  .rank-entry > span:nth-child(4) {
    grid-column: 2;
  }

  .tutorial-page-main {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 2.2rem 1rem 3rem;
  }

  .tutorial-grid-new,
  .command-grid-new,
  .tutorial-cycle-new {
    grid-template-columns: 1fr;
  }

  .tutorial-lead {
    margin-left: 0;
  }

  .info-card {
    grid-template-columns: 1fr;
  }

  .info-number {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 520px) {
  body {
    background-attachment: scroll;
  }

  .brand {
    letter-spacing: 0.06em;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    width: 100%;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    font-size: 1.92rem;
    line-height: 1.08;
    overflow-wrap: break-word;
  }

  .hero-copy {
    max-width: 100%;
    width: min(29ch, 100%);
    font-size: 1.05rem;
    line-height: 1.58;
    overflow-wrap: break-word;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions .button-play {
    min-width: 0;
    min-height: 78px;
    padding: 22px 52px;
    font-size: 1.28rem;
  }

  .stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .stat-item {
    min-height: 86px;
    padding: 0.85rem 0.55rem;
  }

  .features-grid,
  .sets-grid {
    grid-template-columns: 1fr;
  }

  .sets-grid > .set-card,
  .sets-grid > .set-card:nth-last-child(3):nth-child(4n + 1) {
    grid-column: span 1;
  }

  .feature-card,
  .set-card {
    min-height: 0;
  }

  .home-section-heading h2 {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    font-size: 1.08rem;
    line-height: 1;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .home-section-heading p {
    width: min(30ch, 100%);
    margin-right: auto;
    margin-left: auto;
  }

  .ranking-hero h1 {
    width: min(11ch, 100%);
    margin-right: auto;
    margin-left: auto;
    font-size: 2.45rem;
    line-height: 1;
    overflow-wrap: break-word;
  }

  .ranking-hero p:not(.page-kicker) {
    width: min(30ch, 100%);
    font-size: 1rem;
    line-height: 1.45;
  }

  .ranking-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-row {
    font-size: 0.92rem;
  }

  .rank-heading h1 {
    font-size: 2.1rem;
    line-height: 0.98;
  }

  .rank-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-category {
    font-size: 0.68rem;
  }

  .tutorial-heading h1 {
    font-size: 2.1rem;
    line-height: 0.98;
  }

  .tutorial-section {
    padding: 1rem;
  }

  .tutorial-section-head {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .tutorial-section-head > span {
    width: 48px;
    height: 48px;
  }

  .tutorial-card-new,
  .command-grid-new article {
    min-height: 0;
  }

  .tutorial-cycle-new article {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .completion-main {
    width: min(100% - 20px, 1240px);
  }

  .completion-hero h1 {
    font-size: 2.1rem;
    line-height: 0.98;
  }

  .completion-card-list {
    grid-template-columns: 1fr;
  }

  .completion-rarity-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .completion-card-info strong,
  .completion-card-info span {
    white-space: normal;
  }
}
