/* BEMMAFIA V13.18.12 · one noir design system across landing, game, shop, profiles and administration.
   Non-destructive presentation overrides; game rules, data hooks and page layouts remain intact. */
:root{
  --mafia-bg:#0c090e;--mafia-surface:#1b1219;--mafia-surface-high:#271923;
  --mafia-edge:rgba(219,162,101,.22);--mafia-edge-strong:rgba(222,167,108,.45);
  --mafia-gold:#e9be82;--mafia-gold-soft:#c49c71;--mafia-crimson:#bf3449;
  --mafia-cream:#f9ead9;--mafia-muted:#b7a8aa;--mafia-radius:17px;
  color-scheme:dark;
}
body{background-color:var(--mafia-bg);color:var(--mafia-cream)}
:where(button,a,input,select,textarea):focus-visible{outline:2px solid #f0c78b;outline-offset:3px}
:where(button,.btn,.button,.nav-item,.shop-category,.social-filter):not(:disabled){transition:background .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease,color .2s ease}
:where(.btn.primary,.button:not(.secondary):not(.danger):not(.ok)):not(:disabled){background:linear-gradient(115deg,#b22b40,#771d31);color:#fff6e7;border:1px solid #dc8274;box-shadow:0 8px 22px #a224383b}
:where(.btn.primary,.button:not(.secondary):not(.danger):not(.ok)):hover:not(:disabled){background:linear-gradient(115deg,#cd3a4e,#8f2437);box-shadow:0 11px 27px #c12e4a48;transform:translateY(-1px)}
:where(.btn.secondary,.button.secondary):not(:disabled){background:#291d25;border:1px solid #654c4e;color:#f6e6d4}
:where(.btn.secondary,.button.secondary):hover:not(:disabled){background:#3c2431;border-color:#ba866f;color:#fff4e5}
:where(input,textarea,select){accent-color:#bc394d}
::selection{background:#8d3247;color:#fff}
/* Dashboard / section headings */
.dashboard-shell{background:radial-gradient(ellipse at 89% 0%,rgba(102,25,39,.15),transparent 38%),#0c0a0f}
.dash-body{background:radial-gradient(ellipse at 65% 0%,rgba(117,29,46,.1),transparent 45%)}
.dash-header{background:linear-gradient(95deg,#180e14,#130e12);border-bottom:1px solid var(--mafia-edge)}
.dash-header .mobile-brand{font-family:Georgia,serif;color:var(--mafia-gold);letter-spacing:.06em}
.dash-main{color:var(--mafia-cream)}
.view-title h2,.dash-welcome h1,.section-heading h2,.mini-head h2,.rooms-browser-intro h2,.about-hero h3{font-family:Georgia,'Times New Roman',serif;letter-spacing:-.03em;color:#f9dfb4}
.view-title .auth-kicker,.auth-kicker,.compact-eyebrow{color:var(--mafia-gold-soft);letter-spacing:.15em}
.view-title p,.dash-welcome p{color:#c6b7b6;line-height:1.75}
.dash-card,.dashboard-guide,.stat-box,.profile-summary,.guest-banner,.rules-notice,.rooms-section{background:linear-gradient(150deg,rgba(39,24,32,.95),rgba(19,16,22,.98));border:1px solid var(--mafia-edge);border-radius:var(--mafia-radius);box-shadow:inset 0 1px rgba(255,230,192,.035),0 10px 32px rgba(0,0,0,.14)}
.dash-card h3,.dashboard-guide h2,.dash-welcome h1{color:#f7e0ba}
.dashboard-guide-step,.stat-box,.rooms-browser-metrics>div{border-color:var(--mafia-edge);background:linear-gradient(140deg,#21151d,#151119)}
.stat-box strong,.rooms-browser-metrics strong{color:#ffe2bd}
.guest-banner{border-color:rgba(217,159,99,.47);background:radial-gradient(circle at left,rgba(120,37,49,.23),transparent 58%),linear-gradient(115deg,#311c23,#161118)}
.guest-banner-icon{background:#522836;border-color:#a46d5d;color:#ecc28b}
.dash-account .server-status,.online-beacon{color:#e7d0b4}
.guest-banner p,.dash-card p{line-height:1.7}
.account-chip{background:#22161e;border-color:#68434a}
.account-chip:hover{border-color:#c48f6b}
.dash-footer{border-top:1px solid var(--mafia-edge);padding-top:14px;color:#a99292}
/* Room browsing, profile, friends, rules, leaderboard, tournaments, shop */
.rooms-browser-hero,.profile-section .dash-card,.premium-section .shop-card,.public-room-card,.tournament-card,.about-grid .dash-card,.rule-overview .dash-card{border-color:var(--mafia-edge-strong);background:linear-gradient(145deg,#24151e,#141017 79%)}
.rooms-browser-hero,.premium-section .shop-card{box-shadow:0 14px 40px rgba(0,0,0,.23)}
.rooms-browser .public-room-card:hover,.premium-section .shop-card:hover{border-color:#d7a16d;box-shadow:0 16px 36px #05030580}
.social-filter.active,.shop-category.active{background:linear-gradient(100deg,#762d3b,#3f202a);color:#ffe5b4;border-color:#c18b63}
.balance-table th,.scroll-table th{color:#e8bd91}
.rules-notice{border-left:3px solid #b98460}
/* Lobby + in-game, including audio and chat controls */
.game{background:radial-gradient(ellipse at 30% 0%,#5e1b2a17,transparent 48%),#0b090e}
.game-header{background:linear-gradient(100deg,#1b1118,#0f0c12);border-bottom-color:var(--mafia-edge)}
.game-header .brand.compact span{font-family:Georgia,serif;color:var(--mafia-gold)}
.arena,.chat-panel,.sidebar-panels,.lobby-room-toolbar,.video-tile,.media-controls,.action-panel{border-color:var(--mafia-edge)}
.game .arena-top h1,.game #mainTitle,.game #lobbyRoomName{font-family:Georgia,'Times New Roman',serif;color:#f5d7a5}
.media-btn,.game .btn.secondary{border-color:#624449;background:#211720;color:#f5e4d7}
.media-btn:hover{border-color:#b98468;background:#34212b}
.game .chat-panel{background:linear-gradient(170deg,#20151d,#111016)}
/* Shared polished sign-in and guest dialogs */
body.bem-auth-open{overflow:hidden}
.auth-modal{z-index:1200;background:rgba(5,4,8,.85);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);padding:clamp(14px,3vw,30px)}
.auth-modal .auth-dialog{position:relative;width:min(100%,450px);border:1px solid #a36f60;border-radius:23px;padding:clamp(24px,4vw,38px);background:radial-gradient(circle at 50% 0%,#6e243036,transparent 49%),linear-gradient(145deg,#291820,#120e15 82%);box-shadow:0 28px 85px #000b,inset 0 1px #fbe1b21e}
.auth-dialog h2{font:700 clamp(25px,4.6vw,32px) Georgia,serif;letter-spacing:-.025em;line-height:1.2;color:#f9deb4;margin-top:7px}
.auth-dialog .auth-dialog-subtitle{font-size:13px;color:#c6b8b3;line-height:1.75;margin:10px 0 21px}
.auth-dialog .dashboard-form label{color:#e9d8c8;font-size:12px;letter-spacing:.01em}
.auth-dialog .dashboard-form input,.auth-dialog .dashboard-form select{background:#100d13;color:#fff1e6;border:1px solid #5f4547;border-radius:11px;min-height:45px;padding:11px 13px}
.auth-dialog .dashboard-form input:focus,.auth-dialog .dashboard-form select:focus{border-color:#d3a370;box-shadow:0 0 0 3px rgba(211,163,112,.16);outline:none}
.auth-dialog .auth-tabs{border:1px solid #4f3a42;border-radius:13px;background:#130f16;padding:4px}
.auth-dialog .auth-tab{border-radius:9px;color:#bba7ac}
.auth-dialog .auth-tab.active{background:linear-gradient(110deg,#893043,#5d2535);color:#fceddb}
.auth-dialog .modal-close{background:#2d1d25;border:1px solid #785053;color:#e5c3a5;transition:transform .2s,border-color .2s}
.auth-dialog .modal-close:hover{transform:rotate(90deg);border-color:#ddaa76}
.auth-dialog .auth-divider{margin:17px 0 13px}
.auth-dialog .auth-divider span{font-size:10px;letter-spacing:.16em;color:#c3a38c}
.auth-dialog .guest-open-option{display:flex;align-items:center;justify-content:center;gap:12px;min-height:48px;border-radius:12px;font-size:13px}
.bem-guest-dialog{text-align:center}
.bem-guest-emblem{width:112px;height:112px;display:grid;place-items:center;margin:-13px auto 6px;border-radius:50%;background:radial-gradient(circle,rgba(172,60,52,.17),transparent 72%)}
.bem-guest-emblem img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 9px 19px #000c)}
.bem-guest-form{text-align:left}
.bem-guest-form #guestSubmit{min-height:50px;margin-top:14px;font-weight:750;border-radius:12px}
.bem-guest-hint{font-size:11px;line-height:1.7;color:#bca5a3;margin:17px 0 10px}
.bem-guest-switch{border:0;background:none;color:#e6b87d;font-size:12px;font-weight:750;cursor:pointer;padding:8px}
.bem-guest-switch:hover{text-decoration:underline;color:#ffe0a5}
/* Landing page guest modal (native dialog) */
.bem-landing-guest-dialog{position:fixed;width:min(92vw,450px);max-height:min(90dvh,720px);overflow:auto;margin:auto;border:1px solid #ae7561;border-radius:24px;padding:clamp(23px,5vw,36px);color:#f9e7d3;background:radial-gradient(circle at 50% 0%,#762b3661,transparent 45%),linear-gradient(140deg,#281720,#100d13 84%);box-shadow:0 35px 110px #000b;text-align:center}
.bem-landing-guest-dialog::backdrop{background:rgba(4,3,7,.83);backdrop-filter:blur(10px)}
.bem-landing-close{position:absolute;right:13px;top:12px;width:35px;height:35px;border:1px solid #785256;border-radius:11px;background:#301e26;color:#fbe7c8;font-size:24px;cursor:pointer}
.bem-landing-guest-logo{display:block;width:112px;height:112px;object-fit:contain;margin:0 auto 9px;filter:drop-shadow(0 12px 19px #000b)}
.bem-landing-guest-dialog h2{font:700 clamp(26px,5vw,33px) Georgia,serif;color:#f8d6a4;margin:9px 0}
.bem-landing-guest-dialog>p{font-size:12px;color:#cbbcb3;line-height:1.75;margin:0 0 17px}
.bem-landing-guest-dialog form{display:grid;gap:9px;text-align:left}
.bem-landing-guest-dialog label{font-size:12px;font-weight:750;color:#efddca;margin-top:7px}
.bem-landing-guest-dialog :where(input,select){width:100%;min-height:46px;padding:12px 13px;background:#100d13;color:#fff0df;border:1px solid #60494a;border-radius:11px;font:inherit}
.bem-landing-guest-dialog form>button{min-height:49px;margin-top:13px;border:1px solid #d58778;border-radius:12px;background:linear-gradient(100deg,#b62c43,#82243a);color:white;font-weight:800;cursor:pointer}
.bem-landing-guest-dialog form>button:disabled{opacity:.6;cursor:wait}
.bem-landing-guest-dialog .bem-landing-guest-error{border:1px solid #b65b61;background:#4c2230;border-radius:9px;padding:9px;color:#ffd1d5}
.bem-landing-guest-dialog .bem-landing-guest-note{font-size:11px;margin:14px 0 6px}
.bem-landing-guest-login{font-size:12px;font-weight:750;color:#e4b881}
/* Admin panel + admin login */
body.admin-login-body{background:radial-gradient(ellipse at 70% 10%,#63233250,transparent 45%),#0b080d}
body.admin-login-body .admin-signin-card{background:linear-gradient(147deg,#271923,#130e15);border-color:#876354;border-radius:22px;box-shadow:0 28px 72px #0007}
body.admin-login-body .admin-signin-card h1{font:700 30px Georgia,serif;color:#f9dbad}
body.admin-login-body .admin-signin-card input{background:#100c12;border-color:#64484b}
body.admin-login-body .admin-signin-card input:focus{border-color:#deb87e;box-shadow:0 0 0 3px #d9a67429}
body.admin-login-body .admin-signin-back{color:#dbb789}
.bem-admin-emblem{width:54px!important;height:54px!important;flex:none;border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important}
.bem-admin-emblem img{width:100%;height:100%;object-fit:contain}
body:has(.shell) .shell{background:#0d090f}
body:has(.shell) .sidebar{background:linear-gradient(180deg,#1b1119,#0e0c11);border-color:var(--mafia-edge)}
body:has(.shell) .sidebar .brand{color:#f6d5a7}
body:has(.shell) .sidebar .nav{border:1px solid transparent;border-radius:11px}
body:has(.shell) .sidebar .nav:hover,body:has(.shell) .sidebar .nav.current{background:linear-gradient(95deg,#632536,#321b25);color:#ffe4bb;border-color:#95634f}
body:has(.shell) .sidebar .footnote{color:#a49191}
body:has(.shell) main{background:radial-gradient(ellipse at 75% 0%,#5a203022,transparent 36%)}
body:has(.shell) .top h1,body:has(.shell) .panel-head h2{font-family:Georgia,serif;color:#f8dab1}
body:has(.shell) .eyebrow{color:#d5a573}
body:has(.shell) .metrics article,body:has(.shell) .panel{background:linear-gradient(145deg,#21161e,#141117);border-color:var(--mafia-edge);border-radius:16px}
body:has(.shell) .metrics article strong{color:#f4d6ad}
body:has(.shell) .panel-head{border-bottom-color:var(--mafia-edge)}
body:has(.shell) table th{background:#231720;color:#e1b889}
body:has(.shell) table td{border-color:#4a303852}
body:has(.shell) :where(input,textarea,select){background:#131018;color:#f5e7df;border-color:#69504e}
body:has(.shell) .status{border:1px solid #64464c}
/* Maintenance page */
body:has(main > #message){background:radial-gradient(circle at 50% 0%,#672b3540,#0b090e 69%)}
body:has(main > #message) main{border-color:#a17559;background:linear-gradient(145deg,#2b1821,#150e15);box-shadow:0 25px 85px #0009}
body:has(main > #message) h1{font-family:Georgia,serif;color:#f2cb97}
@media(max-width:820px){
  .dash-header .dash-account{flex-wrap:wrap;justify-content:flex-end}
  .dash-main{padding-top:22px}
  .auth-modal .auth-dialog{max-height:calc(100dvh - 36px);overflow-y:auto}
  body:has(.shell) .sidebar nav{scrollbar-width:none}
}
@media(max-width:480px){
  .guest-banner{align-items:flex-start}
  .guest-banner button{margin:4px 0 0!important;width:100%}
  .auth-modal{padding:12px}
  .auth-modal .auth-dialog{padding:23px 19px}
  .bem-guest-emblem{width:92px;height:92px}
  .dash-main .view-title h2{font-size:26px}
  .bem-landing-guest-dialog{padding:22px 19px}
}
@media(prefers-reduced-motion:reduce){:where(button,a,input,select,textarea){transition:none!important;scroll-behavior:auto!important}}
