/* ============================================
   Campfire — Shop (js/shop-modal.js)
   One modal on every page; /shop shows it in page mode. Plan cards reuse
   upgrade.css (.plan-card etc.); coins reuse .nav-coin / .wallet-* from
   common.css so a price here and in a space's wallet chip look the same.
   ============================================ */

.shop-layout { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }

.shop-section { margin-bottom: 44px; scroll-margin-top: 64px; }
/* Main section titles (WEAPONS, EFFECTS, CAMPFIRE COINS): white and a
   step up; the muted, smaller line under one (Rare, Epic…) is
   .shop-gear-tier. Both centred over the grid. */
.shop-section-title {
  font-size: 17px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: #fff; margin-bottom: 14px; text-align: center;
}
.shop-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 24px; }
.shop-fineprint { max-width: 760px; margin: 14px auto 0; text-align: center; font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.shop-fineprint a { color: var(--accent); }

/* ---- Membership card ----
   Every block on the Membership tab (plan line, grant, cards, details
   panel) sits on one 760px column so their edges line up. */
.shop-plans-stack { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 0 auto; }
.member-card { text-align: left; padding: 22px 24px 18px; }
.member-card.current-plan::after { left: 24px; transform: none; }
.member-card-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.member-card-head .plan-badge { margin-bottom: 8px; }
/* What you're buying, as a title — not a pill. Tagline underneath. */
.plan-title {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  /* Same face as the price beside it (W95FA, one weight — no faux bold). */
  font-family: 'W95FA', 'MS Sans Serif', Tahoma, ui-monospace, monospace;
  font-size: 28px; font-weight: 400; letter-spacing: 0.5px; line-height: 1.1; color: var(--text-primary);
}
.plan-title svg { color: var(--accent); flex: 0 0 auto; }
.member-card-tagline { font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--text-secondary); }
.venue-card .plan-title { font-size: 24px; }
/* The Grant card sits above the Membership card on the same column. */
.grant-card { max-width: 760px; margin: 0 auto 14px; border: 1px solid rgba(var(--accent-rgb), 0.5); box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.14); }
.grant-card .member-card-head { margin-bottom: 16px; }
.grant-card .member-assure { margin-top: 10px; }
.member-card-head .plan-price { font-size: 44px; margin: 0; white-space: nowrap; }
.venue-card .member-card-tagline { font-size: 13px; }
.venue-card .member-card-head .plan-price { font-size: 32px; }

/* Perks: icon + a few words each, two columns that read as one list. */
.perk-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.perk-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.35; color: var(--text-primary); min-width: 0; }
.perk-ic {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--accent-rgb), 0.12); color: var(--accent);
}
.perk-ic svg { display: block; }

/* Creator perks: folded away until you're an approved creator. */
.perk-creator { margin: 0 0 16px; border-radius: 10px; background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.08); }
.perk-creator[open] { border-color: rgba(var(--accent-rgb), 0.3); }
.perk-creator summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; font-size: 13px; font-weight: 700; user-select: none;
}
.perk-creator summary::-webkit-details-marker { display: none; }
.perk-creator summary:hover .perk-creator-title { color: #fff; }
.perk-creator-title { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); }
.perk-creator-title svg { color: var(--accent); }
.perk-creator[open] .perk-creator-title { color: var(--text-primary); }
/* Its chevron sits at the right end (the app chevron, common.css), so
   the summary's default left-hand one is off. */
.perk-creator summary::before { display: none; }
.perk-creator-chev {
  margin-left: auto; width: 12px; height: 12px; flex-shrink: 0; background-color: var(--text-muted);
  -webkit-mask: url('/img/icons/chevron/right.png') center/contain no-repeat;
  mask: url('/img/icons/chevron/right.png') center/contain no-repeat;
  transition: transform 0.15s;
}
.perk-creator[open] .perk-creator-chev { transform: rotate(90deg); }
.perk-creator-body { padding: 2px 12px 12px; }
.perk-creator-lede { margin: 0 0 10px; font-size: 12px; color: var(--text-muted); }
.perk-creator .perk-list { margin-bottom: 10px; }
.perk-creator-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.perk-creator-note a { color: var(--accent); }

