:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --berry: #85103b;
  --berry-bright: #c03260;
  --berry-light: #ee9eb5;
  --berry-deep: #340619;
  --berry-black: #14050d;
  --paper: #fff8f8;
  --muted: #d7aeba;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--berry-black);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 9% 9%, rgb(204 47 93 / 24%), transparent 31rem),
    radial-gradient(ellipse at 91% 38%, rgb(124 14 56 / 31%), transparent 34rem),
    radial-gradient(ellipse at 53% 100%, rgb(85 9 39 / 38%), transparent 48rem),
    linear-gradient(145deg, #260714 0%, #3b081c 30%, #1d0611 72%, #10040a 100%);
  color: var(--paper);
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid #ffc1d1;
  outline-offset: 4px;
}

.page {
  position: relative;
  isolation: isolate;
  display: flex;
  width: min(100% - 48px, 1120px);
  min-height: 100vh;
  margin-inline: auto;
  flex-direction: column;
}

.page::before {
  position: fixed;
  z-index: -1;
  top: 17%;
  right: max(calc((100vw - 1120px) / 2 - 150px), -130px);
  width: 390px;
  aspect-ratio: 1;
  border: 1px solid rgb(255 222 232 / 8%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 190 210 / 5%), transparent 69%);
  content: "";
  pointer-events: none;
}

.masthead,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.masthead {
  min-height: 86px;
  border-bottom: 1px solid rgb(255 238 243 / 13%);
}

.wordmark {
  color: var(--paper);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.07em;
  text-decoration: none;
}

.wordmark span {
  color: var(--berry-light);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
}

.site-nav a,
.back-to-top {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav a:hover,
.back-to-top:hover {
  color: var(--paper);
}

.intro {
  width: min(100%, 890px);
  margin: 0 auto;
  padding: clamp(58px, 10vw, 112px) 0 clamp(42px, 7vw, 76px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 25px;
  color: var(--berry-light);
  font-size: 12px;
  letter-spacing: 0.15em;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--berry-light);
  box-shadow: 0 0 16px rgb(238 158 181 / 75%);
}

h1 {
  margin: 0 0 28px -0.065em;
  color: var(--paper);
  font-size: clamp(76px, 15vw, 168px);
  font-weight: 760;
  letter-spacing: -0.095em;
  line-height: 0.92;
}

h1 span {
  color: var(--berry-light);
}

.hero-note {
  max-width: 590px;
  margin: 0;
  color: rgb(255 248 248 / 74%);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.9;
}

.primary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 0 18px;
  border: 1px solid rgb(255 226 235 / 20%);
  border-radius: 999px;
  background: linear-gradient(120deg, #a32350, #64102f);
  box-shadow: inset 0 1px rgb(255 255 255 / 10%), 0 8px 26px rgb(8 1 4 / 25%);
  color: var(--paper);
  font-size: 12px;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease;
}

.primary-link:hover,
.download-button:hover {
  filter: brightness(1.13);
  transform: translateY(-2px);
}

.steps {
  display: grid;
  width: min(100%, 890px);
  gap: 20px;
  margin: 0 auto 72px;
}

.step-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgb(255 231 239 / 14%);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 5%), transparent 45%),
    linear-gradient(145deg, rgb(82 13 40 / 91%), rgb(31 6 18 / 95%));
  box-shadow: 0 22px 65px rgb(7 1 4 / 27%), inset 0 1px rgb(255 255 255 / 6%);
  scroll-margin-top: 24px;
}

.certificate-card {
  background:
    radial-gradient(ellipse at 100% 0%, rgb(179 38 82 / 22%), transparent 48%),
    linear-gradient(145deg, rgb(76 12 37 / 94%), rgb(27 5 15 / 97%));
}

.recording-card {
  background:
    radial-gradient(ellipse at 0% 100%, rgb(143 24 65 / 17%), transparent 50%),
    linear-gradient(145deg, rgb(60 9 31 / 94%), rgb(23 5 14 / 97%));
}

