/* Fan-site visuals: Kingdom Guard art belongs to Tap4fun (Hong Kong) Limited, sourced from kg.tap4fun.com. */
:root {
  --void: #05060b;
  --navy: #0a1020;
  --ink: #10151f;
  --stone: #141820;
  --panel: #16141c;
  --gold: #c9a227;
  --gold-hi: #f3d98a;
  --gold-mid: #d4af37;
  --gold-lo: #7a5c1e;
  --bronze: #a67c4e;
  --crimson: #8e1a2b;
  --crimson-hi: #c51f36;
  --cream: #efe6d2;
  --mute: #9b927c;
  --line: rgba(201, 162, 39, 0.38);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  --font-display: "Cinzel", "Cormorant Garamond", serif;
  --font-title: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(36, 48, 78, 0.45), transparent 60%),
    var(--void);
}

img,
svg { max-width: 100%; display: block; }

a {
  color: var(--gold-hi);
  text-decoration: none;
}

a:hover { color: #fff4c8; }

:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 80;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--gold-hi);
}

.skip:focus { top: 12px; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(5, 6, 11, 0.72), rgba(5, 6, 11, 0.28));
  backdrop-filter: blur(10px);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.top.is-scrolled {
  background: rgba(5, 6, 11, 0.92);
  border-bottom-color: var(--line);
}

html[data-lang="en"] body,
html[data-lang="zh"] body { visibility: hidden; }
html.i18n-ready body { visibility: visible; }

.top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  margin-right: auto;
}

.brand:hover { color: inherit; }

.crest {
  width: 36px;
  height: 42px;
  color: var(--gold-mid);
  flex: 0 0 auto;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }

.brand-lat {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-hi);
}

.brand-ru {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--cream);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px 22px;
}

.nav a {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--cream);
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--gold-mid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(20, 18, 16, 0.6);
  color: var(--gold-hi);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  margin: 0 auto;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(201, 162, 39, 0.32);
  border-radius: 999px;
  background: rgba(8, 9, 14, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 200, 0.04);
}

.lang-switch button {
  width: 32px;
  height: 32px;
  padding: 3px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.lang-switch button:hover { opacity: 0.92; transform: translateY(-1px); }

.lang-switch button.is-on {
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(243, 217, 138, 0.85), 0 0 12px rgba(201, 162, 39, 0.28);
}

.lang-switch svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(92vh, 860px);
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 48px 0 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(5, 6, 11, 0.22) 0%, rgba(5, 6, 11, 0.5) 55%, rgba(5, 6, 11, 0.92) 100%);
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #05060b;
}

.hero-role {
  position: absolute;
  right: max(0px, calc(50% - 620px));
  bottom: 0;
  z-index: 0;
  height: min(88%, 760px);
  width: auto;
  max-width: 46vw;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
}

.stars,
.fog,
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.stars {
  background-image:
    radial-gradient(1.2px 1.2px at 12% 22%, rgba(243, 217, 138, 0.7), transparent),
    radial-gradient(1px 1px at 28% 48%, rgba(239, 230, 210, 0.45), transparent),
    radial-gradient(1.4px 1.4px at 63% 18%, rgba(243, 217, 138, 0.55), transparent),
    radial-gradient(1px 1px at 81% 36%, rgba(239, 230, 210, 0.35), transparent),
    radial-gradient(1.2px 1.2px at 74% 62%, rgba(243, 217, 138, 0.4), transparent),
    radial-gradient(1px 1px at 41% 14%, rgba(255, 255, 255, 0.28), transparent);
}

.fog {
  background: linear-gradient(180deg, transparent 40%, rgba(10, 12, 20, 0.2) 70%, rgba(5, 6, 11, 0.92) 100%);
}

.grain {
  opacity: 0.07;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.07) 0 1px,
    transparent 1px 3px
  );
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: left;
  max-width: 560px;
  padding-bottom: 48px;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.gold-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.12;
  background: linear-gradient(180deg, #fff4c8 0%, #f3d98a 38%, #c9a227 72%, #8a6d2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 68px);
  max-width: 16ch;
  margin-inline: 0;
}

.hero h1 .wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lede {
  max-width: 42rem;
  margin: 18px 0 28px;
  color: var(--mute);
  font-size: 18px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 14px;
}

