/* ---------------------------------------------------------------------------
   THE LOCKER

   Rarity is carried on one `--c` custom property per card. Every tier is the
   same object lit a different colour: the light comes up from under the item,
   the rarity rule runs along the foot, and the two top tiers get motion (a
   holographic sweep for Scorched, a running border for GRAND IRON) so the
   ladder is readable from across the room.
--------------------------------------------------------------------------- */
@keyframes lkIn { from { opacity: 0; } }
@keyframes lkRise { from { opacity: 0; transform: translateY(14px); } }
@keyframes lkSweep { 0% { transform: translateX(-120%) skewX(-18deg); } 60%, 100% { transform: translateX(260%) skewX(-18deg); } }
@keyframes lkSpin { to { --ang: 360deg; } }
@keyframes lkFloat { 50% { transform: translateY(-7px); } }
@keyframes lkTrace { from { transform: translateX(-60%); opacity: 0; } 20% { opacity: 1; } to { transform: translateX(160%); opacity: 0; } }
@keyframes lkHue { to { filter: hue-rotate(360deg); } }
@keyframes lkPulse { 50% { opacity: .55; } }
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* A pat of butter, drawn: the currency icon. */
.ico-batter {
  display: inline-block;
  width: 1.05em; height: .72em;
  vertical-align: -.06em;
  margin-right: .32em;
  border-radius: 3px;
  background: linear-gradient(160deg, #fff4bf 0%, #ffd766 45%, #e3a93a 100%);
  box-shadow: inset 0 -2px 0 rgba(150, 90, 20, .45), 0 0 0 1px rgba(90, 55, 10, .35);
  transform: skewX(-8deg);
}

#locker {
  --sel: var(--amber);
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2.4vh, 28px);
  background:
    radial-gradient(90% 70% at 22% 40%, color-mix(in srgb, var(--sel) 14%, transparent), transparent 70%),
    radial-gradient(120% 90% at 50% 0%, rgba(255, 106, 31, .10), transparent 60%),
    rgba(7, 5, 8, .95);
  backdrop-filter: blur(6px);
  animation: lkIn .2s ease-out;
  font-family: var(--sans);
  color: var(--text);
  transition: background .6s ease;
}

.lk-inner {
  width: min(1320px, 100%);
  height: min(860px, 100%);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: linear-gradient(180deg, rgba(24, 19, 26, .96), rgba(12, 9, 14, .98));
  border: 1px solid rgba(255, 232, 200, .10);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
}

/* --- head ---------------------------------------------------------------- */
.lk-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px 14px;
}
.lk-kicker {
  margin: 0 0 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amber);
}
.lk-title h2 { margin: 0; font-family: var(--display); font-size: 30px; line-height: 1; letter-spacing: .02em; color: #fff4e2; }
.lk-wallet { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lk-batter {
  display: inline-flex; align-items: baseline;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 209, 102, .09);
  border: 1px solid rgba(255, 209, 102, .28);
  font-family: var(--mono);
}
.lk-batter b { font-size: 17px; color: var(--gold); }
.lk-batter em { margin-left: 6px; font-style: normal; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.lk-crateRow { display: flex; gap: 6px; }
.lk-crate {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 10px 2px 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 12%, rgba(0, 0, 0, .4));
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  font-family: var(--mono); font-weight: 700; font-size: 14px;
}
.lk-crate img { width: 40px; height: 31px; object-fit: contain; }
.lk-crate.none { opacity: .38; filter: grayscale(.6); }
#lk-close {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 232, 200, .14);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  cursor: pointer;
  transition: background .15s, transform .15s;
}
#lk-close:hover { background: rgba(255, 255, 255, .09); transform: rotate(90deg); }
#lk-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; }

