/* Original first-person scene. Only the room image is static; every stone,
   opponent count, wallet, timer and action comes from the current room state. */
body.in-game{background:#e7ddce;overflow:hidden}
body.in-game #app{padding:0;max-width:none;min-height:0}
.game-shell.premium-table{position:relative;isolation:isolate;width:100%;max-width:480px;height:var(--game-height,100svh);min-height:0;display:block;margin:0 auto;padding:0;overflow:hidden;color:#f6e7c5;background:#24180f;container-type:size;container-name:table}
.premium-table .table-scene{position:absolute;inset:0;width:100%;height:100%;min-height:0;flex:none;border:0;border-radius:0;margin:0;overflow:hidden;background:linear-gradient(#0009,#0002,#0009),url('/table-wood-v1.jpg') center/cover}
.premium-table .table-scene::before{display:none}
.table-room-fill,.table-room-art{position:absolute;inset:0;pointer-events:none;background:url('/walnut-room-v3.jpg') center/cover no-repeat}
.table-room-fill{display:none}
.premium-table.rio-negro .table-scene{background:linear-gradient(#0003,#0002,#0005),url('/rio-negro.jpg') center/cover no-repeat}
.premium-table.rio-negro .table-room-art,.premium-table.rio-negro .table-room-fill{display:none}
.premium-table.manaus-sunset .table-scene{background:linear-gradient(180deg,#3e214a99 0%,#d0783230 48%,#4a241999 100%),url('/table-wood-v1.jpg') center/cover no-repeat}
.premium-table.manaus-sunset .table-room-art{filter:sepia(.3) saturate(1.35) hue-rotate(-12deg)}
.sunset-preview{height:160px;background:linear-gradient(180deg,#3e214a99,#d0783230 48%,#4a241999),url('/table-wood-v1.jpg') center/cover no-repeat;border-radius:14px}
@container table (max-aspect-ratio:9/16){
 .table-room-fill{display:block;background-position:center top;background-size:100% auto;mask-image:linear-gradient(#000 0 3%,transparent 9%)}
 .table-room-art{inset:auto 0;top:50%;height:auto;aspect-ratio:9/16;transform:translateY(-50%);background-size:contain;mask-image:linear-gradient(transparent,#000 6% 94%,transparent)}
}
.premium-table .game-toolbar{position:absolute;top:calc(12px + env(safe-area-inset-top));left:14px;right:14px;z-index:12;height:44px;min-height:0;display:flex;align-items:center;justify-content:space-between;background:none;border:0;border-radius:0;padding:0;margin:0;color:#f4e7cd}
.premium-table .queue-badge{position:absolute;left:58px;top:0;min-height:44px;padding:0 12px;border:1px solid #dcaf3280;border-radius:22px;background:#21170dd9;color:#f4e7cd;font-size:12px;white-space:nowrap}.premium-table .queue-badge strong{color:#f5c968}
.premium-table .hud-icon{width:44px;height:44px;min-height:44px;display:grid;place-items:center;padding:0;border:.7px solid #dcaf3240;border-radius:50%;background:#21170d9c;box-shadow:none;color:#f4e7cd;font-size:24px}
.premium-table .hud-icon svg{width:23px;height:23px}
.premium-table .hand-objective{position:absolute;right:56px;top:0;display:flex;flex-direction:column;justify-content:center;gap:3px;width:58px;height:44px;min-height:44px;padding:4px;border:.7px solid #dcaf3280;border-radius:13px;color:#f4e7cd;background:linear-gradient(#20170fd9,#120e0bd9);box-shadow:none}
.hand-objective>small{font-size:7px;letter-spacing:1px}.hand-objective>strong{font-size:18px;font-weight:500;font-variant-numeric:tabular-nums}
.premium-table #connection{position:absolute;top:52px;left:0;color:#f4e7cd;font-size:10px;background:#20150fba;border-radius:12px;padding:3px 7px}.premium-table #connection:empty{display:none}

.premium-table .seat{position:absolute;z-index:5;width:78px;display:flex;flex-direction:column;align-items:center;gap:5px;color:#f4e7cd;transform:none}
.premium-table .seat1{left:12px;right:auto;top:calc(132px + env(safe-area-inset-top));bottom:auto}.premium-table .seat3{right:12px;left:auto;top:calc(132px + env(safe-area-inset-top));bottom:auto}
.premium-table .seat2{left:42%;right:auto;top:calc(16px + env(safe-area-inset-top));bottom:auto;width:128px;transform:translateX(-50%);flex-direction:row;gap:6px}
.premium-table .seat0{left:50%;right:auto;top:auto;bottom:calc(90px + env(safe-area-inset-bottom));transform:translateX(-50%)}
.premium-table .seat .avatar-wrap{position:relative;padding:0;box-shadow:none;flex:none;width:44px;height:44px;border:0;border-radius:50%;background:none}
.premium-table .avatar{--avatar:44px;width:44px;height:44px;min-width:0;border:1.2px solid #ddca9c;box-shadow:0 3px 8px #0006;background:linear-gradient(145deg,#886341,#352315);background-color:#493321;font-size:15px;color:#f4e7cd}
.premium-table .avatar-wrap::before{content:"";position:absolute;inset:-3px;border-radius:50%;padding:2px;background:conic-gradient(#dcaf32 var(--progress,0deg),#ddca9c38 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;pointer-events:none}
.premium-table .seat.active .avatar{box-shadow:0 0 10px #b1dc9166,0 3px 8px #0006}
.premium-table .seat-timer{position:absolute;z-index:2;bottom:-4px;left:50%;right:auto;top:auto;transform:translateX(-50%);min-width:24px;font-size:9px;font-weight:650;line-height:12px;text-align:center;padding:1px 4px;border-radius:10px;background:#21180eef;border:.7px solid #b1dc91;color:#ddf0d1;box-shadow:0 2px 4px #0005}.premium-table .seat-timer:empty{display:none}.premium-table .seat-timer.extra{color:#ffe0a0;border-color:#dcaf32}
.premium-table .crown{position:absolute;right:-4px;top:-5px;left:auto;bottom:auto;background:#322414e8;border:.6px solid #dcaf32;border-radius:50%;width:16px;height:16px;display:grid;place-items:center;font-size:11px;color:#e8c773}
.premium-table .seat-plate{display:flex;flex-direction:column;align-items:center;gap:3px;width:84px;min-height:42px;padding:5px 6px;background:linear-gradient(145deg,#261a10e6,#120f0ce8);border:.7px solid #dcaf329c;border-radius:13px;box-shadow:0 2px 5px #0004}
.premium-table .seat2 .seat-plate{width:80px;text-align:left;align-items:flex-start;padding-left:8px}
.premium-table .seat-name{display:block;width:100%;max-width:100%;padding:0;background:none;border:0;border-radius:0;box-shadow:none;text-shadow:none;margin-top:0;color:#f4e7cd;font-size:12px;font-weight:500;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.premium-table .wallet{display:flex;align-items:center;justify-content:center;gap:4px;color:#e9d7b5;font-size:13px;font-weight:500;line-height:17px;font-variant-numeric:tabular-nums;max-width:100%;background:none;padding:0;border:0;box-shadow:none}
.premium-table .chip-stack{width:14px;height:11px;flex:none;margin-right:0}.premium-table .chip-stack i{width:10px;height:4px;border-color:#e2c581}
.premium-table .chip-stack i:nth-child(2){left:1px;bottom:4px}.premium-table .chip-stack i:nth-child(3){left:2px;bottom:7px}.premium-table.is-waiting .table-action{visibility:hidden}
.premium-table .reserved-seat,.premium-table .leaving{font-size:8px;line-height:10px;padding:2px 5px;background:#21180edb;border-radius:8px;color:#e9d7b5}
.premium-table .backs{position:absolute;top:96px;left:-14px;right:auto;bottom:auto;display:flex;flex-direction:column;gap:3px;width:17px;height:auto;padding:3px;background:#593719;border:1px solid #be8d4e;border-radius:6px;box-shadow:0 3px 5px #0005;transform:none;overflow:visible}
.premium-table .seat3 .backs{left:auto;right:-14px}.premium-table .backs i{display:block;flex:none;width:12px;height:22px;border:1px solid #ccbca6;border-radius:3px;background:linear-gradient(100deg,#bdb2a3,#fff5df 22%,#ddd3bf 82%,#9d8a6e);box-shadow:1px 2px 2px #0006;transform:skewY(-8deg)}
.premium-table .backs small{position:absolute;top:calc(100% + 3px);left:50%;transform:translateX(-50%);font-size:8px;line-height:12px;min-width:17px;text-align:center;background:#1f160fea;border-radius:6px;color:#f4e7cd;padding:0 3px}
.premium-table .seat2 .backs{left:50%;right:auto;top:54px;width:auto;flex-direction:row;gap:3px;transform:translateX(-50%);padding:4px 6px;background:#442c16}.premium-table .seat2 .backs i{width:18px;height:30px;transform:perspective(150px) rotateX(-12deg);border-radius:4px}.premium-table .seat2 .backs small{left:auto;right:-16px;top:10px;transform:none}
.premium-table .seat0:not(.local-seat) .backs{left:50%;top:96px;width:auto;flex-direction:row;transform:translateX(-50%)}
.premium-table .sit{width:44px;height:44px;min-height:44px;border:1px dashed #ddcba7;border-radius:50%;color:#f4e7cd;background:#21150d88;box-shadow:none;font-size:26px;line-height:1;padding:0}.premium-table .sit:disabled{opacity:.38}.premium-table .seat:has(.sit) .seat-name{text-align:center;font-size:9px;opacity:.7}
.premium-table .seat.paid .seat-plate{border-color:#fff0bb;box-shadow:0 0 9px #e4bc6b55}

.premium-table #board-viewport{position:absolute;z-index:2;top:calc(225px + env(safe-area-inset-top));left:32px;right:32px;bottom:calc(270px + env(safe-area-inset-bottom));overflow:hidden;perspective:1200px;touch-action:none;outline:0;border:0}
.premium-table #board-camera{position:absolute;top:50%;left:0;right:0;height:1000px;transform-origin:50% 50%;transform:translateY(calc(-50% + var(--camera-offset,0px))) rotateX(35deg);transform-style:preserve-3d;pointer-events:none}
.premium-table #board{position:absolute;inset:0;width:100%;height:1000px;display:block;margin:0;padding:0;transform:none;pointer-events:none}
.premium-table .table-stone{position:absolute;display:flex;flex-direction:row;gap:0;align-items:center;justify-content:center;min-width:0;min-height:0;padding:2px;border:.8px solid #c1b49c;border-radius:4px;background:linear-gradient(120deg,#fff9ea,#eee4cd 65%,#ddd0b4);box-shadow:inset 0 1px 0 #fff,0 1.5px 0 #b6a48a,0 3px 3px #20140f66;transition:none;animation:none;overflow:hidden}
.premium-table .table-stone.opening{border:1.2px solid #dcaf32;box-shadow:inset 0 1px 0 #fff,0 1.5px 0 #b6a48a,0 0 0 1px #dcaf3290,0 3px 3px #20140f66}
.premium-table .table-stone .face{display:grid;place-items:center;flex:1;width:50%;height:100%;padding:0}.premium-table .table-stone .face svg{width:95%;height:95%;transform:rotate(var(--pip-rotation,0deg));fill:#161310;filter:drop-shadow(0 .4px .1px #fff7)}
.premium-table .table-stone .divider{width:1px;height:78%;flex:none;border:0;background:#54442fbd;box-shadow:1px 0 0 #fff7}.premium-table .table-stone.compact .face{width:100%}.premium-table .table-stone .equal{position:absolute;right:1px;bottom:0;font-size:7px;line-height:8px;color:#705433;transform:rotate(var(--pip-rotation,0deg))}
.premium-table .board-controls{position:absolute;z-index:7;right:0;top:calc(225px + env(safe-area-inset-top) + (100% - 495px - env(safe-area-inset-top) - env(safe-area-inset-bottom))/2);transform:translateY(-50%);display:flex;flex-direction:column;gap:0;width:38px}.board-controls .camera-button{width:38px;min-height:44px;padding:0;border:0;border-radius:20px;background:#21150d9c;color:#ddcba7;font-size:22px;box-shadow:none}.board-controls[hidden],.board-controls .camera-button[hidden]{display:none!important}
.premium-table #table-center{position:absolute;z-index:3;top:42%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);width:240px;max-width:calc(100% - 88px);height:auto;padding:10px 0;margin:0;text-align:center;background:none;border:0;border-radius:0;color:#f4e7cd}
.premium-table #table-center h2{font-size:19px;font-weight:500;line-height:1.2;margin:8px 0}.premium-table #table-center p{font-size:11px;line-height:1.5;color:#e9d7b5;margin:8px 0}.premium-table #table-center small{display:block;font-size:9px;line-height:1.5;color:#ddcba7;margin-top:10px}.premium-table #table-center .eyebrow{font-size:8px;letter-spacing:1px;color:#dcaf32}.premium-table #table-center .table-button{min-height:44px;margin-top:8px;border-radius:24px;padding:10px 17px;font-size:12px}.premium-table #table-center.round-result{background:#21150ddd;border:1px solid #dcaf3280;border-radius:18px;padding:16px}.premium-table #table-center.round-result strong{font-size:18px}.premium-table #table-center.round-result span:last-child{font-size:10px;line-height:1.5}.premium-table .result-crown{color:#dcaf32}

.premium-table #hand-area{position:absolute;z-index:6;left:0;right:0;bottom:calc(9px + env(safe-area-inset-bottom));height:255px;min-height:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none;color:#f4e7cd}
.premium-table .player-rack{position:absolute;left:14px;right:14px;top:0;height:134px;border:6px solid #694525;border-radius:28% 28% 16% 16% / 13% 13% 12% 12%;background:linear-gradient(160deg,#34281c,#18130e);box-shadow:0 0 0 1px #cba66a,inset 0 0 0 2px #a37b46,inset 0 8px 8px #0005,0 7px 0 #382512,0 12px 10px #0006;transform:none;overflow:visible}
.premium-table .hand{position:absolute;inset:3px 5px 6px;display:flex;flex-direction:row;align-items:flex-end;justify-content:flex-start;gap:5px;overflow-x:auto;overflow-y:hidden;height:auto;width:auto;min-height:0;padding:10px 7px 3px;margin:0;scrollbar-width:none;background:none}.premium-table .hand.fits{justify-content:center}.premium-table .hand::-webkit-scrollbar{display:none}
.premium-table .hand-stone{position:relative;display:flex;flex-direction:column;flex:0 0 50px;width:50px;height:104px;min-width:0;min-height:0;gap:0;padding:4px 3px;border:1px solid #c1b49c;border-radius:7px;background:linear-gradient(115deg,#fffaeb,#f2e8d1 72%,#cdbd9e);box-shadow:inset 0 2px 1px #fff,2px 3px 0 #ac9979,3px 5px 6px #0008;transform-origin:50% 100%;transform:perspective(400px) rotateX(-18deg) rotateZ(var(--rack-angle,0deg));transition:transform .15s ease-out,box-shadow .15s ease-out;overflow:hidden}
.premium-table .hand-stone:disabled{opacity:1;filter:none}.premium-table .hand-stone.selected{transform:translateY(-7px) perspective(400px) rotateX(-18deg) rotateZ(var(--rack-angle,0deg));box-shadow:0 0 0 2px #dcaf32,2px 3px 0 #ac9979,3px 5px 6px #0008}.premium-table .hand-stone:active{transform:translateY(-3px) perspective(400px) rotateX(-18deg) rotateZ(var(--rack-angle,0deg))}
.premium-table .hand-stone .face{display:grid;place-items:center;flex:1;width:100%;height:50%;padding:1px}.premium-table .hand-stone .face svg{width:100%;height:100%;fill:#161310;filter:drop-shadow(0 .6px .1px #fff9)}.premium-table .hand-stone .divider{width:86%;height:1px;border:0;background:#4a3926;box-shadow:0 1px 0 #fff8;flex:none;align-self:center}
.premium-table .rack-wait{display:block;margin:auto;font-size:11px;line-height:1.6;color:#e9d7b5b3;text-align:center;padding:8px}
.premium-table .player-controls{position:absolute;bottom:0;left:12px;right:12px;height:110px;display:flex;align-items:flex-end;justify-content:space-between;gap:6px}
.premium-table .player-controls>.local-seat{position:relative;inset:auto;width:98px;transform:none;gap:5px;align-self:center;flex:none}.premium-table .local-seat .avatar-wrap,.premium-table .local-seat .avatar{width:58px;height:58px}.premium-table .local-seat .seat-plate{width:96px;min-height:38px;padding:4px 7px}.premium-table .local-seat .wallet{font-size:16px}.premium-table .local-seat .seat-name{text-align:center;font-size:12px}
.premium-table .table-action{display:flex;flex-direction:column;justify-content:center;gap:3px;min-height:44px;width:92px;padding:8px 5px;margin-bottom:18px;border:1px solid #dcaf3280;border-radius:23px;background:linear-gradient(#624326db,#2c1c12e8);color:#f4e7cd;box-shadow:0 3px 5px #0004;font-size:13px;font-weight:500}.premium-table .table-action small{font-size:8px;opacity:.7;line-height:1.1}.premium-table .table-action:disabled{opacity:.42;filter:none}.premium-table .pass-action{background:linear-gradient(#8c6234ed,#3c2819ed);border-color:#e4c681a6}
.premium-table .hand-foot{position:absolute;right:18px;top:-17px;left:auto;bottom:auto;padding:2px 6px;border-radius:8px;background:#21150dcc;color:#ddcba7;font-size:8px;line-height:11px}
.premium-table .table-chat-dock{position:absolute;z-index:7;left:auto;right:12px;top:auto;bottom:calc(75px + env(safe-area-inset-bottom));width:38px;max-width:38px;min-height:44px;height:44px;padding:8px;border:1px solid #dcaf3260;border-radius:50%;background:#21150dbf;color:#e9d7b5;box-shadow:none}.premium-table .table-chat-dock svg{width:20px;height:20px}.premium-table .table-chat-dock.has-message{bottom:calc(280px + env(safe-area-inset-bottom));left:auto;right:6px;width:116px;max-width:116px;height:auto;min-height:0;padding:7px 9px;border-radius:12px;text-align:left;opacity:.9}.premium-table .chat-preview{font-size:9px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal}.premium-table .chat-preview strong{color:#dcaf32}
.premium-table .end-choice{position:absolute;left:0;right:0;top:-49px;display:flex;justify-content:center;gap:8px;z-index:8}.premium-table .end-choice:empty{display:none}.premium-table .end-choice button{min-height:44px;padding:8px 13px;border:1px solid #e4c681;border-radius:22px;background:linear-gradient(#73502c,#2c1c12);color:#f4e7cd;font-size:12px;box-shadow:0 3px 6px #0005}
.premium-table.is-observer #hand-area{height:64px}.premium-table.is-observer #board-viewport{bottom:calc(230px + env(safe-area-inset-bottom))}.premium-table .observing{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px;height:100%;padding:7px 15px;background:#21150dd9;border:0;border-top:.7px solid #dcaf3255;color:#e9d7b5;font-size:11px}.premium-table .observing .seat-reason{width:100%;text-align:center;font-size:9px;color:#ddcba7}.premium-table .observing .small-button{font-size:11px}
.premium-table #chip-layer{position:absolute;inset:0;z-index:10;pointer-events:none;overflow:visible}.premium-table .flying-chips{display:flex;align-items:center;gap:5px;padding:5px 8px;background:#21150dd9;border:.7px solid #dcaf32;border-radius:20px;color:#ffebba;font-size:11px;box-shadow:0 3px 6px #0006}

dialog.table-menu{position:fixed;left:12px;right:auto;top:calc(12px + env(safe-area-inset-top));bottom:calc(12px + env(safe-area-inset-bottom));margin:0;width:232px;max-width:calc(100% - 24px);max-height:none;height:auto;overflow-y:auto;border:.7px solid #dcaf329c;border-radius:16px;background:linear-gradient(120deg,#302217,#18120e);color:#f4e7cd;box-shadow:0 12px 36px #0008}
dialog.table-menu .modal-heading{padding-left:44px;background:#20160f;border-color:#dcaf3240}dialog.table-menu .modal-heading h2{font-size:15px}dialog.table-menu .modal-heading>button{border:0;border-radius:50%;min-height:44px;padding:0;color:#e9d7b5;flex:none}
dialog.table-menu .table-exit-actions{position:sticky;top:48px;background:#2b1e14;z-index:2;margin:0!important;padding:12px;border-bottom:1px solid #dcaf3240}
dialog.table-menu .table-exit-button{font-size:12px;min-height:56px;padding:8px 10px;gap:8px;margin-bottom:8px;border:.7px solid #dcaf3260;border-radius:9px;box-shadow:none;background:#46321f;color:#f4e7cd}
dialog.table-menu .table-exit-button.danger{background:#48281c;color:#f4c4aa}dialog.table-menu .table-exit-button strong{font-size:13px;font-weight:500}dialog.table-menu .table-exit-button small{font-size:9px;line-height:1.4;color:#ddcba7}dialog.table-menu .table-exit-actions p{font-size:10px;line-height:1.5;color:#ddcba7}
dialog.table-menu>button.wide{display:flex;justify-content:flex-start;width:calc(100% - 24px);margin:0 12px;min-height:44px;padding:10px 3px;font-size:12px;font-weight:400;border:0;border-bottom:.7px solid #dcaf3230;border-radius:0;background:none;box-shadow:none;color:#f4e7cd;white-space:normal;text-align:left}dialog.table-menu>button:hover:not(:disabled){background:#dcaf3212}
dialog.table-menu>p{font-size:10px;line-height:1.5;margin:12px;color:#ddcba7}
dialog.room-chat-drawer,dialog.room-history-drawer{position:fixed;right:12px;left:auto;top:calc(12px + env(safe-area-inset-top));bottom:calc(12px + env(safe-area-inset-bottom));margin:0;width:320px;max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);height:auto;overflow-y:auto}dialog.room-chat-drawer .chat-compose{display:flex;gap:7px}dialog.room-chat-drawer textarea{font-size:16px}dialog.room-chat-drawer .chat-compose button{font-size:12px;padding:8px 11px}dialog.room-history-drawer .move-row{font-size:12px}
@media(max-width:350px){.premium-table .hand-objective{width:48px;right:48px}.premium-table .seat2{left:42%;width:128px}.premium-table .seat2 .seat-plate{width:78px}.premium-table .seat2 .wallet{font-size:11px;gap:3px}.premium-table .seat1{left:8px}.premium-table .seat3{right:8px}.premium-table .seat-plate{width:77px}.premium-table .player-rack{left:8px;right:8px}.premium-table .hand{inset:3px 2px 6px;gap:3px;padding-left:3px;padding-right:3px}.premium-table .hand-stone{flex-basis:44px;width:44px}.premium-table .table-action{width:78px;font-size:12px}.premium-table .player-controls{left:8px;right:8px}.premium-table .board-controls{right:0}}
.premium-table.is-compact .seat1,.premium-table.is-compact .seat3{top:calc(95px + env(safe-area-inset-top))}.premium-table.is-compact #board-viewport{top:calc(194px + env(safe-area-inset-top));bottom:calc(230px + env(safe-area-inset-bottom))}.premium-table.is-compact #hand-area{height:215px}.premium-table.is-compact .player-rack{height:112px}.premium-table.is-compact .hand-stone{height:88px}.premium-table.is-compact .player-controls{height:93px}.premium-table.is-compact .local-seat .avatar,.premium-table.is-compact .local-seat .avatar-wrap{width:46px;height:46px}.premium-table.is-compact .local-seat .seat-plate{min-height:35px}.premium-table.is-compact .table-action{margin-bottom:9px}.premium-table.is-compact .board-controls{top:calc(194px + env(safe-area-inset-top) + (100% - 424px - env(safe-area-inset-top) - env(safe-area-inset-bottom))/2)}.premium-table.is-compact .table-chat-dock{bottom:calc(68px + env(safe-area-inset-bottom));right:8px}.premium-table.is-compact .table-chat-dock.has-message{bottom:234px}.premium-table.is-compact.is-observer #board-viewport{bottom:calc(220px + env(safe-area-inset-bottom))}
@media(prefers-reduced-motion:reduce){.premium-table .hand-stone{transition:none}.premium-table button:active{transform:none}.premium-table .seat.active .avatar{box-shadow:0 3px 8px #0006}}

.premium-table .hand-turn{position:absolute;left:0;right:auto;top:-32px;display:flex;align-items:center;gap:6px;padding:5px 10px;border:.7px solid #dcaf3270;border-radius:14px;background:#21150dd9;color:#e9d7b5;font-size:10px;line-height:14px}.premium-table .hand-turn i{width:6px;height:6px;border-radius:50%;background:#bead91}.premium-table .hand-turn.your-turn i{background:#afe39a;box-shadow:0 0 6px #afe39a66}

dialog.table-menu .modal-heading>button:focus-visible{outline:1.5px solid #dcaf32;outline-offset:-6px}

.premium-table .seat2:has(.sit){width:84px;flex-direction:column;gap:4px}

.premium-table.is-observer .seat0{bottom:calc(122px + env(safe-area-inset-bottom))}
.premium-table.is-compact.is-observer #hand-area{height:64px}

.premium-table .seat1 .backs small{left:8px;transform:none}.premium-table .seat3 .backs small{left:auto;right:8px;transform:none}
.premium-table .wallet.compact .balance-value{font-size:11px}.premium-table .wallet.dense .balance-value{font-size:9.5px}.premium-table .local-seat .wallet.compact .balance-value{font-size:14px}

/* Match native table chrome, with opaque surfaces behind small type. */
.premium-table #table-center,.premium-table #table-center.round-result{color:#f6e7c5;background:linear-gradient(145deg,#342c22f5,#151613f5);border:1px solid #d2bd91a6;border-radius:18px;padding:14px}
.premium-table #table-center:empty{display:none}
.premium-table #table-center p,.premium-table #table-center small{color:#cfbfa3}
.premium-table .seat:has(.sit) .seat-name{color:#f6e7c5;background:#21180eef;border-radius:8px;padding:3px 5px;font-size:10px}
.premium-table .sit{color:#f6e7c5;background:#342c22eb;border-color:#d2bd91a6}
.premium-table .seat-identity{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:44px;min-height:44px;padding:0;background:none;border:0;box-shadow:none;border-radius:15px;color:inherit;font:inherit}
.premium-table .seat2 .seat-identity{flex-direction:row;gap:6px}
.premium-table .seat-identity:hover{background:none}
.premium-table .seat-identity:focus-visible{outline:2px solid #ffe09a;outline-offset:4px}
.premium-table .seat-plate{background:linear-gradient(145deg,#342c22f5,#151613f5);border-color:#d2bd91a6;box-shadow:0 2px 4px #0004}
.premium-table .seat-plate .seat-name,.premium-table .seat-plate .wallet{color:#f6e7c5}
.premium-table .session-result{font-size:10px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;line-height:13px;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.premium-table .session-result.positive{color:#ffe09a}.premium-table .session-result.negative{color:#f1a38d}.premium-table .session-result.neutral{color:#cfbfa3}
.premium-table #hand-area{height:270px}.premium-table .player-controls{height:125px}
.premium-table #board-viewport{bottom:calc(285px + env(safe-area-inset-bottom))}
.premium-table .table-action{background:linear-gradient(#342c22f5,#151613f5);color:#f6e7c5;border-color:#d2bd91a6}
.premium-table .pass-action{background:linear-gradient(#73502ced,#302217f5)}
.premium-table .table-action:disabled{opacity:1;color:#b4a58d;background:#211b16ed;border-color:#89765280}
.premium-table .table-action small{opacity:1;font-size:9px}
.premium-table .table-chat-dock{width:44px;max-width:44px}
.premium-table.is-compact #hand-area{height:230px}.premium-table.is-compact .player-controls{height:108px}
.premium-table.is-compact #board-viewport{bottom:calc(245px + env(safe-area-inset-bottom))}
.premium-table.is-observer #hand-area{height:64px}.premium-table.is-observer #board-viewport{bottom:calc(230px + env(safe-area-inset-bottom))}
.premium-table.is-compact.is-observer #board-viewport{bottom:calc(220px + env(safe-area-inset-bottom))}
.premium-table .wallet>img{object-fit:contain;width:16px;height:16px;flex:none}
body.in-game dialog.results-drawer{inset:12px 12px 12px auto;margin:0;width:min(340px,calc(100vw - 24px));max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);border:.8px solid #c5ac7c;border-radius:18px;background:#f7f1e7;color:#302318;box-shadow:0 10px 30px #0005;padding:0;overflow-y:auto}
.results-drawer .modal-heading{position:sticky;top:0;z-index:2;padding:16px 14px;background:#eee4d4;border-bottom:1px solid #cdbfa8}
.results-drawer .modal-heading h2{font-size:18px}
#table-results-content{padding:0 14px 14px}.results-drawer .live-caption{font-size:10px;color:#65594b}
.results-drawer .results-player{margin:0;padding:14px 0;border:0;border-bottom:.7px solid #cdbfa8;border-radius:0;background:none;box-shadow:none}
.results-drawer .results-identity{display:flex;align-items:center;gap:9px;font-size:13px}.results-identity>strong{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.35}.results-identity>small{font-size:9px;color:#65594b}
.results-drawer .results-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.results-values>div{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0}.results-values>div>small{font-size:8px;letter-spacing:.8px;color:#65594b}.results-values>div>strong{font-size:18px;font-weight:600;font-variant-numeric:tabular-nums;max-width:100%;overflow-wrap:anywhere}
.results-drawer .positive{color:#73501c}.results-drawer .negative{color:#a44b3b}.results-drawer .neutral{color:#65594b}
.results-drawer .results-player>small{font-size:10px;color:#65594b}.results-drawer .results-help{font-size:11px;line-height:1.6;color:#65594b}.results-drawer .results-unit{margin:18px 0 0;font-size:9px;color:#65594b}

.premium-table .hand-stone{flex-basis:clamp(40px,calc((100cqw - 89px)/6),50px);width:clamp(40px,calc((100cqw - 89px)/6),50px)}
@media(max-width:350px){.premium-table .hand-stone{flex-basis:44px;width:44px}}

/* Empty seats and observer controls match the installed iPhone table. */
@media(max-width:600px){
 .premium-table .sit{width:49px;height:49px;min-height:49px;border:1px solid #e9dfcf;background:linear-gradient(#fffdf6,#f2e9dd);box-shadow:0 2px 4px #24150b66;color:#251b13;font-size:29px}
 .premium-table .sit:disabled{opacity:.55}
 .premium-table .seat:has(.sit) .seat-name{width:auto;min-width:44px;padding:2px 8px;border-radius:12px;background:#fff8ed;color:#31251a;font-size:9px;font-weight:700;text-transform:uppercase;opacity:1}
 .premium-table.is-observer #table-center{top:45%;width:180px;padding:12px 10px;border:1px solid #cba86a8c;border-radius:14px;background:#221b15ea;box-shadow:0 3px 10px #0005}
 .premium-table.is-observer #table-center h2{margin:0 0 7px;font-size:16px}
 .premium-table.is-observer #table-center p{margin:0;font-size:10px}
 .premium-table.is-observer #hand-area{height:67px}
 .premium-table.is-observer .observing{align-content:center;gap:2px;background:linear-gradient(transparent,#21160fe6);border:0}
 .premium-table.is-observer .observing>span{font-size:11px;font-weight:600}
 .premium-table.is-observer .observing .seat-reason{font-size:9px}
 .premium-table.is-observer .table-chat-dock:not(.has-message){right:15px;bottom:calc(77px + env(safe-area-inset-bottom));width:105px;max-width:105px;height:44px;display:flex;align-items:center;justify-content:center;gap:6px;border-radius:24px;background:#251b14d9;color:#fff1d4;font-size:12px}
 .premium-table.is-observer .table-chat-dock:not(.has-message) svg{width:17px;height:17px}
}

.premium-table .zero-balance-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.premium-table .zero-balance-actions .table-button{min-height:44px;margin-top:4px}

/* Online table controls and panels follow the iPhone TableScenePanel layout. */
.premium-table .game-toolbar{top:0;left:10px;right:10px;height:44px}
.premium-table .table-results-tool{margin-left:auto}
.premium-table .table-history-tool{position:absolute;z-index:30;left:2px;top:calc(62% + 7px)}
.premium-table .hud-icon{z-index:30;border:1px solid #d2bd91a6;background:linear-gradient(145deg,#342c22ed,#151613ed);color:#f6e7c5;box-shadow:0 2px 5px #0005}
.premium-table .table-results-tool svg{fill:currentColor;stroke:none}
body.in-game dialog::backdrop{background:#00000026;backdrop-filter:none}
body.in-game dialog.table-menu,body.in-game dialog.room-history-drawer,body.in-game dialog.results-drawer{position:fixed;margin:0;overflow-y:auto;border:0;border-radius:0;background:#ece5d6;color:#302318;box-shadow:3px 0 9px #0004;max-width:calc(100vw - 24px);max-height:none;padding:0}
body.in-game dialog.table-menu{inset:62px auto auto 0;width:min(calc(100vw - 24px),max(232px,42.4vw));height:min(650px,calc(100dvh - 78px));border-radius:0 12px 12px 0;border-right:1px solid #c6b17a}
body.in-game dialog.room-history-drawer{inset:54px auto 0 0;width:min(calc(100vw - 24px),max(280px,76vw));height:calc(100dvh - 54px);border-radius:0 12px 12px 0;border-right:1px solid #c6b17a}
body.in-game dialog.results-drawer{inset:54px 0 auto auto;width:min(calc(100vw - 24px),max(280px,76vw));height:min(470px,calc(100dvh - 54px));border-radius:12px 0 0 12px;border-left:1px solid #c6b17a;box-shadow:-3px 0 9px #0004}
body.in-game dialog.table-menu .modal-heading,body.in-game dialog.room-history-drawer .modal-heading,body.in-game dialog.results-drawer .modal-heading{position:sticky;top:0;z-index:3;height:48px;min-height:48px;margin:0;padding:0 6px 0 50px;border-bottom:1px solid #dcaf3280;background:linear-gradient(125deg,var(--shell-rail),var(--shell-shade));color:#fff}
body.in-game dialog.table-menu .modal-heading h2,body.in-game dialog.room-history-drawer .modal-heading h2,body.in-game dialog.results-drawer .modal-heading h2{font-size:16px;font-weight:600;text-align:center;color:#fff}
body.in-game dialog.table-menu .modal-heading>button,body.in-game dialog.room-history-drawer .modal-heading>button,body.in-game dialog.results-drawer .modal-heading>button{width:44px;height:44px;min-height:44px;flex:none;border:0;background:none;color:#fff;font-size:20px}
body.in-game dialog.table-menu>.table-menu-content{margin:0;padding:0;color:#302318}
.table-menu-content .table-exit-actions{position:relative;top:auto;z-index:auto;display:grid;gap:10px;margin:0;padding:12px 18px;border-bottom:1px solid #c6b17a80;background:transparent}
.table-menu-content .table-exit-actions p{margin:0;font-size:11px;line-height:1.45;color:#6b655e}
.table-menu-content .table-menu-room{display:grid;gap:5px;margin:0 18px;padding:18px 0 8px}
.table-menu-content .table-menu-room strong{font-size:16px;font-weight:600;line-height:1.2}
.table-menu-content .table-menu-room small{font-size:10px;font-family:ui-monospace,monospace;color:#6b655e;letter-spacing:.5px}
.table-menu-content .table-menu-rows{margin:0 18px 18px}
.table-menu-content .table-menu-row{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:7px 12px;background:none;border:0;border-bottom:1px solid #c6b17a66;border-radius:0;color:#302318;text-align:left}
.table-menu-content .table-menu-row svg{width:26px;height:26px;flex:none;color:#75502e}
.table-menu-content .table-menu-row>span{display:grid;gap:3px;min-width:0;flex:1}
.table-menu-content .table-menu-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:500;line-height:1.25}
.table-menu-content .table-menu-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:#6b655e;line-height:1.3}
.table-menu-content .table-menu-row>b{color:#6b655e;font-size:16px;font-weight:400}
.table-menu-content .table-exit-actions .table-menu-row{min-height:62px;padding:9px 12px;border:1px solid #c6b17a99;border-radius:10px;background:#ffffff73}
.table-menu-content .table-exit-actions .table-menu-row strong{font-size:15px;font-weight:600}
.table-menu-content .table-exit-actions .table-menu-row small{font-size:11px}
.table-menu-content [data-action="leave"] svg,.table-menu-content [data-action="rules"] svg,.table-menu-content [data-action="table-archive"] svg{color:#bd654d}
.table-menu-content [data-action="leave"] strong,.table-menu-content [data-action="leave"]>b{color:#bd654d}
body.in-game dialog.table-settings-drawer{position:fixed;inset:auto 0 0 0;width:100%;max-width:480px;height:240px;max-height:240px;margin:0 auto;padding:0;border-radius:24px 24px 0 0;background:#ece5d6;color:#302318;overflow:hidden}
body.in-game dialog.table-settings-drawer .modal-heading{height:48px;min-height:48px;margin:0;padding:0 6px 0 50px}
body.in-game dialog.table-settings-drawer>.table-settings{margin:0;padding:18px}
.table-settings label{display:flex;align-items:center;justify-content:space-between;min-height:58px;margin:0;padding:0 8px;border-bottom:1px solid #c6b17a66;font-size:15px;font-weight:500;color:#302318}
.table-settings input[type="checkbox"]{position:relative;appearance:none;width:50px;height:30px;min-width:50px;margin:0;padding:0;border:1px solid #baa78b;border-radius:18px;background:#d1c7b6;box-shadow:none;transition:background .16s}
.table-settings input[type="checkbox"]:checked{background:#edb92b;border-color:#c99b1f}
.table-settings input[type="checkbox"]::before{content:"";position:absolute;top:2px;left:2px;width:24px;height:24px;border-radius:50%;background:white;box-shadow:0 1px 3px #0003;transition:transform .16s}
.table-settings input[type="checkbox"]:checked::before{transform:translateX(20px)}
body.in-game dialog.results-drawer>.modal-heading{background:linear-gradient(125deg,var(--shell-rail),var(--shell-shade));border-bottom-color:#dcaf3280}
body.in-game dialog.results-drawer #table-results-content{margin:0;padding:12px 12px 14px}
.results-drawer .results-heading{display:flex;justify-content:space-between;padding:0 10px 4px;color:#6b655e;font-size:9px;font-weight:700;letter-spacing:.8px}
body.in-game dialog.results-drawer .results-player{display:flex;align-items:center;gap:10px;min-height:72px;margin:0 0 10px;padding:11px 12px;border:.8px solid #c8ab754d;border-radius:21px;background:linear-gradient(135deg,#fffcf5,#f4ebdc);box-shadow:0 4px 9px #5c42271c;color:#302318}
body.in-game dialog.results-drawer .results-player.own{border-color:#c8ab7594;border-width:1.1px}
.results-drawer .results-player .avatar{--avatar:38px;width:38px;height:38px;flex:none;border:1.5px solid #ffffffd9}
.results-drawer .results-player-main{display:grid;gap:4px;flex:1;min-width:0}
.results-drawer .results-player-name{display:flex;align-items:center;gap:5px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600}
.results-drawer .own-marker{display:inline-block;flex:none;width:5px;height:5px;border-radius:50%;background:#c09033}
.results-drawer .leaving-marker{color:#bd654d;font-size:10px}
.results-drawer .results-player-balance{display:flex;align-items:center;gap:4px;min-width:0;font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}
.results-drawer .results-player-balance img{width:15px;height:15px;object-fit:contain}
.results-drawer .results-player-balance .chip-stack{flex:none;width:15px;height:12px}
.results-drawer .results-player-balance b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.results-drawer .results-net{flex:none;padding:8px 9px;border-radius:20px;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
.results-drawer .results-net.positive,.results-drawer .results-net.neutral{background:#e2f0e8;color:#2d715b}
.results-drawer .results-net.negative{background:#f7e7e1;color:#9f5148}
.results-drawer .results-waitlist{margin-top:6px;padding:10px 12px;border:.8px solid #c8ab754d;border-radius:21px;background:linear-gradient(135deg,#fffcf5,#f4ebdc);box-shadow:0 4px 9px #5c42271c}
.results-drawer .results-waitlist-toggle{display:flex;align-items:center;gap:9px;width:100%;min-height:38px;padding:0;background:none;color:#302318;text-align:left}
.results-drawer .results-waitlist-toggle strong{flex:1;font-size:12px;font-weight:600}
.results-drawer .results-waitlist-toggle b{display:grid;place-items:center;min-width:26px;height:26px;border-radius:50%;background:#f2e8d5;font-size:11px}
.results-drawer .results-waitlist-toggle>span:last-child{font-size:13px;color:#6b655e}
.results-drawer .results-waitlist-icon{display:grid;place-items:center;width:31px;height:31px;flex:none;border-radius:50%;background:#f2e8d5;color:#89652d}
.results-drawer .results-waitlist-icon svg{width:16px;height:16px}
.results-drawer .results-waitlist-content{display:grid;gap:9px;padding-top:9px;color:#302318}
.results-drawer .results-waitlist-player{display:flex;align-items:center;gap:9px}
.results-drawer .results-waitlist-player>b{width:24px;flex:none;font-size:12px;color:#b4883e}
.results-drawer .results-waitlist-player .avatar{--avatar:34px;width:34px;height:34px;flex:none}
.results-drawer .results-waitlist-player>span:last-child{display:grid;gap:2px;min-width:0}
.results-drawer .results-waitlist-player strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.results-drawer .results-waitlist-player small,.results-drawer .results-waitlist-content p{font-size:10px;line-height:1.4;color:#6b655e}
.results-drawer .results-unqueue{min-height:44px;background:none;color:#bd654d;font-size:12px;font-weight:700;text-align:left}
.results-drawer .results-points-prize{margin:6px 0;color:#6b655e;font-size:10px}
body.in-game dialog.room-history-drawer #table-history-content{margin:0;padding:12px;color:#302318}
.room-history-drawer .history-session{display:flex;align-items:center;justify-content:space-between;min-height:52px;padding:10px 12px;border:1px solid #c8ab754d;border-radius:12px;background:#fffcf5}
.room-history-drawer .history-session span{font-size:10px;font-weight:700;letter-spacing:1px;color:#6b655e}
.room-history-drawer .history-session strong{font-size:22px;font-weight:600;font-variant-numeric:tabular-nums}
body.in-game dialog.table-menu .table-exit-actions{position:relative;top:auto;z-index:auto;display:grid;gap:10px;margin:0;padding:12px 18px;border-bottom:1px solid #c6b17a80;background:#ece5d6}
body.in-game dialog.table-menu .table-exit-actions p{margin:0;color:#6b655e;font-size:11px;line-height:1.45}
.premium-table.is-waiting #hand-area{height:44px}
.premium-table.is-waiting .seat0{bottom:36px}
.premium-table.is-waiting .waiting-footer{display:flex;align-items:center;justify-content:center;min-height:44px;padding:5px 16px;text-align:center;color:#f6e7c5d9;font-size:10px;font-weight:500}
.premium-table.is-waiting .table-chat-dock,.premium-table.is-waiting.is-observer .table-chat-dock:not(.has-message),.premium-table.is-waiting .table-history-tool{display:none}
