:root {
  --guide-bg: #0d0c12;
  --guide-sidebar: #0c0d12;
  --guide-card: #15141c;
  --guide-card-soft: #1c1b26;
  --guide-line: #2a2835;
  --guide-text: #efedf3;
  --guide-muted: #9692a1;
  --guide-pink: #e34b99;
  --guide-pink-soft: rgba(227, 75, 153, 0.15);
  --guide-blue: #7ba8ff;
  --guide-green: #58d89a;
  --guide-yellow: #f5c64d;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 100%, rgba(227, 75, 153, 0.05), transparent 35%),
    var(--guide-bg);
  color: var(--guide-text);
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--guide-pink);
  outline-offset: 3px;
}

.guide-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 240px;
  flex-direction: column;
  border-right: 1px solid #22202b;
  background: rgba(12, 13, 18, 0.98);
  padding: 1.6rem 0.75rem;
}

.guide-brand {
  display: inline-block;
  margin: 0 0.55rem 1.35rem;
  color: var(--guide-text);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.guide-brand span,
.guide-brand em {
  color: var(--guide-pink);
  font-style: normal;
}

.guide-brand em {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#guide-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

#guide-nav button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.8rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--guide-muted);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0.78rem 0.85rem;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

#guide-nav button:hover,
#guide-nav button.is-active {
  background: var(--guide-pink-soft);
  color: var(--guide-text);
}

#guide-nav button.is-active .nav-icon {
  background: var(--guide-pink);
}

.nav-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-note {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: auto 0.6rem 0;
  border-top: 1px solid var(--guide-line);
  padding-top: 1rem;
  color: #777381;
  font-size: 0.65rem;
}

.sidebar-note strong {
  color: var(--guide-pink);
  letter-spacing: 0.1em;
}

.guide-main {
  height: 100vh;
  margin-left: 240px;
  padding: 1rem 2rem 2rem;
}

.strategy-tabs {
  display: flex;
  gap: 0.3rem;
  max-width: 780px;
  margin: 0 auto;
}

.strategy-tabs button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 9px 9px 0 0;
  background: #121119;
  color: var(--guide-muted);
  cursor: pointer;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
}

.strategy-tabs button:hover,
.strategy-tabs button.is-active {
  border-color: #2b2834;
  background: #17151e;
  color: var(--guide-pink);
}

.guide-card {
  display: grid;
  width: min(100%, 780px);
  height: calc(100vh - 90px);
  grid-template-rows: minmax(0, 1fr) auto;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--guide-line);
  border-radius: 18px;
  background: rgba(21, 20, 28, 0.94);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.34);
}

.guide-card__body {
  overflow-y: auto;
  padding: 2.8rem 3rem;
  scrollbar-color: #34313e transparent;
  scrollbar-width: thin;
}

.guide-card__footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-top: 1px solid var(--guide-line);
  background: rgba(18, 17, 25, 0.88);
  padding: 1.15rem 3rem;
}

.guide-card__footer button {
  width: max-content;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--guide-muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.7rem 1.1rem;
}

.guide-card__footer button:last-child {
  justify-self: end;
  background: var(--guide-pink);
  color: white;
}

.guide-card__footer button:disabled {
  cursor: not-allowed;
  opacity: 0.25;
}

#page-indicator {
  color: #6f6b78;
  font-size: 0.78rem;
}

.step-title {
  color: var(--guide-pink);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
}

.step-subtitle {
  margin: 0.25rem 0 1.8rem;
  color: #797583;
  font-size: 1rem;
}

.guide-card__body p {
  margin: 0 0 1rem;
  color: var(--guide-muted);
}

.guide-card__body h2,
.guide-card__body h3 {
  margin: 1.7rem 0 0.7rem;
  color: var(--guide-text);
}

.guide-card__body h2 {
  font-size: 1.08rem;
}

.guide-card__body h3 {
  font-size: 0.96rem;
}

.guide-card__body ul,
.guide-card__body ol {
  margin: 0.7rem 0 1.25rem 1.35rem;
  color: var(--guide-muted);
}

.guide-card__body li {
  margin: 0.42rem 0;
  padding-left: 0.2rem;
}

.guide-card__body strong {
  color: var(--guide-text);
}

.guide-card__body code {
  border-radius: 4px;
  background: rgba(227, 75, 153, 0.08);
  color: var(--guide-pink);
  padding: 0.12rem 0.32rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.feature-card {
  border: 1px solid var(--guide-line);
  border-radius: 12px;
  background: var(--guide-card-soft);
  padding: 1rem;
}

.fc-icon {
  font-size: 1.25rem;
}

.fc-title {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.fc-desc {
  margin-top: 0.1rem;
  color: #777381;
  font-size: 0.72rem;
}

.callout {
  margin: 1rem 0 1.3rem;
  border: 1px solid #2a2f43;
  border-radius: 10px;
  background: #191d2b;
  color: var(--guide-muted);
  padding: 1rem 1.2rem;
}

.callout-label {
  margin-bottom: 0.45rem;
  color: var(--guide-blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.callout--tip {
  border-color: rgba(88, 216, 154, 0.25);
  background: rgba(88, 216, 154, 0.06);
}

.callout--tip .callout-label {
  color: var(--guide-green);
}

.callout--warning {
  border-color: rgba(245, 198, 77, 0.26);
  background: rgba(245, 198, 77, 0.06);
}

.callout--warning .callout-label {
  color: var(--guide-yellow);
}

.pattern-block {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.65rem 0;
}

.pattern-block span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  color: white;
  font-size: 0.74rem;
  font-weight: 800;
}

.pattern-block .win {
  background: rgba(88, 216, 154, 0.78);
}

.pattern-block .loss {
  background: rgba(227, 75, 153, 0.78);
}

.chart-box {
  margin: 1rem 0;
  overflow: hidden;
  border: 1px solid var(--guide-line);
  border-radius: 10px;
  background: #080a0f;
}

.chart-box svg {
  display: block;
  width: 100%;
  height: auto;
}

.compliance-box {
  margin-top: 1.5rem;
  border-top: 1px solid var(--guide-line);
  padding-top: 1rem;
  color: #777381;
  font-size: 0.75rem;
}

.mobile-menu {
  display: none;
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .mobile-menu {
    position: fixed;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 40;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--guide-line);
    border-radius: 8px;
    background: #17151e;
    color: var(--guide-text);
  }

  .guide-sidebar {
    width: min(80vw, 280px);
    pointer-events: none;
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform 0.25s ease;
  }

  .guide-sidebar.is-open {
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
  }

  .guide-main {
    min-height: 100vh;
    height: auto;
    margin-left: 0;
    padding: 4.4rem 1rem 1rem;
  }

  .strategy-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .strategy-tabs::-webkit-scrollbar {
    display: none;
  }

  .strategy-tabs button {
    flex: 0 0 auto;
    font-size: 0.75rem;
    padding-inline: 0.9rem;
  }

  .guide-card {
    min-height: calc(100vh - 125px);
    height: auto;
  }

  .guide-card__body {
    min-height: 62vh;
    overflow: visible;
    padding: 2rem 1.25rem;
  }

  .guide-card__footer {
    padding: 1rem 1.25rem;
  }
}

@media (max-width: 540px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .guide-card__footer {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  #page-indicator {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: center;
  }

  .guide-card__footer button {
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
