.hero p{color:#b5c8bb;line-height:1.7}.heroCards{display:flex;padding:24px 20px;gap:0}.heroCards span{display:grid;place-items:center;width:88px;height:126px;background:#fffdf4;color:#203f39;font:700 32px Georgia;border:1px solid #ded5c2;border-radius:10px;box-shadow:0 7px 20px #0005;transform:rotate(-13deg)}.heroCards span:nth-child(2){color:#ad3044;transform:translateY(-10px);z-index:1}.heroCards span:nth-child(3){color:#ad3044;transform:rotate(13deg)}.lobbyPlayer small{display:block;color:#aebfb6;font-size:11px;margin-top:5px}.blueTeam{border-left:3px solid #76b5e4}.redTeam{border-left:3px solid #e78f94}.scoreStrip{grid-template-columns:1fr 1fr}.liveUtilities{justify-content:space-between;flex-wrap:wrap;gap:10px}.terrace{min-height:440px;border:13px solid #e5dec5;border-radius:42px;background:radial-gradient(ellipse at center,#d7e4d1,#9bac99);box-shadow:inset 0 0 0 4px #c6ccba,inset 0 10px 35px #39544540,0 16px 40px #0004;position:relative;isolation:isolate;margin-top:12px;overflow:visible;color:#203c32}.satatSeats{position:absolute;inset:0;pointer-events:none}.satatSeats .seat{position:absolute;display:flex;flex-direction:column;align-items:center;gap:3px;background:#173e33ed;color:#fff5df;border-radius:16px;padding:8px 12px;max-width:150px;min-width:85px;border:2px solid transparent;text-align:center;box-shadow:0 4px 12px #0003}.satatSeats .seat.active{border-color:#ffdb83;box-shadow:0 0 18px #ffedb1}.seat3{right:8px;top:35%}.seat2{left:50%;top:8px;transform:translateX(-50%)}.seat1{left:8px;top:35%}.seat b{font-size:13px;overflow-wrap:anywhere}.seat span{font-size:11px}.seatAvatar{height:48px;width:48px;font-size:30px;display:grid;place-items:center}.seatAvatar .avatarPortrait{height:48px;width:48px}.trickArea{position:absolute;left:50%;top:52%;transform:translate(-50%,-50%);width:260px;height:210px;border:2px dashed #4c6b5345;border-radius:35%;display:grid;place-items:center;touch-action:none}.trickArea.dropReady{background:#ffeab075;outline:3px solid #896d36}.trickCards{position:absolute;inset:0;pointer-events:none}.trickCard{position:absolute!important;width:70px!important;height:100px!important;padding:0!important;opacity:1!important;color:#17382c;animation:cardEnter .22s ease-out}.trickCard[data-relative="0"]{left:95px;top:105px;transform:rotate(4deg)}.trickCard[data-relative="3"]{left:165px;top:55px;transform:rotate(14deg)}.trickCard[data-relative="2"]{left:95px;top:0;transform:rotate(-3deg)}.trickCard[data-relative="1"]{left:20px;top:55px;transform:rotate(-14deg)}.trickPiles{position:absolute;left:17%;right:17%;bottom:64px;display:flex;justify-content:space-between;pointer-events:none}.teamPile{pointer-events:auto;display:flex;flex-direction:column;gap:3px;border:2px solid #6891b5;border-radius:9px;background:repeating-linear-gradient(45deg,#275279,#275279 3px,#335e83 3px,#335e83 5px);color:white;padding:8px 14px;font-size:22px;box-shadow:3px 3px 0 #fff9,5px 5px 0 #1f403a40}.teamPile.red{border-color:#d28b8e;background:repeating-linear-gradient(45deg,#864e57,#864e57 3px,#9b5b61 3px,#9b5b61 5px)}.teamPile span{font-size:10px}.notice{position:absolute!important;bottom:9px!important;left:10px;right:10px;width:auto!important;color:#264436!important;background:#f9f2d7d9!important;border-radius:10px;padding:9px!important;font-size:12px!important;transform:none!important;top:auto!important}.notice.yourTurn{background:#ffdfa4!important}.trumpPanel{position:absolute;top:125px;left:50%;transform:translateX(-50%);width:260px;z-index:4;background:#f9f4e8;border:1px solid #a4ac91;border-radius:17px;padding:18px;text-align:center;box-shadow:0 8px 25px #0003}.trumpPanel strong{font-size:14px;display:block;margin-bottom:12px}#trumpChoices{display:flex;gap:5px;justify-content:center}#trumpChoices button{font-size:23px;padding:10px 14px}#redeal{margin-top:12px}.hand{min-height:150px;align-items:center;overflow-x:auto;flex-wrap:nowrap;justify-content:flex-start;padding:20px 8px 8px;gap:0}.hand .handCard{position:relative;width:76px;min-width:76px;height:112px;flex:none;margin-left:-12px;padding:0;touch-action:none;user-select:none;transition:transform .16s,box-shadow .16s}.hand .handCard:first-child{margin-left:0}.hand .handCard:hover{transform:translateY(-13px);z-index:5}.hand .handCard.selected{transform:translateY(-17px);outline:3px solid #e9c57e;z-index:6}.handCard.legal{box-shadow:0 -2px 0 #87b6a0,0 3px 9px #0004}.handCard.special{background:#fff4eb}.card .corner{position:absolute;top:5px;left:5px;font:900 15px Georgia;letter-spacing:-1px}.card .opposite-corner{position:absolute;bottom:5px;right:5px;font:900 15px Georgia;transform:rotate(180deg);letter-spacing:-1px}.card .card-main{position:absolute;left:21%;top:21%;width:58%;height:58%;display:grid;place-items:center;font:900 32px Georgia}.card .pip-field{display:block;font-size:14px}.card .pip{position:absolute;transform:translate(-50%,-50%);font-size:inherit}.card .royal{font-size:35px}.card .royal-suit{font-size:18px}.card.red{color:#af3047}.dragGhost{position:fixed!important;pointer-events:none!important;z-index:1000!important;transform:translate(-50%,-60%) rotate(7deg)!important;width:76px!important;height:112px!important;margin:0!important}.handCard.dragSource{opacity:.25}.reviewTrick{padding:12px 0;border-bottom:1px solid #547c6b}.reviewTrick strong{display:block;margin-bottom:8px}.reviewTrick>div{display:flex;gap:8px}.reviewCard{position:relative;width:62px!important;height:90px!important;padding:0!important;opacity:1!important;display:inline-block!important}.reviewCard.selected{outline:3px solid #edc776;transform:translateY(-4px)}#reviewCards{max-height:55vh;overflow:auto;padding:5px}.speechBubble{position:relative!important;left:auto!important;top:auto!important;transform:none!important;font-size:12px}.roomBubbles{position:absolute;bottom:50px;left:25%;right:25%;display:grid;gap:4px;pointer-events:none}.seat3,.seat2,.seat1{z-index:3}.discardDialog{max-width:560px}#results{margin-top:20px}#scoreResults{font-size:24px;margin:20px 0}.avatarChoices{max-height:250px;overflow:auto}.siteCredits{flex-wrap:wrap}
@media(max-width:650px){.terrace{min-height:440px;border-width:7px;border-radius:25px}.satatSeats .seat{max-width:92px;min-width:65px;padding:6px}.seat3{right:0;top:30%}.seat1{left:0;top:30%}.seat2{top:5px}.seatAvatar,.seatAvatar .avatarPortrait{width:35px;height:35px}.seat b{font-size:10px}.seat span{font-size:9px}.trickArea{width:210px;height:185px;top:55%}.trickCard{width:57px!important;height:82px!important}.trickCard[data-relative="0"]{left:77px;top:96px}.trickCard[data-relative="3"]{left:139px;top:47px}.trickCard[data-relative="2"]{left:77px;top:0}.trickCard[data-relative="1"]{left:12px;top:47px}.trickPiles{left:12%;right:12%;bottom:65px}.teamPile{padding:5px 10px;font-size:18px}.hand .handCard{min-width:62px;width:62px;height:96px;margin-left:-11px}.hand{min-height:130px;padding-top:20px}.handControls{flex-wrap:wrap}.handHead{flex-wrap:wrap;gap:10px}.trumpPanel{top:120px;width:245px}.card .corner,.card .opposite-corner{font-size:12px}.card .pip-field{font-size:11px}.liveUtilities{font-size:12px}.roomActions{gap:6px}.welcome .heroCards span{width:68px;height:100px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Explicit bounds prevent the inherited full-table overlay from stretching chat. */
.terrace .roomBubbles{position:absolute;inset:0;display:block;z-index:8;pointer-events:none}
.terrace .speechBubble{position:absolute!important;inset:auto!important;display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:max-content;height:auto;min-height:0;min-width:0;max-width:min(210px,55%);padding:9px 12px;line-height:1.35;white-space:normal;overflow-wrap:anywhere;transform:none!important}
.terrace .speechBubble strong{font-size:10px;line-height:1.2}
.terrace .speechBubble span{font-size:13px;line-height:1.35}
.terrace .bubble0{bottom:53px!important;left:50%!important;transform:translateX(-50%)!important}
.terrace .bubble3{top:12%!important;right:2%!important}
.terrace .bubble2{top:110px!important;left:50%!important;transform:translateX(-50%)!important}
.terrace .bubble1{top:12%!important;left:2%!important}
@media(max-width:650px){.terrace .speechBubble{max-width:155px;padding:7px 9px}.terrace .speechBubble span{font-size:12px}.chatControls #tauntPicker{flex:1;min-width:155px;max-width:100%}}

.trumpStatus{display:flex;align-items:center;gap:13px;padding:10px 18px 10px 12px;min-width:180px;background:#fff7e4;color:#203c35;border:2px solid #cbb681;border-left:6px solid #274b43;border-radius:15px;box-shadow:0 3px 12px #0002}.trumpStatus.redTrump{color:#ab2742;border-left-color:#b92c49}.trumpSymbol{font:900 54px/1 Georgia,serif;min-width:45px;text-align:center}.trumpWords{display:flex;flex-direction:column;gap:2px}.trumpLabel{font-size:11px;font-weight:900;letter-spacing:.18em;color:#5e6554}.trumpWords strong{font-size:20px;line-height:1.1}.trumpWords small{font-size:11px;color:#626857}.liveUtilities{align-items:center}
@media(max-width:650px){.trumpStatus{min-width:155px;padding:8px 12px 8px 8px;gap:9px}.trumpSymbol{font-size:44px;min-width:36px}.trumpWords strong{font-size:18px}}

.handControls .renonceButton{background:#b52b43;color:#fff7f0;border:1px solid #ed8b9b;border-radius:10px;padding:10px 15px;font-weight:800;box-shadow:0 3px 10px #6f14242b}
.handControls .renonceButton:hover:enabled{background:#cd3651}
.handControls .renonceButton:focus-visible{outline:3px solid #ffcc85;outline-offset:3px}
.handControls .renonceButton:disabled{background:#6f3040;color:#e4b9c2;border-color:#94505e;opacity:.75;box-shadow:none}

/* Consistent card suit silhouettes: pointed spades and three round club leaves. */
.card .suitMark{display:inline-block;width:.86em;height:1.05em;fill:currentColor;flex:none;vertical-align:middle;overflow:visible}
.card .corner,.card .opposite-corner{display:inline-flex;align-items:center;gap:1px;letter-spacing:-.3px}
.card .corner .suitMark,.card .opposite-corner .suitMark{width:.8em;height:1.05em}
.card .pip{width:1em;height:1.2em;display:grid;place-items:center}
.card .pip .suitMark{width:1em;height:1.2em}
.card .ace .suitMark{width:1em;height:1.2em}
.card .royal-suit{display:grid;place-items:center}

@media(max-width:650px){
 .handWrap{padding:16px 10px;margin-top:22px}
 .hand{min-height:180px;padding:25px 4px 24px;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:#79a28d #153a30}
 .hand .handCard{width:82px;min-width:82px;height:126px;margin-left:-15px;border-radius:10px}
 .hand .handCard:first-child{margin-left:0}
 .hand .handCard .corner,.hand .handCard .opposite-corner{font-size:17px}
 .hand .handCard .pip-field,.hand .handCard .pip{font-size:16px}
 .hand .handCard .royal-figure{font-size:42px}
 .hand .handCard .royal-suit{font-size:24px}
 .hand .handCard .ace{font-size:42px}
 .handHead{gap:12px}
 .handHead>div:first-child{font-size:17px}
 .handControls{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .handControls #playCard{grid-column:1/-1;min-height:44px}
 .handControls #sortSuit,.handControls #renonce{min-height:44px;padding:10px 7px;font-size:13px}
}

/* Phone hand: two rows of readable card indices, with actions and chat below. */
@media(max-width:650px){
 #game{padding-left:12px;padding-right:12px}
 .handHead{align-items:flex-start;flex-direction:row;margin-bottom:2px}
 .hand{display:grid;grid-template-columns:repeat(var(--hand-gaps,6),minmax(0,1fr)) 82px;gap:24px 0;align-items:start;justify-content:stretch;overflow:visible;min-height:0;padding:24px 0 16px;touch-action:pan-y}
 .hand .handCard,.hand .handCard:first-child{margin-left:0}
 .hand .handCard .corner,.hand .handCard .opposite-corner{flex-direction:column;gap:0;line-height:1;font-size:17px;min-width:18px;left:3px;top:4px}
 .hand .handCard .opposite-corner{left:auto;top:auto;right:3px;bottom:4px}
 .handControls{margin-top:8px}
 .chatControls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:20px;padding-top:16px;border-top:1px solid #48756380}
 .chatControls input,.chatControls #tauntPicker{width:100%;min-width:0;max-width:100%}
 .chatControls #tauntPicker{grid-column:1/-1}
 .chatControls #grateSignal{grid-column:2}
 .dragStatus{font-size:12px;line-height:1.5;margin:14px 0 0}
 .handWrap>.hint{display:none}
 .ruleBookButton{position:static;margin:16px 12px 44px auto;width:max-content}
}

@media(max-width:650px){
 #hand .handCard:hover,#hand .handCard:hover + .handCard,#hand .handCard:has(+ .handCard:hover){transform:none;z-index:auto}
 #hand .handCard.selected,#hand .handCard.selected:hover{transform:translateY(-17px);z-index:auto}
 .siteCredits{position:static;padding:0 12px 12px}
}

/* Fit the available hand width, including wider phone and desktop-mode views. */
.hand{--hand-card-width:76px;display:grid;grid-template-columns:repeat(var(--hand-gaps,12),minmax(0,1fr)) var(--hand-card-width);gap:24px 0;justify-content:stretch;overflow:visible}
.hand .handCard,.hand .handCard:first-child{margin-left:0}
@media(max-width:650px){.hand{--hand-card-width:82px}}

@media(hover:none){
 #hand .handCard:hover,#hand .handCard:hover + .handCard,#hand .handCard:has(+ .handCard:hover){transform:none;z-index:auto}
 #hand .handCard.selected,#hand .handCard.selected:hover{transform:translateY(-17px);z-index:auto}
}

#rejoinMatch{width:100%;margin-top:10px;border-color:#e3bd71;color:#ffe5a5}
#results{position:fixed;top:max(20px,8dvh);left:50%;transform:translateX(-50%);z-index:10020;width:min(560px,calc(100vw - 24px));max-height:80dvh;overflow:auto;margin:0;padding:26px;border:2px solid #e9c77d;box-shadow:0 18px 65px #000b,0 0 0 100vmax #041b1680;text-align:center}
#results h2{font-size:clamp(23px,5vw,32px);margin-top:0}
#scoreResults{font-size:22px;font-weight:800;margin:18px 0}
#results button{min-height:44px;margin:5px}
#results:focus{outline:none}
@media(max-width:650px){#results{top:max(14px,6dvh);padding:22px 16px}#results button{display:block;width:100%;margin:10px 0 0}}

.ruleBookDialog[open]{display:flex;flex-direction:column}
.ruleBookDialog .ruleBookHeader{padding:18px 20px 14px;flex-shrink:0}
.ruleBookDialog .ruleBookHeader h2{font-size:25px}
.ruleBookDialog .ruleBookContent{max-height:none;min-height:0;flex:1;padding:4px 20px 16px}
.ruleBookContent p,.ruleBookContent li{font-size:14px;line-height:1.65}
.ruleBookContent h3{font-size:17px;margin:0 0 10px}
.ruleBookContent h4{font-size:14px;margin:16px 0 5px}
.ruleBookContent ul,.ruleBookContent ol{padding-left:21px;margin:10px 0}
.ruleBookContent .ruleLead{font-size:16px;color:#173f33;line-height:1.5}
.ruleBookContent .ruleTerms{padding:10px 12px;border-radius:10px;background:#e8eee4}
.ruleScoreTable{width:100%;border-collapse:collapse;font-size:14px;line-height:1.5}
.ruleScoreTable th,.ruleScoreTable td{text-align:left;padding:10px 8px;border-bottom:1px solid #d2ddd0}
.ruleScoreTable th:last-child,.ruleScoreTable td:last-child{text-align:center;width:64px}
.ruleScoreTable thead{background:#e8eee4}
.ruleBookContent details{margin-top:10px;border-top:1px solid #d2ddd0;padding-top:5px}
.ruleBookContent summary{cursor:pointer;font-size:14px;font-weight:700;line-height:1.5;padding:12px 0;min-height:44px}
.ruleBookContent summary:focus-visible{outline:2px solid #927138;outline-offset:3px;border-radius:4px}
#closeRuleBook{flex-shrink:0;min-height:44px;margin:10px 20px 16px;border:1px solid #527262;border-radius:10px;background:#173f33;color:#fff6df;font-weight:700}

.card.trickCard,.card.reviewCard{background:#fffef7;border:2px solid #e5e0d8;border-radius:9px;box-shadow:0 5px 12px #0003;opacity:1!important}

.lobbyPlayers{grid-template-columns:repeat(2,minmax(0,1fr))}
.lobbyPlayer{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.lobbyPlayer>span{min-width:0;overflow-wrap:anywhere;font-size:14px;line-height:1.4}
.lobbyPlayer .avatarPortrait{float:left;width:40px;height:48px;object-fit:cover;border-radius:9px;margin:0 10px 5px 0}
.lobbyPlayer>strong{grid-column:2;grid-row:1;font-size:12px;white-space:nowrap}
.lobbyPlayer>.removeBot{grid-column:1;grid-row:2;justify-self:start;margin-left:0;min-height:44px}
@media(max-width:650px){
 .lobbyPlayers{grid-template-columns:minmax(0,1fr)}
 .lobbyPlayer{padding:12px}
 .lobby .settings{flex-wrap:wrap;align-items:flex-start}
 .lobby .settings label{min-width:110px;margin-bottom:0}
 .lobby .settings .minor{flex:1;min-width:130px}
 .lobby .botActions button{max-width:100%;white-space:normal}
}

.handCard.awaitingPlay{outline:3px solid #f5d58a;outline-offset:2px}

.openingDraw{margin:10px 0;padding:12px;border:1px solid #e5ca86;border-radius:12px;background:#173e34;color:#fff5d7;text-align:center}.openingDrawRow{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:10px 0}.openingDrawPlayer{display:grid;justify-items:center;gap:5px;max-width:105px}.openingDrawPlayer small{overflow-wrap:anywhere}.openingDrawCard{width:46px;height:65px;position:relative;opacity:1!important;background:#fffef7;border:2px solid #eee1c1;border-radius:6px;color:#17382c;padding:0}.openingDrawCard.red{color:#b82739}.openingDrawCard .card-main{display:none}.openingDrawCard .corner{font-size:15px;top:4px;left:4px}.openingDrawCard .opposite-corner{font-size:15px;bottom:4px;right:4px}.drawWinner .openingDrawCard{outline:3px solid #edc76e;box-shadow:0 0 14px #eec97166}.openingDraw>small{display:block;font-size:12px}.openingDrawRow>small{flex-basis:100%}
.preferencesDialog{max-height:85dvh;overflow:auto;width:min(480px,calc(100vw - 24px))}.preferencesDialog label{display:flex;align-items:center;gap:10px;margin:14px 0;flex-wrap:wrap}.preferencesDialog input[type=checkbox]{width:20px;height:20px;margin:0}.preferencesDialog select{max-width:100%}.personalBadges{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.personalBadges span{padding:6px 9px;border-radius:12px;font-size:12px}.earnedBadge{background:#e5c77d;color:#193e30}.lockedBadge{background:#254b40;color:#c4d2cb}.hideDecorations #tableProps{display:none!important}.quietEffects .cardCelebration,.quietEffects .achievementSparks{display:none!important}.quietEffects .powerImpact{animation:none!important}.quietEffects .achievementNotice{max-width:340px;padding:14px 36px 14px 14px}.quietEffects .achievementNotice .achievementTitle{font-size:26px}.quietEffects .achievementMedal{display:none}.reduceMotion *,.reduceMotion *::before,.reduceMotion *::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
body[data-table-theme=night] .terrace{background:radial-gradient(ellipse,#244653,#122d38);border-color:#b4b9b5}body[data-card-back=island] .shuffleBack{background:linear-gradient(#e2231a 0 25%,#173c87 25% 50%,#f8ca20 50% 75%,#14853c 75%)}.collectionGhost{z-index:1000;pointer-events:none;border:2px solid #e5e0d8;border-radius:9px;background:#fffef7;color:#17382c;overflow:hidden}.collectionGhost.red{color:#b82739}.collectionGhost .corner,.collectionGhost .opposite-corner{font-size:15px}.collectionGhost .card-main{display:none}
@media(max-width:650px){header{flex-wrap:wrap;height:auto;min-height:76px;gap:8px;padding-top:10px;padding-bottom:10px}#preferencesButton{font-size:11px;padding:7px}.openingDrawRow{gap:8px}.openingDrawPlayer{max-width:68px}.openingDrawPlayer small{font-size:10px}}

.collectionGhost:disabled{opacity:1}

.openingDraw:not(.isDrawing):not(.expanded) .openingDrawDetails{display:none}.openingDrawTitle{display:block;font-size:14px;line-height:1.5}.openingDrawToggle{margin:4px 0 0;font-size:12px;color:#ffe3a1}.openingDraw.isDrawing{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(480px,calc(100vw - 24px));max-height:80dvh;overflow:auto;margin:0;padding:20px 12px;z-index:10020;box-sizing:border-box;box-shadow:0 0 0 100vmax #071c1bd9,0 18px 60px #0008;border:2px solid #e5ca86}.openingDraw.isDrawing .openingDrawTitle{font-size:20px;line-height:1.4;margin-bottom:16px}.openingDraw.isDrawing .openingDrawToggle{display:none}.openingDrawCard{width:62px;height:88px;display:grid;place-items:center}.openingDrawCard .corner,.openingDrawCard .opposite-corner{display:none}.openingDrawValue{font:700 29px Georgia;white-space:nowrap}.openingDrawPlayer{width:88px;max-width:88px}.openingDrawPlayer>small{min-height:28px;display:grid;align-items:end;font-size:12px;line-height:1.2}.openingDrawRules{display:block;font-size:12px;line-height:1.5;margin-top:12px}.openingWinnerLabel{font-size:9px;color:#ffe4a1;letter-spacing:.5px}.isDrawing .openingDrawCard{animation:opening-card-reveal .35s ease-out both;animation-delay:var(--draw-delay)}@keyframes opening-card-reveal{from{opacity:0;transform:translateY(12px) rotateY(90deg)}to{opacity:1;transform:translateY(0) rotateY(0)}}
@media(max-width:650px){.openingDrawRow{gap:6px}.openingDrawPlayer{width:calc((100vw - 80px)/4);max-width:78px}.openingDraw.isDrawing .openingDrawTitle{font-size:18px}.openingDrawCard{width:54px;height:80px}.openingDrawValue{font-size:26px}.openingDrawPlayer>small{font-size:11px}}
.isDrawing .drawWinner{animation:opening-winner-pulse .55s ease-out .65s both}@keyframes opening-winner-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}

/* Keep card collection faces consistent with the table cards. */
.card.collectionGhost{padding:0;box-sizing:border-box;min-width:0;min-height:0;opacity:1;box-shadow:0 5px 12px #0003}
.collectionGhost .card-main{display:grid}.collectionGhost .pip-field{display:block}
.handWrap{margin-top:14px;padding:12px 16px}.handHead strong{font-size:14px}.handHead span{font-size:12px;margin-left:8px}.handHead{gap:6px}.hand{padding-top:20px}
.terrace{min-height:470px}.trickArea{top:57%}
.connection[data-status=Reconnecting]{color:#ffdc91}
@media(max-width:650px){.handWrap{margin-top:10px;padding:9px 10px}.handHead{margin:0;gap:6px}.handHead>div:first-child{font-size:14px}.hand{padding:20px 0 10px;row-gap:20px}.terrace{min-height:440px}.trickArea{top:55%}}
/* Small card faces keep the centre artwork clear of both corner labels. */
.card:is(.trickCard,.reviewCard,.collectionGhost) .royal{top:28%;height:42%;grid-template-rows:minmax(0,1fr) auto;gap:1px;line-height:1}
.card:is(.trickCard,.reviewCard,.collectionGhost) .royal-figure{font-size:22px;line-height:1;align-self:center}
.card:is(.trickCard,.reviewCard,.collectionGhost) .royal-suit{font-size:12px;line-height:1}
@media(max-width:650px){.card:is(.trickCard,.reviewCard,.collectionGhost) .royal-figure{font-size:20px}}
/* Streaks occupy empty table space and clear before the next card arrives. */
.streakNotice{--streak-title:20px;position:absolute;top:50%;left:50%;transform:translateX(-50%);z-index:7;width:184px;max-width:calc(100% - 24px);padding:10px 16px;border:1px solid #b9d7b3;border-radius:16px;background:#174c3df5;color:#fff6dc;text-align:center;pointer-events:none;box-shadow:0 4px 12px #0004;animation:streak-arrive .18s ease-out}
.streakNotice small{display:block;font-size:10px;line-height:1.2;margin-bottom:3px;letter-spacing:.04em}.streakNotice strong{display:block;font-size:var(--streak-title);line-height:1.1;white-space:nowrap;font-weight:900;letter-spacing:.02em}
.streakNotice[data-level="1"]{--streak-title:24px;width:204px;border:2px solid #83e7d2;background:linear-gradient(120deg,#165b4e,#184b62)}
.streakNotice[data-level="2"]{--streak-title:28px;width:224px;border:2px solid #f5d477;background:linear-gradient(120deg,#234d69,#3b395e);color:#fff0bd;box-shadow:0 0 16px #eec76a55}
.streakNotice[data-level="3"]{--streak-title:32px;width:244px;border:2px solid #ffe3a1;background:linear-gradient(120deg,#765123,#9a4a22);color:#fff5ca;box-shadow:0 0 22px #ffc66c66}
.streakNotice[data-level="4"]{--streak-title:33px;width:254px;border:2px solid #fff1b5;background:linear-gradient(120deg,#704e17,#a66d23);color:#fffbe2;box-shadow:0 0 26px #ffe7a177}
.streakNotice[data-team="opponent"] small{color:#ffe0d9}.streakNotice.compactStreak{padding:5px 12px}.compactStreak small{font-size:9px;margin-bottom:2px}.compactStreak strong{font-size:var(--streak-title)}
@keyframes streak-arrive{from{opacity:0;translate:0 5px;scale:.94}to{opacity:1;translate:0 0;scale:1}}
body.reduceMotion .streakNotice,body.quietEffects .streakNotice{animation:none;box-shadow:none}body.quietEffects .streakNotice{padding:7px 12px}body.quietEffects .streakNotice strong{font-size:20px}
@media(max-width:650px){.streakNotice{--streak-title:19px;width:164px;padding:8px 12px}.streakNotice[data-level="1"]{--streak-title:23px;width:184px}.streakNotice[data-level="2"]{--streak-title:27px;width:204px}.streakNotice[data-level="3"]{--streak-title:30px;width:224px}.streakNotice[data-level="4"]{--streak-title:30px;width:234px}}
/* Eight choices, with all special portraits visible in two rows. */
#avatarChoices{grid-template-columns:repeat(4,minmax(0,1fr));max-height:none;overflow:visible;gap:8px}
#avatarChoices .avatarOption{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:108px;padding:6px 3px}
#avatarChoices .avatarIcon{width:100%;min-width:0;height:68px}#avatarChoices .avatarIcon img{width:min(64px,100%);max-width:100%;height:68px;object-fit:contain}#avatarChoices small{max-width:100%;min-height:25px;display:grid;place-items:center;overflow-wrap:anywhere}
#rejoinMatch{background:#e0eee4;color:#173f32;border:2px solid #7a9f89;min-height:48px;font-weight:800}#rejoinMatch:hover:enabled{background:#cfe4d6}#rejoinMatch:focus-visible{outline:3px solid #997538;outline-offset:3px}
@media(max-width:650px){#avatarChoices{gap:6px}#avatarChoices .avatarOption{min-height:104px}#avatarChoices .avatarIcon,#avatarChoices .avatarIcon img{height:62px}#avatarChoices small{font-size:10px}}


/* Keep the committed Renonce action and clock visible on small screens. */
#reviewDialog[open]{display:flex;flex-direction:column;box-sizing:border-box;width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:hidden;padding:clamp(12px,3vw,24px)}
#reviewDialog h2{flex:none;font-size:clamp(20px,5vw,28px)}
#reviewDialog #reviewHint{flex:none;margin:6px 0 10px;line-height:1.4}
#reviewDialog #reviewCards{flex:1 1 auto;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;padding:6px}
#reviewDialog .leaveActions{flex:none;margin-top:10px;gap:8px;justify-content:space-between}
#reviewDialog .leaveActions button{min-height:44px}
#renonceClock{font-size:14px;font-variant-numeric:tabular-nums}
#reviewDialog .reviewTrick>div{flex-wrap:wrap}
@media(max-height:500px){#reviewDialog #reviewHint{font-size:11px;margin:2px 0}#reviewDialog h2{font-size:18px}}

.renonceChoice{width:76px;min-width:0}.renonceChoice>span{display:block;font-size:12px;line-height:1.3;overflow-wrap:anywhere;margin-bottom:8px}

/* Readable card backs and completed hands at every seat. */
.teamPile{box-sizing:border-box;width:58px;height:82px;padding:7px 3px;align-items:center;justify-content:center;flex:none;color:#fff}
.teamPile:disabled{color:#fff;opacity:.85}
.card.reviewCard:disabled,.card.trickCard:disabled{color:#17382c;opacity:1;-webkit-text-fill-color:currentColor}
.card.reviewCard.red:disabled,.card.trickCard.red:disabled{color:#af3047}
.card.reviewCard .pip-field{left:25%;top:25%;width:50%;height:50%}
.card.reviewCard .pip .suitMark{width:10px;height:12px}
.reviewChoice{flex:1;min-width:0;max-width:100px;text-align:center}.reviewChoice>span{display:block;font-size:11px;overflow-wrap:anywhere;margin-bottom:7px}.reviewChoice>small{display:block;min-height:16px;font-size:10px;color:#345b46;margin-top:5px}
.card.reviewCard.winningCard{border-color:#94712c;box-shadow:0 0 0 2px #e8c579}
#reviewDialog .reviewTrick>div{display:flex;flex-wrap:nowrap;gap:8px}
#renonceClock{position:sticky;bottom:0;font-weight:700}
.quickRow{grid-template-columns:minmax(0,1fr) auto}.quickRow button{white-space:normal}.tableOptions summary{min-height:44px;align-content:center;cursor:pointer}
@media(max-width:450px){.quickRow,.joinRow{display:grid;grid-template-columns:1fr}.quickRow button,.joinRow button{width:100%;min-height:44px}.reviewChoice .reviewCard{width:100%!important;max-width:62px;height:auto!important;aspect-ratio:62/90}.teamPile{width:48px;height:69px}}

.teamPile small{font-size:9px;line-height:1.2;color:inherit}
/* Twelve portraits need wider labels on small phones. */
@media(max-width:450px){#avatarChoices{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Seats 0,1,2,3 now read bottom,left,top,right; server order is unchanged. */

.botActions{display:flex;flex-wrap:wrap;gap:10px;align-items:end}.botActions label,.botControls label{display:flex;flex-direction:column;gap:5px;font-size:.8rem;min-width:0}.botActions select,.botControls select{max-width:100%;min-width:0}.botControls{display:flex;flex-wrap:wrap;gap:8px;max-width:100%;align-items:end}.lobbyPlayer{flex-wrap:wrap}.botControls label{flex:1 1 120px}@media(max-width:500px){.botControls{width:100%}.botActions label{flex:1 1 125px}}
.botActions select,.botControls select{min-height:44px;padding:8px 10px;border:1px solid #b8ccc4;border-radius:8px;background:#fffdf5;color:#123d36;font:inherit;width:100%}

/* Compact seated bots; expand only the settings being edited. */
.lobbyPlayers{align-items:start}
.lobbyPlayer{align-self:start}
.lobbyPlayer>.botControls{grid-column:1 / -1;grid-row:2;display:flex;gap:8px;align-items:center}
.lobby .botControls>button{flex:1 1 0;margin:0;min-height:44px;padding:8px;font-size:12px;line-height:1.2}
.lobby .botControls>.removeBot{background:#ed9699;color:#000;border:1px solid #ba545b}
.lobby .botControls>.removeBot:hover{background:#e98288}
.lobby .botEditor{flex:1 1 100%;min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-top:4px}
.lobby .botEditor label,.lobby .botActions label{margin:0;letter-spacing:.04em}
.lobby .botEditor small{margin:0;font-size:10px;color:#496258;letter-spacing:0;text-transform:none}
.lobby .botEditor [data-done-bot]{grid-column:1 / -1;margin:0;min-height:44px}
.lobby .botActions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.7fr) auto;gap:10px;align-items:end}
.lobby .botActions button{margin:0;min-height:44px}
.lobby .botActions #fillBots{grid-column:1 / -1}
.lobby .botActions label{display:flex;flex-direction:column;gap:5px}
@media(max-width:500px){.lobby .botActions{grid-template-columns:repeat(2,minmax(0,1fr))}.lobby .botActions #addBot{grid-column:1 / -1}.lobby .botEditor{grid-template-columns:minmax(0,1fr)}}
