:root {
  color-scheme: dark;
  --ink: #080604;
  --wood: #170b08;
  --wood-2: #27110c;
  --panel: rgba(17, 10, 9, 0.93);
  --panel-soft: rgba(35, 18, 13, 0.9);
  --gold: #d9a74d;
  --gold-2: #ffe3a2;
  --red: #8e241a;
  --red-2: #d05238;
  --green: #6fc33a;
  --green-2: #b7f57a;
  --blue: #54d6e3;
  --text: #f5e7ca;
  --muted: #b4a58d;
  --line: rgba(224, 176, 87, 0.36);
  --line-strong: rgba(255, 222, 154, 0.72);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(159, 39, 25, 0.23), transparent 26rem),
    radial-gradient(circle at 50% 42rem, rgba(55, 146, 145, 0.16), transparent 30rem),
    linear-gradient(180deg, #050403 0%, #110806 45%, #060504 100%);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.status-strip {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 50%;
  display: grid;
  width: min(1120px, 100%);
  min-height: 30px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  transform: translateX(-50%);
  border-right: 1px solid rgba(255, 229, 170, 0.18);
  border-left: 1px solid rgba(255, 229, 170, 0.18);
  background: linear-gradient(180deg, #2d0f0a, #120503);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.52);
  color: #dec6a1;
  font-size: 0.78rem;
}

.status-strip span {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 7px 8px;
  border-right: 1px solid rgba(255, 229, 170, 0.13);
  white-space: nowrap;
}

.status-strip span:last-child {
  border-right: 0;
}

.status-strip strong {
  margin-left: 5px;
  color: var(--gold-2);
}

.topbar {
  position: fixed;
  z-index: 29;
  top: 30px;
  left: 50%;
  display: grid;
  width: min(1120px, calc(100% - 18px));
  min-height: 66px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
  padding: 0 18px;
  border: 1px solid rgba(255, 226, 160, 0.22);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background:
    linear-gradient(90deg, rgba(224, 176, 87, 0.08), transparent 25%, transparent 75%, rgba(224, 176, 87, 0.08)),
    rgba(6, 5, 5, 0.88);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  min-width: 260px;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #fff1c4;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 231, 162, 0.33), transparent 34%),
    linear-gradient(180deg, #74301d, #180705);
  box-shadow: inset 0 0 18px rgba(255, 230, 159, 0.18), 0 0 22px rgba(217, 167, 77, 0.18);
  font-family: Georgia, serif;
  font-weight: 900;
}

.brand strong,
.hero-logo h1,
.board-title h2,
.side-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
}

.brand strong {
  display: block;
  color: #fff0c8;
  font-size: 0.95rem;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  justify-content: flex-end;
  gap: clamp(10px, 1.7vw, 24px);
}

.nav-links a {
  position: relative;
  display: inline-flex;
  min-height: 66px;
  align-items: center;
  color: #d8cab1;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-links a::before {
  position: absolute;
  right: 0;
  bottom: 13px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  content: "";
  transition: transform 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--gold-2);
}

.nav-links a:hover::before,
.nav-links a:focus-visible::before {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.nav-toggle span {
  width: 19px;
  height: 2px;
  background: var(--gold-2);
}

.hero {
  position: relative;
  min-height: 670px;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 132px 18px 76px;
}

.hero-bg,
.hero-vignette {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-image: url("assets/hero.png");
  background-position: center top;
  background-size: cover;
  transform: scale(1.01);
}

.hero-vignette {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.06) 38%, rgba(8, 6, 4, 0.96) 100%),
    radial-gradient(circle at 50% 58%, rgba(217, 167, 77, 0.22), transparent 20rem),
    radial-gradient(circle at 50% 14%, transparent 0, rgba(0, 0, 0, 0.62) 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  text-align: center;
}

.hero-character-art {
  position: absolute;
  z-index: 1;
  bottom: -54px;
  left: 50%;
  width: min(980px, 76vw);
  max-height: 520px;
  object-fit: contain;
  pointer-events: none;
  transform: translateX(-50%);
  opacity: 0.58;
  filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.72));
}

.server-pill {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  padding: 0 18px;
  border: 1px solid rgba(84, 214, 227, 0.42);
  border-radius: 999px;
  background: rgba(5, 12, 14, 0.76);
  color: #d8ffff;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #61f486;
  box-shadow: 0 0 15px #61f486;
}