/* Application status: a small pill, never a nag. */
.perk-status { flex-shrink: 0; white-space: nowrap; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: var(--radius); background: rgba(255,255,255,0.06); color: var(--text-muted); }
.perk-status.is-approved { background: rgba(67,233,123,0.12); color: var(--success); }
.perk-status.is-review { background: rgba(254,225,64,0.12); color: var(--warning); }

.member-assure { margin-top: 10px; text-align: center; font-size: 11px; color: var(--text-muted); }

@media (max-width: 600px) {
  .member-card { padding: 18px 16px 14px; }
  .member-card-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .member-card-head .plan-price { font-size: 36px; }
  .plan-title { font-size: 24px; }
  .perk-list { grid-template-columns: 1fr; }
}
.shop-way { position: relative; }
.shop-way-owned { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 0 3px rgba(0,0,0,0.8); }
.shop-way-name { font-size: 12px; color: var(--text-secondary); margin: -2px 0 8px; }
.shop-legal { max-width: 760px; margin: 20px auto 0; text-align: center; font-size: 11px; line-height: 1.6; color: var(--text-muted); }
.shop-legal a { color: var(--text-secondary); }
.shop-legal a:hover { color: var(--accent); }

.shop-banner {
  max-width: 760px; margin: 0 auto 20px; padding: 10px 14px;
  border-radius: 8px; font-size: 13px; text-align: center; border: 1px solid;
}
.shop-banner.success { background: rgba(67, 233, 123, 0.10); border-color: rgba(67, 233, 123, 0.4); color: var(--success); }
.shop-banner.error   { background: rgba(245, 87, 108, 0.10); border-color: rgba(245, 87, 108, 0.4); color: var(--danger); }
.shop-banner.info    { background: rgba(var(--accent-rgb), 0.08); border-color: rgba(var(--accent-rgb), 0.35); color: var(--text-primary); }

/* ---- Your plan ---- */
.shop-myplan { max-width: 760px; margin: 0 auto 18px; padding: 16px 18px; border-radius: var(--radius-lg); }
.shop-myplan-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shop-myplan-name { font-size: 20px; font-weight: 800; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-myplan-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
.shop-chip {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  padding: 2px 8px; border-radius: var(--radius);
  background: rgba(var(--accent-rgb), 0.15); color: var(--accent);
}
.shop-warn { color: var(--warning); }

.plan-card { position: relative; display: flex; flex-direction: column; }
.plan-card .plan-cta { margin-top: auto; }

/* ---- The "not available yet" block ----
   Laid over anything whose product is coming_soon. The card stays
   readable underneath — people should see what's coming. */
.is-coming-soon > :not(.shop-lock) { opacity: 0.55; }
.shop-lock {
  position: absolute; inset: 0; border-radius: inherit;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(-45deg, rgba(0,0,0,0.0) 0 12px, rgba(0,0,0,0.18) 12px 24px);
  pointer-events: none;
}
.shop-lock span {
  padding: 6px 14px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border-light);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-primary); box-shadow: var(--shadow);
}

/* ---- Coins ---- */
.shop-coins {
  max-width: 900px; margin: 0 auto; padding: 18px; border-radius: var(--radius-lg);
  display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: center;
}
@media (max-width: 680px) { .shop-coins { grid-template-columns: 1fr; } }
.shop-coins-balance { text-align: center; }
.shop-coins-sub { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }


/* ---- Special items ---- */
.shop-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); justify-content: center; gap: 18px; }
.shop-item { border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.shop-mannequin {
  position: relative; height: 260px;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(var(--accent-rgb), 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-tertiary), var(--bg-secondary));
}
/* The bake is a 32px sprite: scale by a whole number with no smoothing
   so the pixels stay crisp. */
