/**
 * 全站手机端布局（实体之家 + 共用组件）
 * 覆盖：首页/关于/据点/权益/沙龙/邀请函/合伙人/咨询/FAQ/协议等
 */
@media (max-width: 720px) {
  :root {
    --page-gutter: clamp(20px, 6vw, 28px);
  }

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

  body {
    overflow-x: hidden;
  }

  .wrap {
    width: 100%;
    max-width: 100%;
    padding-inline: var(--page-gutter);
    box-sizing: border-box;
  }

  /* —— 顶栏 / 抽屉（加大留白，避免「小气」） —— */
  .gf-header__inner {
    gap: 10px;
    min-height: 68px;
    padding-block: 12px;
    align-items: center;
  }

  .gf-brand {
    min-width: 0;
    flex: 1 1 auto;
    gap: 11px;
  }

  .gf-brand__mark {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px;
  }

  .gf-brand__name {
    font-size: clamp(16px, 4.2vw, 1.25rem);
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.2;
  }

  .gf-brand__sub {
    font-size: 0.85rem;
    line-height: 1.25;
    max-width: 28vw;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gf-header__right {
    gap: 8px;
    flex-shrink: 0;
  }

  /* 顶栏金钮：紧凑，给右侧三杠菜单留足空间 */
  .gf-header__inner {
    overflow: hidden;
    max-width: 100%;
  }

  .gf-header__cta,
  .gf-header__cta[href*="salon-invite"],
  .gf-header__cta[href="index.html"],
  .gf-header__cta[href^="index.html"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 7px 10px !important;
    min-height: 34px;
    max-width: 7.2em;
    font-size: 14px !important;
    font-weight: 800 !important;
    border-radius: 999px !important;
    white-space: nowrap;
    flex: 0 1 auto;
    box-shadow: 0 6px 16px rgba(245, 197, 66, 0.28);
  }

  .gf-header__right {
    gap: 6px !important;
    flex: 0 0 auto;
    min-width: 0;
  }

  .gf-menu-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 12px;
    flex: 0 0 40px !important;
  }

  .gf-drawer__panel {
    width: min(86vw, 320px);
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .gf-drawer__nav a {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .gf-eco__grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .gf-eco__grid a,
  .gf-footer__eco-actions a {
    font-size: 0.82rem;
  }

  /* —— 首页 Hero —— */
  .gf-hero {
    padding: 28px 0 22px;
  }

  .gf-hero h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
    line-height: 1.25;
    word-break: break-word;
  }

  .gf-hero__lead {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .gf-hero__actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .gf-hero__actions .gf-btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }

  .gf-hero__visual {
    margin-top: 18px;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }

  .gf-hero__visual img {
    object-fit: cover;
    object-position: center 32%;
  }

  .gf-hero__free {
    flex-wrap: wrap;
    gap: 8px;
  }

  .gf-hero__note {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  /* —— 内页 Hero —— */
  .gf-page-hero {
    padding: 32px 0 20px;
  }

  .gf-page-hero h1 {
    font-size: clamp(1.42rem, 6.4vw, 1.85rem);
    line-height: 1.28;
    word-break: break-word;
  }

  .gf-page-hero p {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  /* —— 区块节奏 —— */
  .gf-section {
    padding: 40px 0;
  }

  .gf-section__title {
    font-size: clamp(1.35rem, 5.5vw, 1.7rem);
    line-height: 1.3;
  }

  .gf-section__desc {
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 20px;
  }

  .gf-public {
    padding: 40px 0;
  }

  .gf-public h2 {
    font-size: clamp(1.35rem, 5.5vw, 1.7rem);
  }

  .gf-public__lead {
    font-size: 0.92rem;
  }

  .gf-public__grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .gf-public__card {
    padding: 16px;
  }

  .gf-public__quote {
    padding: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* —— 卡片网格 —— */
  .gf-grid--2,
  .gf-grid--3,
  .gf-grid--5 {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .gf-card {
    padding: 16px;
  }

  .gf-card h3 {
    font-size: 1.05rem;
  }

  .gf-card p {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .gf-pic-card img {
    height: 150px;
  }

  .gf-pic-card__body {
    padding: 12px 14px 14px;
  }

  /* 受众等：两列更紧凑 */
  .gf-grid--pics,
  .gf-audience-grid {
    grid-template-columns: 1fr !important;
  }

  /* 首页故事条：两列 */
  .gf-story-strip {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }

  .gf-story,
  .gf-story img {
    min-height: 150px;
  }

  .gf-story__txt {
    padding: 20px 10px 10px;
  }

  .gf-story__txt strong {
    font-size: 0.85rem;
  }

  .gf-mosaic {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .gf-mosaic__wide {
    grid-column: 1 / -1;
  }

  .gf-mosaic figure img,
  .gf-photos img {
    height: 140px;
  }

  .gf-photos {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }

  /* —— 媒体左右栏 —— */
  .gf-media {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .gf-media__pic {
    border-radius: 14px;
  }

  .gf-media__pic img {
    height: 200px;
    object-fit: cover;
  }

  /* —— 中部福利 / 加油卡（强制不贴边） —— */
  .gf-mid-promo {
    padding-inline: 0;
  }

  .gf-mid-promo__inner {
    gap: 14px !important;
    /* 勿用 padding 简写清掉 .wrap 左右 gutter（会导致免费条/加油卡贴边） */
    padding-block: 8px 18px !important;
    padding-inline: var(--page-gutter) !important;
    box-sizing: border-box;
  }

  .gf-mid-promo .gf-freebar,
  .gf-mid-promo .vs-fuel-ad,
  .gf-mid-promo .vs-fuel-ad__link {
    box-sizing: border-box;
    max-width: 100%;
  }

  .gf-mid-promo .gf-freebar {
    border-radius: 16px;
    margin-inline: 0;
  }

  .gf-mid-promo .gf-freebar__inner {
    padding: 16px 16px 14px !important;
    text-align: left !important;
    justify-content: flex-start !important;
    gap: 8px 10px !important;
  }

  .gf-mid-promo .gf-freebar__item {
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .gf-mid-promo .gf-freebar__tip {
    font-size: 0.78rem;
    line-height: 1.55;
  }

  .vs-fuel-ad__link {
    display: grid !important;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "badge title"
      "desc desc"
      "cta cta";
    align-items: center;
    gap: 8px 10px;
    padding: 14px 16px !important;
  }

  .vs-fuel-ad__badge { grid-area: badge; }
  .vs-fuel-ad__title { grid-area: title; font-size: 0.95rem !important; white-space: normal !important; overflow: visible !important; line-height: 1.4 !important; overflow-wrap: anywhere; }
  .vs-fuel-ad__desc { grid-area: desc; order: unset !important; flex-basis: auto !important; }
  .vs-fuel-ad__cta {
    grid-area: cta;
    margin-left: 0 !important;
    width: 100%;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
  }

  /* —— 表单 —— */
  .gf-form,
  .gf-form.gf-card {
    padding: 16px;
    max-width: none;
  }

  .gf-form__row {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .gf-input,
  .gf-select,
  .gf-textarea {
    min-height: 44px;
    font-size: 16px; /* iOS 防自动放大 */
  }

  .gf-textarea {
    min-height: 96px;
  }

  .gf-btn {
    min-height: 44px;
  }

  .gf-btn--gold,
  .gf-form .gf-btn {
    width: 100%;
    justify-content: center;
  }

  .gf-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .gf-actions .gf-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    min-height: 44px;
  }

  /* —— FAQ —— */
  .gf-faq summary {
    padding: 14px 12px;
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .gf-faq details p {
    padding: 0 12px 14px;
    font-size: 0.9rem;
  }

  /* —— 页脚 —— */
  .gf-footer {
    padding: 36px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .gf-footer__links {
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .gf-footer__eco {
    padding: 14px;
  }

  .gf-footer__eco-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .gf-footer__eco-actions .gf-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  /* —— 悬浮条避让 —— */
  body.eg-partner-sticky-on {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  #partner-apply,
  #consult,
  #salon-apply,
  #salonInviteForm {
    scroll-margin-top: 88px;
  }
}

@media (max-width: 380px) {
  :root {
    --page-gutter: 18px;
  }

  .gf-brand__sub {
    display: none;
  }

  .gf-header__inner {
    min-height: 64px;
    padding-block: 11px;
  }

  .gf-header__cta,
  .gf-header__cta[href*="salon-invite"],
  .gf-header__cta[href="index.html"],
  .gf-header__cta[href^="index.html"] {
    padding: 6px 8px !important;
    min-height: 32px;
    font-size: 13px !important;
    max-width: 6.5em;
  }

  .gf-story-strip {
    grid-template-columns: 1fr !important;
  }

  .gf-actions .gf-btn {
    flex-basis: 100%;
  }
}

/* 平板窄屏：卡片可两列 */
@media (min-width: 560px) and (max-width: 720px) {
  .gf-grid--2,
  .gf-grid--3 {
    grid-template-columns: 1fr 1fr !important;
  }

  .gf-public__grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 1099px) {
  .gf-menu-btn { margin-left: auto !important; }
}
