:root {
  --bg: #070c15;
  --panel: #0d1421;
  --panel-2: #111b2d;
  --line: #1a2940;
  --muted: #7f95b8;
  --text: #f4f7ff;
  --heading: #ffffff;
  --topbar: rgba(13, 20, 33, .94);
  --sidebar: rgba(8, 14, 24, .97);
  --active-bg: #073444;
  --image-bg: #101a2a;
  --step-border: #16243a;
  --button-bg: #0d1729;
  --button-border: #174467;
  --cyan: #00d9ff;
  --accent: var(--cyan);
  --blue: #4b8dff;
  --shadow: 0 18px 45px rgba(0, 0, 0, .22);
}

body.light-theme {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --line: #dbe3ef;
  --muted: #5d6b82;
  --text: #172033;
  --heading: #07111f;
  --topbar: rgba(255, 255, 255, .96);
  --sidebar: rgba(248, 250, 252, .98);
  --active-bg: #e3f5fb;
  --image-bg: #eef3f9;
  --step-border: #dfe8f3;
  --button-bg: #ffffff;
  --button-border: #cfe0ee;
  --cyan: #009ed0;
  --accent: var(--cyan);
  --blue: #4f74e8;
  --shadow: 0 18px 45px rgba(15, 23, 42, .1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Inter", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

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

button {
  font: inherit;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(255, 43, 189, .22);
}

.brand strong {
  display: block;
  color: #00bde8;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 3.2px;
  line-height: 1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
  margin-right: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.top-nav a {
  transition: color .2s ease;
}

.top-nav a:hover {
  color: var(--cyan);
}

.pill,
.theme-toggle {
  height: 35px;
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
}

.pill {
  padding: 0 17px;
  letter-spacing: 1px;
}

.theme-toggle {
  width: 38px;
  display: grid;
  place-items: center;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

.light-theme .theme-toggle .sun-icon {
  display: block;
}

.light-theme .theme-toggle .moon-icon {
  display: none;
}

.sidebar {
  position: fixed;
  inset: 58px auto 0 0;
  z-index: 18;
  width: 260px;
  padding: 28px 24px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}

.nav-kicker {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1.8px;
}

.nav-kicker::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 12px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin: 8px 0;
  padding: 0 12px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s ease, color .2s ease;
}

.nav-link.active,
.nav-link:hover {
  color: var(--cyan);
  background: var(--active-bg);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.platform-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  opacity: .85;
}

.layout {
  min-height: 100vh;
  padding: 90px 48px 80px 308px;
  display: grid;
  grid-template-columns: minmax(0, 804px) 270px;
  gap: 48px;
}

.content {
  min-width: 0;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

body.show-home .sidebar,
body.show-home .toc,
body.show-home .menu-button,
body.show-home .pill {
  display: none;
}

body.show-home .layout {
  display: block;
  padding: 58px 0 0;
}

body.show-home .content {
  width: 100%;
}

body.show-home .home-page.active {
  display: block;
}

.home-page {
  min-height: calc(100vh - 58px);
  background:
    linear-gradient(rgba(0, 217, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, .025) 1px, transparent 1px),
    radial-gradient(circle at 50% 22%, rgba(0, 217, 255, .08), transparent 28%),
    var(--bg);
  background-size: 80px 80px, 80px 80px, auto, auto;
}

.home-hero {
  min-height: calc(100vh - 58px);
  display: grid;
  place-items: center;
  align-content: center;
  padding: 96px 20px 120px;
  text-align: center;
}

.home-mark {
  width: 86px;
  height: 86px;
  margin-bottom: 54px;
  object-fit: contain;
  animation: logoPulse 3s ease-in-out infinite;
}

.home-hero > p {
  margin: 0 0 22px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 8px;
}

.home-hero h1 {
  font-size: 54px;
  line-height: 1;
  letter-spacing: 4px;
}

.home-hero h2 {
  margin: 26px 0 0;
  padding: 0;
  color: var(--muted);
  border: 0;
  font-size: 20px;
  letter-spacing: 1px;
}

.home-copy {
  width: min(560px, calc(100vw - 40px));
  margin-top: 30px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.home-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}

.home-primary,
.home-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 138px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease, background .28s ease, color .28s ease;
}

.home-primary {
  color: #00131a;
  background: var(--cyan);
  box-shadow: 0 16px 34px rgba(0, 217, 255, .22);
}

.home-secondary {
  color: var(--muted);
  border: 1px solid rgba(0, 217, 255, .35);
}

.home-section {
  width: min(1040px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 92px 0;
  text-align: center;
}

.home-section h2 {
  margin: 0;
  padding: 0;
  color: var(--heading);
  border: 0;
  font-size: 28px;
  letter-spacing: 1px;
}

.home-underline {
  width: 50px;
  height: 3px;
  margin: 20px auto 50px;
  background: var(--cyan);
  border-radius: 999px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}

.feature-card,
.game-card,
.partner-card {
  position: relative;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--step-border);
  border-radius: 8px;
  transition: transform .32s ease, border-color .32s ease, box-shadow .32s ease, background .32s ease;
}

.feature-card::before,
.game-card::before,
.partner-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity .32s ease;
}

.feature-card {
  min-height: 238px;
  padding: 32px 26px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--cyan);
  background: rgba(0, 217, 255, .12);
  border: 1px solid rgba(0, 217, 255, .38);
  border-radius: 9px;
  font-size: 23px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3,
.game-card h3,
.partner-card h3,
.start-steps h3 {
  margin: 0 0 14px;
  color: var(--heading);
  font-size: 16px;
}

.feature-card p,
.game-card p,
.partner-card p,
.start-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.game-card .game-status {
  margin-top: 18px;
  color: var(--cyan);
  font-weight: 900;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  justify-content: center;
  gap: 20px;
  width: min(800px, 100%);
  margin: 0 auto;
}

.game-card {
  grid-column: span 2;
  min-height: 354px;
  padding: 38px 28px;
}

.game-card:nth-child(4) {
  grid-column: 2 / span 2;
}

.game-card:nth-child(5) {
  grid-column: 4 / span 2;
}

.game-card img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
}

.home-start {
  width: min(880px, calc(100vw - 40px));
}

.start-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 90px;
  margin: 28px auto 38px;
}

