*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;height:100%;overflow:hidden;background:#2f6d3a;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#fff;touch-action:none;user-select:none;-webkit-user-select:none}
#cv{position:fixed;inset:0;width:100vw;height:100vh;display:block}
#top{position:fixed;left:0;right:0;top:0;display:flex;justify-content:space-between;align-items:flex-start;gap:6px;padding:calc(env(safe-area-inset-top) + 6px) 8px 0;pointer-events:none;flex-wrap:wrap}
#top>*{pointer-events:auto}.nav,.stats{display:flex;gap:6px;flex-wrap:wrap}.stats{justify-content:flex-end}
.nb,.chip{display:flex;align-items:center;gap:4px;min-height:42px;padding:0 12px;border-radius:21px;background:rgba(20,30,50,.78);border:2px solid rgba(255,255,255,.35);color:#fff;text-decoration:none;font-weight:700;font-size:15px;box-shadow:0 3px 8px rgba(0,0,0,.35)}
.chip b{font-size:16px}.btn{cursor:pointer;font:inherit;font-weight:700}#cCoins{border-color:#ffd34d}#cHap.lo{border-color:#ff6b5b}
@media(max-width:430px){.wide{display:none}.chip{padding:0 9px;font-size:14px}}
#build{position:fixed;left:0;right:0;bottom:0;display:flex;gap:8px;overflow-x:auto;padding:8px 8px calc(env(safe-area-inset-bottom) + 8px);background:linear-gradient(transparent,rgba(10,20,35,.85) 30%);scrollbar-width:none}
#build::-webkit-scrollbar{display:none}
.card{flex:0 0 auto;width:84px;min-height:96px;border-radius:14px;background:linear-gradient(#fff,#dfe8f2);color:#1d2a3a;border:3px solid #fff;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:12px;font-weight:700;cursor:pointer;box-shadow:0 4px 10px rgba(0,0,0,.4);position:relative;padding:4px}
.card .ic{font-size:32px;line-height:1.1}.card .pr{margin-top:2px;color:#9a6a00}.card.on{border-color:#ffcf33;background:linear-gradient(#fff6c8,#ffd96a)}.card.lock{opacity:.5;filter:grayscale(1)}
.card .lk{font-size:10px;color:#a33}
#place{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(env(safe-area-inset-bottom) + 120px);display:flex;gap:10px;align-items:center;background:rgba(20,30,50,.9);padding:8px 8px 8px 16px;border-radius:26px;font-weight:700;max-width:94vw}
.pill{min-height:44px;padding:0 18px;border-radius:22px;border:0;font:inherit;font-weight:800;font-size:15px;background:#2e9b4f;color:#fff;cursor:pointer}.pill.red{background:#d9443a}.pill.alt{background:#3b6fd1}.pill.gold{background:#e8a317}.pill:disabled{opacity:.45}
#sheet{position:fixed;left:0;right:0;bottom:0;max-height:64vh;overflow:auto;background:#fbf7ee;color:#2a2418;border-radius:20px 20px 0 0;padding:14px 16px calc(env(safe-area-inset-bottom) + 16px);box-shadow:0 -6px 24px rgba(0,0,0,.4);z-index:5}
@media(min-width:760px){#sheet{left:50%;transform:translateX(-50%);width:560px}}
.sh-h{display:flex;justify-content:space-between;align-items:center}.sh-h h2{margin:0;font-size:21px}.x{width:44px;height:44px;border-radius:22px;border:0;background:#e6dcc8;font-size:18px;cursor:pointer}
.row{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0;align-items:center}.sub{opacity:.75;font-size:14px;margin:4px 0}
.prod{flex:1 1 140px;border:2px solid #d8ccb4;border-radius:14px;padding:10px;background:#fff;text-align:center;font-weight:700;cursor:pointer;min-height:84px}.prod .ic{font-size:30px}.prod.dis{opacity:.45}
.slot{width:62px;height:62px;border-radius:12px;background:#efe6d3;border:2px dashed #c9b994;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:24px}.slot small{font-size:11px;font-weight:700}.slot.ready{background:#fff4b8;border:2px solid #f1b600;animation:gl 1s infinite alternate}
@keyframes gl{to{box-shadow:0 0 14px #ffd000}}
.need{display:inline-flex;gap:4px;padding:4px 10px;border-radius:12px;background:#eee4cf;font-weight:700;margin:2px}.need.ok{background:#cdeec9}.need.no{background:#f8d0cb}
#toast{position:fixed;left:50%;top:calc(env(safe-area-inset-top) + 110px);transform:translateX(-50%);background:rgba(20,30,50,.92);padding:10px 18px;border-radius:20px;font-weight:700;opacity:0;transition:opacity .25s;pointer-events:none;max-width:90vw;text-align:center;z-index:9}#toast.on{opacity:1}
#banner{position:fixed;left:50%;transform:translateX(-50%);top:calc(env(safe-area-inset-top) + 104px);background:#b3261e;padding:8px 16px;border-radius:18px;font-weight:800;z-index:4;max-width:92vw;text-align:center;box-shadow:0 3px 10px rgba(0,0,0,.4)}
input.code{font:inherit;font-size:16px;padding:10px;border-radius:10px;border:2px solid #c9b994;width:100%;max-width:340px}
.sw{display:inline-block;padding:4px 12px;border-radius:12px;font-weight:800}.sw.on{background:#2e9b4f;color:#fff}.sw.off{background:#d9443a;color:#fff}
[hidden]{display:none!important}
@media(max-height:500px){.card{width:70px;min-height:70px;font-size:11px}.card .ic{font-size:24px}#place{bottom:90px}}
#build{flex-direction:column;gap:6px}
.tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}
.tab{flex:0 0 auto;min-height:34px;padding:0 12px;border-radius:17px;border:2px solid rgba(255,255,255,.4);background:rgba(20,30,50,.75);color:#fff;font:inherit;font-weight:800;font-size:13px;cursor:pointer}.tab.on{background:#ffcf33;color:#1d2a3a;border-color:#fff}
.cards{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}.cards::-webkit-scrollbar{display:none}
#bRci{gap:3px;padding:0 10px}.dm{display:inline-flex;align-items:flex-end;width:8px;height:26px;background:rgba(255,255,255,.18);border-radius:3px;overflow:hidden}.dm i{display:block;width:100%;border-radius:3px}
#side{position:fixed;right:8px;bottom:calc(env(safe-area-inset-bottom) + 168px);display:flex;flex-direction:column;gap:8px;z-index:3}
#side .chip{justify-content:center;min-width:48px;font-size:18px}#bUndo{background:#d9443a;color:#fff;border-color:#fff}
.garage{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.spot{border:2px dashed #c9b994;border-radius:10px;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px;text-align:center}.spot.got{border-style:solid;background:#fff}.spot i{width:34px;height:12px;border-radius:8px 12px 4px 4px;display:block;margin-bottom:3px}.spot small{font-size:9px;font-weight:700;line-height:1.1}
input[type=range]{accent-color:#e8a317;height:36px}
@media(max-height:500px){#side{bottom:120px}.tab{min-height:28px}}
.xp{height:14px;border-radius:7px;background:#e6dcc8;overflow:hidden}.xp i{display:block;height:100%;background:linear-gradient(90deg,#7950f2,#e64980)}
.achs{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.ach{border:2px dashed #c9b994;border-radius:10px;padding:6px;opacity:.55}.ach.got{opacity:1;border-style:solid;background:#fff4b8}.ach b{display:block;font-size:13px}.ach small{font-size:11px}
canvas.chart{width:100%;height:auto;border-radius:10px;margin:4px 0;border:1px solid #e6dcc8}
#bGoals b{font-size:12px;margin-left:1px}
#tut{position:fixed;left:50%;transform:translateX(-50%);top:calc(env(safe-area-inset-top) + 64px);width:min(94vw,460px);background:#fffaf0;color:#2a2418;border:3px solid #e8a317;border-radius:18px;padding:10px 12px 8px;z-index:20;box-shadow:0 8px 28px rgba(0,0,0,.35);font-size:15px;line-height:1.35}
#tut.low{top:auto;bottom:calc(env(safe-area-inset-bottom) + 150px)}
#tut .th{display:flex;align-items:center;gap:8px;font-size:17px}#tut .th small{margin-left:auto;color:#8a7a5a;font-weight:700}
.tdog{font-size:30px;display:inline-block;animation:wag 1.2s ease-in-out infinite;transform-origin:50% 90%}@keyframes wag{50%{transform:rotate(-10deg)}}
#tutT{margin:6px 0 8px}#tut .tb{display:flex;gap:8px;justify-content:space-between}#tut .pill{min-height:40px}#tut .pill:disabled{opacity:.4}
#tut .pill.glow{animation:glow 1s ease-in-out infinite}@keyframes glow{50%{box-shadow:0 0 0 6px rgba(46,155,79,.35)}}
#tutSkip{display:block;margin:6px auto 0;background:none;border:0;color:#b3261e;font:inherit;font-weight:800;font-size:13px;text-decoration:underline;cursor:pointer;min-height:32px}
#tutSpot{position:fixed;border:3px solid #ffd43b;border-radius:14px;box-shadow:0 0 0 4000px rgba(0,0,0,.28),0 0 18px #ffd43b;pointer-events:none;z-index:19;transition:all .25s}
#tutArrow{position:fixed;font-size:34px;pointer-events:none;z-index:21;animation:bob .8s ease-in-out infinite}@keyframes bob{50%{transform:translateY(6px)}}
.tutOffer{position:fixed;inset:0;background:rgba(10,20,35,.55);display:flex;align-items:center;justify-content:center;z-index:30}.tutOffer .tcard{background:#fffaf0;color:#2a2418;border-radius:20px;padding:18px;width:min(90vw,420px);text-align:center}.tutOffer .tdog{font-size:56px}.tutOffer .row{justify-content:center}
