/* One safe-area inset: Android's shell already excludes the native status bar. */
.phone{--room-top:12px;--room-safe-top:env(safe-area-inset-top,0px)}
.phone .live-top{top:calc(var(--room-top) + var(--room-safe-top))}
.phone .live-tags{top:calc(var(--room-top) + var(--room-safe-top) + 49px)}
.phone .room-features-top{top:calc(var(--room-top) + var(--room-safe-top) + 89px)}
#chatInput,#chatInput:focus,#chatInput:focus-visible{border:0!important;outline:0!important;box-shadow:none!important;-webkit-appearance:none;appearance:none}
#viewerDialog{outline:0;box-shadow:none}
#viewerClose{display:none}
.viewer-self{flex:none;border-top:5px solid #fafafa;padding:0 18px calc(22px + env(safe-area-inset-bottom));min-height:85px}
.viewer-self .member-row{display:flex;align-items:center;gap:12px;min-height:71px;padding:12px 0}
.viewer-self .rank-number{width:23px;flex:none;color:#aaa;font-size:14px}
.viewer-self .member-text{display:flex;align-items:center;flex:1;min-width:0;gap:4px;color:#111}
.viewer-self .member-text>b{font-size:14px;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.viewer-self .member-identity-badges{margin:0;gap:3px}
.viewer-self .rank-contribution{color:#111;font-size:14px;margin-left:auto;font-weight:500}
.gift-layer>video.gift-decoder{position:absolute!important;inset:auto!important;left:0!important;bottom:0!important;width:1px!important;height:1px!important;max-height:1px!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.gift-layer>video::-webkit-media-controls,.gift-layer>video::-webkit-media-controls-start-playback-button{display:none!important;-webkit-appearance:none}
.gift-banner.gift-tray-stack{left:3.5%;width:min(188px,47%);gap:5px}
.gift-tray-row{width:100%;height:43px;gap:6px;padding-right:7px;border-radius:24px}
.gift-tray-row .gift-tray-avatar{width:38px!important;height:38px!important}
.gift-tray-row .gift-tray-label{flex:1;max-width:98px}
.gift-tray-row .gift-tray-label b{font-size:12px;line-height:17px;font-weight:400}
.gift-tray-row .gift-tray-label small{font-size:11px;line-height:16px;color:#eadbff}
.gift-tray-verb{color:inherit}
.gift-banner .gift-tray-row .gift-tray-icon{width:39px;height:40px}
.gift-tray-count{left:calc(100% + 3px);bottom:6px;font-size:24px;text-shadow:0 1px 2px #583a78}
.carnival-notice{position:absolute;left:3.5%;top:calc(var(--room-top) + var(--room-safe-top) + 52px);z-index:12;max-width:83%;height:26px;display:flex;align-items:center;gap:5px;padding:0 10px 0 0;border-radius:18px;background:linear-gradient(90deg,#e35043,#f42e76);font-size:12px;font-weight:500;white-space:nowrap;pointer-events:none;will-change:transform,opacity}
.carnival-notice img{width:29px;height:32px;object-fit:contain;flex:none;align-self:flex-end}
.carnival-notice span{overflow:hidden;text-overflow:ellipsis}
.carnival-notice b{font-size:15px;font-weight:400}
.entry-notice.room-entry-notice:not(.entry-low-level){left:3.2%;max-width:93.6%;height:23px;padding:1px 9px 1px 5px;gap:4px;font-size:13px;line-height:20px;background:linear-gradient(90deg,#7136bbb8,#9579b575)}
.entry-notice.room-entry-notice:not(.entry-low-level) .entry-person-name{color:#f1eaff}
.entry-notice.room-entry-notice .entry-person-name{max-width:100px}
.entry-managed-chat .chat-line{font-size:13px;font-weight:400;line-height:1.45}
.entry-managed-chat .chat-line b{font-weight:500}
.recharge-footnote{font-size:11px;line-height:1.65;margin:12px 10px 18px}
.recharge-dialog[data-platform=ios] .recharge-header{min-height:55px;padding-top:16px;font-size:18px}
.recharge-dialog[data-platform=ios] .recharge-back{visibility:hidden}
.recharge-dialog[data-platform=ios] .recharge-balance{font-size:13px;margin:16px 16px}
.recharge-dialog[data-platform=ios] .recharge-offer{margin:0 16px 16px;padding:11px 14px;border-radius:5px;background:#fce9ee;gap:8px}
.recharge-offer>span{min-width:0;flex:1}
.recharge-offer b{display:block;color:#111;font-size:15px;font-weight:600;line-height:1.5}
.recharge-offer small{display:block;color:#b0a1a6;font-size:10px;line-height:1.5;margin-top:4px}
.recharge-offer-claim{border-radius:20px;background:#ff2d5d;color:#fff;font-size:12px;padding:4px 13px;white-space:nowrap}
.recharge-dialog[data-platform=ios] .recharge-packs{margin:0 16px 12px;gap:10px 9px}
.recharge-dialog[data-platform=ios] .recharge-packs button{min-height:74px;border-radius:5px;padding:14px 2px 12px}
.recharge-dialog[data-platform=ios] .recharge-packs strong{font-size:23px;font-weight:500}
.recharge-dialog[data-platform=ios] .recharge-packs small{font-size:12px}
.recharge-apple-binding{display:flex;align-items:center;justify-content:center;gap:6px;margin:16px 10px;color:#111;font-size:12px}
.recharge-apple-binding input{appearance:none;-webkit-appearance:none;width:17px;height:17px;flex:none;border:1.5px solid #bdbdbd;border-radius:50%;margin:0;background:#fff}
.recharge-apple-binding input:checked{border-color:#ff2d5d;background:#ff2d5d;box-shadow:inset 0 0 0 3px #fff}
.recharge-dialog[data-platform=ios] .recharge-submit{border-radius:2px;width:calc(100% - 32px);margin:18px 16px 0;padding:14px 6px;font-size:17px}
.recharge-dialog[data-platform=ios] .recharge-footnote{font-size:11px;margin:10px 12px 16px}
.recharge-dialog[data-platform=ios] .recharge-legal-link{color:#30647d}
.apple-payment-overlay[data-step=completed]{align-items:center;justify-content:center;background:#0005}
.apple-purchase-complete{width:72%;max-width:320px;border-radius:17px;overflow:hidden;background:#f9f9fcf5;color:#111;text-align:center;padding-top:22px;box-shadow:0 4px 20px #0001}
.apple-purchase-complete>b{display:block;font-size:18px;font-weight:600;line-height:1.5}
.apple-purchase-complete>p{font-size:14px;line-height:1.5;margin:5px 12px 20px}
.apple-complete-ok{display:block;width:100%;border-top:1px solid #d7d7dc;padding:13px 0;background:none;color:#007aff;font-size:19px;line-height:1.4}
.phone:has(#sourceVideo.landscape-source:not([hidden])) #senderAvatar{display:none}
.phone:has(#sourceVideo.landscape-source:not([hidden])) .live-bottom{gap:11px;left:15px;right:15px}
.phone:has(#sourceVideo.landscape-source:not([hidden])) .right-tools{display:none}
.phone:has(#sourceVideo.landscape-source:not([hidden])) .chat-line{font-size:12px;line-height:1.45;padding:1px 6px}
@media(prefers-reduced-motion:reduce){.carnival-notice{will-change:auto}}

/* 2026-10-21: latest 576x1280 game-room recording reference. */
.phone .chat-list.entry-managed-chat{left:3.5%;right:7%;max-width:none;gap:4px;mask-image:linear-gradient(transparent 0,#000 9px,#000 100%)}
.phone #chatList.entry-managed-chat .chat-line{display:block;width:fit-content;max-width:100%;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:13px;line-height:1.5;font-weight:500;padding:2px 6px;border-radius:13px;background:linear-gradient(90deg,#10151073,#11160f40);white-space:normal;overflow-wrap:anywhere}
.phone #chatList.entry-managed-chat .chat-line b{color:#87dce5;font-weight:500;margin-right:3px}
.phone #chatList.entry-managed-chat .chat-room-welcome{width:100%;max-width:100%;font-size:13px;line-height:1.65;font-weight:500;color:#87dce5;padding:3px 6px;background:transparent;border-radius:0}
.phone .gift-banner.gift-tray-stack{left:3.2%;width:44%;max-width:none;gap:5px}
.phone .gift-tray-row{height:40px;gap:5px;padding-right:4px}
.phone .gift-tray-row .gift-tray-avatar{width:35px!important;height:35px!important}
.phone .gift-tray-row .gift-tray-label{max-width:none}
.phone .gift-tray-row .gift-tray-label b{font-size:12px;line-height:17px}
.phone .gift-tray-row .gift-tray-label small{font-size:11px;line-height:15px}
.phone .gift-tray-row .gift-tray-icon{width:36px;height:37px}
.phone .gift-tray-count{font-size:25px;left:calc(100% + 3px);bottom:3px}
.phone .entry-notice.room-entry-notice.entry-guard{left:3.2%;width:80%;max-width:91%;height:25px;padding:1px 17px 1px 2px;gap:5px;background:linear-gradient(90deg,#398f9fea,#8edac5bf);border:1px solid #bde9d487;border-radius:16px 8px 8px 16px;font-size:12px;overflow:visible;color:#e8ffff}
.entry-notice.entry-guard .entry-avatar{width:25px!important;height:25px!important;flex:none;border-radius:50%;border:1px solid #e1f5c1}
.entry-guard .entry-person-name{max-width:90px!important;color:#efffff!important;font-weight:500}
.entry-guard .entry-action{font-size:11px;color:#e6f8d8;overflow:hidden;text-overflow:ellipsis;flex:1}
.entry-guard .entry-guard-emblem{width:21px;height:23px;object-fit:contain;flex:none}
.phone .entry-notice.entry-guard-year{background:linear-gradient(90deg,#bb8532ee,#e8c66dbf);border-color:#fff0b099}
.entry-guard-spark{position:absolute;right:11%;top:calc(100% + 8px);width:65px;height:65px;border-radius:50%;display:grid;place-items:center;color:#eaffff;background:radial-gradient(circle,#bfffff88,#3fc5fc30 40%,transparent 70%);filter:drop-shadow(0 0 8px #42a8ff);font-size:52px;pointer-events:none}
.entry-guard-year .entry-guard-spark{color:#fffbd2;filter:drop-shadow(0 0 8px #ffd34f);background:radial-gradient(circle,#fff9b877,#e6b04430 40%,transparent 70%)}
.phone .live-top .host-bundle{max-width:46%;gap:2px;padding-right:2px}
.phone .live-top .host-bundle .host-pill{flex:0 1 auto;gap:4px;padding:2px 1px 2px 2px;min-width:0}
.phone .live-top #hostAvatar{width:30px!important;height:30px!important;flex:none}
.phone .live-top .host-bundle .host-pill>span:nth-child(2){flex:0 1 auto;width:50px;max-width:50px;min-width:0}
.phone .live-top .host-bundle .host-pill b{max-width:50px;font-size:11px}
.phone .live-top .host-bundle .host-pill small{font-size:8px;margin-top:2px;white-space:nowrap}
.phone .live-top #followHostButton{width:33px;height:24px;font-size:11px}
.phone .live-top .host-memberships{gap:0}
.phone .live-top .host-memberships button,.phone .live-top .membership-icon{width:25px;min-width:0;height:23px}
.phone #treasureEntry{display:none!important;pointer-events:none!important}

/* Shared Android/iPhone reference spacing and passive casting indicator. */
.phone #clubTag{display:none!important}
.phone .live-bottom{bottom:calc(8px + env(safe-area-inset-bottom,0px));left:12px;right:12px;gap:6px;height:38px;isolation:isolate}
.phone:has(#sourceVideo.landscape-source:not([hidden])) .live-bottom{left:12px;right:12px;gap:6px}
.phone .live-bottom::before{content:"";position:absolute;z-index:-1;left:43px;right:126px;top:0;height:38px;border-radius:24px;background:#17131d60;pointer-events:none}
.phone:has(#sourceVideo.landscape-source:not([hidden])) .live-bottom::before{left:0}
.phone .live-bottom input{height:38px;font-size:14px;padding:0 10px;background:transparent}
.phone .live-bottom #emojiOpen{width:34px;height:38px;background:transparent;padding:3px}
.phone .live-bottom #bottomLike,.phone .live-bottom #giftOpen,.phone .live-bottom #settingsOpen{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#15111e4d;padding:0}
.phone .live-bottom #bottomLike img{width:30px;height:30px;object-fit:contain;transform:translateY(-.7px)}
.phone .live-bottom #giftOpen img{width:30px;height:30px;object-fit:contain}
.phone .live-bottom #settingsOpen img{width:26px;height:26px;object-fit:contain}
.phone .source-cast{position:absolute;right:12px;width:32px;height:32px;border-radius:50%;background:#10182780;display:grid;place-items:center;z-index:4;pointer-events:none}
.source-cast img{display:block;width:28px;height:28px}
.phone:not(:has(#sourceVideo.landscape-source:not([hidden]))) .source-cast,.source-cast[hidden]{display:none!important}

/* Single fans-club control follows the orange and gold mobile reference. */
.phone .live-top #enterFansClub,.phone .live-top #enterFansClub .membership-icon{width:42px;height:28px}

/* Keep album saving actions reachable on narrow iPhone screens. */
#recordingFiles .record-file{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:stretch}
#recordingFiles .record-file>span,#recordingFiles .record-file>.hint{grid-column:1/-1}
#recordingFiles .record-file>button,#recordingFiles .record-file>a{display:grid;place-items:center;min-height:44px;padding:10px;border-radius:8px;background:#2b2a38;font-size:13px;text-align:center;line-height:1.5}

/* Keep the drawer opaque through the iPhone home-indicator safe area. */
.phone .gift-sheet{bottom:0;padding-bottom:env(safe-area-inset-bottom,0px);border-bottom-left-radius:0;border-bottom-right-radius:0;background:#171722}

.gift-quantity-picker{position:relative;z-index:2;flex:0 0 auto;display:flex;align-items:center;gap:8px;width:100%;min-width:0;padding:9px 9px 9px 12px;background:#191923;color:#fff;box-sizing:border-box;font-size:12px}.gift-quantity-picker[hidden]{display:none}.gift-quantity-label{flex:0 0 54px;min-width:0}.gift-quantity-label b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:500}.gift-quantity-label>small{display:block;margin-top:4px;color:#9994a6;font-size:9px}.gift-quantity-options{display:flex;flex:1;gap:8px;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:none;-webkit-overflow-scrolling:touch;user-select:none;-webkit-user-select:none}.gift-quantity-options::-webkit-scrollbar{display:none}.gift-quantity-options button{display:flex;flex:0 0 88px;flex-direction:column;align-items:center;justify-content:center;min-height:42px;border:0;border-radius:23px;padding:3px 8px;background:#ff0059;color:#fff;white-space:nowrap;touch-action:pan-x;-webkit-touch-callout:none}.gift-quantity-options button>span{font-size:15px;line-height:20px;font-weight:600}.gift-quantity-options button>small{color:#fff;font-size:10px;line-height:13px}.gift-quantity-options button:active{background:#eb0050}.gift-quantity-options button:focus-visible{outline:2px solid #ffc3db;outline-offset:-3px}.gift-quantity-cancel{flex:0 0 22px;padding:0;min-height:32px;background:transparent;color:#b5afbf;font-size:21px}.tile-buy>button,.gift-item{touch-action:pan-y;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}

/* The measured viewport also overrides Safari's stale dvh after a WebClip resumes. */
@supports not (height:100dvh){
 .phone{height:min(920px,calc(var(--live-viewport-height,100vh) - 56px))}
 #controlDialog{height:var(--live-viewport-height,100vh)}
 @media(max-width:800px){.phone{height:var(--live-viewport-height,100vh)}}
}
@media(max-width:800px),(max-width:1100px) and (max-height:500px){
 body.live-page{height:var(--live-viewport-height,100dvh);min-height:0;align-items:flex-start;overflow:hidden;padding:0;background:#17121c}
 body.live-page>.desktop-note{display:none}
 body.live-page>.phone{height:var(--live-viewport-height,100dvh);width:min(100vw,500px);max-width:100%;min-height:0;aspect-ratio:auto;border-radius:0;box-shadow:none}
 body.live-page #controlDialog{height:var(--live-viewport-height,100dvh)}
}

.usage-guide p{line-height:1.85;overflow-wrap:anywhere}.usage-guide .status-card{margin:14px 0}.usage-guide h3{margin-top:0}.usage-guide .secondary{max-width:100%;white-space:normal}

/* Keep the rounded tray behind the whole avatar with a small inner inset. */
.phone .gift-tray-row{padding-left:4px}

.gift-item .gift-wanxiang-tag{position:absolute;top:4px;left:4px;z-index:2;display:block;padding:0 4px;border:1px solid #d4b678;border-radius:2px;background:#f7e4b4;color:#62471e;font-size:10px;font-weight:600;font-style:normal;line-height:14px;letter-spacing:0;pointer-events:none}.gift-item .gift-wanxiang-tag~.gift-tag{left:auto;right:3px}