.hero-logo {
  position: relative;
  display: inline-grid;
  min-width: min(600px, 100%);
  justify-items: center;
  padding: 16px 22px 18px;
}

.hero-logo::before,
.hero-logo::after {
  position: absolute;
  top: 50%;
  width: min(154px, 22vw);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  content: "";
}

.hero-logo::before {
  right: 100%;
}

.hero-logo::after {
  left: 100%;
}

.hero-logo span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin-bottom: -6px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-2);
  background: radial-gradient(circle, #733020, #160504 72%);
  font-family: Georgia, serif;
  font-size: 1.7rem;
  font-weight: 900;
  box-shadow: 0 0 34px rgba(217, 167, 77, 0.25);
}

.hero-logo h1 {
  margin: 0;
  max-width: 960px;
  color: #fff1c4;
  font-size: 5.4rem;
  line-height: 0.94;
  text-wrap: balance;
  text-shadow:
    0 4px 0 #40160e,
    0 0 30px rgba(255, 219, 142, 0.34),
    0 24px 42px rgba(0, 0, 0, 0.8);
}

.hero-logo em {
  display: block;
  color: #f7d992;
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-copy {
  width: min(640px, 100%);
  margin: 20px auto 0;
  color: #efe1c3;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.72;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.big-action,
.login-panel button,
.tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.primary-action,
.secondary-action {
  min-width: 206px;
  height: 54px;
}

.primary-action,
.register-action,
.login-panel button {
  border: 1px solid rgba(211, 255, 136, 0.72);
  background: linear-gradient(180deg, var(--green-2), var(--green) 50%, #2f741f);
  color: #102305;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 16px 34px rgba(0, 0, 0, 0.44);
}

.secondary-action,
.download-action {
  border: 1px solid rgba(255, 218, 142, 0.72);
  background: linear-gradient(180deg, #ffe49a, #c9802e 52%, #74311f);
  color: #211006;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 16px 34px rgba(0, 0, 0, 0.44);
}

.portal-frame,
.info-band,
.footer {
  width: min(1120px, calc(100% - 28px));
  margin-inline: auto;
}

.portal-frame {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 292px;
  gap: 16px;
  margin-top: -34px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 231, 162, 0.1), rgba(255, 231, 162, 0.02)),
    linear-gradient(90deg, rgba(97, 32, 23, 0.42), rgba(15, 9, 8, 0.94) 18%, rgba(15, 9, 8, 0.94) 82%, rgba(97, 32, 23, 0.42));
  box-shadow: var(--shadow);
}

.portal-frame::before,
.portal-frame::after {
  position: absolute;
  left: 50%;
  width: min(520px, 72%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 232, 167, 0.88), transparent);
  content: "";
}

.portal-frame::before {
  top: 8px;
}

.portal-frame::after {
  bottom: 8px;
}

.left-rail,
.right-rail {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.big-action {
  min-height: 56px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #3e1a12, #170806);
  color: #f7dfad;
  box-shadow: inset 0 0 0 1px rgba(255, 240, 196, 0.08);
}

.big-action:hover,
.big-action:focus-visible,
.primary-action:hover,
.secondary-action:hover {
  filter: brightness(1.08);
}

.side-panel .big-action {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  text-align: center;
  white-space: normal;
  line-height: 1.2;
}

.side-panel .big-action + .big-action {
  margin-top: 8px;
}

.side-panel,
.center-board,
.feature {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 82px),
    var(--panel);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.52), 0 18px 42px rgba(0, 0, 0, 0.36);
}

.side-panel {
  padding: 16px;
}

.side-panel h2,
.board-title h2 {
  margin: 0;
  color: #fff0c8;
  line-height: 1.05;
}

.side-panel h2 {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin: -6px -6px 14px;
  border-bottom: 1px solid rgba(224, 176, 87, 0.28);
  color: var(--gold-2);
  font-size: 1.16rem;
  text-align: center;
}

.panel-character {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: contain;
  object-position: center bottom;
  margin: -2px auto 14px;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.58));
}

.panel-character.small {
  height: 140px;
}

.status-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.status-list li {
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 0.82rem;
}

.status-list strong {
  flex: 0 0 auto;
  color: var(--gold-2);
}

.status-list .online {
  color: #81f19b;
}

.center-board {
  min-width: 0;
  padding: 20px;
}

