:root {
  color-scheme: dark;
}

html, body {
  overflow-x: hidden;
}

.guides-page .site-header {
  backdrop-filter: blur(18px);
}

.guides-shell {
  position: relative;
  padding-top: 120px;
  padding-bottom: 48px;
}

.guides-shell .container {
  position: relative;
  z-index: 2;
}

.guides-hero {
  padding: 28px 0 18px;
}

.guides-hero .eyebrow {
  margin-bottom: 14px;
}

.guides-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.guides-hero .hero-lead {
  max-width: 860px;
  font-size: 1.08rem;
  line-height: 1.8;
  color: rgba(227, 233, 255, 0.82);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 34px;
}

.guide-card,
.content-panel,
.notice-panel,
.info-card,
.hero-badge {
  position: relative;
  border: 1px solid rgba(101, 128, 214, 0.22);
  background:
    linear-gradient(180deg, rgba(18, 29, 60, 0.94) 0%, rgba(10, 18, 39, 0.96) 100%);
  border-radius: 28px;
  box-shadow:
    0 18px 50px rgba(3, 9, 24, 0.38),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.guide-card {
  padding: 28px;
}

.guide-card p,
.content-panel p,
.notice-panel p,
.info-card p,
.info-card li {
  color: rgba(227, 233, 255, 0.82);
  line-height: 1.75;
}

.guide-card ul {
  margin: 0 0 26px 18px;
  padding: 0;
}

.app-mark {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.app-mark img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  flex: 0 0 auto;
}

.app-mark small {
  display: block;
  margin-bottom: 6px;
  color: rgba(152, 182, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
}

.app-mark strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.05;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.card-meta span,
.breadcrumb-chip,
.info-list li::before {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card-meta span,
.breadcrumb-chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(101, 128, 214, 0.22);
  background: rgba(18, 27, 56, 0.68);
  color: rgba(227, 233, 255, 0.88);
  font-size: .92rem;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 24px;
  margin-top: 34px;
}

.content-panel,
.info-card {
  padding: 30px;
}

.content-panel h2,
.info-card h3 {
  margin: 0 0 14px;
}

.content-panel h2 {
  font-size: 1.7rem;
}

.hero-badge {
  padding: 24px;
  margin-top: 22px;
}

.breadcrumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.breadcrumb-row a {
  text-decoration: none;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  counter-reset: guide-step;
}

.step-list li {
  position: relative;
  padding-left: 66px;
  min-height: 46px;
  margin-bottom: 20px;
  color: rgba(227, 233, 255, 0.88);
  line-height: 1.75;
}

.step-list li::before {
  counter-increment: guide-step;
  content: counter(guide-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -2px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(78,123,255,1), rgba(138,99,255,1));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(78,123,255,0.25);
}

.notice-panel {
  padding: 24px 26px;
  margin-top: 24px;
}

.notice-panel strong {
  display: block;
  margin-bottom: 10px;
  color: #fff;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.info-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 14px;
}

.info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4E7BFF, #8A63FF);
  box-shadow: 0 0 0 6px rgba(78,123,255,0.10);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #a8bfff;
  text-decoration: none;
}

.back-link:hover {
  color: #ffffff;
}

.disclaimer-line {
  margin-top: 26px;
  color: rgba(227, 233, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.75;
}

.footer-note {
  margin-top: 12px;
  color: rgba(227, 233, 255, 0.68);
  font-size: 0.95rem;
}

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

@media (max-width: 720px) {
  .guides-shell {
    padding-top: 102px;
  }

  .guides-hero h1 {
    font-size: 42px;
  }

  .guide-card,
  .content-panel,
  .info-card,
  .notice-panel,
  .hero-badge {
    padding: 22px;
    border-radius: 22px;
  }

  .app-mark strong {
    font-size: 1.4rem;
  }

  .step-list li {
    padding-left: 58px;
  }

  .step-list li::before {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}

/* ===== Theme sync with main site ===== */
html[data-theme="light"] .guides-shell {
  color: #0f172a;
}

html[data-theme="light"] .guides-hero .hero-lead,
html[data-theme="light"] .guide-card p,
html[data-theme="light"] .content-panel p,
html[data-theme="light"] .notice-panel p,
html[data-theme="light"] .info-card p,
html[data-theme="light"] .info-card li,
html[data-theme="light"] .disclaimer-line,
html[data-theme="light"] .footer-note {
  color: rgba(15, 23, 42, 0.72);
}

html[data-theme="light"] .guide-card,
html[data-theme="light"] .content-panel,
html[data-theme="light"] .notice-panel,
html[data-theme="light"] .info-card,
html[data-theme="light"] .hero-badge {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(247,249,252,0.98) 100%);
  box-shadow:
    0 18px 50px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

html[data-theme="light"] .card-meta span,
html[data-theme="light"] .breadcrumb-chip {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.88);
  color: rgba(15, 23, 42, 0.78);
}

html[data-theme="light"] .back-link {
  color: #3b82f6;
}

html[data-theme="light"] .back-link:hover {
  color: #0f172a;
}

html[data-theme="light"] .app-mark small {
  color: rgba(59, 130, 246, 0.9);
}

html[data-theme="light"] .guide-card h2,
html[data-theme="light"] .content-panel h2,
html[data-theme="light"] .info-card h3,
html[data-theme="light"] .app-mark strong {
  color: #0f172a;
}

html[data-theme="light"] .notice-panel strong {
  color: #0f172a;
}

/* STEP_TEXT_LIGHT_FIX_V1 */

/* Light theme: readable instruction text */
html[data-theme="light"] .guides-page .step-list li {
    color: #475569;
}

/* Dark theme: preserve existing contrast */
html[data-theme="dark"] .guides-page .step-list li {
    color: #e3e9ff;
}

/* Correct native controls in both themes */
html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
}


/* DEVICE_DOWNLOADS_CSS_V1 */

.guides-page .device-downloads {
    width: 100%;
    margin: 28px 0;
    padding: clamp(22px, 4vw, 38px);
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(17, 24, 39, 0.78);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.09);
}

