/* =========================================================
   game-show.mobile.css
   - 仅移动端覆盖（<=960 + <=768 + <=420 + <=360）
   - 保持你现有“最终生效”的逻辑：
     1) Mobile: 隐藏右侧账单卡，使用固定 buybar
     2) Mobile: 顶部信息用 fm-mobile-lines（名称/销量/评分/保障）
     3) Mobile: tabs 平铺 + 左侧蓝条标题
     4) Mobile: 去卡片感，仅分隔线（但弹窗保留）
========================================================= */

/* =========================
   MOBILE (<=960px)
========================= */
@media (max-width: 960px){

    /* 手机端不要 PC 的黑背景/纹理 */
    .fm-page{ background: #f3f8ff; min-height: 100vh; }
    .fm-stage::before,
    .fm-stage::after{ display:none !important; }
    .fm-stage{ padding: 0 !important; }

    /* 外层全宽 + 去壳 */
    .fm-container{ max-width:none; padding: 0 !important; }
    .fm-stage-shell{
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    /* 一列布局 */
    .fm-stage-grid{
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    /* =========================
       PC/移动切换真理：
       Mobile: hide bill, show buybar
    ========================= */
    .fm-only-desktop{ display: none !important; }
    .fm-only-mobile{ display: flex !important; }

    /* 手机端：彻底隐藏右侧账单卡 */
    body.fm-page-game-show .fm-right{ display:none !important; }

    /* buybar 默认隐藏在 pc.css，这里打开 */
    body.fm-page-game-show .fm-buybar{ display:flex !important; }

    /* 你 buybar 两行了，底部占位要够 */
    body.fm-page-game-show{
        padding-bottom: calc(168px + env(safe-area-inset-bottom)) !important;
    }

    /* =========================
       游戏卡：左图右信息（mobile summary）
    ========================= */
    #fm_trust_open{ display:none !important; }
    #fm_trust_open_m{ display:inline-flex !important; }

    /* 这几块在 mobile summary 模式隐藏 */
    .fm-title-row,
    .fm-meta--desktop,
    .fm-stats,
    .fm-breadcrumb{ display:none !important; }

    .fm-card-game{ position: relative !important; padding: 12px !important; }

    .fm-game-grid{
        grid-template-columns: 104px minmax(0,1fr) !important;
        column-gap: 12px !important;
        align-items:start !important;
    }

    .fm-game-media{ width:104px !important; padding:0 !important; }

    .fm-cover{
        width:104px !important;
        height:104px !important;
        border-radius:16px !important;
    }

    /* 右上角收藏不挤内容 */
    .fm-fav-mini{
        position:absolute !important;
        top: 5px;
        right: 5px;
        z-index: 4;
    }

    /* mobile summary 显示（PC 默认隐藏） */
    .fm-mobile-lines{
        display:flex !important;
        flex-direction:column !important;
        gap: 8px !important;
        padding-right: 64px !important; /* 给收藏按钮留空间 */
        min-width:0 !important;
    }

    .fm-mobile-lines .fm-mline{
        font-size: 12px;
        display:flex !important;
        align-items:center !important;
        gap: 8px !important;
        min-width:0 !important;
    }

    .fm-mobile-lines .fm-mline--name{
        display:-webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
        overflow:hidden !important;

        font-size: 16px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        color: var(--fm-text) !important;
    }

    .fm-mobile-lines .k{
        width: 52px !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        color: rgba(100,116,139,.92) !important;
        flex: 0 0 auto !important;
    }

    .fm-mline--rating .v{
        padding: 2px 8px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        background: rgba(37,99,235,.10) !important;
        border: 1px solid rgba(37,99,235,.22) !important;
        color: var(--fm-primary-2, #2563eb) !important;
    }

    .fm-mobile-lines .stars{
        display:inline-flex !important;
        align-items:center !important;
        gap: 2px !important;
        margin-left: 2px !important;
    }
    .fm-mobile-lines .stars .material-icons{
        font-size: 16px !important;
        line-height: 1 !important;
        color: var(--fm-stat-star) !important;
        transform: translateY(1px);
    }

    /* 官方保障：完整显示 */
    #fm_trust_open_m.fm-chip{
        font-size: 12px !important;
        font-weight: 500 !important;
        padding: 6px 10px !important;

        background: rgba(34,197,94,.10) !important;
        border: 1px solid rgba(34,197,94,.26) !important;
        color: #065f46 !important;

        white-space: normal !important;
        line-height: 1.2 !important;
        text-align: left !important;
    }
    /* 你现有最终生效里 icon 是蓝色（保持不变） */
    #fm_trust_open_m .material-icons{
        font-size: 16px !important;
        color: var(--fm-primary-2, #2563eb) !important;
    }

    /* 简介块：你最终是隐藏 */
    .fm-hero-desc-wrap{ display:none !important; }

    /* =========================
       购买区 / Step2：充值金额卡片（双列 + 正方形图）
    ========================= */
    .fm-card-levels{ padding: 12px !important; }
    .fm-card-levels .fm-card-stephead{ padding: 0 0 10px !important; }

    .fm-sku-grid{
        padding: 0 !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .fm-sku-card{
        position: relative !important;
        display:flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;

        grid-template-columns: unset !important;
        padding: 12px !important;
        border-radius: 18px !important;

        border-color: rgba(59,130,246,.14) !important;
        background: #fff !important;
    }

    .fm-sku-item input:checked + .fm-sku-card{
        border-color: rgba(37,99,235,.40) !important;
        background: rgba(37,99,235,.06) !important;
        box-shadow: 0 14px 28px rgba(37,99,235,.14) !important;
    }

    .fm-sku-card .sku-icon{
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        border-radius: 16px !important;
        overflow:hidden !important;
        background: #f4f8ff !important;
        border: 1px solid rgba(59,130,246,.12) !important;
        cursor: zoom-in !important;
    }
    .fm-sku-card .sku-icon img{
        width:100% !important;
        height:100% !important;
        object-fit: cover !important;
        display:block !important;
    }

    .fm-sku-card .sku-name{
        font-weight: 600 !important;
        line-height: 1 !important;
        color: var(--fm-text) !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
        overflow: hidden !important;
        word-break: break-word !important;
    }

    /* 价格/折扣/原价锁死布局 */
    .fm-sku-card .sku-right{
        display:block !important;
        position: relative !important;
        text-align: left !important;
        min-height: 42px !important;
    }
    .fm-sku-card .sku-right .sku-price{
        display:block !important;
        padding-right: 72px !important;
        margin: 0 !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        line-height: 1.05 !important;
        color: var(--fm-price) !important;
    }
    .fm-sku-card .sku-right .sku-old{
        display:block !important;
        margin-top: 6px !important;
        font-size: 12px !important;
    }
    .fm-sku-card .sku-right :is(
    .sku-save,.sku-discount,.sku-off,.sku-cut,.sku-badge,.sku-note,
    [class*="discount"],[class*="save"],[class*="off"],[class*="cut"]
  ){
        position:absolute !important;
        right: 0 !important;
        top: 0 !important;
        margin: 0 !important;

        display:inline-flex !important;
        align-items:center !important;
        justify-content:center !important;

        padding: 6px 10px !important;
        border-radius: 999px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        white-space: nowrap !important;

        background: rgba(59,130,246,.12) !important;
        border: 1px solid rgba(59,130,246,.18) !important;
        color: #1d4ed8 !important;
    }

    /* =========================
       移动端：页面模块顺序（购买区 -> 详情 -> 评论）
    ========================= */
    .fm-page{
        display: flex !important;
        flex-direction: column !important;
    }
    .fm-stage{ order: 1 !important; }
    .fm-details{ order: 2 !important; }
    #fm_reviews,
    .fm-reviews,
    .reviews-block,
    section.fm-reviews,
    section.reviews-block,
    .game-reviews{ order: 3 !important; }

    /* =========================
       MOBILE: 隐藏全站底部 tabbar（仅本页）
    ========================= */
    body.fm-page-game-show :is(
    #mobile_tabbar, #site_tabbar, #fm_tabbar,
    .mobile-tabbar, .site-tabbar, .fm-tabbar,
    .bottom-nav, .tabbar, .uc-tabbar
  ){
        display: none !important;
    }

    /* =========================
       MOBILE: buybar 固定底部（仅本页）
    ========================= */
    body.fm-page-game-show .fm-buybar{
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 9998;

        display: flex;
        align-items: center;
        gap: 12px;

        padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.92);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(15,23,42,.10);
    }

    /* buybar 内部结构（你已有 HTML 对应 class/id） */
    body.fm-page-game-show .fm-buybar__left{ min-width: 0; }

    body.fm-page-game-show .fm-buybar__price{
        line-height: 1;
        font-weight: 600;
        color: var(--fm-price, #ff5a1f);
        font-size: 26px;
        letter-spacing: .2px;
        white-space: nowrap;
    }

    body.fm-page-game-show .fm-buybar__qty{
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 8px;
        border-radius: 12px;
        border: 1px solid rgba(15,23,42,.10);
        background: rgba(248,250,252,.9);
    }
    body.fm-page-game-show .fm-buybar__qty .qbtn{
        width: 36px; height: 36px;
        border-radius: 10px;
        border: 1px solid rgba(15,23,42,.10);
        background: #fff;
        color: rgba(15,23,42,.72);
        font-size: 18px;
        line-height: 1;
    }
    body.fm-page-game-show .fm-buybar__qty .qval{
        width: 44px;
        text-align: center;
        border: 0;
        background: transparent;
        font-size: 16px;
        font-weight: 600;
        color: var(--fm-text);
        outline: none;
    }

    body.fm-page-game-show .fm-buybar__btn{
        flex: 1 1 auto;
        height: 52px;
        border: 1px solid rgba(37,99,235,.18);
        border-radius: 14px;
        color: #fff;
        font-size: 18px;
        font-weight: 600;
        background:
            radial-gradient(circle at 30% 20%, rgba(255,255,255,.18), rgba(255,255,255,0) 52%),
            linear-gradient(135deg, var(--fm-primary,#1e3a8a) 0%, var(--fm-primary-2,#2563eb) 55%, #2b7cff 100%);
        box-shadow:
            0 16px 30px rgba(15,23,42,.12),
            0 12px 26px rgba(37,99,235,.18);
    }

    /* =========================
       MOBILE: Coupon moved into buybar（仅本页）
    ========================= */
    .fm-only-mobile{ display:none; }
    body.fm-page-game-show .fm-only-mobile{ display:flex !important; }
    body.fm-page-game-show .fm-only-desktop{ display:none !important; }

    body.fm-page-game-show .fm-buybar{
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    body.fm-page-game-show .fm-buybar__row{
        display:flex !important;
        align-items:center !important;
        gap: 12px !important;
    }

    body.fm-page-game-show .fm-buybar__coupon{
        width: 100% !important;
        border: 1px solid rgba(15,23,42,.10) !important;
        background: rgba(255,255,255,.92) !important;
        backdrop-filter: blur(10px);
        border-radius: 14px !important;
        padding: 10px 10px !important;
        display:flex !important;
        align-items:center !important;
        gap: 10px !important;
        box-shadow: 0 10px 24px rgba(15,23,42,.08) !important;
    }
    body.fm-page-game-show .fm-buybar__coupon .k{
        flex: 0 0 auto !important;
        font-size: 12px !important;
        color: rgba(100,116,139,.92) !important;
        font-weight: 600 !important;
    }
    body.fm-page-game-show .fm-buybar__coupon .t{
        flex: 1 1 auto !important;
        font-size: 13px !important;
        color: rgba(15,23,42,.82) !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    body.fm-page-game-show .fm-buybar__coupon .save{
        flex: 0 0 auto !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #1d4ed8 !important;
        background: rgba(37,99,235,.10) !important;
        border: 1px solid rgba(37,99,235,.18) !important;
        border-radius: 999px !important;
        padding: 4px 8px !important;
    }
    body.fm-page-game-show .fm-buybar__coupon .material-icons{
        flex: 0 0 auto !important;
        font-size: 20px !important;
        opacity: .7 !important;
    }

    body.fm-page-game-show .fm-buybar__sum{
        display:flex;
        align-items:center;
        justify-content: space-between;
        gap: 10px;
        padding: 0 2px;
        font-size: 12px;
        color: rgba(100,116,139,.92);
    }
    body.fm-page-game-show .fm-buybar__sum .it{
        display:flex;
        align-items:center;
        gap: 6px;
        min-width:0;
    }
    body.fm-page-game-show .fm-buybar__sum .it .k{
        font-weight: 500;
        color: rgba(100,116,139,.92);
    }
    body.fm-page-game-show .fm-buybar__sum .it .v{
        font-weight: 600;
        color: rgba(15,23,42,.82);
        white-space: nowrap;
    }

    /* 你最终隐藏了 save 标签 */
    body.fm-page-game-show #fm_buybar_save{ display: none !important; }

    /* =========================
       MOBILE: tabs 平铺 + 标题左侧蓝条
    ========================= */
    body.fm-page-game-show .fm-tabs-nav{ display:none !important; }
    body.fm-page-game-show .tab-panel{ display:block !important; }

    body.fm-page-game-show .tab-panel h3{
        position: relative;
        margin: 0 0 10px !important;
        padding-left: 12px !important;
    }
    body.fm-page-game-show .tab-panel h3::before{
        content: "";
        position: absolute;
        left: 0;
        top: .18em;
        bottom: .18em;
        width: 4px;
        border-radius: 999px;
        background: linear-gradient(
            180deg,
            var(--fm-primary-2, #2563eb),
            var(--fm-primary-3, #60a5fa)
        );
        box-shadow: 0 10px 18px rgba(37,99,235,.18);
    }

    /* =========================
       MOBILE: NO CARD + ONLY SEPARATOR（你最后的最终态）
       - 不影响弹窗（modal / trust / cart）
    ========================= */
    body.fm-page-game-show{ --fm-sep: rgba(15,23,42,.08); }

    body.fm-page-game-show .fm-stage-grid,
    body.fm-page-game-show .fm-details-grid,
    body.fm-page-game-show .fm-details-grid--single{
        gap: 0 !important;
    }

    body.fm-page-game-show :is(.fm-card, .fm-detail-card){
        border-radius: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        background: #fff !important;
        overflow: visible !important;
    }
    body.fm-page-game-show .fm-card + .fm-card{ margin-top: 0 !important; }

    body.fm-page-game-show .scene-pane.is-active{
        border-top: 1px solid var(--fm-sep) !important;
    }
    body.fm-page-game-show .fm-details{
        border-top: 1px solid var(--fm-sep) !important;
    }
    body.fm-page-game-show :is(
    #fm_reviews,
    .fm-reviews,
    .reviews-block,
    section.fm-reviews,
    section.reviews-block,
    .game-reviews
  ){
        border-top: 1px solid var(--fm-sep) !important;
    }

    body.fm-page-game-show .fm-detail-body.tabs-panels{ padding: 0 !important; }
    body.fm-page-game-show .fm-detail-body.tabs-panels .tab-panel{
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        background: transparent !important;
        border-top: 1px solid var(--fm-sep) !important;
        padding: 12px 12px !important;
    }
    body.fm-page-game-show .fm-detail-body.tabs-panels .tab-panel:first-child{
        border-top: 0 !important;
    }

    /* 弹窗保持原样 */
    body.fm-page-game-show :is(.fm-modal-dialog, .fm-trust-dialog, .fm-cart-modal-dialog){
        border-radius: 18px !important;
        box-shadow: 0 24px 60px rgba(15,23,42,.25) !important;
        border: 0 !important;
        background: #fff !important;
    }
}

/* =========================
   <=768: buybar 对齐强化（你原来的对齐逻辑保留）
========================= */
@media (max-width: 768px){
    #fm_buybar{
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        border-radius: 18px;
        overflow: hidden;
    }

    #fm_buybar .fm-buybar__coupon,
    #fm_buybar .fm-buybar-coupon,
    #fm_buybar .fm-buybar__meta,
    #fm_buybar .fm-buybar-meta,
    #fm_buybar .buybar-meta{
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 8px 0;
    }

    #fm_buybar .fm-buybar__coupon,
    #fm_buybar .fm-buybar-coupon{
        display: flex;
        align-items: center;
        gap: 10px;
        border-bottom: 1px solid rgba(15,23,42,.08);
    }

    #fm_buybar .fm-buybar__coupon .label,
    #fm_buybar .fm-buybar-coupon .label{
        font-size: 13px;
        font-weight: 800;
        color: rgba(15,23,42,.55);
        white-space: nowrap;
    }

    #fm_buybar .fm-buybar__coupon .billCouponText,
    #fm_buybar .fm-buybar-coupon .billCouponText{
        margin-left: auto;
        text-align: right;
        font-size: 13px;
        font-weight: 900;
        color: rgba(15,23,42,.82);
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #fm_buybar .fm-buybar__coupon .material-icons,
    #fm_buybar .fm-buybar-coupon .material-icons{
        flex: 0 0 auto;
        margin-left: 6px;
        opacity: .55;
    }

    #fm_buybar .fm-buybar__row,
    #fm_buybar .fm-buybar__main,
    #fm_buybar .buybar-row{
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 0 2px;
    }

    #fm_buybar .fm-buybar__qty{
        margin-left: auto;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 8px;
        border-radius: 14px;
        background: #fff;
        border: 1px solid rgba(15,23,42,.14);
        box-shadow: 0 6px 16px rgba(15,23,42,.06);
    }

    #fm_buybar_go{
        height: 36px;
        min-width: 96px;
        padding: 0 12px;
        border-radius: 14px;
        font-size: 13px;
        font-weight: 900;
    }
}

/* =========================
   <=420 / <=360: 档位一列
========================= */
@media (max-width: 420px){
    .fm-sku-grid{ grid-template-columns: 1fr !important; }
}
@media (max-width: 360px){
    .fm-sku-grid{ grid-template-columns: 1fr !important; }
}





/* assets/test/css/game-reviews.mobile.css
   Trustpilot-like reviews block (mobile overrides)
   - 仅包含 <=980px / <=420px 的移动端覆盖与折叠展开逻辑
*/

@media (max-width: 420px){
    #fm_reviews.fm-reviews--tp .fm-container{ padding: 0 14px; }
}

/* ===== mobile ===== */
@media (max-width: 980px){
    .fm-reviews--tp .fm-tp-card{
        margin-bottom: 93px;
        padding: 14px 14px 12px;
        border-radius: 16px;
    }

    .fm-reviews--tp .fm-tp-top{
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .fm-reviews--tp .fm-tp-grid{
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fm-reviews--tp .fm-tp-left{
        border-right: 0;
        padding-right: 0;
        border-bottom: 1px solid var(--rv-line);
        padding-bottom: 12px;
    }

    .fm-reviews--tp .fm-tp-item{
        padding: 14px 0;
    }

    .fm-reviews--tp .fm-tp-pager{
        justify-content: space-between;
    }

    .fm-reviews--tp .fm-tp-dist-row {
        padding: 5px 10px;
    }
}

/* ===== mobile: dist collapse/expand (only affect <=980px) ===== */
@media (max-width: 980px){

    /* 默认只显示：第1个(All) + 第2个(5) + 第3个(4) */
    .fm-reviews--tp .fm-tp-dist > .fm-tp-dist-row:nth-child(n+4){
        display: none;
    }

    /* 但如果隐藏项刚好是当前选中（is-active），仍然要显示出来（避免选了3星后看不到自己选的） */
    .fm-reviews--tp .fm-tp-dist > .fm-tp-dist-row.is-active{
        display: grid;
    }

    /* 展开态：显示全部 */
    #fm_reviews.fm-reviews--tp.is-dist-open .fm-tp-dist > .fm-tp-dist-row{
        display: grid;
    }

    .fm-reviews--tp .fm-tp-dist-toggle .material-icons{
        font-size: 18px;
        opacity: .85;
        transition: transform .18s ease;
    }

    /* 展开时 icon 翻转 */
    #fm_reviews.fm-reviews--tp.is-dist-open .fm-tp-dist-toggle .material-icons{
        transform: rotate(180deg);
    }
}

/* ===== dist collapse toggle (mobile only) ===== */
@media (max-width: 980px){
    /* 默认折叠：隐藏 3/2/1 */
    .fm-reviews--tp:not(.is-dist-open) .fm-tp-dist-row.is-star-3,
    .fm-reviews--tp:not(.is-dist-open) .fm-tp-dist-row.is-star-2,
    .fm-reviews--tp:not(.is-dist-open) .fm-tp-dist-row.is-star-1{
        display:none;
    }

    .fm-reviews--tp .fm-tp-dist-toggle{
        display:flex;
        width:100%;
        margin-top: 10px;
        border: 0px solid #e2e8f0;
        background:#fff;
        border-radius: 12px;
        padding: 10px 12px;
        font-weight: 700;
        color:#0f172a;
        align-items:center;
        justify-content: space-between;
        gap: 10px;
        cursor: pointer;
        box-shadow: 0 10px 20px rgba(15,23,42,.06);
    }

    .fm-reviews--tp .fm-tp-dist-toggle .txt{
        font-size: 13px;
    }

    .fm-reviews--tp .fm-tp-dist-toggle .material-icons{
        font-size: 20px;
        transition: transform .18s ease;
        opacity: .9;
    }

    .fm-reviews--tp.is-dist-open .fm-tp-dist-toggle .material-icons{
        transform: rotate(180deg);
    }
}






.fm-reviews--tp .rv-photos{
  margin-top: 10px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fm-reviews--tp .rv-photo{
  width: 74px;
  height: 74px;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0;
  cursor: zoom-in;
}
.fm-reviews--tp .rv-photo img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.fm-reviews--tp .rv-photo.rv-more{
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 700;
  color: rgba(15,23,42,.65);
  cursor: default;
}
@media (max-width: 960px){
  .fm-reviews--tp .rv-photo{ width: 64px; height: 64px; }
}

/* ===== 评论图片预览：非全屏遮罩的小弹层 ===== */
.fm-img-popover{
  position: fixed;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.fm-img-popover__frame{
  width: min(560px, 92vw);          /* 固定视觉宽度 */
  height: min(520px, 68vh);         /* 固定视觉高度上限 */
  background: rgba(15,23,42,.96);   /* 深色底更像电商预览 */
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  overflow: hidden;
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
}

.fm-img-popover__img{
  width: 100%;
  height: 100%;
  object-fit: contain;              /* ✅ 不裁切：截图类更适合 */
  display: block;
}

.fm-img-popover__x{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(0,0,0,.45);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fm-img-popover__x .material-icons{ font-size: 20px; }

/* 移动端：更像“底部弹层”，不是全屏 */
@media (max-width: 640px){
  .fm-img-popover{
    left: 50%;
    top: auto;
    bottom: 12px;
    transform: translateX(-50%);
  }
  .fm-img-popover__frame{
    width: 94vw;
    height: min(56vh, 520px);
    border-radius: 18px;
  }
}
