.fm-only-mobile{display:none;}
@media (max-width: 860px){ .fm-only-mobile{display:block;} }

/* ===== FAB ===== */
.fm-a2hs-fab{
    position: fixed;
    right: 12px;
    bottom: calc(100px + env(safe-area-inset-bottom));
    z-index: 1200;
}
.fm-a2hs-fab__btn{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(30,58,138,.18);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 28px rgba(15,23,42,.10);
    color: #0f172a;
    font-size: 13px;
    line-height: 1;
}
.fm-a2hs-fab__btn .material-icons{ font-size:18px; color:#2563eb; }

/* ===== Modal ===== */
.fm-a2hs-modal{
    position: fixed;
    inset: 0;
    display: none;
    z-index: 99999;           /* ✅ 必须压过你站内 tabbar */
}
.fm-a2hs-modal.is-open{ display:block; }
.fm-a2hs-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
}

/* ✅ 打开弹窗时：禁滚动 + 禁止底部菜单/浮窗点击 */
html.fm-modal-open, html.fm-modal-open body{
    overflow: hidden;
    height: 100%;
    overscroll-behavior: contain;
    touch-action: none;
}

/* 这里把你站内“固定在底部/悬浮的东西”都禁用点按
   你如果有明确的 tabbar id/class，优先补上去 */
html.fm-modal-open #mobile_tabbar,
html.fm-modal-open .mb-tabbar,
html.fm-modal-open .fm-buybar,
html.fm-modal-open #fm_chat_widget_wrap{
    pointer-events: none !important;
}

/* 主卡片 */
.fm-a2hs-card{
    position: relative;
    width: calc(100vw - 28px);
    max-width: 520px;
    margin: 11vh auto 0;
    background:#fff;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(0,0,0,.20);
    overflow: hidden;
}
.fm-a2hs-head{ padding: 16px 16px 10px; }
.fm-a2hs-title{
    font-weight: 800;
    font-size: 18px;
    color:#0f172a;
    text-align:center;
}

.fm-a2hs-steps{ padding: 8px 16px 6px; }
.fm-a2hs-step{
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    padding: 10px 0;
}
.fm-a2hs-step .n{ font-weight: 900; font-size: 34px; line-height: 1; color:#111827; }
.fm-a2hs-step .t{ font-weight: 700; font-size: 15px; color:#0f172a; margin-bottom: 10px; }

/* URL box */
.fm-a2hs-urlbox{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background:#f1f5f9;
}
.fm-a2hs-urlbox .url{
    font-size: 13px;
    color:#0f172a;
    overflow:hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fm-a2hs-urlbox .copy{
    border:0;
    background: transparent;
    color:#f59e0b;
    font-weight: 900;
    padding: 6px 8px;
    border-radius: 10px;
    cursor: pointer;
}

/* Safari toolbar mock */
.fm-a2hs-safari{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 14px;
    background:#f8fafc;
    border: 1px solid rgba(15,23,42,.08);
}
.fm-a2hs-safari .i{ color:#64748b; font-size: 22px; }
.fm-a2hs-safari .is-highlight{
    color:#2563eb;
    background: rgba(245,158,11,.18);
    border: 2px solid rgba(245,158,11,.75);
    border-radius: 12px;
    padding: 6px 8px;
}

/* Menu mock */
.fm-a2hs-menu{
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 14px;
    overflow: hidden;
    background:#fff;
}
.fm-a2hs-menu .row{
    display:flex;
    align-items:center;
    justify-content: space-between;
    padding: 12px 12px;
    border-top: 1px solid rgba(15,23,42,.06);
}
.fm-a2hs-menu .row:first-child{ border-top:0; }
.fm-a2hs-menu .label{ font-size: 14px; color:#0f172a; }
.fm-a2hs-menu .ico{ color:#64748b; }
.fm-a2hs-menu .row.is-highlight{
    background: rgba(245,158,11,.12);
    outline: 2px solid rgba(245,158,11,.55);
    outline-offset: -2px;
}

.fm-a2hs-note{
    margin-top: 10px;
    font-size: 12px;
    color:#64748b;
    line-height: 1.5;
}

.fm-a2hs-foot{
    padding: 12px 16px 16px;
    display:flex;
}
.fm-a2hs-ok{
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 900;
    font-size: 15px;
    background: #f59e0b;
    color:#0b1220;
    cursor: pointer;
}