.redeem-card {
  background:
    radial-gradient(ellipse at 100% 0%, rgb(144 24 64 / 19%), transparent 49%),
    linear-gradient(145deg, rgb(53 8 28 / 94%), rgb(20 4 12 / 97%));
}

.tutorial-card {
  background:
    radial-gradient(ellipse at 100% 0%, rgb(181 42 87 / 20%), transparent 48%),
    linear-gradient(145deg, rgb(61 10 34 / 95%), rgb(22 5 15 / 98%));
}

.step-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.gameplay-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.step-number {
  margin: 0;
  color: var(--berry-light);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.step-number span {
  margin-left: 9px;
  color: rgb(255 248 248 / 66%);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.step-card h2 {
  margin: 0 0 19px;
  color: var(--paper);
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 620;
  letter-spacing: -0.035em;
}

.summary {
  max-width: 720px;
  margin: 0;
  color: rgb(255 248 248 / 91%);
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.95;
  letter-spacing: 0.015em;
}

.install-note {
  margin: 18px 0 0;
  color: rgb(255 248 248 / 74%);
  font-size: 13px;
  line-height: 1.9;
}

.install-note a {
  color: #ffd1de;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.install-note a:hover {
  color: var(--paper);
}

.load-note {
  color: rgb(255 248 248 / 56%);
  font-size: 10px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.gameplay-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgb(255 238 243 / 15%);
  border-radius: 14px;
  background: #10040a;
  object-fit: contain;
}

.video-caption {
  margin: 12px 0 0;
  color: rgb(255 248 248 / 60%);
  font-size: 11px;
  line-height: 1.7;
}

.download-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 0 18px;
  border: 1px solid rgb(255 230 238 / 24%);
  border-radius: 999px;
  background: linear-gradient(120deg, #a72c59, #68112f);
  box-shadow: 0 8px 24px rgb(8 1 4 / 30%), inset 0 1px rgb(255 255 255 / 12%);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease;
}

.download-button span {
  color: #ffd1de;
  font-size: 17px;
}

.tutorial-intro {
  max-width: 700px;
  margin: -4px 0 22px;
  color: rgb(255 248 248 / 72%);
  font-size: 13px;
  line-height: 1.8;
}

.tutorial-track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgb(238 158 181 / 55%) rgb(255 255 255 / 7%);
  scrollbar-width: thin;
}

.tutorial-track:focus-visible {
  outline: 2px solid #ffc1d1;
  outline-offset: 5px;
}

.tutorial-track::-webkit-scrollbar {
  height: 7px;
}

.tutorial-track::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgb(255 255 255 / 7%);
}

.tutorial-track::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgb(238 158 181 / 55%);
}

.tutorial-slide {
  display: grid;
  min-width: 0;
  flex: 0 0 100%;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.62fr);
  align-items: start;
  gap: clamp(20px, 4vw, 42px);
  padding: 4px 4px 18px;
  scroll-margin-inline: 0;
  scroll-snap-align: start;
}

.tutorial-copy {
  min-width: 0;
}

.tutorial-index {
  margin: 0 0 10px;
  color: var(--berry-light);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.tutorial-copy h3 {
  margin: 0 0 13px;
  color: var(--paper);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 620;
  letter-spacing: -0.03em;
}

.tutorial-copy > p:not(.tutorial-index, .tutorial-caution) {
  margin: 0;
  color: rgb(255 248 248 / 78%);
  font-size: 13px;
  line-height: 1.9;
}

.tutorial-caution {
  margin: 15px 0 0;
  padding: 10px 12px;
  border-left: 2px solid var(--berry-bright);
  border-radius: 0 9px 9px 0;
  background: rgb(192 50 96 / 9%);
  color: #f0c4d1;
  font-size: 11px;
  line-height: 1.8;
}

.axis-figure {
  max-width: 320px;
  margin: 19px 0 0;
  padding: 9px 12px 10px;
  border: 1px solid rgb(255 231 239 / 11%);
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 30%, rgb(192 50 96 / 13%), transparent 72%),
    rgb(12 3 8 / 55%);
}

