/* Full-width landscape layout. Game state and card coordinates stay in the DOM. */
@media (orientation:landscape) and (min-width:600px){
 html body main{max-width:1200px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 148px;grid-template-rows:52px minmax(0,1fr) auto; padding:env(safe-area-inset-top) max(8px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px,env(safe-area-inset-left))!important}
 html body main>.score{grid-column:1/-1;height:52px!important;min-height:52px!important;padding:3px 12px!important}
 html body main>.table{grid-column:1;grid-row:2;min-height:0!important;width:100%;height:100%;border-radius:0 0 0 12px}
 html body main #actions{grid-column:2;grid-row:2;display:flex;flex-direction:column;justify-content:center;gap:6px!important;overflow-y:auto;min-height:0!important;padding:8px!important;border-top:0;border-left:1px solid #a18b53}
 html body main #actions>button{flex:0 0 auto;min-height:44px!important;margin:0!important;padding:8px!important;font-size:16px!important;border:1px solid #b09b5b99;border-radius:8px}
 html body main #callReminder{grid-column:1/-1;grid-row:3;margin:0;padding:4px 10px!important}
 html body main #callReminder strong{font-size:20px!important}
 html body main #callReminder span{display:none}
 html body main>.game-audio-controls{display:flex!important;position:absolute;right:max(18px,env(safe-area-inset-right));top:calc(8px + env(safe-area-inset-top));z-index:25;padding:0;gap:4px;transform:translateX(-50px)}
 html body main>.game-audio-controls button{font-size:10px;min-height:30px;padding:4px 6px}
 html body main>.score{padding-right:235px!important}
 html body main>footer,html body main>.history{display:none!important}
 html body main .table>.cards{left:4%;right:auto;width:40%;bottom:15px!important;height:65%;padding:0;justify-content:center}
 html body main .cards .card{width:clamp(65px,calc((var(--app-height,100vh) - 95px)*.33),140px)!important;max-width:none;margin:0 -8px!important}
 html body main .table>.tricks{left:48%;top:29%!important;width:45%;height:57%!important;gap:5%;justify-content:center}
 html body main .trick{width:27%;height:100%}
 html body main .trick .card{width:100%;max-width:calc((var(--app-height,100vh) - 100px)*.23)!important}
 html body main .table>.opponent{top:8px!important;right:12px!important;width:190px!important}
 html body main .opponent .avatar{width:42px!important;min-width:42px!important;height:42px!important}
 html body main .table>.opcards{left:47%!important;right:auto!important;top:9px!important;height:35px!important}
 html body main .table>#turnClock{left:12px!important;top:8px!important;width:108px!important}
 html body main .table>.player-avatar{left:10px;bottom:9px;width:40px!important;height:40px!important}
 html body main .table>.playerlabel{left:12px;right:auto;bottom:58px!important;font-size:11px}
 html body main .holding-hand,html body main .deck-stack,html body main .op-mark{display:none!important}
 html body main .table>.message{top:64px!important;left:5%!important;right:auto!important;width:37%;max-width:37%;font-size:11px!important}
 html body #lobby#lobby{max-width:1200px!important;display:grid;grid-template-columns:minmax(170px,.9fr) minmax(210px,1.1fr) minmax(210px,1fr);grid-template-rows:auto auto auto auto;gap:10px 20px;align-content:start;align-items:start;padding:12px max(18px,env(safe-area-inset-right)) 16px max(18px,env(safe-area-inset-left))!important}
 html body #lobby#lobby[hidden]{display:none!important}
 html body #lobby#lobby .lobby-header{grid-column:1/-1;position:relative;width:100%;margin:0!important}
 html body #lobby#lobby .lobby-brand{grid-column:1;grid-row:2/4;margin:18px 0 0!important;align-self:center}
 html body #lobby#lobby .lobby-cards{grid-column:1;grid-row:4;margin:0!important;height:50px!important}
 html body #lobby#lobby .lobby-cards img{height:48px!important}
 html body #lobby#lobby>.menu-section-title{grid-column:2;grid-row:2;margin:0!important}
 html body #lobby#lobby .lobby-menu{grid-column:2;grid-row:3/5;margin:0!important;width:100%!important;max-width:none!important}
 html body #lobby#lobby .lobby-menu button{min-height:46px!important;margin-bottom:8px!important;padding:10px!important;font-size:16px!important}
 html body #lobby#lobby .lobby-account{grid-column:3;grid-row:2/5;margin:0!important;width:100%!important;max-width:none!important}
 html body #lobby#lobby .account-access{grid-column:2/4;grid-row:5;margin:0!important;width:100%!important;max-width:none!important}
 html body #lobby#lobby .install-app-entry{grid-column:1;grid-row:5;margin:0!important}
 html body #lobby#lobby .menu-audio-controls{grid-column:1/-1;margin:0!important;justify-content:center}
 html body #lobby#lobby>footer{grid-column:1/-1;margin:0!important}
 html body #lobby#lobby #homeMatchReward{grid-column:1/-1}
 html body dialog{max-height:calc(var(--app-height,100vh) - 20px)!important}
 html body #envidoMenu{bottom:10px!important;max-width:520px}
 html body #envidoChoices{display:grid;grid-template-columns:1fr 1fr;gap:6px}
 html body #envidoChoices button{min-height:44px;padding:6px;font-size:18px}
}
@media (orientation:landscape) and (min-width:600px) and (max-height:360px){
 html body main{grid-template-rows:44px minmax(0,1fr) auto}
 html body main>.score{height:44px!important;min-height:44px!important}
 html body main #actions{gap:4px!important;padding:4px!important}
 html body main #actions>button{min-height:40px!important;padding:5px!important;font-size:14px!important}
 html body main .table>.message{top:50px!important}
}
@media (orientation:landscape) and (min-width:600px){
 html body main{position:relative}
 html body main>.table-stake{position:absolute!important;z-index:20;left:140px;top:calc(60px + env(safe-area-inset-top));width:125px;min-height:0!important;padding:3px 6px!important;pointer-events:none}
 html body main>.table-stake .stake-side strong{font-size:12px!important}
 html body main>.table-stake .stake-pot{font-size:9px!important}
 html body #lobby#lobby :is(#activeSearchStatus,#lobbyMatchActions,.house-resume,.house-home-reward){grid-column:2/4;width:100%;max-width:none}
}
/* Preserve the scene's aspect ratio in every orientation. Never stretch a photo. */
html body main .table{background-size:cover!important;background-position:center 45%!important}
html body #lobby#lobby#lobby{background-size:cover,cover!important}
@media (orientation:landscape) and (min-width:600px){
 html body main .table{border-radius:24px;background-position:center 48%!important}
 html body main .table::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;border:7px solid #78502e;border-radius:24px;box-shadow:inset 0 0 0 2px #d7af6b88,inset 0 0 24px #00150cd9,0 0 0 1px #362417}
 html body main .table>.cards{left:0!important;right:0!important;width:100%!important;bottom:12px!important;height:44%!important;padding:0 65px;justify-content:center;gap:0}
 html body main .cards .card{width:clamp(58px,calc((var(--app-height,100vh) - 70px)*.24),125px)!important;margin:0 -7px!important}
 html body main .table>.tricks{left:29%!important;right:auto;width:42%!important;top:22%!important;height:34%!important;gap:9%;justify-content:flex-start}
 html body main .trick{width:23%;height:92%}
 html body main .trick .card{width:100%;max-width:none!important;aspect-ratio:207/319}
 html body main .table>.opcards{left:50%!important;right:auto!important;transform:translateX(-50%);top:12px!important;height:28px!important}
 html body main .table>.opponent{right:14px!important;width:180px!important}
 html body main .table>.message{left:3%!important;right:auto!important;top:30%!important;width:23%!important;max-width:23%!important;font-size:10px!important}
 html body main .table>.playerlabel{left:14px!important;bottom:65px!important}
 html body main .table>.player-avatar{left:14px!important;bottom:15px!important}
 html body main>.table-stake{left:50%;transform:translateX(-50%);top:calc(54px + env(safe-area-inset-top));width:125px}
}
