/* Phone reference scale: measure against the live canvas, not the screenshot's browser chrome.
 * This deliberately supersedes the earlier 22px overlay / 148px card floor.
 * Keep the one player, portrait photography, authored content and native hit targets. */
.mobile-live #liveModalBackdrop .live-modal-shell{container-type:inline-size;--room-edge:clamp(8px,2cqi,12px);--room-product-width:clamp(82px,21.5cqi,132px);--room-card-radius:8px}
.mobile-live #liveModalBackdrop .v-top-bar{gap:4px;padding:calc(8px + env(safe-area-inset-top,0px)) 52px 18px var(--room-edge);background:linear-gradient(#0005,transparent)}
.mobile-live #liveModalBackdrop .v-top-left{gap:6px;min-width:0}
.mobile-live #liveModalBackdrop .v-brand-avatar{display:flex;width:clamp(26px,5.8cqi,34px);height:clamp(26px,5.8cqi,34px);flex:none;font-size:8px}
.mobile-live #liveModalBackdrop .v-brand-name{font-size:13px;line-height:1.25;letter-spacing:0;margin-bottom:2px}
.mobile-live #liveModalBackdrop .v-session-title{font-size:11px;line-height:1.3}
.mobile-live #liveModalBackdrop .v-top-bar .v-live-badge{top:calc(54px + env(safe-area-inset-top,0px));left:var(--room-edge);font-size:10px;line-height:1.2;max-width:110px;padding:3px 5px;background:#0003}
.mobile-live #liveModalBackdrop .v-top-right{gap:0}
.mobile-live #liveModalBackdrop .v-icon-top-btn{position:relative;width:44px;height:44px;min-width:44px;background:transparent;font-size:17px}
.mobile-live #liveModalBackdrop #mobileToolsToggle{font-size:20px}
.mobile-live #liveModalBackdrop .mobile-background-button svg{width:18px;height:18px}
.mobile-live #liveModalBackdrop .mobile-phone-close{top:calc(8px + env(safe-area-inset-top,0px));right:var(--room-edge);width:44px;height:44px;background:transparent;font-size:18px}

.mobile-live #liveModalBackdrop .v-bottom-area{bottom:calc(64px + env(safe-area-inset-bottom,0px))}
.mobile-live #liveModalBackdrop .v-mid-interactive{left:var(--room-edge);width:calc(100% - var(--room-product-width) - 2 * var(--room-edge) - 10px)}
.mobile-live #liveModalBackdrop .v-floating-messages{gap:12px;max-height:min(240px,32dvh);padding-top:10px}
/* Oct. 14 merchant replay: transparent phone comments, name above the message. */
.mobile-live #liveModalBackdrop .vf-msg{display:block;flex:none;width:fit-content;max-width:100%;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;backdrop-filter:none;font:16px/1.5 Arial,sans-serif;text-shadow:0 1px 2px #000b,0 0 8px #0008;overflow-wrap:anywhere}
.mobile-live #liveModalBackdrop .vf-meta{display:block;margin:0 0 1px;font-size:13px;font-weight:600;line-height:1.4;color:#fff}
.mobile-live #liveModalBackdrop .vf-time{display:none}
.mobile-live #liveModalBackdrop .vf-body{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-size:16px;font-weight:400;line-height:1.5;margin:0;color:#fff;overflow:hidden}
.mobile-live #liveModalBackdrop .vf-meta .el-emoji-image,.mobile-live #liveModalBackdrop .vf-body .el-emoji-image{width:1.25em;height:1.25em;vertical-align:-.2em}
.mobile-live #liveModalBackdrop .vf-bag-activity{display:block;-webkit-line-clamp:unset}
.mobile-live #liveModalBackdrop .vf-bag-activity .vf-meta{display:none}
.mobile-live #liveModalBackdrop .vf-bag-activity .vf-body{display:block;-webkit-line-clamp:unset}
.mobile-live #liveModalBackdrop .fomo-label{font-size:10px;line-height:1.4;border-radius:3px}
.mobile-live #liveModalBackdrop .vf-bag-activity:has(.fomo-inline-event){background:transparent!important;font-style:italic;text-shadow:0 1px 3px #0009}
.mobile-live #liveModalBackdrop .fomo-inline-event{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font-size:13px;line-height:1.5;font-weight:400}
.mobile-live #liveModalBackdrop .fomo-celebration{font-style:normal}
.mobile-live #liveModalBackdrop #videoPinnedChat{font-size:13px;line-height:1.45;max-height:60px;padding:5px 7px;border-radius:10px;background:#0005}
.mobile-live #liveModalBackdrop .video-chat-latest{font-size:11px;min-height:36px;margin-top:2px;padding:4px 9px;background:#0009}

