/* shop.css — town Store shelves (shop_v1): Daily Stalls, The Path, Packs, Tithe Chest, mock receipts. In-world: wood, parchment, wax. */
.shelf-rack.shop-pane { display: block; padding: 12px 10px 14px; overflow-y: auto; overflow-x: hidden;
  background: linear-gradient(180deg, rgba(62,38,18,.78), rgba(36,20,8,.86)); }
.shop-pane .sh-empty { margin: 18px auto; max-width: 340px; padding: 14px 16px; text-align: center; color: #2a1c12; font: 700 1.05rem "Cormorant Garamond", Georgia, serif;
  background: radial-gradient(ellipse at 50% 30%, #fbf1d8, #e7cf98); border: 2px solid #8a6326; border-radius: 6px; }
.shop-pane .sh-empty p { margin: 4px 0; }
.sh-emo { line-height: 1; display: inline-block; }
.sh-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; justify-content: center; margin: 6px 0; }
.sh-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 4px; font: 600 .8rem system-ui, sans-serif; color: #2a1c12;
  background: rgba(255,250,235,.75); border: 1px solid #b8964f; border-radius: 12px; }
.sh-chip img { width: 22px; height: 22px; }

/* big plain buttons */
.sh-btn { min-height: 44px; min-width: 88px; padding: 6px 14px; font: 800 1rem system-ui, sans-serif; cursor: pointer; border-radius: 10px;
  border: 2px solid #3e2616; color: #fff8e6; background: linear-gradient(180deg, #8a6a3a, #6a4a22); box-shadow: 0 3px 0 #2a180c; }
.sh-btn.go { background: linear-gradient(180deg, #43a24f, #2b7535); }
.sh-btn.tale { color: #2a1c12; background: linear-gradient(180deg, #fbf1d8, #e6cd93); border-color: #8a6326; box-shadow: 0 3px 0 #6b4a1c; }
.sh-btn.more { background: linear-gradient(180deg, #7a5a8a, #563a66); }
.sh-btn.done { display: inline-grid; place-items: center; background: #5a6a4a; cursor: default; }
.sh-link { border: none; background: none; color: #f3d98a; font: 700 .9rem "Cormorant Garamond", Georgia, serif; text-decoration: underline; cursor: pointer; }
/* wax seal price button */
.sh-wax { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 16px 4px 4px; cursor: pointer;
  font: 800 1rem system-ui, sans-serif; color: #fff2d6; border: 2px solid #5a1010; border-radius: 30px;
  background: linear-gradient(180deg, #a5282a, #741417); box-shadow: 0 3px 0 #3a0808, 0 6px 12px rgba(0,0,0,.35); }
.sh-wax .seal { display: grid; place-items: center; min-width: 58px; height: 44px; padding: 0 6px; border-radius: 50%;
  font: 800 .92rem system-ui, sans-serif; color: #fff2d6; text-shadow: 0 1px 1px #3a0808;
  background: radial-gradient(circle at 40% 35%, #d2484a, #8a1a1c 70%); box-shadow: inset 0 0 0 3px rgba(255,200,180,.25), 0 2px 3px rgba(0,0,0,.4); }
.sh-wax:only-child, .sh-wax .seal:only-child { padding-right: 4px; }
.sh-wax.big { min-height: 60px; font-size: 1.15rem; margin-top: 8px; }
.sh-pass-nudge { margin: 10px 4px 0; text-align: center; color: #f3e2bf; font: .85rem system-ui, sans-serif; }
.sh-pass-nudge small { opacity: .8; margin-left: 4px; }
.sh-foot { margin: 8px 0 0; text-align: center; color: #e9d3a6; font: italic 700 .95rem "Cormorant Garamond", Georgia, serif; }
.sh-held { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 8px 10px;
  color: #2a1c12; font: .9rem system-ui, sans-serif; background: radial-gradient(ellipse at 50% 30%, #fbf1d8, #e7cf98); border: 2px solid #8a6326; border-radius: 6px; }

/* ---- Daily Stalls: little market stalls with striped awnings ---- */
.stall-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px 10px; }
.stall { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 22px 6px 8px; text-align: center;
  color: #2a1c12; background: linear-gradient(180deg, #e8d3a2, #c9a96a); border: 2px solid #6b4422; border-radius: 4px 4px 8px 8px;
  box-shadow: 0 6px 0 #4a2e16, 0 10px 14px rgba(0,0,0,.35); }
.stall-awn { position: absolute; left: -4px; right: -4px; top: -6px; height: 20px; border-radius: 6px 6px 10px 10px;
  background: repeating-linear-gradient(90deg, #a52a2a 0 14px, #f3e6c4 14px 28px); border: 2px solid #5a2a14; box-shadow: 0 3px 4px rgba(0,0,0,.3); }
.stall.fresh .stall-awn { background: repeating-linear-gradient(90deg, #2f7a3a 0 14px, #f3e6c4 14px 28px); }
.stall-ico img { width: 40px; height: 40px; }
.stall-name { font: 700 1rem "Cormorant Garamond", Georgia, serif; }
.stall-amt { font: 700 .85rem system-ui, sans-serif; color: #5a3a12; margin-bottom: 4px; }
.stall .sh-btn { min-width: 84px; min-height: 40px; font-size: .95rem; }

/* ---- The Path: a trail of parchment steps ---- */
.path-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 4px 8px; color: #f6e2b6;
  font: 700 1.15rem "Cormorant Garamond", Georgia, serif; }
.path-head small { font: .8rem system-ui, sans-serif; opacity: .85; }
.path-trail { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; row-gap: 12px; padding: 6px 2px 8px; }
.path-step { flex: 0 0 112px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; text-align: center;
  color: #2a1c12; background: radial-gradient(ellipse at 50% 30%, #fbf1d8, #e3c98e); border: 2px solid #8a6326; border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,.35); transform: rotate(-.6deg); }
.path-step:nth-child(4n+1) { transform: rotate(.7deg); }
.path-kind { font: 800 .82rem system-ui, sans-serif; text-transform: uppercase; letter-spacing: .04em; color: #6a4a1a; }
.path-step.t-tale .path-kind { color: #6a2a8a; }
.path-step.t-paid { background: radial-gradient(ellipse at 50% 30%, #fff3d6, #eacb84); border-color: #7a1a1a; }
.path-step.t-paid .path-kind { color: #8a1a1a; font-size: .95rem; }
.path-ico { display: flex; gap: 2px; min-height: 40px; align-items: center; }
.path-ico img { width: 38px; height: 38px; }
.path-what { font: 600 .82rem system-ui, sans-serif; line-height: 1.2; min-height: 2.4em; }
.path-wait { font: .72rem system-ui, sans-serif; color: #5a4020; }
.path-step.now { box-shadow: 0 0 0 3px #f3d27a, 0 0 18px rgba(243,210,122,.7), 0 4px 10px rgba(0,0,0,.35); transform: none; }
.path-step.done { opacity: .5; filter: grayscale(.4); }
.path-step.ahead { opacity: .92; }
.path-step.behind { opacity: .78; filter: saturate(.8); }
.path-step.behind::after { content: "after this"; font: italic .7rem system-ui, sans-serif; color: #6a4a1a; }
.path-step .sh-btn, .path-step .sh-wax { margin-top: 2px; }
.path-dots { flex: 0 0 18px; align-self: center; height: 4px; background: radial-gradient(circle, #e9cf8f 2px, transparent 2.5px) 0 0 / 6px 4px repeat-x; }

/* ---- Packs shelf ---- */
.pack-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pack-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 10px 12px; text-align: center; color: #2a1c12;
  background: radial-gradient(ellipse at 50% 25%, #fbf1d8, #e3c98e); border: 2px solid #8a6326; border-radius: 6px; box-shadow: 0 5px 12px rgba(0,0,0,.4); }
.pack-card.starter { border-color: #2b7535; box-shadow: 0 0 0 2px #7fc48a inset, 0 5px 12px rgba(0,0,0,.4); }
.pack-card.moment { border-color: #a5282a; box-shadow: 0 0 0 2px #f0a060 inset, 0 0 18px rgba(240,140,60,.6); animation: packGlow 1.6s ease-in-out infinite alternate; }
@keyframes packGlow { to { box-shadow: 0 0 0 2px #f0a060 inset, 0 0 4px rgba(240,140,60,.3); } }
.pack-card.pass { background: radial-gradient(ellipse at 50% 25%, #f6ecff, #d9c4ea); border-color: #6a2a8a; }
.pack-name { font: 700 1.15rem "Cormorant Garamond", Georgia, serif; }
.pack-when { font: 700 .75rem system-ui, sans-serif; color: #6a4a1a; }
.pack-when.hot { color: #a5282a; font-size: .9rem; }
.pack-line { font: .82rem system-ui, sans-serif; color: #4a3218; }

/* ---- Tithe Chest sprite (map + shelf) ---- */
.tithe-sprite { position: relative; display: inline-block; width: 64px; height: 56px; pointer-events: none; }
.tithe-sprite.big { width: 110px; height: 96px; margin: 2px auto; }
.tc-chest { position: absolute; left: 14%; right: 14%; bottom: 0; height: 58%; }
.tc-box { position: absolute; left: 0; right: 0; bottom: 0; height: 64%; border-radius: 3px;
  background: linear-gradient(180deg, #8a5a2a, #5a3614); border: 2px solid #2e1a08; box-shadow: inset 0 0 0 2px rgba(201,162,74,.6); }
.tc-lid { position: absolute; left: -2px; right: -2px; top: 0; height: 44%; border-radius: 40% 40% 3px 3px / 70% 70% 3px 3px;
  background: linear-gradient(180deg, #9a6a34, #6a4218); border: 2px solid #2e1a08; transform-origin: 10% 100%; }
.tc-lock { position: absolute; left: 50%; top: 34%; width: 16%; height: 26%; transform: translateX(-50%); border-radius: 3px; background: linear-gradient(#f0d27a, #b88a2a); border: 1px solid #5a3a0a; }
.tc-pile { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; }
.tc-coin { position: absolute; width: 22%; height: 13%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff2a8, #e2b23a 55%, #a87814);
  border: 1px solid #7a5208; box-shadow: 0 1px 1px rgba(0,0,0,.4);
  left: 0; bottom: 0; }
/* coins pile around and on top of the chest as it fills */
.tc-coin:nth-child(1) { left: 0%; bottom: 0%; } .tc-coin:nth-child(2) { left: 78%; bottom: 0%; }
.tc-coin:nth-child(3) { left: 6%; bottom: 10%; } .tc-coin:nth-child(4) { left: 72%; bottom: 10%; }
.tc-coin:nth-child(5) { left: 30%; bottom: 58%; z-index: 2; } .tc-coin:nth-child(6) { left: 50%; bottom: 58%; z-index: 2; }
.tc-coin:nth-child(7) { left: 40%; bottom: 66%; z-index: 2; } .tc-coin:nth-child(8) { left: 22%; bottom: 66%; z-index: 2; }
.tc-coin:nth-child(9) { left: 58%; bottom: 66%; z-index: 2; } .tc-coin:nth-child(10) { left: 32%; bottom: 74%; z-index: 2; }
.tc-coin:nth-child(11) { left: 48%; bottom: 74%; z-index: 2; } .tc-coin:nth-child(12) { left: 40%; bottom: 82%; z-index: 2; }
.tithe-sprite.full .tc-lid { transform: rotate(-14deg); }
.tithe-sprite.full::after { content: ""; position: absolute; inset: -10%; border-radius: 50%; background: radial-gradient(circle, rgba(255,226,120,.55), transparent 65%); animation: titheGlow 1.4s ease-in-out infinite alternate; }
@keyframes titheGlow { from { opacity: .4; } to { opacity: 1; } }
/* on the town map: the chest sits on the plaza stones, the name sign hangs below */
.pin[data-pin="tithe"] .tithe-sprite.map { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -62%); width: clamp(34px, 3.4vw, 54px); height: clamp(30px, 3vw, 48px); z-index: 1; filter: drop-shadow(0 3px 3px rgba(0,0,0,.55)); }

/* ---- mock receipt sheet + banker ---- */
.shop-sheet { position: fixed; inset: 0; z-index: 2147482000; display: grid; place-items: center; padding: 16px; background: rgba(12,7,2,.7); }
.sh-receipt { position: relative; width: min(400px, 94vw); max-height: 92vh; overflow-y: auto; padding: 18px 18px 12px; text-align: center; color: #2a1c12;
  background: radial-gradient(ellipse at 50% 25%, #fbf1d8, #e7cf98 75%, #d4b474); border: 3px solid #8a6326; border-radius: 6px;
  box-shadow: 0 0 0 2px #ecd59a inset, 0 18px 40px rgba(0,0,0,.6); font-family: "Cormorant Garamond", Georgia, serif; }
.sh-receipt h3 { margin: 0 0 4px; font-size: 1.45rem; }
.sh-line { margin: 4px 0; font-size: 1.05rem; }
.sh-line.small { font-size: .95rem; margin-top: 8px; opacity: .85; }
.sh-test { margin: 6px 0 0; font: .78rem system-ui, sans-serif; color: #6a4a1a; }
.sh-no { margin-top: 4px; min-height: 40px; border: none; background: none; color: #5a4020; font: .95rem system-ui, sans-serif; text-decoration: underline; cursor: pointer; }
.banker { display: flex; flex-direction: column; align-items: center; }
.banker img { width: 96px; height: 96px; object-fit: cover; object-position: top; border-radius: 50%; border: 3px solid #8a6326; background: #e9d4a4; }
.banker-name { margin: 2px 0 0; font-weight: 700; }
.tithe-bar { position: relative; height: 22px; margin: 6px 8px; border-radius: 11px; background: rgba(90,60,20,.25); border: 1px solid #8a6326; overflow: hidden; }
.tithe-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #d7a640, #f6d77a); }
.tithe-bar b { position: relative; font: 700 .8rem/22px system-ui, sans-serif; }

/* ---- moment offer popup (town) ---- */
.offer-pop { position: fixed; left: 50%; bottom: max(84px, calc(70px + env(safe-area-inset-bottom))); transform: translateX(-50%); z-index: 2147481000;
  display: flex; align-items: center; gap: 10px; width: min(460px, 94vw); padding: 10px 12px; color: #2a1c12;
  background: radial-gradient(ellipse at 50% 25%, #fff3d6, #eacb84); border: 3px solid #a5282a; border-radius: 10px;
  box-shadow: 0 0 22px rgba(240,140,60,.7), 0 10px 24px rgba(0,0,0,.5); animation: popIn .35s ease; }
@keyframes popIn { from { transform: translate(-50%, 30px); opacity: 0; } }
.op-seal { font-size: 34px; }
.op-body { flex: 1; display: flex; flex-direction: column; font: .85rem system-ui, sans-serif; line-height: 1.25; }
.op-body b { font: 700 1.15rem "Cormorant Garamond", Georgia, serif; }
.op-clock { font-weight: 800; color: #a5282a; }
.op-x { border: none; background: none; font-size: 1.6rem; line-height: 1; color: #5a4020; cursor: pointer; padding: 4px 6px; }
/* shop panes get the counter top too (more room, nothing hidden behind a scroll) */
.store-shelves:has(.shop-pane) { z-index: 6; bottom: 18%; }
@media (min-width: 720px) { .store-shelves:has(.shop-pane) { bottom: 16%; } }
@media (max-width: 480px) {
  .path-step { flex-basis: 104px; }
  .path-dots { flex-basis: 10px; }
  .pack-row { grid-template-columns: 1fr; }
  .stall-row { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) {
  /* shop panes: the shopkeeper steps to the right end of the counter so the shelves and he are both in view */
  .store-stage:has(.shop-pane) .store-counter-zone .shopkeep-stand.behind-counter { left: 86%; width: min(20vw, 200px); }
  .store-stage:has(.shop-pane) .store-counter-zone .shopkeep-stand.behind-counter .sk-bubble {
    left: 50%; right: auto; top: auto; bottom: 100%; transform: translateX(-50%); width: min(20vw, 190px); border-radius: 12px; text-align: center; }
  .store-stage:has(.shop-pane) .store-shelves { right: 26%; }
}
@media (min-width: 720px) { .store-stage:has(.shop-pane) .store-counter-zone .sk-name-plate { margin-left: 72%; } }
@media (max-width: 719px) {
  /* phone: shelves above the counter, Marcus stays in view behind it (smaller, bubble tucked away) */
  .store-stage:has(.shop-pane) .store-shelves { bottom: 27%; }
  .store-stage:has(.shop-pane) .store-counter-zone .shopkeep-stand.behind-counter { left: 50%; width: 120px; bottom: 44%; }
  .store-stage:has(.shop-pane) .store-counter-zone .shopkeep-stand.behind-counter .sk-art,
  .store-stage:has(.shop-pane) .store-counter-zone .shopkeep-stand.behind-counter .sk-art img { max-height: 11vh; }
  .store-stage:has(.shop-pane) .store-counter-zone .shopkeep-stand.behind-counter .sk-bubble { display: none; }
}
/* the top Path steps ($49.99, $99.99): wider gold-edged card */
.path-step.big { flex-basis: 150px; background: radial-gradient(ellipse at 50% 25%, #fff6dc, #f0cf7a); border: 3px solid #b8862a; box-shadow: 0 0 0 2px #7a1a1a inset, 0 0 16px rgba(240,200,90,.55); }
.path-step.big .path-ico img { width: 30px; height: 30px; }
/* store_v1: test money */
.sh-testtag{display:block;font-size:.55em;letter-spacing:.08em;opacity:.85;margin-top:1px}
.pill.test-usd{background:#2c4a2c;color:#d8f0c8;border:1px solid #6a9a5a;border-radius:12px;padding:3px 9px;font:700 12px/1.2 system-ui;white-space:nowrap}
.store-slim .pill.test-usd{white-space:normal;max-width:118px;font-size:10px;line-height:1.15;padding:2px 7px;text-align:center}
/* store_ux */
.stall-buys{display:flex;flex-direction:column;gap:4px;width:100%;margin-top:6px}
.stall-buys .sb-head{font-size:.78rem;color:#6a4a2a;font-weight:700}
.sb-opt{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:6px;width:100%;padding:5px 8px;border-radius:9px;border:1px solid #b08a3c;background:linear-gradient(180deg,#fff6e0,#f0dcb0);color:#3a2614;font:600 .8rem/1.1 system-ui;cursor:pointer}
.sb-opt b{font-size:.82rem}.sb-amt{text-align:left}.sb-cost{white-space:nowrap;color:#1f4f8a;font-weight:800}
.gem-row{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}
.gem-card{background:radial-gradient(ellipse at 50% 20%,#eaf4ff,#c9dcf2);border-color:#2a5a9a}
.gem-card.best{box-shadow:0 0 0 2px #7fb0e8 inset,0 0 14px rgba(90,150,230,.55)}
.gem-best{position:absolute;top:-8px;left:50%;transform:translateX(-50%);background:#2a5a9a;color:#fff;font:800 10px/1 system-ui;padding:3px 8px;border-radius:8px}
.gem-art{width:84px;height:62px;object-fit:contain;margin:4px 0}.gem-amt{font-weight:800;color:#1f3f6a}
.pass-big{grid-column:1/-1}.pass-art{width:150px;height:84px;object-fit:cover;border-radius:10px;border:2px solid #6a2a8a;margin:2px 0 4px}
.pass-hook{font-size:1rem;color:#3a1450}.pass-list{margin:4px 0 6px;padding-left:18px;text-align:left;font-size:.8rem;color:#3a2a48}
.shelf-sub{margin:10px 4px 4px;color:#f0e0c0;font:700 .9rem Georgia,serif}
/* store_tour */
.tour-ring{position:fixed;z-index:9000;border:3px solid #ffd27a;border-radius:14px;box-shadow:0 0 0 4px rgba(255,210,122,.35),0 0 18px #ffd27a;pointer-events:none;animation:tourPulse 1.1s ease-in-out infinite alternate}
.tour-ring.done{animation:none;border-color:#8fd18f;box-shadow:0 0 0 4px rgba(143,209,143,.35)}
@keyframes tourPulse{from{transform:scale(1)}to{transform:scale(1.06)}}
.tour-tip{position:fixed;z-index:9001;background:#2b2218;color:#f3e6c8;border:2px solid #d8a84a;border-radius:12px;padding:10px 12px;font:14px/1.35 system-ui;box-shadow:0 6px 18px rgba(0,0,0,.5)}
.tour-tip::before{content:"";position:absolute;top:-9px;left:calc(var(--ax,50%) - 8px);border:8px solid transparent;border-top:0;border-bottom:9px solid #d8a84a}
.tour-tip p{margin:0 0 8px}.tour-btns{display:flex;justify-content:space-between;gap:8px}
.tour-skip{background:none;border:0;color:#c8b48c;text-decoration:underline;font:13px system-ui;cursor:pointer}
.tour-next{background:#b08a3c;color:#fff;border:0;border-radius:8px;padding:6px 14px;font:700 13px system-ui;cursor:pointer}
