/* Review150: lobby typography follows two width modes, never window height.
   Keep the native row art, fonts, colours, content and game controllers. */
body[data-view=lobby][data-game] #lobby-view,
body[data-view=lobby][data-game] #lobby-view #marble-lobby{
 --lobby-u:.6363636364px;
}
body[data-view=lobby][data-game] #lobby-view{
 min-width:0;
 overflow-x:hidden;
}
body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes),
body[data-view=lobby][data-game] #lobby-view .tiers-panel{
 min-width:0;
 overflow-x:visible;
}
body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier-name{
 font-size:16px;
}
body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.tier-blind,.tier-buyin,.blind-number,.buyin-number){
 min-width:0;
 font-size:16px;
 line-height:1.25;
}
body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.blind-value,.buyin-value){
 min-width:0;
 max-width:100%;
 flex-wrap:wrap;
 white-space:normal;
}
body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.blind-number,.buyin-number){
 overflow-wrap:anywhere;
 white-space:normal;
}
body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.blind-unit,.buyin-unit,.tier-blind small,.tier-buyin small){
 font-size:13px;
 line-height:1.25;
}
body[data-view=lobby][data-game] #lobby-view #marble-stakes .buyin-boundary{font-size:12px}

/* Review153: retain the wide card's native bands and side-by-side fields.
   Complete label/value groups do not choose individual wrapping points. */
@media(max-width:1199px){
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) 10px;
  grid-template-rows:24px minmax(24px,auto) 20px;
  column-gap:10px;
  row-gap:4px;
  align-items:center;
  height:auto;
  min-height:96px;
  padding:10px 14px;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier::before{
  top:3px;
  right:0;
  bottom:3px;
  left:0;
  height:auto;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier-main{
  position:static;
  grid-column:1 / -1;
  grid-row:1;
  width:auto;
  height:auto;
  min-width:0;
  gap:6px;
  transform:none;
  translate:none;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier-name{
  font-size:14px;
  line-height:1.25;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .six{
  height:20px;
  min-width:0;
  padding:0 8px 1px;
  font-size:12px;
  line-height:1.25;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.tier-blind,.tier-buyin){
  position:static;
  grid-row:2;
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:baseline;
  gap:4px 6px;
  width:auto;
  height:auto;
  margin:0;
  transform:none;
  translate:none;
  white-space:nowrap;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier-blind{grid-column:1}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier-buyin{
  grid-column:2;
  justify-content:flex-end;
  text-align:right;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier-buyin .buyin-value{justify-content:flex-end}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.blind-value,.buyin-value){flex-shrink:0;flex-wrap:nowrap;white-space:nowrap}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.tier-blind small,.tier-buyin small){display:block;flex-shrink:0;white-space:nowrap}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.blind-number,.buyin-number){white-space:nowrap;overflow-wrap:normal}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .mobile-stats{
  position:static;
  grid-column:1 / 3;
  grid-row:3;
  display:flex;
  align-items:center;
  gap:8px;
  width:auto;
  height:18px;
  font-size:13px;
  line-height:1.25;
  transform:none;
  translate:none;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .mobile-stats .players{font-size:13px}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .mobile-stats .count{height:18px;line-height:18px}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier-arrow{
  position:static;
  grid-column:3;
  grid-row:2;
  justify-self:end;
  align-self:center;
  width:9px;
  height:14px;
  transform:none;
  translate:none;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.tier-count,.tier-players){display:none}
 body[data-view=lobby][data-game] #lobby-view .lobby-bottom-nav button{font-size:12px;line-height:1.25}
 body[data-view=lobby][data-game] #lobby-view .game-tab>button{font-size:18px;min-height:44px}
}

/* All tiers switch together at440px, including fractional widths. Loaded
   source fonts need180.48px for the widest group:2*180.48+58=418.96px.
   The common cutoff leaves about10.5px of extra room per wide amount column. */
@media(max-width:440px){
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier{
  grid-template-rows:24px 20px 20px 18px;
  row-gap:3px;
  min-height:112px;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.tier-blind,.tier-buyin){
  grid-column:1 / 3;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:baseline;
  justify-content:space-between;
  gap:6px;
  white-space:nowrap;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier-blind{grid-row:2}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier-buyin{grid-row:3}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.tier-blind small,.tier-buyin small,.blind-value,.buyin-value){
  flex-shrink:0;
  flex-wrap:nowrap;
  white-space:nowrap;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.blind-number,.buyin-number){
  white-space:nowrap;
  overflow-wrap:normal;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .mobile-stats{grid-row:4}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier-arrow{grid-row:2 / 4}
}

/* A single outer scroll area works for short windows too. The height720
   fallback and the Marble flex shell must not select a different row scale. */
@media(max-width:1199px){
 body[data-view=lobby][data-game] #lobby-view,
 body[data-view=lobby][data-game=marble] #lobby-view:has(#marble-lobby[data-room-view=list]){
  display:block;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
 }
 body[data-view=lobby][data-game] #lobby-view>.lobby-columns,
 body[data-view=lobby][data-game=marble] #lobby-view #marble-lobby[data-room-view=list] .marble-lobby-columns{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:none;
  align-items:start;
  flex:none;
  width:100%;
  min-width:0;
  min-height:0;
  overflow:visible;
 }
 body[data-view=lobby][data-game=marble] #lobby-view #marble-lobby[data-room-view=list]{
  display:block;
  flex:none;
  min-height:0;
  overflow:visible;
 }
 body[data-view=lobby][data-game] #lobby-view .rooms-panel.public-room-panel{
  flex:none;
  height:auto;
  min-width:0;
  min-height:0;
  align-self:start;
 }
 body[data-view=lobby][data-game] #lobby-view .public-room-panel>.rooms{
  flex:none;
  max-height:none;
  overflow-y:visible;
 }
}

