:root{--mx-bg:#071117;--mx-panel:rgba(8,16,22,.76);--mx-panel2:rgba(14,27,34,.82);--mx-gold:#f4c75b;--mx-gold2:#ffdf88;--mx-teal:#23c9b4;--mx-green:#43e58b;--mx-red:#ff5360;--mx-blue:#56b7ff;--mx-text:#f4f7f8;--mx-muted:#9bb0bb;--mx-line:rgba(255,255,255,.11);--mx-shadow:0 20px 60px rgba(0,0,0,.38)}
*{scrollbar-width:thin;scrollbar-color:#4f6872 transparent}.master-body{min-height:100vh;color:var(--mx-text);background:#061014 url('/assets/lounge-bg.png') center/cover fixed no-repeat;font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif}.master-body:before{content:"";position:fixed;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(2,8,12,.62),rgba(4,12,16,.82));z-index:0}.master-layer{position:relative;z-index:1}.glass{background:linear-gradient(135deg,rgba(255,255,255,.10),rgba(255,255,255,.035));border:1px solid var(--mx-line);box-shadow:var(--mx-shadow),inset 0 1px rgba(255,255,255,.07);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.master-top{height:72px;display:flex;align-items:center;gap:16px;padding:0 18px;position:sticky;top:0;z-index:50;background:rgba(4,10,14,.72);border-bottom:1px solid var(--mx-line);backdrop-filter:blur(20px)}.master-logo{display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none;min-width:270px}.master-logo img{max-height:48px;max-width:170px;border-radius:10px}.master-logo .fallback{font-size:30px}.master-logo strong{font-size:17px}.master-logo small{display:block;color:var(--mx-muted);font-size:10px;letter-spacing:.12em}.master-nav{display:flex;gap:3px;flex:1;align-self:stretch}.master-nav a{display:flex;align-items:center;padding:0 13px;color:#eaf1f3;text-decoration:none;font-size:12px;font-weight:700;border-bottom:2px solid transparent}.master-nav a:hover,.master-nav a.active{color:var(--mx-gold2);border-bottom-color:var(--mx-gold)}.master-account{display:flex;align-items:center;gap:10px;padding:8px 11px;border-radius:12px;background:rgba(255,255,255,.05);border:1px solid var(--mx-line);font-size:12px}.master-account .dot{width:8px;height:8px;border-radius:50%;background:var(--mx-green);box-shadow:0 0 12px var(--mx-green)}.master-account a{color:#fff;text-decoration:none}.master-radio{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:13px;background:rgba(0,0,0,.35);border:1px solid var(--mx-line)}.master-radio button{width:30px;height:30px;border-radius:50%;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.08);color:#fff;cursor:pointer}.master-radio input{width:75px;accent-color:var(--mx-gold)}
.master-shell{max-width:1600px;margin:0 auto;padding:16px;display:grid;grid-template-columns:235px minmax(0,1fr) 320px;gap:14px}.master-left,.master-right,.master-center{min-width:0}.panel-title{display:flex;justify-content:space-between;align-items:center;padding:13px 14px;border-bottom:1px solid var(--mx-line)}.panel-title b{font-size:13px}.panel-title span{font-size:10px;color:var(--mx-muted)}.floor-panel{overflow:hidden;border-radius:18px}.floor-list{padding:8px}.floor-list a{display:flex;justify-content:space-between;align-items:center;gap:7px;padding:12px 11px;margin:4px 0;border-radius:11px;color:#e8f0f2;text-decoration:none;border:1px solid transparent}.floor-list a:hover{background:rgba(255,255,255,.05)}.floor-list a.active{background:linear-gradient(90deg,rgba(244,199,91,.23),rgba(244,199,91,.06));border-color:rgba(244,199,91,.42);box-shadow:inset 3px 0 var(--mx-gold)}.floor-list small{color:var(--mx-muted)}.left-links{padding:8px}.left-links a{display:flex;gap:8px;align-items:center;color:#d8e2e5;text-decoration:none;padding:10px;border-radius:9px}.left-links a:hover{background:rgba(255,255,255,.05)}
.master-hero{border-radius:20px;overflow:hidden;min-height:300px;position:relative;background:linear-gradient(90deg,rgba(3,9,13,.93),rgba(3,9,13,.55),rgba(3,9,13,.25)),url('/assets/lounge-bg.png') center/cover}.master-hero:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 75% 30%,rgba(35,201,180,.22),transparent 28%),linear-gradient(0deg,rgba(3,10,13,.7),transparent 45%)}.hero-content{position:relative;z-index:1;padding:34px 34px 26px;max-width:680px}.hero-kicker{color:var(--mx-gold2);font-size:11px;letter-spacing:.18em;font-weight:800}.hero-content h1{font-size:42px;line-height:1.03;margin:10px 0 12px}.hero-content h1 span{color:var(--mx-gold2);text-shadow:0 0 20px rgba(244,199,91,.18)}.hero-content p{color:#c8d5d9;line-height:1.6;margin:0 0 20px}.hero-actions{display:flex;gap:9px;flex-wrap:wrap}.hero-btn{display:inline-flex;align-items:center;gap:8px;padding:12px 16px;border-radius:12px;text-decoration:none;color:#17130a;font-weight:900;background:linear-gradient(180deg,#ffe28b,#d9a52f);box-shadow:0 9px 30px rgba(244,199,91,.16)}.hero-btn.secondary{color:#eef5f7;background:rgba(255,255,255,.08);border:1px solid var(--mx-line)}.hero-stats{display:flex;gap:22px;margin-top:23px}.hero-stats b{display:block;font-size:20px;color:#fff}.hero-stats small{color:var(--mx-muted)}
.center-head{margin-top:14px;border-radius:16px;padding:12px 15px;display:flex;align-items:center;justify-content:space-between}.center-head h2{margin:0;font-size:18px}.center-head small{color:var(--mx-muted)}.live{color:var(--mx-green);font-size:11px;font-weight:800}.salon-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin-top:10px}.salon-card-modern{position:relative;min-height:110px;border-radius:15px;padding:13px;color:#fff;text-decoration:none;overflow:hidden;background:linear-gradient(180deg,rgba(255,255,255,.11),rgba(255,255,255,.035));border:1px solid var(--mx-line)}.salon-card-modern:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 70% 15%,rgba(244,199,91,.16),transparent 34%)}.salon-card-modern.active{border-color:rgba(244,199,91,.62);box-shadow:0 0 25px rgba(244,199,91,.10)}.salon-card-modern b,.salon-card-modern small{position:relative;display:block}.salon-card-modern small{margin-top:7px;color:var(--mx-muted)}.salon-card-modern .occupancy{position:absolute;right:11px;bottom:10px;color:#dce8eb;font-size:10px}.table-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.table-card{position:relative;min-height:126px;border-radius:17px;padding:15px;background:radial-gradient(circle at 50% 25%,rgba(35,201,180,.18),transparent 35%),linear-gradient(145deg,rgba(8,35,31,.92),rgba(7,15,19,.86));border:1px solid rgba(80,220,191,.18);overflow:hidden}.table-card.playing{border-color:rgba(255,83,96,.35)}.table-card .table-top{display:flex;justify-content:space-between;align-items:flex-start}.table-card h3{margin:0;font-size:15px}.table-card .state{font-size:10px;padding:4px 7px;border-radius:20px;background:rgba(67,229,139,.12);color:var(--mx-green)}.table-card.playing .state{background:rgba(255,83,96,.12);color:#ff8790}.table-seats{display:flex;gap:7px;margin-top:16px;flex-wrap:wrap}.seat-chip{font-size:10px;color:#dbe5e8;padding:5px 8px;border-radius:8px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.06)}.table-actions{position:absolute;right:13px;bottom:12px;display:flex;gap:6px}.mini-action{border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.07);color:#fff;border-radius:8px;padding:6px 9px;text-decoration:none;font-size:10px}.mini-action.primary{background:linear-gradient(180deg,#35db87,#158653);border-color:#55e69a}.empty-card{grid-column:1/-1;padding:35px;text-align:center;color:var(--mx-muted)}
.user-panel{border-radius:18px;overflow:hidden}.user-list-modern{max-height:66vh;overflow:auto;padding:7px}.u-row{display:flex;align-items:center;gap:8px;padding:8px;border-radius:10px}.u-row:hover{background:rgba(255,255,255,.05)}.u-avatar{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#193e49,#0e2028);border:1px solid rgba(255,255,255,.12);font-size:12px}.u-row .u-main{flex:1;min-width:0}.u-row b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.u-row small{display:block;color:var(--mx-muted);font-size:9px}.u-row em{font-style:normal;color:var(--mx-gold2);font-size:9px}.rank-webmaster b{color:#ffe28a}.rank-site_admin b{color:#ff6570}.rank-site_coordinator b{color:#58c8ff}.rank-site_moderator b{color:#d5d9dd}.rank-salon_as_admin b{color:#ffe28a}.rank-salon_admin b{color:#ff6570}.rank-salon_super_op b{color:#cc87ff}.rank-salon_op b{color:#49e9ff}.rank-player b{color:#eef3f4}.chat-panel{margin-top:12px;border-radius:18px;overflow:hidden}.chat-messages{height:230px;overflow:auto;padding:10px}.chat-line-modern{padding:5px 3px;font-size:11px;border-bottom:1px solid rgba(255,255,255,.045)}.chat-line-modern b{color:var(--mx-gold2)}.chat-line-modern small{float:right;color:#738a94}.chat-form-modern{display:flex;gap:6px;padding:9px;border-top:1px solid var(--mx-line)}.chat-form-modern input{flex:1;min-width:0;background:rgba(255,255,255,.06);border:1px solid var(--mx-line);color:#fff;border-radius:9px;padding:9px}.chat-form-modern button{border:0;border-radius:9px;background:linear-gradient(180deg,#ffe08a,#d4a02b);color:#1b160b;font-weight:800;padding:9px 13px}
.game-master{min-height:100vh;background:#061014 url('/assets/lounge-bg.png') center/cover fixed no-repeat;color:#f5f7f7}.game-master:before{content:"";position:fixed;inset:0;background:linear-gradient(rgba(2,8,12,.74),rgba(3,12,15,.82));pointer-events:none}.game-master .game-header,.game-master .game-shell,.game-master .game-footer{position:relative;z-index:1}.game-master .game-header{background:rgba(4,10,14,.75);border-bottom:1px solid var(--mx-line);backdrop-filter:blur(18px)}.game-master .game-shell{max-width:1600px;margin:0 auto;padding:12px;gap:12px}.game-master .game-stage{border-radius:22px;overflow:hidden;background:radial-gradient(circle at 50% 50%,rgba(21,105,78,.92),rgba(5,35,27,.96) 48%,rgba(3,17,17,.98));border:1px solid rgba(244,199,91,.20);box-shadow:0 30px 80px rgba(0,0,0,.42)}.game-master .game-stage:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 50% 50%,transparent 35%,rgba(0,0,0,.35) 100%)}.game-master .game-stage-bar{background:rgba(4,12,15,.55);border-bottom:1px solid rgba(255,255,255,.08)}.game-master .game-side{border-radius:18px;background:rgba(5,13,17,.72);border:1px solid var(--mx-line);backdrop-filter:blur(16px)}.game-master .rack{background:linear-gradient(180deg,#5b3b20,#2c1a10);border-color:#d4a45a;box-shadow:0 16px 35px rgba(0,0,0,.35),inset 0 1px rgba(255,255,255,.20)}.game-master .tile{border-color:rgba(255,255,255,.28);box-shadow:0 7px 12px rgba(0,0,0,.32),inset 0 1px rgba(255,255,255,.65);font-weight:900}.game-master .tile.red{color:#f03e55}.game-master .tile.blue{color:#31a7ff}.game-master .tile.black{color:#15191b}.game-master .tile.yellow{color:#efb62f}.game-master .game-actions button{border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.08);color:#fff}.game-master .game-actions button.primary{background:linear-gradient(180deg,#ffdc77,#bc8122);color:#1b160b;border:0}.game-master .game-actions .exit-btn{background:rgba(255,83,96,.15);color:#ff9aa1}.game-master .player-row,.game-master .side-tabs{border-color:rgba(255,255,255,.08)}
.master-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.65);z-index:200}.master-modal.show{display:flex}.master-modal-card{width:min(560px,calc(100% - 24px));border-radius:18px;padding:18px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.settings-grid label{display:flex;flex-direction:column;gap:5px;color:var(--mx-muted);font-size:11px}.settings-grid input,.settings-grid select{background:rgba(255,255,255,.06);border:1px solid var(--mx-line);color:#fff;border-radius:8px;padding:9px}.settings-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:14px}.settings-actions button{padding:9px 13px;border-radius:8px;border:1px solid var(--mx-line);background:rgba(255,255,255,.07);color:#fff}.settings-actions .save{background:linear-gradient(180deg,#ffdc77,#bc8122);color:#1b160b;border:0}
@media(max-width:1180px){.master-shell{grid-template-columns:200px minmax(0,1fr)}.master-right{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px}.user-list-modern{max-height:320px}.chat-panel{margin-top:0}.master-logo{min-width:220px}.master-nav a{padding:0 8px}}@media(max-width:850px){.master-top{height:auto;min-height:64px;flex-wrap:wrap;padding:8px}.master-nav{order:3;flex-basis:100%;overflow:auto;height:38px}.master-shell{grid-template-columns:1fr;padding:8px}.master-left{display:block}.floor-list{display:flex;overflow:auto}.floor-list a{min-width:130px}.salon-cards,.table-grid{grid-template-columns:1fr 1fr}.master-right{grid-template-columns:1fr}.hero-content h1{font-size:32px}}@media(max-width:560px){.salon-cards,.table-grid{grid-template-columns:1fr}.hero-content{padding:25px}.hero-stats{gap:13px}.hero-stats b{font-size:17px}.master-account{display:none}.master-radio{display:none}.settings-grid{grid-template-columns:1fr}}

/* v52 mobile-first responsive layer */
html,body{max-width:100%;overflow-x:hidden}
img,video,canvas{max-width:100%;height:auto}
button,input,select,textarea{font:inherit;max-width:100%}
@media (max-width:1100px){
 .master-shell{grid-template-columns:190px minmax(0,1fr);padding:12px}
 .master-right{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,380px);gap:12px}
 .user-panel,.chat-panel{margin-top:0}
 .user-list-modern{max-height:320px}
 .salon-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
 .master-logo{min-width:190px}
 .master-nav a{padding:0 8px}
}
@media (max-width:760px){
 .master-top{height:auto;min-height:60px;padding:9px 10px;gap:8px;flex-wrap:wrap}
 .master-logo{min-width:0;flex:1}.master-logo img{max-width:120px;max-height:38px}.master-logo strong{font-size:14px}.master-logo small{display:none}
 .master-nav{order:3;flex:0 0 100%;overflow-x:auto;scrollbar-width:none;height:42px}.master-nav::-webkit-scrollbar{display:none}.master-nav a{white-space:nowrap;padding:0 11px;font-size:11px}
 .master-account{font-size:11px;padding:6px 8px}.master-radio{padding:5px}.master-radio input{width:58px}
 .master-shell{display:flex;flex-direction:column;padding:8px;gap:9px}
 .master-left{order:0}.master-center{order:1}.master-right{order:2;display:flex;flex-direction:column}
 .floor-list{display:flex;overflow-x:auto;gap:6px;padding:7px;scrollbar-width:none}.floor-list::-webkit-scrollbar{display:none}.floor-list a{min-width:105px;justify-content:center;margin:0;padding:10px 8px}
 .left-links{display:flex;overflow-x:auto;gap:6px;padding:6px}.left-links a{white-space:nowrap;padding:8px}
 .master-hero{min-height:250px}.hero-content{padding:25px 20px}.hero-content h1{font-size:30px}.hero-content p{font-size:14px}.hero-stats{gap:14px;flex-wrap:wrap}
 .salon-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.salon-card-modern{min-height:96px;padding:10px}
 .table-grid{grid-template-columns:1fr}.table-card{min-height:115px}
 .user-list-modern{max-height:280px}.chat-messages{height:190px}
 .chat-form-modern input{font-size:16px}.chat-form-modern button{padding:9px 11px}
 .glass{border-radius:14px}
}
@media (max-width:430px){
 .master-top{padding:7px}.master-account .dot{display:none}.master-account{max-width:110px;overflow:hidden;white-space:nowrap}
 .master-radio{display:none}.master-logo .fallback{font-size:23px}
 .salon-cards{grid-template-columns:1fr}.salon-card-modern{min-height:78px}
 .hero-actions{display:grid;grid-template-columns:1fr}.hero-btn{justify-content:center}
 .hero-stats{display:grid;grid-template-columns:1fr 1fr}.table-actions{position:static;margin-top:12px;display:flex}.mini-action{flex:1;text-align:center}
}

/* mobile game table / rack */
.game-master{min-height:100dvh;overflow-x:hidden}
.game-master .game-shell{width:100%;box-sizing:border-box}
@media(max-width:900px){
 .game-master .game-header{padding:8px 10px;display:flex;flex-wrap:wrap;gap:7px}
 .game-master .game-shell{padding:7px;display:flex;flex-direction:column}
 .game-master .game-stage{min-height:430px;border-radius:16px}
 .game-master .game-sidebar,.game-master .game-right,.game-master .game-chat{width:100%;max-width:none}
 .game-master .game-stage{order:0}.game-master .game-chat{order:1}.game-master .game-sidebar{order:2}
}
@media(max-width:600px){
 .game-master .game-stage{min-height:390px}
 .game-master .game-header h1{font-size:15px}
 .game-master .game-header .actions{width:100%;display:flex;overflow-x:auto;gap:6px}
 .game-master .game-header button,.game-master .game-header a{white-space:nowrap;font-size:11px;padding:7px 9px}
 .game-master .rack,.game-master .player-rack{overflow-x:auto;overflow-y:hidden;padding:7px 4px;scrollbar-width:none}
 .game-master .rack::-webkit-scrollbar,.game-master .player-rack::-webkit-scrollbar{display:none}
 .game-master .tile{min-width:36px;width:36px;height:49px;font-size:19px;border-radius:6px}
 .game-master .tile-row{gap:3px}
 .game-master .top-rack,.game-master .bottom-rack{justify-content:flex-start;overflow-x:auto}
 .game-master .seat,.game-master .player-seat{transform:scale(.9);transform-origin:center}
}
@media(max-width:380px){.game-master .tile{min-width:32px;width:32px;height:44px;font-size:17px}.game-master .game-stage{min-height:360px}}

/* customer home mobile */
@media(max-width:760px){
 .customer-home .home-nav{padding:8px 10px}.customer-home .hero-home{margin:8px;border-radius:16px}.customer-home .hero-customer .hero-copy{padding:45px 20px}.customer-home .hero-copy h1{font-size:38px}.customer-home .hero-copy p{font-size:15px}.customer-home .home-section{margin:8px;padding:42px 18px}.customer-home .home-cards{grid-template-columns:1fr}.customer-home .hero-stats{grid-template-columns:1fr 1fr;display:grid}.customer-home .hero-actions{display:grid;grid-template-columns:1fr}
}

/* admin mobile */
@media(max-width:760px){
 .admin-main{overflow:hidden}.admin-header{align-items:flex-start;gap:10px;flex-wrap:wrap}.admin-header h1{font-size:22px}.dashboard-grid{grid-template-columns:1fr}.metric-grid{grid-template-columns:1fr 1fr}.table-wrap{margin-inline:-4px}.admin-main table{min-width:650px}
 .quick-actions{grid-template-columns:1fr 1fr}.admin-sidebar{overflow-x:auto}.admin-nav a{font-size:11px;padding:9px}
}
@media(max-width:420px){.metric-grid{grid-template-columns:1fr}.quick-actions{grid-template-columns:1fr}.admin-header-actions{width:100%;align-items:stretch}.back-site{text-align:center}}