.axis-figure svg {
  display: block;
  width: 100%;
  max-height: 155px;
}

.axis-line {
  fill: none;
  stroke: #ef9bb4;
  stroke-linecap: round;
  stroke-width: 3;
  marker-end: url("#axis-arrow");
}

.axis-y {
  stroke: #c94c78;
}

.axis-direction {
  stroke: #fff1f5;
  stroke-width: 2;
}

.axis-midpoint {
  fill: #fff1f5;
  stroke: #c03260;
  stroke-width: 2;
}

.axis-direction-label {
  fill: #fff1f5;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
}

.axis-z {
  stroke: #ffd0dd;
}

.axis-origin {
  fill: var(--paper);
  stroke: var(--berry-bright);
  stroke-width: 3;
}

.axis-label,
.axis-origin-label {
  fill: #fff1f5;
  font-family: inherit;
  font-size: 14px;
  font-weight: 650;
}

.axis-origin-label {
  fill: #d7aeba;
  font-size: 10px;
  font-weight: 400;
}

.axis-figure figcaption,
.tutorial-image figcaption {
  color: rgb(255 248 248 / 57%);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.tutorial-image {
  width: 100%;
  max-width: 285px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgb(255 231 239 / 15%);
  border-radius: 17px;
  background:
    radial-gradient(ellipse at 50% 0%, rgb(192 50 96 / 18%), transparent 56%),
    linear-gradient(155deg, rgb(255 255 255 / 4%), rgb(13 3 8 / 84%));
  box-shadow: 0 15px 38px rgb(7 1 4 / 28%), inset 0 1px rgb(255 255 255 / 5%);
}

.tutorial-image img {
  display: block;
  width: 100%;
  max-height: 380px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 11px;
  background: #080609;
  object-fit: contain;
}

.tutorial-image figcaption {
  padding-top: 8px;
}

.tutorial-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.tutorial-pagination a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgb(255 231 239 / 13%);
  border-radius: 999px;
  background: rgb(255 255 255 / 4%);
  color: #edb4c5;
  font-size: 10px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease;
}

.tutorial-pagination a:hover {
  border-color: rgb(238 158 181 / 45%);
  background: rgb(192 50 96 / 15%);
}

.footer {
  min-height: 68px;
  border-top: 1px solid rgb(255 238 243 / 13%);
}

.contact-link {
  color: #edb4c5;
  font-size: 11px;
  text-decoration: none;
  transition: color 160ms ease;
}

.contact-link:hover {
  color: var(--paper);
}

@media (max-width: 600px) {
  .page {
    width: min(100% - 40px, 1120px);
  }

  .masthead {
    min-height: 72px;
  }

  .site-nav {
    gap: 12px;
  }

  .site-nav a {
    font-size: 10px;
    letter-spacing: 0;
  }

  .intro {
    padding: 58px 0 42px;
  }

  h1 {
    margin-left: 0;
    font-size: clamp(48px, 14vw, 72px);
  }

  .steps {
    gap: 14px;
    margin-bottom: 48px;
  }

  .step-card {
    border-radius: 18px;
  }

  .tutorial-slide {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }

  .tutorial-image {
    width: min(100%, 240px);
  }

  .axis-figure {
    max-width: 100%;
  }

  .step-heading {
    align-items: flex-start;
  }

  .gameplay-heading {
    align-items: flex-start;
  }

  .certificate-card .step-heading,
  .redeem-card .step-heading {
    display: block;
  }

  .certificate-card h2,
  .redeem-card h2 {
    margin-top: 10px;
    font-size: 21px;
  }

  .step-number {
    font-size: 10px;
  }

  .step-number span {
    margin-left: 5px;
  }

  .gameplay-video {
    border-radius: 10px;
  }
}

@media (max-width: 370px) {
  .site-nav {
    gap: 8px;
  }

  .site-nav a {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