.start-steps span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  color: var(--cyan);
  border: 2px solid rgba(0, 217, 255, .45);
  border-radius: 50%;
  font-weight: 900;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease, background .28s ease;
}

.start-link {
  min-width: 146px;
}

.partner-card {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 48px 70px;
  border-color: rgba(0, 217, 255, .42);
  box-shadow: inset 0 1px 0 rgba(102, 83, 240, .45);
}

.partner-icon {
  display: grid;
  place-items: center;
  margin: 0 auto 28px;
  color: var(--cyan);
  font-size: 52px;
  line-height: 1;
}

.partner-icon svg {
  display: block;
}

.partner-card h3 {
  color: var(--cyan);
  font-size: 20px;
  letter-spacing: 1px;
}

.partner-card ul {
  width: fit-content;
  margin: 28px auto;
  padding: 0;
  list-style: none;
  text-align: left;
  color: var(--heading);
  font-size: 15px;
  font-weight: 800;
  line-height: 2.4;
}

.partner-card li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 12px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 13px var(--cyan);
}

.partner-button {
  margin-top: 18px;
}

.home-footer {
  padding: 40px 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  letter-spacing: 2px;
}

.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 26px;
  z-index: 30;
  width: 45px;
  height: 45px;
  color: #00131a;
  background: var(--cyan);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 14px 34px rgba(0, 217, 255, .25);
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .28s ease, transform .28s ease, box-shadow .28s ease;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@keyframes logoPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(0, 217, 255, 0));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 22px rgba(0, 217, 255, .35));
    transform: scale(1.04);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .62s ease, transform .62s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover,
.game-card:hover,
.partner-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 217, 255, .46);
  box-shadow: 0 12px 34px rgba(0, 217, 255, .08);
}

.feature-card:hover::before,
.game-card:hover::before,
.partner-card:hover::before {
  opacity: 1;
}

.home-primary:hover,
.home-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 217, 255, .75);
  box-shadow: 0 18px 36px rgba(0, 217, 255, .22);
}