.board-title p {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.board-title h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.feature-banner {
  position: relative;
  display: grid;
  min-height: 210px;
  align-content: end;
  margin-top: 18px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 226, 160, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.78) 74%),
    url("assets/hero.png") center 58% / cover;
}

.feature-banner strong {
  display: block;
  color: #fff3cf;
  font-size: 1.2rem;
}

.feature-banner span {
  display: block;
  margin-top: 7px;
  color: #dacbad;
  line-height: 1.55;
}

.play-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 68px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 226, 160, 0.7);
  border-radius: 50%;
  background: rgba(8, 6, 5, 0.68);
  box-shadow: 0 0 34px rgba(217, 167, 77, 0.33);
}

.play-seal::before {
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 21px solid var(--gold-2);
  content: "";
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.tabs button {
  min-height: 38px;
  border: 1px solid rgba(224, 176, 87, 0.22);
  background: rgba(75, 22, 16, 0.55);
  color: #dfceb1;
  font-size: 0.78rem;
}

.tabs button.active,
.tabs button:hover {
  border-color: rgba(255, 226, 160, 0.54);
  background: linear-gradient(180deg, rgba(217, 167, 77, 0.24), rgba(117, 48, 30, 0.62));
  color: var(--gold-2);
}

.news-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.news-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 160ms ease, background 160ms ease;
}

.news-item:hover,
.news-item:focus-visible {
  border-color: rgba(84, 214, 227, 0.34);
  background: rgba(84, 214, 227, 0.055);
}

.news-item time {
  display: inline-flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(208, 82, 56, 0.44);
  border-radius: var(--radius);
  color: #ffd5c5;
  background: rgba(208, 82, 56, 0.12);
  font-size: 0.74rem;
  font-weight: 900;
}

.news-item strong,
.feature strong {
  display: block;
  color: #fff0c8;
}

.news-item p,
.feature p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.login-panel form {
  display: grid;
  gap: 11px;
}

.login-panel label {
  display: grid;
  gap: 6px;
  color: #d9c6a6;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-panel input {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(224, 176, 87, 0.3);
  border-radius: var(--radius);
  outline: 0;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff7e8;
}

.login-panel input:focus {
  border-color: rgba(84, 214, 227, 0.68);
  box-shadow: 0 0 0 3px rgba(84, 214, 227, 0.1);
}

.login-panel button {
  width: 100%;
  min-height: 42px;
  margin-top: 2px;
}

.member-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #d6c5a7;
  font-size: 0.78rem;
}

.ranking-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
}

.ranking-list span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(217, 167, 77, 0.18);
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 900;
}

.ranking-list strong {
  overflow: hidden;
  color: #f6e6c6;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list em {
  color: var(--blue);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.info-band {
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(84, 214, 227, 0.08), transparent 40%, rgba(208, 82, 56, 0.08)),
    rgba(16, 10, 9, 0.88);
  box-shadow: var(--shadow);
}

.class-showcase {
  width: min(1120px, calc(100% - 28px));
  margin: 28px auto 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 15% 20%, rgba(84, 214, 227, 0.12), transparent 18rem),
    radial-gradient(circle at 85% 10%, rgba(208, 82, 56, 0.12), transparent 18rem),
    rgba(16, 10, 9, 0.9);
  box-shadow: var(--shadow);
}

.class-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.class-controls {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.class-nav {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 226, 160, 0.42);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(217, 167, 77, 0.24), rgba(70, 24, 18, 0.72));
  color: var(--gold-2);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.class-nav:hover,
.class-nav:focus-visible {
  filter: brightness(1.12);
}

.class-slider {
  position: relative;
  min-height: 510px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 226, 160, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 26%, rgba(84, 214, 227, 0.1), transparent 18rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.36)),
    rgba(0, 0, 0, 0.22);
}

.class-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 20px 24px 26px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0) scale(0.78);
  transition: transform 360ms ease, opacity 360ms ease, filter 360ms ease;
  filter: saturate(0.85) brightness(0.74);
}

.class-slide.is-active {
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  filter: none;
}

.class-slide.is-prev,
.class-slide.is-next {
  z-index: 2;
  opacity: 0.38;
}

.class-slide.is-prev {
  transform: translateX(-36%) scale(0.72);
}

.class-slide.is-next {
  transform: translateX(36%) scale(0.72);
}

