:root {
  --bg: #0b0b0d;
  --card: #111214;
  --elev: #17181b;
  --line: #26272b;
  --text: #f4f4f5;
  --mute: #9b9ba3;
  --dim: #6f6f78;
  --green: #7dffb3;
  --green-2: #3d8f63;
  --radius: 28px;
  --nav: 999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html.theme-light {
  --bg: #eceef2;
  --card: #ffffff;
  --elev: #f6f7f9;
  --line: #d5d8de;
  --text: #17181c;
  --mute: #5c5f68;
}

html.theme-light .brand span {
  color: #111;
}

html.theme-light .menu a,
html.theme-light .menu button.drop-btn {
  color: rgba(17, 17, 17, 0.68);
}

html.theme-light .menu a.active,
html.theme-light .menu a:hover,
html.theme-light .menu button.drop-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #111;
}

html.theme-light .theme-toggle {
  color: #17181c;
}

html.theme-light .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}

html.theme-light .burger {
  border-color: rgba(0, 0, 0, 0.12);
}

html.theme-light .burger span {
  background: #17181c;
}

html.theme-light .hero-copy h1,
html.theme-light .hero-copy p {
  color: #17181c;
}

html.theme-light .hero-visual::after {
  background: linear-gradient(180deg, rgba(236, 238, 242, 0.28) 0%, rgba(236, 238, 242, 0.82) 100%);
}

html.theme-light .scene-visual::after,
html.theme-light .rules-visual::after {
  background: linear-gradient(180deg, rgba(236, 238, 242, 0.4) 0%, rgba(236, 238, 242, 0.82) 100%);
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.wrap {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 72px;
}

.home {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.home .wrap,
.rules-page .wrap {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.home .hero {
  flex: 1;
  min-height: 0;
  margin: 0;
  aspect-ratio: auto;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.home .footer {
  margin-top: 12px;
  flex-shrink: 0;
}

.hero {
  margin-top: 18px;
  position: relative;
  aspect-ratio: 1024 / 559;
  border-radius: 24px;
  background: #101113;
  overflow: hidden;
}

.hero::before {
  display: none;
}

.hero-fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 80% 20%, rgba(0, 0, 0, 0.22), transparent 46%);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.28);
}

.hero-copy {
  position: relative;
  z-index: 3;
  flex: 1;
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-main {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 48px 7vw 72px;
}

.hero-age {
  flex: 0 0 min(320px, 100%);
  max-width: 320px;
  border-color: rgba(91, 157, 255, 0.28);
  background: rgba(8, 10, 16, 0.72);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 40px rgba(91, 157, 255, 0.12);
}

.home .topbar,
.rules-page .topbar,
.scene-page .topbar {
  z-index: 40;
  overflow: visible;
  margin: 10px 22px 0;
}

.rules-page .topbar {
  grid-column: 1 / -1;
  grid-row: 1;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.38) 0%, rgba(8, 10, 14, 0.18) 38%, rgba(8, 10, 14, 0.72) 100%);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  flex-shrink: 0;
}