/* One column keeps the approved card layout all the way to the PC switch.
   A shared maximum width prevents the banner and cards stretching through
   the former900..1199 intermediate mode. */
@media(max-width:1199px){
 body[data-view=lobby][data-game] #lobby-view{--lobby-one-column-max:780px}
 body[data-view=lobby][data-game] #lobby-view>.game-tab,
 body[data-view=lobby][data-game] #lobby-view>.lobby-heading{
  box-sizing:border-box;
  width:100%;
  max-width:var(--lobby-one-column-max);
  margin-left:auto;
  margin-right:auto;
 }
 body[data-view=lobby][data-game] #lobby-view>.lobby-columns,
 body[data-view=lobby][data-game=marble] #lobby-view #marble-lobby[data-room-view=list] .marble-lobby-columns{
  gap:16px;
  width:100%;
  max-width:var(--lobby-one-column-max);
  margin-left:auto;
  margin-right:auto;
  padding:0 0 16px;
 }
 body[data-view=lobby][data-game] #lobby-view .rooms-panel.public-room-panel{
  width:calc(100% - 28px);
  margin:14px 14px 0;
 }
 body[data-view=lobby][data-game] #lobby-view>#review-open,
 body[data-view=lobby][data-game=marble] #lobby-view #marble-lobby[data-room-view=list]>#marble-review-open{
  width:calc(100% - 32px);
  max-width:calc(var(--lobby-one-column-max) - 32px);
  margin-left:auto;
  margin-right:auto;
 }
}

@media(min-width:1200px){
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier,
 body[data-view=lobby][data-game] #lobby-view .list-head{
  grid-template-columns:minmax(180px,1fr) minmax(100px,.7fr) minmax(160px,1fr) 70px 80px;
  gap:0;
  padding-left:18px;
  padding-right:18px;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) .tier{
  height:auto;
  min-height:39px;
  padding-top:5px;
  padding-bottom:5px;
 }
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.tier-blind,.tier-buyin){white-space:normal}
 body[data-view=lobby][data-game] #lobby-view :is(#lobby-stakes,#marble-stakes) :is(.tier-count,.tier-players){font-size:13px}
}

/* At1200 the two columns fit without reducing the original PC row's type. */
@media(min-width:1200px){
 body[data-view=lobby][data-game] #lobby-view{--public-room-panel-width:430px}
 body[data-view=lobby][data-game] #lobby-view>.lobby-columns,
 body[data-view=lobby][data-game=marble] #lobby-view #marble-lobby[data-room-view=list] .marble-lobby-columns{
  grid-template-columns:minmax(626px,1fr) 430px;
  gap:18px;
  padding-left:28px;
  padding-right:28px;
 }
}

/* Short wide windows retain both columns. Let the outer lobby own scrolling
   instead of trapping the room actions below a height-clamped Marble grid. */
@media(min-width:1200px) and (max-height:600px){
 body[data-view=lobby][data-game] #lobby-view,
 body[data-view=lobby][data-game=marble] #lobby-view:has(#marble-lobby[data-room-view=list]){
  display:block;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  padding-bottom:16px;
 }
 body[data-view=lobby][data-game=marble] #lobby-view #marble-lobby[data-room-view=list]{
  display:block;
  flex:none;
  height:auto;
  max-height:none;
  overflow:visible;
 }
 body[data-view=lobby][data-game] #lobby-view>.lobby-columns,
 body[data-view=lobby][data-game=marble] #lobby-view #marble-lobby[data-room-view=list] .marble-lobby-columns{
  height:auto;
  max-height:none;
  min-height:0;
  flex:none;
  grid-template-rows:auto;
  align-items:start;
  overflow:visible;
 }
 body[data-view=lobby][data-game] #lobby-view .tiers-panel,
 body[data-view=lobby][data-game=marble] #lobby-view #marble-lobby[data-room-view=list] .tiers-panel,
 body[data-view=lobby][data-game] #lobby-view .rooms-panel.public-room-panel{
  height:auto;
  max-height:none;
  min-height:0;
  flex:none;
  align-self:start;
  overflow:visible;
 }
 body[data-view=lobby][data-game] #lobby-view .public-room-panel>.rooms{
  flex:none;
  max-height:none;
  overflow-y:visible;
 }
}

