/* A shared scene and a separate control region for practice and funded Fast Swap. */
.fast-table .table-bet>.chip-pile{zoom:.8}
/* Anchor the sheet to the action panel; opening chat never resizes the table. */
.fast-table .table-drawer.chat-sheet{display:flex;position:absolute;z-index:61;inset:auto;transform:none;width:100%;height:196px;min-height:0;max-height:none;padding:10px 12px;margin:0;gap:6px;border:1px solid #3d5664;border-radius:18px 18px 8px 8px;box-shadow:none;animation:chat-sheet-in 160ms ease-out}
.chat-sheet-heading{display:flex;justify-content:space-between;align-items:center;flex-shrink:0}.chat-sheet-heading h3{font-size:13px;margin:0}.chat-sheet-heading small{font-size:10px;color:#9cb1bd}
.chat-sheet .chat-messages{flex:1;min-height:0;padding:0 3px;overflow-y:auto;overscroll-behavior:contain}.chat-sheet .chat-message{margin-bottom:8px}.chat-sheet .chat-message p{margin:3px 0;overflow-wrap:anywhere;white-space:pre-wrap}.chat-sheet .chat-message strong,.chat-sheet .chat-message p{font-size:12px}.chat-sheet .chat-empty{font-size:12px;color:#9cb1bd;margin:8px 0}
.chat-sheet .chat-form{flex-shrink:0;margin:0;padding:0;border:0;display:flex;gap:8px}.chat-sheet .chat-form input{min-width:0;flex:1;height:40px;font-size:16px}.chat-sheet .chat-form button{width:44px;height:40px;border-radius:8px;background:#b8e3f2;color:#12232e;font-size:20px}
.seat-chat-bubble{--seat-chat-fill:rgb(157 217 243 / 70%);visibility:hidden;position:absolute;z-index:12;bottom:calc(100% + 14px);left:50%;transform:translateX(-50%);width:max-content;min-width:24px;max-width:116px;padding:5px 7px;border:1.2px solid transparent;border-radius:5px 6px 5px 6px;background:none;color:#10171d;font-family:inherit;font-size:12px;font-weight:600;line-height:16px;letter-spacing:0;pointer-events:none;animation:seat-chat-fade var(--seat-chat-duration,9000ms) ease-out both}
.seat-chat-tail>path:first-child{fill:var(--seat-chat-fill)}
.seat-chat-tail{position:absolute;top:calc(100% - 1px);left:calc(50% - 10px);width:20px;height:14px;overflow:visible}
.fast-table .position-1>.seat-chat-bubble,.fast-table .position-2>.seat-chat-bubble{left:65%}
.fast-table .position-4>.seat-chat-bubble,.fast-table .position-5>.seat-chat-bubble{left:35%}

.position-1 .seat-chat-tail,.position-2 .seat-chat-tail{left:clamp(2px,calc(100% - 22px),8px)}
.position-4 .seat-chat-tail,.position-5 .seat-chat-tail{left:auto;right:clamp(2px,calc(100% - 22px),8px)}
.position-2 .seat-chat-tail,.position-3 .seat-chat-tail,.position-4 .seat-chat-tail{top:auto;bottom:calc(100% - 1px);transform:scaleY(-1)}
.position-4 .seat-chat-tail{transform:scale(-1,-1)}.position-5 .seat-chat-tail{transform:scaleX(-1)}
.seat-chat-text{color:inherit;position:relative;display:block;overflow:hidden;overflow-wrap:anywhere;white-space:pre-wrap}
.chat-sheet .chat-message,.chat-sheet .chat-message p,.chat-sheet .chat-form input{font-family:inherit;letter-spacing:.01em}.chat-sheet .chat-message p{font-size:13px;line-height:1.45;font-weight:400;color:#e0ebf0}.chat-sheet .chat-message strong{font-weight:600;color:#9dd9f3}.chat-sheet .chat-message time{font-family:inherit;font-size:10px;color:#9cb1bd}.chat-sheet .chat-form input{font-weight:400}.chat-sheet-heading h3{font-weight:600;letter-spacing:.01em}
@keyframes seat-chat-fade{0%,95%{opacity:1}100%{opacity:0}}
@keyframes chat-sheet-in{from{transform:translateY(12px);opacity:0}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.fast-table .table-drawer.chat-sheet,.seat-chat-bubble,.seat-chat-tail{animation:none}}
/* The Telegram host supplies the visible stable height inline; CSS keeps a fallback before SDK initialization. */
html{--fast-viewport-height:var(--tg-stable-height,100svh)}
html.telegram-app.telegram-expanded{--fast-viewport-height:100svh}
html:has(.fast-table){-webkit-text-size-adjust:100%;text-size-adjust:100%}
.app-shell.in-room:has(.fast-table){display:block;min-height:0}
.in-room:has(.fast-table)>.topbar,.in-room:has(.fast-table)>.sidebar,.in-room:has(.fast-table) .mobile-nav{display:none}
.in-room:has(.fast-table) .main{min-height:0;overflow:visible}
.in-room .table-page.fast-table{padding:8px 10px calc(8px + var(--noir-safe-bottom,0px));max-width:1000px;min-height:0;height:auto}
html.telegram-app .in-room .table-page.fast-table{padding-bottom:var(--noir-safe-bottom,0px)}
.fast-table .table-heading{height:auto;min-height:40px;margin:0 0 4px;gap:8px;flex-direction:row}
.fast-table .table-title-wrap{flex:1;min-width:0;gap:6px}.fast-table .table-title-wrap>div{min-width:0}
.fast-table .table-heading h1{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;font-size:15px;line-height:24px;letter-spacing:0}
.fast-table .small-pill{display:none}.fast-table .table-subtitle{display:none}
.fast-table .table-tools{flex:0 0 auto;gap:4px}.fast-table .table-tools .icon-button,.fast-table .table-tools .wallet-trigger,.fast-table .back-button{width:32px;height:36px;min-height:36px;padding:4px}
.fast-table .table-layout{display:block;height:auto}.fast-table .table-play-area{position:relative;display:flex;flex-direction:column;height:auto;padding:0;gap:4px}
.fast-table .table-status-line{height:16px;min-height:16px;padding:0;font-size:9px}.fast-table .table-switcher{height:28px;min-height:28px;margin:0}
.fast-table .table-stage{position:relative;width:100%;height:clamp(200px,calc(var(--fast-viewport-height) - 320px - var(--noir-safe-top,0px) - var(--noir-safe-bottom,0px)),580px);min-height:0;max-height:none;margin:0;overflow:visible}
.fast-table-surface{position:absolute;top:0;transform-origin:top left}
.fast-table .poker-table{left:3%;right:3%;top:20%;bottom:14%;border-width:7px;border-radius:47%/40%}.fast-table .felt-inner{inset:7px;border-radius:47%/40%}.fast-table .felt-label{display:none}
.fast-table .seat{width:84px}.fast-table .self-seat{width:114px}.fast-table .seat-identity{min-height:38px;padding:4px;gap:4px;border-radius:12px}.fast-table .seat .avatar{width:21px;height:21px;font-size:11px}
.fast-table .seat-name{font-size:10px;max-width:100%;line-height:13px}.fast-table .seat-name small{font-size:5px}.fast-table .seat-stack{font-size:11px;line-height:14px;margin:1px 0 0}.fast-table .seat-caption{font-size:6px;line-height:8px;height:8px;margin-top:3px}
.fast-table .seat-cards,.fast-table .self-seat .seat-cards{height:43px;min-height:0;margin-bottom:-3px}.fast-table .seat-cards .playing-card{width:29px;height:41px}.fast-table .self-seat .seat-cards{height:58px}.fast-table .self-seat .seat-cards .playing-card{width:41px;height:58px}
.fast-table .seat-cards .card-corner{font-size:12px;top:2px;left:2px}.fast-table .seat-cards .card-pip{font-size:24px}.fast-table .self-seat .seat-cards .card-corner{font-size:15px}.fast-table .self-seat .seat-cards .card-pip{font-size:30px}
.fast-table .position-0{left:50%;top:87%}.fast-table .position-1{left:13%;top:75%}.fast-table .position-2{left:13%;top:28%}.fast-table .position-3{left:50%;top:11%}.fast-table .position-4{left:87%;top:28%}.fast-table .position-5{left:87%;top:75%}
.fast-table .self-seat>.time-bank-control{left:calc(100% + 5px);bottom:10px;width:50px;min-height:32px;font-size:8px;padding:3px}
.fast-table .board:not(.waiting-board){left:50%;top:51%;max-width:none;transform:translate(-50%,-50%)}
.fast-table .community-cards{gap:4px;margin:0}.fast-table .community-cards>.board-card,.fast-table .community-cards>.card-slot{width:42px;height:60px;flex-shrink:0}
.fast-table .community-cards>.board-card .card-corner{font-size:14px}.fast-table .community-cards>.board-card .card-pip{font-size:29px}.fast-table .board>.street-label{padding-top:5px;font-size:8px;font-weight:600;line-height:1.4;letter-spacing:.35px;color:#c1d9e4;text-shadow:0 1px 2px #091218}
.fast-table .board>.street-label>span{color:inherit}
.fast-table .board>.pot-summary{padding-bottom:6px}.fast-table .total-pot-badge{font-size:10px;line-height:14px;padding:2px 7px}.fast-table .pot-summary .chip-pile{display:none!important}
.fast-table .table-bet{flex-direction:column;gap:1px;font-size:10px;line-height:13px}.fast-table .bet-position-0{left:50%;top:68%}.fast-table .bet-position-1{left:27%;top:68%}.fast-table .bet-position-2{left:27%;top:36%}.fast-table .bet-position-3{left:50%;top:29%}.fast-table .bet-position-4{left:73%;top:36%}.fast-table .bet-position-5{left:73%;top:68%}
.fast-table .board:has(.second-board) .community-cards>.playing-card,.fast-table .board:has(.second-board) .community-cards>.card-slot{width:34px;height:48px}.fast-table .board>.second-board{margin-top:5px}
.fast-table-surface[data-wide=true] .seat{width:115px}.fast-table-surface[data-wide=true] .self-seat{width:130px}.fast-table-surface[data-wide=true] .position-1,.fast-table-surface[data-wide=true] .position-2{left:10%}.fast-table-surface[data-wide=true] .position-4,.fast-table-surface[data-wide=true] .position-5{left:90%}
.fast-table .table-play-area>.departure-toggles{position:static;inset:auto;display:flex;flex-direction:row;align-items:center;width:100%;max-width:none;min-height:38px;gap:8px;margin:0;flex-wrap:nowrap}
.fast-table .fast-toggle-row{gap:8px;flex-wrap:wrap}.fast-table .fast-toggle-row .fast-watch-choice{min-height:34px;font-size:10px;line-height:14px}.fast-table .amount-display-toggle{align-self:center;min-height:34px}
.fast-table .table-play-area>.action-panel{position:relative;inset:auto;width:100%;height:164px;min-height:164px;max-height:164px;flex:none;margin:0;padding:10px;overflow:auto;display:flex;flex-direction:column;justify-content:center;gap:8px;box-sizing:border-box}
.fast-table .action-topline{margin:0;min-height:16px}.fast-table .action-content{display:flex;flex-direction:column;gap:6px;align-items:stretch}.fast-table .bet-builder{display:flex;flex-direction:column;gap:4px}.fast-table .bet-presets{display:flex;gap:5px;margin:0}.fast-table .bet-presets button{min-height:28px;font-size:9px;padding:3px}
.fast-table .bet-slider-row{display:flex;gap:10px}.fast-table .bet-slider-row input[type=range]{width:100%;height:24px;min-width:0;writing-mode:horizontal-tb;direction:ltr;transform:none;appearance:auto}.fast-table .bet-input{padding:4px;min-width:72px}.fast-table .bet-input input{font-size:16px;width:52px}.fast-table .action-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.fast-table .action-button{min-height:44px;grid-column:auto;padding:4px}.fast-table .action-button>span{font-size:12px}
.fast-table .fast-controls .fast-fold-group{width:100%;display:flex;gap:8px}.fast-table .fast-fold-group>.button{flex:1;min-width:0;min-height:44px;font-size:12px}.fast-table .waiting-action-copy{width:100%}.fast-table .waiting-action-copy strong{font-size:12px}.fast-table .waiting-actions .waiting-buttons{flex-wrap:wrap;justify-content:flex-start}
.fast-table .table-play-area>.action-panel.fast-paused-controls{height:196px;min-height:196px;max-height:196px}.fast-table .fast-pause-actions{grid-column:1/-1;display:grid;gap:6px;width:100%}.fast-table .fast-pause-actions>.button{width:100%}.fast-table .fast-pause-actions>.fast-pause-leave{min-height:44px;border:0;background:transparent;box-shadow:none;color:#d6a8a5;font-size:11px}.fast-table .fast-pause-actions>.fast-pause-leave:hover{color:#f0c4bd}
.fast-table .table-underbar{position:static;height:auto;margin:0;min-height:20px}.fast-table .table-underbar .mobile-chat-trigger{position:static;inset:auto!important;width:auto;height:28px;min-height:28px;padding:4px 8px!important;font-size:10px!important;border-radius:5px;box-shadow:none}.fast-table .mobile-chat-trigger::before{display:none}
@media(min-width:961px){.fast-table .table-play-area>.action-panel{height:164px;min-height:164px;max-height:164px}}
.fast-table .bet-position-1,.fast-table .bet-position-2{left:33%}.fast-table .bet-position-4,.fast-table .bet-position-5{left:67%}
.fast-table .shortcut-note{display:none}
@media(orientation:landscape) and (max-height:600px) and (max-width:1100px){
 .fast-table:not(.woven-table) .table-play-area{display:grid;grid-template-columns:minmax(0,1fr) 250px;grid-template-rows:20px auto 164px 1fr;column-gap:12px;min-height:380px}
 .fast-table:not(.woven-table) .table-play-area:has(>.fast-paused-controls){grid-template-rows:20px auto 196px 1fr}
 .fast-table:not(.woven-table) .table-status-line{grid-column:1;grid-row:1}.fast-table:not(.woven-table) .table-switcher{grid-column:1;grid-row:1;margin-left:140px}
 .fast-table:not(.woven-table) .table-stage{grid-column:1;grid-row:2/5;height:360px}
 .fast-table:not(.woven-table) .table-play-area>.departure-toggles{grid-column:2;grid-row:1/3;flex-wrap:wrap;align-self:start;gap:4px}
 .fast-table:not(.woven-table) .table-play-area>.action-panel{grid-column:2;grid-row:3}.fast-table:not(.woven-table) .table-underbar{grid-column:2;grid-row:4;align-self:start}
 .fast-table:not(.woven-table) .action-topline{flex-wrap:wrap}.fast-table:not(.woven-table) .your-turn{font-size:9px}.fast-table:not(.woven-table) .deadline-badge{font-size:8px}
}
.fast-table .table-play-area>.action-panel{align-items:stretch}
.fast-table .bet-builder,.fast-table .bet-presets,.fast-table .bet-slider-row{width:100%}
.fast-table .bet-slider-row input[type=range]{accent-color:#9dd9f3}
.fast-table .board .result-label{font-size:10px;max-width:200px;line-height:14px}
.fast-table .waiting-board{left:50%;top:50%;transform:translate(-50%,-50%);max-width:65%}
@media(orientation:landscape) and (max-height:600px) and (max-width:1100px){
 .fast-table:not(.woven-table) .table-play-area{min-height:0}
 .fast-table:not(.woven-table) .table-stage{height:max(230px,calc(var(--fast-viewport-height) - 92px - var(--noir-safe-top,0px) - var(--noir-safe-bottom,0px)))}
 .fast-table:not(.woven-table) .seat-name{font-size:12px}.fast-table:not(.woven-table) .seat-stack{font-size:13px}
}

.fast-table .bet-position-2,.fast-table .bet-position-4{top:32%}
.fast-table .table-play-area:not(:has(>.table-switcher))>.table-status-line{margin-bottom:32px}
.fast-table .seat-identity{height:38px;min-height:38px;padding:3px 4px 7px}
.fast-table .seat-name{line-height:12px}.fast-table .seat-stack{line-height:13px}
.fast-table .seat-identity>.seat-timer{bottom:2px;left:8px;right:8px}
.fast-table .action-panel:has(>.raise-explanation){justify-content:flex-start}
.fast-table .action-panel:has(>.raise-explanation) .bet-builder{display:none}
.fast-table .action-panel:has(>.raise-explanation) .action-content{display:block;margin-top:auto}
.fast-table .action-panel>.raise-explanation{display:flex;align-items:center;flex:1;min-height:0;margin:0;padding:4px 8px;font-size:11px;line-height:15px}

/* On compact portrait phones, keep the action row in view before adding decorative spacing. */
@media(max-width:350px) and (orientation:portrait){.fast-table .table-play-area:not(:has(>.table-switcher))>.table-status-line{margin-bottom:0}.fast-table .fast-toggle-row .fast-watch-choice{font-size:9px}}
/* Portrait tablets spend their extra height on the shared scene, not empty space below the controls. */
@media(min-width:600px) and (orientation:portrait){
 .fast-table .table-stage{height:max(168px,calc(var(--fast-viewport-height) - 352px - var(--noir-safe-top,0px) - var(--noir-safe-bottom,0px)))}
 .fast-table .poker-table{left:10%;right:10%;top:14%;bottom:14%}
 .fast-table .table-heading h1{font-size:18px}.fast-table .fast-toggle-row .fast-watch-choice{font-size:12px}
 .fast-table .table-play-area>.action-panel{height:196px;min-height:196px;max-height:196px}
 .fast-table .action-content{display:flex;flex-direction:column;align-items:stretch}
 .fast-table .bet-presets button{min-height:34px;font-size:12px}.fast-table .action-button{min-height:48px}.fast-table .action-button>span{font-size:14px}
}

/* Waiting copy may wrap; keep the countdown together in its own column. */
.fast-table .table-play-area>.action-panel.waiting-actions:has(>.turn-wait){display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:12px}
.fast-table .turn-wait,.fast-table .turn-wait>div{min-width:0}
.fast-table .action-panel .turn-wait>div>span,.fast-table .turn-wait strong{white-space:normal;overflow-wrap:anywhere}
.fast-table .waiting-actions>.deadline-badge{white-space:nowrap;align-self:center}
.fast-table .seat:has(>.seat-chat-bubble){z-index:25}

.fast-table .table-layout{position:relative}
.chat-sheet-backdrop{position:fixed;inset:0;z-index:60;width:100%;height:100%;padding:0;background:transparent;cursor:default}
.chat-sheet-backdrop:not(:disabled):active{transform:none}


.fast-table .table-drawer.chat-sheet{padding:12px;gap:8px;border-radius:16px;overflow:hidden}
.chat-sheet .chat-messages{padding:0}
.chat-sheet .chat-form{display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:center;gap:10px;width:100%;background:none}
.chat-sheet .chat-form input{width:100%;height:42px;padding:0 12px;border:1px solid #3d5968;border-radius:10px;background:#0c171e;color:#e0ebf0;box-shadow:inset 0 1px 2px #0002;outline-offset:2px}
.chat-sheet .chat-form input::placeholder{color:#849da9;opacity:1}
.chat-sheet .chat-form input:focus{border-color:#9dd9f3;background:#11212a}
.chat-sheet .chat-form button{position:static;inset:auto;width:42px;height:42px;min-width:42px;padding:0;margin:0;border:1px solid #9dd9f3;border-radius:10px;display:grid;place-items:center;line-height:1}
.chat-sheet .chat-form input:disabled{opacity:.65}

.fast-table .table-quick-menu{position:relative;z-index:40}
.table-quick-menu>summary{list-style:none;display:grid;place-items:center;border:1px solid #3d5664;border-radius:6px;color:#c5d1d8;background:#111b22;cursor:pointer}
.table-quick-menu>summary::-webkit-details-marker{display:none}
.table-quick-menu>summary:focus-visible{outline:2px solid #9dd9f3;outline-offset:3px}
.table-quick-menu[open]>summary{background:#243c48;border-color:#9dd9f3}
.table-quick-menu-panel{position:absolute;bottom:calc(100% + 8px);left:0;width:260px;max-width:calc(100vw - 32px);padding:10px;border:1px solid #3d5664;border-radius:10px;background:#12212a;box-shadow:0 8px 24px #0006;color:#dceff6}
.table-quick-units{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px 8px;border-bottom:1px solid #304652;font-size:12px}
.fast-table .table-quick-menu-panel .fast-toggle-row{display:flex;flex-direction:column;align-items:stretch;gap:2px;padding-top:6px}
.fast-table .table-quick-menu-panel .fast-watch-choice{justify-content:flex-start;min-height:40px;font-size:12px;padding:6px 4px;text-align:left}

.fast-table .departure-toggles>.fast-chat-trigger{position:static;inset:auto;transform:none;flex:none;margin:0 0 0 auto;align-self:center}
@media(max-width:500px) and (orientation:portrait){
 .fast-table .table-play-area>.departure-toggles{height:0;min-height:0;margin-bottom:-4px;overflow:visible}
 .fast-table .table-play-area>.departure-toggles>.table-quick-menu,.fast-table .table-play-area>.departure-toggles>.fast-chat-trigger{transform:translateY(-44px)}
 .fast-table .position-0{top:84%}
}

/* Table surroundings selected in Appearance, independent of the felt. */
html[data-table-background] body:has(.fast-table){background-color:#0c1319;background-attachment:fixed;background-size:cover}
html[data-table-background] .app-shell.in-room,html[data-table-background] .app-shell.in-room>.main,html[data-table-background] .fast-table,html[data-table-background] .fast-table .table-play-area{background:transparent}
html[data-table-background=graphite] body:has(.fast-table),.table-background-preview[data-preview-background=graphite]{background-image:radial-gradient(ellipse at 50% 38%,#1b232a 0%,#0e141b 48%,#04070b 100%)}
html[data-table-background=fabric] body:has(.fast-table),.table-background-preview[data-preview-background=fabric]{background-image:repeating-linear-gradient(0deg,#b0c6d405 0 1px,transparent 1px 3px),repeating-linear-gradient(90deg,#0003 0 1px,transparent 1px 3px),radial-gradient(ellipse at 50% 40%,#263138,#0b1117);background-size:3px 3px,3px 3px,cover}
html[data-table-background=blue] body:has(.fast-table),.table-background-preview[data-preview-background=blue]{background-image:radial-gradient(ellipse at 15% 25%,#39728d55,transparent 48%),radial-gradient(ellipse at 85% 65%,#2f597855,transparent 48%),radial-gradient(ellipse at 50% 35%,#172d3b,#070e17)}
html[data-table-background=lounge] body:has(.fast-table),.table-background-preview[data-preview-background=lounge]{background-image:radial-gradient(ellipse at 17% 18%,#c3a67345,transparent 12%),radial-gradient(ellipse at 80% 22%,#e4b77738,transparent 14%),radial-gradient(ellipse at 6% 65%,#34657255,transparent 22%),radial-gradient(ellipse at 95% 70%,#71614a44,transparent 23%),linear-gradient(90deg,#080e15,#24262a 25%,#0d1720 48%,#29272a 75%,#090f15)}

.table-background-preview{height:104px;margin:8px 0 18px;display:grid;place-items:center;border:1px solid #354f5e;border-radius:9px;background-color:#0c1319;background-size:cover;overflow:hidden}
.background-preview-table{display:grid;place-items:center;width:128px;height:68px;border:3px double #526a78;border-radius:45%;background:radial-gradient(ellipse,#1d2c35,#101c24);box-shadow:0 3px 10px #0005}
.background-preview-table img{width:32px;height:32px;opacity:.35}

.fast-table .table-quick-menu>summary,.fast-table .departure-toggles>.fast-chat-trigger{width:44px;min-width:44px;height:34px;min-height:34px;box-sizing:border-box;transition:background var(--duration),border-color var(--duration),color var(--duration),box-shadow var(--duration)}
