:root{font-family:'Trebuchet MS',Arial,sans-serif;color:#183554;background:#e7eff5;font-synthesis:none;--ink:#183554;--blue:#1846a4;--paper:#fff;--orange:#ce4f28;--green:#236d39;--line:#8399ad}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input{font:inherit}button{min-height:44px;min-width:44px;padding:10px 18px;border:2px solid var(--ink);border-radius:7px;background:#fff;color:var(--ink);font-weight:700;cursor:pointer;transition:background .15s,transform .15s}button:hover:not(:disabled){background:#f4d8cb}button:active:not(:disabled){transform:translateY(2px)}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible{outline:3px solid #143c92;outline-offset:4px}button.primary{background:var(--blue);border-color:var(--blue);color:white;box-shadow:0 4px 0 #10306e}button.primary:hover:not(:disabled){background:#10377f}.quiet{border-color:transparent;background:transparent}.icon{padding:5px 10px;font-size:24px;background:transparent;border-color:transparent}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}header{height:94px;padding:14px clamp(18px,4vw,66px);display:flex;align-items:center;justify-content:space-between;gap:16px;position:relative;z-index:10}.wordmark{font-family:'Arial Black',Impact,sans-serif;font-size:35px;letter-spacing:-2px;line-height:1;border:0;background:none;padding:0;color:var(--blue);text-shadow:0 3px 0 #a4bfd1;text-align:left}.wordmark span{font-family:'Trebuchet MS',Arial,sans-serif;display:block;font-size:11px;letter-spacing:.3px;font-weight:700;text-shadow:none;margin:8px 0 0 3px;color:var(--ink)}header nav{display:flex;align-items:center;gap:9px}#languages{display:flex;gap:5px}.flag{width:49px;padding:8px 6px;border-color:transparent;background:transparent;line-height:0}.flag svg{width:31px;height:22px;box-shadow:0 1px 2px #18355450}.flag.active{border-color:var(--blue);background:#fff}.menu{position:relative;max-width:1440px;margin:auto;min-height:calc(100dvh - 94px);display:grid;grid-template-columns:minmax(320px,.9fr) minmax(300px,1.2fr);align-items:center;padding:30px clamp(24px,5vw,80px) 80px;gap:20px}.welcome{max-width:430px;z-index:2}.small-title{font-weight:700;color:#315779;margin:0 0 18px}.welcome h1{font-family:'Arial Black','Trebuchet MS',sans-serif;font-size:clamp(34px,3.8vw,58px);letter-spacing:-2px;line-height:1.05;margin:0 0 23px;color:var(--blue)}.intro-copy{font-size:clamp(17px,1.5vw,21px);line-height:1.5;max-width:420px;margin:0 0 18px}.facts{display:flex;gap:25px;font-weight:700;font-size:14px;margin:0 0 26px}.facts span+span{position:relative}.facts span+span:before{content:'·';position:absolute;left:-15px}form label{display:block;font-weight:700;margin-bottom:8px}input{height:48px;border:2px solid #657f96;border-radius:6px;padding:9px 13px;color:var(--ink);background:white;min-width:0}#createForm{display:grid;grid-template-columns:1fr 1fr;gap:12px}#createForm label,#createForm input,#createButton{grid-column:1/-1}#practiceButton{grid-column:1/-1;background:#dce6ee}#joinForm{display:flex;gap:10px;margin-top:20px;padding-top:20px;border-top:1px solid #95aabd}#roomCode{width:0;flex:1;text-transform:uppercase;font-weight:700;letter-spacing:1px}#entryStatus{min-height:20px;font-size:14px}.menu-art{position:relative;height:min(680px,70dvh);min-height:440px;align-self:center}.demo-table{position:absolute;inset:0}.demo-note{position:absolute;bottom:20px;right:12px;line-height:1.8;font-size:13px;font-weight:700;transform:rotate(-6deg);color:#315779;padding:15px 22px;border-left:2px solid #d06741}.menu-credit{position:absolute;bottom:18px;left:clamp(24px,5vw,80px);font-size:11px;color:#3e5c76;max-width:90%;line-height:1.4}canvas{display:block;width:100%;height:100%;touch-action:none}#table{position:absolute;inset:0;touch-action:none}#table canvas{position:absolute;inset:0}.game-shell{height:calc(100dvh - 94px);min-height:540px;display:grid;grid-template-rows:32px 73px minmax(200px,1fr) 236px;padding:0 clamp(12px,3vw,46px) 0;position:relative}#roomBar{display:flex;align-items:center;gap:12px;font-size:12px;position:absolute;top:-13px;left:clamp(20px,4vw,66px);z-index:11;height:32px}.room-code{border:0;background:transparent;padding:0;min-height:30px;font-size:12px;letter-spacing:1px}.room-code span{font-size:17px;margin-left:6px}.connection{display:flex;align-items:center;gap:5px;font-size:11px}.connection:before{content:'';width:7px;height:7px;display:block;background:#a54b1c;border-radius:50%}.connection.connected:before{background:#236d39}#historyButton{min-height:30px;padding:3px 7px;font-size:11px;font-weight:400}#players{grid-row:2;display:flex;align-items:start;justify-content:center;gap:clamp(10px,3vw,50px);position:relative;z-index:2}.player{display:flex;align-items:center;gap:10px;position:relative;padding:6px 10px 10px;border-bottom:3px solid transparent;max-width:240px;min-width:0}.player.current{border-bottom-color:var(--orange)}.player.self .avatar{background:#1846a4;color:#fff}.avatar{display:grid;place-items:center;font-size:20px;font-weight:900;width:42px;height:44px;background:#cfdae4;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);flex-shrink:0}.player strong{display:block;font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:135px}.player small{font-weight:400;font-size:10px}.player div>span{display:block;font-size:12px;margin-top:3px}.player b{font-size:15px;margin-left:3px}.player em{font-size:10px;position:absolute;right:0;top:-12px;font-style:normal;font-weight:900;color:var(--orange)}.remove-bot{font-size:22px;border:0;background:transparent;padding:0}#boardWrap{grid-row:3;position:relative;isolation:isolate;min-height:0;background:#d5e5f1;border-radius:28px;box-shadow:inset 0 0 0 1px #b7cddd}#turnBanner{position:absolute;left:50%;top:13px;transform:translateX(-50%);text-align:center;pointer-events:none;max-width:80%;color:#244466;font-size:13px;background:#e7eff5e8;padding:8px 18px;border-radius:7px}#turnBanner:empty{display:none}#turnBanner strong{display:block;font-size:16px;color:var(--blue)}#turnBanner span{display:block;margin-top:3px}.camera-controls{position:absolute;right:14px;bottom:14px;display:flex;gap:6px;z-index:6}.camera-controls button{padding:3px 8px;font-size:22px;background:#f6f9fc;box-shadow:0 2px 0 #8aa4b9}.camera-controls #fit{font-size:25px}#handArea{grid-row:4;position:relative;padding:9px 18px 0;min-width:0}.hand-title{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px;font-size:14px}.hand-title strong>span{font-weight:400;margin-left:7px}.hand-actions{display:flex;align-items:center;gap:8px;min-width:0}.hand-actions button{min-height:38px;padding:5px 10px;font-size:12px}.draw-button{display:flex;align-items:center;gap:7px;background:#fff}.draw-button img{height:29px;width:25px;object-fit:contain}.draw-button span{font-weight:400;border-left:1px solid #6a859e;padding-left:8px}.deck-count{font-size:12px}.hand-scroll{overflow-x:auto;overflow-y:hidden;margin:0 -8px;padding:20px 8px 0;scrollbar-width:thin;scrollbar-color:#587997 transparent;overscroll-behavior-x:contain}.hand{display:flex;justify-content:center;align-items:flex-end;min-width:max-content;max-width:100%;height:137px;gap:3px;margin:0 auto}.hand-card{position:relative;flex:0 0 112px;width:112px;height:132px;min-height:0;border:0;background:transparent!important;border-radius:0;padding:0;isolation:isolate;transition:transform .2s,filter .2s;touch-action:none;filter:drop-shadow(0 4px 2px #18355430)}.hand-card img{width:100%;height:100%;object-fit:contain;pointer-events:none}.hand-card:hover:not(:disabled){transform:translateY(-8px)}.hand-card.selected{transform:translateY(-16px)!important;filter:drop-shadow(0 0 3px #144b26) drop-shadow(0 5px 3px #18355450)}.hand-card:not(.playable){opacity:.65}.hand-card:disabled{opacity:.65}.hand-card.staged{opacity:.3}.hand-card.playable:after{content:'';position:absolute;left:45%;bottom:3px;width:10%;height:4px;background:#236d39;border-radius:2px}.card-caption{position:absolute;left:0;right:0;bottom:-17px;font-size:11px;text-align:center;opacity:0;pointer-events:none}.hand-card:focus-visible .card-caption{opacity:1}.hand-card:focus-visible{outline-offset:0;border-radius:5px}.staged-tag{position:absolute;top:45%;left:45%;color:#10491b}.hand-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;height:38px;font-size:11px;color:#3e5c76}.uh-button{min-height:34px;padding:3px 14px;background:#f5d1bf;border-color:#a14529;color:#8a341c;font-size:13px;font-weight:900;letter-spacing:.5px}.uh-button.armed{background:#236d39;color:white;border-color:#236d39}.orange{color:#8a341c;border-color:#a14529;background:#ffe4d5}#spots{position:absolute;inset:0;pointer-events:none;z-index:4}.spot{position:absolute;transform:translate(-50%,-50%);width:45px;height:45px;min-width:45px;padding:0;border-radius:50%;border:2px dashed var(--green);background:#e5f2e5e6;color:#155429;font-size:24px;pointer-events:auto;box-shadow:0 2px 2px #264e2930}.spot:hover,.spot.hovered{background:#9cd2a3;transform:translate(-50%,-50%) scale(1.15)!important}.spot.chosen{opacity:.3}.spot:active{transform:translate(-50%,-50%)}#placement{position:absolute;inset:0;pointer-events:none;z-index:7}#proposalButtons{position:absolute;display:flex;align-items:center;gap:6px;transform:translateY(-50%);pointer-events:auto}.confirm{background:#236d39;color:white;border-color:#fff;width:53px;height:53px;min-height:53px;border-radius:50%;font-size:28px;padding:0;box-shadow:0 3px 0 #144723}.confirm:hover:not(:disabled){background:#155226}.cancel{border-radius:50%;background:white;width:44px;height:44px;font-size:24px;padding:0;box-shadow:0 2px 0 #95aabd}.staging-bar{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);max-width:calc(100% - 230px);display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;background:#fff;padding:8px 12px;border-radius:9px;box-shadow:0 4px 15px #18355425;pointer-events:auto;font-size:13px}.staging-bar button{padding:7px 12px;font-size:12px}.wild-options{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center}.wild-options>div{display:flex;gap:4px}.wild-options>span{font-size:11px}.wild-options .suit{font-size:24px;padding:4px 8px;border-color:transparent}.wild-options .suit:nth-child(even){color:#ae4024}.wild-options button.active,.wild-options button[aria-pressed=true]{border-color:var(--blue);background:#e7eff5}.gift-options{display:flex;align-items:center;gap:10px}.gift-options>div{display:flex;max-width:340px;overflow:auto;gap:5px;padding:3px}.gift-card{flex-shrink:0;width:51px;height:59px;min-width:51px;padding:0!important;border:2px solid transparent}.gift-card img{width:100%;height:100%;object-fit:contain}.gift-card.chosen{border-color:var(--green);background:#d3ebd3}.needs-gift .gift-options{outline:2px solid #ad3c20}.lobby.game-shell{grid-template-rows:32px 80px 1fr 0}.lobby #boardWrap{background:#d5e5f1}.lobby #table{left:30%}.lobby .camera-controls{display:none}#lobbyControls{position:absolute;top:50%;left:6%;transform:translateY(-50%);max-width:360px;background:#e7eff5;padding:25px 30px;border-radius:10px;box-shadow:0 8px 0 #aec7da}#lobbyControls h2{font-size:28px;max-width:240px;margin:0 0 12px;color:var(--blue);letter-spacing:-1px}#lobbyControls p{font-size:14px;margin:0 0 25px}.lobby-actions{display:flex;flex-direction:column;gap:10px;margin-top:12px}.lobby-actions button{width:100%}#finale{position:absolute;inset:0;pointer-events:none;z-index:8}.result{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);text-align:center;background:#f8fbfd;padding:18px 25px 22px;border-radius:12px;box-shadow:0 5px 0 #aec7da;min-width:min(420px,90%);pointer-events:auto}.result p{margin:0;font-size:12px;color:#3e5c76}.result h2{font-family:'Arial Black','Trebuchet MS',sans-serif;font-size:30px;color:var(--blue);letter-spacing:-1px;margin:5px 0}.result>span{font-size:13px}.result>div{margin-top:15px;display:flex;gap:10px;justify-content:center}.result button{font-size:12px}.replay-label{position:absolute;left:50%;top:14px;transform:translateX(-50%);background:white;padding:6px 12px;display:flex;align-items:center;gap:15px;pointer-events:auto;border-radius:8px;white-space:nowrap;font-size:12px}.replay-label button{font-size:12px;padding:5px 12px}#dragFollower{position:fixed;pointer-events:none;z-index:100;object-fit:contain;filter:drop-shadow(0 10px 7px #18355450);opacity:1}#toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);max-width:min(560px,90vw);padding:12px 20px;border-radius:7px;background:#183554;color:white;font-size:14px;box-shadow:0 5px 20px #18355425;opacity:0;pointer-events:none;transition:.2s;z-index:120;text-align:center}#toast.visible{opacity:1;transform:translate(-50%,0)}dialog{border:0;border-radius:14px;background:#f6f9fc;color:var(--ink);padding:32px clamp(20px,4vw,45px);max-width:720px;width:calc(100% - 32px);max-height:85dvh;box-shadow:0 15px 60px #102b4a60;overscroll-behavior:contain}dialog::backdrop{background:#102c4e90}.dialog-close{position:absolute;top:7px;right:7px;font-size:28px}dialog h2{font-family:'Arial Black','Trebuchet MS',sans-serif;color:var(--blue);font-size:28px;letter-spacing:-1px;margin:0 35px 20px 0}dialog h3{font-size:19px;margin-top:25px}dialog p,dialog li{font-size:15px;line-height:1.65}.lead{font-size:19px!important}.match-demo{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.match-demo figure{margin:0;text-align:center}.match-demo img{width:100%;max-width:130px}.match-demo figcaption{font-size:12px;font-weight:700;line-height:1.5}.rules-list{padding-left:20px}.rules-list li{margin:7px 0}.credits{font-size:11px!important;color:#3e5c76;margin-top:30px}.range-label{display:grid;grid-template-columns:1fr auto;margin:25px 0 8px;font-weight:700;gap:8px}.range-label input{grid-column:1/-1;width:100%;padding:0;accent-color:var(--blue);height:35px}.check{display:flex;align-items:center;gap:12px;min-height:44px}.check input{height:24px;width:24px;accent-color:var(--blue)}.history{padding-left:24px}.history li{padding:8px 0;border-bottom:1px solid #cad8e3}.invite-input{width:100%;font-size:13px}.calm *{animation-duration:.001ms!important;transition-duration:.001ms!important;scroll-behavior:auto!important}@media(min-width:1500px){.hand{height:153px}.hand-card{width:125px;height:145px;flex-basis:125px}.game-shell{grid-template-rows:32px 76px minmax(200px,1fr) 255px}}@media(max-width:1000px){header{height:82px;padding:10px 24px}.wordmark{font-size:29px}.wordmark span{font-size:10px}.menu{min-height:calc(100dvh - 82px);padding:30px 35px 60px;grid-template-columns:1fr 1fr;gap:0}.menu-art{min-height:360px;height:55dvh}.welcome h1{font-size:37px}.intro-copy{font-size:17px}.demo-note{font-size:11px;bottom:0}.game-shell{height:calc(100dvh - 82px);padding:0 16px;grid-template-rows:32px 65px minmax(180px,1fr) 224px}#players{gap:8px}.player{gap:6px;padding:3px 6px 7px}.player strong{max-width:95px;font-size:12px}.avatar{width:34px;height:38px;font-size:16px}.hand-card{width:101px;height:117px;flex-basis:101px}.hand{height:124px}.hand-scroll{padding-top:21px}.hand-footer{height:35px}.staging-bar{max-width:calc(100% - 160px);left:12px;transform:none}.wild-options{gap:5px}.wild-options>span{display:none}.staging-bar .quiet{min-height:35px}.gift-options{flex-direction:column;gap:2px}.lobby #table{left:20%}#lobbyControls{padding:20px;left:4%}.camera-controls{right:10px;bottom:10px}.camera-controls button{width:44px}.result{bottom:14px}}@media(max-width:640px){header{height:72px;padding:10px 14px;gap:5px}.wordmark{font-size:25px;letter-spacing:-1.5px}.wordmark span{display:none}header nav{gap:2px}.flag{width:44px;padding:8px 5px}.flag svg{width:28px;height:20px}#helpButton{font-size:0;padding:3px;width:44px}#helpButton:after{content:'?';font-size:22px;display:block}#settingsButton{font-size:22px}.menu{min-height:calc(100dvh - 72px);display:flex;flex-direction:column;padding:10px 24px 45px;gap:0;align-items:stretch}.welcome{max-width:100%;display:contents}.small-title{font-size:12px;margin:5px 0 9px}.welcome h1{font-size:clamp(30px,8vw,40px);letter-spacing:-1px;margin-bottom:13px;max-width:390px}.intro-copy{font-size:15px;line-height:1.5;margin-bottom:12px}.facts{font-size:12px;margin:0 0 15px;gap:24px}.menu-art{order:2;height:250px;min-height:0;margin-top:6px}.demo-note{bottom:0;font-size:10px;right:0;padding:8px 12px}.menu-credit{position:static;order:3;max-width:100%;font-size:10px;margin:14px 0 0;line-height:1.5}#createForm{gap:9px;grid-template-columns:1fr 1fr}#createForm label{font-size:13px;margin-bottom:0}#createForm input{height:46px}#createButton{grid-column:1}#practiceButton{grid-column:2;font-size:12px}#createButton{font-size:12px}#joinForm{margin-top:13px;padding-top:13px;gap:8px}#joinForm button{font-size:12px}#entryStatus{margin:6px 0 0;min-height:0;font-size:12px}.game-shell{height:calc(100dvh - 72px);min-height:470px;padding:0 8px;grid-template-rows:25px 58px minmax(160px,1fr) 209px}#roomBar{left:15px;top:-8px;font-size:10px;gap:7px}.room-code{font-size:10px}.connection{font-size:10px}#historyButton{font-size:10px;padding:3px 4px}#players{gap:4px;justify-content:space-around}.player{gap:4px;padding:4px 1px 5px;flex-direction:column;align-items:center;text-align:center;min-width:45px}.avatar{width:25px;height:27px;font-size:13px}.player strong{font-size:10px;max-width:64px;line-height:1.2}.player small{display:none}.player div>span{font-size:9px;margin-top:1px}.player b{font-size:11px}.player em{font-size:8px;top:0;right:-8px}.player.self{display:none}.lobby .player.self{display:flex}#boardWrap{border-radius:18px}#turnBanner{top:8px;font-size:10px;padding:6px 9px;max-width:85%;width:max-content}#turnBanner strong{font-size:13px}#turnBanner span{max-width:260px}.camera-controls{gap:5px;right:8px;bottom:8px}.camera-controls button{width:44px;height:44px;min-height:44px;padding:4px;font-size:20px}.camera-controls #fit{font-size:22px}#handArea{padding:5px 5px 0}.hand-title{min-height:42px;font-size:12px}.hand-actions{gap:5px}.hand-actions button{min-height:40px;font-size:10px;padding:5px 8px}.hand-title strong{white-space:nowrap}.hand-title strong>span{margin-left:3px}.draw-button img{display:none}.deck-count{font-size:10px}.hand-scroll{margin:0 -5px;padding:18px 6px 0;scroll-padding-inline:5px}.hand{height:115px;justify-content:flex-start;gap:2px;margin:auto;width:max-content}.hand-card{flex-basis:97px;width:97px;height:112px}.hand-footer{font-size:10px;height:30px;padding:0 2px}.uh-button{font-size:12px;min-height:32px;padding:4px 14px}.staging-bar{bottom:61px;left:7px;max-width:calc(100% - 14px);gap:6px;padding:6px 8px;font-size:11px;max-height:165px;overflow-y:auto}.staging-bar button{font-size:11px;padding:5px 9px;min-height:40px}.wild-options strong{font-size:11px}.wild-options .suit{font-size:21px;width:40px;min-width:40px}.wild-options>div{gap:3px}.wild-options>strong{width:100%;text-align:center}.gift-options>div{max-width:290px}.gift-card{width:45px;height:52px;min-width:45px}.confirm{width:49px;height:49px;min-height:49px}.cancel{width:44px;height:44px}.lobby.game-shell{grid-template-rows:25px 75px minmax(300px,1fr) 0}.lobby #table{left:0;bottom:40%}#lobbyControls{left:50%;top:auto;bottom:25px;transform:translateX(-50%);max-width:none;width:calc(100% - 40px);text-align:center;padding:17px 18px}#lobbyControls h2{font-size:23px;max-width:none;margin:0 0 7px}#lobbyControls p{font-size:12px;margin-bottom:13px}.lobby-actions{flex-direction:row;margin-top:9px}.lobby-actions button{font-size:12px;padding:8px}.remove-bot{position:absolute;right:-18px;top:0;width:44px;font-size:20px}.result{padding:14px 15px;bottom:65px;width:calc(100% - 28px);min-width:0}.result h2{font-size:24px}.result>div{gap:7px;flex-wrap:wrap}.result button{font-size:11px;padding:7px 12px}.replay-label{font-size:10px;gap:8px;width:max-content;max-width:95%}.replay-label strong{white-space:normal}dialog{padding:28px 20px;max-height:88dvh;width:calc(100% - 20px)}dialog h2{font-size:24px}dialog p,dialog li{font-size:14px}.match-demo figcaption{font-size:10px}.match-demo{gap:5px}.match-demo img{max-width:100px}#toast{font-size:12px;bottom:15px;padding:11px 15px}}@media(max-height:650px) and (min-width:641px){header{height:65px}.wordmark{font-size:26px}.wordmark span{display:none}.game-shell{height:calc(100dvh - 65px);min-height:400px;grid-template-rows:25px 50px minmax(120px,1fr) 177px}.hand{height:92px}.hand-card{height:90px;width:78px;flex-basis:78px}.hand-scroll{padding-top:10px}.hand-title{min-height:36px}.player .avatar{width:30px;height:33px}.player strong{font-size:11px}.player div>span{font-size:10px}.hand-footer{height:29px}.menu{min-height:calc(100dvh - 65px);padding-top:15px}.menu-art{height:400px;min-height:300px}.welcome h1{font-size:35px}.intro-copy{font-size:16px}.facts{margin-bottom:14px}}

/* A tall play area keeps growing towers readable beside a scrollable card rack. */
.game-shell:not(.lobby){grid-template-columns:minmax(0,1fr) 278px;grid-template-rows:32px 73px minmax(240px,1fr) 18px;column-gap:22px}
.game-shell:not(.lobby) #players{grid-column:1;grid-row:2}
.game-shell:not(.lobby) #boardWrap{grid-column:1;grid-row:3}
.game-shell:not(.lobby) #handArea{grid-column:2;grid-row:2/4;display:grid;grid-template-rows:auto minmax(0,1fr) auto;padding:8px 4px 0 12px;border-left:1px solid #a7becf;min-height:0}
.game-shell:not(.lobby) .hand-title{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:0 6px 12px;min-height:0}
.game-shell:not(.lobby) .hand-title>strong{font-size:17px}
.game-shell:not(.lobby) .hand-actions{flex-wrap:wrap;justify-content:flex-start;gap:7px}
.game-shell:not(.lobby) .hand-actions button{min-height:44px;font-size:12px}
.game-shell:not(.lobby) .hand-scroll{overflow-y:auto;overflow-x:hidden;margin:0;padding:20px 7px 12px;scrollbar-width:thin;overscroll-behavior:contain}
.game-shell:not(.lobby) .hand{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;align-items:start;justify-content:normal;gap:16px 5px;width:100%;height:auto;min-width:0;max-width:100%}
.game-shell:not(.lobby) .hand-card{width:100%;height:auto;aspect-ratio:512/592;flex-basis:auto;touch-action:pan-y;min-width:0}
.game-shell:not(.lobby) .hand-card:hover:not(:disabled){transform:translateY(-5px)}
.game-shell:not(.lobby) .hand-card.selected{transform:translateY(-9px)!important}
.game-shell:not(.lobby) .hand-footer{height:auto;min-height:58px;gap:8px;padding:10px 6px 0;align-items:center;flex-wrap:wrap}
.game-shell:not(.lobby) .uh-button{min-height:44px}
#lobbyControls:empty{display:none}
#wildCall{position:absolute;left:17px;top:17px;padding:7px 11px;background:#fff;color:#183554;border-radius:6px;font-weight:700;display:flex;gap:8px;align-items:center;font-size:13px;pointer-events:none}
#wildCall:empty{display:none}
#wildCall>span{font-size:23px;color:#1846a4}
#wildCall small{font-size:9px;display:block;color:#3e5c76}
.gift-note{font-size:10px;max-width:180px;line-height:1.4}
@media(max-width:1000px){
 .game-shell:not(.lobby){grid-template-columns:minmax(0,1fr) 216px;grid-template-rows:32px 65px minmax(200px,1fr) 13px;column-gap:14px}
 .game-shell:not(.lobby) #handArea{padding-left:7px}
 .game-shell:not(.lobby) .hand{gap:13px 3px}
 .game-shell:not(.lobby) .hand-title>strong{font-size:15px}
 .game-shell:not(.lobby) .hand-actions button{font-size:11px;padding:6px 8px}
 #wildCall{top:auto;bottom:70px;left:10px;font-size:11px}
}
@media(max-width:640px){
 .game-shell:not(.lobby){grid-template-columns:minmax(0,1fr) 106px;grid-template-rows:25px 58px minmax(240px,1fr) 8px;column-gap:7px;min-height:470px}
 .game-shell:not(.lobby) #handArea{padding:4px 0 0 3px;border-left:1px solid #a7becf;min-width:0}
 .game-shell:not(.lobby) .hand-title{padding:0 1px 7px;gap:6px}
 .game-shell:not(.lobby) .hand-title>strong{font-size:11px}
 .game-shell:not(.lobby) .hand-actions{display:flex;flex-direction:column;align-items:stretch;gap:5px}
 .game-shell:not(.lobby) .hand-actions button{font-size:10px;padding:5px;min-height:44px}
 .game-shell:not(.lobby) .draw-button{justify-content:center;gap:4px}
 .game-shell:not(.lobby) .draw-button span{padding-left:5px}
 .game-shell:not(.lobby) .hand-scroll{padding:12px 3px 7px}
 .game-shell:not(.lobby) .hand{grid-template-columns:minmax(0,1fr);gap:12px}
 .game-shell:not(.lobby) .hand-card{width:100%;height:auto;min-width:0}
 .game-shell:not(.lobby) .hand-footer{font-size:9px;gap:5px;min-height:48px;padding:6px 1px 0;align-content:end}
 .game-shell:not(.lobby) .hand-footer>span{line-height:1.3}
 .game-shell:not(.lobby) .uh-button{width:100%;font-size:12px;padding:5px 3px;min-height:44px}
 .game-shell:not(.lobby) #turnBanner{max-width:95%;width:95%;font-size:10px;padding:6px 5px}
 .game-shell:not(.lobby) #turnBanner strong{font-size:12px}
 .game-shell:not(.lobby) #turnBanner span{max-width:100%}
 .game-shell:not(.lobby) .player strong{max-width:53px;font-size:9px}
 .game-shell:not(.lobby) .player{min-width:35px}
 .game-shell:not(.lobby) #players{gap:2px}
 .game-shell:not(.lobby) .camera-controls{gap:4px;right:6px;bottom:7px}
 .game-shell:not(.lobby) .camera-controls button{width:44px;min-width:44px}
 .game-shell:not(.lobby) .staging-bar{bottom:64px;max-height:220px}
 .game-shell:not(.lobby) .gift-options>div{max-width:200px;flex-wrap:wrap;max-height:120px;overflow-y:auto}
 .game-shell:not(.lobby) .result{bottom:65px;padding:14px 10px;width:calc(100% - 18px)}
 .game-shell:not(.lobby) .result h2{font-size:21px;overflow-wrap:anywhere}
 #wildCall{bottom:67px;left:8px;right:8px;padding:5px 8px;font-size:10px;justify-content:center;gap:6px}
 .gift-note{font-size:9px;max-width:170px;text-align:center}
}
@media(max-height:650px) and (min-width:641px){.game-shell:not(.lobby){grid-template-rows:25px 50px minmax(150px,1fr) 10px}}
.game-shell{height:calc(100dvh - var(--staccs-header-height,94px))}
.menu{min-height:calc(100dvh - var(--staccs-header-height,94px))}

.game-shell:not(.lobby) #handArea{grid-template-rows:auto auto minmax(90px,1fr) auto}
.game-shell:not(.lobby) .hand-title{grid-row:1}
.game-shell:not(.lobby) .hand-scroll{grid-row:3}
.game-shell:not(.lobby) .hand-footer{grid-row:4;display:flex;flex-direction:column;align-items:stretch;padding:12px 6px 6px;gap:8px}
.game-shell:not(.lobby) .uh-button{width:100%;min-height:62px;font-size:25px;letter-spacing:1px;color:white;background:#b63d1c;border:3px solid #81250f;border-radius:9px;box-shadow:0 5px 0 #81250f;opacity:1}
.game-shell:not(.lobby) .uh-button:hover:not(:disabled){background:#943016}
.game-shell:not(.lobby) .uh-button:disabled{background:#ad604b;border-color:#7d3c2b;color:#fff;box-shadow:0 4px 0 #7d3c2b;opacity:1}
.game-shell:not(.lobby) .uh-button.armed,.game-shell:not(.lobby) .uh-button.called{background:#236d39;border-color:#10451f;box-shadow:0 4px 0 #10451f}
.game-shell #placement{position:relative;inset:auto;grid-row:2;pointer-events:auto;z-index:auto;min-height:0}
.game-shell #placement:empty{display:none}
.choice-tray{display:flex;flex-direction:column;gap:10px;background:#f8fbfd;border:1px solid #8ca8bf;border-radius:9px;padding:12px 10px;margin:0 5px 8px;font-size:12px;max-height:43dvh;overflow-y:auto;scrollbar-width:thin}
.choice-tray .wild-options{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.choice-tray .wild-options strong{font-size:12px;text-align:left;width:auto}
.choice-tray .suit-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.choice-tray .suit{font-size:25px;padding:3px;width:100%;min-width:44px;min-height:44px}
.choice-tray .direction-options{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.choice-tray .direction-options button{font-size:11px;padding:7px 4px;min-height:44px}
.choice-tray .gift-options{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.choice-tray .gift-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;max-width:none;width:100%;max-height:154px;overflow:auto;padding:3px}
.choice-tray .gift-card{width:100%;height:auto;min-width:0;aspect-ratio:512/592;min-height:44px}
.choice-tray .gift-note{max-width:none;margin:0}
.choice-actions{display:flex;flex-direction:column;gap:7px;position:sticky;bottom:-12px;background:#f8fbfd;padding:4px 0}
.choice-actions button{width:100%;min-height:44px;font-size:12px;padding:8px 6px}
.choice-actions .confirm{width:100%;height:auto;min-height:47px;border-radius:6px;font-size:14px;border:2px solid #10451f;box-shadow:0 3px 0 #10451f;background:#236d39;color:white}
.choice-actions .confirm:disabled{opacity:1;background:#789382;color:#fff;border-color:#465e4e;box-shadow:0 3px 0 #465e4e;cursor:default}
.choice-actions #clearStage{min-height:44px;background:transparent;border-color:#7f93a5}
.choice-tray{display:grid;grid-template-rows:minmax(0,1fr) auto;overflow:hidden;min-height:0}
.choice-content{min-height:0;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:2px;scrollbar-width:thin}
.choice-actions{position:static;bottom:auto;padding:3px 0 0;flex-shrink:0}
.choice-tray .wild-options,.choice-tray .gift-options{flex-shrink:0}
.choice-tray .gift-grid{display:flex;flex-wrap:wrap;align-content:flex-start;align-items:flex-start;justify-content:flex-start;gap:5px;max-height:160px;flex-shrink:0}
.choice-tray .gift-card{width:64px;height:74px;flex:0 0 64px;min-width:64px;min-height:74px;aspect-ratio:512/592;align-self:flex-start}
.game-shell .hand-card.playable{opacity:1;filter:drop-shadow(0 4px 2px #18355430)}
.game-shell .hand-card.playable::before{content:'';position:absolute;inset:-4px;z-index:-1;background:#236d39;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}
.game-shell .hand-card.playable::after{content:attr(data-playable-label);position:absolute;left:50%;bottom:3px;transform:translateX(-50%);width:auto;height:auto;padding:4px 7px;border:2px solid #fff;border-radius:4px;background:#236d39;color:#fff;font-size:11px;font-weight:900;line-height:1.1;white-space:nowrap;pointer-events:none}
.game-shell .hand-card.playable.selected::before{background:#103f22}
.game-shell .hand-card.playable:focus-visible{outline:3px solid #143c92;outline-offset:7px}
#historyButton,.room-code{min-height:44px}
.range-label input{height:44px}
.crowned{border:2px solid #b58b2a;box-shadow:0 6px 0 #b4944a;animation:winner-arrive .55s cubic-bezier(.16,.8,.25,1) both}
.winner-medallion{position:relative;width:74px;height:81px;display:grid;place-items:end center;margin:-59px auto 12px}
.winner-initial{width:65px;height:65px;display:grid;place-items:center;background:#1846a4;color:white;font-family:'Arial Black',Arial,sans-serif;font-size:29px;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%)}
.pixel-crown{position:absolute;top:0;left:4px;width:66px;height:36px;background:#f5d855;clip-path:polygon(0 0,15% 0,15% 35%,30% 35%,30% 15%,40% 15%,40% 0,60% 0,60% 15%,70% 15%,70% 35%,85% 35%,85% 0,100% 0,90% 100%,10% 100%);border-bottom:7px solid #d79c27;z-index:1;filter:drop-shadow(0 3px 0 #986319)}
@keyframes winner-arrive{from{opacity:0;translate:0 18px;scale:.94}to{opacity:1;translate:0 0;scale:1}}
@media(max-width:640px){
 .game-shell:not(.lobby) .hand-footer{padding:8px 1px 5px;gap:6px}
 .game-shell:not(.lobby) .uh-button{min-height:57px;font-size:19px;letter-spacing:0}
 .choice-tray{padding:8px 4px;margin:0 0 7px;gap:7px;max-height:42dvh;font-size:10px}
 .choice-tray .wild-options strong,.choice-tray .gift-options>strong{font-size:10px;line-height:1.4;overflow-wrap:anywhere}
 .choice-tray .suit-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}
 .choice-tray .suit{min-width:0;font-size:23px;min-height:44px}
 .choice-tray .direction-options{grid-template-columns:1fr;gap:4px}
 .choice-tray .direction-options button{font-size:10px;min-height:44px}
 .choice-tray .gift-grid{grid-template-columns:minmax(0,1fr);max-height:132px;gap:4px;padding:2px}
 .choice-tray .gift-card{width:74px;height:86px;flex-basis:74px;min-width:74px;min-height:86px}
 .choice-tray .choice-actions{gap:5px;bottom:auto;position:static}
 .choice-actions button{font-size:10px;padding:6px 3px;min-height:44px;overflow-wrap:anywhere}
 .choice-actions .confirm{font-size:11px;min-height:47px}
}