/* One column has one visible selection stage. The existing Back action owns
   the stage; joined Marble waiting rooms deliberately stay outside this rule. */
@media(max-width:1199px){
 body[data-view=lobby][data-game=holdem]:not([data-lobby-stage=rooms]) #lobby-view>.lobby-columns>.tiers-panel,
 body[data-view=lobby][data-game=marble]:not([data-lobby-stage=rooms]) #lobby-view #marble-lobby[data-room-view=list] .marble-lobby-columns>.tiers-panel{display:block}
 body[data-view=lobby][data-game=holdem]:not([data-lobby-stage=rooms]) #lobby-view>.lobby-columns>.public-room-panel,
 body[data-view=lobby][data-game=marble]:not([data-lobby-stage=rooms]) #lobby-view #marble-lobby[data-room-view=list] .marble-lobby-columns>.public-room-panel{display:none}
 body[data-view=lobby][data-game=holdem][data-lobby-stage=rooms] #lobby-view>.lobby-columns>.tiers-panel,
 body[data-view=lobby][data-game=marble][data-lobby-stage=rooms] #lobby-view #marble-lobby[data-room-view=list] .marble-lobby-columns>.tiers-panel{display:none}
 body[data-view=lobby][data-game=holdem][data-lobby-stage=rooms] #lobby-view>.lobby-columns>.public-room-panel,
 body[data-view=lobby][data-game=marble][data-lobby-stage=rooms] #lobby-view #marble-lobby[data-room-view=list] .marble-lobby-columns>.public-room-panel{display:flex}
 /* Retain the existing solo Holdem start actions before a tier is selected. */
 body[data-view=lobby][data-game=holdem][data-review=true]:not([data-lobby-stage=rooms]) #lobby-view>.lobby-columns>.public-room-panel{display:contents}
 body[data-view=lobby][data-game=holdem][data-review=true]:not([data-lobby-stage=rooms]) #lobby-view>.lobby-columns>.public-room-panel>:not(#lobby-actions){display:none!important}
}

/* Shared room lists use the same readable text roles as the utility panels.
   Keep game-specific colour, emphasis, native icons and financial values. */
body[data-view=lobby][data-game]>.app-header .lobby-header-balance .currency{font-size:12px}
body[data-view=lobby][data-game] #lobby-view .public-room-panel :is(.public-room-count,.public-room-label,.room-colhead,.room-code,.room-entry,.room-terms,.room-terms summary,.room-terms p){
 font-size:13px;
 line-height:1.4;
}
body[data-view=lobby][data-game] #lobby-view #marble-lobby .public-room-panel :is(.marble-room-card-status,.marble-room-card-format,.marble-room-card-link,.marble-room-card-seat strong,.marble-room-card-seat small){
 font-size:13px;
 line-height:1.4;
}
body[data-view=lobby][data-game] #lobby-view .public-room-panel :is(.room-name,.room-occupancy,#empty-rooms,#lobby-filter-empty,.public-room-empty){
 font-size:15px;
 line-height:1.5;
}
body[data-view=lobby][data-game] #lobby-view #marble-lobby .public-room-panel .marble-room-card-title{
 font-size:15px;
 line-height:1.5;
}
body[data-view=lobby][data-game] #lobby-view .public-room-panel .room-occupancy small{font-size:13px}
body[data-view=lobby][data-game] #lobby-view .public-room-panel .public-room-meta strong,
body[data-view=lobby][data-game] #lobby-view .public-room-panel .public-room-meta :is(#lobby-room-blinds,#lobby-room-buyin,#marble-list-minimum,#marble-list-maximum),
body[data-view=lobby][data-game] #lobby-view #marble-lobby .public-room-panel .marble-room-card-entry{
 font-size:16px;
 line-height:1.4;
}
body[data-view=lobby][data-game] #lobby-view .public-room-panel>.room-colhead{
 height:auto;
 min-height:32px;
}
body[data-view=lobby][data-game] #lobby-view .public-room-panel .room{
 height:auto;
}
body[data-view=lobby][data-game] #lobby-view .public-room-panel>.public-room-actions>button,
body[data-view=lobby][data-game] #lobby-view #marble-lobby .public-room-panel .marble-create-config button{
 min-height:46px;
 height:auto;
 font-size:16px;
 line-height:1.4;
}
body[data-view=lobby][data-game] #lobby-view #marble-lobby .public-room-panel .marble-create-config label{
 font-size:13px;
 line-height:1.4;
}
body[data-view=lobby][data-game] #lobby-view #marble-lobby .public-room-panel .marble-create-config :is(input,select){
 min-height:44px;
 height:auto;
 font-size:16px;
 line-height:1.4;
}