.mobile-live #liveModalBackdrop .v-product-banner{right:var(--room-edge);width:var(--room-product-width);display:flex;flex-direction:column;gap:0;border-radius:var(--room-card-radius);box-shadow:0 2px 8px #0002}
.mobile-live #liveModalBackdrop .vp-thumb{width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;object-position:center;grid-row:auto}
.mobile-live #liveModalBackdrop .vp-info{width:100%;padding:5px 6px 34px}
.mobile-live #liveModalBackdrop .vp-title{font-size:11px;line-height:15px;font-weight:500;margin:0 0 2px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mobile-live #liveModalBackdrop .vp-price{font-size:12px;line-height:17px;font-weight:600;letter-spacing:-.025em;white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip;color:#111}
.mobile-live #liveModalBackdrop .vp-discount{font-size:10px;line-height:14px;margin:0 0 2px;padding:0 3px}
/* A quiet 26px pill within a 44px native target. Its extra top area covers only
 * the noninteractive price area, never the image or the independent close control. */
.mobile-live #liveModalBackdrop .vp-add-btn{position:absolute;inset:auto 0 0;width:100%;height:44px;min-height:44px;box-sizing:border-box;margin:0;padding:6px 6px 0;display:grid;place-items:center;isolation:isolate;border:0;border-radius:0;background:transparent;color:#fff;font-size:11px;line-height:12px;font-weight:600;white-space:normal;grid-column:auto}
.mobile-live #liveModalBackdrop .vp-add-btn:before{content:'';position:absolute;z-index:-1;inset:12px 6px 6px;border-radius:20px;background:#000}
.mobile-live #liveModalBackdrop .vp-add-btn:hover,.mobile-live #liveModalBackdrop .vp-add-btn:active{background:transparent;color:#fff}
.mobile-live #liveModalBackdrop .vp-add-btn:focus-visible{outline:2px solid #111;outline-offset:-3px}
.mobile-live #liveModalBackdrop .vp-close{top:0;right:0;width:44px;height:44px}
.mobile-live #liveModalBackdrop .vp-close:after{position:absolute;top:4px;right:4px;width:18px;height:18px;background:#0007;font:17px/1 sans-serif}

