:root{color-scheme:dark;--ink:#171724;--cream:#fff8e6;--pad:clamp(12px,4vw,28px);font-family:ui-rounded,"Avenir Next",system-ui,sans-serif}*{box-sizing:border-box}
body{margin:0;background:var(--ink);color:var(--cream);overscroll-behavior:none}
button,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible,input:focus-visible{outline:3px solid #71e2cf;outline-offset:-4px}button:disabled{cursor:default}
.game{height:100vh;height:100dvh;min-height:230px;isolation:isolate;position:relative;overflow:hidden}
.table,.surface{position:absolute;inset:0;width:100%;height:100%;margin:0;border:0}
.surface{z-index:1;background:transparent;touch-action:manipulation}
.table{display:grid;grid-template-columns:repeat(var(--cols,2),minmax(0,1fr));grid-template-rows:repeat(var(--rows,2),minmax(0,1fr));grid-auto-flow:row;background:#181828}
.tile{min-width:0;min-height:0;overflow:hidden;position:relative;container-type:size;background:var(--tile);color:var(--pip);display:grid;place-items:center}
.face-window{width:min(58cqw,50cqh,225px);aspect-ratio:1;overflow:hidden}
.reel{display:flex;flex-direction:column;height:100%;will-change:auto}
.face{height:100%;width:100%;flex:0 0 100%;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);place-items:center;margin:0;padding:0}
.pip{height:79%;aspect-ratio:1;border-radius:50%;background:currentColor;visibility:hidden}.pip.on{visibility:visible}
.table[data-busy=true] .reel{will-change:transform}
.mast{position:absolute;z-index:2;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:calc(10px + env(safe-area-inset-top)) max(var(--pad),env(safe-area-inset-right)) 0 max(var(--pad),env(safe-area-inset-left));pointer-events:none}
h1,.audio,.summary{background:var(--ink);color:var(--cream);border:0;margin:0}
h1{padding:9px 13px;border-radius:12px;font-weight:750;font-size:16px;line-height:24px;letter-spacing:-.025em}
.audio{pointer-events:auto;width:44px;height:44px;display:grid;place-items:center;border-radius:50%}
.audio svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.mute,.audio[aria-pressed=false] .wave{display:none}.audio[aria-pressed=false] .mute{display:block}
.summary{position:absolute;z-index:2;top:calc(14px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;gap:7px;align-items:center;white-space:nowrap;padding:5px 10px;border-radius:30px;pointer-events:none;font-variant-numeric:tabular-nums}
.summary span{font-size:10px;line-height:18px;letter-spacing:.075em}.summary b{font-size:17px;line-height:22px}
.toolbar{position:absolute;z-index:2;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,550px);display:flex;gap:8px;justify-content:center;align-items:stretch;padding:0 max(var(--pad),env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(var(--pad),env(safe-area-inset-left));pointer-events:none}
.stepper,.roll{pointer-events:auto;background:var(--ink);color:var(--cream);border:1px solid #414051;border-radius:25px}
.stepper{display:flex;align-items:center;padding:2px;flex:1;min-width:0;max-width:240px}
.stepper button{border:0;background:transparent;color:inherit;border-radius:50%;width:44px;height:48px;flex:0 0 44px;font-size:30px;line-height:1}
.stepper button:disabled{opacity:.5}
.amount{display:flex;justify-content:center;align-items:center;flex:1;gap:1px;white-space:nowrap;font-size:13px;line-height:18px}
.amount input{appearance:textfield;-moz-appearance:textfield;width:3ch;text-align:center;border:0;background:transparent;color:inherit;padding:4px 0;font-weight:800;font-size:16px;border-radius:6px;font-variant-numeric:tabular-nums}
.amount input::-webkit-inner-spin-button,.amount input::-webkit-outer-spin-button{appearance:none;margin:0}
.roll{display:flex;align-items:center;justify-content:center;gap:8px;padding:0 18px;font-size:17px;font-weight:800;min-height:54px}
.roll svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9}.roll circle{fill:currentColor}
.roll:active,.audio:active,.stepper button:active{background-color:#343448}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:340px){h1{font-size:14px;padding-inline:8px}.summary{left:57%;padding-inline:8px}.roll{padding-inline:13px}}
@media(max-height:350px){h1,.audio,.summary{scale:.88}.mast{padding-top:3px}.toolbar{padding-bottom:4px}.face-window{width:min(52cqw,44cqh,225px)}}
@media(prefers-reduced-motion:reduce){*{animation-duration:0s!important;scroll-behavior:auto!important}}