.class-slide img {
  width: min(560px, 74%);
  max-height: 390px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 28px 28px rgba(0, 0, 0, 0.62));
}

.class-slide strong {
  display: inline-flex;
  min-width: min(360px, 86%);
  min-height: 58px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid rgba(255, 226, 160, 0.34);
  border-radius: var(--radius);
  background: rgba(10, 5, 4, 0.78);
  color: #fff0c8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.08;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 3px 0 #40160e;
}

.class-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.class-dots button {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 226, 160, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.class-dots button.active {
  width: 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.feature {
  min-height: 160px;
  padding: 20px;
}

.feature span {
  display: inline-flex;
  min-width: 48px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid rgba(84, 214, 227, 0.32);
  border-radius: var(--radius);
  color: #d9ffff;
  background: rgba(84, 214, 227, 0.09);
  font-size: 0.74rem;
  font-weight: 900;
}

.footer {
  display: flex;
  min-height: 100px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 36px;
  color: var(--muted);
}

.footer p {
  margin: 0;
  color: #edd8af;
  font-weight: 900;
}

.footer div {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer a {
  color: #d5c3a5;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.subpage .topbar {
  position: absolute;
}

.page-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 132px 18px 72px;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  text-align: center;
}

.page-hero-content h1 {
  margin: 0;
  color: #fff1c4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.96;
  text-shadow:
    0 4px 0 #40160e,
    0 0 30px rgba(255, 219, 142, 0.34),
    0 24px 42px rgba(0, 0, 0, 0.8);
}

.page-hero-content p:last-child {
  width: min(640px, 100%);
  margin: 18px auto 0;
  color: #efe1c3;
  font-size: 1.05rem;
  line-height: 1.68;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  overflow-wrap: anywhere;
}

.page-frame {
  margin-top: -42px;
}

.form-board,
.download-board {
  padding: 24px;
}

.account-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

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

.account-form label,
.form-section legend {
  color: #d9c6a6;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-form label {
  display: grid;
  gap: 7px;
}

.account-form input,
.account-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(224, 176, 87, 0.3);
  border-radius: var(--radius);
  outline: 0;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff7e8;
}

.account-form input:focus,
.account-form select:focus {
  border-color: rgba(84, 214, 227, 0.68);
  box-shadow: 0 0 0 3px rgba(84, 214, 227, 0.1);
}

.form-section {
  margin: 0;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.choice-row,
.select-row,
.security-row {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.choice-row {
  grid-template-columns: repeat(2, minmax(0, 150px));
}

.choice-row label,
.terms-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #f1dfbb;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: none;
}

.choice-row input,
.terms-row input {
  width: auto;
  min-height: auto;
}

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

.security-row {
  grid-template-columns: 110px 92px minmax(0, 1fr);
  align-items: center;
}

.captcha-box {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid rgba(84, 214, 227, 0.34);
  border-radius: var(--radius);
  color: #d9ffff;
  background:
    repeating-linear-gradient(-20deg, rgba(84, 214, 227, 0.08), rgba(84, 214, 227, 0.08) 6px, transparent 6px, transparent 13px),
    rgba(0, 0, 0, 0.42);
  font-family: Georgia, serif;
  font-size: 1.18rem;
  font-weight: 900;
}

.small-action {
  min-height: 42px;
  border: 1px solid rgba(224, 176, 87, 0.35);
  border-radius: var(--radius);
  background: rgba(70, 24, 18, 0.62);
  color: #f7dfad;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.terms-row {
  align-items: flex-start;
  line-height: 1.5;
}

.account-form .terms-row {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 9px;
}

.account-form .terms-row input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.form-submit {
  width: min(260px, 100%);
}

.download-hero-card,
.article-panel,
.download-card {
  border: 1px solid rgba(255, 226, 160, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 80px),
    rgba(0, 0, 0, 0.2);
}

.download-hero-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42)),
    url("assets/hero.png") center 56% / cover;
}

.download-hero-card strong,
.download-card strong,
.article-panel h3 {
  color: #fff0c8;
  font-family: Georgia, "Times New Roman", serif;
}

.download-hero-card strong {
  display: block;
  font-size: 1.6rem;
}

