@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700;900&display=swap');
html,body{margin:0;height:100%;overflow:hidden;background:#cfe3b8;font-family:Vazirmatn,sans-serif;touch-action:none;user-select:none;-webkit-user-select:none}
#game-root{display:none!important}
#app{position:fixed;inset:0;overflow:hidden;direction:rtl}
#cv{position:absolute;inset:0;width:100%;height:100%;display:block}
.scr{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;z-index:10;padding:env(safe-area-inset-top) 16px env(safe-area-inset-bottom);box-sizing:border-box;text-align:center}
.scr.off{display:none}
.bgimg{background-size:cover;background-position:center}
.btn{font-family:Vazirmatn,sans-serif;font-weight:900;font-size:20px;color:#3b2a06;border:3px solid #5a4110;border-radius:22px;padding:10px 26px;min-height:52px;min-width:160px;background:linear-gradient(#ffe9a3,#f2bf3c);box-shadow:0 5px 0 #8a6315,0 8px 16px #0004;cursor:pointer;transition:transform .1s}
.btn:active{transform:translateY(3px);box-shadow:0 2px 0 #8a6315}
.btn.g{background:linear-gradient(#d8f2b0,#8fc458);border-color:#3c6418;box-shadow:0 5px 0 #3c6418,0 8px 16px #0004;color:#1f3b0a}
.btn.s{font-size:16px;min-width:120px;min-height:44px;padding:6px 16px}
.playimg{width:210px;height:105px;background:url(assets/btn_play.webp) center/contain no-repeat;border:0;cursor:pointer;position:relative;font-family:Vazirmatn;font-weight:900;font-size:26px;color:#fff;text-shadow:0 2px 0 #3a5a12,0 0 6px #0006;animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(1.06)}}
@keyframes float{50%{transform:translateY(-10px) rotate(-2deg)}}
.logo{width:min(72vw,330px);animation:float 3s ease-in-out infinite;filter:drop-shadow(0 8px 14px #0004)}
.title{font-size:44px;font-weight:900;color:#fffbe8;text-shadow:0 3px 0 #4b6b1c,0 0 18px #2b4a0a88;margin:-10px 0 0;line-height:1.5}
.sub{color:#2f4d14;font-weight:700;background:#fff8e0cc;border-radius:14px;padding:2px 14px;line-height:1.9}
.row{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap}
.coinpill{display:flex;align-items:center;gap:6px;background:#fff8e0e6;border:2px solid #8a6315;border-radius:20px;padding:2px 12px 2px 6px;font-weight:900;color:#5a4110;font-size:17px}
.coinpill img{width:28px;height:28px}
.topbar{position:absolute;top:calc(env(safe-area-inset-top) + 10px);inset-inline:12px;display:flex;justify-content:space-between;align-items:center;z-index:3}
#mapScroll{position:absolute;inset:0;overflow-y:auto;touch-action:pan-y}
#mapInner{position:relative;width:100%;max-width:520px;margin:0 auto}
.node{position:absolute;width:74px;height:74px;margin:-37px;border-radius:50%;border:4px solid #5a4110;background:radial-gradient(#fff6cf,#f0c24a);display:flex;align-items:center;justify-content:center;font-weight:900;font-size:26px;color:#5a4110;cursor:pointer;box-shadow:0 5px 0 #8a6315,0 8px 14px #0005}
.node.lock{background:radial-gradient(#e7e2d2,#a49d86);border-color:#5e5848;box-shadow:0 5px 0 #5e5848;cursor:default}
.node.lock img{width:46px}
.node.cur{animation:pulse 1.2s infinite}
.node .st{position:absolute;bottom:-22px;display:flex;gap:0}
.node .st img{width:24px;height:24px}
.node .st img.e{filter:grayscale(1) brightness(.5);opacity:.6}
.node .nm{position:absolute;top:-30px;white-space:nowrap;font-size:13px;background:#fff8e0ee;border-radius:10px;padding:0 8px;color:#2f4d14;line-height:1.8}
.panel{position:relative;width:min(92vw,400px);aspect-ratio:1;background-size:100% 100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:56px 44px;box-sizing:border-box}
.panel h2{margin:0;font-size:28px;color:#4b3307;line-height:1.6;text-shadow:0 2px 0 #fff8}
.dim{background:#1d2e0caa;backdrop-filter:blur(3px)}
.shopList{display:flex;flex-direction:column;gap:7px;width:100%}
.item{display:flex;align-items:center;gap:8px;background:#fffbea;border:2px solid #b48d3a;border-radius:14px;padding:5px 8px;text-align:start}
.item .ic{width:36px;height:36px;flex:none}
.item .tx{flex:1;min-width:0;font-size:14px;line-height:1.6;color:#3b2a06}
.item .tx b{display:block;font-size:15px}
.item .btn{min-width:78px;min-height:38px;font-size:14px;padding:2px 8px;border-radius:12px}
#hud2{position:absolute;top:calc(env(safe-area-inset-top) + 8px);inset-inline:8px;z-index:5;display:flex;flex-direction:column;gap:6px;pointer-events:none}
#hud2.off{display:none}
.hrow{display:flex;align-items:center;gap:8px;background:url(assets/hud_frame.webp) center/100% 100%;padding:8px 16px;min-height:44px;box-sizing:border-box}
.hrow .sc{font-weight:900;color:#4b3307;font-size:18px;flex:1;text-align:start}
.hearts img{width:26px;height:26px}
.hearts img.e{filter:grayscale(1);opacity:.35}
#pauseB{pointer-events:auto;width:46px;height:46px;border:0;background:url(assets/icon_pause.webp) center/contain no-repeat;cursor:pointer;flex:none}
.grow{height:14px;border-radius:8px;background:#fff8e0cc;border:2px solid #5a4110;overflow:hidden;margin:0 8px;position:relative}
.grow i{display:block;height:100%;width:0;background:linear-gradient(90deg,#fff3c4,#f0c24a);transition:width .25s}
.glab{font-size:12px;color:#2f4d14;font-weight:700;margin-inline-start:12px;line-height:1.4;text-shadow:0 0 4px #fff}
#tut{position:absolute;bottom:calc(env(safe-area-inset-bottom) + 70px);inset-inline:20px;z-index:6;text-align:center;pointer-events:none}
#tut span{display:inline-block;background:#fffbeaee;border:3px solid #6a8a2a;border-radius:18px;padding:8px 18px;font-weight:900;color:#2f4d14;font-size:18px;line-height:1.7;box-shadow:0 6px 14px #0004}
#tut.off{display:none}
.stars{display:flex;gap:6px;justify-content:center}
.stars img{width:62px;height:62px;transform:scale(0);transition:transform .4s cubic-bezier(.3,1.8,.5,1)}
.stars img.on{transform:scale(1)}
.stars img.e{filter:grayscale(1) brightness(.6);opacity:.5}
.msg{color:#4b3307;font-weight:700;line-height:1.8;font-size:16px}
#toast{position:absolute;top:30%;inset-inline:0;text-align:center;z-index:7;pointer-events:none;font-weight:900;font-size:30px;color:#fff;text-shadow:0 3px 0 #4b6b1c,0 0 10px #000a;opacity:0;transition:opacity .3s}
#loadBar{width:220px;height:14px;border:3px solid #5a4110;border-radius:10px;background:#fff8e0;overflow:hidden}
#loadBar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#fff,#f0c24a)}
