:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: #09090b;
  color: #f4f4f5;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #09090b;
  color: #f4f4f5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 50% -12%, rgb(217 70 239 / .16), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgb(168 85 247 / .10), transparent 28rem),
    #09090b;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgb(255 255 255 / .018) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / .018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgb(0 0 0 / .45), transparent 72%);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 3px; background: #3f3f46; }
::-webkit-scrollbar-thumb:hover { background: #52525b; }

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid #f0abfc;
  outline-offset: 4px;
}

strong {
  color: #e4e4e7;
}

.guide-shell {
  width: min(72rem, calc(100% - 3rem));
  margin-inline: auto;
}

.guide-skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 80;
  border-radius: .75rem;
  border: 1px solid rgb(217 70 239 / .35);
  background: #18181b;
  color: #fff;
  padding: .75rem 1rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 0 24px rgb(217 70 239 / .26);
}

.guide-skip-link:focus {
  top: 1rem;
}

.guide-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #27272a;
}

.guide-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top, rgb(217 70 239 / .15), transparent 50%),
    radial-gradient(circle at bottom right, rgb(168 85 247 / .10), transparent 40%);
}

.guide-hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 5rem 7rem;
}

.guide-brand-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.guide-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .75rem;
  border: 1px solid rgb(255 255 255 / .08);
  background: rgb(24 24 27 / .88);
  box-shadow:
    0 0 0 2px #3f3f46,
    0 0 18px rgb(217 70 239 / .18);
}

.guide-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.625rem;
  border: 1px solid rgb(217 70 239 / .30);
  border-radius: 999px;
  background: rgb(217 70 239 / .15);
  color: #e879f9;
  padding: .25rem .65rem;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 0 12px rgb(217 70 239 / .25);
}

