.loyalty-wallet {
  display: grid;
  gap: 24px;
}

.loyalty-card,
.loyalty-rewards,
.loyalty-requests {
  padding: 24px;
  border: 1px solid var(--border, var(--oazis-border, rgba(255,255,255,.14)));
  border-radius: 18px;
  background: var(--bg-soft, var(--oazis-card, rgba(255,255,255,.04)));
}

.loyalty-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.loyalty-balance {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  line-height: 1;
  color: var(--primary, var(--oazis-gold, #c9a96e));
}

.loyalty-balance small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted, var(--oazis-soft, #aaa));
}

.loyalty-punch {
  display: flex;
  justify-content: center;
}

.loyalty-punch__shell {
  width: min(100%, 420px);
  border-radius: 28px;
  padding: 18px;
  background: var(--punch-card-bg, #1a1a1a);
  color: var(--punch-text, #fff);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
  display: grid;
  gap: 14px;
}

.loyalty-punch__top {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
}

.loyalty-punch__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: var(--punch-logo-radius, 0);
  background: rgba(255, 255, 255, .06);
}

.loyalty-punch__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.loyalty-punch__subtitle {
  margin: 4px 0 0;
  font-size: .86rem;
  opacity: .78;
}

.loyalty-punch__gift-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loyalty-punch__gift {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--punch-gift-bg, #fc86da);
  display: grid;
  place-items: center;
}

.loyalty-punch__gift img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.loyalty-punch__gift img.is-filtered {
  mix-blend-mode: luminosity;
}

.loyalty-punch__gift img.is-shadowed {
  filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, .45));
}

.loyalty-punch__gift-count {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fc86da;
  line-height: 1;
}

.loyalty-punch__progressbar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.loyalty-punch__progressbar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--punch-stamp-bg, #752adf);
  min-width: 0;
  transition: width .25s ease;
}

.loyalty-punch__flip {
  perspective: 1200px;
  min-height: 220px;
}

.loyalty-punch__flip-inner {
  position: relative;
  width: 100%;
  min-height: 220px;
  transform-style: preserve-3d;
  transition: transform .55s ease;
}

.loyalty-punch__flip.is-flipped .loyalty-punch__flip-inner {
  transform: rotateY(180deg);
}

.loyalty-punch__face {
  border-radius: 24px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background-color: var(--punch-panel-bg, rgba(0, 0, 0, .22));
  background-image: var(--punch-panel-image, none);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  padding: 14px;
}

.loyalty-punch__face--front {
  position: relative;
}

.loyalty-punch__face--back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
}

.loyalty-punch__stamps {
  display: grid;
  grid-template-columns: repeat(var(--stamp-cols, 3), minmax(0, 1fr));
  gap: 10px;
}

.loyalty-punch__slot {
  aspect-ratio: 1 / 1;
  min-height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .55);
  color: rgba(255, 255, 255, .72);
  font-size: clamp(.95rem, 2.8vw, 1.1rem);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2);
}

