/* ==========================================================================
   SongFlip Guide (/guide/) – Layered on styles.css (AMOLED Slate #070B12)
   ========================================================================== */

.guide-body {
  background: var(--bg-amoled, #070B12);
  color: var(--text-primary, #F8FAFC);
  margin: 0;
}

.guide-brand-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.16);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.guide-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.guide-lang-link {
  min-height: 40px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: var(--bg-card, #131D2F);
  color: var(--text-secondary, #94A3B8);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.guide-lang-link:hover {
  color: #F8FAFC;
  border-color: #10B981;
  background: var(--bg-card-hover, #1A263D);
}

.guide-lang-link:focus-visible,
.guide-mobile-btn:focus-visible,
.guide-sidebar a:focus-visible,
.guide-pager a:focus-visible,
.guide-card:focus-visible {
  outline: 2px solid #10B981;
  outline-offset: 2px;
}

/* Mobile Sticky Sub-Bar (< 1024px) */
.guide-mobile-bar {
  display: none;
  position: sticky;
  top: 72px;
  z-index: 35;
  background: rgba(7, 11, 18, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding: 0.55rem 1rem;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
}

.guide-mobile-btn {
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--bg-card, #131D2F);
  color: #F8FAFC;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.guide-mobile-toc {
  position: relative;
}

.guide-mobile-toc summary {
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--bg-card, #131D2F);
  color: #CBD5E1;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  list-style: none;
}

.guide-mobile-toc-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(280px, 85vw);
  background: var(--bg-slate-900, #0F172A);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.guide-mobile-toc-panel a {
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
}

.guide-mobile-toc-panel a:hover {
  background: rgba(16, 185, 129, 0.14);
  color: #F8FAFC;
}

/* 3-Column Desktop Layout */
.guide-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4.5rem;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 210px;
  gap: 2.75rem;
  align-items: start;
}

.guide-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 0.5rem;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.guide-sidebar-group {
  margin-bottom: 1.5rem;
}

.guide-sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
  margin: 0 0 0.5rem 0.65rem;
}

.guide-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.guide-sidebar a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-height: 40px;
  border-radius: 8px;
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.guide-sidebar a:hover {
  background: var(--bg-card, #131D2F);
  color: #F8FAFC;
}

.guide-sidebar a.active {
  background: rgba(16, 185, 129, 0.14);
  color: #10B981;
  font-weight: 600;
}

.guide-pro-pill {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94A3B8;
  flex-shrink: 0;
}

/* Main Article Column */
.guide-article {
  max-width: 70ch;
  min-width: 0;
}

.guide-breadcrumb {
  font-size: 0.85rem;
  color: #64748B;
  margin-bottom: 0.65rem;
}

.guide-breadcrumb a {
  color: #10B981;
  text-decoration: none;
  font-weight: 600;
}

.guide-breadcrumb a:hover {
  text-decoration: underline;
}

.guide-article h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 0.85rem;
  color: #F8FAFC;
}

.guide-pro-note {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.7rem 0.95rem;
  margin-bottom: 1.35rem;
  border-radius: 10px;
  background: var(--bg-card, #131D2F);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.88rem;
  color: #CBD5E1;
}

.guide-pro-note a {
  color: #10B981;
  font-weight: 600;
  text-decoration: none;
}

.guide-pro-note a:hover {
  text-decoration: underline;
}

.guide-lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #94A3B8;
  margin: 0 0 2rem;
}

.guide-article h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.25rem 0 0.8rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #F8FAFC;
}

.guide-article p,
.guide-article li {
  font-size: 1rem;
  line-height: 1.7;
  color: #CBD5E1;
}

.guide-article a {
  color: #10B981;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-article a:hover {
  color: #34D399;
}

.guide-article ul,
.guide-article ol {
  padding-left: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.guide-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: var(--bg-card, #131D2F);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 0.14rem 0.42rem;
  border-radius: 6px;
  color: #E2E8F0;
  overflow-wrap: anywhere;
}

.guide-callout {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #E2E8F0;
  font-size: 0.95rem;
}

/* Overview Feature Cards inside Guide */
.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem;
  border-radius: 14px;
  background: var(--bg-card, #131D2F);
  border: 1px solid rgba(148, 163, 184, 0.18);
  text-decoration: none !important;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.guide-card:hover {
  border-color: #10B981;
  background: var(--bg-card-hover, #1A263D);
}

.guide-card strong {
  color: #F8FAFC;
  font-size: 1rem;
  font-weight: 700;
}

.guide-card span {
  color: #94A3B8;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.5;
}

.guide-pager {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.guide-pager a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 1.1rem;
  min-height: 48px;
  border-radius: 12px;
  background: var(--bg-card, #131D2F);
  border: 1px solid rgba(148, 163, 184, 0.18);
  text-decoration: none;
  color: #F8FAFC;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.guide-pager a:hover {
  border-color: #10B981;
  background: var(--bg-card-hover, #1A263D);
}

.guide-pager small {
  font-size: 0.78rem;
  color: #94A3B8;
}

/* Right TOC */
.guide-toc {
  position: sticky;
  top: 96px;
  font-size: 0.85rem;
}

.guide-toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
  margin: 0 0 0.6rem;
}

.guide-toc a {
  display: block;
  padding: 0.35rem 0 0.35rem 0.75rem;
  border-left: 2px solid rgba(148, 163, 184, 0.18);
  color: #94A3B8;
  text-decoration: none;
}

.guide-toc a:hover {
  color: #F8FAFC;
  border-left-color: #10B981;
}

/* Native Mobile Drawer (<dialog>) */
.guide-drawer {
  inset: 0;
  width: min(300px, 84vw);
  max-width: none;
  height: 100svh;
  max-height: none;
  margin: 0;
  padding: 1.1rem;
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--bg-amoled, #070B12);
  color: #F8FAFC;
}

.guide-drawer::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
}

.guide-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

/* Guide Video Modal Trigger */
.guide-video-row {
  margin: 1.15rem 0 0;
}

@media (max-width: 1024px) {
  .guide-mobile-bar {
    display: flex;
  }
  .guide-shell {
    grid-template-columns: 1fr;
    padding-top: 1.25rem;
  }
  .guide-sidebar,
  .guide-toc {
    display: none;
  }
  .guide-nav-hide-mobile {
    display: none;
  }
}

@media (max-width: 640px) {
  .guide-card-grid,
  .guide-pager {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