.guide-hero h1 {
  max-width: 48rem;
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(2.5rem, 6.2vw, 3.75rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.guide-gradient-title,
.guide-neon-title {
  display: block;
}

.guide-gradient-title {
  width: max-content;
  max-width: 100%;
  background: linear-gradient(90deg, #ec4899, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.guide-neon-title {
  color: #fff;
  text-shadow:
    0 0 8px rgb(255 255 255 / .20),
    0 0 15px rgb(217 70 239 / .20);
}

.guide-summary {
  max-width: 42rem;
  margin: 0;
  color: #a1a1aa;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.75;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.guide-primary,
.guide-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: .75rem;
  padding: .65rem 1.25rem;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition:
    transform .22s cubic-bezier(.4, 0, .2, 1),
    box-shadow .22s cubic-bezier(.4, 0, .2, 1),
    border-color .22s ease,
    background-color .22s ease,
    color .22s ease;
}

.guide-primary {
  border: 1px solid rgb(217 70 239 / .35);
  background: linear-gradient(90deg, #c026d3, #7e22ce);
  color: #fff;
  box-shadow: 0 0 15px rgb(217 70 239 / .35);
}

.guide-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 25px rgb(217 70 239 / .65),
    0 0 5px rgb(217 70 239 / .30);
}

.guide-secondary {
  border: 1px solid #3f3f46;
  background: rgb(24 24 27 / .42);
  color: #d4d4d8;
}

.guide-secondary:hover {
  border-color: #52525b;
  background: rgb(39 39 42 / .78);
  color: #f4f4f5;
  transform: translateY(-1px);
}

.guide-primary:active,
.guide-secondary:active {
  transform: translateY(1px);
}

.guide-hero-fade {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 8rem;
  pointer-events: none;
  background: linear-gradient(to top, #09090b, transparent);
}

.guide-layout {
  position: relative;
  display: flex;
  gap: 2.5rem;
}

.guide-toc {
  position: sticky;
  top: 1.5rem;
  display: block;
  flex: 0 0 14rem;
  align-self: flex-start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding-top: 2.5rem;
  padding-right: .25rem;
}

.guide-toc h2 {
  margin: 0 0 .75rem;
  color: #e879f9;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.guide-toc ol,
.guide-mobile-toc ol {
  display: grid;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .9rem;
}

.guide-toc-link {
  display: block;
  border-left: 2px solid transparent;
  border-radius: 0 .5rem .5rem 0;
  color: #a1a1aa;
  padding: .4rem .75rem;
  text-decoration: none;
  transition:
    border-color .18s ease,
    background-color .18s ease,
    color .18s ease,
    padding-left .18s ease;
}

.guide-toc-link:hover {
  border-left-color: rgb(217 70 239 / .70);
  background: rgb(217 70 239 / .05);
  color: #f3e8ff;
  padding-left: .875rem;
}

.guide-toc-divider {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #27272a;
}

.guide-content {
  min-width: 0;
  flex: 1 1 auto;
  padding-block: 2.5rem 5rem;
}

.guide-mobile-toc {
  display: none;
}

.guide-overview {
  margin-bottom: 5rem;
  animation: guide-fade-in-up .5s ease-out both;
}

.guide-overview-card {
  border: 1px solid #27272a;
  border-radius: 1rem;
  background: rgb(24 24 27 / .60);
  padding: 1.5rem;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .03),
    0 18px 40px rgb(0 0 0 / .16);
}

.guide-overview-card h2 {
  margin: 0 0 .75rem;
  color: #f4f4f5;
  font-size: 1.25rem;
}

.guide-overview-card p {
  margin: 0;
  color: #a1a1aa;
  font-size: 1.125rem;
  line-height: 1.8;
}

.guide-highlight-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.guide-highlight-item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #d4d4d8;
  font-size: .9rem;
}

.guide-checkmark {
  color: #e879f9;
  text-shadow:
    0 0 5px rgb(217 70 239 / .60),
    0 0 15px rgb(217 70 239 / .30);
}

.guide-section {
  margin-bottom: 5rem;
  scroll-margin-top: 5rem;
  animation: guide-fade-in-up .5s ease-out both;
}

.guide-section:nth-of-type(2) { animation-delay: .10s; }
.guide-section:nth-of-type(3) { animation-delay: .16s; }
.guide-section:nth-of-type(4) { animation-delay: .22s; }
.guide-section:nth-of-type(5) { animation-delay: .28s; }
.guide-section:nth-of-type(6) { animation-delay: .34s; }
.guide-section:nth-of-type(7) { animation-delay: .40s; }
.guide-section:nth-of-type(8) { animation-delay: .46s; }

.guide-title-box {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgb(217 70 239 / .28);
  border-radius: .75rem;
  background: rgb(217 70 239 / .03);
  padding: .75rem 1rem;
  box-shadow:
    0 0 15px rgb(217 70 239 / .12),
    inset 0 0 10px rgb(217 70 239 / .05);
}

.guide-title-index {
  flex: 0 0 auto;
  color: #e879f9;
  font-size: 1.5rem;
  font-weight: 950;
  line-height: 1;
  text-shadow:
    0 0 5px rgb(217 70 239 / .60),
    0 0 15px rgb(217 70 239 / .30);
}

.guide-title-box h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.5rem, 3.3vw, 1.875rem);
  font-weight: 850;
  line-height: 1.25;
}

.guide-intro {
  max-width: 46rem;
  margin: 0 0 1.5rem;
  color: #d4d4d8;
  line-height: 1.75;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.guide-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #27272a;
  border-radius: .75rem;
  background: rgb(24 24 27 / .60);
  padding: 1.25rem;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .03),
    0 16px 36px rgb(0 0 0 / .14);
  transition:
    border-color .22s ease,
    background-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease;
}

.guide-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at 18% 0%, rgb(217 70 239 / .10), transparent 42%);
  opacity: 0;
  transition: opacity .22s ease;
}

.guide-card:hover {
  transform: translateY(-1px);
  border-color: rgb(217 70 239 / .30);
  background: rgb(24 24 27 / .80);
  box-shadow:
    0 0 18px rgb(217 70 239 / .08),
    0 18px 40px rgb(0 0 0 / .18);
}

