:root{--ink:#243e36;--sky:#08afd0;--yellow:#ffe245;--orange:#f58020;--green:#d7efab;--paper:#fffdf4;--line:#dbe3d7;--shadow:4px 5px 0 var(--ink);font-family:ui-rounded,'Avenir Next','Trebuchet MS',system-ui,sans-serif;color:var(--ink);background:#eaf3e6;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-height:100svh;background:radial-gradient(ellipse at 0 30%,#cfebdc 0,transparent 55%),#eef4e7}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button{cursor:pointer;color:inherit;touch-action:manipulation}button:disabled{opacity:.45;cursor:default}button,a,input{outline-offset:4px}button:focus-visible,a:focus-visible{outline:3px solid #007fba}button{border:0}a{color:inherit}h1,h2,h3,p{margin:0}h1,h2,h3{line-height:1.15}h2{font-size:1.65rem;letter-spacing:-.05em}p{line-height:1.55}.topbar{max-width:1080px;margin:auto;padding:24px 28px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;font-weight:950;font-size:1.2rem;letter-spacing:-.05em}.brand img{border:2px solid var(--ink);border-radius:12px;transform:rotate(-7deg)}.brand small{display:block;font-size:.63rem;letter-spacing:.19em;margin-top:2px}.icon-button{height:40px;width:40px;flex-shrink:0;display:grid;place-items:center;background:var(--paper);border:2px solid var(--ink);border-radius:50%;font-size:1.15rem;font-weight:800}.icon-button:hover{background:var(--yellow)}main{max-width:1024px;margin:12px auto 0;padding:0 24px}.setup-layout{display:grid;grid-template-columns:1.05fr 1fr;gap:30px;align-items:stretch}.intro{position:relative;overflow:hidden;background:var(--sky);border:2px solid var(--ink);border-radius:25px;min-height:570px;display:flex;flex-direction:column;padding:34px 26px 0;box-shadow:var(--shadow)}.eyebrow{font-size:.72rem;font-weight:850;letter-spacing:.13em;text-transform:uppercase}.intro .eyebrow{text-align:center;color:#133d41}.logo-title{font-size:clamp(2.2rem,4.8vw,3.6rem);font-weight:1000;letter-spacing:-.07em;text-align:center;line-height:1;transform:rotate(-5deg);color:var(--yellow);-webkit-text-stroke:1.5px var(--ink);text-shadow:3px 4px 0 var(--ink);margin:26px -12px 20px}.intro-tagline{text-align:center;font-size:1.13rem;font-weight:750}.scene{width:calc(100% + 52px);margin:25px -26px 0;flex:1;object-fit:cover;object-position:50% 100%;min-height:0}.intro-note{position:absolute;bottom:24px;left:50%;transform:translateX(-50%) rotate(-3deg);white-space:nowrap;background:var(--yellow);padding:9px 18px;border:2px solid var(--ink);border-radius:8px;font-size:.78rem;font-weight:900;box-shadow:2px 3px 0 var(--ink)}.card{background:var(--paper);border:2px solid var(--ink);border-radius:25px;box-shadow:var(--shadow)}.setup-card{padding:28px;display:flex;flex-direction:column}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}.section-heading h1{font-size:1.85rem;letter-spacing:-.05em}.section-heading p{font-size:.9rem;margin-top:7px;color:#5e6d5f}.pill{padding:7px 10px;background:#e7efd9;border:1px solid #c6d4bc;border-radius:20px;font-weight:800;font-size:.73rem;white-space:nowrap}.field-label{display:block;font-weight:800;font-size:.85rem;margin:0 0 11px}.player-count{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin-bottom:25px}.count-button{background:#eef2e8;border:2px solid #d6dfcf;border-radius:12px;height:47px;font-weight:850;font-size:1.15rem}.count-button[aria-pressed=true]{background:var(--yellow);border-color:var(--ink);box-shadow:2px 3px 0 var(--ink);transform:translateY(-2px)}.players{display:grid;gap:10px;margin-bottom:24px}.player-field{display:flex;align-items:center;gap:12px}.avatar{width:35px;height:35px;border:1.5px solid var(--ink);border-radius:11px;display:inline-grid;place-items:center;font-size:.85rem;font-weight:900;flex-shrink:0;background:var(--player-color,#ffe245)}.player-field input{width:100%;min-width:0;border:1.5px solid #cad5c5;background:white;border-radius:10px;padding:11px 13px;color:var(--ink);font-size:1rem}.player-field input:focus{outline:none;border-color:var(--ink);box-shadow:0 0 0 3px #ffe24580}.player-field input::placeholder{color:#7b877b}.button{border:2px solid var(--ink);border-radius:13px;padding:13px 18px;font-weight:850;font-size:1rem;display:flex;align-items:center;justify-content:center;gap:10px;min-height:49px;box-shadow:2px 3px 0 var(--ink);transition:transform .12s,box-shadow .12s}.button:active{transform:translate(2px,3px);box-shadow:0 0 0 var(--ink)}.primary{background:var(--yellow)}.primary:hover{background:#ffeb77}.secondary{background:var(--paper)}.start-button{width:100%;margin-top:auto;font-size:1.12rem}.play-icon{font-size:.85rem}.form-note{font-size:.76rem;color:#64735f;text-align:center;margin-top:15px}.text-button{background:none;text-decoration:underline;text-underline-offset:4px;font-weight:700;padding:10px;font-size:.9rem}.resume-button{width:100%;margin-bottom:16px;background:#e2efce}.footer{max-width:1024px;padding:26px 26px 20px;margin:auto;display:flex;justify-content:space-between;gap:10px;font-size:.72rem;color:#65765e}.footer span:last-child{opacity:.8}.page-heading{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:22px}.page-heading h1{font-size:2.2rem;letter-spacing:-.055em;margin:6px 0}.page-heading p{font-size:.9rem}.page-heading .button{font-size:.85rem;min-height:40px;padding:10px 14px}.game-card{overflow:hidden}.game-status{background:#e3f0d0;border-bottom:2px solid var(--ink);padding:18px 22px;display:flex;justify-content:space-between;gap:14px;align-items:center}.round-dots{display:flex;gap:6px}.round-dot{width:28px;height:28px;border:1.5px solid var(--ink);border-radius:50%;display:grid;place-items:center;font-size:.7rem;font-weight:850;background:var(--paper)}.round-dot.done{background:#598f37;color:white}.round-dot.current{background:var(--yellow)}.table-scroll{overflow-x:auto;overscroll-behavior-x:contain}table{border-collapse:separate;border-spacing:0;width:100%;text-align:center;table-layout:fixed}th,td{border-bottom:1px solid var(--line);padding:8px;min-width:77px}thead th{height:91px;background:#fffdf4;font-size:.9rem;overflow-wrap:anywhere}thead .avatar{display:flex;margin:0 auto 7px;width:29px;height:29px;border-radius:9px;font-size:.72rem}th:first-child{width:90px;position:sticky;left:0;background:#f4f6e9;z-index:1;border-right:1px solid var(--line);font-size:.8rem}thead th:first-child{font-size:.65rem;letter-spacing:.08em}tbody th{font-size:.8rem;font-weight:750}tbody tr:nth-child(even) td{background:#fafbf3}.score-cell{width:100%;height:47px;border:1.5px dashed #c4cebb;background:transparent;border-radius:10px;font-size:1.25rem;font-weight:800;font-variant-numeric:tabular-nums}.score-cell.empty{font-weight:400;color:#8d9c83}.score-cell.filled{border-color:transparent}.score-cell:hover{border:1.5px solid var(--ink);background:#fff1a1}.score-cell.next{border:2px solid var(--ink);background:#fff1a1;box-shadow:2px 2px 0 var(--ink);color:var(--ink)}tfoot th,tfoot td{height:85px;border-bottom:0;background:#fff0d7}tfoot th:first-child{background:#fff0d7}tfoot strong{font-size:1.6rem;display:block;color:#ab4a08}tfoot small{font-size:.65rem;display:block;margin-top:5px;font-weight:800}tfoot.final th:first-child,tfoot.final td{background:#e2efce}tfoot.final strong{color:#356b28}.game-bottom{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:22px}.game-bottom p{font-size:.8rem;color:#65765e}.game-bottom .button{min-width:180px}.scroll-note{font-size:.7rem;padding:9px 14px;border-bottom:1px solid var(--line);display:none;color:#65765e}.results-banner{background:var(--sky);position:relative;overflow:hidden;padding:30px;display:flex;gap:20px;align-items:center;margin-bottom:25px}.results-banner>div{position:relative;z-index:1;flex:1}.results-banner h1{font-size:2.6rem;letter-spacing:-.06em;margin:12px 0;overflow-wrap:anywhere}.results-banner .winner-name{color:var(--yellow);text-shadow:2px 2px 0 var(--ink);-webkit-text-stroke:.6px var(--ink)}.results-banner p{font-weight:700}.results-banner img{width:230px;margin:-35px -35px -50px 0;align-self:end}.results-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:25px}.ranking-card{padding:24px}.ranking-card h2{margin-bottom:18px}.rank-row{display:flex;align-items:center;gap:13px;padding:15px 0;border-bottom:1px solid var(--line)}.rank-row:last-child{border:0}.rank-number{width:29px;font-weight:850;font-size:1.1rem}.rank-row.winner .rank-number{color:#997100}.rank-name{flex:1;font-weight:750;overflow-wrap:anywhere;min-width:0}.rank-score{font-size:1.35rem;font-weight:900}.rank-score small{font-size:.65rem;font-weight:600;display:block;text-align:right}.highlights{display:flex;flex-direction:column;gap:18px}.highlight{padding:23px;flex:1}.highlight.best{background:#e2efce}.highlight.worst{background:#ffe9ce}.highlight-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.highlight h2{font-size:1.1rem;letter-spacing:-.025em}.highlight-score{font-size:2.2rem;font-weight:950;line-height:1}.highlight p{font-size:.85rem;margin-top:13px;overflow-wrap:anywhere}.highlight ul{margin:10px 0 0;padding-left:18px;font-size:.85rem;line-height:1.6}.highlight details{font-size:.8rem;margin-top:10px}.results-actions{display:flex;justify-content:center;gap:14px;margin-top:28px}dialog{color:var(--ink);border:2px solid var(--ink);padding:25px;background:var(--paper);border-radius:24px;max-height:calc(100dvh - 24px);overflow:auto;box-shadow:5px 6px 0 #243e3633}dialog::backdrop{background:#163e3ab3;backdrop-filter:blur(3px)}.score-dialog{width:min(420px,calc(100% - 24px));padding:15px 22px 12px}.sheet-handle{width:40px;height:4px;border-radius:4px;background:#c8d2bc;margin:0 auto 15px}.score-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.score-top h2{margin-top:5px;overflow-wrap:anywhere}.score-top>div{min-width:0}.calculator-display{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;background:#e9efd9;border:2px solid var(--ink);border-radius:13px;margin-bottom:15px;min-height:82px}.calculator-display span{font-size:.65rem;font-weight:850;letter-spacing:.12em}.calculator-display output{font-size:2.45rem;font-weight:900;font-variant-numeric:tabular-nums;line-height:1}.calculator-display output.blank{color:#91a17c}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.keypad button{height:55px;border:1.5px solid #c4cebb;border-bottom:3px solid #b5c2aa;border-radius:12px;background:white;font-size:1.6rem;font-weight:750}.keypad button:active{background:var(--yellow);transform:translateY(1px)}.enter{width:100%;margin-top:14px;justify-content:space-between}.enter span{font-size:1.4rem}.clear-score{display:block;margin:7px auto 0;font-size:.77rem}.info-dialog{width:min(440px,calc(100% - 32px));padding:26px}.info-dialog p{margin:17px 0;font-size:.95rem}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.info-dialog ol{padding-left:23px;line-height:1.8;font-size:.95rem}.tip{padding:15px;background:#e8efd9;border-radius:12px;font-size:.85rem;line-height:1.55}.info-dialog p.small{font-size:.8rem}.dialog-actions{display:flex;gap:12px;margin-top:20px}.dialog-actions .button{flex:1}.error{color:#a42c16;font-size:.85rem;line-height:1.4;margin-bottom:14px}.storage-warning{color:#a42c16!important}.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}
@media(min-width:900px){.setup-card{min-height:570px}.players{gap:12px}}
@media(max-width:700px){.topbar{padding:18px 18px 10px}.brand{font-size:1.05rem}.brand img{width:36px;height:36px}.brand small{font-size:.57rem}main{padding:0 16px;margin-top:12px}.setup-layout{grid-template-columns:1fr;gap:20px;max-width:460px;margin:auto}.intro{min-height:0;height:255px;padding:20px 20px 0;border-radius:20px}.intro .eyebrow{font-size:.63rem}.logo-title{font-size:2.7rem;margin:14px 0 10px;text-align:left;align-self:flex-start;z-index:1}.intro-tagline{font-size:.86rem;text-align:left;max-width:140px;margin-top:10px;z-index:1}.scene{position:absolute;width:310px;height:215px;right:-36px;bottom:-5px;object-fit:contain;margin:0;flex:none}.intro-note{left:22px;bottom:22px;transform:rotate(-5deg);font-size:.62rem;padding:7px 9px}.setup-card{padding:22px;border-radius:20px}.section-heading{margin-bottom:22px}.section-heading h1{font-size:1.6rem}.section-heading p{font-size:.8rem}.player-count{margin-bottom:24px}.players{gap:10px}.footer{flex-direction:column;text-align:center;font-size:.65rem;padding:25px 18px max(20px,env(safe-area-inset-bottom))}.page-heading{margin-bottom:18px;align-items:flex-start}.page-heading h1{font-size:1.8rem}.page-heading .eyebrow{font-size:.6rem}.page-heading p{font-size:.8rem}.page-heading .button{font-size:.73rem;padding:8px 10px;min-height:36px;margin-top:5px}.game-card{border-radius:18px}.game-status{padding:14px 12px;gap:8px}.game-status strong{font-size:.82rem}.round-dots{gap:4px}.round-dot{width:23px;height:23px;font-size:.6rem}th,td{padding:5px}th:first-child{width:66px}thead th{font-size:.8rem;height:83px}tbody th{font-size:.73rem!important}.score-cell{height:47px;font-size:1.12rem}tfoot strong{font-size:1.4rem}tfoot small{font-size:.57rem}tfoot th,tfoot td{height:78px}.game-bottom{flex-direction:column;gap:15px}.game-bottom .button{width:100%}.game-bottom p{text-align:center;font-size:.73rem}.scroll-note{display:block}.results-banner{padding:23px 20px;border-radius:20px;min-height:210px;margin-bottom:20px}.results-banner h1{font-size:2rem;max-width:230px}.results-banner p{font-size:.83rem;max-width:190px}.results-banner img{width:190px;position:absolute;right:-26px;bottom:-10px;opacity:.9}.results-banner>div{padding-right:65px}.results-banner .eyebrow{font-size:.65rem}.results-grid{grid-template-columns:1fr;gap:20px}.ranking-card{padding:22px}.highlights{gap:18px}.highlight{padding:22px}.results-actions{flex-direction:column;gap:13px}.results-actions .primary{order:-1}.score-dialog{position:fixed;top:auto;bottom:0;margin:0 auto;width:100%;max-width:460px;max-height:100dvh;border-radius:24px 24px 0 0;padding:12px 22px max(12px,env(safe-area-inset-bottom));border-bottom:0}.score-top{margin-bottom:14px}.calculator-display{min-height:76px}.keypad button{height:54px}}
@media(max-height:650px){.score-dialog{padding-top:8px}.sheet-handle{margin-bottom:8px}.score-top{margin-bottom:8px}.score-top h2{font-size:1.3rem}.calculator-display{min-height:55px;padding:8px 15px;margin-bottom:8px}.keypad button{height:40px}.enter{margin-top:9px;min-height:40px;padding:7px 15px}.clear-score{padding:6px}.keypad{gap:6px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media(max-width:700px){.results-banner img{margin:0;right:-30px;bottom:-8px;width:180px}}
