/* ===== Guide Page ===== */
.guide-page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
}

.guide-hero {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.guide-hero .section-tag {
  margin-bottom: 12px;
}

.guide-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}

.guide-hero-desc {
  color: var(--text-muted);
  line-height: 1.7;
}

.guide-progress-wrap {
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.guide-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.guide-progress-counter {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 700;
}

.guide-progress-current {
  font-size: 2rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--purple-light), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.guide-progress-sep {
  color: var(--text-dim);
  font-size: 1.1rem;
}

.guide-progress-total {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.guide-progress-caption {
  color: var(--text-muted);
  font-size: 14px;
}

.guide-progress-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 14px;
}

.guide-progress-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  transition: width 0.35s ease;
}

.guide-progress-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.guide-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.guide-dot.done {
  background: rgba(139, 92, 246, 0.45);
}

.guide-dot.active {
  background: var(--purple-light);
  transform: scale(1.25);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.55);
}

.guide-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.guide-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  max-height: calc(100vh - var(--nav-height) - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.guide-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.guide-sidebar-head h2 {
  font-size: 1rem;
  font-weight: 700;
}

.guide-toc-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple-light);
  white-space: nowrap;
}

.guide-toc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
}

.guide-toc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.guide-toc-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.guide-toc-item.active {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
}

.guide-toc-item.done:not(.active) .guide-toc-num {
  color: var(--purple-light);
}

.guide-toc-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  min-width: 22px;
}

.guide-toc-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.guide-toc-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.guide-toc-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.guide-toc-item.active .guide-toc-label {
  color: var(--purple-light);
}

.guide-toc-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-main {
  min-width: 0;
}

.guide-step-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.guide-step-card-finish {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.08), rgba(255, 255, 255, 0.02));
}

.guide-step-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.guide-step-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  font-size: 1.6rem;
  flex-shrink: 0;
}

.guide-step-meta {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-light);
  font-weight: 600;
  margin-bottom: 6px;
}

.guide-step-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
}

.guide-step-desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 24px;
}

.guide-step-desc strong {
  color: var(--text);
  font-weight: 600;
}

.guide-screenshot {
  margin-bottom: 24px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.guide-screenshot img {
  width: 100%;
  display: block;
  max-height: 520px;
  object-fit: contain;
  object-position: top center;
}

.guide-cta {
  margin-bottom: 24px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
}

.guide-cta h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--purple-light);
}

.guide-cta p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 14px;
}

.guide-finish {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.guide-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.guide-nav .btn {
  min-width: 140px;
}

.guide-nav .btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#guideConfetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + var(--safe-top) + 8px);
    z-index: 5;
    max-height: none;
    padding: 12px 14px;
  }

  .guide-sidebar-head h2 {
    font-size: 0.9rem;
  }

  .guide-toc-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 4px 0 8px;
    scrollbar-width: none;
  }

  .guide-toc-list::-webkit-scrollbar {
    display: none;
  }

  .guide-toc-item {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    padding: 8px 14px;
    white-space: nowrap;
  }

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

@media (max-width: 640px) {
  .guide-page {
    padding: calc(var(--nav-height) + var(--safe-top) + 24px) 16px 56px;
  }

  .guide-step-card {
    padding: 20px;
  }

  .guide-nav {
    flex-direction: column-reverse;
  }

  .guide-nav .btn {
    width: 100%;
  }

  .guide-progress-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .guide-progress-dots {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .guide-progress-dots::-webkit-scrollbar {
    display: none;
  }
}