.brand span {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.brand img {
  height: 34px;
  width: 34px;
  object-fit: contain;
  max-width: none;
  transition: transform 0.4s ease;
}

.brand:hover img {
  transform: scale(1.07);
}

.menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

.topbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu a,
.menu button.drop-btn {
  padding: 8px 13px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.menu a:hover,
.menu button.drop-btn:hover {
  color: white;
  background: rgba(0, 0, 0, 0.28);
}

.menu a.active {
  background: rgba(0, 0, 0, 0.42);
  color: white;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-toggle .icon-moon {
  display: none;
}

html.theme-light .theme-toggle .icon-sun {
  display: none;
}

html.theme-light .theme-toggle .icon-moon {
  display: block;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e07068 !important;
  border: 1px solid transparent !important;
  color: #fff !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  transition: background 0.2s ease;
}

.discord-btn:hover {
  background: #ea8179 !important;
  color: #fff !important;
  transform: none;
  box-shadow: none;
}

.discord-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.user-menu {
  position: relative;
  z-index: 50;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.user-menu-btn:hover,
.user-menu.open .user-menu-btn {
  background: rgba(255, 255, 255, 0.14);
}

.user-chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2b31;
}

.user-chip-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.user-menu-caret {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.user-menu-panel {
  display: none;
  position: fixed;
  min-width: 200px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(16, 17, 21, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  z-index: 10000;
}

.user-menu.open .user-menu-panel,
.user-menu-panel.is-open {
  display: grid;
  gap: 2px;
}

.user-menu-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #d7d7dc;
}

.user-menu-panel svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
}

.user-menu-panel a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.user-menu-panel a:hover svg {
  opacity: 1;
}

.user-menu-logout {
  margin-top: 4px;
  background: rgba(220, 48, 48, 0.22);
  color: #ff8a8a !important;
}

.user-menu-logout svg {
  color: #ff8a8a;
  opacity: 1;
}

.user-menu-logout:hover {
  background: rgba(220, 48, 48, 0.38) !important;
  color: #ffb4b4 !important;
}

.drop {
  position: relative;
}

.drop-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #141518;
  z-index: 20;
}

.drop.open .drop-panel,
.drop:hover .drop-panel {
  display: grid;
}

.drop-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.drop-panel a:hover {
  background: #222327;
}

.chevron {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  transform: translateY(-1px);
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 5px auto;
  background: white;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.hero-copy .hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: none;
  margin: 0 0 16px;
  color: #9cc4ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, #5b9dff, transparent);
}

.hero-badge {
  width: min(196px, 42vw);
  height: auto;
  margin-bottom: 22px;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.45));
}

.hero h1 {
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.hero h1 span {
  display: inline;
  font-weight: 800;
  background: none;
  color: #fff;
  filter: none;
}

.hero-copy p {
  max-width: 42ch;
  margin: 14px 0 0;
  color: rgba(232, 232, 236, 0.82);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
}

.btn-red {
  background: #3d7dff;
  color: #fff;
}

.btn-red:hover {
  background: #5b9dff;
}

.btn-dark {
  background: #141518;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-dark:hover {
  background: #1c1d21;
}

.btn-dark svg {
  width: 16px;
  height: 16px;
}

.server-card {
  flex: 0 0 min(360px, 100%);
  max-width: 380px;
  padding: 22px 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(12, 13, 16, 0.72);
  backdrop-filter: blur(16px);
}

.server-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(61, 143, 99, 0.18);
  color: #7dffb3;
  letter-spacing: 0.12em;
}

.live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7dffb3;
  box-shadow: 0 0 8px #7dffb3;
}

