:root {
  color-scheme: dark;
  --black: #070808;
  --stone-900: #0b0d0e;
  --stone-800: #121518;
  --stone-700: #1b2023;
  --stone-600: #2b3033;
  --silver: #eee9dd;
  --silver-dim: #bcb8ad;
  --red: #b61726;
  --red-bright: #e33a42;
  --gold: #c7a25b;
  --gold-soft: #efd28a;
  --green: #62b7a5;
  --blue-steel: #8ab3c0;
  --line: rgba(238, 233, 221, 0.16);
  --line-strong: rgba(238, 233, 221, 0.28);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --font-display: "Cinzel", Georgia, serif;
  --font-serif: "Marcellus", Georgia, serif;
  --font-ui: "Rajdhani", Verdana, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --cursor-default: url("img/cursor/normal.cur"), url("img/cursor/normal.png"), auto;
  --cursor-link: url("img/cursor/link.cur"), url("img/cursor/link.png"), pointer;
  --cursor-text: url("img/cursor/text.cur"), url("img/cursor/text.png"), text;
  --cursor-alt: url("img/cursor/alternate.cur"), url("img/cursor/alternate.png"), default;
  --cursor-busy: url("img/cursor/busy.cur"), url("img/cursor/busy.png"), wait;
  --cursor-progress: url("img/cursor/wib.cur"), url("img/cursor/wib.png"), progress;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  padding-top: 76px;
  margin: 0;
  color: var(--silver);
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.5;
  background: var(--black);
  overflow-x: hidden;
  cursor: var(--cursor-default);
}

body.home-page {
  padding-top: 128px;
}

[hidden] {
  display: none !important;
}

body.has-drawer,
body.has-modal {
  overflow: hidden;
}

img,
svg {
  display: block;
}

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

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

::selection {
  color: #fff;
  background: rgba(182, 23, 38, 0.75);
}

.page-bg,
.page-bg > * {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.page-bg {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 10%, rgba(199, 162, 91, 0.13), transparent 26rem),
    linear-gradient(130deg, #080808 0%, #111517 42%, #070808 100%);
}

body > :not(.page-bg):not(.seal-field):not(.cursor-forge):not(.topbar):not(.Comeback-socials):not(.mobile-drawer):not(.drawer-backdrop) {
  position: relative;
  z-index: 1;
}

.page-bg__image {
  background: url("assets/img/bg.webp") center top / cover no-repeat;
  opacity: 0.38;
  filter: saturate(0.82) contrast(1.08) brightness(0.76);
  transform: scale(1.04);
}

.page-bg__stained {
  opacity: 0.9;
  background:
    linear-gradient(115deg, transparent 0 21%, rgba(182, 23, 38, 0.16) 21% 22%, transparent 22% 48%, rgba(199, 162, 91, 0.13) 48% 49%, transparent 49%),
    linear-gradient(64deg, transparent 0 26%, rgba(138, 179, 192, 0.08) 26% 27%, transparent 27% 62%, rgba(98, 183, 165, 0.08) 62% 63%, transparent 63%),
    repeating-linear-gradient(90deg, rgba(238, 233, 221, 0.025) 0 1px, transparent 1px 86px);
}

.page-bg__grain {
  opacity: 0.12;
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 9px 9px;
  mix-blend-mode: screen;
}

.page-bg__vignette {
  background:
    linear-gradient(180deg, rgba(7, 8, 8, 0.2), rgba(7, 8, 8, 0.75)),
    radial-gradient(circle at center, transparent 0 42%, rgba(0, 0, 0, 0.78) 100%);
}

.seal-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.seal-field span {
  position: absolute;
  width: 2px;
  height: 44px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, rgba(239, 210, 138, 0.8), transparent);
  opacity: 0;
  transform: rotate(var(--rotate, 0deg));
  animation: relic-fall var(--duration, 7s) linear infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes relic-fall {
  0% {
    opacity: 0;
    translate: 0 -12vh;
  }
  12% {
    opacity: 0.7;
  }
  82% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    translate: var(--drift, 30px) 118vh;
  }
}

.cursor-forge {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.cursor-forge span {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(239, 210, 138, 0.85);
  background: rgba(182, 23, 38, 0.55);
  transform: translate(-50%, -50%) rotate(45deg);
  animation: spark-out 0.72s var(--ease) forwards;
}

@keyframes spark-out {
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(145deg) scale(0.25);
  }
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(28px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 9, 0.76);
  backdrop-filter: blur(18px);
}

.topbar--home {
  min-height: 128px;
  display: grid;
  grid-template-rows: 76px 52px;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  padding: 0;
}

.topbar--home .topbar__main {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(28px, calc((100vw - 1240px) / 2));
}

.topbar::before {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199, 162, 91, 0.8), rgba(182, 23, 38, 0.65), transparent);
  opacity: 0.82;
}

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

.brand__mark {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(199, 162, 91, 0.28));
  animation: crest-breathe 4.4s ease-in-out infinite;
}

@keyframes crest-breathe {
  50% {
    transform: translateY(-2px) scale(1.03);
    filter: drop-shadow(0 0 24px rgba(227, 58, 66, 0.3));
  }
}

.brand__copy {
  display: grid;
  line-height: 1.05;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
  text-transform: uppercase;
}

.brand__season {
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  position: relative;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid transparent;
  color: rgba(238, 233, 221, 0.74);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
  opacity: 0;
  transform: scaleX(0.25);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  border-color: rgba(199, 162, 91, 0.32);
  background: rgba(238, 233, 221, 0.045);
  transform: translateY(-1px);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-link--siege {
  color: var(--gold-soft);
  background:
    linear-gradient(90deg, rgba(182, 23, 38, 0.18), rgba(199, 162, 91, 0.1));
  border-color: rgba(199, 162, 91, 0.28);
}

.topbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

[data-guest-only][hidden],
[data-user-only][hidden],
[data-admin-only][hidden],
.admin-entry[hidden],
.session-chip[hidden],
.drawer-session[hidden] {
  display: none !important;
}

body.is-logged-in [data-guest-only] {
  display: none !important;
}

body:not(.is-logged-in) [data-user-only],
body:not(.is-admin) [data-admin-only] {
  display: none !important;
}

.session-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 8px 0 12px;
  border: 1px solid rgba(199, 162, 91, 0.32);
  border-radius: 8px;
  color: var(--silver);
  background: rgba(238, 233, 221, 0.055);
}

