*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;color:#f4f2ff;background:#0b0d19}a{color:#a99bff}.auth-bg,.app-bg{min-height:100vh;background:radial-gradient(ellipse at 18% 8%,#30215c 0,transparent 38%),radial-gradient(ellipse at 85% 90%,#142c55 0,transparent 35%),#0b0d19}.ticker{height:38px;overflow:hidden;background:linear-gradient(90deg,#6b42d8,#1d5c9c);white-space:nowrap;display:flex;align-items:center;font-size:12px;font-weight:800;letter-spacing:1.5px}.ticker span{display:inline-block;min-width:200%;animation:scroll 25s linear infinite}@keyframes scroll{to{transform:translateX(-50%)}}.auth-wrap{max-width:980px;margin:45px auto;padding:20px;display:grid;grid-template-columns:1fr 410px;gap:45px;align-items:center}.brand h1{font-size:42px;line-height:1.1}.brand em{color:#b5a3ff;font-style:normal}.logo,.avatar{width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,#a77aff,#386bce);display:grid;place-items:center;font-weight:900;font-size:22px;box-shadow:0 8px 30px #6d4bd555}.eyebrow{font-size:11px;letter-spacing:2px;color:#b6a6f5;font-weight:800}.muted,small,.tiny{color:#9d9bb2}.game-strip{display:flex;gap:9px;flex-wrap:wrap;margin-top:30px}.game-strip span,.online-pill{background:#ffffff12;border:1px solid #ffffff20;padding:10px 13px;border-radius:12px;font-size:12px}.panel,.side-card,.chat-card,.list-card{background:#151827eF;border:1px solid #ffffff17;border-radius:20px;box-shadow:0 20px 70px #0005}.auth-panel{padding:25px}.tabs{display:flex;background:#0e1120;border-radius:12px;padding:4px;margin-bottom:22px}.tab{flex:1;border:0;background:none;color:#aaa;padding:11px;border-radius:9px;cursor:pointer}.tab.active{background:#6546bd;color:white}.auth-form{display:flex;flex-direction:column;gap:10px}.auth-form label,form label{font-size:12px;color:#c7c2dc;margin-top:5px}.input, input{background:#0e1220;border:1px solid #34344b;border-radius:10px;padding:13px;color:white;outline:none;min-width:0}input:focus{border-color:#9c80ff}.primary,.send-btn{border:0;border-radius:10px;background:linear-gradient(100deg,#8055df,#386fd0);color:white;font-weight:800;padding:13px;cursor:pointer;margin-top:8px}.hidden{display:none}.or{text-align:center;color:#88869f;font-size:11px;margin:22px 0 13px}.social{display:flex;gap:9px}.social a,.social-link{flex:1;text-align:center;text-decoration:none;border:1px solid #ffffff24;padding:12px 8px;border-radius:10px;font-size:12px;color:#d9d3ff}.tiny{font-size:11px;line-height:1.5}.alert,.success{padding:12px;border-radius:10px;background:#7b263b55;color:#ffd9df;margin:10px 0;font-size:13px}.success{background:#1d694855;color:#caffdf}.installer{max-width:480px;margin:10vh auto;padding:28px}.installer form{display:flex;flex-direction:column;gap:12px}.topbar{height:64px;padding:0 max(22px,calc((100% - 1180px)/2));display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ffffff16;background:#101322}.brand-mini{font-size:12px;letter-spacing:1px;color:#eee;text-decoration:none;font-weight:800}.brand-mini b{display:inline-grid;place-items:center;width:30px;height:30px;background:#7554cb;border-radius:9px;margin-right:8px}.logout{margin-left:16px;color:#b9a9ff;text-decoration:none}.chat-layout{max-width:1100px;margin:35px auto;padding:0 18px;display:grid;grid-template-columns:260px 1fr;gap:18px;height:calc(100vh - 160px);min-height:520px}.side-card{padding:23px;text-align:center}.side-card .avatar{margin:0 auto 14px}.outline{background:#ffffff08;border:1px solid #ffffff35;color:#e6e1ff;padding:10px 12px;border-radius:10px;cursor:pointer}.side-card .outline{width:100%;margin:10px 0}.side-card hr{border:0;border-top:1px solid #ffffff19;margin:20px 0}.social-link{display:block;margin:9px 0}.chat-card{display:flex;flex-direction:column;overflow:hidden}.chat-head{height:68px;flex-shrink:0;padding:14px 20px;border-bottom:1px solid #ffffff18;display:flex;align-items:center;justify-content:space-between}.chat-head small{display:block;margin-top:5px;font-size:11px}.online-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#49d69a;margin-right:5px}.messages{flex:1;overflow:auto;padding:22px;display:flex;flex-direction:column;gap:12px}.welcome{margin:auto;color:#9996ad;text-align:center;font-size:13px;max-width:300px;line-height:1.6}.msg{max-width:76%;padding:11px 13px;border-radius:15px;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.msg small{display:block;text-align:right;font-size:10px;margin-top:5px}.mine{align-self:flex-end;background:linear-gradient(135deg,#6145a9,#315b9b);border-bottom-right-radius:4px}.theirs{align-self:flex-start;background:#24283a;border-bottom-left-radius:4px}.msg a{overflow-wrap:anywhere}.chat-image{max-width:220px;max-height:220px;object-fit:contain;border-radius:9px;display:block;margin-top:6px}.msg video{max-width:240px;max-height:220px;border-radius:9px;display:block;margin-top:6px}.ticks{color:#d6d2e8;margin-left:5px}.ticks.read{color:#39e49a}.composer{display:flex;gap:9px;align-items:center;padding:13px 15px;border-top:1px solid #ffffff18}.composer input[name=body]{flex:1}.attach{font-size:25px;cursor:pointer;color:#b9a5ff}.send-btn{margin:0;padding:12px 17px}.composer-note{text-align:center;color:#79778f;font-size:10px;padding:0 0 10px}.admin-layout{max-width:1180px;margin:28px auto;padding:0 16px;display:grid;grid-template-columns:330px 1fr;gap:16px;height:calc(100vh - 125px);min-height:540px}.list-card{overflow:hidden;display:flex;flex-direction:column}.list-title{padding:20px;display:flex;justify-content:space-between;align-items:center}.list-title h2{margin:0 0 4px;font-size:18px}.list-title small{font-size:11px}.count,.unread{background:#6b4cc0;border-radius:20px;padding:5px 9px;font-size:11px}.search{margin:0 14px 12px}.user-row{display:flex;align-items:center;gap:11px;padding:13px 16px;width:100%;border:0;border-top:1px solid #ffffff0e;background:transparent;color:white;text-align:left;cursor:pointer}.user-row:hover,.user-row.selected{background:#ffffff12}.avatar.small{width:38px;height:38px;border-radius:12px;font-size:15px;flex-shrink:0}.user-meta{display:flex;flex-direction:column;gap:5px;overflow:hidden;flex:1}.user-meta b{font-size:13px}.user-meta small{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-chat{min-width:0}.admin-actions{display:flex;gap:8px}@media(max-width:700px){.auth-wrap{grid-template-columns:1fr;margin:12px auto;gap:20px}.brand{text-align:center}.brand .logo{margin:auto}.brand h1{font-size:30px}.chat-layout{grid-template-columns:1fr;height:auto;min-height:calc(100vh - 120px);margin:12px auto}.side-card{padding:13px}.side-card .avatar{width:40px;height:40px}.side-card h3{margin:6px}.side-card hr,.side-card .tiny{display:none}.chat-card{height:68vh;min-height:430px}.admin-layout{grid-template-columns:1fr;height:auto}.list-card{max-height:230px}.admin-chat{height:65vh}.topbar{padding:0 12px;font-size:12px}.msg{max-width:88%}.social{flex-direction:column}}

