/* ==========================================================================
   Ability Guess — League of Legends client inspired design system
   Palette values are the official League "Hextech" colours.
   ========================================================================== */

:root {
  --gold-1: #f0e6d2;
  --gold-2: #c8aa6e;
  --gold-3: #c89b3c;
  --gold-4: #785a28;
  --gold-5: #463714;
  --blue-1: #cdfafa;
  --blue-2: #0ac8b9;
  --blue-3: #0397ab;
  --blue-4: #005a82;
  --blue-5: #0a323c;
  --blue-6: #091428;
  --grey-1: #a09b8c;
  --grey-2: #5b5a56;
  --grey-3: #3c3c41;
  --grey-4: #1e2328;
  --grey-5: #0f1214;
  --black: #010a13;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--gold-1);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ------------------------------ Backdrop -------------------------------- */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 620px at 15% -10%, rgba(3, 151, 171, 0.16), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(120, 90, 40, 0.20), transparent 55%),
    radial-gradient(800px 700px at 50% 120%, rgba(10, 200, 185, 0.06), transparent 65%),
    linear-gradient(180deg, #010a13 0%, #061019 45%, #010a13 100%);
}
#bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200, 170, 110, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 170, 110, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(900px 600px at 50% 25%, #000 0%, transparent 80%);
          mask-image: radial-gradient(900px 600px at 50% 25%, #000 0%, transparent 80%);
}

/* ------------------------------ Logo / stats ---------------------------- */
.hexlogo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  color: #0a1117;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-5));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: 0 0 18px rgba(200, 155, 60, 0.35);
}

.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat-label {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.stat-value {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.25rem;
  color: var(--gold-1);
  line-height: 1.1;
}

/* ------------------------------ Panels ---------------------------------- */
.lol-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(16, 26, 34, 0.92), rgba(6, 13, 20, 0.96));
  border: 1px solid rgba(120, 90, 40, 0.85);
  box-shadow: inset 0 0 0 1px rgba(1, 10, 19, 0.9), 0 14px 34px rgba(0, 0, 0, 0.5);
  border-radius: 2px;
}
.lol-panel::before,
.lol-panel::after {
  content: '';
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid var(--gold-3);
  pointer-events: none;
}
.lol-panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.lol-panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.panel-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-4), transparent);
}
.panel-head.flex::after { display: none; }

.head-btn {
  padding: 0.3rem 0.6rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-2);
  background: rgba(10, 18, 24, 0.6);
  border: 1px solid var(--gold-5);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.head-btn:hover { color: var(--gold-1); border-color: var(--gold-4); box-shadow: 0 0 12px rgba(200, 155, 60, 0.18); }

/* ------------------------------ Buttons --------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.1rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-2);
  background: linear-gradient(180deg, #121b22, #0a1117);
  border: 1px solid var(--gold-4);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.08s ease;
}
.btn:hover:not(:disabled) {
  color: var(--gold-1);
  border-color: var(--gold-2);
  box-shadow: 0 0 16px rgba(200, 170, 110, 0.22);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-gold {
  color: var(--gold-1);
  border-color: var(--gold-2);
  background: linear-gradient(180deg, rgba(120, 90, 40, 0.55), rgba(70, 55, 20, 0.4));
}
.btn-gold:hover:not(:disabled) { box-shadow: 0 0 22px rgba(200, 155, 60, 0.45); }

.btn-blue {
  color: var(--blue-1);
  border-color: var(--blue-4);
  background: linear-gradient(180deg, rgba(3, 151, 171, 0.18), rgba(5, 50, 60, 0.28));
}
.btn-blue:hover:not(:disabled) {
  color: #fff;
  border-color: var(--blue-2);
  box-shadow: 0 0 18px rgba(10, 200, 185, 0.32);
}

.btn-ghost {
  color: var(--grey-1);
  border-color: transparent;
  background: transparent;
}
.btn-ghost:hover:not(:disabled) { color: var(--gold-2); box-shadow: none; }

/* ------------------------------ Play button ----------------------------- */
.play-btn {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  color: var(--gold-1);
  border: 1px solid var(--gold-3);
  border-radius: 9999px;
  background: radial-gradient(circle at 35% 30%, rgba(200, 155, 60, 0.35), rgba(10, 17, 23, 0.92) 62%);
  box-shadow: 0 0 0 4px rgba(1, 10, 19, 0.85), 0 0 26px rgba(200, 155, 60, 0.35);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}
