@font-face{font-family:"DM Serif Display";font-weight:400;font-display:swap;src:url("/fonts/dm-serif-display-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Rosario";font-weight:400;font-display:swap;src:url("/fonts/rosario-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Rosario";font-weight:700;font-display:swap;src:url("/fonts/rosario-latin-700-normal.woff2") format("woff2")}
/* the cake table: icing white, a holly green pastry slate, a yellow sheet of marzipan drawn to scale */
:root{--icing:#eef2f1;--white:#fff;--ink:#14231d;--soft:#43574e;--slate:#0f4536;--paste:#f1c245;--spare:#9a7b2c;--apricot:#8f3d06;--line:#b4c6bf;--stop:#9c1c2b}
*{box-sizing:border-box}
html{background:var(--icing)}
body{margin:0;background:var(--icing);color:var(--ink);font:400 18px/1.55 "Rosario",system-ui,sans-serif;overflow-x:clip;font-variant-numeric:lining-nums}
main{display:block;max-width:680px;margin:0 auto;padding:0 16px 56px}
h1,h2,h3{font-family:"DM Serif Display",Georgia,serif;font-weight:400;line-height:1.15}
h1{font-size:clamp(1.85rem,8vw,2.9rem);margin:12px 0 4px;color:var(--slate);text-wrap:balance}
h2{font-size:1.5rem;margin:34px 0 10px;text-wrap:balance}
h3{font-size:1.2rem;margin:24px 0 6px}
b,strong{font-weight:700}
p,li{max-width:68ch}
li{margin-bottom:7px}
a{color:var(--apricot);text-underline-offset:3px;overflow-wrap:anywhere}
:focus-visible{outline:3px solid var(--ink);outline-offset:2px;box-shadow:0 0 0 7px #ffd84a}
.lead{margin:0 0 10px;line-height:1.35}
.hint{margin:0 0 6px;color:var(--soft);font-size:.95rem;line-height:1.35}
.vh{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
[hidden]{display:none!important}

.q{margin:0 0 16px}
label,legend{display:block;font-weight:700;margin-bottom:4px;padding:0}
fieldset{border:0;padding:0;min-width:0}
input[type=text]{font:inherit;font-size:1.15rem;width:100%;max-width:6.5em;min-height:48px;padding:6px 10px;border:2px solid var(--ink);border-radius:3px;background:var(--white);color:var(--ink)}
.affix{display:flex;align-items:center;gap:8px}
.chips>div{display:flex;flex-wrap:wrap;gap:6px}
.chips label{position:relative;margin:0;font-weight:400}
.chips input{position:absolute;opacity:0;width:1px;height:1px}
.chips span{display:flex;align-items:center;min-height:46px;padding:4px 14px;border:2px solid var(--slate);border-radius:23px;background:var(--white);color:var(--ink);cursor:pointer;line-height:1.2}
.chips input:checked+span{background:var(--slate);color:var(--white);font-weight:700}
.chips input:focus-visible+span{outline:3px solid var(--ink);outline-offset:2px;box-shadow:0 0 0 7px #ffd84a}
.cake{display:flex;flex-wrap:wrap;column-gap:14px;align-items:flex-end}
.cake .q{margin-bottom:10px}
.cake #q-size.bad{flex-basis:100%}
.cake #q-size input{max-width:5em}
.cake #q-shape{flex-basis:100%}
.cake #q-shape legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

/* the slate */
.board{margin:0 -16px;padding:8px 16px 14px;background:var(--slate);color:var(--white)}
.board>h2.vh{margin:-1px}
.slip{margin:2px 0 8px;font-family:"DM Serif Display",Georgia,serif;font-size:clamp(1.7rem,7.6vw,2.4rem);line-height:1.15;color:var(--paste)}
.board .chips span{border-color:#cfe0d9;background:transparent;color:var(--white)}
.board .chips input:checked+span{background:var(--white);color:var(--ink)}
.board .chips legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.board .q{margin:0 0 10px}
#sheet{display:block;width:100%;max-width:400px;height:auto;margin:0 auto}
.p{transform-origin:0 0;fill:var(--paste);stroke:none}
.p.off{opacity:0}
.p.roll,.p.strip-1,.p.strip-2{fill:var(--spare);stroke:#fff4cf;stroke-width:1.5px;stroke-dasharray:6 4;vector-effect:non-scaling-stroke}
.p.fall-a,.p.fall-b,.p.side-1,.p.side-2{fill:var(--paste)}
.p.top{fill:#ffdd7a;stroke:var(--slate);stroke-width:2px;vector-effect:non-scaling-stroke}
.rule{fill:none;stroke:#fff;stroke-width:2px;vector-effect:non-scaling-stroke}
@media (prefers-reduced-motion:no-preference){.p{transition:transform .45s cubic-bezier(.2,.7,.2,1),opacity .25s}}
.keys{list-style:none;margin:8px 0 12px;padding:0;font-size:.98rem;line-height:1.35}
.keys li{display:flex;align-items:center;gap:8px;margin:0 0 4px}
.keys i{flex:none;width:18px;height:18px;border-radius:3px}
.k-kept{background:var(--paste)}
.k-trim{background:var(--spare);border:2px dashed #fff4cf}
.keys .k-rule{height:3px;background:#fff}
.stepper{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.stepper input{max-width:4.5em}
.steps{display:flex;gap:8px;flex-wrap:wrap}
.steps button{font:inherit;font-weight:700;min-height:48px;padding:6px 14px;border:2px solid var(--paste);border-radius:3px;background:transparent;color:var(--white);cursor:pointer}
.steps button:active{background:var(--paste);color:var(--ink)}
.drawsay{margin:0;font-size:.95rem;line-height:1.4}
.board.stale .drawn,.board.stale .drawsay{visibility:hidden}
.board .err{color:var(--white);background:var(--stop);padding:4px 8px}

.ice{margin:14px 0 0;padding:10px 14px;background:var(--white);border-left:8px solid var(--line);border-radius:3px}
.ice:empty{display:none}
.go{font:inherit;font-weight:700;font-size:1.15rem;width:100%;min-height:54px;border:0;border-radius:27px;background:var(--apricot);color:var(--white);cursor:pointer}
.err{margin:0 0 6px;color:var(--stop);font-weight:700}
.bad input[type=text]{border-color:var(--stop);border-width:3px}
.summary{border:4px solid var(--stop);background:var(--white);padding:4px 16px;margin:10px 0 16px}
.summary h2{margin:8px 0}
.summary ul{list-style:none;margin:0;padding:0}
.summary a{color:var(--stop);display:inline-block;min-height:44px;padding-top:8px}
.result{margin-top:30px;padding:4px 16px 12px;background:var(--white);border-top:6px solid var(--paste)}
.result h2{margin-top:14px}
.big{font-family:"DM Serif Display",Georgia,serif;font-size:1.45rem;line-height:1.25;color:var(--slate)}
.big strong{font-weight:400}
.warn{font-size:.95rem;color:var(--soft)}
.nojs{padding:10px 14px;background:var(--white);border:2px solid var(--ink)}
.scrollx{overflow-x:auto}
table{border-collapse:collapse;width:100%;font-size:.95rem;line-height:1.35;background:var(--white);font-variant-numeric:tabular-nums}
caption{text-align:left;font-weight:700;padding:8px 6px}
th,td{border-bottom:1px solid var(--line);padding:8px 6px;text-align:left;vertical-align:top}
thead th{border-bottom:2px solid var(--slate)}
details{border-bottom:1px solid var(--line)}
summary{font-weight:700;cursor:pointer;min-height:48px;padding:11px 0}
.updated{color:var(--soft);font-size:.95rem}