.mobile-live #liveModalBackdrop .mobile-phone-bar{gap:2px!important;padding:6px var(--room-edge) calc(6px + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,#0004)}
.mobile-live .mobile-comment-open{position:relative;isolation:isolate;height:44px;min-height:44px;padding:0 10px;gap:6px;border:0;background:transparent;backdrop-filter:none;color:#ffffffe0;font-size:13px}
.mobile-live .mobile-comment-open:before{content:'';position:absolute;inset:4px 0;z-index:-1;border:1px solid #fff1;border-radius:22px;background:#0004}
.mobile-live .mobile-comment-open svg{width:17px;height:17px}
.mobile-live .mobile-round-action,.mobile-live .mobile-round-action.mobile-shop-action{width:44px;height:44px;border:0;background:transparent;backdrop-filter:none}
.mobile-live .mobile-round-action svg{width:23px;height:23px}
.mobile-live .mobile-round-action .mobile-bag-count{top:2px;right:1px;min-width:13px;height:13px;padding:0 3px;font-size:9px}
.mobile-live #viewerVideoStage .playback-recovery{gap:8px;padding:20px;font-size:13px;line-height:1.5}
.mobile-live #viewerVideoStage .playback-recovery strong{font-size:18px}
.mobile-live #viewerVideoStage .playback-recovery b{font-size:15px}
.mobile-live #viewerVideoStage .playback-recovery small{font-size:11px}
.mobile-live #viewerVideoStage .session-reconnect{gap:10px;font-size:14px}

/* Keep the same scale when opening existing commerce and comment panels. */
.mobile-live #viewerShopPanel .panel-top-header,.mobile-live #viewerShopPanel #mobileShopTabs button{font-size:14px}
.mobile-live #desktopShopGrid .sgc-title{font-size:15px;line-height:1.45}
.mobile-live #desktopShopGrid .sgc-price{font-size:16px}
.mobile-live #quickSheetBackdrop .qsc-title{font-size:17px;line-height:1.45}
.mobile-live #quickSheetBackdrop .qsc-option-label{font-size:14px}
.mobile-live #quickSheetBackdrop .qsc-option-label select{font-size:16px}
.mobile-live .qsc-buybar button{font-size:16px}
.mobile-live .mobile-bag-line .bag-name-primary{font-size:14px}
.mobile-live .mobile-bag-line .bag-name-secondary{font-size:12px}
.mobile-live #viewerChatPanel .cw-bubble{font-size:14px;line-height:1.5}
.mobile-live #viewerChatPanel .cw-meta{font-size:12px}
.mobile-live #viewerChatPanel .cw-input-box :is(input,.el-emoji-editor){font-size:16px;line-height:1.5}
.mobile-live #viewerChatPanel .el-chat-identity,.mobile-live #viewerChatPanel .el-chat-identity button{font-size:12px}
.mobile-live #viewerChatPanel .cw-send-btn{font-size:14px}

/* Customer history only; staff/shared chat keeps its own presentation. */
#liveModalBackdrop #viewerChatPanel .cw-item{margin-bottom:8px;font-family:Arial,sans-serif}
#liveModalBackdrop #viewerChatPanel .cw-meta{display:flex;flex-wrap:wrap;align-items:center;gap:3px 6px;margin:0 0 2px;font-size:12px;line-height:1.4;color:#444}
#liveModalBackdrop #viewerChatPanel .cw-meta strong{font-weight:600}
#liveModalBackdrop #viewerChatPanel .cw-time{font-size:10px;color:#888}
#liveModalBackdrop #viewerChatPanel .cw-host-badge{padding:1px 4px;border-radius:3px;background:#eee;color:#111;font-size:9px;font-weight:600}
#liveModalBackdrop #viewerChatPanel .cw-bubble{display:block;width:fit-content;max-width:90%;padding:6px 12px;border:0;border-radius:18px;background:#00000014;color:#111;box-shadow:none;font-size:14px;line-height:1.45;font-weight:400}
#liveModalBackdrop #viewerChatPanel .cw-item-host .cw-bubble{background:#000;color:#fff}
#liveModalBackdrop #viewerChatPanel .cw-item-activity .cw-meta{display:none}
#liveModalBackdrop #viewerChatPanel .cw-item-activity .cw-bubble{max-width:100%;padding:2px 0;background:transparent;font-size:12px;font-style:italic}

/* Editing still releases the card's temporary space without dismissing it. */
.mobile-live #liveModalBackdrop .v-bottom-area:has(.v-product-banner[hidden]) .v-mid-interactive,
.mobile-live #liveModalBackdrop .v-bottom-area:has(.v-product-banner.hidden-card) .v-mid-interactive,
.mobile-live.mobile-chat-open #liveModalBackdrop .v-mid-interactive{left:var(--room-edge);width:calc(100% - 2 * var(--room-edge))}
.mobile-live.mobile-chat-open #liveModalBackdrop .v-floating-messages{max-height:min(100px,18dvh)}
@media(max-width:360px){
 .mobile-live #liveModalBackdrop .vp-price{font-size:11px;letter-spacing:-.035em}
}
@media(max-height:500px) and (orientation:landscape){
 .mobile-live #liveModalBackdrop .v-floating-messages{max-height:112px}
 .mobile-live #liveModalBackdrop .v-product-banner{width:clamp(82px,21.5cqi,110px)}
 .mobile-live #liveModalBackdrop .live-modal-shell{--room-product-width:clamp(82px,21.5cqi,110px)}
}