.card-art {
  width: 96px;
  height: 96px;
  object-fit: contain;
  object-position: center;
  margin: 0 0 14px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}

.skyline {
  width: 100%;
  height: auto;
  margin-top: 28px;
  color: #0b0d14;
  filter: drop-shadow(0 -8px 24px rgba(201, 162, 39, 0.12));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 2px;
  font-family: var(--font-title);
  font-size: 20px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-cta {
  color: #f8ecd0;
  background:
    linear-gradient(#6d1422, #6d1422) padding-box,
    linear-gradient(180deg, #f3d98a, #8a6d2e) border-box;
  border: 1px solid transparent;
  box-shadow: 0 10px 28px rgba(142, 26, 43, 0.32), inset 0 1px 0 rgba(255, 220, 160, 0.22);
}

.btn-cta:hover {
  color: #fff8e8;
  background:
    linear-gradient(180deg, var(--crimson-hi), var(--crimson)) padding-box,
    linear-gradient(180deg, #fff1b0, var(--gold)) border-box;
}

.btn-ghost {
  color: var(--gold-hi);
  background: rgba(10, 12, 18, 0.45);
  border: 1px solid var(--line);
}

.btn-ghost:hover { background: rgba(201, 162, 39, 0.08); }

.btn-wide { width: 100%; }

/* Frames & sections */
.section {
  padding: 72px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.section-head p {
  margin: 10px auto 0;
  max-width: 40rem;
  color: var(--mute);
}

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 16px;
  color: var(--gold);
}

.rule::before,
.rule::after {
  content: "";
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-mid), transparent);
}

.rule i {
  width: 7px;
  height: 7px;
  rotate: 45deg;
  border: 1px solid var(--gold-mid);
  display: block;
}

.frame {
  position: relative;
  background:
    linear-gradient(180deg, rgba(26, 22, 18, 0.92), rgba(10, 12, 18, 0.96));
  border: 1px solid var(--line);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    0 0 0 4px rgba(8, 8, 12, 0.55),
    0 0 0 5px rgba(201, 162, 39, 0.16),
    var(--shadow);
}

.frame-pad { padding: 28px 26px; }

.corners::before,
.corners::after,
.corners .c-br,
.corners .c-bl {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.corners::before {
  top: 6px;
  left: 6px;
  border-top: 2px solid var(--gold-hi);
  border-left: 2px solid var(--gold-hi);
}

.corners::after {
  top: 6px;
  right: 6px;
  border-top: 2px solid var(--gold-hi);
  border-right: 2px solid var(--gold-hi);
}

.corners .c-bl,
.corners .c-br {
  bottom: 6px;
  border-bottom: 2px solid var(--gold-hi);
}

.corners .c-bl { left: 6px; border-left: 2px solid var(--gold-hi); }
.corners .c-br { right: 6px; border-right: 2px solid var(--gold-hi); }

.grid-3,
.grid-2 {
  display: grid;
  gap: 20px;
}

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

.card h3 {
  margin: 0 0 10px;
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--gold-hi);
}

.card p { margin: 0; color: var(--mute); }

.card .mark {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
}

.card-soon .mark { color: var(--gold-hi); }

.why-num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.card-guarantee {
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.12), rgba(16, 14, 12, 0.35));
  box-shadow: 0 0 0 1px rgba(243, 217, 138, 0.28), var(--shadow);
}

.setup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.setup-title {
  margin: 8px 0 20px;
  font-family: var(--font-title);
  font-size: 28px;
  color: var(--gold-hi);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: kg-step;
  display: grid;
  gap: 16px;
}

.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 12px;
  counter-increment: kg-step;
}

.steps li::before {
  content: counter(kg-step);
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--gold-hi);
}

.steps b,
.steps span { grid-column: 2; }

.steps b {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 600;
  color: var(--gold-hi);
}

.steps span {
  color: var(--mute);
  font-size: 15px;
}

.specs {
  margin: 0;
}

.specs > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(201, 162, 39, 0.16);
}

.specs dt {
  margin: 0;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.specs dd {
  margin: 0;
  color: var(--cream);
}

.spec-must {
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  background: rgba(201, 162, 39, 0.1);
}

.spec-note {
  margin: 18px 0 0;
  color: var(--mute);
  font-size: 14px;
}

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

.safety-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
}

