*{box-sizing:border-box}
:root{--blue:#0b74a8;--blue-dark:#075c87;--blue-light:#e7f4fb;--green:#95c83d;--pink:#ea4c89;--orange:#f1a600;--line:#d8e3ec;--text:#213242;--muted:#6b7b88;--panel:#ffffff;--soft:#f4f8fb;--danger:#d83b43}
html{height:100%;width:100%}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#edf1f5;color:var(--text);min-height:100vh;width:100%;font-size:14px;display:flex;flex-direction:column}.topbar{height:58px;display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:0 1.2rem;background:linear-gradient(#1283bd,#0870a5);border-bottom:4px solid #074d73;position:sticky;top:0;z-index:20;box-shadow:0 2px 8px rgba(0,0,0,.2)}.brand{display:flex;align-items:center;gap:.45rem;color:#fff;text-decoration:none;font-size:1.25rem;font-weight:800;text-shadow:0 1px 1px rgba(0,0,0,.35)}.brand-mark{width:31px;height:31px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff 0 7%,#66cb57 8% 24%,transparent 25%),radial-gradient(circle at 65% 65%,#fff 0 6%,#66cb57 7% 22%,transparent 23%);border:2px solid #9fe372;box-shadow:0 0 0 3px rgba(255,255,255,.15)}.brand strong{color:#ff5c92}.brand em{color:#b9ea58;font-style:normal;font-size:.78em;margin-left:1px}.topbar nav{display:flex;gap:.3rem;flex-wrap:wrap;align-items:center}.topbar nav a,.btn{color:#fff;text-decoration:none;background:rgba(0,0,0,.16);border:1px solid rgba(255,255,255,.24);border-radius:3px;padding:.52rem .85rem;display:inline-flex;align-items:center;gap:.3rem;cursor:pointer;font:inherit}.topbar nav a:hover,.btn:hover{filter:brightness(1.06)}.btn{background:#0c76aa;border-color:#075d87}.btn.primary{background:linear-gradient(#bde96c,#8cc43c);border-color:#72aa2a;color:#173106;font-weight:bold}.btn.danger,.danger{background:var(--danger)!important;border-color:#b72831!important;color:#fff!important}.btn.small,.mini{font-size:.8rem;padding:.28rem .55rem}.mini{border:1px solid #b5c4cf;border-radius:3px;color:#214055;background:#f4f8fb;cursor:pointer}.page{max-width:none;width:100%;margin:0;padding:1.2rem;flex:1 0 auto;min-height:calc(100vh - 58px)}.footer{text-align:center;color:#71808b;padding:.9rem;flex:0 0 auto}.card,.hero{background:var(--panel);border:1px solid var(--line);border-radius:4px;padding:1rem;box-shadow:0 1px 3px rgba(0,0,0,.08)}.hero{margin-bottom:1rem;background:linear-gradient(90deg,#fff 0,#f7fbfe 52%,#e7f4fb 100%);border-top:4px solid var(--orange)}.hero h1{margin-top:.15rem;color:#0a648f}.narrow{max-width:none;width:100%;margin:0}.two-col{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1rem;width:100%}.grid{display:grid;gap:1rem}.news-card h2 a{color:#0b6d9f;text-decoration:none}.news-card h2 a:hover{text-decoration:underline}.muted,.hint{color:var(--muted);font-size:.9rem}.alert{padding:.8rem 1rem;border-radius:4px;margin:1rem 0}.alert.ok{background:#d9f1d1;border:1px solid #96c785;color:#23551a}.alert.danger{background:#f8dddd;border:1px solid #e0a0a4;color:#8b2028}form{display:grid;gap:.8rem}label{display:grid;gap:.35rem}input,textarea,select{width:100%;border:1px solid #bccbd6;background:#fff;color:#1d2b36;border-radius:3px;padding:.62rem;font:inherit}input:focus,textarea:focus,select:focus{outline:2px solid rgba(11,116,168,.18);border-color:#0b74a8}textarea{resize:vertical}table{width:100%;border-collapse:collapse;overflow:auto;background:#fff}th{background:#e9f4fb;color:#264a60}th,td{border-bottom:1px solid var(--line);padding:.65rem;text-align:left;vertical-align:top}.actions,.inline-form{display:flex;gap:.4rem;flex-wrap:wrap;align-items:center}.tabs{display:flex;gap:.35rem;flex-wrap:wrap;margin:0 0 1rem}.tabs a{color:#214055;text-decoration:none;padding:.5rem .75rem;border-radius:3px;background:#fff;border:1px solid var(--line)}.tabs a.active{background:#0b74a8;color:#fff;border-color:#075c87}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:1rem}.stats div{background:#f6f9fb;border:1px solid var(--line);border-radius:4px;padding:1rem}.stats strong{display:block;font-size:2rem;color:#0b74a8}.pagination{display:flex;justify-content:center;gap:.35rem;margin:1.5rem}.pagination a{color:#214055;text-decoration:none;padding:.45rem .7rem;border-radius:3px;background:#fff;border:1px solid var(--line)}.pagination a.active{background:#0b74a8;color:#fff}.reading{max-width:none;width:100%;margin:0}.post-body{font-size:1.07rem;line-height:1.65}.login-welcome{border-left:5px solid var(--green)}
/* ChatRoom-style chat page */
.chat-page-wrap{max-width:1360px;margin:.75rem auto 0}.chatroom-app{background:#fff;border:1px solid #b8c8d6;box-shadow:0 2px 8px rgba(0,0,0,.16)}.chatroom-titlebar{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:linear-gradient(#f7b933,#e7a218);color:#fff;font-weight:bold;padding:.5rem .75rem;border-bottom:1px solid #c2870d;text-shadow:0 1px 0 rgba(0,0,0,.25)}.chatroom-titlebar small{font-weight:normal;text-shadow:none;color:#fffde8}.chatroom-grid{display:grid;grid-template-columns:218px minmax(0,1fr) 286px;min-height:calc(100vh - 162px)}.room-rail{background:#f1f6fa;border-right:1px solid var(--line);padding:.75rem}.rail-title{font-weight:bold;color:#0a648f;margin:.25rem 0 .6rem}.room-list{display:grid;gap:.35rem;margin-bottom:1rem}.room-tab{width:100%;display:flex;align-items:center;justify-content:space-between;border:1px solid #ccdbe5;background:#fff;color:#294251;border-radius:3px;padding:.55rem .6rem;cursor:pointer;text-align:left;font:inherit}.room-tab:hover{background:#eef8ff}.room-tab.active{background:#0b74a8;border-color:#075c87;color:#fff;font-weight:bold}.room-tab small{opacity:.8}.rail-box{background:#fff;border:1px solid var(--line);border-radius:3px;margin-top:.75rem;padding:.65rem}.rail-box ul{padding-left:1.15rem;margin:.4rem 0}.chat-main{display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:#fff}.chat-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.65rem .8rem;background:#f7fafc;border-bottom:1px solid var(--line)}.chat-head h1{font-size:1.25rem;margin:0;color:#0a648f}.chat-head p{margin:.25rem 0 0}.messages{height:auto;min-height:430px;overflow:auto;background:#fff;padding:0;display:flex;flex-direction:column;border:0}.msg{display:block;border-bottom:1px solid #edf2f6}.msg.mine{justify-content:unset}.bubble{max-width:none;background:transparent;border-radius:0;padding:.52rem .75rem;line-height:1.35}.mine .bubble{background:#eaf7ff;border-left:4px solid #0b74a8}.msg.other:nth-child(even) .bubble{background:#fbfdff}.meta{display:flex;gap:.45rem;align-items:center;margin-bottom:.25rem;color:#6a7a86;font-size:.82rem}.user-link{border:0;background:transparent;color:#0a648f;font-weight:700;cursor:pointer;padding:0;text-decoration:none}.user-link:hover{text-decoration:underline}.chat-image{display:block;max-width:220px;max-height:220px;border-radius:3px;margin-top:.45rem;border:1px solid var(--line)}.send-form{display:flex;grid-template-columns:none;gap:.45rem;margin:0;padding:.65rem;background:#f2f5f7;border-top:1px solid var(--line)}.send-form input[name=text]{flex:1}.file-btn{display:inline-flex;align-items:center;justify-content:center;background:#fff;border:1px solid #bccbd6;border-radius:3px;padding:.52rem .65rem;cursor:pointer;color:#3c5668}.file-btn input{display:none}.side-panel{position:static;height:auto;border-left:1px solid var(--line);background:#f8fbfd;padding:0}.side-block{padding:.75rem;border-bottom:1px solid var(--line)}.side-block h2{font-size:1rem;color:#0a648f;margin:.1rem 0 .6rem}.online-count{background:#0b74a8;color:#fff;border-radius:999px;padding:.1rem .45rem;font-size:.78rem}.online-list{display:grid;gap:.25rem;max-height:280px;overflow:auto}.online-user{display:grid;grid-template-columns:auto 1fr auto;gap:.45rem;align-items:center;width:100%;text-align:left;border:1px solid transparent;border-radius:3px;padding:.42rem;background:#fff;color:#253d4d;cursor:pointer}.online-user:hover{border-color:#9ec7df;background:#eef8ff}.dot{width:.58rem;height:.58rem;border-radius:50%;background:#50bf45;box-shadow:0 0 0 2px #d8f1d4}.avatar{width:72px;height:72px;object-fit:cover;border-radius:50%;background:#fff;border:1px solid var(--line)}.avatar.big{width:140px;height:140px}.profile-pop{text-align:center}.profile-pop h3{margin:.55rem 0 .2rem;color:#0a648f}.mod-tools{margin-top:1rem;display:grid;gap:.4rem}.private-dock{position:fixed;right:1rem;bottom:1rem;display:flex;gap:.75rem;align-items:flex-end;z-index:50;max-width:calc(100vw - 2rem);overflow:auto}.private-box{width:340px;padding:0;border:1px solid #afc1ce}.private-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#0b74a8;color:#fff;padding:.5rem .65rem}.private-messages{height:260px;min-height:260px}.private-box .send-form{padding:.5rem}.private-box .private-typing{padding:0 .65rem;margin:.35rem 0}.thumb{max-width:120px;max-height:100px;border-radius:3px}.deleted{opacity:.65}.chat-status-line{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap}.status-pill{display:inline-flex;align-items:center;gap:.35rem;background:#e7f4fb;border:1px solid #c9e2ef;border-radius:999px;color:#0a648f;padding:.2rem .55rem;font-size:.8rem}.typing-flash{color:#0a648f}.right-advice{font-size:.85rem;color:#627383;line-height:1.45}.mobile-only{display:none}@media(max-width:1000px){.chatroom-grid{grid-template-columns:180px minmax(0,1fr)}.side-panel{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr}.chatroom-grid{min-height:unset}.messages{min-height:360px}}@media(max-width:760px){.topbar{height:auto;align-items:flex-start;flex-direction:column;padding:.7rem}.page{padding:.75rem}.two-col{grid-template-columns:1fr}.chatroom-grid{grid-template-columns:1fr}.room-rail{border-right:0;border-bottom:1px solid var(--line)}.side-panel{display:block}.private-dock{position:static;display:grid;margin-top:1rem}.private-box{width:100%}.send-form{flex-wrap:wrap}.mobile-only{display:inline}}

/* Fullscreen site mode for all non-chat pages */
body.site-fullscreen .topbar{position:sticky;top:0;width:100%;z-index:100}
body.site-fullscreen .page:not(.chat-page-shell){display:flex;flex-direction:column;gap:1rem}
body.site-fullscreen .hero,body.site-fullscreen .card{width:100%}
body.site-fullscreen .news-list{grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));align-items:stretch}
body.site-fullscreen .news-card{display:flex;flex-direction:column;min-height:220px}
body.site-fullscreen .news-card .btn{align-self:flex-start;margin-top:auto}
body.site-fullscreen .stats{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
body.site-fullscreen .admin-table-wrap{width:100%;overflow:auto}
body.site-fullscreen table{min-width:760px}
body.site-fullscreen form{max-width:none}
body.site-fullscreen textarea{min-height:170px}
body.site-fullscreen .login-welcome{min-height:100%}
body.site-fullscreen .tabs{width:100%;overflow:auto;flex-wrap:nowrap;padding-bottom:.15rem}
body.site-fullscreen .tabs a{white-space:nowrap}
body.site-fullscreen .pagination{flex:0 0 auto}
@media(max-width:760px){body.site-fullscreen .page:not(.chat-page-shell){padding:.75rem;min-height:calc(100vh - 78px)}body.site-fullscreen .topbar nav{width:100%}body.site-fullscreen .topbar nav a{flex:1;justify-content:center}.card,.hero{padding:.85rem}body.site-fullscreen table{min-width:680px}}

/* Fullscreen chat mode */
body.chat-fullscreen{overflow:hidden;background:#dbe6ef}
body.chat-fullscreen .topbar{position:fixed;left:0;right:0;top:0;height:50px;padding:0 .85rem;z-index:100}
body.chat-fullscreen .brand{font-size:1.1rem}
body.chat-fullscreen .brand-mark{width:28px;height:28px}
body.chat-fullscreen .topbar nav a{padding:.43rem .65rem}
body.chat-fullscreen .chat-page-shell{max-width:none;width:100vw;height:calc(100vh - 50px);margin:0;padding:0;position:fixed;top:50px;left:0;right:0;bottom:0;overflow:hidden}
body.chat-fullscreen .footer{display:none}
body.chat-fullscreen .chat-page-wrap{max-width:none;width:100%;height:100%;margin:0}
body.chat-fullscreen .chatroom-app{height:100%;width:100%;border:0;border-radius:0;box-shadow:none;display:grid;grid-template-rows:38px minmax(0,1fr)}
body.chat-fullscreen .chatroom-titlebar{height:38px;padding:.45rem .75rem}
body.chat-fullscreen .chatroom-grid{height:100%;min-height:0;grid-template-columns:240px minmax(0,1fr) 320px;overflow:hidden}
body.chat-fullscreen .room-rail{min-height:0;overflow:auto}
body.chat-fullscreen .chat-main{min-height:0;height:100%;overflow:hidden}
body.chat-fullscreen .messages{min-height:0;height:100%;overflow:auto}
body.chat-fullscreen .side-panel{min-height:0;height:100%;overflow:auto}
body.chat-fullscreen .online-list{max-height:calc(100vh - 255px)}
body.chat-fullscreen .private-dock{right:.75rem;bottom:.75rem}
body.chat-fullscreen .private-box{box-shadow:0 8px 24px rgba(0,0,0,.24)}
@media(max-width:1000px){body.chat-fullscreen{overflow:auto}body.chat-fullscreen .topbar{position:sticky;height:auto;padding:.7rem}body.chat-fullscreen .chat-page-shell{position:static;width:auto;height:auto;min-height:calc(100vh - 58px);overflow:visible}body.chat-fullscreen .chatroom-app{min-height:calc(100vh - 58px)}body.chat-fullscreen .chatroom-grid{height:auto;overflow:visible}body.chat-fullscreen .messages{height:55vh;min-height:360px}body.chat-fullscreen .side-panel{height:auto;overflow:visible}body.chat-fullscreen .online-list{max-height:220px}}
@media(max-width:760px){body.chat-fullscreen .messages{height:48vh;min-height:320px}}

/* Improved auth and profile pages */
.auth-shell{display:grid;grid-template-columns:minmax(280px,38%) minmax(360px,1fr);gap:1rem;align-items:stretch;min-height:calc(100vh - 100px);width:100%}.auth-hero{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center;min-height:360px;padding:2rem;background:linear-gradient(135deg,#083f69 0%,#0b74a8 48%,#7ecb3e 100%);color:#fff;border:0}.auth-hero:before{content:"";position:absolute;right:-90px;top:-90px;width:260px;height:260px;border-radius:50%;background:rgba(255,255,255,.13)}.auth-hero:after{content:"";position:absolute;left:-50px;bottom:-60px;width:190px;height:190px;border-radius:50%;background:rgba(255,255,255,.1)}.auth-hero>*{position:relative;z-index:1}.auth-hero h1{font-size:clamp(2rem,4vw,4.2rem);line-height:1;margin:.45rem 0;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.22)}.auth-hero p{font-size:1.08rem;max-width:620px;line-height:1.55;color:#eefaff}.eyebrow{display:inline-flex;align-self:flex-start;text-transform:uppercase;letter-spacing:.08em;font-weight:800;font-size:.75rem;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.25);padding:.35rem .55rem;border-radius:999px}.auth-points{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1.3rem}.auth-points span{background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.23);padding:.48rem .7rem;border-radius:999px;font-weight:700}.auth-card{padding:1.35rem;border-top:4px solid var(--orange)}.auth-card-stack{display:grid;gap:1rem;align-content:start}.compact-auth{min-height:0}.form-title{margin-bottom:.85rem}.form-title h2{margin:.1rem 0;color:#0a648f;font-size:1.45rem}.form-title p{margin:.2rem 0}.form-title.sub{padding-top:.5rem;border-top:1px solid var(--line)}.form-grid{display:grid;gap:.8rem}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.big-btn{justify-content:center;font-size:1rem;padding:.75rem 1rem}.auth-switch{text-align:center;margin:.35rem 0 0}.auth-switch a{color:#0b6d9f;font-weight:bold}.guest-card{border-top-color:var(--green)}.register-shell{grid-template-columns:minmax(280px,34%) minmax(420px,1fr)}
.profile-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:1rem;width:100%;align-items:start}.profile-preview-card{position:sticky;top:74px;text-align:center;padding:0 1rem 1rem;overflow:hidden}.profile-cover{height:120px;margin:0 -1rem 0;background:linear-gradient(135deg,#0b74a8,#7ecb3e)}.profile-avatar{width:148px;height:148px;border:5px solid #fff;margin-top:-74px;box-shadow:0 5px 14px rgba(0,0,0,.18)}.profile-preview-card h1{margin:.55rem 0 .1rem;color:#0a648f}.profile-mood{display:inline-block;background:#e7f4fb;border:1px solid #c9e2ef;border-radius:999px;padding:.4rem .7rem;color:#0a648f;font-weight:700}.profile-bio-preview{line-height:1.55;text-align:left;background:#f8fbfd;border:1px solid var(--line);border-radius:4px;padding:.75rem}.profile-facts{display:grid;gap:.45rem;text-align:left;margin:1rem 0 0}.profile-facts div{display:grid;grid-template-columns:118px minmax(0,1fr);gap:.55rem;padding:.5rem .6rem;background:#f8fbfd;border:1px solid var(--line);border-radius:4px}.profile-facts dt{font-weight:700;color:#0a648f}.profile-facts dd{margin:0;overflow-wrap:anywhere}.profile-editor-stack{display:grid;gap:1rem}.avatar-form{grid-template-columns:minmax(0,1fr) auto;align-items:end}.profile-panel-details{margin:.9rem 0;text-align:left}.profile-panel-bio{background:#fff;border:1px solid var(--line);border-radius:4px;padding:.65rem;line-height:1.45}.side-facts{font-size:.9rem}.side-facts div{grid-template-columns:92px minmax(0,1fr);padding:.42rem .5rem}.side-facts a{color:#0b6d9f;overflow-wrap:anywhere}.profile-pop .muted{margin:.1rem 0}.profile-pop .btn.primary{margin-top:.4rem;width:100%;justify-content:center}
@media(max-width:980px){.auth-shell,.register-shell,.profile-layout{grid-template-columns:1fr}.auth-hero{min-height:auto}.profile-preview-card{position:static}.avatar-form{grid-template-columns:1fr}.form-grid.two{grid-template-columns:1fr}}
@media(max-width:640px){.auth-hero,.auth-card{padding:1rem}.auth-hero h1{font-size:2rem}.profile-facts div,.side-facts div{grid-template-columns:1fr;gap:.15rem}.profile-cover{height:90px}.profile-avatar{width:120px;height:120px;margin-top:-60px}}

/* Forum */
.hero-actions{display:flex;gap:.7rem;align-items:center;flex-wrap:wrap}.page-actions{display:flex;gap:.7rem;align-items:center;flex-wrap:wrap;justify-content:flex-end}.forum-hero{display:flex;align-items:center;justify-content:space-between;gap:1rem}.forum-category-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr))}.forum-category-card{display:flex;flex-direction:column;gap:.85rem;border-top:4px solid var(--blue)}.forum-category-card h2{margin:.1rem 0}.forum-meta-row{display:flex;gap:.55rem;flex-wrap:wrap}.forum-meta-row span,.badge{display:inline-flex;align-items:center;gap:.25rem;background:#e7f4fb;border:1px solid #c9e2ef;border-radius:999px;color:#0a648f;padding:.25rem .55rem;font-size:.82rem;font-weight:700}.muted-badge{background:#f3f5f7;border-color:#d8dee3;color:#647484}.small-text{font-size:.9rem}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.section-head h1,.section-head h2{margin-top:0}.forum-panel{display:flex;flex-direction:column}.forum-topic-list{display:grid;gap:.65rem}.forum-topic-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1rem;align-items:center;background:#f8fbfd;border:1px solid var(--line);border-radius:5px;padding:.85rem}.forum-topic-row:hover{background:#eef8ff;border-color:#c9e2ef}.topic-main h3{margin:.05rem 0 .25rem;display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}.topic-main p{margin:0}.topic-stats{min-width:150px;text-align:right;display:grid;gap:.2rem;color:#607184}.topic-stats strong{color:#0a648f}.mini-list{display:grid;gap:.5rem}.mini-list a{display:flex;justify-content:space-between;gap:1rem;padding:.6rem .75rem;background:#f8fbfd;border:1px solid var(--line);border-radius:4px}.topic-title-card{border-top:4px solid var(--blue)}.topic-actions{display:flex;gap:.45rem;align-items:center;justify-content:flex-end;flex-wrap:wrap}.forum-posts{display:grid;gap:.8rem}.forum-post{display:grid;grid-template-columns:160px minmax(0,1fr);gap:1rem;padding:0;overflow:hidden}.post-author{background:#f0f7fb;border-right:1px solid var(--line);padding:1rem;text-align:center;display:flex;flex-direction:column;align-items:center;gap:.35rem}.post-author .avatar{width:78px;height:78px}.post-author span{font-size:.85rem;color:#607184}.post-body-wrap{padding:1rem;min-width:0}.post-meta{display:flex;align-items:center;justify-content:space-between;gap:1rem;border-bottom:1px solid var(--line);padding-bottom:.65rem;margin-bottom:.75rem;color:#607184;font-size:.9rem}.post-content{line-height:1.6;white-space:normal;overflow-wrap:anywhere}.forum-reply-card textarea,.forum-editor textarea{min-height:220px}.forum-category-admin-form{display:grid;grid-template-columns:1fr 2fr 120px auto;gap:.7rem;align-items:end;margin-bottom:1rem}.stacked-mini-form{display:grid;gap:.45rem;margin:.6rem 0}.stacked-mini-form input{min-width:180px}.chat-head-actions{display:flex;gap:.45rem;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:760px){.forum-hero,.section-head{display:block}.hero-actions,.page-actions,.topic-actions{margin-top:.8rem}.forum-topic-row{grid-template-columns:1fr}.topic-stats{text-align:left;min-width:0;display:flex;gap:.7rem;flex-wrap:wrap}.forum-post{grid-template-columns:1fr}.post-author{border-right:0;border-bottom:1px solid var(--line);flex-direction:row;text-align:left;justify-content:flex-start}.post-author .avatar{width:52px;height:52px}.post-meta{align-items:flex-start;flex-direction:column}.forum-category-admin-form{grid-template-columns:1fr}.mini-list a{display:block}.mini-list span{display:block;margin-top:.2rem}}


/* BBCode */
.message-body,.post-body,.post-content{overflow-wrap:anywhere}.bbcode-quote{margin:.55rem 0;padding:.55rem .75rem;border-left:4px solid var(--blue);background:#f1f6fa;color:#344b5b}.bbcode-code{margin:.55rem 0;padding:.7rem;background:#18242e;color:#edf7ff;border-radius:4px;overflow:auto;white-space:pre-wrap}.bbcode-code code{font-family:Consolas,Monaco,monospace;font-size:.9rem}.bbcode-img{display:block;max-width:min(100%,360px);max-height:280px;border:1px solid var(--line);border-radius:4px;margin:.5rem 0}.messages .bbcode-img{max-width:220px;max-height:220px}.post-body a,.post-content a,.message-body a{color:#0b6d9f;font-weight:700}.post-content .bbcode-quote,.message-body .bbcode-quote{font-size:.95em}.post-content .bbcode-code,.message-body .bbcode-code{font-size:.9em}


/* BBCode toolbar buttons */
.bbcode-toolbar{display:flex;gap:.28rem;flex-wrap:wrap;align-items:center;margin:.2rem 0 .45rem;width:100%}.bbcode-toolbar button{border:1px solid #b8c8d6;background:linear-gradient(#fff,#edf4f8);border-radius:3px;color:#244255;cursor:pointer;font:inherit;font-size:.82rem;min-width:32px;padding:.28rem .45rem}.bbcode-toolbar button:hover{background:#e7f4fb;border-color:#82b9d6}.send-form .bbcode-toolbar{flex:0 0 100%;margin:0}.private-form .bbcode-toolbar{flex:0 0 100%}.send-form .js-bbcode-target{flex:1}.forum-editor .bbcode-toolbar,.forum-reply-card .bbcode-toolbar,.comment-form-card .bbcode-toolbar{margin-top:.35rem}.admin-table-wrap{overflow:auto}

/* Downloads */
.downloads-hero{display:flex;justify-content:space-between;align-items:center;gap:1rem}.download-list{grid-template-columns:1fr}.download-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:1rem;align-items:center;border-left:5px solid var(--blue)}.download-icon{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:#e7f4fb;color:#0a648f;font-size:1.5rem;border:1px solid #c9e2ef}.download-card h2{margin:.1rem 0}.download-card h2 a{color:#0b6d9f;text-decoration:none}.download-card p{margin:.35rem 0}.download-card-actions{display:flex;gap:.4rem;flex-wrap:wrap;justify-content:flex-end}.download-stats-row{display:flex;gap:.55rem;flex-wrap:wrap;margin:.75rem 0 1rem}.download-stats-row span{display:inline-flex;gap:.35rem;align-items:center;background:#f1f6fa;border:1px solid var(--line);border-radius:999px;color:#344b5b;padding:.35rem .65rem}.download-stats-row strong{color:#0a648f}.download-stats-row.compact{margin:.5rem 0 0}.download-detail-card{border-top:4px solid var(--orange)}.comment-list{display:grid;gap:.75rem}.comment-row{display:grid;grid-template-columns:145px minmax(0,1fr);gap:0;border:1px solid var(--line);border-radius:5px;overflow:hidden;background:#fff}.comment-author{background:#f0f7fb;border-right:1px solid var(--line);padding:.85rem;text-align:center;display:flex;flex-direction:column;gap:.3rem;align-items:center}.comment-author .avatar{width:58px;height:58px}.comment-author span{font-size:.85rem;color:#607184}.comment-body{padding:.85rem;min-width:0}.comment-form-card textarea{min-height:140px}@media(max-width:760px){.downloads-hero{display:block}.download-card{grid-template-columns:1fr}.download-icon{display:none}.download-card-actions{justify-content:flex-start}.comment-row{grid-template-columns:1fr}.comment-author{border-right:0;border-bottom:1px solid var(--line);flex-direction:row;text-align:left;justify-content:flex-start}.comment-author .avatar{width:44px;height:44px}}


/* Chat cleanup and visible footer */
.footer{background:#dfeaf2;border-top:1px solid #c2d2df;color:#526777;text-align:center;padding:.7rem 1rem;font-size:.9rem}
.footer strong{color:#0a648f}
body.chat-fullscreen .chat-page-shell{height:calc(100vh - 50px - 38px);bottom:38px}
body.chat-fullscreen .footer{display:flex;align-items:center;justify-content:center;position:fixed;left:0;right:0;bottom:0;height:38px;z-index:90;padding:0 .75rem;background:#dfeaf2;border-top:1px solid #b8c8d6}
body.chat-fullscreen .chatroom-app{grid-template-rows:minmax(0,1fr)}
body.chat-fullscreen .chatroom-titlebar{display:none}
body.chat-fullscreen .chat-main{grid-template-rows:auto minmax(0,1fr) auto}
body.chat-fullscreen .messages{height:auto;min-height:0;overflow:auto}
body.chat-fullscreen .send-form{flex:0 0 auto;align-items:center;min-height:90px;max-height:38vh;overflow:auto}
body.chat-fullscreen .send-form input[name=text]{min-width:220px}
body.chat-fullscreen .private-dock{bottom:calc(38px + .75rem)}
.chat-head{justify-content:flex-start}
.chat-head-actions{display:none!important}
@media(max-width:1000px){body.chat-fullscreen .chat-page-shell{min-height:calc(100vh - 98px);padding-bottom:0}body.chat-fullscreen .footer{position:static;height:auto;min-height:38px}body.chat-fullscreen .private-dock{bottom:.75rem}}
@media(max-width:760px){body.chat-fullscreen .send-form{min-height:0;max-height:none}body.chat-fullscreen .send-form input[name=text]{min-width:100%}}

/* Layout fixes: footer on every page and visible chat input */
body.site-fullscreen .page:not(.chat-page-shell){min-height:calc(100vh - 58px - 44px)}
.footer{width:100%;min-height:44px;display:flex;align-items:center;justify-content:center;background:#dfeaf2;border-top:1px solid #c2d2df;color:#526777;text-align:center;padding:.7rem 1rem;font-size:.9rem}
.footer strong{color:#0a648f}
.send-form{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem}
.send-form .bbcode-toolbar{flex:0 0 100%;width:100%;margin:0}
.send-form input[name=text],.send-form .js-bbcode-target{flex:1 1 280px;min-width:220px}
.send-form .file-btn,.send-form .btn{flex:0 0 auto}
/* Chat uses the same full navbar as News, Forum, and Downloads. */
body.chat-fullscreen .chat-page-shell{height:calc(100vh - 50px - 44px);bottom:44px;overflow:hidden}
body.chat-fullscreen .footer{display:flex;position:fixed;left:0;right:0;bottom:0;height:44px;min-height:44px;z-index:90;padding:0 .75rem;background:#dfeaf2;border-top:1px solid #b8c8d6}
body.chat-fullscreen .chatroom-app{grid-template-rows:minmax(0,1fr)}
body.chat-fullscreen .chatroom-titlebar{display:none!important}
body.chat-fullscreen .chatroom-grid{height:100%;min-height:0;overflow:hidden}
body.chat-fullscreen .chat-main{height:100%;min-height:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
body.chat-fullscreen .messages{height:auto;min-height:0;overflow:auto}
body.chat-fullscreen .send-form{min-height:92px;max-height:170px;overflow:visible;padding:.55rem .65rem;flex:0 0 auto}
body.chat-fullscreen .send-form input[name=text]{flex:1 1 360px;min-width:260px;height:36px}
body.chat-fullscreen .private-dock{bottom:calc(44px + .75rem)}
@media(max-width:1000px){body.site-fullscreen .page:not(.chat-page-shell){min-height:calc(100vh - 58px - 44px)}body.chat-fullscreen .chat-page-shell{height:auto;bottom:auto;min-height:calc(100vh - 58px - 44px)}body.chat-fullscreen .footer{position:static;height:auto;min-height:44px}.send-form input[name=text],.send-form .js-bbcode-target{min-width:180px}}
@media(max-width:760px){.send-form input[name=text],.send-form .js-bbcode-target{flex-basis:100%;min-width:100%}body.chat-fullscreen .send-form{min-height:0;max-height:none}.topbar nav{justify-content:flex-end}}

/* Final layout fix: visible chat input + consistent navbar height */
:root{--freechat-nav-height:58px;--freechat-footer-height:44px;--freechat-chat-head-height:58px;--freechat-chat-input-height:104px}
.topbar,
body.chat-fullscreen .topbar{height:var(--freechat-nav-height)!important;min-height:var(--freechat-nav-height)!important;max-height:var(--freechat-nav-height)!important;padding:0 1.2rem!important;position:sticky!important;top:0!important;left:auto!important;right:auto!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:1rem!important;overflow:hidden!important}
.brand,
body.chat-fullscreen .brand{font-size:1.25rem!important;flex:0 0 auto!important;white-space:nowrap!important}
.brand-mark,
body.chat-fullscreen .brand-mark{width:31px!important;height:31px!important;flex:0 0 31px!important}
.topbar nav{height:100%!important;display:flex!important;flex:1 1 auto!important;justify-content:flex-end!important;align-items:center!important;gap:.3rem!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;min-width:0!important}
.topbar nav a,
body.chat-fullscreen .topbar nav a{height:32px!important;min-height:32px!important;padding:.42rem .75rem!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;flex:0 0 auto!important}
body.site-fullscreen .page:not(.chat-page-shell){min-height:calc(100vh - var(--freechat-nav-height) - var(--freechat-footer-height))!important}
.footer{width:100%!important;min-height:var(--freechat-footer-height)!important;height:var(--freechat-footer-height)!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0 .75rem!important}
body.chat-fullscreen{overflow:hidden!important;background:#dbe6ef!important}
body.chat-fullscreen .chat-page-shell{position:fixed!important;top:var(--freechat-nav-height)!important;left:0!important;right:0!important;bottom:var(--freechat-footer-height)!important;width:100vw!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important}
body.chat-fullscreen .footer{position:fixed!important;left:0!important;right:0!important;bottom:0!important;height:var(--freechat-footer-height)!important;min-height:var(--freechat-footer-height)!important;z-index:90!important;background:#dfeaf2!important;border-top:1px solid #b8c8d6!important}
body.chat-fullscreen .chat-page-wrap{width:100%!important;height:100%!important;max-width:none!important;margin:0!important;padding:0!important;overflow:hidden!important}
body.chat-fullscreen .chatroom-app{display:block!important;width:100%!important;height:100%!important;min-height:0!important;border:0!important;box-shadow:none!important;overflow:hidden!important}
body.chat-fullscreen .chatroom-titlebar{display:none!important}
body.chat-fullscreen .chatroom-grid{display:grid!important;grid-template-columns:240px minmax(0,1fr) 320px!important;width:100%!important;height:100%!important;min-height:0!important;overflow:hidden!important}
body.chat-fullscreen .room-rail,
body.chat-fullscreen .side-panel{height:100%!important;min-height:0!important;overflow:auto!important}
body.chat-fullscreen .chat-main{display:grid!important;grid-template-rows:var(--freechat-chat-head-height) minmax(0,1fr) var(--freechat-chat-input-height)!important;height:100%!important;min-height:0!important;overflow:hidden!important;background:#fff!important}
body.chat-fullscreen .chat-head{height:var(--freechat-chat-head-height)!important;min-height:var(--freechat-chat-head-height)!important;max-height:var(--freechat-chat-head-height)!important;overflow:hidden!important;padding:.55rem .8rem!important;display:flex!important;align-items:center!important}
body.chat-fullscreen .messages{height:100%!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important}
.chat-send-form,
body.chat-fullscreen .chat-send-form{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:32px 42px!important;gap:.45rem!important;height:var(--freechat-chat-input-height)!important;min-height:var(--freechat-chat-input-height)!important;max-height:var(--freechat-chat-input-height)!important;padding:.55rem .65rem!important;margin:0!important;overflow:hidden!important;background:#f2f5f7!important;border-top:1px solid var(--line)!important;align-items:center!important;z-index:10!important}
.chat-send-form .bbcode-toolbar{grid-row:1!important;width:100%!important;height:32px!important;min-height:32px!important;max-height:32px!important;margin:0!important;display:flex!important;flex-wrap:nowrap!important;gap:.28rem!important;align-items:center!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0 0 2px 0!important}
.chat-send-form .bbcode-toolbar button{flex:0 0 auto!important;white-space:nowrap!important;height:28px!important;min-height:28px!important;line-height:1!important}
.chat-send-form .send-controls{grid-row:2!important;display:flex!important;align-items:center!important;gap:.45rem!important;width:100%!important;min-width:0!important;height:40px!important;overflow:visible!important}
.chat-send-form #messageText{display:block!important;visibility:visible!important;opacity:1!important;position:static!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;height:38px!important;min-height:38px!important;max-height:38px!important;margin:0!important;padding:.55rem .65rem!important;background:#fff!important;border:1px solid #bccbd6!important;color:#1d2b36!important}
.chat-send-form .file-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;width:auto!important;height:38px!important;min-height:38px!important;margin:0!important;white-space:nowrap!important;padding:.52rem .65rem!important}
.chat-send-form .btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;width:auto!important;height:38px!important;min-height:38px!important;margin:0!important;white-space:nowrap!important;padding:.52rem .85rem!important}
body.chat-fullscreen .private-dock{bottom:calc(var(--freechat-footer-height) + .75rem)!important}
@media(max-width:1000px){body.chat-fullscreen{overflow:auto!important}body.chat-fullscreen .chat-page-shell{position:static!important;width:100%!important;height:auto!important;min-height:calc(100vh - var(--freechat-nav-height) - var(--freechat-footer-height))!important;overflow:visible!important}body.chat-fullscreen .footer{position:static!important}body.chat-fullscreen .chatroom-grid{grid-template-columns:180px minmax(0,1fr)!important;height:auto!important;min-height:calc(100vh - var(--freechat-nav-height) - var(--freechat-footer-height))!important;overflow:visible!important}body.chat-fullscreen .chat-main{min-height:560px!important}.side-panel{grid-column:1/-1!important}}
@media(max-width:760px){.topbar,body.chat-fullscreen .topbar{height:var(--freechat-nav-height)!important;min-height:var(--freechat-nav-height)!important;max-height:var(--freechat-nav-height)!important;padding:0 .75rem!important;align-items:center!important;flex-direction:row!important}.brand,body.chat-fullscreen .brand{font-size:1.05rem!important}.topbar nav{justify-content:flex-start!important}.topbar nav a,body.chat-fullscreen .topbar nav a{height:30px!important;min-height:30px!important;padding:.35rem .55rem!important}.chat-send-form,body.chat-fullscreen .chat-send-form{height:146px!important;min-height:146px!important;max-height:146px!important;grid-template-rows:32px auto!important}.chat-send-form .send-controls{height:auto!important;min-height:82px!important;flex-wrap:wrap!important}.chat-send-form #messageText{flex:1 1 100%!important;width:100%!important}.chat-send-form .file-btn,.chat-send-form .btn{height:36px!important;min-height:36px!important}.private-dock{position:static!important;display:grid!important;margin-top:1rem!important}}


/* Same navbar on chat as on all other pages */
body.chat-fullscreen .topbar nav a[href$="index.php"],
body.chat-fullscreen .topbar nav a[href$="chat.php"],
body.chat-fullscreen .topbar nav a[href$="forum.php"],
body.chat-fullscreen .topbar nav a[href$="downloads.php"],
body.chat-fullscreen .topbar nav a[href$="profile.php"],
body.chat-fullscreen .topbar nav a[href$="admin/index.php"],
body.chat-fullscreen .topbar nav a[href$="logout.php"],
body.chat-fullscreen .topbar nav a[href$="login.php"],
body.chat-fullscreen .topbar nav a[href$="register.php"]{
    display:inline-flex!important;
}

/* News likes, comments, and views */
.news-detail-card{border-top:4px solid var(--orange)}
.news-stats-row{display:flex;gap:.55rem;flex-wrap:wrap;margin:.75rem 0 1rem}
.news-stats-row span{display:inline-flex;gap:.35rem;align-items:center;background:#f1f6fa;border:1px solid var(--line);border-radius:999px;color:#344b5b;padding:.35rem .65rem}
.news-stats-row strong{color:#0a648f}
.news-stats-row.compact{margin:.45rem 0 .6rem}
.news-like-bar{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--line)}
.comments-card{margin-top:1rem}
.post-meta{display:flex;gap:.5rem;align-items:center;justify-content:space-between;flex-wrap:wrap;color:var(--muted);font-size:.9rem;margin-bottom:.6rem}
.post-content{line-height:1.55}
.comment-row.deleted{opacity:.7}


/* Mobile responsive upgrade: same navbar, better small-screen chat */
.nav-toggle{display:none;color:#fff;background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.28);border-radius:3px;height:32px;padding:0 .75rem;font:inherit;font-weight:bold;cursor:pointer;flex:0 0 auto}
.nav-toggle:focus{outline:2px solid rgba(255,255,255,.55);outline-offset:2px}

@media(max-width:1100px){
    body.chat-fullscreen .chatroom-grid{grid-template-columns:200px minmax(0,1fr) 270px!important}
    body.chat-fullscreen .side-panel{font-size:.95rem!important}
}

@media(max-width:900px){
    body.chat-fullscreen .chatroom-grid{grid-template-columns:165px minmax(0,1fr)!important}
    body.chat-fullscreen .side-panel{display:none!important}
    body.chat-fullscreen .room-rail{padding:.55rem!important}
    body.chat-fullscreen .room-tab{padding:.45rem .5rem!important}
}

@media(max-width:760px){
    :root{--freechat-mobile-nav-height:58px;--freechat-mobile-footer-height:38px;--freechat-mobile-room-height:86px;--freechat-mobile-input-height:146px}
    html,body{max-width:100%;overflow-x:hidden}
    .topbar,
    body.chat-fullscreen .topbar{height:var(--freechat-mobile-nav-height)!important;min-height:var(--freechat-mobile-nav-height)!important;max-height:var(--freechat-mobile-nav-height)!important;padding:0 .65rem!important;overflow:visible!important;z-index:300!important}
    .brand,
    body.chat-fullscreen .brand{font-size:1.05rem!important;max-width:calc(100vw - 110px)!important;overflow:hidden!important;text-overflow:ellipsis!important}
    .brand-mark,
    body.chat-fullscreen .brand-mark{width:28px!important;height:28px!important;flex-basis:28px!important}
    .nav-toggle{display:inline-flex;align-items:center;justify-content:center}
    .topbar nav,
    body.chat-fullscreen .topbar nav{position:absolute!important;top:var(--freechat-mobile-nav-height)!important;left:0!important;right:0!important;height:auto!important;max-height:0!important;min-height:0!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:.45rem!important;background:linear-gradient(#0870a5,#075c87)!important;border-bottom:4px solid #074d73!important;box-shadow:0 8px 18px rgba(0,0,0,.28)!important;padding:0 .65rem!important;overflow:hidden!important;transition:max-height .18s ease,padding .18s ease!important;white-space:normal!important;z-index:299!important}
    body.nav-open .topbar nav,
    body.nav-open.chat-fullscreen .topbar nav{max-height:75vh!important;padding:.65rem!important;overflow-y:auto!important}
    .topbar nav a,
    body.chat-fullscreen .topbar nav a{width:100%!important;height:40px!important;min-height:40px!important;padding:.55rem .65rem!important;justify-content:center!important;border-color:rgba(255,255,255,.25)!important;background:rgba(255,255,255,.1)!important}
    body.site-fullscreen .page:not(.chat-page-shell){min-height:calc(100vh - var(--freechat-mobile-nav-height) - var(--freechat-mobile-footer-height))!important;padding:.75rem!important}
    .footer,
    body.chat-fullscreen .footer{height:var(--freechat-mobile-footer-height)!important;min-height:var(--freechat-mobile-footer-height)!important;font-size:.78rem!important;padding:0 .45rem!important;line-height:1.2!important;z-index:250!important}
    .footer div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

    body.chat-fullscreen{overflow:hidden!important;background:#dbe6ef!important;position:fixed!important;inset:0!important;width:100%!important;height:100%!important}
    body.chat-fullscreen .chat-page-shell{position:fixed!important;top:var(--freechat-mobile-nav-height)!important;left:0!important;right:0!important;bottom:var(--freechat-mobile-footer-height)!important;width:100vw!important;height:auto!important;min-height:0!important;overflow:hidden!important;padding:0!important;margin:0!important}
    body.chat-fullscreen .chat-page-wrap,
    body.chat-fullscreen .chatroom-app{height:100%!important;width:100%!important;min-height:0!important;overflow:hidden!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}
    body.chat-fullscreen .chatroom-grid{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:var(--freechat-mobile-room-height) minmax(0,1fr)!important;height:100%!important;min-height:0!important;overflow:hidden!important}
    body.chat-fullscreen .room-rail{grid-row:1!important;height:var(--freechat-mobile-room-height)!important;min-height:0!important;max-height:var(--freechat-mobile-room-height)!important;overflow:hidden!important;padding:.45rem .55rem!important;border-right:0!important;border-bottom:1px solid var(--line)!important;background:#f1f6fa!important}
    body.chat-fullscreen .rail-title{margin:0 0 .35rem!important;font-size:.86rem!important;line-height:1!important}
    body.chat-fullscreen .room-list{display:flex!important;flex-wrap:nowrap!important;gap:.4rem!important;overflow-x:auto!important;overflow-y:hidden!important;margin:0!important;padding:0 0 .15rem!important;scrollbar-width:thin!important}
    body.chat-fullscreen .room-tab{flex:0 0 auto!important;width:auto!important;min-width:112px!important;height:36px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;padding:.4rem .55rem!important;font-size:.9rem!important}
    body.chat-fullscreen .rail-box{display:none!important}
    body.chat-fullscreen .chat-main{grid-row:2!important;height:100%!important;min-height:0!important;overflow:hidden!important;display:grid!important;grid-template-rows:44px minmax(0,1fr) var(--freechat-mobile-input-height)!important;background:#fff!important}
    body.chat-fullscreen .chat-head{height:44px!important;min-height:44px!important;max-height:44px!important;padding:.35rem .6rem!important;overflow:hidden!important}
    body.chat-fullscreen .chat-head h1{font-size:1rem!important;line-height:1.1!important;margin:0!important}
    body.chat-fullscreen .chat-status-line{font-size:.78rem!important;gap:.3rem!important;white-space:nowrap!important;overflow:hidden!important}
    body.chat-fullscreen .messages{height:100%!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;padding-bottom:.25rem!important}
    body.chat-fullscreen .bubble{padding:.48rem .55rem!important;word-break:break-word!important}
    body.chat-fullscreen .meta{font-size:.76rem!important;gap:.3rem!important;flex-wrap:wrap!important}
    body.chat-fullscreen .chat-image{max-width:82vw!important;max-height:180px!important}
    body.chat-fullscreen .side-panel{display:none!important}
    body.chat-fullscreen .chat-send-form{height:var(--freechat-mobile-input-height)!important;min-height:var(--freechat-mobile-input-height)!important;max-height:var(--freechat-mobile-input-height)!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:32px 1fr!important;gap:.45rem!important;padding:.5rem!important;overflow:hidden!important;background:#f2f5f7!important}
    body.chat-fullscreen .chat-send-form .bbcode-toolbar{height:32px!important;min-height:32px!important;max-height:32px!important;display:flex!important;flex-wrap:nowrap!important;gap:.25rem!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0 0 .1rem!important;margin:0!important;scrollbar-width:thin!important}
    body.chat-fullscreen .chat-send-form .bbcode-toolbar button{height:28px!important;min-height:28px!important;font-size:.8rem!important;padding:.25rem .45rem!important;flex:0 0 auto!important}
    body.chat-fullscreen .chat-send-form .send-controls{display:grid!important;grid-template-columns:1fr 88px 72px!important;grid-template-rows:40px 38px!important;gap:.4rem!important;height:auto!important;min-height:0!important;overflow:visible!important;align-items:center!important}
    body.chat-fullscreen .chat-send-form #messageText{grid-column:1/-1!important;grid-row:1!important;width:100%!important;min-width:0!important;height:40px!important;min-height:40px!important;max-height:40px!important;font-size:16px!important;display:block!important;visibility:visible!important;opacity:1!important}
    body.chat-fullscreen .chat-send-form .file-btn{grid-column:1/3!important;grid-row:2!important;width:100%!important;height:38px!important;min-height:38px!important;padding:.45rem .55rem!important}
    body.chat-fullscreen .chat-send-form .btn{grid-column:3!important;grid-row:2!important;width:100%!important;height:38px!important;min-height:38px!important;padding:.45rem .55rem!important}
    body.chat-fullscreen .private-dock{position:fixed!important;left:.45rem!important;right:.45rem!important;bottom:calc(var(--freechat-mobile-footer-height) + .45rem)!important;max-height:40vh!important;overflow:auto!important;display:grid!important;gap:.45rem!important;z-index:260!important;pointer-events:none!important}
    body.chat-fullscreen .private-box{width:100%!important;pointer-events:auto!important;box-shadow:0 4px 18px rgba(0,0,0,.22)!important}
    body.chat-fullscreen .private-messages{height:150px!important;min-height:150px!important}
    body.chat-fullscreen .private-box .send-form{height:auto!important;min-height:0!important;max-height:none!important;display:grid!important}
}

@media(max-width:420px){
    .topbar nav,
    body.chat-fullscreen .topbar nav{grid-template-columns:1fr!important}
    body.chat-fullscreen .room-tab{min-width:96px!important;font-size:.84rem!important}
    body.chat-fullscreen .chat-send-form .send-controls{grid-template-columns:1fr 70px!important;grid-template-rows:40px 38px 38px!important}
    body.chat-fullscreen .chat-send-form{height:184px!important;min-height:184px!important;max-height:184px!important;grid-template-rows:32px 1fr!important}
    body.chat-fullscreen .chat-main{grid-template-rows:44px minmax(0,1fr) 184px!important}
    body.chat-fullscreen .chat-send-form .file-btn{grid-column:1!important;grid-row:2!important}
    body.chat-fullscreen .chat-send-form .btn{grid-column:2!important;grid-row:2!important}
}

/* Internal mailbox and register bot protection */
.bot-protection{background:#f7fbfe;border:1px solid var(--line);border-radius:4px;padding:.85rem;margin-top:.3rem}
.bot-protection p{margin:.25rem 0 .6rem}.bot-trap{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important}
.card-lite{box-shadow:none}.mail-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:1rem;align-items:start}.mail-sidebar{position:sticky;top:calc(var(--freechat-nav-height) + 1rem)}.mail-sidebar h1{margin:.1rem 0 .35rem;color:#0a648f}.mail-tabs{display:grid;gap:.4rem;margin-top:1rem}.mail-tabs a{display:flex;align-items:center;justify-content:space-between;text-decoration:none;color:#214055;background:#f5f9fc;border:1px solid var(--line);border-radius:4px;padding:.65rem .75rem}.mail-tabs a.active{background:#0b74a8;color:#fff;border-color:#075c87}.mail-tabs strong{background:#f1a600;color:#fff;border-radius:999px;padding:.05rem .45rem;font-size:.78rem}.mail-main{min-width:0}.mail-card{overflow:hidden}.mail-list{display:grid;gap:.5rem}.mail-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;align-items:center;background:#fff;border:1px solid var(--line);border-left:4px solid #c8d8e3;border-radius:4px;padding:.75rem}.mail-row.unread{border-left-color:var(--orange);background:#fffdf6}.mail-row-main{text-decoration:none;color:var(--text);min-width:0}.mail-row-main strong{display:block;color:#0a648f;margin-bottom:.2rem}.mail-row-main span{display:block;color:var(--muted);font-size:.9rem}.mail-row-main p{margin:.35rem 0 0;color:#405769;line-height:1.35}.mail-row-side{text-align:right;color:var(--muted);display:grid;gap:.35rem;justify-items:end}.mail-badge{background:#f1a600;color:#fff;border-radius:999px;padding:.15rem .55rem;font-size:.78rem;font-weight:bold}.mail-empty{padding:1.25rem;border:1px dashed #bccbd6;border-radius:4px;background:#f8fbfd;color:var(--muted);text-align:center}.mail-read-head{border-bottom:1px solid var(--line);padding-bottom:.75rem;margin-bottom:1rem}.mail-read-head h2{margin:.1rem 0 .55rem;color:#0a648f}.mail-meta-line{display:flex;gap:.65rem;flex-wrap:wrap;color:var(--muted);font-size:.92rem}.mail-body{background:#fff;padding:.4rem 0}.mail-actions{border-top:1px solid var(--line);padding-top:1rem;margin-top:1rem}.mail-compose-form textarea{min-height:220px}.profile-actions{display:flex;gap:.4rem;flex-wrap:wrap;justify-content:center;margin-top:.7rem}.profile-actions .btn{min-width:112px;justify-content:center}

/* Final mobile chat/footer fix: keep footer in normal flow and reserve exact chat height. */
@media(max-width:760px){
    body.chat-fullscreen{position:static!important;display:flex!important;flex-direction:column!important;width:100%!important;height:100dvh!important;min-height:100dvh!important;overflow:hidden!important;background:#dbe6ef!important}
    @supports not (height:100dvh){body.chat-fullscreen{height:100vh!important;min-height:100vh!important}}
    body.chat-fullscreen .topbar{position:relative!important;top:auto!important;left:auto!important;right:auto!important;flex:0 0 var(--freechat-mobile-nav-height)!important;height:var(--freechat-mobile-nav-height)!important;min-height:var(--freechat-mobile-nav-height)!important;max-height:var(--freechat-mobile-nav-height)!important;overflow:visible!important}
    body.chat-fullscreen .chat-page-shell{position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;flex:1 1 auto!important;width:100%!important;height:calc(100dvh - var(--freechat-mobile-nav-height) - var(--freechat-mobile-footer-height))!important;min-height:0!important;max-height:none!important;overflow:hidden!important;padding:0!important;margin:0!important}
    @supports not (height:100dvh){body.chat-fullscreen .chat-page-shell{height:calc(100vh - var(--freechat-mobile-nav-height) - var(--freechat-mobile-footer-height))!important}}
    body.chat-fullscreen .footer{position:static!important;left:auto!important;right:auto!important;bottom:auto!important;flex:0 0 var(--freechat-mobile-footer-height)!important;width:100%!important;height:var(--freechat-mobile-footer-height)!important;min-height:var(--freechat-mobile-footer-height)!important;max-height:var(--freechat-mobile-footer-height)!important;z-index:1!important;padding:0 .45rem!important}
    body.chat-fullscreen .chat-page-wrap,body.chat-fullscreen .chatroom-app,body.chat-fullscreen .chatroom-grid{height:100%!important;min-height:0!important;overflow:hidden!important}
    body.chat-fullscreen .chatroom-grid{grid-template-rows:var(--freechat-mobile-room-height) minmax(0,1fr)!important}
    body.chat-fullscreen .chat-main{height:100%!important;min-height:0!important;grid-template-rows:44px minmax(0,1fr) var(--freechat-mobile-input-height)!important;overflow:hidden!important}
    body.chat-fullscreen .messages{min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important}
    body.chat-fullscreen .private-dock{bottom:calc(var(--freechat-mobile-footer-height) + .45rem)!important}
    .mail-layout{grid-template-columns:1fr}.mail-sidebar{position:static}.mail-row{grid-template-columns:1fr}.mail-row-side{text-align:left;justify-items:start;display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.mail-meta-line{display:grid;gap:.25rem}.mail-compose-form textarea{min-height:180px}
}

/* Mailbox notification badge and toast */
.mail-nav-link{position:relative;gap:.4rem!important}.mail-nav-link.has-unread{background:linear-gradient(#f7b933,#e7a218)!important;color:#fff!important;border-color:#c2870d!important;font-weight:bold}.mail-nav-count{display:none;min-width:1.15rem;height:1.15rem;padding:0 .25rem;border-radius:999px;background:#b72831;color:#fff;font-size:.72rem;line-height:1.15rem;text-align:center;font-weight:bold}.mail-nav-count:not(:empty){display:inline-block}.mail-toast{position:fixed;right:1rem;bottom:calc(var(--freechat-footer-height,42px) + 1rem);width:min(380px,calc(100vw - 2rem));display:grid;grid-template-columns:auto minmax(0,1fr);gap:.75rem;background:#fff;border:1px solid #b8c8d6;border-left:5px solid #f1a600;border-radius:6px;box-shadow:0 10px 28px rgba(0,0,0,.22);padding:.85rem;z-index:1000;transform:translateY(16px);opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease}.mail-toast.show{opacity:1;transform:translateY(0);pointer-events:auto}.mail-toast-icon{width:2.4rem;height:2.4rem;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#e7f4fb;color:#0a648f;font-size:1.35rem}.mail-toast-body strong{display:block;color:#0a648f;margin-bottom:.2rem}.mail-toast-body p{margin:.15rem 0 .65rem;color:#405769;line-height:1.35}.mail-toast-actions{display:flex;gap:.4rem;flex-wrap:wrap}@media(max-width:760px){.mail-toast{left:.55rem;right:.55rem;bottom:calc(var(--freechat-mobile-footer-height,38px) + .55rem);width:auto;padding:.7rem}.mail-toast-actions .btn,.mail-toast-actions .mini{flex:1 1 auto;justify-content:center}.mail-nav-count:not(:empty){display:inline-block}}
@media(max-width:760px){body.chat-fullscreen .mail-toast{bottom:calc(var(--freechat-mobile-footer-height,38px) + var(--freechat-mobile-input-height,146px) + .55rem)}}

/* Font Awesome polish, legal pages, cookie notice and backup screen */
.topbar nav a i,.tabs a i,.btn i,.mini i,.footer-links i,.hero h1 i,.card h1 i,.card h2 i{margin-right:.35rem;line-height:1}.nav-toggle i{margin-right:.35rem}.brand + .nav-toggle{white-space:nowrap}.tabs a{display:inline-flex;align-items:center;gap:.25rem}.btn{gap:.4rem}.footer{background:#dfe8ef;border-top:1px solid #c4d2dd;color:#4d6170;padding:.75rem 1rem}.footer-inner{display:flex;justify-content:space-between;align-items:center;gap:.75rem;max-width:1600px;margin:0 auto;width:100%;flex-wrap:wrap}.footer-links{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap}.footer-links a{color:#345268;text-decoration:none;display:inline-flex;align-items:center;gap:.25rem;background:rgba(255,255,255,.55);border:1px solid rgba(155,176,191,.55);border-radius:999px;padding:.28rem .65rem}.footer-links a:hover{background:#fff}.legal-hero h1{display:flex;align-items:center;gap:.45rem}.legal-card{margin-bottom:1rem;line-height:1.65}.legal-list{display:grid;grid-template-columns:minmax(160px,240px) minmax(0,1fr);gap:.65rem 1rem}.legal-list dt{font-weight:bold;color:#0a648f}.legal-list dd{margin:0}.cookie-consent{position:fixed;left:1rem;right:1rem;bottom:1rem;z-index:1500;max-width:820px;margin:0 auto;background:#fff;border:1px solid #b8c8d6;border-left:5px solid var(--orange);border-radius:8px;box-shadow:0 12px 32px rgba(0,0,0,.25);display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.85rem;align-items:center;padding:.9rem}.cookie-consent[hidden]{display:none}.cookie-icon{width:2.55rem;height:2.55rem;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff5d7;color:#b16d00;font-size:1.35rem}.cookie-text strong{display:block;color:#0a648f;margin-bottom:.18rem}.cookie-text p{margin:0;color:#405769;line-height:1.35}.cookie-actions{display:flex;gap:.45rem;align-items:center;flex-wrap:wrap;justify-content:flex-end}.backup-stats{margin:.8rem 0 1rem}.backup-create-form{margin-top:.7rem}.admin-table-wrap{overflow:auto}.fa-fw{width:1.25em;text-align:center}@media(max-width:760px){.topbar nav a i{margin-right:.25rem}.footer-inner{justify-content:center;text-align:center}.footer-links{justify-content:center}.legal-list{grid-template-columns:1fr}.cookie-consent{left:.55rem;right:.55rem;bottom:.55rem;grid-template-columns:1fr;text-align:left;padding:.75rem}.cookie-actions{justify-content:stretch}.cookie-actions .btn,.cookie-actions .mini{flex:1 1 auto;justify-content:center}.footer div{white-space:normal!important}.footer{height:auto!important;min-height:var(--freechat-mobile-footer-height,38px)!important}.tabs a{white-space:nowrap}}
@media(max-width:760px){body.chat-fullscreen .cookie-consent{bottom:calc(var(--freechat-mobile-footer-height,38px) + var(--freechat-mobile-input-height,146px) + .55rem)}}

/* Admin legal page editor */
.legal-page-switcher{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.8rem}.legal-editor-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:1rem;align-items:start}.legal-edit-form textarea{min-height:420px;font-family:Consolas,Monaco,monospace}.legal-reset-form{margin-top:.8rem;padding-top:.8rem;border-top:1px solid var(--line)}.legal-preview-card{position:sticky;top:calc(var(--freechat-nav-height) + 1rem)}.legal-preview-box{background:#fff;border:1px solid var(--line);border-radius:5px;padding:1rem;line-height:1.65;max-height:620px;overflow:auto}.legal-preview-box h1{margin:.1rem 0 .45rem;color:#0a648f}.legal-content{line-height:1.65}.legal-content strong{color:#0a648f}.legal-edit-link{border-top:1px solid var(--line);margin-top:1rem;padding-top:1rem}.legal-updated{margin:.75rem 0 0}@media(max-width:980px){.legal-editor-grid{grid-template-columns:1fr}.legal-preview-card{position:static}.legal-edit-form textarea{min-height:320px}}

/* Font Awesome polish beyond the navbar */
.icon-heading{display:flex;align-items:center;gap:.5rem}.icon-heading i{color:var(--blue)}
.bbcode-toolbar{background:#f7fbfe;border:1px solid #d4e1ea;border-radius:5px;padding:.35rem!important}
.bbcode-toolbar button{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:.25rem!important;min-height:30px!important;font-weight:700!important}
.bbcode-toolbar button i{margin-right:.1rem;color:#0a648f}.bbcode-toolbar button:hover i{color:#075c87}.bb-label{line-height:1}.bbcode-fa-icon{color:#0a648f;margin:0 .12rem;vertical-align:-.06em}.message-body .bbcode-fa-icon,.post-content .bbcode-fa-icon{font-size:1.05em}.stat-icon{color:#0a648f;margin-right:.2rem}.card-icon{display:inline-grid;place-items:center;width:2.15rem;height:2.15rem;border-radius:50%;background:#e7f4fb;color:#0a648f;border:1px solid #c9e2ef;margin-right:.45rem}.action-icon-row{display:flex;gap:.45rem;flex-wrap:wrap;align-items:center}.file-btn{display:inline-flex;align-items:center;gap:.35rem}.file-btn i{color:#0a648f}.comment-author strong:before,.post-author strong:before{content:"👤";font-family:inherit;font-weight:400;margin-right:.28rem;color:#0a648f}.news-stats-row span i,.download-stats-row span i,.forum-meta-row span i{color:#0a648f}
@media(max-width:760px){.bbcode-toolbar{flex-wrap:nowrap!important;overflow-x:auto!important}.bbcode-toolbar button{flex:0 0 auto!important}.bb-label{display:none}.bbcode-toolbar button{min-width:34px!important;padding:.32rem .45rem!important}.bbcode-toolbar button i{margin-right:0!important}}

/* Two built-in themes: Classic and Dark */
.topbar nav .theme-toggle,
body.chat-fullscreen .topbar nav .theme-toggle{
    color:#fff!important;
    text-decoration:none!important;
    background:rgba(0,0,0,.16)!important;
    border:1px solid rgba(255,255,255,.24)!important;
    border-radius:3px!important;
    height:32px!important;
    min-height:32px!important;
    padding:.42rem .75rem!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:.3rem!important;
    cursor:pointer!important;
    font:inherit!important;
    white-space:nowrap!important;
    flex:0 0 auto!important;
}
.topbar nav .theme-toggle:hover{filter:brightness(1.08)}
.topbar nav .theme-toggle i{margin-right:.25rem;line-height:1}
:root[data-theme="dark"]{
    --blue:#4db7ff;
    --blue-dark:#1f78b3;
    --blue-light:#172d3f;
    --green:#9de26c;
    --pink:#ff6aa0;
    --orange:#ffbf47;
    --line:#2b4154;
    --text:#e6eef7;
    --muted:#9fb1c1;
    --panel:#172331;
    --soft:#111b26;
    --danger:#ff5a65;
}
html[data-theme="dark"] body{background:#0d141d;color:var(--text)}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] body.chat-fullscreen .topbar{background:linear-gradient(#123d5c,#0b263a)!important;border-bottom-color:#061723!important;box-shadow:0 2px 10px rgba(0,0,0,.55)!important}
html[data-theme="dark"] .topbar nav,
html[data-theme="dark"] body.chat-fullscreen .topbar nav{background:transparent}
html[data-theme="dark"] .topbar nav a,
html[data-theme="dark"] .topbar nav .theme-toggle,
html[data-theme="dark"] body.chat-fullscreen .topbar nav a,
html[data-theme="dark"] body.chat-fullscreen .topbar nav .theme-toggle{background:rgba(255,255,255,.08)!important;border-color:rgba(255,255,255,.18)!important;color:#eef7ff!important}
html[data-theme="dark"] .topbar nav a:hover,
html[data-theme="dark"] .topbar nav .theme-toggle:hover{background:rgba(77,183,255,.18)!important}
html[data-theme="dark"] .nav-toggle{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.22);color:#fff}
html[data-theme="dark"] .brand strong{color:#ff7dad}
html[data-theme="dark"] .brand-mark{background:radial-gradient(circle at 35% 35%,#fff 0 7%,#4db7ff 8% 24%,transparent 25%),radial-gradient(circle at 65% 65%,#fff 0 6%,#9de26c 7% 22%,transparent 23%);border-color:#4db7ff}
html[data-theme="dark"] .card,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .rail-box,
html[data-theme="dark"] .mail-card,
html[data-theme="dark"] .legal-preview-box{background:#172331!important;border-color:var(--line)!important;box-shadow:0 1px 4px rgba(0,0,0,.28)!important;color:var(--text)!important}
html[data-theme="dark"] .hero{background:linear-gradient(90deg,#172331 0,#142231 55%,#10283a 100%)!important;border-top-color:var(--orange)!important}
html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .card h1,
html[data-theme="dark"] .card h2,
html[data-theme="dark"] .mail-sidebar h1,
html[data-theme="dark"] .mail-read-head h2,
html[data-theme="dark"] .legal-preview-box h1,
html[data-theme="dark"] .rail-title,
html[data-theme="dark"] .side-block h2,
html[data-theme="dark"] .profile-pop h3,
html[data-theme="dark"] .chat-head h1{color:#7fd0ff!important}
html[data-theme="dark"] .news-card h2 a,
html[data-theme="dark"] a:not(.btn):not(.brand):not(.mini){color:#8ed7ff}
html[data-theme="dark"] .muted,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .mail-meta-line,
html[data-theme="dark"] .mail-row-main span,
html[data-theme="dark"] .mail-row-side{color:var(--muted)!important}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .chat-send-form #messageText{background:#0f1924!important;color:#edf6ff!important;border-color:#375066!important}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus{outline-color:rgba(77,183,255,.22);border-color:#4db7ff!important}
html[data-theme="dark"] table,
html[data-theme="dark"] .admin-table-wrap{background:#172331;color:var(--text)}
html[data-theme="dark"] th{background:#10283a;color:#dceeff}
html[data-theme="dark"] th,
html[data-theme="dark"] td{border-bottom-color:var(--line)}
html[data-theme="dark"] .tabs a,
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .mini,
html[data-theme="dark"] .room-tab,
html[data-theme="dark"] .online-user,
html[data-theme="dark"] .mail-tabs a,
html[data-theme="dark"] .mail-row,
html[data-theme="dark"] .mail-empty{background:#132030!important;border-color:var(--line)!important;color:#dceaff!important}
html[data-theme="dark"] .tabs a.active,
html[data-theme="dark"] .pagination a.active,
html[data-theme="dark"] .room-tab.active,
html[data-theme="dark"] .mail-tabs a.active{background:#1c78b3!important;border-color:#399bd5!important;color:#fff!important}
html[data-theme="dark"] .stats div{background:#132030!important;border-color:var(--line)!important}
html[data-theme="dark"] .stats strong{color:#7fd0ff!important}
html[data-theme="dark"] .alert.ok{background:#173522;border-color:#327143;color:#cdf3d4}
html[data-theme="dark"] .alert.danger{background:#3a171b!important;border-color:#7f3038!important;color:#ffd7da!important}
html[data-theme="dark"] .chatroom-app,
html[data-theme="dark"] .chat-main,
html[data-theme="dark"] body.chat-fullscreen .chatroom-app,
html[data-theme="dark"] body.chat-fullscreen .chat-main{background:#121c28!important;border-color:var(--line)!important;color:var(--text)!important}
html[data-theme="dark"] .room-rail,
html[data-theme="dark"] body.chat-fullscreen .room-rail{background:#101a25!important;border-color:var(--line)!important}
html[data-theme="dark"] .side-panel{background:#101a25!important;border-color:var(--line)!important}
html[data-theme="dark"] .side-block{border-bottom-color:var(--line)!important}
html[data-theme="dark"] .chat-head{background:#162334!important;border-bottom-color:var(--line)!important}
html[data-theme="dark"] .messages,
html[data-theme="dark"] body.chat-fullscreen .messages{background:#0f1722!important;color:var(--text)!important}
html[data-theme="dark"] .msg{border-bottom-color:#223548!important}
html[data-theme="dark"] .msg.other:nth-child(even) .bubble{background:#121e2b!important}
html[data-theme="dark"] .mine .bubble{background:#122d42!important;border-left-color:#4db7ff!important}
html[data-theme="dark"] .bubble{color:#e9f4ff!important}
html[data-theme="dark"] .meta{color:#9fb1c1!important}
html[data-theme="dark"] .user-link{color:#8ed7ff!important}
html[data-theme="dark"] .chat-send-form,
html[data-theme="dark"] body.chat-fullscreen .chat-send-form,
html[data-theme="dark"] .send-form{background:#14202e!important;border-top-color:var(--line)!important}
html[data-theme="dark"] .file-btn{background:#0f1924!important;color:#e6f1fb!important;border-color:#375066!important}
html[data-theme="dark"] .file-btn i{color:#8ed7ff!important}
html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .online-count,
html[data-theme="dark"] .mail-tabs strong,
html[data-theme="dark"] .mail-badge{background:#1c78b3!important;border-color:#399bd5!important;color:#fff!important}
html[data-theme="dark"] .online-user:hover,
html[data-theme="dark"] .room-tab:hover{background:#1a2b3c!important;border-color:#4d789c!important}
html[data-theme="dark"] .private-head{background:#1c78b3!important;color:#fff!important}
html[data-theme="dark"] .private-box{background:#172331!important;border-color:var(--line)!important}
html[data-theme="dark"] .footer,
html[data-theme="dark"] body.chat-fullscreen .footer{background:#0b1118!important;border-top-color:#223548!important;color:#93a8ba!important}
html[data-theme="dark"] .footer strong{color:#8ed7ff!important}
html[data-theme="dark"] .footer-links a{background:#142030!important;border-color:#2b4154!important;color:#dceaff!important}
html[data-theme="dark"] .footer-links a:hover{background:#1b2c3e!important}
html[data-theme="dark"] .cookie-consent,
html[data-theme="dark"] .mail-toast{background:#172331!important;border-color:var(--line)!important;box-shadow:0 12px 32px rgba(0,0,0,.45)!important;color:var(--text)!important}
html[data-theme="dark"] .cookie-text strong,
html[data-theme="dark"] .mail-toast-body strong{color:#8ed7ff!important}
html[data-theme="dark"] .cookie-text p,
html[data-theme="dark"] .mail-toast-body p{color:#c1d0de!important}
html[data-theme="dark"] .cookie-icon,
html[data-theme="dark"] .mail-toast-icon,
html[data-theme="dark"] .card-icon{background:#10283a!important;color:#8ed7ff!important;border-color:#294d65!important}
html[data-theme="dark"] .bbcode-toolbar{background:#0f1924!important;border-color:#2b4154!important}
html[data-theme="dark"] .bbcode-toolbar button{background:#152437!important;border-color:#375066!important;color:#e6f1fb!important}
html[data-theme="dark"] .bbcode-toolbar button i,
html[data-theme="dark"] .bbcode-fa-icon,
html[data-theme="dark"] .stat-icon,
html[data-theme="dark"] .news-stats-row span i,
html[data-theme="dark"] .download-stats-row span i,
html[data-theme="dark"] .forum-meta-row span i{color:#8ed7ff!important}
html[data-theme="dark"] .bbcode-quote{background:#111d2a!important;border-left-color:#4db7ff!important;color:#dceaff!important}
html[data-theme="dark"] .bbcode-code{background:#080d13!important;color:#e6f1fb!important;border-color:#2b4154!important}
html[data-theme="dark"] .legal-list dt,
html[data-theme="dark"] .legal-content strong{color:#8ed7ff!important}
html[data-theme="dark"] .profile-actions .btn,
html[data-theme="dark"] .btn{border-color:#2e78a5}
html[data-theme="dark"] .btn.primary{background:linear-gradient(#a9df62,#77b534)!important;border-color:#5a9726!important;color:#122606!important}
html[data-theme="dark"] .btn.danger,
html[data-theme="dark"] .danger{background:#bb3641!important;border-color:#8d2430!important;color:#fff!important}
html[data-theme="dark"] body.chat-fullscreen{background:#0d141d!important}
@media(max-width:760px){
    .topbar nav .theme-toggle,
    body.chat-fullscreen .topbar nav .theme-toggle{width:100%!important;height:40px!important;min-height:40px!important;padding:.55rem .65rem!important;justify-content:center!important;border-color:rgba(255,255,255,.25)!important;background:rgba(255,255,255,.1)!important}
    html[data-theme="dark"] .topbar nav,
    html[data-theme="dark"] body.chat-fullscreen .topbar nav{background:linear-gradient(#123d5c,#0b263a)!important;border-bottom-color:#061723!important}
    .topbar nav .theme-toggle i{margin-right:.25rem!important}
}

/* Forum search and admin pagination refinements */
.search-inline{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap}
.search-inline input[type="search"]{flex:1 1 260px;min-width:0}
.forum-search-card{margin-bottom:1rem}
.admin-pagination{margin:.9rem 0 .1rem;justify-content:flex-start;flex-wrap:wrap}
.pagination-gap{display:inline-flex;align-items:center;padding:.45rem .35rem;color:var(--muted)}
.section-head .small-text{white-space:nowrap}
@media (max-width:760px){.search-inline{display:grid;grid-template-columns:1fr}.search-inline .btn{justify-content:center}.section-head .small-text{white-space:normal}}

/* Language switcher and admin config editor */
.language-switcher {
    display: inline-flex;
    align-items: center;
    margin: 0 2px;
}
.language-switcher label {
    margin: 0;
}
.language-switcher select {
    width: auto;
    min-width: 86px;
    height: 34px;
    padding: 4px 24px 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08);
    color: inherit;
    font-size: 13px;
}
.language-switcher option {
    color: #111;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.config-admin-form {
    display: grid;
    gap: 16px;
}
.config-card h2 {
    margin-top: 0;
}
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.config-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--border, #d7e1e8);
    background: rgba(255,255,255,.45);
    border-radius: 10px;
    padding: 12px;
}
.config-label {
    font-weight: 700;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.config-label code {
    font-weight: 400;
    font-size: 11px;
    opacity: .75;
}
.config-field input[type="text"],
.config-field input[type="number"],
.config-field select,
.config-field textarea {
    width: 100%;
}
.config-field small {
    color: var(--muted, #657786);
    line-height: 1.35;
}
.check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.sticky-save-card {
    position: sticky;
    bottom: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
html[data-theme="dark"] .config-field,
body[data-theme="dark"] .config-field {
    background: rgba(255,255,255,.04);
}
@media (max-width: 760px) {
    .language-switcher {
        width: 100%;
        padding: 4px 10px;
    }
    .language-switcher label,
    .language-switcher select {
        width: 100%;
    }
    .config-grid {
        grid-template-columns: 1fr;
    }
    .sticky-save-card {
        position: static;
    }
}

/* Clean login/register redesign: no left promo box, one centered modern panel. */
.auth-simple{
    min-height:calc(100vh - var(--freechat-nav-height,58px) - 90px);
    display:flex;
    align-items:flex-start;
    justify-content:center;
    padding:clamp(1rem,3vw,2.4rem);
}
.auth-simple .auth-alert{
    width:min(1040px,100%);
    margin:0 0 1rem;
}
.auth-panel{
    width:min(1040px,100%);
    padding:0;
    overflow:hidden;
    border:1px solid rgba(8,92,135,.18);
    box-shadow:0 16px 38px rgba(20,45,67,.12);
}
.clean-auth-header{
    display:flex;
    align-items:center;
    gap:1rem;
    padding:clamp(1.1rem,2.5vw,1.8rem);
    background:linear-gradient(135deg,#ffffff 0%,#f7fbfe 48%,#e8f5fc 100%);
    border-bottom:1px solid var(--line);
}
.auth-icon-bubble{
    width:58px;
    height:58px;
    flex:0 0 58px;
    display:grid;
    place-items:center;
    border-radius:18px;
    background:linear-gradient(135deg,#0b74a8,#13a1d7);
    color:#fff;
    font-size:1.45rem;
    box-shadow:0 8px 18px rgba(11,116,168,.22);
}
.clean-eyebrow{
    align-self:auto;
    background:#eaf6fd;
    border-color:#cfe8f6;
    color:#0a648f;
    margin-bottom:.4rem;
}
.clean-auth-header h1{
    margin:.1rem 0 .35rem;
    color:#0a648f;
    font-size:clamp(1.7rem,3.8vw,2.75rem);
    line-height:1.08;
}
.clean-auth-header p{
    margin:0;
    color:var(--muted);
    max-width:760px;
    line-height:1.5;
}
.auth-choice-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:1rem;
    padding:clamp(1rem,2.5vw,1.4rem);
}
.auth-box{
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    padding:1rem;
    display:grid;
    align-content:start;
    gap:.6rem;
}
.auth-box.member-box{border-top:4px solid var(--orange)}
.auth-box.guest-box{border-top:4px solid var(--green)}
.auth-box .form-title h2{display:flex;align-items:center;gap:.4rem}
.auth-box .big-btn,.auth-submit-btn{width:100%;min-height:44px}
.guest-submit{background:linear-gradient(#bde96c,#8cc43c);border-color:#72aa2a;color:#173106}
.clean-auth-switch{
    padding:0 1.2rem 1.25rem;
    text-align:center;
}
.register-panel{max-width:1040px}
.clean-form-section{
    padding:clamp(1rem,2.5vw,1.35rem);
    border-bottom:1px solid var(--line);
}
.clean-form-section .form-title h2{display:flex;align-items:center;gap:.45rem}
.clean-bot-protection{
    margin:clamp(1rem,2.5vw,1.35rem);
}
.register-panel>.auth-submit-btn{
    width:calc(100% - clamp(2rem,5vw,2.7rem));
    margin:0 clamp(1rem,2.5vw,1.35rem);
}
.register-panel>.clean-auth-switch{padding-top:1rem}
.login-simple .auth-panel{max-width:940px}

@media(max-width:760px){
    .auth-simple{
        min-height:auto;
        padding:.75rem;
        align-items:flex-start;
    }
    .clean-auth-header{
        align-items:flex-start;
        padding:1rem;
    }
    .auth-icon-bubble{
        width:48px;
        height:48px;
        flex-basis:48px;
        border-radius:14px;
        font-size:1.15rem;
    }
    .auth-choice-grid,.form-grid.two{grid-template-columns:1fr}
    .auth-choice-grid{padding:.85rem;gap:.85rem}
    .clean-form-section{padding:.95rem}
    .clean-bot-protection{margin:.95rem}
    .register-panel>.auth-submit-btn{width:calc(100% - 1.9rem);margin:0 .95rem}
}
@media(max-width:480px){
    .clean-auth-header{display:grid;gap:.75rem}
    .clean-auth-header h1{font-size:1.55rem}
    .clean-auth-header p{font-size:.92rem}
    .auth-box{padding:.85rem;border-radius:8px}
}

html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .auth-box{
    background:#172331!important;
    border-color:#2b4154!important;
    box-shadow:0 16px 38px rgba(0,0,0,.28)!important;
}
html[data-theme="dark"] .clean-auth-header{
    background:linear-gradient(135deg,#172331 0%,#132030 55%,#10283a 100%)!important;
    border-bottom-color:#2b4154!important;
}
html[data-theme="dark"] .clean-auth-header h1,
html[data-theme="dark"] .form-title h2{color:#8ed7ff!important}
html[data-theme="dark"] .clean-auth-header p{color:#c1d0de!important}
html[data-theme="dark"] .clean-eyebrow{
    background:#10283a!important;
    border-color:#294d65!important;
    color:#8ed7ff!important;
}
html[data-theme="dark"] .auth-box,
html[data-theme="dark"] .clean-form-section{border-color:#2b4154!important}

/* Auth pages now use the same normal page layout as the rest of the site. */
.auth-layout-hero{margin-bottom:1rem}
.auth-page-grid{align-items:start;margin-bottom:1rem}
.auth-page-grid .auth-card{min-height:0}
.register-page-card{max-width:1200px;margin:0 auto 1rem}
.register-page-card .form-title.sub{margin-top:.85rem}
.register-page-card textarea{min-height:130px}
.register-page-card .auth-submit-btn{justify-self:start;min-width:220px}
@media(max-width:760px){
    .auth-layout-hero h1{font-size:1.7rem}
    .auth-page-grid{gap:.75rem}
    .register-page-card .auth-submit-btn{width:100%;justify-self:stretch}
}
html[data-theme="dark"] .auth-layout-hero{background:linear-gradient(90deg,#172331 0,#132030 52%,#10283a 100%)!important;border-color:#2b4154!important}
.badge.ok{background:#e8f8ee;border-color:#bfe7ca;color:#237a39}.badge.warn{background:#fff6dd;border-color:#f1cf7b;color:#946200}.auth-links{display:flex;gap:.35rem;align-items:center;flex-wrap:wrap;margin-top:.8rem}
html[data-theme="dark"] .badge.ok{background:#183724;border-color:#285f3a;color:#9de0ae}html[data-theme="dark"] .badge.warn{background:#3d3215;border-color:#685020;color:#ffd36c}

/* Improved installer */
.install-hero{border-top-color:var(--green)}
.install-step{margin-bottom:1rem}
.install-step h2{display:flex;align-items:center;gap:.55rem;margin-top:0;color:#0a648f}
.install-step-no{display:inline-flex;align-items:center;justify-content:center;width:1.8rem;height:1.8rem;border-radius:50%;background:#0b74a8;color:#fff;font-size:.95rem;line-height:1;font-weight:800;flex:0 0 auto}
.install-check-grid{align-items:start}
.install-check-table td:first-child{width:74px;white-space:nowrap}
.install-check-table tr.bad td{background:#fff7f7}
.install-check-table tr.ok td{background:#fbfffa}
.install-check-table code{font-size:.78rem;word-break:break-all;white-space:normal}
.install-badge{display:inline-flex;align-items:center;justify-content:center;min-width:48px;border-radius:999px;padding:.18rem .55rem;font-size:.78rem;font-weight:800;text-transform:uppercase;border:1px solid transparent}
.install-badge.ok{background:#dff4d5;color:#23551a;border-color:#a9d99b}
.install-badge.bad{background:#ffe0e0;color:#8b2028;border-color:#e0a0a4}
.required-dot{display:inline-flex;align-items:center;border-radius:999px;background:#fff1cc;color:#795000;border:1px solid #f1c36d;padding:.08rem .42rem;font-size:.72rem;font-weight:700;margin-left:.25rem}
.install-config-form{gap:1rem}
.install-config-card{border:1px solid var(--line);border-radius:4px;padding:1rem;background:linear-gradient(180deg,#fff,#fbfdff)}
.install-config-card h3{margin:.1rem 0 .8rem;color:#0a648f}
.install-save-actions{padding-top:.25rem}
.install-admin-form{max-width:980px}
.compact-config-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
button[disabled],.btn[disabled]{opacity:.55;cursor:not-allowed;filter:grayscale(.35)}
html[data-theme="dark"] .install-config-card{background:#172331;border-color:#2b3e50}
html[data-theme="dark"] .install-check-table tr.ok td{background:#132819}
html[data-theme="dark"] .install-check-table tr.bad td{background:#321b1f}
html[data-theme="dark"] .required-dot{background:#3a2f17;color:#ffd780;border-color:#6b531d}
@media(max-width:760px){.install-check-table td:first-child{width:58px}.install-step h2{align-items:flex-start}.install-save-actions .btn,.install-admin-form .btn{width:100%;justify-content:center}}

/* Bot protection dark-theme fix */
html[data-theme="dark"] .bot-protection,
html[data-theme="dark"] .clean-bot-protection{
    background:#132030!important;
    border-color:#2b4154!important;
    color:#e6f1fb!important;
}
html[data-theme="dark"] .bot-protection strong,
html[data-theme="dark"] .clean-bot-protection strong{
    color:#8ed7ff!important;
}
html[data-theme="dark"] .bot-protection label,
html[data-theme="dark"] .clean-bot-protection label{
    color:#e6f1fb!important;
}
html[data-theme="dark"] .bot-protection .muted,
html[data-theme="dark"] .clean-bot-protection .muted{
    color:#c1d0de!important;
}

/* Community expansion features */
.announcement-banner{margin:0 0 1rem;padding:.8rem 1rem;border:1px solid #f0d58a;background:#fff7da;border-radius:8px;color:#6d4a00;display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.feature-list{display:grid;gap:.75rem}.feature-row{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;border:1px solid var(--line);border-radius:8px;padding:.85rem;background:#fff}.feature-row.unread{border-color:#1688bd;background:#f2faff}.feature-row h3{margin:.05rem 0 .35rem}.feature-actions{display:flex;gap:.4rem;flex-wrap:wrap;align-items:center}.feature-actions.stacked{margin-top:1rem;align-items:stretch}.feature-actions.stacked .btn{width:100%;justify-content:center}.content-tools{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.75rem;align-items:center}.reaction-row{display:flex;gap:.25rem;flex-wrap:wrap;align-items:center}.reaction-form{margin:0}.reaction-pill{border:1px solid var(--line);background:#f6f9fb;border-radius:999px;padding:.25rem .55rem;font:inherit;cursor:pointer}.reaction-pill.active{border-color:#1688bd;background:#e7f5fd}.badge-row{display:flex;gap:.35rem;flex-wrap:wrap;margin:.75rem 0}.events-grid,.gallery-grid,.member-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}.event-rsvp-form,.poll-vote-form,.rating-form{display:flex;gap:.5rem;flex-wrap:wrap;align-items:end;margin-top:.8rem}.poll-results{display:grid;gap:.55rem}.poll-option>div:first-child{display:flex;justify-content:space-between;gap:.7rem;font-size:.92rem}.poll-bar{height:9px;border-radius:99px;background:#edf3f7;overflow:hidden}.poll-bar span{display:block;height:100%;background:#1688bd}.gallery-card img{width:100%;height:180px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}.gallery-full{width:100%;max-height:70vh;object-fit:contain;border-radius:8px;border:1px solid var(--line);background:#f6f9fb}.admin-thumb{width:70px;height:48px;object-fit:cover;border-radius:5px}.log-row{border-bottom:1px solid var(--line);padding:.65rem 0}.log-row:last-child{border-bottom:0}.profile-theme-blue .profile-cover{background:linear-gradient(135deg,#0a84c1,#bfe9ff)}.profile-theme-pink .profile-cover{background:linear-gradient(135deg,#d84d9b,#ffd0e8)}.profile-theme-retro .profile-cover{background:repeating-linear-gradient(45deg,#f4c430,#f4c430 10px,#00a0a0 10px,#00a0a0 20px)}.profile-theme-minimal .profile-cover{background:#e8edf2}.profile-theme-dark .profile-cover{background:linear-gradient(135deg,#1b2430,#40516a)}
@media(max-width:760px){.feature-row{display:block}.feature-actions{margin-top:.6rem}.topbar nav{grid-template-columns:1fr!important}}

/* Admin UX polish: responsive admin menu, compact gallery upload and system info cards */
.admin-tabs{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
    gap:.45rem!important;
    overflow:visible!important;
    margin-bottom:1rem!important;
}
.admin-tabs a{
    min-height:42px;
    justify-content:flex-start;
    align-items:center;
    white-space:normal!important;
    line-height:1.2;
    word-break:normal;
    overflow-wrap:anywhere;
}
.admin-tabs a span{min-width:0}
@media(max-width:640px){
    .admin-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.4rem!important}
    .admin-tabs a{padding:.55rem .6rem!important;font-size:.92rem!important}
}
@media(max-width:380px){
    .admin-tabs{grid-template-columns:1fr!important}
}
.gallery-upload-form .wide{grid-column:1/-1}
.gallery-upload-submit{
    justify-self:start;
    align-self:center;
    width:auto!important;
    min-width:112px;
    max-width:180px;
    padding:.52rem .95rem!important;
}
@media(max-width:760px){
    .gallery-upload-submit{justify-self:start;width:auto!important;min-width:112px}
}
.system-info-card{margin-top:1rem}
.system-info-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:1rem;
}
.system-metric{
    background:#f6f9fb;
    border:1px solid var(--line);
    border-radius:8px;
    padding:1rem;
    min-width:0;
}
.system-metric h3{margin:.05rem 0 .6rem;color:#0a648f;font-size:1rem}
.system-metric strong{display:block;font-size:1.45rem;color:#0b74a8;margin-bottom:.5rem;overflow-wrap:anywhere}
.system-meter{height:9px;background:#e4edf4;border-radius:99px;overflow:hidden;margin:.25rem 0 .55rem}
.system-meter span{display:block;height:100%;background:#0b74a8;border-radius:99px}
.system-checks{display:flex;gap:.45rem;flex-wrap:wrap;margin-top:1rem}
.condition-pill{display:inline-flex;align-items:center;gap:.25rem;border-radius:999px;border:1px solid #c9d8e4;background:#f4f8fb;color:#29485d;font-weight:800;font-size:.82rem;padding:.32rem .62rem;white-space:nowrap}
.condition-good{background:#e8f8ee;border-color:#bfe7ca;color:#237a39}
.condition-warning{background:#fff6dd;border-color:#f1cf7b;color:#946200}
.condition-critical{background:#ffe7e9;border-color:#efb6bb;color:#98252f}
.condition-unknown{background:#eef3f7;border-color:#cedbe4;color:#5b6c79}
html[data-theme="dark"] .admin-tabs a{background:#132030!important;border-color:var(--line)!important;color:#dceaff!important}
html[data-theme="dark"] .admin-tabs a.active{background:#1c78b3!important;border-color:#399bd5!important;color:#fff!important}
html[data-theme="dark"] .system-metric{background:#132030!important;border-color:var(--line)!important}
html[data-theme="dark"] .system-metric h3,html[data-theme="dark"] .system-metric strong{color:#8ed7ff!important}
html[data-theme="dark"] .system-meter{background:#0b1520!important}
html[data-theme="dark"] .condition-pill{background:#132030;border-color:#2b4154;color:#dceaff}
html[data-theme="dark"] .condition-good{background:#183724!important;border-color:#285f3a!important;color:#9de0ae!important}
html[data-theme="dark"] .condition-warning{background:#3d3215!important;border-color:#685020!important;color:#ffd36c!important}
html[data-theme="dark"] .condition-critical{background:#3f1b22!important;border-color:#7a2d38!important;color:#ffb7c0!important}

/* Advanced admin/community expansion */
.module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}.module-card,.group-card,.template-card{background:#f8fbfd;border:1px solid var(--line);border-radius:6px;padding:1rem}.switch-row,.checkline{display:flex!important;grid-template-columns:none!important;align-items:flex-start;gap:.55rem}.switch-row input,.checkline input{width:auto;margin-top:.2rem}.switch-row span,.checkline span{display:grid;gap:.15rem}.switch-row small,.checkline small{color:var(--muted);font-size:.78rem}.group-permission-list{display:grid;gap:1rem}.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.55rem;margin:.75rem 0}.new-group-box{background:#fff;border:1px dashed var(--line);border-radius:6px;padding:1rem;margin:1rem 0}.dashboard-widgets{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));margin:1rem 0}.widget-row{border-bottom:1px solid var(--line);padding:.55rem 0;display:grid;gap:.12rem}.widget-row:last-child{border-bottom:0}.dashboard-big-number{font-size:2.4rem;font-weight:bold;color:#0b74a8;margin:.2rem 0}.theme-preview-card .btn{margin:.2rem}.email-template-form,.theme-builder-form,.approval-settings-form{gap:1rem}.template-card textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.gallery-upload-submit{width:auto!important;max-width:180px;justify-content:center}.form-grid .gallery-upload-submit{align-self:end;justify-self:start}.system-metric [data-live-system]{font-variant-numeric:tabular-nums}
html[data-theme="dark"] .module-card,html[data-theme="dark"] .group-card,html[data-theme="dark"] .template-card,html[data-theme="dark"] .new-group-box{background:#132030!important;border-color:var(--line)!important;color:#dceaff!important}html[data-theme="dark"] .widget-row{border-color:var(--line)!important}
@media(max-width:760px){.permission-grid,.module-grid,.dashboard-widgets{grid-template-columns:1fr}.switch-row,.checkline{align-items:flex-start}.gallery-upload-submit{max-width:none}}

/* Professional feature pack */
.admin-filter-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.65rem;align-items:end;margin:.8rem 0 1rem}.admin-filter-form .checkline{align-self:center}.compact-head{margin-bottom:.35rem}.messages-shell{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:1rem;align-items:start}.conversations-sidebar{position:sticky;top:74px;max-height:calc(100vh - 96px);overflow:auto}.conversation-search{display:grid;gap:.45rem;margin-bottom:.7rem}.new-conversation-btn{width:100%;justify-content:center;margin-bottom:.7rem}.conversation-list{display:grid;gap:.45rem}.conversation-row{display:grid;gap:.16rem;text-decoration:none;color:inherit;background:#f8fbfd;border:1px solid var(--line);border-radius:6px;padding:.7rem}.conversation-row:hover,.conversation-row.active{border-color:#8cc8e6;background:#eef8ff}.conversation-row.unread{border-left:5px solid var(--orange)}.conversation-row strong{color:#0a648f}.conversation-row span{color:#405769;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-row small{color:var(--muted)}.message-thread{display:grid;gap:.7rem;margin:1rem 0}.bubble{max-width:min(78%,820px);border:1px solid var(--line);border-radius:12px;padding:.75rem;background:#f8fbfd}.bubble.mine{justify-self:end;background:#e9f7e5;border-color:#b8dca9}.bubble.theirs{justify-self:start;background:#fff}.bubble-meta{display:flex;justify-content:space-between;gap:1rem;color:var(--muted);font-size:.86rem;margin-bottom:.35rem}.attachment-line{margin:.55rem 0 0}.conversation-reply-form{border-top:1px solid var(--line);padding-top:1rem}.browser-push-btn{margin:.4rem 0 0}.status-pill{display:inline-flex;align-items:center;border-radius:999px;border:1px solid var(--line);padding:.32rem .65rem;background:#f7fafc;font-weight:700}.status-good,.badge.ok{background:#d9f1d1!important;border-color:#96c785!important;color:#23551a!important}.status-warning,.badge.warn{background:#fff3ce!important;border-color:#e0bd5a!important;color:#6d4b00!important}.status-critical{background:#f8dddd!important;border-color:#e0a0a4!important;color:#8b2028!important}.badge.positive{background:#d9f1d1;border-color:#96c785;color:#23551a}.badge.warning{background:#fff3ce;border-color:#e0bd5a;color:#6d4b00}.badge.serious{background:#f8dddd;border-color:#e0a0a4;color:#8b2028}.badge.info{background:#e7f4fb;border-color:#c9e2ef;color:#0a648f}code{background:#edf3f7;border:1px solid #d2e0ea;border-radius:3px;padding:.1rem .25rem;word-break:break-all}.admin-thumb{max-width:70px;max-height:52px;object-fit:cover;border-radius:4px;border:1px solid var(--line)}
@media(max-width:860px){.messages-shell{grid-template-columns:1fr}.conversations-sidebar{position:static;max-height:none}.bubble{max-width:100%}.admin-filter-form{grid-template-columns:1fr}}
html[data-theme="dark"] .conversation-row,html[data-theme="dark"] .bubble.theirs,html[data-theme="dark"] .admin-filter-form input,html[data-theme="dark"] .admin-filter-form select{background:#132030!important;border-color:var(--line)!important;color:#dceaff!important}html[data-theme="dark"] .conversation-row.active,html[data-theme="dark"] .conversation-row:hover{background:#172b3d!important;border-color:#399bd5!important}html[data-theme="dark"] .conversation-row strong{color:#8ed7ff!important}html[data-theme="dark"] .conversation-row span,html[data-theme="dark"] .bubble-meta{color:#c1d0de!important}html[data-theme="dark"] .bubble.mine{background:#17331f!important;border-color:#396b45!important}html[data-theme="dark"] code{background:#0b1520!important;border-color:var(--line)!important;color:#dceaff!important}

/* XP, profile upgrades and chat extras */
.xp-compact{display:grid;gap:.45rem;text-align:left;background:#f8fbfd;border:1px solid var(--line);border-radius:8px;padding:.75rem;margin:.75rem 0}.xp-compact>div:first-child{display:flex;justify-content:space-between;gap:.75rem;align-items:center}.xp-compact strong{color:#0a648f}.xp-compact span{font-weight:700;color:#405769}.xp-bar{height:10px;border-radius:999px;background:#e7eef4;overflow:hidden;border:1px solid #d3e0e8}.xp-bar span{display:block;height:100%;background:linear-gradient(90deg,#8cc43c,#0b74a8)}.mission-list{display:grid;gap:.7rem}.mission-row{display:grid;grid-template-columns:42px minmax(0,1fr);gap:.7rem;align-items:start;border:1px solid var(--line);border-radius:8px;padding:.75rem;background:#fff}.mission-row.complete{border-color:#96c785;background:#f4fbf2}.mission-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#e7f4fb;color:#0a648f;border:1px solid #c9e2ef}.mission-row.complete .mission-icon{background:#d9f1d1;color:#23551a;border-color:#96c785}.mission-row h3{margin:.05rem 0 .2rem;color:#0a648f}.mission-row p{margin:.1rem 0 .45rem}.mission-progress{height:8px}.xp-stats{margin:1rem 0}.leaderboard-list{display:grid;gap:.5rem}.leaderboard-row{display:grid;grid-template-columns:56px minmax(160px,1fr) repeat(3,minmax(100px,auto));gap:.7rem;align-items:center;border:1px solid var(--line);border-radius:8px;padding:.75rem;background:#f8fbfd}.leaderboard-row a{color:#0b6d9f;font-weight:700;text-decoration:none}.leaderboard-row a:hover{text-decoration:underline}.profile-cover[style]{background-size:cover;background-position:center}.profile-status{background:#f8fbfd;border:1px solid var(--line);border-radius:8px;padding:.6rem .7rem;text-align:left;margin:.55rem 0}.profile-pinned{background:#fff9e8;border:1px solid #ead18a;border-radius:8px;padding:.75rem;margin:.75rem 0;text-align:left}.profile-pinned strong{color:#6d4b00}.profile-pinned p{margin:.4rem 0 0;line-height:1.45}.profile-mini-stats{display:flex;gap:.4rem;flex-wrap:wrap;justify-content:center;margin:.6rem 0}.profile-mini-stats span{display:inline-flex;gap:.3rem;align-items:center;border:1px solid var(--line);background:#f8fbfd;border-radius:999px;padding:.28rem .55rem;color:#405769;font-size:.85rem}.profile-badges .badge{display:inline-flex;align-items:center;gap:.25rem}.activity-mini{display:grid;gap:.2rem;border-bottom:1px solid var(--line);padding:.65rem 0}.activity-mini:last-child{border-bottom:0}.activity-mini a{color:#0b6d9f;font-weight:700;text-decoration:none}.activity-mini span{color:var(--muted);font-size:.88rem}.chat-head-tools{display:flex;gap:.4rem;align-items:center}.chat-head-tools .mini.active{background:#e7f4fb;border-color:#8cc8e6;color:#0a648f}.reply-preview{grid-column:1/-1;background:#fff9e8;border:1px solid #ead18a;border-radius:7px;padding:.45rem .6rem}.reply-target{display:flex;justify-content:space-between;gap:.75rem;align-items:center;color:#6d4b00}.message-reply-preview{border-left:3px solid #8cc8e6;background:#f3f9fd;border-radius:5px;padding:.4rem .55rem;margin-bottom:.45rem;color:#405769;font-size:.88rem}.emoji-picker{grid-column:1/-1;display:flex;gap:.25rem;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:7px;padding:.45rem}.emoji-picker[hidden]{display:none!important}.emoji-picker button{width:2rem;height:2rem;border:1px solid #d6e1ea;background:#f8fbfd;border-radius:5px;cursor:pointer;font-size:1.05rem}.emoji-picker button:hover{background:#e7f4fb}.chat-reactions{display:flex;gap:.25rem;flex-wrap:wrap;margin-top:.45rem}.chat-reactions .reaction-pill{font-size:.78rem;padding:.18rem .45rem}.chat-reactions .reaction-pill span{font-weight:700}.private-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto auto!important}.private-form .bbcode-toolbar,.private-form .reply-preview,.private-form .emoji-picker{grid-column:1/-1}.private-form .js-bbcode-target{min-width:0}.chat-send-form .reply-preview,.chat-send-form .emoji-picker{width:100%!important}.chat-send-form .emoji-toggle{height:38px!important;white-space:nowrap!important}.profile-panel-details .profile-pinned{margin:.6rem 0}.profile-panel-details .profile-status{font-size:.9rem}
@media(max-width:760px){.leaderboard-row{grid-template-columns:42px 1fr}.leaderboard-row span{grid-column:2}.private-form{grid-template-columns:1fr!important}.private-form .btn,.private-form .file-btn,.private-form .emoji-toggle{width:100%;justify-content:center}.chat-send-form .send-controls{height:auto!important;flex-wrap:wrap!important}.chat-send-form #messageText{flex-basis:100%!important}.chat-send-form .emoji-toggle,.chat-send-form .file-btn,.chat-send-form .btn{flex:1 1 auto!important}}

/* Emoji picker visibility fix */
.chat-send-form,.private-form{position:relative}
.send-controls{display:flex;gap:.45rem;align-items:center;flex-wrap:wrap;width:100%}
.send-controls .js-bbcode-target{flex:1 1 260px;min-width:180px}
.emoji-picker:not([hidden]),.emoji-picker.is-open{display:flex!important;visibility:visible!important;opacity:1!important}
.emoji-picker{position:relative;z-index:90;box-shadow:0 8px 24px rgba(26,46,63,.14);font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;line-height:1}
.emoji-picker button,.chat-reactions .reaction-pill{font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;line-height:1.1}
.emoji-toggle[aria-expanded="true"]{background:#e7f4fb;border-color:#8cc8e6;color:#0a648f}

/* Fix: keep chat emoji picker visible above the fixed input bar */
.chat-send-form,
body.chat-fullscreen .chat-send-form,
body.chat-fullscreen .private-box .send-form{overflow:visible!important}
.chat-send-form > .emoji-picker,
.private-form > .emoji-picker{position:absolute!important;left:.65rem!important;right:.65rem!important;bottom:calc(100% - .1rem)!important;width:auto!important;max-height:160px!important;overflow:auto!important;background:var(--panel)!important;border-color:var(--line)!important;box-shadow:0 12px 34px rgba(26,46,63,.25)!important}
.private-form > .emoji-picker{left:.5rem!important;right:.5rem!important;bottom:calc(100% - .15rem)!important}
.emoji-picker button{display:inline-flex!important;align-items:center!important;justify-content:center!important;color:var(--text)!important}

/* Dark theme polish for XP, missions, profile upgrades and chat extras */
html[data-theme="dark"] .xp-compact,
html[data-theme="dark"] .leaderboard-row,
html[data-theme="dark"] .profile-status,
html[data-theme="dark"] .profile-mini-stats span,
html[data-theme="dark"] .emoji-picker,
html[data-theme="dark"] .message-reply-preview{background:#132030!important;border-color:var(--line)!important;color:#dceaff!important}
html[data-theme="dark"] .mission-row{background:#132030!important;border-color:var(--line)!important;color:#dceaff!important}
html[data-theme="dark"] .mission-row.complete{background:#173522!important;border-color:#327143!important;color:#cdf3d4!important}
html[data-theme="dark"] .mission-icon{background:#10283a!important;border-color:#294d65!important;color:#8ed7ff!important}
html[data-theme="dark"] .mission-row.complete .mission-icon{background:#1f462b!important;border-color:#4b8a59!important;color:#cdf3d4!important}
html[data-theme="dark"] .mission-row h3,
html[data-theme="dark"] .xp-compact strong,
html[data-theme="dark"] .leaderboard-row a,
html[data-theme="dark"] .activity-mini a{color:#8ed7ff!important}
html[data-theme="dark"] .xp-compact span,
html[data-theme="dark"] .profile-mini-stats span{color:#dceaff!important}
html[data-theme="dark"] .xp-bar{background:#0f1924!important;border-color:#375066!important}
html[data-theme="dark"] .profile-pinned,
html[data-theme="dark"] .reply-preview{background:#2b2414!important;border-color:#6b5724!important;color:#ffe7a8!important}
html[data-theme="dark"] .profile-pinned strong,
html[data-theme="dark"] .reply-target{color:#ffe08a!important}
html[data-theme="dark"] .emoji-picker button,
html[data-theme="dark"] .chat-reactions .reaction-pill{background:#0f1924!important;border-color:#375066!important;color:#edf6ff!important}
html[data-theme="dark"] .emoji-picker button:hover,
html[data-theme="dark"] .emoji-toggle[aria-expanded="true"],
html[data-theme="dark"] .chat-head-tools .mini.active{background:#172d3f!important;border-color:#4d789c!important;color:#8ed7ff!important}
html[data-theme="dark"] .activity-mini{border-bottom-color:var(--line)!important}


/* Translation-safe navbar: longer labels (for example German) must not clip the last button. */
@media (min-width:761px){
    .topbar,
    body.chat-fullscreen .topbar{
        overflow:visible!important;
    }
    .topbar nav,
    body.chat-fullscreen .topbar nav{
        justify-content:flex-start!important;
        overflow-x:auto!important;
        overflow-y:hidden!important;
        scrollbar-width:thin;
        padding-right:.35rem!important;
        -webkit-overflow-scrolling:touch;
    }
    .topbar nav a,
    .topbar nav .theme-toggle,
    body.chat-fullscreen .topbar nav a,
    body.chat-fullscreen .topbar nav .theme-toggle{
        height:32px!important;
        min-height:32px!important;
        padding:.38rem .55rem!important;
        font-size:.92rem!important;
        flex:0 0 auto!important;
        white-space:nowrap!important;
    }
    .topbar nav a i,
    .topbar nav .theme-toggle i{
        margin-right:.22rem!important;
    }
    .language-switcher{
        flex:0 0 auto!important;
    }
}

/* Navbar without brand: the site name is shown in the footer. Desktop nav uses the full width and never creates a horizontal scrollbar. */
.topbar.no-brand,
body.chat-fullscreen .topbar.no-brand{justify-content:flex-start!important;gap:.45rem!important;overflow:hidden!important}
.topbar.no-brand nav,
body.chat-fullscreen .topbar.no-brand nav{width:100%!important;flex:1 1 auto!important;justify-content:flex-start!important;overflow-x:visible!important;overflow-y:hidden!important;min-width:0!important;scrollbar-width:none!important}
.topbar.no-brand nav::-webkit-scrollbar{display:none!important}
.topbar.no-brand nav a,
body.chat-fullscreen .topbar.no-brand nav a,
.topbar.no-brand nav .theme-toggle,
body.chat-fullscreen .topbar.no-brand nav .theme-toggle{padding:.42rem .62rem!important}
@media(max-width:760px){
    .topbar.no-brand,
    body.chat-fullscreen .topbar.no-brand{justify-content:space-between!important;overflow:visible!important}
    .topbar.no-brand nav,
    body.chat-fullscreen .topbar.no-brand nav{overflow:hidden!important;width:auto!important}
    body.nav-open .topbar.no-brand nav,
    body.nav-open.chat-fullscreen .topbar.no-brand nav{overflow-y:auto!important}
}

/* Centered navbar after removing the brand link. No desktop slider; buttons wrap and stay centered. */
@media (min-width:761px){
    .topbar.no-brand,
    body.chat-fullscreen .topbar.no-brand{
        height:auto!important;
        min-height:58px!important;
        justify-content:center!important;
        align-items:center!important;
        padding:.55rem 1.2rem!important;
        overflow:visible!important;
    }
    .topbar.no-brand nav,
    body.chat-fullscreen .topbar.no-brand nav{
        width:100%!important;
        flex:1 1 100%!important;
        display:flex!important;
        flex-wrap:wrap!important;
        justify-content:center!important;
        align-items:center!important;
        align-content:center!important;
        gap:.35rem!important;
        overflow:visible!important;
        min-width:0!important;
        padding:0!important;
        scrollbar-width:none!important;
    }
    .topbar.no-brand nav::-webkit-scrollbar,
    body.chat-fullscreen .topbar.no-brand nav::-webkit-scrollbar{
        display:none!important;
    }
    .topbar.no-brand nav a,
    .topbar.no-brand nav .theme-toggle,
    body.chat-fullscreen .topbar.no-brand nav a,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle{
        flex:0 1 auto!important;
        justify-content:center!important;
        text-align:center!important;
        white-space:nowrap!important;
        max-width:100%!important;
    }
    .topbar.no-brand .language-switcher,
    body.chat-fullscreen .topbar.no-brand .language-switcher{
        flex:0 0 auto!important;
        margin:0!important;
    }
}

/* Mobile navbar: centered menu button; opened menu uses side-by-side buttons. */
@media (max-width:760px){
    .topbar.no-brand,
    body.chat-fullscreen .topbar.no-brand{
        justify-content:center!important;
        align-items:center!important;
        padding:0 .65rem!important;
        overflow:visible!important;
    }
    .topbar.no-brand .nav-toggle,
    body.chat-fullscreen .topbar.no-brand .nav-toggle{
        margin:0 auto!important;
        min-width:120px!important;
        justify-content:center!important;
    }
    .topbar.no-brand nav,
    body.chat-fullscreen .topbar.no-brand nav{
        display:grid!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:.45rem!important;
        left:0!important;
        right:0!important;
        width:100%!important;
        padding:0 .65rem!important;
        overflow:hidden!important;
    }
    body.nav-open .topbar.no-brand nav,
    body.nav-open.chat-fullscreen .topbar.no-brand nav{
        padding:.65rem!important;
        overflow-y:auto!important;
    }
    .topbar.no-brand nav a,
    .topbar.no-brand nav .theme-toggle,
    body.chat-fullscreen .topbar.no-brand nav a,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle{
        width:100%!important;
        min-width:0!important;
        justify-content:center!important;
        text-align:center!important;
        white-space:nowrap!important;
        overflow:hidden!important;
        text-overflow:ellipsis!important;
    }
    .topbar.no-brand .language-switcher,
    body.chat-fullscreen .topbar.no-brand .language-switcher{
        width:100%!important;
        margin:0!important;
        padding:0!important;
    }
    .topbar.no-brand .language-switcher label,
    .topbar.no-brand .language-switcher select,
    body.chat-fullscreen .topbar.no-brand .language-switcher label,
    body.chat-fullscreen .topbar.no-brand .language-switcher select{
        width:100%!important;
    }
    .topbar.no-brand .language-switcher select,
    body.chat-fullscreen .topbar.no-brand .language-switcher select{
        height:40px!important;
        min-height:40px!important;
        text-align:center!important;
    }
}


.tag-row,.tag-cloud{display:flex;gap:.4rem;flex-wrap:wrap;align-items:center;margin-top:.45rem}.tag-pill{display:inline-flex;gap:.25rem;align-items:center;border:1px solid var(--border);border-radius:999px;padding:.15rem .55rem;font-size:.85rem;text-decoration:none;background:var(--surface-soft)}.tag-pill small{opacity:.75}.hot-badge{background:#fff3cd}.new-badge{background:#e8f7ff}.solution-post{border-color:var(--success,#33a852);box-shadow:0 0 0 2px rgba(51,168,82,.16)}.event-timeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.6rem}.event-timeline a{display:flex;gap:.65rem;align-items:center;padding:.65rem;border:1px solid var(--border);border-radius:var(--radius);text-decoration:none}.event-comments{margin-top:1rem}.chat-search{max-width:220px;padding:.45rem .65rem;border:1px solid var(--border);border-radius:999px;background:var(--input-bg);color:inherit}.profile-frame-gold{box-shadow:0 0 0 4px #d4af37,0 8px 24px rgba(0,0,0,.18)}.profile-frame-silver{box-shadow:0 0 0 4px #c0c0c0,0 8px 24px rgba(0,0,0,.18)}.profile-frame-neon{box-shadow:0 0 0 4px #33ffcc,0 0 22px #33ffcc}.profile-frame-hearts{box-shadow:0 0 0 4px #ff7ab6,0 8px 24px rgba(255,122,182,.28)}.status-color-blue{border-left:4px solid #378bff;padding-left:.6rem}.status-color-green{border-left:4px solid #2ca24f;padding-left:.6rem}.status-color-purple{border-left:4px solid #8b5cf6;padding-left:.6rem}.status-color-orange{border-left:4px solid #f59e0b;padding-left:.6rem}.status-color-pink{border-left:4px solid #ec4899;padding-left:.6rem}

.room-announcement{margin-top:.35rem;padding:.45rem .65rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-soft);font-size:.92rem}.chat-image-button{border:0;background:transparent;padding:0;cursor:zoom-in}.image-preview-modal{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.82);padding:2rem}.image-preview-modal[hidden]{display:none}.image-preview-modal img{max-width:min(100%,1100px);max-height:88vh;border-radius:var(--radius);box-shadow:0 20px 60px rgba(0,0,0,.45)}.image-preview-modal button{position:absolute;top:1rem;right:1rem}

/* Chat polish: compact sound button, mobile room dropdown, and cleaner mobile composer */
.room-mobile-switcher{display:none}
.sound-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:.35rem!important;min-width:0!important;width:auto!important;height:34px!important;line-height:1!important;padding:.36rem .55rem!important;white-space:nowrap!important}
.sound-toggle i{margin-right:0!important;line-height:1!important}
.sound-toggle .sound-label{line-height:1!important}
.chat-head-tools{min-width:0}.chat-head-tools .chat-search{min-width:140px}

@media(max-width:760px){
    :root{--freechat-mobile-room-height:54px!important;--freechat-mobile-input-height:132px!important}
    body.chat-fullscreen .chatroom-grid{grid-template-rows:var(--freechat-mobile-room-height) minmax(0,1fr)!important}
    body.chat-fullscreen .room-rail{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:.55rem!important;height:var(--freechat-mobile-room-height)!important;min-height:var(--freechat-mobile-room-height)!important;max-height:var(--freechat-mobile-room-height)!important;padding:.45rem .55rem!important;overflow:hidden!important}
    body.chat-fullscreen .rail-title{margin:0!important;font-size:.9rem!important;line-height:1.1!important;white-space:nowrap!important}
    body.chat-fullscreen .room-list{display:none!important}
    body.chat-fullscreen .room-mobile-switcher{display:block!important;margin:0!important;min-width:0!important;width:100%!important}
    body.chat-fullscreen .room-mobile-switcher select{width:100%!important;height:36px!important;min-height:36px!important;border-radius:5px!important;padding:.35rem 2rem .35rem .55rem!important;background:#fff!important;color:#1d2b36!important;border:1px solid #bccbd6!important;font-size:.95rem!important;line-height:1.1!important}
    body.chat-fullscreen .chat-main{grid-template-rows:52px minmax(0,1fr) var(--freechat-mobile-input-height)!important}
    body.chat-fullscreen .chat-head{height:52px!important;min-height:52px!important;max-height:52px!important;display:grid!important;grid-template-columns:minmax(92px,auto) minmax(0,1fr)!important;gap:.45rem!important;align-items:center!important;padding:.45rem .55rem!important;overflow:hidden!important}
    body.chat-fullscreen .chat-head>div:first-child{min-width:0!important;overflow:hidden!important}
    body.chat-fullscreen .chat-head h1{font-size:1rem!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
    body.chat-fullscreen .room-announcement{display:none!important}
    body.chat-fullscreen .typing-flash{display:none!important}
    body.chat-fullscreen .chat-head-tools{display:grid!important;grid-template-columns:minmax(0,1fr) 38px!important;gap:.35rem!important;align-items:center!important;min-width:0!important;width:100%!important}
    body.chat-fullscreen .chat-head-tools .chat-search{width:100%!important;min-width:0!important;height:34px!important;padding:.35rem .5rem!important;font-size:.92rem!important}
    body.chat-fullscreen .sound-toggle{width:38px!important;min-width:38px!important;max-width:38px!important;height:34px!important;padding:0!important;border-radius:5px!important}
    body.chat-fullscreen .sound-toggle .sound-label{display:none!important}
    body.chat-fullscreen .sound-toggle i{font-size:.95rem!important;margin:0!important}
    body.chat-fullscreen .chat-send-form{height:var(--freechat-mobile-input-height)!important;min-height:var(--freechat-mobile-input-height)!important;max-height:var(--freechat-mobile-input-height)!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:30px 82px!important;gap:.38rem!important;padding:.45rem .5rem!important;overflow:visible!important}
    body.chat-fullscreen .chat-send-form .bbcode-toolbar{height:30px!important;min-height:30px!important;max-height:30px!important;display:flex!important;flex-wrap:nowrap!important;gap:.25rem!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0 0 .08rem!important;margin:0!important;scrollbar-width:thin!important}
    body.chat-fullscreen .chat-send-form .bbcode-toolbar button{width:32px!important;min-width:32px!important;height:28px!important;min-height:28px!important;padding:.25rem!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
    body.chat-fullscreen .chat-send-form .send-controls{display:grid!important;grid-template-columns:46px minmax(0,1fr) 74px!important;grid-template-rows:40px 36px!important;gap:.36rem!important;height:82px!important;min-height:82px!important;max-height:82px!important;align-items:center!important;overflow:visible!important;width:100%!important}
    body.chat-fullscreen .chat-send-form #messageText{grid-column:1/-1!important;grid-row:1!important;width:100%!important;min-width:0!important;height:40px!important;min-height:40px!important;max-height:40px!important;font-size:16px!important;padding:.5rem .6rem!important}
    body.chat-fullscreen .chat-send-form .emoji-toggle{grid-column:1!important;grid-row:2!important;width:100%!important;height:36px!important;min-height:36px!important;padding:0!important;font-size:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
    body.chat-fullscreen .chat-send-form .emoji-toggle i{font-size:.95rem!important;margin:0!important}
    body.chat-fullscreen .chat-send-form .file-btn{grid-column:2!important;grid-row:2!important;width:100%!important;height:36px!important;min-height:36px!important;padding:.35rem .5rem!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
    body.chat-fullscreen .chat-send-form .btn{grid-column:3!important;grid-row:2!important;width:100%!important;height:36px!important;min-height:36px!important;padding:.35rem .5rem!important;white-space:nowrap!important}
    body.chat-fullscreen .chat-send-form>.emoji-picker{left:.5rem!important;right:.5rem!important;bottom:calc(100% + .2rem)!important;max-height:145px!important}
    body.chat-fullscreen .private-dock{bottom:calc(var(--freechat-mobile-footer-height) + var(--freechat-mobile-input-height) + .45rem)!important}
}

@media(max-width:420px){
    :root{--freechat-mobile-input-height:132px!important}
    body.chat-fullscreen .chat-send-form{height:var(--freechat-mobile-input-height)!important;min-height:var(--freechat-mobile-input-height)!important;max-height:var(--freechat-mobile-input-height)!important;grid-template-rows:30px 82px!important}
    body.chat-fullscreen .chat-main{grid-template-rows:52px minmax(0,1fr) var(--freechat-mobile-input-height)!important}
    body.chat-fullscreen .chat-send-form .send-controls{grid-template-columns:46px minmax(0,1fr) 74px!important;grid-template-rows:40px 36px!important}
    body.chat-fullscreen .chat-send-form .emoji-toggle{grid-column:1!important;grid-row:2!important}
    body.chat-fullscreen .chat-send-form .file-btn{grid-column:2!important;grid-row:2!important}
    body.chat-fullscreen .chat-send-form .btn{grid-column:3!important;grid-row:2!important}
}

html[data-theme="dark"] .room-mobile-switcher select{background:#0f1924!important;color:#edf6ff!important;border-color:#375066!important}
html[data-theme="dark"] .sound-toggle{background:#152437!important;color:#e6f1fb!important;border-color:#375066!important}


/* Mobile chat fullscreen polish: no footer on chat, reliable emoji button, better desktop sound pill. */
@media (min-width:761px){
    .sound-toggle{
        height:38px!important;
        min-height:38px!important;
        padding:.45rem .75rem!important;
        border-radius:6px!important;
        gap:.45rem!important;
    }
    .sound-toggle i{font-size:1rem!important;margin:0!important;line-height:1!important}
    .sound-toggle .sound-label{display:inline!important;line-height:1!important}
}

.emoji-toggle{gap:.35rem!important;align-items:center!important;justify-content:center!important}
.emoji-toggle .emoji-glyph{display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:1.05rem!important;line-height:1!important;margin:0!important;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif!important}
.emoji-toggle .emoji-label{line-height:1!important}

@media(max-width:760px){
    body.chat-fullscreen{--freechat-mobile-footer-height:0px!important}
    body.chat-fullscreen .footer{display:none!important;height:0!important;min-height:0!important;max-height:0!important;padding:0!important;border:0!important;overflow:hidden!important}
    body.chat-fullscreen .chat-page-shell{height:calc(100dvh - var(--freechat-mobile-nav-height))!important}
    @supports not (height:100dvh){body.chat-fullscreen .chat-page-shell{height:calc(100vh - var(--freechat-mobile-nav-height))!important}}
    body.chat-fullscreen .private-dock{bottom:.45rem!important}
    body.chat-fullscreen .mail-toast{bottom:calc(var(--freechat-mobile-input-height,132px) + .55rem)!important}
    body.chat-fullscreen .cookie-consent{bottom:calc(var(--freechat-mobile-input-height,132px) + .55rem)!important}
    body.chat-fullscreen .chat-send-form .emoji-toggle{font-size:0!important;display:inline-flex!important;color:#214055!important;background:#f4f8fb!important;border-color:#b5c4cf!important}
    body.chat-fullscreen .chat-send-form .emoji-toggle .emoji-label{display:none!important}
    body.chat-fullscreen .chat-send-form .emoji-toggle .emoji-glyph{font-size:1.15rem!important;color:inherit!important}
}
html[data-theme="dark"] body.chat-fullscreen .chat-send-form .emoji-toggle{background:#152437!important;color:#e6f1fb!important;border-color:#375066!important}

/* Chat desktop polish: nicer sound button and full-width room messages. */
body.chat-fullscreen #messages > .msg,
body.chat-fullscreen #messages > .bubble{
    width:100%!important;
    max-width:none!important;
}
body.chat-fullscreen #messages > .msg > .bubble,
body.chat-fullscreen #messages > .bubble{
    width:100%!important;
    max-width:none!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    margin:0!important;
}
body.chat-fullscreen #messages > .msg.mine > .bubble{
    border-left:4px solid #0b74a8!important;
}

@media(min-width:761px){
    body.chat-fullscreen .chat-head-tools{
        display:flex!important;
        align-items:center!important;
        justify-content:flex-end!important;
        gap:.6rem!important;
        min-width:340px!important;
    }
    body.chat-fullscreen .chat-head-tools .chat-search{
        width:230px!important;
        max-width:230px!important;
        min-width:180px!important;
        height:36px!important;
        padding:.45rem .75rem!important;
    }
    body.chat-fullscreen .sound-toggle{
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        gap:.5rem!important;
        width:auto!important;
        min-width:112px!important;
        max-width:none!important;
        height:36px!important;
        min-height:36px!important;
        padding:0 .9rem!important;
        border-radius:999px!important;
        font-size:.9rem!important;
        font-weight:600!important;
        line-height:1!important;
        white-space:nowrap!important;
    }
    body.chat-fullscreen .sound-toggle i{
        flex:0 0 auto!important;
        width:1em!important;
        margin:0!important;
        line-height:1!important;
        text-align:center!important;
    }
    body.chat-fullscreen .sound-toggle .sound-label{
        display:inline-block!important;
        white-space:nowrap!important;
        line-height:1!important;
    }
}


/* Footer polish for regular pages. Chat keeps its own compact/fixed footer rules. */
body:not(.chat-fullscreen) .footer{
    height:auto!important;
    min-height:64px!important;
    padding:.85rem 1rem!important;
    background:linear-gradient(180deg,#eef7fc 0%,#dfeaf2 100%)!important;
    border-top:1px solid #b8c8d6!important;
    box-shadow:0 -1px 0 rgba(255,255,255,.85) inset!important;
    color:#4b6171!important;
}
body:not(.chat-fullscreen) .footer-inner{
    max-width:1500px!important;
    width:100%!important;
    margin:0 auto!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:1rem!important;
    flex-wrap:wrap!important;
}
.footer-brand{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:.45rem!important;
    min-width:0!important;
    line-height:1.2!important;
    color:#4b6171!important;
}
.footer-brand-name{
    display:inline-flex!important;
    align-items:center!important;
    gap:.35rem!important;
    font-weight:800!important;
    color:#0a648f!important;
}
.footer-brand-name::before{
    content:"";
    width:.62rem;
    height:.62rem;
    border-radius:999px;
    background:#0b74a8;
    box-shadow:0 0 0 3px rgba(11,116,168,.14);
    flex:0 0 auto;
}
.footer-separator{
    color:#9aabba!important;
}
.footer-copy{
    white-space:nowrap!important;
}
body:not(.chat-fullscreen) .footer-links{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:.45rem!important;
    flex-wrap:wrap!important;
}
body:not(.chat-fullscreen) .footer-links a{
    min-height:32px!important;
    padding:.38rem .78rem!important;
    border-radius:999px!important;
    border:1px solid #bfd0dc!important;
    background:rgba(255,255,255,.72)!important;
    color:#2c5169!important;
    text-decoration:none!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:.35rem!important;
    box-shadow:0 1px 0 rgba(255,255,255,.75) inset!important;
    transition:background .15s ease,border-color .15s ease,transform .15s ease!important;
}
body:not(.chat-fullscreen) .footer-links a:hover,
body:not(.chat-fullscreen) .footer-links a:focus-visible{
    background:#fff!important;
    border-color:#8bb8d0!important;
    transform:translateY(-1px)!important;
}
body:not(.chat-fullscreen) .footer-links i{
    margin-right:0!important;
    color:#0a648f!important;
}
@media(max-width:760px){
    body:not(.chat-fullscreen) .footer{
        min-height:0!important;
        padding:.75rem .65rem calc(.8rem + env(safe-area-inset-bottom,0px))!important;
    }
    body:not(.chat-fullscreen) .footer-inner{
        display:grid!important;
        grid-template-columns:1fr!important;
        gap:.65rem!important;
        justify-items:center!important;
        text-align:center!important;
    }
    body:not(.chat-fullscreen) .footer-brand{
        width:100%!important;
        font-size:.9rem!important;
    }
    body:not(.chat-fullscreen) .footer-links{
        width:100%!important;
        display:grid!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:.45rem!important;
    }
    body:not(.chat-fullscreen) .footer-links a{
        width:100%!important;
        min-height:34px!important;
        padding:.42rem .55rem!important;
        font-size:.84rem!important;
    }
    body:not(.chat-fullscreen) .footer-links a:nth-last-child(1):nth-child(odd){
        grid-column:1/-1!important;
    }
}
@media(max-width:360px){
    body:not(.chat-fullscreen) .footer-links{
        grid-template-columns:1fr!important;
    }
}
html[data-theme="dark"] body:not(.chat-fullscreen) .footer{
    background:linear-gradient(180deg,#101d2b 0%,#0b1118 100%)!important;
    border-top-color:#223548!important;
    color:#93a8ba!important;
}
html[data-theme="dark"] .footer-brand,
html[data-theme="dark"] .footer-copy{color:#93a8ba!important}
html[data-theme="dark"] .footer-brand-name{color:#8ed7ff!important}
html[data-theme="dark"] .footer-brand-name::before{background:#2b9dda;box-shadow:0 0 0 3px rgba(43,157,218,.18)}
html[data-theme="dark"] body:not(.chat-fullscreen) .footer-links a{
    background:#142030!important;
    border-color:#2b4154!important;
    color:#dceaff!important;
}
html[data-theme="dark"] body:not(.chat-fullscreen) .footer-links a:hover,
html[data-theme="dark"] body:not(.chat-fullscreen) .footer-links a:focus-visible{
    background:#1b2c3e!important;
    border-color:#3a6582!important;
}
html[data-theme="dark"] body:not(.chat-fullscreen) .footer-links i{color:#8ed7ff!important}


/* Community additions: titles, birthdays, reports, showcase, featured member */
.level-title{display:inline-flex;align-items:center;gap:.35rem;font-weight:800;color:#0a648f;background:rgba(11,116,168,.09);border:1px solid rgba(11,116,168,.18);border-radius:999px;padding:.25rem .6rem;font-size:.88rem}
.badge-showcase{display:flex;gap:.55rem;flex-wrap:wrap;justify-content:center;margin:.75rem 0}
.showcase-badge{display:inline-flex;align-items:center;gap:.4rem;border-radius:999px;padding:.45rem .8rem;background:linear-gradient(135deg,rgba(255,210,87,.24),rgba(11,116,168,.10));border:1px solid rgba(11,116,168,.18);box-shadow:0 1px 0 rgba(255,255,255,.75) inset;font-size:.9rem}
.showcase-badge i{color:#c68a00}
.badge-picker-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:.55rem;margin:.6rem 0 1rem}
.badge-picker-item{display:flex;align-items:center;gap:.5rem;padding:.65rem .75rem;border:1px solid #d4e0e8;border-radius:14px;background:rgba(255,255,255,.68);cursor:pointer}
.badge-picker-item span{display:inline-flex;align-items:center;gap:.4rem;font-weight:700}
.featured-member-card{margin-bottom:1rem;background:linear-gradient(135deg,rgba(255,210,87,.18),rgba(11,116,168,.08))}
.featured-member-main{display:flex;gap:1rem;align-items:center}
.featured-member-main .avatar{width:76px;height:76px}
.eyebrow{margin:0 0 .2rem;text-transform:uppercase;letter-spacing:.08em;font-size:.78rem;font-weight:900;color:#0a648f}
.online-card{position:relative}.online-card:before{content:"";position:absolute;right:1rem;top:1rem;width:.75rem;height:.75rem;border-radius:999px;background:#24b35a;box-shadow:0 0 0 4px rgba(36,179,90,.15)}
.online-dot-text{color:#168646;font-weight:800}.birthday-date{font-size:1.05rem;font-weight:900;color:#0a648f}.report-note{padding:.7rem .8rem;border-radius:12px;background:rgba(11,116,168,.08);border:1px solid rgba(11,116,168,.15)}
html[data-theme="dark"] .level-title{color:#8ed7ff;background:rgba(142,215,255,.10);border-color:#2b4154}
html[data-theme="dark"] .showcase-badge,html[data-theme="dark"] .badge-picker-item{background:#142030;border-color:#2b4154;color:#dceaff}
html[data-theme="dark"] .featured-member-card{background:linear-gradient(135deg,rgba(255,210,87,.10),rgba(43,157,218,.12))}
html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .birthday-date{color:#8ed7ff}
html[data-theme="dark"] .report-note{background:#142030;border-color:#2b4154}
@media(max-width:560px){.featured-member-main{align-items:flex-start}.featured-member-main .avatar{width:58px;height:58px}.badge-picker-grid{grid-template-columns:1fr}}


/* Dark profile sidebar polish: keep profile facts/achievements aligned with dark theme */
html[data-theme="dark"] .profile-bio-preview,
html[data-theme="dark"] .profile-panel-bio,
html[data-theme="dark"] .profile-facts div,
html[data-theme="dark"] .side-facts div,
html[data-theme="dark"] .profile-badges .badge{background:#132030!important;border-color:var(--line)!important;color:#dceaff!important}
html[data-theme="dark"] .profile-facts dt,
html[data-theme="dark"] .side-facts dt,
html[data-theme="dark"] .profile-badges strong{color:#8ed7ff!important}
html[data-theme="dark"] .profile-facts dd,
html[data-theme="dark"] .side-facts dd,
html[data-theme="dark"] .profile-bio-preview,
html[data-theme="dark"] .profile-panel-bio{color:#dceaff!important}
html[data-theme="dark"] .profile-facts a,
html[data-theme="dark"] .side-facts a{color:#8ed7ff!important}
html[data-theme="dark"] .profile-mood{background:#132030!important;border-color:var(--line)!important;color:#8ed7ff!important}
html[data-theme="dark"] .profile-avatar{border-color:#132030!important}

/* Dark/navbar overflow fix: keep the main menu in one clean row. */
.topbar{
    height:auto!important;
    min-height:58px!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
}
.topbar nav{
    flex:1 1 auto!important;
    min-width:0!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    justify-content:flex-end!important;
    align-items:center!important;
    gap:.25rem!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:thin;
    -webkit-overflow-scrolling:touch;
    padding:.25rem 0!important;
}
.topbar nav a,
.topbar nav .theme-toggle{
    flex:0 0 auto!important;
    min-height:32px!important;
    height:32px!important;
    padding:.38rem .62rem!important;
    white-space:nowrap!important;
    line-height:1!important;
}
.topbar nav a i,
.topbar nav .theme-toggle i{
    flex:0 0 auto!important;
}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] body.chat-fullscreen .topbar{
    height:auto!important;
    min-height:58px!important;
}
html[data-theme="dark"] .topbar nav,
html[data-theme="dark"] body.chat-fullscreen .topbar nav{
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
}
@media(max-width:1100px){
    .topbar{padding:.45rem .7rem!important;gap:.5rem!important}
    .topbar nav a span,
    .topbar nav .theme-toggle span{display:none!important}
    .topbar nav a,
    .topbar nav .theme-toggle{width:34px!important;padding:.38rem!important;justify-content:center!important}
}
@media(max-width:760px){
    .topbar{flex-direction:row!important;align-items:center!important}
    .brand{flex:0 0 auto!important}
    .topbar nav{justify-content:flex-start!important}
}

/* Featured member card polish: make it a compact profile highlight instead of a stretched banner */
.featured-member-card{
    width:min(100%,640px)!important;
    max-width:640px!important;
    margin:1.15rem auto 1.35rem!important;
    padding:0!important;
    overflow:hidden!important;
    border-radius:18px!important;
    position:relative!important;
    background:linear-gradient(135deg,#fff9e8 0%,#eef8ff 58%,#ffffff 100%)!important;
    border:1px solid #cddfea!important;
    box-shadow:0 10px 26px rgba(20,55,80,.10)!important;
}
.featured-member-card:before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:radial-gradient(circle at 20% 0%,rgba(255,210,87,.28),transparent 34%),radial-gradient(circle at 100% 100%,rgba(11,116,168,.14),transparent 36%);
}
.featured-member-main{
    position:relative!important;
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:1rem!important;
    padding:1.15rem 1.25rem .95rem!important;
}
.featured-member-main > div{min-width:0!important}
.featured-member-main .avatar{
    width:86px!important;
    height:86px!important;
    border:4px solid rgba(255,255,255,.95)!important;
    box-shadow:0 8px 18px rgba(19,59,86,.18)!important;
    background:#fff!important;
}
.featured-member-card .eyebrow{
    display:inline-flex!important;
    align-items:center!important;
    gap:.38rem!important;
    width:auto!important;
    max-width:100%!important;
    margin:0 0 .38rem!important;
    padding:.28rem .7rem!important;
    border-radius:999px!important;
    white-space:nowrap!important;
    background:rgba(255,255,255,.82)!important;
    border:1px solid rgba(11,116,168,.16)!important;
    color:#0a648f!important;
    box-shadow:0 1px 0 rgba(255,255,255,.8) inset!important;
}
.featured-member-card h2{
    margin:.1rem 0 .35rem!important;
    font-size:1.35rem!important;
    line-height:1.15!important;
}
.featured-member-card h2 a{
    color:#0a648f!important;
    text-decoration:none!important;
}
.featured-member-card h2 a:hover{text-decoration:underline!important}
.featured-member-card .muted{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:.35rem!important;
    align-items:center!important;
    margin:.2rem 0 .45rem!important;
}
.featured-member-card .level-title{font-size:.82rem!important;padding:.2rem .52rem!important}
.featured-member-card p:not(.eyebrow):not(.muted){
    margin:.45rem 0 0!important;
    line-height:1.45!important;
}
.featured-member-card .badge-showcase{
    position:relative!important;
    justify-content:flex-start!important;
    margin:0 1.25rem 1.1rem 1.25rem!important;
    padding-top:.85rem!important;
    border-top:1px solid rgba(11,116,168,.13)!important;
}
.featured-member-card .showcase-badge{
    background:rgba(255,255,255,.74)!important;
}
html[data-theme="dark"] .featured-member-card{
    background:linear-gradient(135deg,#172334 0%,#101a27 58%,#0d141e 100%)!important;
    border-color:#2b4154!important;
    box-shadow:0 10px 26px rgba(0,0,0,.25)!important;
}
html[data-theme="dark"] .featured-member-card:before{
    background:radial-gradient(circle at 20% 0%,rgba(255,210,87,.11),transparent 36%),radial-gradient(circle at 100% 100%,rgba(43,157,218,.18),transparent 38%)!important;
}
html[data-theme="dark"] .featured-member-card .eyebrow,
html[data-theme="dark"] .featured-member-card .showcase-badge{
    background:rgba(20,32,48,.82)!important;
    border-color:#2b4154!important;
    color:#8ed7ff!important;
}
html[data-theme="dark"] .featured-member-card h2 a{color:#8ed7ff!important}
html[data-theme="dark"] .featured-member-card .badge-showcase{border-top-color:#2b4154!important}
@media(max-width:650px){
    .featured-member-card{width:100%!important;border-radius:14px!important}
    .featured-member-main{
        grid-template-columns:1fr!important;
        justify-items:center!important;
        text-align:center!important;
        gap:.75rem!important;
        padding:1rem!important;
    }
    .featured-member-card .muted{justify-content:center!important}
    .featured-member-card .badge-showcase{justify-content:center!important;margin:0 1rem 1rem!important}
    .featured-member-card .eyebrow{margin-left:auto!important;margin-right:auto!important}
}


/* Final polish: featured member now sits at the bottom and uses the normal page card style. */
.featured-member-card{
    width:100%!important;
    max-width:none!important;
    margin:1.25rem 0 0!important;
    padding:1rem!important;
    overflow:visible!important;
    border-radius:4px!important;
    background:var(--panel)!important;
    border:1px solid var(--line)!important;
    box-shadow:0 1px 3px rgba(0,0,0,.08)!important;
}
.featured-member-card:before{display:none!important;content:none!important}
.featured-member-main{
    display:flex!important;
    grid-template-columns:none!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:1rem!important;
    padding:0!important;
    text-align:left!important;
}
.featured-member-main > div{min-width:0!important}
.featured-member-main .avatar{
    width:72px!important;
    height:72px!important;
    border:1px solid var(--line)!important;
    box-shadow:none!important;
    background:#fff!important;
}
.featured-member-card .eyebrow{
    display:block!important;
    width:auto!important;
    max-width:none!important;
    margin:0 0 .35rem!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#0a648f!important;
    white-space:normal!important;
}
.featured-member-card h2{
    margin:.05rem 0 .35rem!important;
    font-size:1.35rem!important;
    line-height:1.2!important;
}
.featured-member-card h2 a{color:#0b6d9f!important;text-decoration:none!important}
.featured-member-card h2 a:hover{text-decoration:underline!important}
.featured-member-card .muted{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:.35rem!important;
    align-items:center!important;
    justify-content:flex-start!important;
    margin:.2rem 0 .45rem!important;
}
.featured-member-card p:not(.eyebrow):not(.muted){margin:.45rem 0 0!important;line-height:1.45!important}
.featured-member-card .badge-showcase{
    justify-content:flex-start!important;
    margin:.85rem 0 0!important;
    padding-top:.85rem!important;
    border-top:1px solid var(--line)!important;
}
.featured-member-card .showcase-badge{background:linear-gradient(135deg,rgba(255,210,87,.24),rgba(11,116,168,.10))!important}
html[data-theme="dark"] .featured-member-card{
    background:var(--panel)!important;
    border-color:var(--line)!important;
    box-shadow:0 1px 3px rgba(0,0,0,.2)!important;
}
html[data-theme="dark"] .featured-member-card .eyebrow,
html[data-theme="dark"] .featured-member-card h2 a{color:#8ed7ff!important}
html[data-theme="dark"] .featured-member-card .showcase-badge{
    background:#142030!important;
    border-color:#2b4154!important;
    color:#dceaff!important;
}
html[data-theme="dark"] .featured-member-card .badge-showcase{border-top-color:var(--line)!important}
@media(max-width:650px){
    .featured-member-card{border-radius:4px!important;padding:.9rem!important}
    .featured-member-main{
        display:flex!important;
        grid-template-columns:none!important;
        align-items:flex-start!important;
        justify-items:normal!important;
        text-align:left!important;
        gap:.75rem!important;
        padding:0!important;
    }
    .featured-member-main .avatar{width:58px!important;height:58px!important;flex:0 0 auto!important}
    .featured-member-card .muted{justify-content:flex-start!important}
    .featured-member-card .badge-showcase{justify-content:flex-start!important;margin:.75rem 0 0!important}
    .featured-member-card .eyebrow{margin-left:0!important;margin-right:0!important}
}

/* Mobile navbar: keep the names visible. Desktop/tablet compact behaviour is unchanged. */
@media(max-width:760px){
    .topbar nav a > span:not(.mail-nav-count),
    body.chat-fullscreen .topbar nav a > span:not(.mail-nav-count),
    .topbar nav .theme-toggle span,
    body.chat-fullscreen .topbar nav .theme-toggle span{
        display:inline!important;
        visibility:visible!important;
        opacity:1!important;
        font-size:inherit!important;
        line-height:1.1!important;
    }
    .topbar nav a,
    .topbar nav .theme-toggle,
    body.chat-fullscreen .topbar nav a,
    body.chat-fullscreen .topbar nav .theme-toggle,
    .topbar.no-brand nav a,
    .topbar.no-brand nav .theme-toggle,
    body.chat-fullscreen .topbar.no-brand nav a,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle{
        width:100%!important;
        min-width:0!important;
        height:auto!important;
        min-height:40px!important;
        padding:.55rem .65rem!important;
        justify-content:flex-start!important;
        text-align:left!important;
        gap:.35rem!important;
        white-space:normal!important;
        overflow:visible!important;
        text-overflow:clip!important;
        font-size:.94rem!important;
    }
    .topbar nav a i,
    .topbar nav .theme-toggle i,
    body.chat-fullscreen .topbar nav a i,
    body.chat-fullscreen .topbar nav .theme-toggle i{
        margin-right:.25rem!important;
        flex:0 0 auto!important;
    }
    .topbar nav .mail-nav-count,
    body.chat-fullscreen .topbar nav .mail-nav-count{
        display:inline-flex!important;
        margin-left:auto!important;
    }
}
@media(max-width:420px){
    .topbar nav,
    body.chat-fullscreen .topbar nav,
    .topbar.no-brand nav,
    body.chat-fullscreen .topbar.no-brand nav{
        grid-template-columns:1fr!important;
    }
}

/* German / long-label navbar fix: keep every desktop item reachable and stop centered overflow from clipping the first/last buttons. */
@media (min-width:761px){
    .topbar.no-brand,
    body.chat-fullscreen .topbar.no-brand{
        height:auto!important;
        min-height:58px!important;
        justify-content:flex-start!important;
        align-items:center!important;
        overflow:visible!important;
    }
    .topbar.no-brand nav,
    body.chat-fullscreen .topbar.no-brand nav{
        width:100%!important;
        max-width:100%!important;
        flex:1 1 100%!important;
        display:flex!important;
        flex-wrap:wrap!important;
        justify-content:flex-start!important;
        align-items:center!important;
        align-content:center!important;
        gap:.3rem!important;
        overflow:visible!important;
        min-width:0!important;
        padding:.35rem 0!important;
        scrollbar-width:none!important;
    }
    .topbar.no-brand nav::-webkit-scrollbar,
    body.chat-fullscreen .topbar.no-brand nav::-webkit-scrollbar{
        display:none!important;
    }
    .topbar.no-brand nav a,
    .topbar.no-brand nav .theme-toggle,
    body.chat-fullscreen .topbar.no-brand nav a,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle{
        flex:0 0 auto!important;
        min-width:0!important;
        width:auto!important;
        height:32px!important;
        min-height:32px!important;
        padding:.38rem .58rem!important;
        justify-content:center!important;
        text-align:center!important;
        white-space:nowrap!important;
        overflow:visible!important;
        text-overflow:clip!important;
        line-height:1!important;
    }
    .topbar.no-brand nav a i,
    .topbar.no-brand nav .theme-toggle i,
    body.chat-fullscreen .topbar.no-brand nav a i,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle i{
        margin-right:.18rem!important;
        flex:0 0 auto!important;
    }
    .topbar.no-brand .language-switcher,
    body.chat-fullscreen .topbar.no-brand .language-switcher{
        flex:0 0 auto!important;
        width:auto!important;
        margin:0 2px!important;
        padding:0!important;
    }
    .topbar.no-brand .language-switcher select,
    body.chat-fullscreen .topbar.no-brand .language-switcher select{
        min-width:78px!important;
        height:32px!important;
        min-height:32px!important;
        padding-top:3px!important;
        padding-bottom:3px!important;
    }
}
@media (min-width:761px) and (max-width:1500px){
    .topbar.no-brand nav a,
    .topbar.no-brand nav .theme-toggle,
    body.chat-fullscreen .topbar.no-brand nav a,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle{
        font-size:.86rem!important;
        padding:.35rem .46rem!important;
        gap:.2rem!important;
    }
    .topbar.no-brand nav a i,
    .topbar.no-brand nav .theme-toggle i,
    body.chat-fullscreen .topbar.no-brand nav a i,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle i{
        margin-right:.1rem!important;
    }
}
@media (min-width:761px) and (max-width:1200px){
    .topbar.no-brand nav a > span:not(.mail-nav-count),
    body.chat-fullscreen .topbar.no-brand nav a > span:not(.mail-nav-count),
    .topbar.no-brand nav .theme-toggle span,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle span{
        display:none!important;
    }
    .topbar.no-brand nav a,
    .topbar.no-brand nav .theme-toggle,
    body.chat-fullscreen .topbar.no-brand nav a,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle{
        width:34px!important;
        min-width:34px!important;
        padding:.38rem!important;
    }
    .topbar.no-brand nav a i,
    .topbar.no-brand nav .theme-toggle i,
    body.chat-fullscreen .topbar.no-brand nav a i,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle i{
        margin-right:0!important;
    }
}



/* Final compact one-line navbar fix */
@media (min-width:761px){
    .topbar.no-brand,
    body.chat-fullscreen .topbar.no-brand{
        height:58px!important;
        min-height:58px!important;
        max-height:58px!important;
        padding:0 .45rem!important;
        overflow:hidden!important;
        justify-content:flex-start!important;
        align-items:center!important;
    }
    .topbar.no-brand .nav-toggle,
    body.chat-fullscreen .topbar.no-brand .nav-toggle{
        display:none!important;
    }
    .topbar.no-brand nav,
    body.chat-fullscreen .topbar.no-brand nav{
        display:flex!important;
        flex-wrap:nowrap!important;
        justify-content:flex-start!important;
        align-items:center!important;
        align-content:center!important;
        gap:.22rem!important;
        width:100%!important;
        max-width:100%!important;
        min-width:0!important;
        flex:1 1 auto!important;
        overflow:hidden!important;
        padding:0!important;
        scrollbar-width:none!important;
    }
    .topbar.no-brand nav::-webkit-scrollbar,
    body.chat-fullscreen .topbar.no-brand nav::-webkit-scrollbar{display:none!important}
    .topbar.no-brand nav a,
    .topbar.no-brand nav .theme-toggle,
    body.chat-fullscreen .topbar.no-brand nav a,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle{
        flex:0 1 auto!important;
        min-width:34px!important;
        width:auto!important;
        max-width:128px!important;
        height:34px!important;
        min-height:34px!important;
        max-height:34px!important;
        padding:.38rem .48rem!important;
        font-size:.84rem!important;
        line-height:1!important;
        gap:.18rem!important;
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        white-space:nowrap!important;
        overflow:hidden!important;
        text-overflow:ellipsis!important;
        border-radius:4px!important;
    }
    .topbar.no-brand nav a i,
    .topbar.no-brand nav .theme-toggle i,
    body.chat-fullscreen .topbar.no-brand nav a i,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle i{
        flex:0 0 auto!important;
        width:1.15em!important;
        min-width:1.15em!important;
        margin:0!important;
        line-height:1!important;
        text-align:center!important;
    }
    .topbar.no-brand nav a > span:not(.mail-nav-count),
    body.chat-fullscreen .topbar.no-brand nav a > span:not(.mail-nav-count),
    .topbar.no-brand nav .theme-toggle span,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle span{
        display:inline-block!important;
        min-width:0!important;
        max-width:100%!important;
        overflow:hidden!important;
        text-overflow:ellipsis!important;
        white-space:nowrap!important;
        line-height:1.1!important;
    }
    .topbar.no-brand nav .theme-toggle,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle{
        flex:0 0 34px!important;
        width:34px!important;
        max-width:34px!important;
        padding:.38rem!important;
    }
    .topbar.no-brand nav .theme-toggle span,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle span{
        display:none!important;
    }
    .topbar.no-brand .language-switcher,
    body.chat-fullscreen .topbar.no-brand .language-switcher{
        flex:0 0 auto!important;
        width:auto!important;
        min-width:0!important;
        margin:0!important;
        padding:0!important;
        display:inline-flex!important;
        align-items:center!important;
    }
    .topbar.no-brand .language-switcher label,
    body.chat-fullscreen .topbar.no-brand .language-switcher label{display:block!important;margin:0!important;min-width:0!important;width:auto!important}
    .topbar.no-brand .language-switcher select,
    body.chat-fullscreen .topbar.no-brand .language-switcher select{
        width:68px!important;
        min-width:68px!important;
        max-width:68px!important;
        height:34px!important;
        min-height:34px!important;
        padding:3px 20px 3px 6px!important;
        font-size:.8rem!important;
    }
    .topbar.no-brand nav .mail-nav-link,
    body.chat-fullscreen .topbar.no-brand nav .mail-nav-link{position:relative!important}
    .topbar.no-brand nav .mail-nav-count:not(:empty),
    body.chat-fullscreen .topbar.no-brand nav .mail-nav-count:not(:empty){
        position:absolute!important;
        top:-.28rem!important;
        right:-.2rem!important;
        min-width:1.05rem!important;
        height:1.05rem!important;
        padding:0 .2rem!important;
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        font-size:.68rem!important;
        line-height:1!important;
    }
}
@media (min-width:761px) and (max-width:1500px){
    .topbar.no-brand nav a,
    body.chat-fullscreen .topbar.no-brand nav a{
        max-width:108px!important;
        padding:.36rem .38rem!important;
        font-size:.78rem!important;
    }
    .topbar.no-brand .language-switcher select,
    body.chat-fullscreen .topbar.no-brand .language-switcher select{width:58px!important;min-width:58px!important;max-width:58px!important;font-size:.74rem!important}
}
@media (min-width:761px) and (max-width:1120px){
    .topbar.no-brand nav a,
    .topbar.no-brand nav .theme-toggle,
    body.chat-fullscreen .topbar.no-brand nav a,
    body.chat-fullscreen .topbar.no-brand nav .theme-toggle{
        flex:0 0 34px!important;
        width:34px!important;
        max-width:34px!important;
        padding:.38rem!important;
    }
    .topbar.no-brand nav a > span:not(.mail-nav-count),
    body.chat-fullscreen .topbar.no-brand nav a > span:not(.mail-nav-count){display:none!important}
    .topbar.no-brand nav a i,
    body.chat-fullscreen .topbar.no-brand nav a i{margin:0!important}
}


/* Final polish: centered desktop navbar + aligned news action buttons. */
@media (min-width:761px){
    .topbar.no-brand,
    body.chat-fullscreen .topbar.no-brand{
        justify-content:center!important;
    }
    .topbar.no-brand nav,
    body.chat-fullscreen .topbar.no-brand nav{
        justify-content:center!important;
        margin-left:auto!important;
        margin-right:auto!important;
    }
}
.news-like-bar{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:.45rem!important;
}
.news-detail-actions{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:.35rem!important;
    width:100%!important;
}
.news-like-form{
    display:inline-flex!important;
    margin:0!important;
    padding:0!important;
    gap:0!important;
    align-items:center!important;
}
.news-like-toggle{
    height:30px!important;
    min-height:30px!important;
    padding:.28rem .6rem!important;
    line-height:1!important;
    border-radius:4px!important;
    background:#0c76aa!important;
    border-color:#075d87!important;
    color:#fff!important;
    font-weight:700!important;
    box-shadow:none!important;
}
.news-like-toggle:hover{filter:brightness(1.08)!important}
.news-login-hint{flex:1 1 100%;margin:.35rem 0 0!important}
html[data-theme="dark"] .news-like-toggle{
    background:#115d83!important;
    border-color:#2e78a5!important;
    color:#edf6ff!important;
}
html[data-theme="dark"] .news-like-toggle.danger{
    background:var(--danger)!important;
    border-color:#b72831!important;
    color:#fff!important;
}

/* Fix: BBCode [code] block must not inherit the global inline <code> badge style. */
.bbcode-code code{
    display:block;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    padding:0!important;
    color:inherit!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
}
html[data-theme="dark"] .bbcode-code code{
    background:transparent!important;
    border:0!important;
    color:inherit!important;
}
