/* Only the mobile table shell changes; the desktop room keeps its own layout. */
body.mobile-room { height:100dvh; overflow:hidden; overscroll-behavior:none; }
.mobile-room .app-shell { height:100dvh; min-height:0; }
.mobile-room .sidebar, .mobile-room .mobile-nav { display:none!important; }
.mobile-room .workspace { width:100%; margin:0; min-height:0; display:flex; flex-direction:column; }
.mobile-room .mobile-header { display:flex; position:relative; flex:none; height:calc(56px + env(safe-area-inset-top)); padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left)); align-items:center; gap:10px; background:#151a13; border-bottom:1px solid #2f3927; }
.mobile-room .mobile-brand { display:flex; align-items:center; gap:7px; font:700 16px Outfit,system-ui,sans-serif; letter-spacing:-.6px; }
.mobile-room .mobile-brand img { width:32px; height:32px; }
.mobile-room .mobile-brand b { color:var(--gold); }
.mobile-room .mobile-wallet { display:flex; align-items:center; gap:5px; margin-left:auto; max-width:112px; min-height:38px; padding:5px 8px; border:1px solid #404b30; border-radius:6px; background:#2a3021; color:#e4cc94; }
.mobile-room .mobile-wallet-copy strong { max-width:75px; font-size:10px; overflow:hidden; text-overflow:ellipsis; }
.mobile-room .mobile-profile { display:grid; place-items:center; width:38px; height:38px; padding:8px; border:1px solid #525c3c; border-radius:6px; background:#333b29; color:#c3d0a9; }
.mobile-room main.in-table { flex:1; width:100%; max-width:none; min-height:0; margin:0; padding:8px max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); overflow:auto; }
.mobile-room main.in-table>footer { display:none; }
.mobile-room .mobile-table-layout, .mobile-room .mobile-game { height:100%; min-height:0; }
.mobile-room .mobile-table-layout { display:block; }
.mobile-room .mobile-game { display:grid; grid-template-rows:minmax(0,1fr) auto 38px; gap:7px; }
.mobile-room .game-board { min-height:0; display:flex; flex-direction:column; }
.mobile-room .table-topline { flex:none; min-height:43px; padding:5px 8px; gap:5px; }
.mobile-room .table-topline>div:first-child { min-width:0; display:flex; flex-wrap:wrap; gap:4px 6px; }
.mobile-room .table-topline .game-type { max-width:105px; font-size:9px; }
.mobile-room .live-badge { font-size:6px; padding:5px; }
.mobile-room #table-blinds { font-size:8px; }
.mobile-room .topline-divider { display:none; }
.mobile-room .table-utilities { gap:0; flex-shrink:0; }
.mobile-room .table-utilities .icon-button { width:30px; height:34px; padding:7px; }
.mobile-room .table-utilities svg { width:16px; height:16px; }

/* Positions follow the available stage, including when browser chrome changes. */
.mobile-room .poker-stage { flex:1; height:auto; min-height:0; container-type:size; --room-card-width:clamp(36px,min(14cqw,12cqh),54px); --room-card-height:clamp(49px,min(17cqh,calc(24.5cqh - 33px)),78px); }
.mobile-room .poker-table { top:20%; bottom:12%; height:auto; left:5%; right:5%; border-width:9px; border-radius:48% / 43%; }
.mobile-room .felt-line { inset:10px; border-radius:48% / 43%; }
.mobile-room .table-shadow { top:24%; height:64%; }
.mobile-room .felt-brand { top:9%; font-size:13px; letter-spacing:2px; }
.mobile-room .felt-brand img { width:20px; height:20px; }
.mobile-room .felt-caption { bottom:7%; font-size:5px; letter-spacing:2px; }
.mobile-room .seat { width:84px; max-width:25%; line-height:1; }
.mobile-room .seat-top { top:1%; left:50%; }
.mobile-room .seat-left-top { top:23%; left:14%; }
.mobile-room .seat-right-top { top:23%; left:86%; }
.mobile-room .seat-left-bottom { top:67%; left:14%; }
.mobile-room .seat-right-bottom { top:67%; left:86%; }
.mobile-room .avatar { width:clamp(28px,9cqh,44px); height:clamp(28px,9cqh,44px); border-width:2px; margin-bottom:-4px; }
.mobile-room .avatar>span:not(.avatar-crown) { font-size:clamp(20px,6cqh,31px); }
.mobile-room .seat-info { padding:6px 3px 4px; }
.mobile-room .seat-info>strong { font-size:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mobile-room .seat-info>span { font-size:9px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.mobile-room .player-status { display:block; font-size:6px; letter-spacing:.6px; margin-top:4px; line-height:1.2; }
.mobile-room .seat .bot-label { font-size:5px; padding:0 2px; }
.mobile-room .seat-hero { top:auto; bottom:5%; left:50%; width:126px; max-width:40%; }
.mobile-room .seat-hero .avatar { width:38px; height:38px; top:0; left:-3px; }
.mobile-room .seat-hero .seat-info { padding:5px 4px 5px 34px; }
.mobile-room .seat-hero .seat-info strong { font-size:9px; }
.mobile-room .seat-hero .seat-info>span { font-size:10px; }
.mobile-room .empty-seat { padding-top:0; }
.mobile-room .empty-seat-circle { width:clamp(28px,9cqh,38px); height:clamp(28px,9cqh,38px); font-size:24px; margin-bottom:4px; }
.mobile-room .empty-seat>span:last-child { font-size:7px; }
.mobile-room .pot { top:33%; line-height:1; }
.mobile-room .pot>span { display:block; font-size:6px; letter-spacing:1.4px; }
.mobile-room .pot strong { font-size:clamp(19px,6cqh,28px); margin-top:5px; line-height:1.1; }
.mobile-room .pot-coin { font-size:19px; }
.mobile-room .community-cards { top:46%; gap:5px; }
.mobile-room .card { width:var(--room-card-width); height:var(--room-card-height); border-radius:4px; }
.mobile-room .card-corner { font-size:clamp(20px,5cqh,25px); left:4px; top:3px; }
.mobile-room .card-corner small { font-size:clamp(11px,2.4cqh,13px); margin-top:1px; }
.mobile-room .card-corner.bottom { left:auto; top:auto; right:4px; bottom:3px; font-size:clamp(14px,3.5cqh,18px); }
.mobile-room .card-corner small { display:none; }
.mobile-room .card-suit { font-size:clamp(28px,7cqh,36px); }
.mobile-room .card-back>span { font-size:28px; width:31px; height:31px; }
.mobile-room .hand-status { top:calc(46% + var(--room-card-height) + 12px); font-size:6px; letter-spacing:.9px; }
.mobile-room .hero-cards { top:auto; bottom:calc(5% + 38px); gap:2px; }
.mobile-room .hero-cards .card { width:var(--room-card-width); height:var(--room-card-height); }
.mobile-room .hero-cards .card-corner { font-size:clamp(20px,5cqh,25px); }
.mobile-room .hero-cards .card-corner.bottom { font-size:clamp(14px,3.5cqh,18px); }
.mobile-room .hero-cards .card-suit { font-size:clamp(28px,7cqh,36px); left:55%; top:52%; }
.mobile-room .seat .revealed-hole { top:-16px; left:0; z-index:4; }
.mobile-room .seat-top .revealed-hole { top:0; left:calc(50% - 78px); }
.mobile-room .revealed-hole .card { width:28px; height:35px; }
.mobile-room .revealed-hole .card-corner { font-size:16px; left:2px; top:2px; }
.mobile-room .revealed-hole .card-corner small { font-size:10px; }
.mobile-room .revealed-hole .card-suit { font-size:18px; }
.mobile-room .table-corner-label { bottom:7px; left:10px; font-size:7px; }
.mobile-room .new-hand-button { bottom:0; right:6px; min-height:30px; font-size:8px; padding:4px; }

/* Fixed-height controls never shrink along with the felt. */
.mobile-room .mobile-actions { margin:0; padding:9px 10px; border:1px solid #414c32; border-radius:8px; background:#252e20; }
.mobile-room .action-top { min-height:20px; margin-bottom:7px; gap:4px; }
.mobile-room .turn-copy { min-width:0; flex-wrap:wrap; gap:4px; font-size:10px; }
.mobile-room .call-copy { font-size:9px; margin-left:4px; }
.mobile-room .turn-clock { font-size:12px; min-width:25px; justify-content:flex-end; }
.mobile-room .bet-controls { display:flex; flex-direction:column; gap:8px; }
.mobile-room .raise-controls { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; width:100%; min-width:0; }
.mobile-room .raise-input { grid-column:1; grid-row:1; font-size:9px; }
.mobile-room .raise-input strong { font-size:11px; }
.mobile-room .raise-controls input[type=range] { grid-column:1; grid-row:2; height:24px; margin:1px 0 0; background:transparent; }
.mobile-room input[type=range]::-webkit-slider-runnable-track { height:4px; background:#454b37; border-radius:4px; }
.mobile-room input[type=range]::-webkit-slider-thumb { margin-top:-5px; }
.mobile-room input[type=range]::-moz-range-track { height:4px; background:#454b37; border-radius:4px; }
.mobile-room .bet-presets { grid-column:2; grid-row:1 / 3; align-self:stretch; display:grid; grid-template-columns:repeat(4,1fr); gap:3px; }
.mobile-room .bet-presets button { min-width:0; min-height:36px; padding:5px 0; font-size:8px; }
.mobile-room .action-buttons { display:flex; gap:6px; }
.mobile-room .action-buttons>button { min-height:49px; padding:7px 4px; font-size:16px; }
.mobile-room .action-buttons>button>span { margin-top:3px; font-size:8px; }
.mobile-room .join-strip { align-items:center; gap:9px; }
.mobile-room .join-strip p { margin:0; font-size:9px; line-height:1.5; }
.mobile-room .join-strip .primary-button { flex-shrink:0; min-height:42px; margin:0; padding:9px 12px; font-size:11px; }
.mobile-room .mobile-room-tools { display:flex; gap:6px; }
.mobile-room-tools>button { flex:1; min-width:0; border:1px solid #35402b; border-radius:6px; background:#1c2319; color:#b2bea1; font-size:10px; }
.mobile-room-tools>button:hover { color:var(--gold); background:#2a3021; }

/* Native dialogs keep keyboard focus inside the active panel. */
.mobile-table-sheet { width:100%; max-width:700px; max-height:calc(86dvh - env(safe-area-inset-top)); margin:auto auto 0; padding:14px max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); border:1px solid #414c32; border-radius:16px 16px 0 0; background:#191f16; color:var(--cream); overflow:auto; overscroll-behavior:contain; }
.mobile-table-sheet::backdrop { background:#080c09b8; }
.mobile-sheet-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.mobile-sheet-heading h2 { font:500 21px Outfit,system-ui,sans-serif; margin:0; }
.mobile-sheet-heading .icon-button { width:40px; height:40px; font-size:19px; }
.mobile-room .mobile-table-social .social-column { margin:0; display:block; }
.mobile-room .mobile-table-social .chat-messages { height:min(29dvh,220px); min-height:90px; }
.mobile-room .mobile-table-social .chat-form { padding:12px; }
.mobile-room .mobile-table-social .chat-form input { font-size:16px; min-width:0; }
.mobile-room .mobile-table-social .session-card { margin-top:12px; padding:15px; }
.mobile-room .mobile-table-social .session-stats { margin:16px 0; }
.mobile-room .mobile-table-social #history-panel { max-height:36dvh; min-height:120px; overflow:auto; }
.mobile-room .mobile-table-options .table-fairness { margin:8px 0 18px; padding-bottom:15px; border-bottom:1px solid #35402b; align-items:center; gap:12px; font-size:10px; }
.mobile-room .mobile-table-options .table-fairness .text-button { font-size:12px; min-height:40px; }
.mobile-room .mobile-table-options .table-bottom { flex-wrap:wrap; margin:0 0 18px; gap:12px; font-size:11px; }
.mobile-room .mobile-table-options .table-bottom .text-button, .mobile-room .mobile-table-options .sit-out { min-height:40px; display:flex; align-items:center; font-size:11px; }
.mobile-room .mobile-table-options .sit-out input { width:17px; height:17px; margin-right:7px; }
.mobile-room .mobile-table-options>.secondary-button { position:static; top:auto; right:auto; width:100%; min-height:42px; padding:11px 13px; gap:8px; font-size:11px; background:#20281c; border:1px solid #435035; }
.mobile-room .connection-banner { left:50%; bottom:calc(46px + env(safe-area-inset-bottom)); width:calc(100% - 24px); max-width:480px; font-size:10px; }
.mobile-room #app-dialog { max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.mobile-room .workspace:fullscreen { height:100dvh; background:var(--bg); }

@media(max-width:360px) {
  .mobile-room .mobile-header { gap:7px; }
  .mobile-room .mobile-brand { font-size:14px; gap:5px; }
  .mobile-room .mobile-brand img { width:28px; height:28px; }
  .mobile-room .table-topline .game-type { max-width:84px; font-size:8px; }
  .mobile-room .table-utilities .icon-button { width:27px; }
  .mobile-room .seat { width:76px; }
  .mobile-room .seat-hero { width:126px; }
  .mobile-room .seat-info>span { font-size:8px; }
}
@container (max-height:420px) {
  .mobile-room .community-cards .card-corner.bottom, .mobile-room .hero-cards .card-corner.bottom { display:none; }
  .mobile-room .community-cards .card-suit, .mobile-room .hero-cards .card-suit { left:65%; top:68%; font-size:28px; }
}
@container (max-height:340px) {
  .mobile-room .seat-info { padding-top:5px; padding-bottom:3px; }
  .mobile-room .felt-brand { top:6%; font-size:10px; }
  .mobile-room .felt-brand img { width:15px; height:15px; }
  .mobile-room .pot { top:31%; }
  .mobile-room .community-cards { top:44%; }
  .mobile-room .hand-status { top:calc(44% + var(--room-card-height) + 7px); }
  .mobile-room .community-cards .card-corner.bottom, .mobile-room .hero-cards .card-corner.bottom { display:none; }
  .mobile-room .community-cards .card-suit, .mobile-room .hero-cards .card-suit { left:65%; top:70%; font-size:26px; }
  .mobile-room .hero-cards { bottom:calc(3% + 32px); }
  .mobile-room .seat-hero { bottom:3%; }
  .mobile-room .seat-hero .avatar { width:32px; height:32px; }
  .mobile-room .seat-hero .seat-info { padding-top:3px; padding-bottom:3px; }
  .mobile-room .table-corner-label { font-size:6px; }
}
@media(max-height:700px) and (orientation:portrait) {
  .mobile-room .mobile-header { height:calc(48px + env(safe-area-inset-top)); }
  .mobile-room .mobile-game { gap:5px; grid-template-rows:minmax(0,1fr) auto 34px; }
  .mobile-room .mobile-actions { padding:7px 8px; }
  .mobile-room .felt-brand { font-size:11px; }
}
@media(orientation:landscape) {
  .mobile-room .mobile-header { height:calc(44px + env(safe-area-inset-top)); }
  .mobile-room .mobile-game { grid-template-columns:minmax(0,1fr) minmax(200px,30%); grid-template-rows:minmax(0,1fr) 36px; }
  .mobile-room .game-board { grid-column:1; grid-row:1 / -1; }
  .mobile-room .mobile-actions { grid-column:2; grid-row:1; align-self:end; }
  .mobile-room .mobile-room-tools { grid-column:2; grid-row:2; gap:3px; }
  .mobile-room-tools>button { font-size:9px; }
  .mobile-room .raise-controls { grid-template-columns:1fr; gap:4px; }
  .mobile-room .raise-input { grid-column:1; grid-row:1; }
  .mobile-room .raise-controls input[type=range] { grid-column:1; grid-row:2; }
  .mobile-room .bet-presets { grid-column:1; grid-row:3; }
  .mobile-room .action-buttons>button { font-size:14px; }
  .mobile-room .join-strip { flex-direction:column; align-items:stretch; }
  .mobile-room .join-strip .primary-button { justify-content:center; }
  .mobile-room .poker-table { top:16%; bottom:12%; left:8%; right:8%; }
  .mobile-room .seat-left-top,.mobile-room .seat-right-top { top:21%; }
  .mobile-room .seat-left-bottom,.mobile-room .seat-right-bottom { top:62%; }
  .mobile-room .felt-brand { top:7%; font-size:11px; }
  .mobile-room .pot { top:30%; }
  .mobile-room .community-cards { top:45%; }
  .mobile-room .hand-status { top:calc(45% + var(--room-card-height) + 8px); }
}
@container (max-height:240px) {
  .mobile-room .seat { width:70px; }
  .mobile-room .avatar { width:24px; height:24px; }
  .mobile-room .avatar>span:not(.avatar-crown) { font-size:18px; }
  .mobile-room .seat-info { padding:4px 2px 3px; }
  .mobile-room .seat-left-top,.mobile-room .seat-right-top { top:18%; }
  .mobile-room .seat-hero { width:116px; bottom:2%; }
  .mobile-room .seat-hero .avatar { width:30px; height:30px; }
  .mobile-room .pot { top:30%; }
  .mobile-room .pot strong { font-size:18px; margin-top:3px; }
  .mobile-room .community-cards { top:45%; gap:4px; }
  .mobile-room .card { width:32px; height:40px; }
  .mobile-room .card-corner { font-size:17px; left:3px; top:2px; }
  .mobile-room .card-corner small { font-size:10px; }
  .mobile-room .card-suit { font-size:24px; }
  .mobile-room .community-cards .card-suit, .mobile-room .hero-cards .card-suit { font-size:22px; top:68%; }
  .mobile-room .card-back>span { width:21px; height:21px; font-size:18px; }
  .mobile-room .hero-cards { bottom:calc(2% + 29px); }
  .mobile-room .hero-cards .card { width:33px; height:42px; }
  .mobile-room .hero-cards .card-corner { font-size:17px; }
  .mobile-room .hand-status { top:2px; bottom:auto; left:6px; right:auto; max-width:90px; text-align:left; font-size:5px; }
}