.home-secondary:hover {
  color: var(--heading);
  background: rgba(0, 217, 255, .08);
}

.start-steps div {
  transition: transform .28s ease;
}

.start-steps div:hover {
  transform: translateY(-2px);
}

.start-steps div:hover span {
  transform: scale(1.05);
  border-color: var(--cyan);
  background: rgba(0, 217, 255, .1);
  box-shadow: 0 0 24px rgba(0, 217, 255, .28);
}

.scroll-top:hover {
  box-shadow: 0 18px 42px rgba(0, 217, 255, .36);
}

@media (prefers-reduced-motion: reduce) {
  .home-mark,
  .fade-up,
  .feature-card,
  .game-card,
  .partner-card,
  .home-primary,
  .home-secondary,
  .start-steps div,
  .start-steps span,
  .scroll-top {
    animation: none;
    transition: none;
  }
}

.hero {
  padding: 5px 0 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}

h1 {
  margin: 0;
  color: var(--heading);
  font-size: 28px;
  letter-spacing: 1px;
  line-height: 1.25;
}

.hero p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.guide-section {
  padding-top: 36px;
}

h2 {
  margin: 0 0 20px;
  padding-bottom: 17px;
  color: var(--cyan);
  border-bottom: 1px dashed var(--line);
  font-size: 18px;
  line-height: 1.5;
}

.section-copy {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

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

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 58px;
  padding: 13px 18px;
  color: var(--heading);
  background: var(--panel-2);
  border: 1px solid var(--step-border);
  border-radius: 7px;
  box-shadow: var(--shadow);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
}

.steps span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--cyan), var(--blue));
  box-shadow: 0 0 20px rgba(0, 217, 255, .3);
  font-size: 14px;
}

.continue-steps {
  margin-top: 20px;
}

.mini-list {
  margin: 8px 0 0;
  padding-left: 0;
  color: var(--heading);
  list-style: none;
  font-size: 14px;
  line-height: 1.75;
}

.mini-list li::before {
  content: "*";
  color: var(--cyan);
  margin-right: 6px;
}

