/* ============================================================
   FX: border beam, shimmer button, dock, purchase celebration,
   bundle saving, creator codes, try-on, coin shop.
   Everything switches off for people who ask their device for reduced motion.
   ============================================================ */

/* ---------- border beam (one light running round the card you want picked) ---------- */
@property --l10-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.l10-beam { position: relative; }
.l10-beam::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from var(--l10-a), transparent 0 62%, var(--beam, #ffc83d) 84%, #fff 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: l10-beam 4.2s linear infinite;
  pointer-events: none;
}
@keyframes l10-beam { to { --l10-a: 360deg; } }

/* ---------- shimmer: a soft shine sweeps over the button every few seconds ---------- */
.l10-shimmer { position: relative; overflow: hidden; isolation: isolate; }
.l10-shimmer::after {
  content: "";
  position: absolute;
  inset: -20% auto -20% -60%;
  width: 45%;
  z-index: 1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  animation: l10-shimmer 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes l10-shimmer { 0%, 55% { left: -60%; } 100% { left: 130%; } }

/* ---------- dock: category slots swell near the cursor (set by fx.js) ---------- */
@media (hover: hover) and (pointer: fine) {
  .l10-hotbar__list.is-dock { padding-top: 10px; padding-bottom: 10px; }
  .l10-hotbar__item { transition: scale 0.14s ease-out; scale: var(--dk, 1); transform-origin: center; }
}

/* ---------- purchase celebration ---------- */
.l10-win {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 4, 6, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s;
}
.l10-win.is-on { opacity: 1; }
.l10-win__box {
  position: relative;
  max-width: 380px;
  padding: 34px 30px 28px;
  text-align: center;
  border-radius: 22px;
  background: var(--wine-850, #221015);
  box-shadow: var(--bevel), 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  transform: translateY(14px) scale(0.96);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.l10-win.is-on .l10-win__box { transform: none; }
.l10-win__check { width: 84px; height: 84px; margin: 0 auto 14px; display: block; }
.l10-win__check circle { fill: rgba(47, 181, 116, 0.16); stroke: #2fb574; stroke-width: 3; stroke-dasharray: 189; stroke-dashoffset: 189; }
.l10-win__check path { fill: none; stroke: #8fe3b4; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }
.l10-win.is-on .l10-win__check circle { animation: l10-draw 0.6s 0.1s ease-out forwards; }
.l10-win.is-on .l10-win__check path { animation: l10-draw 0.45s 0.6s ease-out forwards; }
@keyframes l10-draw { to { stroke-dashoffset: 0; } }
.l10-win h2 { margin: 0 0 6px; font-size: 1.5rem; letter-spacing: -0.02em; }
.l10-win p { margin: 0 0 20px; color: var(--bone-dim, #c4b5ad); }
.l10-win canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- bundle saving ---------- */
.l10-bundle {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin: 0 0 18px; padding: 14px 18px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 200, 61, 0.14), rgba(232, 36, 63, 0.1));
  box-shadow: var(--bevel);
}
.l10-bundle__was { position: relative; color: var(--bone-mute, #8f7f7a); font-weight: 700; }
.l10-bundle__was::after { content: ""; position: absolute; left: -3px; right: -3px; top: 52%; height: 2px; background: var(--heart-hi, #ff4a62); transform: scaleX(0); transform-origin: left; transition: transform 0.5s 0.3s ease-out; }
.l10-bundle.is-in .l10-bundle__was::after { transform: scaleX(1); }
.l10-bundle__now { font-size: 1.5rem; font-weight: 800; }
.l10-bundle__save { padding: 4px 10px; border-radius: 999px; background: #ffc83d; color: #2b1a00; font-weight: 800; font-size: 13px; opacity: 0; transform: scale(0.6); transition: opacity 0.3s 0.6s, transform 0.45s 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.l10-bundle.is-in .l10-bundle__save { opacity: 1; transform: none; }

/* ---------- coin shop ---------- */
.cs { display: grid; gap: 22px; }
.cs__main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
.cs__panel { padding: 24px; border-radius: 20px; background: var(--wine-850, #221015); box-shadow: var(--bevel); display: flex; flex-direction: column; gap: 16px; }
.cs__big { display: flex; align-items: center; gap: 14px; }
.cs__big i { font-size: 54px; }
.cs__num { font: 800 clamp(2.4rem, 6vw, 3.6rem)/1 'Silkscreen', 'Inter', sans-serif; color: #ffc83d; font-variant-numeric: tabular-nums; }
.cs__unit { color: var(--bone-dim, #c4b5ad); font-weight: 700; }
.cs__bonus { align-self: flex-start; padding: 4px 11px; border-radius: 999px; background: #2fb574; color: #04210f; font-weight: 800; font-size: 13px; transition: opacity 0.2s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.cs__bonus[hidden] { display: none; }
.cs__bonus.pop { transform: scale(1.18); }
.cs__range { width: 100%; accent-color: #ffc83d; height: 32px; }
.cs__ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--bone-mute, #8f7f7a); margin-top: -8px; }
.cs__price { font-size: 1.7rem; font-weight: 800; }
.cs__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.cs__tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 14px; border-radius: 16px; border: 0; text-align: left; cursor: pointer; color: var(--bone, #f2e9e2); background: var(--wine-800, #2c161c); box-shadow: var(--bevel); font: inherit; transition: translate 0.15s, background 0.15s; }
.cs__tile:hover { translate: 0 -3px; }
.cs__tile.is-on { background: var(--wine-700, #3b1e26); box-shadow: inset 0 0 0 2px #ffc83d; }
.cs__tile i { font-size: 30px; margin-bottom: 4px; }
.cs__tile b { font-size: 1.05rem; }
.cs__tile small { color: var(--bone-mute, #8f7f7a); }
.cs__flag { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: #ffc83d; color: #2b1a00; font-size: 11px; font-weight: 800; }
@media (max-width: 760px) { .cs__main { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .l10-beam::before, .l10-shimmer::after { animation: none; }
  .l10-shimmer::after { display: none; }
  .l10-win, .l10-win__box, .l10-bundle__save, .l10-bundle__was::after { transition: none; }
  .l10-win__check circle, .l10-win__check path { stroke-dashoffset: 0; animation: none !important; }
  .l10-hotbar__item { scale: 1 !important; }
}

/* ---------- tags: SALE / LIMITED / BEST VALUE / POPULAR / NEW (cards, rank columns, coin packs) ---------- */
.package-tag, .rg-ribbon, .cs__flag {
  --t1: #ffc83d; --t2: #e8920f; --tx: #2b1a00;
  gap: 5px;
  border: 0;
  background: linear-gradient(180deg, var(--t1), var(--t2));
  color: var(--tx);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 6px 14px -6px var(--t2), 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.package-tag i, .rg-ribbon i { font-size: 13px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35)); }
.rg-ribbon { display: inline-flex; align-items: center; }
.rg-ribbon i { font-size: 11px; }
.package-tag--sale, .rg-ribbon[data-t="sale"] { --t1: #ff5a72; --t2: #c4152f; --tx: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.package-tag--limited, .rg-ribbon[data-t="limited"] { --t1: #ff9a3d; --t2: #d9480f; --tx: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.package-tag--best-value, .rg-ribbon[data-t="best"], .cs__flag { --t1: #ffd95a; --t2: #e8920f; --tx: #2b1a00; }
.package-tag--popular, .rg-ribbon[data-t="popular"] { --t1: #ff6fa5; --t2: #b4237a; --tx: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.package-tag--new, .rg-ribbon[data-t="new"] { --t1: #4be39a; --t2: #12905a; --tx: #04210f; }
.rg-feat .rg-ribbon { background: linear-gradient(180deg, var(--t1), var(--t2)); color: var(--tx); }
.package-tag--limited i, .rg-ribbon[data-t="limited"] i { animation: l10-tilt 2.4s ease-in-out infinite; }
@keyframes l10-tilt { 0%, 70%, 100% { rotate: 0deg; } 80% { rotate: -14deg; } 90% { rotate: 12deg; } }
.rg-disc { background: linear-gradient(180deg, #ff5a72, #c4152f); color: #fff; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 12px -6px #c4152f, 0 0 0 1px rgba(0, 0, 0, 0.35); }
.cs__flag { display: inline-flex; align-items: center; }
@media (prefers-reduced-motion: reduce) { .package-tag--limited i, .rg-ribbon[data-t="limited"] i { animation: none; } }
/* the rank table sets its own ribbon colours later in the page, so these need a stronger selector */
.rg-pack .rg-ribbon[data-t] { background: linear-gradient(180deg, var(--t1), var(--t2)); color: var(--tx); font-weight: 800; letter-spacing: 0.09em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 6px 14px -6px var(--t2), 0 0 0 1px rgba(0, 0, 0, 0.35); }
.rg-pack .rg-ribbon[data-t="sale"], .rg-pack .rg-ribbon[data-t="limited"], .rg-pack .rg-ribbon[data-t="popular"] { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }

/* ---------- cart drawer ---------- */
.basket .basket-header { align-items: center; padding: 22px 64px 18px 22px; background: linear-gradient(180deg, var(--wine-850), var(--wine-900)); }
.l10-bk-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.l10-bk-head { width: 46px; height: 46px; border-radius: 12px; image-rendering: pixelated; background: var(--wine-800); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08); flex: none; }
.l10-bk-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.l10-bk-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lantern, #ffa23d); }
.l10-bk-name { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l10-bk-out { font-size: 14px; color: var(--bone-mute); }
.l10-bk-out:hover { color: var(--heart-hi); }
.l10-bk-count { flex: none; padding: 5px 11px; border-radius: 999px; background: var(--wine-700); font-size: 12.5px; font-weight: 700; color: var(--bone-dim); }
.basket .basket-items { padding: 10px 16px; gap: 10px; }
.basket .basket-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; padding: 12px; border-radius: 16px; border: 0; background: var(--wine-850); box-shadow: var(--bevel); }
.l10-bk-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--wine-950); box-shadow: var(--bevel-in); font-size: 28px; }
.basket .basket-item .info { margin: 0; }
.basket .basket-item .title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 800; }
.basket .basket-item .title:hover { color: var(--heart-hi); }
.basket .basket-item .options { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.l10-bk-opt { padding: 2px 8px; border-radius: 999px; background: var(--wine-700); font-size: 11.5px; color: var(--bone-dim); }
.basket .basket-item .quantity-field { height: 36px; }
.basket .basket-item .quantity-field .adjust { width: 30px; }
.basket .basket-item .remove { width: 32px; min-height: 32px; height: 32px; }
.basket .basket-empty { display: grid; justify-items: center; gap: 10px; }
.basket .basket-empty i { font-size: 56px; opacity: 0.55; }
.basket .basket-checkout { padding: 16px 20px 24px; background: linear-gradient(180deg, var(--wine-900), var(--wine-950)); }
.basket .basket-checkout .l10-couponnote { margin: 0 0 16px; font-size: 13px; }
.basket .basket-checkout .l10-couponnote i { flex: none; width: 32px; height: 32px; font-size: 32px; vertical-align: 0; }
.basket .basket-checkout h3 { align-items: center; margin-bottom: 14px; }
.basket .basket-checkout .total strong, .basket .basket-checkout .total { font-size: 1.9rem; font-weight: 800; color: var(--bone); letter-spacing: -0.02em; }
.basket .basket-checkout .checkout { gap: 10px; background: linear-gradient(180deg, #4be39a, #12905a); color: #04210f; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 12px 24px -12px #12905a; }
.basket .basket-checkout .checkout:hover { background: linear-gradient(180deg, #6cf0b0, #17a56a); }
.basket .basket-checkout .checkout:disabled { opacity: 0.45; filter: grayscale(0.6); cursor: not-allowed; }
@media (max-width: 480px) {
  .basket .basket-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .basket .basket-item .remove { grid-column: 3; grid-row: 1; justify-self: end; }
  .basket .basket-item .quantity-field { grid-column: 2 / 4; grid-row: 2; justify-self: start; }
  .l10-bk-ico { width: 44px; height: 44px; grid-row: 1 / 3; }
}

/* ---------- bigger cart button on desktop ---------- */
@media (min-width: 900px) {
  .l10-cart .basket-button { min-width: 68px; min-height: 62px; padding: 0 20px; font-size: 30px; border-radius: 18px; }
  .l10-cart .basket-button-amount { top: -9px; right: -9px; min-width: 26px; height: 26px; font-size: 13px; line-height: 26px; }
}

/* ---------- tags, clean version: crisp at normal size and at any zoom (no tiny icons, flatter) ---------- */
.package-tag i, .rg-ribbon i { display: none; }
.package-tag, .rg-ribbon, .cs__flag {
  gap: 0;
  padding: 3px 9px;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.rg-pack .rg-ribbon[data-t] { padding: 3px 9px; font-size: 10px; letter-spacing: 0.08em; text-shadow: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.45); }
.rg-disc { padding: 2px 7px; font-size: 10.5px; line-height: 1.5; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.45); }
@media (max-width: 700px) { .rg-pack .rg-ribbon[data-t] { padding: 2px 6px; font-size: 8.5px; letter-spacing: 0.05em; } }

/* ---------- gift pop-up ---------- */
.l10-gift-sub { margin: 0 0 4px; color: var(--bone-dim, #c4b5ad); font-size: 15px; line-height: 1.45; }
.gift-form-popup .popup-content .btn-primary { gap: 8px; }

/* "Choose a gift" scrolls up to the category tiles and gives them a short nudge */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
#l10-cats { scroll-margin-top: calc(var(--hotbar-h, 0px) + 18px); }
#l10-cats:target .l10-tile { animation: l10-nudge 0.7s ease-out both; }
#l10-cats:target .l10-tile:nth-child(2) { animation-delay: 0.06s; }
#l10-cats:target .l10-tile:nth-child(3) { animation-delay: 0.12s; }
#l10-cats:target .l10-tile:nth-child(4) { animation-delay: 0.18s; }
#l10-cats:target .l10-tile:nth-child(n+5) { animation-delay: 0.24s; }
@keyframes l10-nudge { 0% { translate: 0 0; } 35% { translate: 0 -8px; } 100% { translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { #l10-cats:target .l10-tile { animation: none; } }

/* ---------- options pop-up (gift card e-mail, other variables) ---------- */
.store-product-options .l10-opt-badge { display: block; width: 76px; height: 76px; margin: 0 0 14px; border-radius: 20px; background: var(--px-gift) center / 64px 64px no-repeat, radial-gradient(70% 70% at 50% 55%, rgba(255, 162, 61, 0.35), transparent 80%), var(--wine-950); box-shadow: var(--bevel-in); image-rendering: pixelated; }
.store-product-options .l10-opt-sub { margin: 10px 0 22px; color: var(--bone-dim, #c4b5ad); font-size: 15px; line-height: 1.5; }
.store-product-options .field-email label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bone-dim, #c4b5ad); }
.store-product-options .field-email input { min-height: 52px; font-size: 16px; font-weight: 600; }
.store-product-options .l10-opt-note { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 200, 61, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 200, 61, 0.22); color: var(--bone-dim, #c4b5ad); font-size: 13.5px; line-height: 1.45; }
.store-product-options .l10-opt-note i { flex: none; margin-top: 2px; font-size: 16px; color: #ffc83d; }

.store-product-options .l10-opt-badge + .product-title { margin: 0; line-height: 1.2; }