/* A stable felt surface and a mobile table sized to the available screen. */
.mobile-game-menu{display:none}
.mobile-menu-actions{display:grid;gap:9px;margin-top:22px}
.mobile-menu-actions .secondary{display:flex;align-items:center;text-align:left;gap:12px;min-height:48px;font-size:13px;padding:12px 15px}
.mobile-menu-actions .secondary>svg{height:20px;width:20px;flex-shrink:0}
.mobile-menu-actions .secondary>svg:last-child{margin-left:auto;height:15px;width:15px}
.mobile-menu-actions small{font-size:9px;color:#8b9178;margin-left:auto}
.motion-flight{filter:none;box-shadow:0 6px 10px #05271935;backface-visibility:hidden;contain:layout style;will-change:transform}
.motion-flight .motion-surface{backface-visibility:hidden}
.table-card-slot{isolation:isolate}
.hand-card{transition:none}
@media(hover:hover) and (pointer:fine){.hand-card:not(:disabled):hover{transition:transform .15s,filter .15s}}

@media(max-width:700px),(orientation:landscape) and (max-height:500px){
 .expanded-topbar .icon-button,.expanded-topbar .audio-toggle,.expanded-topbar .profile-button{min-width:44px;min-height:44px;width:44px;height:44px;flex-shrink:0}
 .expanded-topbar .audio-toggle{padding:8px}.expanded-topbar .audio-toggle>span{display:none}
 .expanded-topbar .mobile-game-menu{display:grid;place-items:center}
 .expanded-topbar .mobile-game-menu svg{width:21px;height:21px}
 .expanded-topbar nav>[data-action="rules"],.expanded-topbar nav>.profile-button{display:none}
 .game-header nav>[data-nav],.game-header nav>[data-action="standings"]{display:none}
 .game-header{height:60px!important;margin:0!important;padding:6px 12px!important;gap:8px;border-bottom:1px solid #d4d4bf}
 .game-header .brand{min-width:0;min-height:44px;gap:7px;flex:1}.game-header .brand small{display:none}
 .game-header .brand-mark{width:25px;height:31px;font-size:26px}
 .game-header .brand>span:last-child{font-size:22px}
 .game-header nav{gap:4px!important;display:flex;flex-shrink:0}
 .game-header .icon-button{padding:9px}.game-header .audio-toggle{border-radius:8px}
 .expanded-topbar:not(.game-header){display:flex;flex-wrap:wrap;align-items:center;gap:0 5px;height:106px;margin:0;padding:4px 12px 0;position:relative}
 .expanded-topbar:not(.game-header) .brand{order:0;flex:1 1 calc(100% - 103px);gap:7px;height:54px}
 .expanded-topbar:not(.game-header) .brand>span:last-child{font-size:24px}
 .expanded-topbar:not(.game-header) .brand small{font-size:5px;letter-spacing:1px}
 .expanded-topbar:not(.game-header) nav{display:contents}
 .expanded-topbar:not(.game-header) nav>.audio-toggle{order:1;margin:0}
 .expanded-topbar:not(.game-header) nav>.mobile-game-menu{order:2}
 .expanded-topbar:not(.game-header) nav>[data-action="settings"]{display:none}
 .expanded-topbar:not(.game-header) .nav-link{order:3;flex:1 0 20%;height:44px;min-height:44px;font-size:12px;padding:10px 3px;text-align:center}
 .expanded-topbar:not(.game-header) .nav-link.active:after{bottom:0;left:12px;right:12px}

 body.at-table{min-height:100vh;min-height:100svh}
 .at-table .game-layout{height:calc(100vh - 60px);height:calc(100svh - 60px);max-width:none;margin:0;padding:6px 8px max(6px,env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:6px;box-sizing:border-box}
 .at-table .table-topline{flex-shrink:0;height:18px;min-height:18px;margin:0 5px;gap:8px;font-size:8px;letter-spacing:.7px;overflow:hidden}
 .at-table .table-topline>.eyebrow{font-size:8px;letter-spacing:.7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
 .at-table .table-topline>span:last-child{white-space:nowrap;flex-shrink:0}
 .at-table .game-layout .game-table{--hand-card-w:clamp(60px,calc((100svh - 250px)*.2),82px);--hand-bottom:44px;flex:1 1 0;min-height:240px;max-height:none;height:auto;width:100%;max-width:none;border-width:6px;border-radius:38px;margin:0;box-shadow:0 0 0 1px #937c5477,inset 0 0 0 1px #b39c6755,inset 0 0 35px #082b2555,0 5px 14px #2a321b18}
 .at-table .game-layout .game-table:before{inset:8px;border-radius:26px}
 .at-table .game-table .opponent-seat{top:12px;left:50%;width:calc(100% - 32px);min-width:0;gap:9px;transform:translateX(-50%)}
 .at-table .game-table .avatar{width:54px;height:54px;flex-shrink:0}
 .at-table .game-table .seat-info{flex:1;min-width:0}.at-table .game-table .seat-info h1{font-size:25px;line-height:1.05}.at-table .game-table .seat-info h1 small{font-size:12px;line-height:1.2;margin-top:3px}
 .at-table .game-table .seat-info>span{font-size:9px;margin-top:5px;line-height:1.2}.at-table .game-table .character-presence{display:none}
 .at-table .game-table .opponent-score{font-size:31px;padding-left:7px}.at-table .game-table .opponent-score small{font-size:7px}
 .at-table .game-table .speech-bubble{top:78px;left:50%;width:85%;max-width:85%;font-size:10px;line-height:1.45;max-height:30px;overflow:hidden;white-space:normal}
 .at-table .game-table .opponent-hand{top:116px;left:50%;gap:0}
 .at-table .game-table .hidden-card{width:36px;height:53px;margin:0 -5px}
 .at-table .game-table .played-cards{left:55%;top:34%;width:180px;max-width:56%;height:148px;gap:10px}
 .at-table .game-table .played-card{width:clamp(51px,17vw,68px)}
 .at-table .game-table .played-card>span{font-size:8px;bottom:-17px}
 .at-table .game-table .human-hand{left:50%;bottom:var(--hand-bottom);gap:7px}
 .at-table .game-table .hand-card{width:var(--hand-card-w)}
 .at-table .game-table .hand-card:not(:disabled):hover{transform:rotate(calc((var(--i) - (var(--count) - 1)/2)*5deg))}
 .at-table .game-table .human-seat{left:50%;bottom:7px;width:calc(100% - 38px);gap:8px}
 .at-table .game-table .you-label{gap:7px}.at-table .game-table .you-avatar{width:29px;height:29px;font-size:18px;flex-shrink:0}
 .at-table .game-table .you-label>span:last-child{font-size:15px}.at-table .game-table .you-label small{font-size:6px;letter-spacing:.5px;max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .at-table .game-table .human-score{font-size:28px;padding-left:6px;margin-left:auto;display:flex;align-items:center;gap:5px}.at-table .game-table .human-score small{font-size:7px}
 .at-table .game-table .turn-status{left:50%;top:auto;bottom:calc(var(--hand-bottom) + var(--hand-card-w)*2.08 + 10px);max-width:89%;font-size:11px;line-height:1.25;padding:6px 10px;white-space:normal;min-height:25px}
 .at-table .game-table .trick-reason{font-size:8px}.at-table .game-table .turn-status:has(.trick-reason){padding:6px 10px;row-gap:2px}
 .at-table .game-table .deck-area{left:3%;top:37%;width:96px;transform:scale(.86);transform-origin:top left}
 .at-table .game-table .deck-cards{width:90px;height:96px}.at-table .game-table .stock-back{width:49px;height:75px;left:0;top:4px}
 .at-table .game-table .trump-card{width:49px;left:35px;top:9px}.at-table .game-table .trump-label{margin-top:4px}.at-table .game-table .trump-label strong{font-size:15px}
 .at-table .game-table .deck-label{font-size:6px;letter-spacing:.3px;margin-top:0}.at-table .game-table .trump-label>span{font-size:6px}
 .at-table .game-table .captured-pile{right:5px;width:38px;transform:none;font-size:8px}
 .at-table .game-table .captured-opponent{top:29%;bottom:auto}.at-table .game-table .captured-human{top:auto;bottom:86px}
 .at-table .game-table .capture-stack{width:27px;height:43px}.at-table .game-table .capture-owner{font-size:6px;line-height:1.4;letter-spacing:.2px}.at-table .game-table .capture-count{font-size:8px;line-height:1.4}.at-table .game-table .capture-count span{font-size:7px}
 .at-table .table-bottomline{flex-shrink:0;min-height:44px;padding:0;margin:0;display:block}
 .at-table .table-bottomline .save-indicator{display:none}
 .at-table .table-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;margin:0}
 .at-table .table-tools .text-button{width:100%;min-height:44px;min-width:44px;padding:9px 10px;justify-content:center;font-size:11px;border:1px solid #d1d5be;border-radius:8px;background:#f8f5eb}
 .at-table .table-tools>[data-action="analysis"],.at-table .table-tools>[data-action="hint"],.at-table .table-tools>[data-action="undo"]{display:none}
 .at-table .challenge-objective{margin:0;padding:4px 8px;flex-shrink:0;font-size:9px;line-height:1.4;max-height:34px;overflow:auto}
 .at-table .hint-panel{display:none}
 .modal{max-height:calc(100svh - 24px);overscroll-behavior:contain}.modal-heading h2{font-size:26px}.modal .icon-button{min-height:44px;min-width:44px}
 .setting-row{min-height:64px}.setting-row input{height:44px;min-width:44px}
 .mobile-menu-actions .secondary{min-height:48px}
 .primary,.secondary,.segmented button{min-height:44px}
 .form-grid input,.form-grid select,.profile-form input,.profile-form select,.speech-selectors select{min-height:44px}
 input[type="range"]{min-height:44px}
 .rival-picker label{min-height:48px}
 .reward-tile .text-button{min-height:44px;font-size:11px;line-height:1.5;padding:7px 0}
}

@media(max-width:700px) and (max-height:680px){
 .at-table .game-table .opponent-seat{top:8px}.at-table .game-table .avatar{width:42px;height:42px}
 .at-table .game-table .seat-info h1{font-size:22px}.at-table .game-table .seat-info h1 small{font-size:10px}.at-table .game-table .seat-info>span{font-size:8px;margin-top:3px}
 .at-table .game-table .opponent-score{font-size:26px}.at-table .game-table .speech-bubble{display:none}
 .at-table .game-table .opponent-hand{top:90px}.at-table .game-table .hidden-card{width:26px;height:38px}
 .at-table .game-table .played-cards{top:32%;height:100px;width:148px;left:55%;gap:9px}
 .at-table .game-table .played-card{width:clamp(42px,14vw,49px)}.at-table .game-table .played-card>span{display:none}
 .at-table .game-table .turn-status{top:60px;bottom:auto;max-width:88%;min-height:23px;font-size:10px;padding:4px 8px;border-radius:8px}
 .at-table .game-table .turn-status:has(.trick-reason){top:55px;padding:3px 8px;row-gap:0}.at-table .game-table .trick-reason{font-size:7px}
 .at-table .game-table .deck-area{transform:scale(.7);left:3%;top:35%}
 .at-table .game-table .captured-human{bottom:85px}.at-table .game-table .captured-opponent{top:30%}
 .at-table .game-table .capture-count span{display:none}
}

@media(orientation:landscape) and (max-height:500px){
 .at-table .game-header{height:52px!important;padding:4px 12px!important}
 .at-table .game-layout{height:calc(100vh - 52px);height:calc(100svh - 52px);padding:3px 8px max(3px,env(safe-area-inset-bottom,0px));gap:4px}
 .at-table .table-topline{height:16px;min-height:16px}
 .at-table .game-layout .game-table{min-height:140px;border-radius:28px;--hand-card-w:clamp(47px,calc((100svh - 170px)*.34),74px);--hand-bottom:29px}
 .at-table .game-layout .game-table:before{inset:6px;border-radius:17px}
 .at-table .game-table .opponent-seat{top:6px;left:22%;width:32%;gap:7px}.at-table .game-table .avatar{width:38px;height:38px}
 .at-table .game-table .seat-info h1{font-size:21px}.at-table .game-table .seat-info h1 small{font-size:10px}.at-table .game-table .seat-info>span{font-size:8px;margin-top:3px}.at-table .game-table .opponent-score{font-size:25px;padding-left:4px}
 .at-table .game-table .speech-bubble{top:55px;left:23%;width:32%;font-size:9px;max-height:24px}
 .at-table .game-table .opponent-hand{top:89px;left:22%}.at-table .game-table .hidden-card{width:25px;height:36px}
 .at-table .game-table .human-hand{left:74%;gap:6px}
 .at-table .game-table .human-seat{left:74%;bottom:1px;width:29%;gap:4px}.at-table .game-table .you-avatar{width:23px;height:23px;font-size:14px}.at-table .game-table .you-label>span:last-child{font-size:12px}.at-table .game-table .you-label small{display:none}.at-table .game-table .human-score{font-size:23px}.at-table .game-table .human-score small{font-size:6px}
 .at-table .game-table .played-cards{left:44%;top:33%;width:140px;height:111px;max-width:25%;gap:8px}.at-table .game-table .played-card{width:clamp(42px,calc((100svh - 170px)*.26),57px)}.at-table .game-table .played-card>span{display:none}
 .at-table .game-table .turn-status{top:8px;bottom:auto;left:74%;max-width:36%;font-size:10px;padding:4px 8px}.at-table .game-table .trick-reason{font-size:7px}
 .at-table .game-table .deck-area{left:3%;top:51%;transform:scale(.6)}
 .at-table .game-table .captured-pile{right:4px;width:29px}.at-table .game-table .capture-stack{width:21px;height:33px}.at-table .game-table .capture-owner{font-size:5px}.at-table .game-table .capture-count{font-size:7px}.at-table .game-table .capture-count span{display:none}.at-table .game-table .captured-opponent{top:6px}.at-table .game-table .captured-human{bottom:7px}
 .at-table .table-bottomline,.at-table .table-tools .text-button{min-height:44px}.at-table .table-tools{grid-template-columns:1fr 1fr;max-width:480px;margin:0 auto}
}
@media(orientation:landscape) and (max-height:360px){
 .at-table .game-table .speech-bubble{display:none}.at-table .game-table .opponent-seat{top:3px}.at-table .game-table .avatar{width:30px;height:30px}.at-table .game-table .seat-info h1{font-size:18px}.at-table .game-table .seat-info h1 small{font-size:8px}.at-table .game-table .seat-info>span{font-size:7px}.at-table .game-table .opponent-score{font-size:22px}
 .at-table .game-table .opponent-hand{top:58px}.at-table .game-table .hidden-card{width:20px;height:29px}.at-table .game-table .played-cards{top:33%;height:92px;width:120px}.at-table .game-table .played-card{width:42px}.at-table .game-table .turn-status{font-size:9px;top:5px}.at-table .game-table .deck-area{transform:scale(.48);top:48%}.at-table .game-table .captured-pile{width:24px}.at-table .game-table .capture-owner{display:none}
}
