:root{--ink:#3b2a18;--cream:#f4ead6}
*{box-sizing:border-box;margin:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;overscroll-behavior:none}
body{font-family:'Kalam',system-ui,sans-serif;color:var(--ink);background:#a8703d;touch-action:none;user-select:none;-webkit-user-select:none;overflow:hidden}
#app{position:relative;max-width:480px;height:100%;margin:0 auto;overflow:hidden;background:#c98a4b url(../art/wood.webp) center/cover}
#cv{position:absolute;inset:0;width:100%;height:100%;display:block}
.screen{position:absolute;inset:0;pointer-events:none}
.screen>*{pointer-events:auto}
.screen.hidden{display:none!important}
button{font-family:inherit;cursor:pointer;border:none;color:inherit;background:none}
img{-webkit-user-drag:none}
.label{display:inline-flex;align-items:center;gap:6px;background:url(../art/label.webp) center/100% 100% no-repeat;padding:8px 16px 6px;font-weight:700;font-size:20px;color:var(--ink);filter:drop-shadow(1px 3px 2px rgba(60,30,0,.3));min-width:86px;justify-content:center}
.label.small{font-size:16px;padding:6px 16px}
.label .coin{width:22px;height:22px}
/* hud */
.hud{position:absolute;left:0;right:0;top:0;padding:calc(12px + env(safe-area-inset-top)) 12px 0;display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none}
.hud .lv{transform:rotate(-2deg)}.hud .coins{transform:rotate(2deg)}
.note{position:absolute;left:50%;top:calc(62px + env(safe-area-inset-top));transform:translateX(-50%) rotate(-1.5deg);width:132px;height:56px;background:url(../art/note.webp) center/100% 100% no-repeat;display:flex;align-items:center;justify-content:center;gap:6px;filter:drop-shadow(1px 3px 3px rgba(60,30,0,.3));font-size:26px;font-weight:700}
.note .clk{width:24px;height:24px;filter:brightness(.25)}
.note.low{animation:pulse .6s ease-in-out infinite alternate;color:#c0392b}
.note.frozen{filter:drop-shadow(0 0 8px #9fd3ff) drop-shadow(1px 3px 3px rgba(60,30,0,.3));color:#2f6fb0}
@keyframes pulse{to{transform:translateX(-50%) rotate(-1.5deg) scale(1.08)}}
.btn-s{position:absolute;left:50%;transform:translateX(-50%);top:calc(14px + env(safe-area-inset-top));width:42px;height:42px;border-radius:50%;background:url(../art/btn_green.webp) center/contain no-repeat;filter:drop-shadow(1px 3px 2px rgba(60,30,0,.3))}
.btn-s img{width:52%;height:52%;margin-top:2px}
/* clay booster buttons */
.boost{position:absolute;left:0;right:0;bottom:calc(14px + env(safe-area-inset-bottom));display:flex;justify-content:center;gap:22px}
.cb{position:relative;width:74px;height:74px;background:center/contain no-repeat;filter:drop-shadow(1px 4px 3px rgba(60,30,0,.35));display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:11px;letter-spacing:.5px;text-shadow:0 1px 2px rgba(0,0,0,.45)}
.cb img{width:46%;height:auto;filter:drop-shadow(0 1px 1px rgba(0,0,0,.3))}
.cb span{margin-top:-2px}
.cb.blue{background-image:url(../art/btn_blue.webp)}.cb.red{background-image:url(../art/btn_red.webp)}.cb.purple{background-image:url(../art/btn_purple.webp)}
.cb .n{position:absolute;top:-4px;right:-4px;width:26px;height:26px;background:url(../art/badge.webp) center/contain no-repeat;color:#fff;font-style:normal;font-size:14px;display:flex;align-items:center;justify-content:center}
.cb .n.buy{font-size:11px}
.cb:active{transform:translateY(2px) scale(.96)}
.cb.on{animation:wig .35s ease-in-out infinite alternate}
@keyframes wig{from{transform:rotate(-7deg)}to{transform:rotate(7deg) scale(1.07)}}
.hint{position:absolute;left:16px;right:16px;bottom:calc(104px + env(safe-area-inset-bottom));text-align:center;font-size:17px;font-weight:700;color:#3b2a18;pointer-events:none;opacity:0;transition:opacity .25s}
.hint span{background:rgba(255,248,232,.85);padding:4px 12px;border-radius:12px;box-shadow:0 2px 4px rgba(60,30,0,.2)}
.hint.show{opacity:1}
/* home */
#home{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:calc(20px + env(safe-area-inset-top)) 18px calc(90px + env(safe-area-inset-bottom));gap:18px}
.logo{width:min(360px,88vw);margin-bottom:6px;filter:drop-shadow(2px 6px 5px rgba(60,30,0,.35))}
.sub{font-size:18px;text-align:center;max-width:300px;color:#2e1d0c;font-weight:700;text-shadow:0 1px 0 rgba(255,240,210,.6)}
.row{display:flex;gap:12px}
.pill{width:250px;height:80px;background:url(../art/pill.webp) center/100% 100% no-repeat;color:#fff;font-size:32px;font-weight:700;text-shadow:0 2px 3px rgba(0,0,0,.35);filter:drop-shadow(2px 5px 4px rgba(60,30,0,.35));padding-top:4px}
.pill:active{transform:translateY(2px)}
.home-foot{position:absolute;left:0;right:0;bottom:calc(40px + env(safe-area-inset-bottom));display:flex;justify-content:center}
.credit{position:absolute;left:0;right:0;bottom:calc(14px + env(safe-area-inset-bottom))}
.credit{color:#3b2a18;font-size:12px;text-decoration:none;text-align:center;display:block;opacity:.8}
/* overlay */
.ov{position:absolute;inset:0;background:rgba(50,25,5,.45);display:flex;align-items:center;justify-content:center;z-index:30;opacity:0;transition:opacity .2s;pointer-events:auto}
.ov.in{opacity:1}
.ov-card{background:url(../art/card.webp) center/100% 100% no-repeat;padding:30px 24px 24px;width:310px;text-align:center;filter:drop-shadow(3px 8px 10px rgba(40,20,0,.4))}
.ov-card h2{font-size:32px;line-height:1.1}
.ov-body{margin:8px 0 16px;font-size:18px}
.ov-body .big{font-size:42px;font-weight:700;display:block;line-height:1.1}
.ov-btns{display:flex;flex-direction:column;gap:10px;align-items:center}
.btn{font-weight:700;font-size:20px;padding:10px 26px;background:url(../art/label.webp) center/100% 100% no-repeat;color:var(--ink);filter:drop-shadow(1px 3px 2px rgba(60,30,0,.3));min-width:210px}
.btn.primary{background-image:url(../art/pill.webp);color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.35);font-size:22px;padding:14px 26px}
.btn:active{transform:translateY(2px)}
.stars{display:flex;justify-content:center;gap:6px;margin:4px 0 6px}
.stars span{width:48px;height:48px;background:url(../art/star.webp) center/contain no-repeat;filter:grayscale(1) opacity(.3)}
.stars span.on{filter:none;animation:pop .35s backwards}
.stars span:nth-child(2).on{animation-delay:.15s}.stars span:nth-child(3).on{animation-delay:.3s}
@keyframes pop{from{transform:scale(0)}70%{transform:scale(1.25)}}