.shop-mannequin-img {
  width: 192px; height: 192px;
  image-rendering: pixelated; image-rendering: crisp-edges;
  position: relative; z-index: 1;
  margin-bottom: 18px;
}
.shop-mannequin-floor {
  position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 16px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.45), transparent 70%);
}
.shop-mannequin-empty { color: var(--text-muted); font-size: 12px; }
.shop-item-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.shop-item-name { font-size: 16px; font-weight: 800; }
.shop-item-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.shop-item-note { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.shop-item-actions { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.shop-coin-btn { display: flex; align-items: center; justify-content: center; gap: 6px; }
.shop-owned { font-size: 12px; font-weight: 700; color: var(--success); text-align: center; }
.shop-item.is-coming-soon .shop-item-body { opacity: 0.6; }
.shop-item.is-coming-soon .shop-mannequin > :not(.shop-lock) { opacity: 0.6; }
.shop-item.is-coming-soon > :not(.shop-lock) { opacity: 1; }

/* ---- Grant invite ---- */
.shop-grant { max-width: 760px; margin: 0 auto 24px; padding: 18px; border-radius: var(--radius-lg); border: 1px solid rgba(var(--accent-rgb), 0.45); box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.12); }
.shop-grant[hidden] { display: none; }
.shop-grant-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

/* ---- Garment colour swatches ---- */
.shop-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-swatch {
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid var(--bg-card); box-shadow: 0 0 0 1px var(--border-light);
}
.shop-swatch.is-on { box-shadow: 0 0 0 2px var(--accent); }
.shop-mannequin-alt {
  position: absolute; right: 10px; bottom: 26px; z-index: 1; margin: 0; padding: 2px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: none; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.shop-mannequin-alt:hover { border-color: rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.08); }
.shop-mannequin-chibi {
  width: 64px; height: 64px;
  image-rendering: pixelated; image-rendering: crisp-edges;
  opacity: 0.95;
}
.shop-mannequin-alt span {
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); background: rgba(0,0,0,0.35); padding: 1px 5px; border-radius: var(--radius);
}

/* ---- The modal ----
   Backdrop, frame and title bar: the shared dialog look (common.css),
   the same glass as the Closet, buddy list and chat. Only size and
   layout here. */
html.shop-modal-open { overflow: hidden; }
.shop-modal-backdrop {
  position: fixed; inset: 0; z-index: 10050;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: cfFadeIn 0.18s ease;
}
.shop-modal-backdrop[hidden] { display: none; }
.shop-modal {
  position: relative;
  display: flex; flex-direction: column;
  /* A fixed height so switching tabs doesn't make the box jump. */
  width: min(940px, 94vw); height: min(86vh, 760px);
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) { .shop-modal-backdrop { animation: none; } }

/* Page mode (/shop): in the page under the header, not over it. */
.shop-page-backdrop { min-height: calc(100vh - 140px); }
.shop-modal-backdrop.is-page { position: static; padding: 0; background: none; animation: none; }
/* Same floor as the modal's height, so the page never shrinks under you
   when a short tab's content replaces the loading placeholders. */
/* One fixed width for every tab (the modal's), not width:auto: sized to
   its content, each tab came out a different width, and the coin/tile
   grids (auto-fit columns) collapsed to a single column on short tabs. */
.shop-modal-backdrop.is-page .shop-modal { width: min(940px, 100%); max-width: none; margin: 0 auto; height: auto; min-height: min(86vh, 760px); overflow: visible; box-shadow: inset 0 1px 0 var(--glass-inset-top), var(--glass-glow); }
.shop-modal-backdrop.is-page .shop-modal-close { display: none; }
.shop-modal-backdrop.is-page .shop-modal-body { overflow: visible; }

.shop-modal-head {
  display: flex; align-items: center; justify-content: space-between;
}

/* Tabs: Membership · Coins on the left, the shop tab(s) centred on the
   modal (equal 1fr side columns keep them dead centre), your wallet chip
   on the right — the same chip as a space's info bar. No rules above or
   below: the row sits in the open, the same space over and under it. */
.shop-modal .shop-modal-head { border-bottom: 0; }
.shop-modal-tabs {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "side shops end"; align-items: center; gap: 12px;
  padding: 12px 14px;
}
.shop-tabset {
  min-width: 0; display: flex; align-items: center; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
}
.shop-tabset.is-side { grid-area: side; justify-self: start; }
/* The shop tabs share one width — the widest one's (equal 1fr columns
   on a content-sized grid). */