.play-btn:hover { box-shadow: 0 0 0 4px rgba(1, 10, 19, 0.85), 0 0 44px rgba(200, 155, 60, 0.6); }
.play-btn:active { transform: scale(0.97); }
.play-btn.playing { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(1, 10, 19, 0.85), 0 0 22px rgba(200, 155, 60, 0.35); }
  50% { box-shadow: 0 0 0 4px rgba(1, 10, 19, 0.85), 0 0 48px rgba(10, 200, 185, 0.6); }
}

/* ------------------------------ Equalizer ------------------------------- */
#eq { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
#eq span {
  width: 4px;
  height: 18%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-2), var(--blue-4));
  opacity: 0.32;
  transition: opacity 0.2s ease;
}
#eq.active span { opacity: 1; animation: eq 0.9s ease-in-out infinite; }
#eq span:nth-child(1) { animation-delay: 0ms; }
#eq span:nth-child(2) { animation-delay: 120ms; }
#eq span:nth-child(3) { animation-delay: 240ms; }
#eq span:nth-child(4) { animation-delay: 60ms; }
#eq span:nth-child(5) { animation-delay: 300ms; }
#eq span:nth-child(6) { animation-delay: 180ms; }
#eq span:nth-child(7) { animation-delay: 360ms; }
#eq span:nth-child(8) { animation-delay: 90ms; }
#eq span:nth-child(9) { animation-delay: 270ms; }
#eq span:nth-child(10) { animation-delay: 30ms; }
#eq span:nth-child(11) { animation-delay: 330ms; }
#eq span:nth-child(12) { animation-delay: 150ms; }
#eq span:nth-child(13) { animation-delay: 210ms; }
#eq span:nth-child(14) { animation-delay: 390ms; }
#eq span:nth-child(15) { animation-delay: 75ms; }
@keyframes eq {
  0%, 100% { height: 16%; }
  50% { height: 100%; }
}

/* ------------------------------ Form fields ----------------------------- */
.field-label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  color: var(--gold-1);
  background: #0a1218;
  border: 1px solid var(--grey-3);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--grey-2); }
.input:focus { border-color: var(--gold-3); box-shadow: 0 0 0 1px rgba(200, 155, 60, 0.35); }

