:root {
  --select-bg: #06130e;
  --select-bg-soft: #0c2118;
  --select-panel: #102a1f;
  --select-panel-light: #17392b;
  --select-paper: #f7f2e6;
  --select-muted: #a7b9af;
  --select-gold: #dfbc72;
  --select-gold-soft: #f3e1b9;
  --select-line: rgba(239, 220, 176, 0.17);
  --accent: #dfbc72;
  --accent-soft: #f3e1b9;
  --accent-rgb: 223, 188, 114;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--select-bg);
}

.mode-select-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--select-paper);
  background:
    radial-gradient(circle at 7% 94%, rgba(31, 108, 76, 0.46), transparent 34rem),
    radial-gradient(circle at 94% 5%, rgba(223, 188, 114, 0.14), transparent 30rem),
    linear-gradient(135deg, #05120d, #071710 58%, #0e1d15);
  font-family: Inter, Avenir, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mode-select-page::before,
.mode-select-page::after {
  position: fixed;
  z-index: 0;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(223, 188, 114, 0.075);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.mode-select-page::before {
  top: -325px;
  right: -110px;
}

.mode-select-page::after {
  bottom: -350px;
  left: -150px;
}

.mode-select-page a {
  color: inherit;
  text-decoration: none;
}

.select-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 52px;
}

.select-header {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(18px, 3vw, 40px);
  border-bottom: 1px solid var(--select-line);
}

.select-header > .language-switcher {
  margin-left: auto;
}

.select-brand,
.select-nav,
.select-nav a {
  display: flex;
  align-items: center;
}

.select-brand {
  gap: 12px;
}

.select-brand__mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(223, 188, 114, 0.32);
  border-radius: 14px;
  color: var(--select-gold-soft);
  background: rgba(255, 255, 255, 0.055);
}

.select-brand > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.select-brand small {
  color: var(--select-gold);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.select-brand strong {
  font-size: 14px;
  font-weight: 720;
}

.select-nav {
  gap: 9px;
}

.select-nav a {
  min-height: 42px;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--select-line);
  border-radius: 999px;
  color: #dfe8e3;
  background: rgba(255, 255, 255, 0.045);
  font-size: 13px;
  font-weight: 750;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.select-nav a:first-child {
  width: 42px;
  padding: 0;
}

.select-nav a:hover {
  transform: translateY(-2px);
  border-color: rgba(223, 188, 114, 0.48);
  background: rgba(255, 255, 255, 0.09);
}

.select-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: end;
  gap: clamp(38px, 7vw, 100px);
  padding: clamp(52px, 7vw, 92px) 0 clamp(34px, 5vw, 58px);
}

.select-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.select-hero h1,
.level-hero h1 {
  margin: 14px 0 0;
  color: var(--select-paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(43px, 6.4vw, 82px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.select-hero h1 em,
.level-hero h1 em {
  color: var(--select-gold-soft);
  font-style: italic;
  font-weight: 400;
}

.select-hero__aside p {
  margin: 0;
  color: var(--select-muted);
  font-size: 15px;
  line-height: 1.75;
}

.select-stats {
  display: flex;
  gap: 24px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--select-line);
}

.select-stats span {
  color: var(--select-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.select-stats strong {
  margin-right: 5px;
  color: var(--select-paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

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

.accent-gold {
  --accent: #dfbc72;
  --accent-soft: #f3e1b9;
  --accent-rgb: 223, 188, 114;
}

.accent-mint {
  --accent: #85d4ae;
  --accent-soft: #c9f0dd;
  --accent-rgb: 133, 212, 174;
}

.accent-copper {
  --accent: #df916d;
  --accent-soft: #f2c2a9;
  --accent-rgb: 223, 145, 109;
}

.accent-rose {
  --accent: #c995b4;
  --accent-soft: #e6c8d7;
  --accent-rgb: 201, 149, 180;
}

.mode-card {
  position: relative;
  display: block;
  height: 470px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.055), transparent 38%),
    linear-gradient(145deg, #164a36, #0c2d20);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  isolation: isolate;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.mode-card::before {
  position: absolute;
  z-index: -1;
  top: -90px;
  right: -90px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 50%;
  content: "";
}

.mode-card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--accent-rgb), 0.58);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.4);
}

.mode-card__top {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.mode-index {
  color: rgba(247, 242, 230, 0.5);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.mode-open,
.level-arrow {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 50%;
  color: var(--accent-soft);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.mode-open i,
.level-arrow i {
  transform: rotate(45deg);
}

.mode-card:hover .mode-open,
.level-card:hover .level-arrow {
  transform: translate(2px, -2px);
  color: #102219;
  background: var(--accent);
}

.mode-card__copy {
  position: relative;
  z-index: 4;
  padding: 16px 20px 0;
}

.mode-code {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 3vw, 47px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.mode-card h2 {
  margin: 0;
  color: var(--select-paper);
  font-size: 16px;
  font-weight: 780;
}

.mode-card p {
  max-width: 220px;
  margin: 8px 0 0;
  color: var(--select-muted);
  font-size: 12px;
  line-height: 1.55;
}

.mode-card__art {
  position: absolute;
  z-index: 2;
  right: -5%;
  bottom: -5%;
  display: block;
  width: 104%;
  height: 58%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.mode-card__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.35));
}

.mode-card:hover .mode-card__art {
  transform: translateY(-6px) scale(1.035);
}

.mode-card__glow {
  position: absolute;
  z-index: 1;
  right: -10%;
  bottom: -30%;
  width: 115%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.24), transparent 66%);
  pointer-events: none;
}

.select-tip {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  margin: 26px auto 0;
  padding: 11px 16px;
  border: 1px solid var(--select-line);
  border-radius: 999px;
  color: var(--select-muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 11px;
  line-height: 1.45;
}

.select-tip i,
.select-tip strong {
  color: var(--select-gold);
}

/* Level selection */
.level-hero {
  display: grid;
  min-height: 430px;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: 40px;
  padding: 34px 0 18px;
  border-bottom: 1px solid var(--select-line);
}

.level-hero__copy {
  position: relative;
  z-index: 3;
}

.select-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: var(--select-muted);
  font-size: 11px;
  font-weight: 720;
}

.select-breadcrumb a:hover {
  color: var(--select-paper);
}

.select-breadcrumb i {
  color: rgba(247, 242, 230, 0.28);
  font-size: 8px;
}

.select-breadcrumb span {
  color: var(--accent);
}

.level-hero h1 {
  font-size: clamp(48px, 6vw, 78px);
}

.level-hero__copy > p {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--select-muted);
  font-size: 15px;
  line-height: 1.7;
}

