:root {
  color-scheme: dark;
  --night: oklch(0.19 0.018 215);
  --night-deep: oklch(0.145 0.014 215);
  --panel: oklch(0.235 0.02 215);
  --paper: oklch(0.96 0.006 120);
  --ink: oklch(0.2 0.018 215);
  --white: oklch(0.97 0.004 120);
  --muted: oklch(0.76 0.018 210);
  --muted-dark: oklch(0.48 0.02 215);
  --orange: oklch(0.72 0.19 52);
  --orange-hot: oklch(0.78 0.18 65);
  --line: oklch(0.38 0.022 215 / 0.66);
  --paper-line: oklch(0.78 0.01 120);
  --display: "Arial Narrow", "Bahnschrift SemiCondensed", "Microsoft YaHei", sans-serif;
  --body: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --code: "Cascadia Code", Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --z-sticky: 20;
  --z-toast: 40;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--white);
  background: var(--night);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0 0 auto;
  z-index: -1;
  height: 520px;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at 78% 12%, oklch(0.63 0.16 52 / 0.14), transparent 38%);
}

button,
a { font: inherit; }

a { color: inherit; }

button { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--orange-hot);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: calc(var(--z-toast) + 1);
  padding: 10px 14px;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-180%);
  transition: transform 160ms var(--ease-out);
}

.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: oklch(0.145 0.014 215 / 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  background: var(--orange);
  clip-path: polygon(0 16%, 18% 16%, 18% 0, 82% 0, 82% 16%, 100% 16%, 100% 84%, 82% 84%, 82% 100%, 18% 100%, 18% 84%, 0 84%);
}

.brand-mark::after {
  position: absolute;
  inset: 9px 7px;
  content: "";
  background: var(--night-deep);
  box-shadow: 9px 0 0 var(--night-deep);
}

.brand-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  font-size: 13px;
  font-weight: 700;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a:hover { color: var(--orange-hot); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  min-height: 680px;
  align-items: center;
  gap: clamp(48px, 8vw, 108px);
  padding-block: clamp(76px, 10vw, 128px);
  overflow: hidden;
}

.hero-copy { position: relative; z-index: 2; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  color: var(--orange-hot);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
}

.hero-kicker::before {
  width: 42px;
  height: 4px;
  content: "";
  background: var(--orange);
}

h1,
h2,
h3,
p { text-wrap: pretty; }

h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 6.4vw, 84px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 strong {
  display: block;
  color: var(--orange-hot);
  font-weight: 900;
}

.hero-lead {
  max-width: 640px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  margin-top: 38px;
}

.primary-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 24px;
  padding: 0 22px;
  color: var(--ink);
  background: var(--orange-hot);
  border: 0;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms var(--ease-out);
}

.primary-action:hover {
  background: var(--paper);
  transform: translateY(-2px);
}

.primary-action span { font-size: 20px; }

.secondary-action {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 6px;
  text-decoration-color: var(--muted-dark);
}

.secondary-action:hover { color: var(--white); }

.hero-visual {
  position: relative;
  min-height: 430px;
  isolation: isolate;
}

.hero-visual::before {
  position: absolute;
  inset: 58px 8px 26px 50px;
  z-index: -2;
  content: "";
  background: var(--orange);
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}

.hero-visual::after {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: 86%;
  height: 74%;
  content: "";
  border: 1px solid oklch(0.88 0.11 65 / 0.62);
  transform: translate(-18px, -12px);
}

.mascot {
  position: absolute;
  right: clamp(8px, 3vw, 42px);
  bottom: 0;
  width: min(100%, 470px);
  height: auto;
  filter: drop-shadow(18px 20px 0 oklch(0.1 0.01 215 / 0.34));
}

.visual-stamp {
  position: absolute;
  top: 24px;
  right: 18px;
  width: 126px;
  padding: 11px 14px;
  color: var(--white);
  background: var(--night-deep);
  border: 1px solid var(--line);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  transform: rotate(3deg);
}

.quick-note {
  position: absolute;
  bottom: 19px;
  left: 8px;
  z-index: 2;
  margin: 0;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--paper);
  font-size: 12px;
  font-weight: 800;
  transform: rotate(-2deg);
}

.loadouts-section {
  color: var(--ink);
  background: var(--paper);
  padding-block: clamp(86px, 10vw, 132px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  align-items: end;
  gap: clamp(36px, 8vw, 100px);
  margin-bottom: 56px;
}

.section-heading h2,
.guide-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-heading p {
  max-width: 590px;
  margin: 0;
  color: oklch(0.39 0.02 215);
  font-size: 16px;
  line-height: 1.85;
}

.loadout-list { border-top: 2px solid var(--ink); }

.loadout-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(320px, 1.3fr) auto;
  min-height: 142px;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--paper-line);
  transition: background-color 200ms ease;
}