.session-chip > svg {
  width: 18px;
  height: 18px;
  color: var(--gold-soft);
}

.session-chip span {
  max-width: 118px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.session-chip button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--silver-dim);
  background: transparent;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.session-chip button svg {
  width: 16px;
  height: 16px;
}

.session-chip button:hover {
  color: #fff;
  border-color: rgba(227, 58, 66, 0.45);
  background: rgba(182, 23, 38, 0.18);
}

.icon-button,
.button {
  border: 1px solid var(--line-strong);
  background: rgba(18, 21, 24, 0.82);
  color: var(--silver);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.button--sm {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 15px;
}

.button--lg {
  min-height: 54px;
  padding-inline: 24px;
}

.button--block {
  width: 100%;
}

.button--primary {
  color: #fff;
  border-color: rgba(227, 58, 66, 0.68);
  background:
    linear-gradient(180deg, rgba(227, 58, 66, 0.92), rgba(125, 13, 22, 0.92)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent);
  box-shadow: 0 12px 34px rgba(182, 23, 38, 0.28);
}

.button--gold {
  color: #111;
  border-color: rgba(239, 210, 138, 0.72);
  background: linear-gradient(180deg, #f1d98f, #b98f43);
  box-shadow: 0 12px 32px rgba(199, 162, 91, 0.18);
}

.button--ghost {
  color: var(--silver);
  background: rgba(238, 233, 221, 0.055);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 210, 138, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.hamburger {
  width: 44px;
  height: 42px;
  display: none;
  place-items: center;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(18, 21, 24, 0.8);
  cursor: pointer;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--silver);
}

.Comeback-socials {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 72;
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
}

.Comeback-socials[hidden] {
  display: none;
}

.Comeback-socials__link {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(239, 210, 138, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--social-color) 20%, transparent), transparent),
    rgba(8, 9, 9, 0.76);
  backdrop-filter: blur(12px);
  transition: transform 0.2s var(--ease), border-color 0.2s ease, background 0.2s ease;
}

.Comeback-socials__link img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.Comeback-socials__tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  min-width: max-content;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--silver);
  background: rgba(12, 14, 15, 0.94);
  opacity: 0;
  pointer-events: none;
  transform: translate(6px, -50%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.Comeback-socials__link:hover {
  transform: translateX(-4px);
  border-color: color-mix(in srgb, var(--social-color) 55%, var(--gold-soft));
}

.Comeback-socials__link:hover .Comeback-socials__tooltip {
  opacity: 1;
  transform: translate(0, -50%);
}

.mobile-drawer,
.drawer-backdrop {
  position: fixed;
  z-index: 95;
}

.drawer-backdrop {
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}

.mobile-drawer {
  top: 0;
  right: 0;
  width: min(380px, 92vw);
  height: 100dvh;
  padding: 18px;
  border-left: 1px solid rgba(199, 162, 91, 0.34);
  background:
    linear-gradient(120deg, rgba(182, 23, 38, 0.08), transparent 34%),
    rgba(9, 11, 12, 0.96);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 0.26s var(--ease);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.mobile-drawer__head img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.mobile-drawer__head div {
  flex: 1;
  display: grid;
  line-height: 1.12;
}

.mobile-drawer__head strong {
  font-family: var(--font-display);
  text-transform: uppercase;
}

.mobile-drawer__head span {
  color: var(--gold-soft);
  font-size: 14px;
}

.mobile-drawer__nav {
  display: grid;
  gap: 8px;
  padding: 18px 0;
}

.mobile-drawer__nav a {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(238, 233, 221, 0.035);
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-drawer__nav svg {
  width: 19px;
  height: 19px;
  color: var(--gold-soft);
}

.drawer-session {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(238, 233, 221, 0.035);
}

.drawer-session span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gold-soft);
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-session svg {
  width: 18px;
  height: 18px;
}

.server-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  margin: 0;
  padding-inline: max(28px, calc((100vw - 1240px) / 2));
  border-top: 1px solid rgba(238, 233, 221, 0.1);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent, rgba(199, 162, 91, 0.08), transparent),
    rgba(8, 9, 9, 0.54);
  overflow: hidden;
}

.server-strip__item {
  min-height: 51px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border-inline: 1px solid rgba(238, 233, 221, 0.08);
  background: rgba(8, 9, 9, 0.64);
}

.server-strip__item svg {
  width: 19px;
  height: 19px;
  color: var(--gold-soft);
}

