/* MasaLobi universal lounge layout v1.
 * Applies only to Batak, Düz Okey and Tavla pages that opt in.
 * No game logic or original room control IDs are altered. */

body.mls-standard .mls-first-row{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  align-items:stretch;gap:10px;margin:7px 0 12px;
}
body.mls-standard .mls-first-row > *{min-width:0;}
body.mls-standard .mls-left,
body.mls-standard .mls-mine-stage{min-width:0;min-height:308px;}
body.mls-standard .mls-left{display:flex;flex-direction:column;}
body.mls-standard .mls-mine-stage{flex:1;}
body.mls-standard .mls-hero{
  position:relative;isolation:isolate;overflow:hidden;
  box-sizing:border-box;height:100%;min-height:308px;
  border:1px solid #bb9151;border-radius:10px;
  background:
   radial-gradient(circle at 85% 22%,rgba(219,171,77,.21),transparent 37%),
   radial-gradient(circle at -5% 110%,rgba(54,135,131,.33),transparent 56%),
   linear-gradient(135deg,#102f40,#081d2c 67%,#10253b);
  box-shadow:inset 0 1px 0 #ffffff1a,0 9px 26px #0003;
}
body.mls-standard .mls-hero:before{
  content:"";position:absolute;inset:8px;pointer-events:none;
  border:1px solid #d4a45a30;border-radius:8px;
}
body.mls-standard .mls-hero-mark{
  position:absolute;right:-35px;top:-6px;font:230px/.9 Georgia,serif;
  color:#f2c07715;transform:rotate(-15deg);pointer-events:none;
}
body.mls-standard .mls-hero-content{
  min-height:308px;box-sizing:border-box;position:relative;z-index:1;
  display:flex;flex-direction:column;align-items:flex-start;
  padding:25px 23px 20px;
}
body.mls-standard .mls-hero-eyebrow{
  display:flex;flex-wrap:wrap;align-items:center;gap:9px;
  color:#e2b974;font:850 10px system-ui;letter-spacing:1px;
}
body.mls-standard .mls-hero-badge{
  border:1px solid #d7aa6380;border-radius:15px;padding:3px 8px;
  background:#d7a44f13;color:#f0d192;font:750 9px system-ui;
  letter-spacing:0;
}
body.mls-standard .mls-hero-title{
  max-width:390px;margin:22px 0 10px;color:#f2d39a;
  font:750 clamp(21px,2.1vw,30px)/1.14 Georgia,serif;
  text-shadow:0 2px 8px #0005;
}
body.mls-standard .mls-hero-title em{font-weight:400;font-style:italic;color:#ffd89d;}
body.mls-standard .mls-hero-description{
  max-width:390px;margin:0;color:#bbccd4;font:11px/1.65 system-ui;
}
body.mls-standard .mls-hero-actions{
  display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:20px;
}
body.mls-standard .mls-hero-create{
  min-height:40px;border:1px solid #ffdfa1;border-radius:6px;
  padding:8px 16px;background:linear-gradient(#f5d490,#c08a3c);
  color:#152637;font:850 12px system-ui;cursor:pointer;
  box-shadow:0 5px 15px #0006,inset 0 1px 0 #ffffffa8;
  transition:filter .15s,transform .15s;
}
body.mls-standard .mls-hero-create:hover{filter:brightness(1.09);transform:translateY(-1px);}
body.mls-standard .mls-hero-create:focus-visible{outline:2px solid #ffdfa1;outline-offset:3px;}
body.mls-standard .mls-hero-browse{
  color:#d0e0e7;text-decoration:underline;text-underline-offset:4px;font:11px system-ui;
}
body.mls-standard .mls-hero-foot{
  margin:auto 0 0;padding-top:15px;
  color:#9caebc;font:10px/1.45 system-ui;
}
body.mls-standard .mls-mine-stage>[class*="mytable"],
body.mls-standard .mls-mine-stage>.btl-my-table,
body.mls-standard .mls-mine-stage>.okl-my-table{
  box-sizing:border-box;height:100%;min-height:308px!important;
  border:1px solid #b18a4c;border-radius:10px;
  background:linear-gradient(150deg,#112c40,#0a2130);
  box-shadow:inset 0 1px 0 #ffffff14;
}
body.mls-standard .mls-ranking-placeholder{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
}
body.mls-standard .mls-rank-panel{
  box-sizing:border-box;display:flex;flex-direction:column;gap:7px;
  height:100%;min-height:308px;min-width:0;padding:11px;
  border:1px solid #bb9151;border-radius:10px;
  background:linear-gradient(145deg,#102e40,#081c2b);
  box-shadow:inset 0 1px 0 #ffffff14,0 9px 26px #0003;
}
body.mls-standard .mls-rank-panel-title{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding:1px 2px 8px;border-bottom:1px solid #bb915147;
}
body.mls-standard .mls-rank-panel-title h2{
  margin:0;color:#f0ca86;font:750 17px/1.25 Georgia,serif;
}
body.mls-standard .mls-rank-panel-title>span{font:10px system-ui;color:#bbccd4;}
body.mls-standard .mls-rank-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  flex:1;min-height:0;gap:8px;
}
body.mls-standard .mls-leader-card{
  display:flex;flex-direction:column;min-width:0;min-height:0;
  box-sizing:border-box;border:1px solid #395f70;border-radius:8px;
  background:linear-gradient(160deg,#123247,#0a2435);
  color:#dce7ea;overflow:visible;
}
body.mls-standard .mls-card-head,
body.mls-standard .mls-leader-card>header{
  display:flex;align-items:center;justify-content:space-between;gap:5px;
  box-sizing:border-box;min-height:42px;padding:8px;
  border-bottom:1px solid #3a5b6a;
}
body.mls-standard .mls-card-head h3,
body.mls-standard .mls-leader-card>header h3{
  min-width:0;margin:0;color:#f2d098;
  font:700 12px/1.18 Georgia,serif;
}
body.mls-standard .mls-leader-empty{
  display:grid;place-content:center;text-align:center;
  flex:1;white-space:pre-line;gap:10px;line-height:1.5;
  padding:12px;color:#adbfcc;font:11px/1.45 system-ui;
}
body.mls-standard .mls-title-actions{
  margin-left:auto;display:flex;align-items:center;gap:4px;
}
body.mls-standard .mls-tooltip{position:relative;display:inline-flex;flex:none;}
body.mls-standard .mls-info-trigger{
  width:23px;height:23px;display:grid;place-items:center;
  border:1px solid #b28c50;border-radius:50%;
  background:#203a4a;color:#eeca8e;font:800 11px system-ui;cursor:pointer;
}
body.mls-standard .mls-info-trigger:hover,
body.mls-standard .mls-info-trigger[aria-expanded="true"]{
  background:#705328;color:#fff1d6;
}
body.mls-standard .mls-tooltip-bubble{
  position:absolute;top:calc(100% + 7px);right:0;z-index:20;
  display:none;width:min(220px,65vw);box-sizing:border-box;
  border:1px solid #cfa15e;border-radius:8px;
  background:linear-gradient(145deg,#163648,#0b2131);
  padding:10px;color:#e5dfd4;white-space:normal;
  font:11px/1.5 system-ui;text-align:left;box-shadow:0 12px 30px #0009;
}
body.mls-standard .mls-tooltip:is(:hover,:focus-within,.is-open) .mls-tooltip-bubble{display:block;}
body.mls-standard .mls-all-btn{
  flex:none;padding:4px 8px!important;min-height:25px!important;
  border:1px solid #b08b51!important;border-radius:6px!important;
  background:#18384a!important;color:#f5d18d!important;
  font:750 10px system-ui!important;cursor:pointer;
}
body.mls-standard .mls-all-btn:hover{filter:brightness(1.15);}
body.mls-standard .mls-rank-panel :is(.btl-rank-card,.okl-rank-card,.v2-ranking){
  box-sizing:border-box;min-width:0;min-height:0;height:100%;
  margin:0;border:0;background:transparent;
}
body.mls-standard .mls-rank-panel .btl-rank-card>footer,
body.mls-standard .mls-rank-panel .btl-rank-status{display:none;}
body.mls-standard .mls-batak-leader>.btl-heading{
  flex:0 0 auto;display:flex;flex-direction:column;align-items:stretch;
  gap:5px;margin:0;padding:8px;border-bottom:1px solid #3d6376;
}
body.mls-standard .mls-batak-leader>.btl-heading .btl-kicker,
body.mls-standard .mls-batak-leader>.btl-heading h2{display:none;}
body.mls-standard .mls-batak-leader .btl-competitive-tools{
  display:flex;align-items:center;gap:3px;flex-wrap:wrap;width:100%;
}
body.mls-standard .mls-batak-leader .btl-competitive-tools label{font-size:10px;}
body.mls-standard .mls-batak-leader .btl-competitive-tools select{
  max-width:110px;min-width:0;height:29px;font-size:10px;flex:1;
}
body.mls-standard .mls-batak-leader #btl-rank-refresh{
  padding:4px 5px;min-height:27px;font-size:9px;
}
body.mls-standard .mls-batak-leader .btl-rank-card{
  display:flex;flex-direction:column;
}
body.mls-standard .mls-batak-leader .btl-rank-card>header{
  display:flex;align-items:center;justify-content:space-between;
  gap:4px;min-height:36px;padding:5px 7px;
}
body.mls-standard .mls-batak-leader .btl-rank-card>header h3{font-size:11px;}
body.mls-standard .mls-batak-leader .btl-rank-card>header .btl-pill{display:none;}
body.mls-standard .mls-batak-leader #btl-rank-status{
  display:block;min-height:18px;max-height:26px;overflow:hidden;
  margin:1px 5px;padding:0;color:#a6bdc9;font-size:9px;
}
body.mls-standard .mls-batak-leader #btl-rank-list{padding:5px;min-height:0;}
body.mls-standard .mls-batak-leader #btl-rank-list>.btl-live-row:nth-child(n+6){display:none!important;}
body.mls-standard .mls-batak-leader #btl-rank-list .btl-live-row{
  display:grid;grid-template-columns:16px minmax(0,1fr) auto;
  align-items:center;gap:4px;min-width:0;min-height:31px;
  padding:5px 4px;margin:3px 0;
}
body.mls-standard .mls-batak-leader #btl-rank-list .btl-live-meta{display:none;}
body.mls-standard .mls-batak-leader #btl-rank-list .btl-live-name{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:10px;
}
body.mls-standard .mls-batak-leader #btl-rank-list .btl-live-name:before{
  content:"♠";display:inline-grid;place-items:center;
  width:21px;height:21px;margin-right:4px;border:1px solid #a3834e;
  border-radius:50%;background:#234657;color:#e9c17f;
}
body.mls-standard .mls-batak-leader #btl-rank-list .btl-live-stat{
  font-size:9px;white-space:nowrap;color:#e7c285;
}
body.mls-standard .okl-rank-card .okl-pill{display:none;}
body.mls-standard .okl-rank-card>footer,
body.mls-standard .okl-rank-card>footer[hidden]{display:none!important;}
body.mls-standard .okl-rank-card .okl-rank-list{margin:0;padding:10px;}
body.mls-standard .okl-rank-card .mls-rank-empty{
  list-style:none;font:11px/1.6 system-ui;color:#9ab2c0;text-align:center;
  padding:18px 3px;
}
body.mls-standard .v2-ranking .v2-panel-head{
  min-height:42px;padding:8px;
}
body.mls-standard .v2-ranking .v2-panel-head h2{
  margin:0;color:#f1ce98;font:700 12px Georgia,serif;
}
body.mls-standard .v2-ranking .v2-panel-head p,
body.mls-standard .v2-ranking .v2-panel-head .v2-label{display:none;}
body.mls-standard .v2-ranking .v5-empty{flex:1;padding:14px;}
body.mls-standard .v2-ranking .v5-empty strong{font-size:11px;}
body.mls-standard .v2-ranking .v5-empty p{font-size:10px;}
body.mls-standard .okl-rank-card>header .mls-tooltip{margin-left:auto;}
body.mls-standard .mls-create-dialog{
  box-sizing:border-box;position:fixed;inset:0;margin:auto;
  width:min(670px,calc(100vw - 24px));max-width:calc(100vw - 24px);
  max-height:88vh;overflow:auto;padding:0 0 13px;
  border:1px solid #cda15a;border-radius:15px;
  background:linear-gradient(140deg,#123448,#081c2b);color:#eef0f1;
  box-shadow:0 28px 90px #000b;
}
body.mls-standard .mls-create-dialog::backdrop{
  background:#05111dcc;backdrop-filter:blur(5px);
}
body.mls-standard .mls-modal-head,
body.mls-standard .mls-full-head{
  display:flex;align-items:center;justify-content:space-between;gap:9px;
  padding:14px 16px;border-bottom:1px solid #ba925959;
}
body.mls-standard .mls-modal-label{display:flex;flex-direction:column;gap:4px;}
body.mls-standard .mls-modal-label small{
  color:#b9c9d0;font:700 9px system-ui;letter-spacing:1px;
}
body.mls-standard .mls-modal-label strong{
  color:#f1d398;font:700 20px Georgia,serif;
}
body.mls-standard .mls-modal-close{
  width:31px;height:31px;display:grid;place-items:center;
  border:1px solid #94794e;border-radius:7px;
  background:#15364a;color:#efd7a8;font-size:21px;cursor:pointer;
}
body.mls-standard .mls-create-dialog>.btl-form-card,
body.mls-standard .mls-create-dialog>.okl-form-card,
body.mls-standard .mls-create-dialog>.v2-create{
  box-sizing:border-box;width:auto;min-height:0!important;
  margin:0 11px;border:0!important;box-shadow:none!important;
  background:transparent!important;padding:14px 6px!important;
}
body.mls-standard .mls-create-dialog #btl-create-pending[hidden],
body.mls-standard .mls-create-dialog #btl-invite-box[hidden]{display:none!important;}
body.mls-standard .mls-full-dialog{
  width:min(580px,calc(100vw - 26px));max-width:calc(100vw - 26px);
  max-height:84vh;overflow:auto;margin:auto;padding:0;
  border:1px solid #b9955b;border-radius:13px;
  background:#0d2738;color:#dbe5eb;box-shadow:0 20px 70px #000a;
}
body.mls-standard .mls-full-dialog::backdrop{background:#041320d9;}
body.mls-standard .mls-full-inner{padding:0 13px 17px;}
body.mls-standard .mls-full-head{margin:0 -13px;}
body.mls-standard .mls-full-head h2{color:#ebce99;font:700 19px Georgia,serif;}
body.mls-standard .mls-full-caption{color:#adc1c9;font-size:11px;}
body.mls-standard .mls-full-results .btl-live-row{
  display:grid;grid-template-columns:25px minmax(0,1fr) auto;
  padding:9px 4px;border-bottom:1px solid #ffffff13;gap:9px;
}
body.mls-standard .mls-full-results .btl-live-meta{
  grid-column:2/-1;color:#9fb9c7;font-size:10px;
}
body.mls-standard .mls-full-results .btl-live-stat{color:#e6c287;font-size:12px;}
body.mls-standard [hidden].mls-hero,
body.mls-standard [hidden].mls-mine-stage{display:none!important;}
@media(max-width:1120px){
  body.mls-standard .mls-first-row{grid-template-columns:1fr!important;}
  body.mls-standard .mls-rank-panel{min-height:230px;}
  body.mls-standard .mls-hero,
  body.mls-standard .mls-hero-content,
  body.mls-standard .mls-mine-stage,
  body.mls-standard .mls-mine-stage>section{min-height:245px!important;}
}
@media(max-width:520px){
  body.mls-standard .mls-rank-grid{grid-template-columns:minmax(0,1fr);}
  body.mls-standard .mls-leader-card{min-height:180px;}
  body.mls-standard .mls-hero-content{padding:20px 16px;}
  body.mls-standard .mls-rank-panel{padding:9px;}
  body.mls-standard .mls-create-dialog{max-height:90vh;}
}
@media(prefers-reduced-motion:reduce){
  body.mls-standard .mls-hero-create{transition:none;transform:none;}
}
