/* chatWS — cody_layout.css
   The CodyChat look (layout, sizes, private chat, emoji picker, YouTube window, menus, status marker…)
   for EVERY theme. Colours come from each theme's own --th-* tokens, so dark themes stay dark and
   light themes stay light. Loaded after the theme's theme.css (control/head_load.php). */

/* no icon sidebar: navigation lives in the hamburger menu */
.cws-themed .side-left{display:none !important}

/* rows instead of bubbles */
.cws-themed .messages{padding:0 !important;gap:0 !important}
.cws-themed .message{gap:10px;padding:8px 12px;border-bottom:0;animation:none}
.cws-themed .message:not(.system):nth-child(even){background:var(--th-item-bg,rgba(0,0,0,.05))}
.cws-themed .message:not(.system):not(.message--bot) .message-body > .message-text,
.cws-themed .message:not(.system):not(.message--bot) > .message-text,
.cws-themed .message .message-content > .message-text{background:none !important;padding:0 !important;border-radius:0;display:block;margin-top:2px}
.cws-themed .message-avatar{width:36px;height:36px;border:2px solid var(--th-border,#e6e6e6);box-sizing:border-box}
.cws-themed .message-user{font-size:13px;font-weight:700}
.cws-themed .message-time{font-size:10px;color:var(--th-muted,#999) !important}
.cws-themed .message-text{font-size:14px}
.cws-themed .message.system{background:none !important;justify-content:flex-start;padding:6px 12px}
.cws-themed .message.system .message-text{font-size:11px;font-style:normal}

/* header / footer */
.cws-themed .topbar{background:var(--th-header-bg,#222) !important}
.cws-themed .chat-footer-bar,.cws-themed #chatFooterBar{background:var(--th-header-bg,#222) !important;min-height:38px}

/* input pill */
.cws-themed .chat-input input,.cws-themed #messageInput{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border:1px solid var(--th-border,#e6e6e6) !important;border-radius:20px !important;color:var(--th-text,#333) !important;padding:8px 14px}

/* right user list */
.cws-themed #rpanel,.cws-themed .right-panel{background:var(--th-panel-bg,#fff) !important;border-left:1px solid var(--th-border,#e6e6e6)}
.cws-themed ::-webkit-scrollbar-thumb{background:var(--th-selected,rgba(0,0,0,.09)) !important}

/* private chat window: dark header, white body, soft grey bubbles */
.cws-themed #pmBox,.cws-themed .pm-box{background:var(--th-panel-bg,#fff) !important;border:1px solid var(--th-border,#e6e6e6) !important;box-shadow:0 2px 12px rgba(0,0,0,.25) !important;border-radius:0 !important}
.cws-themed .pm-box-header,.cws-themed #pmBoxHeader{background:var(--th-header-bg,#222) !important;color:#fff !important;border:0 !important}
.cws-themed .pm-box-header .pm-box-name,.cws-themed .pm-box-header .pm-ctrl-btn{color:#fff !important}
.cws-themed .pm-msg.mine .pm-msg-text,.cws-themed .pm-msg.theirs .pm-msg-text{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;color:var(--th-text,#333) !important;border-radius:14px}
.cws-themed .pm-box-input,.cws-themed #pmInputRow{background:var(--th-panel-bg,#fff) !important;border-top:1px solid var(--th-border,#e6e6e6) !important}

/* compact bottom area (CodyChat proportions) */
.cws-themed{--footer-h:calc(38px + env(safe-area-inset-bottom,0px))}
.cws-themed .chat-input{padding:6px 10px !important;gap:6px !important;background:var(--th-panel-bg,#fff) !important;border-top:1px solid var(--th-border,#e6e6e6) !important;min-height:0 !important}
.cws-themed .chat-input input:not([type="file"]),.cws-themed .chat-input #messageInput{height:34px !important;min-height:0 !important;padding:0 14px !important;font-size:14px !important;line-height:34px;background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border:1px solid var(--th-border,#e6e6e6) !important;border-radius:18px !important;box-shadow:none !important}
.cws-themed .chat-input .chat-attach-btn,.cws-themed .chat-input .emoji-btn,.cws-themed .chat-input button:not(.send-btn){width:30px !important;height:30px !important;font-size:17px !important;color:var(--th-sub-text,#888) !important;background:none !important;padding:0 !important}
.cws-themed .chat-input .send-btn{width:30px !important;height:30px !important;font-size:17px !important;background:none !important;color:var(--th-text,#333) !important;border-radius:0 !important;box-shadow:none !important}
.cws-themed .chat-input .send-btn:hover{color:var(--th-accent,#03add8) !important;transform:none}
.cws-themed .chat-footer-bar,.cws-themed #chatFooterBar{height:var(--footer-h) !important;min-height:0 !important;padding:0 8px !important;border-top:0 !important}
.cws-themed .footer-menu-btn{width:38px !important;height:32px !important;font-size:20px !important;color:#fff !important;opacity:1 !important;background:none !important}
.cws-themed .footer-menu-btn:hover,.cws-themed .footer-menu-btn.active{color:var(--th-accent,#03add8) !important;background:none !important}

/* ── Profile card (CodyChat): dark header, centred avatar, pill tabs, label/value rows ── */
.cws-themed .profile-modal-overlay{background:rgba(0,0,0,.45) !important;backdrop-filter:none !important}
.cws-themed .profile-modal{position:relative;max-width:520px !important;background:var(--th-panel-bg,#fff) !important;color:var(--th-text,#333);border-radius:22px !important;box-shadow:0 10px 40px rgba(0,0,0,.35) !important}
.cws-themed .profile-modal-header{position:absolute !important;top:0;left:0;right:0;height:0 !important;background:none !important;z-index:5}
.cws-themed .profile-modal-cover{display:none !important}
.cws-themed .profile-modal-actions{top:14px !important;right:16px !important}
.cws-themed .profile-modal-close{background:none !important;color:#fff !important;width:32px !important;height:32px !important;font-size:20px !important}
.cws-themed .profile-modal-close:hover{color:var(--th-accent,#03add8) !important;background:none !important}
.cws-themed .profile-modal-avatar-wrap{order:1;margin:0 !important;padding:44px 20px 18px !important;background:var(--th-header-bg,#222);flex-direction:column !important;align-items:center !important;gap:10px !important;text-align:center}
.cws-themed .profile-modal-avatar{width:110px !important;height:110px !important;border-radius:50% !important;border:3px solid #fff !important;box-shadow:none !important}
.cws-themed .profile-modal-title{padding:0 !important;flex:none !important;display:flex;flex-direction:column;align-items:center;text-align:center}
.cws-themed .profile-modal-username{order:2;font-size:26px !important;font-weight:700 !important;color:#fff !important;margin:2px 0 0 !important}
.cws-themed .profile-modal-meta{order:1;font-size:14px !important;font-weight:600;color:#fff !important}
.cws-themed .profile-modal-mood{color:var(--th-muted,#999) !important}
.cws-themed .profile-extras{order:3;color:var(--th-muted,#999)}
.cws-themed .pv-stats,.cws-themed .profile-stats-grid{display:none !important}
.cws-themed .profile-tabs{order:2;justify-content:center !important;gap:6px;background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border-bottom:0 !important;padding:10px 8px !important}
.cws-themed .profile-tab-btn{flex:0 0 auto !important;border:0 !important;border-radius:8px;padding:8px 18px !important;font-size:15px !important;font-weight:700 !important;color:var(--th-text,#333) !important;background:none}
.cws-themed .profile-tab-btn.active{background:var(--th-selected,rgba(0,0,0,.09)) !important;color:var(--th-text,#333) !important}
.cws-themed .profile-modal-content{order:3;padding:22px 36px 28px !important}
.cws-themed .profile-info-row{gap:10px !important;padding:16px 0 !important;border-bottom:1px solid var(--th-border,#e6e6e6) !important}
.cws-themed .profile-info-row:last-child{border-bottom:0 !important}
.cws-themed .profile-info-icon{width:24px !important;height:auto !important;background:none !important;color:var(--th-text,#333) !important;font-size:17px !important;border-radius:0}
.cws-themed .profile-info-content{display:contents}
.cws-themed .profile-info-label{flex:0 0 38%;font-size:16px !important;font-weight:700;color:var(--th-text,#333) !important;margin:0 !important}
.cws-themed .profile-info-value{flex:1;font-size:16px !important;color:var(--th-text,#333) !important}
.cws-themed .profile-bio-text,.cws-themed .profile-bio-title{color:var(--th-text,#333) !important}

/* ── Avatar menu (CodyChat): white card, header with avatar + name + status button ── */
.cws-themed .avatar-menu{background:var(--th-panel-bg,#fff) !important;border-radius:16px !important;box-shadow:0 6px 28px rgba(0,0,0,.25) !important;border:0 !important;min-width:290px;padding:0 0 8px !important;overflow:hidden}
.cws-themed .avatar-menu .menu-header{background:var(--th-panel-bg,#fff) !important;padding:18px 18px 14px !important;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--th-border,#e6e6e6) !important}
.cws-themed .avatar-menu .menu-avatar{width:60px !important;height:60px !important;border-radius:12px !important;object-fit:cover}
.cws-themed .avatar-menu .menu-username{font-size:20px !important;font-weight:700 !important;color:var(--th-text,#333) !important}
.cws-themed .avatar-menu .menu-user-rank{font-size:14px !important;color:var(--th-text,#333) !important}
.cws-themed .avatar-menu .menu-section{padding:8px 0 !important;border:0 !important}
.cws-themed .avatar-menu .menu-section + .menu-section{border-top:1px solid var(--th-border,#e6e6e6) !important;margin-top:4px}
.cws-themed .avatar-menu .menu-item{padding:14px 24px !important;font-size:17px !important;gap:16px;color:var(--th-text,#333) !important}
.cws-themed .avatar-menu .menu-item i{color:var(--th-accent,#03add8) !important;width:22px;text-align:center;font-size:18px !important}
.cws-themed .avatar-menu .menu-item:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important}
.cws-themed .avatar-menu .menu-item.danger,.cws-themed .avatar-menu .menu-item.danger i{color:var(--th-accent,#03add8) !important}
.cws-themed .avatar-menu .menu-item.danger{color:var(--th-text,#333) !important}
.cws-themed .avatar-menu.cws-has-edit-link .menu-item[onclick="editProfile()"]{display:none}
.cws-themed .avatar-menu .menu-guest-note{margin:8px 16px !important;background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border:0 !important;color:var(--th-sub-text,#888) !important;font-size:13px}
.cws-themed .avatar-menu .menu-guest-note *{color:var(--th-sub-text,#888) !important}

/* ── Edit profile dialog (CodyChat): dark header, pill tabs, white body, light inputs ── */
.cws-themed #editProfileOverlay{background:rgba(0,0,0,.45) !important;backdrop-filter:none !important}
.cws-themed .ep-modal{background:var(--th-panel-bg,#fff) !important;border:0 !important;border-radius:22px !important;box-shadow:0 10px 40px rgba(0,0,0,.35) !important;width:min(560px,100%) !important;color:var(--th-text,#333)}
.cws-themed .ep-header{background:var(--th-header-bg,#222) !important;border:0 !important;padding:18px 20px !important}
.cws-themed .ep-header-icon{background:none !important;color:#fff !important;font-size:20px !important;width:auto !important}
.cws-themed .ep-header-title{color:#fff !important;font-size:17px !important}
.cws-themed .ep-header-sub{color:var(--th-muted,#999) !important}
.cws-themed .ep-close-btn{background:none !important;border:0 !important;color:#fff !important;font-size:20px !important}
.cws-themed .ep-close-btn:hover{color:var(--th-accent,#03add8) !important;background:none !important}
.cws-themed .guest-banner{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;color:var(--th-sub-text,#888) !important;font-size:13px}
.cws-themed .guest-banner *{color:var(--th-sub-text,#888) !important}
.cws-themed .ep-tabs{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;justify-content:center;gap:6px !important;padding:10px 8px !important;border:0 !important}
.cws-themed .ep-tab{flex:0 0 auto !important;border-radius:8px !important;padding:8px 18px !important;font-size:14px !important;color:var(--th-text,#333) !important;background:none !important;border:0 !important}
.cws-themed .ep-tab:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;color:var(--th-text,#333) !important}
.cws-themed .ep-tab.ep-tab-active,.cws-themed .ep-tab-active{background:var(--th-selected,rgba(0,0,0,.09)) !important;color:var(--th-text,#333) !important;border:0 !important;box-shadow:none !important}
.cws-themed .ep-cover-wrap{background:var(--th-header-bg,#222) !important;height:84px !important}
.cws-themed .ep-avatar-row{margin-top:-44px !important}
.cws-themed .ep-avatar-wrap{width:92px !important;height:92px !important;border:3px solid #fff !important;box-shadow:none !important}
.cws-themed .ep-upload-hint{color:var(--th-muted,#999) !important}
.cws-themed .ep-label{color:var(--th-text,#333) !important;font-size:12px !important}
.cws-themed .ep-opt,.cws-themed .ep-char-count{color:var(--th-muted,#999) !important}
.cws-themed .ep-input{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border:1px solid var(--th-border,#e6e6e6) !important;color:var(--th-text,#333) !important;border-radius:10px !important}
.cws-themed .ep-input:focus{border-color:var(--th-accent,#03add8) !important;background:var(--th-panel-bg,#fff) !important}
.cws-themed .ep-input::placeholder{color:var(--th-muted,#999) !important}
.cws-themed select.ep-input option{background:var(--th-panel-bg,#fff) !important;color:var(--th-text,#333)}
.cws-themed .ep-style-block,.cws-themed .ep-preview-card,.cws-themed .ep-security-note{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border-color:var(--th-border,#e6e6e6) !important;color:var(--th-text,#333) !important}
.cws-themed .ep-style-title,.cws-themed .ep-preview-username,.cws-themed .ep-color-row label{color:var(--th-text,#333) !important}
.cws-themed .ep-type{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;color:var(--th-text,#333) !important;border-color:var(--th-border,#e6e6e6) !important}
.cws-themed .ep-type.active{background:var(--th-accent,#03add8) !important;color:#fff !important;border-color:var(--th-accent,#03add8) !important}
.cws-themed .ep-footer{background:var(--th-panel-bg,#fff) !important;border-top:1px solid var(--th-border,#e6e6e6) !important}
.cws-themed .ep-btn-primary{background:var(--th-accent,#03add8) !important;box-shadow:none !important;color:#fff !important}
.cws-themed .ep-btn-primary:hover{background:var(--th-accent,#03add8) !important}
.cws-themed .ep-btn-ghost{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;color:var(--th-text,#333) !important;border:0 !important}
.cws-themed .ep-btn-ghost:hover{background:var(--th-selected,rgba(0,0,0,.09)) !important}
.cws-themed .ep-danger-desc{color:var(--th-sub-text,#888) !important}
.cws-themed .ep-body{scrollbar-color:#ccc transparent}

/* ── Emoji picker (CodyChat): floating card above the input, left-aligned, compact ── */
.cws-themed .emo-panel{left:8px !important;right:auto !important;bottom:52px !important;width:min(410px,calc(100% - 16px)) !important;max-height:340px !important;background:var(--th-panel-bg,#fff) !important;border:1px solid var(--th-border,#e6e6e6) !important;border-radius:16px !important;box-shadow:0 4px 22px rgba(0,0,0,.22) !important;overflow:hidden}
.cws-themed .emo-panel-tabs{padding:0 !important;gap:0 !important;background:var(--th-panel-bg,#fff);border-bottom:1px solid var(--th-border,#e6e6e6) !important}
.cws-themed .emo-tab{width:46px !important;height:44px !important;border-radius:0 !important;padding:9px !important}
.cws-themed .emo-tab:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important}
.cws-themed .emo-tab.active{background:var(--th-item-bg,rgba(0,0,0,.05)) !important}
.cws-themed .emo-tab-lock{background:var(--th-panel-bg,#fff) !important}
.cws-themed .emo-panel-grid{padding:8px 6px !important;gap:0 !important}
.cws-themed .emo-item{width:calc(100% / 8) !important;height:44px !important;border-radius:8px}
.cws-themed .emo-item:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important}
.cws-themed .emo-item img{max-width:30px !important;max-height:30px !important}
.cws-themed .emo-loading,.cws-themed .emo-locked{color:var(--th-muted,#999) !important}
@media (max-width:900px){.cws-themed .emo-panel{max-height:min(45vh,300px) !important}}

/* ── "+" add-on picker (YouTube, GIPHY…) as a centred CodyChat-style modal ── */
.cws-themed .plus-panel{position:fixed !important;left:50% !important;top:50% !important;right:auto !important;bottom:auto !important;transform:translate(-50%,-50%);width:min(660px,calc(100vw - 24px)) !important;height:auto !important;max-height:min(730px,88vh) !important;background:var(--th-panel-bg,#fff) !important;border:0 !important;border-radius:24px !important;box-shadow:0 0 0 100vmax rgba(0,0,0,.4),0 10px 40px rgba(0,0,0,.4) !important;z-index:9000 !important;overflow:hidden}
.cws-themed .plus-panel-head{flex-wrap:wrap;gap:14px 8px !important;padding:18px 22px 6px !important;border:0 !important}
.cws-themed .plus-panel-title{order:1;flex:1;font-size:18px !important;font-weight:700 !important;color:var(--th-text,#333) !important}
.cws-themed .plus-panel-close{order:2;width:34px !important;height:34px !important;font-size:22px;color:var(--th-text,#333) !important}
.cws-themed .plus-panel-close:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;color:var(--th-text,#333) !important}
.cws-themed .plus-panel-search{order:3;flex:1 0 100%}
.cws-themed .plus-panel-search i{color:var(--th-muted,#999) !important;left:14px !important;font-size:14px !important}
.cws-themed .plus-panel-search input{height:46px !important;padding:0 14px 0 38px !important;background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border:1px solid var(--th-border,#e6e6e6) !important;border-radius:10px !important;color:var(--th-text,#333) !important;font-size:16px !important}
.cws-themed .plus-panel-search input:focus{border-color:var(--th-accent,#03add8) !important;background:var(--th-panel-bg,#fff) !important}
.cws-themed .plus-panel-tabs{padding:8px 18px 0 !important}
.cws-themed .plus-panel-tab{color:var(--th-sub-text,#888) !important}
.cws-themed .plus-panel-tab.active{background:var(--th-selected,rgba(0,0,0,.09)) !important;color:var(--th-text,#333) !important}
.cws-themed .plus-panel-body{padding:10px 18px 18px !important}
.cws-themed .plus-panel-foot{background:var(--th-panel-bg,#fff);border-color:var(--th-border,#e6e6e6) !important;color:var(--th-muted,#999) !important}
.cws-themed .plus-panel-msg{color:var(--th-muted,#999) !important}
.cws-themed .ytp-list{display:grid !important;grid-template-columns:1fr 1fr;gap:6px !important}
.cws-themed .ytp-item{flex-direction:column;align-items:stretch !important;gap:0 !important;padding:8px !important;background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border:1px solid var(--th-border,#e6e6e6) !important;border-radius:10px !important;color:var(--th-text,#333) !important;min-width:0}
.cws-themed .ytp-item:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important}
.cws-themed .ytp-thumb{width:100% !important;border-radius:6px !important}
.cws-themed .ytp-meta{padding:8px 4px 2px}
.cws-themed .ytp-title{font-size:15px !important;font-weight:500 !important;color:var(--th-text,#333) !important}
.cws-themed .ytp-chan{color:var(--th-sub-text,#888) !important}
.cws-themed .ytp-send{display:none !important}
.cws-themed .ytp-label{color:var(--th-muted,#999) !important}
@media (max-width:520px){.cws-themed .ytp-list{grid-template-columns:1fr}}
.cws-themed .ytp-meta{display:block}.cws-themed .ytp-chan{display:block !important}

/* ── YouTube: chat thumbnail + player window (CodyChat) ── */
.cws-themed .embed-youtube{width:300px !important;border-radius:14px !important;margin:6px 0 !important}
.cws-themed .embed-yt-play{background:rgba(0,0,0,.12) !important}
.cws-themed .embed-youtube:hover .embed-yt-play{background:rgba(0,0,0,.28) !important}
.cws-themed .embed-yt-play i{width:76px !important;height:52px !important;border-radius:14px !important;background:#f00 !important;font-size:22px !important;box-shadow:none !important}
.cws-themed .cwsyt-backdrop{background:rgba(0,0,0,.18) !important;backdrop-filter:none !important}
.cws-themed .cwsyt{background:#000 !important;border:0 !important;border-radius:24px !important;box-shadow:0 10px 40px rgba(0,0,0,.45) !important}
.cws-themed .cwsyt-head{background:#1b1b1b !important;border:0 !important;height:44px !important;padding:0 10px !important}
.cws-themed .cwsyt.full{top:90px !important;transform:translateX(-50%) !important;width:min(94vw,840px) !important}
.cws-themed .cwsyt.full .cwsyt-head{height:60px !important;padding:0 24px !important;justify-content:flex-end;gap:14px !important}
.cws-themed .cwsyt.full .cwsyt-title,.cws-themed .cwsyt.full .cwsyt-logo,.cws-themed .cwsyt.full .cwsyt-ext,.cws-themed .cwsyt.full .cwsyt-play{display:none !important}
.cws-themed .cwsyt-btn{color:#fff !important;font-size:18px !important;width:34px !important;height:34px !important}
.cws-themed .cwsyt-btn:hover{background:rgba(255,255,255,.12) !important}
.cws-themed .cwsyt-close:hover{color:#fff !important}
.cws-themed .cwsyt.full .cwsyt-min i{font-size:0}
.cws-themed .cwsyt.full .cwsyt-min i::before{content:"";display:block;width:22px;height:3px;background:var(--th-panel-bg,#fff);border-radius:2px}
.cws-themed .cwsyt-title{color:#fff !important}
@media (max-width:768px){.cws-themed .cwsyt.full{top:60px !important;width:100vw !important;border-radius:0 !important;left:0 !important;transform:none !important}}

/* minimized YouTube = small round red icon on the footer bar, next to the hamburger (measured on CodyChat) */
.cws-themed .cwsyt.mini{left:auto !important;top:auto !important;right:var(--cl-yt,56px) !important;bottom:calc(7px + env(safe-area-inset-bottom,0px)) !important;width:24px !important;height:24px !important;border-radius:50% !important;background:#f00 !important;border:0 !important;box-shadow:none !important;overflow:hidden;cursor:pointer;z-index:1300}
.cws-themed .cwsyt.mini .cwsyt-head{display:none !important}
.cws-themed .cwsyt.mini .cwsyt-video{position:absolute;inset:0;opacity:0;pointer-events:none;aspect-ratio:auto}
.cws-themed .cwsyt.mini::after{content:"";position:absolute;left:50%;top:50%;transform:translate(-35%,-50%);border-left:9px solid #fff;border-top:6px solid transparent;border-bottom:6px solid transparent}

/* ── Friend-request + notification dropdowns: above the docked user list, light card ── */
.cws-themed #frPopup,.cws-themed #notifPopup{z-index:1200 !important;top:62px !important;right:10px !important;background:var(--th-panel-bg,#fff) !important;border:0 !important;border-radius:16px !important;box-shadow:0 6px 28px rgba(0,0,0,.28) !important;color:var(--th-text,#333)}
.cws-themed :is(#frPopup,#notifPopup)>div:first-child{border-bottom:1px solid var(--th-border,#e6e6e6) !important}
.cws-themed :is(#frPopup,#notifPopup) :is(span,div,p,b,strong,a,small){color:var(--th-text,#333) !important}
.cws-themed :is(#frPopup,#notifPopup) button[onclick*="Close"],.cws-themed :is(#frPopup,#notifPopup) button[onclick*="Close"] *{color:var(--th-text,#333) !important}
.cws-themed #notifPopup button[onclick*="MarkAllRead"]{color:var(--th-accent,#03add8) !important}
.cws-themed :is(#frPopupList,#notifPopupList)>*{border-color:var(--th-border,#e6e6e6) !important}
.cws-themed :is(#frPopupList,#notifPopupList)>*:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important}

/* ── Status marker on avatars: green circle with a white check, no dark border (CodyChat) ── */
.cws-themed :is(.rp-online-dot,.pm-online-dot,.friend-online-dot,.cws-top-dot){border:0 !important;border-radius:50% !important;background-color:transparent !important;background-repeat:no-repeat !important;background-size:100% 100% !important;width:18px !important;height:18px !important;left:-3px !important;right:auto !important;bottom:-3px !important;box-shadow:0 0 0 2px #fff}
.cws-themed .cws-top-dot{box-shadow:0 0 0 2px #222 !important}
.cws-themed :is(.rp-online-dot,.pm-online-dot,.friend-online-dot).online,.cws-themed .cws-top-dot{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%2374b20e'/%3E%3Cpath d='M6.5 12.5l3.7 3.7 7.3-7.6' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important}
.cws-themed body.cws-st-away .cws-top-dot{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23f59e0b'/%3E%3Cpath d='M12 6.5V12l3.8 2.2' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important}
.cws-themed body.cws-st-busy .cws-top-dot{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23ef4444'/%3E%3Cpath d='M6.5 12h11' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important}
.cws-themed body.cws-st-invisible .cws-top-dot{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%239a9a9a'/%3E%3Cpath d='M7 7l10 10M17 7L7 17' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;background-color:transparent !important}
.cws-themed :is(.rp-online-dot,.pm-online-dot,.friend-online-dot):not(.online){display:none !important}

/* YouTube window proportions measured on CodyChat: width ~53vw, header ~7% of width, 16:9 video, top = 2x topbar */
.cws-themed .cwsyt.full{width:clamp(340px,53vw,1100px) !important;top:112px !important;border-radius:20px !important}
.cws-themed .cwsyt.full .cwsyt-head{height:clamp(36px,3.76vw,72px) !important;padding:0 clamp(12px,1.6vw,28px) !important}
.cws-themed .cwsyt.full .cwsyt-btn{width:clamp(28px,2.4vw,40px) !important;height:clamp(28px,2.4vw,40px) !important;font-size:clamp(14px,1.4vw,22px) !important}
@media (max-width:768px){.cws-themed .cwsyt.full{width:100vw !important;top:60px !important;border-radius:0 !important}.cws-themed .cwsyt.full .cwsyt-head{height:44px !important}}

/* ── Audio / video uploads: compact pill with a play icon, basic light player modal (CodyChat) ── */
.cws-themed .embed-file{max-width:270px !important;padding:6px 16px 6px 6px !important;background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border:0 !important;border-radius:999px !important;gap:10px !important;color:var(--th-text,#333) !important;transform:none !important}
.cws-themed .embed-file:hover{background:var(--th-selected,rgba(0,0,0,.09)) !important;border:0 !important;transform:none !important}
.cws-themed .embed-file .ef-icon{width:38px !important;height:38px !important;border-radius:50% !important;background:var(--th-accent,#03add8) !important}
.cws-themed .embed-file--audio .ef-icon,.cws-themed .embed-file--video .ef-icon{background:var(--th-accent,#03add8) !important}
.cws-themed .embed-file--audio .ef-icon i,.cws-themed .embed-file--video .ef-icon i{display:none}
.cws-themed .embed-file--audio .ef-icon,.cws-themed .embed-file--video .ef-icon{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z' fill='white'/%3E%3C/svg%3E") !important;background-repeat:no-repeat !important;background-position:55% 50% !important;background-size:22px 22px !important}
.cws-themed .embed-file .ef-name{color:var(--th-text,#333) !important;font-size:14px !important;font-weight:600 !important}
.cws-themed .embed-file .ef-sub{color:var(--th-muted,#999) !important;font-size:11px !important}
.cws-themed .embed-file .ef-sub b{color:var(--th-muted,#999) !important}
.cws-themed .embed-file--audio .ef-act,.cws-themed .embed-file--video .ef-act{display:none !important}
.cws-themed .ipl-backdrop{background:rgba(0,0,0,.4) !important;backdrop-filter:none !important}
.cws-themed .ipl-card{background:var(--th-panel-bg,#fff) !important;border:0 !important;border-radius:24px !important;box-shadow:0 10px 40px rgba(0,0,0,.35) !important;padding:0 0 22px !important;max-width:460px !important;color:var(--th-text,#333) !important;overflow:hidden}
.cws-themed .ipl-video .ipl-card{max-width:720px !important}
.cws-themed .ipl-head{margin:0 !important;padding:18px 22px 10px !important}
.cws-themed .ipl-badge{display:none !important}
.cws-themed .ipl-title{color:var(--th-text,#333) !important;font-size:18px !important;font-weight:700 !important}
.cws-themed .ipl-btn{background:none !important;color:var(--th-text,#333) !important}
.cws-themed .ipl-btn:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;color:var(--th-text,#333) !important}
.cws-themed .ipl-audio .ipl-stage,.cws-themed .ipl-audio .ipl-disc,.cws-themed .ipl-audio .ipl-eq{display:none !important}
.cws-themed .ipl-video .ipl-stage{padding:0 22px;margin:4px 0 0 !important}
.cws-themed .ipl-screen video{border-radius:12px !important}
.cws-themed .ipl-seekrow{padding:14px 22px 0 !important;color:var(--th-sub-text,#888) !important}
.cws-themed .ipl-seek{background:linear-gradient(90deg,var(--th-accent,#03add8) var(--p),var(--th-selected,rgba(0,0,0,.09)) var(--p)) !important}
.cws-themed .ipl-seek::-webkit-slider-thumb{background:var(--th-accent,#03add8) !important}
.cws-themed .ipl-seek::-moz-range-thumb{background:var(--th-accent,#03add8) !important}
.cws-themed .ipl-back,.cws-themed .ipl-fwd,.cws-themed .ipl-vol,.cws-themed .ipl-dl{display:none !important}
.cws-themed .ipl-ctrl{margin-top:10px !important}
.cws-themed .ipl-play{background:var(--th-accent,#03add8) !important;color:#fff !important;box-shadow:none !important;width:50px !important;height:50px !important}
.cws-themed .ipl-play:hover{background:var(--th-accent,#03add8) !important}

/* ── Private chat (CodyChat): dark 60px header, white body, grey bubbles, plain-icon input ── */
.cws-themed #pmBox,.cws-themed .pm-box{width:600px !important;max-width:calc(100vw - 16px) !important;border:0 !important;border-radius:0 !important;box-shadow:0 4px 24px rgba(0,0,0,.3) !important}
.cws-themed .pm-box-header,.cws-themed #pmBoxHeader{height:60px !important;padding:0 14px !important;background:var(--th-header-bg,#222) !important}
.cws-themed .pmx-av-wrap{flex:0 0 46px !important;width:46px !important;height:46px !important}
.cws-themed .pmx-av{width:46px !important;height:46px !important}
.cws-themed .pm-box-user{gap:12px !important}
.cws-themed .pm-box-name{font-size:19px !important;font-weight:400 !important;color:#fff !important}
.cws-themed .pm-box-status,.cws-themed .pmx-av-wrap .pm-status-dot{display:none !important}
.cws-themed .pm-box-header .pm-ctrl-btn{width:38px !important;height:38px !important;font-size:19px !important;color:#fff !important;background:none !important}
.cws-themed .pm-box-header .pm-ctrl-btn:hover{color:var(--th-accent,#03add8) !important}
.cws-themed .pm-messages{background:var(--th-panel-bg,#fff) !important}
.cws-themed .pm-msg-text{font-size:16px !important;padding:10px 14px !important;border-radius:16px !important}
.cws-themed .pm-msg-meta{font-size:12px !important;color:var(--th-muted,#999) !important}
.cws-themed .pm-box-input,.cws-themed #pmInputRow{padding:8px 14px !important;gap:8px !important;background:var(--th-panel-bg,#fff) !important;border-top:1px solid var(--th-border,#e6e6e6) !important;align-items:center}
.cws-themed .pm-tool-btn{background:none !important;color:var(--th-sub-text,#888) !important;font-size:20px !important;width:34px !important;height:34px !important}
.cws-themed .pm-input-field{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border:1px solid var(--th-border,#e6e6e6) !important;border-radius:20px !important;color:var(--th-text,#333) !important;font-size:17px !important;padding:8px 16px !important}
.cws-themed .pm-input-field:focus{border-color:var(--th-accent,#03add8) !important}
.cws-themed .pm-input-field::placeholder{color:var(--th-muted,#999) !important}
.cws-themed .pm-send-btn{background:none !important;color:var(--th-text,#333) !important;width:38px !important;height:38px !important;font-size:22px !important;box-shadow:none !important}
.cws-themed .pm-send-btn:hover{color:var(--th-accent,#03add8) !important;background:none !important}

/* ── Private inbox ("Privada"): dropdown card under the top bar, plain icons ── */
.cws-themed #pmInboxPanel,.cws-themed .pm-inbox-panel{top:62px !important;bottom:auto !important;right:10px !important;left:auto !important;width:380px !important;max-width:calc(100vw - 20px) !important;max-height:calc(100vh - 90px) !important;background:var(--th-panel-bg,#fff) !important;border:0 !important;border-radius:16px !important;box-shadow:0 6px 28px rgba(0,0,0,.28) !important;z-index:1250 !important}
.cws-themed .pm-inbox-header{background:var(--th-panel-bg,#fff) !important;border-bottom:1px solid var(--th-border,#e6e6e6) !important;padding:16px 20px !important}
.cws-themed .pm-inbox-title{font-size:19px !important;font-weight:700 !important;color:var(--th-text,#333) !important;gap:0 !important}
.cws-themed .pm-inbox-title>i{display:none !important}
.cws-themed .pm-inbox-panel .pm-close-btn,.cws-themed #pmInboxPanel .pm-close-btn{background:none !important;color:var(--th-text,#333) !important;font-size:19px !important}
.cws-themed #pmInboxPanel .pm-close-btn:hover{color:var(--th-accent,#03add8) !important;background:none !important}
.cws-themed .pm-inbox-search{padding:10px 16px !important}
.cws-themed .pm-search-input{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border:1px solid var(--th-border,#e6e6e6) !important;color:var(--th-text,#333) !important;border-radius:10px !important}
.cws-themed .pmRow{border-color:var(--th-border,#e6e6e6) !important;padding:12px 20px !important;background:none !important}
.cws-themed .pmRow:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important}
.cws-themed .pmRow.unread{background:var(--th-item-bg,rgba(0,0,0,.05)) !important}
.cws-themed .pm-avatar-wrap img,.cws-themed .pmAvatar{width:52px !important;height:52px !important;min-width:52px !important;max-width:52px !important}
.cws-themed .pmName,.cws-themed .pmName *{color:var(--th-text,#333) !important}
.cws-themed .pmInfo{color:var(--th-sub-text,#888) !important}
.cws-themed .pm-empty{color:var(--th-muted,#999) !important}

/* ── private chat v2 (needs pms.js + pms_box.php from this build) ── */
.cws-themed .pm-box-name::before{content:'@'}
.cws-themed .pm-box-controls{gap:4px !important;align-items:center}
.cws-themed .pm-ctrl-btn{font-size:16px !important;color:#fff !important;padding:6px 8px !important;opacity:.9}
.cws-themed .pm-ctrl-btn:hover{background:rgba(255,255,255,.12) !important;opacity:1}
.cws-themed #pmBox.pmx-full{width:calc(100vw - 16px) !important;height:calc(100vh - 110px) !important;right:8px !important}
.cws-themed .pm-messages,.cws-themed #pmMessages{background:var(--th-panel-bg,#fff) !important;padding:14px 16px !important;gap:14px !important}
.cws-themed .pm-msg{max-width:78% !important}
.cws-themed .pm-msg-text{padding:9px 14px !important;font-size:14px !important;line-height:1.45 !important;border-radius:16px !important}
.cws-themed .pm-msg.mine .pm-msg-text,.cws-themed .pm-msg.theirs .pm-msg-text{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;color:var(--th-text,#333) !important;box-shadow:none !important}
.cws-themed .pmx-bubble-row{align-items:flex-end !important;gap:8px !important}
.cws-themed .pmx-mine-av{width:26px;height:26px;border-radius:50%;object-fit:cover;order:3;flex:0 0 26px}
.cws-themed .pm-msg.mine .pmx-bubble-row{flex-direction:row}
.cws-themed .pm-msg-meta{font-size:11px !important;color:var(--th-muted,#999) !important;margin-top:4px !important}
.cws-themed .pm-box-input{padding:10px 12px !important;gap:8px !important;align-items:center !important;background:var(--th-panel-bg,#fff) !important}
.cws-themed .pm-tool-btn{width:34px !important;height:34px !important;background:none !important;border:0 !important;color:var(--th-sub-text,#888) !important;font-size:18px !important;border-radius:50% !important}
.cws-themed .pm-send-btn{width:38px !important;height:38px !important;background:var(--th-header-bg,#222) !important;color:#fff !important;border-radius:50% !important;font-size:15px !important}
.cws-themed .pm-send-btn:hover{background:var(--th-accent,#03add8) !important}
/* inbox */
.cws-themed .pm-inbox-header{background:var(--th-panel-bg,#fff) !important;border:0 !important;padding:16px 18px 8px !important}
.cws-themed .pm-inbox-title{font-size:20px !important;font-weight:700 !important;color:var(--th-text,#333) !important}
.cws-themed .pm-inbox-header .pm-close-btn{color:var(--th-text,#333) !important;font-size:18px !important;padding:6px 8px !important}
.cws-themed .pm-inbox-header .pm-close-btn:hover{color:var(--th-accent,#03add8) !important;background:none !important}
.cws-themed .pm-inbox-search{display:none !important}
.cws-themed .pmRow{padding:10px 18px !important;min-height:0 !important;background:var(--th-panel-bg,#fff) !important;border:0 !important;gap:12px}
.cws-themed .pmRow:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important}
.cws-themed .pmRow .pmx-name{font-size:15px;font-weight:600;color:var(--th-accent,#03add8) !important}
.cws-themed .pmRow .pmPreview,.cws-themed .pmx-time{color:var(--th-muted,#999) !important}
.cws-themed .pmRow .pm-unread-badge{background:#e53935 !important;color:#fff !important;min-width:22px;height:22px;border-radius:11px;font-size:12px;line-height:22px;text-align:center;padding:0 6px;right:48px}
.cws-themed .pmx-row-x{opacity:1 !important;color:var(--th-sub-text,#888) !important;background:none !important}
.cws-themed .pmx-row-x:hover{color:#e53935 !important}

/* ── emoji picker v2: wide + short like CodyChat (14 per row, X at right) ── */
.cws-themed .emo-panel{width:min(800px,calc(100vw - 16px)) !important;max-height:none !important;height:auto !important;border-radius:16px !important;display:flex;flex-direction:column}
.cws-themed .emo-panel.hidden{display:none !important}
.cws-themed .emo-panel-tabs{align-items:center;height:60px;overflow:hidden !important;flex:0 0 auto}
.cws-themed .emo-tab{width:60px !important;height:60px !important;padding:14px !important;flex:0 0 60px}
.cws-themed .emo-close{margin-left:auto;width:60px;height:60px;border:0;background:none;color:var(--th-text,#333);font-size:22px;cursor:pointer;flex:0 0 60px}
.cws-themed .emo-close:hover{color:var(--th-accent,#03add8)}
.cws-themed .emo-panel-grid{display:grid !important;grid-template-columns:repeat(auto-fill,minmax(51px,1fr));padding:8px 14px 12px !important;max-height:290px;overflow-y:auto;align-content:start;scrollbar-width:thin}
.cws-themed .emo-item{width:auto !important;height:51px !important}
.cws-themed .emo-item img{max-width:36px !important;max-height:36px !important}
.cws-themed .emo-item-large{height:80px !important}
.cws-themed .emo-item-large img{max-width:64px !important;max-height:64px !important}
@media (max-width:900px){.cws-themed .emo-panel{max-height:none !important}.cws-themed .emo-panel-grid{max-height:min(38vh,260px)}}
/* stacking: youtube below the private windows */
.cws-themed .cwsyt.mini,.cws-themed .cwsyt.bar{z-index:1120 !important}
/* pm input row: fixed-height pill, send button always visible */
.cws-themed #pmInput,.cws-themed .pm-input-field{min-width:0 !important;min-height:40px !important;height:40px !important;max-height:120px !important;padding:9px 16px !important;line-height:20px !important;border-radius:20px !important}
.cws-themed .pm-send-btn{flex:0 0 38px !important;display:flex !important;align-items:center;justify-content:center}
.cws-themed .pmx-mine-av{width:26px !important;height:26px !important}

/* ── minimized things live in the footer as small circles (YouTube, audio/video player, private chats) ──
   slots, counted from the right edge of the chat column: YouTube 46px · player 78px · private chats 110px → */
:root{--cl-tray:0px}
.cws-themed .ipl.ipl-mini{inset:auto var(--cl-ipl,56px) calc(7px + env(safe-area-inset-bottom,0px)) auto !important;width:24px !important;height:24px !important;padding:0 !important;z-index:1120 !important}
.cws-themed .ipl.ipl-mini .ipl-card{display:block !important;position:relative;width:24px !important;height:24px !important;min-height:0 !important;padding:0 !important;border-radius:50% !important;background:var(--th-accent,#03add8) !important;box-shadow:none !important;border:0 !important;cursor:pointer;overflow:visible !important}
.cws-themed .ipl.ipl-mini .ipl-head,.cws-themed .ipl.ipl-mini .ipl-seekrow,.cws-themed .ipl.ipl-mini .ipl-ctrl,.cws-themed .ipl.ipl-mini .ipl-disc,.cws-themed .ipl.ipl-mini .ipl-eq{display:none !important}
.cws-themed .ipl.ipl-mini .ipl-stage{position:absolute !important;inset:0;width:24px;height:24px;min-height:0 !important;margin:0 !important;padding:0 !important;opacity:0;pointer-events:none;overflow:hidden;display:block !important}
.cws-themed .ipl.ipl-mini .ipl-screen{display:block !important;width:24px;height:24px}
.cws-themed .ipl.ipl-mini .ipl-screen video{width:24px;height:24px}
.cws-themed .ipl.ipl-mini .ipl-card::after{content:"";position:absolute;inset:0;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'><path d='M9 3v11.3A3.5 3.5 0 1 0 11 17.5V7h7V3z'/></svg>") center/12px no-repeat}
.cws-themed .ipl.ipl-mini.ipl-playing .ipl-card{animation:iplRing 1.6s ease-out infinite}
@keyframes iplRing{0%{box-shadow:0 0 0 0 rgba(3,173,216,.55)}100%{box-shadow:0 0 0 8px rgba(3,173,216,0)}}
.cws-themed .ipl-video .ipl-min{display:inline-grid !important}
.cws-themed .pm-dock{left:auto !important;top:auto !important;right:var(--cl-pm,56px) !important;bottom:calc(7px + env(safe-area-inset-bottom,0px)) !important;flex-direction:row-reverse !important;gap:8px !important;z-index:1120 !important}
.cws-themed .pm-dock-chip{width:24px !important;height:24px !important;border:0 !important;box-shadow:none !important;background:var(--th-item-bg,rgba(0,0,0,.05)) !important}
.cws-themed .pm-dock-chip:hover{transform:scale(1.12)}
.cws-themed .pm-dock-chip.has-unread{box-shadow:0 0 0 2px #e53935 !important}
.cws-themed .pm-dock-dot{width:7px !important;height:7px !important;right:-1px !important;bottom:-1px !important;border:0 !important}
.cws-themed .pm-dock-badge{min-width:15px !important;height:15px !important;font-size:9px !important;line-height:15px !important;padding:0 3px !important;top:-7px !important;left:-7px !important;background:#e53935 !important;color:#fff !important}
.cws-themed .pm-dock-name,.cws-themed .pm-dock-x{display:none !important}

/* ── private chat v3: compact window like CodyChat; minimized = avatar circle in footer; maximized = docked column ── */
.cws-themed #pmBox,.cws-themed .pm-box{width:500px !important;height:500px !important;max-width:calc(100vw - 16px) !important;max-height:calc(100vh - var(--footer-h,38px) - 70px) !important;border-radius:2px !important}
@media (min-width:768px){.cws-themed #pmBox{bottom:calc(var(--footer-h,38px) + 10px)}}
.cws-themed .pm-box-header,.cws-themed #pmBoxHeader{height:50px !important;padding:0 10px 0 12px !important}
.cws-themed .pmx-av-wrap{flex:0 0 38px !important;width:38px !important;height:38px !important}
.cws-themed .pmx-av{width:38px !important;height:38px !important}
.cws-themed .pm-box-name::before{content:none !important}
.cws-themed .pm-box-name{font-size:17px !important}
.cws-themed .pm-box-user{gap:12px !important}
.cws-themed .pm-ctrl-btn{font-size:15px !important;padding:6px 9px !important}
.cws-themed .pm-ctrl-btn.close{width:28px !important;height:28px !important;padding:0 !important;margin-left:6px;border-radius:50% !important;background:#ef4f6c !important;border:2px solid #fff !important;color:#fff !important;font-size:12px !important;display:inline-flex;align-items:center;justify-content:center;opacity:1 !important}
.cws-themed .pm-ctrl-btn.close:hover{background:#d9304f !important}
.cws-themed .pm-messages,.cws-themed #pmMessages{padding:12px 14px !important;gap:12px !important}
.cws-themed .pmx-mine-av{width:32px !important;height:32px !important;flex:0 0 32px}
.cws-themed .pm-msg-text{font-size:15px !important;padding:10px 16px !important;border-radius:18px !important}
.cws-themed .pm-msg-meta{font-size:12px !important}
.cws-themed .pmx-seen{font-size:0 !important}
.cws-themed .pmx-seen i{font-size:13px !important;color:#2196f3 !important}
.cws-themed .pm-box-input{padding:8px 12px !important}
/* maximized: a full-height column beside the users panel */
.cws-themed #pmBox.pmx-full{position:fixed !important;top:56px !important;bottom:var(--footer-h,38px) !important;left:auto !important;right:0 !important;width:clamp(380px,30vw,560px) !important;height:auto !important;max-height:none !important;max-width:100vw !important;border-radius:0 !important;border:0 !important;border-left:1px solid var(--th-border,#e6e6e6) !important;box-shadow:none !important;transform:none !important}
body.rpanel-open .cws-themed #pmBox.pmx-full,.cws-themed body.rpanel-open #pmBox.pmx-full{right:var(--rpanel-w,320px) !important}
@media (max-width:767px){.cws-themed #pmBox.pmx-full{top:0 !important;bottom:0 !important;width:100vw !important;border-left:0 !important}}
/* minimized private chat = round avatar in the footer */
.cws-themed .pm-dock{bottom:calc(4px + env(safe-area-inset-bottom,0px)) !important}
.cws-themed .pm-dock-chip{width:30px !important;height:30px !important;border:2px solid #fff !important}
.cws-themed .pm-dock-dot{width:9px !important;height:9px !important;border:1.5px solid #fff !important}

/* ── reply / quote card: grey rounded box, avatar left, name + text (or picture) to its right ── */
.cws-themed .msg-quote{display:flex !important;align-items:flex-start !important;gap:12px !important;width:fit-content;max-width:min(100%,430px) !important;margin:2px 0 8px !important;padding:10px 16px 10px 12px !important;border:0 !important;border-left:0 !important;border-radius:14px !important;background:var(--th-selected,rgba(0,0,0,.08)) !important;cursor:pointer}
.cws-themed .msg-quote:hover{background:var(--th-selected,rgba(0,0,0,.11)) !important;filter:brightness(.97)}
.cws-themed .msg-quote-avatar{width:36px !important;height:36px !important;flex:0 0 36px !important;border-radius:50% !important;object-fit:cover}
.cws-themed .msg-quote-body{flex:1 1 auto !important;min-width:0}
.cws-themed .msg-quote-name{font-size:14px !important;font-weight:700 !important;line-height:1.3;color:var(--th-text,#333) !important}
.cws-themed .msg-quote-text{font-size:17px !important;line-height:1.35;color:var(--th-text,#333) !important;opacity:.85 !important;white-space:normal !important;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;word-break:break-word}
.cws-themed .msg-quote-thumb{display:block;width:210px !important;max-width:100%;height:auto !important;aspect-ratio:16/9;margin-top:6px;border-radius:10px !important;object-fit:cover}
.cws-themed .msg-quote.quote-highlight{background:var(--th-accent,#03add8) !important;opacity:.85}

/* ── private chat v4: the three CodyChat modes ──
   box  = 400px window above the footer · panel = 360px column that shrinks the room (>800px) · phones: full-width box / full screen between header and footer */
:root{--pm-w:360px}
.cws-themed #pmBox,.cws-themed .pm-box{width:400px !important;height:430px !important}
.cws-themed #pmBox.pmx-full{top:56px !important;bottom:var(--footer-h,38px) !important;width:var(--pm-w) !important;height:auto !important;right:0 !important;border-radius:0 !important}
body.rpanel-open .cws-themed #pmBox.pmx-full,.cws-themed body.rpanel-open #pmBox.pmx-full,body.rpanel-open #pmBox.pmx-full{right:var(--rpanel-w,320px) !important}
body.pm-docked .layout-shell{margin-right:var(--pm-w) !important}
body.pm-docked.rpanel-open .layout-shell{margin-right:calc(var(--rpanel-w,320px) + var(--pm-w)) !important}
@media (max-width:800px){
  .cws-themed #pmBox,.cws-themed .pm-box{left:0 !important;right:0 !important;width:100vw !important;max-width:100vw !important;height:400px !important;bottom:var(--footer-h,38px) !important;border-radius:0 !important}
  .cws-themed #pmBox.pmx-full,body.rpanel-open .cws-themed #pmBox.pmx-full,body.rpanel-open #pmBox.pmx-full{top:56px !important;bottom:var(--footer-h,38px) !important;left:0 !important;right:0 !important;width:100vw !important;height:auto !important;max-height:none !important;border:0 !important}
  body.pm-docked .layout-shell{margin-right:0 !important}
}

/* ── private chat input row like CodyChat: [photo] [+] [emoji] (field) [mic] (send) · their avatar beside their bubbles ── */
.cws-themed .pmx-their-av{order:0 !important;flex:0 0 32px;width:32px !important;height:32px !important;margin-right:2px}
.cws-themed .pm-msg.theirs .pmx-bubble-row{flex-direction:row !important}
.cws-themed .pm-box-input{gap:4px !important;position:relative}
.cws-themed .pm-box-input .pm-tool-btn{flex:0 0 34px;display:inline-flex !important;align-items:center;justify-content:center}
.cws-themed #pmMicBtn:hover,.cws-themed #pmEmoBtn:hover{color:var(--th-accent,#03add8) !important}
.cws-themed .pm-box-input .pm-input-field{flex:1 1 auto}
.cws-themed .pm-audio audio{width:min(240px,100%);height:36px;display:block}
.cws-themed .pm-msg.pm-msg-media .pm-msg-text{background:none !important;padding:0 !important}
.cws-themed .pm-msg.pm-msg-media .pm-audio{background:var(--th-item-bg,rgba(0,0,0,.05));border-radius:18px;padding:4px 6px}
/* emoji picker opened from the private chat: same look as the room's (big tabs, X, 51px cells), docked on top of the private window's input */
.cws-themed .emo-panel.emo-for-pm{max-width:calc(100vw - 16px) !important;border-radius:14px !important;box-shadow:0 8px 28px rgba(0,0,0,.28);background:var(--th-panel-bg,#fff) !important}
.cws-themed .emo-panel.emo-for-pm .emo-panel-grid{grid-template-columns:repeat(auto-fill,minmax(51px,1fr));max-height:min(290px,42vh)}

/* phone mode (<=800px): users list is an overlay opened from the footer menu, never docked */
@media (max-width:800px){
  body.rpanel-open .layout-shell{margin-right:0 !important}
  .cws-themed #rpanel{z-index:1050;box-shadow:-6px 0 24px rgba(0,0,0,.25);max-width:88vw}
  body.rpanel-open.pm-docked .layout-shell{margin-right:0 !important}
}

/* private chat input bar = same metrics as the room's message bar */
.cws-themed .pm-box-input{padding:6px 10px !important;gap:6px !important;min-height:0 !important;background:var(--th-panel-bg,#fff) !important;border-top:1px solid var(--th-border,#e6e6e6) !important;align-items:center !important}
.cws-themed .pm-box-input .pm-tool-btn{width:30px !important;height:30px !important;flex:0 0 30px !important;font-size:17px !important;padding:0 !important}
.cws-themed #pmInput,.cws-themed .pm-input-field{height:34px !important;min-height:34px !important;max-height:120px !important;padding:7px 14px !important;font-size:14px !important;line-height:20px !important;border-radius:18px !important;border:1px solid var(--th-border,#e6e6e6) !important;background:var(--th-item-bg,rgba(0,0,0,.05)) !important;box-shadow:none !important}
.cws-themed .pm-send-btn{width:34px !important;height:34px !important;flex:0 0 34px !important;font-size:15px !important}
/* voice/audio card inside a private bubble — same card as the room */
.cws-themed .pm-audio{background:none !important;padding:0 !important;min-width:210px}
.cws-themed .pm-audio .embed-block{margin:0}
.cws-themed .pm-msg.pm-msg-media .pm-audio{background:none !important;padding:0 !important}

/* your own name in a message: blue glow (room + private) */
.cws-themed .mention.mention-self,.cws-themed .pm-mention-me{background:var(--th-accent,#03add8) !important;color:#fff !important;border-radius:10px;padding:1px 7px !important;font-weight:700;box-shadow:0 0 0 2px rgba(3,173,216,.25)}

/* ── final pass: private bar is as slim as the room's; the room's Send is the dark round one from the private chat ── */
.cws-themed .pm-box-input{height:auto !important;min-height:0 !important;padding:8px 10px !important;gap:6px !important;align-items:center !important}
.cws-themed .pm-box-input #pmInput{box-sizing:border-box !important;height:38px !important;min-height:38px !important;max-height:38px !important;padding:0 16px !important;line-height:36px !important;font-size:14px !important;border-radius:19px !important;overflow:hidden !important;resize:none !important;flex:1 1 auto !important;width:auto !important;margin:0 !important}
.cws-themed .pm-box-input #pmInput::placeholder{line-height:36px}
.cws-themed .pm-box-input .pm-tool-btn{width:30px !important;height:30px !important;flex:0 0 30px !important;font-size:18px !important;color:var(--th-sub-text,#888) !important}
.cws-themed .pm-box-input .pm-send-btn,.cws-themed .chat-input .send-btn,.cws-themed #sendBtn{width:38px !important;height:38px !important;min-width:38px !important;flex:0 0 38px !important;border-radius:50% !important;background:var(--th-header-bg,#222) !important;color:#fff !important;border:0 !important;box-shadow:none !important;display:inline-flex !important;align-items:center;justify-content:center;font-size:15px !important;padding:0 !important}
.cws-themed .chat-input .send-btn:hover,.cws-themed #sendBtn:hover{background:var(--th-accent,#03add8) !important;color:#fff !important}

/* audio/video player opened from a private chat sits ABOVE the private window */
.cws-themed #cwsPlayer.ipl:not(.ipl-mini),#cwsPlayer.ipl.ipl-open:not(.ipl-mini){z-index:2147483100 !important}

/* audio player: no modal — a floating card near the top so you can keep chatting while it plays */
.cws-themed #cwsPlayer.ipl:not(.ipl-video):not(.ipl-mini){pointer-events:none !important;align-items:flex-start !important;justify-content:center !important;padding:66px 12px 0 !important}
.cws-themed #cwsPlayer.ipl:not(.ipl-video):not(.ipl-mini) .ipl-backdrop{display:none !important}
.cws-themed #cwsPlayer.ipl:not(.ipl-video):not(.ipl-mini) .ipl-card{pointer-events:auto !important;box-shadow:0 10px 34px rgba(0,0,0,.28) !important;max-width:360px}
/* audio player v2: pinned right under the top bar, nothing around it blocks the page */
html body #cwsPlayer.ipl.ipl-audio.ipl-open:not(.ipl-mini){pointer-events:none !important;background:none !important;align-items:flex-start !important;justify-content:center !important;padding:54px 12px 0 !important}
html body #cwsPlayer.ipl.ipl-audio.ipl-open:not(.ipl-mini) .ipl-backdrop{display:none !important;pointer-events:none !important}
html body #cwsPlayer.ipl.ipl-audio.ipl-open:not(.ipl-mini) .ipl-card{pointer-events:auto !important;max-width:340px !important;padding:12px 16px 14px !important;border-radius:16px !important;box-shadow:0 8px 28px rgba(0,0,0,.3) !important}
.cws-themed #cwsPlayer.ipl.ipl-audio:not(.ipl-mini) .ipl-head{cursor:grab;user-select:none}
.cws-themed #cwsPlayer.ipl.ipl-mini .ipl-card{translate:none !important}
.cws-themed .emo-panel.emo-for-pm .emo-panel-tabs{height:60px}
.cws-themed .emo-panel.emo-for-pm .emo-tab,.cws-themed .emo-panel.emo-for-pm .emo-close{width:60px !important;height:60px !important;flex:0 0 60px;padding:14px !important}

/* top-bar dropdowns (notifications, friend requests, avatar/hamburger menus) always open above private chat windows,
   whose z-index grows with every click (js/layer_stack.js) */
.menu-backdrop{z-index:2147480000 !important}
.float-menu,#frPopup,#notifPopup{z-index:2147480010 !important}

/* ── stacking order: private windows are the LOWEST floating layer ──
   every modal / box / lightbox / video / popup is above them (js/layer_stack.js keeps the private windows in a low band) */
#profileViewBox,#userInfoPopup,.alertBox,.giftBox,.warnBox,.popup,.modalBox,.element-box,.mlb-overlay,.cws-pw,.user-card-compact,.profile-modal-overlay,#cwsUserCard,#cwsBlockOverlay,.profileBox,#staffBox,#staffSubBox,.pe-overlay,#editProfileOverlay,#mpOverlay,#roomCreatePopup,#_cwsReportDlg{z-index:1000000}
#staffSubBox{z-index:1000010}
.cwsyt-backdrop,.cws-themed .cwsyt-backdrop{z-index:1000050 !important}
.cwsyt,.cws-themed .cwsyt,.cws-themed .cwsyt.full,.cws-themed .cwsyt.mini,.cws-themed .cwsyt.bar{z-index:1000060 !important}

/* ===== Language switch (CodyChat-style 300px modal) ===== */
.cws-lang-overlay{position:fixed;inset:0;z-index:1000100;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center}
.cws-lang-modal{width:300px;max-width:92vw;max-height:80vh;display:flex;flex-direction:column;background:var(--bg-card,#fff);color:var(--text,#222);border-radius:10px;overflow:hidden;box-shadow:0 10px 40px rgba(0,0,0,.35)}
.cws-lang-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;font-weight:600;border-bottom:1px solid rgba(128,128,128,.25)}
.cws-lang-x{background:none;border:0;color:inherit;font-size:22px;line-height:1;cursor:pointer}
.cws-lang-list{overflow:auto}
.cws-lang-row{display:flex;align-items:center;gap:12px;padding:10px 16px;cursor:pointer}
.cws-lang-row:hover{background:rgba(128,128,128,.14)}
.cws-lang-row.active{font-weight:600}
.cws-lang-flag img{width:28px;height:20px;object-fit:cover;border-radius:3px;display:block}
.cws-lang-name{flex:1}

/* ===== CodyChat header icons + avatar menu (measured on the live demo) ===== */
/* top bar: 50px high, 40x50 icon cells, 20px icons, plain 11px red dot, 36px round avatar with 12px status at bottom-left */
.cws-themed .topbar{box-sizing:border-box;height:50px !important;min-height:50px;padding:0 5px !important}
.cws-themed .topbar-left,.cws-themed .topbar-right{gap:0 !important}
.cws-themed .topbar .hamburger-btn,.cws-themed .topbar .topbar-icon-btn{width:40px !important;height:50px !important;border-radius:0 !important;margin:0 !important;font-size:20px !important;background:transparent}
.cws-themed .topbar .topbar-icon-btn i,.cws-themed .topbar .hamburger-btn i{font-size:20px}
.cws-themed .topbar .brand{margin-left:10px}
.cws-themed .topbar .topbar-badge{position:absolute !important;left:6px !important;top:16px !important;right:auto !important;width:11px !important;height:11px !important;min-width:11px !important;padding:0 !important;border:0 !important;border-radius:50px !important;background:#f00 !important;font-size:0 !important;line-height:0 !important;color:transparent !important;overflow:hidden}
.cws-themed .avatar-btn-wrapper{width:50px;height:50px}
.cws-themed .top-avatar-btn{width:50px !important;height:50px !important;position:relative;justify-content:center}
.cws-themed .top-avatar-img{width:36px !important;height:36px !important;border:0 !important;border-radius:50% !important}
.cws-themed .cws-top-dot{left:6px !important;right:auto !important;bottom:8px !important;width:12px !important;height:12px !important;box-shadow:none !important;border:0 !important}

/* avatar menu card: 300px, radius 10, soft shadow, 55px from top / 5px from right */
.cws-themed .avatar-menu{width:300px !important;min-width:0 !important;max-width:calc(100% - 10px) !important;border-radius:10px !important;box-shadow:0 1px 3px rgba(0,0,0,.2) !important;padding:0 !important;overflow:hidden auto !important;font-size:14px}
@media (min-width:601px){.cws-themed .float-menu.avatar-menu{top:55px !important;right:5px !important;left:auto !important}}
.cws-themed .avatar-menu .menu-header{padding:15px !important;gap:10px !important;align-items:center;border-bottom:1px solid rgba(0,0,0,.08) !important;background:transparent !important}
.cws-themed .avatar-menu .menu-avatar{width:40px !important;height:40px !important;border-radius:8px !important}
.cws-themed .avatar-menu .menu-user-info{display:flex;flex-direction:column;min-width:0;flex:1}
.cws-themed .avatar-menu .menu-user-rank{order:0;font-size:11px !important;line-height:1.25;color:var(--th-text,#333) !important;display:flex;align-items:center;gap:3px}
.cws-themed .avatar-menu .menu-user-rank .menuranking{height:11px;width:auto}
.cws-themed .avatar-menu .menu-username{order:1;font-size:16px !important;font-weight:700 !important;line-height:1.17;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cws-themed .avatar-menu .menu-edit-link{order:2;font-size:11px !important;color:#888 !important;margin:0 !important}
.cws-themed .avatar-menu .cws-status-head{width:36px;height:45px;font-size:18px;margin-left:auto}
.cws-themed .avatar-menu .menu-section{padding:10px !important;margin:0 !important;border:0 !important}
.cws-themed .avatar-menu .menu-section.am-top{padding:0 10px 10px !important;border-bottom:1px solid rgba(0,0,0,.08) !important;margin-top:10px !important}
.cws-themed .avatar-menu .menu-section.am-bottom{padding:10px 10px 0 !important;margin-bottom:10px !important}
.cws-themed .avatar-menu .menu-item{display:flex;align-items:center;padding:12px 10px !important;gap:0 !important;border-radius:5px !important;font-size:14px !important;color:var(--th-text,#333) !important;line-height:normal}
.cws-themed .avatar-menu .menu-item > i{width:30px;flex:none;text-align:left;font-size:16px !important;line-height:16px;color:var(--th-accent,#03add8) !important}
.cws-themed .avatar-menu .menu-item > span:not(.menu-badge){flex:1;padding:0 5px}
.cws-themed .avatar-menu .menu-item .am-arrow{font-style:normal;width:20px;flex:none;text-align:center}
.cws-themed .avatar-menu .menu-item .am-arrow i{width:auto;font-size:14px !important;color:var(--th-text,#333) !important}
.cws-themed .avatar-menu .menu-item:hover{background:rgba(0,0,0,.05) !important}
.cws-themed .avatar-menu .menu-item.danger,.cws-themed .avatar-menu .menu-item.danger > i{color:inherit}
.cws-themed .avatar-menu .menu-item.danger > i{color:var(--th-accent,#03add8) !important}
/* sub-menu panel (Configuraciones) */
.avatar-menu .am-sub{display:none}
.avatar-menu.am-sub-open > :not(.am-sub){display:none !important}
.avatar-menu.am-sub-open > .am-sub{display:block}
.cws-themed .avatar-menu .am-sub-top{display:flex;align-items:center;padding:5px 10px;border-bottom:1px solid rgba(0,0,0,.08);min-height:50px}
.cws-themed .avatar-menu .am-back{width:40px;height:40px;border:0;background:transparent;cursor:pointer;color:var(--th-text,#333);font-size:16px;border-radius:5px}
.cws-themed .avatar-menu .am-back:hover{background:rgba(0,0,0,.05)}
.cws-themed .avatar-menu .am-sub-title{font-weight:700;font-size:16px;padding-left:10px;color:var(--th-text,#333)}
.cws-themed .avatar-menu .am-sub-list{padding:10px}
.cws-themed .topbar{border-bottom:0 !important}
.cws-themed .avatar-menu .menu-header img.menu-avatar{width:40px !important;height:40px !important;min-width:40px;max-width:40px;flex:none}
.cws-themed .avatar-menu .menu-header{box-sizing:border-box;min-height:75.7px}
.cws-themed .avatar-menu .menu-item{min-height:42.7px;box-sizing:border-box}
.cws-themed .avatar-menu .menu-header img.menu-avatar{border:0 !important;box-sizing:border-box}
.cws-themed .avatar-menu .menu-edit-link{line-height:1.15 !important}

/* ===== Lobby = CodyChat room list: search card + white list card, no hero / stats / chips / side panel ===== */
body:has(.lobby-shell) :is(#rpanel,.chat-footer-bar,.rpanel-toggle){display:none !important}
body:has(.lobby-shell).rpanel-open .layout-shell{margin-right:0 !important}
.cws-themed .lobby-scroll{padding:20px 15px !important;background:var(--th-chat-bg,#ececec)}
.cws-themed .lobby-inner{max-width:1050px !important}
.cws-themed .lobby-hero,.cws-themed .lobby-chips{display:none !important}
.cws-themed .lobby-toolbar{display:flex;flex-wrap:nowrap;gap:10px;margin:0 0 10px !important;padding:20px;background:var(--th-panel-bg,#fff);border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.cws-themed .lobby-search i{display:none}
.cws-themed .lobby-search input{height:43px !important;padding:0 15px !important;font-size:15px;color:var(--th-text,#333) !important;background:var(--th-item-bg,#f5f5f5) !important;border:1px solid var(--th-border,#e5e5e5) !important;border-radius:4px !important}
.cws-themed .lobby-create-btn{height:43px;flex:none;border-radius:4px}
.cws-themed .lobby-grid{display:block !important;padding:10px 20px;background:var(--th-panel-bg,#fff);border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.cws-themed .lobby-room{position:relative;display:flex !important;align-items:flex-start;gap:12px;padding:10px 0 !important;margin:0;background:transparent !important;border:0 !important;border-bottom:1px solid var(--th-border,#e5e5e5) !important;border-radius:0 !important;transform:none !important;min-height:77px;box-sizing:border-box}
.cws-themed .lobby-room:last-child{border-bottom:0 !important}
.cws-themed .lobby-room:hover,.cws-themed .lobby-room:focus-visible{background:var(--th-hover,rgba(0,0,0,.03)) !important}
.cws-themed .lobby-room-img{width:57px !important;height:57px !important;border-radius:8px !important}
.cws-themed .lobby-room-body{padding-top:2px}
.cws-themed .lobby-room-name{font-size:16px !important;font-weight:700;color:var(--th-text,#333) !important}
.cws-themed .lobby-room-desc{font-size:13px !important;margin-top:1px !important;color:var(--th-sub-text,#888) !important;-webkit-line-clamp:1}
.cws-themed .lobby-room-body::after{content:"\f0ac";font-family:"Font Awesome 6 Free","Font Awesome 5 Free";font-weight:900;font-size:15px;color:var(--th-accent,#2f6db5);display:block;margin-top:5px;line-height:1}
.cws-themed .lobby-room-meta{position:absolute;right:15px;bottom:12px;margin:0 !important}
.cws-themed .lobby-room-meta .lobby-badge,.cws-themed .lobby-join:not(.off){display:none !important}
.cws-themed .lobby-room .lobby-join.off{position:absolute;right:15px;top:12px}
.cws-themed .lobby-users,.cws-themed .lobby-users.live{flex-direction:row-reverse;gap:6px;font-size:16px;font-weight:700;color:var(--th-text,#333) !important}
.cws-themed .lobby-users i{font-size:15px;color:var(--th-sub-text,#999)}
.cws-themed .lobby-room.has-banner{flex-wrap:wrap}
@media (max-width:600px){.cws-themed .lobby-toolbar{flex-wrap:wrap;padding:15px}.cws-themed .lobby-grid{padding:5px 15px}}
.cws-tone-light .lobby-scroll{background:#ececec !important}
.cws-themed .lobby-room-name{line-height:1.2 !important}
.cws-themed .lobby-room-desc{line-height:1.2 !important}
.cws-themed .lobby-room-body::after{margin-top:3px;font-size:14px}
.cws-themed .lobby-room{padding:9px 0 !important}

/* ===== Edit Profile hub (Account / More) ===== */
.hub-back{position:fixed;inset:0;z-index:2147483100;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:10px;overflow:auto}
.hub-card{width:520px;max-width:100%;background:#fff;color:#333;border-radius:10px;overflow:hidden;box-shadow:0 10px 40px rgba(0,0,0,.45);font-size:14px}
.hub-top{position:relative;height:249px;background:#222 center/cover no-repeat;color:#fff;text-align:center}
.hub-top:before{content:"";position:absolute;inset:0;background:rgba(0,0,0,.45)}
.hub-top>*{position:relative}
.hub-bar{height:40px;display:flex;align-items:center;justify-content:space-between;padding:0 8px}
.hub-chips{display:flex;gap:6px;flex:1}
.hub-chip{background:rgba(0,0,0,.45);border-radius:12px;padding:2px 9px;font-size:12px;font-weight:600;display:inline-flex;gap:5px;align-items:center}
.hub-chip i{font-size:11px;color:#ffc107}
.hub-cover{background:rgba(0,0,0,.45);border-radius:14px;width:38px;height:26px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:13px}
.hub-bar-r{flex:1;display:flex;justify-content:flex-end;gap:4px}
.hub-bar-r i{width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:16px;cursor:pointer;opacity:.9}
.hub-bar-r i:hover{opacity:1}
.hub-avwrap{position:relative;width:110px;height:110px;margin:6px auto 0;border-radius:50%;cursor:pointer}
.hub-av{width:110px;height:110px;border-radius:50%;border:3px solid #fff;object-fit:cover;background:#444;display:block;box-sizing:border-box}
.hub-avcam{position:absolute;right:2px;bottom:2px;width:28px;height:28px;border-radius:50%;background:#03add8;display:flex;align-items:center;justify-content:center;font-size:13px;border:2px solid #fff}
.hub-rank{margin-top:8px;font-size:12px;display:flex;justify-content:center;align-items:center;gap:5px;opacity:.9}
.hub-rank img,.hub-rank svg{width:16px;height:16px}
.hub-name{font-size:22px;font-weight:700;line-height:28px;margin-top:2px}
.hub-music{display:inline-block;margin-top:8px;padding:5px 14px;border-radius:16px;background:rgba(255,255,255,.2);font-size:13px;cursor:pointer}
.hub-music:hover{background:rgba(255,255,255,.3)}
.hub-tabs{list-style:none;margin:0;padding:0 10px;height:51px;background:#f5f5f5;display:flex;align-items:center;gap:6px;justify-content:center}
.hub-tabs li{padding:8px 18px;border-radius:18px;cursor:pointer;font-weight:600;color:#666}
.hub-tabs li.on{background:#e3e3e3;color:#222}
.hub-list{padding:15px 25px 25px}
.hub-row{display:flex;align-items:center;gap:14px;padding:13px 4px;border-bottom:1px solid #eee;cursor:pointer;font-size:15px}
.hub-row:last-child{border-bottom:0}
.hub-row:hover{background:#fafafa}
.hub-row i{width:22px;text-align:center;color:#03add8;font-size:16px}
#cwsHubSub{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.4);z-index:2}
.hub-sub{background:#fff;color:#333;width:360px;max-width:92%;border-radius:10px;padding:18px;display:flex;flex-direction:column;gap:8px;box-shadow:0 8px 30px rgba(0,0,0,.4)}
.hub-sub-t{font-weight:700;font-size:16px}
.hub-sub label{font-size:12px;color:#777}
.hub-sub input,.hub-sub textarea,.hub-sub select{border:1px solid #ddd;border-radius:6px;padding:9px 10px;font-size:14px;background:#fff;color:#333;width:100%;box-sizing:border-box}
.hub-sub-msg{color:#d33;font-size:12px;min-height:14px}
.hub-sub-b{display:flex;gap:8px;justify-content:flex-end}
.hub-sub-b button{border:0;border-radius:6px;padding:8px 16px;font-weight:600;cursor:pointer;background:#eee;color:#444}
.hub-sub-b .hub-ok{background:#03add8;color:#fff}
@media(max-width:560px){.hub-top{height:230px}}

/* ===== User list popover ===== */
.up-card{position:fixed;z-index:2147483000;width:240px;max-width:calc(100vw - 20px);background:#fff;color:#333;border-radius:14px;overflow:hidden;box-shadow:0 6px 22px rgba(0,0,0,.28)}
.up-top{position:relative;background:#222;color:#fff;text-align:center;padding:14px 8px 9px}
.up-rk{position:absolute;left:10px;top:10px;background:rgba(255,255,255,.14);border-radius:12px;padding:3px 9px 3px 4px;font-size:12px;font-weight:700;display:flex;align-items:center;gap:5px;min-height:18px;line-height:18px}
.up-rk:empty{display:none}
.up-rk i{width:18px;height:18px;border-radius:50%;background:#f5a623;color:#fff;font-size:9px;display:flex;align-items:center;justify-content:center}
.up-av{width:60px;height:60px;border-radius:50%;border:2px solid #fff;object-fit:cover;background:#444;display:block;margin:0 auto;box-sizing:border-box}
.up-name{font-size:18px;font-weight:700;line-height:22px;margin-top:4px}
.up-sub{font-size:13px;line-height:17px}
.up-row{display:flex;align-items:center;justify-content:center;gap:6px;height:40px;border-top:1px solid #eee;font-size:14px;cursor:pointer;color:#333;box-sizing:border-box}
.up-row:hover{background:#f5f5f5}
.up-row.dis{opacity:.5;cursor:default}
.up-row i{color:#03add8;font-size:14px}
.up-row i.up-red{color:#e11}

/* private chat: a photo/GIF sits inside the grey bubble (15px padding, rounded 188px image), never overflows */
.cws-themed .pm-msg.pm-msg-media .pm-msg-text:has(.pm-embed-image){background:var(--th-item-bg,rgba(0,0,0,.05)) !important;padding:15px !important;border-radius:18px !important;display:inline-block;max-width:100%;box-sizing:border-box}
.cws-themed .pm-media:not(.pm-audio){margin:0;line-height:0;max-width:100%}
.cws-themed .pm-media .pm-embed-image{display:block !important;width:188px !important;max-width:100% !important;height:auto !important;max-height:260px !important;border-radius:14px !important;object-fit:cover;margin:0 !important}

/* ===== Profile view = CodyChat sizes (520 card, 220 header, 100 avatar, 51 tabs, 12px rows) ===== */
.cws-themed .profile-modal{max-width:520px !important;border-radius:20px !important;overflow:hidden !important}
.cws-themed .profile-modal-avatar-wrap{position:relative;min-height:220px;box-sizing:border-box;padding:50px 20px 14px !important;gap:0 !important;justify-content:flex-start}
.cws-themed .profile-modal-avatar{width:100px !important;height:100px !important;border:3px solid #fff !important;box-sizing:border-box;object-fit:cover}
.cws-themed .profile-modal-title{margin-top:10px}
.cws-themed .profile-modal-meta{order:1;font-size:14px !important;line-height:17px;font-weight:700 !important;margin:0 0 -3px !important;display:flex;align-items:center;justify-content:center;gap:4px}
.cws-themed .pv-rank-ico{height:14px;width:auto}
.cws-themed .profile-modal-username{order:2;font-size:25px !important;line-height:29px;margin:0 !important}
.cws-themed .profile-modal-mood{font-size:13px;margin-top:2px}
.cws-themed .profile-extras{order:3;margin-top:8px !important;justify-content:center}
.cws-themed .profile-modal-actions{top:10px !important;right:10px !important}
.cws-themed .profile-modal-close{width:30px !important;height:30px !important;font-size:18px !important;text-shadow:0 0 2px rgba(0,0,0,.8)}
.cws-themed .pv-chips{position:absolute;left:10px;top:10px;display:flex;gap:5px;z-index:6}
.cws-themed .pv-chip{display:inline-flex;align-items:center;gap:4px;height:30px;box-sizing:border-box;padding:3px 9px 3px 3px;border-radius:100px;background:rgba(100,100,100,.4);color:#fff;font-size:12px;font-weight:700;text-shadow:0 0 2px rgba(0,0,0,.8)}
.cws-themed .pv-chip i{width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:11px;color:#fff;text-shadow:none}
.cws-themed .pv-state{position:absolute;left:calc(50% + 25px);top:125px;width:20px;height:20px;border-radius:50%;border:2px solid #fff;box-sizing:border-box;background:#22c55e;z-index:7}
.cws-themed .pv-state.st-away{background:#f59e0b}.cws-themed .pv-state.st-busy{background:#ef4444}.cws-themed .pv-state.st-offline{background:#9a9a9a}.cws-themed .pv-state.st-invisible{background:#fff;border-color:#9a9a9a}
.cws-themed .profile-extras .px-status{display:none !important}
.cws-themed .profile-tabs{height:51px;box-sizing:border-box;padding:10px 15px !important;gap:0 !important;background:rgba(0,0,0,.04) !important}
.cws-themed .profile-tab-btn{padding:8px 12px !important;margin-right:5px;font-size:13px !important;font-weight:700 !important;border-radius:5px !important;border:0 !important;line-height:15px}
.cws-themed .profile-tab-btn.active{background:rgba(0,0,0,.08) !important}
.cws-themed .profile-modal-content{padding:15px 25px 25px !important}
.cws-themed .profile-info-row{padding:12px !important;gap:0 !important;border-bottom:1px solid var(--th-border,#eee) !important;align-items:center}
.cws-themed .profile-info-icon{flex:0 0 26px;width:26px !important;font-size:14px !important}
.cws-themed .profile-info-label,.cws-themed .profile-info-value{font-size:14px !important}
.cws-themed .profile-info-label{flex:0 0 calc(50% - 26px)}
.cws-themed .profile-info-value{flex:0 0 50%}
/* Cody music pill: grey translucent capsule, circle-play + animated wave */
.cws-themed .pmusic-pill{display:inline-flex;align-items:center;gap:0;padding:5px 8px;border-radius:100px;background:rgba(100,100,100,.4);color:#fff}
.cws-themed .pmusic-play{width:24px;height:24px;border:0;border-radius:50%;background:none;color:#fff;font-size:24px;line-height:24px;padding:0;display:flex;align-items:center;justify-content:center}
.cws-themed .pmusic-play i{font-size:24px;line-height:24px}
.cws-themed .pmusic-bars{height:24px;width:24px;margin:0 5px;align-items:center;justify-content:center;gap:2px}
.cws-themed .pmusic-bars i{width:2px;height:4px;background:#fff;opacity:.85;border-radius:2px}
.cws-themed .pmusic-bars i:nth-child(1),.cws-themed .pmusic-bars i:nth-child(5){height:3px}
.cws-themed .pmusic-play:has(.fa-circle-pause) ~ .pmusic-bars i{animation:pmbar .8s ease-in-out infinite;opacity:1}
@keyframes pmbar{0%,100%{height:3px}50%{height:18px}}
.cws-themed .pmusic-remove{width:20px;height:20px;font-size:10px;color:#fff;opacity:.8}
.cws-themed .pmusic-add,.cws-themed .px-gift-btn{background:rgba(100,100,100,.4) !important;border:0 !important;color:#fff !important;padding:5px 12px !important;font-size:13px !important}
/* More tab + other panes: readable on light skins (they were dark-theme greys) */
.cws-themed .profile-more-btn{background:none !important;border:0 !important;border-bottom:1px solid var(--th-border,#eee) !important;border-radius:0 !important;color:var(--th-text,#333) !important;padding:12px !important;font-size:14px !important;font-weight:700;gap:0 !important}
.cws-themed .profile-more-btn i{flex:0 0 26px;width:26px;color:var(--th-text,#333);font-size:14px}
.cws-themed .profile-more-btn:hover{background:var(--th-item-bg,rgba(0,0,0,.05)) !important}
.cws-themed .profile-more-btn:disabled{opacity:.5}
.cws-themed #pMore>div:last-child{gap:0 !important}
.cws-themed .sb-connect-title{color:var(--th-sub-text,#888) !important}
.cws-themed .sb-connect-row{background:none !important;border:0 !important;border-bottom:1px solid var(--th-border,#eee) !important;border-radius:0 !important;color:var(--th-text,#333) !important;font-weight:700}
.cws-themed .profile-bio-text{font-size:14px;line-height:1.5}
.cws-themed #profileViewBox [style*="color:#737373"],.cws-themed #profileViewBox [style*="color:#a3a3a3"]{color:var(--th-sub-text,#888) !important}
.cws-themed #profileWallInput{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;border:1px solid var(--th-border,#e6e6e6) !important;color:var(--th-text,#333) !important}
.cws-themed #profileViewBox label[style*="rgba(255,255,255,.06)"]{background:var(--th-item-bg,rgba(0,0,0,.05)) !important;color:var(--th-sub-text,#888) !important}

/* ===== Private chat polish: tiny voice-note pill (play + sound-wave glyph, no text), unread badge clear of the time ===== */
.cws-themed .pm-audio{min-width:0 !important}
.cws-themed .pm-msg .embed-block{margin:0}
.cws-themed .pm-msg .embed-file--audio{display:inline-flex !important;align-items:center;width:auto !important;max-width:none !important;padding:3px 12px 3px 3px !important;gap:8px !important;min-height:0 !important}
.cws-themed .pm-msg .embed-file--audio .ef-icon{width:26px !important;height:26px !important;flex:0 0 26px;background-size:16px 16px !important}
.cws-themed .pm-msg .embed-file--audio .ef-meta{display:none !important}
.cws-themed .pm-msg .embed-file--audio::after{content:"";display:block;width:56px;height:18px;background:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 60 20%27%3E%3Crect x=%271%27 y=%277.0%27 width=%272.6%27 height=%276%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%276%27 y=%274.0%27 width=%272.6%27 height=%2712%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2711%27 y=%276.0%27 width=%272.6%27 height=%278%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2716%27 y=%272.0%27 width=%272.6%27 height=%2716%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2721%27 y=%275.0%27 width=%272.6%27 height=%2710%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2726%27 y=%271.0%27 width=%272.6%27 height=%2718%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2731%27 y=%276.5%27 width=%272.6%27 height=%277%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2736%27 y=%273.0%27 width=%272.6%27 height=%2714%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2741%27 y=%275.5%27 width=%272.6%27 height=%279%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2746%27 y=%273.5%27 width=%272.6%27 height=%2713%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2751%27 y=%277.5%27 width=%272.6%27 height=%275%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2756%27 y=%275.0%27 width=%272.6%27 height=%2710%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3C/svg%3E") center/100% 100% no-repeat;opacity:.9}
.cws-themed .pm-msg .embed-file--audio:hover::after{opacity:1}
.cws-themed .pm-messages,.cws-themed #pmMessages{overflow-x:hidden !important}
.cws-themed .pmRow .pm-unread-badge{top:auto !important;bottom:10px !important;transform:none !important;right:46px !important;min-width:20px !important;height:20px !important;line-height:20px !important;font-size:11px !important;padding:0 6px !important}
.cws-themed .pmRow.unread .pmPreview{padding-right:56px}
.cws-themed .pv-like i{background:rgba(255,255,255,.18);transition:background .15s,transform .15s}
.cws-themed .pv-like.can{cursor:pointer}
.cws-themed .pv-like.can:hover i{transform:scale(1.12)}
.cws-themed .pv-like.liked i{background:#ef4444}

/* ===== Friend requests dropdown = same card as the private-chat list ===== */
.cws-themed #frPopup{width:380px !important;max-width:calc(100vw - 20px) !important;max-height:calc(100vh - 90px) !important;border-radius:16px !important;box-shadow:0 6px 28px rgba(0,0,0,.28) !important;background:var(--th-panel-bg,#fff) !important;border:0 !important;color:var(--th-text,#333)}
.cws-themed .fr-head{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:16px 18px 8px;border:0;background:none}
.cws-themed .fr-title{font-size:20px;font-weight:700;color:var(--th-text,#333)}
.cws-themed .fr-close{background:none;border:0;color:var(--th-text,#333);font-size:18px;padding:6px 8px;cursor:pointer;line-height:1}
.cws-themed .fr-close:hover{color:var(--th-accent,#03add8)}
.cws-themed .fr-row{display:flex;align-items:center;gap:12px;padding:10px 18px;border:0}
.cws-themed .fr-row:hover{background:var(--th-item-bg,rgba(0,0,0,.05))}
.cws-themed .fr-av{width:52px;height:52px;min-width:52px;border-radius:50%;object-fit:cover}
.cws-themed .fr-meta{flex:1;min-width:0}
.cws-themed .fr-name{font-size:15px;font-weight:700;color:var(--th-text,#333) !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cws-themed .fr-sub{font-size:13px;color:var(--th-muted,#999) !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cws-themed .fr-btn{width:36px;height:36px;border:0;border-radius:50%;cursor:pointer;font-size:15px;flex:0 0 36px;display:flex;align-items:center;justify-content:center;background:var(--th-item-bg,rgba(0,0,0,.06))}
.cws-themed .fr-ok{color:#22a355}.cws-themed .fr-ok:hover{background:#22a355;color:#fff}
.cws-themed .fr-no{color:var(--th-sub-text,#888)}.cws-themed .fr-no:hover{background:#e53935;color:#fff}
.cws-themed .fr-btn:disabled{opacity:.5;cursor:default}
.cws-themed .fr-empty{padding:30px 16px;text-align:center;color:var(--th-muted,#999);font-size:14px}
.cws-themed .fr-empty i{display:block;font-size:30px;margin-bottom:10px;opacity:.5}
/* the same card look for the bell dropdown */
.cws-themed #notifPopup{width:380px !important;max-width:calc(100vw - 20px) !important;border-radius:16px !important}

/* Room audio card: same size, wave glyph instead of "WEBA · Tap to listen" */
.cws-themed .embed-file--audio{min-width:230px}
.cws-themed .pm-msg .embed-file--audio{min-width:0 !important}
.cws-themed .embed-file--audio .ef-meta{display:none !important}
.cws-themed .embed-file--audio::after{content:"";display:block;flex:1 1 auto;height:22px;min-width:120px;background:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 60 20%27%3E%3Crect x=%271%27 y=%277.0%27 width=%272.6%27 height=%276%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%276%27 y=%274.0%27 width=%272.6%27 height=%2712%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2711%27 y=%276.0%27 width=%272.6%27 height=%278%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2716%27 y=%272.0%27 width=%272.6%27 height=%2716%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2721%27 y=%275.0%27 width=%272.6%27 height=%2710%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2726%27 y=%271.0%27 width=%272.6%27 height=%2718%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2731%27 y=%276.5%27 width=%272.6%27 height=%277%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2736%27 y=%273.0%27 width=%272.6%27 height=%2714%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2741%27 y=%275.5%27 width=%272.6%27 height=%279%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2746%27 y=%273.5%27 width=%272.6%27 height=%2713%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2751%27 y=%277.5%27 width=%272.6%27 height=%275%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3Crect x=%2756%27 y=%275.0%27 width=%272.6%27 height=%2710%27 rx=%271.3%27 fill=%27%2303add8%27/%3E%3C/svg%3E") center/100% 100% no-repeat;opacity:.9}
.cws-themed .pm-msg .embed-file--audio::after{flex:0 0 auto;min-width:0;height:18px}
/* Room audio card: smaller */
.cws-themed .embed-file--audio{min-width:0 !important;width:210px !important;max-width:210px !important;padding:4px 14px 4px 4px !important;gap:10px !important}
.cws-themed .embed-file--audio .ef-icon{width:32px !important;height:32px !important;flex:0 0 32px !important;background-size:18px 18px !important}
.cws-themed .embed-file--audio::after{min-width:0;height:18px}
.cws-themed .pm-msg .embed-file--audio{width:auto !important;max-width:none !important;padding:3px 12px 3px 3px !important;gap:8px !important}
.cws-themed .pm-msg .embed-file--audio .ef-icon{width:26px !important;height:26px !important;flex:0 0 26px !important;background-size:16px 16px !important}
.cws-themed .pm-msg .embed-file--audio::after{flex:0 0 auto;width:56px;height:18px}
/* Uploaded audio (not voice note): audio glyph */
.cws-themed .embed-file--audio:not([data-name^="Voice message"])::after{background:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='%2303add8'%3E%3Cpath%20d='M9%203v10.55A4%204%200%201%200%2011%2017V7h6V3H9z'/%3E%3Cpath%20d='M17.5%209.5a3.5%203.5%200%200%201%200%205M19.8%207.2a7%207%200%200%201%200%209.6'%20fill='none'%20stroke='%2303add8'%20stroke-width='1.6'%20stroke-linecap='round'/%3E%3C/svg%3E") center/auto 100% no-repeat !important;opacity:1}
/* Room audio: same length as private pill */
.cws-themed .embed-file--audio{width:auto !important;max-width:none !important;display:inline-flex !important}
.cws-themed .embed-file--audio::after{flex:0 0 auto !important;width:56px !important;min-width:0 !important}
/* Staff boxes (Whois, Wallet, History, Note, IP lookup): readable on light/themed cards */
.cws-themed .sb-layer{color:var(--th-text,#333)}
.cws-themed .sb-layer .sb-box-title,.cws-themed .sb-layer .sb-w-l,.cws-themed .sb-layer .sb-coin b,.cws-themed .sb-layer .sb-ip-addr,.cws-themed .sb-layer .sb-ipuser-name,.cws-themed .sb-layer .sb-hist-row,.cws-themed .sb-layer .sb-check-row,.cws-themed .sb-layer .sb-row,.cws-themed .sb-layer .sb-kv b,.cws-themed .sb-layer .sb-chip{color:var(--th-text,#222) !important}
.cws-themed .sb-layer .sb-w-v,.cws-themed .sb-layer .sb-none{color:var(--th-sub-text,#777) !important;opacity:1}
.cws-themed .sb-layer .sb-label,.cws-themed .sb-layer .sb-hint,.cws-themed .sb-layer .sb-coin span,.cws-themed .sb-layer .sb-hist-row small,.cws-themed .sb-layer .sb-kv,.cws-themed .sb-layer .sb-ipuser-sub,.cws-themed .sb-layer .sb-loading{color:var(--th-muted,#777) !important}
.cws-themed .sb-layer .sb-row i,.cws-themed .sb-layer .sb-check-row i,.cws-themed .sb-layer .sb-x{color:var(--th-sub-text,#666) !important}
.cws-themed .sb-layer .sb-x,.cws-themed .sb-layer .sb-tag,.cws-themed .sb-layer .sb-chip,.cws-themed .sb-layer .sb-btn.ghost{background:var(--th-item-bg,#f0f0f0) !important;border-color:var(--th-border,#e5e5e5) !important}
.cws-themed .sb-layer .sb-kv,.cws-themed .sb-layer .sb-hist-row,.cws-themed .sb-layer .sb-check-row,.cws-themed .sb-layer .sb-ipuser{border-bottom-color:var(--th-border,#eee) !important}
.cws-themed .sb-layer .sb-input{background:var(--th-item-bg,#f5f5f5) !important;color:var(--th-text,#222) !important;border-color:var(--th-border,#e5e5e5) !important}
.cws-themed .sb-layer .sb-btn.ghost{color:var(--th-text,#222) !important}
.cws-themed .sb-layer .sb-row-danger,.cws-themed .sb-layer .sb-row-danger i{color:#e5484d !important}
/* ── Private chat placement like CodyChat: avatar 26px on top-aligned with 5px side padding, bubble beside it, 10px date under the bubble edge ── */
.cws-themed .pmx-bubble-row{align-items:flex-start !important;gap:0 !important}
.cws-themed .pmx-bubble-row .pmx-mine-av,.cws-themed .pmx-bubble-row .pmx-their-av{width:26px !important;height:26px !important;min-width:26px !important;flex:0 0 26px !important;margin:0 5px !important;border-radius:50% !important;align-self:flex-start !important}
.cws-themed .pmx-bubble-row .pmx-actions{align-self:center;margin:0 4px}
.cws-themed .pm-msg-meta{font-size:10px !important;line-height:1.4 !important;padding:3px 5px !important;margin-top:0 !important;color:var(--th-muted,#ccc) !important;white-space:nowrap}
.cws-themed .pm-msg.mine .pm-msg-meta{margin-right:36px !important;text-align:right}
.cws-themed .pm-msg.theirs .pm-msg-meta{margin-left:36px !important;text-align:left}
.cws-themed #pmMessages,.cws-themed .pm-messages{gap:8px !important}
/* Mobile: chat.css forces .chat-input static, so the voice-recording bar (absolute, inset:0) escaped to mid-screen. Keep it anchored like on desktop. */
.cws-themed .chat-input{position:relative !important}
.cws-themed .chat-input .cws-vr{position:absolute !important;inset:0 !important;height:auto !important;z-index:7}
.cws-themed #pmInputRow,.cws-themed .pm-box-input{position:relative !important}
/* ── Private window = CodyChat's #private_center: 400×400 box flush on the footer, 40px header, 49px input ── */
.cws-themed #pmBox:not(.pmx-full),.cws-themed .pm-box:not(.pmx-full){width:400px !important;height:400px !important;max-height:calc(100vh - var(--footer-h,38px) - 56px) !important;bottom:var(--footer-h,38px) !important;right:0 !important;border-radius:0 !important;border:0 !important;box-shadow:0 1px 3px rgba(0,0,0,.2) !important}
body.rpanel-open .cws-themed #pmBox:not(.pmx-full){right:var(--rpanel-w,320px) !important}
.cws-themed #pmBox .pm-box-header,.cws-themed #pmBox #pmBoxHeader{height:40px !important;min-height:40px;padding:0 0 0 10px !important;gap:0}
.cws-themed #pmBox .pmx-av,.cws-themed #pmBox .pmx-av-wrap{width:30px !important;height:30px !important;min-width:30px}
.cws-themed #pmBox .pm-box-user{gap:0 !important}
.cws-themed #pmBox .pm-box-name{font-size:16px !important;padding:0 8px;font-weight:400 !important}
.cws-themed #pmBox .pm-box-header .pm-ctrl-btn{width:40px !important;height:40px !important;font-size:16px !important;border-radius:0 !important}
.cws-themed #pmBox .pm-box-controls{gap:0 !important}
.cws-themed #pmBox .pm-box-input,.cws-themed #pmBox #pmInputRow{min-height:49px;padding:4px !important;box-sizing:border-box}
.cws-themed #pmBox.pmx-dragged{transition:none !important;animation:none !important}
@media (min-width:801px){.cws-themed #pmBox:not(.pmx-full) .pm-box-header{cursor:grab}.cws-themed #pmBox.pmx-dragging .pm-box-header{cursor:grabbing}.cws-themed #pmBox.pmx-dragging{user-select:none}}
@media (max-width:800px){
  .cws-themed #pmBox:not(.pmx-full),.cws-themed .pm-box:not(.pmx-full){left:0 !important;right:0 !important;width:100% !important;max-width:100% !important;height:400px !important;max-height:calc(100vh - var(--footer-h,38px) - 56px) !important;bottom:var(--footer-h,38px) !important;top:auto !important}
}
/* YouTube in the private chat = CodyChat's .chat_video_container: 200×113 thumb, 8px radius, 5px top, inside a 10px-padded bubble */
.cws-themed .pm-msg.pm-msg-media .pm-msg-text:has(.pm-embed-yt){background:var(--th-item-bg,rgba(0,0,0,.05)) !important;padding:10px !important;border-radius:14px !important;display:inline-block;max-width:100%;box-sizing:border-box}
.cws-themed .pm-msg .pm-embed-yt{width:200px !important;max-width:100% !important;aspect-ratio:16/9;height:auto;border-radius:8px !important;overflow:hidden;margin:0 !important}
.cws-themed .pm-msg .pm-embed-yt .embed-yt-thumb{width:100%;height:100%;object-fit:cover;display:block}
/* ── YouTube player = CodyChat #container_stream: fixed 560×355 (40px header + 16:9), top 100, radius 15, rgba(0,0,0,.9), draggable by the header, no dimming backdrop.
      ≤1024px: 400×265 · ≤480px: 320×220 at top 60 (all centered) ── */
.cws-themed .cwsyt-backdrop,.cws-themed .cwsyt-backdrop.on{background:transparent !important;pointer-events:none !important}
.cws-themed .cwsyt.full{position:fixed !important;left:50% !important;top:100px !important;transform:translateX(-50%) !important;width:560px !important;max-width:100vw !important;border-radius:15px !important;background:rgba(0,0,0,.9) !important;overflow:hidden}
.cws-themed .cwsyt.full.cws-moved{transform:none !important}
.cws-themed .cwsyt.full .cwsyt-head{height:40px !important;min-height:40px;padding:0 !important;gap:0 !important;background:transparent !important;justify-content:flex-end;cursor:move}
.cws-themed .cwsyt.full .cwsyt-btn{width:40px !important;height:40px !important;font-size:16px !important;border-radius:0 !important;display:flex;align-items:center;justify-content:center}
.cws-themed .cwsyt.full .cwsyt-video{border-radius:0}
@media (max-width:1024px){.cws-themed .cwsyt.full{width:400px !important;top:100px !important}}
@media (max-width:480px){.cws-themed .cwsyt.full{width:320px !important;top:60px !important}}
/* ── YouTube modal on phones (CodyChat: 360px wide at 375, 19px from the top) ── */
@media (max-width:480px){.ytm-back{padding:19px 7px 8px !important}.ytm-in{width:100% !important}}
/* ── Private chat on phones = CodyChat's pfull: full screen between the top bar and the footer (header 40, input 49), no expand button, no dragging ── */
@media (max-width:800px){
  .cws-themed #pmBox:not(.pmx-full),.cws-themed .pm-box:not(.pmx-full){top:56px !important;bottom:var(--footer-h,38px) !important;left:0 !important;right:0 !important;width:100% !important;max-width:100% !important;height:auto !important;max-height:none !important;border-radius:0 !important}
  .cws-themed #pmExpandBtn{display:none !important}
}
/* ══ News wall = CodyChat "Anuncios" left panel: 380px, docked under the top bar, 40px header (title + ×), 20px padding, "+ Add" accent button, flat posts ══ */
.cws-themed .element-box:has(#nwList){inset:50px auto var(--footer-h,38px) 0 !important;width:380px;max-width:100vw;padding:0 !important;background:none !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important;pointer-events:none;display:none;align-items:stretch;justify-content:flex-start}
.cws-themed .element-box.visible:has(#nwList){display:flex}
.cws-themed .element-box:has(#nwList) .element-box-backdrop{display:none}
.cws-themed .element-box:has(#nwList) .element-close{display:none !important}
.cws-themed .element-box:has(#nwList) .element-box-inner{pointer-events:auto;width:100% !important;max-width:none !important;height:100%;max-height:none !important;padding:0 !important;border:0 !important;border-right:1px solid rgba(0,0,0,.08) !important;border-radius:0 !important;box-shadow:0 1px 3px rgba(0,0,0,.2) !important;background:var(--th-panel-bg,#fff) !important;color:var(--th-text,#333) !important;animation:none !important;overflow:hidden;display:flex;flex-direction:column}
.cws-themed .nw{margin:0 !important;height:100%;display:flex;flex-direction:column;color:var(--th-text,#333) !important;min-height:0}
.cws-themed .nw-head{height:40px;min-height:40px;padding:0 0 0 10px !important;border-bottom:1px solid var(--th-border,#e6e6e6) !important;flex:0 0 auto}
.cws-themed .nw-title{font-size:14px !important;font-weight:700 !important;gap:6px !important;color:var(--th-text,#333)}
.cws-themed .nw-x{width:40px !important;height:39px !important;border-radius:0 !important;background:none !important;color:var(--th-text,#333) !important;font-size:14px !important}
.cws-themed .nw-x:hover{color:var(--th-accent,#03add8) !important}
.cws-themed .nw-addrow{padding:20px 20px 0;flex:0 0 auto}
.cws-themed .nw-addrow:has(.nw-add[hidden]){display:none}
.cws-themed .nw-add{height:35px;padding:0 10px !important;border-radius:4px !important;background:var(--th-accent,#03add8) !important;color:#fff !important;font-weight:400 !important;font-size:13px !important;gap:6px !important;margin-bottom:15px}
.cws-themed .nw-composer{margin:0 20px 10px !important;padding:10px !important;background:var(--th-item-bg,#f6f6f6) !important;border:1px solid var(--th-border,#e6e6e6) !important;border-radius:10px !important;flex:0 0 auto}
.cws-themed .nw-input{background:var(--th-panel-bg,#fff) !important;color:var(--th-text,#333) !important;border:1px solid var(--th-border,#e6e6e6) !important;border-radius:5px !important}
.cws-themed .nw-textarea{min-height:120px !important}
.cws-themed .nw-tool,.cws-themed .nw-btn.ghost{color:var(--th-sub-text,#777) !important}
.cws-themed .nw-btn.primary{background:var(--th-accent,#03add8) !important}
.cws-themed .nw-list{flex:1 1 auto;min-height:0;max-height:none !important;padding:0 20px;overflow-y:auto}
.cws-themed .nw-addrow[hidden] ~ .nw-list,.cws-themed .nw-head + .nw-list{padding-top:20px}
.cws-themed .nw-empty{color:var(--th-muted,#888) !important;padding:15px !important;font-size:13px}
.cws-themed .nw-empty::before{content:"";display:block;width:64px;height:64px;margin:0 auto 14px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b5b5b5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11v2a1 1 0 0 0 1 1h2l5 4V6L6 10H4a1 1 0 0 0-1 1z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18 6a8.5 8.5 0 0 1 0 12'/%3E%3C/svg%3E") center/contain no-repeat}
.cws-themed .nw-empty:has(.fa-spinner)::before{display:none}
.cws-themed .nw-more{border:1px solid var(--th-border,#e6e6e6) !important;color:var(--th-sub-text,#777) !important;margin:8px 20px 12px !important;width:auto !important}
/* posts (Cody .post_element: 15px vertical padding, 36px avatar, 10px content padding, 1.4 line-height) */
.cws-themed .nw-post{padding:15px 0 !important;border-bottom:1px solid var(--th-border,#eee) !important;background:none !important}
.cws-themed .nw-post.pinned{background:none !important}
.cws-themed .nw-av{width:36px !important;height:36px !important;flex:0 0 36px !important}
.cws-themed .nw-name{font-size:14px !important;color:var(--th-text,#333) !important}
.cws-themed .nw-sub{font-size:11px !important;color:var(--th-muted,#999) !important}
.cws-themed .nw-menu-btn{color:var(--th-sub-text,#777) !important;width:40px !important;border-radius:0 !important}
.cws-themed .nw-menu{background:var(--th-panel-bg,#fff) !important;border:1px solid var(--th-border,#e6e6e6) !important;box-shadow:0 2px 12px rgba(0,0,0,.2) !important;border-radius:6px !important}
.cws-themed .nw-menu button{color:var(--th-text,#333) !important}.cws-themed .nw-menu button i{color:var(--th-sub-text,#888) !important}
.cws-themed .nw-menu button:hover{background:var(--th-item-bg,#f3f3f3) !important}
.cws-themed .nw-menu button.danger,.cws-themed .nw-menu button.danger i{color:#e5484d !important}
.cws-themed .nw-post-title{color:var(--th-text,#333) !important;font-size:14px !important;margin-top:10px !important}
.cws-themed .nw-content{color:var(--th-text,#333) !important;font-size:14px !important;line-height:1.4 !important;padding:10px 0 !important;margin:0 !important}
.cws-themed .nw-content a{color:var(--th-accent,#03add8) !important}
.cws-themed .nw-img{max-height:350px !important;margin:10px 0 !important;border-radius:0 !important}
.cws-themed .nw-post .wsb-bar{margin-top:5px !important;padding:5px 0 0 !important}
.cws-themed .nw-post .wsb-react-btn{background:none !important;color:var(--th-sub-text,#777) !important;font-weight:400 !important;border-radius:4px !important}
.cws-themed .nw-post .wsb-react-btn:hover,.cws-themed .nw-post .wsb-comments-toggle:hover{background:var(--th-item-bg,#f3f3f3) !important}
.cws-themed .nw-post .wsb-comments-toggle{color:var(--th-sub-text,#777) !important;font-weight:400 !important;border-radius:4px !important}
.cws-themed .nw-post .wsb-comments{background:none !important;padding:0 !important}
.cws-themed .nw-post .wsb-comment{border-bottom:1px solid var(--th-border,#f0f0f0)}
.cws-themed .nw-post .wsb-comment-input{background:var(--th-item-bg,#f6f6f6) !important;color:var(--th-text,#333) !important;border:1px solid var(--th-border,#e6e6e6) !important;border-radius:5px !important}
.cws-themed .nw-post .wsb-comment-send{background:var(--th-accent,#03add8) !important;border-radius:5px !important}
.cws-themed .nw-pin-badge{color:var(--th-accent,#03add8) !important}
@media (max-width:480px){.cws-themed .element-box:has(#nwList){width:100vw}}
.cws-themed .nw-head{box-sizing:border-box}

/* ===== News wall — exact CodyChat post/like/reply/modal structure (b10010150) ===== */
.cws-themed .nw{margin:0;color:var(--th-text,#333);display:flex;flex-direction:column;height:100%;min-height:0}
.cws-themed .nw-head{display:flex;align-items:center;justify-content:space-between}
.cws-themed .nw-add{display:inline-flex;align-items:center;border:0;cursor:pointer;font-family:inherit}
.cws-themed .nw-add[hidden]{display:none}
.cws-themed .nw-list{overflow-y:auto}
.cws-themed .nw-empty.empty_zone{padding:15px;margin:0 auto;text-align:center;color:var(--th-text,#333) !important}
.cws-themed .nw-empty .empty_zone_icon{width:64px;height:64px;display:inline-block}
.cws-themed .nw-empty .empty_zone_text{font-size:13px;margin:10px 0 0}
.cws-themed .nw-empty::before{display:none !important}
.cws-themed .nw-morewrap{text-align:center;padding:10px 20px 20px;flex:0 0 auto}
.cws-themed .nw-morewrap:has(.nw-more[hidden]){display:none}
.cws-themed .nw-more{display:inline-block !important;width:auto !important;margin:0 !important;height:35px;padding:0 12px !important;border:0 !important;border-radius:50px !important;background:var(--th-accent,#03add8) !important;color:#fff !important;font-size:13px;font-weight:400 !important;cursor:pointer;font-family:inherit}
.cws-themed .nw-more[hidden]{display:none !important}
/* post */
.cws-themed .nw-post{padding:15px 0 !important}
.cws-themed .nw-post .post_title{display:table;table-layout:fixed;width:100%}
.cws-themed .nw-post .post_avatar{display:table-cell;vertical-align:middle;width:36px}
.cws-themed .nw-post .post_avatar img{width:36px !important;height:36px !important;border-radius:50%;display:block;cursor:pointer;object-fit:cover}
.cws-themed .nw-post .post_info{display:table-cell;vertical-align:middle;padding:0 5px;overflow:hidden;max-width:100%}
.cws-themed .nw-post .post_info p{margin:0}
.cws-themed .nw-post .username{font-size:13px;font-weight:700;cursor:pointer;display:block !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cws-themed .nw-post .sub_date{font-size:11px;color:var(--th-muted,#999) !important;display:block !important}
.cws-themed .nw-post .post_edit{display:table-cell;vertical-align:middle;width:40px;text-align:center;position:relative}
.cws-themed .nw-post .nw-menu-btn{width:40px !important;height:36px;font-size:15px}
.cws-themed .nw-post .post_content{display:table;table-layout:fixed;width:100%;padding:10px 0 !important;margin:0 !important;word-wrap:break-word;white-space:pre-wrap;line-height:1.4em;font-size:14px}
.cws-themed .nw-post .post_image{display:table;table-layout:fixed;width:100%;margin:10px 0 0;white-space:normal}
.cws-themed .nw-post .post_image img,.cws-themed .nw-post .nw-img{max-width:100% !important;max-height:350px !important;width:auto;height:auto;margin:0 !important;display:inline-block}
.cws-themed .nw-menu{width:220px;padding:0 !important;overflow:hidden;z-index:6}
.cws-themed .nw-menu .submenu_item{display:flex;align-items:center;gap:10px;padding:10px;cursor:pointer;font-size:14px;color:var(--th-text,#333)}
.cws-themed .nw-menu .submenu_item:hover{background:rgba(0,0,0,.06)}
.cws-themed .nw-mi{width:20px;text-align:center;font-size:15px;color:var(--th-sub-text,#777)}
.cws-themed .nw-mt{display:flex;flex-direction:column;min-width:0;text-align:left}
.cws-themed .nw-mt b{font-weight:400;font-size:14px}
.cws-themed .nw-mt small{font-size:11px;color:var(--th-muted,#999)}
.cws-themed .nw-menu .submenu_item.danger,.cws-themed .nw-menu .submenu_item.danger .nw-mi{color:#e5484d}
/* controls: reactions + comment count (Cody .post_control) */
.cws-themed .nw-post .post_control{display:table;table-layout:fixed;width:100%;padding:5px 0;margin:0 !important;border:0 !important}
.cws-themed .nw-post .like_container{display:table-cell;vertical-align:middle}
.cws-themed .nw-post .comment_count{display:table-cell;vertical-align:middle;text-align:right;cursor:pointer;width:70px;color:var(--th-text,#333)}
.cws-themed .nw-post .comment_count.hidden{visibility:hidden}
.cws-themed .nw-post .like_count{float:left;cursor:pointer;padding:5px;border-radius:50px;font-size:13px;color:var(--th-text,#333);background:none}
.cws-themed .nw-post .like_count.liked{background:rgba(0,0,0,.07)}
.cws-themed:not(.cws-tone-light) .nw-post .like_count.liked{background:rgba(255,255,255,.07)}
.cws-themed .nw-post .like_icon,.cws-themed .nw-post .comment_icon{width:20px;height:20px;display:inline-block;vertical-align:middle;margin-top:-2px}
.cws-themed .nw-post .wsb-bar{border:0 !important}
/* comments (Cody .reply_item) */
.cws-themed .nw-post .wsb-comments{margin:0 !important;padding:0 !important;background:none !important;display:block}
.cws-themed .nw-post .add_comment_zone{clear:both}
.cws-themed .nw-post .reply_post{padding-top:10px}
.cws-themed .nw-post .add_comment{width:100%;box-sizing:border-box;padding:14px 10px;border:0 !important;border-radius:50px !important;background:var(--th-item-bg,#f6f6f6) !important;color:var(--th-text,#333) !important;font-size:14px;outline:0;font-family:inherit}
.cws-themed .nw-post .wsb-comment-list{padding-top:10px}
.cws-themed .nw-post .reply_item{display:table;table-layout:fixed;width:100%;word-wrap:break-word;padding:10px;border-radius:10px;margin-bottom:3px;box-sizing:border-box;border:0 !important}
.cws-themed .nw-post .reply_avatar{display:table-cell;vertical-align:top;width:32px}
.cws-themed .nw-post .reply_avatar img{width:32px !important;height:32px !important;border-radius:50% !important;display:block;cursor:pointer;object-fit:cover}
.cws-themed .nw-post .reply_content{display:table-cell;vertical-align:top;padding:0 5px}
.cws-themed .nw-post .reply_content .btable{display:table;width:100%;table-layout:auto}
.cws-themed .nw-post .reply_content .bcell_top{display:table-cell;vertical-align:top;overflow:hidden}
.cws-themed .nw-post .reply_content p{margin:0}
.cws-themed .nw-post .reply_content .username{font-size:13px;font-weight:700;color:var(--th-text,#333)}
.cws-themed .nw-post .reply_content .text_small{font-size:13px;white-space:pre-wrap;word-break:break-word;padding:3px 0}
.cws-themed .nw-post .reply_delete{text-align:center;width:30px;cursor:pointer;color:var(--th-sub-text,#777)}
.cws-themed .nw-post .wsb-note{text-align:center;color:var(--th-muted,#999);font-size:12px;padding:6px}
/* "Publica algo…" modal (Cody add_news) */
.nwm-back{position:fixed;inset:0;z-index:99998;background:rgba(0,0,0,.5);display:flex;align-items:flex-start;justify-content:center;padding:60px 7px 8px;box-sizing:border-box;overflow:auto}
.nwm-in{position:relative;width:500px;max-width:100%;box-sizing:border-box;padding:36px 20px 20px;border-radius:20px;background:var(--th-panel-bg,#fff);color:var(--th-text,#333);font-family:inherit}
.nwm-x{position:absolute;top:0;right:0;width:36px;height:36px;border:0;background:none;color:var(--th-text,#333);font-size:16px;cursor:pointer}
.nwm-title{font-size:16px;font-weight:700;padding-bottom:15px}
.nwm-box{border-radius:10px;background:var(--th-item-bg,#f6f6f6);overflow:hidden}
.nwm-ta{display:block;width:100%;height:120px;box-sizing:border-box;padding:14px 10px;border:0 !important;background:none !important;color:var(--th-text,#333);font-size:14px;font-family:inherit;resize:none;outline:0}
.nwm-pv{position:relative;padding:10px;border-top:1px solid var(--th-border,#e6e6e6)}
.nwm-pv[hidden]{display:none}
.nwm-pv img{max-height:50px;max-width:100%;border-radius:5px;display:block}
.nwm-rm{position:absolute;top:5px;left:5px;width:24px;height:24px;border-radius:50%;background:var(--th-panel-bg,#fff);display:flex;align-items:center;justify-content:center;font-size:13px;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.nwm-ctl{display:flex;align-items:center;height:40px;margin-top:5px}
.nwm-sp{flex:1}
.nwm-item{position:relative;width:40px;height:40px;display:flex;align-items:center;justify-content:center;font-size:20px;cursor:pointer;color:var(--th-text,#333)}
.nwm-item.on{color:var(--th-accent,#03add8)}
.nwm-send{color:var(--th-accent,#03add8)}
.nwm-file input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer;padding:0}
.cws-themed .nw-menu{position:absolute;right:0;top:100%;box-sizing:border-box}
.cws-themed .nw-menu[hidden]{display:none}
.cws-themed .nw-menu-btn{border:0;background:none;cursor:pointer}
.cws-themed .nw-av,.cws-themed .nw-name{cursor:pointer}
.cws-themed .nw-reactors{display:flex;flex-direction:column;max-height:none;overflow-y:auto;padding:10px 20px}
.cws-themed .nw-reactor{display:flex;align-items:center;gap:10px;padding:8px 0;font-size:14px;border-bottom:1px solid var(--th-border,#eee)}
.cws-themed .nw-reactor img{width:32px;height:32px;border-radius:50%;object-fit:cover}
.cws-themed .nw-reactor .r{margin-left:auto}
.cws-themed .nw-reactors-layer{position:absolute;inset:0;z-index:10;background:var(--th-panel-bg,#fff);overflow:auto}
.nwm-back2{z-index:99999}
.nwm-opt{width:400px}
.nwm-sw{display:flex;align-items:center;padding:15px;margin-bottom:5px;border-radius:5px;background:var(--th-item-bg,#f0f0f0);cursor:pointer;font-size:16px}
.nwm-swt{flex:1}
.nwm-sw .bswitch{display:flex;width:50px;box-sizing:border-box;padding:2px;border-radius:100px;flex:0 0 50px}
.nwm-sw .bball_wrap{display:flex;align-items:center}
.nwm-sw .bball{width:24px;height:24px;border-radius:50%;display:block;background:#fff;transition:margin .15s}
.nwm-sw .offswitch{background:#ccc}.nwm-sw .onswitch{background:#74b20e}
.nwm-sw .onball{margin-left:22px}.nwm-sw .offball{margin-left:0}
.cws-themed .nw-post .sub_date{color:var(--th-sub-text,#bbb) !important}
.cws-themed .nw-post .like_count{font-size:14px}
.cws-themed .nw-x:focus,.cws-themed .nw-x:focus-visible,.cws-themed .nw-menu-btn:focus,.cws-themed .nw-menu-btn:focus-visible{outline:0 !important;box-shadow:none !important}
.cws-themed .nw-addrow:has(.nw-add[hidden]) + .nw-list{padding-top:20px}
/* News panel: top = topbar (50px) exactly; no focus ring/box on × or ⋯ */
.cws-themed .element-box:has(#nwList){top:50px !important}
.cws-themed .element-box:has(#nwList) button,.cws-themed .element-box:has(#nwList) button:focus,.cws-themed .element-box:has(#nwList) button:focus-visible,.cws-themed .element-box:has(#nwList) button:active{outline:0 !important;outline-offset:0 !important;box-shadow:none !important;-webkit-tap-highlight-color:transparent}
.cws-themed .nw-x{border:0 !important;background:none !important;padding:0 !important;display:flex;align-items:center;justify-content:center;-webkit-appearance:none;appearance:none}
.cws-themed .nw-x:hover{background:none !important}
.cws-themed .nw-menu-btn{border:0 !important;background:none !important;padding:0 !important}
.cws-themed .nw-head{padding-right:0 !important}
/* news modal emoticon list (Cody #post_emo: inside the input box, under the textarea) */
.nwm-emo{max-height:110px;overflow:hidden;overflow-y:auto;padding:5px 0;border-top:1px solid var(--th-border,#e6e6e6);background:var(--th-panel-bg,#fff);margin:0}
.nwm-emo[hidden]{display:none}
.nwm-emo::after{content:"";display:block;clear:both}
.nwm-emo .emoticon{height:24px;width:auto;float:left;margin:5px;cursor:pointer}
.nwm-emo-ld{text-align:center;padding:12px;color:var(--th-muted,#999)}
.cws-themed .nw-rank{height:15px;width:auto;display:inline-block;vertical-align:middle;margin:-2px 4px 0 0}
/* post attachments (Cody boomPostFile) */
.cws-themed .nw-post .post_audio{margin:10px 0;white-space:normal}
.cws-themed .nw-post .post_audio audio{width:100%;display:block}
.cws-themed .nw-post .post_video{width:100%;height:250px;margin:10px 0;white-space:normal}
.cws-themed .nw-post .post_video video{height:100%;width:100%;max-width:100%;display:block;background:#000}
.cws-themed .nw-post .post_zip{width:100%;height:60px;margin:10px 0;white-space:normal}
.cws-themed .nw-post .post_zip img{height:100%;width:auto;display:block}
.nwm-pv .up_data{display:inline-block;position:relative}
.nwm-pv .up_audio{width:200px;max-width:100%;display:block}
.nwm-pv .up_video{height:120px;border-radius:5px;display:block}
.nwm-pv .up_image{max-height:50px;max-width:100%;border-radius:5px;display:block}
.nwm-pv .nwm-rm{top:-5px;left:auto;right:-5px}
/* post menu = CodyChat subMenu(): accent icon, bold 13px title, 11px sub */
.cws-themed .nw-menu .submenu_item{padding:10px;gap:0}
.cws-themed .nw-mi{width:30px;text-align:center;font-size:16px;color:var(--th-accent,#03add8) !important;flex:0 0 30px}
.cws-themed .nw-mt b{font-size:13px;font-weight:700;color:var(--th-text,#333)}
.cws-themed .nw-mt small{font-size:11px;color:var(--th-muted,#999);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cws-themed .nw-menu .submenu_item.danger,.cws-themed .nw-menu .submenu_item.danger .nw-mi{color:var(--th-accent,#03add8) !important}
.cws-themed .nw-menu{border-radius:10px !important;border:0 !important;box-shadow:0 1px 8px rgba(0,0,0,.25) !important}
/* view likes modal (Cody news_likes) */
#nwLikes .nwm-in{padding:36px 20px 20px}
.nwl-tabs{font-size:0;padding:10px 0;margin-bottom:20px;border-bottom:1px solid var(--th-border,#e6e6e6)}
.nwl-tab{display:inline-block;padding:8px 12px;margin:0 5px 0 0;border-radius:5px;cursor:pointer;font-size:13px;font-weight:700;color:var(--th-text,#333)}
.nwl-tab.on{background:var(--th-item-bg,#eee)}
.nwl-tab img{width:20px;height:20px;vertical-align:middle}
.nwl-tab b{vertical-align:middle;font-size:13px}
.nwl-body{max-height:400px;overflow-y:auto;padding:0 5px}
.nwl-zone[hidden]{display:none}
.nwl-user{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:5px;border-radius:5px;background:var(--th-item-bg,#f1f1f1);cursor:pointer}
.nwl-user img{width:40px;height:40px;border-radius:50%;object-fit:cover}
.nwl-name{font-size:14px;font-weight:700;color:var(--th-text,#333);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#nwLikes .empty_zone{padding:15px;text-align:center}
#nwLikes .empty_zone_icon{width:64px;height:64px}
#nwLikes .empty_zone_text{font-size:13px;margin:10px 0 0}
/* === exact CodyChat modal metrics (small_modal_in / modal_close / modal_menu / ulist_item / subm_*) === */
.nwm-x{top:10px !important;right:10px !important;width:36px;height:36px;font-size:18px !important;display:flex;align-items:center;justify-content:center;border:0;background:none;cursor:pointer;padding:0}
#nwLikes .nwm-in{width:400px;max-width:96%;border-radius:20px;padding:36px 20px 20px}
#nwLikes .nwl-tabs{font-size:0;padding:10px 0;margin:0 0 20px;border-bottom:1px solid var(--th-border,#e3e3e3)}
#nwLikes .nwl-tab{display:inline-block;padding:8px 12px;margin:0 5px 0 0;border-radius:5px;font-size:13px;font-weight:700;line-height:20px;cursor:pointer}
#nwLikes .nwl-tab img{width:20px;height:20px;display:inline-block;vertical-align:middle;margin:0}
#nwLikes .nwl-tab b{display:inline-block;vertical-align:middle;margin-left:4px;font-size:13px}
#nwLikes .nwl-tab.on{background:rgba(0,0,0,.07)}
.cws-tone-dark #nwLikes .nwl-tab.on,.cws-themed:not(.cws-tone-light) #nwLikes .nwl-tab.on{background:rgba(255,255,255,.08)}
#nwLikes .nwl-body{max-height:400px;overflow:hidden;overflow-y:auto;padding:0 5px}
#nwLikes .nwl-user{display:flex;align-items:center;gap:5px;padding:8px;margin:0;border-radius:5px;width:100%;box-sizing:border-box;background:rgba(0,0,0,.06)}
#nwLikes .nwl-user:hover{background:rgba(0,0,0,.09)}
#nwLikes .nwl-user img{width:40px;height:40px;border-radius:50%;display:block;flex:0 0 40px;margin:0 auto}
#nwLikes .nwl-name{padding:0 5px;font-size:14px;font-weight:700}
.cws-themed .nw-mt{padding:0 5px;min-width:0}
.cws-themed .nw-menu .submenu_item:hover{background:rgba(0,0,0,.10)}
/* fix: avatar was centred (margin:auto) pushing the name to the right edge — Cody: avatar 40px cell, name right after it */
#nwLikes .nwl-user{justify-content:flex-start}
#nwLikes .nwl-user img{margin:0 !important;flex:0 0 40px}
#nwLikes .nwl-name{flex:1 1 auto;min-width:0;text-align:left}

/* ===== Right panel = CodyChat #chat_right (280px, bar 40px, .user_count, .user_item) ===== */
:root{--rpanel-w:280px}
.cws-themed #rpanel{top:50px !important;width:280px !important;border-left:0 !important;border-radius:0;box-shadow:0 1px 3px rgba(0,0,0,.2) !important;overflow:hidden}
.cws-themed .rpanel-tabbar{display:flex !important;align-items:stretch;gap:0 !important;padding:0 !important;height:40px;border-bottom:1px solid var(--th-border) !important;background:transparent !important}
.cws-themed .rpanel-tab,.cws-themed .rpanel-close-btn{width:40px !important;height:40px !important;min-width:40px;margin:0 !important;border-radius:0 !important;font-size:14px !important;background:transparent;color:var(--th-text) !important;border:0;outline:0}
.cws-themed .rpanel-tab:hover,.cws-themed .rpanel-close-btn:hover{background:rgba(0,0,0,.10) !important;color:var(--th-text) !important}
.cws-themed .rpanel-tab.active{background:rgba(0,0,0,.08) !important;color:var(--th-text) !important}
.cws-themed:not(.cws-tone-light) .rpanel-tab.active{background:rgba(255,255,255,.08) !important}
.cws-themed:not(.cws-tone-light) .rpanel-tab:hover,.cws-themed:not(.cws-tone-light) .rpanel-close-btn:hover{background:rgba(255,255,255,.10) !important}
.cws-themed .rpanel-tab.active::after{display:none !important}
.cws-themed .rpanel-content{padding:0 0 60px !important}
.cws-themed .ul-count{padding:10px !important;font-size:13px !important;font-weight:700;text-transform:none !important;letter-spacing:0 !important;color:var(--th-text) !important;justify-content:flex-start;gap:6px}
.cws-themed .ul-badge{min-width:0 !important;border-radius:50px !important;padding:4px 7px !important;font-size:11px !important;line-height:12px;font-weight:700}
.cws-themed .ul-list{padding:0 10px !important}
.cws-themed .ul-item{display:flex;align-items:center;gap:0 !important;padding:5px 10px !important;border-radius:5px !important;position:relative;min-height:46px;box-sizing:border-box}
.cws-themed .ul-av{flex:0 0 36px !important;width:36px !important;height:36px !important;position:relative}
.cws-themed .ul-av img.ul-gen{width:36px !important;height:36px !important;border-radius:50%;border:2px solid #ccc;box-sizing:border-box;background:#fff}
.cws-themed .ul-av img.ul-gen-male{border-color:#03add8}
.cws-themed .ul-av img.ul-gen-female{border-color:#ff99ff}
.cws-themed .ul-av img.ul-gen-other{border-color:#ccc}
.cws-themed .ul-av img.ul-dot{position:absolute;left:0 !important;bottom:-2px !important;right:auto !important;width:14px !important;height:14px !important;border:0 !important;border-radius:50%;background:#fff !important;padding:1px;box-sizing:border-box}
.cws-themed .ul-data{padding:0 8px;overflow:hidden}
.cws-themed .ul-name{font-size:14px !important;font-weight:700;line-height:1.3}
.cws-themed .ul-mood{font-size:11px !important;line-height:1.3}
.cws-themed .ul-mood:empty{display:none}
.cws-themed .ul-rank{flex:0 0 24px;width:24px;max-width:24px !important;text-align:center;justify-content:center}
.cws-themed .ul-rank-icon{height:15px;width:auto}
.cws-themed .ul-item:hover{background:rgba(0,0,0,.10) !important}
.cws-themed:not(.cws-tone-light) .ul-item:hover{background:rgba(255,255,255,.08) !important}
.cws-themed .rpanel-user-row{padding:8px !important;border-radius:5px;margin:0 10px;gap:0}
.cws-themed .rpanel-user-avatar{width:40px !important;height:40px !important}
.cws-themed .rpanel-user-info{padding:0 5px}
.cws-themed .rpanel-username{font-size:14px !important;font-weight:700 !important}
.cws-themed .rpanel-rank{font-size:11px !important}
.cws-themed .rpanel-section-title{text-transform:none !important;letter-spacing:0 !important;font-size:13px !important;padding:10px !important}
@media (max-width:767px){.cws-themed #rpanel{width:min(100%,280px) !important}}

/* ===== Upload progress ring on the 📎 button (room + private) ===== */
.chat-attach-btn,#pmAttachBtn{position:relative}
.up-busy>i{opacity:.35;transition:opacity .2s}
.up-ring{position:absolute;inset:-2px;display:flex;align-items:center;justify-content:center;pointer-events:none}
.up-ring svg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.up-ring circle{fill:none;stroke-width:2.6}
.up-track{stroke:rgba(128,128,128,.28)}
.up-bar{stroke:url(#upg);stroke-linecap:round;transition:stroke-dashoffset .18s linear;filter:drop-shadow(0 0 3px rgba(3,173,216,.55))}
.up-pct{position:relative;font:700 10px/1 system-ui,sans-serif;color:var(--th-text,currentColor)}
.up-ring.wait svg{animation:upspin 1s linear infinite}
.up-ring.wait .up-bar{stroke-dasharray:22 100 !important;stroke-dashoffset:0 !important}
@keyframes upspin{to{transform:rotate(270deg)}}
.up-cancel{position:absolute;top:-5px;left:-5px;width:16px;height:16px;border-radius:50%;background:#e5365a;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.4);z-index:2;transition:transform .12s}
.up-cancel:hover{transform:scale(1.15)}
.up-cancel svg{width:8px;height:8px}

/* Private header = Cody: expand, minimize, gear, plain × (no red circle) */
.cws-themed #pmBox .pm-box-header #pmCloseBtn{width:40px !important;height:40px !important;margin:0 !important;padding:0 !important;border:0 !important;border-radius:0 !important;background:transparent !important;color:#fff !important;font-size:16px !important;display:inline-flex;align-items:center;justify-content:center}
.cws-themed #pmBox .pm-box-header #pmCloseBtn:hover{background:rgba(255,255,255,.12) !important;color:#fff !important}

/* PM gear menu = Cody subMenu card (Bloquear / Eliminar) */
.cws-themed #pmBox .pmx-menu{width:268px !important;padding:6px 0 !important;border-radius:20px !important;background:var(--th-panel-bg,#fff) !important;border:0 !important;box-shadow:0 2px 14px rgba(0,0,0,.22) !important;top:calc(100% + 6px) !important;right:0 !important;overflow:hidden}
.cws-themed #pmBox .pmx-menu button{display:flex !important;align-items:center;gap:14px;width:100%;padding:10px 18px !important;background:transparent !important;border:0 !important;text-align:left;cursor:pointer;color:var(--th-text,#333) !important}
.cws-themed #pmBox .pmx-menu button:hover{background:rgba(0,0,0,.06) !important}
.cws-themed #pmBox .pmx-menu button i{width:20px;text-align:center;font-size:18px !important;color:var(--th-accent,#03add8) !important}
.cws-themed #pmBox .pmx-menu .pmx-mt{display:flex;flex-direction:column;min-width:0}
.cws-themed #pmBox .pmx-menu .pmx-mt b{font-size:16px;font-weight:700;line-height:1.25;color:var(--th-text,#222)}
.cws-themed #pmBox .pmx-menu .pmx-mt small{font-size:13px;color:var(--th-sub-text,#888);line-height:1.3}
/* maximized private box sits flush under the 50px topbar */
.cws-themed #pmBox.pmx-full{top:50px !important}
@media (max-width:767px){.cws-themed #pmBox.pmx-full{top:50px !important}}
body.rpanel-open .cws-themed #pmBox.pmx-full,body.pm-docked .cws-themed #pmBox.pmx-full{top:50px !important}

/* PM menu: Cody original submenu metrics (title 13px bold, sub 11px, icon 30px cell, 220px) */
.cws-themed #pmBox .pmx-menu{width:220px !important;border-radius:10px !important;padding:0 !important}
.cws-themed #pmBox .pmx-menu button{gap:0;padding:8px 10px !important}
.cws-themed #pmBox .pmx-menu button i{flex:0 0 30px;width:30px;font-size:15px !important}
.cws-themed #pmBox .pmx-menu .pmx-mt{padding:0 5px}
.cws-themed #pmBox .pmx-menu .pmx-mt b{font-size:13px !important;font-weight:700}
.cws-themed #pmBox .pmx-menu .pmx-mt small{font-size:11px !important}

/* ===== Message menu = CodyChat #log_menu / actions_logs (200px, r15, subMenu items) ===== */
#_cwsDotMenu{width:200px;padding:0 !important;min-width:0 !important;border-radius:15px !important;overflow:hidden;background:var(--th-panel-bg,#fff) !important;border:0 !important;box-shadow:0 2px 12px rgba(0,0,0,.25) !important;font-size:14px}
#_cwsDotMenu .dot-item{display:flex !important;align-items:center;gap:0;padding:10px !important;cursor:pointer;width:100%;box-sizing:border-box;white-space:normal;color:var(--th-text,#333) !important;background:transparent}
#_cwsDotMenu .dot-item[style*="display: none"]{display:none !important}
#_cwsDotMenu .dot-item:hover{background:rgba(0,0,0,.08) !important}
.cws-themed:not(.cws-tone-light) #_cwsDotMenu .dot-item:hover{background:rgba(255,255,255,.08) !important}
#_cwsDotMenu .subm_icon{flex:0 0 30px;width:30px;text-align:center;font-size:15px;color:var(--th-accent,#03add8) !important}
#_cwsDotMenu .subm_icon i{color:var(--th-accent,#03add8) !important}
#_cwsDotMenu .dot-txt{flex:1;min-width:0;padding:0 5px}
#_cwsDotMenu p{margin:0}
#_cwsDotMenu .subm_title{font-size:13px;font-weight:700;color:var(--th-text,#222) !important}
#_cwsDotMenu .subm_sub{font-size:11px;color:var(--th-sub-text,#888) !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 3 dots always visible */
.msg-dot-btn{background:none;border:0;cursor:pointer;color:var(--th-muted,#bbb) !important;padding:2px 6px;border-radius:4px;font-size:12px;line-height:1;opacity:1 !important}
.msg-dot-btn:hover{color:var(--th-text,#555) !important}
#messages .message{cursor:pointer}

/* ===== Reply / quote = CodyChat exact (.cqbox/.cquote/.cqwrap, .qwraper/.qcontrol, .hunt_quote) ===== */
/* quote card inside a chat message */
.cws-themed .msg-quote{display:table !important;table-layout:auto;width:auto !important;max-width:min(800px,calc(100% - 40px)) !important;margin:3px 0 4px !important;padding:8px !important;border-radius:10px !important;gap:0 !important;background:var(--th-selected,rgba(0,0,0,.08)) !important;box-sizing:border-box}
.cws-themed .msg-quote-avatar{display:table-cell !important;width:24px !important;height:24px !important;flex:none !important;border-radius:50% !important;float:left;margin:0 5px 0 0}
.cws-themed .msg-quote-body{display:block;overflow:hidden;padding:0 5px}
.cws-themed .msg-quote-name{font-size:11px !important;font-weight:700 !important;line-height:1.3}
.cws-themed .msg-quote-text{font-size:13px !important;line-height:1.3;opacity:1 !important;display:block;-webkit-line-clamp:unset;white-space:normal !important;word-break:break-word}
.cws-themed .msg-quote-thumb{width:160px !important;margin-top:4px;border-radius:8px !important}
/* "Quote" chip above the composer (room + private): 180px, 46px tall, avatar 36 */
.cws-themed .quote-bar,.cws-themed .pmx-reply{width:180px;max-width:calc(100% - 20px);height:46px;box-sizing:border-box;margin:6px auto !important;padding:5px !important;gap:0 !important;border:0 !important;border-radius:10px !important;background:var(--th-item-bg,#f3f3f3) !important;box-shadow:0 1px 3px rgba(0,0,0,.2);display:flex;align-items:center}
.cws-themed .quote-bar.hidden,.cws-themed .pmx-reply[hidden]{display:none !important}
.cws-themed .quote-bar-avatar,.cws-themed .pmx-reply-av{width:36px !important;height:36px !important;flex:0 0 36px;border-radius:50% !important;object-fit:cover;display:block}
.cws-themed .quote-bar-thumb{display:none !important}
.cws-themed .quote-bar-body,.cws-themed .pmx-reply-body{flex:1;min-width:0;padding:0 5px;display:block !important}
.cws-themed .quote-bar-label,.cws-themed .pmx-reply-lbl{display:block;font-size:11px;font-weight:700;color:var(--th-accent,#03add8) !important;line-height:1.2}
.cws-themed .quote-bar-name,.cws-themed .pmx-reply-body b{display:block;font-size:13px;font-weight:400;color:var(--th-text,#333) !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
.cws-themed .quote-bar-cancel,.cws-themed #pmReplyCancel{flex:0 0 30px;width:30px !important;height:30px !important;padding:0 !important;font-size:16px;color:var(--th-text,#333) !important;background:none !important;border:0;border-radius:0 !important;display:flex;align-items:center;justify-content:center}
/* private: the quote is its own bubble above the message (.hunt_quote/.targ_quote: p10, r10, max 220, lh 1.4em) */
.cws-themed #pmBox .pm-msg .pmx-quote{display:block !important;width:fit-content;max-width:220px;margin:0 0 -6px 30px !important;padding:10px !important;border:0 !important;border-radius:10px !important;font-size:inherit !important;line-height:1.4em;background:var(--th-selected,rgba(0,0,0,.10)) !important;color:var(--th-text,inherit) !important;opacity:.9;-webkit-line-clamp:3;position:relative;z-index:0}
.cws-themed #pmBox .pm-msg.mine .pmx-quote{margin:0 30px -6px auto !important}
.cws-themed #pmBox .pm-msg .pmx-bubble-row{position:relative;z-index:1}

/* Quote chip FLOATS over the message area, centred, 5px above the input (CodyChat .qwraper) */
.cws-themed section.chat{position:relative}
.cws-themed .quote-bar,.cws-themed .pmx-reply{position:absolute !important;left:50% !important;right:auto !important;transform:translateX(-50%);margin:0 !important;z-index:60;bottom:60px}

/* quoted media shown as the real player / video / picture (CodyChat qcontent) */
.cws-themed .msg-quote-embed{margin-top:4px;max-width:260px}
.cws-themed .msg-quote-embed .embed-block{margin:0;max-width:100%}
.cws-themed .msg-quote-embed .embed-youtube{width:240px !important;max-width:100% !important;margin:0 !important}
.cws-themed .msg-quote-embed img.chat-embed-image{max-width:240px;max-height:180px;border-radius:8px;display:block}
.cws-themed .msg-quote-embed .embed-file{max-width:100%}

/* CodyChat #back_to_bottom: 40px wide, pad10, radius 15, rgba(100,100,100,.4), top 5px centred */
#back_to_bottom{width:40px;box-sizing:border-box;position:absolute;top:5px;left:50%;transform:translateX(-50%);border-radius:15px;overflow:hidden;cursor:pointer;text-align:center;z-index:40;background-color:rgba(100,100,100,.4);color:#fff;padding:10px;opacity:0;pointer-events:none;transition:opacity .4s}
#back_to_bottom.show{opacity:1;pointer-events:auto}
#back_to_bottom i{display:block;font-size:14px;line-height:16px}

/* private quote bubble holding media: real picture / player / YouTube thumb, small */
.cws-themed #pmBox .pmx-quote .pm-media{margin:0;line-height:0}
.cws-themed #pmBox .pmx-quote .pm-embed-image{width:120px !important;max-height:140px !important;border-radius:8px !important;display:block}
.cws-themed #pmBox .pmx-quote .embed-youtube,.cws-themed #pmBox .pmx-quote .pm-embed-yt{width:200px !important;max-width:100% !important;margin:0 !important;border-radius:8px !important}
.cws-themed #pmBox .pm-msg .pmx-quote{max-width:220px !important}
.cws-themed #pmBox .pmx-quote .embed-file{max-width:100%;min-width:0}
.cws-themed #pmBox .pmx-quote a{color:inherit;word-break:break-all}

/* ===== Private message actions = CodyChat .privopt/.ppitem: reply + trash, 32px cells, 16px icons, shown on hover ===== */
.cws-themed #pmBox .pmx-actions{display:flex !important;align-items:center;gap:0 !important;margin:0 5px !important;padding:0;align-self:center;opacity:0;transition:opacity .15s;position:relative;z-index:3}
.cws-themed #pmBox .pm-msg:hover .pmx-actions,.cws-themed #pmBox .pm-msg:focus-within .pmx-actions{opacity:1 !important}
@media (hover:none){.cws-themed #pmBox .pmx-actions{opacity:1 !important}}
.cws-themed #pmBox .pmx-actions button{width:32px !important;height:auto !important;padding:5px !important;margin:0;border:0 !important;border-radius:0 !important;background:transparent !important;color:var(--th-muted,#ccc) !important;font-size:16px !important;line-height:1.3;text-align:center;cursor:pointer}
.cws-themed #pmBox .pmx-actions button:hover{background:transparent !important;color:var(--th-text,#555) !important}
.cws-themed #pmBox .pmx-actions button i{font-size:16px;line-height:1}
/* order beside the bubble: outgoing [trash][reply][bubble]; incoming [bubble][reply] */

/* ===== Minimized private chat = CodyChat #dpriv: 30px round avatar, plain red dot 11px on its top-left corner ===== */
.cws-themed .pm-dock-chip{width:30px !important;height:30px !important;border:0 !important;border-radius:50% !important;padding:0 !important;position:relative;overflow:visible !important;box-shadow:none !important;background:transparent !important}
.cws-themed .pm-dock-chip>img{width:30px !important;height:30px !important;border-radius:50% !important;display:block;object-fit:cover}
.cws-themed .pm-dock-chip.has-unread{box-shadow:none !important}
.cws-themed .pm-dock-dot{display:none !important}
.cws-themed .pm-dock-badge{position:absolute !important;top:0 !important;left:0 !important;right:auto !important;bottom:auto !important;width:11px !important;height:11px !important;min-width:11px !important;padding:0 !important;font-size:0 !important;line-height:0 !important;overflow:hidden;border-radius:50% !important;background:#c83d3d !important;border:1px solid #fff !important;color:transparent !important;box-sizing:border-box}

/* ===== Theme-aware popups (were hard-coded light): user card, profile hub, language picker ===== */
.up-card{background:var(--th-panel-bg,#fff) !important;color:var(--th-text,#333) !important}
.up-row{border-top-color:var(--th-border,#eee) !important;color:var(--th-text,#333) !important}
.up-row:hover{background:var(--th-hover,#f5f5f5) !important}
.hub-card,.hub-sub{background:var(--th-panel-bg,#fff) !important;color:var(--th-text,#333) !important}
.hub-tabs{background:var(--th-item-bg,#f5f5f5) !important}
.hub-tabs li{color:var(--th-sub-text,inherit)}
.hub-tabs li.on{background:var(--th-selected,#e3e3e3) !important;color:var(--th-text,#222) !important}
.hub-row{border-bottom-color:var(--th-border,#eee) !important;color:var(--th-text,#333)}
.hub-row:hover{background:var(--th-hover,#fafafa) !important}
.hub-sub input,.hub-sub textarea,.hub-sub select{background:var(--th-item-bg,#fff) !important;color:var(--th-text,#333) !important;border-color:var(--th-border,#ddd) !important}
.cws-lang-modal{background:var(--th-panel-bg,#fff) !important;color:var(--th-text,#333) !important}

/* ── Radio (CodyChat core player): ▶ at the left of the footer, #player_menu 320px above it ── */
#fbtnRadio{margin-right:auto}
#fbtnRadio[hidden]{display:none !important}
.cws-themed #fbtnRadio{width:38px !important;height:32px !important;font-size:22px !important;color:#fff !important;background:none !important}
.cws-themed #fbtnRadio:hover,.cws-themed #fbtnRadio.active,.cws-themed #fbtnRadio.playing{color:var(--th-accent,#03add8) !important}
.radio-menu{position:fixed;left:0;bottom:var(--footer-h,38px);width:320px;max-width:100vw;z-index:1070;background:var(--th-panel-bg,#fff);color:var(--th-text,#333);border:1px solid var(--th-border,#e6e6e6);border-left:0;border-bottom:0;border-radius:0 12px 0 0;box-shadow:0 -2px 14px rgba(0,0,0,.25);overflow:hidden;font-size:14px}
.radio-menu[hidden],.radio-stations[hidden]{display:none !important}
.radio-main{padding:0 8px}
.radio-cur{display:flex;align-items:center;gap:6px;padding:10px 0;border-bottom:1px solid var(--th-border,#e6e6e6)}
.radio-play{width:44px;height:44px;border:0;background:none;color:var(--th-accent,#03add8);font-size:36px;line-height:1;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.radio-name{flex:1;min-width:0;display:flex;flex-direction:column;padding:0 5px}
.radio-lbl{font-size:11px;color:var(--th-accent,#03add8)}
#current_station{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.radio-list-btn{width:40px;height:40px;border:0;background:none;color:var(--th-text,#333);font-size:18px;cursor:pointer}
.radio-list-btn:hover{color:var(--th-accent,#03add8)}
.radio-vol{display:flex;align-items:center;gap:6px;height:40px}
.radio-vol i{width:34px;text-align:center;font-size:18px;color:var(--th-sub-text,#888)}
.radio-vol input[type=range]{flex:1;-webkit-appearance:none;appearance:none;height:4px;border-radius:2px;outline:0;cursor:pointer;background:linear-gradient(to right,var(--th-accent,#03add8) var(--v,50%),var(--th-selected,rgba(0,0,0,.15)) var(--v,50%))}
.radio-vol input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--th-accent,#03add8);border:2px solid #fff;box-shadow:0 0 2px rgba(0,0,0,.4)}
.radio-vol input[type=range]::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:var(--th-accent,#03add8);border:2px solid #fff}
.radio-stations{display:flex;flex-direction:column;max-height:300px}
.radio-menu.list .radio-main{display:none}
.radio-st-top{display:flex;align-items:center;height:40px;background:var(--th-header-bg,#222);color:#fff;font-size:13px;font-weight:700}
.radio-st-top button{width:40px;height:40px;border:0;background:none;color:#fff;font-size:15px;cursor:pointer}
.radio-st-list{overflow-y:auto;padding:8px;flex:1}
.radio_item{padding:10px;margin-bottom:3px;border-radius:5px;cursor:pointer;font-size:13px;font-weight:700}
.radio_item:hover{background:var(--th-hover,rgba(0,0,0,.06))}
.radio_item.sel{background:var(--th-selected,rgba(0,0,0,.09));color:var(--th-accent,#03add8)}

/* ── DJ "On Air status" modal (CodyChat onair.php: label + On/Off select) ── */
.cws-dj-back{position:fixed;inset:0;z-index:9500;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center}
.cws-dj-card{width:360px;max-width:calc(100vw - 20px);background:var(--th-panel-bg,#fff);color:var(--th-text,#333);border-radius:15px;box-shadow:0 10px 40px rgba(0,0,0,.4);overflow:hidden}
.cws-dj-top{display:flex;align-items:center;padding:0 0 0 14px;height:48px;font-weight:700;font-size:14px}
.cws-dj-top span{flex:1}
.cws-dj-x{width:44px;height:44px;border:0;background:none;color:var(--th-text,#333);font-size:18px;cursor:pointer}
.cws-dj-body{padding:4px 14px 18px}
.cws-dj-body select{width:100%;padding:12px 10px;border:1px solid var(--th-border,#e6e6e6);border-radius:5px;background:var(--th-item-bg,rgba(0,0,0,.05));color:var(--th-text,#333);font-size:14px}

/* ── Level / XP / Badges / Leaderboards (CodyChat core) — js/xp.js ─────────────── */
.cws-xp-back{position:fixed;inset:0;z-index:1000050;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center}
.cws-xp-card{max-width:calc(100vw - 20px);max-height:calc(100vh - 30px);display:flex;flex-direction:column;background:var(--th-panel-bg,#fff);color:var(--th-text,#333);border-radius:15px;box-shadow:0 10px 40px rgba(0,0,0,.4);overflow:hidden}
.cws-xp-top{display:flex;align-items:center;padding:0 0 0 16px;height:50px;flex:0 0 auto;font-weight:700;font-size:15px}
.cws-xp-top span{flex:1}
.cws-xp-x{width:46px;height:46px;border:0;background:none;color:var(--th-text,#333);font-size:18px;cursor:pointer}
.cws-xp-body{padding:4px 16px 16px;overflow:auto;flex:1 1 auto;min-height:0}
.cws-xp-progress{padding:6px 0 4px}
.cws-xp-pbox{height:22px;border-radius:12px;background:var(--th-item-bg,rgba(0,0,0,.08));overflow:hidden}
.cws-xp-pbar{height:100%;min-width:36px;background:var(--th-accent,#03add8);color:#fff;font-size:11px;font-weight:700;line-height:22px;border-radius:12px;white-space:nowrap}
.cws-xp-psub{font-size:12px;opacity:.75;padding:6px 4px 14px}
.cws-xp-rows{border:1px solid var(--th-border,#e6e6e6);border-radius:10px;overflow:hidden}
.cws-xp-row{display:flex;justify-content:space-between;padding:12px 14px;font-size:14px;border-bottom:1px solid var(--th-border,#e6e6e6)}
.cws-xp-row:last-child{border-bottom:0}
.cws-xp-row span{opacity:.85}
.cws-xp-binfo{display:flex;align-items:center;gap:12px;padding:12px 4px;border-bottom:1px solid var(--th-border,#e6e6e6)}
.cws-xp-binfo:last-child{border-bottom:0}
.cws-xp-bicon{flex:0 0 40px}
.cws-xp-bicon img{width:40px;height:40px;display:block}
.cws-xp-btxt p{margin:0;font-size:13px;line-height:1.4}
.cws-xp-btxt p.t{font-weight:700;margin-bottom:3px;font-size:14px}
.cws-xp-foot{padding:10px 16px 16px;flex:0 0 auto}
.cws-xp-foot button{width:100%;padding:11px;border:0;border-radius:6px;background:var(--th-accent,#03add8);color:#fff;font-weight:700;font-size:14px;cursor:pointer}
.cws-xp-sel select{width:100%;padding:12px 10px;border:1px solid var(--th-border,#e6e6e6);border-radius:8px;background:var(--th-item-bg,rgba(0,0,0,.05));color:var(--th-text,#333);font-size:14px}
.cws-xp-tabs{display:flex;gap:4px;margin:12px 0 4px;border-bottom:1px solid var(--th-border,#e6e6e6)}
.cws-xp-tabs button{flex:1;padding:10px 6px;border:0;background:none;color:var(--th-sub-text,#777);font-size:13px;font-weight:600;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}
.cws-xp-tabs button.on{color:var(--th-accent,#03add8);border-bottom-color:var(--th-accent,#03add8)}
.cws-xp-list{margin-top:8px;max-height:min(60vh,520px);overflow:auto}
.cws-xp-lrow{display:flex;align-items:center;gap:10px;padding:8px 6px;border-bottom:1px solid var(--th-border,#e6e6e6);cursor:pointer;border-radius:8px}
.cws-xp-lrow:hover{background:var(--th-hover,rgba(0,0,0,.05))}
.cws-xp-lrow.me{background:var(--th-selected,rgba(3,173,216,.1))}
.cws-xp-lrow .rk{width:34px;text-align:center;font-weight:700;font-size:15px;flex:0 0 34px}
.cws-xp-lrow .rk img{width:24px;height:24px;display:block;margin:0 auto}
.cws-xp-lrow .av{flex:0 0 38px}
.cws-xp-lrow .av img{width:38px;height:38px;border-radius:50%;object-fit:cover;display:block}
.cws-xp-lrow .nm{flex:1;min-width:0;font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cws-xp-lrow .sc{flex:0 0 auto;text-align:right;font-size:14px;min-width:50px}
.cws-xp-lrow .ic{flex:0 0 22px}
.cws-xp-lrow .ic img{width:16px;height:16px;display:block;margin:0 auto}
.cws-xp-empty{padding:30px 10px;text-align:center;opacity:.7;font-size:14px}
.cws-xp-empty img{width:64px;display:block;margin:0 auto 8px;opacity:.8}
.cws-xp-card-prof{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 12px 12px}
.cws-xp-plevel{display:inline-flex;align-items:center;gap:3px;padding:3px 10px 3px 5px;border-radius:100px;background:var(--th-item-bg,rgba(255,255,255,.08));font-size:13px;font-weight:700;cursor:pointer}
.cws-xp-plevel img{width:24px;height:24px;border-radius:50%}
.cws-xp-pbadges{display:flex;flex-wrap:wrap;gap:6px}
.cws-xp-pbadge{position:relative;width:40px;height:40px;cursor:pointer}
.cws-xp-pbadge .i{width:40px;max-height:40px;display:block}
.cws-xp-pbadge .c{position:absolute;right:0;bottom:0;width:18px;height:18px;border-radius:50%;background:#666}

/* ── Profile style (CodyChat pstyle) — js/pstyle.js ───────────────────────────── */
.cws-ps-nav{display:flex;align-items:center;justify-content:center;gap:14px;padding:6px 0 0;font-size:13px;opacity:.85}
.cws-ps-nav button{width:36px;height:36px;border:0;border-radius:50%;background:var(--th-item-bg,rgba(0,0,0,.08));color:var(--th-text,#333);cursor:pointer}
.cws-ps-remove{text-align:center;padding:10px 0 4px}
.cws-ps-remove button{background:none;border:0;color:var(--th-sub-text,#888);font-size:13px;cursor:pointer;padding:8px 10px}
.cws-ps-sel{padding:10px 26px;border:0;border-radius:6px;background:var(--th-accent,#03add8);color:#fff;font-weight:700;font-size:14px;cursor:pointer}
.cws-ps-sel:disabled{opacity:.6}
.cws-psv{max-width:400px;margin:0 auto;padding:22px 22px 24px}
.cws-psv .psv-wrap{border-radius:20px;overflow:hidden;background:var(--th-panel-bg,#fff);color:var(--th-text,#333);box-shadow:0 2px 14px rgba(0,0,0,.18)}
.cws-psv .psv-top{position:relative;min-height:190px;background:linear-gradient(135deg,#4b5563,#1f2937) center/cover;color:#fff}
.cws-psv .psv-tag{position:absolute;top:10px;left:10px;font-size:13px}
.cws-psv .psv-tag span{display:inline-block;padding:5px 9px;border-radius:5px;background:rgba(0,0,0,.35)}
.cws-psv .psv-data{text-align:center;padding-top:44px;padding-bottom:12px}
.cws-psv .psv-avatar{width:60px;height:60px;border-radius:50%;border:2px solid #fff;object-fit:cover}
.cws-psv .psv-rank{font-weight:700;font-size:11px;margin-top:3px}
.cws-psv .psv-name{font-weight:700;font-size:15px}
.cws-psv .psv-menu{display:flex;justify-content:center;gap:4px;padding:8px 0;background:var(--th-item-bg,rgba(0,0,0,.04));font-size:13px}
.cws-psv .psv-menu span{padding:5px 12px;opacity:.7}
.cws-psv .psv-menu span.on{opacity:1;font-weight:700}
.cws-psv .psv-content{padding:16px 22px 18px;font-size:12px}
.cws-psv .psv-row{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--th-border,rgba(128,128,128,.25))}
.cws-psv .psv-choice{text-align:center;padding-top:16px}

/* level pill on the user card (CodyChat .clevel) */
.up-top .cws-xp-clevel{position:absolute;right:10px;top:10px;display:flex;align-items:center;gap:2px;background:rgba(255,255,255,.14);border-radius:100px;padding:3px 8px 3px 5px;cursor:pointer;font-size:12px;font-weight:700;line-height:18px}
.up-top .cws-xp-clevel img{width:18px;height:18px;border-radius:50%}

/* level chip in the profile cover + badge row */
.cws-themed .pv-chip.cws-xp-lvchip{padding:3px 10px 3px 3px}
.cws-themed .pv-chip.cws-xp-lvchip img{width:24px;height:24px;border-radius:50%}
.cws-xp-badgerow{display:flex;justify-content:center;padding:6px 0 10px}
.cws-xp-badgerow .cws-xp-pbadges{justify-content:center}

/* profile > Friends tab (CodyChat user_square: 6 columns, name over the bottom edge, < > pager) */
#profileFriendsList{padding:4px 0}
.cws-fr-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;padding:6px 4px}
.cws-fr-item{position:relative;aspect-ratio:1/1;border-radius:8px;overflow:hidden;cursor:pointer;background:rgba(128,128,128,.25)}
.cws-fr-item img{width:100%;height:100%;object-fit:cover;display:block}
.cws-fr-name{position:absolute;left:0;right:0;bottom:0;padding:3px 4px;font-size:11px;font-weight:600;text-align:center;color:#fff;background:rgba(0,0,0,.45);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cws-fr-item:hover{box-shadow:0 0 0 2px var(--th-accent,#03add8)}
.cws-fr-pager{display:flex;justify-content:center;gap:14px;padding:16px 0 6px}
.cws-fr-pager button{width:54px;height:40px;border:0;border-radius:10px;background:var(--th-item-bg,rgba(128,128,128,.2));color:var(--th-text,#333);font-weight:700;font-size:14px;cursor:pointer}
.cws-fr-pager button:disabled{opacity:.35;cursor:default}
.cws-fr-msg{text-align:center;padding:18px;font-size:13px;opacity:.7}
@media (max-width:560px){.cws-fr-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}}

/* gifts: received (profile tab) + picker (CodyChat gift_profile / gift look) */
.cws-themed .gift-grid-profile{grid-template-columns:repeat(auto-fill,minmax(96px,126px));gap:14px;padding:14px 4px 6px;justify-content:start}
.cws-themed .gift-card{position:relative;height:105px;padding:8px;justify-content:center;border:1px solid var(--th-border,rgba(128,128,128,.22));border-radius:10px;background:var(--th-panel-bg,transparent)}
.cws-themed .gift-card .gift-img{width:64px;height:64px}.cws-themed .gift-card .gift-emoji{font-size:52px}
.cws-themed .gift-card .gift-count{position:absolute;left:8px;right:auto;top:auto;bottom:6px;width:24px;height:24px;border-radius:50%;background:#fff;color:#222;border:1px solid rgba(0,0,0,.12);font-size:13px;font-weight:800;display:flex;align-items:center;justify-content:center}
.cws-themed .gift-card .gift-card-title{display:none}
.gp2{position:relative;padding:34px 14px 8px}
.gp2 .gp-close{position:absolute;top:2px;right:2px;width:36px;height:36px;border-radius:50%;background:transparent;font-size:20px}
.gp2 .gp-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;max-height:none;overflow:visible;padding:4px}
.gp2 .gift-item{position:relative;min-height:165px;justify-content:center;gap:6px;padding:10px 6px;border:1px solid var(--th-border,rgba(128,128,128,.22));border-radius:10px;background:var(--th-panel-bg,transparent)}
.gp2 .gift-item .gift-img{width:96px;height:96px}.gp2 .gift-item .gift-emoji{font-size:72px}
.gp2 .gift-item .gift-item-title{display:none}
.gp2 .gift-price{display:inline-flex;align-items:center;gap:4px;padding:2px 10px 2px 4px;border:1px solid var(--th-border,rgba(128,128,128,.25));border-radius:20px;font-size:14px;font-weight:800;color:var(--th-text,#333);background:var(--th-panel-bg,#fff)}
.gp2 .gift-price img{width:22px;height:22px}
.gp2 .gp-pager{display:flex;justify-content:center;gap:14px;padding:18px 0 8px}
.gp2 .gp-pager button{width:58px;height:52px;border:0;border-radius:12px;background:var(--th-item-bg,rgba(128,128,128,.18));color:var(--th-text,#333);font-size:16px;font-weight:700;cursor:pointer}
.gp2 .gp-pager button:disabled{opacity:.35;cursor:default}
@media (max-width:560px){.gp2 .gp-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.gp2 .gift-item .gift-img{width:72px;height:72px}}
.element-box-inner:has(.gp2){max-width:690px !important;width:100%;padding:12px 16px 14px !important;overflow-y:auto}
.element-box-inner:has(.gp2) > .element-close{display:none !important}
.gp-confirm{text-align:center;padding:30px 20px 18px}
.gp-confirm .gp-c-img .gift-img{width:130px;height:130px}.gp-confirm .gp-c-img .gift-emoji{font-size:96px}
.gp-c-title{font-size:20px;font-weight:800;margin-top:14px;color:var(--th-text,#333)}
.gp-c-text{margin-top:8px;color:var(--th-sub-text,#777)}
.gp-c-price{display:inline-flex;align-items:center;gap:6px;margin-top:16px;font-size:18px;font-weight:800;color:var(--th-text,#333)}
.gp-c-price img{width:26px;height:26px}
.gp-c-btns{display:flex;gap:10px;justify-content:center;margin-top:20px}
.gp-c-btns button{min-width:110px;padding:10px 18px;border:0;border-radius:10px;font-weight:700;cursor:pointer;background:var(--th-item-bg,rgba(128,128,128,.2));color:var(--th-text,#333)}
.gp-c-btns .gp-c-ok{background:var(--th-accent,#2563eb);color:#fff}
.gift-selfbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 0 12px;flex-wrap:wrap;grid-column:1/-1;width:100%}
.gift-buy-own{padding:8px 14px;border:0;border-radius:8px;background:var(--th-accent,#2563eb);color:#fff;font-weight:700;cursor:pointer}
.gift-share{font-size:13px;color:var(--th-sub-text,#777);display:flex;align-items:center;gap:6px}
