/* Lavender Nest · 官网移动端适配（Android / iOS 手机）
 * 独立文件，仅在窄屏生效，不改变桌面端任何布局。
 * 加载顺序放在 styles.css 之后，用于覆盖原样式。
 */

/* 迷你预览卡用的短文案，桌面端不显示 */
.mv-short { display: none; }

/* ---------- 基础：禁止横向滚动与点击高亮 ---------- */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; overscroll-behavior: none; }
  a, button, summary { -webkit-tap-highlight-color: transparent; }
  body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

  /* 导航：链接单独占第二行，玻璃质感的四等分切换条（去掉底部分割线） */
  .nav { border-bottom: 0; }
  .nav-inner { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px 12px; }
  .logo-mark { width: 38px; height: 38px; border-radius: 11px; }
  .logo-mark svg { width: 24px; height: 24px; }
  .logo-text b { font-size: 15.5px; }
  .logo-text small { font-size: 12px; zoom: .75; letter-spacing: .01em; }
  .nav-links {
    display: grid; order: 3; width: 100%;
    flex: 0 0 100%;   /* 独占一整行，避免在平板/大屏手机上被挤到按钮右边 */
    grid-template-columns: repeat(4, 1fr); gap: 5px;
    padding: 5px; margin-top: 4px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .68));
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 14px;
    box-shadow: 0 8px 20px -14px rgba(126, 92, 168, .55), inset 0 1px 0 #fff;
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    backdrop-filter: blur(12px) saturate(160%);
  }
  .nav-links a {
    position: relative; font-size: 13.5px; font-weight: 700;
    letter-spacing: .02em; padding: 10px 0; border-radius: 10px;
    text-align: center; background: transparent; color: var(--ink-2);
    transition: color .18s, background .18s, box-shadow .18s;
  }
  .nav-links a.active {
    background: linear-gradient(135deg, #B493DB, #7E5CA8);
    color: #fff;
    box-shadow: 0 6px 14px -6px rgba(126, 92, 168, .7), inset 0 1px 0 rgba(255, 255, 255, .28);
  }
  .nav-auth { order: 2; margin-left: auto; gap: 8px; flex-wrap: nowrap; }
  .nav-auth .btn { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
  /* 手机端：退出收进账号卡片，右上角只留「头像 + 用户名」，头像放大更清晰 */
  .nav-auth #navRegBtn.is-logout { display: none; }
  .nav-auth .btn.has-avatar {
    gap: 8px; padding: 5px 13px 5px 5px; border-radius: 999px; margin-top: -2px;
  }
  .nav-auth .btn.has-avatar .nav-avatar { width: 30px; height: 30px; font-size: 14px; }
  .nav-auth .btn.has-avatar .nav-user { max-width: 96px; font-size: 13.5px; }
}

/* ---------- 手机正文 ---------- */
@media (max-width: 768px) {
  /* Hero */
  .hero { padding: 18px 18px 30px; }
  .hero h1 { font-size: 30px; line-height: 1.26; letter-spacing: .2px; }
  .hero h1 em::after { bottom: 3px; height: 9px; }
  .hero-badge { font-size: 11.5px; padding: 5px 12px; margin-bottom: 14px; }
  .hero-sub { font-size: 14px; line-height: 1.7; margin-top: 12px; }
  .hero-sub br { display: none; }
  .hero-cta { gap: 10px; margin-top: 20px; flex-wrap: wrap; }
  .hero-cta .btn { flex: 1; min-width: 132px; padding: 12px 18px; font-size: 15px; }
  .hero-meta { gap: 8px 14px; margin-top: 12px; font-size: 12px; }

  /* 细节质感：徽标玻璃感、卡片柔和投影 */
  .hero-badge {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 6px 16px -12px rgba(126, 92, 168, .6);
  }
  .feature, .hl-item, .plat-chip, .dl-card, .price-card {
    box-shadow: 0 10px 24px -20px rgba(126, 92, 168, .65);
  }
  .price-card.hot { box-shadow: 0 16px 36px -22px rgba(126, 92, 168, .75); }

  /* Hero：标题在左，迷你预览卡在右（对应圈出的位置） */
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34%;
    grid-template-areas:
      "badge art"
      "title art"
      "sub sub"
      "cta cta"
      "meta meta";
    align-items: center;
    column-gap: 10px;
    row-gap: 0;
  }
  .hero-copy { display: contents; }
  .hero-badge {
    grid-area: badge; justify-self: start; align-self: start; margin-bottom: 6px;
    font-size: 11.5px; white-space: nowrap; letter-spacing: 0;
  }
  .hero-badge .badge-wide { display: none; }   /* 手机省去「全平台」三字，保证一行放下 */
  .hero h1 { grid-area: title; font-size: 26px; align-self: start; margin-top: 2px; }
  .hero-art {
    grid-area: art; display: block; position: relative;
    height: 132px; margin: 0 0 4px; overflow: hidden; align-self: start;
  }
  .hero-sub { grid-area: sub; margin-top: 14px; }
  .hero-cta { grid-area: cta; }
  .hero-meta { grid-area: meta; }

  /* 迷你卡片：6 张自动轮播（淡入淡出，点击切换），按小尺寸重排内容 */
  .deck3d { position: absolute; inset: 0 0 28px 0; perspective: none; }
  .deck3d::before { display: none; }
  .deck3d .page3d {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; justify-content: center;
    padding: 8px 9px 7px; border-radius: 14px;
    opacity: 0; visibility: hidden;
    transform: none !important; z-index: auto !important;
    transition: opacity .45s ease, visibility .45s;
    box-shadow: 0 10px 24px -16px rgba(126, 92, 168, .6);
  }
  .deck3d .page3d.is-active { opacity: 1; visibility: visible; }

  /* 迷你尺寸排版：每张卡只保留核心信息，保证完整显示不被裁切 */
  .deck3d .mock-head { display: none; }
  .deck3d .page3d h4 {
    display: block; margin: 0 0 4px;
    font-size: 8px; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .deck3d .mv-long { display: none; }
  .deck3d .mv-short { display: inline; }
  .deck3d .page3d h4:nth-of-type(2) { display: none; }
  .deck3d .mini-tag { display: none; }
  .deck3d .mock-body { flex-direction: column; gap: 5px; align-items: center; }
  .deck3d .mock-ring svg { width: 42px; height: 42px; }
  .deck3d .mock-ring { font-size: 6.5px; gap: 0; }
  .deck3d .mock-rows { width: 100%; flex: none; gap: 2px; }
  .deck3d .mock-row {
    flex-direction: row; align-items: baseline; justify-content: space-between; gap: 3px;
    font-size: 7px; line-height: 1.4; padding: 1px 4px; border-radius: 5px;
    white-space: nowrap; overflow: hidden;
  }
  .deck3d .mock-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .deck3d .mock-row b { font-size: 7px; flex: none; }
  /* 概览卡：圆环 + 两行信息 */
  .deck3d .mock-body .mock-row:nth-child(3) { display: none; }
  .deck3d .plan-row .mock-row { margin-bottom: 1px; }
  .deck3d .bar { height: 2px; margin: 0 0 2px; }
  .deck3d .foot-line, .deck3d .page-sub, .deck3d .cal-legend { display: none; }
  .deck3d .cal7 { gap: 2px; margin: 0; }
  .deck3d .trend { height: 34px; gap: 3px; }
  .deck3d .trend-x { gap: 4px; margin-top: 3px; }
  .deck3d .trend-x span { font-size: 6.5px; }
  .deck3d .heat { display: none; }
  .deck3d .wk { gap: 2px; }
  /* 52 周卡：收紧网格与下方两行的间距，避免最后一行贴底被切 */
  .deck3d .page3d:nth-of-type(6) .mock-rows { margin-top: 6px !important; }
  /* 圆点轮播指示条：卡片下方居中的小胶囊 */
  .hero-art .deck-dots {
    position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    display: flex; gap: 5px; padding: 5px 10px; z-index: 5;
    border-radius: 99px; box-shadow: 0 4px 12px -6px rgba(126, 92, 168, .4);
  }
  .hero-art .deck-dots i { width: 6px; height: 6px; }
  .hero-art .deck-dots i.on { width: 15px; }

  /* 区块标题与间距 */
  .section { padding: 42px 18px; }
  .section h2 { font-size: 23px; line-height: 1.35; }
  .section-sub { font-size: 13px; }
  .page-hero { padding: 36px 18px 0; }
  .page-hero h1 { font-size: 25px; line-height: 1.34; }
  .page-hero p { font-size: 13.5px; margin-top: 8px; }

  /* 功能卡片 */
  .feature { padding: 16px; }
  .feature b { font-size: 14.5px; padding-right: 46px; }
  .feature p { font-size: 13px; }
  .f-ico { width: 36px; height: 36px; font-size: 18px; margin-bottom: 10px; }
  .prem { top: 15px; right: 13px; font-size: 10px; }
  .hl-grid, .plat-grid { padding: 0 18px; margin-top: 26px; }

  /* 价格 */
  .price-grid { gap: 16px; margin-top: 28px; }
  .price-card { padding: 20px 18px; }
  .p-num { font-size: 30px; margin: 6px 0 12px; }
  .price-card li { font-size: 13px; padding: 5px 0; }
  .dur-seg button { padding: 9px 0; }

  /* 下载卡片 */
  .dl-grid { gap: 12px; margin-top: 26px; }
  .dl-card { padding: 20px 16px; }
  .dl-logo { width: 50px; height: 50px; border-radius: 14px; }
  .dl-logo svg { width: 26px; height: 26px; }

  /* 按钮触控高度 */
  .btn { padding: 10px 16px; }
  .btn.lg { padding: 12px 20px; font-size: 15px; }

  /* 对比表：手机端压缩列宽 */
  .cmp { margin-top: 26px; border-radius: 14px; }
  .cmp-row { grid-template-columns: 1.55fr .7fr .7fr; padding: 10px 12px; font-size: 12.5px; }
  .cmp-row.head { font-size: 12.5px; }

  /* CTA 横幅 */
  .cta-band { margin-top: 30px; padding: 22px 16px; border-radius: 16px; }
  .cta-band b { font-size: 16.5px; line-height: 1.5; }
  .cta-band p { font-size: 13px; margin: 8px 0 14px; }

  /* FAQ */
  .faq-list { margin-top: 24px; }
  .faq-list details { padding: 0 14px; border-radius: 12px; }
  .faq-list summary { font-size: 14px; padding: 13px 0; }
  .faq-list p { font-size: 13px; }
  .faq-group { padding: 0; }
  .faq-group h3 { font-size: 16px; margin: 26px 0 10px; }
  .faq-group.faq-platform { border-radius: 14px; margin-bottom: 13px; }
  .faq-group.faq-platform > summary { font-size: 15.5px; padding: 14px 15px; }
  .faq-group.faq-platform[open] > summary { padding-bottom: 8px; }
  .faq-group.faq-platform .platform-body { padding: 0 13px 13px; }
  .faq-group details { padding: 0 14px; border-radius: 12px; }
  .faq-group summary { font-size: 14px; padding: 13px 26px 13px 0; }
  .faq-group details p { font-size: 13px; }

  /* 更新日志 / 步骤 */
  .log { margin: 24px 0 0; }
  .log-item { gap: 10px; padding: 14px 0; }
  .log-ver { font-size: 12px; padding: 3px 9px; border-radius: 8px; }
  .log-body b { font-size: 13.5px; }
  .log-body ul { margin: 5px 0 0 16px; font-size: 12.5px; line-height: 1.8; }
  .steps { margin: 20px 0 0; }
  .step { gap: 11px; }
  .step-num { width: 24px; height: 24px; font-size: 12px; }
  .step p { font-size: 13px; line-height: 1.7; }

  /* 页脚：品牌在上，产品/支持两列竖排，底部居中版权 */
  .footer { padding: 22px 18px 18px; font-size: 12px; }
  .foot-main { flex-direction: column; align-items: stretch; gap: 16px; }
  .foot-brand { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .foot-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; padding-left: 0; border-left: 0; }
  .foot-group { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
  .foot-group b { width: auto; margin-bottom: 1px; }
  .foot-contact { flex-direction: column; align-items: flex-start; gap: 7px; white-space: normal; }
  .foot-bottom {
    flex-direction: column; align-items: center;
    text-align: center; gap: 4px; margin-top: 16px;
  }

  /* 协议页正文 */
  .legal { padding: 26px 18px 56px; }
  .legal h1 { font-size: 24px; }
  .legal .upd { font-size: 12.5px; margin-bottom: 22px; }
  .legal h3 { font-size: 16px; margin: 22px 0 8px; }
  .legal p, .legal li { font-size: 13.5px; line-height: 1.85; }
  .legal ul { margin: 6px 0 0 18px; }

  /* 登录 / 注册弹窗（手机端紧凑版，卡片随内容收缩） */
  .modal { padding: 12px; }
  .auth-card {
    width: 100%; max-width: 400px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 24px 18px 22px; border-radius: 16px;
  }
  .auth-card.small { width: 100%; }
  .user-avatar { width: 56px; height: 56px; font-size: 22px; margin: 2px auto 10px; }
  /* 登录后的账号卡片：手机端拉大间距，避免拥挤 */
  #userPane .user-avatar { width: 62px; height: 62px; font-size: 24px; margin: 10px auto 16px; }
  #userPane .user-welcome { font-size: 17px; margin-bottom: 18px; }
  #userPane .settings-rows div { padding: 12px 4px; }
  #userPane .settings-rows span { font-size: 13px; }
  #userPane .settings-rows b { font-size: 13.5px; }
  #userPane .user-actions { margin-top: 20px; gap: 12px; }
  #userPane .user-actions .btn { padding: 11px 10px; border-radius: 11px; }
  #userPane .switch-hint { margin-top: 16px; font-size: 11.5px; line-height: 1.6; }
  #loginPane { flex: 0 0 auto; }
  .wb-brand { gap: 9px; margin-bottom: 26px; }
  .wb-mark { width: 30px; height: 30px; border-radius: 9px; }
  .wb-mark svg { width: 19px; height: 19px; }
  .wb-text b { font-size: 16px; }
  .wb-text span { font-size: 10.5px; margin-top: 1px; }
  .auth-card .field { margin-bottom: 14px; }
  /* 验证码行内的字段不加下边距，否则右侧「获取验证码」/图片会比输入框低一截 */
  .auth-card .sms-row > .field { margin-bottom: 0; }
  .auth-card .field span { font-size: 12px; margin-bottom: 6px; }
  .auth-card .field input { height: 42px; font-size: 16px; border-radius: 10px; }
  .auth-card .field.has-eye input { padding-right: 42px; }
  .auth-card .eye { width: 28px; height: 28px; right: 6px; bottom: 7px; }
  .auth-card .sms-row { margin-bottom: 14px; }
  .auth-card .sms-btn { height: 42px; font-size: 12.5px; padding: 0 11px; border-radius: 10px; }
  .auth-card .captcha-img { height: 42px; width: 104px; border-radius: 10px; }
  .auth-card .opts { flex-wrap: wrap; gap: 10px 14px; margin: 2px 0 16px; font-size: 12.5px; }
  .auth-card .forgot { font-size: 12.5px; }
  .auth-card .btn.primary.wide { padding: 12px 18px; border-radius: 11px; }
  .switch-hint { font-size: 11px; white-space: nowrap; line-height: 1.5; margin-top: 14px; }
  .wb-agree { margin-top: 22px; padding-top: 0; font-size: 11.5px; }
  .wb-agree i { width: 15px; height: 15px; }
  .modal-x { top: 8px; right: 10px; }

  /* 注册表单：两列 + 紧凑间距，避免整屏被表单占满（只影响注册，登录保持现状） */
  #regForm .reg-grid { grid-template-columns: 1fr 1fr; gap: 0 10px; }
  #regForm .field { margin-bottom: 10px; }
  #regForm .sms-row { margin-bottom: 10px; }
  /* 验证码行内的字段不再加下边距，否则右侧图片/按钮会比输入框低一截 */
  #regForm .sms-row > .field { margin-bottom: 0; }
  #regForm .field > span { font-size: 11.5px; margin-bottom: 4px; }
  #regForm .field input { height: 40px; font-size: 15.5px; border-radius: 10px; }
  #regForm .field.has-eye input { padding-right: 34px; }
  #regForm .eye { width: 26px; height: 26px; right: 4px; bottom: 7px; }
  #regForm .sms-btn { height: 40px; font-size: 12px; padding: 0 10px; }
  #regForm .captcha-img { height: 40px; width: 96px; }
  #regForm .btn.primary.wide { padding: 11px 18px; }
  #regForm .switch-hint { margin-top: 10px; }

  /* 提示条 */
  .toast { max-width: calc(100vw - 28px); bottom: 18px; font-size: 12.5px; padding: 9px 16px; white-space: nowrap; }
}

/* ---------- 小屏手机（≤560px） ---------- */
@media (max-width: 560px) {
  .hero h1 { font-size: 24px; }
  .hero { padding: 16px 16px 26px; }
  .section { padding: 38px 16px; }
  .hl-grid, .plat-grid { padding: 0 16px; }
  .reg-grid { grid-template-columns: 1fr; }
  .reg-grid .field { margin-bottom: 12px; }
  .page-hero { padding: 32px 16px 0; }
  .page-hero h1 { font-size: 23px; }
  .footer { padding: 20px 16px 24px; }
}

/* ---------- 超窄屏（≤400px，如 360px 安卓机） ---------- */
@media (max-width: 400px) {
  .nav-inner { padding: 9px 12px; }
  .logo-text b { font-size: 14px; }
  .logo-text small { font-size: 12px; zoom: .7; }
  .nav-links a { font-size: 12.5px; padding: 8px 0; }
  .nav-auth .btn { padding: 6px 10px; font-size: 12.5px; }
  .hero h1 { font-size: 22px; }
  /* 360px 窄屏：右侧预览卡略放宽一点，保证卡内文字不被截断 */
  .hero-inner { grid-template-columns: minmax(0, 1fr) 38%; column-gap: 8px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .p-num { font-size: 28px; }
  .cta-band b { font-size: 15.5px; }
  .switch-hint { font-size: 10.5px; }
}

/* ---------- 低性能 WebView（百度 App / X5 内核）滚动加固 ----------
 * 百度内置浏览器对 backdrop-filter、超大模糊层非常敏感，
 * 滚动时会持续重绘导致页面看起来「滑不动」。手机端统一降级为无模糊。 */
@media (max-width: 900px) {
  html { scroll-behavior: auto !important; }
  body::before, body::after { display: none !important; }
  .nav, .nav-links, .feature, .price-card, .dl-card,
  .faq-list details, .faq-group details, .hl-item, .plat-chip,
  .cmp, .cta-band, .modal-backdrop {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .nav { background: rgba(250, 246, 253, .97) !important; }
  .nav-links {
    background: #fff !important;
    box-shadow: 0 6px 16px -12px rgba(126, 92, 168, .45) !important;
  }
  .deck3d .page3d {
    transition: none !important;
    will-change: auto !important;
  }
}

/* ---------- 全球攒钱数据（手机端） ---------- */
@media (max-width: 768px) {
  .gs-wrap { grid-template-columns: 1fr; gap: 14px; margin-top: 18px; }
  .gs-chart { padding: 14px 14px; border-radius: 14px; }
  .gs-row { grid-template-columns: 58px 1fr 54px; gap: 8px; padding: 6px 0; }
  .gs-name { font-size: 12.5px; }
  .gs-row b { font-size: 12.5px; }
  .gs-track { height: 10px; }
  .gs-side { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .gs-kpi { padding: 12px 10px; border-radius: 12px; }
  .gs-kpi b { font-size: 20px; }
  .gs-kpi b span { font-size: 11px; }
  .gs-kpi p { font-size: 11px; margin-top: 5px; }
  .gs-note { font-size: 10.5px; margin-top: 12px; }

  .ps-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
  .ps-hero { padding: 20px 18px; border-radius: 16px; }
  .ps-big { font-size: 46px; margin: 10px 0 6px; }
  .ps-hero p { font-size: 12px; margin-bottom: 14px; }
  .ps-hero ul { margin-top: 14px; padding-top: 12px; gap: 6px; }
  .ps-hero li { font-size: 10.5px; }
  .ps-hero li b { font-size: 13.5px; }
  .ps-side { grid-template-rows: none; gap: 8px; }
  .ps-card { padding: 13px 16px; border-radius: 13px; }
  .ps-card b { font-size: 20px; }
  .ps-card em { font-size: 10.5px; }
}
@media (max-width: 400px) {
  .gs-side { grid-template-columns: 1fr; }
  .gs-row { grid-template-columns: 54px 1fr 50px; }
}
