/* MYSTIC — Bundles page
   Everything that matters is in the first screen: the discounts (head), the packs and the picker (left)
   and the bundle with its price and checkout (right, sticky). Nothing to scroll for. */

/* ---------- compact head ---------- */
.bx-head { position: relative; isolation: isolate; padding-block: clamp(18px, 2.2vw, 28px) 4px; }
.bx-head::before { content: ''; position: absolute; inset: -120px 0 0; z-index: -1; pointer-events: none; background: radial-gradient(40% 90% at 85% 0%, rgba(229,36,63,.18), transparent 70%); }
.bx-head-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 22px 40px; }
.bx-title { margin: 12px 0 0; font: 600 clamp(30px, 3vw, 46px)/1.02 var(--font); letter-spacing: -.045em; }
.bx-title em { display: block; font-style: normal; color: #5f5856; }
.bx-lede { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 60ch; }

/* tier chips */
.bx-tiers { display: flex; gap: 10px; }
.bx-tier {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 12px; min-width: 172px;
  padding: 13px 16px 13px 14px; border-radius: 16px;
  background: linear-gradient(180deg, #171314, #110f10); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .4s, transform .4s var(--ease);
}
.bx-tier::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 140% at 0% 0%, rgba(229,36,63,.3), transparent 65%); opacity: 0; transition: opacity .5s; }
.bx-tier-p { font: 900 40px/.82 var(--display); letter-spacing: -.01em; color: #4d4644; transition: color .4s; white-space: nowrap; }
.bx-tier-t { display: grid; gap: 4px; }
.bx-tier-n { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.bx-tier-s { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.bx-tier-s .ico-sm { width: 12px; height: 12px; }
.bx-tier.is-next { box-shadow: inset 0 0 0 1px var(--red-line); }
.bx-tier.is-next .bx-tier-p { color: #8a7f7d; }
.bx-tier.is-next .bx-tier-s { color: var(--red-hi); }
.bx-tier.is-on { box-shadow: inset 0 0 0 1.5px var(--red), 0 18px 40px -26px rgba(229,36,63,.9); }
.bx-tier.is-on::after { opacity: 1; }
.bx-tier.is-on .bx-tier-p { color: var(--text); }
.bx-tier.is-on .bx-tier-n, .bx-tier.is-on .bx-tier-s { color: var(--red-hi); }
.bx-tier.is-cur .bx-tier-p { background: linear-gradient(180deg, #fff 20%, #ff8a99); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bx-tier.pop { animation: bx-pop .7s var(--ease-out); }
@keyframes bx-pop { 0% { transform: scale(1); } 30% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ---------- section ---------- */
.bx-sec { padding-block: 18px 120px; }
#build { scroll-margin-top: 90px; }
.bx-row-head { margin: 0 0 12px; }
.bx-packs + .bx-row-head { margin-top: 26px; }

/* ---------- packs (compact cards above the picker) ---------- */
.bx-packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bx-pack {
  position: relative; display: grid; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 18px;
  background: radial-gradient(80% 100% at 100% 0%, rgba(229,36,63,.12), transparent 70%), linear-gradient(180deg, #181415, #110f10);
  box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .3s, transform .3s var(--ease);
}
.bx-pack:hover { box-shadow: inset 0 0 0 1px var(--line-3), 0 24px 44px -30px rgba(229,36,63,.7); transform: translateY(-2px); }
.bx-pack.is-in { box-shadow: inset 0 0 0 1px rgba(98,227,160,.4); }
.bx-pack-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bx-pack-art { position: relative; width: 78px; height: 46px; flex: none; }
.bx-pack-art img {
  position: absolute; top: 0; left: calc(var(--k) * 14px); width: 50px; height: 46px; object-fit: cover; border-radius: 9px;
  border: 1.5px solid rgba(255,255,255,.75); box-shadow: 0 8px 16px -6px #000;
  z-index: calc(5 - var(--k)); transform: rotate(calc((var(--k) - 1) * 6deg)); transition: transform .4s var(--ease);
}
.bx-pack:hover .bx-pack-art img { transform: rotate(calc((var(--k) - 1) * 9deg)) translateX(calc((var(--k) - 1) * 3px)); }
.bx-pack-name { min-width: 0; display: grid; gap: 4px; }
.bx-pack-name b { font: 900 19px/.95 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.bx-pack-name small { font-size: 12.5px; color: var(--dim); }
.bx-pack-name em { font-style: normal; font-weight: 700; color: var(--red-hi); }
.bx-pack-list { margin: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bx-pack-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bx-pack-price { display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.bx-pack-price s { font-size: 12px; color: var(--dim); }
.bx-pack-price b { font: 900 26px/.9 var(--display); }
.bx-pack-add {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 10px; flex: none;
  background: linear-gradient(180deg, #f0304b, var(--red)); color: #fff; font-size: 13.5px; font-weight: 700;
  box-shadow: 0 10px 22px -10px rgba(229,36,63,.9), inset 0 1px 0 rgba(255,255,255,.22); transition: transform .25s var(--ease), background-color .2s;
}
.bx-pack-add:hover { transform: translateY(-1px); background: linear-gradient(180deg, #ff4a62, var(--red-hi)); }
.bx-pack-add.is-in { background: rgba(98,227,160,.1); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(98,227,160,.35); }
/* ---------- builder ---------- */
.bx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.bx-pick { min-width: 0; }
.bx-pick .tabs { margin-bottom: 18px; }
.bx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bx-item {
  position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 8px 14px 8px 8px; border-radius: 18px; background: #131011; box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .3s, background-color .3s, transform .3s var(--ease);
}
.bx-item:hover { box-shadow: inset 0 0 0 1px var(--line-3); transform: translateY(-2px); }
.bx-item.is-in { background: linear-gradient(105deg, rgba(229,36,63,.16), #131011 60%); box-shadow: inset 0 0 0 1.5px var(--red), 0 18px 40px -26px rgba(229,36,63,.9); }
.bx-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; cursor: pointer; }
.bx-hit:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 2px; }
.bx-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #000; }
.bx-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter .3s; }
.bx-item:not(.is-in) .bx-thumb img { filter: saturate(.75) brightness(.85); }
.bx-tick { position: absolute; left: 6px; top: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: rgba(10,9,9,.75); border: 1px solid rgba(255,255,255,.25); color: #fff; transition: background-color .25s, transform .3s var(--ease); }
.bx-tick .ico-sm { width: 13px; height: 13px; }
.bx-item.is-in .bx-tick { background: var(--red); border-color: var(--red); transform: scale(1.08); }
.bx-info { min-width: 0; display: grid; gap: 4px; }
.bx-info b { font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bx-info small { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bx-price { display: grid; justify-items: end; gap: 3px; font-variant-numeric: tabular-nums; text-align: right; }
.bx-price b { font: 900 26px/.9 var(--display); }
.bx-price s { font-size: 12.5px; color: var(--dim); }
.bx-price small { font-size: 11.5px; color: var(--red-hi); font-weight: 600; white-space: nowrap; }
.bx-item.is-in .bx-price b { color: var(--text); }
.bx-more { position: absolute; z-index: 2; right: 5px; bottom: 5px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(10,9,9,.75); color: #fff; opacity: 0; transition: opacity .2s, color .2s, background-color .2s; }
.bx-item:hover .bx-more, .bx-more:focus-visible { opacity: 1; }
.bx-more:hover { background: var(--red); }

/* ---------- bundle panel ---------- */
.bx-panel {
  position: sticky; top: 96px; display: grid; gap: 14px; padding: 20px 22px; border-radius: 24px;
  background: radial-gradient(90% 60% at 100% 0%, rgba(229,36,63,.16), transparent 70%), linear-gradient(180deg, #181415, #110f10);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 60px -40px #000;
}
.bx-p-head { display: flex; align-items: baseline; justify-content: space-between; }
.bx-p-head h3 { margin: 0; font: 900 32px/.9 var(--display); text-transform: uppercase; }
.bx-p-count { font-size: 13px; font-weight: 700; color: var(--red-hi); letter-spacing: .06em; text-transform: uppercase; }
.bx-panel .meter-msg { margin: 0; }

/* slots: inventory-style boxes that fill with the scripts you pick */
.bx-slots { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; padding-bottom: 18px; }
.bx-slot { position: relative; aspect-ratio: 1; border-radius: 9px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--line-2); }
.bx-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; animation: bx-in .45s var(--ease-out); }
.bx-slot.on { box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.bx-slot.mark { box-shadow: inset 0 0 0 1px var(--red-line); }
.bx-slot.mark.hit { box-shadow: 0 0 0 2px var(--red), 0 0 18px rgba(229,36,63,.6); }
.bx-slot i { position: absolute; left: 50%; top: calc(100% + 5px); translate: -50% 0; font: 700 11px/1 var(--font); font-style: normal; color: var(--dim); white-space: nowrap; }
.bx-slot.hit i { color: var(--red-hi); }
.bx-slot em { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: rgba(10,9,9,.7); font: 800 13px var(--font); font-style: normal; z-index: 1; }
@keyframes bx-in { from { opacity: 0; transform: scale(.6); } }

.bx-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: clamp(96px, calc(100vh - 790px), 300px); overflow: auto; overscroll-behavior: contain; }
.bx-lines li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 28px; align-items: center; gap: 10px; font-size: 14px; }
.bx-lines img { width: 56px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.bx-lines span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bx-lines small { display: block; font-size: 11.5px; color: var(--dim); font-weight: 500; }
.bx-lines b { font-variant-numeric: tabular-nums; font-weight: 700; }
.bx-lines button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--dim); transition: color .2s, background-color .2s; }
.bx-lines button:hover { color: var(--text); background: rgba(255,255,255,.08); }
.bx-empty { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; line-height: 1.5; }
.bx-empty .ico { flex: none; width: 26px; height: 26px; color: var(--red-hi); }
.bx-sum { display: grid; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: 14.5px; }
.bx-sum > div { display: flex; justify-content: space-between; color: var(--muted); font-variant-numeric: tabular-nums; }
.bx-sum s { color: var(--dim); }
.bx-sum .save { color: var(--red-hi); font-weight: 600; }
.bx-pay { align-items: baseline; color: var(--text) !important; font-weight: 700; padding-top: 4px; }
.bx-pay b { font: 900 46px/.85 var(--display); font-variant-numeric: tabular-nums; }
.bx-note { margin: -4px 0 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--dim); text-align: center; }

/* ---------- phone tray ---------- */
.bx-tray { display: none; }
@media (max-width: 1240px) {
  .bx-head-in { grid-template-columns: 1fr; }
  .bx-tier { flex: 1; min-width: 0; }
}
@media (max-width: 1080px) {
  .bx-layout { grid-template-columns: minmax(0, 1fr); }
  .bx-panel { display: none; }
  .bx-tray {
    position: fixed; z-index: 60; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px;
    padding: 10px 10px 10px 14px; border-radius: 20px; background: rgba(18,15,16,.97); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 50px -10px rgba(0,0,0,.9);
    transform: translateY(140%); transition: transform .5s var(--ease-out);
  }
  .bx-tray.on { transform: none; }
  .bx-tray-l { flex: 1; min-width: 0; display: grid; gap: 6px; text-align: left; }
  .bx-slots-sm { grid-template-columns: repeat(8, 11px); gap: 3px; padding: 0; }
  .bx-slots-sm .bx-slot { border-radius: 4px; }
  .bx-slots-sm .bx-slot i { display: none; }
  .bx-tray-msg { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bx-tray-msg b { color: var(--red-hi); }
  .bx-tray-r { display: flex; align-items: center; gap: 10px; flex: none; }
  .bx-tray-p { display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
  .bx-tray-p s { font-size: 12px; color: var(--dim); }
  .bx-tray-p b { font: 900 26px/.9 var(--display); }
  .bx-sec { padding-bottom: 140px; }
  /* packs slide sideways instead of stacking, so the picker stays close to the top */
  .bx-packs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(280px, 42%); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gut) * -1); padding: 2px var(--gut) 6px; scroll-padding-inline: var(--gut); }
  .bx-packs::-webkit-scrollbar { display: none; }
  .bx-pack { scroll-snap-align: start; }
}
@media (max-width: 860px) {
  .bx-grid { grid-template-columns: 1fr; }
  .bx-packs { grid-auto-columns: 82%; }
}
@media (max-width: 680px) {
  .bx-head { padding-top: 20px; }
  .bx-title { font-size: 30px; }
  .bx-lede { display: none; }
  .bx-tiers { gap: 8px; }
  .bx-tier { flex-direction: column; align-items: flex-start; gap: 6px; padding: 11px 12px; border-radius: 14px; }
  .bx-tier-p { font-size: clamp(26px, 8vw, 34px); }
  .bx-tier-n { font-size: 10.5px; letter-spacing: .08em; }
  .bx-tier-s { font-size: 11.5px; }
  .bx-sec { padding-top: 16px; }
  .bx-packs + .bx-row-head { margin-top: 20px; }
  .bx-pick .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); }
  .bx-pick .tabs::-webkit-scrollbar { display: none; }
  .bx-pick .tab { flex: none; }
  .bx-item { grid-template-columns: 92px minmax(0, 1fr) auto; gap: 11px; }
  .bx-price b { font-size: 22px; }
  .bx-price small { display: none; }
}
/* short laptop screens: drop the small print so checkout stays in the first screen */
@media (min-width: 1081px) and (max-height: 860px) { .bx-lede, .bx-note { display: none; } .bx-panel { gap: 12px; } }
@media (hover: none) { .bx-more { opacity: 1; } .bx-item:hover, .bx-pack:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { .bx-tier.pop, .bx-slot img { animation: none; } }