.dropdown {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  margin-top: 4px;
  max-height: 286px;
  overflow-y: auto;
  background: #0b141b;
  border: 1px solid var(--gold-4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  border-radius: 2px;
}
.dropdown li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.dropdown li img { width: 28px; height: 28px; border-radius: 2px; border: 1px solid var(--gold-5); }
.dropdown li:hover, .dropdown li.active { background: rgba(200, 155, 60, 0.12); color: var(--gold-1); }
.dropdown .empty { padding: 0.7rem 0.9rem; color: var(--grey-2); cursor: default; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.6rem;
  padding: 0.35rem 0.6rem 0.35rem 0.4rem;
  color: var(--gold-1);
  background: linear-gradient(180deg, rgba(120, 90, 40, 0.4), rgba(70, 55, 20, 0.25));
  border: 1px solid var(--gold-4);
  border-radius: 2px;
}
.chip img { width: 28px; height: 28px; border-radius: 2px; border: 1px solid var(--gold-3); }
.chip button { color: var(--grey-1); background: none; border: 0; cursor: pointer; font-size: 0.9rem; line-height: 1; }
.chip button:hover { color: var(--gold-1); }

/* ------------------------------ Ability buttons ------------------------- */
.ability {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.62rem 0;
  color: var(--gold-2);
  background: linear-gradient(180deg, #101920, #0a1117);
  border: 1px solid var(--grey-3);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ability .key { font-family: 'Cinzel', Georgia, serif; font-size: 1.05rem; letter-spacing: 0.05em; }
.ability .sub { font-size: 0.58rem; letter-spacing: 0.12em; color: var(--grey-2); text-transform: uppercase; }
.ability:hover { border-color: var(--gold-3); }
.ability.selected {
  color: #fff;
  border-color: var(--gold-2);
  background: linear-gradient(180deg, rgba(120, 90, 40, 0.5), rgba(70, 55, 20, 0.3));
  box-shadow: 0 0 16px rgba(200, 155, 60, 0.35);
}
.ability.selected .sub { color: var(--gold-1); }

/* ------------------------------ Hints ----------------------------------- */
.hint {
  padding: 0.65rem 0.8rem;
  background: rgba(10, 18, 24, 0.6);
  border: 1px solid var(--grey-3);
  border-radius: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.hint.locked { color: var(--grey-2); }
.hint.revealed { border-color: var(--gold-4); background: rgba(120, 90, 40, 0.08); }
.hint .htitle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.hint.locked .htitle { color: var(--grey-2); }
.hint .hbody { margin-top: 0.5rem; font-size: 0.9rem; color: var(--gold-1); }
.hint .hbody img { max-height: 150px; border: 1px solid var(--gold-4); border-radius: 2px; }
.hint .hbody .mini-btn {
  padding: 0.4rem 0.75rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-1);
  background: linear-gradient(180deg, rgba(3, 151, 171, 0.18), rgba(5, 50, 60, 0.28));
  border: 1px solid var(--blue-4);
  cursor: pointer;
}
.hint .hbody .mini-btn:hover { border-color: var(--blue-2); box-shadow: 0 0 14px rgba(10, 200, 185, 0.3); }

/* ------------------------------ Stat cards ------------------------------ */
.statcard {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  background: rgba(10, 18, 24, 0.6);
  border: 1px solid var(--grey-3);
  border-radius: 2px;
}
.statcard-label {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.statcard-value { font-family: 'Cinzel', Georgia, serif; font-size: 1.4rem; color: var(--gold-1); }

/* ------------------------------ Overlays -------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem;
  background: rgba(1, 10, 19, 0.82);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  animation: fade 0.25s ease;
}
.overlay > * { margin: auto; flex: 0 0 auto; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------ Feedback colours ------------------------ */
.fb-error { color: #ff6b6b; }
.fb-warn  { color: var(--gold-2); }
.fb-info  { color: var(--blue-2); }
.fb-ok    { color: var(--blue-2); }

.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ------------------------------ Scrollbars ------------------------------ */
.dropdown::-webkit-scrollbar { width: 8px; }
.dropdown::-webkit-scrollbar-track { background: #0a1117; }
.dropdown::-webkit-scrollbar-thumb { background: var(--gold-5); border-radius: 4px; }
.dropdown::-webkit-scrollbar-thumb:hover { background: var(--gold-4); }



/* ==========================================================================
   Loot system — app bar, store, loot, collection
   ========================================================================== */

.app-bar {
  position: relative;
  z-index: 70;
  border-bottom: 1px solid rgba(120, 90, 40, 0.5);
  background: linear-gradient(180deg, rgba(1, 10, 19, 0.97), rgba(6, 16, 25, 0.93));
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}

.view-nav { display: flex; flex-wrap: wrap; gap: 0.2rem; }
.view-tab {
  padding: 0.5rem 0.95rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-1);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.view-tab:hover { color: var(--gold-2); }
.view-tab.active {
  color: var(--gold-1);
  border-bottom-color: var(--gold-3);
  background: linear-gradient(180deg, rgba(120, 90, 40, 0.28), transparent);
}

.wallet { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.26rem 0.55rem;
  font-size: 0.78rem;
  background: rgba(10, 18, 24, 0.78);
  border: 1px solid var(--grey-3);
  border-radius: 2px;
}
.wallet-pill img { width: 18px; height: 18px; object-fit: contain; }
.wallet-pill b { font-family: 'Cinzel', Georgia, serif; font-weight: 600; color: var(--gold-1); }
.wallet-pill i {
  font-style: normal;
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  color: var(--gold-3);
}

.page-sub { margin-top: -0.5rem; margin-bottom: 1.25rem; font-size: 0.85rem; color: var(--grey-1); }

/* ------------------------------ Store ----------------------------------- */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}
.store-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem 0.9rem 0.9rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(16, 26, 34, 0.92), rgba(6, 13, 20, 0.96));
  border: 1px solid var(--grey-3);
  border-radius: 2px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.store-card:hover { border-color: var(--gold-4); box-shadow: 0 0 22px rgba(200, 155, 60, 0.14); }
.store-icon { width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55)); }
.store-card.no-shadow .store-icon { filter: none; }
.store-card h3 {
  margin: 0.55rem 0 0.35rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--gold-1);
}
.store-card p { min-height: 3.4em; font-size: 0.74rem; line-height: 1.5; color: var(--grey-1); }
.store-tag {
  align-self: center;
  margin-bottom: 0.45rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a1117;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-4));
}
.store-owned { font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-2); }
.store-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.75rem;
}
.price { display: inline-flex; align-items: center; gap: 0.3rem; font-family: 'Cinzel', Georgia, serif; font-size: 0.9rem; color: var(--gold-2); }
.price img { width: 18px; height: 18px; }
.store-foot .btn { padding: 0.55rem 0.8rem; font-size: 0.62rem; }

