*{box-sizing:border-box}html,body{margin:0;height:100%;font-family:Arial,Helvetica,sans-serif;color:#172033}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}:root{--accent:#1478ff;--accent-soft:#e7f0ff;--border:#dfe5ec;--muted:#8793a6;--sidebar:#fff;--panel:#fff;--chat:#fff;--text:#172033}
body.theme-orange{--accent:#ff8a2b;--accent-soft:#fff0e4}body.theme-purple{--accent:#8b5cf6;--accent-soft:#f0eaff}body.theme-red{--accent:#ef4444;--accent-soft:#feecec}body.theme-green{--accent:#10b981;--accent-soft:#e6f8f2}
body.dark{--sidebar:#141a24;--panel:#1c2431;--chat:#111722;--text:#eef4ff;--border:#2b3545;--muted:#9aa7ba;background:#0c1119;color:var(--text)}
.login-page{min-height:100vh;background:radial-gradient(circle at 10% 30%,#2d6db5 0,#163d72 28%,#081329 58%,#3a1765 100%);display:grid;place-items:center;padding:24px}.login-card{width:min(345px,92vw);background:#fff;border-radius:4px;box-shadow:8px 8px 0 rgba(255,255,255,.8),0 14px 50px rgba(0,0,0,.35);padding:30px 24px 0;text-align:center}.login-card h1{margin:0;color:#1d64e8;font-size:24px}.subtitle{font-size:10px;color:#7c8493;margin:6px 0 28px}.brand-sep{display:flex;align-items:center;gap:12px;color:#697386;margin-bottom:28px}.brand-sep span{height:1px;background:#ccd2dc;flex:1}.login-card input{width:100%;padding:12px;border:1px solid #c9ced7;background:#eef0f3;border-radius:3px;outline:none}.gender-switch{display:flex;justify-content:center;margin:14px 0 18px}.gender{border:1px solid #cbd1da;background:#eef1f5;padding:8px 18px}.gender.active{background:#dce8ff;color:#155ec9}.login-btn{background:#ffe1a4;border:1px solid #ffb24a;border-radius:20px;padding:9px 38px;color:#5a6574}.form-error{min-height:28px;padding:8px;color:#b00020;font-size:13px}.login-footer{display:flex;justify-content:space-around;border-top:1px solid #e7e9ee;margin:8px -24px 0;padding:16px 8px}.login-footer a{color:#70798b;text-decoration:none;font-size:12px}
.chat-page{height:100vh;overflow:hidden;background:#f4f6f9;color:var(--text)}.app{display:grid;grid-template-columns:350px 1fr;height:100vh}.sidebar{background:var(--sidebar);border-right:1px solid var(--border);min-width:0;overflow:hidden}.sidebar-icons{height:60px;display:grid;grid-template-columns:repeat(5,1fr);border-bottom:1px solid var(--border);background:var(--sidebar)}.top-icon{border:0;background:transparent;color:#8d99ab;padding:14px;position:relative}.top-icon svg,.composer-icon svg{width:25px;height:25px;fill:currentColor}.top-icon.active{color:var(--accent)}.top-icon.active:after{content:"";position:absolute;height:3px;left:18px;right:18px;bottom:0;background:var(--accent);border-radius:4px 4px 0 0}
.side-panel{display:none;height:calc(100vh - 60px);background:var(--panel)}.side-panel.active{display:block}.side-search{height:56px;padding:10px 14px;border-bottom:1px solid var(--border);display:flex;align-items:center;position:relative}.side-search input{width:100%;border:1px solid #ced6e0;border-radius:4px;padding:10px 36px 10px 11px;background:var(--sidebar);color:var(--text)}.side-search span{position:absolute;right:27px;color:#919eaf}.panel-heading{height:42px;display:flex;justify-content:space-between;align-items:center;padding:0 16px;font-size:12px;color:#6f7b8d;border-bottom:1px solid var(--border);letter-spacing:.4px}.rooms-list{overflow:auto;height:calc(100% - 98px)}.room-item{display:grid;grid-template-columns:32px 1fr auto auto;align-items:center;gap:8px;padding:11px 14px;border-bottom:1px solid var(--border);background:transparent;color:var(--text);cursor:pointer}.room-item:hover,.room-item.active{background:var(--accent-soft)}.room-star{border:0;background:transparent;color:#8d9aac;font-size:23px;padding:0}.room-star.on{color:#f4b400}.room-main b{display:block;font-size:14px}.room-main small{display:block;color:var(--muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.room-count{font-size:12px;color:#8792a3}.lock{font-size:15px;color:#64748b}
.tabs{display:grid;grid-template-columns:1fr 1fr 1.2fr;margin:10px 14px;border:1px solid var(--border);border-radius:4px;overflow:hidden}.tabs button{border:0;border-right:1px solid var(--border);background:var(--panel);color:var(--text);padding:9px}.tabs button.active{background:var(--accent-soft);color:var(--accent)}.users{padding:0 14px 14px;overflow:auto;height:calc(100% - 104px)}.user{display:flex;align-items:center;gap:12px;padding:13px 4px;border-bottom:1px solid var(--border)}.user .uavatar,.avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#dce5ef;font-weight:bold}.user.admin .uavatar{background:#ffcad5}.user b{display:block}.user small,.me small,.chat-header small{display:block;color:var(--muted);margin-top:4px}.rank-admin{color:#10b981;font-weight:bold}.blank-panel .empty-state{padding:28px 18px;color:var(--muted);text-align:center}.wide-action{display:block;width:calc(100% - 28px);margin:0 14px;border:0;background:var(--accent);color:#fff;border-radius:5px;padding:11px}
.settings-scroll{overflow:auto;height:100%;padding-bottom:20px}.setting-row{min-height:50px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;border-bottom:1px solid var(--border);font-size:13px}.setting-row select{border:0;background:transparent;color:var(--accent);outline:none;text-align:right}.switch{position:relative;width:37px;height:20px}.switch input{display:none}.switch i{position:absolute;inset:0;background:#d7dde5;border-radius:20px}.switch i:before{content:"";position:absolute;width:16px;height:16px;left:2px;top:2px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #999;transition:.2s}.switch input:checked+i{background:var(--accent)}.switch input:checked+i:before{transform:translateX(17px)}.theme-block{padding:16px}.theme-colors{display:flex;gap:12px;margin-top:12px}.tc{width:27px;height:27px;border-radius:50%;border:3px solid transparent}.tc.active{outline:2px solid var(--accent);outline-offset:2px}.tc.orange{background:#ff8a2b}.tc.purple{background:#8b5cf6}.tc.blue{background:#1478ff}.tc.red{background:#ef4444}.tc.green{background:#10b981}
.chat{min-width:0;display:grid;grid-template-rows:60px 1fr 62px;background:var(--chat)}.chat-header{display:flex;justify-content:space-between;align-items:center;padding:8px 18px;border-bottom:1px solid var(--border);background:var(--chat)}.room-head b{display:block}.me{display:flex;align-items:center;gap:10px}.me .avatar{width:38px;height:38px;background:var(--accent);color:#fff}.me button{border:0;background:transparent;font-size:24px;color:#9aa5b6}.messages{overflow:auto;padding:16px 24px;background:linear-gradient(135deg,#0f172a 0%,#27364e 52%,#0c1727 100%);position:relative}.messages:before{content:"";position:absolute;inset:0;background-image:radial-gradient(circle at 20% 20%,rgba(255,255,255,.08),transparent 25%),radial-gradient(circle at 80% 65%,rgba(23,120,255,.13),transparent 30%);pointer-events:none}.msg{position:relative;z-index:1;max-width:72%;width:max-content;background:#fff;color:#1f2937;border-radius:22px;padding:9px 13px;margin:8px 0;box-shadow:0 1px 4px rgba(0,0,0,.18)}.msg.system{margin-left:auto;margin-right:auto;background:#fff}.msg .name{font-weight:700;color:#1465d7;margin-right:6px}.msg time{font-size:10px;color:#8a94a5;margin-left:10px}.composer{display:flex;gap:7px;align-items:center;padding:8px 13px;border-top:1px solid var(--border);background:var(--chat);position:relative}.composer input{flex:1;min-width:80px;border:1px solid #cfd6e0;border-radius:5px;padding:11px 13px;background:var(--panel);color:var(--text)}.composer-icon,.send-btn{border:0;background:transparent;color:#8694a8;width:38px;height:38px;display:grid;place-items:center;border-radius:8px}.composer-icon:hover,.send-btn:hover{background:var(--accent-soft);color:var(--accent)}.send-btn{color:var(--accent);font-size:23px}.composer-icon.hand{font-size:22px}.composer-icon.radio{font-size:23px}.composer-icon.live{background:#ffe9e9;color:#ef4444}.emoji-wrap{position:relative}.emoji-panel{position:absolute;left:0;bottom:49px;width:260px;background:var(--panel);border:1px solid var(--border);border-radius:10px;box-shadow:0 10px 28px rgba(0,0,0,.25);padding:10px;display:grid;grid-template-columns:repeat(6,1fr);gap:4px;z-index:30}.emoji-panel button{border:0;background:transparent;font-size:23px;padding:5px;border-radius:6px}.emoji-panel button:hover{background:var(--accent-soft)}
.context-menu{position:fixed;z-index:50;width:190px;background:var(--panel);border-radius:4px;box-shadow:0 8px 28px rgba(0,0,0,.25);padding:4px 0;overflow:hidden}.context-menu button{display:block;width:100%;text-align:left;border:0;background:var(--panel);color:var(--text);padding:11px 14px}.context-menu button:hover{background:var(--accent-soft)}
.modal,.media-modal{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.5);display:grid;place-items:center;padding:14px}.admin-window{width:min(900px,96vw);max-height:92vh;overflow:auto;background:#fff;border:2px solid var(--accent)}.admin-title{position:sticky;top:0;z-index:2;background:var(--accent);color:#fff;padding:8px 12px;display:flex;justify-content:space-between}.modal-close{border:0;background:#fff;color:#111;font-weight:bold}.admin-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:12px}.admin-grid button{min-height:110px;border:0;border-radius:5px;background:var(--accent);color:#fff;font-size:38px;box-shadow:0 4px 10px rgba(0,0,0,.15)}.admin-grid button span{display:block;font-size:16px;margin-top:12px}.admin-content{padding:16px;color:#172033}.admin-content h3{margin-top:0}.admin-content input,.admin-content textarea,.admin-content select{width:100%;padding:9px;margin:5px 0 10px;border:1px solid #cbd3df;border-radius:5px}.admin-content textarea{min-height:80px}.btn{border:0;background:var(--accent);color:#fff;padding:9px 14px;border-radius:5px}.btn.danger{background:#dc2626}.table-wrap{overflow:auto}.admin-table{width:100%;border-collapse:collapse;font-size:13px}.admin-table th,.admin-table td{border-bottom:1px solid #e3e7ed;padding:9px;text-align:left;white-space:nowrap}.module-back{margin-bottom:12px;border:0;background:#eef3fa;padding:8px 12px;border-radius:5px}.media-box{width:min(620px,94vw);background:#fff;border-radius:10px;overflow:hidden}.media-title{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;background:var(--accent);color:#fff}.media-title button{border:0;background:#fff;border-radius:4px}.media-box video{display:block;width:100%;max-height:60vh;background:#101820}.media-box #mediaStatus{padding:12px;color:#374151}#toast{position:fixed;bottom:80px;left:50%;transform:translateX(-50%);background:#111827;color:#fff;padding:10px 14px;border-radius:7px;display:none;z-index:99}
@media(max-width:760px){.app{grid-template-columns:1fr}.sidebar{position:fixed;z-index:25;left:0;top:0;width:min(350px,92vw);height:100vh;box-shadow:4px 0 24px rgba(0,0,0,.28)}.chat{grid-template-rows:58px 1fr 60px}.chat-header{padding:7px 10px;margin-left:0}.me small{display:none}.messages{padding:12px}.msg{max-width:90%}.composer{gap:2px;padding:6px}.composer input{padding:10px 9px}.composer-icon,.send-btn{width:34px;height:36px}.composer-icon svg{width:22px;height:22px}.admin-grid{grid-template-columns:repeat(2,1fr)}.admin-grid button{min-height:90px;font-size:30px}.admin-grid button span{font-size:13px}}


/* V7.2 exact-style settings + profile */
.exact-settings{padding:8px 16px 24px}
.member-join-box{border:1px solid #f0c65a;border-radius:9px;background:#fffaf0;text-align:center;padding:8px 10px;margin-bottom:8px;color:#273247;font-size:12px}
.member-join-box button{display:block;margin:6px auto 0;border:0;background:#3f86f7;color:#fff;border-radius:5px;padding:8px 18px}
.settings-profile-card{display:grid;grid-template-columns:70px 1fr 58px;align-items:center;background:linear-gradient(100deg,#fff 0,#f4f7ff 68%,#eef3fb 68%);min-height:78px;margin:0 -16px 8px;padding:7px 12px}
.settings-avatar{width:66px;height:66px;border-radius:50%;display:grid;place-items:center;background:#2f91ff;color:#fff;font-size:26px;font-weight:700;overflow:hidden;background-size:cover;background-position:center}
.settings-profile-text b{display:block;font-size:16px}.settings-profile-text span{display:block;font-size:12px;color:#6b7280;margin-top:3px}.settings-profile-text small{display:block;font-size:12px;color:#1f6df2;margin-top:4px}
.profile-menu-btn{width:47px;height:47px;border:6px solid #e7edf8;background:#9fc5ff;color:#fff;border-radius:50%;font-size:18px}
.exact-settings .setting-row{padding-left:4px;padding-right:4px;border-bottom:0;min-height:44px;font-size:14px}
.more-settings{display:block;margin:0 auto 5px;border:0;background:transparent;color:#9aa4b5;padding:5px 12px}
.settings-separator{display:flex;align-items:center;gap:8px;color:#9ca7b9;font-size:12px;margin:10px 0}.settings-separator:before,.settings-separator:after{content:"";height:1px;background:#dfe5ec;flex:1}.settings-separator span{white-space:nowrap}
.theme-system-row{display:flex;align-items:center;gap:10px}.system-theme-btn{border:1px solid #cad4e1;border-radius:16px;background:#fff;color:#506074;padding:6px 14px;font-size:12px}.theme-system-row .theme-colors{display:flex;gap:10px;flex-wrap:nowrap;margin:0}.theme-system-row .tc{width:20px;height:20px;border:0;border-radius:50%}.tc.dark1{background:#273449}.tc.dark2{background:#596577}.tc.gray{background:#aeb8c5}.tc.yellow{background:#ffba22}.tc.lime{background:#65cf0b}.tc.cyan{background:linear-gradient(90deg,#28c8be,#d8fbff)}
body.theme-dark1{--accent:#334155;--accent-soft:#e7ebef}body.theme-dark2{--accent:#64748b;--accent-soft:#eef1f4}body.theme-gray{--accent:#a0aab8;--accent-soft:#f2f4f6}body.theme-yellow{--accent:#f5b51b;--accent-soft:#fff6d8}body.theme-lime{--accent:#65c916;--accent-soft:#eefadb}body.theme-cyan{--accent:#2bc8c1;--accent-soft:#e4fbfa}
.profile-modal{position:fixed;inset:0;background:rgba(0,0,0,.48);z-index:80;display:grid;place-items:center;padding:12px}.profile-window{width:min(760px,96vw);background:#fff;border:3px solid #1478ff;box-shadow:0 12px 35px rgba(0,0,0,.35)}.profile-title{height:42px;background:#1478ff;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-weight:700}.profile-title button{border:0;background:#fff;color:#222;width:22px;height:22px}.profile-body{display:grid;grid-template-columns:195px 1fr;min-height:340px}.profile-nav{background:#f7f7f7;border-right:1px solid #dfe3e8}.profile-nav button{width:100%;height:49px;border:0;border-bottom:1px solid #ddd;background:#f7f7f7;text-align:left;padding:0 14px;color:#5d6470}.profile-nav button.active{background:#fff}.profile-nav button span{margin-left:9px}.profile-content{padding:20px;min-width:0}.profile-center{text-align:center}.profile-big-avatar{width:110px;height:110px;border-radius:50%;margin:0 auto 12px;background:#111;color:#fff;display:grid;place-items:center;font-size:40px;background-size:cover;background-position:center;border:5px solid #e5e7eb}.profile-nick{font-size:16px;margin:6px}.profile-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:14px}.profile-action-grid button{padding:9px;border:1px solid #ccd4df;background:#fff;border-radius:4px;color:#5e6978}.profile-action-grid button.full{grid-column:1/-1}.profile-form label{display:block;font-size:13px;margin-top:8px}.profile-form input,.profile-form select{width:100%;padding:9px;border:1px solid #ccd4df;border-radius:4px;margin-top:4px}.profile-form .btn{margin-top:12px}.register-window{width:min(420px,94vw);background:#fff;border:3px solid #1478ff}.register-body{padding:18px}.register-body label{display:block;font-size:13px;margin:8px 0 4px}.register-body input{width:100%;padding:9px;border:1px solid #ccd4df;border-radius:4px}.profile-note{padding:10px;background:#f5f7fb;border-radius:6px;color:#667085;font-size:13px;margin:8px 0}.danger-zone{background:#fff1f1;border:1px solid #ffd0d0;border-radius:7px;padding:14px}.danger-zone .btn{background:#dc2626}
@media(max-width:640px){.profile-body{grid-template-columns:1fr}.profile-nav{display:grid;grid-template-columns:repeat(3,1fr);border-right:0}.profile-nav button{font-size:11px;padding:5px;height:54px;text-align:center}.profile-nav button span{display:block;margin:3px 0 0}.profile-content{padding:14px}.settings-profile-card{grid-template-columns:64px 1fr 55px}}


/* V7.3 membership CTA visibility fix */
#memberJoinBox{display:block!important;visibility:visible!important;opacity:1!important;min-height:70px}
#registerMemberBtn{display:block!important;visibility:visible!important;opacity:1!important;min-width:124px}
#registerMemberBtn:disabled{opacity:.65!important;cursor:default}


/* V7.4 emoji + games + gifs + share menu */
.fun-cluster{display:flex;align-items:center;background:#10273d;border-radius:10px;padding:3px 5px;gap:2px;flex:0 0 auto}
.fun-btn{width:32px;height:32px;border:0;background:transparent;border-radius:7px;display:grid;place-items:center;font-size:17px}
.fun-btn:hover{background:rgba(255,255,255,.1)}.emoji-fun{color:#f7d800}.games-fun{color:#52e4c0}.gifs-fun{color:#ff6f9a}
.tool-popup{position:fixed;z-index:70;width:min(420px,92vw);max-height:60vh;overflow:hidden;background:var(--panel);border:1px solid var(--border);border-radius:10px;box-shadow:0 15px 40px rgba(0,0,0,.35)}
.tool-popup-title{height:42px;background:#10273d;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-weight:700}.tool-popup-title button{border:0;background:transparent;color:#fff;font-size:22px}
.games-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:12px;overflow:auto;max-height:calc(60vh - 42px)}.game-card{border:1px solid var(--border);background:var(--panel);color:var(--text);border-radius:9px;padding:15px 10px;text-align:center}.game-card b{display:block;margin-top:5px}
.gifs-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px;overflow:auto;max-height:calc(60vh - 42px)}.gif-card{border:1px solid var(--border);background:#fff;border-radius:7px;padding:4px}.gif-card img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:5px;display:block}
.share-menu{position:fixed;z-index:75;width:175px;background:rgba(245,245,248,.96);border:1px solid #b9c0c9;border-radius:4px;box-shadow:0 12px 28px rgba(0,0,0,.28);overflow:hidden;color:#303845}.share-live{display:grid;grid-template-columns:56px 1fr;align-items:center;gap:7px;padding:13px 10px;border-bottom:1px solid #d4d8de;font-size:13px}.share-live input{width:56px}.share-menu>button{display:grid;grid-template-columns:27px 1fr;align-items:center;width:100%;border:0;border-bottom:1px solid #d4d8de;background:transparent;padding:11px 13px;text-align:left;color:#303845}.share-menu>button:hover{background:#e8eaee}.share-menu>button span{font-size:13px}
.msg.image-msg{padding:5px;border-radius:10px}.msg.image-msg img{max-width:min(360px,70vw);max-height:360px;display:block;border-radius:8px}.msg.voice-msg audio{width:min(300px,65vw)}
.admin-thumb{width:58px;height:58px;object-fit:cover;border-radius:5px;border:1px solid #ddd}
@media(max-width:760px){.fun-cluster{padding:2px 3px}.fun-btn{width:28px;height:30px;font-size:15px}.games-grid{grid-template-columns:1fr 1fr}.gifs-grid{grid-template-columns:repeat(2,1fr)}}


/* V7.5 chat scroll / GIF overflow fix */
html, body.chat-page { height:100%; min-height:100%; overflow:hidden !important; }
.chat-page .app { height:100vh; min-height:0; overflow:hidden; }
.chat-page .sidebar,
.chat-page .chat { min-height:0; height:100vh; overflow:hidden; }
.chat-page .chat { grid-template-rows:60px minmax(0,1fr) 62px; }
.chat-page .messages {
    min-height:0;
    height:auto;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    position:relative;
}
.chat-page .composer {
    position:relative;
    z-index:8;
    flex-shrink:0;
}
.msg { max-width:min(72%, 720px); overflow-wrap:anywhere; word-break:break-word; }
.msg.image-msg { max-width:min(72%, 520px); }
.msg.image-msg img {
    display:block;
    width:auto !important;
    height:auto !important;
    max-width:min(420px, 65vw) !important;
    max-height:300px !important;
    object-fit:contain;
}
.gif-card img {
    width:100%;
    height:110px;
    max-height:110px;
    object-fit:cover;
}
.gifs-grid {
    min-height:0;
    overflow-y:auto !important;
    overflow-x:hidden;
}
.tool-popup { overflow:hidden; }
@media(max-width:760px){
  .chat-page .chat{grid-template-rows:58px minmax(0,1fr) 60px}
  .msg{max-width:90%}
  .msg.image-msg{max-width:88%}
  .msg.image-msg img{max-width:72vw !important;max-height:240px !important}
}


/* V7.6 Gift System */
.gift-composer-btn{font-size:19px}
.gift-window{width:min(720px,95vw);max-height:82vh;background:#f2f2f4;border:1px solid #888;border-radius:4px;box-shadow:0 15px 40px rgba(0,0,0,.4);overflow:hidden}
.gift-titlebar{height:42px;background:linear-gradient(#fafafa,#e4e4e7);border-bottom:1px solid #aaa;display:flex;align-items:center;padding:0 12px;font-weight:700;color:#333}
.gift-titlebar span{margin-left:auto;margin-right:12px;font-size:12px;color:#9b6c00}.gift-titlebar button{width:25px;height:25px;border:1px solid #999;background:#fff}
.gift-recipient-row{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #d2d2d5}.gift-recipient-row select{flex:1;padding:7px;border:1px solid #aaa;background:#fff}
.gift-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;padding:12px;max-height:55vh;overflow-y:auto}
.gift-card{position:relative;background:#fff;border:1px solid #b8b8bd;border-radius:4px;padding:5px;min-height:112px}.gift-card img{width:100%;height:82px;object-fit:contain;display:block}.gift-card b{display:block;text-align:center;font-size:11px;margin:3px 0}.gift-price{position:absolute;right:4px;top:72px;background:#e72832;color:#fff;border-radius:3px;padding:3px 6px;font-size:10px;font-weight:700}
.gift-cancel{display:block;margin:0 auto 12px;padding:7px 26px;border:1px solid #aaa;background:linear-gradient(#fff,#ddd);border-radius:4px}
.msg.gift-msg{max-width:min(78%,520px);background:linear-gradient(135deg,#fff7d9,#ffe8ee);border:1px solid #ffd36a}.gift-message{display:flex;align-items:center;gap:10px}.gift-message img{width:70px;height:70px;object-fit:contain}.gift-message strong{display:block}.gift-message small{display:block;color:#b06c00;margin-top:3px}
@media(max-width:760px){.gift-grid{grid-template-columns:repeat(3,1fr)}.gift-card img{height:72px}.gift-price{top:62px}}


/* V7.7 fullscreen gift animation + inline games */
.gift-animation-overlay{
  position:fixed;inset:0;z-index:220;display:flex;align-items:center;justify-content:center;
  pointer-events:none;background:radial-gradient(circle at center,rgba(12,20,36,.18),rgba(2,7,15,.58));
  backdrop-filter:blur(1px)
}
.gift-animation-overlay.hidden{display:none}
.gift-animation-stage{
  position:relative;width:min(460px,88vw);min-height:360px;display:flex;flex-direction:column;
  align-items:center;justify-content:center;animation:giftStageIn .35s ease-out both
}
.gift-animation-glow{
  position:absolute;width:330px;height:330px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,215,80,.45),rgba(255,79,141,.18) 42%,transparent 72%);
  filter:blur(8px);animation:giftGlow 1.2s ease-in-out infinite alternate
}
.gift-animation-image{
  position:relative;z-index:2;max-width:300px;max-height:250px;object-fit:contain;
  filter:drop-shadow(0 18px 26px rgba(0,0,0,.35));animation:giftFloat .9s ease-in-out infinite alternate
}
.gift-animation-text{
  position:relative;z-index:3;margin-top:16px;padding:10px 18px;border-radius:18px;
  background:rgba(8,16,30,.78);color:#fff;text-align:center;box-shadow:0 8px 25px rgba(0,0,0,.25)
}
.gift-animation-text strong,.gift-animation-text b{font-size:17px}
.gift-animation-text span{margin:0 6px;font-size:14px;opacity:.9}
.gift-animation-text small{display:block;margin-top:4px;color:#ffd45c;font-weight:700}
@keyframes giftStageIn{from{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}
@keyframes giftFloat{from{transform:translateY(7px) scale(.98)}to{transform:translateY(-8px) scale(1.03)}}
@keyframes giftGlow{from{transform:scale(.92);opacity:.7}to{transform:scale(1.08);opacity:1}}

.game-viewer{
  position:fixed;inset:0;z-index:210;background:#0a111d;display:grid;grid-template-rows:54px minmax(0,1fr)
}
.game-viewer.hidden{display:none}
.game-viewer-topbar{
  display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;
  padding:0 12px;background:#10273d;color:#fff;border-bottom:1px solid rgba(255,255,255,.12)
}
.game-viewer-topbar strong{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-viewer-topbar button{
  border:0;background:rgba(255,255,255,.1);color:#fff;border-radius:8px;padding:8px 11px;font-weight:700
}
.game-viewer-body{position:relative;min-height:0;background:#fff}
#gameFrame{width:100%;height:100%;border:0;display:block;background:#fff}
.game-frame-notice{
  position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;gap:8px;padding:30px;background:#f7f8fa;color:#263446
}
.game-frame-notice.hidden{display:none}
.game-frame-notice span{max-width:620px;font-size:14px;line-height:1.5;color:#657083}
@media(max-width:760px){
  .gift-animation-stage{min-height:300px}
  .gift-animation-image{max-width:230px;max-height:210px}
  .game-viewer-topbar{grid-template-columns:auto 1fr auto;padding:0 7px}
  .game-viewer-topbar button{padding:7px 8px;font-size:12px}
}


/* V7.8 Admin general settings + configurable login + password/agent modal */
.general-head{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--border);margin-bottom:14px}
.general-head h3{margin:8px 0 12px}.general-cards{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:12px}
.general-cards button{min-height:110px;border:0;border-radius:6px;background:#1677f8;color:#fff;box-shadow:0 4px 10px rgba(22,119,248,.25);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-size:15px}
.general-cards button b{font-size:31px}.login-admin-preview{display:block;max-width:280px;max-height:150px;object-fit:cover;border:1px solid var(--border);border-radius:8px;margin:8px 0}.login-admin-preview.logo-preview{object-fit:contain;background:#fff}

.login-v78{overflow:hidden;background:#0a101a}.login-v78 .login-shell{background-image:linear-gradient(rgba(0,0,0,.18),rgba(0,0,0,.28)),var(--login-bg,none);background-size:cover;background-position:center}
.login-custom-logo{display:block;max-width:260px;max-height:95px;object-fit:contain;margin:0 auto 10px}.login-custom-logo.small{max-width:220px;max-height:75px}
.login-footer button{border:0;background:transparent;color:inherit;cursor:pointer;font-size:13px}.login-admin-html{text-align:center;margin-top:10px;font-size:12px;color:#77818d}
.login-modal{position:fixed;inset:0;z-index:500;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(0,0,0,.58);backdrop-filter:blur(2px)}
.login-modal.hidden{display:none}.login-dialog{width:min(450px,94vw);background:#fff;border-radius:6px;padding:26px 28px;box-shadow:0 24px 70px rgba(0,0,0,.5);color:#555}
.stacked-card{position:relative}.stacked-card:before,.stacked-card:after{content:"";position:absolute;inset:-8px 10px 8px -10px;background:#f5f5f5;border:1px solid #ddd;z-index:-1;transform:rotate(-1deg)}.stacked-card:after{inset:-4px -10px 4px 10px;transform:rotate(1deg)}
.login-dialog h2{text-align:center;margin:4px 0 24px;border-bottom:1px solid #bbb;padding-bottom:10px}.login-dialog input{width:100%;box-sizing:border-box;padding:14px 13px;margin:5px 0;border:1px solid #ccc;border-radius:3px;font-size:15px}
.agent-row small{display:block;margin:2px 0 8px;color:#8b8b8b}.dialog-actions{display:flex;justify-content:center;gap:10px;margin-top:16px}.login-btn.secondary{background:#f3bd55;color:#6c4e17}
.info-dialog{width:min(510px,94vw)}.info-scroll{height:180px;overflow-y:auto;white-space:pre-wrap;line-height:1.5;border:0;padding:4px;color:#555}.info-ok{display:block;margin:18px auto 0;border:0;border-radius:4px;background:#cf82ef;color:#fff;padding:10px 18px;font-weight:700}
@media(max-width:720px){.general-cards{grid-template-columns:repeat(2,minmax(130px,1fr))}.login-dialog{padding:20px}.info-scroll{height:220px}}


/* V7.9 login flow fix */
.login-modal{opacity:0;transition:opacity .16s ease}
.login-modal.shown{opacity:1}
.login-modal.hidden{display:none!important}
.password-dialog{
 width:min(430px,94vw);padding:22px 26px 24px;border-radius:10px;background:#fff;
 transform:translateY(8px) scale(.98);transition:transform .18s ease;box-shadow:0 28px 80px rgba(0,0,0,.5)
}
.login-modal.shown .password-dialog{transform:translateY(0) scale(1)}
.password-brand{text-align:center;min-height:46px;display:grid;place-items:center;color:#273a4e;font-size:20px;font-weight:800}
.password-dialog h2{margin:8px 0 16px;padding-bottom:11px;border-bottom:1px solid #d5d8dc;color:#535b64;font-size:18px}
.password-field{display:block;margin:10px 0}.password-field>span{display:block;margin-bottom:5px;font-size:12px;font-weight:700;color:#65707c}
.password-input-wrap{position:relative}.password-input-wrap input{padding-right:48px!important}.password-input-wrap button{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:36px;height:36px;border:0;background:transparent;border-radius:7px}
.password-input-wrap button:hover{background:#eef1f4}
.password-error{min-height:20px;margin-top:7px;text-align:center;color:#d83232;font-size:13px;font-weight:600}
.login-btn.is-loading{opacity:.65;pointer-events:none}
.login-btn:disabled{cursor:wait}
.agent-row{margin-top:7px;padding:8px 10px;border:1px dashed #aab4bf;border-radius:8px;background:#f8fafc}
.agent-row.hidden{display:none!important}.agent-row>small{display:block;color:#7b8794;font-size:11px;line-height:1.4}
@media(max-width:560px){.password-dialog{padding:18px 16px}.dialog-actions{display:grid;grid-template-columns:1fr 1fr}.dialog-actions .login-btn{width:100%}}


/* V8.0 login background / lower HTML / inline password card */
.login-v80{
  min-height:100dvh!important;
  padding:0!important;
  overflow-y:auto!important;
  display:block!important;
  background:#080f18!important;
}
.login-v80 .login-shell{
  min-height:100dvh;
  width:100%;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:22px 14px 45px;
  background-image:linear-gradient(rgba(0,0,0,.10),rgba(0,0,0,.18)),var(--login-bg,none);
  background-size:cover;
  background-position:center top;
  background-repeat:no-repeat;
  background-attachment:fixed;
}
.login-stack{width:min(620px,96vw);display:flex;flex-direction:column;align-items:center;gap:14px}
.login-v80 .login-main-card{width:min(390px,94vw);padding:28px 24px 0}
.login-extra-content{width:100%;color:#fff;text-align:center;position:relative;z-index:2}
.login-extra-content>*{max-width:100%}
.login-extra-content img,.login-extra-content video{max-width:100%;height:auto}
.password-inline-panel{padding-bottom:4px}
.password-sep{margin:12px 0 22px}
.password-sep b{font-size:18px;color:#6d737b}
.inline-account-field{
  min-height:52px;display:grid;grid-template-columns:30px 1fr;align-items:center;
  border:1px solid #c9ced7;background:linear-gradient(#f8f8f8,#ececec);
  border-radius:3px;margin:10px 8px;overflow:hidden
}
.inline-account-field .field-icon{font-size:18px;opacity:.55}
.login-main-card .inline-account-field input{
  border:0!important;background:transparent!important;padding:14px 8px!important;outline:none;color:#5c626b
}
.password-inline-wrap{grid-template-columns:30px 1fr 40px;background:#eef5ff}
.password-inline-wrap button{width:36px;height:36px;border:0;background:transparent;border-radius:6px}
.password-inline-wrap button:hover{background:rgba(0,0,0,.05)}
.agent-inline{background:linear-gradient(#f7f7f7,#eaeaea)}
.agent-inline.hidden{display:none!important}
.inline-actions{display:flex;justify-content:center;gap:10px;margin:18px 0}
.inline-actions .login-btn{min-width:110px;padding:8px 18px}
.password-error{min-height:22px;padding:2px 8px;color:#c92b2b;font-size:12px;font-weight:700;text-align:center}
.login-v80 .login-footer{margin-top:4px}
.login-v80 .login-footer button{color:#68717f}
@media(max-width:600px){
  .login-v80 .login-shell{padding-top:12px;background-attachment:scroll}
  .login-stack{width:100%}
  .login-v80 .login-main-card{width:min(390px,96vw)}
}

/* V8.1 background guarantee */
.login-v80 .login-shell{
  background-color:#080f18;
  background-image:linear-gradient(rgba(0,0,0,.08),rgba(0,0,0,.16)),var(--login-bg,none)!important;
  background-size:cover!important;
  background-position:center center!important;
  background-repeat:no-repeat!important;
}

/* V8.2 real background image layer — avoids data-URI/custom-property browser issues */
.login-v80{position:relative;isolation:isolate;background:#080f18!important}
.login-background-media{position:fixed;inset:0;z-index:-2;overflow:hidden;background:#080f18;pointer-events:none}
.login-background-media img{width:100%;height:100%;display:block;object-fit:cover;object-position:center center}
.login-background-media:after{content:"";position:absolute;inset:0;background:linear-gradient(rgba(0,0,0,.08),rgba(0,0,0,.18))}
.login-v80 .login-shell{position:relative;z-index:1;background:none!important}


/* V8.3 persistent clear + profile visuals + reference context menu */
.context-menu{width:184px;border:1px solid #d3d3d3;border-radius:3px;background:#fff;color:#171717;box-shadow:0 4px 16px rgba(0,0,0,.24);padding:0;overflow:visible;font-family:Arial,sans-serif;font-size:13px}
.context-menu>button{display:grid;grid-template-columns:24px 1fr 14px;align-items:center;min-height:39px;padding:0 14px;border:0;background:#fff;color:#171717;text-align:left;white-space:nowrap}
.context-menu>button:hover,.context-submenu button:hover{background:#f0f0f0}
.context-menu .ctx-sep{height:1px;background:#e3e3e3;margin:0}
.context-menu .ctx-icon,.context-menu .ctx-check{display:inline-grid;place-items:center;font-size:13px}
.context-menu .ctx-check{font-weight:800;border:1px solid #aab0b5;width:14px;height:14px;border-radius:2px;line-height:12px}
.context-menu .has-sub b{font-size:20px;font-weight:400;justify-self:end;color:#222}
.context-submenu{position:absolute;left:100%;top:195px;width:155px;border:1px solid #d3d3d3;background:#fff;box-shadow:0 4px 14px rgba(0,0,0,.2);z-index:2}
.context-submenu button{display:block;width:100%;padding:10px 12px;border:0;background:#fff;color:#171717;text-align:left}
.context-submenu.hidden{display:none!important}
.user .uavatar{background-size:cover;background-position:center;background-repeat:no-repeat;flex:0 0 44px}
.frame-mavi{box-shadow:0 0 0 3px #3b82f6,0 0 12px rgba(59,130,246,.55)}
.frame-altin{box-shadow:0 0 0 3px #eab308,0 0 13px rgba(234,179,8,.62)}
.frame-neon{box-shadow:0 0 0 3px #22d3ee,0 0 15px rgba(34,211,238,.85)}
.frame-none{box-shadow:none}
.profile-icon{margin-right:4px;filter:drop-shadow(0 1px 1px rgba(0,0,0,.2))}
.user.entry-fade{animation:presenceFade .7s ease both}.user.entry-slide{animation:presenceSlide .72s ease both}.user.entry-spark{animation:presenceSpark 1s ease both}
@keyframes presenceFade{from{opacity:0}to{opacity:1}}@keyframes presenceSlide{from{opacity:0;transform:translateX(-35px)}to{opacity:1;transform:none}}@keyframes presenceSpark{0%{opacity:0;filter:brightness(2);transform:scale(.88)}60%{opacity:1;filter:brightness(1.8);transform:scale(1.04)}100%{filter:none;transform:none}}
.msg:not(.system){display:flex;align-items:flex-start;gap:8px}.msg-avatar{width:30px;height:30px;flex:0 0 30px;border-radius:50%;background-size:cover;background-position:center}.msg-content{min-width:0;flex:1}
.msg-frame-mavi .name{color:#2563eb}.msg-frame-altin .name{color:#a16207}.msg-frame-neon .name{text-shadow:0 0 7px rgba(34,211,238,.7)}
@media(max-width:600px){.context-menu{width:184px}.context-submenu{left:auto;right:100%;top:195px}}

/* V8.4 admin/profile visual alignment */
.admin-grid,.admin-modules,.module-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
}
.admin-card,.admin-module-card,.module-card{
  min-height:62px;
  border-radius:3px!important;
  box-shadow:none!important;
}
.general-cards,.general-settings-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
.general-cards .admin-card,.general-settings-grid .admin-card{
  min-height:74px;
}
.general-cards>*:nth-child(5),.general-settings-grid>*:nth-child(5){
  grid-column:1 / -1;
}
.room-user-avatar{
  width:38px;height:38px;min-width:38px;border-radius:50%;overflow:hidden;
  display:inline-grid;place-items:center;background:#edf1f5;border:2px solid #fff;
  box-shadow:0 0 0 1px #c8d0d8;vertical-align:middle
}
.room-user-avatar img,.user-avatar-img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.room-user-avatar.frame-blue{box-shadow:0 0 0 3px #2684ff}
.room-user-avatar.frame-gold{box-shadow:0 0 0 3px #e4b62d}
.room-user-avatar.frame-neon{box-shadow:0 0 8px 3px #4fe3ff}
.room-user-avatar.effect-slide{animation:v84Slide .55s ease both}
.room-user-avatar.effect-fade{animation:v84Fade .7s ease both}
.room-user-avatar.effect-glow{animation:v84Glow 1.4s ease-in-out infinite alternate}
@keyframes v84Slide{from{transform:translateX(-18px);opacity:0}to{transform:none;opacity:1}}
@keyframes v84Fade{from{opacity:0}to{opacity:1}}
@keyframes v84Glow{from{filter:drop-shadow(0 0 1px #fff)}to{filter:drop-shadow(0 0 7px #59d8ff)}}
@media(max-width:760px){
 .admin-grid,.admin-modules,.module-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:460px){
 .admin-grid,.admin-modules,.module-grid,.general-cards,.general-settings-grid{grid-template-columns:1fr!important}
 .general-cards>*:nth-child(5),.general-settings-grid>*:nth-child(5){grid-column:auto}
}


/* V8.5 reference admin + real profile avatar */
#adminModal .admin-window{
  width:min(570px,96vw)!important;
  height:min(500px,90vh);
  max-height:90vh!important;
  overflow:auto;
  border:1px solid #8f8f8f!important;
  border-radius:0!important;
  background:#fff!important;
}
#adminModal .admin-title{
  position:sticky;top:0;
  min-height:34px;
  padding:7px 10px!important;
  background:#1677f8!important;
  color:#fff!important;
  font:14px Arial,sans-serif!important;
}
#adminModal .modal-close{
  width:19px;height:19px;padding:0;
  border-radius:0!important;
  background:#fff!important;color:#111!important;
}
#adminModal .admin-grid{
  grid-template-columns:repeat(3,1fr)!important;
  gap:10px!important;
  padding:6px 8px 12px!important;
}
#adminModal .admin-grid button{
  min-height:110px!important;
  border:0!important;border-radius:4px!important;
  background:#1677f8!important;color:#fff!important;
  box-shadow:0 3px 8px rgba(0,0,0,.18)!important;
  display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;
  padding:8px!important;font-family:Arial,sans-serif!important;
}
#adminModal .admin-grid .adm-ico{
  display:block;
  color:#fff!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:36px!important;
  font-weight:700!important;
  line-height:1!important;
  margin-bottom:11px;
}
#adminModal .admin-grid button span{
  margin:0!important;font-size:14px!important;color:#fff!important;
}
#adminModal .admin-content{padding:0!important;background:#fff!important}
#adminModal .admin-subbar{
  height:39px;
  display:flex;align-items:center;gap:10px;
  padding:0 11px;
  border-bottom:1px solid #d5d5d5;
  color:#111;background:#fff;
  font:14px Arial,sans-serif;
}
#adminModal .admin-subback{
  border:0;background:transparent;color:#111;
  font-size:23px;line-height:1;cursor:pointer;padding:0 3px;
}
#adminModal .general-cards{
  display:grid!important;
  grid-template-columns:repeat(3,1fr)!important;
  gap:12px!important;
  padding:7px 8px 16px!important;
}
#adminModal .general-cards button{
  min-height:110px!important;
  border:0!important;border-radius:4px!important;
  background:#1677f8!important;color:#fff!important;
  box-shadow:0 3px 8px rgba(0,0,0,.18)!important;
  display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;
  gap:11px!important;
}
#adminModal .general-cards button b{
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:32px!important;color:#fff!important;line-height:1!important
}
#adminModal .general-cards button span{font-size:14px!important;color:#fff!important}
#adminModal .general-cards>*:nth-child(5){grid-column:auto!important}

.user .uavatar{
  width:44px!important;height:44px!important;min-width:44px!important;
  padding:0!important;overflow:hidden!important;border-radius:50%!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  background:#dce5ef!important;background-image:none!important;
}
.user.admin .uavatar{background:#ffcad5!important}
.user .uavatar img{
  width:100%!important;height:100%!important;
  display:block!important;object-fit:cover!important;
  border-radius:50%!important;
}
.user .uavatar span{display:block;font-weight:700}
.user-meta{min-width:0}

@media(max-width:600px){
 #adminModal .admin-window{width:96vw!important;height:88vh}
 #adminModal .admin-grid,#adminModal .general-cards{grid-template-columns:repeat(2,1fr)!important}
 #adminModal .admin-grid button,#adminModal .general-cards button{min-height:92px!important}
}

/* V8.5 reference admin + real profile avatar */
#adminModal .admin-window{width:min(570px,96vw)!important;height:min(500px,90vh);max-height:90vh!important;overflow:auto;border:1px solid #8f8f8f!important;border-radius:0!important;background:#fff!important}
#adminModal .admin-title{position:sticky;top:0;min-height:34px;padding:7px 10px!important;background:#1677f8!important;color:#fff!important;font:14px Arial,sans-serif!important}
#adminModal .modal-close{width:19px;height:19px;padding:0;border-radius:0!important;background:#fff!important;color:#111!important}
#adminModal .admin-grid{grid-template-columns:repeat(3,1fr)!important;gap:10px!important;padding:6px 8px 12px!important}
#adminModal .admin-grid button{min-height:110px!important;border:0!important;border-radius:4px!important;background:#1677f8!important;color:#fff!important;box-shadow:0 3px 8px rgba(0,0,0,.18)!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;padding:8px!important;font-family:Arial,sans-serif!important}
#adminModal .admin-grid .adm-ico{display:block;color:#fff!important;font-family:Arial,Helvetica,sans-serif!important;font-size:36px!important;font-weight:700!important;line-height:1!important;margin-bottom:11px}
#adminModal .admin-grid button span{margin:0!important;font-size:14px!important;color:#fff!important}
#adminModal .admin-content{padding:0!important;background:#fff!important}
#adminModal .admin-subbar{height:39px;display:flex;align-items:center;gap:10px;padding:0 11px;border-bottom:1px solid #d5d5d5;color:#111;background:#fff;font:14px Arial,sans-serif}
#adminModal .admin-subback{border:0;background:transparent;color:#111;font-size:23px;line-height:1;cursor:pointer;padding:0 3px}
#adminModal .general-cards{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:12px!important;padding:7px 8px 16px!important}
#adminModal .general-cards button{min-height:110px!important;border:0!important;border-radius:4px!important;background:#1677f8!important;color:#fff!important;box-shadow:0 3px 8px rgba(0,0,0,.18)!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:11px!important}
#adminModal .general-cards button b{font-family:Arial,Helvetica,sans-serif!important;font-size:32px!important;color:#fff!important;line-height:1!important}
#adminModal .general-cards button span{font-size:14px!important;color:#fff!important}
#adminModal .general-cards>*:nth-child(5){grid-column:auto!important}

.user .uavatar{width:44px!important;height:44px!important;min-width:44px!important;padding:0!important;overflow:hidden!important;border-radius:50%!important;display:flex!important;align-items:center!important;justify-content:center!important;background:#dce5ef!important;background-image:none!important}
.user.admin .uavatar{background:#ffcad5!important}
.user .uavatar img{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important;border-radius:50%!important}
.user .uavatar span{display:block;font-weight:700}
.user-meta{min-width:0}
@media(max-width:600px){
 #adminModal .admin-window{width:96vw!important;height:88vh}
 #adminModal .admin-grid,#adminModal .general-cards{grid-template-columns:repeat(2,1fr)!important}
 #adminModal .admin-grid button,#adminModal .general-cards button{min-height:92px!important}
}

/* V8.6 Durum Modları + Güvenlik Ayarları */
.status-mode-pane,.security-pane{height:410px!important;max-height:410px!important;display:flex!important;flex-direction:column!important;background:#fff!important;overflow:hidden!important}
.status-mode-toolbar{min-height:40px;display:flex;justify-content:flex-end;align-items:center;padding:5px 8px;border-bottom:1px solid #d8d8d8;background:#fff}
.status-add-btn{width:28px;height:28px;border:0;border-radius:50%;background:#1677f8!important;color:#fff!important;font-size:20px;line-height:28px;cursor:pointer}
.status-mode-list,.security-list{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:stable}
.status-row{min-height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 8px 0 13px;border-bottom:1px solid #d8d8d8;background:#fff;color:#222;font:14px Arial,sans-serif}
.status-row-left{display:flex;align-items:center;gap:8px}.status-icon{width:18px;text-align:center}.status-actions{display:flex;gap:8px}
.status-actions button{width:28px;height:28px;border:0;border-radius:50%;background:#1677f8!important;color:#fff!important;cursor:pointer;font-size:14px}
.security-row{min-height:43px;display:flex;align-items:center;justify-content:space-between;padding:0 9px 0 13px;border-bottom:1px solid #d8d8d8;background:#fff;color:#222;font:13px Arial,sans-serif;cursor:pointer}
.security-row input{display:none!important}.security-row i{position:relative;width:43px;height:22px;flex:0 0 43px;border-radius:20px;background:#d2d2d2;transition:.2s}
.security-row i:after{content:'';position:absolute;width:18px;height:18px;top:2px;left:2px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:.2s}
.security-row input:checked+i{background:#20b95f!important}.security-row input:checked+i:after{transform:translateX(21px)}
.security-actions{flex:0 0 auto;padding:7px 9px;border-top:1px solid #d8d8d8;background:#fff}
.security-actions button,.v86-form .btn{width:100%;min-height:34px;border:0;border-radius:3px;background:#1677f8!important;color:#fff!important;font-weight:600;cursor:pointer}
.v86-form{padding:12px;max-height:410px;overflow-y:auto}
@media(max-width:600px){.status-mode-pane,.security-pane{height:calc(88vh - 78px)!important;max-height:none!important}}

/* V8.7 status custom modal */
.status-form-modal{
  position:fixed;
  inset:0;
  z-index:450;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top:18px;
}
.status-form-modal.hidden{display:none!important}
.status-form-backdrop{
  position:absolute;inset:0;
  background:rgba(0,0,0,.28);
}
.status-form-card{
  position:relative;
  width:min(510px,92vw);
  background:#f8f8f8;
  border:1px solid #cfcfcf;
  box-shadow:0 5px 16px rgba(0,0,0,.28),6px 8px 0 #efefef;
  padding:14px 12px 12px;
  font-family:Arial,sans-serif;
}
.status-form-title{
  font-size:21px;
  font-weight:700;
  color:#2a2a2a;
  padding:11px 10px 10px;
}
.status-form-sep{
  height:1px;
  background:#d7d7d7;
  margin:0 0 20px;
}
.status-form-body{
  padding:0 22px 20px;
  display:grid;
  gap:10px;
}
.status-form-body input{
  width:100%;
  min-height:38px;
  padding:8px 14px;
  border:1px solid #d3d3d3;
  border-radius:4px;
  background:#fff;
  color:#333;
  font-size:14px;
  outline:none;
  box-sizing:border-box;
}
.status-form-body input:focus{
  border-color:#8eb8ff;
  box-shadow:0 0 0 2px rgba(22,119,248,.12);
}
.status-form-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:0 18px 4px;
}
.status-form-actions button{
  min-width:60px;
  min-height:32px;
  border:0;
  border-radius:4px;
  font-weight:600;
  cursor:pointer;
}
.status-form-submit{
  background:#dedede;
  color:#666;
}
.status-form-submit:hover{
  background:#cfcfcf;
}
.status-form-cancel{
  background:#de2d31;
  color:#fff;
}
.status-form-cancel:hover{
  background:#c71f24;
}
@media(max-width:600px){
  .status-form-modal{padding-top:10px}
  .status-form-card{width:94vw;padding-left:8px;padding-right:8px}
  .status-form-body{padding-left:10px;padding-right:10px}
}

/* V8.8 user status selector */
.settings-profile{position:relative!important}
.settings-status-btn{
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-top:2px;
  padding:0;
  border:0;
  background:transparent;
  color:#6f7781;
  font-size:12px;
  cursor:pointer;
}
.settings-status-btn:hover{color:#1677f8}
.settings-status-caret{font-size:12px}
.status-selector{
  position:absolute;
  z-index:80;
  top:66px;
  left:64px;
  width:205px;
  max-height:300px;
  overflow:hidden;
  border:1px solid #d5d5d5;
  border-radius:4px;
  background:#fff;
  box-shadow:0 5px 15px rgba(0,0,0,.18);
}
.status-selector.hidden{display:none!important}
.status-selector-head{
  height:35px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 12px;
  border-bottom:1px solid #dedede;
  color:#333;
  background:#fafafa;
  font-size:13px;
}
.status-selector-list{
  max-height:255px;
  overflow-y:auto;
  overflow-x:hidden;
}
.status-choice{
  width:100%;
  min-height:34px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:6px 10px;
  border:0;
  border-bottom:1px solid #ededed;
  background:#fff;
  color:#333;
  text-align:left;
  cursor:pointer;
  font-size:12px;
}
.status-choice:hover,.status-choice.active{background:#f4f8ff}
.status-choice-radio{width:14px;color:#1677f8;font-size:13px}
.status-choice-icon{width:18px;text-align:center}
.status-choice-title{flex:1}
.user-status-line{display:block;margin-top:2px;color:#7a838c;font-size:11px}
@media(max-width:600px){
 .status-selector{left:55px;top:64px;width:190px}
}

/* V8.9 Güvenlik Ayarları - ilk referans görsel */
.security-ref-pane{height:425px!important;max-height:425px!important;overflow:hidden!important;background:#fff!important}
.security-ref-scroll{height:100%;overflow-y:auto;overflow-x:hidden;padding:12px 20px 18px;box-sizing:border-box;scrollbar-gutter:stable}
.security-ref-row{min-height:34px;display:flex;align-items:center;gap:10px;padding:0;cursor:pointer;font:14px Arial,sans-serif;color:#333}
.security-ref-row input{position:absolute;opacity:0;pointer-events:none}
.security-ref-check{width:17px;height:17px;flex:0 0 17px;border:1px solid #cfcfcf;border-radius:3px;background:#fff;box-sizing:border-box;position:relative}
.security-ref-row input:checked + .security-ref-check:after{content:'✓';position:absolute;left:1px;top:-4px;color:#333;font-size:18px;font-weight:700}
.security-ref-label{white-space:nowrap}
.security-ref-badge{display:inline-flex;align-items:center;justify-content:center;min-width:48px;height:17px;padding:0 8px;border-radius:10px;background:#c4b7b7;color:#fff;font-size:11px;font-weight:700;line-height:17px}
.security-ref-badge.on{background:#28b97b}
.security-ref-sep{height:1px;background:#ddd;margin:8px 0 10px}
.country-master{margin-bottom:4px}
.country-block-area.disabled{opacity:.45;pointer-events:none}
.country-block-title{margin:6px 0 6px;font:700 13px Arial,sans-serif;color:#333}
.country-grid{max-height:130px;overflow-y:auto;overflow-x:hidden;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:4px 5px;border:1px solid #ddd;border-radius:4px;background:#fff;scrollbar-gutter:stable}
.country-chip{min-height:30px;border:0;border-radius:4px;padding:6px 9px;background:#e8e8e8;color:#5d5d5d;text-align:left;font:600 12px Arial,sans-serif;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.country-chip.selected{background:#ff5a12;color:#fff}
@media(max-width:600px){
 .security-ref-pane{height:calc(88vh - 78px)!important;max-height:none!important}
 .security-ref-scroll{padding:10px 12px 16px}
 .country-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .security-ref-label{white-space:normal}
}

/* V9.0 Sistem Ayarları - 3 referans görsel */
.system-ref-pane{
  height:425px!important;
  max-height:425px!important;
  overflow:hidden!important;
  background:#fff!important;
}
.system-ref-scroll{
  height:100%;
  overflow-y:auto;
  overflow-x:hidden;
  padding:10px 20px 18px;
  box-sizing:border-box;
  scrollbar-gutter:stable;
  font-family:Arial,sans-serif;
  color:#333;
}
.system-ref-row{
  min-height:34px;
  display:flex;
  align-items:center;
  gap:9px;
  margin:0;
  padding:0;
  cursor:pointer;
  font-size:14px;
}
.system-ref-row input,.system-first-row input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.system-ref-check{
  width:17px;height:17px;flex:0 0 17px;
  border:1px solid #cfcfcf;
  border-radius:3px;
  background:#fff;
  position:relative;
  box-sizing:border-box;
}
.system-ref-row input:checked + .system-ref-check:after,
.system-first-row input:checked + .system-ref-check:after{
  content:'✓';
  position:absolute;
  left:1px;
  top:-4px;
  font-size:18px;
  line-height:18px;
  font-weight:700;
  color:#333;
}
.system-ref-label{white-space:nowrap}
.system-ref-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:41px;
  height:17px;
  padding:0 8px;
  border-radius:10px;
  background:#c4b7b7;
  color:#fff;
  font-size:11px;
  font-weight:700;
  line-height:17px;
}
.system-ref-badge.on{background:#28b97b}
.system-ref-sep{
  height:1px;
  background:#dedede;
  margin:18px 30px 20px;
}
.system-field-group{margin:0 0 15px}
.system-field-title{
  display:block;
  margin:0 0 7px;
  font-size:13px;
  font-weight:700;
  color:#111;
}
.system-ref-input,.system-ref-select{
  width:100%;
  min-height:39px;
  border:1px solid #d9d9d9;
  border-radius:4px;
  background:#fff;
  color:#222;
  padding:8px 12px;
  box-sizing:border-box;
  font:14px Arial,sans-serif;
  outline:none;
}
.system-ref-select{appearance:auto}
.system-first-row{
  min-height:34px;
  display:flex;
  align-items:center;
  gap:9px;
  cursor:pointer;
  font:14px Arial,sans-serif;
  color:#333;
}
.system-save-wrap{
  display:flex;
  justify-content:center;
  padding:0 0 2px;
}
.system-save-btn{
  min-width:87px;
  min-height:36px;
  border:0;
  border-radius:4px;
  background:#4654c7;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
.system-save-btn:hover{filter:brightness(.95)}
@media(max-width:600px){
  .system-ref-pane{height:calc(88vh - 78px)!important;max-height:none!important}
  .system-ref-scroll{padding:10px 12px 18px}
  .system-ref-label{white-space:normal}
  .system-ref-sep{margin-left:18px;margin-right:18px}
}

/* V9.1 Bot Kontrol referans */
.bot-ref-pane,.bot-edit-pane{height:425px;overflow:hidden;background:#fff}
.bot-ref-toolbar{height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid #ddd;font:14px Arial}
.bot-ref-toolbar b span{color:#1677f8}.bot-add{width:34px;height:30px;border:0;border-radius:4px;background:#1677f8;color:#fff;font-size:22px;cursor:pointer}
.bot-search{margin:12px 16px;position:relative}.bot-search input{width:100%;height:36px;border:1px solid #ddd;border-radius:4px;padding:0 36px 0 12px;box-sizing:border-box}.bot-search span{position:absolute;right:12px;top:8px}
.bot-list{height:325px;overflow-y:auto}.bot-list-row{height:55px;display:flex;align-items:center;gap:10px;padding:0 16px;border-bottom:1px solid #eee}.bot-list-avatar{width:38px;height:38px;border-radius:50%;overflow:hidden;background:#eee;display:grid;place-items:center}.bot-list-avatar img,.bot-big-avatar img{width:100%;height:100%;object-fit:cover}.bot-list-row b{flex:1}.bot-gender{font-size:20px;font-weight:bold}.bot-gender.female{color:#ef6b78}.bot-gender.male{color:#1677f8}.bot-edit{border:0;background:transparent;font-size:18px;cursor:pointer}
.bot-edit-scroll{height:100%;overflow-y:auto;padding:14px 20px 22px;box-sizing:border-box}.bot-edit-scroll label{display:block;font-size:13px;font-weight:700;margin:10px 0 6px}.bot-edit-scroll input,.bot-edit-scroll select,.bot-edit-scroll textarea{width:100%;min-height:38px;border:1px solid #ddd;border-radius:4px;padding:8px 10px;box-sizing:border-box}
.bot-avatar-editor{text-align:center}.bot-big-avatar{width:92px;height:92px;border-radius:50%;overflow:hidden;background:#eee;margin:auto;display:grid;place-items:center;font-size:36px}.bot-avatar-plus{margin-top:-22px;margin-left:58px;width:30px;height:30px;border-radius:50%;border:0;background:#1677f8;color:#fff;font-size:20px}.bot-avatar-actions{display:flex;justify-content:center;gap:8px;margin-top:10px}.bot-avatar-actions button{border:1px solid #ddd;background:#fff;border-radius:4px;padding:7px 12px}.bot-edit-actions{display:flex;justify-content:space-between;margin-top:20px}.bot-delete-btn,.bot-save-btn{border:0;border-radius:4px;padding:10px 18px;color:#fff;font-weight:700}.bot-delete-btn{background:#dc3545}.bot-save-btn{background:#4654c7}

/* V9.2 Odalar Yönetimi - referans */
.rooms-ref-pane,.room-edit-pane{height:425px;max-height:425px;overflow:hidden;background:#fff}
.rooms-ref-toolbar{height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid #ddd;font:14px Arial}
.rooms-ref-toolbar span{color:#1677f8}.rooms-add-btn{width:34px;height:30px;border:0;border-radius:4px;background:#1677f8;color:#fff;font-size:22px;cursor:pointer}
.rooms-ref-search{position:relative;margin:12px 16px}.rooms-ref-search input{width:100%;height:36px;border:1px solid #ddd;border-radius:4px;padding:0 36px 0 12px;box-sizing:border-box}.rooms-ref-search span{position:absolute;right:12px;top:8px}
.rooms-ref-list{height:325px;overflow-y:auto}.rooms-ref-row{min-height:58px;display:flex;align-items:center;gap:10px;padding:0 16px;border-bottom:1px solid #eee}.rooms-ref-icon{width:34px;height:34px;border-radius:50%;background:#f2f2f2;display:grid;place-items:center}.rooms-ref-main{flex:1;min-width:0}.rooms-ref-main b,.rooms-ref-main small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rooms-ref-main small{margin-top:3px;color:#888;font-size:11px}.rooms-ref-meta{font-size:11px;color:#888}.rooms-ref-edit{border:0;background:transparent;font-size:18px;cursor:pointer}
.room-edit-scroll{height:100%;overflow-y:auto;padding:14px 20px 22px;box-sizing:border-box}.room-edit-scroll label{display:block;font:700 13px Arial;margin:10px 0 6px}.room-edit-scroll input:not([type=checkbox]):not([type=color]),.room-edit-scroll select,.room-edit-scroll textarea{width:100%;min-height:38px;border:1px solid #ddd;border-radius:4px;padding:8px 10px;box-sizing:border-box}.room-color-row{display:grid;grid-template-columns:56px 1fr;gap:8px}.room-color-row input[type=color]{width:56px;height:38px;border:1px solid #ddd;border-radius:4px;padding:2px;background:#fff}.room-clear-pass,.room-active-row{font-weight:400!important;display:flex!important;align-items:center;gap:7px}.room-image-actions{display:flex;gap:8px;margin-top:8px}.room-image-actions button{border:1px solid #ddd;background:#fff;border-radius:4px;padding:8px 12px;cursor:pointer}.room-bg-preview{margin-top:10px;border:1px solid #ddd;border-radius:4px;overflow:hidden;max-height:140px}.room-bg-preview img{width:100%;height:140px;object-fit:cover}.room-edit-actions{display:flex;justify-content:space-between;margin-top:20px}.room-delete-btn,.room-save-btn{border:0;border-radius:4px;padding:10px 18px;color:#fff;font-weight:700}.room-delete-btn{background:#dc3545}.room-save-btn{background:#4654c7}
@media(max-width:600px){.rooms-ref-pane,.room-edit-pane{height:calc(88vh - 78px);max-height:none}.room-edit-scroll{padding:12px}.rooms-ref-row{padding:0 10px}}

/* V9.2.3 room background */
#messageArea.room-has-background:before{display:none!important}

/* V9.3 Mobile reference UI - desktop rules untouched */
.mobile-topbar,.mobile-mic-strip,.mobile-side-arrow,.mobile-drawer-shade,.mobile-plus-btn,.mobile-sheet,.mobile-action-shade{display:none}
@media(max-width:760px){
 html,body,.chat-page,.app{height:100%;height:100dvh;width:100%;overflow:hidden}
 .app{display:block}.chat{height:100dvh;display:grid;grid-template-rows:44px 82px 1fr 48px;position:relative;background:#fff}
 .chat-header{display:none!important}
 .mobile-topbar{display:flex;height:44px;background:#2196e8;color:#fff;align-items:center;justify-content:space-between;padding:0 8px 0 14px;z-index:32;box-shadow:0 1px 2px #5556}
 .mobile-room-title{border:0;background:transparent;color:#fff;font-weight:700;font-size:13px;max-width:42vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .mobile-top-actions{display:flex;align-items:center;height:100%}.mobile-top-actions button{position:relative;border:0;background:transparent;color:#fff;width:43px;height:44px;font-size:21px;font-weight:700}.mobile-top-actions button span{position:absolute;top:4px;right:2px;background:#fff;color:#333;border-radius:3px;font-size:9px;line-height:13px;min-width:15px;padding:0 2px}
 .mobile-mic-strip{display:grid;grid-template-columns:repeat(5,1fr);height:82px;background:rgba(0,0,0,.22);z-index:4;padding:7px 3px 2px;pointer-events:auto}
 .mobile-mic-strip button{border:0;background:transparent;color:#eee;font-size:12px;display:flex;flex-direction:column;align-items:center;gap:2px;padding:0}.mobile-mic-strip button::first-line{font-size:20px}.mobile-mic-strip button span{font-size:11px;text-shadow:0 1px 2px #000}
 .mobile-mic-strip button{font-size:22px}.mobile-mic-strip button span{font-size:10px}
 .messages{padding:8px 8px 42px;background-size:cover!important;background-position:center!important;min-height:0}
 .msg{max-width:78%;border-radius:3px;padding:7px 8px;margin:5px 0;font-size:13px}.msg time{font-size:9px}.msg .name{font-size:13px}
 .composer{height:48px;padding:3px 5px;gap:1px;background:#fff;z-index:35}.composer input{height:40px;border:0;border-radius:0;padding:8px;font-size:13px}.fun-cluster{padding:0}.games-fun,.gifs-fun{display:none!important}.fun-btn{width:34px!important;height:38px!important;font-size:20px!important;background:transparent!important;color:#777!important}
 .send-btn{display:none}.composer-icon{display:grid;width:35px!important;height:40px!important;color:#777;padding:0}.composer-icon svg{width:20px!important;height:20px!important}.gift-composer-btn,.attachBtn{display:none}.mobile-plus-btn{display:grid!important;font-size:28px!important;font-weight:300}
 #attachBtn,#giftBtn,#raiseHandBtn{display:none!important}
 .sidebar{display:block;position:fixed!important;top:0!important;bottom:0!important;width:min(76vw,320px)!important;height:100dvh!important;z-index:61!important;left:0!important;right:auto!important;transform:translateX(-104%);transition:transform .22s ease;box-shadow:3px 0 12px #0004;border-right:1px solid #bbb;background:#fff}
 body.mobile-drawer-left .sidebar{transform:translateX(0)}
 body.mobile-drawer-right .sidebar{left:auto!important;right:0!important;transform:translateX(0);box-shadow:-3px 0 12px #0004}
 body.mobile-settings-open .sidebar{left:0!important;right:0!important;width:100vw!important;max-width:none!important;transform:translateX(0);box-shadow:none}
 .sidebar-icons{height:44px;background:#2196e8;border:0;display:none}
 body.mobile-settings-open .sidebar-icons{display:grid;grid-template-columns:1fr;position:absolute;top:0;left:0;width:100%;z-index:3;pointer-events:none}.sidebar-icons .top-icon{display:none}.sidebar-icons .top-icon[data-panel="settings"]{display:block;opacity:0;pointer-events:none}
 .side-panel{height:100dvh!important;background:#fff;color:#444;overflow:hidden}.side-panel.active{display:block}
 .side-panel:not(.active){display:none!important}
 #panelRooms:before{content:'♡   Odalar';display:flex;align-items:center;height:51px;background:#2196e8;color:#fff;font-size:17px;font-weight:700;padding:0 16px;white-space:pre}
 #panelUsers:before{content:'←   Oda kişileri';display:flex;align-items:center;height:51px;background:#2196e8;color:#fff;font-size:17px;font-weight:700;padding:0 16px;white-space:pre}
 #panelSettings:before{content:'⚙   Ayarlar';display:flex;align-items:center;height:51px;background:#2196e8;color:#fff;font-size:17px;font-weight:700;padding:0 16px;white-space:pre;position:sticky;top:0;z-index:5}
 .side-search{height:44px;padding:5px 12px}.side-search input{height:34px;border:0;border-bottom:1px solid #ddd;border-radius:0;padding-left:48px;font-size:15px}.side-search span{left:19px;right:auto;font-size:20px}
 .panel-heading{display:none}.rooms-list{height:calc(100dvh - 95px)}.room-item{grid-template-columns:28px 1fr auto auto;gap:4px;padding:9px 14px;min-height:43px}.room-main b{font-size:13px;font-weight:500}.room-main small{display:none}.room-count{background:#2196e8;color:#fff;border-radius:3px;padding:2px 5px;font-size:10px}.room-star{font-size:22px;color:#ffc2c2}.lock{font-size:12px}
 #panelUsers .tabs{display:none}.users{height:calc(100dvh - 95px);overflow:auto}.user{padding:9px 12px;border-bottom:1px solid #eee;gap:8px}.user .room-star{order:5;margin-left:auto}.uavatar{width:42px;height:42px}.user-meta b{font-size:12px}.user-meta small{font-size:10px}.rank-admin{font-size:10px}
 .mobile-side-arrow{display:grid;place-items:center;position:absolute;z-index:38;top:126px;width:24px;height:48px;border:0;background:#f0f0f0dd;color:#2196e8;font-size:36px;line-height:1;border-radius:0 22px 22px 0;box-shadow:0 1px 3px #0003}.mobile-side-arrow.left{left:0}.mobile-side-arrow.right{right:0;border-radius:22px 0 0 22px}
 .mobile-drawer-shade{display:block;position:fixed;inset:0;background:#0003;z-index:60}.mobile-drawer-shade.hidden{display:none!important}
 body.mobile-drawer-left .mobile-drawer-shade,body.mobile-drawer-right .mobile-drawer-shade{display:block}
 .mobile-action-shade{display:block;position:fixed;inset:0;background:#0006;z-index:80}.mobile-action-shade.hidden{display:none!important}
 .mobile-sheet{display:block;position:fixed;z-index:81;right:8px;bottom:52px;width:min(56vw,260px);background:#fff;border-radius:3px;box-shadow:0 3px 16px #0007;overflow:hidden}.mobile-sheet.hidden{display:none!important}.mobile-sheet button{width:100%;height:44px;display:grid;grid-template-columns:34px 1fr auto;align-items:center;text-align:left;border:0;border-bottom:1px solid #eee;background:#fff;color:#444;padding:0 12px;font-size:13px}.mobile-sheet button>span{padding-left:8px}.mobile-sheet-title{padding:12px 15px;color:#777;font-size:12px;border-bottom:1px solid #eee}.mobile-small-sheet{left:5px;right:5px;bottom:50px;width:auto}.mobile-small-sheet button{height:43px}.mobile-toggle{width:32px;height:18px;border-radius:12px;background:#bbb;position:relative}.mobile-toggle.on{background:#55aeea}.mobile-toggle:after{content:'';position:absolute;width:18px;height:18px;border-radius:50%;background:#fff;right:0;top:0;box-shadow:0 1px 3px #777}
 #panelSettings{overflow:auto!important}.settings-scroll{height:auto!important;overflow:visible!important;padding-bottom:30px}.member-join-box{display:none!important}.settings-profile-card{border-radius:0;border:0;background:#f5f5f5;grid-template-columns:70px 1fr auto;padding:10px 16px}.settings-avatar{width:66px;height:66px}.settings-profile-text b{font-size:14px}.profile-menu-btn{display:none}.settings-separator{margin:12px 0 0;padding:14px 16px 8px;background:#fff;color:#777;border:0}.setting-row{height:44px;padding:0 18px;border-bottom:1px solid #eee;background:#fff}.setting-row span{font-size:12px}.switch{transform:scale(.85)}.more-settings{display:none}.theme-system-row{padding:14px 16px;background:#fff}.system-theme-btn{display:none}.theme-colors{display:flex;flex-wrap:wrap;gap:8px}.theme-colors .tc{width:30px;height:30px;border-radius:50%}
 .settings-profile-card:after{content:'KAZANÇ\\A0 Gold     HARCANAN\\A0 Gold     BAKİYE\\A0 Gold';white-space:pre;font-size:10px;color:#2196e8;grid-column:1/-1;padding-top:10px}
 .exact-settings:before{content:'Dil tercihi\\A Türkçe\\A\\A Sohbet yazı boyutu\\A 16\\A\\A Sohbet yazı rengi';white-space:pre;display:block;padding:16px 18px 8px;color:#666;font-size:12px;line-height:22px;border-bottom:1px solid #eee}
 .tool-popup,.profile-modal,.register-window{max-width:calc(100vw - 16px)}
}

/* V9.3.1 mobile fixes */
.mobile-settings-real{display:none}
@media(max-width:760px){
 .chat.room-has-background{background-attachment:scroll!important}
 .chat.room-has-background .mobile-mic-strip{background:rgba(0,0,0,.28)!important}
 .chat.room-has-background #messageArea{background-color:transparent!important;background-image:none!important}
 .messages{height:auto!important;min-height:0!important;overflow-y:auto!important}
 .exact-settings:after{content:none!important;display:none!important}
 .mobile-settings-real{display:block;background:#fff;padding:0 14px 22px}
 .mobile-settings-title{padding:18px 2px 10px;color:#777;font-size:12px;border-bottom:1px solid #eee}
 .mobile-settings-real>button{width:100%;height:44px;border:0;border-bottom:1px solid #eee;background:#fff;display:grid;grid-template-columns:34px 1fr 20px;align-items:center;text-align:left;color:#555;font-size:13px;padding:0 4px}
 .mobile-settings-real>button span{padding-left:8px}.mobile-settings-real>button b{font-size:21px;color:#bbb;font-weight:400}
 .mobile-room-designs{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;padding:12px 6px 8px}
 .mobile-room-designs span{height:88px;border:2px solid #eee;border-radius:3px;background:linear-gradient(145deg,#172238,#7d235c)}
 .mobile-room-designs span:nth-child(2n){background:linear-gradient(145deg,#111,#2686b7)}
 .mobile-room-designs span:nth-child(3n){background:linear-gradient(145deg,#0b1c12,#36d27a)}
 .mobile-remove-design{display:block!important;height:28px!important;grid-template-columns:1fr!important;text-align:center!important;background:#2196e8!important;color:#fff!important;font-weight:700;border-radius:3px!important;margin-bottom:12px}
 .mobile-safe-logout{margin-top:18px;color:#f44336!important;font-weight:700}
 #panelSettings .theme-system-row{order:0}
 #panelSettings{padding-bottom:0!important}
}

/* V9.3.2 - mobile chat viewport / bottom strip fix */
@media(max-width:760px){
  html,body,.chat-page,.app{height:100dvh!important;min-height:100dvh!important;overflow:hidden!important}
  .chat{
    height:100dvh!important;
    min-height:100dvh!important;
    display:grid!important;
    grid-template-rows:44px 64px minmax(0,1fr) 48px!important;
    overflow:hidden!important;
  }
  .mobile-mic-strip{
    height:64px!important;
    min-height:64px!important;
    padding:5px 2px 1px!important;
    align-items:center!important;
  }
  .mobile-mic-strip button{
    height:58px!important;
    justify-content:center!important;
    line-height:1!important;
  }
  .mobile-mic-strip button span{
    margin-top:3px!important;
    line-height:12px!important;
  }
  #messageArea.messages{
    min-height:0!important;
    height:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:8px!important;
    margin:0!important;
    align-self:stretch!important;
  }
  #messageArea .msg{
    margin-top:5px!important;
    margin-bottom:5px!important;
  }
  #messageArea .msg.system{
    min-height:28px!important;
    line-height:16px!important;
    padding:6px 10px!important;
    overflow:visible!important;
    white-space:normal!important;
  }
  .composer{
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    height:48px!important;
    min-height:48px!important;
    margin:0!important;
    padding:3px 5px!important;
    align-self:end!important;
    border-top:1px solid #ddd!important;
    background:#fff!important;
    overflow:hidden!important;
  }
  .composer input#messageInput{
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
  }
  .mobile-side-arrow{top:108px!important}
  .chat.room-has-background{
    background-position:center center!important;
    background-size:cover!important;
  }
  .chat.room-has-background #messageArea{
    background:transparent!important;
  }
}

/* V9.3.3 - mobile top bar exactly closer to supplied reference */
@media(max-width:760px){
  .chat{
    grid-template-rows:38px 64px minmax(0,1fr) 48px!important;
  }
  .mobile-topbar{
    display:flex!important;
    height:38px!important;
    min-height:38px!important;
    padding:0!important;
    background:#fff!important;
    color:#8b8b8b!important;
    border-bottom:1px solid #b8d9dd!important;
    box-shadow:none!important;
    align-items:stretch!important;
    justify-content:center!important;
  }
  .mobile-room-title{
    display:none!important;
  }
  .mobile-top-actions{
    width:100%!important;
    height:38px!important;
    display:grid!important;
    grid-template-columns:repeat(4,1fr)!important;
    align-items:center!important;
  }
  .mobile-top-actions button{
    width:100%!important;
    height:38px!important;
    min-width:0!important;
    display:grid!important;
    place-items:center!important;
    padding:0!important;
    margin:0!important;
    color:#8a8a8a!important;
    background:transparent!important;
    border:0!important;
    position:relative!important;
  }
  .mobile-top-actions button svg{
    width:19px!important;
    height:19px!important;
    display:block!important;
    fill:currentColor!important;
  }
  #mobileUsersTop svg{width:21px!important;height:21px!important}
  #mobileCallsTop svg{width:18px!important;height:18px!important}
  #mobileSettingsTop svg{width:20px!important;height:20px!important}
  .mobile-top-actions button span{
    position:absolute!important;
    top:1px!important;
    left:50%!important;
    right:auto!important;
    transform:translateX(4px)!important;
    min-width:15px!important;
    height:13px!important;
    line-height:13px!important;
    padding:0 3px!important;
    border-radius:7px!important;
    background:#2196e8!important;
    color:#fff!important;
    font-size:8px!important;
    font-weight:700!important;
    text-align:center!important;
  }
  .mobile-side-arrow{top:102px!important}
}

/* V9.3.4 - mobile smiley hub + floating gift */
.mobile-gift-float,.mobile-fun-panel{display:none}
@media(max-width:760px){
  .mobile-gift-float{
    display:grid!important;position:fixed!important;right:0!important;bottom:94px!important;z-index:49!important;
    width:56px!important;height:70px!important;place-items:center!important;border:0!important;border-radius:8px 0 0 8px!important;
    background:linear-gradient(180deg,#fff,#f1f1f1)!important;box-shadow:0 2px 9px rgba(0,0,0,.32)!important;padding:0!important
  }
  .mobile-gift-float:before{
    content:'';position:absolute;left:-8px;top:25px;border-top:9px solid transparent;border-bottom:9px solid transparent;border-right:9px solid #f4f4f4
  }
  .mobile-gift-box{font-size:34px!important;line-height:1!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.2))}
  .mobile-fun-panel{
    display:block;position:fixed;left:6px;right:68px;bottom:51px;z-index:82;max-height:52vh;background:#fff;
    border:1px solid #d8d8d8;border-radius:5px;box-shadow:0 4px 18px rgba(0,0,0,.34);overflow:hidden
  }
  .mobile-fun-panel.hidden{display:none!important}
  .mobile-fun-tabs{height:48px;display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid #e8e8e8;background:#fafafa}
  .mobile-fun-tabs button{
    border:0;border-right:1px solid #eee;background:transparent;color:#777;font-size:18px;display:flex;align-items:center;justify-content:center;
    gap:5px;padding:0 4px;position:relative
  }
  .mobile-fun-tabs button:last-child{border-right:0}
  .mobile-fun-tabs button span{font-size:10px;font-weight:600}
  .mobile-fun-tabs button.active{color:#2196e8;background:#fff}
  .mobile-fun-tabs button.active:after{content:'';position:absolute;left:12px;right:12px;bottom:0;height:2px;background:#2196e8}
  .mobile-fun-body{max-height:calc(52vh - 48px);overflow-y:auto;background:#fff;-webkit-overflow-scrolling:touch}
  .mobile-fun-grid.hidden{display:none!important}
  .mobile-emoji-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;padding:9px}
  .mobile-emoji-item{height:38px;border:0;background:#fff;font-size:24px;border-radius:4px}
  #mobileGamesGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:10px}
  .mobile-game-item{min-height:84px;border:1px solid #e3e3e3;border-radius:5px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:7px}
  .mobile-game-item span{font-size:27px}.mobile-game-item b{font-size:10px;color:#555;text-align:center}
  .mobile-gifs-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:7px}
  .mobile-gif-item{border:0;padding:0;background:#f3f3f3;border-radius:4px;overflow:hidden;aspect-ratio:1/1}
  .mobile-gif-item img{width:100%;height:100%;object-fit:cover;display:block}
  .games-fun,.gifs-fun{display:none!important}
}

/* V9.3.5 mobile reference fixes */
@media(max-width:760px){
  .mobile-topbar{
    position:relative!important;
    display:flex!important;
    justify-content:flex-start!important;
    align-items:center!important;
    padding-left:0!important;
  }
  .mobile-room-title{
    display:block!important;
    position:absolute!important;
    left:8px!important;
    top:0!important;
    height:38px!important;
    max-width:92px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    border:0!important;
    background:transparent!important;
    color:#888!important;
    font-size:12px!important;
    font-weight:500!important;
    text-align:left!important;
    padding:0!important;
    z-index:3!important;
  }
  .mobile-top-actions{
    width:calc(100% - 98px)!important;
    margin-left:98px!important;
  }

  /* One continuous room image from the microphone area through the chat area */
  .chat.room-has-background{
    position:relative!important;
    background-color:var(--room-bg-color,#fff)!important;
    background-image:var(--room-bg-image,none)!important;
    background-repeat:no-repeat!important;
    background-position:var(--room-bg-position,center center)!important;
    background-size:cover!important;
  }
  .chat.room-has-background .mobile-mic-strip,
  .chat.room-has-background #messageArea{
    background-color:transparent!important;
    background-image:none!important;
  }
  .chat.room-has-background .mobile-mic-strip{
    backdrop-filter:none!important;
  }

  /* Gift icon only: no white card/background */
  .mobile-gift-float{
    width:54px!important;height:62px!important;
    background:transparent!important;
    box-shadow:none!important;
    border:0!important;
    border-radius:0!important;
  }
  .mobile-gift-float:before{display:none!important}
  .mobile-gift-box{
    font-size:38px!important;
    filter:drop-shadow(0 2px 3px rgba(0,0,0,.38))!important;
  }
}

/* V9.3.6 - mobile navigation + continuous room background + microphone frames */
@media(max-width:760px){
  /* Current room name remains visible while any top-menu page/panel is open. */
  .mobile-room-title{
    display:flex!important;
    align-items:center!important;
    left:7px!important;
    width:92px!important;
    max-width:92px!important;
    height:38px!important;
    color:#7e7e7e!important;
    font-size:12px!important;
    font-weight:600!important;
    z-index:1003!important;
  }
  body.mobile-settings-open .mobile-topbar,
  body.mobile-drawer-left .mobile-topbar,
  body.mobile-drawer-right .mobile-topbar{
    position:fixed!important;top:0!important;left:0!important;right:0!important;z-index:1002!important;
  }
  body.mobile-settings-open #panelSettings{
    padding-top:38px!important;
  }

  /* The room image is one layer. The microphone strip no longer paints white/dark over it. */
  .chat.room-has-background{
    background-color:var(--room-bg-color,#fff)!important;
    background-image:var(--room-bg-image,none)!important;
    background-repeat:no-repeat!important;
    background-position:var(--room-bg-position,center center)!important;
    background-size:cover!important;
  }
  .chat.room-has-background .mobile-mic-strip,
  .chat.room-has-background .mobile-mic-strip button,
  .chat.room-has-background #messageArea{
    background-color:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
  }
  .mobile-mic-strip{
    background:transparent!important;
    border:0!important;
  }

  /* Reference-like framed microphone positions */
  .mobile-mic-strip button{
    border:0!important;
    background:transparent!important;
    overflow:visible!important;
  }
  .mobile-mic-strip button:before{
    content:''!important;
    width:36px!important;
    height:36px!important;
    border-radius:50%!important;
    border:2px solid rgba(255,255,255,.88)!important;
    box-shadow:0 1px 4px rgba(0,0,0,.48), inset 0 0 0 1px rgba(0,0,0,.12)!important;
    background:rgba(20,20,20,.22)!important;
    position:absolute!important;
    top:2px!important;
    left:50%!important;
    transform:translateX(-50%)!important;
    z-index:0!important;
  }
  .mobile-mic-strip button svg,
  .mobile-mic-strip button>i,
  .mobile-mic-strip button>span:first-child{
    position:relative!important;
    z-index:1!important;
  }
  .mobile-mic-strip button span:last-child{
    position:absolute!important;
    left:0!important;right:0!important;bottom:1px!important;
    z-index:2!important;
    color:#fff!important;
    text-shadow:0 1px 3px rgba(0,0,0,.85)!important;
    font-size:9px!important;
  }

  /* Settings page resembles supplied mobile reference: white full page below persistent nav. */
  body.mobile-settings-open #panelSettings{
    background:#fff!important;
    width:100%!important;
    max-width:none!important;
    border:0!important;
    box-shadow:none!important;
  }
  body.mobile-settings-open #panelSettings .panel-head{
    display:none!important;
  }
}

/* V9.3.7 - definitive mobile room background layer */
@media(max-width:760px){
  .chat{isolation:isolate!important}

  /* Never rely on the mic row or message row to paint the room image separately. */
  .chat.room-has-background{
    background-image:none!important;
    background-color:var(--room-bg-color,#fff)!important;
  }
  .chat.room-has-background:before{
    content:""!important;
    display:block!important;
    position:absolute!important;
    z-index:0!important;
    left:0!important;
    right:0!important;
    top:38px!important;       /* directly below mobile top navigation */
    bottom:48px!important;    /* directly above composer */
    pointer-events:none!important;
    background-color:var(--room-bg-color,#fff)!important;
    background-image:var(--room-bg-image,none)!important;
    background-repeat:no-repeat!important;
    background-position:var(--room-bg-position,center center)!important;
    background-size:cover!important;
  }

  .mobile-topbar{position:relative!important;z-index:20!important}
  .mobile-mic-strip{
    position:relative!important;
    z-index:5!important;
    background:transparent!important;
    background-image:none!important;
  }
  #messageArea.messages{
    position:relative!important;
    z-index:4!important;
    background:transparent!important;
    background-image:none!important;
  }
  .composer{position:relative!important;z-index:20!important}

  /* Microphones: keep icon + label visible and give every microphone its own circle. */
  .mobile-mic-strip button{
    position:relative!important;
    height:64px!important;
    min-width:0!important;
    color:#fff!important;
    text-shadow:0 1px 3px rgba(0,0,0,.95)!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    padding-top:8px!important;
    overflow:visible!important;
    opacity:1!important;
  }
  .mobile-mic-strip button:before{
    width:34px!important;
    height:34px!important;
    top:3px!important;
    background:rgba(255,255,255,.14)!important;
    border:2px solid rgba(255,255,255,.95)!important;
    box-sizing:border-box!important;
  }
  .mobile-mic-strip button{
    font-size:20px!important;
    line-height:28px!important;
  }
  .mobile-mic-strip button span{
    display:block!important;
    position:absolute!important;
    left:0!important;
    right:0!important;
    bottom:1px!important;
    color:#fff!important;
    font-size:9px!important;
    line-height:12px!important;
    font-weight:600!important;
    text-align:center!important;
    opacity:1!important;
  }

  /* Keep side arrows above the new background layer. */
  .mobile-side-arrow,.mobile-gift-float{z-index:30!important}
}

/* V9.3.8 - room upload URL fix companion + microphone visibility */
@media(max-width:760px){
 .mobile-mic-strip{z-index:8!important;opacity:1!important;visibility:visible!important}
 .mobile-mic-strip button{opacity:1!important;visibility:visible!important;z-index:2!important}
 .mobile-mic-strip button:before{display:block!important;opacity:1!important}
 .mobile-mic-strip button>*{visibility:visible!important;opacity:1!important}
 .chat.room-has-background:before{z-index:0!important}
 #messageArea.messages{z-index:3!important}
}

.mobile-settings-reference-head{display:none}
@media(max-width:760px){
 body.mobile-settings-open .mobile-topbar{background:#fff!important;color:#888!important;border-bottom:1px solid #ddd!important}
 body.mobile-settings-open #panelSettings{padding-top:38px!important;background:#fff!important}
 .mobile-settings-reference-head{display:block;background:#fff}
 .ms-profile{height:80px;display:grid;grid-template-columns:58px 1fr auto;gap:10px;align-items:center;padding:8px 15px;border-bottom:1px solid #eee}
 .ms-avatar{width:54px;height:54px;border:3px solid #fff;box-shadow:0 0 0 1px #ccc;background:#eee center/cover no-repeat;border-radius:2px}
 .ms-profile-copy{display:flex;flex-direction:column;gap:7px;min-width:0}.ms-profile-copy strong{font-size:14px;color:#222}.ms-profile-copy small{font-size:11px;color:#999}
 .ms-admin-badge{align-self:start;margin-top:3px;background:#1688f8;color:#fff;border-radius:13px;padding:5px 10px;font-size:10px;font-weight:700}
 .ms-gold-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:25px 15px 30px;background:#f7f7f7}
 .ms-gold-cards div{height:75px;border-radius:4px;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px}
 .ms-gold-cards div:nth-child(1){background:#0785f8}.ms-gold-cards div:nth-child(2){background:#ff3b3b}.ms-gold-cards div:nth-child(3){background:#43d260}
 .ms-gold-cards b{font-size:12px}.ms-gold-cards span{font-size:9px}
 .ms-setting-row{display:flex;flex-direction:column;gap:8px;padding:9px 26px;border-bottom:1px solid #eee;font-size:10px;color:#444}
 .ms-setting-row select{height:24px;border:0;background:#fff;color:#333;font-size:12px;outline:0}
 .ms-color-setting{padding:10px 26px 12px;border-bottom:1px solid #eee;font-size:10px;color:#444}
 .ms-color-palette{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}
 .ms-color-palette button{width:12px;height:12px;border:0;border-radius:50%;padding:0;box-shadow:none}
 .ms-color-palette button.selected{outline:2px solid #333;outline-offset:1px}
 .mobile-settings-title{background:#f4f4f4!important;color:#777!important;padding:18px 15px 10px!important;margin:0 -14px!important}
 .mobile-settings-real>button{height:44px!important;font-size:13px!important}
}

/* V9.4.0 - rebuilt mobile settings, reference-first */
.mobile-settings-screen{display:none}
@media(max-width:760px){
  body.mobile-settings-open #panelSettings{
    padding-top:38px!important;
    background:#fff!important;
    overflow-y:auto!important;
  }
  body.mobile-settings-open #panelSettings .settings-scroll{
    padding:0!important;
    margin:0!important;
    background:#fff!important;
  }

  /* Hide the legacy settings blocks on mobile; desktop remains untouched. */
  body.mobile-settings-open #panelSettings .member-join-box,
  body.mobile-settings-open #panelSettings .settings-profile-card,
  body.mobile-settings-open #panelSettings .setting-row,
  body.mobile-settings-open #panelSettings .settings-separator,
  body.mobile-settings-open #panelSettings .more-settings,
  body.mobile-settings-open #panelSettings .theme-system-row,
  body.mobile-settings-open #panelSettings .mobile-settings-real,
  body.mobile-settings-open #panelSettings .mobile-settings-reference-head{
    display:none!important;
  }

  body.mobile-settings-open .mobile-settings-screen{
    display:block!important;
    width:100%!important;
    background:#fff!important;
    color:#333!important;
  }

  .mobile-settings-screen .ms-profile{
    height:82px;display:grid;grid-template-columns:58px 1fr auto;gap:10px;align-items:center;
    padding:8px 15px;border-bottom:1px solid #eee;background:#fff
  }
  .mobile-settings-screen .ms-avatar{
    width:54px;height:54px;border:3px solid #fff;box-shadow:0 0 0 1px #ccc;
    background:#eee center/cover no-repeat;border-radius:2px;display:grid;place-items:center;font-weight:700;color:#777
  }
  .mobile-settings-screen .ms-profile-copy{display:flex;flex-direction:column;gap:7px;min-width:0}
  .mobile-settings-screen .ms-profile-copy strong{font-size:14px;color:#222}
  .mobile-settings-screen .ms-profile-copy small{font-size:11px;color:#999}
  .mobile-settings-screen .ms-admin-badge{
    align-self:start;margin-top:3px;background:#1688f8;color:#fff;border-radius:13px;
    padding:5px 10px;font-size:10px;font-weight:700
  }

  .mobile-settings-screen .ms-gold-cards{
    display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:25px 15px 30px;background:#f7f7f7
  }
  .mobile-settings-screen .ms-gold-cards div{
    height:75px;border-radius:4px;color:#fff;display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:13px
  }
  .mobile-settings-screen .ms-gold-cards div:nth-child(1){background:#0785f8}
  .mobile-settings-screen .ms-gold-cards div:nth-child(2){background:#ff3b3b}
  .mobile-settings-screen .ms-gold-cards div:nth-child(3){background:#43d260}
  .mobile-settings-screen .ms-gold-cards b{font-size:12px}
  .mobile-settings-screen .ms-gold-cards span{font-size:9px}

  .mobile-settings-screen .ms-setting-row{
    display:flex;flex-direction:column;gap:8px;padding:9px 26px;border-bottom:1px solid #eee;
    font-size:10px;color:#444;background:#fff
  }
  .mobile-settings-screen .ms-setting-row select{
    height:24px;border:0;background:#fff;color:#333;font-size:12px;outline:0
  }
  .mobile-settings-screen .ms-color-setting{
    padding:10px 26px 12px;border-bottom:1px solid #eee;font-size:10px;color:#444;background:#fff
  }
  .mobile-settings-screen .ms-color-palette{
    display:flex;flex-wrap:wrap;gap:5px;margin-top:10px
  }
  .mobile-settings-screen .ms-color-palette button{
    width:12px;height:12px;border:0;border-radius:50%;padding:0
  }

  .mobile-settings-section-title{
    padding:18px 15px 10px;background:#f4f4f4;color:#777;font-size:11px;border-bottom:1px solid #eee
  }
  .mobile-settings-screen>button{
    width:100%;height:44px;border:0;border-bottom:1px solid #eee;background:#fff;
    display:grid;grid-template-columns:34px 1fr 20px;align-items:center;text-align:left;
    color:#555;font-size:13px;padding:0 15px
  }
  .mobile-settings-screen>button span{padding-left:4px}
  .mobile-settings-screen>button b{font-size:20px;color:#bbb;font-weight:400;text-align:right}
  .ms-switch-row{
    height:44px;display:flex;align-items:center;justify-content:space-between;
    padding:0 18px;border-bottom:1px solid #eee;background:#fff;font-size:12px
  }

  /* persistent top navigation exactly remains visible */
  body.mobile-settings-open .mobile-topbar{
    display:flex!important;position:fixed!important;top:0!important;left:0!important;right:0!important;
    z-index:1005!important;background:#fff!important;border-bottom:1px solid #ddd!important
  }
}


/* V9.4.1 - exact mobile settings reference; no blue Ayarlar header */
.mobile-settings-reference{display:none}
@media(max-width:760px){
  /* Keep the normal white top navigation visible on every mobile panel. */
  body.mobile-settings-open .mobile-topbar{
    display:flex!important;position:fixed!important;top:0!important;left:0!important;right:0!important;
    height:38px!important;z-index:1005!important;background:#fff!important;color:#888!important;
    border-bottom:1px solid #ddd!important;box-shadow:none!important
  }
  body.mobile-settings-open .mobile-room-title{display:flex!important;color:#888!important}
  body.mobile-settings-open .mobile-top-actions button{color:#8a8a8a!important}
  body.mobile-settings-open .mobile-top-actions button span{background:#1688f8!important;color:#fff!important}

  /* The old full-width blue 'Ayarlar' header must never render. */
  #panelSettings:before{content:none!important;display:none!important}
  body.mobile-settings-open .sidebar-icons{display:none!important}

  body.mobile-settings-open .sidebar{
    top:0!important;left:0!important;right:0!important;width:100vw!important;height:100dvh!important;
    transform:none!important;background:#fff!important;box-shadow:none!important;z-index:61!important
  }
  body.mobile-settings-open #panelSettings{
    display:block!important;position:absolute!important;top:38px!important;left:0!important;right:0!important;bottom:0!important;
    height:auto!important;padding:0!important;margin:0!important;background:#fff!important;overflow-y:auto!important;overflow-x:hidden!important
  }
  body.mobile-settings-open #panelSettings>.desktop-settings-only{display:none!important}
  body.mobile-settings-open #panelSettings>.mobile-settings-reference{display:block!important}

  .mobile-settings-reference{width:100%;min-height:100%;background:#fff;color:#333;font-family:Arial,sans-serif}
  .msr-profile-card{
    min-height:81px;display:grid;grid-template-columns:58px minmax(0,1fr) 62px;gap:10px;align-items:center;
    padding:8px 15px;border-bottom:1px solid #eee;background:#fff;box-sizing:border-box
  }
  .msr-avatar{
    width:54px;height:54px;border:3px solid #fff;box-shadow:0 0 0 1px #c9c9c9;border-radius:2px;
    background:#eee center/cover no-repeat;display:grid;place-items:center;font-size:19px;font-weight:700;color:#777
  }
  .msr-profile-main{min-width:0;align-self:stretch;padding-top:4px;display:flex;flex-direction:column}
  .msr-nickline{display:flex;align-items:center;min-height:22px}.msr-nickline strong{font-size:14px;color:#222;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .msr-rankline{font-size:9px;color:#6c2d7e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:14px;letter-spacing:.2px}
  .msr-status{font-size:10px;color:#999;margin-top:4px}
  .msr-profile-side{height:100%;display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;padding:3px 0 5px}
  .msr-admin-badge{background:#1688f8;color:#fff;border-radius:13px;padding:5px 10px;font-size:10px;font-weight:700}
  #mobileProfileChevron{border:0;background:transparent;color:#777;font-size:20px;line-height:18px;padding:0 3px}

  .msr-gold-area{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:25px 15px 30px;background:#f7f7f7}
  .msr-gold-card{height:75px;border-radius:4px;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px}
  .msr-gold-card.earned{background:#0785f8}.msr-gold-card.spent{background:#ff3b3b}.msr-gold-card.balance{background:#43d260}
  .msr-gold-card b{font-size:12px;font-weight:500}.msr-gold-card span{font-size:9px;font-weight:600}

  .msr-select-block{background:#fff}
  .msr-select-block label{display:flex;flex-direction:column;gap:7px;padding:9px 26px;border-bottom:1px solid #eee;font-size:10px;color:#444}
  .msr-select-block select{height:22px;border:0;background:#fff;color:#222;font-size:12px;outline:0;padding:0;appearance:auto}
  .msr-color-row{padding:10px 26px 11px;border-bottom:1px solid #eee;font-size:10px;color:#444}
  .msr-color-palette{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}
  .msr-color-palette button{width:12px;height:12px;border:0;border-radius:50%;padding:0;box-shadow:none}
  .msr-color-palette button.selected{outline:2px solid #333;outline-offset:1px}

  .msr-section-title{height:43px;display:flex;align-items:flex-end;padding:0 15px 9px;background:#f4f4f4;color:#777;font-size:11px;border-bottom:1px solid #eee;box-sizing:border-box}
  .msr-action-list button{width:100%;height:44px;border:0;border-bottom:1px solid #eee;background:#fff;display:grid;grid-template-columns:28px 1fr 18px;align-items:center;padding:0 13px;color:#444;text-align:left;font-size:13px}
  .msr-action-list .ico{color:#888;font-size:15px;text-align:center}.msr-action-list button>b{font-size:20px;color:#c7c7c7;font-weight:400;text-align:right}

  /* Chat text preferences chosen on this screen. */
  #messageArea .msg{font-size:var(--chat-font-size,16px)!important;color:var(--chat-text-color,#333)!important}
}

/* Desktop settings remain the original project implementation. */
@media(min-width:761px){.desktop-settings-only{display:block}.mobile-settings-reference{display:none!important}}

/* V9.4.2 - keep mobile top navigation above every panel */
@media(max-width:760px){
  /* Do not trap the topbar inside .chat's stacking context. */
  .chat{isolation:auto!important;}

  body.mobile-settings-open .mobile-topbar,
  body.mobile-drawer-left .mobile-topbar,
  body.mobile-drawer-right .mobile-topbar{
    display:flex!important;
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    width:100vw!important;
    height:38px!important;
    min-height:38px!important;
    z-index:99999!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    background:#fff!important;
  }

  body.mobile-settings-open .mobile-room-title,
  body.mobile-drawer-left .mobile-room-title,
  body.mobile-drawer-right .mobile-room-title{
    display:flex!important;
    position:absolute!important;
    left:7px!important;
    top:0!important;
    width:92px!important;
    height:38px!important;
    z-index:100000!important;
    visibility:visible!important;
  }

  body.mobile-settings-open .mobile-top-actions,
  body.mobile-drawer-left .mobile-top-actions,
  body.mobile-drawer-right .mobile-top-actions{
    display:grid!important;
    position:absolute!important;
    top:0!important;
    right:0!important;
    width:calc(100vw - 92px)!important;
    height:38px!important;
    z-index:100000!important;
    grid-template-columns:repeat(4,1fr)!important;
  }

  /* Settings content begins below the persistent navigation. */
  body.mobile-settings-open .sidebar{
    z-index:61!important;
    top:0!important;
  }
  body.mobile-settings-open #panelSettings{
    top:38px!important;
    height:calc(100dvh - 38px)!important;
    padding-top:0!important;
    z-index:62!important;
  }
  body.mobile-settings-open #mobileSettingsReference{
    padding-top:0!important;
  }
}