.server-strip__item span {
  color: var(--silver-dim);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.server-strip__item strong {
  margin-left: auto;
  color: #fff;
  font-size: 17px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-strip__item strong.is-online {
  color: #8ef0c9;
  text-shadow: 0 0 14px rgba(98, 183, 165, 0.45);
}

main {
  overflow: hidden;
}

.hero,
.section,
.edict-slider,
.footer {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  min-height: calc(100dvh - 128px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(390px, 0.98fr);
  align-items: center;
  gap: 34px;
  padding: 58px 0 48px;
}

.hero__left {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gold-soft);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow svg {
  width: 17px;
  height: 17px;
}

.hero h1,
.section h2,
.edict h2,
.siege h2,
.download h2,
.modal h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 0.95;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 20px;
  font-size: 106px;
  font-weight: 900;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.45),
    0 0 34px rgba(182, 23, 38, 0.18);
}

.hero h1 span {
  display: block;
  color: #f8f3e7;
  background: linear-gradient(180deg, #fff, #cfc7b7 54%, #f7e3a1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 small {
  display: inline-block;
  margin-top: 4px;
  color: var(--red-bright);
  font-size: 66px;
  text-shadow: 0 0 18px rgba(227, 58, 66, 0.32);
}

.hero__lead {
  max-width: 640px;
  margin: 24px 0 0;
  color: rgba(238, 233, 221, 0.82);
  font-family: var(--font-serif);
  font-size: 23px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero__stats span {
  min-width: 126px;
  display: grid;
  gap: 2px;
  padding: 13px 14px;
  border: 1px solid rgba(238, 233, 221, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(238, 233, 221, 0.08), rgba(238, 233, 221, 0.02)),
    rgba(12, 14, 15, 0.7);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
  transition: transform 0.22s var(--ease), border-color 0.22s ease;
}

.hero__stats span:hover {
  border-color: rgba(239, 210, 138, 0.58);
  transform: translateY(-3px);
}

.hero__stats b {
  color: var(--gold-soft);
  font-size: 13px;
}

.hero__stats em {
  color: var(--blue-steel);
  font-size: 13px;
  font-style: normal;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__right {
  min-height: 570px;
  display: grid;
  place-items: center;
}

.crest-stage {
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.crest-stage__ring {
  position: absolute;
  inset: 6%;
  border: 2px solid rgba(199, 162, 91, 0.52);
  border-radius: 50%;
  background:
    conic-gradient(from 25deg, transparent 0 12%, rgba(182, 23, 38, 0.35) 12% 13%, transparent 13% 38%, rgba(239, 210, 138, 0.28) 38% 39%, transparent 39% 68%, rgba(98, 183, 165, 0.16) 68% 69%, transparent 69%),
    radial-gradient(circle, rgba(238, 233, 221, 0.08), transparent 62%);
  box-shadow:
    inset 0 0 50px rgba(0, 0, 0, 0.75),
    0 0 60px rgba(199, 162, 91, 0.14);
  animation: rotate-seal 28s linear infinite;
}

@keyframes rotate-seal {
  to {
    transform: rotate(360deg);
  }
}

.crest-stage__logo {
  position: relative;
  z-index: 2;
  width: 92%;
  max-height: 92%;
  object-fit: contain;
  filter:
    drop-shadow(0 28px 38px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 22px rgba(199, 162, 91, 0.18));
  animation: crest-float 5.4s ease-in-out infinite;
}

@keyframes crest-float {
  50% {
    transform: translateY(-10px);
  }
}

.crest-stage__beam {
  position: absolute;
  width: 72%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(239, 210, 138, 0.75), transparent);
  opacity: 0.5;
  transform-origin: center;
}

.crest-stage__beam--one {
  transform: rotate(38deg);
  animation: beam-pulse 3.2s ease-in-out infinite;
}

.crest-stage__beam--two {
  transform: rotate(-42deg);
  animation: beam-pulse 3.2s ease-in-out infinite 1.2s;
}

@keyframes beam-pulse {
  50% {
    opacity: 0.1;
    scale: 0.72 1;
  }
}

.edict-slider {
  position: relative;
  margin-top: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(182, 23, 38, 0.16), transparent 36%),
    linear-gradient(270deg, rgba(98, 183, 165, 0.08), transparent 45%),
    rgba(12, 14, 15, 0.88);
  box-shadow: var(--shadow);
}

.edict-slider::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(199, 162, 91, 0.18);
  pointer-events: none;
}

.edict-slider__viewport {
  position: relative;
  min-height: 272px;
}

.edict {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  padding: 44px 46px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(32px);
  transition: opacity 0.42s ease, transform 0.42s var(--ease);
}

.edict.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.edict span {
  color: var(--gold-soft);
  font-weight: 900;
  text-transform: uppercase;
}

.edict h2 {
  max-width: 700px;
  font-size: 46px;
}

.edict p {
  max-width: 660px;
  margin: 0;
  color: rgba(238, 233, 221, 0.8);
  font-family: var(--font-serif);
  font-size: 21px;
}

.edict-slider__controls {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.edict-slider__dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.edict-slider__dots button {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 8px;
  background: rgba(238, 233, 221, 0.2);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.edict-slider__dots button.is-active {
  width: 44px;
  background: var(--gold-soft);
}

.section {
  padding: 92px 0 0;
}

.section__head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section__head h2 {
  margin-top: 12px;
  font-size: 56px;
}

.section__head p {
  margin: 14px 0 0;
  color: rgba(238, 233, 221, 0.78);
  font-family: var(--font-serif);
  font-size: 21px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
}

.podium,
.ranking-panel,
.benefit-panel {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(238, 233, 221, 0.065), rgba(238, 233, 221, 0.025)),
    rgba(11, 13, 14, 0.9);
  box-shadow: var(--shadow);
}

.podium {
  position: relative;
  min-height: 430px;
  display: grid;
  align-content: end;
  justify-items: center;
  padding: 28px;
  overflow: hidden;
}

.podium::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(199, 162, 91, 0.24);
  transform: rotate(45deg);
}

.podium__label {
  position: absolute;
  top: 22px;
  left: 22px;
  color: var(--gold-soft);
  font-weight: 900;
  text-transform: uppercase;
}

.podium img {
  position: relative;
  z-index: 1;
  width: 210px;
  height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.5));
  animation: champion-glow 2.8s ease-in-out infinite;
}

@keyframes champion-glow {
  50% {
    filter:
      drop-shadow(0 24px 22px rgba(0, 0, 0, 0.5))
      drop-shadow(0 0 18px rgba(239, 210, 138, 0.42));
  }
}

.podium h3 {
  position: relative;
  z-index: 1;
  margin: 8px 0 2px;
  font-family: var(--font-display);
  font-size: 29px;
  text-transform: uppercase;
}

