/* Boutique Traîner-Frontier — alignée accueil (cyan / glass / hero) */
.boutique-body {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
}
.shop-atmosphere {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.shop-atmosphere img {
  width: 100%; height: 100%;
  max-width: none;
  object-fit: cover; object-position: center 35%;
  filter: blur(18px) saturate(1.15) brightness(.55);
  transform: scale(1.08);
}
.shop-atmosphere-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,11,20,.55) 0%, rgba(5,11,20,.72) 40%, rgba(5,11,20,.92) 100%),
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(47,125,255,.22), transparent 55%),
    radial-gradient(ellipse 40% 35% at 100% 10%, rgba(62,207,255,.1), transparent 50%);
}
.boutique-page {
  position: relative; z-index: 1;
  background: transparent;
  padding-bottom: 80px;
}
.shop-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 8px;
}
.boutique-page h1 {
  text-shadow: 0 2px 24px rgba(47,125,255,.25);
}
.boutique-page code {
  font-family: ui-monospace, Menlo, monospace; font-size: .88em;
  background: rgba(0,0,0,.35); padding: 1px 6px; border-radius: 5px;
}

/* Nav session chips — stable sizing (anti layout-shift) */
.nav-balance {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; min-width: 72px; padding: 0 12px; border-radius: 11px;
  background: rgba(62,207,255,.12); border: 1px solid rgba(62,207,255,.35);
  font-weight: 700; font-size: 14px; color: #9ee9ff;
  flex: none;
}
.nav-balance #navCoins {
  min-width: 1.25ch; text-align: right; font-variant-numeric: tabular-nums;
  line-height: 1;
}
/* Archicoin clean (type_coins crop) — chiffre AVANT l’icône */
.nav-balance-p, .p-mark,
.coin-icon {
  display: inline-block;
  width: 20px; height: 20px; flex: none;
  background: none;
  border-radius: 0; box-shadow: none;
  font-size: 0; color: transparent; line-height: 0;
  vertical-align: middle;
}
.p-mark.coin-icon--lg,
.coin-icon--lg {
  width: 28px; height: 28px;
}
img.coin-icon, img.nav-balance-p, img.p-mark {
  display: inline-block;
  width: 20px; height: 20px;
  object-fit: contain;
  object-position: center;
  background: none !important;
  border-radius: 50%;
  clip-path: circle(46% at 50% 48%);
  vertical-align: middle;
}
img.p-mark.coin-icon--lg,
img.coin-icon--lg {
  width: 28px; height: 28px;
  clip-path: circle(46% at 50% 48%);
}
.session-ok .coin-val {
  color: #9ee9ff; display: inline-flex; align-items: center; gap: 8px;
  flex-direction: row;
}
.nav-user {
  font-size: 13px; font-weight: 600; color: #dce5f3;
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Session card */
.shop-session {
  margin: 22px 0 8px;
  background: var(--glass);
  border: 1px solid rgba(62,207,255,.22);
  backdrop-filter: blur(18px) saturate(1.25);
}
.session-ok, .session-need {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.session-ok .lab, .session-need .lab {
  font-size: 11.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; font-weight: 700;
}
.session-ok .val { font-family: var(--display); font-size: 1.25rem; margin-top: 2px; }
.session-ok .coin-val { color: #9ee9ff; display: flex; align-items: center; gap: 8px; }
.session-need p { color: var(--muted); font-size: .95rem; margin-top: 4px; max-width: 52ch; line-height: 1.45; }

/* Connected strip — reuses Mon compte .compte-hero (compte.css); boutique-only aside */
.shop-session--hero {
  margin: 22px 0 8px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.shop-session--hero .shop-compte-hero {
  margin: 0;
  grid-column: auto;
}
.shop-hero-aside {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}
.session-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(62, 207, 255, .2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
  min-width: 120px;
}
.session-balance-lab {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan, #3ecfff);
}
.session-balance-val {
  font-family: var(--display);
  font-size: 1.55rem;
  color: #9ee9ff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.shop-hero-aside .compte-actions {
  width: 100%;
}
.session-need .am-btn {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .shop-compte-hero-main {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .shop-hero-aside {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .shop-hero-aside .session-balance {
    flex: 0 1 auto;
  }
  .shop-hero-aside .compte-actions {
    flex: 1 1 auto;
    justify-content: stretch;
  }
  .shop-hero-aside .compte-actions .am-btn {
    flex: 1 1 auto;
  }
}
@media (max-width: 640px) {
  .shop-compte-hero-main {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .shop-hero-aside {
    width: 100%;
    flex-direction: column;
  }
  .shop-hero-aside .session-balance,
  .shop-hero-aside .compte-actions {
    width: 100%;
  }
}

.shop-banner {
  margin: 16px 0 8px; padding: 12px 16px; border-radius: 12px;
  font-size: .92rem; line-height: 1.45;
}
.shop-banner.ok {
  background: rgba(61, 214, 140, .1); border: 1px solid rgba(61, 214, 140, .35); color: #b8f5d4;
}
.shop-banner.err {
  background: rgba(227,53,13,.1); border: 1px solid rgba(227,53,13,.35); color: #ffb4a8;
}

.shop-section { margin-top: 40px; }
.section-head { margin-bottom: 8px; }
.section-head h2 {
  font-family: var(--display); font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: .03em; margin: 0 0 6px;
}
.section-lead { color: var(--muted); font-size: .98rem; line-height: 1.5; max-width: 60ch; }

/* Section headers (no selectable filter chips) */
.shop-cat-block { margin-top: 28px; }
.shop-cat-title {
  font-family: var(--display);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: .04em;
  margin: 0 0 4px;
  color: #e8eef8;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(62,207,255,.18);
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; margin-top: 18px;
}
.grades-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.shop-card {
  display: flex; flex-direction: column;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 16px 40px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
  animation: cardIn .45s var(--ease) both;
}
.shop-card:hover {
  transform: translateY(-3px);
  border-color: rgba(62,207,255,.35);
  box-shadow: 0 20px 48px rgba(47,125,255,.18), inset 0 1px 0 rgba(255,255,255,.08);
}
.shop-card.flash {
  border-color: rgba(62,207,255,.45);
  background: linear-gradient(160deg, rgba(62,207,255,.12), rgba(8,14,26,.55));
}
.pack-card {
  border-color: rgba(255,203,5,.28);
  background: linear-gradient(160deg, rgba(255,203,5,.08), rgba(8,14,26,.58));
}
.shop-card[hidden] { display: none !important; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Product hero art */
.shop-card-media {
  position: relative;
  aspect-ratio: 1 / 0.92;
  min-height: 160px;
  flex: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(47,125,255,.18), transparent 65%),
    linear-gradient(180deg, rgba(12,22,40,.35) 0%, rgba(5,11,20,.85) 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.shop-card-media::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 36%;
  background: linear-gradient(180deg, transparent, rgba(5,11,20,.72));
  pointer-events: none;
}
.shop-card-art {
  width: 86%;
  height: 86%;
  object-fit: contain;
  object-position: center 46%;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.45));
  transition: transform .25s var(--ease);
  z-index: 1;
}
.shop-card:hover .shop-card-art { transform: scale(1.04) translateY(-2px); }
.pack-card .shop-card-media {
  background:
    radial-gradient(ellipse 65% 55% at 50% 42%, rgba(255,203,5,.22), transparent 62%),
    linear-gradient(180deg, rgba(26,20,0,.25) 0%, rgba(5,11,20,.88) 100%);
}
.shop-card.flash .shop-card-media {
  background:
    radial-gradient(ellipse 70% 60% at 50% 38%, rgba(62,207,255,.28), transparent 60%),
    linear-gradient(180deg, rgba(10,30,48,.4) 0%, rgba(5,11,20,.9) 100%);
}
.shop-card-media .shop-badge {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
}
.shop-card-body {
  display: flex; flex-direction: column; flex: 1;
  padding: 14px 16px 16px;
  gap: 10px;
  min-height: 0;
}
.shop-badge {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 8px;
  background: rgba(62,207,255,.18); color: #9ee9ff; border: 1px solid rgba(62,207,255,.35);
}
.shop-badge.coins {
  background: rgba(255,203,5,.12); color: #ffe566; border-color: rgba(255,203,5,.35);
}
.shop-badge.grade {
  background: rgba(255,203,5,.14); color: #ffe566; border-color: rgba(255,203,5,.4);
  left: auto; top: 16px; right: 16px;
}
.grade-open { cursor: pointer; }
.grade-card .shop-card-media {
  /* Source grade banners are portrait ~334×941 — match native ratio, full art visible */
  aspect-ratio: 334 / 941;
  min-height: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 30%, rgba(47,125,255,.14), transparent 62%),
    linear-gradient(180deg, rgba(8,14,26,.2) 0%, rgba(5,11,20,.92) 100%);
}
.grade-card .shop-card-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  filter: none;
}
.grade-card .shop-card-media::after {
  /* Keep title plate readable — light edge only */
  height: 6%;
  background: linear-gradient(180deg, transparent, rgba(5,11,20,.35));
}
.grade-card .shop-card-media .shop-badge {
  top: 10px;
  right: 10px;
  left: auto;
  max-width: calc(100% - 20px);
  opacity: .9;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(8, 16, 28, .55);
  border-color: rgba(62, 207, 255, .35);
  color: #c8f4ff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
.grade-card .shop-card-media .shop-badge.grade {
  background: rgba(8, 16, 28, .55);
  border-color: rgba(255, 203, 5, .4);
  color: #ffe566;
}
.grade-card .shop-card-media .shop-badge.owned {
  background: rgba(8, 16, 28, .55);
  border-color: rgba(62, 207, 255, .4);
  color: #b8f0ff;
}
.grade-card .shop-card-body { gap: 10px; }
.grade-card .shop-grade-info { width: 100%; margin-bottom: 0; }
.shop-card h3 {
  font-family: var(--display); font-size: 1.12rem; margin: 0; letter-spacing: .02em;
}
.shop-card-body > p { color: var(--muted); font-size: .9rem; line-height: 1.4; margin: 0; }
.shop-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0;
}
.shop-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  width: 100%;
  padding-top: 4px;
}
.shop-card-actions .btn {
  width: 100%;
  margin: 0;
  flex: none;
}
.coin-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: #9ec5ff;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(47,125,255,.14); border: 1px solid rgba(47,125,255,.3);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.coin-pill .coin-amt { line-height: 1; }
.coin-pill img.p-mark,
.coin-pill-inline img.p-mark {
  width: 18px; height: 18px; flex: none;
  object-fit: contain; vertical-align: middle;
  border-radius: 50%;
  clip-path: circle(46% at 50% 48%);
}
.coin-pill-inline {
  display: inline-flex; align-items: center; gap: 5px;
  font-style: normal; font-variant-numeric: tabular-nums;
}
.coin-pill.price-coins {
  font-family: var(--display); font-size: 1.05rem; color: #9ee9ff;
  padding: 6px 12px;
  background: rgba(62,207,255,.12); border-color: rgba(62,207,255,.4);
}
.coin-pill.price-coins img.p-mark {
  width: 20px; height: 20px;
}
.shop-meta .price {
  font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: #fff;
}
.shop-buy-coins, .shop-spend, .shop-gift, .shop-grade-info { width: 100%; }
.shop-buy-coins:disabled, .shop-spend:disabled, .shop-gift:disabled {
  opacity: .55; cursor: not-allowed; filter: none; transform: none;
}
.shop-note {
  margin-top: 36px;
  margin-inline: auto;
  max-width: 720px;
  width: 100%;
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(62, 207, 255, 0.14);
  background:
    linear-gradient(165deg, rgba(62, 207, 255, 0.06), transparent 42%),
    rgba(8, 14, 26, 0.72);
}
.shop-note h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin-top: 0;
  text-align: center;
}

/* Boutique blocks — pleine largeur (pas de colonne centrée étroite) */
.shop-section--center {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.shop-section--center > .section-head {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: none;
}
.shop-section--center > .section-head .section-lead {
  margin-inline: 0;
  text-align: left;
  max-width: 70ch;
}
.shop-section--center > .gift-panel {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}
.shop-section--center.shop-note,
.shop-note.shop-section--center {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

/* Modal */
.shop-modal[hidden] { display: none !important; }
.shop-modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 20px;
}
.shop-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(2,6,14,.72); backdrop-filter: blur(8px);
}
.shop-modal-panel {
  position: relative; z-index: 1;
  width: min(420px, 100%);
  background: rgba(8,14,26,.96);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  padding: 28px 24px 22px;
  box-shadow: 0 28px 80px rgba(0,0,0,.55);
  animation: cardIn .3s var(--ease) both;
}
.shop-modal-x {
  position: absolute; top: 12px; right: 14px;
  width: 36px; height: 36px; border-radius: 10px;
  font-size: 22px; color: #9aaabc;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
}
.shop-modal-panel h2 {
  font-family: var(--display); font-size: 1.35rem; margin-bottom: 6px;
}
.modal-lead { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field span { font-size: 13px; font-weight: 600; color: #c9d5e8; }
.field em { font-style: normal; font-weight: 500; color: var(--muted); }
.field input {
  min-height: 44px; padding: 0 14px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  color: #fff; font: inherit;
}
.field input:focus {
  outline: none; border-color: rgba(62,207,255,.55);
  box-shadow: 0 0 0 3px rgba(62,207,255,.15);
}
.field-hint { font-size: 12.5px; color: var(--muted); margin: -4px 0 16px; line-height: 1.4; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal-err {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: rgba(227,53,13,.12); border: 1px solid rgba(227,53,13,.4);
  color: #ffb4a8; font-size: .9rem;
}

/* Grade advantages modal */
.grade-panel { width: min(520px, 100%); }
.grade-modal-top {
  display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px;
}
.grade-modal-art {
  width: 96px; height: 96px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.4));
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(47,125,255,.2), transparent 65%),
    rgba(0,0,0,.25);
  border-radius: 16px; padding: 8px;
  border: 1px solid rgba(62,207,255,.22);
}
.grade-perks-title {
  font-family: var(--display); font-size: 1rem; margin: 0 0 10px;
  letter-spacing: .03em; color: #9ee9ff;
}
.grade-perks {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: grid; gap: 10px;
}
.grade-perk {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.grade-perk strong {
  display: block; font-size: .95rem; color: #eef4ff; margin-bottom: 2px;
}
.grade-perk span {
  display: block; font-size: .85rem; color: var(--muted); line-height: 1.4;
}
.grade-perk-icon {
  width: 36px; height: 36px; border-radius: 11px;
  background: rgba(47,125,255,.18);
  border: 1px solid rgba(47,125,255,.35);
  position: relative;
}
.grade-perk-icon::after {
  content: ""; position: absolute; inset: 9px;
  border-radius: 4px;
  background: linear-gradient(145deg, #9ee9ff, #2f7dff);
  opacity: .85;
}
.grade-perk--warp .grade-perk-icon {
  background: rgba(61,214,140,.12); border-color: rgba(61,214,140,.35);
}
.grade-perk--warp .grade-perk-icon::after {
  background: linear-gradient(145deg, #9ef0c4, #3dd68c);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  border-radius: 0; inset: 8px;
}
.grade-perk--tag .grade-perk-icon {
  background: rgba(255,203,5,.12); border-color: rgba(255,203,5,.35);
}
.grade-perk--tag .grade-perk-icon::after {
  background: linear-gradient(145deg, #ffe566, #ffcb05);
  border-radius: 999px; inset: 10px 6px;
}

@media (max-width: 1100px) {
  .grades-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .shop-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .shop-grid, .grades-grid { grid-template-columns: 1fr; }
  .nav-balance { padding: 0 8px; font-size: 13px; }
  .grade-modal-top { flex-direction: column; align-items: center; text-align: center; }
  .grade-modal-top .coin-pill { display: inline-flex; }
}


/* Grades déjà inclus + offrir */
.shop-card.owned { opacity: .78; }
.shop-badge.owned {
  background: rgba(62,207,255,.18);
  border: 1px solid rgba(62,207,255,.4);
  color: #b8f0ff;
}
/* Hide ugly Chrome number spinners + avoid scroll trapping */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.section-note {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: #9aaabc;
}
.section-note a {
  color: #7fe7ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gift-panel {
  padding: 22px 22px 20px;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  border: 1px solid rgba(62, 207, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgba(62, 207, 255, 0.08), transparent 44%),
    var(--glass, rgba(8, 14, 26, 0.72));
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 16px 40px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
  display: grid;
  gap: 18px;
}
.gift-rule {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(62, 207, 255, 0.22);
  background: rgba(62, 207, 255, 0.08);
  color: #c9eef8;
  font-size: 13.5px;
  line-height: 1.45;
}
.gift-rule strong { color: #fff; font-weight: 700; }
.gift-form {
  display: grid;
  gap: 18px;
}
.gift-step { display: grid; gap: 10px; min-width: 0; }
.gift-step-label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8fa0b8;
}
.gift-step-n {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font-size: 12px;
  letter-spacing: 0;
  color: #041018;
  background: linear-gradient(180deg, #5ad8ff, #3ecfff);
  box-shadow: 0 0 0 1px rgba(62, 207, 255, 0.25);
}
.gift-kind-hint {
  margin: -2px 0 0;
  font-size: 12.5px;
  color: #8fa0b8;
  line-height: 1.4;
}
.gift-form .field { margin-bottom: 0; }
.gift-form .sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.gift-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
}
.gift-tab {
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 11px;
  padding: 11px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #c9d5e8;
  transition: background .15s, border-color .15s, color .15s;
}
.gift-tab:hover { color: #fff; background: rgba(255,255,255,.04); }
.gift-tab.on {
  color: #041018;
  border-color: rgba(122, 228, 255, .45);
  background: linear-gradient(180deg, #5ad8ff 0%, #3ecfff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.gift-kind-panel {
  display: grid;
  gap: 10px;
}
.gift-kind-panel[hidden] { display: none !important; }

/* Pack picker — one selection UI (cards), no duplicate select */
.gift-panel,
.gift-form,
.gift-step,
.gift-kind-panel,
.gift-combo,
.am-select {
  overflow: visible;
}
.gift-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  align-items: stretch;
}
.gift-pick-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  gap: 0;
  padding: 0;
  overflow: hidden; /* clip media to radius only */
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: #e8eef8;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(160deg, rgba(255, 203, 5, 0.07), rgba(8, 14, 26, 0.55));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.gift-pick-card:hover:not(:disabled) {
  border-color: rgba(62, 207, 255, 0.35);
  transform: translateY(-1px);
}
.gift-pick-card.on {
  border-color: rgba(62, 207, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(62, 207, 255, 0.2),
    0 10px 24px rgba(47, 125, 255, 0.16),
    inset 0 1px 0 rgba(255,255,255,.08);
  background:
    linear-gradient(160deg, rgba(62, 207, 255, 0.14), rgba(8, 14, 26, 0.62));
}
.gift-pick-card:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}
.gift-pick-media {
  display: grid;
  place-items: center;
  flex: none;
  aspect-ratio: 1.25 / 1;
  /* Clean coin art only — amounts live in cyan badge, not on glow */
  background:
    radial-gradient(ellipse 65% 55% at 50% 42%, rgba(255, 203, 5, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(26, 20, 0, 0.2) 0%, rgba(5, 11, 20, 0.88) 100%);
}
.gift-pick-card.on .gift-pick-media {
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(62, 207, 255, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(10, 30, 48, 0.35) 0%, rgba(5, 11, 20, 0.9) 100%);
}
.gift-pick-media img {
  width: 72%;
  height: 72%;
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.4));
  pointer-events: none;
}
.gift-pick-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 12px 14px 14px;
  min-width: 0;
}
.gift-pick-body strong {
  font-family: "Chakra Petch", var(--display, sans-serif);
  font-size: .95rem;
  letter-spacing: .02em;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.gift-pick-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin-top: auto;
  min-width: 0;
}
.gift-pick-meta .coin-pill {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
}
.gift-pick-meta .price {
  flex: none;
  font-weight: 700;
  color: #9ee9ff;
  font-size: .95rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.gift-combo { position: relative; }
.gift-target-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  transition: border-color .15s, box-shadow .15s;
}
.gift-target-row:focus-within {
  border-color: rgba(62, 207, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(62, 207, 255, 0.15);
}
.gift-target-head {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  image-rendering: pixelated;
  flex: none;
  object-fit: cover;
}
.gift-target-row input {
  flex: 1; min-width: 0;
  min-height: 36px;
  padding: 0 8px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff;
  font: inherit;
  font-weight: 600;
}
.gift-target-row input:focus { outline: none; }
.gift-balance-hint {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: #c9d5e8;
  font-size: 13px;
}
.gift-balance-hint strong { color: #fff; }
.gift-balance-sep { color: #6f8098; }

/* Custom dark offer picker (no native white Chrome select) */
.am-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.am-select { position: relative; width: 100%; z-index: 2; }
.am-select.open { z-index: 50; }
.am-select-trigger {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 36px 1fr 18px;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), transparent),
    rgba(0, 0, 0, 0.38);
  color: #e8eef8;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.am-select-trigger:hover:not(:disabled) {
  border-color: rgba(62, 207, 255, 0.4);
}
.am-select-trigger:focus-visible,
.am-select.open .am-select-trigger {
  outline: none;
  border-color: rgba(62, 207, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(62, 207, 255, 0.15);
}
.am-select-trigger:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.am-select-thumb {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
}
.am-select-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.am-select-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.am-select-text em {
  font-style: normal;
  font-size: 12px;
  color: #9ee9ff;
  font-weight: 600;
}
.am-select-caret {
  width: 10px; height: 10px;
  border-right: 2px solid #9aaabc;
  border-bottom: 2px solid #9aaabc;
  transform: rotate(45deg) translate(-2px, -2px);
  justify-self: end;
  transition: transform .15s;
}
.am-select.open .am-select-caret {
  transform: rotate(225deg) translate(-1px, -1px);
}
/* In-tree fallback (unused when JS portals to body) */
.am-select-menu {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(62, 207, 255, 0.35);
  background: rgba(6, 12, 22, 0.98);
  box-shadow: 0 18px 48px rgba(0,0,0,.55);
  scrollbar-width: thin;
}
/* Portaled to document.body — escapes gift-panel / shop-note stacking + overflow */
.am-select-menu.am-select-menu--portal {
  position: fixed;
  right: auto;
  z-index: 9999;
  margin: 0;
}
.am-select-option {
  width: 100%;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e8eef8;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.am-select-option:hover,
.am-select-option[aria-selected="true"] {
  background: rgba(62, 207, 255, 0.14);
}
.am-select-option img {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255,255,255,.04);
}
.am-select-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.am-select-option strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}
.am-select-option em {
  font-style: normal;
  font-size: 12px;
  color: #9ee9ff;
  font-weight: 600;
}
.gift-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  max-height: 260px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(62, 207, 255, 0.4);
  background: rgba(6, 12, 22, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  scrollbar-width: thin;
}
.gift-suggest.gift-suggest--portal {
  position: fixed;
  right: auto;
  z-index: 9999;
  margin: 0;
}
.gift-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #e8eef8;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.gift-suggest-item:last-child { border-bottom: 0; }
.gift-suggest-item:hover,
.gift-suggest-item.on {
  background: rgba(62, 207, 255, 0.14);
  color: #7fe7ff;
}
.gift-suggest-item img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  image-rendering: pixelated;
  flex: none;
}
.gift-actions {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}
.gift-actions .gift-submit,
.gift-actions .am-btn {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
}
.gift-actions .am-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  filter: none;
  pointer-events: none;
}
@media (max-width: 420px) {
  .gift-tabs { grid-template-columns: 1fr; }
  .gift-pick { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 340px) {
  .gift-pick { grid-template-columns: 1fr; }
}


/* ——— Traîner-Frontier scrollbars ——— */
html, body, .shop-grid, .grade-perks, .shop-modal-panel {
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #0a0f18;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #0a0f18; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #60a5fa, #3b82f6 45%, #2563eb);
  border-radius: 999px;
  border: 3px solid #0a0f18;
  min-height: 48px;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #93c5fd, #60a5fa 40%, #3b82f6);
  border: 3px solid #0a0f18;
  background-clip: padding-box;
}