.safety-list b {
  display: block;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 600;
  color: var(--gold-hi);
  margin-bottom: 4px;
}

.glyph {
  width: 28px;
  height: 28px;
  color: var(--gold-mid);
}

.price-hero {
  font-family: var(--font-title);
  font-size: 52px;
  line-height: 1;
  margin: 8px 0 6px;
  color: var(--gold-hi);
}

.price-hero small {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  color: var(--mute);
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.final-cta {
  text-align: center;
  padding-bottom: 88px;
}

.final-cta h2 { font-size: clamp(32px, 4vw, 48px); margin: 0 0 12px; }
.final-cta p { color: var(--mute); margin: 0 0 24px; }

/* Pay / admin shells */
.page-main {
  min-height: calc(100vh - 160px);
  display: grid;
  align-items: center;
  padding: 48px 0 72px;
}

.pay-card,
.admin-card {
  width: min(100%, 520px);
  margin-inline: auto;
}

.pay-card .lede,
.admin-card .lede { margin-bottom: 20px; }

.note {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--mute);
}

.warn {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(197, 31, 54, 0.45);
  background: rgba(142, 26, 43, 0.16);
  color: #f3c8c8;
  font-size: 14px;
}

.ok {
  color: #d7ecc4;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--gold-hi);
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #0b0d14;
  color: var(--cream);
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--gold-hi);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}

.admin-wide { width: min(100%, 920px); }

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 22px;
}

.admin-toolbar .field { margin: 0; min-width: 180px; }

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(201, 162, 39, 0.16);
  vertical-align: middle;
}

th {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

td.code {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--gold-hi);
  letter-spacing: 0.04em;
}

.free { color: #cfe6b2; }
.used { color: var(--mute); }

.btn-copy {
  min-height: 36px;
  padding: 0 12px;
  font-size: 16px;
}

.empty {
  text-align: center;
  color: var(--mute);
  padding: 28px 8px;
}

/* Footer */
.foot {
  border-top: 1px solid rgba(201, 162, 39, 0.2);
  padding: 22px 0 28px;
  color: #6f6858;
  font-size: 13px;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  align-items: center;
}

.foot p { margin: 0; max-width: 46rem; }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.legal-links a {
  color: #8a8068;
  font-size: 13px;
}

.legal-links a:hover { color: var(--gold-hi); }

.foot-rights {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(201, 162, 39, 0.12);
  display: grid;
  gap: 8px;
}

.foot-rights p {
  max-width: 72rem;
  color: #6f6858;
  font-size: 12px;
  line-height: 1.5;
}

.fan-note {
  margin: 14px 0 0;
  max-width: 42rem;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.45;
}

.legal-main { padding: 48px 0 80px; }

.legal h1 { font-size: clamp(32px, 4vw, 48px); margin: 0 0 8px; }
.legal h2 {
  margin: 32px 0 12px;
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--gold-hi);
}
.legal p,
.legal li { color: var(--mute); }
.legal ol { padding-left: 1.25rem; }
.legal li { margin-bottom: 8px; }
.legal-meta { font-size: 14px; }
.legal code {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--gold-hi);
}

.legal-accept {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  margin: 18px 0 16px;
  padding: 14px 14px 14px 12px;
  border: 1px solid var(--line);
  background: rgba(8, 9, 14, 0.55);
  color: var(--mute);
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}

.legal-accept input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--gold-mid);
}

.legal-accept a { color: var(--gold-hi); }

.btn:disabled,
.btn[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.guard-enter {
  color: #6a614e;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.guard-enter:hover { color: var(--gold); }

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .setup-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .lang-switch { flex: 0 0 auto; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 12px 20px 20px;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(8, 9, 14, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open { display: flex; }

  .hero { min-height: 72vh; padding-top: 28px; }
  .hero-role { max-width: 70vw; height: 62%; opacity: 0.55; }
  .hero-copy { text-align: center; max-width: none; }
  .hero h1, .lede { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .section { padding: 52px 0; }
  .admin-toolbar { align-items: stretch; }
  .admin-toolbar .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