.podium p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--silver-dim);
}

.podium__seal {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: var(--red-bright);
  opacity: 0.72;
}

.ranking-panel {
  overflow: hidden;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  overflow-x: auto;
}

.tabs--center {
  justify-content: center;
}

.tab {
  min-width: max-content;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--silver-dim);
  background: rgba(238, 233, 221, 0.035);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s var(--ease);
}

.tab:hover {
  color: #fff;
  transform: translateY(-1px);
}

.tab.is-active {
  color: #111;
  border-color: rgba(239, 210, 138, 0.76);
  background: linear-gradient(180deg, #f2d98e, #b99143);
}

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 14px;
  color: var(--silver-dim);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.table-tools label {
  display: flex;
  align-items: center;
  gap: 8px;
}

select {
  min-height: 36px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--silver);
  background: #0f1213;
}

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

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.ranking-table th,
.ranking-table td {
  padding: 14px 16px;
  border-top: 1px solid rgba(238, 233, 221, 0.08);
  text-align: left;
}

.ranking-table th {
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.16);
}

.ranking-table tr {
  animation: row-in 0.34s var(--ease) both;
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.ranking-table tbody tr {
  transition: background 0.18s ease;
}

.ranking-table tbody tr:hover {
  background: rgba(182, 23, 38, 0.12);
}

.rank-player {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.rank-player img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: 1px solid rgba(199, 162, 91, 0.32);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 14px;
}

.class-card {
  position: relative;
  min-height: 430px;
  display: grid;
  align-content: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 0 24%, rgba(7, 8, 8, 0.92) 78%),
    rgba(18, 21, 24, 0.66);
  transition: transform 0.25s var(--ease), border-color 0.25s ease, box-shadow 0.25s ease;
}

.class-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--class-color) 38%, transparent), transparent 36%),
    radial-gradient(circle at center 28%, color-mix(in srgb, var(--class-color) 22%, transparent), transparent 44%);
  opacity: 0.55;
  transition: opacity 0.25s ease;
}

.class-card img {
  position: absolute;
  top: 28px;
  left: 50%;
  width: 82%;
  height: 245px;
  object-fit: contain;
  transform: translateX(-50%);
  filter:
    drop-shadow(0 26px 24px rgba(0, 0, 0, 0.55))
    saturate(0.86);
  transition: transform 0.45s var(--ease), filter 0.25s ease;
}

.class-card__content {
  position: relative;
  z-index: 1;
}

.class-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  text-transform: uppercase;
}

.class-card__role {
  display: block;
  color: var(--gold-soft);
  font-weight: 900;
  text-transform: uppercase;
}

.class-card__reveal {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease), margin 0.35s var(--ease), opacity 0.22s ease;
}

.class-card__reveal p {
  margin: 0 0 10px;
  color: rgba(238, 233, 221, 0.78);
  font-family: var(--font-serif);
  font-size: 17px;
}

.class-card__bars {
  display: grid;
  gap: 7px;
}

.class-card__bars span {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--silver-dim);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.class-card__bars i {
  height: 6px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--class-color) var(--bar), rgba(238, 233, 221, 0.12) 0);
}

.class-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--class-color) 72%, white);
  box-shadow: 0 18px 54px color-mix(in srgb, var(--class-color) 18%, transparent);
}

.class-card:hover::before {
  opacity: 0.86;
}

.class-card:hover img {
  transform: translateX(-50%) translateY(-10px) scale(1.06);
  filter:
    drop-shadow(0 26px 24px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 16px color-mix(in srgb, var(--class-color) 54%, transparent))
    saturate(1.04);
}

.class-card:hover .class-card__reveal {
  max-height: 180px;
  margin-top: 12px;
  opacity: 1;
}

.benefit-panel {
  padding: 0 18px 18px;
}

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

.benefit-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(238, 233, 221, 0.035);
  transform: translateY(0);
  animation: benefit-in 0.36s var(--ease) both;
}

@keyframes benefit-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.benefit-card span {
  color: var(--silver-dim);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.benefit-card strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: 30px;
}

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

.event-card {
  --event-accent: var(--gold);
  --event-accent-soft: rgba(239, 210, 138, 0.24);
  --event-progress: 0%;
  position: relative;
  min-height: 236px;
  display: grid;
  align-content: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(199, 162, 91, 0.1), transparent 48%),
    rgba(18, 21, 24, 0.82);
  cursor: pointer;
  transition: transform 0.24s var(--ease), border-color 0.24s ease;
}

.event-card[data-event-status="active"] {
  --event-accent: #72f0b4;
  --event-accent-soft: rgba(114, 240, 180, 0.24);
}

.event-card img {
  position: absolute;
  inset: 8px 10px 56px;
  width: 100%;
  width: calc(100% - 20px);
  height: calc(100% - 64px);
  object-fit: contain;
  object-position: center top;
  opacity: 0.58;
  filter: grayscale(0.06) contrast(1.08) drop-shadow(0 16px 28px rgba(0, 0, 0, 0.58));
  transition: transform 0.45s var(--ease), opacity 0.24s ease;
}

.event-card img[data-event-managed] {
  padding: 6px;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.58));
}

.event-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 8, 8, 0.08) 0 22%, rgba(7, 8, 8, 0.5) 56%, rgba(7, 8, 8, 0.96) 92%),
    linear-gradient(90deg, rgba(182, 23, 38, 0.22), transparent 32%, rgba(0, 0, 0, 0.28) 72%),
    radial-gradient(circle at 50% 18%, transparent 0 28%, rgba(0, 0, 0, 0.28) 74%);
}

.event-card__content {
  position: relative;
  z-index: 1;
}

.event-card__state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--event-accent) 56%, transparent);
  border-radius: 999px;
  color: var(--event-accent);
  background: rgba(0, 0, 0, 0.36);
  box-shadow: 0 0 22px var(--event-accent-soft);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.event-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  text-transform: uppercase;
}

