/* v42 — Control-grid room: dense, practical and mobile-first. */
body.texas-room-active{
  --room-bg:#08090b;
  --room-surface:#121419;
  --room-surface-2:#191b21;
  --room-line:#2b2e35;
  --room-muted:#989da7;
  --room-red:#a51d2d;
  --room-red-soft:#2a1117;
  --room-amber:#efb949;
  overflow:hidden;
  background:radial-gradient(circle at 50% 17%,rgba(133,20,38,.24),transparent 34%),#08090b!important;
}
body.texas-room-active .app{
  width:min(100%,760px);
  height:100dvh;
  padding:7px 11px 0;
  display:grid;
  grid-template-rows:51px minmax(0,1fr);
  overflow:hidden;
}
body.texas-room-active .topbar{
  height:51px;
  padding:0 0 7px;
  border-bottom:2px solid var(--room-red);
  position:relative;
}
body.texas-room-active .brand small{color:#d48691;font-size:10px;letter-spacing:1.7px}
body.texas-room-active .brand small::before{content:"LIVE · ";color:#ff5a6e}
body.texas-room-active .brand h1{
  margin-top:2px;
  font-size:18px;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.texas-room-active .top-icon{width:39px;min-height:38px;border-radius:11px}
body.texas-room-active #room{
  min-height:0;
  height:100%;
  padding-bottom:calc(var(--dock-height,104px) + env(safe-area-inset-bottom));
  display:grid;
  grid-template-rows:39px 34px 91px 18px minmax(0,1fr);
  gap:6px;
  position:relative;
  overflow:hidden;
}
body.texas-room-active #notice:not([hidden]){
  position:fixed;
  z-index:60;
  top:56px;
  right:11px;
  left:11px;
  width:min(calc(100% - 22px),738px);
  margin:auto;
  box-shadow:0 12px 30px rgba(0,0,0,.55);
}
body.texas-room-active #practiceBanner{position:absolute;z-index:25;top:3px;right:0;left:0;margin:0}
body.texas-room-active #nextUp{
  position:absolute;
  z-index:24;
  top:42px;
  right:50%;
  transform:translateX(50%);
  width:max-content;
  max-width:calc(100% - 18px);
  margin:0;
  padding:6px 11px;
  border-radius:999px;
  font-size:12px;
  box-shadow:0 8px 22px rgba(0,0,0,.45);
}

/* Header telemetry */
.broadcast-meta{
  min-height:39px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:4px 0;
  border-bottom:1px solid var(--room-line);
}
.broadcast-meta #share{
  min-height:31px;
  padding:3px 9px;
  border:1px solid #353942;
  border-radius:10px;
  background:var(--room-surface-2);
  display:flex;
  align-items:center;
  gap:6px;
}
.broadcast-meta #share small{font-size:11px;color:var(--room-muted)}
.broadcast-meta #share b{font:800 18px/1 Arial;letter-spacing:2px}
.broadcast-hand{
  min-width:0;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:7px;
  color:var(--room-muted);
  white-space:nowrap;
}
.broadcast-hand strong{font-size:14px;color:var(--text)}
.broadcast-hand span{font-size:11px;overflow:hidden;text-overflow:ellipsis}
.broadcast-meta .connection{font-size:11px;color:var(--green);white-space:nowrap}
.broadcast-meta .connection::before{
  content:"";
  display:inline-block;
  width:7px;
  height:7px;
  margin-left:5px;
  border-radius:50%;
  background:currentColor;
  box-shadow:0 0 0 4px color-mix(in srgb,currentColor 16%,transparent);
}