.mode-summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
  padding: 10px 15px 10px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.mode-summary__code {
  display: grid;
  min-width: 50px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  color: #112218;
  background: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
}

.mode-summary > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mode-summary small {
  color: var(--select-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mode-summary strong {
  font-size: 13px;
  font-weight: 760;
}

.level-hero__art {
  position: relative;
  display: grid;
  min-width: 0;
  height: 410px;
  place-items: center;
}

.level-hero__art::after {
  position: absolute;
  z-index: -1;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.21), transparent 68%);
  content: "";
}

.level-hero__art picture,
.level-hero__art img {
  display: block;
  width: 100%;
  height: 100%;
}

.level-hero__art picture {
  position: absolute;
  z-index: 2;
  inset: 0;
}

.level-hero__art img {
  object-fit: contain;
  filter: drop-shadow(0 30px 38px rgba(0, 0, 0, 0.38));
}

.art-orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 50%;
}

.art-orbit--one {
  width: 330px;
  height: 330px;
}

.art-orbit--two {
  width: 250px;
  height: 250px;
}

.level-section {
  padding: clamp(44px, 6vw, 76px) 0 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 9px 0 0;
  color: var(--select-paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.section-heading > p {
  max-width: 470px;
  margin: 0;
  color: var(--select-muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.level-card {
  position: relative;
  display: flex;
  min-height: 350px;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--select-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 44%, rgba(var(--accent-rgb), 0.14), transparent 10rem),
    linear-gradient(150deg, #153b2c, #0d2a1f);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.level-card::before {
  position: absolute;
  top: -80px;
  left: 50%;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 50%;
  content: "";
  transform: translateX(-50%);
}

.level-card:hover {
  transform: translateY(-7px);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.level-card__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.level-number {
  color: rgba(247, 242, 230, 0.48);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.level-roman {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 130px;
  place-items: center;
  color: var(--accent-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(66px, 7vw, 96px);
  line-height: 1;
  text-shadow: 0 18px 50px rgba(var(--accent-rgb), 0.23);
  transition: transform 0.3s ease;
}

.level-card:hover .level-roman {
  transform: scale(1.06);
}

.level-card__copy {
  position: relative;
  z-index: 2;
}

.level-card h3 {
  margin: 0;
  color: var(--select-paper);
  font-size: 18px;
  font-weight: 780;
}

.level-card p {
  min-height: 38px;
  margin: 7px 0 0;
  color: var(--select-muted);
  font-size: 11px;
  line-height: 1.55;
}

.difficulty {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--select-line);
}

.difficulty > span:first-child {
  color: var(--select-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.difficulty__dots {
  display: flex;
  gap: 4px;
}

.difficulty__dots i {
  display: block;
  width: 14px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.difficulty__dots i.is-active {
  background: var(--accent);
}

@media (max-width: 1050px) {
  .mode-grid,
  .level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-card {
    height: 440px;
  }

  .mode-card__art {
    right: -3%;
    width: 76%;
    height: 65%;
  }

  .level-card {
    min-height: 310px;
  }
}

@media (max-width: 820px) {
  .select-hero,
  .level-hero {
    grid-template-columns: 1fr;
  }

  .select-hero {
    align-items: start;
    gap: 28px;
  }

  .select-hero__aside {
    max-width: 650px;
  }

  .level-hero {
    padding-top: 45px;
  }

  .level-hero__art {
    height: 340px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 590px) {
  .select-shell {
    width: min(100% - 24px, 1280px);
    padding-bottom: 28px;
  }

  .select-header {
    min-height: 72px;
  }

  .select-brand__mark {
    width: 40px;
    height: 40px;
  }

  .select-brand strong,
  .select-nav span {
    display: none;
  }

  .select-nav a,
  .select-nav a:first-child {
    width: 40px;
    min-height: 40px;
    padding: 0;
  }

  .select-hero {
    padding-top: 40px;
  }

  .select-hero h1,
  .level-hero h1 {
    font-size: clamp(39px, 12vw, 56px);
  }

  .mode-grid,
  .level-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    height: 420px;
  }

  .mode-card__art {
    right: -2%;
    width: 84%;
  }

  .select-tip {
    align-items: flex-start;
    border-radius: 16px;
  }

  .select-breadcrumb {
    margin-bottom: 22px;
  }

  .level-hero__art {
    height: 285px;
  }

  .art-orbit--one {
    width: 260px;
    height: 260px;
  }

  .art-orbit--two {
    width: 190px;
    height: 190px;
  }

  .level-card {
    min-height: 295px;
  }

  .level-roman {
    min-height: 115px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
