/*
 * StatTuner generated guide mobile stabilizer v1.0.0
 * Scope: only <body class="generated-guide-page"> pages.
 * It does not affect tool/calculator layouts or generated JSON content.
 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.generated-guide-page {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body.generated-guide-page .site-header,
body.generated-guide-page .site-footer {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.generated-guide-page main.gc-guide-shell {
  display: block !important;
  width: 100% !important;
  max-width: 1320px !important;
  min-width: 0 !important;
  margin: 70px auto 0 !important;
  padding: 0 28px 90px !important;
  columns: auto !important;
  column-count: 1 !important;
}

body.generated-guide-page .generated-guide {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  columns: auto !important;
  column-count: 1 !important;
}

body.generated-guide-page .generated-guide > .gc-guide-hero,
body.generated-guide-page .generated-guide > .gc-screenshot,
body.generated-guide-page .generated-guide > .gc-guide-layout {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  float: none !important;
  clear: both !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.generated-guide-page .gc-guide-layout,
body.generated-guide-page .gc-guide-body,
body.generated-guide-page .gc-guide-aside,
body.generated-guide-page .gc-article-section,
body.generated-guide-page .gc-screenshot,
body.generated-guide-page .gc-guide-hero {
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.generated-guide-page .gc-guide-body,
body.generated-guide-page .gc-guide-aside {
  width: 100% !important;
  max-width: 100% !important;
}

body.generated-guide-page .gc-guide-hero h1,
body.generated-guide-page .gc-guide-hero p,
body.generated-guide-page .gc-article-section h2,
body.generated-guide-page .gc-article-section p,
body.generated-guide-page .gc-article-section li,
body.generated-guide-page .gc-aside-card,
body.generated-guide-page .gc-aside-card a {
  overflow-wrap: anywhere;
  word-break: normal;
}

body.generated-guide-page .gc-screenshot img,
body.generated-guide-page .gc-article-section img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

body.generated-guide-page .gc-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1000px) {
  body.generated-guide-page .gc-guide-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.generated-guide-page .gc-guide-aside {
    position: static !important;
    top: auto !important;
  }
}

@media (max-width: 700px) {
  body.generated-guide-page main.gc-guide-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 28px auto 0 !important;
    padding: 0 12px 72px !important;
  }

  body.generated-guide-page .generated-guide {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  body.generated-guide-page .gc-guide-hero {
    padding: 18px !important;
    border-radius: 16px !important;
  }

  body.generated-guide-page .gc-guide-breadcrumb {
    margin-bottom: 20px !important;
    flex-wrap: wrap;
  }

  body.generated-guide-page .gc-guide-hero h1 {
    margin: 8px 0 12px !important;
    font-size: clamp(32px, 10vw, 44px) !important;
    line-height: 1 !important;
    letter-spacing: -0.025em !important;
  }

  body.generated-guide-page .gc-guide-hero > p {
    max-width: none !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
  }

  body.generated-guide-page .gc-meta-row {
    gap: 7px !important;
    margin-top: 18px !important;
  }

  body.generated-guide-page .gc-meta-row span {
    max-width: 100%;
    padding: 8px 10px !important;
    white-space: normal;
  }

  body.generated-guide-page .gc-screenshot {
    margin-top: 16px !important;
    margin-bottom: 16px !important;
    padding: 8px !important;
    border-radius: 14px !important;
  }

  body.generated-guide-page .gc-screenshot img {
    border-radius: 9px !important;
  }

  body.generated-guide-page .gc-screenshot figcaption:empty {
    display: none;
  }

  body.generated-guide-page .gc-guide-layout {
    gap: 14px !important;
  }

  body.generated-guide-page .gc-article-section,
  body.generated-guide-page .gc-aside-card,
  body.generated-guide-page .gc-result-box,
  body.generated-guide-page .gc-commentary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px !important;
    border-radius: 15px !important;
  }

  body.generated-guide-page .gc-article-section {
    margin-top: 14px !important;
  }

  body.generated-guide-page .gc-article-section:first-child {
    margin-top: 0 !important;
  }

  body.generated-guide-page .gc-article-section h2 {
    margin-bottom: 12px !important;
    font-size: 23px !important;
    line-height: 1.2 !important;
  }

  body.generated-guide-page .gc-article-section p,
  body.generated-guide-page .gc-article-section li,
  body.generated-guide-page .gc-commentary p {
    font-size: 16px !important;
    line-height: 1.72 !important;
    letter-spacing: normal !important;
  }

  body.generated-guide-page .gc-article-section p {
    margin-top: 0;
    margin-bottom: 16px;
  }

  body.generated-guide-page .gc-article-section p:last-child {
    margin-bottom: 0;
  }

  body.generated-guide-page .gc-formula {
    max-width: 100%;
    overflow-x: auto;
  }

  body.generated-guide-page .gc-table {
    min-width: 560px;
  }
}

@media (max-width: 420px) {
  body.generated-guide-page .site-header {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  body.generated-guide-page .brand img {
    width: 160px !important;
    height: 50px !important;
  }

  body.generated-guide-page .menu-toggle {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px;
  }

  body.generated-guide-page .gc-guide-hero h1 {
    font-size: clamp(30px, 9.5vw, 40px) !important;
  }
}