.guide-card:hover::before {
  opacity: 1;
}

.guide-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: .75rem;
  border-radius: .625rem;
  background: rgb(217 70 239 / .15);
  color: #e879f9;
  font-size: .9rem;
  font-weight: 900;
  box-shadow: 0 0 12px rgb(217 70 239 / .18);
}

.guide-card h3 {
  margin: 0 0 .45rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 850;
}

.guide-card p,
.guide-card li,
.guide-faq p {
  color: #a1a1aa;
  font-size: .95rem;
  line-height: 1.72;
}

.guide-card p {
  margin: .55rem 0;
}

.guide-card ul {
  display: grid;
  gap: .45rem;
  margin: .8rem 0 0;
  padding-left: 1.15rem;
}

.guide-faq-section {
  margin-bottom: 0;
}

.guide-faq-list {
  display: grid;
  gap: .75rem;
}

.guide-faq {
  overflow: hidden;
  border: 1px solid #27272a;
  border-radius: .75rem;
  background: rgb(24 24 27 / .60);
  transition:
    border-color .22s ease,
    background-color .22s ease,
    box-shadow .22s ease;
}

.guide-faq:hover {
  border-color: rgb(217 70 239 / .22);
}

.guide-faq[open] {
  border-color: rgb(217 70 239 / .45);
  background: rgb(24 24 27 / .80);
  box-shadow: 0 0 18px rgb(217 70 239 / .08);
}

.guide-faq summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  cursor: pointer;
  color: #e4e4e7;
  padding: 1rem 3rem 1rem 1.25rem;
  font-weight: 800;
  list-style: none;
  transition: background-color .18s ease, color .18s ease;
}

.guide-faq summary::-webkit-details-marker {
  display: none;
}

.guide-faq summary::after {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  width: .55rem;
  height: .55rem;
  border-right: 2px solid #71717a;
  border-bottom: 2px solid #71717a;
  content: "";
  transform: translateY(-60%) rotate(45deg);
  transition: transform .18s ease, border-color .18s ease;
}

.guide-faq summary:hover {
  background: rgb(39 39 42 / .30);
  color: #f4f4f5;
}

.guide-faq[open] summary::after {
  border-color: #e879f9;
  transform: translateY(-35%) rotate(225deg);
}

.guide-faq-body {
  padding: 0 1.25rem 1rem;
}

.guide-faq-body p {
  margin: .35rem 0 0;
}

.guide-back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid #3f3f46;
  border-radius: 999px;
  background: #27272a;
  color: #d4d4d8;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 0 15px rgb(0 0 0 / .50);
  transition:
    transform .18s ease,
    background-color .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}

.guide-back-to-top:hover {
  transform: translateY(-1px) scale(1.04);
  background: #3f3f46;
  color: #fff;
  box-shadow: 0 0 18px rgb(217 70 239 / .18);
}

.guide-toc-toggle {
  display: none;
}

.guide-toc-popup {
  display: none;
}

.guide-footer {
  margin-top: 5rem;
  border-top: 1px solid #27272a;
  background: rgb(9 9 11 / .82);
}

.guide-footer-inner {
  display: grid;
  justify-items: center;
  gap: .75rem;
  padding-block: 2.5rem;
  text-align: center;
}

.guide-footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #a1a1aa;
  font-weight: 700;
}

.guide-footer-brand img {
  width: 1.5rem;
  height: 1.5rem;
}

.guide-footer p {
  max-width: 42rem;
  margin: 0;
  color: #71717a;
  font-size: .875rem;
  line-height: 1.7;
}

.guide-footer a {
  color: #a1a1aa;
  font-size: .8rem;
  text-decoration: none;
  transition: color .18s ease;
}

.guide-footer a:hover {
  color: #d4d4d8;
}

@keyframes guide-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (min-width: 768px) {
  .guide-title-box {
    padding: .875rem 1.25rem;
  }
}