.shop-tabset.is-shops { grid-area: shops; justify-self: center; max-width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.shop-tabset.is-shops .shop-modal-tab { min-width: 0; max-width: 220px; }
.shop-tabset.is-shops .shop-modal-tab > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.shop-tabs-end { grid-area: end; justify-self: end; display: flex; }
.shop-tabset::-webkit-scrollbar { display: none; }
.shop-modal-tabs::-webkit-scrollbar { display: none; }
.shop-modal-tabs[hidden] { display: none; }
.shop-modal-tab {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.85);
  font: inherit; font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  white-space: nowrap; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.shop-modal-tab:hover { border-color: rgba(255, 255, 255, 0.2); }
.shop-modal-tab.is-shop { padding: 8px 16px; font-size: 13px; font-weight: 700; }
.shop-modal-tab.is-on { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.12); color: #fff; }
/* Membership and Coins: a square icon; the open one spells its name out. */
.shop-modal-tab.is-side { min-width: 32px; height: 32px; padding: 0 9px; box-sizing: border-box; }
.shop-modal-tab.is-side:not(.is-on) > span { display: none; }
.shop-tab-bal { font-variant-numeric: tabular-nums; }
.shop-modal-tab .ci { width: 14px; height: 14px; opacity: 0.8; }
.shop-modal-tab.is-on .ci { opacity: 1; }
/* The creator's name before the catalog says it: a placeholder, never their login. */
.shop-tab-name-skel { display: inline-block; width: 72px; height: 11px; border-radius: 4px; vertical-align: -1px; margin-right: 1px; }

.shop-modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; overscroll-behavior: contain; }
.shop-modal-content { min-height: 200px; }
.shop-modal-banner { max-width: none; }
.shop-modal-section { margin-bottom: 28px; }
.shop-modal-section > .shop-coins-sub { text-align: center; }
.shop-coin-packs > .shop-empty { grid-column: 1 / -1; }
.shop-link-btn {
  background: none; border: none; padding: 0;
  font: inherit; color: var(--accent); cursor: pointer;
}
.shop-link-btn:hover { text-decoration: underline; }

/* Creator tab intro: their coin, what it is, your balance. */
.shop-creator-intro {
  display: flex; align-items: center; gap: 14px;
  max-width: 760px; margin: 0 auto 20px; padding: 14px 16px; border-radius: var(--radius-lg, 14px);
}
.shop-creator-intro .nav-coin { width: 32px; height: 32px; }
.shop-creator-intro-title { font-size: 14px; font-weight: 800; }
.shop-creator-intro p { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-top: 2px; }

