:root{color-scheme:dark;--bg:#090d12;--panel:#111820;--panel2:#151e28;--line:#24303d;--text:#f4f7fa;--muted:#8d9bad;--blue:#2b7cff;--blue2:#1766e0;--green:#35c97a;--red:#ff5f67;--amber:#f0b84b;--sidebar:250px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Arial,"Tahoma",sans-serif}button,input,select{font:inherit}button{cursor:pointer}.hidden{display:none!important}.muted{color:var(--muted)}
body:before{content:"";position:fixed;inset:0;background:radial-gradient(circle at 80% -15%,rgba(43,124,255,.15),transparent 38%),radial-gradient(circle at 5% 105%,rgba(53,201,122,.08),transparent 35%);pointer-events:none}
.auth-screen{min-height:100dvh;display:grid;place-items:center;padding:24px}.auth-card{position:relative;width:min(420px,100%);padding:34px;border:1px solid var(--line);border-radius:24px;background:rgba(17,24,32,.94);box-shadow:0 30px 80px rgba(0,0,0,.42)}.logo-mark,.logo-small{display:grid;place-items:center;background:linear-gradient(145deg,#3b8cff,#1761d5);font-weight:900;box-shadow:0 8px 22px rgba(43,124,255,.26)}.logo-mark{width:58px;height:58px;border-radius:18px;margin:auto;font-size:28px}.auth-card h1{text-align:center;margin:14px 0 2px;font-size:32px}.auth-card>.muted{text-align:center;margin:0 0 24px}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:#0b1118;padding:4px;border-radius:12px;margin-bottom:20px}.auth-tab{border:0;background:transparent;color:var(--muted);padding:10px;border-radius:9px}.auth-tab.active{background:var(--panel2);color:#fff}.auth-form{display:grid;gap:14px}.auth-form label{font-size:13px;color:#b8c3cf;display:grid;gap:7px}.auth-form input,.toolbar input,.toolbar select,.inline-form input,.search-row input,.setting select{width:100%;border:1px solid var(--line);background:#0b1118;color:#fff;border-radius:11px;padding:12px;outline:none}.auth-form input:focus,.toolbar input:focus,.inline-form input:focus,.search-row input:focus{border-color:var(--blue)}.auth-note{text-align:center;color:#6f7d8d;font-size:11px;margin:16px 0 0}
.primary,.ghost,.danger-btn,.small-btn{border:0;border-radius:11px;padding:11px 15px;font-weight:700;color:#fff}.primary{background:linear-gradient(135deg,var(--blue),var(--blue2))}.primary:hover{filter:brightness(1.08)}.ghost{background:#17212c;border:1px solid var(--line)}.danger-btn{background:rgba(255,95,103,.14);color:#ff8389;border:1px solid rgba(255,95,103,.28)}.small-btn{padding:7px 10px;font-size:12px;background:#1a2632}.full{width:100%}
.app{min-height:100dvh}.sidebar{position:fixed;right:0;top:0;bottom:0;width:var(--sidebar);border-left:1px solid var(--line);background:rgba(12,17,23,.96);padding:20px 14px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:10px;padding:4px 8px 20px}.logo-small{width:38px;height:38px;border-radius:12px}.brand div{display:grid}.brand small{font-size:9px;color:#657487;letter-spacing:1.5px;margin-top:2px}.sidebar nav{display:grid;gap:7px}.nav-btn{position:relative;border:0;background:transparent;color:#9facba;text-align:right;padding:12px 14px;border-radius:11px;font-weight:700}.nav-btn span{display:inline-block;width:28px;color:#6d7f93}.nav-btn:hover,.nav-btn.active{background:#16202b;color:#fff}.nav-btn.active span{color:#65a1ff}.badge{position:absolute;left:12px;top:11px;background:var(--red);color:#fff;min-width:20px;height:20px;border-radius:99px;display:grid;place-items:center;font-size:10px}.sidebar-user{margin-top:auto;border-top:1px solid var(--line);padding:16px 7px 2px;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center}.sidebar-user div:nth-child(2){min-width:0;display:grid}.sidebar-user strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-user small{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#25364a,#182330);border:1px solid #33465b;font-weight:800;overflow:hidden;position:relative}.avatar-image{width:100%;height:100%;object-fit:cover;display:block}.avatar.big{width:84px;height:84px;font-size:30px}.icon-btn{border:0;background:transparent;color:#94a3b5;font-size:20px;padding:6px}.main{margin-right:var(--sidebar);min-height:100dvh;padding:30px clamp(20px,3vw,50px) 60px}.page{display:none;max-width:1250px;margin:auto}.page.active{display:block}.page-head{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:24px}.page-head h2{margin:0;font-size:28px}.page-head p{margin:5px 0 0;color:var(--muted)}.head-actions{display:flex;gap:9px}.stats-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:20px}.stats-strip>div{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:14px 16px;display:grid}.stats-strip span{font-size:22px;font-weight:800}.stats-strip small{color:var(--muted);margin-top:3px}.toolbar{display:grid;grid-template-columns:1fr 190px;gap:10px;margin-bottom:16px}.rooms{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:12px}.room-card{background:linear-gradient(150deg,#121a23,#0f161e);border:1px solid var(--line);border-radius:16px;padding:16px;transition:.15s}.room-card:hover{border-color:#36506c;transform:translateY(-1px)}.room-top{display:flex;justify-content:space-between;align-items:start;gap:10px}.room-code{font-size:18px;font-weight:900;letter-spacing:1px;direction:ltr}.status-chip,.role-chip{display:inline-flex;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:800}.status-wait{background:rgba(53,201,122,.12);color:#67dfa0}.status-play{background:rgba(240,184,75,.12);color:#f2c96e}.room-host{color:#a7b4c3;font-size:13px;margin:9px 0 14px}.room-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:14px}.room-meta div{background:#0a1016;border-radius:9px;padding:8px;text-align:center}.room-meta b{display:block;font-size:12px}.room-meta small{font-size:9px;color:#718196}.room-card .primary{width:100%}.room-card .primary[disabled]{cursor:not-allowed;opacity:.4;filter:none}.empty{grid-column:1/-1;text-align:center;padding:50px 18px;color:#758496;border:1px dashed var(--line);border-radius:14px}.empty.small{padding:22px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px}.panel h3{margin:0 0 15px}.friends-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.span2{grid-column:1/-1}.inline-form,.search-row{display:grid;grid-template-columns:1fr auto;gap:8px}.search-row{margin-top:10px}.people-list{display:grid;gap:7px;margin-top:14px}.people-list.columns{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.person{background:#0c131a;border:1px solid #202d3a;border-radius:11px;padding:10px;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center}.person-info{min-width:0;display:grid}.person-info strong,.person-info small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.person-info small{color:var(--muted)}.presence{width:8px;height:8px;border-radius:50%;background:#596574;box-shadow:0 0 0 3px #18202a}.presence.online{background:var(--green)}.person-actions{display:flex;gap:5px}.profile-page{max-width:820px}.profile-hero{position:relative;overflow:hidden;padding:0;background:linear-gradient(160deg,#101a21,#0d151b)}.profile-cover{height:132px;position:relative;overflow:hidden;background:radial-gradient(circle at 75% 20%,rgba(232,169,72,.18),transparent 36%),linear-gradient(135deg,#16252a,#091316 65%,#121c20)}.profile-cover:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(45deg,rgba(255,255,255,.025) 0 1px,transparent 1px 13px);opacity:.7}.profile-cover-mark{position:absolute;left:28px;top:18px;font-size:86px;font-weight:900;line-height:1;color:rgba(229,171,81,.075);transform:rotate(-8deg)}.profile-body{min-height:170px;padding:25px 28px 28px;display:grid;grid-template-columns:auto 1fr auto;gap:24px;align-items:center}.profile-avatar-wrap{position:relative;margin-top:-72px;align-self:start}.profile-avatar{width:132px;height:132px;font-size:42px;border:3px solid #d29b4a;background:#111b21;box-shadow:0 0 0 5px #101820,0 14px 36px rgba(0,0,0,.35)}.profile-photo-btn{position:absolute;left:3px;bottom:5px;width:36px;height:36px;border-radius:50%;border:2px solid #101820;background:#d29b4a;color:#111;font-size:21px;font-weight:900;display:grid;place-items:center;line-height:1}.profile-photo-btn:hover{filter:brightness(1.08)}.profile-identity{min-width:0}.profile-identity h3{font-size:28px;margin:0 0 5px}.profile-identity>p{margin:0}.profile-identity #profile-user{color:#96a5b3;font-size:14px;direction:ltr;text-align:right}.profile-stars{display:flex;direction:ltr;gap:3px;margin:10px 0 9px;color:#f2bd53;font-size:19px;filter:drop-shadow(0 2px 5px rgba(242,189,83,.14))}.profile-since{color:#91a0ad;font-size:13px}.profile-emblem{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;border:2px solid #d29b4a;background:radial-gradient(circle at 35% 28%,#26373c,#0b1216 70%);color:#e7b35e;font-size:25px;font-weight:900;box-shadow:0 8px 24px rgba(0,0,0,.28)}.profile-photo-note{margin:12px 4px 0;color:#6f7e8b;font-size:12px}.role-chip{background:#1b2b40;color:#74aaff}.notes{max-width:620px;margin-top:12px;color:#aab7c5;line-height:1.8}.notes h3{color:#fff}.table-panel{padding:0;overflow:hidden}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;min-width:700px}th,td{text-align:right;padding:12px 14px;border-bottom:1px solid var(--line);font-size:13px}th{color:#8291a3;background:#0d141c;font-size:11px}td small{color:var(--muted)}.admin-stats{margin-bottom:14px}.mobile-header,.bottom-nav{display:none}
.modal{position:fixed;inset:0;z-index:100;background:rgba(2,5,8,.72);backdrop-filter:blur(8px);display:grid;place-items:center;padding:20px}.modal-card{position:relative;width:min(500px,100%);max-height:calc(100dvh - 40px);overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;background:#121a23;border:1px solid #2a3949;border-radius:20px;padding:24px;box-shadow:0 30px 90px rgba(0,0,0,.55)}.modal-card h2{margin-top:0}.modal-close{position:absolute;left:14px;top:12px;border:0;background:transparent;color:#92a0b1;font-size:27px}.setting{margin:17px 0}.setting>span{display:block;font-size:13px;color:#9eacbb;margin-bottom:8px}.seg{display:grid;grid-template-columns:1fr 1fr;background:#0a1016;border-radius:11px;padding:4px}.seg button{border:0;background:transparent;color:#8292a4;padding:10px;border-radius:8px}.seg button.selected{background:#1b2e44;color:#fff}.toast{position:fixed;z-index:200;left:20px;bottom:20px;max-width:min(420px,calc(100vw - 40px));background:#16212c;border:1px solid #304054;border-radius:12px;padding:12px 16px;box-shadow:0 12px 45px rgba(0,0,0,.4);opacity:0;transform:translateY(15px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translateY(0)}.toast.error{border-color:#6e3137;color:#ff9da2}
@media(max-width:820px){:root{--sidebar:0px}.sidebar{display:none}.main{margin:0;padding:74px 14px 86px}.mobile-header{position:fixed;z-index:30;top:0;left:0;right:0;height:60px;display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:rgba(9,13,18,.94);border-bottom:1px solid var(--line);backdrop-filter:blur(12px)}.mobile-header .brand{padding:0}.bottom-nav{position:fixed;z-index:30;bottom:0;left:0;right:0;height:70px;padding-bottom:env(safe-area-inset-bottom);background:rgba(10,15,21,.96);border-top:1px solid var(--line);display:flex;justify-content:space-around;backdrop-filter:blur(12px)}.bottom-btn{flex:1;border:0;background:transparent;color:#718196;display:grid;place-items:center;padding:8px 4px 6px;font-size:18px}.bottom-btn small{font-size:10px}.bottom-btn.active{color:#6ba5ff}.page-head{align-items:flex-start}.page-head h2{font-size:24px}.stats-strip{grid-template-columns:1fr 1fr}.toolbar{grid-template-columns:1fr}.rooms{grid-template-columns:1fr}.friends-grid{grid-template-columns:1fr}.span2{grid-column:auto}.people-list.columns{grid-template-columns:1fr}.profile-body{grid-template-columns:1fr;text-align:center;padding:22px 18px 26px;gap:12px}.profile-avatar-wrap{margin:-78px auto 0}.profile-identity #profile-user{text-align:center}.profile-stars{justify-content:center}.profile-emblem{position:absolute;left:18px;top:150px;width:48px;height:48px;font-size:21px}.profile-photo-note{text-align:center}.toast{left:12px;right:12px;bottom:82px;max-width:none}.modal{align-items:end;padding:0}.modal-card{width:100%;max-height:calc(92dvh - env(safe-area-inset-top,0px));overflow-y:auto;-webkit-overflow-scrolling:touch;border-radius:22px 22px 0 0;padding-bottom:calc(24px + env(safe-area-inset-bottom))}}
@media(max-width:480px){.head-actions{display:grid;width:130px}.page-head p{font-size:12px}.stats-strip>div{padding:12px}.auth-card{padding:26px 18px}.room-card{padding:14px}}

/* Profile UI v2 — reference-inspired responsive profile/editor */
.profile-page{max-width:1180px}
.profile-workspace{display:grid;grid-template-columns:minmax(330px,430px) minmax(420px,1fr);gap:20px;align-items:start}
.profile-showcase,.profile-editor{padding:0;overflow:hidden;border-color:#253941;background:linear-gradient(180deg,#071315,#071012);box-shadow:0 20px 55px rgba(0,0,0,.24)}
.profile-showcase{position:relative;min-height:560px}
.profile-card-bar,.profile-editor-bar{height:50px;padding:0 16px;display:grid;grid-template-columns:38px 1fr 38px;align-items:center;border-bottom:1px solid rgba(212,162,73,.15);background:#071012;color:#f5f2e8}
.profile-card-bar strong,.profile-editor-bar strong{text-align:center;font-size:15px;font-weight:700}
.profile-card-icon,.profile-card-arrow{font-size:20px;color:#c7d0cb;text-align:center}.profile-card-arrow{font-size:30px;line-height:1;transform:translateY(-1px)}
.profile-cover{height:156px;position:relative;overflow:hidden;background:radial-gradient(circle at 18% 34%,rgba(141,30,25,.58),transparent 31%),radial-gradient(circle at 82% 24%,rgba(184,120,47,.15),transparent 28%),linear-gradient(135deg,#151c1d,#071315 58%,#11191a)}
.profile-cover:before{content:"";position:absolute;inset:-30px;background:linear-gradient(118deg,transparent 0 22%,rgba(198,49,36,.22) 22% 35%,transparent 35% 64%,rgba(220,166,76,.08) 64% 72%,transparent 72%),repeating-linear-gradient(42deg,rgba(255,255,255,.018) 0 1px,transparent 1px 16px);transform:skewX(-8deg)}
.profile-cover:after{content:"";position:absolute;left:-35px;right:-35px;bottom:-48px;height:100px;background:radial-gradient(ellipse at center,rgba(0,0,0,.64),transparent 68%)}
.profile-cover-emblem{position:absolute;right:24px;top:20px;font-size:98px;font-weight:900;line-height:1;color:rgba(167,39,31,.25);transform:rotate(-8deg);text-shadow:0 0 28px rgba(176,41,32,.12)}
.profile-cover-glow{position:absolute;width:140px;height:140px;border-radius:50%;left:20px;top:6px;border:1px solid rgba(218,167,78,.12);box-shadow:0 0 60px rgba(205,154,67,.07) inset}
.profile-showcase-body{position:relative;display:flex;flex-direction:column;align-items:center;padding:0 22px 28px;margin-top:-70px;z-index:2}
.profile-avatar-wrap{position:relative;margin:0;align-self:auto}
.profile-avatar{width:142px;height:142px;border-radius:50%;font-size:48px;border:3px solid #d3a44f;background:linear-gradient(155deg,#17262a,#091213);box-shadow:0 0 0 5px #071214,0 12px 32px rgba(0,0,0,.45),0 0 22px rgba(211,164,79,.11);overflow:hidden}
.profile-avatar:after,.profile-editor-avatar:after{content:"";position:absolute;inset:6px;border-radius:50%;border:1px solid rgba(255,255,255,.09);pointer-events:none}
.profile-photo-btn,.profile-editor-camera{position:absolute;left:3px;bottom:6px;width:38px;height:38px;border-radius:50%;border:2px solid #081214;background:linear-gradient(145deg,#dca84e,#a96d22);color:#171007;font-size:23px;font-weight:900;display:grid;place-items:center;line-height:1;box-shadow:0 7px 18px rgba(0,0,0,.35)}
.profile-photo-btn:hover,.profile-editor-camera:hover{filter:brightness(1.08);transform:translateY(-1px)}
.profile-name-row{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:12px}.profile-name-row h3{font-size:24px;margin:0;color:#f7f4e9;font-weight:800;letter-spacing:.1px}.profile-online-dot{width:9px;height:9px;border-radius:50%;background:#55b26d;box-shadow:0 0 8px rgba(85,178,109,.45)}
.profile-since{margin:6px 0 0;color:#a8b1ac;font-size:13px}
.profile-rank-row{display:flex;align-items:center;gap:12px;margin-top:8px;min-height:34px}
.profile-stars{display:flex;direction:ltr;gap:2px;margin:0;color:#f3bd42;font-size:19px;filter:drop-shadow(0 1px 4px rgba(243,189,66,.18))}
.profile-emblem{width:31px;height:31px;border-radius:50%;display:grid;place-items:center;border:1.5px solid #d3a44f;background:radial-gradient(circle at 35% 25%,#243638,#091213 70%);color:#e8ba62;font-size:14px;font-weight:900;box-shadow:none}
.profile-edit-button{margin-top:11px;min-width:128px;height:34px;border-radius:9px;border:1px solid #b77f31;background:linear-gradient(180deg,rgba(174,116,41,.18),rgba(121,76,24,.08));color:#f0c16b;font-size:12px;font-weight:800;padding:0 18px}.profile-edit-button:hover{background:rgba(183,127,49,.18)}
.profile-showcase-body:after{content:"";display:block;width:100%;height:1px;margin-top:22px;background:linear-gradient(90deg,transparent,rgba(200,157,78,.16),transparent)}
.profile-editor{min-height:560px}.profile-editor-bar{display:grid}.profile-editor-close{visibility:hidden;border:0;background:transparent;color:#e9eee9;font-size:29px;padding:0}.profile-editor-content{max-width:620px;margin:0 auto;padding:28px 34px 32px;display:flex;flex-direction:column;align-items:center}
.profile-editor-avatar-wrap{position:relative}.profile-editor-avatar{width:132px;height:132px;border-radius:50%;font-size:43px;border:3px solid #d3a44f;background:linear-gradient(155deg,#17262a,#091213);box-shadow:0 0 0 5px #081416,0 14px 34px rgba(0,0,0,.37);overflow:hidden}.profile-editor-camera{width:36px;height:36px;font-size:21px}
.profile-upload-button{margin-top:18px;min-width:210px;border-color:#7c663e;color:#dfbd77;background:#0b1719}.profile-upload-note{margin:8px 0 0;color:#73827f;font-size:11px;text-align:center}
.profile-field-group{width:100%;display:block;margin-top:23px;position:relative}.profile-field-label{display:block;margin-bottom:8px;color:#d6d7ce;font-size:13px;font-weight:700}.profile-field-group input{width:100%;height:48px;border-radius:9px;border:1px solid #243b3e;background:#0b1719;color:#f5f7f2;padding:0 13px;outline:none}.profile-field-group input:focus{border-color:#b8873d;box-shadow:0 0 0 3px rgba(184,135,61,.08)}.profile-field-group small{position:absolute;left:10px;bottom:8px;color:#63716f;font-size:10px}
.profile-avatar-presets{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.profile-preset{position:relative;aspect-ratio:1;border-radius:11px;border:1px solid #31494a;background:#0a1517;overflow:hidden;padding:0;box-shadow:inset 0 0 0 2px rgba(0,0,0,.18)}.profile-preset:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 34%,var(--preset-face,#d8b184) 0 17%,transparent 18%),radial-gradient(ellipse at 50% 95%,var(--preset-cloth,#722e2d) 0 42%,transparent 43%),linear-gradient(145deg,var(--preset-bg1,#1d3a3f),var(--preset-bg2,#0d1719))}.profile-preset:after{content:"";position:absolute;left:20%;right:20%;top:49%;height:7%;border-radius:99px;background:var(--preset-accent,#d9aa50);opacity:.9}.profile-preset span{position:absolute;inset:6px;border:1px solid rgba(218,172,84,.45);border-radius:8px;z-index:2}.profile-preset:hover,.profile-preset:focus{border-color:#d1a052;transform:translateY(-2px)}.profile-preset.preset-1{--preset-face:#d9b27f;--preset-cloth:#7d2928;--preset-bg1:#3b2020;--preset-bg2:#10191b;--preset-accent:#e4b34f}.profile-preset.preset-2{--preset-face:#e0c095;--preset-cloth:#e7e3d8;--preset-bg1:#193a41;--preset-bg2:#0c1618;--preset-accent:#1f2326}.profile-preset.preset-3{--preset-face:#cfa16c;--preset-cloth:#b69355;--preset-bg1:#443522;--preset-bg2:#10181a;--preset-accent:#17191b}.profile-preset.preset-4{--preset-face:#b98661;--preset-cloth:#303536;--preset-bg1:#2c3334;--preset-bg2:#0b1416;--preset-accent:#16191a}.profile-preset.preset-5{--preset-face:#d6a96f;--preset-cloth:#8b302a;--preset-bg1:#472421;--preset-bg2:#10191a;--preset-accent:#d9a54a}
.profile-editor-actions{width:100%;display:grid;grid-template-columns:1fr auto;gap:10px;margin-top:24px}.profile-save-button{height:46px;border-radius:9px;border:1px solid #c38a37;background:linear-gradient(180deg,#9d6424,#744315);color:#fff2d7;font-weight:800}.profile-save-button:hover{filter:brightness(1.08)}.profile-remove-photo{min-width:118px;color:#a7b2ae;border-color:#314142;background:#0b1517}
.profile-photo-note{display:none}

@media(max-width:980px) and (min-width:821px){.profile-workspace{grid-template-columns:minmax(300px,380px) 1fr}.profile-editor-content{padding-left:24px;padding-right:24px}.profile-avatar-presets{gap:7px}}
@media(max-width:820px){
  .profile-page{max-width:none}.profile-page-heading{display:none}.profile-workspace{display:block}.profile-showcase{width:min(100%,430px);min-height:calc(100dvh - 156px);margin:0 auto;border-radius:14px}.profile-card-bar{height:46px}.profile-cover{height:145px}.profile-showcase-body{margin-top:-66px;padding-bottom:24px}.profile-avatar{width:132px;height:132px}.profile-name-row h3{font-size:22px}.profile-rank-row{margin-top:7px}.profile-edit-button{margin-top:10px}
  .profile-editor{display:none}.profile-editor.mobile-open{display:block;position:fixed;z-index:55;top:60px;right:0;bottom:70px;left:0;border:0;border-radius:0;overflow:auto;background:#071214}.profile-editor.mobile-open .profile-editor-bar{position:sticky;top:0;z-index:3}.profile-editor-close{visibility:visible}.profile-editor-content{max-width:480px;padding:22px 18px 32px}.profile-editor-avatar{width:124px;height:124px}.profile-avatar-presets{gap:8px}.profile-editor-actions{grid-template-columns:1fr}.profile-remove-photo{min-height:42px}
}
@media(max-width:480px){.profile-showcase{border-radius:12px}.profile-cover{height:136px}.profile-cover-emblem{font-size:84px}.profile-showcase-body{margin-top:-62px;padding-left:15px;padding-right:15px}.profile-avatar{width:124px;height:124px}.profile-photo-btn{width:35px;height:35px}.profile-avatar-presets{gap:6px}.profile-preset span{inset:4px}.profile-editor-content{padding-left:14px;padding-right:14px}}
.profile-avatar #profile-avatar-fallback,.profile-editor-avatar #profile-editor-avatar-fallback{position:absolute;inset:0;font-size:0;background:radial-gradient(circle at 50% 35%,#d9b27f 0 18%,transparent 18.5%),radial-gradient(ellipse at 50% 104%,#852e2a 0 46%,transparent 46.5%),linear-gradient(145deg,#39201f,#0b1719 67%)}
.profile-avatar #profile-avatar-fallback:before,.profile-editor-avatar #profile-editor-avatar-fallback:before{content:"";position:absolute;left:25%;right:25%;top:47%;height:8%;border-radius:99px;background:#d9aa50;box-shadow:0 -34px 0 -8px #0e1516}
.profile-avatar #profile-avatar-fallback:after,.profile-editor-avatar #profile-editor-avatar-fallback:after{content:"";position:absolute;inset:9%;border-radius:50%;border:1px solid rgba(255,255,255,.07)}
@media(max-width:820px){.profile-rank-row .profile-emblem{position:static;left:auto;top:auto}}
.profile-photo-btn:before,.profile-editor-camera:before{content:"";width:16px;height:12px;border:2px solid #1b1308;border-radius:3px;box-sizing:border-box}
.profile-photo-btn:after,.profile-editor-camera:after{content:"";position:absolute;width:5px;height:5px;border:2px solid #1b1308;border-radius:50%;box-sizing:border-box}

/* Profile UI v3 — polished identity card + real account stats */
.profile-page{max-width:1180px}
.profile-workspace{grid-template-columns:minmax(350px,440px) minmax(440px,1fr);gap:22px}
.profile-showcase{min-height:610px;border-color:#294044;background:linear-gradient(180deg,#071315,#071012)}
.profile-card-bar,.profile-editor-bar{border-bottom-color:rgba(222,177,90,.17)}
.profile-bar-icon{width:20px;height:20px;display:block;justify-self:center;opacity:.9}.profile-bar-chevron{transform:scaleX(-1)}
.profile-cover{height:170px;background:radial-gradient(circle at 14% 24%,rgba(148,36,30,.66),transparent 29%),radial-gradient(circle at 82% 18%,rgba(218,165,76,.13),transparent 27%),linear-gradient(135deg,#182022,#071416 60%,#101719)}
.profile-cover:before{background:linear-gradient(118deg,transparent 0 18%,rgba(171,43,34,.23) 18% 34%,transparent 34% 63%,rgba(218,165,76,.075) 63% 74%,transparent 74%),repeating-linear-gradient(42deg,rgba(255,255,255,.018) 0 1px,transparent 1px 16px)}
.profile-showcase-body{margin-top:-76px;padding:0 22px 28px}
.profile-avatar{width:148px;height:148px;border-width:3px;box-shadow:0 0 0 6px #071214,0 14px 38px rgba(0,0,0,.48),0 0 24px rgba(211,164,79,.12)}
.profile-photo-btn,.profile-editor-camera{padding:0}.profile-photo-btn img,.profile-editor-camera img{width:20px;height:20px;display:block}.profile-photo-btn:before,.profile-photo-btn:after,.profile-editor-camera:before,.profile-editor-camera:after{content:none!important}
.profile-name-row{display:flex;direction:rtl;align-items:center;justify-content:center;gap:8px;margin-top:13px;min-height:34px}.profile-name-row h3{font-size:25px;line-height:1.2;margin:0;color:#f8f4e8;font-weight:800;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-sticker{width:31px;height:31px;flex:0 0 31px;display:block;filter:drop-shadow(0 2px 5px rgba(38,162,105,.18))}
.profile-stars{display:flex;justify-content:center;gap:2px;margin:6px 0 0;filter:none}.profile-stars img{width:20px;height:20px;display:block;filter:drop-shadow(0 2px 4px rgba(229,169,53,.16))}
.profile-stats{direction:rtl;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:17px}.profile-stat{min-height:78px;border:1px solid #1f383b;border-radius:12px;background:linear-gradient(180deg,rgba(11,30,32,.96),rgba(7,22,24,.96));display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:8px;padding:10px 11px;text-align:right;box-shadow:inset 0 1px 0 rgba(255,255,255,.015)}.profile-stat>img{width:28px;height:28px;display:block}.profile-stat div{min-width:0;display:grid;gap:3px}.profile-stat small{font-size:10px;color:#7f918f;white-space:nowrap}.profile-stat strong{font-size:17px;color:#f4f0e4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:800;font-variant-numeric:tabular-nums}
.profile-edit-button{margin-top:15px;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:148px;height:36px}.profile-edit-button img{width:17px;height:17px;display:block}.profile-edit-button span{line-height:1}
.profile-showcase-body:after{margin-top:20px}
.profile-editor-close{display:grid;place-items:center}.profile-editor-close img{width:22px;height:22px;display:block;transform:scaleX(-1)}
.profile-editor-camera img{width:19px;height:19px}

@media(max-width:980px) and (min-width:821px){.profile-workspace{grid-template-columns:minmax(330px,400px) 1fr}.profile-stat{grid-template-columns:28px 1fr;padding:9px}.profile-stat>img{width:24px;height:24px}.profile-stat strong{font-size:15px}}
@media(max-width:820px){
  .profile-showcase{width:min(100%,430px);min-height:calc(100dvh - 156px)}
  .profile-cover{height:154px}.profile-showcase-body{margin-top:-70px;padding-left:16px;padding-right:16px;padding-bottom:24px}.profile-avatar{width:136px;height:136px}.profile-name-row h3{font-size:23px;max-width:250px}.profile-sticker{width:29px;height:29px;flex-basis:29px}.profile-stars img{width:19px;height:19px}.profile-stats{margin-top:15px;gap:7px}.profile-stat{min-height:74px;grid-template-columns:28px minmax(0,1fr);gap:6px;padding:9px 8px}.profile-stat>img{width:24px;height:24px}.profile-stat small{font-size:9px}.profile-stat strong{font-size:15px}.profile-edit-button{margin-top:14px}
}
@media(max-width:390px){.profile-stats{gap:5px}.profile-stat{grid-template-columns:1fr;justify-items:center;text-align:center;gap:4px;padding:8px 4px}.profile-stat>img{width:23px;height:23px}.profile-stat div{justify-items:center}.profile-stat small{font-size:8.5px}.profile-stat strong{font-size:14px}.profile-name-row h3{max-width:220px}}

/* Profile UI v4 — compact profile, click-to-edit modal, unified sprite sheet */
.profile-page{max-width:1120px}
.profile-workspace{display:block!important;max-width:500px;margin:0 auto}
.profile-showcase{width:100%;min-height:610px!important;border-color:#294044;background:linear-gradient(180deg,#071315,#071012);box-shadow:0 24px 70px rgba(0,0,0,.32)}
.profile-card-bar{height:50px;padding:0 14px;grid-template-columns:42px 1fr 42px;background:#061012;border-bottom:1px solid rgba(222,177,90,.16)}
.profile-card-bar strong{font-size:15px;letter-spacing:.05px}
.profile-card-action{width:36px;height:36px;border:0;border-radius:10px;background:transparent;display:grid;place-items:center;padding:0;color:#e8bd66;justify-self:start}
.profile-card-action:hover,.profile-card-action:focus-visible{background:rgba(210,158,70,.10);outline:1px solid rgba(210,158,70,.22)}
.profile-card-back{width:32px;height:32px;display:grid;place-items:center;justify-self:end;color:#9aa9aa;font-size:30px;line-height:1;transform:translateY(-1px)}
.profile-cover{height:174px}
.profile-showcase-body{margin-top:-78px;padding:0 24px 30px}
.profile-avatar{width:150px;height:150px}
.profile-photo-btn{width:38px;height:38px;left:4px;bottom:5px}
.profile-name-row{margin-top:14px;gap:7px;min-height:33px}
.profile-name-row h3{font-size:25px;max-width:300px}

.profile-sprite{display:inline-block;flex:0 0 auto;width:22px;height:22px;background-image:url('/platform/assets/profile/profile-sheet.svg');background-repeat:no-repeat;background-size:700% 100%;background-position-y:0;vertical-align:middle}
.profile-sprite-star{background-position-x:0%}
.profile-sprite-trophy{background-position-x:16.6667%}
.profile-sprite-calendar{background-position-x:33.3333%}
.profile-sprite-reputation{background-position-x:50%}
.profile-sprite-emblem{background-position-x:66.6667%}
.profile-sprite-edit{background-position-x:83.3333%}
.profile-sprite-camera{background-position-x:100%}
.profile-card-action .profile-sprite{width:21px;height:21px}
.profile-photo-btn .profile-sprite,.profile-editor-camera .profile-sprite{width:19px;height:19px}
.profile-sticker{width:30px!important;height:30px!important;filter:drop-shadow(0 3px 7px rgba(35,165,103,.18))}
.profile-stars{display:flex;justify-content:center;align-items:center;gap:1px;margin:6px 0 0;filter:none}
.profile-stars .profile-sprite{width:20px;height:20px;filter:drop-shadow(0 2px 4px rgba(229,169,53,.13))}

/* Keep account facts compact; icons sit beside their actual values. */
.profile-stats{direction:rtl;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin-top:18px;padding:12px 0;border-top:1px solid rgba(54,86,87,.55);border-bottom:1px solid rgba(54,86,87,.45);background:linear-gradient(90deg,transparent,rgba(12,31,33,.42),transparent)}
.profile-stat{min-height:55px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:5px!important;padding:3px 10px!important;text-align:center!important;position:relative}
.profile-stat:not(:last-child):after{content:"";position:absolute;left:0;top:8px;bottom:8px;width:1px;background:rgba(66,98,100,.45)}
.profile-stat small{font-size:10px!important;color:#809391!important;white-space:nowrap}
.profile-stat-value{display:flex!important;align-items:center;justify-content:center;gap:6px!important;min-width:0}
.profile-stat-value .profile-sprite{width:25px;height:25px}
.profile-stat strong{font-size:17px!important;line-height:1;color:#f6f2e6!important;font-weight:850!important;font-variant-numeric:tabular-nums;white-space:nowrap}
.profile-stat-wins .profile-stat-value .profile-sprite{width:27px;height:27px}
.profile-stat-reputation .profile-stat-value .profile-sprite{width:25px;height:25px}
.profile-stat-since .profile-stat-value .profile-sprite{width:24px;height:24px}
.profile-showcase-body:after{margin-top:22px}

/* Editor is never part of the desktop layout. It appears only after the pen button is clicked. */
.profile-editor-backdrop{display:none;position:fixed;inset:0;z-index:74;background:rgba(0,7,9,.69);backdrop-filter:blur(7px)}
.profile-editor-backdrop.open{display:block}
.profile-editor{display:none!important;position:fixed!important;z-index:75;top:50%;right:50%;transform:translate(50%,-50%);width:min(520px,calc(100vw - 36px));max-height:min(760px,calc(100dvh - 36px));min-height:0!important;border:1px solid #294044!important;border-radius:18px!important;overflow:auto!important;background:#071214!important;box-shadow:0 34px 100px rgba(0,0,0,.62)!important}
.profile-editor.open{display:block!important}
.profile-editor-bar{position:sticky;top:0;z-index:4;height:50px;background:rgba(6,16,18,.97);backdrop-filter:blur(12px);grid-template-columns:40px 1fr 40px}
.profile-editor-close{visibility:visible!important;width:36px;height:36px;border-radius:10px!important;font-size:25px!important;color:#9fb0ae!important;justify-self:start}
.profile-editor-close:hover{background:rgba(255,255,255,.05);color:#fff!important}
.profile-editor-bar-mark{display:grid;place-items:center;justify-self:end}.profile-editor-bar-mark .profile-sprite{width:20px;height:20px}
.profile-editor-content{max-width:480px;padding:26px 28px 32px}
.profile-editor-avatar{width:132px;height:132px}
body.profile-editor-open{overflow:hidden}

@media(max-width:820px){
  .profile-page{max-width:none}.profile-page-heading{display:none}.profile-workspace{max-width:430px}
  .profile-showcase{width:100%;min-height:calc(100dvh - 156px)!important;margin:0 auto;border-radius:14px}
  .profile-card-bar{height:46px}.profile-cover{height:154px}.profile-showcase-body{margin-top:-70px;padding:0 16px 24px}.profile-avatar{width:136px;height:136px}
  .profile-name-row h3{font-size:23px;max-width:250px}.profile-sticker{width:28px!important;height:28px!important}.profile-stars .profile-sprite{width:19px;height:19px}
  .profile-stats{margin-top:15px;padding:10px 0}.profile-stat{min-height:52px!important;padding:2px 5px!important}.profile-stat small{font-size:9px!important}.profile-stat strong{font-size:15px!important}.profile-stat-value{gap:4px!important}.profile-stat-value .profile-sprite{width:22px;height:22px}.profile-stat-wins .profile-stat-value .profile-sprite{width:24px;height:24px}
  .profile-editor{top:60px!important;right:0!important;bottom:70px!important;left:0!important;transform:none!important;width:auto!important;max-height:none!important;border:0!important;border-radius:0!important}
  .profile-editor-content{max-width:480px;padding:22px 18px 34px}.profile-editor-actions{grid-template-columns:1fr}.profile-remove-photo{min-height:42px}
  .profile-editor-backdrop.open{display:none}
}
@media(max-width:390px){
  .profile-stats{padding:9px 0}.profile-stat{padding:2px 3px!important}.profile-stat small{font-size:8.5px!important}.profile-stat strong{font-size:14px!important}.profile-stat-value .profile-sprite{width:20px;height:20px}.profile-stat-wins .profile-stat-value .profile-sprite{width:22px;height:22px}
}

/* Admin reports inbox */
.admin-reports-panel{margin-bottom:14px}.admin-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.admin-section-head h3{margin:0 0 4px}.admin-section-head p{margin:0;color:var(--muted);font-size:12px}.admin-reports-list{display:grid;gap:8px;max-height:360px;overflow:auto}.admin-report{border:1px solid #22313e;border-radius:12px;background:#0b1219;padding:11px 13px}.admin-report-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.admin-report-head span,.admin-report-meta{color:var(--muted);font-size:11px}.admin-report p{margin:8px 0 0;line-height:1.65;color:#d7dee6;font-size:13px}

/* Community hub V12 — original SamiDev desktop composition */
.platform-topbar{position:fixed;z-index:35;top:0;left:0;right:0;height:72px;display:grid;grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr);align-items:center;gap:18px;padding:10px clamp(18px,3vw,42px);background:rgba(7,12,16,.94);border-bottom:1px solid #20313b;backdrop-filter:blur(16px);box-shadow:0 16px 42px rgba(0,0,0,.18)}
.platform-topbar .brand{padding:0;justify-self:start;direction:rtl}.platform-topbar .brand div{direction:rtl}.topbar-brand small{color:#627786}.topbar-nav{display:flex;align-items:center;justify-content:center;gap:5px}.topbar-nav .nav-btn{text-align:center;padding:10px 13px;white-space:nowrap}.topbar-nav .nav-btn span{width:auto;margin-left:7px}.topbar-user{justify-self:end;display:grid;grid-template-columns:auto minmax(80px,150px) auto;gap:9px;align-items:center}.topbar-user-copy{display:grid;min-width:0}.topbar-user-copy strong,.topbar-user-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar-user-copy small{color:var(--muted);font-size:11px;direction:ltr;text-align:right}
.main{margin-right:0;padding:102px clamp(18px,2.6vw,44px) 54px}.page{max-width:1480px}.lobby-page{max-width:1540px}.mobile-header{display:none}
.eyebrow{display:block;color:#d2a75a;font-size:11px;font-weight:800;letter-spacing:.5px;margin-bottom:5px}.community-page-head{margin-bottom:18px}.community-page-head h2{font-size:30px}
.community-home{display:grid;grid-template-columns:minmax(0,1fr) 310px;grid-template-areas:"browser profile";gap:18px;direction:ltr;align-items:start}.community-browser{grid-area:browser;direction:rtl;min-width:0}.lobby-profile{grid-area:profile;direction:rtl;padding:0;overflow:hidden;position:sticky;top:92px;border-color:#294044;background:linear-gradient(180deg,#081416,#071013);box-shadow:0 22px 60px rgba(0,0,0,.24)}
.lobby-profile-cover{height:104px;position:relative;overflow:hidden;background:radial-gradient(circle at 30% 30%,rgba(204,145,63,.20),transparent 38%),linear-gradient(135deg,#15262a,#081315 68%,#111d20)}.lobby-profile-cover:after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(45deg,rgba(255,255,255,.025) 0 1px,transparent 1px 12px)}.lobby-profile-cover-mark{position:absolute;left:20px;top:4px;font-size:90px;font-weight:900;color:rgba(220,166,75,.075);line-height:1}.lobby-profile-body{padding:0 18px 18px;text-align:center}.lobby-avatar{width:108px;height:108px;margin:-54px auto 10px;border:3px solid #d2a04b;box-shadow:0 0 0 5px #0a1416,0 12px 28px rgba(0,0,0,.35);font-size:34px}.lobby-profile-name-row{display:flex;align-items:center;justify-content:center;gap:6px}.lobby-profile-name-row h3{margin:0;font-size:21px;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lobby-profile-name-row .profile-sprite{width:26px;height:26px}.lobby-profile-stars{display:flex;direction:ltr;justify-content:center;gap:1px;margin:5px 0 14px}.lobby-profile-stars .profile-sprite{width:18px;height:18px}.lobby-profile-stats{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #203639;border-bottom:1px solid #203639;padding:10px 0;margin-bottom:14px}.lobby-profile-stats>div{display:grid;gap:3px}.lobby-profile-stats>div+div{border-right:1px solid #203639}.lobby-profile-stats small{font-size:9px;color:#7e9291}.lobby-profile-stats strong{font-size:14px;font-variant-numeric:tabular-nums}.lobby-profile-open{width:100%;padding:9px}
.community-grid{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:12px}.community-card{--community-accent:#d5a34c;position:relative;overflow:hidden;min-height:190px;border:1px solid #263943;border-radius:18px;background:linear-gradient(145deg,#111b20,#0a1216);padding:18px;text-align:right;color:#fff;display:grid;grid-template-columns:1fr auto;grid-template-areas:"copy mark" "meta meta";gap:16px;transition:.18s}.community-card:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 88% 8%,color-mix(in srgb,var(--community-accent) 22%,transparent),transparent 42%);pointer-events:none}.community-card:after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--community-accent);opacity:.65}.community-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--community-accent) 55%,#263943);box-shadow:0 18px 45px rgba(0,0,0,.22)}.community-card-copy{grid-area:copy;position:relative;z-index:1}.community-card-copy h3{margin:2px 0 6px;font-size:21px}.community-card-copy p{margin:0;color:#93a4aa;line-height:1.65;font-size:12px;max-width:480px}.community-card-mark,.community-mark{grid-area:mark;position:relative;z-index:1;width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:color-mix(in srgb,var(--community-accent) 15%,#0a1216);border:1px solid color-mix(in srgb,var(--community-accent) 50%,#22323a);color:var(--community-accent);font-size:24px;font-weight:900}.community-card-meta{grid-area:meta;position:relative;z-index:1;display:flex;align-items:center;gap:16px;margin-top:auto;color:#81949b;font-size:11px}.community-card-meta b{color:#dbe4e7;font-size:13px;margin-left:4px}.community-card-enter{margin-right:auto;color:var(--community-accent);font-weight:800}
.community-room{direction:rtl}.community-room-head{--community-accent:#d5a34c;display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;padding:14px 16px;margin-bottom:12px;border:1px solid #263943;border-radius:17px;background:linear-gradient(120deg,#10191e,#0a1216);box-shadow:0 16px 45px rgba(0,0,0,.16)}.community-active-identity{display:flex;align-items:center;gap:12px}.community-active-identity .community-mark{grid-area:auto;width:54px;height:54px;border-radius:16px;--community-accent:inherit}.community-active-identity small{color:#71858d;font-size:9px}.community-active-identity h2{margin:0;font-size:22px}.community-active-identity p{margin:3px 0 0;color:#85999f;font-size:11px}.community-back{white-space:nowrap}.community-layout{direction:ltr;display:grid;grid-template-columns:245px minmax(430px,1fr) 330px;grid-template-areas:"members games chat";gap:12px;align-items:stretch;min-height:calc(100dvh - 202px)}.community-column{direction:rtl;border:1px solid #243640;border-radius:16px;background:linear-gradient(180deg,#10191e,#0a1216);min-width:0;overflow:hidden}.community-members-panel{grid-area:members;padding:14px}.community-games-panel{grid-area:games;padding:14px}.community-chat-panel{grid-area:chat;display:grid;grid-template-rows:auto minmax(300px,1fr) auto}.column-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.column-head h3{margin:0;font-size:17px}.column-head small{color:#71858d;font-size:9px}.count-pill{min-width:30px;height:25px;padding:0 8px;border-radius:999px;display:grid;place-items:center;background:#17252c;border:1px solid #29414b;font-size:11px;color:#b9c7ca}.compact{padding:7px 10px;font-size:11px}.live-dot{width:9px;height:9px;border-radius:50%;background:#39ca7b;box-shadow:0 0 0 4px rgba(57,202,123,.09)}
.community-members{display:grid;gap:6px;align-content:start;max-height:calc(100dvh - 268px);overflow:auto}.community-member{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:9px;align-items:center;padding:8px;border-radius:11px;border:1px solid transparent}.community-member:hover{background:#0d171c;border-color:#21333c}.community-member-avatar{width:38px;height:38px;border-radius:50%;overflow:hidden;background:#17252c;border:1px solid #30454e;display:grid;place-items:center;font-weight:800}.community-member-avatar img{width:100%;height:100%;object-fit:cover}.community-member-copy{min-width:0;display:grid}.community-member-copy strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.community-member-copy small{font-size:9px;color:#73868d;direction:ltr;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.community-member-online{width:7px;height:7px;border-radius:50%;background:#38cb79}
.community-stats{margin-bottom:10px;gap:7px}.community-stats>div{padding:9px 11px;border-radius:11px;background:#0c151a}.community-stats span{font-size:17px}.community-stats small{font-size:8px}.community-toolbar{grid-template-columns:1fr 155px;margin-bottom:10px}.community-game-rooms{grid-template-columns:repeat(2,minmax(210px,1fr));gap:8px;max-height:none;height:auto;overflow:visible;padding-left:2px;padding-bottom:24px}.community-game-rooms .room-card{padding:12px;border-radius:13px}.community-game-rooms .room-meta{margin-bottom:10px}.community-game-rooms .room-host{margin:7px 0 10px}.community-game-rooms .room-code{font-size:15px}
.community-chat-panel .column-head{padding:14px 14px 0;margin:0}.community-chat-messages{padding:12px 12px 6px;display:flex;flex-direction:column;gap:8px;overflow:auto;min-height:0}.community-chat-message{display:grid;grid-template-columns:34px minmax(0,1fr);gap:8px;align-items:start}.community-chat-avatar{width:34px;height:34px;border-radius:50%;overflow:hidden;background:#17252c;border:1px solid #30454e;display:grid;place-items:center;font-size:11px;font-weight:800}.community-chat-avatar img{width:100%;height:100%;object-fit:cover}.community-chat-bubble{min-width:0;background:#0d171c;border:1px solid #1e3038;border-radius:12px;padding:8px 9px}.community-chat-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}.community-chat-meta strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.community-chat-meta time{font-size:8px;color:#6f8289;direction:ltr}.community-chat-bubble p{margin:0;color:#d6dee0;font-size:11px;line-height:1.55;overflow-wrap:anywhere}.community-chat-form{display:grid;grid-template-columns:1fr auto;gap:7px;padding:10px;border-top:1px solid #21323a;background:#091216}.community-chat-form textarea{resize:none;width:100%;border:1px solid #273a43;background:#081014;color:#fff;border-radius:11px;padding:10px;outline:none;line-height:1.5}.community-chat-form textarea:focus{border-color:#477383}.community-chat-form .primary{align-self:stretch;padding:9px 12px}

@media(max-width:1180px) and (min-width:821px){.platform-topbar{grid-template-columns:auto 1fr auto}.topbar-user-copy{display:none}.community-home{grid-template-columns:minmax(0,1fr) 270px}.community-layout{grid-template-columns:210px minmax(370px,1fr) 285px}.community-game-rooms{grid-template-columns:1fr}.topbar-nav .nav-btn{padding:9px 9px;font-size:12px}}
@media(max-width:820px){
  .platform-topbar{display:none}.main{margin:0;padding:74px 14px 86px}.page{max-width:none}.community-home{display:block}.lobby-profile{position:static;margin-bottom:14px;max-width:430px;margin-left:auto;margin-right:auto}.community-browser{display:block}.community-grid{grid-template-columns:1fr}.community-card{min-height:155px}.community-room-head{grid-template-columns:auto 1fr}.community-room-head>.primary{grid-column:1/-1}.community-active-identity p{display:none}.community-layout{display:flex;flex-direction:column;min-height:0}.community-games-panel{order:1}.community-chat-panel{order:2;min-height:480px}.community-members-panel{order:3}.community-game-rooms{grid-template-columns:1fr;max-height:none}.community-members{max-height:340px}.community-chat-messages{min-height:320px;max-height:460px}.community-toolbar{grid-template-columns:1fr}.community-stats{grid-template-columns:repeat(4,1fr)}.community-stats>div{padding:8px}.community-stats span{font-size:15px}.mobile-header{display:flex}.lobby-page{padding-bottom:10px}
}
@media(max-width:480px){.community-card{grid-template-columns:1fr 48px;padding:14px}.community-card-mark{width:48px;height:48px;border-radius:14px}.community-card-meta{gap:10px;font-size:9px}.community-card-enter{display:none}.lobby-profile{border-radius:14px}.community-room-head{padding:10px}.community-active-identity .community-mark{width:44px;height:44px}.community-active-identity h2{font-size:18px}.community-back{font-size:11px;padding:8px}.community-column{border-radius:13px}}

.lobby-profile-star{background-position-x:0%}

/* V13: full public profile inside community rooms */
.community-member{cursor:pointer;transition:border-color .14s ease,background .14s ease,transform .14s ease}.community-member:hover{background:rgba(255,255,255,.045);border-color:rgba(214,166,76,.24);transform:translateY(-1px)}
.community-member-avatar,.community-chat-avatar{cursor:pointer;outline-offset:3px}.community-member-avatar:focus-visible,.community-chat-avatar:focus-visible{outline:2px solid #d2a04b}
.community-public-profile-modal{display:none;position:fixed;inset:0;z-index:180;align-items:center;justify-content:center;padding:24px;background:rgba(2,7,10,.72);backdrop-filter:blur(8px)}
.community-public-profile-modal.open{display:flex}.community-public-profile-shell{width:min(500px,100%);max-height:calc(100dvh - 32px);overflow:auto;position:relative}.community-public-profile-card{width:100%!important;max-width:500px;margin:0 auto;min-height:0!important;border-color:#294044;background:linear-gradient(180deg,#071315,#071012);box-shadow:0 30px 100px rgba(0,0,0,.62)}
.community-public-profile-card .profile-showcase-body{padding-bottom:22px}.community-public-profile-close{justify-self:start;width:36px;height:36px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(255,255,255,.035);color:#e9bd65;font:400 25px/1 system-ui;cursor:pointer}.community-public-profile-close:hover{background:rgba(210,158,70,.10)}
.community-public-profile-handle{margin:3px auto 0;color:#718786;font-size:11px;direction:ltr;text-align:center;max-width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.community-public-profile-actions{display:grid;grid-template-columns:92px 1fr 116px;gap:8px;margin-top:16px;direction:ltr}.community-public-action{min-height:48px;border:1px solid #234043;border-radius:12px;background:#0c1d1f;color:#f3f1e8;font:750 12px system-ui;display:flex;align-items:center;justify-content:center;gap:7px;padding:8px 9px;cursor:pointer}.community-public-action.friend{background:#173b57;border-color:#22577d}.community-public-action.reputation{background:#6e4518;border-color:#9b6927;display:grid;grid-template-columns:24px 1fr;direction:rtl;column-gap:5px}.community-public-action.reputation .profile-sprite{width:23px;height:23px}.community-public-action.reputation small{grid-column:1/-1;color:rgba(255,255,255,.68);font-size:8px;margin-top:-3px}.community-public-action.report{background:#17191b}.community-public-action:disabled{opacity:.46;cursor:default}.community-action-icon{width:21px;height:21px;position:relative;display:inline-block;flex:0 0 21px}.community-action-icon.friend:before,.community-action-icon.friend:after{content:"";position:absolute}.community-action-icon.friend:before{width:8px;height:8px;border:2px solid #d9edf8;border-radius:50%;left:1px;top:2px}.community-action-icon.friend:after{width:13px;height:7px;border:2px solid #d9edf8;border-top:0;border-radius:0 0 9px 9px;left:0;bottom:1px;box-shadow:10px -5px 0 -4px #d9edf8}.community-action-icon.report:before{content:"!";position:absolute;inset:1px;border:2px solid #ef777d;border-radius:6px;color:#ef777d;display:grid;place-items:center;font:900 13px/1 system-ui}.community-public-report-box{margin-top:12px;border:1px solid rgba(220,97,103,.24);border-radius:12px;padding:11px;background:#0b1719;text-align:right}.community-public-report-box label{display:block;color:#aab9b7;font-size:11px;margin-bottom:6px}.community-public-report-box textarea{width:100%;box-sizing:border-box;resize:vertical;border:1px solid #254143;border-radius:9px;background:#061012;color:#fff;padding:9px;font:13px/1.6 system-ui;outline:none}.community-public-report-box>div{display:flex;gap:8px;margin-top:8px}.community-public-profile-loading{position:absolute;inset:0;display:grid;place-items:center;background:rgba(5,13,15,.92);border:1px solid #294044;border-radius:16px;color:#abbab8;font-weight:750}.community-public-profile-loading.hidden{display:none}
@media(max-width:600px){.community-public-profile-modal{padding:10px;align-items:flex-start}.community-public-profile-shell{max-height:calc(100dvh - 20px)}.community-public-profile-card{border-radius:14px}.community-public-profile-actions{grid-template-columns:64px 1fr 92px;gap:6px}.community-public-action{font-size:11px;padding:7px 6px}.community-public-profile-card .profile-cover{height:150px}.community-public-profile-card .profile-showcase-body{margin-top:-70px;padding-left:15px;padding-right:15px}.community-public-profile-card .profile-avatar{width:136px;height:136px}}
.community-member-avatar,.community-chat-avatar{position:relative}.community-avatar-initial{position:absolute;inset:0;display:grid;place-items:center;z-index:0}.community-member-avatar img,.community-chat-avatar img{position:relative;z-index:1;background:#17252c}
.community-public-profile-star{background-position-x:0%}

/* V14 — tall lobby profile card, matching the vertical profile proportions without fake data */
.lobby-profile{
  min-height:560px;
  display:flex;
  flex-direction:column;
}
.lobby-profile-cover{
  height:150px;
  flex:0 0 150px;
  background:
    radial-gradient(circle at 24% 28%,rgba(204,72,51,.34),transparent 34%),
    linear-gradient(135deg,#19292d 0%,#0a1719 56%,#111e20 100%);
}
.lobby-profile-cover:before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(125deg,rgba(135,30,28,.34) 0 29%,transparent 29% 68%,rgba(178,132,52,.07) 68% 100%);
}
.lobby-profile-cover-glow{
  position:absolute;
  width:155px;
  height:155px;
  border-radius:50%;
  right:-32px;
  top:-36px;
  border:1px solid rgba(218,170,79,.12);
  box-shadow:0 0 46px rgba(194,70,45,.09) inset;
}
.lobby-profile-cover-mark{left:18px;top:12px;font-size:104px}
.lobby-profile-body{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  padding:0 16px 16px;
  min-height:0;
}
.lobby-avatar{
  width:124px;
  height:124px;
  margin:-62px auto 12px;
  border-width:3px;
  box-shadow:0 0 0 6px #081214,0 14px 34px rgba(0,0,0,.42);
  font-size:38px;
}
.lobby-profile-name-row h3{font-size:22px;max-width:220px}
.lobby-profile-name-row .profile-sprite{width:28px;height:28px}
.lobby-profile-handle{
  margin:4px auto 0;
  min-height:24px;
  padding:4px 11px;
  max-width:86%;
  border-radius:999px;
  color:#7f9698;
  background:rgba(17,31,34,.7);
  border:1px solid rgba(46,73,76,.55);
  direction:ltr;
  font-size:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.lobby-profile-stars{margin:7px 0 8px;gap:2px}
.lobby-profile-stars .profile-sprite{width:20px;height:20px}
.lobby-profile-divider{height:1px;background:linear-gradient(90deg,transparent,#274245 18%,#274245 82%,transparent);margin:2px 0 4px}
.lobby-profile-stats{
  width:100%;
  margin:0;
  padding:12px 0;
  border-top:0;
  border-bottom:1px solid #203639;
}
.lobby-profile-stats>div{gap:5px;padding:0 4px}
.lobby-profile-stats small{font-size:9px}
.lobby-profile-stats strong{font-size:14px}
.lobby-stat-value{display:flex;align-items:center;justify-content:center;gap:5px;min-height:25px}
.lobby-stat-value .profile-sprite{width:20px;height:20px;flex:0 0 20px}
.lobby-profile-info{
  display:grid;
  gap:7px;
  margin-top:12px;
  text-align:right;
}
.lobby-profile-info>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:40px;
  padding:9px 11px;
  border:1px solid #1f3438;
  border-radius:11px;
  background:#091619;
}
.lobby-profile-info span{color:#74898a;font-size:9px}
.lobby-profile-info strong{font-size:11px;color:#e7eeec;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:175px}
.lobby-online{display:inline-flex;align-items:center;gap:6px!important;color:#b9d6c5!important}
.lobby-online i{width:7px;height:7px;border-radius:50%;background:#3bcf7e;box-shadow:0 0 0 3px rgba(59,207,126,.10)}
.lobby-profile-spacer{flex:1;min-height:18px}
.lobby-profile-open{
  width:100%;
  min-height:44px;
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-color:#294347;
  background:#101d24;
  font-weight:800;
}
.lobby-profile-open .profile-sprite{width:18px;height:18px}

@media(max-width:1180px) and (min-width:821px){
  .lobby-profile{min-height:535px}
  .lobby-profile-cover{height:140px;flex-basis:140px}
  .lobby-avatar{width:116px;height:116px;margin-top:-58px}
  .lobby-profile-info strong{max-width:140px}
}
@media(max-width:820px){
  .lobby-profile{min-height:520px}
  .lobby-profile-cover{height:145px;flex-basis:145px}
  .lobby-profile-body{padding-bottom:15px}
  .lobby-profile-spacer{min-height:14px}
}

/* V15 — room list: desktop rows, mobile cards; hide the current user from member list */
.room-mobile-top,.room-mobile-meta,.room-mobile-host{display:none}
.community-room-card{min-width:0}
.room-game-identity{min-width:0;display:flex;align-items:center;gap:11px}
.room-game-identity>div{min-width:0;display:grid;gap:2px}
.room-game-identity small{font-size:9px;color:#73868d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.room-game-identity strong{font-size:14px;color:#eef3f2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.room-game-identity p{margin:0;color:#809298;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.room-game-mark{width:48px;height:48px;flex:0 0 48px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(213,163,76,.42);background:radial-gradient(circle at 35% 28%,#263238,#10191e 72%);color:#e8b75e;font:900 11px/1 system-ui;box-shadow:inset 0 0 0 3px rgba(255,255,255,.025)}
.room-roster{direction:ltr;display:flex;align-items:center;justify-content:center;gap:6px;min-width:112px}
.room-player-slot{position:relative;width:34px;height:34px;flex:0 0 34px;border-radius:50%;display:grid;place-items:center;border:1px solid #40515a;background:#172229;color:#ecf2f1;font:800 11px/1 system-ui;box-shadow:0 4px 12px rgba(0,0,0,.2)}
.room-player-slot.occupied{border-color:#617680;background:linear-gradient(145deg,#34464e,#1a272d)}
.room-player-slot.empty-seat{border-color:#384850;background:#121c21}
.room-player-slot.empty-seat>span:before{content:"";display:block;width:8px;height:8px;border-radius:50%;background:#67757b;margin:0 auto 2px}
.room-player-slot.empty-seat>span:after{content:"";display:block;width:15px;height:8px;border-radius:9px 9px 6px 6px;background:#67757b}
.room-host-crown{position:absolute;right:-3px;top:-7px;width:14px;height:9px;border-bottom:3px solid #d8a243}
.room-host-crown:before{content:"";position:absolute;left:1px;top:0;width:3px;height:6px;background:#d8a243;box-shadow:4px -2px 0 #d8a243,8px 0 0 #d8a243;transform:skewY(-18deg)}
.room-desktop-state{display:grid;grid-template-columns:auto auto;align-items:center;justify-content:center;column-gap:7px;row-gap:2px;min-width:74px;text-align:center}
.room-desktop-state>strong{font-size:13px;direction:ltr}.room-desktop-state>small{font-size:8px;color:#75868d}.room-desktop-state>.status-chip{grid-column:1/-1;justify-self:center;padding:4px 7px}

@media(min-width:821px){
  .community-game-rooms{display:grid;grid-template-columns:1fr!important;gap:7px;align-content:start}
  .community-game-rooms .community-room-card{display:grid;grid-template-columns:92px 82px minmax(110px,auto) minmax(150px,1fr);grid-template-areas:"action state roster identity";align-items:center;gap:12px;padding:10px 11px;border-radius:12px;min-height:72px;background:linear-gradient(100deg,#10191e,#0b1418);transform:none}
  .community-game-rooms .community-room-card:hover{transform:none;border-color:#36505a;background:linear-gradient(100deg,#121e23,#0d171b)}
  .community-room-card .room-game-identity{grid-area:identity}
  .community-room-card .room-roster{grid-area:roster}
  .community-room-card .room-desktop-state{grid-area:state}
  .community-room-card .join-room{grid-area:action;width:92px;min-height:36px;padding:8px 10px;border-radius:10px;font-size:11px}
}

@media(max-width:820px){
  .room-game-identity,.room-roster,.room-desktop-state{display:none}
  .room-mobile-top{display:flex;justify-content:space-between;align-items:start;gap:10px}
  .room-mobile-meta{display:grid}.room-mobile-host{display:block}
  .community-game-rooms .community-room-card{display:block;padding:14px;border-radius:14px;min-height:0}
  .community-room-card .join-room{width:100%}
}

/* V16 — richer connected-member list + one avatar system everywhere */
.community-layout{grid-template-columns:330px minmax(410px,1fr) 330px}
.community-members-panel{padding:12px}
.community-members{gap:5px;max-height:calc(100dvh - 255px);padding-left:2px}
.community-member{
  min-height:70px;
  grid-template-columns:56px minmax(0,1fr) 9px;
  gap:10px;
  padding:8px 9px;
  border-radius:13px;
  border:1px solid rgba(44,67,77,.42);
  background:linear-gradient(100deg,rgba(13,24,29,.88),rgba(8,17,21,.72));
}
.community-member:hover{background:linear-gradient(100deg,#102026,#0b171c);border-color:rgba(210,160,75,.24);transform:none}
.community-member-avatar{width:54px;height:54px;border:2px solid #3a5059;box-shadow:0 0 0 2px rgba(213,163,76,.08),0 5px 15px rgba(0,0,0,.22);background:#0c181d}
.community-member-avatar img,.community-chat-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.community-member-copy{display:grid;gap:3px;align-content:center}
.community-member-title{display:flex;direction:rtl;align-items:center;gap:5px;min-width:0}
.community-member-title strong{font-size:14px;line-height:1.2;color:#edf3f1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.community-member-emblem{width:18px;height:18px;flex:0 0 18px;filter:drop-shadow(0 2px 4px rgba(39,169,106,.18))}
.community-member-stars{display:flex;direction:ltr;justify-content:flex-end;gap:0;min-height:15px}
.community-member-star{width:15px;height:15px;filter:drop-shadow(0 1px 2px rgba(229,169,53,.14))}
.community-member-meta{display:flex;direction:rtl;align-items:center;gap:7px;min-width:0;color:#71868c;font-size:8.5px;white-space:nowrap;overflow:hidden}
.community-member-meta span{overflow:hidden;text-overflow:ellipsis}
.community-member-meta span+span:before{content:"·";margin-left:7px;color:#3c535b}
.community-member-online{width:8px;height:8px;box-shadow:0 0 0 3px rgba(56,203,121,.10)}
.community-chat-avatar{background:#0c181d;border-color:#344a53}

@media(max-width:1280px) and (min-width:821px){
  .community-layout{grid-template-columns:285px minmax(370px,1fr) 290px}
  .community-member{grid-template-columns:50px minmax(0,1fr) 8px;min-height:64px;padding:7px}
  .community-member-avatar{width:48px;height:48px}
  .community-member-title strong{font-size:13px}
  .community-member-star{width:14px;height:14px}
  .community-member-meta{font-size:8px;gap:5px}
}

@media(max-width:820px){
  .community-members-panel{padding:8px 10px 12px;background:#0a1115}
  .community-members{max-height:none;gap:0;border:1px solid #1d2c33;border-radius:14px;overflow:hidden;background:#0b1115}
  .community-member{
    min-height:68px;
    grid-template-columns:54px minmax(0,1fr) 8px;
    gap:9px;
    padding:7px 9px;
    border:0;
    border-bottom:1px solid rgba(255,255,255,.045);
    border-radius:0;
    background:#0b1115;
  }
  .community-member:last-child{border-bottom:0}
  .community-member:hover{background:#0d1519;border-color:rgba(255,255,255,.045)}
  .community-member-avatar{width:50px;height:50px;border-width:2px}
  .community-member-copy{display:flex;direction:rtl;align-items:center;gap:7px;min-width:0}
  .community-member-title{flex:0 1 auto;min-width:0;gap:4px}
  .community-member-title strong{font-size:15px;max-width:130px}
  .community-member-emblem{width:17px;height:17px;flex-basis:17px}
  .community-member-stars{flex:0 0 auto;justify-content:flex-start;gap:0}
  .community-member-star{width:16px;height:16px}
  .community-member-meta{display:none}
  .community-member-online{width:7px;height:7px}
}
@media(max-width:390px){
  .community-member{grid-template-columns:50px minmax(0,1fr) 7px;padding-left:7px;padding-right:7px}
  .community-member-avatar{width:47px;height:47px}
  .community-member-title strong{font-size:14px;max-width:105px}
  .community-member-star{width:14px;height:14px}
  .community-member-emblem{width:15px;height:15px;flex-basis:15px}
}
.room-player-slot.occupied{overflow:visible;padding:0}
.room-player-slot.occupied>img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block;background:#0c181d}

/* V18 — compact room account bar, wider room chat, full light theme */
.theme-toggle{border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:10px;min-height:36px;padding:7px 10px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:800;font-size:11px}
.theme-toggle:hover{filter:brightness(1.04)}.theme-glyph{width:16px;height:16px;border-radius:50%;border:2px solid currentColor;display:inline-block;position:relative}.theme-glyph:after{content:"";position:absolute;inset:3px;border-radius:50%;background:currentColor;opacity:.12}
html[data-theme="light"] .theme-glyph:after{opacity:.85}.auth-theme-toggle{position:fixed;left:18px;top:18px;z-index:60}.compact-theme{width:38px;height:38px;padding:0;border-radius:11px}.room-theme-toggle{min-width:76px}

.community-userbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:10px;padding:9px 11px;border:1px solid #243640;border-radius:14px;background:linear-gradient(120deg,#0e171c,#091216)}
.community-user-identity{border:0;background:transparent;color:inherit;padding:0;display:flex;align-items:center;gap:9px;min-width:0;text-align:right}.community-user-avatar{width:38px;height:38px;flex:0 0 38px}.community-user-copy{display:grid;min-width:0}.community-user-copy strong,.community-user-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.community-user-copy strong{font-size:12px}.community-user-copy small{font-size:9px;color:var(--muted);direction:ltr;text-align:right}.community-user-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.room-utility-btn{border:1px solid #294049;background:#111d23;color:#dfe8e8;border-radius:9px;padding:8px 10px;font:800 10px/1.1 system-ui;display:inline-flex;align-items:center;gap:5px;min-height:36px}.room-utility-btn:hover{border-color:#3c5963;background:#15252c}.room-utility-btn.accent{border-color:rgba(210,160,75,.42);color:#e7bd6e;background:rgba(111,78,28,.20)}.room-utility-btn .profile-sprite{width:17px;height:17px}
.community-room-head{grid-template-columns:1fr auto}.community-back{display:none!important}
.community-layout{grid-template-columns:380px minmax(390px,1fr) 410px}
.community-chat-panel{min-width:0}.community-chat-message{grid-template-columns:38px minmax(0,1fr)}.community-chat-avatar{width:38px;height:38px}.community-chat-bubble p{font-size:12px;line-height:1.65}.community-chat-form textarea{min-height:56px;font-size:12px}
body.community-mode .platform-topbar{display:none}body.community-mode .main{padding-top:18px}.profile-card-back{display:none!important}

@media(max-width:1280px) and (min-width:821px){.community-layout{grid-template-columns:325px minmax(310px,1fr) 350px}.community-user-actions{gap:4px}.room-utility-btn{padding:7px 8px}}
@media(max-width:820px){body.community-mode .mobile-header{display:none}body.community-mode .main{padding-top:10px}.community-userbar{position:sticky;top:0;z-index:25;margin:-2px -2px 10px;padding:8px 9px;border-radius:12px}.community-user-copy small{display:none}.community-user-actions{margin-right:auto}.room-utility-btn{font-size:9px;padding:7px 8px}.room-theme-toggle{min-width:38px}.room-theme-toggle .theme-label{display:none}.community-room-head{grid-template-columns:1fr auto}.community-room-head>.primary{grid-column:auto}.community-active-identity p{display:none}.community-chat-panel{min-height:560px}.community-chat-messages{min-height:390px;max-height:560px}}
@media(max-width:480px){.community-userbar{gap:7px}.community-user-avatar{width:34px;height:34px;flex-basis:34px}.community-user-copy strong{max-width:92px}.community-user-actions{gap:3px}.room-utility-btn{padding:7px 6px}.community-profile-page-label{display:none}}

/* Full light mode: one coherent palette across auth, navigation, rooms, chat, profiles and modals. */
html[data-theme="light"]{color-scheme:light;--bg:#f4f7f8;--panel:#ffffff;--panel2:#eef3f5;--line:#cfd9de;--text:#172229;--muted:#687983;--blue:#246fd6;--blue2:#185cbd;--green:#218b57;--red:#c8444d;--amber:#b77d24}
html[data-theme="light"] body:before{background:radial-gradient(circle at 80% -15%,rgba(43,124,255,.08),transparent 38%),radial-gradient(circle at 5% 105%,rgba(53,201,122,.06),transparent 35%)}
html[data-theme="light"] .auth-card,html[data-theme="light"] .panel{background:#fff;box-shadow:0 22px 70px rgba(37,58,68,.10)}
html[data-theme="light"] .auth-tabs,html[data-theme="light"] .auth-form input,html[data-theme="light"] .toolbar input,html[data-theme="light"] .toolbar select,html[data-theme="light"] .inline-form input,html[data-theme="light"] .search-row input,html[data-theme="light"] .setting select{background:#f3f6f7;color:#172229}
html[data-theme="light"] .auth-tab.active{background:#fff;color:#172229;box-shadow:0 2px 8px rgba(30,55,68,.08)}html[data-theme="light"] .auth-form label{color:#52656f}html[data-theme="light"] .auth-note{color:#73858e}
html[data-theme="light"] .platform-topbar,html[data-theme="light"] .mobile-header,html[data-theme="light"] .bottom-nav{background:rgba(250,252,253,.96);border-color:#d8e0e4;box-shadow:0 12px 32px rgba(40,62,72,.08)}
html[data-theme="light"] .nav-btn{color:#61727c}html[data-theme="light"] .nav-btn:hover,html[data-theme="light"] .nav-btn.active{background:#e9f0f4;color:#172229}html[data-theme="light"] .sidebar-user{border-color:#d6e0e4}
html[data-theme="light"] .ghost,html[data-theme="light"] .small-btn,html[data-theme="light"] .theme-toggle{background:#edf2f4;color:#26373f;border-color:#cbd8dd}html[data-theme="light"] .icon-btn{color:#60747f}
html[data-theme="light"] .avatar{background:linear-gradient(145deg,#e7eef1,#dbe5e9);border-color:#bccbd1;color:#31444d}
html[data-theme="light"] .empty{color:#70818a;border-color:#ccd7dc;background:rgba(255,255,255,.45)}
html[data-theme="light"] .person{background:#f6f9fa;border-color:#d7e0e4}html[data-theme="light"] .presence{box-shadow:0 0 0 3px #eef3f5}
html[data-theme="light"] .profile-showcase,html[data-theme="light"] .profile-hero,html[data-theme="light"] .community-public-profile-card{background:linear-gradient(180deg,#ffffff,#f5f8f8);border-color:#c7d8d9;box-shadow:0 24px 70px rgba(39,65,70,.14)}
html[data-theme="light"] .profile-cover,html[data-theme="light"] .lobby-profile-cover{background:radial-gradient(circle at 75% 20%,rgba(210,154,68,.14),transparent 36%),linear-gradient(135deg,#e3ecec,#f7faf9 65%,#e9efef)}
html[data-theme="light"] .profile-cover:before,html[data-theme="light"] .lobby-profile-cover:after{background:repeating-linear-gradient(45deg,rgba(20,45,50,.025) 0 1px,transparent 1px 13px)}
html[data-theme="light"] .profile-avatar{background:#eef3f3;box-shadow:0 0 0 5px #fff,0 14px 30px rgba(44,67,72,.14)}html[data-theme="light"] .profile-photo-btn{border-color:#fff}
html[data-theme="light"] .profile-editor,html[data-theme="light"] .profile-editor-content{background:#fff;color:#172229}html[data-theme="light"] .profile-editor-backdrop{background:rgba(32,48,55,.28)}
html[data-theme="light"] .profile-field-group input,html[data-theme="light"] .community-public-report-box textarea{background:#f4f7f8;color:#172229;border-color:#cbd8dc}
html[data-theme="light"] .lobby-profile{background:linear-gradient(180deg,#ffffff,#f7fafa);border-color:#c7d8d9;box-shadow:0 20px 48px rgba(39,65,70,.10)}
html[data-theme="light"] .lobby-avatar{box-shadow:0 0 0 6px #fff,0 12px 28px rgba(41,62,68,.14)}html[data-theme="light"] .lobby-profile-handle{background:#eef4f4;border-color:#cfdddd;color:#607778}
html[data-theme="light"] .lobby-profile-divider{background:linear-gradient(90deg,transparent,#ccdada 18%,#ccdada 82%,transparent)}html[data-theme="light"] .lobby-profile-stats{border-color:#d6e1e1}html[data-theme="light"] .lobby-profile-info>div{background:#f3f7f7;border-color:#d4dfdf}html[data-theme="light"] .lobby-profile-info strong{color:#243638}html[data-theme="light"] .lobby-profile-open{background:#edf3f4;border-color:#c9d8da;color:#253638}
html[data-theme="light"] .community-card{background:linear-gradient(145deg,#ffffff,#f2f6f7);border-color:#d1dde1;color:#172229;box-shadow:0 12px 30px rgba(41,66,77,.07)}html[data-theme="light"] .community-card-copy p{color:#6f8088}html[data-theme="light"] .community-card-meta{color:#71828a}html[data-theme="light"] .community-card-meta b{color:#24333a}html[data-theme="light"] .community-card-mark,html[data-theme="light"] .community-mark{background:color-mix(in srgb,var(--community-accent) 10%,#fff);border-color:color-mix(in srgb,var(--community-accent) 38%,#cfdadd)}
html[data-theme="light"] .community-userbar,html[data-theme="light"] .community-room-head,html[data-theme="light"] .community-column{background:linear-gradient(180deg,#ffffff,#f5f8f9);border-color:#cdd9de;box-shadow:0 10px 28px rgba(42,64,72,.06)}html[data-theme="light"] .room-utility-btn{background:#eef3f5;border-color:#cbd7dc;color:#26383f}html[data-theme="light"] .room-utility-btn.accent{background:#fff6e7;border-color:#d9bd8a;color:#8a5c17}
html[data-theme="light"] .column-head small,html[data-theme="light"] .community-active-identity small{color:#71848d}html[data-theme="light"] .community-active-identity p{color:#657a83}html[data-theme="light"] .count-pill{background:#edf3f5;border-color:#cad8dd;color:#536b75}
html[data-theme="light"] .community-members-panel{background:#fff}html[data-theme="light"] .community-members{background:#fff;border-color:#d7e0e4}html[data-theme="light"] .community-member{background:linear-gradient(100deg,#ffffff,#f5f8f9);border-color:#d9e2e5}html[data-theme="light"] .community-member:hover{background:#eef4f6;border-color:#cfb989}html[data-theme="light"] .community-member-avatar,html[data-theme="light"] .community-chat-avatar{background:#e7eef1;border-color:#bdccd2;box-shadow:0 4px 12px rgba(40,60,68,.10)}html[data-theme="light"] .community-member-title strong{color:#1c2b32}html[data-theme="light"] .community-member-meta{color:#687d86}
html[data-theme="light"] .community-game-rooms .community-room-card,html[data-theme="light"] .room-card{background:linear-gradient(100deg,#ffffff,#f3f7f8);border-color:#d2dde1}html[data-theme="light"] .community-game-rooms .community-room-card:hover,html[data-theme="light"] .room-card:hover{background:#f5f9fa;border-color:#b9cbd2}html[data-theme="light"] .room-game-identity strong{color:#203139}html[data-theme="light"] .room-game-identity small,html[data-theme="light"] .room-game-identity p{color:#6d818a}html[data-theme="light"] .room-player-slot{background:#e8eef1;border-color:#bdcbd1;color:#263940}html[data-theme="light"] .room-player-slot.occupied{background:#e2eaed;border-color:#aebfc6}html[data-theme="light"] .room-player-slot.empty-seat{background:#f1f5f6;border-color:#cbd7dc}
html[data-theme="light"] .community-chat-panel{background:#fff}html[data-theme="light"] .community-chat-bubble{background:#f1f5f6;border-color:#d5e0e3}html[data-theme="light"] .community-chat-bubble p{color:#25363e}html[data-theme="light"] .community-chat-meta time{color:#71828a}html[data-theme="light"] .community-chat-form{background:#f5f8f9;border-color:#d2dde1}html[data-theme="light"] .community-chat-form textarea{background:#fff;color:#172229;border-color:#c9d7dc}
html[data-theme="light"] .community-public-profile-modal,html[data-theme="light"] .modal{background:rgba(45,61,68,.32)}html[data-theme="light"] .community-public-profile-close{background:#f0f4f5;border-color:#d3dde1;color:#8d641f}html[data-theme="light"] .community-public-report-box{background:#fff7f7;border-color:#e5c8ca}
html[data-theme="light"] .modal-card{background:#fff;border-color:#cbd8dd;box-shadow:0 24px 70px rgba(40,62,72,.15)}
html[data-theme="light"] .table-panel,html[data-theme="light"] table{background:#fff}html[data-theme="light"] th{background:#eef3f5;color:#5f727c}html[data-theme="light"] th,html[data-theme="light"] td{border-color:#d9e2e5}html[data-theme="light"] td small{color:#6d808a}
html[data-theme="light"] .admin-report{background:#f6f9fa;border-color:#d5dfe3}html[data-theme="light"] .admin-report p{color:#304149}
html[data-theme="light"] .status-wait{background:#e6f6ed;color:#267448}html[data-theme="light"] .status-play{background:#fff3dc;color:#855d1b}html[data-theme="light"] .role-chip{background:#e4eefb;color:#315f9b}
html[data-theme="light"] .profile-card-bar,html[data-theme="light"] .profile-editor-bar{background:rgba(250,252,252,.98)!important;color:#203136;border-bottom-color:#d8e1e2}
html[data-theme="light"] .profile-card-action{color:#9a681d}html[data-theme="light"] .profile-card-action:hover,html[data-theme="light"] .profile-card-action:focus-visible{background:#fff4df;outline-color:#dfc18a}
html[data-theme="light"] .profile-stats{background:linear-gradient(90deg,transparent,rgba(224,234,234,.68),transparent);border-color:#d6e1e1}html[data-theme="light"] .profile-stat small{color:#667d7e!important}html[data-theme="light"] .profile-stat strong{color:#243536!important}html[data-theme="light"] .profile-stat:not(:last-child):after{background:#d3dede}
html[data-theme="light"] .profile-editor{background:#ffffff!important;border-color:#cbdada!important;box-shadow:0 30px 90px rgba(47,66,72,.18)!important}html[data-theme="light"] .profile-editor-close{color:#607579!important}html[data-theme="light"] .profile-editor-close:hover{background:#edf3f4;color:#26383d!important}html[data-theme="light"] .profile-editor-avatar{background:linear-gradient(155deg,#edf3f3,#dfe8e8);box-shadow:0 0 0 5px #fff,0 14px 30px rgba(42,64,68,.13)}
html[data-theme="light"] .profile-remove-photo{background:#eef3f4;color:#576c71;border-color:#cbd8da}html[data-theme="light"] .profile-save-button{color:#fff9ef}
html[data-theme="light"] .profile-upload-note,html[data-theme="light"] .profile-field-label{color:#60757b}html[data-theme="light"] .profile-preset{background:#eef3f4;border-color:#cbd8dc}
html[data-theme="light"] .community-public-profile-loading{background:rgba(249,252,252,.94);border-color:#ccdada;color:#5d7176}
html[data-theme="light"] .community-public-action{background:#edf3f4;color:#24363d;border-color:#ccdadd}html[data-theme="light"] .community-public-action.friend{background:#e4f0fa;border-color:#b9d3e8}html[data-theme="light"] .community-public-action.reputation{background:#fff1dc;border-color:#ddb879;color:#76511b}html[data-theme="light"] .community-public-action.reputation small{color:#826535}html[data-theme="light"] .community-public-action.report{background:#f4f5f5}
html[data-theme="light"] .room-game-mark{background:radial-gradient(circle at 35% 28%,#edf2f3,#dce5e8 72%);color:#8b611e;border-color:#cdb079}
html[data-theme="light"] .danger-btn{background:#fff0f1;color:#a93c44;border-color:#e9bec2}
@media(max-width:820px){body.community-mode .bottom-nav{display:none}body.community-mode .main{padding-bottom:18px}}

/* V19: the account utility strip is intentionally hidden inside an active community room. */
body.community-mode .community-userbar{display:none!important}

/* V20 — compact match rows + real spectator action */
.status-live{background:rgba(43,153,255,.12);color:#79baff}
.secondary,.room-waiting{border:1px solid #31505d;border-radius:10px;padding:8px 12px;font-weight:800;background:#11212a;color:#d9edf3}
.secondary:hover{background:#16303c;border-color:#47707e}.secondary:disabled,.room-waiting:disabled{opacity:.42;cursor:not-allowed}
.community-game-rooms{overflow-x:hidden}
.community-room-card{overflow:hidden}
@media(min-width:821px){
  .community-game-rooms .community-room-card{
    grid-template-columns:minmax(210px,1.35fr) minmax(132px,.82fr) minmax(92px,.52fr) 104px;
    grid-template-areas:"identity roster state action";
    direction:rtl;
    min-width:0;
    width:100%;
    gap:10px;
    padding:10px 12px;
  }
  .community-room-card .room-game-identity{justify-content:flex-start;direction:rtl}
  .community-room-card .room-roster{justify-content:flex-start;min-width:0;gap:5px;overflow:hidden}
  .community-room-card .room-desktop-state{min-width:0}
  .community-room-card .join-room,.community-room-card .watch-room,.community-room-card .room-waiting{
    grid-area:action;width:104px;min-height:38px;padding:8px 9px;font-size:11px;justify-self:end
  }
  .room-game-mark{width:44px;height:44px;flex-basis:44px}
  .room-player-slot{width:31px;height:31px;flex-basis:31px}
}
@media(max-width:820px){
  .community-room-card .watch-room,.community-room-card .room-waiting{width:100%;margin-top:10px}
}
html[data-theme="light"] .secondary,html[data-theme="light"] .room-waiting{background:#eef4f6;color:#29404a;border-color:#bfd0d7}
html[data-theme="light"] .secondary:hover{background:#e5eef1;border-color:#9eb8c2}

/* V21: explicit public-room exit control. */
.community-room-head-actions{display:flex;align-items:center;gap:8px;justify-content:flex-start;flex-wrap:wrap}
.community-exit-btn{border:1px solid rgba(214,88,88,.42);background:rgba(119,35,35,.18);color:#efb3b3;border-radius:10px;padding:10px 13px;font:800 11px/1 system-ui;min-height:39px;cursor:pointer}
.community-exit-btn:hover{background:rgba(151,45,45,.28);border-color:rgba(231,105,105,.62);color:#ffd1d1}
html[data-theme="light"] .community-exit-btn{background:#fff1f1;border-color:#e2b8b8;color:#963d3d}
html[data-theme="light"] .community-exit-btn:hover{background:#ffe7e7;border-color:#d99c9c}
@media(max-width:820px){.community-room-head-actions{grid-column:1/-1;width:100%}.community-room-head-actions>.primary{flex:1}.community-exit-btn{flex:0 0 auto}}
@media(max-width:480px){.community-room-head-actions{display:grid;grid-template-columns:1fr 1fr}.community-room-head-actions>.primary,.community-exit-btn{width:100%}}


/* Profile raster assets v22 — generated from the approved profile asset sheet */
.profile-sprite-star,.profile-sprite-trophy,.profile-sprite-reputation,.profile-sprite-emblem{background-repeat:no-repeat!important;background-position:center!important;background-size:contain!important}
.profile-sprite-star{background-image:url('/platform/assets/profile/raster/star.webp')!important}
.profile-sprite-trophy{background-image:url('/platform/assets/profile/raster/trophy.webp')!important}
.profile-sprite-reputation{background-image:url('/platform/assets/profile/raster/reputation-flame.webp')!important}
.profile-sprite-emblem{background-image:url('/platform/assets/profile/raster/palm-swords.webp')!important}
.profile-sticker,.community-member-emblem{filter:drop-shadow(0 2px 5px rgba(181,129,37,.18))!important}
html[data-theme="light"] #profile-user,
html[data-theme="light"] .lobby-profile-handle,
html[data-theme="light"] .community-public-profile-handle,
html[data-theme="light"] .community-user-copy small,
html[data-theme="light"] .community-member-meta,
html[data-theme="light"] .community-chat-profile-name{color:#111111!important}

/* V23 — server-authoritative store wallet + daily match rewards */
.store-page{max-width:1180px}
.store-page-head .eyebrow{display:block;margin-bottom:4px}
.store-dashboard{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);grid-template-areas:"wallet reward" "catalog ledger";gap:14px;align-items:stretch}
.store-wallet-card{grid-area:wallet;display:flex;align-items:center;justify-content:space-between;gap:22px;min-height:154px;background:radial-gradient(circle at 18% 15%,rgba(224,168,72,.12),transparent 38%),linear-gradient(145deg,#121c22,#0b1318)}
.store-wallet-main{display:flex;align-items:center;gap:16px}.store-wallet-main>div{display:grid;gap:2px}.store-wallet-main small{color:var(--muted);font-size:11px}.store-wallet-main strong{font-size:38px;line-height:1;font-weight:900;letter-spacing:-1px}.store-wallet-main span:last-child{color:#c99d51;font-size:11px;font-weight:800;letter-spacing:.08em}
.coin-mark{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;background:linear-gradient(145deg,#e5b95f,#a66f23);border:2px solid #f3cf83;color:#21170a;font:900 25px/1 system-ui;box-shadow:inset 0 1px 0 rgba(255,255,255,.34),0 9px 24px rgba(151,101,31,.24)}
.coin-mark.small{width:34px;height:34px;font-size:14px;border-width:1px}
.store-wallet-security{display:flex;align-items:center;gap:10px;max-width:300px;padding:11px 13px;border:1px solid #243742;border-radius:12px;background:rgba(7,14,18,.34)}.store-wallet-security>div{display:grid}.store-wallet-security strong{font-size:11px}.store-wallet-security small{color:var(--muted);font-size:9px;line-height:1.5}.store-lock-mark{width:24px;height:22px;position:relative;border:2px solid #6f8790;border-radius:5px}.store-lock-mark:before{content:"";position:absolute;width:11px;height:9px;border:2px solid #6f8790;border-bottom:0;border-radius:8px 8px 0 0;left:50%;top:-10px;transform:translateX(-50%)}
.daily-reward-card{grid-area:reward;display:grid;gap:16px;background:linear-gradient(145deg,#121a20,#0d151a)}.daily-reward-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.daily-reward-head small{color:var(--muted);font-size:10px}.daily-reward-head h3{margin:3px 0 0;font-size:17px}.daily-reward-head>strong{padding:6px 9px;border-radius:999px;background:rgba(220,166,72,.12);border:1px solid rgba(220,166,72,.28);color:#e1b867;font-size:11px}
.reward-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.reward-step{min-height:50px;border:1px solid #293944;border-radius:10px;background:#0a1217;display:grid;place-items:center;align-content:center;gap:2px;color:#647985}.reward-step b{font-size:12px}.reward-step small{font-size:8px}.reward-step.done{background:linear-gradient(145deg,rgba(219,166,72,.24),rgba(120,82,26,.14));border-color:#8f6b32;color:#edc878;box-shadow:inset 0 0 0 1px rgba(235,193,112,.08)}.daily-reward-card>p{margin:0;color:var(--muted);font-size:10px;line-height:1.65}
.store-catalog-panel{grid-area:catalog;min-height:300px}.store-ledger-panel{grid-area:ledger;min-height:300px}.store-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.store-section-head small{color:var(--muted);font-size:9px}.store-section-head h3{margin:2px 0 0;font-size:18px}.store-catalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:9px}.store-item-card{display:grid;grid-template-columns:52px 1fr auto;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:12px;background:#0c141a}.store-item-visual{width:52px;height:52px;object-fit:contain}.store-item-copy{display:grid;min-width:0}.store-item-copy strong{font-size:12px}.store-item-copy small{font-size:9px;color:var(--muted);line-height:1.5}.store-ledger{display:grid;gap:7px}.store-ledger-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px;padding:9px 0;border-bottom:1px solid var(--line)}.store-ledger-row:last-child{border-bottom:0}.store-ledger-row>div{display:grid;min-width:0}.store-ledger-row strong{font-size:11px}.store-ledger-row small{font-size:8px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.store-ledger-row>b{font-size:12px;color:#e0b460;direction:ltr}
@media(max-width:820px){.store-dashboard{grid-template-columns:1fr;grid-template-areas:"wallet" "reward" "catalog" "ledger"}.store-wallet-card{align-items:flex-start;flex-direction:column}.store-wallet-security{max-width:none;width:100%}.store-page-head{gap:10px}.store-page-head .ghost{flex:0 0 auto}.reward-step{min-height:48px}.bottom-nav .bottom-btn{min-width:0}}
@media(max-width:480px){.store-wallet-main strong{font-size:32px}.coin-mark{width:52px;height:52px}.daily-reward-head h3{font-size:15px}.reward-steps{gap:4px}.reward-step{border-radius:8px}.store-item-card{grid-template-columns:46px 1fr}.store-item-visual{width:46px;height:46px}.store-item-card .ghost{grid-column:1/-1;width:100%}}
html[data-theme="light"] .store-wallet-card{background:radial-gradient(circle at 18% 15%,rgba(205,151,52,.10),transparent 38%),linear-gradient(145deg,#ffffff,#f4f7f8);border-color:#d1dde1}
html[data-theme="light"] .store-wallet-security{background:#f2f6f7;border-color:#d1dde1}html[data-theme="light"] .store-lock-mark,html[data-theme="light"] .store-lock-mark:before{border-color:#607780}
html[data-theme="light"] .daily-reward-card{background:linear-gradient(145deg,#ffffff,#f4f7f8);border-color:#d1dde1}html[data-theme="light"] .daily-reward-head>strong{background:#fff5df;border-color:#dfc28c;color:#80591b}
html[data-theme="light"] .reward-step{background:#f0f4f5;border-color:#d2dde1;color:#6d8088}html[data-theme="light"] .reward-step.done{background:linear-gradient(145deg,#fff4dd,#f6e6c6);border-color:#d8b56f;color:#79551c}
html[data-theme="light"] .store-item-card{background:#f5f8f9;border-color:#d6e0e3}html[data-theme="light"] .store-ledger-row>b{color:#8b611d}

/* V25: visible game entry points and a scrollable match dialog. */
.platform-version{display:inline-block;font:700 11px/1.4 Arial,sans-serif;letter-spacing:.04em;vertical-align:middle;color:var(--muted);border:1px solid var(--line);border-radius:6px;padding:2px 6px;margin-inline-start:6px}
.quick-games,.create-game-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.quick-games{padding:0 14px 14px;flex-shrink:0}
.quick-games button,.create-game-options button{display:grid;gap:5px;text-align:center;padding:14px 10px;border:1px solid #425d75;border-radius:12px;background:#132333;color:#edf4fb;min-width:0}
.quick-games strong,.create-game-options strong{font-size:17px}
.quick-games small,.create-game-options small{font-size:12px;color:#aec5d9}
.quick-games button:hover,.create-game-options button:hover{border-color:#73acff;background:#1e3850}
.create-game-options button.selected{border-color:#77b1ff;background:#204b76;box-shadow:0 0 0 1px #77b1ff}
.create-game-options button:focus-visible,.quick-games button:focus-visible{outline:3px solid #8fc1ff;outline-offset:3px}
.create-game-picker{border:0;padding:0;margin:20px 0 0;min-width:0}
.create-game-picker legend{font-size:14px;font-weight:700;margin-bottom:10px;color:var(--text)}
#create-game-description{font-size:12px;line-height:1.6;color:var(--muted);margin:9px 0 16px}
#create-modal{overflow-y:auto}
#create-modal .modal-card{max-height:calc(100dvh - 40px);overflow-y:auto;overscroll-behavior:contain}
#create-modal .setting>label{display:block;font-size:13px;color:var(--muted);margin-bottom:8px}
html[data-theme="light"] .quick-games button,html[data-theme="light"] .create-game-options button{background:#f0f5fa;color:#172b41;border-color:#b6cce0}
html[data-theme="light"] .quick-games small,html[data-theme="light"] .create-game-options small{color:#4d6780}
html[data-theme="light"] .create-game-options button.selected{background:#e0efff;border-color:#2878c8;box-shadow:0 0 0 1px #2878c8}
@media(max-width:820px){#create-modal .modal-card{max-height:94dvh}.quick-games{padding:0 10px 12px}.create-game-options strong,.quick-games strong{font-size:16px}}

/* Carrom theme collection */
.store-catalog{grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}
.store-item-card{display:flex;flex-direction:column;align-items:stretch;padding:12px;gap:12px;overflow:hidden}
.store-item-card.is-equipped{border-color:#d4ab67;box-shadow:0 0 0 1px rgba(212,171,103,.22)}
.store-item-visual{width:100%;height:200px;object-fit:contain;border-radius:9px;background:radial-gradient(ellipse at center,#26333b,#10191e)}
.store-item-copy{gap:6px;min-height:100px;padding:0 2px}
.store-item-copy strong{font-size:17px}.store-item-copy small{font-size:11px;line-height:1.7}
.store-item-badge{justify-self:start;font-size:10px;line-height:1.7;font-weight:700;color:#e4c18a}
.store-item-card .ghost{width:100%;margin-top:auto;min-height:40px}
.store-item-card.is-equipped .ghost{opacity:1;color:#e4c18a;background:rgba(212,171,103,.12);cursor:default}
html[data-theme="light"] .store-item-visual{background:radial-gradient(ellipse at center,#f1e8d8,#e0e9ea)}
@media(max-width:480px){.store-catalog{grid-template-columns:1fr}.store-item-visual{height:230px}.store-item-copy{min-height:0}}
.store-category-bar{display:flex;gap:8px;margin-bottom:14px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
.store-category-bar::-webkit-scrollbar{display:none}
.store-category-btn{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);border-radius:18px;color:var(--muted);font-size:12px;font-weight:700;padding:6px 14px;cursor:pointer;white-space:nowrap;transition:all .18s ease;font-family:inherit}
.store-category-btn:hover{background:rgba(255,255,255,.1);color:var(--text)}
.store-category-btn.active{background:#d4ab67;border-color:#d4ab67;color:#12191d}
.store-item-price{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:800;color:#e4c18a;margin-top:2px}
.store-item-btn-buy{background:linear-gradient(135deg,#c48e3d,#e5be71)!important;color:#12181d!important;font-weight:800!important;border:none!important;cursor:pointer}
.store-item-btn-buy:hover{filter:brightness(1.1)}
.profile-sprite-star.dim,.community-public-profile-star.dim,.community-member-star.dim{opacity:.22!important;filter:grayscale(1)!important}

/* Four games fit as two balanced rows in the creation dialog. */
.quick-games,.create-game-options{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Native Flutter owns these navigation surfaces; full account pages remain available. */
html[data-sd-native] .platform-topbar,html[data-sd-native] .mobile-header,html[data-sd-native] .bottom-nav,html[data-sd-native] .sidebar{display:none!important}
html[data-sd-native] .main{padding:12px!important;margin:0!important;min-height:100vh}
html[data-sd-native] .lobby-profile{display:none!important}
@media(max-width:820px){.lobby-profile{display:none!important}.lobby-layout{grid-template-columns:1fr!important}}

/* V36: uncropped game sprites shared with the native lobby. */
.community-room-card .room-game-mark{width:64px;height:64px;flex:0 0 64px;padding:3px;border-radius:14px;background:#20232d;overflow:hidden;display:grid;place-items:center}
.community-room-card .room-game-mark img{display:block;width:100%;height:100%;object-fit:contain}
.room-game-identity>div{min-width:0}
.room-game-identity strong,.room-game-identity p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* V37 public profile showcase: additive styles only */
.sd-public-extra{padding:12px 16px 20px;text-align:right;direction:rtl}.sd-public-extra h3{font-size:15px;color:#e6c887;margin:17px 0 10px}.sd-public-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:120px;overflow:hidden}.sd-public-items.expanded{max-height:none}.sd-public-items>div{min-width:0;border-radius:10px;border:1px solid #304044;background:#142426;padding:8px;text-align:center}.sd-public-items img{width:100%;height:70px;object-fit:contain}.sd-public-items span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.sd-public-more{margin:9px auto;display:block;padding:8px 14px;background:transparent;border:1px solid #70674a;border-radius:9px;color:#e6c887}.sd-public-game{display:grid;grid-template-columns:1fr auto auto;gap:10px;padding:12px 9px;margin:6px 0;background:#142426;border:1px solid #304044;border-radius:10px;font-size:12px}.sd-public-hint{font-size:11px;color:#9daead}
.sd-public-toggle-wrap{margin:10px 0 4px;text-align:center}.sd-public-toggle-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:rgba(255,255,255,.05);border:1px solid rgba(230,200,135,.32);border-radius:18px;padding:7px 18px;color:#e6c887;font-size:12px;font-weight:700;cursor:pointer;transition:all .2s ease;font-family:inherit;outline:none}.sd-public-toggle-btn:hover{background:rgba(230,200,135,.14);border-color:rgba(230,200,135,.65);color:#fff}.sd-public-toggle-arrow{font-size:9px;opacity:.85}.sd-public-full-content{margin-top:4px}


/* Compact shop and navigation: the global bar belongs outside communities. */
.bottom-nav[hidden],body.community-mode .bottom-nav{display:none!important}
.bottom-btn{gap:4px;align-content:center}.bottom-btn svg{width:24px;height:24px;display:block}
.bottom-btn.active svg{stroke-width:2.1}.bottom-btn:focus-visible{outline:2px solid var(--accent);outline-offset:-5px;border-radius:12px}
.store-dashboard{grid-template-columns:minmax(0,1fr);grid-template-areas:"wallet" "catalog" "ledger";gap:16px}
.store-wallet-card{min-height:100px;padding:18px}.store-catalog-panel{padding:16px}
.store-catalog{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
.store-item-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 10px;min-width:0;text-align:center;border-radius:14px}
.store-item-visual{width:56px;height:56px;object-fit:contain;flex:0 0 auto}
.store-item-copy{width:100%;gap:6px;flex:1;align-content:start}.store-item-copy strong{font-size:12px;line-height:1.5;min-height:36px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.store-item-copy>small,.store-item-price{display:none}.store-item-badge{font-size:9px;line-height:1.4;min-height:25px}
.store-item-card .ghost{width:100%;padding:9px 3px;min-height:36px;font-size:11px;white-space:normal;margin-top:auto}
.store-pagination{display:flex;justify-content:center;align-items:center;gap:20px;margin-top:20px}.store-pagination[hidden]{display:none}
.store-pagination button{border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);padding:9px 14px;font:inherit;font-size:12px}.store-pagination button:disabled{opacity:.4;cursor:default}.store-pagination span{font-size:12px;direction:ltr;color:var(--muted)}
@media(max-width:600px){.store-catalog-panel{padding:10px}.store-catalog{gap:7px}.store-item-card{padding:12px 6px;gap:7px;border-radius:11px}.store-item-visual{width:44px;height:44px}.store-item-copy strong{font-size:11px;min-height:33px}.store-item-card .ghost{font-size:10px;padding:8px 2px}.store-item-badge{font-size:8px}.store-wallet-main strong{font-size:28px}}

.store-ledger-panel{min-height:0}.store-ledger-panel .empty{padding:24px 12px}

/* Mobile community sections share the available screen instead of stacking. */
.community-mobile-tabs{display:none}
.community-chat-message{display:flex;direction:ltr;width:fit-content;max-width:90%;margin-right:auto;margin-left:0;align-items:flex-start}
.community-chat-message.me{margin-left:auto;margin-right:0;flex-direction:row-reverse}
.community-chat-bubble{min-width:0;direction:rtl;border-radius:12px;overflow-wrap:anywhere}
@media(max-width:820px){
 .community-mobile-tabs{display:flex;position:sticky;top:0;z-index:30;background:var(--panel,#151e25);border-bottom:1px solid #34434a;padding:5px;gap:5px}
 .community-mobile-tabs button{flex:1;min-height:44px;border:0;background:transparent;color:inherit;font:600 13px system-ui;border-bottom:3px solid transparent;cursor:pointer}
 .community-mobile-tabs button[aria-selected="true"]{border-bottom-color:#65cbbc;color:#65cbbc}
 .community-layout{display:block;margin-top:10px}
 .community-layout[data-mobile-tab="members"]>.community-games-panel,.community-layout[data-mobile-tab="members"]>.community-chat-panel,
 .community-layout[data-mobile-tab="games"]>.community-members-panel,.community-layout[data-mobile-tab="games"]>.community-chat-panel,
 .community-layout[data-mobile-tab="chat"]>.community-members-panel,.community-layout[data-mobile-tab="chat"]>.community-games-panel{display:none}
 .community-chat-panel{min-height:0;height:calc(100dvh - 230px);display:flex;flex-direction:column}
 .community-chat-messages{flex:1;min-height:100px;max-height:none;overflow:auto}
 .community-chat-form{flex-shrink:0}.community-members{max-height:none}
}

/* Bound the room columns; only their content scrolls. */
@media(min-width:821px){.community-layout{height:calc(100dvh - 230px);min-height:320px;grid-template-rows:minmax(0,1fr);align-items:stretch}.community-column{height:100%;max-height:100%;min-height:0}.community-chat-panel{display:flex;flex-direction:column}.community-chat-panel .column-head{flex-shrink:0}.community-chat-messages{flex:1;min-height:0;max-height:none}.community-games-panel{display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;overflow-y:auto!important;overflow-x:hidden;overscroll-behavior:contain}.community-games-panel>.column-head,.community-games-panel>.community-create-table{flex-shrink:0}.community-members-panel{display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0}.community-members{min-height:0;flex:1;max-height:none;overflow:auto}}
.community-chat-messages{overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#64838a transparent;padding:16px 12px;gap:12px}
.community-chat-message{flex-shrink:0;max-width:94%}.community-chat-bubble{padding:10px 12px;border-radius:15px}.community-chat-bubble p{font-size:13px;line-height:1.7}.community-chat-meta strong{font-size:11px}.community-chat-meta time{font-size:9px}.community-chat-form{flex-shrink:0;padding:12px}.community-chat-form textarea{font-size:14px}
@media(max-width:820px){.community-chat-panel{height:calc(100dvh - 230px);min-height:220px}.community-chat-messages{min-height:0;max-height:none}}

/* Email authentication shares the native form spacing and responsive width. */
#firebase-auth-form [data-status]{margin:0;line-height:1.7;font-size:13px;overflow-wrap:anywhere}
#firebase-auth-form input:disabled{opacity:.65}

/* Platform settings and the same movable profile card on home/profile. */
.settings-open{overflow:hidden}.platform-settings{position:fixed;inset:0;z-index:2000;background:rgba(7,19,29,.48);backdrop-filter:blur(5px);display:grid;place-items:center;padding:20px}.platform-settings.hidden{display:none}.settings-window{width:min(620px,100%);max-height:90dvh;overflow:auto;padding:24px}.settings-window>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.settings-window>nav{display:flex;gap:8px;margin:16px 0;flex-wrap:wrap}.settings-window [aria-pressed=true]{border-color:var(--accent,#c7a35a);background:rgba(199,163,90,.12)}.settings-window [data-settings-panel]>button{margin:8px}.settings-window .auth-card{box-shadow:none;border:0;background:transparent;padding:8px;width:100%;max-width:none}.settings-window .auth-card>.logo-mark,.settings-window .auth-card>h1,.settings-window #auth-theme-toggle{display:none}.settings-window [data-settings-panel=notifications] label{display:flex;align-items:center;gap:10px}.settings-window #system-notifications .panel{margin-top:14px}
.community-chat-meta{direction:rtl;justify-content:flex-start;align-items:center;gap:6px}.community-chat-profile-name{unicode-bidi:plaintext}.community-chat-sticker{display:inline-block;flex:0 0 18px;width:18px;height:18px}.community-chat-meta time{white-space:nowrap;unicode-bidi:isolate}.chat-delivery-status{font-size:10px;opacity:.7}
@media(max-width:600px){.platform-settings{padding:10px}.settings-window{padding:16px;max-height:94dvh}}
.account-summary{padding:18px;border:1px solid var(--line);border-radius:14px;margin:16px 0}.account-email{direction:ltr;text-align:right;overflow-wrap:anywhere}.account-device{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:16px 0;border-bottom:1px solid var(--line)}.account-device>div{min-width:0}.account-device p{font-size:12px;margin:6px 0;overflow-wrap:anywhere}.account-device button{flex-shrink:0}.account-delete-dialog{width:min(480px,calc(100vw - 32px));max-height:90dvh;overflow:auto;border:1px solid var(--line);border-radius:20px;background:var(--panel,#fff);color:var(--text,#122630);padding:24px;line-height:1.8}.account-delete-dialog::backdrop{background:#10263088}.account-delete-dialog label{display:grid;gap:8px}.account-delete-dialog input{width:100%;box-sizing:border-box}.account-delete-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px}#account-security-status.error,#delete-account-error{color:#bc303b}
@media(max-width:600px){.settings-window>nav{flex-wrap:nowrap;overflow-x:auto;padding-bottom:8px}.settings-window>nav button{flex-shrink:0}.account-device{align-items:flex-start;gap:8px}.account-device button{font-size:12px;padding:8px}.settings-window{width:100%;max-width:100%}}

/* The home slot holds the full profile view at its normal width. */
.community-home{grid-template-columns:minmax(0,1fr) 540px}#home-profile{grid-area:profile;direction:rtl;min-width:0;width:100%;max-width:540px;align-self:start}
@media(max-width:1100px){.community-home{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"profile" "browser"}#home-profile{margin-inline:auto}.community-browser{width:100%}}

/* Phone rooms use the viewport: header, tabs, one scroll area, composer. */
@media(max-width:820px){
 body.community-mode{overflow:hidden;background:var(--panel)}
 body.community-mode .main{margin:0;padding:0!important;height:100dvh;min-height:0}
 body.community-mode #page-lobby{height:100%;max-width:none;margin:0;padding:0}
 body.community-mode #community-room:not(.hidden){height:100%;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top);box-sizing:border-box}
 .community-room-head{display:flex;align-items:center;justify-content:space-between;flex:0 0 58px;gap:8px;padding:6px 12px;margin:0;border:0;border-radius:0;box-shadow:none!important}
 .community-active-identity{flex:1;min-width:0;gap:8px}
 .community-active-identity h2{font-size:16px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .community-active-identity small,.community-active-identity p{display:none}
 .community-active-identity .community-mark{width:32px;height:32px;min-width:32px;font-size:15px;border-radius:50%}
 .community-room-head-actions{display:flex;width:auto;flex-wrap:nowrap;gap:6px;grid-column:auto}
 .community-room-head-actions #open-create{display:none}
 .community-room-head-actions #exit-community{font-size:0;width:34px;height:38px;padding:0;border:0;background:transparent}
 .community-room-head-actions #exit-community::after{content:"›";font-size:30px;color:var(--text)}
 .community-room-head-actions #room-settings-btn{font-size:0;width:34px;height:38px;padding:0;border:0;background:transparent}
 .community-room-head-actions #room-settings-btn::after{content:"⚙";font-size:22px;color:var(--muted)}
 .community-mobile-tabs{position:static;flex:0 0 49px;padding:0;gap:0;background:var(--panel);border-bottom:1px solid var(--line)}
 .community-mobile-tabs button{font-weight:500;color:var(--muted);border-radius:0}
 .community-mobile-tabs button[aria-selected="true"]{color:#168de2;border-bottom-color:#168de2}
 .community-layout{flex:1;min-height:0;height:auto;margin:0;overflow:hidden}
 .community-layout>.community-column{height:100%;min-height:0;box-sizing:border-box;border:0;border-radius:0;box-shadow:none;background:var(--panel)}
 .community-chat-panel>.column-head{display:none}
 .community-chat-messages{flex:1;min-height:0;padding:14px 8px;gap:18px;overflow:auto;background:var(--panel)}
 .community-chat-message{max-width:97%}
 .community-chat-bubble:not(.sd-decorated-message){border:0;border-radius:20px;padding:10px 16px;box-shadow:none}
 html[data-theme="light"] .community-chat-bubble:not(.sd-decorated-message){background:#f1f2f3;color:#383c40}
 .community-chat-bubble p{font-size:15px;line-height:1.5}
 .community-chat-form{padding:6px 10px calc(6px + env(safe-area-inset-bottom));min-height:54px;gap:8px;border-top:1px solid var(--line);background:var(--panel);align-items:center}
 .community-chat-form textarea{min-height:38px;height:38px;max-height:90px;resize:none;border:0;background:transparent;box-shadow:none;padding:8px;font-size:16px}
 .community-chat-form .primary{font-size:0;width:38px;min-height:38px;padding:0;border:0;background:transparent;color:var(--muted);box-shadow:none}
 .community-chat-form .primary::after{content:"➤";font-size:25px;display:block;transform:rotate(180deg)}
 .community-members-panel,.community-games-panel{overflow:auto}
}

@media(max-width:820px){#community-tab-games{order:0}#community-tab-chat{order:1}#community-tab-members{order:2}}

.community-composer-game{display:none}@media(max-width:820px){.community-chat-form{grid-template-columns:auto 1fr auto}.community-composer-game{display:block;border:0;background:transparent;color:var(--muted);font-size:23px;padding:5px}.community-composer-game::after{content:"＋"}.community-chat-form textarea{grid-column:2;grid-row:1}.community-chat-form .primary{grid-column:3;grid-row:1}}

/* The home profile keeps its full content in a narrower, quieter column. */
@media(min-width:1101px){.community-home{grid-template-columns:minmax(0,1fr) 370px}#home-profile{max-width:370px}}
#home-profile .profile-showcase .profile-cover{height:128px}
#home-profile .profile-showcase .profile-avatar{width:104px;height:104px}
#home-profile .profile-showcase .profile-showcase-body{padding:0 16px 18px}
#home-profile .profile-showcase .profile-name-row h3{font-size:20px!important}
#home-profile .profile-showcase .profile-stats{margin-top:12px;padding:6px 0}
#home-profile .profile-showcase .sd-profile-details{margin-top:14px}
#home-profile .profile-showcase .sd-collection-section{margin-bottom:14px}
#home-profile .profile-showcase .sd-game-statistics{padding:12px}
#home-profile .profile-showcase .sd-rank-row{padding-block:10px}
.google-auth-button{display:flex;align-items:center;justify-content:center;gap:12px;min-height:46px;border:1px solid #c6cbd1;border-radius:12px;background:#fff;color:#30343b;font:600 14px Arial,sans-serif;padding:10px 16px;cursor:pointer}
.google-auth-button:hover{background:#f5f7fa}.google-auth-button:disabled{opacity:.55;cursor:wait}
.google-auth-mark{font-size:22px;font-weight:800;color:#4285f4;font-family:Arial,sans-serif}
.auth-divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin:4px 0}.auth-divider::before,.auth-divider::after{content:"";height:1px;flex:1;background:var(--line)}

.settings-window .auth-card>p.muted:not(#auth-context){display:none}.settings-window #auth-context{font-size:12px;line-height:1.7;margin:0 0 18px}.settings-window .auth-card{border-radius:0}.settings-window #firebase-auth-form{gap:12px}.settings-window #firebase-auth-form [data-reset],.settings-window #firebase-auth-form [data-mode]{font-size:13px;padding:9px;background:transparent;border-color:var(--line)}

/* Phone navigation lives in the bottom bar; profile and settings have one home. */
@media(max-width:820px){
 #home-profile{display:none!important}
 .community-home{display:block}
 .main{padding-top:calc(14px + env(safe-area-inset-top))}
 .platform-topbar,.mobile-header{display:none!important}
 .profile-page-heading{display:none}
}
#community-chat-messages{direction:ltr;align-items:stretch}
#community-chat-messages>.community-chat-message{direction:ltr;margin-left:0;margin-right:auto;align-self:flex-start}
#community-chat-messages>.community-chat-message.me{margin-left:auto;margin-right:0;align-self:flex-end}
#community-chat-messages .community-chat-content{direction:ltr}
/* Small line controls keep the room header and composer clear. */
.community-header-actions #exit-community,.community-exit-btn,#open-create{width:38px;min-width:38px;height:38px;padding:8px!important;border-radius:12px;display:inline-grid;place-items:center}

.community-exit-btn svg,#open-create svg,.chat-send-icon svg,#community-stickers svg{width:22px;height:22px;display:block}
.chat-send-icon{width:42px;min-width:42px;padding:9px!important;border-radius:50%!important;align-self:center}
#community-stickers{padding:7px;align-self:center}.room-policy-form{padding:20px;display:flex;flex-wrap:wrap;gap:14px;margin:18px 0}.room-policy-form h3,.room-policy-form p{width:100%;margin:0}.room-policy-form label{display:grid;gap:7px;flex:1 1 180px}.room-policy-form input,.room-policy-form select{width:100%;padding:10px;border:1px solid #93a9ad66;border-radius:9px;font:inherit}.room-policy-form p{font-size:12px}
.community-room-head{position:relative;padding-inline-start:48px}.community-room-head-actions{position:static}#exit-community{position:absolute;inset-inline-start:0;top:0}#leave-community{display:none}
/* Replace legacy pseudo-icons and three-column mobile composer as one layout. */
#community-chat-form{display:flex;align-items:center;direction:rtl;gap:6px;min-height:56px;padding:6px 10px calc(6px + env(safe-area-inset-bottom))}
#community-chat-form textarea{flex:1;min-width:0;min-height:38px;height:38px;max-height:90px;resize:none;font-size:15px;padding:8px}
#community-chat-form button{flex:0 0 40px;width:40px;min-width:40px;height:40px;min-height:40px;padding:8px!important;display:grid;place-items:center;border:0;box-shadow:none}
#community-chat-form .primary::after,#exit-community::after{content:none!important}
#community-composer-create{display:none!important}#community-room #open-create{display:grid!important;flex:0 0 44px;width:44px;min-width:44px;height:44px}
#community-room #exit-community{width:44px;min-width:44px;height:44px;top:5px}

/* Room actions and a stable, four-line mobile composer. */
#community-room .community-room-head{padding-inline-start:0}
#community-room .community-room-head-actions{position:static;display:flex;align-items:center;gap:8px}
#community-room #exit-community{position:static;inset:auto;flex:0 0 44px;width:44px;min-width:44px;height:44px;border-radius:12px;background:#df49491a;border:1px solid #df494944;color:#e76565}
#community-room #exit-community:hover{background:#df49492e}
#community-chat-form{align-items:flex-end}
#community-chat-form textarea{font-size:16px;line-height:24px;box-sizing:border-box;min-height:40px;height:40px;max-height:112px;padding:8px 10px;resize:none;overflow-y:hidden;scrollbar-width:none}
#community-chat-form textarea::-webkit-scrollbar{display:none;width:0;height:0}
#community-panel-chat.sd-selecting-stickers .community-chat-messages{display:none!important}
#community-panel-chat .sd-sticker-panel-mobile{position:static;width:100%;max-height:none;min-height:0;flex:1;margin:0;box-shadow:none;border:0;border-radius:0;overflow:auto}

#community-chat-form button{align-self:flex-end}

/* Plazr brand marks retain clear space at small interface sizes. */
.logo-small,.logo-mark{background:#171b26;box-shadow:none}
.logo-small img,.logo-mark img{display:block;object-fit:contain;width:100%;height:100%;padding:3px;box-sizing:border-box}

/* Local country artwork is consistent across browsers, including Windows. */
.community-country-flag{display:block;width:100%;height:100%;object-fit:contain;border-radius:50%}
.community-card-mark:has(.community-country-flag),.community-mark:has(.community-country-flag){background:transparent;border:0;padding:0;box-shadow:none;border-radius:50%}

/* Confirmation becomes loading in the same small window; never blur the room. */
.game-entry-overlay{position:fixed;inset:0;z-index:25000;display:grid;place-items:center;padding:18px;background:#0002;backdrop-filter:none;direction:rtl}
.game-entry-sheet{width:min(360px,100%);max-height:calc(100dvh - 36px);overflow:auto;padding:22px;background:var(--panel,#121b20);color:var(--text,#edf3f0);border:1px solid var(--line,#344149);border-radius:20px;box-shadow:0 14px 48px #0003;outline:none}
.game-entry-sheet header{display:flex;align-items:center;gap:14px}.game-entry-art{object-fit:contain;flex:0 0 58px;border-radius:14px}
.game-entry-room{font-size:11px;color:var(--muted,#91a0ad)}.game-entry-sheet h3{font-size:20px;margin:4px 0;line-height:1.4}
.game-entry-description{font-size:14px;line-height:1.8;margin:20px 0;color:var(--muted,#91a0ad)}
.game-entry-sheet footer{display:flex;gap:10px;margin-top:22px}.game-entry-sheet footer button{flex:1;min-height:44px;border-radius:12px}
.game-entry-loading{display:grid;justify-items:center;gap:12px;padding:26px 0 10px;text-align:center;font-size:15px}.game-entry-loading small{font-size:12px;color:var(--muted,#91a0ad)}
.game-entry-spinner{width:30px;height:30px;border:3px solid #4bff1228;border-top-color:#2daba5;border-radius:50%;animation:plazr-entry-spin .8s linear infinite}
.game-entry-error{font-size:14px;line-height:1.8;color:var(--red,#e67676)}
.game-entry-sheet [hidden]{display:none!important}
@keyframes plazr-entry-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.game-entry-spinner{animation:none;border-top-color:#2daba5;border-bottom-color:#2daba5}}

.community-chat-identity{display:inline-flex;direction:rtl;align-items:center;gap:3px;min-width:0}
.community-chat-identity .community-chat-sticker{margin:0!important;flex-shrink:0}
.community-public-profile-handle{white-space:pre-line;overflow-wrap:anywhere;max-width:100%;line-height:1.7}
.community-public-profile-handle[hidden]{display:none!important}
#profile-bio-input{width:100%;font:inherit;font-size:16px;line-height:1.6;min-height:86px;max-height:160px;resize:vertical;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text)}

.community-member-title{direction:rtl;gap:3px}
.community-members .community-member{display:grid;grid-template-columns:66px minmax(0,1fr) 7px;gap:11px;min-height:88px;padding:8px 5px;box-sizing:border-box;border:0;border-bottom:1px solid var(--line,#294248);border-radius:0;background:none;transform:none}
.community-members .community-member:last-child{border-bottom:0}
.community-members .community-member-avatar{width:64px;height:64px;border:1.5px solid #3a5059;border-radius:5px;overflow:hidden;padding:2px;box-shadow:none;box-sizing:border-box;flex-shrink:0}
.community-members .community-member-avatar img{border-radius:2px;object-fit:cover}
.community-members .community-member-copy{display:flex;flex-direction:column;align-items:stretch;gap:3px;min-width:0}
.community-members .community-member-title{display:flex;flex:initial;gap:3px;min-width:0}
.community-members .community-member-title strong{font-size:17px;font-weight:600;line-height:1.4;max-width:none;min-width:0;flex:1}
.community-members .community-member-emblem{width:24px;height:24px;flex:0 0 24px}
.community-members .community-member-stars{display:flex;justify-content:flex-end;direction:ltr;gap:0;min-height:0;flex:initial}
.community-members .community-member-star{width:18px;height:18px}
.community-members .community-member-meta{display:flex;direction:rtl;align-items:center;flex-wrap:wrap;gap:6px 16px;overflow:visible;font-size:12px;line-height:1.5;color:var(--muted,#a0b7ba)}
.community-members .community-member-meta>span{display:inline-flex;align-items:center;gap:4px;overflow:visible;white-space:nowrap}
.community-members .community-member-meta span+span:before{content:none}
.community-members .community-member-reputation .sd-reputation-flame{width:20px;height:24px;flex:0 0 20px}
.community-members .community-member-trophy{width:18px;height:18px;flex:0 0 18px}

.platform-legal-links{display:flex;justify-content:center;flex-wrap:wrap;gap:10px 16px;padding:16px 10px;font-size:12px;line-height:1.8}
.platform-legal-links a{color:var(--muted);text-underline-offset:3px}.platform-legal-links small{width:100%;text-align:center;color:var(--muted);font-size:11px}

/* Keep visual design while giving assistive navigation one application heading. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
html[data-theme="light"]{--muted:#596d77}
html[data-theme="light"] .empty{color:#5e707a}
html[data-theme="light"] .profile-showcase .profile-stat small{color:#596e70!important}
html[data-theme="light"] .community-mobile-tabs button[aria-selected="true"]{color:#0867ac}

/* Member rows follow left-to-right visual order; Arabic text remains readable. */
.community-members{direction:ltr;scrollbar-width:thin;scrollbar-color:#7f999d transparent;scrollbar-gutter:stable}
.community-members-panel{scrollbar-width:thin;scrollbar-color:#7f999d transparent}
.community-members::-webkit-scrollbar,.community-members-panel::-webkit-scrollbar{display:block;width:8px;height:8px}
.community-members::-webkit-scrollbar-thumb,.community-members-panel::-webkit-scrollbar-thumb{background:#7f999d;border-radius:8px}
.community-members .community-member{direction:ltr;text-align:left}
.community-members .community-member-copy{text-align:left}
.community-members .community-member-title{direction:ltr}
.community-members .community-member-title strong{text-align:left;unicode-bidi:plaintext}
.community-members .community-member-stars{justify-content:flex-start}
.community-members .community-member-meta{direction:ltr;justify-content:flex-start;text-align:left}
.community-members .community-member-meta>span{direction:ltr}
.community-members .community-member-reputation .sd-reputation-flame{flex:0 0 20px;width:20px;height:22px;line-height:1}
.community-members .community-member-meta>span{gap:3px;line-height:22px;align-items:center}

/* Plazr table lobby: existing room actions and game rules remain unchanged. */
.community-create-table{display:flex;align-items:center;gap:12px;width:100%;padding:14px 18px;margin:4px 0 24px;border:1px solid #b99a58;border-radius:12px;background:linear-gradient(120deg,#173a40,#102a32);color:#f2d899;text-align:start;cursor:pointer}
.community-create-table>span{font-size:30px;line-height:1}.community-create-table strong{font-size:16px}.community-create-table small{margin-inline-start:auto;color:#c0d1d0;font-size:11px}
.community-create-table:hover{border-color:#efd18c;background:#20434a}
.community-game-rooms{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;gap:38px 12px!important;padding-top:25px;padding-bottom:28px;align-content:start;max-height:none!important;height:auto!important;overflow:visible!important}
.community-game-rooms>.empty{grid-column:1/-1}
.community-game-rooms .plazr-table-card{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:9px;min-height:220px;padding:0 10px 12px!important;border:1px solid #7b704b;border-radius:12px;background:linear-gradient(150deg,#183a3f,#10272e);overflow:visible;box-shadow:0 7px 17px #0002;text-align:center;transform:none}
.plazr-table-card .room-game-identity{display:flex;flex-direction:column;gap:0;margin:0 -10px;padding:30px 7px 10px;border-radius:11px 11px 0 0;background:linear-gradient(110deg,#c6a15c,#edce8b);color:#172f35;min-height:66px;box-sizing:border-box}
.plazr-table-card .room-game-mark{position:absolute;top:-30px;left:50%;transform:translateX(-50%);width:64px;height:64px;border-radius:50%;border:2px solid #d8ba73;background:radial-gradient(circle,#31555a,#102730);box-shadow:0 4px 9px #0005;display:grid;place-items:center}
.plazr-table-card .room-game-mark img{width:56px;height:56px;object-fit:contain}
.plazr-table-card .room-game-identity strong{color:#142e34;font-size:14px}.plazr-table-card .room-game-identity small,.plazr-table-card .room-game-identity p{display:none}
.plazr-table-card .room-mobile-top,.plazr-table-card .room-mobile-meta,.plazr-table-card .room-mobile-host{display:none!important}
.plazr-table-card .room-roster{display:flex;justify-content:center;align-items:center;gap:7px;min-height:35px}
.plazr-table-card .room-player-slot{width:33px;height:33px;min-width:33px}.plazr-table-card .room-player-slot img{width:100%;height:100%;object-fit:cover}
.table-player-names{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 10px;color:#e8efec;font-size:12px;min-height:18px}.table-player-names span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.plazr-table-card .room-desktop-state{display:flex;align-items:center;justify-content:center;gap:6px;color:#c7d8d7;font-size:11px}.plazr-table-card .room-desktop-state strong{font-size:12px}.plazr-table-card>.primary,.plazr-table-card>.secondary{width:100%;min-height:31px;margin-top:auto;border-radius:7px;font-size:12px}
.create-game-options button{display:grid;grid-template-columns:64px minmax(0,1fr);grid-template-rows:auto auto;column-gap:12px;text-align:start;align-items:center;padding:12px!important;min-height:92px}
.create-game-art{grid-row:1/3;width:64px;height:64px;object-fit:contain;filter:drop-shadow(0 3px 4px #0003)}.create-game-options button strong{align-self:end}.create-game-options button small{align-self:start}
html[data-theme="light"] .community-create-table{background:linear-gradient(110deg,#e2efed,#f8f5e9);color:#25434a}html[data-theme="light"] .community-create-table small{color:#5e7476}
@media(max-width:820px){.community-game-rooms{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:38px 10px!important}.community-create-table{margin-bottom:20px}.community-create-table small{display:none}.community-game-rooms .plazr-table-card{min-height:215px}.create-game-options{grid-template-columns:1fr!important}}

.member-web-actions{display:flex;justify-content:flex-end;gap:5px}.member-web-actions button{display:grid;place-items:center;width:24px;height:23px;padding:0;border:1px solid #a78a4a;border-radius:5px;background:#18383e;color:#f1d99c;font-size:21px;line-height:1;cursor:pointer}.member-web-actions button:disabled{opacity:.4;cursor:default}.member-web-actions button:hover{background:#31545a}.web-challenge-modal{z-index:1600}.web-challenge-modal .modal-card{max-width:390px;display:grid;gap:14px}.web-challenge-modal select{width:100%;padding:12px;border-radius:9px;font:inherit}.web-challenge-modal p{line-height:1.7}.community-members .community-member:has(.member-web-actions){min-height:103px}

/* Anchor member decoration and actions to their own card. */
.community-members .community-member{position:relative}
.community-members .community-member-emblem{position:absolute;top:9px;right:8px;width:26px;height:26px}
.community-members .community-member-title{padding-right:30px}
.community-members .member-web-actions{position:absolute;right:8px;bottom:8px;margin:0;align-items:center}
.community-members .member-web-actions button{width:25px;height:23px;box-shadow:none}
.community-members .community-member:has(.member-web-actions) .community-member-copy{padding-bottom:22px}
.community-members .community-member-online{position:absolute;right:11px;top:43px}
.community-members .community-member:has(.member-web-actions){min-height:103px;padding-top:8px;padding-bottom:8px}

/* Presence is implied by the online list; align identity with the avatar top. */
.community-members .community-member-online{display:none}
.community-members .community-member{align-items:start}
.community-members .community-member-avatar{align-self:start}
.community-members .community-member-copy{align-self:start}
.community-members .community-member-title strong{line-height:1.25}
.community-members .member-web-actions button svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}

/* Fixed table tracks prevent a lone match from stretching across the lobby. */
.community-game-rooms{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))!important}
.community-game-rooms .plazr-table-card{min-height:145px!important;gap:6px;padding:0 8px 8px!important;border-radius:7px}
.community-game-rooms .plazr-table-card .room-game-identity{margin:0 -8px;padding:23px 6px 7px;min-height:49px;border-radius:6px 6px 0 0;text-align:center;align-items:center;justify-content:center}
.community-game-rooms .plazr-table-card .room-game-identity strong{display:block;font-size:13px;line-height:1.4;font-weight:800;color:#18343a;white-space:normal}
.community-game-rooms .plazr-table-card .room-game-mark{width:49px;height:49px;top:-27px}
.community-game-rooms .plazr-table-card .room-game-mark img{width:43px;height:43px}
.community-game-rooms .plazr-table-card .room-roster{display:none}
.community-game-rooms .plazr-table-card .table-player-names{display:flex;flex-direction:column;gap:2px;justify-content:center;min-height:36px;color:#f4e7bf;font-size:13px;font-weight:700;line-height:1.3}
.community-game-rooms .plazr-table-card .room-desktop-state{display:none}
.community-game-rooms .plazr-table-card>.primary,.community-game-rooms .plazr-table-card>.secondary{min-height:25px;padding:3px 6px;font-size:11px;background:#25494d;color:#f2dfab;border:1px solid #71866d}
html[data-theme="light"] .community-game-rooms .plazr-table-card,html[data-theme="light"] .community-game-rooms .plazr-table-card:hover{background:linear-gradient(135deg,#21434a,#112d34);border-color:#b59a5d}
@media(max-width:820px){.community-game-rooms{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Challenge dialogs stay centered and compact on desktop and phone web. */
.modal.web-challenge-modal{display:flex;align-items:center!important;justify-content:center!important;padding:18px!important;box-sizing:border-box;background:rgba(5,15,19,.48);backdrop-filter:blur(3px)}
.modal.web-challenge-modal .modal-card{width:350px;max-width:100%;max-height:calc(100dvh - 36px);min-height:0;margin:0!important;padding:0 0 18px!important;border:1px solid #9b8452;border-radius:12px!important;background:#142c33;color:#f3ead3;box-shadow:0 16px 45px #0005;display:flex;flex-direction:column;gap:0;overflow:auto;text-align:center;transform:none!important}
.challenge-heading{position:relative;padding:18px 40px 15px;background:#10252c;border-bottom:1px solid #345057}
.web-challenge-modal .challenge-heading h3{font-size:16px;line-height:1.5;margin:0;color:#f3e1b8;text-align:center}
.web-challenge-modal .challenge-close{position:absolute;right:10px;top:12px;width:26px;height:26px;padding:0;border:0;background:transparent;color:#cfdbda;font:26px/1 system-ui;cursor:pointer}
.challenge-game-strip{padding:8px 12px;background:linear-gradient(100deg,#94783e,#c4a364);color:#102a31;font-size:13px;font-weight:750}
.challenge-select-label{display:flex;flex-direction:column;gap:7px;margin:20px 20px 0;text-align:right;color:#c5d6d5;font-size:12px}
.modal.web-challenge-modal select{appearance:auto;box-sizing:border-box;min-height:43px;padding:8px 10px!important;background:#0d2229;color:#f4e6c7;border:1px solid #567173;border-radius:7px;font:600 14px system-ui}
.modal.web-challenge-modal p{margin:17px 20px 22px;font-size:12px;line-height:1.7;color:#acc2c3}
.modal.web-challenge-modal .challenge-action{align-self:center;width:auto;min-width:125px;min-height:35px;padding:7px 20px;margin:4px 0 0;background:linear-gradient(#d7bd80,#b49557);color:#152e34;border:1px solid #d1b576;border-radius:7px;box-shadow:none;font:700 13px system-ui}
.modal.web-challenge-modal .challenge-secondary{background:transparent;color:#c2d3d3;border-color:transparent;min-height:28px;padding:5px 15px;font-weight:500}
@media(max-width:600px){.modal.web-challenge-modal .modal-card{width:330px!important;border-radius:12px!important}.web-challenge-modal .challenge-heading h3{font-size:15px}}

/* Light Plazr invitation card with a server-timed thirty-second clock. */
.modal.web-challenge-modal .modal-card{min-height:420px;width:350px;background:#f7faf9;color:#233f43;border-color:#c6b483;box-shadow:0 18px 55px #102b3440}
.modal.web-challenge-modal .challenge-heading{background:#e9f0ef;border-bottom:1px solid #d8e2df;padding-top:19px;padding-bottom:18px}
.modal.web-challenge-modal .challenge-heading h3{color:#263f43}
.modal.web-challenge-modal .challenge-close{color:#526d70}
.modal.web-challenge-modal .challenge-game-strip{background:linear-gradient(100deg,#e8ddbd,#f4ecd6);color:#66522b;border-bottom:1px solid #dbcca3}
.modal.web-challenge-modal .challenge-select-label{color:#577174;margin-top:24px}
.modal.web-challenge-modal select{background:#fff;color:#24444a;border-color:#c4d5d4}
.modal.web-challenge-modal p{color:#657d7e;margin-bottom:18px}
.modal.web-challenge-modal .challenge-action{margin-top:auto;min-width:135px;min-height:36px}
.modal.web-challenge-modal .challenge-secondary{margin-top:8px;color:#617a7c}
.challenge-countdown{--remaining:1;position:relative;flex-shrink:0;width:132px;height:132px;border-radius:50%;margin:8px auto 30px;background:conic-gradient(#bb9950 calc(var(--remaining)*360deg),#dce7e4 0);display:flex;flex-direction:column;justify-content:center;align-items:center;isolation:isolate}
.challenge-countdown:before{content:"";position:absolute;inset:6px;border-radius:50%;background:#f7faf9;z-index:-1}
.challenge-countdown strong{font:750 47px/1.1 system-ui;color:#24464b;font-variant-numeric:tabular-nums}
.challenge-countdown small{font-size:12px;color:#738785;margin-top:3px}
@media(max-width:600px){.modal.web-challenge-modal .modal-card{min-height:min(420px,calc(100dvh - 36px));width:330px!important}}

/* Challenge colors follow the platform theme. */
html[data-theme="light"] .modal.web-challenge-modal .modal-card{background:#fff;color:var(--text,#243b40)}
html[data-theme="light"] .modal.web-challenge-modal .challenge-heading{background:#f4f7f7}
html[data-theme="light"] .challenge-countdown:before{background:#fff}
html[data-theme="dark"] .modal.web-challenge-modal .modal-card{background:var(--panel,#10191e);color:var(--text,#e8efed);border-color:#756747;box-shadow:0 18px 55px #0007}
html[data-theme="dark"] .modal.web-challenge-modal .challenge-heading{background:var(--panel,#10191e);border-bottom-color:var(--line,#294044)}
html[data-theme="dark"] .modal.web-challenge-modal .challenge-heading h3{color:var(--text,#e8efed)}
html[data-theme="dark"] .modal.web-challenge-modal .challenge-close{color:var(--muted,#a0b4b7)}
html[data-theme="dark"] .modal.web-challenge-modal .challenge-game-strip{background:linear-gradient(100deg,#635333,#887047);color:#f4e6c3;border-bottom-color:#8a7447}
html[data-theme="dark"] .modal.web-challenge-modal .challenge-select-label,html[data-theme="dark"] .modal.web-challenge-modal p,html[data-theme="dark"] .modal.web-challenge-modal .challenge-secondary{color:var(--muted,#a0b4b7)}
html[data-theme="dark"] .modal.web-challenge-modal select{background:var(--bg,#0b1419);color:var(--text,#e8efed);border-color:var(--line,#294044)}
html[data-theme="dark"] .challenge-countdown{background:conic-gradient(#c6a35e calc(var(--remaining)*360deg),var(--line,#294044) 0)}
html[data-theme="dark"] .challenge-countdown:before{background:var(--panel,#10191e)}
html[data-theme="dark"] .challenge-countdown strong{color:var(--text,#e8efed)}
html[data-theme="dark"] .challenge-countdown small{color:var(--muted,#a0b4b7)}

/* Member rows fit the avatar height; controls occupy the same row. */
.community-members .community-member,
.community-members .community-member:has(.member-web-actions){min-height:80px;padding:8px 5px;box-sizing:border-box}
.community-members .community-member:has(.member-web-actions) .community-member-copy{padding-bottom:0;padding-right:61px;gap:2px}
.community-members .community-member-title{padding-right:0}
.community-members .member-web-actions{bottom:8px;right:8px}
.community-members .community-member-meta{gap:3px 9px;font-size:11px}

/* A quieter table card: one short title, two names, and a compact action. */
.community-game-rooms{gap:38px 14px!important}
.community-game-rooms .plazr-table-card{min-height:140px!important;gap:7px;border-color:#698080;border-radius:9px;box-shadow:0 4px 12px #0002;background:linear-gradient(145deg,#25474d,#19363d)}
.community-game-rooms .plazr-table-card .room-game-identity{min-height:44px;padding:19px 8px 7px;border-radius:8px 8px 0 0;background:linear-gradient(110deg,#cfb477,#e5cd94)}
.community-game-rooms .plazr-table-card .room-game-identity strong{font-size:14px;font-weight:650;line-height:1.4;letter-spacing:0}
.community-game-rooms .plazr-table-card .room-game-mark{top:-25px;width:46px;height:46px;border:1px solid #c6ad70;background:#e9e5d6;box-shadow:0 2px 5px #0003}
.community-game-rooms .plazr-table-card .room-game-mark img{width:40px;height:40px}
.community-game-rooms .plazr-table-card .table-player-names{min-height:43px;gap:3px;line-height:1.35;font-size:14px;font-weight:600;color:#f1f5ed}
.community-game-rooms .plazr-table-card>.primary,.community-game-rooms .plazr-table-card>.secondary{align-self:center;width:auto;min-width:90px;min-height:24px;margin-top:auto;padding:3px 15px;border-radius:6px;background:#ffffff08;border-color:#718c8c;color:#e6d8b1;font-size:11px;font-weight:500}
html[data-theme="light"] .community-game-rooms .plazr-table-card,html[data-theme="light"] .community-game-rooms .plazr-table-card:hover{background:linear-gradient(145deg,#25474d,#19363d);border-color:#7c9696}
html[data-theme="dark"] .community-game-rooms .plazr-table-card{background:linear-gradient(145deg,#203b42,#152c33);border-color:#4d696d;box-shadow:0 4px 12px #0003}

/* Match the table surface to the surrounding platform in each theme. */
html[data-theme="light"] .community-game-rooms .plazr-table-card,
html[data-theme="light"] .community-game-rooms .plazr-table-card:hover{background:linear-gradient(145deg,#fff,#f2f6f5);border-color:#ccd9d6;box-shadow:0 3px 10px #244a4910}
html[data-theme="light"] .community-game-rooms .plazr-table-card .room-game-identity{background:linear-gradient(110deg,#eee4ca,#f7efd9)}
html[data-theme="light"] .community-game-rooms .plazr-table-card .room-game-identity strong{color:#5a4e32}
html[data-theme="light"] .community-game-rooms .plazr-table-card .room-game-mark{background:#fffdf7;border-color:#d4c18e;box-shadow:0 2px 5px #26464020}
html[data-theme="light"] .community-game-rooms .plazr-table-card .table-player-names{color:#29484c}
html[data-theme="light"] .community-game-rooms .plazr-table-card>.primary,
html[data-theme="light"] .community-game-rooms .plazr-table-card>.secondary{background:#eaf1ef;border-color:#c4d5cf;color:#365b5c}
html[data-theme="dark"] .community-game-rooms .plazr-table-card .room-game-identity{background:linear-gradient(110deg,#514832,#66593d)}
html[data-theme="dark"] .community-game-rooms .plazr-table-card .room-game-identity strong{color:#f1dfb7}
html[data-theme="dark"] .community-game-rooms .plazr-table-card .room-game-mark{background:#213c42;border-color:#9e8b59}

/* Catalog scrolls continuously; wallet and history have their own destination. */
#page-store .store-dashboard{display:block}
#store-pagination{display:none!important}
.store-head-actions{display:flex;align-items:center;gap:8px}
.store-wallet-icon{width:42px;height:42px;padding:9px;display:grid;place-items:center;color:var(--text);border-color:var(--line)}
.store-wallet-icon svg{width:23px;height:23px}
.store-wallet-modal{z-index:2000}
.store-wallet-modal .store-wallet-dialog{width:min(560px,100%);max-height:calc(100dvh - 36px);overflow:auto;padding:20px;display:flex;flex-direction:column;gap:16px;background:var(--panel);color:var(--text)}
.store-wallet-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.store-wallet-dialog>header h2{margin:0;font-size:20px}
.store-wallet-dialog>header button{border:0;background:transparent;color:var(--muted);font-size:27px;cursor:pointer}
.store-wallet-dialog .store-wallet-main{width:100%;padding:16px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--panel) 92%,#bba367);box-sizing:border-box}
.wallet-tabs{display:flex;gap:8px;flex-shrink:0}.wallet-tabs button{flex:1;border:1px solid var(--line);border-radius:9px;background:transparent;color:var(--muted);padding:10px;font:600 13px system-ui;cursor:pointer}.wallet-tabs button[aria-selected="true"]{background:#b59a5d20;color:var(--text);border-color:#ad9257}
.store-wallet-dialog .store-ledger-panel{min-height:180px;padding:0;border:0;box-shadow:none;background:transparent}.store-wallet-dialog .coin-topup{margin:0;width:100%;box-sizing:border-box}
.store-wallet-dialog [hidden]{display:none!important}
@media(max-width:600px){.store-wallet-modal .store-wallet-dialog{padding:16px;border-radius:14px!important}.store-head-actions{gap:6px}.store-wallet-icon{width:38px;height:38px}}

.challenge-table-option{display:flex;align-items:center;gap:10px;padding:12px 2px;font-weight:700;cursor:pointer}.challenge-table-option[hidden]{display:none}.challenge-table-option input{width:20px;height:20px;accent-color:var(--accent,#27aaa7);margin:0}


/* Plazr Chat Games */
.column-head-actions{display:flex;align-items:center;gap:8px}
.quiz-btn{font-weight:700;font-size:11px;color:#facc15!important;border-color:rgba(234,179,8,0.35)!important;background:rgba(234,179,8,0.08)!important;border-radius:999px!important;padding:4px 10px!important;display:inline-flex;align-items:center;gap:5px;cursor:pointer;transition:all .15s ease}
.quiz-btn:hover{background:rgba(234,179,8,0.2)!important;border-color:rgba(234,179,8,0.6)!important}
.sd-quiz-article .community-chat-bubble{position:relative}
.sd-quiz-article.sd-quiz-question .community-chat-bubble{border-inline-start:3px solid #facc15;background:linear-gradient(135deg,rgba(234,179,8,0.06),transparent)}
.sd-quiz-article.sd-quiz-solved .community-chat-bubble{border-inline-start:3px solid #22c55e;background:linear-gradient(135deg,rgba(34,197,94,0.08),transparent)}
.sd-quiz-article.sd-quiz-hint .community-chat-bubble{border-inline-start:3px solid #3b82f6;background:linear-gradient(135deg,rgba(59,130,246,0.06),transparent)}
.sd-quiz-article.sd-quiz-timeout .community-chat-bubble{border-inline-start:3px solid #ef4444;background:linear-gradient(135deg,rgba(239,68,68,0.06),transparent)}
.sd-quiz-badge{display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:999px;font-size:10px;font-weight:700;margin-inline-end:6px;background:rgba(234,179,8,0.16);color:#facc15;border:1px solid rgba(234,179,8,0.32);vertical-align:middle}
.sd-quiz-badge-solved{background:rgba(34,197,94,0.18);color:#4ade80;border-color:rgba(34,197,94,0.36)}
.sd-quiz-badge-hint{background:rgba(59,130,246,0.18);color:#60a5fa;border-color:rgba(59,130,246,0.36)}
.sd-quiz-badge-timeout{background:rgba(239,68,68,0.18);color:#f87171;border-color:rgba(239,68,68,0.36)}
.sd-chat-quiz-img-wrap{margin-top:8px;border-radius:12px;overflow:hidden;background:rgba(0,0,0,0.25);border:1px solid rgba(255,255,255,0.08);display:inline-flex;max-width:260px}
.sd-chat-quiz-img{width:100%;height:auto;max-height:180px;object-fit:contain;display:block}
.chat-games-modal-card{max-width:480px}
.quiz-modal-head{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.quiz-modal-trophy{font-size:36px;line-height:1}
.quiz-modal-head h2{margin:0;font-size:19px}
.quiz-modal-sub{margin:2px 0 0;font-size:13px;color:var(--muted,#8b9bb0)}
.quiz-period-nav{display:flex;gap:6px;background:rgba(0,0,0,0.22);padding:4px;border-radius:12px;margin-bottom:14px;border:1px solid var(--line,#2a3949)}
.quiz-period-btn{flex:1;border:0;background:transparent;color:var(--muted,#8b9bb0);padding:7px 10px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s ease}
.quiz-period-btn.active{background:var(--accent,#0284c7);color:#ffffff !important;box-shadow:0 2px 8px rgba(0,0,0,0.25)}
.quiz-lb-list{max-height:320px;overflow-y:auto;display:flex;flex-direction:column;gap:6px}
.quiz-lb-row{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-radius:10px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.05)}
.quiz-lb-row.top-1{background:rgba(234,179,8,0.1);border-color:rgba(234,179,8,0.3)}
.quiz-lb-row.top-2{background:rgba(203,213,225,0.1);border-color:rgba(203,213,225,0.3)}
.quiz-lb-row.top-3{background:rgba(217,119,6,0.1);border-color:rgba(217,119,6,0.3)}
.quiz-lb-rank{font-weight:800;width:28px;text-align:center;font-size:14px}
.quiz-lb-user{display:flex;align-items:center;gap:10px;flex:1;margin:0 10px}
.quiz-lb-name{font-weight:600;font-size:14px}
.quiz-lb-wins{font-size:11px;color:var(--muted,#8b9bb0)}
.quiz-lb-points{font-weight:800;font-size:15px;color:#facc15}
.quiz-my-rank{margin-top:14px;padding:10px 14px;border-radius:12px;background:rgba(39,146,123,0.15);border:1px solid rgba(39,146,123,0.35);display:flex;align-items:center;justify-content:space-between;font-size:13px}
.games-types-grid label{display:flex;align-items:center;gap:6px;font-size:13px;padding:6px 8px;border-radius:8px;background:rgba(255,255,255,0.02);border:1px solid var(--line,#2a3949);cursor:pointer}
.games-types-grid input{margin:0}

.moderator-room-badge{display:inline-flex;align-items:center;gap:4px;flex:none;color:var(--muted,#95a7ad)}.moderator-room-badge img{width:38px;height:19px;object-fit:contain}.moderator-room-badge small{font:600 10px/1.3 system-ui;max-width:86px;white-space:normal}

/* Keep the moderator capsule directly after the username, before cosmetics. */
.community-members .community-member-title{justify-content:flex-start;gap:3px}
.community-members .community-member-title strong{flex:0 1 auto;min-width:0}
.community-members .community-member-title .moderator-room-badge{display:inline-flex;flex:0 0 auto;margin:0;gap:0}

/* Scroll naturally with touch, wheel and keyboard without a persistent gutter. */
@media(max-width:820px){html,body,body *{scrollbar-width:none!important;-ms-overflow-style:none;scrollbar-gutter:auto!important}html::-webkit-scrollbar,body::-webkit-scrollbar,body *::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}}
@media(min-width:821px){html,body,.community-games-panel,.community-members,.community-members-panel,.community-chat-messages,#home-profile,.settings-window,.settings-content,.settings-menu,.admin-reports-list,.table-scroll,.quiz-lb-list,.modal-card,.store-product-body,.pf-messages{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.36) transparent}html::-webkit-scrollbar,body::-webkit-scrollbar,.community-games-panel::-webkit-scrollbar,.community-members::-webkit-scrollbar,.community-members-panel::-webkit-scrollbar,.community-chat-messages::-webkit-scrollbar,#home-profile::-webkit-scrollbar,.settings-window::-webkit-scrollbar,.settings-content::-webkit-scrollbar,.settings-menu::-webkit-scrollbar,.admin-reports-list::-webkit-scrollbar,.table-scroll::-webkit-scrollbar,.quiz-lb-list::-webkit-scrollbar,.modal-card::-webkit-scrollbar,.store-product-body::-webkit-scrollbar,.pf-messages::-webkit-scrollbar{width:7px;height:7px}html::-webkit-scrollbar-thumb,body::-webkit-scrollbar-thumb,.community-games-panel::-webkit-scrollbar-thumb,.community-members::-webkit-scrollbar-thumb,.community-members-panel::-webkit-scrollbar-thumb,.community-chat-messages::-webkit-scrollbar-thumb,#home-profile::-webkit-scrollbar-thumb,.settings-window::-webkit-scrollbar-thumb,.settings-content::-webkit-scrollbar-thumb,.settings-menu::-webkit-scrollbar-thumb,.admin-reports-list::-webkit-scrollbar-thumb,.table-scroll::-webkit-scrollbar-thumb,.quiz-lb-list::-webkit-scrollbar-thumb,.modal-card::-webkit-scrollbar-thumb,.store-product-body::-webkit-scrollbar-thumb,.pf-messages::-webkit-scrollbar-thumb{background:rgba(148,163,184,.36);border-radius:999px}html::-webkit-scrollbar-track,body::-webkit-scrollbar-track,.community-games-panel::-webkit-scrollbar-track,.community-members::-webkit-scrollbar-track,.community-members-panel::-webkit-scrollbar-track,.community-chat-messages::-webkit-scrollbar-track,#home-profile::-webkit-scrollbar-track,.settings-window::-webkit-scrollbar-track,.settings-content::-webkit-scrollbar-track,.settings-menu::-webkit-scrollbar-track,.admin-reports-list::-webkit-scrollbar-track,.table-scroll::-webkit-scrollbar-track,.quiz-lb-list::-webkit-scrollbar-track,.modal-card::-webkit-scrollbar-track,.store-product-body::-webkit-scrollbar-track,.pf-messages::-webkit-scrollbar-track{background:transparent}}

/* Plazr Chat Games Admin Form Polish */
#admin-panel-games .quiz-admin-panel {
  max-width: 860px;
  margin: 0 auto;
}
#admin-panel-games .admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}
#admin-games-form.room-policy-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  padding: 24px !important;
  margin: 0 0 24px 0 !important;
  box-sizing: border-box;
}
#admin-games-form > label {
  width: 100% !important;
  flex: 1 1 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  font-weight: 700;
  font-size: 14px;
}
#admin-games-community-select {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(147, 169, 173, 0.4) !important;
  background: var(--bg-alt, #15222d) !important;
  color: var(--text, #e2e8f0) !important;
  font-size: 15px !important;
  outline: none;
  cursor: pointer;
  box-sizing: border-box !important;
}
#admin-games-form .grid-2col {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
}
#admin-games-form .grid-2col label {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  font-size: 13.5px !important;
  font-weight: 600;
  flex: 1 1 auto !important;
}
#admin-games-form .grid-2col input {
  height: 42px !important;
  padding: 8px 12px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(147, 169, 173, 0.4) !important;
  background: var(--bg-alt, #15222d) !important;
  color: var(--text, #e2e8f0) !important;
  font: inherit;
  box-sizing: border-box !important;
}
#admin-games-inactivity {
  height: 42px !important;
  padding: 8px 12px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(147, 169, 173, 0.4) !important;
  background: var(--bg-alt, #15222d) !important;
  color: var(--text, #e2e8f0) !important;
  font: inherit;
  box-sizing: border-box !important;
}
#admin-games-status {
  font-size: 14px;
  font-weight: 700;
  display: inline-block;
  padding: 4px 8px;
}

/* Hide chat games leaderboard button & hide community games badge */
#community-chat-games-btn,
.quiz-btn,
[data-community-games],
.community-card-meta:has([data-community-games]) > span:has([data-community-games]) {
  display: none !important;
}

/* Force hide any community games / match counts on outside cards */
[data-community-games],
span:has(> [data-community-games]),
.community-card-meta > span:nth-child(2):not(.community-card-enter),
.community-card-meta span:has(b[data-community-games]) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Maintenance styling for Carrom in casual create modal */
.maintenance-game,
.create-game-options button[data-create-game=carrom] {
  opacity: 0.55 !important;
  filter: grayscale(0.7) !important;
  position: relative !important;
}

.game-maint-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  font-weight: 700;
  background: #dc2626;
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
  pointer-events: none;
  line-height: 1.2;
}

/* Matchmaking Carrom disabled/maintenance presentation */
.mm-tab-maintenance,
.mm-game-tab[data-game-id=carrom] {
  opacity: 0.65 !important;
}

.mm-maint-badge {
  font-size: 10px;
  background: #dc2626;
  color: #fff;
  padding: 1px 6px;
  border-radius: 999px;
  margin-inline-start: 6px;
  font-weight: 700;
}

.mm-mode-disabled {
  opacity: 0.55 !important;
}

.room-player-slot.occupied[data-public-profile] {
  cursor: pointer;
}