.event-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.event-card__meta span {
  padding: 5px 8px;
  border: 1px solid rgba(238, 233, 221, 0.16);
  border-radius: 8px;
  color: var(--gold-soft);
  background: rgba(0, 0, 0, 0.25);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.event-card__details {
  max-height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  color: rgba(238, 233, 221, 0.82);
  font-family: var(--font-serif);
  transition: max-height 0.34s var(--ease), margin 0.34s var(--ease), opacity 0.22s ease;
}

.event-card__charge {
  position: relative;
  z-index: 1;
  height: 4px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(238, 233, 221, 0.1);
  box-shadow: inset 0 0 0 1px rgba(238, 233, 221, 0.08);
}

.event-card__charge i {
  position: absolute;
  inset: 0 auto 0 0;
  width: max(18px, var(--event-progress));
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent),
    linear-gradient(90deg, #a81220, var(--event-accent));
  box-shadow: 0 0 18px var(--event-accent-soft);
  animation: eventCharge 1.6s linear infinite;
}

@keyframes eventCharge {
  from {
    background-position: -120px 0, 0 0;
  }

  to {
    background-position: 120px 0, 0 0;
  }
}

.event-card:hover,
.event-card.is-expanded {
  transform: translateY(-5px);
  border-color: rgba(239, 210, 138, 0.58);
}

.event-card:hover img,
.event-card.is-expanded img {
  opacity: 0.82;
  transform: scale(1.03);
}

.event-card.is-expanded .event-card__details {
  max-height: 130px;
  margin-top: 12px;
  opacity: 1;
}

.event-grid[data-state="empty"],
.event-grid[data-state="error"] {
  display: block;
}

.mu-state {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 21, 24, 0.78);
  color: var(--silver-dim);
}

.mu-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-soft);
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
}

.mu-state--error strong {
  color: var(--red-bright);
}

.siege,
.download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  border: 1px solid rgba(199, 162, 91, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(182, 23, 38, 0.17), transparent 40%),
    linear-gradient(270deg, rgba(98, 183, 165, 0.1), transparent 46%),
    rgba(11, 13, 14, 0.9);
  box-shadow: var(--shadow);
}

.siege h2,
.download h2 {
  margin-top: 10px;
  font-size: 42px;
}

.siege p,
.download p {
  max-width: 650px;
  margin: 12px 0 0;
  color: rgba(238, 233, 221, 0.8);
  font-family: var(--font-serif);
}

.siege__timer {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  gap: 10px;
  flex-shrink: 0;
}

.siege__timer span {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--silver-dim);
  background: rgba(0, 0, 0, 0.22);
  font-weight: 900;
  text-transform: uppercase;
}

.siege__timer b {
  color: var(--gold-soft);
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
}

.gallery {
  position: relative;
  min-height: 360px;
  display: grid;
  align-items: center;
}

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

.gallery__empty {
  grid-column: 1 / -1;
}

.gallery__item {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(18, 21, 24, 0.74);
  cursor: pointer;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.1);
  transition: transform 0.4s var(--ease), filter 0.22s ease;
}

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(199, 162, 91, 0.22);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.22s ease, transform 0.22s var(--ease);
}

.gallery__item:hover img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.12);
}

.gallery__item:hover::after {
  opacity: 1;
  transform: scale(1);
}

.gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
}

.gallery__nav:hover {
  transform: translateY(-50%) translateY(-2px);
}

.gallery__nav--prev {
  left: -18px;
}

.gallery__nav--next {
  right: -18px;
}

.download-section {
  padding-bottom: 52px;
}

.download__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.footer {
  min-height: 116px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 24px 34px;
  border-top: 1px solid var(--line);
  color: var(--silver-dim);
}

.footer img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.footer div {
  display: grid;
  flex: 1;
}

.footer strong {
  color: #fff;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.footer a {
  color: var(--gold-soft);
  font-weight: 900;
  text-transform: uppercase;
}

.modal {
  width: min(560px, calc(100% - 28px));
  padding: 0;
  border: 0;
  color: var(--silver);
  background: transparent;
}

.modal[open] {
  position: fixed;
  inset: 0;
  max-height: calc(100dvh - 28px);
  margin: auto;
}

.modal[open]:not(.lightbox) {
  overflow: auto;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.modal__panel {
  position: relative;
  padding: 30px;
  border: 1px solid rgba(199, 162, 91, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(182, 23, 38, 0.12), transparent 42%),
    rgba(10, 12, 13, 0.98);
  box-shadow: var(--shadow);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.modal h2 {
  margin-top: 10px;
  font-size: 38px;
}

.auth-form {
  display: none;
  gap: 12px;
  margin-top: 6px;
}

.auth-form.is-active {
  display: grid;
}

label {
  display: grid;
  gap: 7px;
  color: var(--silver-dim);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

input {
  min-height: 46px;
  width: 100%;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus {
  border-color: rgba(239, 210, 138, 0.7);
  box-shadow: 0 0 0 3px rgba(199, 162, 91, 0.13);
}

.form-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--gold-soft);
}

.download-options {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.download-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(238, 233, 221, 0.035);
  transition: transform 0.2s var(--ease), border-color 0.2s ease, background 0.2s ease;
}

.download-option svg {
  width: 24px;
  height: 24px;
  color: var(--gold-soft);
}

.download-option span {
  display: grid;
}

.download-option small {
  color: var(--silver-dim);
}

.download-option:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 210, 138, 0.58);
  background: rgba(238, 233, 221, 0.07);
}

.lightbox {
  width: min(1180px, calc(100% - 28px));
  overflow: visible;
}

.lightbox img {
  width: 100%;
  max-height: 82dvh;
  object-fit: contain;
  border: 1px solid rgba(199, 162, 91, 0.34);
  border-radius: 8px;
  background: #050505;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 50px;
  height: 50px;
  transform: translateY(-50%);
}