/* Coins tab: every creator coin you hold — a row opens their shop. */
.shop-creator-coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; max-width: 760px; margin: 0 auto; }
.shop-creator-coin {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  font: inherit; font-size: 13px; color: var(--text-primary); text-align: left;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.shop-creator-coin:hover { border-color: var(--border-light); background: var(--bg-hover); }
.shop-creator-coin-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-creator-coin-n { font-weight: 800; font-variant-numeric: tabular-nums; }

/* Embedded Stripe Checkout. Stripe draws its own light card. */
.shop-checkout { max-width: 640px; margin: 0 auto; }
.shop-checkout-label { font-size: 16px; font-weight: 800; margin: 10px 0 12px; }
.shop-checkout-mount { min-height: 360px; border-radius: 12px; overflow: hidden; }

@media (max-width: 600px) {
  /* Phones: a full-height sheet; tabs scroll sideways from the left. */
  .shop-modal-backdrop:not(.is-page) { padding: 0; align-items: stretch; }
  .shop-modal-backdrop:not(.is-page) .shop-modal { width: 100%; border-radius: 0; border: none; height: 100%; }
  .shop-modal-body { padding: 14px; }
  .shop-items { grid-template-columns: 1fr; }
}

/* Economy beta notice (Admin → Economy "Beta"). */
.shop-beta-note {
  max-width: 760px; margin: 0 auto 16px; padding: 8px 12px; border-radius: 8px;
  font-size: 12px; color: var(--text-secondary);
  background: rgba(var(--accent-rgb), 0.08); border: 1px solid rgba(var(--accent-rgb), 0.25);
}
.shop-beta-note b {
  margin-right: 6px; padding: 1px 6px; border-radius: var(--radius);
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px;
  background: rgba(var(--accent-rgb), 0.18); color: var(--accent);
}

/* ---- Item list: category chips + small square tiles ---- */
.shop-list-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.shop-cats { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
/* Venue Toon | Campfire Toon: which Toon the clothes are shown on. */
.shop-toon-toggle {
  display: inline-flex; margin-left: auto; padding: 2px; gap: 2px;
  border-radius: var(--radius); background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
}
.shop-toon {
  padding: 4px 11px; border-radius: var(--radius); border: 0; background: none; cursor: pointer;
  color: var(--text-secondary); font: inherit; font-size: 12px; font-weight: 600;
}
.shop-toon:hover { color: #fff; }
.shop-toon.is-on { color: #fff; background: rgba(var(--accent-rgb), 0.22); }
.shop-cat {
  padding: 5px 12px; border-radius: var(--radius); cursor: pointer;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary); font: inherit; font-size: 12px; font-weight: 600;
}
.shop-cat span { opacity: 0.55; font-weight: 500; margin-left: 2px; }
.shop-cat:hover { color: #fff; border-color: rgba(255,255,255,0.22); }
.shop-cat.is-on { color: #fff; border-color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }
.shop-grid {
  /* auto-fit + a max width: a short row (one or two items) sits centred
     instead of hugging the left edge; full rows and the last row of a
     long list keep the same columns. */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 168px));
  justify-content: center; gap: 10px;
}
.shop-tile {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 8px;
  border-radius: 10px; cursor: pointer; text-align: left;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  color: var(--text-primary); font: inherit;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.shop-tile:hover { border-color: rgba(var(--accent-rgb), 0.6); transform: translateY(-1px); background: var(--bg-hover); }
.shop-tile-art {
  position: relative; aspect-ratio: 1; border-radius: 7px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(var(--accent-rgb), 0.12), transparent 65%), var(--bg-secondary);
}
.shop-tile-art img { width: 96px; height: 96px; image-rendering: pixelated; image-rendering: crisp-edges; }
.shop-tile-ways { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 2px 0 0; min-height: 11px; }
.shop-tile-ways i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); box-shadow: 0 0 0 1px rgba(0,0,0,0.4); }
.shop-tile-ways b { font-size: 10px; font-weight: 700; color: var(--text-muted); }
.shop-tile-name { font-size: 12px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-tile-price { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 18px; }
.shop-tile-coin { display: inline-flex; align-items: center; gap: 4px; }
.shop-tile-or { font-size: 10px; font-weight: 500; color: var(--text-muted); }
.shop-tile-usd { color: var(--text-secondary); }
.shop-tile-owned { color: var(--success); font-size: 11px; }
.shop-tile-soon { color: var(--text-muted); font-size: 11px; font-weight: 600; }
.shop-tile.is-soon .shop-tile-art { opacity: 0.55; }

/* Corner badge on the art: Owned / Wearing on items. */
.shop-tile-badge {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  padding: 2px 7px; border-radius: var(--radius); white-space: nowrap;
  font-size: 9px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.shop-tile-badge.is-owned { background: var(--success); color: #06210f; }
.shop-tile-badge.is-wearing { background: var(--accent); color: #fff; }
/* Owned: the whole tile goes green; Wearing adds an accent ring. */
.shop-tile.is-owned { background: rgba(67,233,123,0.07); border-color: rgba(67,233,123,0.45); }
.shop-tile.is-owned .shop-tile-art { background: radial-gradient(ellipse at 50% 40%, rgba(67,233,123,0.14), transparent 65%), var(--bg-secondary); }
.shop-tile.is-owned:hover { border-color: var(--success); background: rgba(67,233,123,0.11); }
.shop-tile.is-wearing { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.6); }

/* Coin packs: the item tile, with the coin + what you get as the art. */
.shop-pack-tile { cursor: default; }
.shop-pack-tile:hover { transform: none; }
.shop-pack-art { flex-direction: column; gap: 6px; background: radial-gradient(ellipse at 50% 45%, rgba(var(--coin-rgb), 0.16), transparent 65%), var(--bg-secondary); }
.shop-pack-art .nav-coin { width: 40px; height: 40px; }
.shop-pack-n { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
/* What you actually get: thin, gold, glowing, right over the button. */
.shop-pack-get {
  text-align: center; font-size: 13px; font-weight: 300; letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums; color: var(--coin);
  text-shadow: 0 0 6px rgba(var(--coin-rgb), 0.8), 0 0 14px rgba(var(--coin-rgb), 0.45);
}
/* The bonus sits on the tile's top edge, centred. */
.shop-pack-bonus {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  padding: 2px 9px; border-radius: var(--radius); white-space: nowrap;
  font-size: 10px; font-weight: 800; background: var(--accent); color: #fff;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45);
}
.shop-grid.shop-coin-packs { row-gap: 18px; padding-top: 8px; }
/* Coin packs share one row (four fit beside the balance), 2×2 on phones. */
.shop-grid.shop-coin-packs { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
@media (max-width: 600px) { .shop-grid.shop-coin-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shop-pack-tile .btn { margin-top: auto; white-space: nowrap; }
@media (max-width: 600px) {
  /* Small tiles: a smaller coin + count. */
  .shop-pack-art { gap: 2px; }
  .shop-pack-art .nav-coin { width: 24px; height: 24px; }
  .shop-pack-n { font-size: 20px; }
  .shop-pack-get { font-size: 12px; }
  .shop-tile-badge { top: 4px; right: 4px; padding: 1px 6px; }
  .shop-pack-bonus { font-size: 9px; padding: 1px 7px; }
  .shop-pack-tile .btn { font-size: 11px; padding-left: 4px; padding-right: 4px; }
}

/* Loading: the real tab's layout in placeholders (shop-modal loadingHtml). */
.shop-tile-skel { cursor: default; pointer-events: none; }
.shop-tile-skel .skeleton-text { margin: 4px auto 0; }
.shop-tile-skel .skeleton-text + .skeleton-text { margin-top: 3px; margin-bottom: 2px; }
.shop-cat-skel { display: inline-block; width: 64px; height: 27px; border-radius: var(--radius); }
.shop-title-skel { width: 160px; margin: 6px auto 14px; }

/* Gear: group tiles (an effect, or a weapon kind) in the item-tile frame;
   the zoomed card picks the weapon, then the option. */
.shop-gear-count { font-size: 11px; color: var(--text-muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-gear-colours { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.shop-gear-colours i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); box-shadow: 0 0 0 1px rgba(0,0,0,0.4); }
.shop-gear-tier { margin: 14px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); text-align: center; }
.shop-gear-type + .shop-gear-type { margin-top: 22px; }
.shop-gear-note { margin: -4px 0 12px; }
.shop-gear-stage img { image-rendering: pixelated; image-rendering: crisp-edges; position: relative; z-index: 1; }
.shop-gear-stage .shop-gear-colours i { width: 30px; height: 30px; border-width: 2px; }
.shop-gear-tier-chip {
  display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: var(--radius); vertical-align: 1px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  background: rgba(var(--accent-rgb), 0.18); color: #fff;
}
.shop-gear-forms { justify-content: center; margin: 2px 0 10px; }
.shop-gear-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; margin: 0 0 12px; }
.shop-gear-opt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px 4px;
  border-radius: 8px; cursor: pointer; font: inherit; color: var(--text-secondary);
  background: var(--bg-tertiary); border: 1px solid var(--border);
}
.shop-gear-opt img { image-rendering: pixelated; image-rendering: crisp-edges; }
.shop-gear-opt small { font-size: 10px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-gear-opt:hover { border-color: rgba(var(--accent-rgb), 0.6); color: #fff; }
.shop-gear-opt.is-owned { border-color: rgba(67,233,123,0.45); background: rgba(67,233,123,0.07); }
.shop-gear-opt.is-on { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.16); color: #fff; box-shadow: 0 0 0 1px var(--accent); }
.shop-gear-opt-mark { position: absolute; top: 2px; right: 4px; font-size: 9px; color: var(--success); }
.shop-gear-opt-mark.is-using { color: var(--accent); }

/* ---- Zoomed item: over the list, which blurs behind it ---- */
.shop-modal.has-detail .shop-modal-body { filter: blur(4px) brightness(0.6); pointer-events: none; user-select: none; }
.shop-detail {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  overflow-y: auto; animation: cfFadeIn 0.15s ease;
}
.shop-detail[hidden] { display: none; }
.shop-detail-card { position: relative; width: min(380px, 100%); margin: auto; }
.shop-detail-card .shop-item { box-shadow: 0 18px 50px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.08); background: #1e1e1e; }
.shop-detail-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); background: rgba(0,0,0,0.5);
  color: #fff; cursor: pointer;
}
.shop-detail-close:hover { background: rgba(0,0,0,0.8); }
.shop-modal-backdrop.is-page .shop-detail { position: fixed; inset: 0; top: 0 !important; z-index: 10060; background: rgba(0,0,0,0.55); }

/* Buy buttons: one row: card, Campfire coins, creator coins, cart.
   Greyed = not a way you can buy this. */
.shop-buy-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.shop-buy {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 6px 4px; border-radius: 8px; cursor: pointer;
  background: rgba(var(--accent-rgb), 0.14); border: 1px solid rgba(var(--accent-rgb), 0.55);
  color: #fff; font: inherit; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
  transition: background 0.15s, border-color 0.15s;
}
.shop-buy > span { display: inline-flex; align-items: center; gap: 4px; }
.shop-buy small { font-size: 9px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255,255,255,0.65); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-buy:hover:not(:disabled) { background: rgba(var(--accent-rgb), 0.28); border-color: var(--accent); }
.shop-buy:disabled { cursor: not-allowed; opacity: 0.32; background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.1); filter: grayscale(0.8); }

/* ---- Your plan: one info line (opens the details) ---- */
.shop-planline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  width: 100%; max-width: 760px; margin: 0 auto 16px; padding: 10px 14px;
  border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-primary); font: inherit; text-align: left;
}
.shop-planline.is-link { cursor: pointer; }
.shop-planline.is-link:hover { border-color: rgba(var(--accent-rgb), 0.5); background: rgba(var(--accent-rgb), 0.05); }
.shop-planline-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.shop-planline-name { font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.shop-planline-sub { font-size: 12px; color: var(--text-secondary); }
.shop-planline-go, .shop-planline > .btn { margin-left: auto; }
.shop-planline-go { font-size: 12px; font-weight: 600; color: var(--accent); }

/* ---- Membership details panel ---- */
.shop-panel-back { display: block; max-width: 760px; margin: 0 auto 12px; font-size: 13px; text-align: left; width: 100%; }
.shop-buy-why { margin: 2px 0 0; font-size: 11px; color: var(--text-muted); text-align: center; line-height: 1.5; }
.shop-mpanel { max-width: 760px; margin: 0 auto; }
.shop-mhead {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  padding: 16px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
}
.shop-mhead-name { font-size: 20px; font-weight: 800; margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* The plan's name reads like the Shop cards' titles (.plan-title): W95FA. */
.shop-mhead-name { font-family: 'W95FA', 'MS Sans Serif', Tahoma, ui-monospace, monospace; font-size: 28px; font-weight: 400; letter-spacing: 0.5px; line-height: 1.1; }
.shop-mhead-name .shop-chip { font-family: var(--font-body, system-ui, sans-serif); letter-spacing: 0; }
.shop-mhead-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.shop-mcard { font-size: 13px; font-variant-numeric: tabular-nums; }
.shop-mcard small { color: var(--text-muted); }
.shop-card-brand { text-transform: capitalize; font-weight: 700; }
.shop-mnote { font-size: 11px; color: var(--text-muted); margin: 8px 2px 0; line-height: 1.5; }
.shop-msec { margin-top: 18px; }
.shop-msec h4 { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 6px; }
.shop-mrow {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 150px; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 13px;
}
.shop-mrow small { display: block; font-size: 11px; color: var(--text-muted); font-weight: 400; }
.shop-mrow-main { min-width: 0; }
.shop-mrow-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-mrow-mid { font-weight: 700; font-variant-numeric: tabular-nums; display: inline-flex; align-items: baseline; gap: 3px; }
.shop-mrow-mid small { display: inline; }
.shop-mrow-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.shop-mrow-end a { color: var(--accent); }
.shop-mstate { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 7px; border-radius: var(--radius); background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.shop-mstate.is-active, .shop-mstate.is-paid, .shop-mstate.is-trialing { background: rgba(67,233,123,0.12); color: var(--success); }
.shop-mstate.is-past_due, .shop-mstate.is-unpaid, .shop-mstate.is-refunded, .shop-mstate.is-disputed, .shop-mstate.is-ending { background: rgba(254,225,64,0.12); color: var(--warning); }
.shop-mempty { font-size: 12px; color: var(--text-muted); padding: 8px 4px; }
.shop-mreactivate {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 14px; border-radius: 10px; font-size: 13px;
  background: rgba(var(--accent-rgb), 0.07); border: 1px solid rgba(var(--accent-rgb), 0.3);
}

@media (max-width: 600px) {
  /* Phones: Membership · Coins + wallet on top, the shop tabs centred below. */
  .shop-modal-tabs { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "side end" "shops shops"; gap: 8px; }
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .shop-tile { padding: 6px; }
  .shop-tile-art img { width: 80%; height: auto; }
  .shop-tile-name { font-size: 11px; }
  .shop-mrow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .shop-mrow-end { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .shop-mhead-side { align-items: flex-start; }
}
