/* H5 使用教程 · compact */
:root {
  --gh-ink: #14181f;
  --gh-muted: #667085;
  --gh-accent: #ff5c28;
  --gh-accent-deep: #e8450f;
  --gh-warm: #ff8a4c;
  --gh-surface: #f3f5f7;
  --gh-card: #ffffff;
  --gh-line: rgba(20, 24, 31, 0.08);
  --gh-soft: #ffe6d8;
  --gh-mist: #e8eef5;
  --gh-font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --gh-display: "Bricolage Grotesque", "Noto Sans SC", sans-serif;
  --gh-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body.guide-h5 {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--gh-font);
  color: var(--gh-ink);
  background: #f2f3f5;
  line-height: 1.4;
  position: relative;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.gh-hero,
.gh-tabs,
.gh-main,
.gh-foot {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

.gh-hero {
  padding-top: calc(6px + env(safe-area-inset-top, 0px));
  padding-bottom: 6px;
}

.gh-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(120deg, #ff6a35 0%, #ff5c28 55%, #e8450f 100%);
  box-shadow: 0 6px 16px rgba(200, 50, 8, 0.16);
}

.gh-back,
.gh-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.gh-back {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.gh-back svg { width: 15px; height: 15px; }

.gh-home {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.gh-banner__copy {
  flex: 1;
  min-width: 0;
}

.gh-brand {
  margin: 0;
  font-family: var(--gh-display);
  font-size: clamp(0.98rem, 3.8vw, 1.12rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gh-tagline {
  margin: 1px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gh-tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: 0;
  padding-bottom: 6px;
  background: linear-gradient(180deg, #f2f3f5 70%, rgba(242, 243, 245, 0));
  backdrop-filter: blur(10px);
}

.gh-tabs__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--gh-line);
  box-shadow: 0 4px 14px rgba(20, 24, 31, 0.05);
}

.gh-tabs__ink {
  position: absolute;
  top: 3px;
  left: 0;
  height: calc(100% - 6px);
  border-radius: 9px;
  background: linear-gradient(145deg, var(--gh-accent), var(--gh-accent-deep));
  box-shadow: 0 4px 10px rgba(217, 54, 10, 0.22);
  transition: transform 0.28s var(--gh-ease), width 0.28s var(--gh-ease);
  z-index: 0;
  pointer-events: none;
}

.gh-tab {
  appearance: none;
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 8px 2px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gh-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.gh-tab.is-on { color: #fff; }

.gh-ico {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  display: block;
}

.gh-main {
  padding-top: 0;
  padding-bottom: 12px;
}

.gh-pane[hidden] { display: none !important; }

.gh-pane.is-on {
  display: block;
  animation: gh-pane 0.28s var(--gh-ease);
}

@keyframes gh-pane {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.gh-lead {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--gh-muted);
}

.gh-product {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
}

.gh-product__name {
  font-family: var(--gh-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(105deg, var(--gh-accent-deep), var(--gh-warm));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gh-product p {
  margin: 0;
  font-size: 11px;
  color: var(--gh-muted);
}

.gh-kw {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--gh-line);
  box-shadow: 0 1px 2px rgba(20, 24, 31, 0.03);
}

.gh-kw span {
  font-size: 11px;
  color: var(--gh-muted);
  font-weight: 600;
}

.gh-kw code {
  font-family: var(--gh-display), var(--gh-font);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gh-accent-deep);
  background: var(--gh-soft);
  padding: 4px 10px;
  border-radius: 8px;
}

/* 搜小程序 / 关注公众号 · 图示 */
.gh-illus {
  margin: 0 0 10px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background:
    linear-gradient(160deg, #fff 0%, #f7f8fa 100%);
  border: 1px solid var(--gh-line);
  box-shadow: 0 6px 18px rgba(20, 24, 31, 0.05);
}

.gh-phone {
  max-width: 320px;
  margin: 0 auto;
  padding: 10px 10px 8px;
  border-radius: 16px;
  background: #ededed;
  border: 1px solid rgba(20, 24, 31, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.gh-phone__bar {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.gh-phone__bar span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9cdd3;
}

.gh-phone__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(20, 24, 31, 0.06);
}

.gh-phone__search i {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1.6px solid #98a2b3;
  border-radius: 50%;
  position: relative;
}

.gh-phone__search i::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 6px;
  height: 1.6px;
  background: #98a2b3;
  transform: rotate(45deg);
  border-radius: 1px;
}

.gh-phone__search em {
  flex: 1;
  min-width: 0;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: var(--gh-ink);
}

.gh-phone__search b {
  font-size: 12px;
  font-weight: 800;
  color: #07c160;
}

.gh-phone__tabs {
  display: flex;
  gap: 2px;
  margin: 8px 0;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.gh-phone__tabs span {
  flex: 1;
  text-align: center;
  padding: 6px 2px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #667085;
}

.gh-phone__tabs .is-on {
  color: #fff;
  background: linear-gradient(145deg, #ff8a4c, #ff5c28);
  box-shadow: 0 4px 10px rgba(255, 92, 40, 0.22);
}

.gh-phone__hit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(20, 24, 31, 0.06);
}

.gh-phone__avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--gh-display);
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.gh-phone__avatar--mp {
  background: linear-gradient(145deg, #ff8a4c, #e8450f);
}

.gh-phone__avatar--oa {
  background: linear-gradient(145deg, #34d399, #07c160);
  border-radius: 50%;
}

.gh-phone__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gh-phone__meta strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--gh-ink);
}

.gh-phone__meta small {
  font-size: 11px;
  color: #667085;
}

.gh-phone__go,
.gh-phone__follow {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.gh-phone__go {
  background: linear-gradient(145deg, #ff8a4c, #ff5c28);
}

.gh-phone__follow {
  background: #07c160;
}

.gh-phone__hint {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #667085;
  letter-spacing: 0.01em;
}

.gh-steps {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gh-steps > li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 11px;
  background: var(--gh-card);
  border: 1px solid var(--gh-line);
  box-shadow: 0 1px 2px rgba(20, 24, 31, 0.03);
  animation: gh-step 0.32s var(--gh-ease) both;
  animation-delay: calc(0.03s + var(--i, 0) * 0.04s);
}

.gh-step-badge {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gh-accent-deep);
  background: var(--gh-soft);
}

.gh-step-ico,
.gh-step-badge .gh-ico {
  width: 15px;
  height: 15px;
  display: block;
}

.gh-steps li > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 0;
}

.gh-steps strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.gh-steps span {
  font-size: 11.5px;
  color: var(--gh-muted);
  line-height: 1.35;
}

@keyframes gh-step {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: none; }
}

.gh-figure {
  margin: 0 0 8px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--gh-line);
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
}

.gh-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 9px;
}

.gh-figure figcaption {
  margin: 5px 2px 1px;
  font-size: 11px;
  color: var(--gh-muted);
  text-align: center;
  font-weight: 600;
}

.gh-jump {
  appearance: none;
  width: 100%;
  margin: 0 0 6px;
  padding: 8px;
  border-radius: 10px;
  border: 1px dashed rgba(232, 69, 15, 0.35);
  background: #fff;
  color: var(--gh-accent-deep);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.gh-jump:active { background: var(--gh-soft); }

.gh-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 11px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(145deg, #243041 0%, #151b24 100%);
  box-shadow: 0 8px 18px rgba(21, 27, 36, 0.18);
}

.gh-link__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.gh-link__body strong {
  font-size: 13px;
  font-weight: 800;
}

.gh-link__body em {
  font-style: normal;
  font-size: 10px;
  opacity: 0.62;
}

.gh-ext {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.85;
}

.gh-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  width: 100%;
  border-radius: 11px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--gh-accent), var(--gh-accent-deep));
  box-shadow: 0 8px 18px rgba(232, 69, 15, 0.22);
  -webkit-tap-highlight-color: transparent;
}

.gh-cta i { font-style: normal; font-weight: 800; }

.gh-cta:active { transform: scale(0.985); }

.gh-foot {
  padding-top: 0;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.gh-foot a {
  color: var(--gh-muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 380px) {
  .gh-tab {
    font-size: 10.5px;
    padding: 8px 1px;
    gap: 2px;
  }
  .gh-tab span {
    max-width: 4.8em;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .gh-brand { font-size: 0.95rem; }
  .gh-tagline { font-size: 10.5px; }
}

@media (max-width: 340px) {
  .gh-ico { display: none; }
  .gh-home { padding: 0 8px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .gh-pane.is-on,
  .gh-steps > li,
  .gh-tabs__ink { animation: none !important; transition: none !important; }
}