.lightbox__nav:hover {
  transform: translateY(-50%) scale(1.04);
}

.lightbox__nav--prev {
  left: -68px;
}

.lightbox__nav--next {
  right: -68px;
}

.lightbox__nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.system-main {
  min-height: calc(100vh - 90px);
  padding: 56px clamp(18px, 4vw, 72px) 80px;
}

.system-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: 28px;
  align-items: end;
  max-width: 1320px;
  margin: 0 auto 28px;
}

.system-hero h1 {
  max-width: 840px;
  margin: 10px 0;
  font-size: clamp(46px, 8vw, 104px);
  line-height: 0.9;
  text-transform: uppercase;
}

.system-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(238, 233, 221, 0.78);
  font-family: var(--font-serif);
  font-size: 22px;
}

.system-hero__actions,
.system-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.system-panel,
.wallet-panel,
.profile-panel,
.market-card,
.shop-card,
.castle-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(182, 23, 38, 0.13), transparent 34%),
    rgba(13, 15, 17, 0.86);
  box-shadow: var(--shadow);
}

.system-panel {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 30px);
}

.wallet-panel {
  padding: 18px;
}

.wallet-panel h2,
.system-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.wallet-grid,
.profile-stats,
.castle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wallet-grid span,
.profile-stats span,
.castle-grid span {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid rgba(238, 233, 221, 0.13);
  border-radius: 8px;
  background: rgba(238, 233, 221, 0.045);
  color: var(--silver-dim);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.wallet-grid b,
.profile-stats b,
.castle-grid b {
  color: #fff;
  font-family: var(--font-display);
  font-size: 25px;
}

.system-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.system-tab {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--silver);
  background: rgba(238, 233, 221, 0.055);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.system-tab.is-active {
  border-color: rgba(239, 210, 138, 0.65);
  color: #111;
  background: linear-gradient(180deg, #f1d98f, #b98f43);
}

.system-view[hidden] {
  display: none !important;
}

.market-grid,
.shop-grid,
.warehouse-grid,
.characters-grid,
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.shop-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
}

.market-card,
.shop-card,
.character-card,
.equipment-slot {
  position: relative;
  padding: 18px;
  overflow: hidden;
}

.market-card figure,
.shop-card figure,
.equipment-slot figure {
  display: grid;
  min-height: 86px;
  margin: 0 0 12px;
  place-items: center;
}

[data-mu-item-icon] {
  max-width: 80px;
  max-height: 80px;
  image-rendering: auto;
}

.market-card h3,
.shop-card h3,
.character-card h3,
.profile-panel h2 {
  margin: 0 0 8px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  text-transform: uppercase;
}

.market-card p,
.shop-card p,
.character-card p {
  margin: 0 0 12px;
  color: var(--silver-dim);
}

.market-card__price,
.shop-card__price {
  color: var(--gold-soft);
  font-weight: 900;
  text-transform: uppercase;
}

.shop-card__price {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(239, 210, 138, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(239, 210, 138, 0.1), rgba(182, 23, 38, 0.08));
}

.shop-card__price span {
  color: var(--silver-dim);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.shop-card__price b {
  color: var(--gold-soft);
  font-size: 22px;
}

.shop-card__preview {
  min-height: 22px;
  color: rgba(238, 233, 221, 0.68);
  font-size: 14px;
  font-weight: 800;
}

.system-form {
  display: grid;
  gap: 10px;
}

.system-form label {
  display: grid;
  gap: 6px;
  color: var(--silver-dim);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.system-form input,
.system-form select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--silver);
  background: rgba(7, 8, 8, 0.72);
}

.system-form select,
.system-form option {
  color: #fff;
  background: #0b0d0e;
}

.system-form input[type="checkbox"] {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  accent-color: var(--red-bright);
}

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

.option-row__title {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.option-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(238, 233, 221, 0.04);
}

.option-row label.shop-select-field {
  display: grid;
  grid-template-columns: minmax(72px, 0.35fr) minmax(96px, 1fr);
  align-items: center;
  column-gap: 10px;
}

.shop-select-field span,
.shop-check-field span,
.shop-excellent-field span {
  min-width: 0;
  overflow: hidden;
  color: rgba(238, 233, 221, 0.82);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-select-field select {
  min-width: 78px;
  padding-inline: 10px;
  font-weight: 900;
}

.shop-card [data-shop-exc] {
  grid-template-columns: 1fr;
}

.option-row label.shop-check-field,
.option-row label.shop-excellent-field {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
}

.shop-check-field span,
.shop-excellent-field span {
  white-space: normal;
}

.shop-excellent-field input {
  grid-row: 1 / span 2;
  margin-top: 2px;
}

.shop-excellent-field small {
  grid-column: 2;
  min-width: 0;
  color: rgba(238, 233, 221, 0.62);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
}

.option-row label.is-disabled {
  opacity: 0.42;
}

.system-message {
  min-height: 24px;
  margin-top: 14px;
  color: var(--gold-soft);
  font-weight: 800;
}

.system-message.is-error {
  color: var(--red-bright);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
  gap: 18px;
}

.profile-panel {
  padding: clamp(18px, 3vw, 28px);
}

.profile-rail {
  max-width: 1320px;
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(199, 162, 91, 0.1), transparent 35%),
    rgba(9, 11, 12, 0.82);
  box-shadow: var(--shadow);
}

.profile-rail__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.profile-rail__head strong {
  color: var(--gold-soft);
  font-weight: 900;
  text-transform: uppercase;
}

.profile-character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.profile-character {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid rgba(238, 233, 221, 0.13);
  border-radius: 8px;
  background: rgba(238, 233, 221, 0.04);
  transition: transform 0.18s var(--ease), border-color 0.18s ease, background 0.18s ease;
}

.profile-character:hover,
.profile-character.is-active {
  transform: translateY(-2px);
  border-color: rgba(239, 210, 138, 0.62);
  background: rgba(239, 210, 138, 0.08);
}

.profile-character img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.profile-character span {
  display: grid;
  min-width: 0;
}

.profile-character strong {
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  text-transform: uppercase;
}

.profile-character small {
  color: var(--silver-dim);
  font-size: 13px;
}

.profile-banner {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.profile-banner img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  border: 1px solid rgba(239, 210, 138, 0.24);
  border-radius: 8px;
  background: rgba(5, 6, 7, 0.72);
}

.profile-banner h2 {
  margin: 4px 0 2px;
  color: #fff;
  font-size: clamp(30px, 4vw, 48px);
}

.profile-banner p,
.profile-location {
  margin: 0;
  color: rgba(238, 233, 221, 0.72);
}

.profile-status {
  align-self: start;
  padding: 7px 10px;
  border: 1px solid rgba(238, 233, 221, 0.16);
  border-radius: 8px;
  color: var(--silver-dim);
  background: rgba(238, 233, 221, 0.04);
  font-weight: 900;
  text-transform: uppercase;
}

.profile-status.is-online {
  color: #8ef0c9;
  border-color: rgba(98, 183, 165, 0.48);
  background: rgba(98, 183, 165, 0.08);
}

.profile-stat-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat-board span {
  min-height: 76px;
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid rgba(238, 233, 221, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(239, 210, 138, 0.06), transparent 50%),
    rgba(238, 233, 221, 0.04);
}

.profile-stat-board small {
  color: var(--silver-dim);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-stat-board b {
  color: #fff;
  font-family: var(--font-display);
  font-size: 25px;
}

.profile-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-weight: 800;
}

.profile-location svg {
  width: 17px;
  height: 17px;
  color: var(--gold-soft);
}

.profile-panel__title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.profile-panel__title h2 {
  margin: 0;
}

.character-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(238, 233, 221, 0.045);
}