/* ------------------------------ Loot ------------------------------------ */
.unopened-list { display: flex; flex-direction: column; gap: 0.55rem; }
.unopened-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  background: rgba(10, 18, 24, 0.6);
  border: 1px solid var(--grey-3);
  border-radius: 2px;
}
.unopened-thumb { position: relative; width: 40px; height: 40px; flex: 0 0 auto; }
.unopened-thumb img { width: 100%; height: 100%; object-fit: contain; }
.unopened-count {
  position: absolute; right: -0.35rem; bottom: -0.35rem;
  min-width: 1.1rem; padding: 0 0.24rem;
  font-family: 'Cinzel', Georgia, serif; font-size: 0.58rem; line-height: 1rem; text-align: center;
  color: #08111a; background: linear-gradient(135deg, var(--gold-2), var(--gold-4));
  border: 1px solid rgba(8, 17, 26, 0.65); border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.unopened-body { flex: 1; min-width: 0; }
.unopened-body h3 { font-family: 'Cinzel', Georgia, serif; font-size: 0.72rem; letter-spacing: 0.05em; color: var(--gold-1); }
.unopened-body p { margin-top: 0.1rem; font-size: 0.6rem; line-height: 1.35; color: var(--grey-2); }
.unopened-card .btn { padding: 0.4rem 0.6rem; font-size: 0.54rem; }
.unopened-note { font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey-2); }

.loot-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.loot-filters { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.loot-filter {
  padding: 0.4rem 0.7rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-1);
  background: rgba(10, 18, 24, 0.6);
  border: 1px solid var(--grey-3);
  cursor: pointer;
}
.loot-filter:hover { color: var(--gold-1); border-color: var(--gold-5); }
.loot-filter.active {
  color: var(--gold-1);
  border-color: var(--gold-4);
  background: linear-gradient(180deg, rgba(120, 90, 40, 0.35), rgba(70, 55, 20, 0.2));
}
.loot-hint { font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-2); }

.reroll-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding: 0.5rem 0.7rem;
  background: rgba(10, 18, 24, 0.5);
  border: 1px solid var(--grey-3);
}
#rerollInfo { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-1); }
.reroll-bar .btn { padding: 0.45rem 0.8rem; font-size: 0.6rem; }

.shard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
  max-height: 68vh;
  overflow-y: auto;
  padding-right: 0.3rem;
}
.shard-grid::-webkit-scrollbar { width: 8px; }
.shard-grid::-webkit-scrollbar-track { background: #0a1117; }
.shard-grid::-webkit-scrollbar-thumb { background: var(--gold-5); border-radius: 4px; }
.shard-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
  background: linear-gradient(180deg, rgba(16, 26, 34, 0.92), rgba(6, 13, 20, 0.96));
  border: 1px solid var(--rar, var(--grey-3));
  border-radius: 2px;
}
.shard-img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #050b10; border: 1px solid rgba(0, 0, 0, 0.6); }
.shard-img > img:first-child { display: block; width: 100%; height: 100%; object-fit: cover; }
.shard-img.contain { background: radial-gradient(circle at 50% 45%, rgba(30, 62, 80, 0.45), #050b10 72%); }
.shard-img.contain > img:first-child { object-fit: contain; padding: 7%; }
.shard-img .shard-rarity { width: 68%; top: 4px; }
.shard-rarity {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.75));
  pointer-events: none;
}

.shard-card h4 { margin-top: 0.35rem; font-size: 0.66rem; line-height: 1.2; color: var(--gold-1); }
.shard-sub { margin-top: 0.1rem; font-size: 0.52rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-2); }
.shard-actions { display: flex; flex-direction: column; gap: 0.25rem; margin-top: auto; padding-top: 0.4rem; }

.mini-btn {
  padding: 0.32rem 0.35rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-1);
  background: linear-gradient(180deg, rgba(3, 151, 171, 0.18), rgba(5, 50, 60, 0.28));
  border: 1px solid var(--blue-4);
  cursor: pointer;
}
.mini-btn:hover:not(:disabled) { border-color: var(--blue-2); box-shadow: 0 0 12px rgba(10, 200, 185, 0.28); }
.mini-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.mini-btn.ghost { color: var(--gold-2); background: transparent; border-color: var(--gold-5); }
.shard-check {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: rgba(1, 10, 19, 0.85);
  border: 1px solid var(--gold-4);
}
.shard-check input { accent-color: var(--gold-3); cursor: pointer; }

