body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top left, #2f3d66, #10131a 55%, #050608 100%);
  color: #f7f7f7;
  overflow: hidden;
}

#fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.shell {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  width: 100%;
  max-width: 520px;
  padding: 1.5rem 1.75rem;
  border-radius: 1.25rem;
  background: rgba(7, 9, 16, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(18px);
}

/* rolodex */
.price-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.currency-icon {
  font-size: 1.2rem;
  opacity: 0.9;
}

.digit-rolodex {
  display: flex;
  gap: 0.4rem;
  padding: 0.3rem 0.45rem;
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.digit-wheel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 32px;
}

.digit-display {
  width: 100%;
  text-align: center;
  padding: 0.25rem 0;
  margin: 0.1rem 0;
  border-radius: 0.4rem;
  background: rgba(10, 12, 20, 0.9);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
}

.digit-up,
.digit-down {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.65rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.1rem;
}

.digit-up:hover,
.digit-down:hover {
  color: #ffffff;
}
.pay-layout {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Card flip scene */
.card-scene {
  width: 280px;
  height: 170px;
  perspective: 900px;
}

.pay-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.35s ease-out;
  cursor: pointer;
}

.pay-card.is-flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 1.1rem;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(135deg, #151820, #070a12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-back {
  transform: rotateY(180deg);
}

/* Front styling */
.card-chip {
  width: 26px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(135deg, #fbd27a, #f5a623);
  margin-bottom: 0.4rem;
}

.card-brand {
  font-size: 0.9rem;
  opacity: 0.8;
}

.card-number {
  font-size: 1rem;
  letter-spacing: 0.12em;
  margin-top: 0.6rem;
  opacity: 0.9;
}

.card-label {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Back (tag fields) */
.card-back h3 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.card-sub {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.6rem;
}

.tag-field {
  margin-bottom: 0.5rem;
  display: none; /* hidden until its app button is active */
}

.tag-field label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 0.15rem;
}

.tag-field input {
  width: 100%;
  padding: 0.35rem 0.45rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 7, 13, 0.95);
  color: #f7f7f7;
  font-size: 0.85rem;
}

/* Side icon buttons */
.pay-app-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-btn {
  width: 40px;
  height: 40px;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: radial-gradient(circle at top, #262b3e, #060811);
  color: #f7f7f7;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s;
}

.app-btn.active {
  border-color: #52f5b9;
  box-shadow: 0 0 12px rgba(82, 245, 185, 0.7);
}

.app-btn:hover {
  transform: translateY(-1px);
}
/* Whole tray anchored to bottom-right */
.pay-tray {
  position: fixed;
  right: 1.2rem;
  bottom: 1rem;
  z-index: 30;
}

/* The little $ tab */
.pay-tab {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: radial-gradient(circle at top, #262b3e, #05060b);
  color: #f7f7f7;
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out;
}

/* “Pressed” look when tray open */
.pay-tray.open .pay-tab {
  transform: translateY(2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

/* The body that slides out */
.pay-tray-body {
  position: absolute;
  right: 0;
  bottom: 54px; /* just above the tab */
  width: 300px;
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease-out, opacity 0.22s ease-out;
}

/* When open: tray pops up */
.pay-tray.open .pay-tray-body {
  transform: translateY(0%);
  opacity: 1;
  pointer-events: auto;
}

/* Inside the tray, reuse your existing card / options styles */
.pay-tray .card-scene {
  perspective: 900px;
  margin-bottom: 0.5rem;
}

