/* Birlikte izleme ve sohbet tek çalışma alanını paylaşır. */
#dcRoot.dc-chat-open{--dc-chat-width:clamp(320px,30vw,400px)}
#dcRoot.dc-chat-open #dcPanel:not(.dc-mini){inset:0 var(--dc-chat-width) 0 0;width:auto;max-width:none}
#dcRoot .dc-call-chat{position:absolute;inset:0 0 0 auto;width:var(--dc-chat-width);display:flex;flex-direction:column;min-height:0;min-width:0;pointer-events:auto;background:var(--dc-bg,#090909);border-left:1px solid var(--dc-line,#292929)}
#dcRoot .dc-call-chat #chatArea{position:relative!important;inset:auto!important;display:flex!important;width:100%!important;height:100%!important;max-height:100%!important;min-height:0!important;min-width:0!important;margin:0!important;padding:0!important;flex:1 1 0!important;border:0!important;border-radius:0!important;overflow:hidden!important;background:var(--dc-bg,#090909)!important}
#dcRoot .dc-call-chat .chat-header{flex:0 0 auto;min-height:56px!important;padding:8px 12px!important;gap:8px;background:var(--dc-bg,#090909)}
#dcRoot .dc-call-chat .chat-header-left{min-width:0;flex:1}
#dcRoot .dc-call-chat .chat-header-profile-wrap{min-width:0;max-width:100%}
#dcRoot .dc-call-chat #chatHeaderUser{min-width:0;overflow:hidden}
#dcRoot .dc-call-chat .chat-header-right,#dcRoot .dc-call-chat #dcMobileReturn{display:none!important}
#dcRoot .dc-call-chat #chatMessages{flex:1 1 0!important;min-height:0!important;width:100%!important;padding:12px!important;scrollbar-width:thin;overscroll-behavior:contain}
#dcRoot .dc-call-chat #chatMessages{scrollbar-color:rgba(255,255,255,.2) transparent}
#dcRoot .dc-call-chat #chatMessages::-webkit-scrollbar{width:3px}
#dcRoot .dc-call-chat #chatMessages::-webkit-scrollbar-thumb{border:0;border-radius:99px;background:rgba(255,255,255,.2)}
#dcRoot .dc-call-chat #chatMessages::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.42)}
#dcRoot .dc-call-chat #chatMessages::-webkit-scrollbar-track{background:transparent}
#dcRoot .dc-call-chat #chatInputBar{position:relative!important;inset:auto!important;flex:0 0 auto;width:100%!important;margin:0!important;padding:8px 10px!important;gap:6px;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
#dcRoot .dc-call-chat #chatInput{font-size:16px;min-height:24px;max-height:112px;line-height:1.4}
#dcRoot .dc-call-chat #chatInputBar button{min-width:40px;min-height:44px;padding:8px;flex-shrink:0}
#dcRoot .dc-call-chat #chatInputBar .btn-label{display:none}
#dcRoot .dc-call-chat #chatInputBar .chat-input-wrapper{min-width:0}
#dcRoot .dc-call-chat .msg-row{max-width:100%;min-width:0}
#dcRoot .dc-call-chat .mx-details{width:100%}
#dcRoot .dc-chat-toggle{position:relative}
#dcRoot .dc-chat-toggle small:not([hidden]){position:absolute;top:0;right:0;min-width:16px;padding:2px 4px;border-radius:10px;background:#eee;color:#111;font-size:9px;line-height:12px}
#dcRoot .dc-chat-toggle[aria-expanded=true]{background:var(--dc-hover)!important}
@media(max-width:999px){
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel:not(.dc-mini){inset:0 0 auto;height:var(--dc-chat-video-height,40%)!important;max-height:var(--dc-chat-video-height,40%)!important}
 #dcRoot[data-chat-direction=portrait] .dc-call-chat{inset:var(--dc-chat-video-height,40%) 0 0;width:100%;border-left:0;border-top:1px solid var(--dc-line,#292929)}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel:not(.dc-mini,.dc-watching)>.dc-stage{inset:50px 8px 52px!important;gap:4px}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel .dc-footer{padding:0 8px!important}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel .dc-footer .dc-controls{gap:4px}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel .dc-footer .dc-controls>.dc-button{height:44px;min-width:40px;width:40px}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel .dc-voice-strip{display:none!important}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel.dc-duo .dc-stage{inset:0!important}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel.dc-duo .dc-main{inset:0!important;width:100%!important;height:100%!important;max-height:100%!important;aspect-ratio:auto!important;transform:none!important}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel .dc-floating{max-height:50%!important}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel .dc-media-shelf{bottom:46px;max-height:calc(100% - 100px)}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel .dc-mobile-focus,#dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel .dc-audio-background{bottom:48px}
}
@media(max-width:999px){
 #dcRoot.dc-chat-open[data-chat-direction=landscape]{--dc-chat-width:clamp(280px,38vw,360px)}
 #dcRoot[data-chat-direction=landscape] .dc-call-chat .chat-header{min-height:44px!important;padding-block:4px!important}
}
#dcRoot #dcPanel.dc-mini .dc-chat-toggle{display:none!important}
@media(max-width:768px){#dcRoot .dc-call-chat #chatMessages{scrollbar-width:none}#dcRoot .dc-call-chat #chatMessages::-webkit-scrollbar{display:none}}
/* Ortak sıra: medya alanını ve sohbet taslağını kapatmadan açılır. */
#dcRoot .dc-queue{position:absolute;z-index:95;top:max(62px,calc(env(safe-area-inset-top) + 54px));right:12px;bottom:84px;display:flex;flex-direction:column;gap:12px;width:min(380px,calc(100% - 24px));max-height:calc(100% - 146px);padding:16px;border:1px solid var(--dc-line);border-radius:16px;background:var(--dc-bg,#090909);box-shadow:0 16px 48px #0006;pointer-events:auto}
#dcRoot .dc-queue[hidden]{display:none!important}
#dcRoot .dc-queue [hidden]{display:none!important}
#dcRoot .dc-queue header{display:flex;align-items:center;justify-content:space-between;gap:8px}
#dcRoot .dc-queue h3{margin:0;font-size:15px;line-height:1.4}
#dcRoot .dc-queue button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:10px;border:1px solid var(--dc-line);border-radius:12px;background:var(--dc-hover);color:var(--dc-text)}
#dcRoot .dc-queue form{display:flex;gap:8px;flex:0 0 auto;min-width:0}
#dcRoot .dc-queue input{flex:1;min-width:0;width:100%;padding:10px 12px;border:1px solid var(--dc-line);border-radius:12px;background:var(--dc-card);color:var(--dc-text);font-size:16px}
#dcRoot .dc-queue ol{flex:1 1 auto;min-height:0;overflow:auto;margin:0;padding:0;list-style:none;overscroll-behavior:contain;scrollbar-width:thin}
#dcRoot .dc-queue li{display:flex;gap:6px;align-items:center;padding:10px 0;border-bottom:1px solid var(--dc-line)}
#dcRoot .dc-queue li>div{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
#dcRoot .dc-queue strong{font-size:12px;overflow-wrap:anywhere}
#dcRoot .dc-queue small,#dcRoot .dc-queue p,#dcRoot .dc-queue a{font-size:11px;line-height:1.5;color:var(--dc-muted)}
#dcRoot .dc-queue p:empty{display:none}
#dcRoot .dc-queue li a{width:max-content;max-width:100%}
#dcRoot .dc-queue .dc-queue-empty{padding:12px 0}
#dcRoot .dc-mini .dc-queue-toggle{display:none!important}
@media(max-width:700px){#dcRoot .dc-queue{inset:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));width:auto;max-height:none}#dcRoot.dc-chat-open .dc-queue{position:fixed;inset:var(--dc-visible-top,0) 8px auto;height:var(--dc-visible-height,100dvh);max-height:var(--dc-visible-height,100dvh)}}
/* Sohbet portala taşındığında da mesaj temasının değişkenleri korunur. */
#dcRoot .dc-call-chat{--mx-bg:var(--t-bg-card,#0a0a0a);--mx-panel:var(--t-bg-input,#111);--mx-line:var(--t-border-subtle,#262626);--mx-text:var(--t-text-primary,#f5f5f5);--mx-muted:var(--t-text-muted,#999)}
#dcRoot .dc-call-chat .mx-call-strip{display:none}
@media(max-width:700px) and (max-height:500px){
 #dcRoot.dc-chat-open[data-chat-direction=portrait]:has(#chatInput:focus) #dcPanel:not(.dc-mini,.dc-watching)>.dc-stage{inset:0 4px 44px!important}
 #dcRoot.dc-chat-open[data-chat-direction=portrait]:has(#chatInput:focus) #dcPanel>.dc-header{visibility:hidden;pointer-events:none}
 #dcRoot.dc-chat-open[data-chat-direction=portrait]:has(#chatInput:focus) #dcPanel .dc-footer .dc-controls>[data-call-action]:not([data-call-action=mic],[data-call-action=camera],[data-call-action=leave]){display:none}
 #dcRoot.dc-chat-open[data-chat-direction=portrait]:has(#chatInput:focus) #dcPanel .dc-footer .dc-call-more{display:none}
}
#dcRoot .dc-chat-resize{position:absolute;z-index:4;left:-5px;top:0;bottom:0;width:10px;cursor:col-resize;touch-action:none}
#dcRoot .dc-chat-resize:before{content:'';position:absolute;left:4px;top:0;bottom:0;width:2px;background:transparent;transition:background .15s}
#dcRoot .dc-chat-resize:hover:before,#dcRoot .dc-chat-resize:focus-visible:before{background:var(--dc-text)}
@media(max-width:999px){#dcRoot .dc-chat-resize{display:none}}
#dcRoot .dc-call-chat #chatBackBtn{display:grid!important;place-items:center;flex:0 0 40px;width:40px;height:44px}
#dcRoot #dcPanel #dcWatch.dc-player-v2>.dc-watch-next-step{position:absolute;z-index:22;bottom:60px;left:10px;right:10px;max-height:160px;overflow:auto;box-shadow:0 8px 24px #0004}
#dcRoot .dc-watch-presence{white-space:pre-line;overflow-wrap:anywhere;padding:10px;border-top:1px solid var(--dc-line);font-size:11px;line-height:1.7;color:var(--dc-muted)}
#dcRoot .dc-watch-presence[hidden]{display:none!important}
#dcRoot .dc-queue-autoplay{display:flex;align-items:center;gap:12px;padding:10px 0;border-block:1px solid var(--dc-line);flex:0 0 auto;cursor:pointer}
#dcRoot .dc-queue-autoplay>span{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
#dcRoot .dc-queue-autoplay input{flex:0 0 36px;width:36px;height:22px;min-width:36px;padding:0;cursor:pointer;accent-color:#ddd}
#dcRoot .dc-queue-autoplay strong{font-size:12px}
#dcRoot .dc-queue-autoplay small{font-size:10px;line-height:1.5}
#dcRoot .dc-queue-tabs{display:flex;flex:0 0 auto;gap:6px;padding-bottom:4px}
#dcRoot .dc-queue-tabs button[aria-selected=true]{background:var(--dc-text);color:var(--dc-bg)}
#dcRoot .dc-queue-search{display:flex;flex:1 1 0;min-height:0;flex-direction:column;gap:12px}
#dcRoot .dc-queue-search[hidden],#dcRoot .dc-queue-tabs[hidden]{display:none!important}
#dcRoot .dc-search-results{flex:1 1 auto;min-height:0;overflow:auto}
#dcRoot .dc-search-results img{width:88px;max-width:28%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:8px;flex:0 0 auto;background:var(--dc-hover)}
#dcRoot .dc-search-results strong{display:block;font-size:11px;line-height:1.4}
#dcRoot .dc-search-results small{font-size:10px}
/* Mesaj listesi, klavye animasyonunda tarayıcı çapasıyla ikinci kez kaymaz. */
#chatMessages{overflow-anchor:none;scroll-behavior:auto;touch-action:pan-y}
.chat-sound-toggle{display:grid;place-items:center;flex:0 0 40px;width:40px;height:44px;margin-left:auto;padding:10px;border:0;border-radius:12px;background:transparent;color:var(--t-text-muted,#999);cursor:pointer;touch-action:manipulation}
.chat-sound-toggle:hover,.chat-sound-toggle:focus-visible{background:var(--t-bg-input,#181818);color:var(--t-text-primary,#eee)}
#dcRoot .dc-call-chat .chat-sound-toggle{display:grid!important;pointer-events:auto}
@media(max-width:768px){body.chat-active #messagesPage.active #chatArea{height:var(--chat-viewport-height,100dvh)!important;max-height:var(--chat-viewport-height,100dvh)!important;top:var(--chat-viewport-top,0px)!important}#chatInput{font-size:16px!important;line-height:1.45;max-height:112px;overscroll-behavior:contain}}
@media(max-width:999px){
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel:not(.dc-mini,.dc-watching)>.dc-stage{inset:0 4px 44px!important}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel>.dc-header .dc-heading{display:none}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel>.dc-header{left:auto;max-width:45%;pointer-events:none}
 #dcRoot.dc-chat-open[data-chat-direction=portrait] #dcPanel>.dc-header .dc-header-actions{flex-wrap:wrap;justify-content:flex-end}
}
