.rp-market-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 16px 48px;
  color: var(--text-primary);
}

.rp-market-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.rp-market-hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.rp-market-lead {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 520px;
}

.rp-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--auth-hint-bg);
  border: 1px solid var(--auth-hint-border);
  color: var(--auth-hint-text);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.rp-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
}

.rp-pack-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.6rem 1.25rem 1.4rem;
  border-radius: 16px;
  background: var(--auth-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--auth-card-border);
  box-shadow: var(--auth-card-shadow);
  transition: transform 0.2s, border-color 0.2s;
}

.rp-pack-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.45);
}

.rp-pack-card--featured {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 12px 36px rgba(96, 165, 250, 0.14);
}

.rp-pack-badge {
  margin: 0 0 0.65rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.22), rgba(96, 165, 250, 0.22));
  color: var(--auth-link);
}

.rp-pack-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.rp-pack-price {
  margin: 0 0 1.1rem;
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rp-pack-note {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.rp-buy-btn {
  width: 100%;
  padding: 0.72rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.rp-buy-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.rp-buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rp-stripe-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.65rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.rp-stripe-badge svg {
  width: 42px;
  height: auto;
  opacity: 0.85;
}

.rp-market-note {
  margin: 24px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.rp-market-note a {
  color: var(--auth-link);
  font-weight: 600;
  text-decoration: none;
}

.rp-market-note a:hover {
  color: var(--auth-link-hover);
  text-decoration: underline;
}

.rp-market-message {
  margin-top: 20px;
  text-align: center;
  font-weight: 600;
  min-height: 1.5em;
  font-size: 0.92rem;
}

.rp-market-message.ok {
  color: #15803d;
}

[data-theme="dark"] .rp-market-message.ok {
  color: #86efac;
}

.rp-market-message.err {
  color: #b91c1c;
}

[data-theme="dark"] .rp-market-message.err {
  color: #fca5a5;
}

.rp-market-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rp-market-footer a {
  color: var(--auth-link);
  font-weight: 600;
  text-decoration: none;
}

.rp-market-footer a:hover {
  color: var(--auth-link-hover);
  text-decoration: underline;
}

.rp-market-status {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--auth-hint-bg);
  border: 1px solid var(--auth-hint-border);
  color: var(--auth-hint-text);
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: center;
}

.rp-market-status.hidden {
  display: none;
}
