@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Fraunces:ital,opsz,wght,SOFT,WONK@1,9..144,650,40,1&display=swap');
:root{--paper:#fff8e8;--ink:#283ca7;--blue:#304bc9;--navy:#1e2e79;--red:#d94329;--pink:#f5b8ce;--yellow:#ffe276;--line:#d8d6c3;--display:'Bricolage Grotesque',sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:14px var(--display);background-image:radial-gradient(#b9ac8030 .6px,transparent .6px);background-size:6px 6px}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button{cursor:pointer;color:inherit;transition:transform .18s,background .18s}button:disabled{cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--red);outline-offset:4px}a{color:inherit}button:hover:not(:disabled){transform:translateY(-2px)}.header{height:99px;margin:0 4%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #b7b6a5}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;font-weight:800;font-size:41px;letter-spacing:-2px;line-height:.85}.brand-symbol{color:var(--red);font-size:52px;line-height:1;transform:rotate(-12deg)}.brand-sub{display:block;font-size:8px;letter-spacing:2.2px;margin:10px 0 0 3px;font-weight:600}.header nav{display:flex;gap:8px;align-items:center}.header nav button,.nav-active{padding:11px 21px;border:0;background:transparent;font-size:13px;font-weight:600}.nav-active{background:var(--blue);color:var(--paper);border-radius:30px}.header nav button span{margin-left:6px}.profile{display:flex;align-items:center;gap:9px;background:none;border:0;font-size:12px}.avatar{width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--yellow);color:var(--navy);font-weight:700;font-size:19px;flex-shrink:0}.avatar.small{width:32px;height:32px;background:var(--pink);font-size:16px}.online-dot,.live-dot{width:7px;height:7px;background:#488144;border-radius:50%;display:inline-block;flex-shrink:0}main{max-width:1510px;margin:auto;padding:30px 4% 0}h1{font-size:clamp(40px,4.6vw,67px);line-height:.96;letter-spacing:-3px;font-weight:800;margin:14px 0 18px}h1 i{font-family:'Fraunces',Georgia,serif;color:var(--red);font-weight:650;letter-spacing:-2.6px}.button{padding:13px 20px;border:1.5px solid var(--ink);background:var(--paper);border-radius:7px;font-weight:700;font-size:12px;display:inline-flex;justify-content:center;align-items:center;gap:19px;min-height:44px}.button.light{background:var(--paper)}.button.green{background:var(--yellow);color:var(--navy);border-color:var(--navy)}#new-button{white-space:nowrap;background:var(--red);border:1.5px solid var(--red);color:var(--paper);border-radius:40px;padding:10px 19px;min-height:40px;font-size:12px;font-weight:700;gap:7px}#new-button span{font-size:19px;font-weight:400;margin:0}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:26px;align-items:start}.table-shell{border:2px solid var(--blue);border-radius:20px;overflow:hidden;background:var(--blue)}.table-toolbar{display:flex;align-items:center;justify-content:space-between;padding:0 23px;height:52px;color:var(--navy);background:#e0e6fb;font-size:11px;font-weight:500}.table-toolbar>div{display:flex;align-items:center;gap:10px}.table-toolbar>div>span:nth-child(2){font-weight:700}.toolbar-divider{opacity:.5;margin:0 5px}.table-toolbar button{border:0;background:none;font-size:11px;font-weight:700;padding:9px 0}.table-toolbar button span{margin:0 6px}.felt{position:relative;color:var(--paper);padding:20px 25px 22px;isolation:isolate;overflow:hidden;background:var(--blue);display:flex;flex-direction:column;gap:14px}.felt:before{content:'';position:absolute;inset:13px;border:1px solid #c0ccfc60;border-radius:100px 100px 26px 26px;pointer-events:none;z-index:-1}.felt:after{content:'';position:absolute;inset:22px;border:1px dashed #c0ccfc28;border-radius:94px 94px 20px 20px;pointer-events:none;z-index:-1}.felt-corner{position:absolute;color:#b9c8ff;opacity:.6;font-size:24px}.top-left{top:185px;left:32px}.bottom-right{top:185px;right:32px}.felt-corner:before{content:'✳'}.opponent{display:flex;align-items:center;gap:10px;position:relative;z-index:1}.opponent-avatar{background:var(--pink);width:37px;height:37px;border:2px solid var(--paper)}.opponent>div{display:flex;flex-direction:column;gap:5px}.opponent strong{font-size:13px;font-weight:600}.opponent>div>span{font-size:10px;color:#d1d9ff}.player-score{margin-left:auto;font-size:26px;font-weight:700}.player-score small{font-size:9px;font-weight:500;color:#ced7ff;margin-left:4px}.opponent-hand{height:82px;display:flex;justify-content:center;margin-top:-10px}.mini-back{width:39px;height:58px;flex-shrink:0;margin-left:-18px;background-color:var(--pink);background-image:repeating-linear-gradient(45deg,transparent 0 5px,#d7494855 5px 7px),repeating-linear-gradient(-45deg,transparent 0 5px,#d7494855 5px 7px);border:2px solid #fff4df;border-radius:4px;box-shadow:-2px 2px 0 #172f8360;transform:rotate(var(--rotation)) translateY(var(--offset))}.opponent-melds{display:flex;gap:5px;position:absolute;left:30px;top:100px;max-width:30%;flex-wrap:wrap}.meld-chip{padding:5px 7px;border:1px solid #bbc8f9;border-radius:4px;font-size:10px;color:var(--paper);background:var(--blue)}.table-center{display:flex;align-items:center;justify-content:center;gap:43px;margin-top:16px}.table-center>.turn-notice{margin:0;flex-wrap:wrap;max-width:172px;text-align:center}.table-center>.turn-notice>span:not(.live-dot){flex-basis:100%;font-weight:500}.pile-block{display:flex;flex-direction:column;align-items:center;gap:17px}.card{position:relative;flex-shrink:0;width:82px;height:115px;background:#fffcf1;border:1px solid #ded9c9;border-radius:7px;padding:0;color:#263c98;box-shadow:0 3px 0 #152e7b55;font-family:Georgia,serif}.card.red{color:#d33d32}.card-back{background:#fff4e0;padding:5px}.back-inner{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #d65e64;border-radius:3px;background:repeating-linear-gradient(45deg,transparent 0 6px,#d7494855 6px 8px),repeating-linear-gradient(-45deg,#f5b8ce 0 6px,#d7494855 6px 8px)}.back-inner>span{display:flex;align-items:center;justify-content:center;width:43px;height:51px;background:var(--pink);color:var(--red);font-size:37px;border:1px solid #c3545a;border-radius:50%}.back-inner small{font:700 6px var(--display);letter-spacing:1.5px;background:var(--pink);color:var(--red);padding:2px;margin-top:5px}.stock{transform:rotate(-7deg);box-shadow:2px 3px #e9bdca,4px 6px #f8e7c9,5px 8px #1b3295}.stock:hover:not(:disabled){transform:rotate(-3deg) translateY(-5px)}.pile-label{font-size:9px;letter-spacing:1.2px;font-weight:600;color:#e6eaff}.discard{transform:rotate(8deg);box-shadow:2px 3px #f0c5ce,4px 5px #203b9c}.discard:hover:not(:disabled){transform:rotate(4deg) translateY(-5px)}.card:disabled{opacity:1}.card-corner{position:absolute;left:7px;top:7px;font-size:23px;line-height:.95;display:flex;flex-direction:column;align-items:center}.card-corner small{font-size:16px;margin-top:3px}.card-corner.bottom{left:auto;top:auto;right:7px;bottom:7px;transform:rotate(180deg)}.card-pip{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:35px}.joker .card-corner{font-size:9px;writing-mode:vertical-rl;letter-spacing:1px}.joker .card-pip{font-size:31px;color:var(--red)}.meld-zone{min-height:100px;margin-top:21px;display:flex;justify-content:center;align-items:center;gap:17px;flex-wrap:wrap}.meld-placeholder{display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;border-bottom:1px dashed #c0ceff55;padding:5px 20px 17px}.meld-placeholder>span{font-size:24px;color:var(--pink);line-height:1}.meld-placeholder strong{font-size:12px;font-weight:500;color:#e0e5ff}.meld-placeholder small{font-size:10px;color:#bfccff}.meld-group{display:flex;flex-direction:column;align-items:center;gap:7px}.meld-cards{display:flex}.meld-cards .card{width:40px;height:58px;margin-left:-18px;border-radius:3px}.meld-cards .card:first-child{margin-left:0}.meld-cards .card-corner{font-size:12px;left:3px;top:3px}.meld-cards .card-corner small{font-size:9px}.meld-cards .card-pip{font-size:16px}.meld-cards .card-corner.bottom{display:none}.meld-group>small{font-size:8px;letter-spacing:.7px;color:var(--yellow)}.turn-notice{display:flex;align-items:center;justify-content:center;gap:8px;width:fit-content;max-width:100%;margin:13px auto 0;background:#213aa5;padding:9px 16px;border-radius:30px;color:#fff8e8;font-size:11px;font-weight:700;min-height:33px}.turn-notice .live-dot{background:var(--pink);width:6px;height:6px}.is-your-turn .turn-notice{background:var(--yellow);color:var(--navy)}.is-your-turn .turn-notice .live-dot{background:var(--red)}.turn-notice>span:last-child{font-size:10px;font-weight:400;margin-left:4px}.turn-notice>button{background:none;border:0;border-bottom:1px solid currentColor;padding:0;color:inherit;font-size:10px}.hand-wrap{height:143px;display:flex;align-items:flex-end;justify-content:center;margin:0 7px}.hand{--card-width:72px;display:flex;justify-content:center;align-items:flex-end;width:100%;min-height:135px;padding:22px 14px 0}.hand>.card{width:var(--card-width);height:103px;margin-left:calc(-1 * var(--overlap,28px));transform:translateY(var(--y)) rotate(var(--r));transform-origin:bottom center;box-shadow:-2px 1px 4px #14266b55;transition:transform .18s,box-shadow .18s}.hand>.card:first-child{margin-left:0}.hand>.card:hover{transform:translateY(calc(var(--y) - 14px)) rotate(var(--r));z-index:2}.hand>.card.selected,.hand>.card:focus-visible{transform:translateY(calc(var(--y) - 24px)) rotate(var(--r));outline:3px solid var(--yellow);outline-offset:1px;box-shadow:0 7px 0 #21378f;z-index:3}.hand .card-corner{font-size:21px;left:6px}.hand .card-corner small{font-size:14px}.hand .card-pip{font-size:29px}.hand .joker .card-corner{font-size:8px}.player-footer{display:flex;align-items:center;justify-content:space-between;height:67px;padding:0 3px}.you{display:flex;align-items:center;gap:10px}.you .avatar{width:33px;height:33px;font-size:16px;border:2px solid var(--paper)}.you>div{display:flex;flex-direction:column;gap:5px}.you strong{font-size:12px;font-weight:600}.you strong span{font-size:7px;letter-spacing:1.3px;margin-left:8px;color:#d4ddff}.you small{font-size:10px;color:#d4ddff}.sort-button{border:1px solid #bbcbff80;border-radius:25px;background:transparent;color:#fff9ec;padding:9px 14px;font-size:11px;min-height:36px}.sort-button span{margin-left:4px}.action-bar{background:#e0e6fb;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 22px;min-height:80px}#selection-info{font-size:11px;display:flex;align-items:center;gap:9px;color:#3e4d88;line-height:1.5}.selection-icon{font-size:27px;color:var(--ink)}.actions{display:flex;gap:9px;flex-shrink:0}.actions .button{padding:12px 17px;font-size:12px}.actions .button:disabled{background:#d7dded;border-color:#b6bed8;color:#707b9b}.score-panel{position:relative;background:var(--yellow);border:1.5px solid #d8b548;border-radius:3px 3px 15px 15px;padding-top:5px}.score-panel:before{content:'';position:absolute;width:72px;height:19px;background:#f6b2c5bd;top:-10px;left:calc(50% - 36px);transform:rotate(-5deg)}.panel-heading{display:flex;justify-content:space-between;align-items:center;padding:19px 21px 11px}.panel-heading h2{font-size:25px;letter-spacing:-1px;font-weight:800;margin:0}.panel-heading>span{font-size:28px}.target{display:flex;align-items:center;justify-content:space-between;padding:0 21px 18px;border-bottom:1px solid #bdae6590}.target>span{font-size:9px;font-weight:700;letter-spacing:1.4px}.target strong{font-size:32px;font-weight:800;letter-spacing:-1.5px}.target small{font-size:10px;letter-spacing:0;font-weight:500}.score-row{padding:19px 21px 0}.score-name{display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:600}.score-name>span{display:flex;gap:8px;align-items:center}.score-name .avatar{width:28px;height:28px;background:var(--blue);color:var(--paper);font-size:14px}.score-row:nth-child(2) .avatar{background:var(--red)}.score-name b{font-size:24px;font-weight:700}.score-name small{font-size:9px;font-weight:400}.progress{height:5px;background:#e4c757;margin-top:10px;border-radius:5px;overflow:hidden}.progress i{display:block;background:var(--blue);height:100%;min-width:5px;border-radius:5px;transition:width .5s}.score-row:nth-child(2) .progress i{background:var(--red)}.canastas{display:flex;justify-content:space-between;margin-top:8px;font-size:10px;color:#575525}.canastas>span:last-child{letter-spacing:3px}.score-legend{display:flex;justify-content:space-between;padding:17px 21px;margin-top:20px;border-top:1px solid #bdae6590;font-size:10px}.score-legend>span{display:flex;align-items:center;gap:5px}.score-legend b{font-weight:600}.legend-dot{width:6px;height:6px;background:var(--blue);border-radius:50%;display:inline-block}.legend-dot.mixed{background:var(--red)}.rhythm-panel{margin-top:25px;padding:24px 23px 18px;background:var(--pink);border-radius:40px 4px 40px 4px;color:#792d47}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.8px}.table-eyebrow{display:flex;align-items:center;gap:13px;margin:0 0 12px}.tiny-suits{color:var(--red);letter-spacing:4px;font-size:15px}.rhythm-panel .eyebrow{font-size:9px;letter-spacing:1.9px}.rhythm-panel h2{font-size:34px;line-height:1;letter-spacing:-1.5px;font-weight:800;margin:12px 0 23px}.rhythm-panel h2 i{font-family:'Fraunces',Georgia,serif}.rhythm-panel ol{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:17px}.rhythm-panel li{display:flex;gap:12px}.rhythm-panel li>span{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid #bc7a91;border-radius:50%;font-size:12px;flex-shrink:0}.rhythm-panel li.active>span{background:#792d47;color:#ffe8f0;border-color:#792d47}.rhythm-panel li strong{font-size:13px;font-weight:700}.rhythm-panel li p{font-size:11px;line-height:1.5;margin:4px 0 0}.rhythm-panel>button{display:flex;justify-content:space-between;border:0;border-top:1px solid #bc7a9170;width:100%;background:none;padding:15px 0 0;margin-top:20px;font-size:11px;font-weight:600}.activity-panel{padding:23px 3px 0}.activity-panel .eyebrow{font-size:9px;letter-spacing:1.3px;display:flex;justify-content:space-between;align-items:center}.activity-panel .online-dot{background:var(--red);width:6px;height:6px}#activity p{font-size:11px;color:#68635c;line-height:1.5;padding-bottom:10px;border-bottom:1px dotted #c7c2b3;margin:12px 0 0}.footer{display:flex;justify-content:space-between;align-items:center;padding:29px 0 26px;margin-top:6px;color:#777268;font-size:10px}.footer>span:first-child{font-family:'Fraunces',Georgia,serif;font-size:16px;color:var(--red)}.footer>span:nth-child(2){font-size:8px;letter-spacing:1.1px;color:var(--ink)}.footer i{font-size:13px;font-style:normal;color:var(--red);margin:0 8px}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:20;background:var(--yellow);color:var(--navy);border:2px solid var(--ink);border-radius:9px;box-shadow:4px 4px 0 var(--ink);padding:16px 24px;max-width:90vw;font-size:13px;transition:opacity .2s,transform .2s}.toast.visible{opacity:1;transform:translate(-50%,0)}dialog{border:2px solid var(--ink);border-radius:17px;background:var(--paper);color:var(--ink);padding:38px;width:min(480px,92vw);box-shadow:9px 9px 0 #182b7955;max-height:90dvh}dialog::backdrop{background:#13275a99;backdrop-filter:blur(4px)}.modal-close{position:absolute;top:10px;right:12px;border:0;width:35px;height:35px;border-radius:50%;background:var(--pink);font-size:25px}dialog .eyebrow{font-size:9px;color:var(--red)}dialog h2{font-size:39px;line-height:1.05;letter-spacing:-1.7px;margin:15px 0 19px;font-weight:800}dialog p,dialog li{font-size:13px;line-height:1.7;color:#535b73}dialog ul{padding-left:18px}dialog li{padding-bottom:8px}dialog label{display:block;font-size:12px;font-weight:600;margin:20px 0 8px}dialog input{width:100%;padding:13px;background:#fffef8;border:1.5px solid #a5adc5;border-radius:5px;color:var(--ink)}dialog .button{width:100%;margin-top:14px}dialog a{color:var(--ink)}.room-code{text-align:center;padding:19px 10px;background:var(--yellow);font-size:30px;font-weight:700;letter-spacing:4px;border:1px dashed var(--ink);border-radius:6px}
@media(min-width:1500px){.felt{min-height:650px}.table-center{margin-top:30px}.hand-wrap{height:155px}}
@media(max-width:1150px){.game-layout{grid-template-columns:minmax(0,1fr) 246px;gap:20px}.header{margin:0 3%}main{padding-left:3%;padding-right:3%}.hand{--card-width:66px}.hand>.card{height:96px}.table-center{gap:26px}.felt{padding-left:19px;padding-right:19px}.panel-heading,.score-row{padding-left:17px;padding-right:17px}.panel-heading h2{font-size:23px}.target{padding-left:17px;padding-right:17px}.score-legend{padding-left:15px;padding-right:15px;font-size:9px}.action-bar{padding:13px;gap:10px}.actions .button{gap:9px;padding:11px 13px;font-size:11px}.selection-icon{display:none}#selection-info{font-size:10px}.rhythm-panel{padding:23px 20px}.rhythm-panel h2{font-size:32px}.footer>span:nth-child(2){font-size:7px}}
@media(max-width:850px){.header{height:83px}.brand{font-size:35px}.brand-symbol{font-size:42px}.brand-sub{font-size:7px}.header nav button,.nav-active{padding:10px 16px;font-size:12px}.profile #profile-name{display:none}#new-button{padding:9px 16px}h1{font-size:53px}.game-layout{grid-template-columns:1fr}.felt{min-height:602px}.hand{--card-width:72px}.hand>.card{height:103px}aside{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:8px;align-items:start}.rhythm-panel{margin:0}.activity-panel{display:none}.footer>span:nth-child(2){display:none}.score-panel{padding-bottom:0}.score-row{padding-top:23px}.target{padding-bottom:20px}.score-legend{margin-top:26px}.rhythm-panel ol{gap:13px}.rhythm-panel h2{margin-bottom:19px}.opponent-melds{top:106px}.table-toolbar{height:49px}.action-bar{padding:15px 20px}#selection-info{font-size:11px}.actions .button{font-size:12px;padding:11px 17px}.hand-wrap{height:142px}}
@media(max-width:500px){.table-eyebrow{justify-content:center}.header{height:78px;margin:0 18px}.brand{font-size:32px;gap:6px}.brand-symbol{font-size:37px}.brand-sub{font-size:6px;letter-spacing:1.8px;margin-top:8px}.header nav{gap:3px}.header nav button,.nav-active{padding:9px 12px;font-size:10px}.header nav button span{display:none}.profile{display:none}main{padding:26px 12px 0}h1{font-size:44px;letter-spacing:-2px;line-height:.98;margin:13px 0 15px}h1 i{letter-spacing:-1.9px}#new-button{padding:0;width:36px;height:36px;min-height:36px;font-size:0;gap:0;border-radius:50%}#new-button span{display:inline;font-size:21px;margin:0}.table-shell{border-radius:15px}.table-toolbar{height:46px;padding:0 13px;font-size:9px}.table-toolbar>div{gap:6px}.toolbar-divider{margin:0 3px}.table-toolbar button{font-size:9px}.table-toolbar button span{margin:0 3px}.felt{padding:19px 13px 0;min-height:559px}.felt:before{inset:9px;border-radius:64px 64px 20px 20px}.felt:after{inset:15px;border-radius:60px 60px 15px 15px}.opponent-avatar{width:31px;height:31px;font-size:16px}.opponent{gap:8px}.opponent strong{font-size:11px}.opponent>div>span{font-size:8px}.player-score{font-size:23px}.player-score small{font-size:8px}.opponent-hand{margin-top:20px;height:62px}.mini-back{width:31px;height:47px;margin-left:-15px}.opponent-melds{left:18px;top:108px;max-width:31%;gap:3px}.meld-chip{font-size:8px;padding:3px}.table-center{gap:22px;margin-top:14px}.pile-block>.card{width:66px;height:95px}.pile-label{font-size:7px;letter-spacing:1px}.pile-block{gap:15px}.back-inner>span{width:35px;height:42px;font-size:30px}.back-inner small{font-size:5px;letter-spacing:1px}.felt-corner{font-size:16px;top:193px}.top-left{left:17px}.bottom-right{right:17px}.meld-zone{min-height:87px;margin-top:16px;gap:9px}.meld-placeholder{padding:5px 5px 14px;gap:5px}.meld-placeholder strong{font-size:10px}.meld-placeholder small{font-size:8px}.meld-placeholder>span{font-size:19px}.turn-notice{margin-top:10px;font-size:10px;gap:5px;padding:9px 11px;flex-wrap:wrap;line-height:1.2}.turn-notice>span:last-child{font-size:8px;margin-left:1px}.hand-wrap{height:121px;margin:0}.hand{--card-width:48px;padding:16px 0 0;min-height:110px}.hand>.card{height:77px;border-radius:4px}.hand .card-corner{font-size:17px;left:4px;top:5px}.hand .card-corner small{font-size:11px}.hand .card-pip{font-size:25px}.hand .card-corner.bottom{display:none}.hand .joker .card-corner{font-size:6px}.player-footer{height:61px;padding:0 3px}.you{gap:7px}.you .avatar{width:28px;height:28px;font-size:14px}.you strong{font-size:10px}.you strong span{font-size:6px;margin-left:5px;letter-spacing:.9px}.you small{font-size:8px}.sort-button{font-size:9px;padding:8px 10px;min-height:34px}.action-bar{display:flex;flex-direction:column;align-items:stretch;padding:12px 13px 14px;gap:10px}#selection-info{justify-content:center;font-size:10px;min-height:17px}.actions .button{flex:1;justify-content:space-between;padding:11px 15px}.actions{gap:10px}aside{gap:13px;margin-top:7px}.panel-heading{padding:20px 13px 9px}.panel-heading h2{font-size:20px;letter-spacing:-.7px}.panel-heading>span{font-size:18px}.target{padding:2px 13px 14px;display:block}.target>span{font-size:8px}.target strong{display:block;font-size:33px;margin-top:3px}.target small{font-size:9px}.score-row{padding:18px 13px 0}.score-name{font-size:10px}.score-name>span{gap:5px}.score-name .avatar{width:23px;height:23px;font-size:12px}.score-name small{display:none}.score-name b{font-size:22px}.canastas{font-size:8px;line-height:1.5}.canastas>span:last-child{letter-spacing:1px;white-space:nowrap}.score-legend{padding:15px 10px;gap:5px;font-size:8px;flex-wrap:wrap;margin-top:17px}.score-legend>span{gap:4px}.rhythm-panel{padding:22px 15px 19px;border-radius:29px 3px 29px 3px}.rhythm-panel .eyebrow{font-size:8px;letter-spacing:1.2px}.rhythm-panel h2{font-size:28px;letter-spacing:-1px;margin:13px 0 21px}.rhythm-panel li{gap:8px}.rhythm-panel li>span{width:19px;height:19px;font-size:10px}.rhythm-panel li strong{font-size:11px}.rhythm-panel li p{font-size:9px}.rhythm-panel>button{font-size:9px;margin-top:18px;padding-top:14px}.footer{padding:24px 4px 25px;font-size:8px}.footer>span:first-child{font-size:13px}dialog{padding:33px 24px}dialog h2{font-size:34px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}
/* A completed canasta squares up into a space-saving pile: one colour-coded card on
   top (red = natural, black = mixed) with an NC/MC tag, fanning open on hover. */
.meld-group.canasta .meld-cards .card{transition:margin-left .15s ease}
.meld-group.canasta:not(:hover) .meld-cards .card{margin-left:-40px}
.meld-group.canasta:not(:hover) .meld-cards .card:first-child{margin-left:0}
.meld-group.canasta:not(:hover) .meld-cards .card:not(.canasta-top){box-shadow:none}
.meld-group.canasta:not(:hover) .meld-cards .card.canasta-top{z-index:5;box-shadow:2px 3px 0 #152e7b55,4px 6px 0 #fffcf1,5px 7px 0 #152e7b40}
.meld-group.canasta .lab-short{font-size:9px;font-weight:700;letter-spacing:1px}
.meld-group.canasta .lab-full{display:none}
.meld-group.canasta:hover .lab-short{display:none}
.meld-group.canasta:hover .lab-full{display:inline}
/* Toolbar actions: invite + a cautionary End game button, collapsing to an icon on narrow screens. */
.toolbar-actions{display:flex;align-items:center;gap:16px}
#end-button{color:var(--red)}
#end-button span{margin:0 0 0 6px}
@media(max-width:500px){.toolbar-actions{gap:10px}#end-button span,#invite-button span{display:none}}
/* Drag-to-reorder the hand (laptop only): grab cursor, a lifted dragged card. */
@media(min-width:851px) and (pointer:fine){.hand>.card{cursor:grab}}
body.dragging-card{user-select:none;cursor:grabbing}
.hand>.card.is-dragging{transition:none;cursor:grabbing;box-shadow:0 12px 22px #14266b66}
/* Phones: drop the fan, line cards up bigger in a horizontal scroller for easier tapping. */
@media(max-width:500px){
  .hand-wrap{height:132px;position:relative}
  .hand{--card-width:60px;justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding:24px 12px 8px;min-height:124px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .hand::-webkit-scrollbar{display:none}
  .hand>.card{width:var(--card-width);height:90px;flex-shrink:0}
  .hand>.card:hover{transform:none}
  .hand>.card.selected,.hand>.card:focus-visible{transform:translateY(-14px) scale(1.02)}
  .hand .card-corner{font-size:20px;left:5px;top:5px}
  .hand .card-corner small{font-size:13px}
  .hand .card-pip{font-size:30px}
  /* Edge indicators: fade + chevron when more cards sit off-screen. */
  .hand-wrap::before,.hand-wrap::after{position:absolute;top:0;bottom:0;width:30px;pointer-events:none;opacity:0;transition:opacity .2s;z-index:4;display:flex;align-items:center;color:#dfe6ff;font:700 24px var(--display)}
  .hand-wrap::before{content:'‹';left:0;justify-content:flex-start;padding-left:4px;background:linear-gradient(to right,var(--blue) 35%,transparent)}
  .hand-wrap::after{content:'›';right:0;justify-content:flex-end;padding-right:4px;background:linear-gradient(to left,var(--blue) 35%,transparent)}
  .hand-wrap.scroll-left::before{opacity:1}
  .hand-wrap.scroll-right::after{opacity:1}
}
/* Keep the whole playing surface in reach on shorter laptop screens. */
@media(min-width:851px) and (max-height:950px){#opponent-melds{height:76px;min-height:76px;max-height:76px;overflow:auto;align-content:center;scrollbar-width:thin;scrollbar-color:#c7d1ff transparent}
  .header{height:76px}.brand{font-size:34px}.brand-symbol{font-size:43px}
  main{padding-top:20px}h1{font-size:48px;margin:10px 0 12px;letter-spacing:-2px}
  .table-toolbar{height:46px}.felt{padding-top:4px;min-height:0}.opponent-avatar{width:34px;height:34px}.opponent-hand{height:60px;margin-top:-10px}.mini-back{height:49px;width:34px;margin-left:-16px}.opponent-melds{top:83px}
  .table-center{margin-top:10px;gap:36px}.pile-block>.card{width:72px;height:99px}.pile-block{gap:8px}.meld-zone{min-height:76px;margin-top:10px}.meld-placeholder{padding:0 15px 9px;gap:4px}.meld-placeholder>span{font-size:18px}.meld-placeholder strong{font-size:11px}.meld-placeholder small{font-size:9px}
  .turn-notice{margin-top:8px}.hand-wrap{height:88px}.hand{min-height:105px;--card-width:66px;padding-top:15px}.hand>.card{height:80px}.hand .card-corner{font-size:19px}.hand .card-pip{font-size:26px}.player-footer{height:40px}.action-bar{min-height:65px;padding-top:10px;padding-bottom:10px}
  .panel-heading{padding-top:17px}.rhythm-panel{margin-top:19px;padding-top:19px}.rhythm-panel h2{font-size:28px;margin:9px 0 16px}.rhythm-panel ol{gap:11px}.rhythm-panel li p{font-size:10px}.rhythm-panel>button{margin-top:14px;padding-top:12px}.activity-panel{padding-top:17px}
}
/* The opponent's public melds are real cards; their hand stays face-down. */
.opponent-melds{top:109px;left:28px;width:calc((100% - 370px)/2);max-width:none;max-height:210px;display:flex;flex-wrap:wrap;align-content:start;gap:14px 12px;overflow:auto;padding:5px 3px 10px;scrollbar-width:thin;scrollbar-color:#c7d1ff transparent}
.opponent-melds .meld-group{flex-shrink:0}.opponent-melds .meld-cards .card{margin-left:-16px}.opponent-melds .meld-cards .card:first-child{margin-left:0}.opponent-melds .meld-group>small{font-size:8px;color:#f9e9aa}
@media(min-width:1151px) and (max-height:950px){.opponent-melds{top:82px;max-height:174px}}
@media(max-width:1150px){.opponent-melds{position:relative;top:auto;left:auto;width:100%;max-width:100%;max-height:none;flex-wrap:nowrap;justify-content:flex-start;gap:18px;padding:6px 8px 10px;margin-top:5px}.opponent-melds:empty{display:none}.opponent-melds .meld-group{margin-right:2px}}
/* New cards travel from their pile and keep a star until the next pickup. */
.hand>.card.is-arriving{visibility:hidden}
.new-card-star{position:absolute;left:1px;top:-13px;width:19px;height:19px;display:flex;align-items:center;justify-content:center;border:1.5px solid #304bc9;border-radius:50%;background:#ffe276;color:#1e2e79;font:700 14px var(--display);box-shadow:0 2px 3px #14266b35;pointer-events:none}
.flying-card{position:absolute!important;z-index:50;pointer-events:none!important;margin:0!important;transform-origin:center!important;box-shadow:0 12px 22px #14266b40;will-change:transform,opacity}
.flying-card .card-corner{font-size:21px}.flying-card .card-corner small{font-size:14px}.flying-card .card-pip{font-size:29px}.flying-card.joker .card-corner{font-size:8px}
@media(max-width:500px){.new-card-star{width:15px;height:15px;top:-11px;font-size:11px}.flying-card .card-corner{font-size:17px;left:4px;top:5px}.flying-card .card-corner small{font-size:11px}.flying-card .card-corner.bottom{display:none}.flying-card .card-pip{font-size:25px}.flying-card.joker .card-corner{font-size:6px}}
/* End-of-hand arithmetic comes from the same server calculation as the score. */
dialog:has(.score-breakdowns){width:min(760px,94vw)}
.score-breakdowns{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:22px 0 8px}
.score-breakdown{border:1px solid #c9c9d3;border-radius:10px;background:#fffdf5;overflow:hidden}
.score-breakdown h3{margin:0;padding:15px 17px;background:#e0e6fb;font-size:20px;font-weight:800}
.score-breakdown:nth-child(2) h3{background:var(--pink)}
.score-math-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 16px;border-bottom:1px solid #ebe5d6;font-size:12px;line-height:1.4}
.score-math-row small{display:block;color:#6b6a75;font-size:10px;margin-top:3px}
.score-math-row strong{font-variant-numeric:tabular-nums;font-size:16px;white-space:nowrap}
.hand-subtotal{background:var(--yellow);font-weight:700;padding-top:15px;padding-bottom:15px}.hand-subtotal strong{font-size:23px}
.match-equation{padding:16px}.match-equation>span{font-size:8px;letter-spacing:1px;font-weight:700}
.match-equation p{margin:7px 0 0;font-size:16px;color:var(--ink);font-variant-numeric:tabular-nums}.match-equation b{white-space:nowrap}
@media(max-width:560px){.score-breakdowns{grid-template-columns:1fr;gap:16px}dialog:has(.score-breakdowns){padding:32px 18px 22px}.score-math-row{font-size:13px}.score-math-row small{font-size:11px}}

.new-card-star{transition:opacity .35s ease}
.new-cards-fading .new-card-star{opacity:0}
.meld-targets{display:flex;flex-direction:column;gap:12px;margin-top:20px}.meld-target{border:1.5px solid #adb8e4;border-radius:9px;background:#e0e6fb;padding:15px;display:flex;align-items:center;justify-content:space-between;gap:15px;text-align:left}.meld-target>span{font-weight:700;font-size:12px}.meld-target .meld-group>small{color:var(--ink)}.meld-target:hover{background:#ffe276}
/* Red threes stay face-up beside the player who collected them. */
.red-threes,.opponent>.red-threes{display:flex;flex-direction:row;align-items:center;gap:3px;margin-left:5px;flex-shrink:0}
.red-threes:empty,.opponent>.red-threes:empty{display:none}
.red-three-card{width:25px;height:35px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;border:1px solid #ded9c9;border-radius:3px;background:#fffcf1;color:#d33d32;font:14px Georgia,serif;line-height:1;box-shadow:0 2px 0 #14266b55;transform:none}
.red-three-card:nth-child(even){transform:none}.red-three-card b{font-weight:400}.red-three-card>span{font-size:14px;margin-top:2px}
@media(max-width:500px){.red-threes,.opponent>.red-threes{gap:2px;margin-left:2px}.red-three-card{width:20px;height:29px;font-size:12px}.red-three-card>span{font-size:12px}.you{gap:6px}}
.player-name-row{display:flex;align-items:center;gap:7px}.player-name-row .red-three-card{width:20px;height:27px;font-size:11px}.player-name-row .red-three-card>span{font-size:11px;margin-top:1px}
@media(max-width:500px){.player-name-row{gap:4px}.player-name-row:has(.red-three-card) #your-name>span{display:none}}
.opponent>.red-threes>.red-three-card{color:#d33d32;font-size:14px}
@media(max-width:500px){.opponent>.red-threes>.red-three-card{font-size:12px}}
/* ============================================================
   Table layout: three stacked bands around the centre pot.
   The opponent's table (top) mirrors yours (bottom) — each
   player's hand sits nearest their own seat, with their melds
   pushed out toward the shared draw/discard pot in the middle.
   ============================================================ */
.felt::before,.felt::after{display:none}
.felt-side{position:relative;z-index:1;display:flex;flex-direction:column;gap:12px;padding:14px 18px;border-radius:18px;background:#ffffff08;box-shadow:inset 0 0 0 1px #c0ccfc26}
/* Opponent's face-down hand tucks just under their seat bar. */
.opponent-hand{height:auto;min-height:60px;margin-top:4px;justify-content:center;align-items:flex-start}
/* Opponent melds now flow in a centred, wrapping row toward the pot
   instead of being absolutely pinned to the felt's left edge. */
.opponent-melds{position:static;left:auto;top:auto;width:auto;max-width:100%;max-height:none;overflow:visible;display:flex;flex-wrap:wrap;align-content:flex-start;justify-content:center;gap:14px 16px;padding:2px 0 0;margin:0}
.opponent-melds:empty{display:none}
/* The pot is the dividing line between the two tables. */
.table-center{margin-top:0;position:relative}
.table-center::before,.table-center::after{content:"";position:absolute;top:50%;height:1px;width:13%;background:linear-gradient(90deg,transparent,#c0ccfc55)}
.table-center::before{left:2%}
.table-center::after{right:2%;transform:scaleX(-1)}
/* Your melds sit nearest the pot; your hand nearest you. */
.meld-zone{margin-top:0}
.turn-notice{margin:0 auto}
@media(max-width:850px){.felt-side{padding:12px}.opponent-melds{gap:10px 12px}}
@media(max-width:500px){.felt-side{padding:10px 8px;border-radius:14px}.table-center::before,.table-center::after{display:none}}
