/* Shop follows the existing cartoon menu; no changes to the game renderer. */
#gramTonConnectRoot{position:relative;z-index:2147483000;isolation:isolate}
#gramTonConnectRoot [data-tc-h1],#gramTonConnectRoot [data-tc-h2]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:normal;-webkit-text-stroke:0;text-shadow:none;text-transform:none}
#openShop{position:absolute;z-index:12;left:calc(var(--safe-left,0px) + 24px);top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;gap:9px;min-width:122px;min-height:62px;padding:10px 16px;border:4px solid #0b1709;border-radius:19px;background:linear-gradient(#3b592a,#21381e);box-shadow:inset 0 0 0 2px #94b94b,0 5px #07100688;color:#fff4c7;font:400 25px/1 var(--display);cursor:pointer}
#openShop>svg{width:32px;height:32px;flex:none;color:#13230d}#shopLock{font:16px var(--ui)}
#openShop:hover{filter:brightness(1.12)}body.playing #openShop{display:none}
#shopPanel{position:fixed;z-index:9200;inset:0;display:grid;place-items:center;padding:calc(var(--safe-top,0px) + 18px) calc(var(--safe-right,0px) + 18px) calc(var(--safe-bottom,0px) + 18px) calc(var(--safe-left,0px) + 18px);background:#061006c9;backdrop-filter:blur(8px);color:#f6f3da}
#shopPanel[hidden],#shopPanel [hidden],#gramWallet[hidden],#gramWallet [hidden],#shopLock[hidden]{display:none!important}
.shop-card{width:min(700px,100%);max-height:calc(var(--usable-height,100dvh) - 36px);overflow:auto;padding:24px 28px;border:4px solid #0b1709;border-radius:28px;background:linear-gradient(140deg,#253c21,#13261a);box-shadow:inset 0 0 0 2px #a3cb53,0 12px #06100666,0 24px 65px #0006;scrollbar-width:thin;scrollbar-color:#86ab41 #172718}
.shop-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.shop-heading small{font:800 10px var(--ui);letter-spacing:.18em;color:#baca9c}.shop-heading h2{margin:2px 0 0;font:400 38px/1 var(--display);color:#fff4c7;text-shadow:0 3px #0b1709}
#closeShop{width:44px;height:44px;flex:none;border:3px solid #091507;border-radius:50%;background:#253d1c;box-shadow:inset 0 0 0 2px #88aa42;color:#fffbe0;font:400 34px/1 var(--ui);padding:0;cursor:pointer}
.shop-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 0 6px;font:700 13px var(--ui)}#shopMethod{display:flex;gap:8px;align-items:center}#shopMethodIcon{font-size:25px;color:#f3ce51}
#shopPanel button:not(#closeShop):not(.shop-package){border:2px solid #0b1709;border-radius:12px;padding:10px 14px;background:#355129;color:#fff8dd;font:800 13px var(--ui);cursor:pointer;min-height:42px}
#shopPanel button:disabled{cursor:default;filter:saturate(.55);opacity:.65}#shopStatus{min-height:20px;font:600 13px/1.45 var(--ui);color:#f1d590;margin:8px 0 12px;overflow-wrap:anywhere}
.shop-packages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.shop-package{display:flex;flex-direction:column;align-items:center;min-width:0;padding:15px 10px 13px;gap:3px;border:3px solid #142411;border-radius:18px;background:linear-gradient(140deg,#36512a,#213c22);box-shadow:inset 0 0 0 1px #80a94b55;color:#fff6d2;cursor:pointer}.shop-package img{width:54px;height:54px;object-fit:contain;margin:0 0 5px}.shop-package strong{font:400 26px var(--display);white-space:nowrap}.shop-package small{font:700 11px var(--ui);color:#c9d4b9}.shop-price{display:block;margin-top:10px;min-width:100px;border-radius:10px;padding:8px;background:#11230f;color:#f2d96f;font:800 15px var(--ui)}.shop-package:not(:disabled):hover{border-color:#9abd53;transform:translateY(-1px)}
.gram-wallet{margin-top:20px;padding:16px;border:1px solid #8ba46566;border-radius:15px;background:#14261e99}.gram-wallet-title{display:flex;align-items:center;gap:9px;font:700 14px var(--ui);color:#eef5dc}.gram-wallet-title svg{width:30px;height:30px}.gram-wallet-title>span{margin-left:auto;font-size:11px;color:#b4c5ac}#gramAddress{font:12px/1.6 monospace;color:#dce8d1;overflow-wrap:anywhere;margin:12px 0}.gram-wallet-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:12px}.gram-wallet-actions>button{width:auto;min-height:40px;padding:8px 13px;border:2px solid #0b1709;border-radius:10px;background:#315031;color:#f5f5dd;font:800 13px var(--ui)}#connectGram{background:#168bd2;color:white;box-shadow:none}.gram-wallet-actions>button:disabled{opacity:.5;cursor:default}#gramExplorer{font:700 12px var(--ui)}#gramMessage{margin:10px 0 0;color:#e8d391;font:12px/1.5 var(--ui)}#gramMessage:empty{display:none}
@media(max-width:900px),(max-height:600px){#openShop{left:calc(var(--safe-left,0px) + 12px);min-width:108px;min-height:49px;padding:7px 11px;font-size:20px;border-width:3px;border-radius:15px}#openShop>svg{width:26px;height:26px}.shop-card{width:min(620px,100%);padding:17px 20px;max-height:calc(var(--usable-height,100dvh) - 28px)}.shop-heading h2{font-size:30px}.shop-toolbar{padding-top:10px}.shop-packages{gap:8px}.shop-package{padding:9px 7px;border-radius:14px}.shop-package img{width:40px;height:40px;margin:0}.shop-package strong{font-size:23px}.shop-price{margin-top:5px;padding:6px;min-width:85px;font-size:13px}.gram-wallet{padding:12px}}
@media(max-width:480px){.shop-packages{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-toolbar{font-size:11px;gap:6px}.shop-card{padding:16px}.gram-wallet-actions{gap:7px}}

/* Payment logos and the compact method picker. */
.payment-icon{width:28px;height:28px;object-fit:contain;flex:none}
#shopMethodIcon{display:flex;align-items:center}
.shop-selector{position:relative}
#shopMethodMenu{position:absolute;z-index:5;right:0;top:calc(100% + 8px);min-width:190px;padding:7px;border:2px solid #779940;border-radius:15px;background:#142719;box-shadow:0 10px 28px #0008;max-height:min(360px,calc(var(--usable-height,100dvh) - 160px));overflow-y:auto}
#shopPanel #shopMethodMenu .shop-method-option{width:100%;display:flex;align-items:center;gap:10px;justify-content:flex-start;border:0;border-radius:9px;margin:2px 0;background:transparent;text-align:left}
#shopPanel #shopMethodMenu .shop-method-option:hover,#shopPanel #shopMethodMenu .shop-method-option:focus-visible{background:#355129;outline:2px solid #a4c954}
.payment-check{margin-left:auto;font-size:13px}
.shop-price{display:flex;align-items:center;justify-content:center;gap:6px}
.shop-price .payment-icon{width:23px;height:23px;margin:0}
#shopStatus[hidden]{display:none!important}
#shopWalletInfo{margin:0 0 12px;color:#bdd69c;font:600 11px/1.6 var(--ui);overflow-wrap:anywhere}
#shopLock{font:inherit}
.shop-price{min-width:0;max-width:100%;font-variant-numeric:tabular-nums}
.shop-price>span{overflow-wrap:anywhere;min-width:0}
#shopMethodMenu .payment-icon{width:28px;height:28px;margin:0}
#disconnectGram{background:#a93742;color:#fff;border-color:#4e1722;box-shadow:inset 0 1px #e7737c}
#disconnectGram:hover{background:#bc4350}

@font-face{font-family:SnakeEmoji;src:url('ui/noto-emoji.ttf') format('truetype');font-display:swap;unicode-range:U+21A9,U+23F3,U+26A0,U+2705,U+274C,U+FE0F,U+1F512}
#shopStatus,.payment-check{font-family:SnakeEmoji,var(--ui)}

/* Parent-page control; never covers the payment form's legal or privacy links. */
.snake-payment-close{position:fixed;z-index:5;top:calc(env(safe-area-inset-top,0px) + 8px);right:calc(env(safe-area-inset-right,0px) + 8px);display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:0;border:1px solid #c3c8ca;border-radius:50%;background:#fff;color:#41464b;box-shadow:0 2px 9px #0002;font:400 30px/1 system-ui,sans-serif;text-shadow:none;-webkit-text-stroke:0;cursor:pointer}
.snake-payment-close:hover{background:#edf0f2}.snake-payment-close:focus-visible{outline:3px solid #669b2e;outline-offset:2px}

/* Separate package artwork from payment-method icons. */
.shop-package>.shop-package-art{width:128px;max-width:100%;height:112px;object-fit:contain;margin:0 0 4px;flex:none}
@media(max-width:900px),(max-height:600px){
 .shop-package>.shop-package-art{width:100px;height:86px;margin:0}
}
@media(orientation:landscape) and (max-height:600px){
 #shopPanel{padding:calc(var(--safe-top,0px) + 16px) calc(var(--safe-right,0px) + 16px) calc(var(--safe-bottom,0px) + 16px) calc(var(--safe-left,0px) + 16px)}
 .shop-card{width:min(560px,100%);max-height:calc(var(--usable-height,100dvh) - 32px);padding:8px 10px;border-width:3px;border-radius:20px}
 .shop-heading h2{font-size:21px}
 #shopPanel #closeShop{width:34px;height:34px;min-height:34px;padding:0;font-size:26px;border-width:2px}
 .shop-toolbar{padding:3px 0;gap:6px;font-size:10px}
 .shop-toolbar .payment-icon{width:20px;height:20px}
 #shopPanel #shopSelectMethod{min-height:32px;padding:5px 9px;font-size:11px;border-radius:10px}
 .shop-packages{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .shop-package{display:grid;grid-template-columns:40px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:5px;row-gap:0;align-items:center;padding:4px 5px;border-width:2px;border-radius:12px}
 .shop-package>.shop-package-art{grid-column:1;grid-row:1/4;width:40px;height:52px;margin:0}
 .shop-package>strong,.shop-package>small,.shop-package>.shop-price{grid-column:2;min-width:0}
 .shop-package>strong{font-size:17px}
 .shop-package>small{font-size:8px}
 .shop-package>.shop-price{margin-top:2px;padding:4px;font-size:11px;border-radius:8px;gap:4px}
 .shop-price .payment-icon{width:14px;height:14px}
 #shopStatus{font-size:11px;min-height:0;line-height:1.3;margin:3px 0}
 #shopWalletInfo{font-size:9px;line-height:1.3;margin:0 0 5px}
 #shopMethodMenu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;width:246px;min-width:0;max-width:calc(100vw - var(--safe-left,0px) - var(--safe-right,0px) - 64px);max-height:156px;padding:5px;border-radius:12px}
 #shopPanel #shopMethodMenu .shop-method-option{min-height:34px;margin:0;padding:5px 6px;font-size:11px;gap:5px}
 #shopMethodMenu .payment-icon{width:18px;height:18px}
 #shopMethodMenu .payment-check{font-size:10px}
}
@media(orientation:landscape) and (max-height:360px){
 .shop-package>.shop-package-art{grid-row:1/3;height:32px}
 .shop-package>.shop-price{grid-column:1/-1;grid-row:3}
}
