/* Keep the actual playing surface inside the visible viewport. Setup remains a normal page. */
html.hearts-screen-locked{height:100%;overflow:hidden;overscroll-behavior:none}body.hearts-playing{position:fixed;inset:0;width:100%;height:var(--game-height,100dvh);min-height:0;overflow:hidden;overscroll-behavior:none;padding:0;touch-action:manipulation}.hearts-playing *, .hearts-playing *:before,.hearts-playing *:after{box-sizing:border-box}.hearts-playing .shell{width:100%;max-width:1600px;height:100%;min-height:0;margin:auto;padding:max(4px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:6px}.hearts-playing .topbar{min-height:38px;height:38px;flex:none;gap:8px}.hearts-playing .brand{font-size:17px;gap:7px}.hearts-playing .brand-icon{font-size:27px}.hearts-playing .brand small{font-size:8px;letter-spacing:2px}.hearts-playing .topbar .text-button{font-size:12px;padding:6px}.hearts-playing .topbar .pill,.hearts-playing .game-header,.hearts-playing .rotate-hint,.hearts-playing .net-foot{display:none}.hearts-playing .game-layout{flex:1;display:flex;flex-direction:column;gap:5px;min-height:0;margin:0}.hearts-playing .game-layout>section{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(130px,1fr) clamp(155px,29vh,220px) auto;gap:6px;min-height:0;flex:1}.hearts-playing .hearts-stage{grid-column:1;grid-row:1;min-height:0;height:100%;grid-template-rows:clamp(58px,11vh,95px) minmax(0,1fr);gap:6px;padding:7px;border-radius:20px;border-width:3px}.hearts-playing .hearts-stage .seat,.hearts-playing .hearts-stage .seat.top,.hearts-playing .hearts-stage .seat.left,.hearts-playing .hearts-stage .seat.right{height:100%;min-height:0;padding:2px;gap:0}.hearts-playing .hearts-stage .tonk-person,.hearts-playing .hearts-stage .spades-face{height:clamp(30px,6vh,56px);width:64px;flex-shrink:1}.hearts-playing .hearts-stage .seat strong{font-size:12px;line-height:14px;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.hearts-playing .hearts-stage .seat small,.hearts-playing .hearts-stage .card-count{font-size:9px;line-height:11px;margin:0}.hearts-playing .hearts-stage .seat.current:after{font-size:6px;padding:1px 3px;top:2px;right:2px}.hearts-playing .hearts-stage .table-center{padding:4px;min-height:0;overflow:hidden;border-radius:12px}.hearts-playing .hearts-stage .trick-cards{min-height:0;gap:8px}.hearts-playing .hearts-stage .playing-card{--cw:clamp(34px,7vh,62px);padding:4px;font-size:15px}.hearts-playing .played small{font-size:10px;margin-top:3px}.hearts-playing .hearts-stage .table-center>.fine{font-size:10px;margin:0 0 5px}.hearts-playing .hand-area{grid-column:1;grid-row:2;min-height:0;height:100%;margin:0;padding:5px 8px;border-radius:12px;overflow:visible;display:flex;flex-direction:column;gap:0}.hearts-playing .hand-heading{flex:none;min-height:24px;margin:0;gap:6px;flex-wrap:nowrap}.hearts-playing .hand-heading strong,.hearts-playing .hand-heading>span{font-size:11px;letter-spacing:0}.hearts-playing .hand-heading .text-button{min-height:24px;padding:2px;font-size:10px}.hearts-playing .hand-heading .spades-face{height:24px;width:24px}.hearts-playing .hand-area>p{display:none}.hearts-playing .hand{flex:1;min-height:0;display:grid;grid-template-columns:repeat(var(--hearts-columns,7),var(--hearts-card-size,40px));grid-auto-rows:min-content;align-content:center;justify-content:center;gap:5px 4px;margin:0;padding:24px 0 0;overflow:visible;touch-action:none;user-select:none;-webkit-user-select:none}.hearts-playing .hand .playing-card{--cw:var(--hearts-card-size,40px);width:var(--cw);min-width:0;min-height:0;padding:4px;font-size:clamp(12px,2vw,17px);border-radius:6px;margin:0}.hearts-playing .hand .playing-card .pip{font-size:clamp(18px,3vw,28px)}.hearts-playing .hand .playing-card .bottom{font-size:11px}.hearts-playing .hand .playing-card.selected,.hearts-playing .hand .playing-card.selected:hover:not(:disabled){transform:translateY(-20px) scale(1.04);outline-width:3px}.hearts-playing .statusbar{grid-column:1;grid-row:3;min-height:44px;max-height:82px;margin:0;padding:6px 9px;gap:5px;display:flex;flex-wrap:nowrap;align-items:center}.hearts-playing .statusbar p{font-size:12px;line-height:1.25;flex:1;min-width:0}.hearts-playing .statusbar.your-turn p:before{font-size:8px;letter-spacing:1px;margin-bottom:2px}.hearts-playing .statusbar .actions{flex:none;width:auto;gap:5px;flex-wrap:nowrap}.hearts-playing .statusbar .button{font-size:12px;min-height:40px;min-width:44px;padding:7px 10px;flex:none}.hearts-playing .sidebar{margin:0;display:block;flex:none;min-height:0}.hearts-playing .sidebar>.sidebox:not(:first-child){display:none}.hearts-playing .sidebar>.sidebox:first-child{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:4px 8px;gap:8px;border-radius:9px;margin:0}.hearts-playing .sidebar .sidebox>h2,.hearts-playing .sidebar .sidebox>.fine,.hearts-playing .sidebar .rules-link{display:none}.hearts-playing .score-row{padding:0;border:0;display:flex;justify-content:space-between;align-items:center;gap:3px;font-size:11px;min-width:0}.hearts-playing .score-row span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hearts-playing .score-row b{font-size:17px}.hearts-playing .shot-clock{flex:none;height:31px;margin:0;padding:3px 8px;position:relative;border-radius:8px}.hearts-playing .shot-clock-top strong{font-size:11px}.hearts-playing .shot-clock-top span{font-size:17px;line-height:20px}.hearts-playing .shot-clock-track{height:3px;margin:0}.hearts-playing .shot-clock p{display:none}.hearts-playing .hearts-table-menu{position:absolute;z-index:100;top:max(5px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));padding:0;margin:0;border:0;background:#1b2940;border-radius:8px}.hearts-playing .hearts-table-menu summary{font-size:11px;padding:10px}.hearts-playing .hearts-table-menu[open]{width:min(400px,calc(100% - 16px));box-shadow:0 12px 35px #000b;border:1px solid #af94bf}.hearts-playing .hearts-table-menu .net-invite{padding:12px;margin:0;gap:8px;border:0}.hearts-playing:has(.hearts-table-menu) .topbar>.text-button{margin-right:145px}.hearts-playing .net-edit-panel{position:fixed;z-index:110;inset:45px 8px 8px;max-width:650px;margin:auto;background:#172235;border:2px solid #c5a1dc;border-radius:12px;overflow:auto;padding:10px;overscroll-behavior:contain}.hearts-playing .hearts-finale{padding:5px;max-width:420px}.hearts-playing .hearts-finale h2{font-size:20px;margin:3px}.hearts-playing .hearts-crown{font-size:28px}.hearts-playing .hearts-finale>p{font-size:10px;margin:3px}.hearts-playing .hearts-standings{margin:5px 0}.hearts-playing .hearts-standings li{padding:3px 9px;font-size:11px}.hearts-playing .hearts-final-label{font-size:9px}.hearts-playing .hearts-finale .fine{display:none}@media(orientation:landscape) and (max-height:600px){.hearts-playing .shell{gap:3px}.hearts-playing .topbar{height:32px;min-height:32px}.hearts-playing .brand small{display:none}.hearts-playing .game-layout>section{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:7px}.hearts-playing .hearts-stage{grid-column:1;grid-row:1/3;grid-template-rows:56px minmax(0,1fr);padding:4px;gap:4px}.hearts-playing .hand-area{grid-column:2;grid-row:1}.hearts-playing .statusbar{grid-column:2;grid-row:2;max-height:64px}.hearts-playing .hearts-stage .tonk-person,.hearts-playing .hearts-stage .spades-face{height:30px;width:43px}.hearts-playing .hearts-stage .seat small{font-size:8px}.hearts-playing .hearts-stage .playing-card{--cw:clamp(30px,12vh,55px)}.hearts-playing .shot-clock{height:26px}.hearts-playing .shot-clock-top span{font-size:14px;line-height:17px}.hearts-playing .hearts-stage .table-center>.fine{font-size:9px}.hearts-playing .hearts-finale .hearts-crown,.hearts-playing .hearts-finale>p{display:none}.hearts-playing .hearts-finale h2{font-size:16px}.hearts-playing .hearts-standings li{font-size:10px;padding:1px 6px}.hearts-playing .hearts-table-menu summary{padding:8px}.hearts-playing .score-row b{font-size:14px}}

.hearts-playing .statusbar{flex-wrap:wrap;max-height:94px}.hearts-playing .statusbar p{flex-basis:100%}.hearts-playing .statusbar .actions{width:100%;justify-content:stretch}.hearts-playing .statusbar .button{flex:1;font-size:11px;padding:6px}.hearts-playing .hearts-table-menu summary{min-width:140px}@media(orientation:landscape) and (max-height:600px){.hearts-playing .statusbar{max-height:85px}.hearts-playing .statusbar p{font-size:11px}.hearts-playing .statusbar .button{min-height:36px}}

.hearts-playing .topbar>.text-button,.hearts-playing .top-actions>button,.hearts-playing #hr-analytics-settings{display:none}.hearts-playing .top-actions{gap:8px}.hearts-playing .hr-settings{position:relative;inset:auto;margin:0;z-index:120;padding:0}.hearts-playing .hr-settings>summary{font-size:11px;padding:8px}.hearts-playing .hr-settings>div{position:absolute;right:0;top:100%;width:min(290px,80vw);background:#172235;border:1px solid #9e7daa;border-radius:12px;padding:12px}.hearts-playing .hearts-table-menu .hr-settings{flex-basis:100%}.hearts-playing .hearts-table-menu .hr-settings>div{position:relative;width:100%}@media(max-width:420px){.hearts-playing .brand{font-size:14px}.hearts-playing .brand small{display:none}.hearts-playing .top-actions .text-button{font-size:10px}}
.hearts-playing .shell>.fine{display:none}.hearts-playing .spades-me .spades-face .net-cartoon{width:100%;height:100%}

.playing-card.classic-card{padding:0!important;overflow:hidden;background:#fffdf6}.classic-card>.deck-face{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;border-radius:inherit;pointer-events:none;user-select:none;-webkit-user-drag:none}.classic-card>span{visibility:hidden}
/* The same seat/table/hand order in every orientation; only spacing changes. */
@media(orientation:landscape) and (max-height:600px){.hearts-playing .game-layout>section{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(90px,1fr) clamp(88px,27vh,130px) auto;gap:3px}.hearts-playing .hearts-stage{grid-column:1;grid-row:1;grid-template-rows:40px minmax(0,1fr);gap:2px;padding:3px}.hearts-playing .hand-area{grid-column:1;grid-row:2;padding:2px 6px}.hearts-playing .statusbar{grid-column:1;grid-row:3;flex-wrap:nowrap;max-height:50px;min-height:38px;padding:3px 6px}.hearts-playing .statusbar p{flex-basis:auto;font-size:10px}.hearts-playing .statusbar .actions{width:auto}.hearts-playing .statusbar .button{font-size:10px;min-height:34px;padding:4px 7px}.hearts-playing .statusbar.your-turn p:before{display:none}.hearts-playing .hand-heading{min-height:16px;height:16px}.hearts-playing .hand-heading strong,.hearts-playing .hand-heading>span{font-size:10px}.hearts-playing .hand-heading .spades-face{width:16px;height:16px}.hearts-playing .hand-heading .text-button{font-size:9px;min-height:16px}.hearts-playing .hand{padding-top:16px}.hearts-playing .hearts-stage .tonk-person,.hearts-playing .hearts-stage .spades-face{height:22px;width:32px}.hearts-playing .hearts-stage .card-count{display:none}.hearts-playing .hearts-stage .seat strong{font-size:10px;line-height:11px}.hearts-playing .hearts-stage .seat small{font-size:8px;line-height:9px}.hearts-playing .hearts-stage .table-center>.fine{display:none}.hearts-playing .hearts-stage .playing-card{--cw:clamp(26px,10vh,40px)}.hearts-playing .played small{font-size:8px;margin:0}.hearts-playing .shot-clock{height:21px;padding:1px 6px}.hearts-playing .topbar{height:28px;min-height:28px}.hearts-playing .sidebar>.sidebox:first-child{padding:1px 6px}.hearts-playing .shell{gap:3px}.hearts-playing .hand .playing-card.selected{transform:translateY(-14px) scale(1.04)}}

.classic-card>span:first-of-type,.classic-card>span.bottom{visibility:visible;position:absolute;z-index:1;width:12px;overflow-wrap:anywhere;word-break:break-all;font-family:Georgia,serif;font-size:12px!important;line-height:11px;text-align:center;background:#fffdf6;letter-spacing:-.5px}.classic-card>span:first-of-type{top:3px;left:2px}.classic-card>span.bottom{bottom:3px;right:2px;transform:rotate(180deg)}.hearts-playing .hand .classic-card:disabled{filter:none;opacity:1}.hearts-playing .classic-card.red-card:disabled{color:#b51f32}@media(max-width:480px) and (orientation:portrait){.hearts-playing .game-layout>section{grid-template-rows:minmax(140px,1fr) clamp(175px,28vh,230px) auto}.hearts-playing .hearts-stage .seat strong{font-size:11px}.hearts-playing .hearts-stage .table-center{padding:4px}.hearts-playing .hearts-stage .trick-cards{gap:5px}.hearts-playing .hearts-stage .playing-card{--cw:clamp(40px,11vw,53px)}}