.loadout-row:hover { background: oklch(0.925 0.025 70); }

.weapon-type {
  display: block;
  margin-bottom: 7px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 700;
}

.weapon-name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.025em;
}

.code-wrap { min-width: 0; }

.code-label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 700;
}

.loadout-code {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--code);
  font-size: clamp(12px, 1.25vw, 15px);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  display: inline-flex;
  min-width: 112px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out);
}

.copy-button:hover {
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-2px);
}

.copy-button[data-state="copied"] {
  color: var(--ink);
  background: var(--orange-hot);
  border-color: var(--orange-hot);
}

.copy-icon {
  position: relative;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
}

.copy-icon::before {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 8px;
  height: 8px;
  content: "";
  border: 2px solid currentColor;
  border-right: 0;
  border-bottom: 0;
}

.field-note {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 34px 0 0;
  color: oklch(0.37 0.02 215);
  font-size: 13px;
  line-height: 1.75;
}

.field-note::before {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 7px;
  content: "";
  background: var(--orange);
  transform: rotate(45deg);
}

.guide-section {
  background: var(--night-deep);
  padding-block: clamp(86px, 10vw, 132px);
}

.guide-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(56px, 9vw, 126px);
}

.guide-heading { align-self: start; }

.guide-heading p {
  max-width: 460px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
  border-top: 1px solid var(--line);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 24px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
  counter-increment: steps;
}

.step::before {
  color: var(--orange-hot);
  content: "0" counter(steps);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 900;
}

.step h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 23px;
  letter-spacing: -0.015em;
}

.step p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.about-section {
  color: var(--ink);
  background: var(--orange);
  padding-block: clamp(74px, 9vw, 112px);
}

.about-inner {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(40px, 8vw, 110px);
}

.about-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.about-copy {
  max-width: 720px;
  margin: 0;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  line-height: 1.9;
}

.site-footer {
  color: var(--muted);
  background: var(--night-deep);
}

.footer-inner {
  display: flex;
  min-height: 108px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
}

.footer-brand {
  color: var(--white);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
}

.icp-link { text-decoration: none; }

.icp-link:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-toast);
  max-width: min(360px, calc(100% - 40px));
  padding: 14px 18px;
  color: var(--ink);
  background: var(--orange-hot);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 220ms var(--ease-out);
}

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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 54px;
  }

  .hero-copy { max-width: 760px; }
  .hero-visual { width: min(580px, 100%); justify-self: center; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }

  .loadout-row {
    grid-template-columns: minmax(150px, 0.65fr) minmax(260px, 1.35fr);
    gap: 20px;
    padding-block: 26px;
  }

  .copy-button { grid-column: 1 / -1; justify-self: start; margin-top: -12px; }
  .guide-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 30px, 560px); }
  .header-inner { min-height: 66px; }
  .site-nav a:first-child { display: none; }
  .site-nav { gap: 16px; font-size: 12px; }
  .hero { padding-top: 68px; }
  h1 { font-size: clamp(43px, 13.6vw, 68px); }
  .hero-lead { font-size: 16px; }
  .hero-visual { min-height: 330px; }
  .visual-stamp { right: 0; }
  .quick-note { bottom: 4px; }

  .loadout-row {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 18px;
    padding-block: 30px;
  }

  .weapon { align-self: start; }
  .code-wrap { grid-column: 1; width: 100%; }

  .loadout-code {
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-all;
  }

  .copy-button { grid-column: 1; margin-top: 0; }
  .about-inner { grid-template-columns: 1fr; gap: 28px; }

  .footer-inner {
    min-height: 138px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
  }
}

@media (max-width: 390px) {
  .brand-name { font-size: 16px; }
  .site-nav a:first-child,
  .site-nav a:last-child { display: none; }
  .hero-visual { min-height: 290px; }
  .hero-visual::before { inset: 52px 0 20px 30px; }
  .step { grid-template-columns: 48px 1fr; gap: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: hero-in 700ms var(--ease-out) both; }
  .hero-visual { animation: visual-in 820ms 80ms var(--ease-out) both; }

  @keyframes hero-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes visual-in {
    from { opacity: 0; transform: translateX(22px); }
    to { opacity: 1; transform: translateX(0); }
  }
}

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