.rar-normal { --rar: #7d838c; }
.rar-epic { --rar: #a45cff; }
.rar-legendary { --rar: #e0a33a; }
.rar-mythic { --rar: #e05c7e; }
.rar-transcendent { --rar: #3ce0ff; }
.rar-ultimate { --rar: #ff6a2b; }

/* ------------------------------ Collection ------------------------------ */
.coll-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.coll-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.coll-tab {
  padding: 0.45rem 0.8rem;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-1);
  background: rgba(10, 18, 24, 0.6);
  border: 1px solid var(--grey-3);
  cursor: pointer;
}
.coll-tab.active {
  color: var(--gold-1);
  border-color: var(--gold-4);
  background: linear-gradient(180deg, rgba(120, 90, 40, 0.35), rgba(70, 55, 20, 0.2));
}
.coll-search { width: min(280px, 100%); padding: 0.5rem 0.7rem; font-size: 0.8rem; }
.coll-select { width: auto; padding: 0.5rem 1.6rem 0.5rem 0.7rem; font-size: 0.74rem; }
.coll-toggle { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-1); }
.coll-toggle input { accent-color: var(--gold-3); }

.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.coll-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 26, 34, 0.92), rgba(6, 13, 20, 0.96));
  border: 1px solid var(--rar, var(--grey-3));
  border-radius: 2px;
}
.coll-card .coll-img { aspect-ratio: 1 / 1; overflow: hidden; background: #050b10; }
.coll-card .coll-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.coll-card:hover .coll-img img { transform: scale(1.05); }
.coll-card.locked { opacity: 0.72; }
.coll-card.locked .coll-img img { filter: grayscale(1) brightness(0.42); }
.coll-meta { padding: 0.45rem 0.55rem 0.55rem; }
.coll-meta b { display: block; font-size: 0.72rem; color: var(--gold-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coll-meta span { display: block; font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coll-own {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  padding: 0.12rem 0.35rem;
  font-size: 0.45rem;
  letter-spacing: 0.14em;
  color: #0a1117;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-4));
}
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.2rem; }
.pager-label { font-family: 'Cinzel', Georgia, serif; font-size: 0.72rem; letter-spacing: 0.16em; color: var(--gold-3); }
.pager.hidden { display: none; }

.reveal-panel { position: relative; }
.reveal-kicker { font-family: 'Cinzel', Georgia, serif; font-size: 0.8rem; letter-spacing: 0.4em; color: var(--gold-3); }
.reveal-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-top: 1.2rem; }
.reveal-card {
  width: 180px;
  padding: 0.7rem;
  background: linear-gradient(180deg, rgba(16, 26, 34, 0.96), rgba(6, 13, 20, 0.99));
  border: 1px solid var(--rar, var(--grey-3));
  animation: revealIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.reveal-img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #050b10; border: 1px solid rgba(0, 0, 0, 0.6); }
.reveal-img > img:first-child { display: block; width: 100%; height: 100%; object-fit: cover; }
.reveal-img.contain { background: radial-gradient(circle at 50% 45%, rgba(30, 62, 80, 0.45), #050b10 72%); }
.reveal-img.contain > img:first-child { object-fit: contain; padding: 7%; }
.reveal-img .shard-rarity { width: 50%; top: 6px; }
.reveal-kind { margin-top: 0.5rem; font-size: 0.5rem; letter-spacing: 0.22em; color: var(--gold-3); }
.reveal-card h4 { font-family: 'Cinzel', Georgia, serif; font-size: 0.82rem; line-height: 1.25; color: var(--gold-1); }
.reveal-sub { font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey-1); }
.reveal-card.cur, .reveal-card.item { border-color: var(--grey-3); }
@keyframes revealIn {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

.loot-empty {
  grid-column: 1 / -1;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--grey-2);
  border: 1px dashed var(--grey-3);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 90;
  padding: 0.65rem 1.1rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--gold-1);
  background: rgba(6, 13, 20, 0.97);
  border: 1px solid var(--gold-4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 1rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: #ff6b6b; color: #ffd0d0; }
.toast.ok { border-color: var(--blue-4); }

@media (max-width: 1024px) {
  .shard-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .shard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .wallet { width: 100%; overflow-x: auto; padding-bottom: 0.2rem; }
  .wallet-pill { flex: 0 0 auto; }
  .app-bar { z-index: 55; }
  .shard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .reveal-card { width: 140px; }
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  #viewCollection .coll-head { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  #viewCollection .coll-head #collectionSummary {
    padding-left: 0;
    text-align: left;
    line-height: 1.6;
    letter-spacing: 0.08em;
  }
}