/* --- tabs ------------------------------------------------------------------- */
.lk-tabs {
  display: flex; align-items: center; gap: 6px;
  padding: 0 22px 12px;
  border-bottom: 1px solid rgba(255, 232, 200, .08);
}
.lk-tabs button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  font-family: var(--mono); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.lk-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.lk-tabs button.on { color: #1a1206; background: var(--amber); }
.lk-tabs button em {
  font-style: normal; font-size: 10.5px; letter-spacing: .04em;
  padding: 1px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: inherit;
}
.lk-tabs button em:empty { display: none; }
.lk-tabs button.on em { background: rgba(0, 0, 0, .16); }
.lk-tabs button[data-tab="crates"] em { background: var(--red); color: #fff; }
.lk-count { margin-left: auto; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--dim); }

/* --- body ----------------------------------------------------------------- */
.lk-body {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  min-height: 0;
}
.lk-preview {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px;
  border-right: 1px solid rgba(255, 232, 200, .08);
  min-height: 0;
}
#locker[data-tab="crates"] .lk-preview { display: none; }
#locker[data-tab="crates"] .lk-body { grid-template-columns: minmax(0, 1fr); }
.lk-canvaswrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 200px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 62%, color-mix(in srgb, var(--sel) 30%, transparent), transparent 72%),
    linear-gradient(180deg, #1c1720, #0c0a0e);
  border: 1px solid color-mix(in srgb, var(--sel) 30%, rgba(255, 255, 255, .06));
}
.lk-canvaswrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lk-prev-rar {
  position: absolute; left: 12px; top: 12px;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, rgba(0, 0, 0, .5));
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.lk-prev-rar:empty { display: none; }
.lk-gunpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lk-gunpick button {
  height: 40px; padding: 2px;
  border-radius: 9px;
  border: 1px solid rgba(255, 232, 200, .10);
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.lk-gunpick button img { width: 100%; height: 100%; object-fit: contain; opacity: .85; filter: brightness(1.5); }
.lk-gunpick button:hover img, .lk-gunpick button.on img { opacity: 1; }
.lk-gunpick button.on { border-color: var(--amber); background: rgba(255, 176, 58, .12); }
.lk-sel { min-height: 0; }
.lk-selrarity { margin: 0; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.lk-selname { margin: 4px 0 4px; font-family: var(--display); font-size: 22px; line-height: 1.05; color: #fff4e2; }
.lk-selblurb { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--dim); }

.lk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 232, 200, .16);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer;
  transition: transform .12s ease, background .15s, box-shadow .2s, filter .15s;
}
.lk-btn svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lk-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .10); transform: translateY(-1px); }
.lk-btn:active:not(:disabled) { transform: translateY(1px); }
.lk-btn.go {
  border-color: transparent;
  color: #1a0f04;
  background: linear-gradient(180deg, #ffc15a, #ff8a1f);
  box-shadow: 0 6px 22px rgba(255, 138, 31, .32), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.lk-btn.go:hover:not(:disabled) { filter: brightness(1.08); background: linear-gradient(180deg, #ffcb70, #ff9430); box-shadow: 0 8px 30px rgba(255, 138, 31, .5), inset 0 1px 0 rgba(255, 255, 255, .45); }
.lk-btn.ghost { background: transparent; }
.lk-btn:disabled { cursor: default; opacity: .42; box-shadow: none; }
.lk-btn span { font-weight: 500; opacity: .75; }
#lk-equip { width: 100%; }

/* --- grid ---------------------------------------------------------------- */
.lk-grid {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 232, 200, .2) transparent;
}
.lk-grid.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  align-content: start;
  gap: 12px;
}
.lk-grid.items.k-outfit { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* THE CARD */
.lk-card {
  position: relative;
  display: block;
  border-radius: 14px;
  /* clip, not hidden: a scroll container loses its automatic minimum size and
     the grid squeezed every card until the name fell off the bottom */
  overflow: clip;
  cursor: pointer;
  isolation: isolate;
  background:
    radial-gradient(120% 80% at 50% 100%, color-mix(in srgb, var(--c) 34%, transparent), transparent 70%),
    linear-gradient(180deg, #221c26, #120e15);
  border: 1px solid color-mix(in srgb, var(--c) 32%, rgba(255, 255, 255, .05));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .16s ease, border-color .16s, box-shadow .2s;
  animation: lkRise .32s ease-out backwards;
}
.lk-card::after {                               /* the rarity rule along the foot */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--c);
  box-shadow: 0 0 14px var(--c);
}
.lk-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 26px color-mix(in srgb, var(--c) 22%, transparent); }
.lk-card:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.lk-card.sel { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 14px 34px rgba(0, 0, 0, .45), 0 0 30px color-mix(in srgb, var(--c) 30%, transparent); }
.lk-art {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 2 / 1;
  padding: 10px 10px 0;
}
.k-outfit .lk-art { aspect-ratio: 3 / 4; padding: 10px 6px 0; }
.lk-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55)); transition: transform .25s ease; }
.lk-card:hover .lk-art img { transform: scale(1.05); }
.lk-meta { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 13px; }
.lk-art, .lk-meta { flex: none; }
.lk-rar { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--c); }
.lk-meta b { font-size: 14px; font-weight: 600; line-height: 1.2; color: #fff4e2; }
.lk-meta em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--gold); }
.lk-state {
  position: absolute; top: 9px; right: 9px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.lk-state svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lk-state.on { background: var(--green); color: #07281a; }
.lk-state.new { background: var(--red); color: #fff; box-shadow: 0 0 12px rgba(255, 63, 52, .6); }
.lk-state.lock { padding: 5px; background: rgba(0, 0, 0, .55); color: rgba(255, 255, 255, .7); }

/* locked: you can see what it is, lit dimly, behind glass */
.lk-card.locked .lk-art img { filter: grayscale(.55) brightness(.45) drop-shadow(0 8px 12px rgba(0, 0, 0, .55)); }
.lk-card.locked .lk-tracer { opacity: .35; filter: grayscale(.5); }
.lk-card.locked .lk-meta b { color: rgba(255, 244, 226, .6); }
.lk-card.locked:hover .lk-art img { filter: grayscale(.2) brightness(.8) drop-shadow(0 8px 12px rgba(0, 0, 0, .55)); }

/* Scorched: a holographic sweep across the art */
.lk-card.r-legendary::before, .lk-card.r-mythic::before {
  content: ''; position: absolute; top: -10%; bottom: -10%; left: 0; width: 45%; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), color-mix(in srgb, var(--c) 30%, transparent), transparent);
  mix-blend-mode: screen;
  animation: lkSweep 3.8s ease-in-out infinite;
}
.lk-card.r-mythic::before { animation-duration: 2.6s; }
/* GRAND IRON: a running border */
.lk-card.r-mythic {
  border-color: transparent;
  background:
    radial-gradient(120% 80% at 50% 100%, color-mix(in srgb, var(--c) 40%, transparent), transparent 70%) padding-box,
    linear-gradient(180deg, #221c26, #120e15) padding-box,
    conic-gradient(from var(--ang), var(--c), #ffb03a, #fff2dc, var(--c), #7a1030, var(--c)) border-box;
  animation: lkRise .32s ease-out backwards, lkSpin 4s linear infinite;
}
.lk-card.locked::before { opacity: .35; }

/* tracer art: three rounds crossing the frame */
.lk-tracer { overflow: hidden; }
.lk-tracer i {
  position: absolute; left: 0; height: calc(3px * var(--tw)); width: 58%;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--tc) 70%, #fff);
  box-shadow: 0 0 calc(10px * var(--tw)) var(--tc), 0 0 calc(22px * var(--tw)) color-mix(in srgb, var(--tc) 50%, transparent);
  animation: lkTrace 1.5s cubic-bezier(.3, .1, .3, 1) infinite;
}
.lk-tracer i:nth-child(1) { top: 32%; }
.lk-tracer i:nth-child(2) { top: 52%; animation-delay: .5s; }
.lk-tracer i:nth-child(3) { top: 72%; animation-delay: 1s; }
.lk-tracer[style*="--cyc"] { animation: lkHue 3s linear infinite; }

/* --- crates tab ---------------------------------------------------------------- */
.lk-crates3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lk-cratecard {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 50% 30%, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%),
    linear-gradient(180deg, #221c26, #110d14);
  border: 1px solid color-mix(in srgb, var(--c) 34%, rgba(255, 255, 255, .05));
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  transition: transform .2s ease, box-shadow .25s, border-color .2s;
  animation: lkRise .35s ease-out backwards;
}
.lk-cratecard:nth-child(2) { animation-delay: .06s; }
.lk-cratecard:nth-child(3) { animation-delay: .12s; }
.lk-cratecard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 22px 50px rgba(0, 0, 0, .5), 0 0 40px color-mix(in srgb, var(--c) 22%, transparent); }
.lk-cc-art { position: relative; display: grid; place-items: center; height: 200px; }
.lk-cc-art::after {                       /* the pool of light it sits in */
  content: ''; position: absolute; left: 22%; right: 22%; bottom: 18px; height: 22px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 55%, transparent), transparent);
  filter: blur(4px);
}
.lk-cc-art img { position: relative; z-index: 1; width: 78%; height: 100%; max-height: 180px; object-fit: contain; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .6)); }
.lk-cratecard.has .lk-cc-art img { animation: lkFloat 3.2s ease-in-out infinite; }
.lk-cratecard:hover .lk-cc-art img { filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .6)) drop-shadow(0 0 22px color-mix(in srgb, var(--c) 60%, transparent)); }
.lk-cc-n {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  padding: 5px 11px; border-radius: 999px;
  background: var(--c); color: #120d08;
  font-family: var(--mono); font-weight: 800; font-size: 14px;
  box-shadow: 0 0 20px color-mix(in srgb, var(--c) 70%, transparent);
}
.lk-cc-body { display: flex; flex-direction: column; gap: 10px; padding: 0 18px 18px; flex: 1; }
.lk-cratecard h3 { margin: 0; font-family: var(--display); font-size: 22px; color: var(--c); }
.lk-cratecard p { margin: -4px 0 0; font-size: 13px; color: var(--dim); }
.lk-oddsbar { display: flex; gap: 2px; height: 8px; border-radius: 99px; overflow: hidden; }
.lk-oddsbar i { background: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); }
.lk-odds { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.lk-odds li { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11.5px; }
.lk-odds li span { display: inline-flex; align-items: center; gap: 7px; color: var(--c); }
.lk-odds li span::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.lk-odds li b { color: var(--text); font-weight: 600; }
.lk-cc-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: auto; padding-top: 4px; }
.lk-cc-actions .buy { font-size: 12px; padding-inline: 12px; }