.guides-page .device-downloads-heading {
    margin-bottom: 24px;
}

.guides-page .device-downloads-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: #91a9ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.guides-page .device-downloads h2 {
    margin: 0 0 12px;
    color: #f8fafc;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.guides-page .device-downloads p {
    color: #bec9dd;
    line-height: 1.7;
}

.guides-page .device-download-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.guides-page .device-download-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 104px;
    padding: 20px;
    gap: 10px;
    border-radius: 17px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.045);
    color: #f8fafc;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.guides-page .device-download-card strong {
    color: inherit;
    font-size: 16px;
}

.guides-page .device-download-card span {
    color: #9fb6ff;
    font-size: 13px;
}

.guides-page .device-download-card:hover {
    transform: translateY(-2px);
    border-color: #829dff;
}

.guides-page .device-download-card:focus-visible {
    outline: 3px solid #829dff;
    outline-offset: 3px;
}

.guides-page .device-download-note {
    margin: 18px 0 0;
    font-size: 13px;
}

/* Light theme */

html[data-theme="light"] .guides-page .device-downloads {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.09);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .guides-page .device-downloads h2 {
    color: #0f172a;
}

html[data-theme="light"] .guides-page .device-downloads p {
    color: #475569;
}

html[data-theme="light"] .guides-page .device-downloads-eyebrow {
    color: #4059c9;
}

html[data-theme="light"] .guides-page .device-download-card {
    background: #f8faff;
    border-color: #e2e8f0;
    color: #0f172a;
}

html[data-theme="light"] .guides-page .device-download-card span {
    color: #4059c9;
}

@media (max-width: 850px) {
    .guides-page .device-download-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .guides-page .device-download-grid {
        grid-template-columns: 1fr;
    }

    .guides-page .device-download-card {
        min-height: 88px;
    }
}