/* All five streets remain visible at all times. */
body.texas-room-active .streets{
  direction:ltr;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:4px;
  margin:0;
  align-items:stretch;
}
body.texas-room-active .streets span{
  min-width:0;
  display:grid;
  place-items:center;
  padding:3px 1px;
  border:1px solid transparent;
  border-radius:8px;
  background:#15171c;
  color:#6f747e;
  font:800 10px/1 Arial,sans-serif;
  white-space:nowrap;
}
body.texas-room-active .streets .done{color:#bbbfc7;border-color:#343740}
body.texas-room-active .streets .current{
  color:#fff;
  border-color:var(--room-red);
  background:var(--room-red);
  box-shadow:0 6px 17px rgba(165,29,45,.35);
}

/* Stage / pot / required action */
.broadcast-score{
  min-height:0;
  position:relative;
  display:grid;
  grid-template-columns:1fr .9fr .72fr;
  border:1px solid #57242d;
  border-radius:17px;
  overflow:hidden;
  background:linear-gradient(115deg,#201116,var(--room-surface));
  box-shadow:0 12px 28px rgba(0,0,0,.24);
}
.stage-live,.call-live,.broadcast-score .pot-zone{
  min-width:0;
  margin:0;
  padding:8px 9px;
  border:0;
  border-radius:0;
  background:none;
  box-shadow:none;
  outline:0;
}
.stage-live{display:grid;align-content:center;text-align:right;border-left:1px solid #3d2228}
.stage-live>small,.call-live>small,.broadcast-score .pot-zone>small{
  color:#bb8d95;
  font-size:10px;
  font-weight:800;
  letter-spacing:0;
}
.stage-live>strong{margin-top:3px;color:var(--text);font-size:13px;line-height:1.35}
.stage-live>p{
  margin:2px 0 0;
  color:var(--room-muted);
  font-size:9px;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.broadcast-score .pot-zone{
  position:relative;
  display:grid;
  place-content:center;
  justify-items:center;
  border-left:1px solid #3d2228;
  text-align:center;
}
.broadcast-score .pot-zone>strong{
  display:block;
  margin-top:2px;
  color:#fff;
  font:900 36px/.95 Arial,sans-serif;
  letter-spacing:-1.5px;
}
.broadcast-score .pot-chips{
  position:absolute;
  right:3px;
  bottom:3px;
  left:3px;
  display:flex;
  justify-content:center;
  gap:2px;
  margin:0;
  overflow:hidden;
}
.broadcast-score .pot-chips span{
  flex:0 1 auto;
  min-width:0;
  padding:1px 4px;
  border:0;
  background:#ffffff0b;
  font-size:8px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.call-live{display:grid;align-content:center;text-align:left}
.call-live>strong{margin-top:3px;color:#fff;font:900 22px/1 Arial,sans-serif}
.call-live>span{margin-top:4px;color:var(--room-muted);font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.broadcast-score #tableAlert{
  position:absolute;
  inset:0;
  z-index:10;
  margin:0;
  padding:8px 12px;
  border:0;
  border-radius:0;
  background:rgba(15,13,15,.97);
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto auto;
  place-content:center;
  text-align:right;
  gap:0 10px;
  backdrop-filter:blur(8px);
}
.broadcast-score #tableAlert[hidden]{display:none}
.broadcast-score #tableAlert .reveal-symbol{grid-row:1/4;font-size:27px;align-self:center}
.broadcast-score #tableAlert h2{font-size:15px;line-height:1.35;margin:0}
.broadcast-score #tableAlert p{font-size:11px;line-height:1.45;margin:2px 0}
.broadcast-score #tableAlert small{font-size:9px;color:var(--room-muted)}

body.texas-room-active #lastResult{position:absolute;z-index:20;right:0;left:0;top:132px;pointer-events:none}
body.texas-room-active #lastResult .summary{margin:0;padding:7px 9px;box-shadow:0 10px 26px rgba(0,0,0,.5);font-size:11px}
body.texas-room-active #lastResult .deltas{margin:2px 0 0;padding:0}
body.texas-room-active #room>.section-label{min-height:18px;margin:0}
body.texas-room-active #room>.section-label h2{font-size:12px;margin:0}
body.texas-room-active #room>.section-label span{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Compact two-column player grid, scaling from 2 to 8 seats. */
body.texas-room-active .seats{
  min-height:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(var(--seat-rows,2),minmax(0,1fr));
  gap:5px;
  overflow:hidden;
}
body.texas-room-active .seat{
  min-width:0;
  min-height:0;
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:1px 6px;
  align-items:center;
  padding:7px 8px;
  border:1px solid var(--room-line);
  border-radius:13px;
  background:var(--room-surface);
  box-shadow:none;
  overflow:hidden;
}
body.texas-room-active .seat.my-turn{
  padding:6px 7px;
  border:2px solid var(--room-amber);
  background:linear-gradient(135deg,#2a2113,var(--room-surface));
  box-shadow:inset 0 0 0 1px rgba(239,185,73,.08);
}
body.texas-room-active .seat.folded{opacity:.42;filter:saturate(.35)}
body.texas-room-active .seat-head{
  grid-column:1;
  grid-row:1;
  min-width:0;
  align-self:end;
  display:flex;
  justify-content:flex-start;
  gap:5px;
}
body.texas-room-active .seat-head h3{
  min-width:0;
  margin:0;
  font-size:14px;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.texas-room-active .seat-head em{font-size:9px;color:#e7b7be;white-space:nowrap}
body.texas-room-active .balance-wrap{
  grid-column:2;
  grid-row:1/3;
  align-self:center;
  display:flex;
  justify-content:flex-end;
}
body.texas-room-active .seat .balance{margin:0;color:#fff;font:900 21px/1 Arial,sans-serif;text-align:left}
body.texas-room-active .chip-stack{display:none}
body.texas-room-active .seat-tags{
  grid-column:1;
  grid-row:2;
  min-width:0;
  min-height:0;
  align-self:start;
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:3px;
  overflow:hidden;
  color:#aeb2ba;
  font-size:9px;
  white-space:nowrap;
}
body.texas-room-active .seat-tags b{
  flex:0 0 auto;
  padding:2px 4px;
  border:1px solid #3a3e47;
  border-radius:5px;
  background:#202329;
  color:#e6e8ec;
  font-size:8px;
  white-space:nowrap;
}
body.texas-room-active .seat-tags span{min-width:0;overflow:hidden;text-overflow:ellipsis}
body.texas-room-active .turn-label{color:#ffd26d;font-size:9px}
body.texas-room-active .bet-row{margin:0;color:#8f949d;font-size:9px;line-height:1.2}
body.texas-room-active .bet-row:nth-of-type(4){grid-column:1;grid-row:3;display:flex;justify-content:flex-start;gap:7px;white-space:nowrap}
body.texas-room-active .bet-row:nth-of-type(4) span{display:inline-flex;gap:2px}
body.texas-room-active .bet-row:nth-of-type(4) strong{color:#eceef2;font-size:10px}
body.texas-room-active .bet-row:nth-of-type(5){grid-column:2;grid-row:3;display:flex;justify-content:flex-end;gap:3px;white-space:nowrap}
body.texas-room-active .bet-row:nth-of-type(5)>span:first-child{display:none}
body.texas-room-active .bet-row:nth-of-type(5)>span:last-child{font-size:10px;font-weight:900}

/* Name selection gets its own column and can never cover the player line. */
body.texas-room-active .seat.claimable{grid-template-columns:minmax(0,1fr) 86px;grid-template-rows:auto auto}
body.texas-room-active .seat.claimable .seat-head{grid-column:1;grid-row:1}
body.texas-room-active .seat.claimable .balance-wrap{grid-column:1;grid-row:2;justify-content:flex-start;align-self:start}
body.texas-room-active .seat.claimable .balance{font-size:17px}
body.texas-room-active .seat.claimable .seat-tags,
body.texas-room-active .seat.claimable .bet-row{display:none}
body.texas-room-active .seat>button[data-claim]{
  position:static;
  grid-column:2;
  grid-row:1/3;
  width:100%;
  min-height:38px;
  margin:0;
  padding:5px 7px;
  border-color:var(--room-red);
  border-radius:10px;
  background:var(--room-red);
  color:#fff;
  font-size:12px;
  line-height:1.3;
  align-self:center;
}

body.texas-room-active #final{
  position:absolute;
  z-index:22;
  inset:131px 0 0;
  margin:0;
  padding:12px;
  border-radius:15px;
  background:#0c0d10;
  overflow:auto;
}
body.texas-room-active .dock{
  padding:8px 11px calc(9px + env(safe-area-inset-bottom));
  border-top:2px solid var(--room-red);
  background:#0b0c0f;
  box-shadow:0 -12px 30px rgba(0,0,0,.6);
}
body.texas-room-active .dock-top{margin-bottom:6px}
body.texas-room-active .dock-top b{font-size:13px}
body.texas-room-active .dock-top span{font-size:11px}
body.texas-room-active .dock-actions{gap:6px}
body.texas-room-active .dock-actions button{min-height:46px;border-radius:12px;font-size:13px}
body.texas-room-active .floating-ranks{bottom:calc(var(--dock-height,104px) + 7px);min-height:34px;padding:5px 9px;font-size:11px}

@media(max-width:355px){
  body.texas-room-active .app{padding-inline:7px}
  .broadcast-meta{gap:5px}.broadcast-meta #share{padding-inline:6px}.broadcast-meta #share small{display:none}
  .broadcast-hand span{font-size:9px}.broadcast-meta .connection{font-size:9px}
  .broadcast-score{grid-template-columns:1fr .78fr .65fr}
  .stage-live,.call-live,.broadcast-score .pot-zone{padding-inline:5px}
  .stage-live>strong{font-size:11px}.broadcast-score .pot-zone>strong{font-size:31px}.call-live>strong{font-size:19px}
  body.texas-room-active .seat{padding-inline:6px}.seat .balance{font-size:18px!important}
  body.texas-room-active .seat.claimable{grid-template-columns:minmax(0,1fr) 76px}
  body.texas-room-active .seat>button[data-claim]{font-size:11px;padding-inline:4px}
}
@media(max-height:700px){
  body.texas-room-active .app{padding:4px 8px 0;grid-template-rows:42px minmax(0,1fr)}
  body.texas-room-active .topbar{height:42px;padding-bottom:3px}
  body.texas-room-active .brand h1{font-size:15px}.top-icon{min-height:34px!important;height:34px}
  body.texas-room-active #room{padding-bottom:calc(var(--dock-height,89px) + env(safe-area-inset-bottom));grid-template-rows:31px 27px 68px 15px minmax(0,1fr);gap:3px}
  .broadcast-meta{min-height:31px}.broadcast-meta #share{min-height:27px}.broadcast-meta #share small{display:none}.broadcast-meta #share b{font-size:16px}
  .broadcast-hand strong{font-size:12px}.broadcast-hand span{font-size:9px}.broadcast-meta .connection{font-size:9px}
  body.texas-room-active .streets span{font-size:8px;border-radius:6px}
  .stage-live,.call-live,.broadcast-score .pot-zone{padding-block:4px}.stage-live>strong{font-size:11px}.stage-live>p,.call-live>span{display:none}.broadcast-score .pot-zone>strong{font-size:29px}.call-live>strong{font-size:18px}
  body.texas-room-active #room>.section-label{min-height:15px}.section-label h2{font-size:10px!important}.section-label span{font-size:8px!important}
  body.texas-room-active .seats{gap:3px}.seat{padding:4px 6px!important;border-radius:10px!important}.seat-head h3{font-size:11px!important}.seat-head em,.seat-tags{font-size:7px!important}.seat-tags b{font-size:7px!important;padding:1px 3px!important}.seat .balance{font-size:17px!important}.bet-row{font-size:7px!important}.bet-row strong{font-size:8px!important}
  body.texas-room-active .seat>button[data-claim]{min-height:32px;font-size:10px}
  body.texas-room-active .dock{padding-top:5px}.dock-top{margin-bottom:3px!important}.dock-actions button{min-height:40px!important}
}
@media(min-width:650px){body.texas-room-active .seats{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Day mode keeps the same hierarchy with high contrast. */
:root[data-theme=light] body.texas-room-active{
  --room-bg:#eee8dc;
  --room-surface:#fbf8f0;
  --room-surface-2:#f2eadb;
  --room-line:#cbbda6;
  --room-muted:#6e6b64;
  --room-red:#9b3342;
  --room-red-soft:#f2dfe1;
  --room-amber:#9d7130;
  background:radial-gradient(circle at 50% 13%,rgba(255,255,255,.9),transparent 36%),#eee8dc!important;
}
:root[data-theme=light] body.texas-room-active .brand small{color:#884251}
:root[data-theme=light] body.texas-room-active .streets span{background:#e3ded3;color:#7c776d}
:root[data-theme=light] body.texas-room-active .streets .done{border-color:#bdb4a5;color:#5f5c55}
:root[data-theme=light] body.texas-room-active .streets .current{background:#9b3342;border-color:#9b3342;color:#fff}
:root[data-theme=light] .broadcast-meta #share{background:#fbf8f0;border-color:#cbbda6;color:#292925}
:root[data-theme=light] .broadcast-score{background:linear-gradient(115deg,#f1dfe1,#fbf8f0);border-color:#c89199}
:root[data-theme=light] .stage-live,:root[data-theme=light] .broadcast-score .pot-zone{border-left-color:#d7bfc2}
:root[data-theme=light] .stage-live>small,:root[data-theme=light] .call-live>small,:root[data-theme=light] .broadcast-score .pot-zone>small{color:#805c62}
:root[data-theme=light] .stage-live>strong,:root[data-theme=light] .broadcast-score .pot-zone>strong,:root[data-theme=light] .call-live>strong{color:#292925}
:root[data-theme=light] .broadcast-score #tableAlert{background:rgba(251,248,240,.98)}
:root[data-theme=light] body.texas-room-active .seat{background:#fbf8f0;border-color:#cbbda6}
:root[data-theme=light] body.texas-room-active .seat.my-turn{background:linear-gradient(135deg,#f1e5cc,#fbf8f0);border-color:#a5762f}
:root[data-theme=light] body.texas-room-active .seat .balance{color:#292925}
:root[data-theme=light] body.texas-room-active .seat-tags{color:#65635e}
:root[data-theme=light] body.texas-room-active .seat-tags b{background:#e8e2d6;border-color:#c8bda9;color:#383732}
:root[data-theme=light] body.texas-room-active .bet-row{color:#77736c}
:root[data-theme=light] body.texas-room-active .bet-row:nth-of-type(4) strong{color:#33322e}
:root[data-theme=light] body.texas-room-active .dock{background:#f2ede3;border-top-color:#9b3342;box-shadow:0 -12px 28px rgba(75,56,48,.15)}
:root[data-theme=light] body.texas-room-active #final{background:#f2ede3}
