@font-face{font-family:Outfit;src:url(outfit.woff2) format('woff2');font-weight:100 900;font-display:swap}@font-face{font-family:Poppins;src:url(poppins.woff2) format('woff2');font-weight:600;font-display:swap}
:root{--navy:#1d3557;--aqua:#a8dadb;--mist:#f6fbfb;--teal:#0f4a62;--red:#a80001;--muted:#52627a;--text:#161f2c}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--mist);color:var(--text);font:18px/1.5 Outfit,system-ui,sans-serif}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:default;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--navy);outline-offset:4px}button{min-height:48px;border:0;transition:transform .15s,background .15s}button:active:not(:disabled){transform:scale(.97)}a{color:var(--teal)}h1,h2,h3{color:var(--navy);text-wrap:balance;font-family:Poppins,system-ui,sans-serif;line-height:1.2}h2{font-size:26px;margin:0 0 20px}p{margin:10px 0 18px}.topbar{max-width:1120px;margin:auto;padding:24px 24px 12px;display:flex;justify-content:space-between;align-items:center;gap:18px}.brand{color:var(--navy);text-decoration:none;display:flex;align-items:center;gap:12px;font-size:21px;font-weight:650;line-height:1.2}.brand small{display:block;font-size:12px;font-weight:400;letter-spacing:.8px;margin-top:5px;color:var(--muted)}.logo{height:48px;width:48px;display:grid;place-items:center;background:var(--navy);color:var(--aqua);border-radius:15px;font-size:39px;position:relative}.logo span{position:absolute;bottom:2px;right:4px;font-size:18px;color:white}.tools{display:flex;gap:8px;flex-wrap:wrap}.quiet{padding:9px 13px;color:var(--navy);background:transparent;border-radius:999px;font-size:15px}.quiet:hover{background:#e5f4f4}.quiet[aria-pressed=true]{background:#a8dadb}.primary{background:var(--navy);color:white;border-radius:999px;padding:13px 24px;font-weight:600}.secondary{color:var(--navy);background:#e5f4f4;border-radius:999px;padding:12px 20px}.large{font-size:22px;min-height:60px}.card{border-radius:24px;background:white;box-shadow:0 4px 20px #1c2b3c14;border:1px solid #d5dee7;padding:28px}main{max-width:1060px;margin:auto;padding:0 24px 48px;padding-bottom:max(48px,env(safe-area-inset-bottom))}.welcome{padding:38px 0 28px;position:relative;overflow:hidden}.eyebrow{font-size:12px;font-weight:650;letter-spacing:2px;color:#3a7a83}.welcome h1{font-size:clamp(38px,6vw,64px);letter-spacing:-.03em;margin:12px 0 16px}.welcome h1 span{color:#3a7a83}.welcome p{font-size:20px;color:var(--muted);max-width:70%}.welcome-dice{position:absolute;right:40px;top:46px;display:flex;font-size:120px;gap:16px;transform:rotate(9deg);color:#3a7a83;line-height:1}.welcome-dice span:last-child{transform:rotate(-22deg) translateY(28px);color:var(--navy)}.setup h2{margin-bottom:22px}.modes{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:26px}.modes button{background:var(--mist);color:var(--navy);border:2px solid #d5dee7;border-radius:18px;padding:18px 12px;text-align:left;min-width:0}.modes button[aria-pressed=true]{background:#e5f4f4;border-color:#3a7a83}.mode-icon{display:block;font-size:27px;font-weight:600;line-height:1.2;margin-bottom:12px}.modes strong{display:block;font-size:18px}.modes small{font-size:14px;color:var(--muted);display:block;margin-top:5px}.player-fields{display:flex;align-items:end;gap:16px;flex-wrap:wrap}.player-fields label{flex:1;min-width:160px}label{display:block;font-size:15px;font-weight:500}select,input{display:block;width:100%;border:1px solid #8595aa;color:var(--navy);border-radius:12px;padding:12px;background:white;min-height:50px;margin-top:6px}select{max-width:100%}.muted,.save-note{color:var(--muted);font-size:14px}.save-note{margin-bottom:0}.setup .large{margin-right:10px}.rules{max-width:760px;margin:24px 0}.rules summary{cursor:pointer;min-height:48px;display:flex;align-items:center;font-weight:600}.rules li{margin:8px 0}.backlink{font-size:15px}.game-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:24px 0 16px}.badge{background:#e5f4f4;border-radius:999px;padding:6px 14px;font-size:14px}.players{display:flex;gap:16px;margin-bottom:22px}.player{flex:1;min-width:0;padding:14px 20px;border:2px solid #d5dee7;border-radius:18px;background:white;display:flex;align-items:center;gap:12px}.player.active{border-color:#3a7a83;background:#e5f4f4}.player .symbol{font-size:32px;font-weight:700;line-height:1}.player .name{font-size:21px;font-weight:600;overflow-wrap:anywhere;line-height:1.2}.player small{display:block;font-size:13px;color:var(--muted);font-weight:400;margin-top:4px}.x{color:var(--navy)}.o{color:var(--red)}.play-layout{display:grid;grid-template-columns:1.15fr 1fr;gap:24px;align-items:start}.board-top{display:flex;justify-content:space-between;gap:8px;font-size:15px;color:var(--muted);margin-bottom:18px}.board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.cell{position:relative;aspect-ratio:1;border-radius:18px;background:#edf1f5;color:var(--navy);font-size:clamp(32px,5vw,55px);font-weight:600;box-shadow:0 5px 0 #d5dee7}.cell:disabled{opacity:1}.cell.xcell{background:var(--aqua);box-shadow:0 5px 0 #6ab7b5}.cell.ocell{background:#fbe9e9;color:var(--red);box-shadow:0 5px 0 #edc4c4}.cell .original{position:absolute;bottom:5px;right:10px;font-size:13px;font-weight:400}.cell.winline{outline:4px solid #ed7c30;outline-offset:-4px}.cell.pop{animation:pop .4s}.legend{display:flex;gap:22px;font-size:12px;color:var(--muted);margin-top:23px}.legend b{font-size:16px;margin-right:5px}.turn-card{text-align:center}.turn-card h2{font-size:28px;margin:8px 0 15px}.dice-tray{background:var(--mist);border-radius:20px;padding:18px 15px 12px;overflow:hidden}.dice{display:flex;justify-content:center;gap:22px}.die{height:82px;width:82px;background:white;border:1px solid #d5dee7;box-shadow:0 5px 0 #d5dee7;border-radius:18px;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:14px;flex-shrink:0}.dot{background:var(--navy);border-radius:50%}.dot.off{visibility:hidden}.tray-line{height:5px;background:#a8dadb;border-radius:99px;margin-top:22px}.equation{font-size:32px;font-weight:600;margin:17px 0}.roll{width:100%;display:flex;align-items:center;justify-content:center;gap:13px;min-height:64px}.roll svg{fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}.helpers{display:flex;justify-content:center;gap:4px;margin-top:15px;flex-wrap:wrap}.helpers .quiet{font-size:14px}.answer-label{font-size:14px;margin:0 0 10px;color:var(--muted)}.answers{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.answers button{color:var(--navy);background:#e5f4f4;border-radius:12px;min-height:48px;font-size:22px;font-weight:600;padding:4px}.answers button:last-child{grid-column:span 2}.answers button:hover{background:var(--aqua)}.status{padding:18px 23px;background:#e5f4f4;color:var(--teal);border-radius:18px;margin-top:24px;font-size:20px;min-height:67px}.game-footer{display:flex;justify-content:space-between;align-items:center;margin-top:10px;gap:10px;color:var(--muted);font-size:13px}.finished{text-align:center;margin-top:20px;background:#e3f3ea}.finished h2{margin-bottom:10px}.finished .secondary{margin-left:10px}.count-row{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:8px 0}.count-dot{display:grid;place-items:center;border-radius:50%;width:32px;height:32px;background:var(--aqua);font-size:16px}.count-dot.second{background:#fdeee3}#counting{padding:12px;border-radius:14px;background:#f6fbfb;margin-top:10px;font-size:15px}#error{margin-top:18px;padding:14px 18px;border-radius:14px;background:#fff3dc;color:#8a4b00}#error button{background:transparent;text-decoration:underline;color:inherit}dialog{border:1px solid #d5dee7;border-radius:24px;padding:28px;color:var(--navy);max-width:600px;width:calc(100% - 32px);max-height:85dvh;overflow:auto;background:white;box-shadow:0 20px 80px #1d355733}dialog::backdrop{background:#14263f99}dialog h2{margin:0 0 18px}dialog p{font-size:16px}.dialog-head{display:flex;justify-content:space-between;gap:12px;align-items:start}.dialog-actions{display:flex;justify-content:end;gap:12px;margin-top:20px}.score-tabs{display:flex;gap:8px;flex-wrap:wrap}.score-tabs button{padding:10px 17px;border-radius:999px;background:#edf1f5;color:var(--navy);font-size:16px}.score-tabs [aria-pressed=true]{background:var(--navy);color:white}table{border-collapse:collapse;width:100%;font-size:15px}th,td{text-align:left;border-bottom:1px solid #d5dee7;padding:12px 6px;overflow-wrap:anywhere}th{font-size:13px}#playerError{color:#a80001}.rolling .die{animation:tumble .6s ease-in-out}.rolling .roll svg{animation:shake .15s 4}.shake-help{animation:shake .3s}#celebration{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:5}.confetti{position:absolute;top:-20px;width:10px;height:16px;border-radius:3px;animation:fall 1.8s ease-in forwards}.confetti:nth-child(3n){background:#a8dadb}.confetti:nth-child(3n + 1){background:#ed7c30}.confetti:nth-child(3n + 2){background:#1d3557}@keyframes tumble{25%{transform:translateY(-15px) rotate(-20deg)}65%{transform:translateX(10px) rotate(25deg)}}@keyframes shake{50%{transform:rotate(15deg)}}@keyframes pop{50%{transform:scale(1.08)}}@keyframes fall{to{transform:translateY(100dvh) rotate(500deg)}}
@media(max-width:760px){.topbar{padding:18px 18px 8px;flex-wrap:wrap}.tools{gap:2px}.tools .quiet{font-size:13px;padding:8px 12px}.welcome{padding-top:22px}.welcome-dice{right:0;top:60px;font-size:70px;gap:4px;opacity:.3}.welcome h1{font-size:43px}.welcome p{max-width:90%;font-size:18px}.play-layout{grid-template-columns:1fr;gap:16px}.board-card{max-width:500px;width:100%;margin:auto}.cell{font-size:46px}.turn-card{padding:22px}.turn-card h2{font-size:23px}.dice-tray{padding-top:12px}.die{height:67px;width:67px;padding:11px;gap:7px}.tray-line{margin-top:15px}.equation{margin:10px 0;font-size:29px}.answers{grid-template-columns:repeat(6,minmax(0,1fr))}.game-heading{flex-wrap:wrap;margin-top:15px}.players{gap:10px;margin-bottom:16px}.player{padding:12px;gap:9px}.player .name{font-size:18px}.board-top{margin-bottom:12px}.board-card{padding:20px}.game-heading .quiet{font-size:13px}.game-heading .badge{font-size:12px}.legend{margin-top:17px}.status{font-size:18px;margin-top:16px}.modes{gap:8px}.modes button{padding:13px 10px}.modes strong{font-size:16px}.modes small{font-size:12px}.setup{padding:22px}.mode-icon{font-size:23px}.player-fields{gap:10px}.player-fields label{min-width:130px}main{padding-left:16px;padding-right:16px}.setup .large{width:100%;margin:0 0 10px}.welcome-dice{pointer-events:none}.finished .secondary{margin:10px 0 0}}
@media(max-width:370px){.modes{grid-template-columns:1fr}.modes button{text-align:left;display:grid;grid-template-columns:45px 1fr}.modes small{grid-column:2}.modes .mode-icon{grid-row:span 2;margin:0}.welcome h1{font-size:38px}.topbar .brand{font-size:19px}.board{gap:9px}.cell{font-size:36px}.card{padding:18px}.game-heading .quiet{padding:8px}.answers{gap:5px}.answers button{font-size:20px}.player .symbol{font-size:25px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}body.calm *,body.calm *:before,body.calm *:after{animation:none!important;transition:none!important}

.welcome-dice{font-size:65px}.welcome-dice span{display:grid;place-items:center;width:110px;height:110px;border:2px solid #a8dadb;border-radius:24px;background:#e5f4f4;box-shadow:0 8px 0 #a8dadb;font-weight:600}.welcome-dice span:last-child{background:white}@media(max-width:760px){.welcome-dice{font-size:42px}.welcome-dice span{width:70px;height:70px;border-radius:16px}}
@media(max-width:760px){.topbar{padding-top:12px;gap:8px}.brand small{display:none}.logo{width:40px;height:40px;font-size:32px}.tools .quiet{min-height:44px}.game-heading{margin:8px 0;flex-wrap:nowrap}.game-heading .quiet{white-space:nowrap}.game-heading .badge{padding:5px 9px}.players{margin-bottom:12px}.player{padding:9px 12px}.player .name{font-size:17px}.player small{font-size:12px}.board-card{padding:14px}.board-top{margin-bottom:10px;font-size:13px}.board{max-width:260px;margin:auto;gap:9px}.cell{font-size:35px;border-radius:14px}.legend{display:none}.turn-card{padding:14px;display:grid;grid-template-columns:1fr 1fr;column-gap:12px;align-items:center}.turn-card .eyebrow,.turn-card h2,.turn-card .roll,#answersWrap,#next,.helpers,#counting{grid-column:1/-1}.turn-card h2{font-size:21px;margin:5px 0 9px}.dice-tray{padding:9px;background:transparent}.dice{gap:12px}.die{height:50px;width:50px;padding:8px;gap:5px;border-radius:11px}.tray-line{display:none}.equation{font-size:25px;margin:0}.helpers{margin-top:7px}.helpers .quiet{padding:6px;min-height:44px;font-size:13px}.answer-label{margin:8px 0}.answers button{min-height:46px}.status{padding:12px 16px;font-size:17px;min-height:50px;margin-top:12px}.play-layout{gap:12px}.game-footer{margin-top:5px}.roll{min-height:56px}.game-heading .quiet{font-size:12px;padding:6px 9px}.game-heading .badge{font-size:11px}.turn-card .eyebrow{font-size:11px}}

/* Reconciled with HRS Buddy docs/DESIGN.md at 4ebd9f2. */
.primary,.secondary,.score-tabs button,.cell,.answers button,.equation{font-family:Poppins,system-ui,sans-serif;font-weight:600}.cell,.equation,td{font-variant-numeric:tabular-nums}.primary:hover:not(:disabled){background:#14263f}.secondary:hover:not(:disabled){background:#a8dadb}input::placeholder{color:#66778f;opacity:1}.skip-link{position:absolute;left:16px;top:-80px;z-index:10;background:#1d3557;color:white;padding:12px 18px;border-radius:12px}.skip-link:focus{top:12px}

/* Keep the next action ahead of the board in reading and keyboard order. */
.options{position:relative}.options summary{cursor:pointer;display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;border:1px solid #8595aa;border-radius:999px;font-size:14px;list-style:none}.options summary::-webkit-details-marker{display:none}.options summary:focus-visible{outline:3px solid var(--navy);outline-offset:3px}.options[open] .tools{position:absolute;right:0;top:calc(100% + 8px);z-index:20;display:flex;flex-direction:column;min-width:160px;padding:8px;background:white;border:1px solid #d5dee7;border-radius:16px;box-shadow:0 6px 18px #1d35572e}.options .quiet{text-align:left;min-height:44px}
.next-step{font-size:16px;color:var(--teal);margin:0 0 14px;line-height:1.4}.turn-card .status{font-size:16px;text-align:left;padding:10px 12px;min-height:0;margin:12px 0 0}.board-card{grid-column:1;grid-row:1}.turn-card{grid-column:2;grid-row:1}#next{width:100%;min-height:48px}
@media(max-width:760px){
 .topbar{padding:8px 16px 0;flex-wrap:nowrap;gap:8px}.brand{font-size:18px;gap:8px}.logo{width:32px;height:32px;font-size:27px;border-radius:10px}.logo span{font-size:12px}.brand small{display:none}
 .game-heading{margin:2px 0;gap:4px}.game-heading .quiet{min-height:44px}.players{gap:8px;margin-bottom:8px}.player{padding:7px 10px;border-radius:14px;gap:8px}.player .symbol{font-size:25px}.player .name{font-size:16px}.player small{font-size:11px;margin-top:2px;line-height:1.2}
 .play-layout{gap:10px}.turn-card,.board-card{grid-column:1;grid-row:auto}.turn-card{padding:12px;column-gap:8px;border-radius:18px}.turn-card h2{font-size:20px;margin:2px 0 4px}.turn-card .eyebrow{font-size:11px;letter-spacing:.6px}.next-step,.turn-card .status{grid-column:1/-1}.next-step{font-size:15px;margin:0 0 8px}.dice-tray{padding:4px 0 8px}.equation{font-size:22px}.die{width:44px;height:44px;padding:7px;gap:4px}.dice{gap:10px}.roll{min-height:48px;padding:8px 16px;font-size:17px}.roll svg{width:26px;height:26px}.helpers{margin:2px 0 0;gap:8px}.helpers .quiet{font-size:12px;padding:4px 8px;min-height:44px}.answer-label{margin:0 0 5px}.answers{gap:8px}.answers button{min-height:44px;font-size:20px}.turn-card .status{margin-top:8px;font-size:14px;padding:8px 10px}
 .board-card{padding:10px 12px 14px;border-radius:18px}.board-top{margin-bottom:8px}.board{max-width:204px;gap:8px}.cell{font-size:30px;border-radius:12px}.game-footer{font-size:12px}
}

@media(max-width:760px){.turn-card #turnName{display:none}}
