/* Pear Presser — the Shop: store panel, product cards, checkout sheets, parent gate and the
 * Purchases section in Settings. Same candy look as the rest: glossy gradient tiles, ink outlines. */

/* --- entry points --- */
.chip-gems { cursor: pointer; padding-right: 5px; transition: transform .09s cubic-bezier(.3,1.7,.5,1), box-shadow .09s; -webkit-user-select: none; user-select: none; }
.chip-gems:active { transform: translateY(2px) scale(.97); box-shadow: 0 1px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.8); }
.chip-plus { width: 22px; height: 22px; margin-left: 2px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--ink);
  background: linear-gradient(180deg, #d4ff6a, #58b81e); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), inset 0 1.5px 0 rgba(255,255,255,.6);
  font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1; color: #fff; -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; }
#arcade-shop { flex: none; min-height: 34px; padding: 3px 10px; }
#panel-arcade .panel-head { gap: 6px; }

/* --- panel --- */
#panel-shop .panel-head { --ph1: #ffc2e2; --ph2: #ff5ca8; gap: 6px; }
#panel-shop .panel-head h2 { flex: 1; }
#panel-shop .panel-wallet { display: flex; gap: 5px; }
#panel-shop .panel-wallet .chip { padding: 2px 9px 2px 6px; gap: 4px; }
#panel-shop .panel-body { padding-bottom: calc(26px + var(--sab)); }
.st-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 3px 3px 9px; margin: 0 -3px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 4px 13px 4px 10px; border-radius: 999px; border: 2.5px solid var(--ink);
  background: linear-gradient(180deg, #fffef4, #ffeaa0); box-shadow: 0 3px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.8);
  font-family: var(--display); font-weight: 600; font-size: 14.5px; color: var(--ink); white-space: nowrap; -webkit-user-select: none; user-select: none;
  transition: transform .12s cubic-bezier(.3,1.7,.5,1); }
.st-tab span { font-size: 17px; line-height: 1; }
.st-tab.is-on { background: radial-gradient(circle at 16% 24%, rgba(255,255,255,.8) 0 7%, rgba(255,255,255,0) 8%), linear-gradient(180deg, #ffb0dc, #ec2f8c); color: #fff;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; box-shadow: 0 3px 0 var(--ink), inset 0 -4px 0 rgba(0,0,0,.16), inset 0 2px 0 rgba(255,255,255,.5); }
.st-tab.is-on span { -webkit-text-stroke: 0; }
.st-tab:active { transform: translateY(2px) scale(.96); }

.st-test { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 14px; border: 2.5px dashed var(--ink); background: #e9f7ff; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.st-test b { font-family: var(--display); font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #ffe873; border: 2px solid var(--ink); white-space: nowrap; }
.st-lockbar { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 14px; border: 2.5px solid var(--ink); background: linear-gradient(180deg, #fff, #e6e9f2); font-size: 13px; font-weight: 700; }
.st-lockbar .ico { font-size: 18px; flex: none; }
.st-intro { font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }

/* --- product cards --- */
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-card { --c1: #ffe873; --c2: #ffab1f; position: relative; display: grid; gap: 8px 10px; padding: 10px; border: 2.5px solid var(--ink); border-radius: 20px;
  background: linear-gradient(180deg, #fffdf2, #fff1bd); box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.9); }
.st-wide { grid-template-columns: 78px minmax(0, 1fr); align-items: start; }
.st-tile { grid-template-columns: minmax(0, 1fr); align-content: start; text-align: center; padding: 9px 8px 10px; }
.st-card.is-owned { background: linear-gradient(180deg, #f6ffe0, #dcf5a2); }
.st-card.is-star { background: linear-gradient(180deg, #fff9d8, #ffe08a); }
.st-art { position: relative; width: 78px; height: 78px; border-radius: 20px; display: grid; place-items: center; font-size: 42px; line-height: 1; border: 2.5px solid var(--ink);
  background: radial-gradient(circle at 26% 20%, rgba(255,255,255,.88) 0 8%, rgba(255,255,255,0) 9%), linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow: 0 3px 0 var(--ink), inset 0 -6px 0 rgba(0,0,0,.16), inset 0 2px 0 rgba(255,255,255,.55); }
.st-tile .st-art { width: 100%; height: 92px; font-size: 46px; }
.st-art > span { filter: drop-shadow(0 2px 0 rgba(0,0,0,.28)); }
.st-art canvas { width: 82px; height: 82px; display: block; }
.st-wide .st-art canvas { width: 70px; height: 70px; }
.st-art .ico { font-size: 44px; color: #fff; filter: drop-shadow(0 0 0 var(--ink)) drop-shadow(0 2px 0 var(--ink)) drop-shadow(1.5px 0 0 var(--ink)) drop-shadow(-1.5px 0 0 var(--ink)) drop-shadow(0 -1.5px 0 var(--ink)); }
.st-art .ico.s2 { position: absolute; font-size: 26px; left: 13%; bottom: 12%; transform: rotate(-16deg); }
.st-art .ico.s3 { position: absolute; font-size: 24px; right: 13%; bottom: 14%; transform: rotate(14deg); }
.st-count { position: absolute; right: -6px; bottom: -7px; padding: 0 8px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; box-shadow: 0 2px 0 var(--ink);
  font-family: var(--display); font-style: normal; font-weight: 700; font-size: 14px; line-height: 20px; color: var(--ink); white-space: nowrap; }
.st-tile .st-count { right: 6px; bottom: -8px; }
.st-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.st-tile .st-main { align-items: center; }
.st-name { margin: 0; font-family: var(--display); font-weight: 600; font-size: 16.5px; line-height: 1.15; }
.st-tile .st-name { font-size: 15px; }
.st-desc { margin: 0; font-size: 13px; line-height: 1.3; color: var(--ink-soft); font-weight: 600; }
.st-tile .st-desc { font-size: 12.5px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.st-tile .st-chips { justify-content: center; }
.st-tile .st-chip { white-space: normal; text-align: center; max-width: 100%; border-radius: 12px; }
.st-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: #fff; border: 2px solid var(--ink);
  font-family: var(--display); font-weight: 600; font-size: 12.5px; line-height: 1.35; white-space: nowrap; }
.st-chip .ico { font-size: 13px; }
.st-chip.is-had { background: #dff5a8; }
.st-chip.is-new { background: #fff3a8; }
.st-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; }
.st-tile .st-foot { flex-direction: column; justify-content: center; gap: 5px; }
.st-kind { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.st-buy { min-width: 104px; font-size: 18px; font-weight: 700; padding: 6px 14px; }
.st-buy.is-long { font-size: 13.5px; min-width: 0; }
.st-tile .st-buy { width: 100%; min-width: 0; }
.st-buy .ico { font-size: 17px; }
.st-owned { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 3px 14px; border-radius: 999px; border: 2.5px solid var(--ink);
  background: linear-gradient(180deg, #d4ff6a, #6cc41e); box-shadow: 0 3px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.55);
  font-family: var(--display); font-weight: 700; font-size: 15px; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; white-space: nowrap; }
.st-toggle { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 14px; }
.st-perks { display: flex; flex-wrap: wrap; gap: 6px; }
.st-perk { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px 3px 7px; border-radius: 999px; border: 2.5px solid var(--ink); background: linear-gradient(180deg, #f6ffe0, #c9f07a);
  box-shadow: 0 2px 0 var(--ink); font-family: var(--display); font-weight: 600; font-size: 13px; }
.st-perk.is-off { background: linear-gradient(180deg, #fff, #e6e2cf); color: var(--ink-soft); }
.st-grown { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.st-grown button { font-weight: 800; color: var(--ink); text-decoration: underline; padding: 6px 4px; }

/* --- collection: shop skins --- */
.skin-card.is-shop canvas { filter: none; }
.skin-card .tag-shop { --tag: #ec2f8c; }

/* --- sheets: checkout, confirm, thank you, parent gate --- */
.pay-dlg .dlg-body, .gate-dlg .dlg-body { gap: 7px; }
.pay-art { width: 86px; height: 86px; border-radius: 24px; display: grid; place-items: center; font-size: 46px; line-height: 1; border: 3px solid var(--ink); flex: none;
  background: radial-gradient(circle at 26% 20%, rgba(255,255,255,.88) 0 8%, rgba(255,255,255,0) 9%), linear-gradient(180deg, var(--c1, #ffe873), var(--c2, #ffab1f));
  box-shadow: 0 4px 0 var(--ink), inset 0 -6px 0 rgba(0,0,0,.16), inset 0 2px 0 rgba(255,255,255,.55); }
.pay-art > span { filter: drop-shadow(0 2px 0 rgba(0,0,0,.28)); }
.pay-dlg .sunburst { width: 120px; height: 120px; flex: none; }
.pay-name { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.1; }
.pay-price { font-size: 30px; }
.pay-test { align-self: stretch; padding: 6px 10px; border-radius: 12px; border: 2.5px solid var(--ink); font-family: var(--display); font-weight: 600; font-size: 14.5px;
  background: repeating-linear-gradient(-45deg, #ffe873 0 12px, #fff6bf 12px 24px); }
.pay-dlg .reward-item { padding: 4px 9px; font-size: 14px; animation: none; }
.reward-item.is-had { opacity: .62; }
.gate { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gate-face { font-size: 44px; line-height: 1; }
.gate-q { font-family: var(--display); font-weight: 600; font-size: 16px; text-wrap: balance; }
.gate-q b { display: block; font-size: 23px; font-weight: 700; }
.gate-input { width: 170px; max-width: 100%; padding: 7px 10px; border-radius: 14px; border: 3px solid var(--ink); background: #fff; box-shadow: inset 0 3px 0 rgba(0,0,0,.08);
  font: 700 26px/1.1 var(--display); color: var(--ink); text-align: center; -webkit-user-select: text; user-select: text; }
.gate-input:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; box-shadow: inset 0 3px 0 rgba(0,0,0,.08); }
.gate-keep { display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 6px; font-size: 13.5px; font-weight: 700; text-align: left; cursor: pointer; }
.gate-keep input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: #58b81e; }

/* --- settings: purchases --- */
.pay-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-sum > div { padding: 7px 10px; border-radius: 14px; border: 2.5px solid var(--ink); background: #fffdf2; }
.pay-sum small { display: block; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.pay-sum b { font-family: var(--display); font-weight: 700; font-size: 21px; }
.pay-limits { display: flex; }
.pay-limits .seg { flex: 1; }
.pay-limits .seg button { padding: 4px 2px; font-size: 13.5px; }
.pay-history { display: flex; flex-direction: column; margin-top: 2px; max-height: 190px; overflow-y: auto; overscroll-behavior: contain; border-radius: 12px; border: 2.5px solid var(--ink); background: #fffdf2; }
.pay-history > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 6px 10px; font-size: 13px; font-weight: 700; }
.pay-history > div + div { border-top: 2px dashed rgba(35,52,26,.2); }
.pay-history small { grid-column: 1 / -1; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.pay-history b { font-family: var(--display); font-weight: 600; }
.pay-history .empty { display: block; color: var(--ink-soft); }

@media (max-width: 350px) {
  .st-grid { gap: 8px; }
  .st-wide { grid-template-columns: 64px minmax(0, 1fr); }
  .st-wide .st-art { width: 64px; height: 64px; font-size: 34px; border-radius: 17px; }
  .st-wide .st-art canvas { width: 58px; height: 58px; }
  .st-tile .st-art { height: 80px; font-size: 40px; }
  .st-art canvas { width: 72px; height: 72px; }
  .st-art .ico { font-size: 38px; }
  .st-name { font-size: 15.5px; } .st-tile .st-name { font-size: 14px; }
  .st-buy { font-size: 16.5px; }
  .st-tab { padding: 4px 11px 4px 8px; font-size: 13.5px; }
  #panel-shop .panel-head h2 { font-size: 23px; }
  #panel-shop .panel-wallet .chip { font-size: 13px; padding: 2px 7px 2px 5px; }
  #arcade-shop { padding: 3px 8px; font-size: 13px; }
  .pay-art { width: 70px; height: 70px; font-size: 38px; border-radius: 20px; }
  .pay-dlg .sunburst { width: 96px; height: 96px; }
  .gate-face { font-size: 34px; }
}
@media (max-height: 640px) {
  .pay-art { width: 64px; height: 64px; font-size: 34px; border-radius: 18px; }
  .pay-dlg .sunburst { width: 88px; height: 88px; }
  .pay-price { font-size: 25px; }
  .gate-face { display: none; }
}
@media (prefers-reduced-motion: reduce) { .st-tab, .chip-gems { transition: none; } }

/* --- store switched off (CFG.STORE_ENABLED = false; js/ui.js sets .no-store): no way into a shop is drawn,
   and the gems chip is a plain counter at its natural width --- */
.no-store #sb-shop, .no-store #arcade-shop, .no-store .chip-plus { display: none !important; }
.no-store .chip-gems, .no-store .sb-right .chip-gems { cursor: default; pointer-events: none; min-width: 0; padding-right: 14px; transition: none; }
.no-store .chip-gems:active, .no-store .chip-gems:hover { transform: none; filter: none; }
