@font-face{font-family:Fraunces;font-style:normal;font-weight:700;font-display:swap;src:url(./typefaces/fraunces-700.woff2) format("woff2")}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:400;font-display:swap;src:url(./typefaces/ibm-plex-sans-400.woff2) format("woff2")}@font-face{font-family:IBM Plex Sans;font-style:normal;font-weight:600;font-display:swap;src:url(./typefaces/ibm-plex-sans-600.woff2) format("woff2")}*{box-sizing:border-box;margin:0}body,html{overscroll-behavior:none;color:#2a2118;background:#efe6d8;font-family:IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}#background,body{background:radial-gradient(1200px 600px at 80% -10%,rgba(201,163,106,.18),transparent 50%),#efe6d8;width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0}.mast{z-index:4;align-items:center;padding:8px 10px 0;display:flex;position:absolute;top:0;left:0}.wordmark{color:#1c1713;align-items:center;gap:8px;text-decoration:none;display:flex}.wordmark img{width:36px;height:36px;display:block}.wordmark span{letter-spacing:.01em;font-family:Fraunces,Georgia,serif;font-weight:700;font-size:22px;line-height:1}canvas{z-index:1;border-radius:8px;max-width:calc(100% - 8px);margin:auto;position:absolute;bottom:0;right:0;left:0;box-shadow:0 8px 28px rgba(28,23,19,.18)}#sand-canvas{z-index:2}canvas,img{image-rendering:pixelated;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}button{z-index:3;color:#2a2118;fill:#2a2118;cursor:pointer;background:#f7f1e8;border:1px solid #d7cbb8;border-radius:6px;flex-grow:1;height:30px;min-width:30px;max-width:150px;padding:1px 7px;font-family:inherit;font-size:15px;font-weight:600;line-height:0;position:relative}button:hover{background:#fffaf3}button:focus{outline:2px solid #c9a36a;outline-offset:1px}button.selected{color:#f7f1e8;fill:#f7f1e8;background:#1c1713;border-color:#1c1713}#ui{float:right;flex-wrap:wrap;gap:4px;justify-content:flex-end;max-width:calc(100% - 160px);padding:8px 8px 0 0;display:flex}#fps{pointer-events:none;z-index:3;-webkit-user-select:none;user-select:none;background:rgba(247,241,232,.7);border-radius:4px;padding:2px 6px;font-size:12px;position:absolute;right:8px;bottom:8px}.sizes{gap:4px;display:flex}.menu-scrim{z-index:6;background:rgba(28,23,19,.45);position:absolute;top:0;right:0;bottom:0;left:0}.menu{z-index:7;background:#f7f1e8;border:1px solid #d7cbb8;border-radius:12px;max-width:720px;max-height:calc(100% - 72px);margin:48px auto 0;padding:20px 22px 22px;position:absolute;left:12px;right:12px;top:12px;overflow:auto;box-shadow:0 16px 40px rgba(28,23,19,.22)}.menu h2{margin:0 0 10px;font-family:Fraunces,Georgia,serif;font-size:28px}.menu h3{margin:18px 0 6px;font-size:16px}.menu li,.menu p{margin:0 0 8px;font-size:15px;line-height:1.5}.menu a{color:#6b3f1f}.x{min-width:36px;max-width:36px;height:36px;font-size:22px;position:absolute;right:10px;top:8px}@media only screen and (min-width:700px){#ui{max-width:42%}.wordmark span{font-size:26px}.wordmark img{width:42px;height:42px}}@media only screen and (max-width:699px){#ui{justify-content:flex-start;max-width:100%;padding-top:48px}}#game-overlay{z-index:3;pointer-events:none;background:none;box-shadow:none}#background{transition:transform 40ms linear}button.icon{fill:currentcolor;flex-grow:0;align-items:center;justify-content:center;min-width:34px;max-width:34px;height:34px;padding:0;display:inline-flex}button svg{fill:inherit}.hud{flex-direction:column;gap:6px;width:100%;display:flex}.hud-top{align-items:center;gap:4px;display:flex}.stage-tag{word-break:keep-all;flex:1;min-width:0;padding:0 4px;font-size:14px;font-weight:600;line-height:1.15}.stage-tag b{margin-right:4px;font-family:Fraunces,Georgia,serif;font-size:18px}.tools{flex-wrap:wrap;gap:4px;display:flex}button.tool{background:var(--tool);border-color:rgba(42,33,24,.18);flex:1 1 84px;flex-direction:column;align-items:stretch;justify-content:center;gap:6px;height:44px;min-width:84px;max-width:none;padding:6px 9px;line-height:1;display:flex}button.tool.selected{color:#1c1713;background:var(--tool);border:2px solid #1c1713;padding:5px 8px;transform:translateY(-1px);box-shadow:0 3px #1c1713}button.tool.spent{opacity:.55}.tool-name{text-align:left;font-size:14px}.meter{background:rgba(28,23,19,.16);border-radius:3px;height:6px;display:block;position:relative;overflow:visible}.meter i{background:#1c1713;border-radius:3px;transition:width.12s linear;position:absolute;left:0;top:0;bottom:0}.meter em{background:#f7f1e8;border-radius:1px;width:2px;height:10px;margin-left:-1px;position:absolute;top:-2px;box-shadow:0 0 0 1px rgba(28,23,19,.35)}.hud-dock{display:contents}.hud .sizes{align-self:flex-start}.hud .sizes button{min-width:34px;height:34px}button.pour{color:#f7f1e8;fill:#f7f1e8;background:#1c1713;border-color:#1c1713;border-radius:10px;align-items:center;justify-content:center;gap:8px;height:46px;max-width:none;font-size:17px;display:flex}button.pour:hover{background:#33291f}button.pour.nudge{animation:nudge 1.1s ease-in-out infinite}@keyframes nudge{0%,to{transform:scale(1);box-shadow:0 0 rgba(201,163,106,.7)}50%{transform:scale(1.04);box-shadow:0 0 0 8px rgba(201,163,106,0)}}.stars{vertical-align:middle;gap:2px;display:inline-flex}.stars svg.on{fill:#d99a2b}.stars svg.off{fill:rgba(28,23,19,.16)}.stars.pop svg{animation:starpop.5s cubic-bezier(.2,1.6,.4,1) both}.stars.pop svg.off{animation-name:starfade}@keyframes starpop{0%{opacity:0;transform:scale(0) rotate(-40deg)}to{opacity:1;transform:scale(1) rotate(0)}}@keyframes starfade{0%{opacity:0}to{opacity:1}}.result{z-index:8;background:#f7f1e8;border-radius:16px;border:1px solid #d7cbb8;flex-direction:column;align-items:center;gap:16px;min-width:260px;padding:22px 24px 18px;animation:rise.35s cubic-bezier(.2,1.3,.4,1) both;display:flex;position:fixed;left:var(--board-cx,50%);top:var(--board-cy,50%);transform:translate(-50%,-50%);box-shadow:0 18px 50px rgba(28,23,19,.28)}.result.won{animation-delay:.45s}.result .why{font-family:Fraunces,Georgia,serif;font-size:22px}.result-actions{gap:8px;display:flex}.result-actions button{fill:currentcolor;align-items:center;justify-content:center;gap:6px;height:42px;padding:0 14px;display:inline-flex}.result-actions button.icon{height:42px;min-width:42px;max-width:42px}button.primary{color:#f7f1e8;background:#1c1713;border-color:#1c1713}button.primary:hover{background:#33291f}@keyframes rise{0%{opacity:0;transform:translate(-50%,-40%) scale(.92)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}.menu-scrim.soft{backdrop-filter:blur(2px);background:rgba(239,230,216,.55)}.stage-menu{max-width:560px;padding:18px 18px 14px}.menu-head{align-items:baseline;justify-content:space-between;margin-bottom:12px;display:flex}.menu-head h2{margin:0;font-size:26px}.menu-head .total{align-items:center;gap:4px;font-size:14px;font-weight:600;display:inline-flex}.stage-grid{grid-template-columns:repeat(4,1fr);gap:8px;display:grid}button.stage-tile{background:#fffaf3;border-radius:12px;flex-direction:column;align-items:center;justify-content:space-between;gap:4px;max-width:none;height:auto;min-height:92px;padding:10px 6px 9px;line-height:1.1;display:flex}button.stage-tile b{font-family:Fraunces,Georgia,serif;font-size:28px;line-height:1}.tile-name{text-align:center;color:#5a4a3a;font-size:12px;font-weight:600}button.stage-tile.current{border:2px solid #c9a36a;padding:9px 5px 8px;box-shadow:0 0 0 3px rgba(201,163,106,.25)}button.stage-tile.locked{opacity:.45;cursor:default;background:#efe6d8}.tile-lock{fill:#5a4a3a;color:#5a4a3a;height:14px}button.tray-tile{background:#f1e5d1}.menu-foot{justify-content:space-between;align-items:center;margin-top:12px;display:flex}button.link{color:#6b3f1f;background:none;border:none;flex-grow:0;font-weight:400;text-decoration:underline}body[data-mode=menu] #ui,body[data-mode=play] #ui{flex-wrap:nowrap}@media only screen and (max-width:699px){.stage-grid{grid-template-columns:repeat(4,1fr);gap:6px}button.stage-tile{min-height:78px}button.stage-tile b{font-size:22px}.tile-name{font-size:11px}.hud{gap:5px}body[data-mode=play] #ui{float:none;width:100%;max-width:100%;padding:50px 8px 0}.hud{grid-template-columns:1fr auto;align-items:start;display:grid}.hud .tools,.hud-top,button.pour{grid-column:1/-1}.hud .sizes button{flex-grow:0}button.tool{height:40px}.hud-dock{z-index:5;flex-direction:column;gap:8px;justify-content:flex-end;min-height:98px;display:flex;position:fixed;left:8px;right:8px;bottom:calc(10px + env(safe-area-inset-bottom,0px))}.hud-dock .sizes{align-self:center;gap:8px}.hud-dock .sizes button{min-width:44px;height:40px}button.pour{height:50px}}@media only screen and (max-width:699px) and (min-height:780px){.hud{gap:8px}button.tool{height:50px}.tool-name{font-size:15px}.hud-top button.icon{min-width:40px;max-width:40px;height:40px}}.goal{word-break:keep-all;color:#2a2118;background:#fffaf0;border:1px solid #d7cbb8;border-left:4px solid #c9a36a;border-radius:8px;margin:0;padding:8px 10px;font-size:15px;font-weight:600;line-height:1.35}.tool-name{justify-content:space-between;align-items:baseline;gap:6px;display:flex}.tool-name small{color:rgba(28,23,19,.65);white-space:nowrap;font-size:11px;font-weight:600}button.pour.idle{opacity:.42;box-shadow:none}.tools.nudge-tool button.tool.selected{animation:nudge.45s ease-in-out 2}.result .saved{color:#5a4a3a;margin:-6px 0 0;font-size:13px;font-weight:600}.result.lost .why{text-align:center;word-break:keep-all;max-width:240px;line-height:1.3}.menu{max-height:calc(100% - 24px);margin:0 auto;top:50%;transform:translateY(-50%)}button.icon.help{font-size:17px;font-weight:700;line-height:1}button.hintbtn{fill:#2a2118;background:#f3c85a;border-color:#c9973f;align-items:center;justify-content:center;gap:8px;height:40px;max-width:none;font-size:15px;display:inline-flex}button.hintbtn.on{color:#f7f1e8;fill:#f7f1e8;background:#1c1713;border-color:#1c1713}.tut{z-index:9;pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0}.tut-scrim{pointer-events:auto;cursor:pointer;position:absolute;top:0;right:0;bottom:0;left:0}.tut-hole{pointer-events:none;border-radius:14px;border:2px solid #f3c85a;animation:tutpulse 1.2s ease-in-out infinite;position:absolute;box-shadow:0 0 0 100vmax rgba(28,23,19,.58)}@keyframes tutpulse{0%,to{border-color:#f3c85a}50%{border-color:rgba(243,200,90,.35)}}.tut-bubble{z-index:10;pointer-events:auto;background:#fffaf0;border-radius:14px;border:1px solid #d7cbb8;padding:14px 16px 12px;animation:rise2.25s ease-out both;position:absolute;box-shadow:0 14px 40px rgba(28,23,19,.3)}.tut-bubble.passive{pointer-events:none;background:rgba(255,250,240,.97)}.tut-bubble.passive button{pointer-events:auto}.tut-bubble p{word-break:keep-all;color:#2a2118;margin:0 0 10px;font-size:17px;font-weight:600;line-height:1.35}.tut-foot{align-items:center;gap:10px;display:flex}.tut-dots{flex:1;gap:5px;display:inline-flex}.tut-dots i{background:rgba(28,23,19,.18);border-radius:50%;width:7px;height:7px}.tut-dots i.past{background:rgba(28,23,19,.45)}.tut-dots i.on{background:#c9973f}.tut-foot button.primary{flex-grow:0;height:38px;padding:0 18px;font-size:15px;line-height:1}.tut-foot button.link{color:#6b5a48;flex-grow:0;font-size:13px}.tut-skip{pointer-events:auto;background:rgba(251,247,240,.9);border-radius:999px;padding:6px 12px;position:absolute;right:14px}@keyframes rise2{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.menu,.menu-scrim{position:fixed}