.equipment-showcase {
  display: grid;
  grid-template-columns: minmax(270px, 380px) minmax(220px, 1fr);
  gap: 18px;
  align-items: start;
}

.equipment-board {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 270 / 250;
  margin-inline: auto;
  border: 1px solid rgba(239, 210, 138, 0.25);
  border-radius: 8px;
  background: url("assets/img/inventory/equipment_bg.webp") center / 100% 100% no-repeat;
  box-shadow:
    inset 0 0 42px rgba(0, 0, 0, 0.55),
    0 24px 54px rgba(0, 0, 0, 0.36);
}

.equipment-board::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 38%, rgba(239, 210, 138, 0.08), transparent 62%);
  pointer-events: none;
}

.equipment-slot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w, 22%);
  height: var(--h, 22%);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: help;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.equipment-slot:hover {
  z-index: 4;
  border-color: rgba(239, 210, 138, 0.7);
  background: rgba(239, 210, 138, 0.08);
  transform: translate(-50%, -50%) scale(1.06);
}

.equipment-slot--0 { --x: 20%; --y: 49%; --w: 25%; --h: 40%; }
.equipment-slot--1 { --x: 86%; --y: 49%; --w: 25%; --h: 40%; }
.equipment-slot--2 { --x: 51%; --y: 15%; --w: 24%; --h: 27%; }
.equipment-slot--3 { --x: 50%; --y: 48%; --w: 25%; --h: 31%; }
.equipment-slot--4 { --x: 51%; --y: 86%; --w: 24%; --h: 28%; }
.equipment-slot--5 { --x: 14%; --y: 86%; --w: 27%; --h: 28%; }
.equipment-slot--6 { --x: 86%; --y: 86%; --w: 26%; --h: 28%; }
.equipment-slot--7 { --x: 84%; --y: 15%; --w: 33%; --h: 27%; }
.equipment-slot--8 { --x: 14%; --y: 15%; --w: 28%; --h: 27%; }
.equipment-slot--9 { --x: 35%; --y: 36%; --w: 12%; --h: 13%; }
.equipment-slot--10 { --x: 35%; --y: 79%; --w: 12%; --h: 13%; }
.equipment-slot--11 { --x: 65%; --y: 79%; --w: 12%; --h: 13%; }

.equipment-board [data-mu-item-icon] {
  max-width: 86%;
  max-height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.7));
}