code {
  padding: 6px 10px;
  color: var(--cyan);
  background: color-mix(in srgb, var(--bg), #000 8%);
  border-radius: 4px;
  font-family: "Cascadia Mono", Consolas, monospace;
}

.install-button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  margin: 0 0 22px;
  padding: 0 28px;
  color: #fff;
  background: linear-gradient(135deg, #20d2f5, #6653f0);
  border: 0;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .8px;
  box-shadow: 0 16px 36px rgba(0, 217, 255, .16);
}

.install-button span {
  font-size: 20px;
  line-height: 1;
}

.url-box {
  margin-top: 14px;
  padding: 16px 18px;
  color: var(--heading);
  background: var(--panel-2);
  border: 1px solid var(--button-border);
  border-radius: 7px;
}

.guide-image,
.logo-demo {
  overflow: hidden;
  margin: 24px 0 20px;
  background: var(--image-bg);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.guide-image img {
  display: block;
  max-width: 100%;
  height: auto;
}

.guide-image.compact img {
  width: auto;
}

.guide-image.phone {
  max-width: 560px;
}

.guide-image.wide img {
  width: 100%;
}

figcaption {
  display: block;
  padding: 11px 12px 14px;
  color: var(--muted);
  background: var(--image-bg);
  text-align: center;
  font-size: 13px;
  letter-spacing: 1px;
}

.logo-demo {
  width: 120px;
}

.logo-demo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.notice {
  display: flex;
  gap: 8px;
  margin: 20px 0 0;
  padding: 19px 22px;
  color: var(--heading);
  background: rgba(240, 171, 0, .16);
  border: 1px solid #a97800;
  border-radius: 7px;
  line-height: 1.7;
}

.notice::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: #1d1300;
  background: #ffc448;
  border-radius: 50%;
  font-weight: 900;
  line-height: 1;
}

.notice strong {
  color: #ffd449;
}

.light-theme .notice strong {
  color: #9a6500;
}

.done-box {
  margin-top: 22px;
  padding: 17px 18px;
  color: var(--muted);
  background: rgba(0, 217, 255, .12);
  border: 1px solid rgba(0, 157, 208, .45);
  border-radius: 7px;
  line-height: 1.7;
}

.toc {
  position: sticky;
  top: 94px;
  height: fit-content;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.toc p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 5px;
}

.toc a {
  display: block;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.toc a.active,
.toc a:hover {
  color: var(--cyan);
}

.menu-button,
.scrim {
  display: none;
}

@media (max-width: 980px) {
  .topbar {
    height: 58px;
    padding: 0 18px;
  }

  .top-nav {
    gap: 18px;
    margin-right: 10px;
    font-size: 13px;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 31px;
    height: 31px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 10px;
    letter-spacing: 3px;
  }

  .pill {
    padding: 0 15px;
  }

  .menu-button {
    position: fixed;
    top: 70px;
    left: 12px;
    z-index: 25;
    width: 39px;
    height: 40px;
    display: grid;
    place-content: center;
    gap: 5px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: var(--shadow);
    cursor: pointer;
  }

  .menu-button span {
    width: 15px;
    height: 2px;
    background: var(--heading);
    border-radius: 999px;
  }

  .sidebar {
    inset: 58px auto 0 0;
    width: 246px;
    transform: translateX(-100%);
    transition: transform .22s ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .scrim {
    position: fixed;
    inset: 58px 0 0;
    z-index: 17;
    background: rgba(0, 0, 0, .5);
  }

  body.menu-open .scrim {
    display: block;
  }

  .layout {
    display: block;
    padding: 126px 18px 52px;
  }

  .toc {
    display: none;
  }

  h1 {
    font-size: 22px;
  }

  .hero p:last-child {
    font-size: 15px;
    line-height: 1.7;
  }

  .guide-section {
    padding-top: 36px;
  }

  h2 {
    font-size: 18px;
  }

  .steps li {
    min-height: 54px;
    padding: 12px 14px;
  }

  .guide-image.compact img,
  .guide-image.phone img {
    width: 100%;
  }

  body.show-home .layout {
    padding-top: 58px;
  }

  .home-hero {
    min-height: auto;
    padding: 72px 20px 86px;
  }

  .home-mark {
    width: 72px;
    height: 72px;
    margin-bottom: 44px;
  }

  .home-hero h1 {
    font-size: 34px;
  }

  .home-hero > p {
    font-size: 12px;
    letter-spacing: 7px;
  }

  .home-section {
    padding: 64px 0;
  }

  .feature-grid,
  .game-grid,
  .start-steps {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .game-grid {
    gap: 20px;
  }

  .game-card,
  .game-card:nth-child(4),
  .game-card:nth-child(5) {
    grid-column: auto;
    width: 100%;
    justify-self: auto;
  }

  .game-card:not(.game-mt) {
    display: none;
  }

  .start-steps {
    gap: 28px;
    text-align: left;
  }

  .start-steps div {
    display: grid;
    grid-template-columns: 56px 1fr;
    column-gap: 10px;
    align-items: center;
  }

  .start-steps span {
    grid-row: span 2;
    margin: 0;
  }

  .partner-card {
    padding: 38px 22px;
  }

  .scroll-top {
    right: 22px;
    bottom: 22px;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding: 0 16px;
  }

  .brand strong {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand small {
    letter-spacing: 2.8px;
  }

  .top-actions {
    gap: 8px;
  }

  .pill {
    height: 34px;
    padding: 0 13px;
  }

  .theme-toggle {
    width: 35px;
    height: 34px;
  }

  .top-nav {
    gap: 14px;
    margin-left: 10px;
    margin-right: 0;
    font-size: 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand small {
    display: none;
  }

  body.show-home .brand strong {
    max-width: none;
  }

  body.show-home .topbar {
    padding: 0 14px;
  }

  body.show-home .brand img {
    width: 27px;
    height: 27px;
  }

  body.show-home .brand strong {
    font-size: 14px;
    letter-spacing: 1.5px;
  }

  .home-actions {
    gap: 12px;
  }

  .home-primary,
  .home-secondary {
    min-width: 128px;
    padding: 0 18px;
  }
}
