/* Viewer only. Desktop, preview, locked and error states keep conventional layout. */
@media (max-width:650px) and (orientation:portrait) and (min-height:420px){
 body.cinema-mode:has(.reels239 > .player){margin:0;padding:0;overflow:hidden;background:#000;}
 body.cinema-mode:has(.reels239 > .player) main#main-content{width:100%;max-width:none;height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column;margin:0;padding:0;overflow:hidden;}
 main:has(>.reels239 > .player)>.alert{margin:0;padding:6px 12px;flex:0 0 auto;max-height:16dvh;overflow:auto;font-size:12px;}
 .watch219.reels239:has(>.player){--r-safe-top:env(safe-area-inset-top,0px);--r-safe-bottom:env(safe-area-inset-bottom,0px);position:relative;isolation:isolate;flex:1;min-height:0;width:100%;max-width:none;margin:0;background:#000;overflow:hidden;color:white;}
 .watch219.reels239 .cinema-back,.watch219.reels239 .watch219-more{background:#1119;color:#fff;width:42px;height:42px;flex:0 0 42px;border-radius:50%;}
 .watch219.reels239 .watch219-title{min-width:0;}
 .watch219.reels239 .cinema-head .watch-title,.watch219.reels239 .cinema-head small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;overflow-wrap:anywhere;margin:0;color:white;line-height:1.35;}
 .watch219.reels239 .cinema-head .watch-title{font-size:17px;font-weight:750;}.watch219.reels239 .cinema-head small{font-size:12px;color:#eee;}
 .watch219.reels239 .watch219-actions .button,.watch219.reels239 .watch219-nav .button,.watch219.reels239 .tools238 .button{font-size:0;gap:0;padding:0;min-width:0;min-height:40px;width:42px;height:42px;display:grid;place-items:center;background:#151515a0;color:#fff;border:1px solid #ffffff30;border-radius:50%;box-shadow:none;margin:0;}
 .watch219.reels239 .watch219-actions .button span{font-size:0;line-height:0;}
 .watch219.reels239 .watch219-actions .button svg,.watch219.reels239 .watch219-nav .button svg{width:23px;height:23px;}
 .watch219.reels239 .watch219-actions [aria-pressed=true]{color:#ff4b95;}
 .watch219.reels239 .watch219-nav .button svg{transform:rotate(90deg);}
 .watch219.reels239 .watch219-nav .button:disabled{opacity:.25;}
 .watch219.reels239 .tools238 .button::before{font-size:22px;line-height:1;}
 .watch219.reels239 [data-play238]::before{content:'▷';}.watch219.reels239 [data-play238][aria-label='หยุดวิดีโอ']::before{content:'Ⅱ';}
 .watch219.reels239 [data-sound238]::before{content:'♬';}.watch219.reels239 [data-sound238][aria-pressed=true]::before{content:'♪×';font-size:17px;}
 .watch219.reels239 [data-native238]::before{content:'☷';}
 .watch219.reels239 .watch219-error{font-size:11px;line-height:1.25;color:#fff;background:#111b;border-radius:8px;padding:4px 7px;margin:0;overflow-wrap:anywhere;}
 .watch219.reels239 .watch219-error:empty{display:none;}.watch219.reels239 [data-autoplay237-unmute]{min-height:32px;font-size:12px;padding:4px 9px;}
 /* Premium: UI stays in the same viewport. Separate sibling hit areas, no event bubbling to swipe surface. */
 .watch219.reels239-premium:not(.reels239-native):has(>.player)>.player:not(:fullscreen){position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;border-radius:0;aspect-ratio:auto;background:#000;}
 .watch219.reels239-premium:not(.reels239-native):has(>.player)::after{content:'';position:absolute;inset:0;z-index:4;pointer-events:none;background:linear-gradient(180deg,#0009 0%,transparent 18%,transparent 54%,#000b 87%,#000d 100%);}
 .watch219.reels239-premium:not(.reels239-native):has(>.player)>.cinema-head{position:absolute;inset:0;z-index:5;margin:0;display:block;pointer-events:none;}
 .watch219.reels239-premium:not(.reels239-native) .cinema-back,.watch219.reels239-premium:not(.reels239-native) .watch219-more{position:absolute;top:calc(8px + var(--r-safe-top));pointer-events:auto;}
 .watch219.reels239-premium:not(.reels239-native) .cinema-back{left:10px;}.watch219.reels239-premium:not(.reels239-native) .watch219-more{right:10px;}
 .watch219.reels239-premium:not(.reels239-native) .watch219-title{position:absolute;left:12px;right:66px;bottom:calc(64px + var(--r-safe-bottom));text-shadow:0 1px 4px #000;}
 .watch219.reels239-premium:not(.reels239-native)>.watch219-actions{position:absolute;right:10px;bottom:calc(64px + var(--r-safe-bottom));z-index:6;display:grid;grid-template-columns:42px;gap:7px;margin:0;}
 .watch219.reels239-premium:not(.reels239-native)>.tools238{position:absolute;left:10px;bottom:calc(8px + var(--r-safe-bottom));z-index:6;display:flex;gap:6px;margin:0;}
 .watch219.reels239-premium:not(.reels239-native)>.watch219-nav{position:absolute;right:10px;bottom:calc(8px + var(--r-safe-bottom));z-index:6;margin:0;padding:0;border:0;display:flex;gap:6px;}
 .watch219.reels239-premium:not(.reels239-native)>.rail238{display:none;}
 .watch219.reels239-premium:not(.reels239-native)>[data-player-help],.watch219.reels239-premium:not(.reels239-native)>[data-autoplay237-status]{position:absolute;z-index:7;left:12px;right:66px;top:calc(62px + var(--r-safe-top));pointer-events:none;}
 .watch219.reels239-premium:not(.reels239-native)>[data-autoplay237-status]{top:calc(102px + var(--r-safe-top));}
 .watch219.reels239-premium:not(.reels239-native)>[data-autoplay237-unmute],.watch219.reels239-premium:not(.reels239-native) .reels239-noscript{position:absolute;z-index:7;left:12px;top:calc(150px + var(--r-safe-top));}
 /* Native fallback and YouTube: never put UI over the provider iframe. Compact reserved rows. */
 .watch219.reels239-free:has(>.player),.watch219.reels239-native:has(>.player){display:flex;flex-direction:column;gap:3px;padding:var(--r-safe-top) 6px var(--r-safe-bottom);}
 .watch219:is(.reels239-free,.reels239-native)>.cinema-head{flex:0 0 auto;margin:0;gap:5px;}
 .watch219:is(.reels239-free,.reels239-native)>.player:not(:fullscreen){flex:1 1 0;min-height:200px;min-width:0;height:auto;width:100%;max-width:100%;margin:0;border:0;border-radius:0;aspect-ratio:auto;}
 .watch219:is(.reels239-free,.reels239-native)>.rail238{flex:0 0 26px;min-height:26px;font-size:11px;background:#181818;margin:0;}
 .watch219:is(.reels239-free,.reels239-native)>.watch219-actions,.watch219:is(.reels239-free,.reels239-native)>.watch219-nav,.watch219:is(.reels239-free,.reels239-native)>.tools238{display:flex;flex:0 0 auto;justify-content:center;align-items:center;gap:6px;border:0;padding:0;margin:0;}
 .watch219:is(.reels239-free,.reels239-native)>.watch219-actions .button,.watch219:is(.reels239-free,.reels239-native)>.watch219-nav .button,.watch219:is(.reels239-free,.reels239-native)>.tools238 .button{height:40px;min-height:40px;}
 .watch219:is(.reels239-free,.reels239-native)>[data-autoplay237-unmute]{align-self:center;}
 .watch219.reels239 dialog[open]{max-height:85dvh;overscroll-behavior:contain;touch-action:pan-y;}
 /* On short screens native fallback remains scrollable instead of clipping provider or controls. */
 @media(max-height:580px){body.cinema-mode:has(.reels239:is(.reels239-native,.reels239-free) > .player){overflow:auto;} body.cinema-mode:has(.reels239:is(.reels239-native,.reels239-free) > .player) main#main-content{height:auto;min-height:100dvh;overflow:visible;} .watch219:is(.reels239-free,.reels239-native):has(>.player){min-height:100dvh;overflow:visible;} .watch219:is(.reels239-free,.reels239-native)>.player:not(:fullscreen){flex:none;height:200px;}}
}
@media (min-width:651px),(orientation:landscape),(max-height:419px){.watch219.reels239 [data-tap238],.watch219.reels239 .rail238{touch-action:pan-y;}.watch219.reels239 .rail238{display:none;}}
.reels239-progress{display:none;}
@media (max-width:650px) and (orientation:portrait) and (min-height:420px){
 .watch219.reels239-premium:not(.reels239-native)>.reels239-progress{display:block;position:absolute;bottom:var(--r-safe-bottom);left:0;right:0;height:3px;background:#ffffff40;z-index:6;pointer-events:none;}
 .reels239-progress i{display:block;width:0;height:100%;background:#ff0875;}
 .watch219.reels239-free:has(>.player),.watch219.reels239-native:has(>.player){overflow-y:auto;overscroll-behavior:contain;}
 .watch219.reels239 .tools238 .button::before{content:'';display:block;width:22px;height:22px;background:currentColor;mask:var(--reels-icon) center/contain no-repeat;}
 .watch219.reels239 [data-play238]{--reels-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 4l14 8-14 8z'/%3E%3C/svg%3E");}
 .watch219.reels239 [data-play238][aria-label='หยุดวิดีโอ']{--reels-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 4h4v16H6zm8 0h4v16h-4z'/%3E%3C/svg%3E");}
 .watch219.reels239 [data-sound238]{--reels-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zM16 8q4 4 0 8m3-11q7 7 0 14'/%3E%3C/svg%3E");}
 .watch219.reels239 [data-sound238][aria-pressed=true]{--reels-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zM16 9l6 6m0-6-6 6'/%3E%3C/svg%3E");}
 .watch219.reels239 [data-native238]{--reels-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M6 15h12m-9 0v-3'/%3E%3C/svg%3E");}
}