.lk-history { margin-top: 22px; }
.lk-history h4 { margin: 0 0 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.lk-hist-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lk-card.mini .lk-meta { padding: 6px 10px 10px; }
.lk-card.mini .lk-meta b { font-size: 12.5px; }
.lk-empty { margin: 0; font-size: 13px; color: var(--dim); }

/* ---------------------------------------------------------------------------
   THE STAGE: the crate opening, full screen over the locker.
--------------------------------------------------------------------------- */
.lk-stage {
  --tier: #fff2dc;
  position: fixed; inset: 0; z-index: 2;
  background: #050406;
  cursor: pointer;
  animation: lkIn .25s ease-out;
}
.lk-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lks-flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(60% 60% at 50% 50%, #fff 0%, var(--c) 35%, transparent 75%);
  mix-blend-mode: screen;
}
.lks-flash.go { animation: lksFlash .9s ease-out; }
@keyframes lksFlash { 0% { opacity: 0; } 8% { opacity: .95; } 100% { opacity: 0; } }
.lks-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px;
  pointer-events: none;
}
.lks-crate { display: flex; align-items: center; gap: 12px; margin: 0; }
.lks-crate img { width: 46px; height: 36px; object-fit: contain; }
.lks-crate span { display: flex; flex-direction: column; }
.lks-crate b { font-family: var(--display); font-size: 20px; color: var(--crate); }
.lks-crate em { font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--dim); }
.lks-skip {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(0, 0, 0, .35);
  color: var(--text); font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer;
}
.lks-skip kbd { font-family: var(--mono); font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.lk-stage.burst .lks-skip { opacity: 0; pointer-events: none; transition: opacity .3s; }

.lks-prompt {
  position: absolute; left: 50%; bottom: 17%;
  transform: translateX(-50%);
  margin: 0; text-align: center; pointer-events: none;
  opacity: 0; transition: opacity .3s, transform .3s;
}
.lks-prompt.show { opacity: 1; animation: lkPulse 1.6s ease-in-out infinite; }
.lks-prompt b { display: block; font-family: var(--display); font-size: clamp(20px, 2.6vw, 32px); color: #fff4e2; text-shadow: 0 0 24px rgba(255, 176, 58, .5); }
.lks-prompt span { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }

/* the tier ladder: every rarity the crate can hold, lit as the light climbs */
.lks-ladder {
  position: absolute; left: 50%; bottom: 5.5%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  margin: 0; padding: 0; list-style: none;
  pointer-events: none;
}
.lks-ladder li {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 104px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .25);
  transition: color .25s, transform .25s;
}
.lks-ladder li i { width: 100%; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .1); transition: background .25s, box-shadow .25s; }
.lks-ladder li.hit { color: var(--c); }
.lks-ladder li.hit i { background: var(--c); box-shadow: 0 0 14px var(--c); }
.lks-ladder li.now { transform: translateY(-4px) scale(1.08); color: #fff; text-shadow: 0 0 12px var(--c); }
.lk-stage.burst .lks-ladder li:not(.hit) { opacity: .3; }

/* the result card */
.lk-result {
  position: absolute; right: clamp(20px, 5vw, 80px); top: 50%;
  width: min(400px, 36vw);
  padding: 0 26px 24px;
  border-radius: 18px;
  cursor: default;
  background: linear-gradient(180deg, rgba(22, 17, 24, .92), rgba(10, 8, 12, .95));
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px color-mix(in srgb, var(--c) 22%, transparent);
  backdrop-filter: blur(10px);
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translate(40px, -50%);
  transition: opacity .35s ease, transform .5s cubic-bezier(.2, .9, .25, 1.15);
}
.lk-result.show { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }
.lkr-band {
  margin: 0 -26px 18px;
  padding: 12px 26px;
  background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 45%, transparent));
  color: #120d08;
  font-family: var(--display); font-size: 17px; letter-spacing: .08em;
}
.lk-result.r-mythic .lkr-band { background: linear-gradient(90deg, var(--c), #ffb03a, var(--c)); background-size: 200% 100%; animation: lkBand 2.5s linear infinite; }
@keyframes lkBand { to { background-position: 200% 0; } }
.lkr-kind { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.lk-result h3 { margin: 6px 0 8px; font-family: var(--display); font-size: clamp(26px, 2.6vw, 36px); line-height: 1; color: #fff4e2; text-shadow: 0 0 30px color-mix(in srgb, var(--c) 45%, transparent); }
.lkr-blurb { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--dim); }
.lkr-new {
  display: inline-block; margin: 0 0 18px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--red); color: #fff;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  box-shadow: 0 0 18px rgba(255, 63, 52, .55);
}
.lkr-dupe {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 18px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255, 209, 102, .08); border: 1px solid rgba(255, 209, 102, .22);
  font-family: var(--mono); font-size: 12px; color: var(--dim);
}
.lkr-dupe b { color: var(--gold); font-size: 15px; }
.lkr-actions { display: grid; gap: 8px; }

/* --- smaller screens ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .lk-body { grid-template-columns: 300px minmax(0, 1fr); }
  .lk-grid.items { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
}
@media (max-width: 860px), (max-height: 600px) {
  #locker { padding: 0; }
  .lk-inner { border-radius: 0; height: 100%; }
  .lk-head { padding: 10px 14px 8px; gap: 10px; }
  .lk-kicker { display: none; }
  .lk-title h2 { font-size: 20px; }
  .lk-batter { padding: 5px 10px; }
  .lk-batter em { display: none; }
  .lk-crate img { width: 28px; height: 22px; }
  .lk-tabs { padding: 0 14px 8px; overflow-x: auto; }
  .lk-tabs button { padding: 7px 12px; font-size: 11px; }
  .lk-count { display: none; }
  .lk-body { grid-template-columns: 230px minmax(0, 1fr); }
  .lk-preview { padding: 10px; gap: 8px; }
  .lk-canvaswrap { min-height: 120px; }
  .lk-gunpick button { height: 30px; }
  .lk-selname { font-size: 16px; }
  .lk-selblurb { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .lk-btn { padding: 9px 12px; font-size: 11px; }
  .lk-grid { padding: 10px 12px 16px; }
  .lk-grid.items { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .lk-grid.items.k-outfit { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
  .lk-cc-art { height: 112px; margin-bottom: 10px; }
  .lk-cc-art img { height: 92%; }
  .lk-cc-body { padding: 0 12px 12px; gap: 7px; }
  .lk-cratecard h3 { font-size: 17px; }
  .lk-odds { display: none; }
  .lk-result { right: 50%; top: auto; bottom: 12px; width: min(420px, calc(100% - 24px)); transform: translate(50%, 30px); padding: 0 18px 16px; }
  .lk-result.show { transform: translate(50%, 0); }
  .lk-result h3 { font-size: 22px; }
  .lkr-blurb { display: none; }
  .lkr-actions { grid-template-columns: repeat(3, auto); }
  .lk-stage:has(.lk-result.show) .lks-ladder { display: none; }
  .lks-ladder li { width: 72px; font-size: 9px; }
}
@media (max-width: 640px) {
  .lk-crates3 { grid-template-columns: 1fr; }
  .lk-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: 190px minmax(0, 1fr); }
  .lk-preview { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid rgba(255, 232, 200, .08); }
  .lk-canvaswrap { flex: 0 0 42%; }
  .lk-sel { flex: 1; }
  .lk-gunpick { display: none; }
  #lk-equip { width: auto; flex: 1 1 100%; }
}

/* The title-screen entry point: the Locker button with a pulsing count. */
#locker-open { position: relative; }
#locker-open em {
  position: absolute; top: -8px; right: -8px;
  min-width: 22px; padding: 3px 6px;
  background: var(--red); color: #fff;
  font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 700; line-height: 1.2; text-align: center;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(255, 63, 52, .7);
  animation: pulse 1.1s ease-in-out infinite alternate;
}
