@font-face{font-family:Caveat;src:url('assets/caveat-regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:Caveat;src:url('assets/caveat-semibold.ttf') format('truetype');font-style:normal;font-weight:500 700;font-display:swap}
:root{color-scheme:light;--ink:#314b98;--rose:#9e4e61;--text:#344051;--muted:#747b86;--paper:#faf8ef;--grid:#c6dce980;--desk:#e1d9c9;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--text);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:var(--desk);min-width:320px}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:default}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible{outline:2px solid var(--ink);outline-offset:5px}button{touch-action:manipulation}[hidden]{display:none!important}.hand{font-family:Caveat,'Segoe Print','Comic Sans MS',cursive}.desk{padding:28px 38px 20px;max-width:1260px;margin:auto}.masthead{max-width:1000px;margin:0 auto 24px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:14px;font-size:25px;font-weight:650;letter-spacing:-1px}.brand-mark{font-family:Caveat,cursive;font-size:49px;line-height:1;color:var(--ink);transform:rotate(-12deg);font-weight:400}.brand small{display:block;font-size:11px;font-weight:400;letter-spacing:.4px;color:#77786f;margin-top:4px}.masthead nav{display:flex;gap:27px}.text-button{background:none;border:0;padding:8px 0;font-size:13px;font-weight:500;white-space:nowrap}.text-button:hover{color:var(--ink);text-decoration:underline;text-underline-offset:5px}.text-button>span{margin-right:5px;font-size:18px;font-weight:400}.paper-shadow{max-width:1000px;margin:auto;filter:drop-shadow(1px 12px 14px #665d4b22)}.paper{--grid-size:48px;position:relative;isolation:isolate;background-color:var(--paper);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px);background-size:var(--grid-size) var(--grid-size);overflow:hidden;clip-path:polygon(0% .4%,2% .2%,4% .5%,6% 0%,9% .3%,12% 0%,15% .3%,19% .1%,23% .4%,28% 0%,32% .4%,37% .1%,43% .4%,48% .1%,53% .5%,58% .1%,64% .4%,69% 0%,74% .4%,79% .1%,85% .5%,90% .1%,95% .3%,100% 0%,99.7% 9%,100% 20%,99.8% 32%,100% 45%,99.7% 61%,100% 78%,99.8% 93%,100% 99.4%,97% 99.8%,94% 99.4%,90% 100%,87% 99.5%,84% 99.8%,80% 99.5%,75% 100%,70% 99.6%,65% 99.9%,60% 99.6%,55% 100%,49% 99.6%,43% 99.9%,38% 99.5%,32% 100%,27% 99.6%,22% 99.9%,17% 99.5%,12% 100%,8% 99.6%,4% 99.9%,0% 99.5%,.3% 90%,0% 77%,.2% 65%,0% 50%,.3% 35%,0% 20%)}.folds{pointer-events:none;position:absolute;inset:0;z-index:-1;opacity:.65;background:linear-gradient(116deg,transparent 25%,#c6bdab13 25.2%,#fff8 25.6%,transparent 26.3%),linear-gradient(25deg,transparent 66%,#a29b8c0d 66.3%,#fff8 66.6%,transparent 67.1%),linear-gradient(90deg,transparent 49.6%,#8c837a0c 49.9%,#fff6 50.2%,transparent 50.8%),radial-gradient(ellipse at 2% 50%,#c5b99714,transparent 35%),linear-gradient(172deg,#fff3,transparent 40%,#e9e2cd21)}.margin-line{position:absolute;left:48px;top:0;bottom:0;width:1px;background:#d39a9690;pointer-events:none}.paper-top{display:flex;justify-content:space-between;align-items:center;padding:34px 56px 0 78px;gap:16px}.sheet-label{font-size:10px;letter-spacing:1.8px;text-transform:uppercase;color:#737f8e}.sheet-label span{margin:0 9px;color:#a8afb4}.lesson-note{font-size:23px;color:#8b8e8b;transform:rotate(2deg)}.scoreboard{display:flex;align-items:center;justify-content:center;gap:22px;margin:20px auto 0;padding:0 32px;min-height:78px}.player{display:flex;align-items:center;gap:14px;position:relative;padding:8px 8px 12px;color:var(--ink)}.player:after{content:'';position:absolute;bottom:2px;left:7px;right:7px;height:2px;background:currentColor;transform:rotate(-1deg) scaleX(0);transition:transform .2s;opacity:.65;border-radius:40%}.player.is-current:after{transform:rotate(-1deg) scaleX(1)}.player.computer{color:var(--rose)}.player-copy{display:flex;flex-direction:column;gap:3px}.player-name{font-size:14px;font-weight:600}.player-description{font-size:10px;color:#858a92}.player strong{font-family:Caveat,'Segoe Print',cursive;font-size:51px;line-height:1;font-weight:600;min-width:45px;text-align:center}.player-symbol{font-family:Caveat,cursive;font-size:47px;line-height:1}.cross-symbol{transform:rotate(-8deg)}.dot-symbol{font-family:serif;font-size:43px}.score-divider{font-family:Caveat,cursive;color:#969b9e;font-size:32px;margin-top:-6px}.board-area{position:relative;display:flex;justify-content:center;margin-top:-2px}#board{display:block;width:min(100%,600px);height:auto;overflow:visible;touch-action:manipulation;user-select:none;-webkit-user-select:none}.side-note{position:absolute;font-size:23px;line-height:1.1;color:#62739d;pointer-events:none;opacity:.8}.side-note svg{display:block;width:83px;height:45px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}.note-left{left:77px;top:37%;transform:rotate(-7deg);font-size:21px}.note-left svg{margin-left:45px}.note-right{right:46px;top:56%;transform:rotate(6deg)}.note-right svg{margin-left:6px}.boundary,.wall{fill:none;stroke:var(--ink);stroke-width:2.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.boundary{stroke-width:2.9}.wall.computer{stroke:var(--rose)}.wall.latest{stroke-width:3.8}.wall.new{animation:draw .27s ease-out}.edge-hit{fill:none;stroke:transparent;stroke-width:23;cursor:crosshair;outline:none;pointer-events:stroke}.preview-line{stroke:var(--ink);stroke-width:3;stroke-linecap:round;opacity:0;pointer-events:none}.edge-target:hover .preview-line,.edge-target:focus .preview-line{opacity:.4}.edge-target:focus-visible .preview-line{opacity:.8;stroke-dasharray:5 4;stroke-width:4}.edge-target[aria-disabled=true]{pointer-events:none}.edge-target[aria-disabled=true] .edge-hit{cursor:default}.edge-target[aria-disabled=true] .preview-line{opacity:0}.cell-symbol{fill:none;stroke:var(--ink);stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.cell-symbol.computer{fill:var(--rose);stroke:var(--rose);stroke-width:1}.cell-group.new{animation:claim .35s ease-out;transform-box:fill-box;transform-origin:center}.turn-area{display:flex;justify-content:center;align-items:flex-start;gap:11px;min-height:73px;text-align:center;padding:0 24px;margin-top:-13px}.turn-area h1{font-family:Caveat,'Segoe Print',cursive;font-size:31px;font-weight:600;line-height:1.1;color:var(--ink);margin:0 0 7px}.turn-area p{font-size:12px;line-height:1.6;color:#757d87;margin:0;max-width:540px}.turn-marker{height:7px;width:7px;border-radius:50%;background:var(--ink);margin-top:13px;display:none}.turn-marker.visible{display:block}.turn-marker.computer{background:var(--rose);animation:breathe 1.1s infinite}.turn-area.is-finished h1{font-size:39px}.bottom-area{min-height:109px;margin:17px 57px 0 78px;border-top:1px solid #a3b1c42e;display:flex;justify-content:center;align-items:center;gap:36px;padding:18px 0}.dice-area{display:flex;align-items:center;gap:13px}.die-wrapper{display:flex;flex-direction:column;align-items:center;gap:5px}.die-wrapper>span{font-family:Caveat,'Segoe Print',cursive;font-size:16px;color:#7e8590}.die{width:45px;height:45px;border:1px solid #a6b4cf;background:linear-gradient(135deg,#fffef9,#eeeee7);box-shadow:2px 3px 0 #b4b1a322,0 2px 3px #7b77661a;border-radius:8px;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);padding:8px;gap:3px;transform:rotate(-7deg);color:var(--ink)}.computer-die{border-color:#c7abb2;transform:rotate(8deg);color:var(--rose)}.pip{width:6px;height:6px;border-radius:50%;background:currentColor;align-self:center;justify-self:center}.pip.off{visibility:hidden}.dice-separator{color:#c0bdaf;font-size:19px;margin-top:-22px}.die.rolling{animation:roll .16s infinite alternate}.primary-button{background:var(--ink);border:1px solid var(--ink);color:#fffdf4;border-radius:5px 8px 5px 7px;padding:13px 24px;font-family:Caveat,'Segoe Print',cursive;font-size:24px;font-weight:600;line-height:1.1;box-shadow:2px 3px 0 #243a7130;transition:transform .15s,background .15s;white-space:nowrap;min-height:48px}.primary-button:hover{background:#243c80;transform:translateY(-1px) rotate(-.5deg)}.primary-button:active{transform:translateY(1px)}.primary-button:disabled{opacity:.6;transform:none}.primary-button>span{margin-right:8px}.progress-area{width:290px;max-width:100%}.progress-caption{display:flex;align-items:center;justify-content:space-between;font-size:11px;gap:18px;color:#68768a}.progress-caption .hand{font-size:21px}.progress-track{height:5px;background:#d6dce066;display:flex;margin-top:6px;border-radius:3px;overflow:hidden}.progress-track>span{height:100%;transition:width .3s}#human-progress{background:#5872ac}#computer-progress{background:#b07180}.last-roll{font-size:10px;color:#8c9095;display:block;margin-top:8px}.paper-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 57px 24px 78px;font-size:10px;color:#7e8891}.paper-footer .hand{font-size:20px;white-space:nowrap;color:#929a9c}.desk-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;max-width:965px;margin:21px auto 0;font-size:10px;color:#7c7d75;letter-spacing:.15px}.save-note:before{content:'·';padding-right:8px}.modal{border:0;background:var(--paper);color:var(--text);border-radius:5px;padding:35px 38px;max-width:515px;width:calc(100% - 32px);max-height:calc(100dvh - 40px);box-shadow:0 25px 100px #2c2b2733;overflow:auto}.modal::backdrop{background:#363a3752;backdrop-filter:blur(3px)}.close-button{position:absolute;right:16px;top:9px;font-size:30px;background:none;border:0;color:#7a8491;width:36px;height:36px}.eyebrow{font-size:9px;text-transform:uppercase;letter-spacing:2px;color:#7d8896}.modal h2{font-size:41px;line-height:1.1;color:var(--ink);margin:15px 0 9px;font-weight:600}.modal-intro,.reset-modal>p{font-size:13px;line-height:1.8;color:#78818b}.rules-list{list-style:none;counter-reset:rule;margin:24px 0;padding:0}.rules-list li{counter-increment:rule;position:relative;padding-left:33px;margin:19px 0}.rules-list li:before{content:counter(rule);position:absolute;left:0;top:-5px;font-family:Caveat,cursive;font-size:28px;color:var(--ink)}.rules-list strong{font-size:13px;font-weight:600;display:block;margin-bottom:5px}.rules-list li>span{font-size:12px;color:#737c86;line-height:1.65;display:block}.rules-tip{font-size:22px;color:var(--rose);transform:rotate(-1deg);margin:15px 0 22px}.dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:20px;margin-top:25px}.dialog-actions .primary-button{font-size:22px;padding:12px 18px}.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}.noscript{text-align:center;color:var(--rose)}
@keyframes draw{from{stroke-dasharray:50;stroke-dashoffset:50}to{stroke-dasharray:50;stroke-dashoffset:0}}@keyframes claim{from{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes roll{from{transform:translateY(-3px) rotate(-12deg)}to{transform:translateY(2px) rotate(14deg)}}@keyframes breathe{50%{opacity:.35}}
@media(min-width:681px){.desk{padding-top:20px}.masthead{margin-bottom:18px}.paper-top{padding-top:25px}.scoreboard{margin-top:12px;min-height:65px}#board{width:min(100%,520px)}.bottom-area{margin-top:10px;min-height:92px;padding:12px 0}.paper-footer{padding-top:8px;padding-bottom:20px}}
@media(min-width:681px) and (max-height:850px){.desk{padding-top:14px}.masthead{margin-bottom:12px}.paper-top{padding-top:22px}.scoreboard{margin-top:5px;min-height:60px}#board{width:min(100%,calc((100dvh - 470px) * 1.2222));min-width:320px}.turn-area{min-height:65px}.bottom-area{margin-top:4px;min-height:80px;padding:9px 0}.paper-footer{padding-bottom:17px}.desk-footer{margin-top:12px}.note-left{left:85px;top:33%}.note-right{right:63px;top:55%}}
@media(max-width:1050px){.side-note{display:none}.paper-top{padding-right:42px;padding-left:65px}.bottom-area{margin-left:65px;margin-right:42px}.paper-footer{padding-left:65px;padding-right:42px}.margin-line{left:35px}}
@media(max-width:680px){.desk{padding:20px 12px 16px}.masthead{margin:0 6px 17px;gap:10px}.brand{font-size:22px;gap:8px}.brand-mark{font-size:39px}.brand small{font-size:9px;letter-spacing:0}.masthead nav{gap:14px}.text-button{font-size:11px}.text-button>span{font-size:16px;margin-right:2px}.paper-top{padding:28px 22px 0}.sheet-label{font-size:9px;letter-spacing:1px}.lesson-note{font-size:18px}.margin-line{left:14px;opacity:.7}.scoreboard{padding:0 20px;gap:13px;margin-top:19px;min-height:65px}.player{gap:9px;padding:8px 3px 12px}.player strong{font-size:45px;min-width:30px}.player-name{font-size:12px}.player-description{font-size:9px}.player-symbol{font-size:36px}.dot-symbol{font-size:32px}.score-divider{font-size:26px}.board-area{margin-top:4px;padding:0 4px}#board{width:100%}.turn-area{margin-top:-3px;padding:0 26px;min-height:80px;gap:7px}.turn-area h1{font-size:29px}.turn-area p{font-size:11px;max-width:350px}.bottom-area{margin:14px 26px 0;gap:24px;min-height:107px}.primary-button{font-size:23px;padding:12px 19px}.progress-area{width:230px}.progress-caption{font-size:10px;gap:5px}.paper-footer{padding:10px 26px 24px;flex-direction:column;gap:9px;text-align:center;font-size:9px}.paper-footer .hand{font-size:19px}.desk-footer{padding:0 10px;margin-top:16px;flex-direction:column;gap:5px;text-align:center;font-size:9px}.die{width:40px;height:40px;padding:6px;gap:2px}.pip{width:5px;height:5px}.dice-area{gap:10px}.modal{padding:31px 26px}.dialog-actions{gap:15px;justify-content:space-between}}
@media(max-width:390px){.brand small{font-size:8px}.masthead nav{gap:11px}.text-button>span{display:none}.lesson-note{font-size:16px}.sheet-label{letter-spacing:.6px}.player{gap:7px}.scoreboard{gap:9px;padding:0 16px}.player-name{font-size:11px}.player-description{font-size:8px}.player-symbol{font-size:29px}.bottom-area{gap:19px;margin-left:21px;margin-right:21px}.primary-button{padding:12px 14px;font-size:21px}.progress-caption .hand{font-size:18px}.dice-area{gap:7px}.die{width:36px;height:36px}.player strong{font-size:42px}.turn-area h1{font-size:27px}.paper-top{padding-left:22px;padding-right:18px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.level-strip{display:flex;align-items:center;justify-content:center;gap:17px;margin:15px 24px 0}.level-label{font-size:10px;color:#727e8c}.level-label small{display:block;font-size:9px;color:#969da4;margin-top:3px}.level-picker{display:flex;gap:3px;border-bottom:1px solid #a3b1c43d}.level-picker button{border:0;border-bottom:2px solid transparent;background:transparent;padding:7px 17px 8px;font-size:12px;color:#75808e;min-height:46px}.level-picker button small{display:block;font-size:9px;margin-top:4px;font-weight:400}.level-picker button[aria-pressed=true]{color:var(--ink);border-bottom-color:var(--ink);background:#d7e1f22b}.level-picker button:hover{color:var(--ink);background:#d7e1f222}.level-picker button:focus-visible{outline-offset:1px}
@media(max-width:680px){.level-strip{margin-top:13px;gap:9px}.level-picker button{padding:6px 12px;font-size:11px}.level-label{font-size:9px}.level-label small{font-size:8px}.level-picker button small{font-size:8px}.scoreboard{margin-top:8px}}
@media(max-width:390px){.level-strip{margin-left:20px;margin-right:18px;gap:8px}.level-picker button{padding:6px 9px}.level-label small{letter-spacing:-.2px}}
.review-card{margin:12px 57px 0 78px;padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:22px;background:#faf8efe8;border-top:1px dashed #8a9dbd77;border-bottom:1px dashed #8a9dbd77}.review-card h2{font-size:28px;line-height:1.1;color:var(--ink);margin:6px 0}.review-card p{font-size:12px;line-height:1.6;margin:0;color:#657387;max-width:520px}.review-card .text-button{color:var(--ink);text-decoration:underline;text-underline-offset:5px}.review-modal{max-width:680px;padding:28px 34px}.review-modal h2{font-size:34px;margin-top:10px}.review-modal .modal-intro{margin:6px 0 15px}.review-stages{display:flex;gap:5px;flex-wrap:wrap;border-bottom:1px solid #a3b1c43d}.review-stages button{border:0;border-bottom:2px solid transparent;background:none;padding:10px 12px;min-height:42px;color:#737f8d;font-size:12px}.review-stages button[aria-pressed=true]{border-bottom-color:var(--ink);color:var(--ink);background:#d7e1f233}.review-stages button:hover{color:var(--ink)}#review-board{display:block;width:100%;height:min(43dvh,380px);margin:12px auto 6px;pointer-events:none}.review-wall{opacity:.65}.review-focus-halo{fill:none;stroke:var(--ink);stroke-width:13;stroke-linecap:round;opacity:.15}.review-focus{fill:none;stroke:var(--ink);stroke-width:5;stroke-linecap:round}.review-focus.ghost{stroke-dasharray:6 6}.review-focus.computer,.review-focus-halo.computer{stroke:var(--rose)}.review-cell-highlight{fill:none;stroke:var(--ink);stroke-width:1.5;stroke-dasharray:3 3}.review-cell-highlight.computer{stroke:var(--rose)}.review-caption{min-height:55px;text-align:center}.review-caption p{font-size:12px;line-height:1.6;margin:0 0 6px;color:#56667e}.review-caption>span{font-size:11px;color:#858e99}.review-lesson{font-size:12px;line-height:1.65;color:#737f8c;padding-top:12px;margin:10px 0 0;border-top:1px solid #a3b1c43d}.review-close{text-align:right;margin-top:9px}.review-close .text-button{color:var(--ink)}
@media(max-width:680px){.review-card{margin:10px 26px 0;padding:14px 0;display:block}.review-card h2{font-size:26px}.review-card p{font-size:11px}.review-card .text-button{margin-top:7px;font-size:12px;min-height:40px}.review-modal{padding:28px 20px 20px}.review-modal h2{font-size:30px;padding-right:5px}.review-stages{gap:0}.review-stages button{padding:9px 8px;font-size:11px}.review-modal .modal-intro{font-size:12px}#review-board{height:min(38dvh,330px)}.review-caption{min-height:65px}}
.lesson-note small{display:block;font-size:15px;line-height:1.2;max-width:280px;margin-top:3px;color:#8390a4}.game-settings{display:flex;justify-content:center;align-items:center;gap:10px 28px;flex-wrap:wrap;margin:14px 35px 0 65px}.game-settings .level-strip{margin:0;gap:12px}.game-settings .level-label{width:67px;flex-shrink:0;line-height:1.4}.game-settings .level-picker button{min-width:75px;padding-left:12px;padding-right:12px}.opponent-picker button{display:flex;align-items:center;justify-content:center}.opponent-description{margin:8px 35px 0 65px;text-align:center;font-size:10px;line-height:1.5;color:#748197;min-height:15px}.paper-top .lesson-note{text-align:right}
@media(max-width:850px){.game-settings{gap:5px;flex-direction:column;margin-left:24px;margin-right:24px}.opponent-description{margin-left:24px;margin-right:24px}}
@media(max-width:680px){.game-settings{margin-top:12px;align-items:center}.game-settings .level-strip{gap:8px}.game-settings .level-label{width:59px}.game-settings .level-picker button{min-width:70px;padding-left:8px;padding-right:8px}.opponent-description{font-size:9px;margin-top:6px;min-height:27px}.lesson-note small{font-size:12px;max-width:190px}.paper-top{align-items:flex-start}.sheet-label{padding-top:4px;white-space:nowrap}.paper-top .lesson-note{max-width:190px}}
@media(max-width:390px){.game-settings{margin-left:18px;margin-right:18px}.game-settings .level-label{width:51px}.game-settings .level-picker button{min-width:66px;padding-left:7px;padding-right:7px}.paper-top .lesson-note{max-width:158px}.lesson-note small{font-size:11px;max-width:158px}}

/* Separate settings with a double ballpoint stroke; labels frame the choices. */
.game-settings{flex-wrap:nowrap;gap:15px}
.game-settings .opponent-strip{flex-direction:row-reverse}
.opponent-strip .level-label{text-align:right}
.settings-divider{width:12px;height:58px;flex:none;overflow:visible;color:var(--ink);opacity:.78;transform:rotate(2deg)}
.settings-divider path{fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.divider-horizontal{display:none}
.game-tip{max-width:150px;margin:0;font-size:23px;line-height:1.2}
.game-tip.note-left{left:33px;top:35%}
.game-tip.note-right{right:28px;top:48%}
@keyframes ready-breathe{0%,100%{opacity:1;filter:brightness(1);box-shadow:0 0 0 0 #456ac600}45%,55%{opacity:.38;filter:brightness(1.25);box-shadow:0 0 0 8px #456ac62b}}
@media(prefers-reduced-motion:no-preference){
  .paper[data-phase="ready"] #roll-button,.paper[data-phase="ready"] .die{animation:ready-breathe 1.65s ease-in-out infinite}
}
@media(max-width:1050px){
  .board-area{padding-bottom:64px}
  .game-tip.note-left,.game-tip.note-right{display:block;left:24px;right:24px;top:auto;bottom:5px;max-width:none;height:54px;text-align:center;font-size:22px;transform:rotate(-1deg);align-content:center}
}
@media(max-width:850px){
  .game-settings{flex-direction:column;gap:5px}
  .settings-divider{width:304px;height:9px;transform:none}
  .divider-vertical{display:none}.divider-horizontal{display:block}
  .game-settings .level-strip{width:310px;justify-content:space-between}
}
@media(max-width:390px){
  .game-settings .level-strip{width:100%;max-width:290px;gap:6px}
  .settings-divider{width:100%;max-width:284px}
  .game-tip.note-left,.game-tip.note-right{font-size:21px;left:20px;right:20px}
}

/* Readable setup headings, deliberate dice reveal and an explicit reset action. */
.game-settings{gap:26px;margin-left:48px;margin-right:48px}
.game-settings .level-strip{gap:20px}
.game-settings .level-label{font-family:Caveat,'Segoe Print',cursive;font-size:27px;font-weight:600;line-height:1.05;color:var(--ink);width:100px}
.game-settings .level-label small{font:500 14px/1.4 system-ui,sans-serif;color:#65738b;margin-top:5px}
.die{--die-tilt:-7deg;--result-color:#a67627;--result-halo:#a6762744}
.computer-die{--die-tilt:8deg}
@keyframes dice-tumble{0%{transform:translateY(0) rotate(var(--die-tilt))}25%{transform:translate(-5px,-13px) rotate(calc(var(--die-tilt) + 100deg)) scale(1.08)}55%{transform:translate(5px,-6px) rotate(calc(var(--die-tilt) + 220deg))}80%{transform:translateY(-10px) rotate(calc(var(--die-tilt) + 310deg))}100%{transform:translateY(0) rotate(calc(var(--die-tilt) + 360deg))}}
.die.rolling{animation:dice-tumble .64s ease-in-out infinite}
.computer-die.rolling{animation-direction:reverse;animation-delay:-.18s}
.die.roll-winner{--result-color:#27754d;--result-halo:#48a37466;color:#216640;border:2px solid #35845b;background:#e4f3df;box-shadow:0 0 0 3px #35845b24}
.die.roll-loser{--result-color:#b24445;--result-halo:#d3575866;color:#9c3639;border:2px solid #b95454;background:#fbe7e1;box-shadow:0 0 0 3px #b9545424}
.die.roll-tie{color:#916b25;border-color:#aa8336;background:#faf0d2}
@keyframes dice-result-flash{0%,100%{box-shadow:0 0 0 2px var(--result-halo);filter:brightness(1)}45%,65%{box-shadow:0 0 0 9px var(--result-halo),0 0 20px var(--result-halo);filter:brightness(1.35)}}
.die.result-flash{animation:dice-result-flash .7s ease-in-out 3}
.dice-outcome{flex-basis:100%;order:3;text-align:center;padding:10px 15px;border-top:1px dashed #8090ad66;color:#526685}
.dice-outcome strong{display:block;font:600 28px/1.15 Caveat,'Segoe Print',cursive}
.dice-outcome span{display:block;margin-top:5px;font-size:12px;line-height:1.4}
.dice-outcome[data-result="win"] strong{color:#27754d}
.dice-outcome[data-result="loss"] strong{color:#a03f40}
.dice-outcome[data-result="tie"] strong{color:#916b25}
.bottom-area{flex-wrap:wrap}
.paper[data-phase="starting"] .die,.paper[data-phase="rolling"] .die{width:60px;height:60px;padding:10px;gap:4px}
.paper[data-phase="starting"] .pip,.paper[data-phase="rolling"] .pip{width:8px;height:8px}
.paper[data-phase="starting"] .dice-area{margin:5px auto}
.restart-area{display:flex;justify-content:center;align-items:center;gap:14px;margin:15px 24px 8px}
.restart-button{border:1.5px solid #6f80a9;border-radius:5px 8px 4px 7px;background:#faf8ef;padding:8px 18px;min-height:44px;font:600 24px/1.1 Caveat,'Segoe Print',cursive;color:var(--ink)}
.restart-button:hover{background:#e8edf7}.restart-area>span{font-size:11px;color:#748197}
@media(max-width:1050px){.game-settings{gap:16px;margin-left:24px;margin-right:24px}.game-settings .level-strip{gap:12px}.game-settings .level-label{width:86px;font-size:25px}}
@media(max-width:850px){.game-settings{gap:9px}.game-settings .level-strip{width:min(100%,360px)}.settings-divider{width:min(100%,354px)}}
@media(max-width:390px){.game-settings{margin-left:18px;margin-right:18px}.game-settings .level-strip{gap:6px;max-width:none}.game-settings .level-label{width:74px;font-size:24px}.game-settings .level-label small{font-size:12px}.game-settings .level-picker button{min-width:58px;padding-left:5px;padding-right:5px;font-size:10px}.game-settings .level-picker{gap:0}.restart-area{gap:10px}.restart-area>span{font-size:10px}.dice-outcome{padding-left:0;padding-right:0}.dice-outcome span{font-size:11px}}
@media(prefers-reduced-motion:reduce){.die.rolling,.die.result-flash{animation:none}}

/* Platform loading/errors are outside the inert game. Gameplay animations share its pause. */
.game-paused .desk *, .game-paused .desk *::before, .game-paused .desk *::after { animation-play-state: paused !important; }
.platform-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: #e1d9c9e8; }
.platform-gate-card { width: min(100%, 440px); padding: 24px; background: #fffdf4; border: 2px solid #344d78; border-radius: 9px 5px 11px 6px; box-shadow: 4px 6px 0 #344d7820; color: #253c65; font: 18px/1.5 system-ui, sans-serif; }
.platform-gate-card p { margin: 0 0 16px; }
.platform-gate-card button { display: block; width: 100%; margin-top: 12px; padding: 12px; border: 1px solid currentColor; border-radius: 5px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.platform-gate-card button:focus-visible { outline: 3px solid #537cc2; outline-offset: 3px; }
