:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#f4f1df;background:#153e32;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--canvas: #f7f5ef;--pine: #183e35;--sage: #bdd5a8;--ink: #f4f1df;--muted: #b1c5b8;--line: #dce0d7;--coral: #c45648;--card: #fffcf5;--serif: Georgia, "Times New Roman", serif}*{box-sizing:border-box}body{margin:0;min-width:320px}body:before{content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;background:radial-gradient(ellipse at 50% 40%,#22573b22,#071e1b80),linear-gradient(#163e3266,#163e3266),url(/art/felt.webp) center / 680px}button,input{font:inherit}button{cursor:pointer;border:0;color:inherit;touch-action:manipulation}button,input,a{-webkit-tap-highlight-color:transparent}button,a,input{outline-offset:5px}:focus-visible{outline:2px solid #c7dda7}button:disabled{cursor:default}a{color:inherit}input{width:100%;height:56px;border:1px solid #eff7dd38;border-radius:13px;background:#05261e50;padding:0 16px;color:var(--ink);font-size:16px;box-shadow:inset 0 1px 3px #001b1a25}input:focus{border-color:#ccddbe}input::placeholder{color:#9fb7a7}.app-shell{max-width:1100px;min-height:100svh;min-height:100dvh;margin:auto;padding:max(10px,env(safe-area-inset-top)) 32px max(24px,env(safe-area-inset-bottom));display:flex;flex-direction:column}.app-header{height:76px;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:20;flex-shrink:0}.brand-button{background:none;padding:0;min-height:44px;text-align:left}.brand{display:inline-flex;gap:11px;align-items:center;font-family:var(--serif);font-size:27px;letter-spacing:-.7px;font-weight:500}.brand-mark{display:grid;grid-template-columns:repeat(2,8px);gap:3px}.brand-mark i{width:8px;height:8px;background:#efedda;border-radius:2px}.brand-mark i:nth-child(2n){background:#9abb96}.header-actions{display:flex;align-items:center;position:relative}.icon-button{width:44px;height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:transparent;flex-shrink:0}.icon-button:hover{background:#ffffff12}.menu-button{background:#09291f50;box-shadow:inset 0 0 0 1px #efffde20,0 2px 5px #09201b15}.text-button{min-height:44px;background:none;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:4px 0;font-size:14px;color:#d3dfcb;text-underline-offset:4px}.text-button:hover{color:#fff;text-decoration:underline}.menu-dismiss{position:fixed;inset:0;background:transparent;z-index:21;cursor:default}.menu{z-index:22;position:absolute;top:52px;right:0;width:232px;background:#163b30;border:1px solid #e8f3d92b;border-radius:17px;padding:8px;box-shadow:0 15px 40px #061c1b70}.menu button{background:transparent;display:flex;gap:10px;align-items:center;width:100%;text-align:left;padding:14px 12px;border-radius:10px;font-size:14px}.menu button:hover{background:#ffffff0d}.menu-name{color:var(--muted);font-size:12px;padding:12px;border-bottom:1px solid #e2eddb26;margin-bottom:4px;overflow-wrap:anywhere}.primary-button,.secondary-button{width:100%;min-height:56px;padding:14px 20px;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:12px;background:#f2f0de;color:#183e35;font-size:16px;font-weight:550;box-shadow:inset 0 1px #ffffffb3,0 3px 8px #09251d20;transition:background .15s,transform .15s}.primary-button span,.secondary-button span{flex:1;text-align:center}.primary-button:hover:not(:disabled){background:#fffdee}.primary-button:active:not(:disabled),.secondary-button:active:not(:disabled){transform:scale(.987)}.primary-button:disabled{background:#e6ecda20;color:#d5dfc9a6;box-shadow:inset 0 0 0 1px #f4f7e11a}.secondary-button{background:#0c302548;color:var(--ink);border:1px solid #d8e9cd3d;box-shadow:none}.secondary-button:hover:not(:disabled){background:#c9e2b519}.secondary-button:disabled{opacity:.5}.nickname-form{display:flex;flex-direction:column;gap:14px}.nickname-form label,.join-form label{font-size:14px;font-weight:500}.form-note{font-size:12px;line-height:1.6;text-align:center;color:#788479;margin:2px 0}.lobby{width:100%;max-width:350px;margin:auto;padding:35px 0 60px}.lobby-cards{margin-bottom:52px}.lobby-cards .card-fan{--card-width: 106px;--card-step: 65px;height:185px}.lobby-cards .card-slot:first-child{--fan-rotation: -13deg !important}.lobby-cards .card-slot:last-child{--fan-rotation: 13deg !important}.lobby h1{margin:0 0 10px;text-align:center;font:29px/1.2 var(--serif);letter-spacing:-.7px}.lobby h1 label{font:inherit}.play-options{display:flex;flex-direction:column;gap:13px}.play-options button span{text-align:left}.join-link{margin-top:6px}.join-form{display:flex;flex-direction:column;gap:9px;margin-top:8px}.join-input-row{display:flex;gap:9px}.join-input-row input{min-width:0;letter-spacing:2px}.join-input-row .primary-button{width:100px}.resume-button{display:flex;align-items:center;gap:12px;padding:16px 20px;color:#e3ebd9;background:#cee5ba16;border:1px solid #d8e9cd30;border-radius:14px;min-height:56px;font-size:16px}.resume-button span{flex:1;text-align:left}.game-layout{--hand-card-width: 91px;--hand-card-step: 55px;--hand-zone-height: 154px;--played-width: 65px;--played-offset: 20px;--score-space: 74px;--pegging-zone-height: calc(var(--score-space) + var(--played-width) * 1.4 + var(--played-offset));position:relative;width:100%;max-width:560px;margin:0 auto;flex:1;display:flex;flex-direction:column}.scoreboard{display:flex;flex-direction:column;gap:16px;margin:6px 0 16px;flex-shrink:0}.score-row{position:relative;display:flex;justify-content:space-between;align-items:center;padding:0 4px}.player-score{max-width:43%}.opponent-score{text-align:right}.opponent-score .score-name{justify-content:flex-end}.score-name{font-size:13px;color:#d1decd;display:flex;align-items:center;gap:6px;min-height:22px}.player-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:125px}.score-dot{width:6px;height:6px;border-radius:50%;background:#bdd5a8;flex-shrink:0}.score-dot.coral{background:#ee8974}.dealer-marker{border:1px solid #d9e5c850;border-radius:50%;width:16px;height:16px;flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;font-size:9px}.score-numbers strong{font:48px/1 var(--serif);letter-spacing:-1.8px;font-variant-numeric:tabular-nums}.round-number{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#b5cab7;font-size:11px;white-space:nowrap}.peg-board{padding:0 1px}.peg-board svg{display:block;width:100%;height:auto}.table{position:relative;display:flex;flex-direction:column;flex:1;min-height:380px;padding:0}.opponent-zone{height:var(--hand-zone-height);flex-shrink:0;position:relative}.opponent-area,.player-zone .hand-area{display:flex;justify-content:flex-end;width:100%;padding:0}.opponent-area .card-fan,.player-zone .card-fan{--card-width: var(--hand-card-width);--card-step: var(--hand-card-step);height:var(--hand-zone-height);width:min(100%,calc(var(--card-width) + max(0,var(--hand-count) - 1) * var(--card-step) + 26px))}.player-zone{height:var(--hand-zone-height);flex-shrink:0;position:relative}.crib,.starter{display:flex;flex-direction:column;align-items:center;gap:9px}.crib{position:absolute;left:0;top:32px;z-index:2;width:48px;transition:top .38s cubic-bezier(.2,.8,.2,1)}.crib-owned-by-you{top:calc(100% - 86px)}.crib-owned-by-opponent.crib-full-hand{top:var(--hand-zone-height)}.crib-owned-by-you.crib-full-hand{top:calc(100% - var(--hand-zone-height) - 76px)}.crib>span,.starter>span{color:#c1d1bc;font-size:11px}.crib-stack{position:relative;border-radius:6px;box-shadow:2px 3px #bbc3a6,3px 5px #061f1b75}.crib-stack .card-small{--card-width: 44px}.crib-empty{width:44px;height:64px;border:1px solid #daebc62e;box-shadow:inset 0 0 0 3px #123728}.table-middle{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:var(--pegging-zone-height);padding:0}.hand-area{width:100%;padding-top:20px;flex-shrink:0}.table-action{position:sticky;bottom:max(8px,env(safe-area-inset-bottom));z-index:6;width:min(100%,clamp(208px,72%,300px));margin:10px 0 0 auto;min-height:60px;font-size:18px;font-weight:500;flex-shrink:0}.table-action.settling-play{visibility:hidden}.table-action.awaiting-turn{background:#07281e66;border:1px solid #e3ead020;color:#c6d8bc;box-shadow:none;font-size:15px}.table-action.awaiting-turn>span:not(.turn-pulse){flex:initial}.turn-pulse{flex:0 0 5px!important;width:5px;height:5px;background:#bdd5a8;border-radius:50%;animation:breathe .7s infinite alternate}.pegging-area{width:100%}.pegging-cards{display:grid;grid-template-columns:54px minmax(0,1fr);grid-template-rows:var(--score-space) 1fr;column-gap:20px;height:var(--pegging-zone-height)}.starter-column{grid-column:1;grid-row:1 / 3;align-self:center;display:flex;flex-direction:column;align-items:center;gap:15px}.running-count{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:46px}.running-count>span{color:#c4d5bb;font-size:10px}.running-count strong{font:32px/.95 var(--serif);animation:score-in .2s ease-out;min-width:33px;text-align:center}.played-cards{--played-step: min(34px, calc((100% - var(--played-width)) / var(--played-intervals)));position:relative;grid-column:2;grid-row:2;height:calc(var(--played-width) * 1.4 + var(--played-offset));min-width:0}.played-cards .card-small{--card-width: var(--played-width)}.played-card{position:absolute;left:calc(var(--played-index) * var(--played-step));top:0;animation:opponent-deal-in .26s ease-out;transition:filter .2s ease}.played-card-complete{filter:brightness(.58) saturate(.35)}.played-by-you{top:var(--played-offset);animation-name:deal-in}.played-card:after{content:"";position:absolute;left:4px;right:4px;bottom:-2px;height:2px;border-radius:3px;background:#d78a74;opacity:.7}.played-by-you:after{background:#b5d59d}.pegging-score-region{position:absolute;top:calc(50% - var(--pegging-zone-height) / 2);left:74px;right:0;z-index:4;pointer-events:none}.pegging-score-toast{padding:8px 12px;border-left:2px solid #bdd5a8;border-radius:0 9px 9px 0;background:#0b2d23e6;box-shadow:0 3px 12px #041e181c;animation:score-in .18s ease-out}.pegging-score-toast[data-player=opponent]{border-color:#ee8974}.pegging-score-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.pegging-score-owner{color:#d9e5d0;font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.pegging-score-total{font:22px/1 var(--serif);color:#cde3b8;font-variant-numeric:tabular-nums}.pegging-score-toast[data-player=opponent] .pegging-score-total{color:#f2a18d}.pegging-score-items{list-style:none;margin:3px 0 0;padding:0;font-size:12px;line-height:1.4}.pegging-score-item{display:inline}.pegging-score-item+.pegging-score-item:before{content:" · ";color:#a7bd9e}.is-counting .pegging-score-region{top:0;left:74px}.counting-layout{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:30px;flex:1;padding:24px 0 38px}.counting-cards{width:100%;max-width:440px;display:flex;align-items:center;justify-content:center;gap:14px}.counting-cards .hand-area{width:calc(100% - 80px);padding:0}.counting-cards .card-fan{--card-step: 43px}.counting-cards .starter{margin-top:16px}.is-counting .table:has(.pegging-score-toast) .counting-layout{padding-top:80px}.count-result{width:100%;max-width:310px;padding:0 12px}.count-result h1{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 0 12px;font:24px/1.2 var(--serif)}.count-result h1 span{overflow-wrap:anywhere}.count-result h1 strong{font-size:38px;font-weight:400;font-variant-numeric:tabular-nums}.score-details{font-size:13px}.score-details>div{display:flex;justify-content:space-between;gap:14px;padding:9px 0;border-top:1px solid #dce7c926}.score-details span{color:#c3d3bf}.score-details strong{font-variant-numeric:tabular-nums;font-weight:500}.game-result,.counting-title{font:30px/1.2 var(--serif);text-align:center;margin:0;overflow-wrap:anywhere}.waiting-code{display:flex;flex-direction:column;align-items:center;gap:12px;margin:auto;padding:30px 0;width:100%}.waiting-cards{width:100%;margin-bottom:30px}.waiting-code h1{font:28px/1.2 var(--serif);margin:0 0 16px}.waiting-code>span{color:#b8d0b8;font-size:12px}.waiting-code strong{letter-spacing:4px;font-size:31px;font-weight:400;font-variant-numeric:tabular-nums}.waiting-code input{max-width:350px;margin-top:16px;font-size:12px;height:44px;text-align:center}.card-fan{--card-width: 91px;--card-step: 55px;--selection-lift: 18px;position:relative;isolation:isolate;width:100%;height:154px}.playing-card{display:block;position:relative;width:var(--card-width, 91px);height:calc(var(--card-width, 91px) * 1.4);padding:0;background:transparent;border-radius:calc(var(--card-width, 91px) * .05);border:0;box-shadow:0 5px 10px #041b1855;flex-shrink:0;transition:filter .15s}.card-slot{position:absolute;left:calc(50% - var(--card-width) / 2);top:8px;width:var(--card-width);z-index:var(--card-index);pointer-events:none;transform:translate3d(calc(var(--fan-x) * var(--card-step)),var(--fan-y),0)}.card-lift{transform:translateZ(0);transition:transform .18s cubic-bezier(.2,.8,.2,1);will-change:transform}.card-lift[data-selected=true]{transform:translate3d(0,calc(-1 * var(--selection-lift)),0)}.card-slot .playing-card{pointer-events:auto;transform:rotate(var(--fan-rotation));transform-origin:50% 120%}.fan-opponent .card-slot{top:auto;bottom:8px}.fan-opponent .card-slot .playing-card{transform-origin:50% -20%}.card-slot .playing-card.selected{box-shadow:0 0 0 3px #bdd5a8,0 8px 12px #061b2133}.card-art{display:block;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.playing-card:disabled{filter:saturate(.85) brightness(.94)}.card-small{--card-width: 54px}.fan-small{--card-width: 54px;--card-step: 33px;height:91px}.error-banner{display:flex;gap:10px;align-items:center;padding:8px 12px;background:#f6e7de;border:1px solid #e8c5b4;border-radius:12px;color:#8c3f29;font-size:13px;margin:0 auto 14px;max-width:650px}.error-banner>span{flex:1}.error-banner svg{flex-shrink:0}.connection-note{background:#eee8cb;color:#6b602c;font-size:12px;padding:12px;margin-bottom:10px;border-radius:10px}.loading-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:65vh}.loading-dot{width:12px;height:12px;border-radius:50%;background:#8ca393;animation:breathe 1s infinite alternate}.sheet{border:0;border-radius:24px;background:var(--canvas);color:var(--pine);max-width:510px;width:calc(100% - 32px);max-height:85dvh;padding:0;box-shadow:0 24px 100px #10271e33}.sheet::backdrop{background:#14271f75;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.sheet-content{padding:25px}.sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.sheet-heading h2{font:27px/1.1 var(--serif);margin:0;letter-spacing:-.5px}.help-content p{font-size:14px;line-height:1.7;color:#6d7d6f;margin:7px 0 21px}.help-content h3{margin:22px 0 6px;font-size:15px;font-weight:600}.scoring-guide{font-size:13px;line-height:1.5;padding:12px 0;margin:0}.scoring-guide>div{display:flex;justify-content:space-between;gap:20px;padding:9px 0;border-bottom:1px solid var(--line)}.scoring-guide dd{margin:0;white-space:nowrap;font-weight:600}.help-content .muted{font-size:12px}.source-link{font-size:12px;text-underline-offset:4px;line-height:1.5}.history-list{list-style:none;padding:0;margin:0}.history-list li{display:flex;gap:15px;justify-content:space-between;font-size:13px;line-height:1.5;padding:12px 0;border-bottom:1px solid var(--line)}.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}.sheet{--muted: #6f8077}.sheet .primary-button{background:var(--pine);color:var(--canvas)}.sheet .primary-button:disabled{opacity:.5}.sheet .icon-button:hover{background:#173e3510}.sheet input{color:var(--pine);background:#fffdf8;border-color:#ccd4c8}@keyframes breathe{0%{opacity:.4;transform:scale(.8)}to{opacity:1;transform:scale(1.1)}}@keyframes deal-in{0%{opacity:.3;transform:translateY(30px) rotate(-4deg)}to{opacity:1;transform:none}}@keyframes opponent-deal-in{0%{opacity:.3;transform:translateY(-30px) rotate(4deg)}to{opacity:1;transform:none}}@keyframes score-in{0%{transform:scale(.9);opacity:.5}to{transform:scale(1);opacity:1}}@media(min-width:800px){.game-layout{max-width:580px}.table{min-height:410px}.scoreboard{margin-top:4px}.lobby{max-width:360px}}@media(max-width:650px){.game-layout{--hand-card-width: 80px;--hand-card-step: 47px;--hand-zone-height: 148px;--played-width: 60px}.app-shell{padding:max(2px,env(safe-area-inset-top)) 22px max(16px,env(safe-area-inset-bottom))}.app-header{height:64px}.brand{font-size:23px;gap:10px}.brand-mark{display:none}.menu-button{width:40px;height:40px}.lobby{padding:28px 3px 35px}.lobby-cards{margin-bottom:40px}.scoreboard{gap:13px;margin:7px 0 16px}.score-name{font-size:12px;min-height:20px}.score-numbers strong{font-size:43px}.player-name{max-width:100px}.peg-board svg{height:auto}.table{min-height:0}.pegging-cards{grid-template-columns:48px minmax(0,1fr);column-gap:18px}.pegging-score-region{left:66px}.table-action{margin-top:6px;font-size:17px}.card-fan{--card-width: 80px;--card-step: 47px;--selection-lift: 16px;height:148px}.fan-small{--card-width: 48px;--card-step: 25px;height:80px}.card-small{--card-width: 43px}.counting-cards{gap:8px}.counting-cards .hand-area{width:calc(100% - 58px)}.counting-cards .card-fan{--card-step: 40px}.counting-layout{padding:20px 0 30px;gap:22px}.count-result{max-width:285px}.count-result h1{font-size:23px}.error-banner{font-size:12px;padding:6px 10px}.sheet{border-radius:22px}.sheet-content{padding:23px 20px}.sheet-heading h2{font-size:25px}}@media(max-width:375px){.game-layout{--hand-card-width: 72px;--hand-card-step: 42px;--hand-zone-height: 136px;--played-width: 54px}.app-shell{padding-inline:16px}.brand{font-size:22px}.card-fan{--card-width: 72px;--card-step: 42px;height:136px}.fan-small{--card-width: 40px;--card-step: 21px;height:75px}.counting-cards .card-fan{--card-step: 35px}}@media(max-height:740px)and (max-width:650px){.game-layout{--hand-card-width: 68px;--hand-card-step: 43px;--hand-zone-height: 126px;--played-width: 54px;--score-space: 70px}.app-header{height:52px}.scoreboard{margin-bottom:9px;gap:9px}.score-numbers strong{font-size:38px}.running-count{height:44px}.running-count strong{font-size:30px}.hand-area{padding-top:14px}.counting-layout{padding-block:16px;gap:16px}.lobby-cards{margin-bottom:28px}}@media(max-width:350px){.game-layout{--hand-card-width: 66px;--hand-card-step: 37px;--hand-zone-height: 118px;--played-width: 50px}.card-fan{--card-width: 66px;--card-step: 37px;height:118px}.fan-small{--card-width: 38px;--card-step: 20px;height:72px}.counting-cards .card-fan{--card-step: 33px}.lobby h1{font-size:26px}.pegging-cards{grid-template-columns:43px minmax(0,1fr);column-gap:14px}.pegging-score-region{left:57px}}@media(max-height:620px)and (max-width:650px){.game-layout{--hand-card-width: 60px;--hand-card-step: 37px;--hand-zone-height: 110px;--played-width: 46px;--played-offset: 16px;--score-space: 64px}.app-header{height:44px}.scoreboard{gap:6px;margin:2px 0 6px}.score-numbers strong{font-size:32px}.score-name{min-height:18px}.peg-board svg{max-height:22px}.table-action{min-height:56px}.starter-column{gap:8px}.starter-column .starter{gap:5px}.starter-column .card-small{--card-width: 36px}.running-count{height:37px}.pegging-score-toast{padding:6px 10px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
