/* TAPsignal · COSMETIC SHOP · v95.56 (F-02 fix)
 *
 * Closes the Echoes consumption loop. Three placeholder items:
 *   · NEON BLOB SKIN       · 5,000 ◆ · cosmetic
 *   · GLITCH AUDIO PACK    · 8,000 ◆ · cosmetic
 *   · +5 CONTINUE BUNDLE   · 1,000 ◆ · consumable
 *
 * No skin-render path is built yet (v1.1 work). The shop's job in
 * v95.56 is to CLOSE THE LOOP · player earns Echoes → goes to shop →
 * spends Echoes → sees "+1 unlocked" toast → balance decreases. The
 * chase target now visible AND reachable.
 *
 * Surface:
 *   .shop-btn      · button on the intro overlay strip (sits in the
 *                    same row as the streak badge)
 *   .shop-backdrop · modal · radial gradient over stage · matches
 *                    the cymatic aesthetic
 *   .shop-card     · 3 buttons inside the modal
 */

/* ─── Shop entry button on intro strip ───────────────────────────── */
.shop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1AE5C5;
  background: rgba(2, 5, 7, 0.7);
  border: 1px solid #1AE5C5;
  border-radius: 4px;
  text-shadow: 0 0 6px rgba(26, 229, 197, 0.5);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms, background 140ms, box-shadow 140ms;
}
.shop-btn:active { transform: scale(0.96); }
.shop-btn:hover, .shop-btn:focus-visible {
  outline: none;
  background: rgba(26, 229, 197, 0.10);
  box-shadow: 0 0 18px rgba(26, 229, 197, 0.35);
}

/* ─── Shop modal ─────────────────────────────────────────────────── */
.shop-backdrop {
  position: fixed;        /* v95.56 · body-mounted · cover full viewport */
  inset: 0;
  z-index: 9000;          /* above intro overlay (9997 is build stamp · 9000 wins everywhere else) */
  background: radial-gradient(ellipse at center,
    rgba(11, 95, 184, 0.35) 0%,
    rgba(2, 5, 7, 0.92) 70%
  );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  animation: shop-back-in 200ms ease-out;
  padding: 24px 18px;
  overflow-y: auto;
}
@keyframes shop-back-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.shop-title {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1AE5C5;
  text-align: center;
  text-shadow:
    0 0 6px  #1AE5C5,
    0 0 14px #1AE5C5,
    0 0 28px rgba(26, 229, 197, 0.6);
}
.shop-balance {
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4EFFB0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6px rgba(78, 255, 176, 0.5);
}
.shop-balance .v {
  color: #FFFFFF;
  font-size: 18px;
  margin: 0 4px;
}

.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.shop-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(2, 5, 7, 0.72);
  border: 1px solid rgba(26, 229, 197, 0.4);
  border-radius: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms, border-color 140ms, box-shadow 140ms;
  text-align: left;
  font-family: var(--mono);
  color: #DDE;
}
.shop-card:active { transform: scale(0.98); }
.shop-card:hover, .shop-card:focus-visible {
  outline: none;
  border-color: rgba(26, 229, 197, 0.95);
  box-shadow: 0 0 22px rgba(26, 229, 197, 0.4);
}
.shop-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(170, 170, 187, 0.25);
  box-shadow: none;
}
.shop-card.locked:hover {
  border-color: rgba(170, 170, 187, 0.25);
  box-shadow: none;
}

.shop-icon {
  font-size: 26px;
  line-height: 1;
  color: #1AE5C5;
  text-shadow: 0 0 8px #1AE5C5;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.shop-card.locked .shop-icon { color: #888; text-shadow: none; }

.shop-text {
  flex: 1;
  min-width: 0;
}
.shop-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4EFFB0;
  text-shadow: 0 0 4px rgba(78, 255, 176, 0.5);
}
.shop-card.locked .shop-name { color: #aab; text-shadow: none; }
.shop-desc {
  font-size: 10px;
  margin-top: 2px;
  color: rgba(170, 170, 187, 0.85);
  letter-spacing: 0.06em;
}

.shop-price {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFC56E;
  text-align: right;
  text-shadow: 0 0 6px rgba(255, 197, 110, 0.5);
  font-variant-numeric: tabular-nums;
}
.shop-card.locked .shop-price { color: #aab; text-shadow: none; }

.shop-close {
  margin-top: 18px;
  padding: 10px 22px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(170, 170, 187, 0.85);
  background: transparent;
  border: 1px solid rgba(170, 170, 187, 0.4);
  border-radius: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.shop-close:hover, .shop-close:focus-visible {
  outline: none;
  color: #DDE;
  border-color: rgba(170, 170, 187, 0.8);
}

.shop-hint {
  margin-top: 8px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(135, 184, 160, 0.6);
  text-transform: uppercase;
  text-align: center;
}

/* ─── Successful-purchase toast (reuses the meta-toast slot) ─────── */
.shop-toast {
  position: fixed;        /* v95.56 · body-mounted */
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  z-index: 9100;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1AE5C5;
  text-shadow:
    0 0 8px  #1AE5C5,
    0 0 18px #1AE5C5,
    0 0 36px rgba(26, 229, 197, 0.7);
  pointer-events: none;
  opacity: 0;
  text-align: center;
  animation: shop-toast-pop 1600ms cubic-bezier(.16, .84, .24, 1) forwards;
}
@keyframes shop-toast-pop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  15%  { opacity: 1; transform: translate(-50%, -80%) scale(1.08); }
  85%  { opacity: 1; transform: translate(-50%, -120%) scale(1.00); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .shop-backdrop  { animation: none; }
  .shop-toast     { animation-duration: 500ms; }
}

@media (max-width: 380px) {
  .shop-title { font-size: 20px; }
  .shop-card  { padding: 12px 14px; }
  .shop-name  { font-size: 11px; }
  .shop-desc  { font-size: 9.5px; }
  .shop-price { font-size: 12px; }
}