@media (max-width: 1023px) {
  .guide-layout {
    display: block;
  }

  .guide-toc {
    display: none;
  }

  .guide-content {
    padding-top: 1.5rem;
  }

  .guide-mobile-toc {
    display: block;
    margin: 0 0 2.5rem;
    border: 1px solid rgb(217 70 239 / .20);
    border-radius: 1rem;
    background: rgb(24 24 27 / .82);
    padding: .85rem 1rem;
    box-shadow: 0 0 24px rgb(217 70 239 / .10);
  }

  .guide-mobile-toc summary {
    cursor: pointer;
    color: #f4f4f5;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    list-style: none;
  }

  .guide-mobile-toc summary::-webkit-details-marker {
    display: none;
  }

  .guide-mobile-toc ol {
    margin-top: .85rem;
  }

  .guide-mobile-toc .guide-toc-divider {
    border-color: #27272a;
  }
}

@media (max-width: 760px) {
  .guide-shell {
    width: min(100% - 2rem, 72rem);
  }

  .guide-hero-inner {
    padding-block: 3.5rem 5rem;
  }

  .guide-hero h1 {
    font-size: clamp(2.25rem, 12vw, 3rem);
  }

  .guide-actions {
    gap: .625rem;
  }

  .guide-primary,
  .guide-secondary {
    min-height: 2.6rem;
    padding-inline: 1rem;
  }

  .guide-overview,
  .guide-section {
    margin-bottom: 3.5rem;
  }

  .guide-card-grid {
    grid-template-columns: 1fr;
  }

  .guide-overview-card,
  .guide-card {
    padding: 1.1rem;
  }

  .guide-highlight-list {
    display: grid;
    gap: .75rem;
  }

  .guide-title-box {
    align-items: flex-start;
  }

  .guide-title-index {
    font-size: 1.35rem;
  }

  .guide-back-to-top {
    right: 1rem;
    bottom: 4.25rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  .guide-toc-toggle {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid #3f3f46;
    border-radius: 999px;
    background: #27272a;
    color: #d4d4d8;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 0 15px rgb(0 0 0 / .50);
    transition:
      transform .18s ease,
      background-color .18s ease,
      color .18s ease,
      box-shadow .18s ease;
  }

  .guide-toc-toggle:hover {
    transform: translateY(-1px) scale(1.04);
    background: #3f3f46;
    color: #fff;
    box-shadow: 0 0 18px rgb(217 70 239 / .18);
  }

  .guide-toc-popup {
    position: fixed;
    right: 1rem;
    bottom: 4.25rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: calc(100vw - 2rem);
    max-width: 18rem;
    max-height: min(24rem, 60dvh);
    background: rgb(15 15 20 / 0.96);
    backdrop-filter: blur(12px);
    border: 1px solid rgb(217 70 239 / 0.35);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95) translateY(10px);
    transition:
      opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .guide-toc-popup:target {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
  }

  .guide-toc-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .guide-toc-popup-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
  }

  .guide-toc-popup-close {
    cursor: pointer;
    font-size: 1.1rem;
    color: #a1a1aa;
    padding: 0.2rem;
    line-height: 1;
    text-decoration: none;
    transition: color 0.15s ease;
  }

  .guide-toc-popup-close:hover {
    color: #fff;
  }

  .guide-toc-popup-nav {
    overflow-y: auto;
    padding-block: 0.5rem;
    flex: 1;
  }

  .guide-toc-popup-nav ol {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .guide-toc-popup-nav li {
    margin: 0;
  }

  .guide-toc-popup-nav a.guide-toc-link {
    display: block;
    padding: 0.65rem 1rem;
    font-size: 0.825rem;
    color: #a1a1aa;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    transition:
      color 0.15s ease,
      background-color 0.15s ease;
  }

  .guide-toc-popup-nav a.guide-toc-link:hover,
  .guide-toc-popup-nav a.guide-toc-link:active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
  }

  .guide-toc-popup-nav .guide-toc-divider a.guide-toc-link {
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    color: #f0abfc;
  }
}