.download-hero-card p,
.download-card p,
.article-panel p,
.step-list {
  color: var(--muted);
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.download-card {
  position: relative;
  min-height: 170px;
  padding: 20px;
}

.download-card span {
  display: inline-flex;
  width: 38px;
  height: 32px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid rgba(84, 214, 227, 0.32);
  border-radius: var(--radius);
  color: #d9ffff;
  background: rgba(84, 214, 227, 0.09);
  font-size: 0.74rem;
  font-weight: 900;
}

.download-card a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 218, 142, 0.45);
  border-radius: var(--radius);
  background: rgba(201, 128, 46, 0.16);
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.article-panel {
  margin-top: 14px;
  padding: 20px;
}

.article-panel h3 {
  margin: 0;
  font-size: 1.45rem;
}

.article-panel p {
  margin: 10px 0 16px;
}

.article-panel .secondary-action {
  min-width: min(240px, 100%);
  height: 46px;
}

.step-list {
  margin: 12px 0 0;
  padding-left: 22px;
}

.step-list li + li {
  margin-top: 8px;
}

.form-message,
.download-status {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(84, 214, 227, 0.28);
  border-radius: var(--radius);
  background: rgba(84, 214, 227, 0.08);
  color: #d9ffff;
  font-size: 0.88rem;
  line-height: 1.5;
}

.form-message.is-visible,
.download-status.is-visible {
  display: block;
}

.form-message.success {
  border-color: rgba(129, 241, 155, 0.42);
  background: rgba(68, 162, 64, 0.12);
  color: #d6ffd9;
}

.form-message.error {
  border-color: rgba(255, 128, 96, 0.45);
  background: rgba(160, 40, 26, 0.16);
  color: #ffd7ca;
}

