.profile-mobile-header{display:none}
@media(max-width:700px){
  :root{--mobile-nav-height:72px}
  .mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:80;display:flex;align-items:center;height:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));padding:5px 3px calc(5px + env(safe-area-inset-bottom));background:#172413;border-top:1px solid #4b623d;gap:0;overflow:visible;box-sizing:border-box}
  .mobile-nav>button{min-width:0;flex:1;min-height:52px;padding:6px 1px;font-size:9px;line-height:1.5;white-space:nowrap;touch-action:manipulation;pointer-events:auto}
  .mobile-nav>button>span{display:block;font-size:23px}
  #content{padding-bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 28px)}
  #overlay{bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));padding:0;align-items:center;z-index:60}
  #overlay .user-modal{max-height:100%;max-width:100%;box-sizing:border-box}
  #overlay .profile-modal{width:100%;height:100%;max-height:100%;border:0;border-radius:0;overflow:auto;overscroll-behavior:contain;padding:0}
  .profile-mobile-header{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:6;background:#1d2b1bf5;border-bottom:1px solid #4b623d;min-height:56px;padding:8px 12px;padding-top:calc(8px + env(safe-area-inset-top))}
  .profile-mobile-header>button{font-size:15px;min-height:40px;min-width:60px;color:#d1e4b5;touch-action:manipulation}
  .profile-mobile-header>span{font-size:13px;color:#b5c7a5}
  .profile-modal>.close{display:none}
  .profile-body{padding-bottom:24px}
  #overlay .chat-modal{height:100%;max-height:100%;border-radius:0}
  #overlay .game-player-modal{max-height:100%;border-radius:0}
  .game-player-frame{height:calc(100dvh - var(--mobile-nav-height) - env(safe-area-inset-bottom) - 150px);min-height:260px}
}
/* Keep browser video surfaces inside the feed; fullscreen remains a user action. */
.feed{position:relative;isolation:isolate;overflow:hidden auto;overscroll-behavior-y:contain}
.feed-item{contain:paint}
.feed-item.feed-video-inactive>video{visibility:hidden;pointer-events:none}
.feed-item>video:fullscreen{visibility:visible;object-fit:contain;background:#000}
@media(max-width:700px){
  .user-main~.mobile-nav{z-index:1000;isolation:isolate;transform:translateZ(0)}
}
/* Decoded media stays offscreen in mobile compatibility mode; only Canvas is painted in the feed. */
.feed-item>.feed-video-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:0;display:none;background:#101810;pointer-events:none}
.feed-item.feed-canvas-mode>.feed-video-canvas{display:block}
.feed-item.feed-canvas-mode>video{position:absolute!important;inset:auto!important;left:-10000px!important;top:0!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.feed-item.feed-video-inactive>video,.feed-item.feed-video-inactive>.feed-video-canvas{display:none!important}
.feed-video-message{position:absolute;top:45%;left:12%;right:12%;z-index:2;color:#fff;text-align:center;font-size:13px;text-shadow:0 1px 5px #000;pointer-events:none}
.feed-player-controls{position:absolute;left:12px;right:12px;bottom:8px;z-index:6;display:flex;align-items:center;gap:9px;padding:5px 8px;background:rgba(8,17,14,.12);border-radius:12px;color:#fff;text-shadow:0 1px 4px #000}
.feed-player-controls>button{min-width:44px;min-height:36px;font-size:13px;color:#fff;background:rgba(8,17,14,.18)}
.feed-player-controls>span{font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
.feed-player-controls>input{min-width:0;width:100%;height:32px;touch-action:pan-x;appearance:none;-webkit-appearance:none;background:transparent;border:0;box-shadow:none;padding:0}
.feed-player-controls>input::-webkit-slider-runnable-track{height:3px;border-radius:4px;background:rgba(255,255,255,.38)}
.feed-player-controls>input::-moz-range-track{height:3px;border-radius:4px;background:rgba(255,255,255,.38)}
.feed-player-controls>input::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;margin-top:-4.5px;border-radius:50%;background:rgba(222,240,204,.78);border:1px solid rgba(255,255,255,.45)}
.feed-player-controls>input::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:rgba(222,240,204,.78);border:1px solid rgba(255,255,255,.45)}
.feed-item>.feed-playback{top:12px;right:10px;gap:5px;z-index:6}
.feed-item>.feed-playback button{font-size:11px;padding:7px 9px;min-height:36px}
.feed-item.feed-page-fullscreen{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;z-index:10000!important;border-radius:0!important;background:#000!important;max-width:none!important}
.feed-item:fullscreen,.feed-item:-webkit-full-screen{width:100%;height:100%;background:#000}
.feed-item:fullscreen>video{object-fit:contain}
.feed-page-fullscreen-open{overflow:hidden!important}
.feed-fullscreen-host{position:fixed;inset:0;width:100%;height:100dvh;z-index:10000;background:#000;overflow:hidden;overscroll-behavior:contain;outline:0}
.feed-fullscreen-host>.feed-item{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;border-radius:0!important;margin:0!important}
.feed-fullscreen-host>.feed-item>video{object-fit:contain}
.feed-fullscreen-counter{position:absolute;top:max(15px,env(safe-area-inset-top));left:14px;z-index:7;font-size:12px;color:#fff;text-shadow:0 1px 5px #000;pointer-events:none}
.feed-fullscreen-host>.feed-item>.feed-player-controls{bottom:max(10px,env(safe-area-inset-bottom))}
.feed-fullscreen-host>.feed-item>.feed-caption,.feed-fullscreen-host>.feed-item>.user-video-caption{bottom:78px}
.feed-fullscreen-host>.feed-item>.feed-side,.feed-fullscreen-host>.feed-item>.user-video-side{bottom:76px}
.feed-fullscreen-host>#overlay{inset:0;bottom:0;z-index:20;padding:12px}
.feed-fullscreen-host>#overlay .user-modal{max-height:calc(100dvh - 24px);max-width:100%;overscroll-behavior:contain}
.feed-fullscreen-host>#overlay .chat-modal{height:calc(100dvh - 24px)}
.feed-fullscreen-host>#toast{z-index:30;bottom:max(22px,env(safe-area-inset-bottom))}
.feed-share-actions{display:flex;flex-wrap:wrap;gap:10px}
.feed-fullscreen-host .feed-side{gap:8px;max-height:calc(100dvh - 160px);overflow-y:auto;scrollbar-width:none;z-index:7}
.feed-fullscreen-host .feed-side>button{min-width:46px;min-height:44px;flex-shrink:0}
@media(max-height:600px){.feed-fullscreen-host .feed-side{flex-direction:row;max-height:none;right:12px;bottom:68px!important;max-width:calc(100% - 24px)}.feed-fullscreen-host .feed-caption,.feed-fullscreen-host .user-video-caption{max-width:calc(100% - 28px);bottom:124px!important;max-height:100px;overflow:auto}}
@media(max-width:700px){
  .feed-item>.feed-player-controls{padding-bottom:max(7px,env(safe-area-inset-bottom))}
  .feed .feed-item>.feed-side,.feed .feed-item>.user-video-side,.feed-page-fullscreen>.feed-side{bottom:70px}
  .feed .feed-item>.feed-caption,.feed .feed-item>.user-video-caption,.feed-page-fullscreen>.feed-caption,.feed-page-fullscreen>.user-video-caption{bottom:72px}
}
.chat-dialog-open,.chat-dialog-open body{overflow:hidden;overscroll-behavior:none}
#overlay .chat-modal{min-height:0;min-width:0;overflow:hidden;overscroll-behavior:contain}
.chat-modal>.chat-head,.chat-modal>.chat-hint,.chat-modal>#chat-jobs,.chat-modal>#chat-form{flex-shrink:0}
.chat-modal>.chat-head>div{min-width:0}.chat-modal .chat-head h2{overflow-wrap:anywhere}
.chat-modal>#chat-messages{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#overlay.chat-layout-compact{position:fixed;inset:auto!important;top:var(--chat-viewport-top,0px)!important;left:0!important;bottom:auto!important;width:var(--chat-viewport-width,100%)!important;height:var(--chat-viewport-height,100%)!important;padding:8px!important;align-items:center;justify-content:center}
#overlay.chat-layout-compact .chat-modal{height:100%;max-height:640px;width:100%;max-width:580px;border-radius:14px;padding:0}
#overlay.chat-layout-compact .chat-head{padding:12px 48px 12px 14px;gap:10px;min-height:64px}
#overlay.chat-layout-compact .chat-head>img{width:36px;height:36px;flex-shrink:0}
#overlay.chat-layout-compact .chat-head h2{font-size:16px;margin:0 0 3px}
#overlay.chat-layout-compact .chat-head .pill{margin:0 0 0 auto;font-size:8px;white-space:nowrap;padding:4px}
#overlay.chat-layout-compact .chat-hint{padding:8px 14px;line-height:1.6}
#overlay.chat-layout-compact #chat-messages{padding:14px}
#overlay.chat-layout-compact #chat-form{padding:8px 10px calc(8px + env(safe-area-inset-bottom));gap:7px}
#overlay.chat-layout-compact #chat-form input{font-size:16px;min-height:44px;padding:8px;line-height:1.4}
#overlay.chat-layout-compact .message{margin-bottom:12px}
#overlay.chat-layout-compact .message>img,#overlay.chat-layout-compact .message>video{max-height:240px;max-width:100%;object-fit:contain}
#overlay.chat-layout-compact .chat-gifts{max-height:100%;min-height:0;padding-top:12px}
#overlay.chat-layout-compact .close{top:12px;right:12px}
@media(max-height:500px){#overlay.chat-layout-compact .chat-hint{display:none}#overlay.chat-layout-compact .chat-head{min-height:50px;padding-top:6px;padding-bottom:6px}#overlay.chat-layout-compact #chat-form{padding-top:5px;padding-bottom:5px}}