.server-hint {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.server-connect {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.server-connect code {
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
}

.server-connect button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
}

.server-connect button:hover,
.server-connect button.is-copied {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.server-connect svg {
  width: 16px;
  height: 16px;
}

.server-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.server-stats b {
  display: block;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.server-stats span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 700;
}

.btn-white {
  background: #f5f5f5;
  color: #111;
}

.btn-white:hover {
  background: white;
}

.link {
  font-size: 14px;
  font-weight: 700;
}

.hero-stats {
  display: flex;
  gap: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stats b {
  color: #cfcfd4;
  margin-right: 4px;
}

.section {
  margin-top: 56px;
}

.section h2 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.section .lead {
  color: var(--mute);
  margin-bottom: 24px;
}

.cats,
.grid,
.plans,
.steps {
  display: grid;
  gap: 14px;
}

.cats {
  grid-template-columns: repeat(4, 1fr);
}

.cat,
.card,
.plan,
.step {
  border: 1px solid var(--line);
  background: var(--elev);
  border-radius: 22px;
}

.cat {
  padding: 22px;
}

.cat small,
.card small,
.plan small {
  color: var(--green-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cat h3,
.card h3,
.plan h3,
.step h3 {
  margin: 8px 0 6px;
  font-size: 20px;
  font-weight: 600;
}

.cat p,
.card p,
.plan p,
.step p,
.page p {
  color: var(--mute);
  line-height: 1.6;
  font-size: 14px;
}

.grid {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  overflow: hidden;
}

.card img {
  height: 180px;
  width: 100%;
  object-fit: cover;
  filter: saturate(0.8) brightness(0.8);
}

.card-body {
  padding: 18px;
}

.price {
  margin-top: 12px;
  font-weight: 700;
}

.page {
  margin-top: 22px;
  padding: 48px;
  border-radius: var(--radius);
  background: var(--card);
}

.page h1 {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 8px 0 12px;
}

.kicker {
  color: var(--green-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rules {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 28px;
  counter-reset: rule;
}

.rules li {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--elev);
  color: var(--mute);
  line-height: 1.6;
  counter-increment: rule;
}

.rules li::before {
  content: counter(rule, decimal-leading-zero);
  display: block;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.rules strong {
  color: var(--ice, #f4f4f5);
}

.plans {
  grid-template-columns: 1fr 1fr;
  margin-top: 28px;
}

.plan,
.step {
  padding: 24px;
}

.plan.featured {
  background: #1a1b1f;
  border-color: #3a3b40;
}

.plan .amount {
  font-size: 40px;
  margin: 10px 0;
  letter-spacing: -0.04em;
}

.plan ul {
  margin: 16px 0 22px 18px;
  color: var(--mute);
  display: grid;
  gap: 8px;
}

.steps {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 24px;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
}

.filter.active,
.filter:hover {
  background: #232428;
  color: white;
}

.footer {
  margin-top: 48px;
  color: var(--dim);
  font-size: 13px;
}

@media (max-width: 900px) {
  .home {
    overflow: hidden;
  }

  .cats,
  .grid,
  .plans,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-main {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 28px 20px 32px;
    gap: 28px;
  }

  .hero-age,
  .server-card {
    max-width: 100%;
    flex-basis: auto;
  }

  .menu {
    display: none;
    position: absolute;
    top: 62px;
    left: 16px;
    right: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #141518;
    flex-direction: column;
    align-items: stretch;
    z-index: 30;
  }

  .menu.open {
    display: flex;
  }

  .burger {
    display: block;
  }

  .topbar {
    position: relative;
  }

  .page {
    padding: 28px 20px;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes kenburns {
  from {
    transform: scale(1.16);
  }
  to {
    transform: scale(1.04);
  }
}

.topbar {
  animation: rise 0.7s ease both;
}

.menu a:nth-child(1) {
  animation: rise 0.55s 0.12s ease both;
}

.menu a:nth-child(2) {
  animation: rise 0.55s 0.18s ease both;
}

.menu a:nth-child(3) {
  animation: rise 0.55s 0.24s ease both;
}

.menu a:nth-child(4) {
  animation: rise 0.55s 0.3s ease both;
}

.menu .nav-apps {
  display: none !important;
}

body.is-authed .menu .nav-apps {
  display: block !important;
}

.discord-btn {
  animation: rise 0.55s 0.22s ease both;
}

.hero {
  animation: rise 0.8s 0.12s ease both;
}

.hero-visual img {
  animation: kenburns 18s ease-out both;
}

.hero-copy h1 {
  animation: rise 0.8s 0.28s ease both;
}

.hero-copy p {
  animation: rise 0.8s 0.42s ease both;
}

.page {
  animation: rise 0.65s ease both;
}

.rules li,
.steps article,
.card,
.plan {
  animation: rise 0.55s ease both;
}

.rules li:nth-child(1),
.steps article:nth-child(1),
.card:nth-child(1),
.plan:nth-child(1) {
  animation-delay: 0.08s;
}

.rules li:nth-child(2),
.steps article:nth-child(2),
.card:nth-child(2),
.plan:nth-child(2) {
  animation-delay: 0.16s;
}

.rules li:nth-child(3),
.steps article:nth-child(3),
.card:nth-child(3),
.plan:nth-child(3) {
  animation-delay: 0.24s;
}

.rules li:nth-child(4),
.steps article:nth-child(4),
.card:nth-child(4),
.plan:nth-child(4) {
  animation-delay: 0.32s;
}

.rules li:nth-child(5) {
  animation-delay: 0.4s;
}

.rules li:nth-child(6) {
  animation-delay: 0.48s;
}

.rules-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.rules-page .wrap {
  width: 100%;
  max-width: none;
  height: 100%;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.rules-board {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  animation: rise 0.8s 0.12s ease both;
}

.rules-page .topbar {
  grid-column: 1 / -1;
  grid-row: 1;
}

.rules-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.rules-visual img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.rules-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 12, 0.82) 0%, rgba(8, 9, 12, 0.58) 42%, rgba(8, 9, 12, 0.5) 100%),
    linear-gradient(180deg, rgba(8, 9, 12, 0.18) 0%, rgba(8, 9, 12, 0.55) 100%);
}

.rules-rail,
.rules-stage {
  position: relative;
  z-index: 1;
  min-height: 0;
}

.rules-rail {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 28px 36px;
}

.rules-kicker {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rules-intro {
  max-width: 28ch;
  margin: 14px 0 28px;
  color: rgba(232, 232, 236, 0.72);
  font-size: 13.5px;
  line-height: 1.55;
}

.rules-toc {
  display: grid;
  gap: 4px;
}

.rules-toc button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

.rules-toc button span {
  width: 22px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.28);
  font-size: 13px;
  font-weight: 700;
}

.rules-toc button:hover {
  color: rgba(255, 255, 255, 0.82);
}

.rules-toc button.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.rules-toc button.is-active span {
  color: #fff;
}

.rules-mark {
  margin-top: auto;
  padding-top: 24px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.rules-stage {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  padding: 12px 36px 36px 20px;
  overflow: auto;
}

.rules-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.rules-count {
  color: rgba(255, 255, 255, 0.38);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rules-count b {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.rules-arrows {
  display: flex;
  gap: 8px;
}

.rules-arrows button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(12, 12, 14, 0.35);
  color: #fff;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rules-arrows button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.rules-arrows svg {
  width: 16px;
  height: 16px;
}

.rules-panel {
  display: none;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.78fr);
  gap: 28px 32px;
  align-items: start;
  flex: 1;
}

.rules-panel.is-active {
  display: grid;
  animation: rise 0.45s ease both;
}

.rules-label {
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rules-copy h1 {
  max-width: none;
  margin: 12px 0 22px;
  color: #fff;
  font-size: clamp(36px, 4.2vw, 56px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.rules-copy > p:not(.rules-label) {
  color: rgba(230, 230, 234, 0.78);
  font-size: 15px;
  line-height: 1.65;
}

.rules-copy > p + p {
  margin-top: 16px;
}

.rules-copy ul {
  margin-top: 16px;
  padding-left: 1.15em;
  color: rgba(230, 230, 234, 0.78);
  font-size: 15px;
  line-height: 1.65;
}

.rules-copy li + li {
  margin-top: 8px;
}

.rules-card > p:not(.rules-label):not(.rules-age):not(.rules-card-lead) {
  color: rgba(230, 230, 234, 0.78);
  font-size: 15px;
  line-height: 1.65;
}

.rules-card {
  padding: 28px 26px 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(16, 16, 18, 0.55);
  backdrop-filter: blur(10px);
}

.rules-age {
  margin: 6px 0 10px;
  color: #fff;
  font-size: clamp(64px, 7vw, 96px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.rules-card-lead {
  margin-bottom: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 1100px) {
  .rules-board {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .rules-copy h1 {
    max-width: 12ch;
  }
}

@media (max-width: 900px) {
  .rules-page {
    height: auto;
    overflow: auto;
  }

  .rules-page .wrap {
    height: auto;
  }

  .rules-board {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: 0;
  }

  .rules-page .topbar {
    grid-column: 1;
    grid-row: 1;
    margin: 8px 12px 0;
    padding: 6px 4px;
  }

  .rules-rail {
    grid-column: 1;
    grid-row: 2;
    padding: 28px 22px 8px;
  }

  .rules-stage {
    grid-column: 1;
    grid-row: 3;
    padding: 8px 22px 28px;
  }

  .rules-intro {
    max-width: 46ch;
    margin-bottom: 18px;
  }

  .rules-toc {
    grid-template-columns: 1fr 1fr;
  }

  .rules-mark {
    display: none;
  }

  .rules-panel.is-active {
    grid-template-columns: 1fr;
  }

  .rules-copy h1 {
    max-width: 12ch;
  }
}

.info-page h1 {
  margin-bottom: 6px;
}

.info-page .info-lead {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.info-page p {
  max-width: 68ch;
  margin-bottom: 14px;
  color: var(--mute);
  font-size: 15px;
  line-height: 1.7;
}

.info-page h2 {
  margin: 36px 0 14px;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.info-list {
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 68ch;
  margin: 4px 0 8px;
}

.info-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--elev);
  color: var(--mute);
  font-size: 15px;
  line-height: 1.55;
}

.scene-page {
  min-height: 100vh;
  position: relative;
}

.scene-visual {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.scene-visual img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.scene-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0.42) 0%, rgba(8, 10, 14, 0.68) 100%);
}

.scene-page .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 72px;
}

.scene-page .page,
.scene-page .apply-grid {
  width: min(1280px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.scene-page .page {
  background: rgba(12, 13, 16, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.dash-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 8px 0 28px;
}

.dash-profile img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2b31;
}

.dash-profile h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dash-username {
  margin: 0 0 6px !important;
  color: #fff !important;
  font-weight: 600;
  font-size: 16px !important;
}

.dash-joined {
  margin: 0 !important;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 8px 0 12px;
}

.dash-stat {
  padding: 20px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-stat span {
  display: block;
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.dash-stat b {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
}

.dash-stat--ok b {
  color: #7dffb3;
}

.dash-stat--bad b {
  color: #ff8a8a;
}

.dash-apps {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  max-width: 68ch;
}

.dash-apps li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--elev);
}

.dash-reviewer {
  display: block;
  margin-top: 4px;
  color: var(--mute);
  font-size: 13px;
  font-weight: 500;
}

.dash-status {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
}

.dash-status--pending {
  color: #f2d38a;
  background: rgba(242, 211, 138, 0.12);
}

.dash-status--approved {
  color: #7dffb3;
  background: rgba(125, 255, 179, 0.12);
}

.dash-status--rejected {
  color: #ff8a8a;
  background: rgba(255, 138, 138, 0.12);
}

.dash-status--interview {
  color: #9ec1ff;
  background: rgba(61, 125, 255, 0.16);
}

.dash-page .apply-card-btn {
  display: inline-block;
  width: auto;
  min-width: 180px;
}

@media (max-width: 700px) {
  .dash-stats {
    grid-template-columns: 1fr;
  }
}

.apply-grid {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}

body.is-authed .apply-grid {
  display: grid;
}

.apply-card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: 20px;
  background: rgba(14, 15, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.apply-card-media {
  height: 148px;
  overflow: hidden;
  border-radius: 14px;
}

.apply-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) brightness(0.72);
}

.apply-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 6px 4px;
}

.apply-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.apply-card p {
  margin: 8px 0 0;
  color: var(--mute);
  font-size: 13.5px;
  line-height: 1.5;
  flex: 1;
}

.apply-card-btn {
  display: block;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #3d7dff;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.apply-card-btn:hover {
  background: #5b9dff;
}

.apply-card-btn--closed {
  background: rgba(220, 48, 48, 0.28);
  color: #ff8a8a;
  cursor: default;
  pointer-events: none;
}

.apply-card-btn--closed:hover {
  background: rgba(220, 48, 48, 0.28);
}

@media (max-width: 1100px) {
  .apply-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .apply-grid {
    grid-template-columns: 1fr;
  }
}

.form-page .apply-form {
  display: grid;
  gap: 18px;
  max-width: 68ch;
  margin-top: 8px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 1px solid rgba(61, 125, 255, 0.7);
}

.form-error {
  color: #ff8a8a !important;
}

.form-page .apply-card-btn {
  display: inline-block;
  width: auto;
  min-width: 180px;
  border: 0;
  cursor: pointer;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 18px;
}

.apply-card-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
}

.apply-card-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