.download-meta {
  display: block;
  margin-top: 6px;
  color: var(--blue);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.topup-flow,
.topup-summary,
.topup-packages {
  display: grid;
  gap: 12px;
}

.topup-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.flow-step,
.summary-card,
.topup-packages article,
.payment-preview {
  border: 1px solid rgba(255, 226, 160, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 70px),
    rgba(0, 0, 0, 0.22);
}

.flow-step {
  min-height: 132px;
  padding: 16px;
}

.flow-step span,
.summary-card span,
.topup-packages span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.flow-step strong,
.summary-card strong,
.topup-packages strong,
.payment-details h3 {
  display: block;
  color: #fff0c8;
  font-family: Georgia, "Times New Roman", serif;
}

.flow-step p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.topup-form {
  margin-top: 18px;
}

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

.amount-chip {
  min-height: 46px;
  border: 1px solid rgba(224, 176, 87, 0.3);
  border-radius: var(--radius);
  background: rgba(70, 24, 18, 0.58);
  color: #f7dfad;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.amount-chip.active,
.amount-chip:hover,
.amount-chip:focus-visible {
  border-color: rgba(211, 255, 136, 0.72);
  background: linear-gradient(180deg, rgba(183, 245, 122, 0.28), rgba(47, 116, 31, 0.7));
  color: #eeffd8;
}

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

.summary-card {
  min-height: 92px;
  padding: 16px;
}

.summary-card strong {
  margin-top: 8px;
  font-size: 1.25rem;
}

.payment-preview {
  display: none;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
  padding: 18px;
}

.payment-preview.is-visible {
  display: grid;
}

.qr-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.qr-card p,
.payment-details p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.qr-code-mock {
  display: grid;
  width: 168px;
  height: 168px;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px;
  border: 8px solid #f3ead6;
  border-radius: 4px;
  background: #0a0504;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}

.qr-code-mock span {
  border-radius: 3px;
  background: #f3ead6;
}

.qr-code-mock span:nth-child(2n) {
  opacity: 0.42;
}

.qr-code-mock span:nth-child(3n) {
  background: var(--gold);
}

.payment-details {
  min-width: 0;
}

.payment-details h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.copy-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.copy-row span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.copy-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fff0c8;
}

.topup-packages {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.topup-packages article {
  min-height: 100px;
  padding: 16px;
}

.topup-packages strong {
  margin-top: 6px;
  font-size: 1.18rem;
}

.topup-packages em {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

@media (max-width: 1020px) {
  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    top: 60px;
  }

  .hero {
    padding-top: 160px;
  }

  .hero-logo h1 {
    font-size: 4.2rem;
  }

  .hero-character-art {
    width: min(900px, 94vw);
    opacity: 0.42;
  }

  .portal-frame {
    grid-template-columns: 1fr;
  }

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

  .left-rail .side-panel {
    grid-column: 1 / -1;
  }

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

  .page-frame {
    grid-template-columns: 1fr;
  }

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

  .class-slider {
    min-height: 470px;
  }

  .class-slide img {
    width: min(520px, 82%);
    max-height: 350px;
  }
}

@media (max-width: 760px) {
  .status-strip {
    position: absolute;
    left: 0;
    width: 100vw;
    transform: none;
    grid-template-columns: 1fr;
    font-size: 0.72rem;
  }

  .status-strip span:nth-child(n + 3) {
    display: none;
  }

  .topbar {
    top: 60px;
    left: 0;
    width: 100vw;
    grid-template-columns: 1fr;
    justify-content: stretch;
    min-height: 186px;
    align-items: start;
    padding-block: 10px;
    transform: none;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(320px, calc(100vw - 36px));
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(224, 176, 87, 0.22);
  }

  .nav-links a {
    min-height: 30px;
    justify-content: center;
    border: 1px solid rgba(224, 176, 87, 0.2);
    border-radius: 4px;
    background: rgba(70, 24, 18, 0.45);
    font-size: 0.66rem;
  }

  .hero {
    min-height: 700px;
    padding: 292px 14px 58px;
  }

  .hero-logo h1 {
    width: 100%;
    max-width: 330px;
    margin-inline: auto;
    font-size: 2.2rem;
    line-height: 1;
  }

  .hero-logo::before,
  .hero-logo::after {
    display: none;
  }

  .hero-logo {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding-inline: 0;
  }

  .hero-character-art {
    bottom: 18px;
    width: 118vw;
    max-height: 360px;
    opacity: 0.24;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    min-width: 0;
  }

  .left-rail,
  .right-rail,
  .feature-grid,
  .tabs {
    grid-template-columns: 1fr;
  }

  .portal-frame,
  .class-showcase,
  .info-band,
  .footer {
    width: calc(100% - 22px);
  }

  .page-hero {
    min-height: 520px;
    padding: 292px 14px 56px;
  }

  .page-hero-content h1 {
    max-width: 330px;
    margin-inline: auto;
    font-size: 2.05rem;
    line-height: 1.05;
    text-wrap: balance;
  }

  .page-hero-content p:last-child {
    max-width: 330px;
    font-size: 0.95rem;
  }

  .board-title h2 {
    font-size: 1.65rem;
  }

  .portal-frame {
    padding: 12px;
  }

  .center-board,
  .info-band {
    padding: 16px;
  }

  .feature-banner {
    min-height: 180px;
    padding: 18px;
  }

  .form-grid,
  .select-row,
  .security-row,
  .download-grid,
  .download-hero-card,
  .topup-flow,
  .topup-summary,
  .topup-packages,
  .payment-preview {
    grid-template-columns: 1fr;
  }

  .choice-row {
    grid-template-columns: 1fr 1fr;
  }

  .form-board,
  .download-board {
    padding: 16px;
  }

  .class-showcase {
    padding: 16px;
  }

  .class-heading {
    flex-direction: column;
    gap: 12px;
  }

  .class-controls {
    width: 100%;
    justify-content: center;
  }

  .class-slider {
    min-height: 390px;
  }

  .class-slide {
    padding: 18px 12px 22px;
  }

  .class-slide.is-prev {
    transform: translateX(-54%) scale(0.64);
  }

  .class-slide.is-next {
    transform: translateX(54%) scale(0.64);
  }

  .class-slide img {
    width: 92%;
    max-height: 285px;
  }

  .class-slide strong {
    min-height: 56px;
    font-size: 1.22rem;
  }

  .panel-character,
  .panel-character.small {
    height: 150px;
  }

  .download-hero-card,
  .article-panel,
  .download-card {
    padding: 16px;
  }

  .download-hero-card .primary-action,
  .article-panel .secondary-action,
  .form-submit {
    width: 100%;
    min-width: 0;
  }

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

  .copy-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .qr-code-mock {
    width: 150px;
    height: 150px;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .news-item time {
    width: 118px;
  }

  .status-list li {
    justify-content: flex-start;
  }

  .status-list strong {
    margin-left: 14px;
  }

  .ranking-list li {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 8px;
  }

  .ranking-list em {
    grid-column: 2;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
