/* verifate.net 手机紧凑磁贴候选（本机，未部署）。只写样式；不改 H1/title/meta/锚文字。仅 ≤640px 生效。 */
@media (max-width:640px){
  /* 1 页眉与语言行压缩 */
  .vf-home-language-switch ul{gap:2px 4px!important;padding:0 8px!important;margin:0!important}
  .vf-home-language-switch a{min-height:32px!important;padding:0 8px!important;font-size:13px!important}
  .vf2-header .vf2-in{min-height:44px!important;padding-top:0!important;gap:0 12px!important}
  .vf2-brand{min-height:40px!important}
  .vf2-nav a{min-height:40px!important;padding:0 10px!important;font-size:14px!important}
  /* 2 版面顺序：首屏=两个主入口+今天卡+工具磁贴；三条路线、深入服务下沉 */
  main#main{display:flex;flex-direction:column}
  .vf2-hero{order:0;padding:12px 0 4px!important}
  #chart-tools{order:1}
  section[aria-labelledby="home-routes-title"]{order:5}
  #services{order:6}
  main#main>*:not(.vf2-hero):not(#chart-tools):not([aria-labelledby="home-routes-title"]):not(#services){order:7}
  .vf2-hero::before,.vf2-hero::after{display:none!important}   /* 装饰弧线 */
  .vf2-hero h1{font-size:22px!important;line-height:1.3!important;margin:0 0 4px!important}
  .vf2-hero p.vf2-lead{font-size:14px!important;line-height:1.5!important;margin:0 0 8px!important}
  .vf2-hero .vf2-in>p{margin:6px 0 0!important;font-size:13px!important;line-height:1.5}
  .vf2-hero .vf2-in>p a{text-decoration-thickness:1px!important;text-underline-offset:3px;font-weight:500}
  .vf2-sec{padding:14px 0!important}
  /* 3 两列磁贴：整块可点；说明最多一行；“開始使用”只留给读屏 */
  .vf2-grid,.vf2-group--lead .vf2-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .vf2-tool,.vf2-group--lead .vf2-tool{display:grid!important;grid-template-columns:30px minmax(0,1fr);grid-template-areas:"i t" "i d";column-gap:10px;row-gap:0;align-items:center;min-height:56px;padding:9px 10px!important;border-radius:12px;height:auto!important}
  .vf2-tool::before{grid-area:i;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;line-height:1;color:var(--vf-gold,#c9a24b);border:1px solid var(--vf-gold,#c9a24b);background:color-mix(in srgb,var(--vf-gold,#c9a24b) 12%,transparent);content:"◆"}
  .vf2-tool h3,.vf2-tool h4{grid-area:t;text-align:left!important;margin:0!important;font-size:15px!important;line-height:1.3!important}
  .vf2-tool p{grid-area:d;text-align:left!important;margin:2px 0 0!important;font-size:12px!important;line-height:1.35!important;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
  .vf2-tool span{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  a.vf2-tool[href*="paipan"]::before{content:"☰\FE0E"}
  a.vf2-tool[href*="ziwei"]::before{content:"✦\FE0E"}
  a.vf2-tool[href*="phone"]::before,a.vf2-tool[href*="numbers"]::before{content:"☎\FE0E"}
  a.vf2-tool[href*="/name/"]::before{content:"字"}
  a.vf2-tool[href*="company"]::before{content:"名"}
  a.vf2-tool[href*="tongshing"]::before{content:"曆"}
  a.vf2-tool[href*="astrology"]::before{content:"☉\FE0E"}
  a.vf2-tool[href*="tarot"]::before{content:"✶\FE0E"}
  a.vf2-tool[href*="yijing"]::before{content:"☯\FE0E"}
  a.vf2-tool[href*="liuren"]::before{content:"壬"}
  a.vf2-tool[href$="/tools/"]::before{content:"⌘\FE0E"}
  a.vf2-tool[href$="/learn/"]::before{content:"學"}
  a.vf2-tool[href$="/research/"]::before{content:"研"}
  /* 线上自带 @media(max-width:520px) 的 body.home-phase1.vf2 .vf2-hero-direct .vf2-tool 规则特异性更高：这里用同样特异性+!important 盖掉 */
  body.home-phase1.vf2 .vf2-hero-direct{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.home-phase1.vf2 .vf2-hero-direct .vf2-tool{display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;grid-template-areas:"i t" "i d"!important;align-items:center!important;align-content:center!important;justify-items:start!important;min-height:56px!important;padding:9px 10px!important}
  body.home-phase1.vf2 .vf2-hero-direct .vf2-tool h4,body.home-phase1.vf2 .vf2-hero-direct .vf2-tool p{margin:0!important;text-align:left!important;font-size:inherit}
  body.home-phase1.vf2 .vf2-hero-direct .vf2-tool h4{font-size:15px!important;grid-area:t!important;grid-column:auto!important;grid-row:auto!important}
  body.home-phase1.vf2 .vf2-hero-direct .vf2-tool p{grid-area:d!important;grid-column:auto!important;grid-row:auto!important}
  body.home-phase1.vf2 .vf2-hero-direct .vf2-tool span{grid-column:auto!important;grid-row:auto!important}
  body.home-phase1.vf2 .vf2-hero-direct .vf2-tool p{font-size:12px!important}
  /* 4 工具目录：分组标题收掉，合成一个连续网格；重复的“认识自己”组（已在首屏主入口）隐藏 */
  #chart-tools>.vf2-in{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  #chart-tools>.vf2-in>h2{grid-column:1/-1;margin:0!important;font-size:16px!important}
  #chart-tools .vf2-group,#chart-tools .vf2-group .vf2-grid{display:contents!important}
  #chart-tools .vf2-group>h3{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}
  #chart-tools .vf2-group>h3::before,#chart-tools .vf2-group>h3::after{display:none!important}
  #chart-tools .vf2-group--lead{display:none!important}
  #chart-tools [data-vf-tool-guide],#chart-tools .vf2-extras{grid-column:1/-1}
  [data-vf-tool-guide]{margin:0!important;padding:0!important}
  [data-vf-tool-guide] summary{min-height:36px!important;font-size:13px!important;padding:0 12px!important}
  [data-vf-tool-guide] details{margin:0!important}
  #chart-tools .vf2-extras{gap:0 16px;margin:0}
  #chart-tools .vf2-extras a{min-height:36px;font-size:13px}
  /* 5 今天小卡（由 /vf-today-card.js 插入）：固定高度 48px，并在首屏主入口网格下方预留 56px，卡片上拉 48px 填进去；脚本没跑时留白约 8px，页面其余内容几乎不动（避免 CLS） */
  .vf2-hero .vf2-hero-direct{margin-bottom:56px!important}
  .vf2-today{box-sizing:border-box;display:flex;align-items:center;gap:8px;height:48px;margin:-48px 0 0;padding:0 12px;border:1px solid var(--vf-gold,#c9a24b);border-radius:12px;font-size:12.5px;line-height:1.3;color:inherit;text-decoration:none;overflow:hidden}
  .vf2-today>span:first-child{min-width:0;flex:1 1 auto;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  /* 7 /tools/ 页（线上结构：nav.vf-breadcrumb + article.wrap.section > h1 + .vf-discovery-grid > a.vf-discovery-card[span.category,h3,p,span.open]）：
     面包屑压成一行；页首大块留白去掉；卡片改两列紧凑磁贴（分类小字与“開始使用”只留给读屏）*/
  main#main>nav.vf-breadcrumb,main>.vf-breadcrumb{margin:4px auto 0!important;padding:0 16px!important;min-height:0!important;gap:0 10px!important;font-size:13px!important;line-height:1.3!important}
  .vf-breadcrumb a{min-height:36px!important;padding:0 8px 0 0!important}
  main#main>article.wrap.section{padding-top:2px!important;padding-bottom:12px!important;margin-top:0!important}
  main#main>article.wrap.section>h1{font-size:22px!important;line-height:1.3!important;margin:2px 0 4px!important;padding:0!important}
  main#main>article.wrap.section>p{font-size:14px!important;line-height:1.5!important;margin:6px 0 10px!important}
  [data-vf-tool-guide]{margin:4px 0 6px!important}
  .vf-discovery-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .vf-discovery-card{display:grid!important;grid-template-columns:30px minmax(0,1fr);grid-template-areas:"i t" "i d";column-gap:10px;row-gap:0;align-items:center;min-height:56px;padding:9px 10px!important;height:auto!important;border-radius:12px}
  .vf-discovery-card::before{grid-area:i;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;line-height:1;color:var(--vf-gold,#c9a24b);border:1px solid var(--vf-gold,#c9a24b);background:color-mix(in srgb,var(--vf-gold,#c9a24b) 12%,transparent);content:"◆"}
  .vf-discovery-card h3{grid-area:t;margin:0!important;font-size:15px!important;line-height:1.3!important}
  .vf-discovery-card p{grid-area:d;margin:2px 0 0!important;font-size:12px!important;line-height:1.35!important;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
  .vf-discovery-card .vf-discovery-category,.vf-discovery-card .vf-discovery-open{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  a.vf-discovery-card[href*="paipan"]::before{content:"☰\FE0E"}
  a.vf-discovery-card[href*="ziwei"]::before{content:"✦\FE0E"}
  a.vf-discovery-card[href*="phone"]::before,a.vf-discovery-card[href*="numbers"]::before{content:"☎\FE0E"}
  a.vf-discovery-card[href*="/name/"]::before{content:"字"}
  a.vf-discovery-card[href*="company"]::before{content:"名"}
  a.vf-discovery-card[href*="tongshing"]::before{content:"曆"}
  a.vf-discovery-card[href*="astrology"]::before{content:"☉\FE0E"}
  a.vf-discovery-card[href*="tarot"]::before{content:"✶\FE0E"}
  a.vf-discovery-card[href*="yijing"]::before{content:"☯\FE0E"}
  a.vf-discovery-card[href*="liuren"]::before{content:"壬"}
  .vf-discovery-extras{margin:4px 0 0!important;gap:0 16px!important}
  .vf-discovery-extras a{min-height:36px!important;font-size:13px!important}
  section.vf-tool-journey{padding:12px 16px!important;margin:8px 0 0!important}
  /* 8 线上 vf-ux-20261105.css 有 `main :where(p,li){text-wrap:pretty}`：iOS Safari 对中日韩文用它会让段落提前换行，卡片右侧留下一条空白（“提交資料，免費推算”卡实测）。本页手机宽度下改回普通换行 */
  main :where(p,li,summary,h1,h2,h3,h4){text-wrap:wrap!important}
  /* 6 其它：服务卡与路线卡收紧；底部固定提示条改为文档流，不遮挡 */
  .vf2-svc{padding:14px!important}
  .vf-theme-hint{position:static!important;margin:6px 12px!important}
}
@media (max-width:640px) and (prefers-reduced-motion:no-preference){
  .vf2-tool{transition:transform .12s ease,border-color .12s ease}
  .vf2-tool:active{transform:scale(.97)}
}

@media (max-width:640px){
  /* m5：合婚與吉日入口（置顶）。首屏主入口变 3 块：第三块通栏；合婚用“囍”图标 */
  body.home-phase1.vf2 .vf2-hero-direct .vf2-tool:nth-child(3){grid-column:1/-1!important}
  a.vf2-tool[href$="/hehun/"]::before,a.vf-discovery-card[href$="/hehun/"]::before{content:"囍"!important}
}