.loyalty-punch__slot.is-filled {
  background-color: var(--punch-stamp-bg, #752adf);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
  color: #fff;
}

.loyalty-punch__slot img {
  width: 52%;
  height: 52%;
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  display: block;
}

.loyalty-punch__description {
  margin: 0;
  color: var(--punch-panel-text, #fff);
  font-weight: 600;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.loyalty-punch__empty {
  margin: 0;
  padding: 24px 8px;
  text-align: center;
  opacity: .85;
}

.loyalty-punch__actions {
  display: flex;
  justify-content: flex-end;
}

.loyalty-punch__flip-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: #752adf;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.loyalty-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.loyalty-qr {
  margin: 0;
  text-align: center;
}

.loyalty-qr img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.loyalty-qr figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted, var(--oazis-soft, #aaa));
}

.loyalty-reward-list,
.loyalty-request-list {
  display: grid;
  gap: 12px;
}

.loyalty-reward,
.loyalty-request {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
}

.loyalty-reward:last-child,
.loyalty-request:last-child {
  border-bottom: 0;
}

.loyalty-reward__price,
.loyalty-request__status {
  color: var(--primary, var(--oazis-gold, #c9a96e));
  font-weight: 600;
}

.loyalty-message {
  margin: 12px 0 0;
  min-height: 20px;
}

.loyalty-message.is-error {
  color: #ef7d70;
}

.loyalty-profile-preview {
  margin-top: 28px;
}

@media (max-width: 480px) {
  .loyalty-punch__shell {
    width: 100%;
    padding: 14px;
  }

  .loyalty-punch__top {
    grid-template-columns: 48px 1fr auto;
  }

  .loyalty-punch__logo {
    width: 48px;
    height: 48px;
  }

  .loyalty-punch__slot {
    min-height: 48px;
    border-radius: 14px;
  }
}

.gamification-card {
  padding: 24px;
  border: 1px solid var(--border, var(--oazis-border, rgba(255,255,255,.14)));
  border-radius: 18px;
  background: var(--bg-soft, var(--oazis-card, rgba(255,255,255,.04)));
  display: grid;
  gap: 20px;
}

.gamification-card__hero {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: center;
}

.gamification-card__character,
.gamification-card__placeholder,
.gamification-level__art {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(117, 42, 223, .12);
  display: grid;
  place-items: center;
}

.gamification-card__character img,
.gamification-level__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gamification-card__placeholder,
.gamification-level__art span {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary, var(--oazis-gold, #752ADF));
}

.gamification-progress {
  margin-top: 12px;
  height: 8px;
  border-radius: 999px;
  background: rgba(127,127,127,.18);
  overflow: hidden;
}

.gamification-progress span {
  display: block;
  height: 100%;
  background: var(--primary, var(--oazis-gold, #752ADF));
}

.gamification-ladder {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.gamification-level {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  opacity: .45;
}

.gamification-level.is-reached {
  opacity: .85;
}

.gamification-level.is-current {
  opacity: 1;
}

.gamification-level__art {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 2px solid transparent;
}

.gamification-level:not(.is-reached) .gamification-level__art {
  filter: grayscale(1);
  opacity: .7;
}

.gamification-level.is-current .gamification-level__art {
  border-color: var(--primary, var(--oazis-gold, #752ADF));
  transform: scale(1.06);
}

.gamification-level strong {
  font-size: 14px;
}

.gamification-level small {
  color: var(--muted, var(--oazis-soft, #888));
  font-size: 12px;
}

.gamification-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gamification-badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(127,127,127,.3));
  font-size: 13px;
}

.gamification-next {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(117, 42, 223, .08);
  display: grid;
  gap: 6px;
}

.gamification-next__action {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.gamification-collections {
  display: grid;
  gap: 16px;
}

.gamification-collection {
  --collection-accent: #c9a96e;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border, rgba(127,127,127,.16));
  background: var(--bg-soft, var(--oazis-card, rgba(255,255,255,.04)));
}

.gamification-collection.is-complete {
  box-shadow: 0 0 0 1px var(--collection-accent);
}

.gamification-collection__cover {
  position: relative;
  min-height: 132px;
  padding: 20px 18px 16px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(28, 18, 42, .92), rgba(28, 18, 42, .55)),
    var(--collection-accent);
}

.gamification-collection__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gamification-collection__cover-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16,10,24,.25) 0%, rgba(16,10,24,.78) 100%);
}

.gamification-collection__kicker,
.gamification-collection__cover h3,
.gamification-collection__cover p {
  position: relative;
  z-index: 1;
}

.gamification-collection__kicker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 8px;
}

.gamification-collection__cover h3 {
  margin: 0;
  font-size: 22px;
}

.gamification-collection__cover p {
  margin: 8px 0 0;
  opacity: .86;
  font-size: 14px;
}

.gamification-collection__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  padding: 14px;
}

.gamification-dish {
  margin: 0;
  display: grid;
  gap: 6px;
  text-align: center;
}

.gamification-dish__art {
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(117, 42, 223, .08);
  display: grid;
  place-items: center;
  position: relative;
}

.gamification-dish__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(.45);
  transform: scale(1.04);
}

.gamification-dish__art::after {
  content: "🔒";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.gamification-dish.is-open .gamification-dish__art img {
  filter: none;
  transform: none;
}

.gamification-dish.is-open .gamification-dish__art::after {
  content: "✓";
  inset: auto 6px  auto auto;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 99px;
  background: var(--collection-accent, #c9a96e);
  color: #1c1428;
  font-size: 11px;
  font-weight: 700;
}

.gamification-dish figcaption {
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted, var(--oazis-soft, #888));
}

.gamification-dish.is-open figcaption {
  color: inherit;
}

.gamification-collection__done,
.gamification-collection__hint {
  padding: 0 14px 14px;
  font-size: 13px;
}

.gamification-collection__done {
  color: var(--collection-accent, #c9a96e);
  font-weight: 700;
}

.gamification-achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.gamification-achievement {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border, rgba(127,127,127,.18));
  opacity: .55;
}

.gamification-achievement.is-earned {
  opacity: 1;
}

.gamification-achievement__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  border: 1px solid var(--border, rgba(127,127,127,.25));
}

.gamification-achievement small {
  display: block;
  margin-top: 4px;
  color: var(--muted, var(--oazis-soft, #888));
  font-size: 12px;
}

.gamification-feed {
  display: grid;
  gap: 10px;
}

.gamification-feed__item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
}

.gamification-feed__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(117, 42, 223, .1);
  font-size: 20px;
}

.gamification-feed__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gamification-feed__item small {
  display: block;
  color: var(--muted, var(--oazis-soft, #888));
  font-size: 12px;
}

.gamification-feed__date {
  margin-top: 2px;
  opacity: .8;
}