/* Galaxy blue / cyan visual theme inspired by the supplied Milky Way reference */
:root{--cyan:#00eaff;--deep:#041338;--blue:#0758d8;--gold:#ffd45c}
.galaxy-theme{background:radial-gradient(ellipse at 50% 0%,#0754a5 0,#061b46 42%,#020817 100%);color:#f7fbff}
.ticker{background:linear-gradient(90deg,#003f9e,#00a9d4,#073b91);color:#fff}
.mobile-shell{width:min(100%,520px);margin:0 auto;padding:18px 15px 28px}
.compact-brand{text-align:center;padding:16px 8px 18px}
.compact-brand .logo{margin:0 auto 10px}
.galaxy-logo{border:2px solid var(--cyan);background:radial-gradient(circle,#087ce9,#031b52);box-shadow:0 0 22px #00dfff99, inset 0 0 16px #00dfff55}
.compact-brand h1{font-size:27px;margin:8px 0;color:#fff;text-shadow:0 0 16px #00cfff88}
.welcome-copy{font-size:13px;line-height:1.55;color:#d3eaff;max-width:390px;margin:0 auto}
.galaxy-panel{background:linear-gradient(160deg,#09275aee,#030d28f5);border:1px solid #00cfff88;box-shadow:0 0 24px #00cfff26,0 18px 55px #0009;padding:19px}
.tabs{background:#03112f;border:1px solid #0a5b9a}
.tab.active{background:linear-gradient(100deg,#007de0,#00bcd4);color:#fff;box-shadow:0 0 14px #00cfff66}
.auth-form input,.search,.composer input[name=body],.site-settings input,.site-settings textarea{background:#04132f;border:1px solid #1764a1;color:#fff}
.auth-form input:focus,.site-settings input:focus,.site-settings textarea:focus{border-color:var(--cyan);box-shadow:0 0 0 2px #00dfff22}
.primary,.send-btn{background:linear-gradient(100deg,#0066d8,#00aeca);box-shadow:0 5px 18px #007ac955}
.social a{background:linear-gradient(135deg,#063e83,#087aab);border:1px solid #00dfff88;color:#fff;font-weight:700}
.game-showcase{margin-top:19px;overflow:hidden;border-top:1px solid #00dfff55;padding-top:14px}
.game-heading{text-align:center;font-size:12px;font-weight:900;letter-spacing:1.2px;color:#a8f6ff;margin-bottom:11px}
.game-track{display:flex;gap:11px;width:max-content;animation:gameslide 38s linear infinite}
.game-showcase:hover .game-track{animation-play-state:paused}
.game-tile{width:100px;height:100px;padding:3px;border-radius:17px;border:2px solid #00dfff;overflow:hidden;background:#061a42;box-shadow:0 0 13px #00bfff55}
.game-tile img{width:100%;height:100%;display:block;object-fit:cover;border-radius:12px}
@keyframes gameslide{to{transform:translateX(-50%)}}
.game-empty{margin-top:20px;padding:18px;text-align:center;border:1px dashed #00cfff88;border-radius:16px;color:#b9eaff;font-size:12px}
.center{text-align:center}
.app-bg{background:radial-gradient(ellipse at 50% 0%,#0754a5 0,#061b46 42%,#020817 100%)}
.topbar{background:#041638;border-bottom:1px solid #00cfff55}
.chat-card,.side-card,.list-card{background:linear-gradient(160deg,#09275aee,#030d28f5);border-color:#087bb0}
.chat-head{border-bottom-color:#1764a1}
.mine{background:linear-gradient(135deg,#075ec6,#007f9f)}
.theirs{background:#102b50}
.online-pill{color:#8ff7ff;border-color:#00dfff55}
.ticks.read{color:#00ffad}
.admin-page{max-width:1180px;margin:18px auto;padding:0 16px}
.site-settings{background:linear-gradient(130deg,#09275a,#04122f);border:1px solid #087bb0;border-radius:16px;padding:16px;margin-bottom:15px}
.site-settings form{display:grid;grid-template-columns:1fr;gap:7px}
.site-settings label{font-size:11px;color:#aeeaff}
.site-settings textarea{resize:vertical;border-radius:10px;padding:12px;font:inherit}
.settings-title{display:flex;justify-content:space-between;gap:10px;font-size:13px;margin-bottom:5px}
.settings-title span{color:#65e5b6;font-size:11px}
.admin-layout{margin:0 auto;padding:0;height:calc(100vh - 235px)}
@media(max-width:700px){.mobile-shell{padding:10px 12px 24px}.compact-brand{padding:10px 6px}.compact-brand h1{font-size:24px}.galaxy-panel{padding:16px}.game-tile{width:88px;height:88px}.admin-page{padding:0 10px;margin:10px auto}.admin-layout{height:auto}.site-settings{padding:13px}.settings-title{display:block}.settings-title span{display:block;margin-top:5px}}

/* Official support-centre refresh: lighter, cleaner and mobile-first */
body.support-light, body.app-bg{
 color:#20324a;
 background:linear-gradient(145deg,#f5f9ff 0%,#eaf3ff 48%,#f8fbff 100%) !important;
}
.support-light .ticker{background:linear-gradient(90deg,#1768c5,#2799d5,#2367bc);color:#fff}
.support-light .compact-brand .eyebrow{color:#3975b8}
.support-light .compact-brand h1{color:#18365b;text-shadow:none;font-size:clamp(27px,5vw,34px)}
.support-light .welcome-copy{color:#536b86;font-size:15px}
.support-light .galaxy-logo{background:linear-gradient(135deg,#2d8de0,#6d72dc);border:0;box-shadow:0 8px 24px #367fd633}
.support-light .galaxy-panel,.support-light .panel{
 background:#fff;border:1px solid #dce8f6;box-shadow:0 12px 36px #315b8718;color:#20324a
}
.support-light .tabs{background:#edf3fa;border:1px solid #e0e9f3}
.support-light .tab{color:#526982}
.support-light .tab.active{background:linear-gradient(100deg,#286fd0,#438de0);color:#fff;box-shadow:0 4px 12px #286fd033}
.support-light .auth-form label{color:#405a76;font-size:13px;font-weight:650}
.support-light .auth-form input{background:#f8fbff;border:1px solid #d4e0ed;color:#20324a;padding:14px}
.support-light .auth-form input::placeholder{color:#8a9bb0}
.support-light .auth-form input:focus{border-color:#438de0;box-shadow:0 0 0 3px #438de01a}
.support-light .primary{background:linear-gradient(100deg,#3479d4,#438fdf);box-shadow:0 5px 14px #3479d42b;padding:15px;font-size:14px}
.support-light .or{color:#8092a8}
.support-light .social a{font-weight:750;font-size:14px;padding:13px;border:0;color:#fff}
.support-light .social a:first-child{background:#20b968;box-shadow:0 5px 13px #20b96830}
.support-light .social a:last-child{background:#269bd7;box-shadow:0 5px 13px #269bd730}
.support-light .tiny{color:#8293a7}
.support-light .game-showcase{border-top:1px solid #e0eaf5}
.support-light .game-heading{color:#315d8d;font-size:13px;letter-spacing:.7px}
.game-carousel{display:flex;align-items:center;gap:7px;width:100%;min-width:0}
.game-viewport{overflow-x:auto;scroll-behavior:smooth;scrollbar-width:none;flex:1;min-width:0}
.game-viewport::-webkit-scrollbar{display:none}
.game-track{display:flex;gap:10px;width:max-content;animation:none}
.game-tile{flex:0 0 auto;width:clamp(88px,27%,132px);height:auto;aspect-ratio: .78;display:flex;flex-direction:column;gap:7px;padding:5px 5px 8px;border-radius:17px 10px 19px 12px;background:#fff;border:2px solid #4e9de2;box-shadow:0 5px 16px #2d70ad1b;overflow:hidden}
.game-tile:nth-child(4n+1){border-color:#4799df;border-radius:18px 10px 18px 10px}
.game-tile:nth-child(4n+2){border-color:#28b7a8;border-radius:10px 19px 10px 19px}
.game-tile:nth-child(4n+3){border-color:#8b78dc;border-radius:19px 11px 13px 18px}
.game-tile:nth-child(4n){border-color:#e2a64b;border-radius:11px 18px 19px 10px}
.game-tile img{width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;border-radius:11px;display:block}
.game-tile span{display:block;text-align:center;font-size:11px;line-height:1.2;font-weight:800;color:#294969;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-arrow{flex:0 0 31px;width:31px;height:42px;border:0;border-radius:12px;background:linear-gradient(145deg,#3989dc,#2768bd);color:white;font-size:29px;line-height:1;box-shadow:0 4px 12px #2768bd35;cursor:pointer}
.game-arrow:active{transform:scale(.94)}
/* Light official support styling for signed-in chat and admin screens */
body.app-bg{color:#20324a}
.app-bg .topbar{background:#fff;border-bottom:1px solid #dce7f2;box-shadow:0 3px 14px #315b8710}
.app-bg .brand-mini{color:#24476c}
.app-bg .brand-mini b{background:#347fd0;color:#fff}
.app-bg .logout{color:#3479c7}
.app-bg .ticker{background:linear-gradient(90deg,#1768c5,#2799d5,#2367bc)}
.app-bg .chat-card,.app-bg .side-card,.app-bg .list-card{background:#fff;border:1px solid #dce7f2;box-shadow:0 10px 30px #315b8715;color:#20324a}
.app-bg .chat-head{border-bottom:1px solid #e4edf6}
.app-bg .chat-head strong,.app-bg .side-card h3,.app-bg .list-title h2{color:#24476c}
.app-bg .chat-head small,.app-bg .muted,.app-bg .tiny{color:#7b8da2}
.app-bg .messages{background:#f7faff}
.app-bg .welcome{color:#8293a7}
.app-bg .theirs{background:#eaf1f8;color:#29425d}
.app-bg .mine{background:linear-gradient(135deg,#347bd0,#438fdf);color:#fff}
.app-bg .online-pill{background:#e8f8ef;color:#16834b;border-color:#c8eed8}
.app-bg .outline{background:#f2f7fc;border:1px solid #d9e5f1;color:#315d86}
.app-bg .social-link{background:#f5f9fd;border:1px solid #dce7f2;color:#286bb2}
.app-bg .composer{border-top:1px solid #e3edf6;background:#fff}
.app-bg .composer input[name=body]{background:#f7faff;border:1px solid #d8e4f0;color:#20324a}
.app-bg .attach{color:#347fd0}
.app-bg .composer-note{color:#8798aa}
.app-bg .user-row{color:#29425d;border-top:1px solid #edf2f7}
.app-bg .user-row:hover,.app-bg .user-row.selected{background:#f0f6fc}
.app-bg .search{background:#f7faff;border:1px solid #d8e4f0;color:#20324a}
.app-bg .site-settings{background:#fff;border:1px solid #dce7f2;color:#20324a;box-shadow:0 8px 24px #315b8710}
.app-bg .site-settings label{color:#496783}
.app-bg .site-settings input,.app-bg .site-settings textarea{background:#f7faff;border:1px solid #d8e4f0;color:#20324a}
@media(max-width:700px){
 .support-light .mobile-shell{padding:10px 12px 18px}
 .support-light .compact-brand{padding:8px 5px 13px}
 .support-light .compact-brand h1{font-size:27px}
 .support-light .galaxy-panel{padding:15px}
 .game-carousel{gap:5px}
 .game-arrow{flex-basis:28px;width:28px;height:38px}
 .game-track{gap:7px}
 .game-tile{width:clamp(78px,calc((100vw - 118px)/3),112px);padding:4px 4px 7px}
 .game-tile span{font-size:10px}
 .app-bg .chat-layout{margin:12px auto}
}

/* GameVault 2026 polish: dedicated signup art, role-safe access and social brand colors */
.auth-screen{background:linear-gradient(90deg,rgba(8,12,35,.95) 0%,rgba(8,12,35,.78) 48%,rgba(8,12,35,.18) 100%),url('signup-dragon.png') center right/cover fixed no-repeat !important;}
.auth-screen .mobile-shell{position:relative;z-index:1}
.auth-screen .galaxy-panel{background:rgba(248,251,255,.96);backdrop-filter:blur(14px)}
.ai-logo{position:relative;isolation:isolate;background:linear-gradient(135deg,#8b5cf6,#2563eb 55%,#06b6d4)!important;color:#fff!important;border:1px solid #b9c8ff!important;box-shadow:0 0 0 4px #7c3aed20,0 10px 30px #2563eb55!important;font-weight:950;letter-spacing:-1px}
.ai-logo span{position:absolute;right:5px;top:2px;font-size:12px;color:#fff;text-shadow:0 0 9px #fff}
.admin-entry{display:block;text-align:center;margin:13px auto 2px;color:#4778b4;font-size:12px;font-weight:800;text-decoration:none}
.admin-entry span{margin-left:3px}
.admin-auth{display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 50% 0,#263d76,#0b1022 70%)!important}
.admin-login{width:min(100%,420px);padding:28px;text-align:center;background:#fff;color:#24364c}
.admin-login .logo{margin:0 auto 12px}
.admin-login h1{margin:6px 0;color:#19365a}
.admin-login .muted{color:#71839a}
.admin-login .auth-form{text-align:left;margin-top:22px}
.back-player{display:inline-block;margin-top:18px;color:#3479c7;text-decoration:none;font-size:13px;font-weight:700}
/* Keep external support brands official, regardless of app theme */
.whatsapp-btn,.app-bg .whatsapp-btn,.support-light .whatsapp-btn{background:#25D366!important;color:#fff!important;border-color:#25D366!important}
.telegram-btn,.app-bg .telegram-btn,.support-light .telegram-btn{background:#229ED9!important;color:#fff!important;border-color:#229ED9!important}
.social{display:flex;flex-direction:row!important;gap:10px}
.social a{flex:1;min-width:0}
.social-link{display:inline-flex;align-items:center;justify-content:center;width:calc(50% - 6px);margin:8px 2px!important;min-height:44px;font-weight:800}
.ticker span{min-width:max-content;animation:scroll 42s linear infinite}
.profile-avatar{width:62px;height:62px;border-radius:20px;border:2px solid #dce8ff;background:linear-gradient(145deg,#f0eaff,#e4f2ff);font-size:34px;display:grid;place-items:center;margin:0 auto 10px;cursor:pointer;box-shadow:0 8px 22px #345c8c20}
.emoji-picker{z-index:30;display:flex;flex-wrap:wrap;gap:5px;padding:9px;background:#fff;border:1px solid #dce7f2;border-radius:14px;box-shadow:0 12px 30px #20324a25;max-width:260px}
.emoji-picker.hidden{display:none}
.profile-picker{margin:0 auto 12px;justify-content:center}
.emoji-choice{border:0;background:#f2f6fb;border-radius:8px;width:34px;height:34px;font-size:20px;cursor:pointer}
.emoji-choice:hover{background:#e1edff;transform:translateY(-1px)}
.composer{position:relative}
.emoji-toggle{border:0;background:#eff5ff;color:#397ac2;border-radius:10px;width:38px;height:38px;font-size:23px;cursor:pointer;flex:0 0 38px}
.chat-emoji-picker{position:absolute;bottom:58px;left:10px}
.game-tile{width:clamp(78px,calc((100% - 42px)/4),122px);}
@media(max-width:700px){
 .auth-screen{background:linear-gradient(180deg,rgba(8,12,35,.55),rgba(8,12,35,.92)),url('signup-dragon.png') 64% center/cover fixed no-repeat!important}
 .auth-screen .mobile-shell{padding-top:12px}
 .social{flex-direction:row!important}
 .game-tile{width:clamp(68px,calc((100vw - 112px)/3),105px)}
 .chat-layout{height:calc(100dvh - 112px);min-height:0;grid-template-columns:1fr;overflow:hidden}
 .chat-layout>.side-card{display:none}
 .chat-layout>.chat-card{height:100%;min-height:0}
 .admin-login{padding:22px}
}
.chat-head{position:relative}
.header-profile{width:42px;height:42px;flex:0 0 42px;border-radius:14px;font-size:24px;margin:0 12px 0 0}
.header-profile-picker{position:absolute;top:52px;left:12px;margin:0!important}
.chat-head>div:nth-of-type(1){margin-right:auto}
.player-list-avatar{font-size:20px}
@media(max-width:700px){.header-profile{width:38px;height:38px;flex-basis:38px;margin-right:9px}.header-profile-picker{left:8px}}
.theme-select{border:1px solid #d9e4f1;background:#f4f8fd;color:#34516f;border-radius:10px;padding:8px 10px;font:600 12px inherit;cursor:pointer;max-width:104px}
body[data-theme="pink"]{--surface:#fff7fc;--ink:#6b3155;--soft:#fce8f3;--accent:#d84b9a;background:linear-gradient(145deg,#fff5fb,#fbe5f1)!important;color:var(--ink)}
body[data-theme="pink"] .chat-card,body[data-theme="pink"] .side-card,body[data-theme="pink"] .list-card,body[data-theme="pink"] .site-settings{background:var(--surface)!important;border-color:#f2c6df!important;color:var(--ink)}
body[data-theme="pink"] .messages{background:#fff0f8!important}body[data-theme="pink"] .mine{background:linear-gradient(135deg,#d84b9a,#a84dc4)!important}body[data-theme="pink"] .theirs{background:#f9ddec!important;color:#713e60!important}body[data-theme="pink"] .chat-head{border-color:#f2c6df!important}
body[data-theme="red"]{background:linear-gradient(145deg,#fff6f5,#ffe7e4)!important;color:#6e2927}
body[data-theme="red"] .chat-card,body[data-theme="red"] .side-card,body[data-theme="red"] .list-card,body[data-theme="red"] .site-settings{background:#fffafa!important;border-color:#f0c7c4!important;color:#6e2927}
body[data-theme="red"] .messages{background:#fff1ef!important}body[data-theme="red"] .mine{background:linear-gradient(135deg,#d94b45,#a92d38)!important}body[data-theme="red"] .theirs{background:#f9dfdc!important;color:#6e2927!important}
body[data-theme="dark"]{background:linear-gradient(145deg,#111827,#080d18)!important;color:#e6edf7}
body[data-theme="dark"] .topbar,body[data-theme="dark"] .chat-card,body[data-theme="dark"] .side-card,body[data-theme="dark"] .list-card,body[data-theme="dark"] .site-settings{background:#171f30!important;border-color:#34445d!important;color:#e6edf7}
body[data-theme="dark"] .chat-head,body[data-theme="dark"] .composer{border-color:#34445d!important}body[data-theme="dark"] .messages{background:#101827!important}body[data-theme="dark"] .mine{background:linear-gradient(135deg,#6b55c9,#326bc3)!important}body[data-theme="dark"] .theirs{background:#26354a!important;color:#edf4ff!important}body[data-theme="dark"] .chat-head strong,body[data-theme="dark"] .side-card h3,body[data-theme="dark"] .list-title h2{color:#f2f6ff!important}
body[data-theme="gray"]{background:linear-gradient(145deg,#f4f5f7,#e5e8ed)!important;color:#354052}
body[data-theme="gray"] .chat-card,body[data-theme="gray"] .side-card,body[data-theme="gray"] .list-card,body[data-theme="gray"] .site-settings{background:#fbfcfd!important;border-color:#d5dae2!important;color:#354052}
body[data-theme="gray"] .messages{background:#eef1f5!important}body[data-theme="gray"] .mine{background:linear-gradient(135deg,#64748b,#475569)!important}body[data-theme="gray"] .theirs{background:#e0e5ec!important;color:#354052!important}
/* Social brands are intentionally exempt from every theme palette */
body[data-theme] .whatsapp-btn{background:#25D366!important;color:#fff!important;border-color:#25D366!important}
body[data-theme] .telegram-btn{background:#229ED9!important;color:#fff!important;border-color:#229ED9!important}
@media(max-width:700px){.theme-select{padding:6px 7px;max-width:78px;font-size:11px}.chat-head{gap:5px}.online-pill{font-size:10px;padding:6px}}

/* GameVault responsive refinement — preserve the blue/purple light support look */
.auth-screen{background:linear-gradient(115deg,rgba(8,22,54,.78),rgba(13,35,79,.38)),url('signup-dragon.png') center/cover no-repeat!important}
.auth-screen .galaxy-panel{background:rgba(248,251,255,.97)!important;border:1px solid rgba(255,255,255,.8)!important;color:#203b5b!important;box-shadow:0 18px 55px rgba(12,37,80,.22)!important}
.auth-screen .tabs{background:#edf4fc!important;border:1px solid #dbe7f5!important}
.auth-screen .tab{color:#49627d!important}
.auth-screen .tab.active{background:linear-gradient(100deg,#347bd0,#4b91df)!important;color:#fff!important}
.auth-screen .auth-form label{color:#385875!important}
.auth-screen .auth-form input{background:#edf4fd!important;border:1px solid #d3e0ef!important;color:#193553!important}
.auth-screen .primary{background:linear-gradient(100deg,#347bd0,#4b91df)!important}
.auth-screen .welcome-copy{color:#e8f2ff!important}
.auth-screen .compact-brand h1{color:#fff!important}
.auth-screen .eyebrow{color:#d5e6ff!important}
.auth-screen .or{color:#8296ad!important}
.auth-screen .admin-entry{color:#3478c5!important}
.auth-screen .tiny{color:#8294a8!important}
.auth-screen .game-showcase{border-top:1px solid #dce8f4!important}
.auth-screen .game-heading{color:#345d83!important}
.auth-screen .game-tile{height:auto;aspect-ratio:1/1.22;background:#fff!important;border:2px solid #4389d4;box-shadow:0 5px 16px #315b871c!important;padding:4px!important}
.auth-screen .game-tile:nth-child(4n+2){border-color:#e58ab9}
.auth-screen .game-tile:nth-child(4n+3){border-color:#9b83df}
.auth-screen .game-tile:nth-child(4n){border-color:#68bba7}
.auth-screen .game-tile img{height:calc(100% - 20px);border-radius:10px!important}
.auth-screen .game-tile span{display:block;text-align:center;color:#294663;font-size:11px;font-weight:800;padding:4px 1px 1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-carousel{display:flex;align-items:center;gap:7px}
.game-viewport{min-width:0;flex:1;overflow:hidden}
.game-track{width:max-content;display:flex;align-items:stretch;gap:11px;animation:gameslide 48s linear infinite}
.game-showcase:hover .game-track{animation-play-state:paused}
.game-arrow{flex:0 0 30px;width:30px;height:38px;border-radius:13px;font-size:25px}
.mobile-support-links{display:none}
.whatsapp-btn{background:#25D366!important;border-color:#25D366!important;color:#fff!important}
.telegram-btn{background:#229ED9!important;border-color:#229ED9!important;color:#fff!important}

/* Chat is an app-sized viewport: only the message timeline scrolls */
html:has(body.app-bg),body.app-bg{height:100%;min-height:0;overflow:hidden}
body.app-bg{height:100dvh;display:flex;flex-direction:column}
body.app-bg .topbar{height:52px;min-height:52px;flex:0 0 52px}
body.app-bg>.ticker{height:27px;min-height:27px;flex:0 0 27px;font-size:10px}
body.app-bg .chat-layout{height:calc(100dvh - 87px);min-height:0;flex:1;margin:8px auto 0;padding:0 14px 8px;overflow:hidden}
body.app-bg .chat-card{min-height:0;min-width:0;height:100%;overflow:hidden}
body.app-bg .chat-head{height:62px;min-height:62px;flex:0 0 62px;padding:9px 14px}
body.app-bg .messages{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
body.app-bg .composer{flex:0 0 auto;min-height:58px;padding:9px 12px}
body.app-bg .composer-note{flex:0 0 auto;padding:0 0 7px}
body.app-bg .side-card{overflow:auto}
@media(min-width:701px){body.app-bg .mobile-support-links{display:none!important}}
@media(max-width:700px){
 html:has(body.app-bg),body.app-bg{overflow:hidden!important}
 body.app-bg .topbar{height:46px;min-height:46px;flex-basis:46px;padding:0 11px}
 body.app-bg>.ticker{height:24px;min-height:24px;flex-basis:24px;font-size:9px;letter-spacing:.7px}
 body.app-bg .chat-layout{display:flex;flex-direction:column;width:100%;height:calc(100dvh - 70px);min-height:0;max-height:calc(100dvh - 70px);margin:0;padding:7px 8px 8px;gap:0;overflow:hidden}
 body.app-bg .chat-layout>.side-card{display:none!important}
 body.app-bg .chat-layout>.chat-card{display:flex;flex:1 1 auto;width:100%;height:100%;min-height:0;max-height:100%;border-radius:17px}
 body.app-bg .chat-head{height:54px;min-height:54px;flex-basis:54px;padding:7px 9px;gap:6px}
 body.app-bg .chat-head>div:nth-of-type(1){min-width:0;flex:1}
 body.app-bg .chat-head strong{font-size:13px}
 body.app-bg .chat-head small{font-size:9px;white-space:nowrap}
 body.app-bg .online-pill{padding:5px 7px;font-size:9px;white-space:nowrap}
 body.app-bg .theme-select{max-width:72px;min-width:64px;padding:5px 4px;font-size:10px}
 body.app-bg .mobile-support-links{display:flex;flex:0 0 43px;min-height:43px;gap:8px;padding:5px 9px;border-bottom:1px solid #dce7f2;background:rgba(255,255,255,.94)}
 body.app-bg .mobile-support-links a{display:flex;flex:1;align-items:center;justify-content:center;min-width:0;border-radius:9px;text-decoration:none;font-size:11px;font-weight:800;box-shadow:0 3px 9px #24476c1c}
 body.app-bg .messages{padding:12px 10px;gap:9px}
 body.app-bg .msg{max-width:88%;font-size:12px;padding:9px 11px}
 body.app-bg .composer{min-height:54px;padding:7px 7px;gap:6px}
 body.app-bg .composer input[name=body]{font-size:12px;padding:10px 9px;min-width:0}
 body.app-bg .emoji-toggle{width:32px;height:34px;flex-basis:32px;font-size:20px}
 body.app-bg .attach{font-size:22px}
 body.app-bg .send-btn{padding:10px 11px;font-size:11px;white-space:nowrap}
 body.app-bg .composer-note{font-size:9px;padding-bottom:5px}
 body.app-bg .chat-emoji-picker{bottom:55px;left:7px;max-width:min(260px,90vw)}
}
@media(max-height:650px) and (max-width:700px){
 body.app-bg .chat-head{height:48px;min-height:48px;flex-basis:48px}
 body.app-bg .mobile-support-links{height:38px;min-height:38px;flex-basis:38px}
 body.app-bg .composer{min-height:48px;padding:5px 6px}
 body.app-bg .composer-note{display:none}
}


/* GameVault home screen + player controls final refinement */
.auth-screen{min-height:100dvh;background:linear-gradient(105deg,rgba(8,18,48,.82) 0%,rgba(12,33,73,.54) 52%,rgba(7,15,38,.20) 100%),url('signup-dragon.png') 72% center/cover no-repeat!important;background-attachment:scroll!important}
.auth-screen .mobile-shell{width:min(100% - 28px,620px);margin:0 auto;padding:12px 0 22px}
.auth-screen .compact-brand{text-align:center;padding:5px 8px 12px}
.auth-screen .compact-brand .logo{margin:0 auto 8px}
.auth-screen .compact-brand h1{font-size:clamp(25px,5vw,36px);margin:5px 0 7px}
.auth-screen .welcome-copy{max-width:480px;margin:0 auto;line-height:1.5}
.auth-screen .galaxy-panel{padding:clamp(14px,3vw,22px);border-radius:22px}
.auth-screen .social{display:flex!important;flex-direction:row!important;gap:10px}
.auth-screen .social a{flex:1;min-width:0;font-weight:800;border-radius:12px;padding:13px 8px}
.auth-screen .game-showcase{margin-top:17px;padding-top:14px;overflow:hidden}
.auth-screen .game-heading{font-weight:900;font-size:14px;letter-spacing:.3px;margin-bottom:10px}
.auth-screen .game-carousel{display:flex;align-items:center;gap:7px;width:100%;min-width:0}
.auth-screen .game-viewport{flex:1;min-width:0;overflow:hidden;position:relative}
.auth-screen .game-track{display:flex;width:max-content;gap:9px;animation:gameslide 42s linear infinite;will-change:transform}
.auth-screen .game-showcase:hover .game-track,.auth-screen .game-showcase:focus-within .game-track{animation-play-state:paused}
.auth-screen .game-tile{flex:0 0 auto;width:clamp(88px,calc((min(100vw,620px) - 125px)/4),126px);aspect-ratio: .82;display:flex;flex-direction:column;gap:5px;padding:4px!important;border-radius:17px 10px 17px 10px!important;overflow:hidden}
.auth-screen .game-tile img{width:100%;height:auto!important;aspect-ratio:1/1;object-fit:cover;border-radius:11px!important}
.auth-screen .game-tile span{font-size:10px!important;line-height:1.15;padding:2px 1px 3px!important}
.auth-screen .game-arrow{border:0;background:linear-gradient(145deg,#397fda,#6853c8);color:white;box-shadow:0 5px 14px #2355a944;flex:0 0 30px;width:30px;height:40px;border-radius:12px;font-size:24px;cursor:pointer}
@keyframes gameslide{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.admin-entry{margin-top:15px;padding:9px;border-radius:10px;background:#edf5ff}
@media(max-width:700px){
 .auth-screen{background:linear-gradient(180deg,rgba(8,20,48,.66),rgba(8,18,43,.86)),url('signup-dragon.png') 67% center/cover no-repeat!important}
 .auth-screen .mobile-shell{width:calc(100% - 20px);padding:7px 0 14px}
 .auth-screen .compact-brand{padding:4px 4px 9px}
 .auth-screen .compact-brand .logo{width:46px;height:46px;border-radius:15px}
 .auth-screen .compact-brand h1{font-size:23px}
 .auth-screen .welcome-copy{font-size:12px;max-width:340px}
 .auth-screen .galaxy-panel{padding:13px;border-radius:18px}
 .auth-screen .tabs{margin-bottom:15px}
 .auth-screen .auth-form{gap:7px}
 .auth-screen .auth-form input{padding:11px 12px}
 .auth-screen .primary{padding:12px}
 .auth-screen .or{margin:15px 0 10px}
 .auth-screen .social a{padding:11px 5px;font-size:11px}
 .auth-screen .game-tile{width:clamp(76px,calc((100vw - 112px)/3),104px)}
 .auth-screen .game-tile span{font-size:9px!important}
 .auth-screen .game-arrow{flex-basis:26px;width:26px;height:36px}
}

/* Chat preferences popover and user-adjustable readable text */
.chat-settings-toggle{border:1px solid #d8e5f3;background:#f2f7fd;color:#315d86;border-radius:10px;padding:8px 10px;font-weight:800;font-size:11px;white-space:nowrap;cursor:pointer}
.chat-settings{position:absolute;z-index:60;right:10px;top:58px;width:min(245px,calc(100vw - 34px));padding:13px;border:1px solid #d8e5f3;border-radius:14px;background:#fff;color:#294663;box-shadow:0 12px 32px #102a4b35;display:flex;flex-direction:column;gap:8px}
.chat-settings.hidden{display:none}
.chat-settings label{font-size:11px;font-weight:800;color:#496783}
.chat-settings select{width:100%}
.chat-settings input[type=range]{width:100%;accent-color:#397ed0;padding:0;background:transparent}
.chat-settings label b{float:right;color:#347bd0}
.msg{font-size:var(--chat-font-size,17px)!important;line-height:1.48}
.msg small{font-size:11px!important}
body[data-theme="dark"] .chat-settings{background:#1b2638;color:#eaf2ff;border-color:#3b4b63}
body[data-theme="dark"] .chat-settings label{color:#d4e2f4}
.profile-picker{max-height:210px;overflow-y:auto;overscroll-behavior:contain}
@media(max-width:700px){
 .chat-settings-toggle{font-size:10px;padding:7px 8px}
 .chat-settings{top:50px;right:7px}
 body.app-bg .msg{font-size:var(--chat-font-size,17px)!important}
 body.app-bg .chat-head{gap:5px}
}