.equipment-list {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.equipment-piece {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 8px 10px;
  border: 1px solid rgba(238, 233, 221, 0.12);
  border-radius: 8px;
  background: rgba(238, 233, 221, 0.04);
}

.equipment-piece figure {
  display: grid;
  place-items: center;
  min-height: 46px;
  margin: 0;
}

.equipment-piece [data-mu-item-icon] {
  max-width: 46px;
  max-height: 46px;
}

.equipment-piece span {
  display: grid;
  min-width: 0;
}

.equipment-piece strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.equipment-piece small {
  color: var(--silver-dim);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.rank-profile-link {
  color: #fff;
  border-bottom: 1px solid rgba(239, 210, 138, 0.52);
}

.rank-profile-link--disabled {
  border-bottom: 0;
  color: rgba(238, 233, 221, 0.72);
  cursor: var(--cursor-default), default;
}

.mu-tooltip {
  max-width: 280px;
  padding: 12px 14px;
  border: 1px solid rgba(239, 210, 138, 0.55);
  border-radius: 8px;
  color: var(--silver);
  background: rgba(5, 6, 7, 0.95);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  font-size: 14px;
}

.mu-tooltip__name {
  margin-bottom: 8px;
  color: var(--gold-soft);
  font-family: var(--font-display);
  font-size: 17px;
}

.mu-tooltip__name--excellent,
.mu-tooltip__line--excellent {
  color: #72d6ff;
}

.mu-tooltip__name--ancient,
.mu-tooltip__line--ancient {
  color: #8dff92;
}

.mu-tooltip__line--luck,
.mu-tooltip__line--skill {
  color: #f5d36c;
}

.castle-cycle {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.castle-cycle span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--silver-dim);
  background: rgba(238, 233, 221, 0.04);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.castle-cycle span.is-active {
  color: #111;
  border-color: rgba(239, 210, 138, 0.7);
  background: linear-gradient(180deg, #f1d98f, #b98f43);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.64s ease, transform 0.64s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .cursor-forge,
  .seal-field {
    display: none;
  }
}

@media (max-width: 1220px) {
  .topbar--home .topbar__main {
    padding-inline: 20px;
  }

  .topbar__nav {
    display: none;
  }

  .hamburger {
    display: grid;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding-top: 58px;
  }

  .hero__right {
    min-height: 420px;
    order: -1;
  }

  .crest-stage {
    width: min(460px, 86vw);
  }

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

@media (max-width: 920px) {
  body {
    font-size: 17px;
  }

  .system-main {
    padding: 42px 16px 56px;
  }

  .system-hero,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .system-hero h1 {
    font-size: 58px;
  }

  .wallet-grid,
  .profile-stats,
  .profile-stat-board,
  .castle-grid,
  .castle-cycle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-banner {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .profile-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .equipment-showcase {
    grid-template-columns: 1fr;
  }

  .Comeback-socials {
    right: 12px;
    top: auto;
    bottom: 12px;
    grid-auto-flow: column;
    transform: none;
  }

  .Comeback-socials__tooltip {
    display: none;
  }

  .server-strip {
    grid-template-columns: repeat(4, minmax(168px, 1fr));
    padding-inline: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .hero,
  .section,
  .edict-slider,
  .footer {
    width: min(100% - 24px, 1240px);
  }

  .hero h1 {
    font-size: 76px;
  }

  .hero h1 small {
    font-size: 48px;
  }

  .section__head h2 {
    font-size: 42px;
  }

  .edict h2,
  .siege h2,
  .download h2 {
    font-size: 34px;
  }

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

  .siege,
  .download {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .gallery__item:not(.is-active) {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    padding-top: 66px;
  }

  body.home-page {
    padding-top: 118px;
  }

  .topbar {
    min-height: 66px;
    gap: 10px;
  }

  .topbar--home {
    min-height: 118px;
    grid-template-rows: 66px 52px;
    gap: 0;
  }

  .topbar--home .topbar__main {
    min-height: 66px;
    gap: 10px;
    padding: 7px 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand__mark {
    width: 48px;
    height: 48px;
  }

  .brand__name {
    font-size: 17px;
  }

  .brand__season {
    font-size: 12px;
  }

  .topbar__actions .button {
    display: none;
  }

  .session-chip {
    padding-inline: 8px;
  }

  .session-chip span {
    display: none;
  }

  .server-strip {
    grid-template-columns: repeat(4, minmax(156px, 1fr));
  }

  .system-hero h1 {
    font-size: 44px;
  }

  .system-hero p {
    font-size: 18px;
  }

  .wallet-grid,
  .profile-stats,
  .profile-stat-board,
  .castle-grid,
  .castle-cycle,
  .option-row {
    grid-template-columns: 1fr;
  }

  .profile-character-grid {
    grid-template-columns: 1fr;
  }

  .profile-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-banner img,
  .profile-status {
    justify-self: center;
  }

  .profile-location {
    justify-content: center;
  }

  .market-grid,
  .shop-grid,
  .warehouse-grid,
  .characters-grid,
  .equipment-grid {
    grid-template-columns: 1fr;
  }

  .server-strip__item {
    min-height: 50px;
    padding-inline: 12px;
  }

  .hero {
    padding-top: 36px;
    gap: 10px;
  }

  .hero__right {
    min-height: 300px;
  }

  .hero h1 {
    font-size: 54px;
  }

  .hero h1 small {
    font-size: 35px;
  }

  .hero__lead,
  .section__head p,
  .edict p {
    font-size: 18px;
  }

  .hero__stats span {
    min-width: calc(50% - 6px);
  }

  .hero__actions .button {
    width: 100%;
  }

  .edict-slider__viewport {
    min-height: 390px;
  }

  .edict {
    padding: 32px 22px 86px;
  }

  .edict-slider__controls {
    left: 22px;
    right: auto;
    bottom: 22px;
  }

  .ranking-layout,
  .benefit-grid,
  .event-grid,
  .class-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 64px;
  }

  .section__head h2,
  .modal h2 {
    font-size: 34px;
  }

  .podium {
    min-height: 350px;
  }

  .class-card {
    min-height: 380px;
  }

  .class-card__reveal {
    max-height: 180px;
    margin-top: 12px;
    opacity: 1;
  }

  .tabs--center {
    justify-content: flex-start;
  }

  .siege,
  .download {
    padding: 22px;
  }

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

  .download__actions .button {
    width: 100%;
  }

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

@media (hover: hover) and (pointer: fine) {
  html,
  body {
    cursor: var(--cursor-default);
  }

  a,
  button,
  [role="button"],
  label,
  summary,
  .button,
  .icon-button,
  .hamburger,
  .tab,
  .admin-tab,
  [data-drawer-link],
  [data-slider-prev],
  [data-slider-next],
  [data-gallery-prev],
  [data-gallery-next],
  [data-mu-tooltip] {
    cursor: var(--cursor-link) !important;
  }

  input,
  textarea,
  select,
  option,
  [contenteditable="true"] {
    cursor: var(--cursor-text) !important;
  }

  button:disabled,
  input:disabled,
  select:disabled,
  textarea:disabled,
  [aria-disabled="true"],
  .is-disabled {
    cursor: var(--cursor-alt) !important;
  }

  body.is-loading,
  [aria-busy="true"],
  .mu-state strong {
    cursor: var(--cursor-progress);
  }
}

@media (hover: none), (pointer: coarse) {
  html,
  body,
  a,
  button,
  input,
  textarea,
  select {
    cursor: auto;
  }
}
