:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #111720;
  --panel-2: #151d28;
  --line: rgba(255, 255, 255, 0.11);
  --text: #f4f7fb;
  --muted: #9ba8b6;
  --gold: #f4c95d;
  --gold-2: #fff0a3;
  --mint: #6ee7b7;
  --rose: #fb7185;
  --blue: #7dd3fc;
  --violet: #c4b5fd;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
  --premium-border: rgba(244, 201, 93, 0.24);
  --premium-surface: linear-gradient(160deg, rgba(19, 27, 39, 0.9), rgba(7, 11, 18, 0.84));
  --font-body: Bahnschrift, "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-display: "Bahnschrift SemiCondensed", "Arial Black", Impact, Bahnschrift, sans-serif;
  --font-card: "Bahnschrift Condensed", "Arial Narrow", Bahnschrift, "Trebuchet MS", sans-serif;
  font-family: var(--font-body);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(5, 8, 13, 0.54), rgba(5, 8, 13, 0.74)),
    radial-gradient(circle at 50% 20%, rgba(244, 201, 93, 0.16), transparent 28%),
    radial-gradient(circle at 72% 8%, rgba(125, 211, 252, 0.12), transparent 24%),
    url("/assets/twentyfold-stadium-bg.png"),
    var(--bg);
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 650;
}

body.reveal-video-playing {
  overflow: hidden;
}

button, input, select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 276px 1fr;
}

.sidebar {
  border-right: 1px solid rgba(244, 201, 93, 0.16);
  padding: 18px 18px 14px;
  background:
    radial-gradient(circle at 50% 7%, rgba(244, 201, 93, 0.14), transparent 25%),
    linear-gradient(180deg, rgba(11, 16, 25, 0.95), rgba(5, 8, 13, 0.96));
  backdrop-filter: blur(22px);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 18px 0 55px rgba(0, 0, 0, 0.34);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.crest {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 201, 93, 0.5);
  background: linear-gradient(145deg, #f4c95d, #8ef6d2);
  color: #111720;
  font-weight: 900;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(244, 201, 93, 0.22);
}

.logo-crest {
  display: block;
  object-fit: contain;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.brand .logo-crest {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.auth-card > .logo-crest {
  width: min(220px, 68vw);
  height: auto;
  margin: -8px auto 8px;
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0;
}

.brand p, .meta, .muted {
  color: var(--muted);
}

.brand p {
  margin: 2px 0 0;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav button, .ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 900;
}

.nav button.active, .nav button:hover, .ghost:hover {
  border-color: rgba(244, 201, 93, 0.34);
  background:
    linear-gradient(90deg, rgba(244, 201, 93, 0.16), rgba(125, 211, 252, 0.06)),
    rgba(255, 255, 255, 0.055);
  box-shadow: inset 3px 0 0 rgba(244, 201, 93, 0.9), 0 10px 24px rgba(0, 0, 0, 0.18);
}

a.ghost, .link-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.status-card {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(13, 19, 29, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 34px rgba(0, 0, 0, 0.18);
}

.status-card .muted {
  display: block;
  font-size: 12px;
  line-height: 1.05;
}

.status-card p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.18;
}

.disclaimer {
  margin: auto 2px 0;
  padding-top: 12px;
  font-size: 10.5px;
  line-height: 1.28;
}

.status-card strong {
  display: block;
  font-family: var(--font-display);
  margin-top: 3px;
  font-size: 24px;
  line-height: 0.95;
}

.main {
  padding: 28px 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.34), 0 18px 42px rgba(0, 0, 0, 0.62);
}

.title p {
  margin: 8px 0 0;
  max-width: 760px;
  color: #bed0e4;
  font-weight: 800;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary, .secondary, .danger {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 950;
}

.primary {
  color: #111720;
  background: linear-gradient(135deg, var(--gold), var(--gold-2) 42%, var(--mint));
  box-shadow: 0 14px 30px rgba(110, 231, 183, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.secondary {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.danger {
  color: #2b0c13;
  background: var(--rose);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.panel {
  grid-column: span 12;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 0%, rgba(244, 201, 93, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(18, 26, 38, 0.84), rgba(8, 13, 22, 0.78));
  box-shadow: 0 24px 76px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.105);
  background: linear-gradient(90deg, rgba(244, 201, 93, 0.06), transparent 60%);
}

.panel-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff6d5;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.panel-body {
  padding: 20px;
}

.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.club {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  min-height: 142px;
}

.club-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.badge {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(125, 211, 252, 0.14);
  color: var(--blue);
  font-weight: 900;
}

.club h4 {
  margin: 12px 0 6px;
}

.club select, .auth-card input, .form-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0c1119;
  padding: 0 12px;
}

.club select { margin-top: 12px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.table tr.clickable:hover {
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  color: #10151e;
  background: var(--mint);
}

.pill.warn { background: var(--gold); }
.pill.bad { background: var(--rose); }

.pull-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.intro-reveal {
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(244, 201, 93, 0.16), rgba(125, 211, 252, 0.12));
}

.intro-reveal strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.pack-stage {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, rgba(244, 201, 93, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(125, 211, 252, 0.1), rgba(110, 231, 183, 0.1)),
    rgba(255, 255, 255, 0.035);
}

.pack-open-panel .panel-body {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 16px 22px 14px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(244, 201, 93, 0.13), transparent 22%),
    radial-gradient(circle at 50% 88%, rgba(110, 231, 183, 0.1), transparent 24%);
}

.pack-open-panel .panel-body > * {
  pointer-events: auto;
}

.pack-open-panel .panel-body > .sealed-pack,
.pack-open-panel .panel-body > .sealed-pack * {
  pointer-events: none;
}

.pack-preview {
  width: min(270px, 64vw);
  position: relative;
  z-index: 1;
}

.reveal-entry-button {
  min-width: min(320px, 100%);
  position: relative;
  z-index: 3;
  pointer-events: auto;
  touch-action: manipulation;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.sealed-pack {
  width: min(310px, 72vw);
  aspect-ratio: 2 / 3;
  position: relative;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  animation: pack-idle 1300ms ease-in-out infinite alternate;
  pointer-events: none;
}

.sealed-pack::before {
  content: none;
}

.sealed-pack-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter:
    drop-shadow(0 24px 34px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 28px rgba(244, 201, 93, 0.16));
  pointer-events: none;
}

.pack-shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0 35%, rgba(255, 255, 255, 0.42) 47%, transparent 60%);
  background-size: 260% 100%;
  background-position: -130% 0;
  -webkit-mask-image: url("/assets/twentyfold-pack-cropped.png");
  mask-image: url("/assets/twentyfold-pack-cropped.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  mix-blend-mode: screen;
  animation: pack-shine 1800ms ease-in-out infinite;
  pointer-events: none;
}

.pack-mark {
  position: absolute;
  right: 12px;
  bottom: 2px;
  color: rgba(255, 255, 255, 0.08);
  font-size: 74px;
  font-weight: 950;
}

.pack-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  opacity: 0.18;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.42));
}

.pack-brand {
  position: relative;
  z-index: 2;
  text-align: center;
  text-transform: uppercase;
}

.pack-brand span {
  display: block;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.14em;
  font-weight: 900;
}

.pack-brand strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  margin-top: 6px;
}

.pack-tear {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 24%;
  border-top: 1px dashed rgba(255, 255, 255, 0.36);
}

.pack-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.pack-burst span {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 201, 93, 0.36), transparent 68%);
}

.pack-burst span:nth-child(1) { left: 18%; top: 22%; }
.pack-burst span:nth-child(2) { right: 20%; top: 20%; background: radial-gradient(circle, rgba(110, 231, 183, 0.25), transparent 68%); }
.pack-burst span:nth-child(3) { left: 28%; bottom: 20%; background: radial-gradient(circle, rgba(125, 211, 252, 0.24), transparent 68%); }
.pack-burst span:nth-child(4) { right: 25%; bottom: 18%; background: radial-gradient(circle, rgba(196, 181, 253, 0.22), transparent 68%); }

.pack-stage.is-opened .sealed-pack {
  animation: pack-open 760ms ease forwards;
}

.pack-stage.is-opened .pack-lid {
  animation: pack-lid-open 620ms ease forwards;
}

.pack-stage.is-opened .pack-burst {
  animation: pack-burst 900ms ease forwards;
}

.reveal-grid.pending {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}

.reveal-grid.complete {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 420ms ease;
}

@keyframes pack-idle {
  from { transform: translateY(0) rotate(-0.5deg); }
  to { transform: translateY(-7px) rotate(0.5deg); }
}

@keyframes pack-shine {
  0% { background-position: -130% 0; opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { background-position: 160% 0; opacity: 0; }
}

@keyframes pack-open {
  0% { transform: translateY(-7px) scale(1); filter: brightness(1); }
  35% { transform: translateY(-4px) scale(1.06) rotate(1deg); filter: brightness(1.2); }
  100% { transform: translateY(18px) scale(0.82) rotate(-3deg); opacity: 0; filter: brightness(1.4); }
}

@keyframes pack-lid-open {
  to { transform: rotateX(78deg) translateY(-14px); opacity: 0.25; }
}

@keyframes pack-burst {
  0% { opacity: 0; transform: scale(0.8); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.28); }
}

.reveal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.reveal-modal-backdrop {
  padding: 18px;
}

.reveal-modal {
  width: min(1560px, 100%);
  max-height: 94vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 0%, rgba(244, 201, 93, 0.13), transparent 24%),
    linear-gradient(145deg, rgba(17, 24, 34, 0.98), rgba(8, 13, 22, 0.99));
  box-shadow: var(--shadow);
}

.reveal-modal.is-video-stage {
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #03060b;
}

.reveal-modal.is-video-stage .panel-header {
  display: none;
}

.reveal-modal.is-video-stage .panel-body {
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  padding: 0;
}

.reveal-modal .panel-body {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.pack-opening-video-shell {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.012);
  background: #03060b;
  transition: opacity var(--video-fade-ms, 520ms) ease, transform 760ms cubic-bezier(.2, .72, .18, 1);
}

.pack-opening-video-shell.is-active {
  opacity: 1;
  transform: scale(1);
}

.pack-opening-video-shell.is-fading-out {
  opacity: 0;
  transform: scale(1.018);
}

.pack-opening-video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(1.1) contrast(1.04) brightness(0.98);
}

.pack-opening-video-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, transparent 0 42%, rgba(0, 0, 0, 0.34) 78%),
    linear-gradient(180deg, rgba(3, 6, 11, 0.12), rgba(3, 6, 11, 0.2));
}

.reveal-modal .pack-stage {
  min-height: min(360px, 42vh);
}

.reveal-modal .reveal-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.reveal-modal .reveal-card {
  width: calc((100% - 72px) / 7);
  min-width: 132px;
}

.reveal-card {
  aspect-ratio: 3 / 4;
  perspective: 1000px;
  transform: translateZ(0);
}

.reveal-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform var(--flip-duration, 1.2s) cubic-bezier(.18, .72, .18, 1);
  will-change: transform;
}

.reveal-card.is-revealed .reveal-inner {
  transform: rotateY(180deg);
}

.reveal-card.is-held {
  display: none;
}

.reveal-grid.marquee-collapsed .reveal-card:not(.is-held) {
  opacity: 0;
  transform: scale(0.86) translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.marquee-signing {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 320ms ease, transform 320ms cubic-bezier(.18, .86, .2, 1.1);
}

.marquee-signing.is-visible {
  opacity: 1;
  transform: scale(1);
}

.marquee-signing::before {
  content: "";
  position: absolute;
  width: min(520px, 80vw);
  height: min(520px, 80vw);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(244, 201, 93, 0.34), transparent 62%),
    radial-gradient(circle, rgba(125, 211, 252, 0.22), transparent 72%);
  filter: blur(2px);
}

.marquee-signing h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(28px, 5vw, 64px);
  line-height: 0.95;
  text-align: center;
  color: var(--text);
  text-shadow: 0 10px 36px rgba(0, 0, 0, 0.82);
}

.marquee-signing .reveal-card {
  width: min(320px, 68vw);
  position: relative;
  z-index: 1;
  filter:
    drop-shadow(0 24px 46px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 30px rgba(244, 201, 93, 0.34));
}

.marquee-signing .player-name-full {
  font-size: clamp(24px, 4vw, 42px);
}

.marquee-signing .reveal-front em {
  font-size: 16px;
}

.reveal-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  overflow: hidden;
  transform: translateZ(0);
}

.reveal-back {
  padding: 0;
  background: #0c1119;
  border-color: rgba(255, 255, 255, 0.16);
}

.reveal-back img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(1.06) brightness(1.03) contrast(1.06);
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0) scale(1.001);
}

.reveal-front {
  transform: rotateY(180deg);
  background: #111720;
  padding: 10px;
}

.reveal-front-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  filter: saturate(1.08) brightness(1.04) contrast(1.04);
  z-index: 0;
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0) scale(1.001);
}

.reveal-rarity-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(rgba(7, 11, 17, 0.04), rgba(7, 11, 17, 0.1));
}

.reveal-info-box {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 38px 14px 16px;
  background:
    linear-gradient(180deg, rgba(10, 15, 23, 0.08), rgba(10, 15, 23, 0.18)),
    color-mix(in srgb, var(--club-primary, #2b3442) 3%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 30px rgba(0, 0, 0, 0.32);
}

.reveal-face span, .reveal-face em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.reveal-face strong {
  display: block;
  overflow: visible;
}

.reveal-face em {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 11px;
  color: #111720;
  font-weight: 900;
}

.card-topline {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--muted);
}

.card-topline b {
  border-radius: 999px;
  padding: 4px 8px;
  color: #08111a;
  background: rgba(255, 255, 255, 0.78);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 950;
}

.reveal-front em {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.player-name-full {
  width: 86%;
  max-width: 86%;
  margin: 0 auto;
  color: var(--text);
  text-align: center;
  font-family: var(--font-card);
  font-weight: 950;
  font-size: clamp(12px, 0.75vw, 15px);
  line-height: 1.02;
  padding: 7px 10px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 24, 46, 0.86), rgba(4, 12, 27, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 22px rgba(0, 0, 0, 0.34);
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.86);
}

.odds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.odds-card {
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(7, 12, 20, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.odds-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.odds-card strong {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
}

.odds-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.pull {
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.pull span, .pull em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.pull strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 17px;
}

.rarity.elite {
  border-color: rgba(244, 201, 93, 0.85);
  background: linear-gradient(145deg, rgba(244, 201, 93, 0.2), rgba(255, 255, 255, 0.055));
}

.rarity.mythic {
  border-color: rgba(248, 48, 64, 0.98);
  background:
    radial-gradient(circle at 20% 18%, rgba(248, 48, 64, 0.38), transparent 30%),
    linear-gradient(160deg, color-mix(in srgb, var(--club-primary, #2b3442) 24%, transparent), transparent 58%),
    rgba(248, 48, 64, 0.1);
  box-shadow: inset 0 0 0 1px rgba(248, 48, 64, 0.4), 0 18px 48px rgba(248, 48, 64, 0.24);
}

.rarity.mythic em { background: #f83040; color: #fff8f8; }

.rarity.legendary {
  border-color: rgba(244, 201, 93, 0.95);
  background:
    radial-gradient(circle at 20% 18%, rgba(244, 201, 93, 0.35), transparent 28%),
    linear-gradient(160deg, color-mix(in srgb, var(--club-primary, #2b3442) 24%, transparent), transparent 58%),
    rgba(244, 201, 93, 0.1);
  box-shadow: inset 0 0 0 1px rgba(244, 201, 93, 0.35), 0 18px 44px rgba(244, 201, 93, 0.2);
}

.rarity.legendary em { background: var(--gold); }

.rarity.epic {
  border-color: rgba(196, 181, 253, 0.95);
  background:
    radial-gradient(circle at 20% 18%, rgba(196, 181, 253, 0.28), transparent 28%),
    linear-gradient(160deg, color-mix(in srgb, var(--club-primary, #2b3442) 22%, transparent), transparent 58%),
    rgba(196, 181, 253, 0.08);
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.26);
}

.rarity.epic em { background: var(--violet); }

.rarity.rare {
  border-color: rgba(125, 211, 252, 0.8);
  background:
    radial-gradient(circle at 20% 18%, rgba(125, 211, 252, 0.24), transparent 28%),
    linear-gradient(160deg, color-mix(in srgb, var(--club-primary, #2b3442) 20%, transparent), transparent 58%),
    rgba(125, 211, 252, 0.06);
}

.rarity.rare em { background: var(--blue); }

.rarity.uncommon {
  border-color: rgba(110, 231, 183, 0.75);
  background:
    radial-gradient(circle at 20% 18%, rgba(110, 231, 183, 0.2), transparent 28%),
    linear-gradient(160deg, color-mix(in srgb, var(--club-primary, #2b3442) 18%, transparent), transparent 58%),
    rgba(110, 231, 183, 0.05);
}

.rarity.uncommon em { background: var(--mint); }

.rarity.common {
  border-color: rgba(145, 108, 71, 0.85);
  background:
    radial-gradient(circle at 20% 18%, rgba(168, 121, 79, 0.2), transparent 28%),
    linear-gradient(160deg, color-mix(in srgb, var(--club-primary, #2b3442) 16%, transparent), transparent 58%),
    rgba(168, 121, 79, 0.06);
}

.rarity.common em {
  background: #a8794f;
  color: #f8efe6;
}

.reveal-front.rarity.common .reveal-rarity-wash {
  background: radial-gradient(circle at 20% 18%, rgba(168, 121, 79, 0.1), transparent 32%), linear-gradient(rgba(7, 11, 17, 0.04), rgba(7, 11, 17, 0.1));
}

.reveal-front.rarity.uncommon .reveal-rarity-wash {
  background: radial-gradient(circle at 20% 18%, rgba(110, 231, 183, 0.1), transparent 32%), linear-gradient(rgba(7, 11, 17, 0.04), rgba(7, 11, 17, 0.1));
}

.reveal-front.rarity.rare .reveal-rarity-wash {
  background: radial-gradient(circle at 20% 18%, rgba(125, 211, 252, 0.11), transparent 32%), linear-gradient(rgba(7, 11, 17, 0.04), rgba(7, 11, 17, 0.1));
}

.reveal-front.rarity.epic .reveal-rarity-wash {
  background: radial-gradient(circle at 20% 18%, rgba(196, 181, 253, 0.12), transparent 32%), linear-gradient(rgba(7, 11, 17, 0.04), rgba(7, 11, 17, 0.1));
}

.reveal-front.rarity.legendary .reveal-rarity-wash {
  background: radial-gradient(circle at 20% 18%, rgba(244, 201, 93, 0.14), transparent 32%), linear-gradient(rgba(7, 11, 17, 0.04), rgba(7, 11, 17, 0.1));
}

.reveal-front.rarity.mythic .reveal-rarity-wash {
  background: radial-gradient(circle at 20% 18%, rgba(248, 48, 64, 0.15), transparent 32%), linear-gradient(rgba(7, 11, 17, 0.04), rgba(7, 11, 17, 0.1));
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.roster-slot, .pick-card {
  min-height: 176px;
  color: var(--text);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--club-primary, #2b3442) 20%, transparent), transparent 56%),
    rgba(255, 255, 255, 0.045);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.roster-slot.empty, .pick-card.empty {
  border-style: dashed;
}

.roster-slot:hover, .pick-card:hover {
  border-color: rgba(244, 201, 93, 0.65);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--club-primary, #2b3442) 26%, transparent), transparent 56%),
    rgba(255, 255, 255, 0.07);
}

.roster-slot strong, .pick-card strong {
  font-family: var(--font-display);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.slot-label {
  color: var(--muted);
  font-size: 12px;
}

.roster-slot em, .pick-card em, .picker-row em {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-style: normal;
  color: #111720;
  font-weight: 900;
}

.pick-card em {
  color: #111720;
  background: var(--mint);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: center;
  padding: 20px;
}

.picker-modal {
  width: min(760px, 100%);
  max-height: min(760px, 88vh);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111720;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.picker-list {
  max-height: 620px;
  overflow: auto;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.picker-row {
  color: var(--text);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--club-primary, #2b3442) 18%, transparent), transparent 55%),
    rgba(255, 255, 255, 0.045);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.picker-row:hover, .picker-row.selected {
  border-color: rgba(244, 201, 93, 0.7);
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--club-primary, #2b3442) 28%, transparent), transparent 55%),
    rgba(255, 255, 255, 0.075);
}

.picker-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.picker-row strong,
.inventory-card strong,
.merge-card strong,
.table strong {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.inventory-list {
  display: grid;
  gap: 12px;
}

.inventory-team {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 32, 0.82);
  overflow: hidden;
  box-shadow: 0 16px 58px rgba(0, 0, 0, 0.25);
}

.inventory-team summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--club-primary, #2b3442) 20%, transparent), transparent 58%),
    rgba(255, 255, 255, 0.035);
}

.inventory-team summary::-webkit-details-marker {
  display: none;
}

.inventory-team summary em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
}

.inventory-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--club-primary, #2b3442) 14%, transparent), transparent 58%),
    rgba(255, 255, 255, 0.045);
}

.inventory-card.missing {
  opacity: 0.38;
  filter: grayscale(1);
  border-style: dashed;
}

.inventory-card span {
  color: var(--muted);
  font-size: 12px;
}

.inventory-card strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.inventory-card em {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-style: normal;
  color: #111720;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.inventory-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.merge-button {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.merge-modal {
  width: min(860px, 100%);
  max-height: min(760px, 88vh);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 12%, rgba(234, 184, 91, 0.16), transparent 26%),
    linear-gradient(145deg, rgba(20, 28, 39, 0.98), rgba(8, 13, 22, 0.98));
  box-shadow: var(--shadow);
}

.merge-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.16fr);
  gap: 12px;
  align-items: center;
  padding: 20px;
}

.merge-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--club-primary, #2b3442) 22%, transparent), transparent 54%),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.merge-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: translateX(-120%);
  pointer-events: none;
}

.merge-card.source {
  animation: merge-source 900ms ease both;
}

.merge-card.source.delay {
  animation-delay: 140ms;
}

.merge-card.result {
  min-height: 220px;
  animation: merge-result 900ms cubic-bezier(0.2, 0.9, 0.2, 1.1) both;
}

.merge-card.hidden-result {
  opacity: 0.68;
  filter: grayscale(0.35);
  animation: merge-wait 5s ease both;
}

.merge-card.result::before {
  animation: card-shimmer 1100ms 760ms ease both;
}

.merge-card span,
.merge-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.merge-card strong {
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.02;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merge-card em {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  color: #111720;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  background: rgba(255, 255, 255, 0.8);
}

.merge-operator {
  color: var(--gold);
  font-size: 30px;
  font-weight: 950;
  text-align: center;
  text-shadow: 0 8px 24px rgba(234, 184, 91, 0.28);
}

@keyframes merge-source {
  0% { opacity: 0; transform: translateY(18px) rotateY(-22deg) scale(0.94); }
  25% { opacity: 1; transform: translateY(0) rotateY(0deg) scale(1); }
  100% { opacity: 0.58; transform: translateX(10px) scale(0.96); filter: saturate(0.75); }
}

@keyframes merge-result {
  0% { opacity: 0; transform: scale(0.68) rotateY(48deg); filter: brightness(0.7) blur(2px); }
  62% { opacity: 1; transform: scale(1.06) rotateY(-3deg); filter: brightness(1.18) blur(0); }
  100% { opacity: 1; transform: scale(1) rotateY(0deg); filter: brightness(1.08); }
}

@keyframes merge-wait {
  0% { transform: scale(0.94); opacity: 0.35; }
  50% { transform: scale(1.02); opacity: 0.72; }
  100% { transform: scale(0.98); opacity: 0.68; }
}

@keyframes card-shimmer {
  to { transform: translateX(120%); }
}

.admin-user-list {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.admin-user-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 14px;
  display: grid;
  gap: 14px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-form-grid label,
.form-row label {
  color: var(--muted);
  font-size: 13px;
}

.admin-form-grid input,
.admin-user-card .actions input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0c1119;
  padding: 0 12px;
  margin-top: 6px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 20px;
}

.check-row input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.stats.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats.compact .stat {
  padding: 12px;
}

.stats.compact .stat strong {
  font-size: 20px;
}

.pack-test-page .topbar {
  align-items: stretch;
}

.pack-test-page .actions input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0c1119;
  padding: 0 12px;
}

.pack-test-page .nav {
  position: sticky;
  top: 14px;
}

.pack-test-page .nav button,
.pack-test-page .nav a {
  min-height: 40px;
}

.pack-test-page .status-card {
  margin-top: 12px;
}

.pack-test-page .panel {
  box-shadow: 0 16px 58px rgba(0, 0, 0, 0.32);
}

.pack-test-page .brand {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 18px;
  text-align: center;
}

.pack-test-page .brand .logo-crest {
  width: min(168px, 82%);
  height: auto;
  max-height: 176px;
  filter:
    drop-shadow(0 18px 28px rgba(0, 0, 0, 0.56))
    drop-shadow(0 0 24px rgba(244, 201, 93, 0.18));
}

.pack-test-page .brand p {
  width: 100%;
  margin: 0;
  color: #dce7f4;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.01em;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.56);
}

.pack-test-page .disclaimer {
  color: rgba(220, 231, 244, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.logout-button {
  min-width: 180px;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 32, 0.9);
  box-shadow: var(--shadow);
  padding: 26px;
}

.auth-card h1 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.auth-card label, .form-row label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-card .primary {
  width: 100%;
  margin-top: 8px;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.empty {
  color: var(--muted);
  padding: 26px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f4f7fb;
  color: #111720;
  box-shadow: var(--shadow);
  font-weight: 720;
}

.error-box {
  width: 100%;
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 8px;
  padding: 12px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.28);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 900px) {
  body {
    background-position: center;
    background-attachment: scroll;
  }

  .shell { grid-template-columns: 1fr; }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-direction: column; }
  .actions { justify-content: flex-start; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .main { padding: 18px; }
  .reveal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .reveal-modal .reveal-grid {
    display: flex;
    justify-content: center;
  }

  .reveal-modal .reveal-card {
    width: calc((100% - 36px) / 4);
    min-width: 132px;
  }

  .reveal-modal {
    max-height: 96vh;
  }

  .pack-test-page .sidebar {
    position: sticky;
    top: 0;
    z-index: 15;
    padding: 12px 14px 10px;
    background: rgba(7, 10, 15, 0.94);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
  }

  .pack-test-page .brand {
    margin-bottom: 10px;
  }

  .pack-test-page .brand .crest {
    width: 38px;
    height: 38px;
  }

  .pack-test-page .nav {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .pack-test-page .nav::-webkit-scrollbar {
    display: none;
  }

  .pack-test-page .nav button {
    flex: 0 0 auto;
    min-width: max-content;
    border-radius: 999px;
    gap: 6px;
  }

  .pack-test-page .nav button,
  .pack-test-page .nav a {
    min-height: 40px;
    padding: 9px 14px;
    text-align: center;
    justify-content: center;
    font-size: 13px;
  }

  .pack-test-page .status-card {
    display: inline-grid;
    width: calc(50% - 5px);
    margin: 10px 10px 0 0;
    vertical-align: top;
    min-height: 92px;
    padding: 12px;
  }

  .pack-test-page .status-card strong {
    font-size: 24px;
  }

  .pack-test-page .disclaimer {
    display: none;
  }

  .pack-test-page .topbar {
    gap: 14px;
  }

  .pack-test-page .title h2 {
    line-height: 0.98;
  }

  .pack-test-page .actions {
    width: 100%;
    display: grid;
    grid-template-columns: 92px 1fr 1fr;
  }

  .pack-test-page .actions .pill {
    justify-content: center;
    width: 100%;
  }

  .pack-test-page .panel-header {
    align-items: flex-start;
  }

  .pack-open-panel .panel-body {
    padding: 16px;
  }

  .pack-preview {
    width: min(240px, 58vw);
  }

  .odds-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .odds-card {
    min-height: 84px;
    padding: 12px;
  }

  .odds-card strong {
    font-size: 26px;
  }

  .roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roster-slot, .pick-card {
    min-height: 158px;
    padding: 12px;
  }

  .picker-modal {
    align-self: end;
    width: 100%;
    max-height: 88vh;
    border-radius: 14px 14px 0 0;
  }

  .merge-modal {
    align-self: end;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 14px 14px 0 0;
  }

  .merge-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .merge-operator {
    display: none;
  }

  .merge-card.result {
    grid-column: 1 / -1;
  }

  .modal-backdrop {
    padding: 0;
    align-items: end;
  }

  .reveal-modal-backdrop {
    align-items: stretch;
    padding: 0;
    background: #05080d;
  }

  .reveal-modal {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    background:
      radial-gradient(circle at 72% 0%, rgba(244, 201, 93, 0.12), transparent 24%),
      linear-gradient(145deg, #111822, #070d16);
  }

  .reveal-modal .panel-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(12, 17, 25, 0.96);
    backdrop-filter: blur(14px);
  }

  .marquee-signing h2 {
    padding: 0 18px;
  }

  .marquee-signing .reveal-card {
    width: min(300px, 72vw);
  }

  .admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-card .actions {
    display: grid;
    grid-template-columns: 92px 1fr 1fr;
    width: 100%;
  }

  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pack-test-page .shell {
    min-height: 100dvh;
  }

  .pack-test-page .brand h1 {
    font-size: 18px;
  }

  .pack-test-page .brand p {
    max-width: 190px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pack-test-page .panel,
  .pack-test-page .inventory-team {
    background: rgba(12, 17, 25, 0.88);
    backdrop-filter: blur(12px);
  }

  .pack-test-page .table {
    min-width: 560px;
  }

  .pack-test-page .split .panel {
    overflow-x: auto;
  }

  .pack-open-panel .panel-body {
    min-height: 430px;
    justify-content: center;
  }

  .reveal-modal .panel-body {
    min-height: calc(100dvh - 82px);
  }
}

@media (max-width: 560px) {
  .nav { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .table { font-size: 13px; }
  .table th, .table td { padding: 11px 8px; }
  .reveal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .reveal-modal {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .reveal-modal .panel-body {
    padding: 10px;
  }

  .reveal-modal .reveal-grid {
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  .reveal-modal .reveal-card {
    width: calc((100% - 8px) / 2);
    min-width: 0;
  }

  .reveal-modal .pack-stage {
    min-height: 220px;
  }

  .pack-test-page .main {
    padding: 14px 10px 110px;
  }

  .pack-test-page .nav {
    margin-inline: -2px;
  }

  .pack-test-page .topbar {
    margin-bottom: 14px;
  }

  .pack-test-page .title h2 {
    font-size: 34px;
  }

  .pack-test-page .title p {
    font-size: 14px;
  }

  .pack-test-page .actions {
    grid-template-columns: 84px 1fr;
  }

  .pack-test-page .actions #revealEntry,
  .pack-test-page .actions .pill {
    grid-column: 1 / -1;
  }

  .pack-test-page .panel-body {
    padding: 12px;
  }

  .pack-test-page .panel-header {
    padding: 14px;
  }

  .intro-reveal {
    min-height: 74px;
  }

  .pack-stage {
    min-height: 220px;
  }

  .sealed-pack {
    width: min(230px, 66vw);
  }

  .pack-preview {
    width: min(220px, 64vw);
  }

  .reveal-entry-button {
    width: min(320px, 100%);
  }

  .odds-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .odds-card {
    min-height: 78px;
    padding: 11px;
  }

  .odds-card span {
    font-size: 12px;
  }

  .odds-card strong {
    font-size: 24px;
  }

  .intro-reveal strong {
    font-size: 18px;
  }

  .reveal-grid {
    gap: 9px;
  }

  .reveal-face {
    padding: 8px;
  }

  .reveal-face strong {
    font-size: 15px;
  }

  .player-name-full {
    width: 92%;
    max-width: 92%;
    padding: 6px 8px;
    font-size: 13px;
  }

  .card-topline {
    top: 8px;
  }

  .card-topline b {
    padding: 3px 7px;
    font-size: 11px;
  }

  .reveal-front em {
    font-size: 10px;
    padding: 4px 8px;
  }

  .marquee-signing {
    gap: 14px;
  }

  .marquee-signing h2 {
    font-size: clamp(34px, 11vw, 54px);
  }

  .marquee-signing .reveal-card {
    width: min(300px, 76vw);
  }

  .marquee-signing .player-name-full {
    font-size: clamp(24px, 8vw, 36px);
  }

  .roster-grid {
    gap: 9px;
  }

  .pick-grid {
    gap: 9px;
  }

  .roster-slot, .pick-card {
    min-height: 142px;
    padding: 10px;
  }

  .roster-slot strong, .pick-card strong {
    font-size: 17px;
  }

  .picker-list {
    max-height: calc(88vh - 78px);
    padding: 10px;
  }

  .picker-row {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .picker-row em {
    grid-column: 2;
  }

  .form-row {
    display: grid;
    gap: 10px;
  }

  .form-row .primary,
  .form-row .secondary {
    width: 100%;
  }

  .admin-page .main {
    padding: 14px 12px 18px;
  }

  .admin-user-list {
    padding: 10px;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-card .actions {
    grid-template-columns: 82px 1fr;
  }

  .admin-user-card .actions .primary {
    grid-column: 1 / -1;
  }

  .stats.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .stats.compact .stat {
    padding: 10px 8px;
  }

  .inventory-team summary {
    padding: 12px;
  }

  .inventory-grid {
    gap: 8px;
    padding: 10px;
  }

  .inventory-card {
    min-height: 104px;
    padding: 10px;
  }

  .inventory-card strong {
    font-size: 15px;
  }

  .inventory-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .merge-button {
    width: 100%;
    justify-content: center;
  }

  .merge-stage {
    gap: 9px;
    padding: 12px;
  }

  .merge-card {
    min-height: 154px;
    padding: 11px;
  }

  .merge-card.result {
    min-height: 182px;
  }

  .merge-card strong {
    font-size: 21px;
  }

  body.pack-test-page {
    background-size: auto 100%, auto 100%, cover, auto;
    background-position: center center;
  }

  .pack-test-page .sidebar {
    padding: 10px 10px 9px;
  }

  .pack-test-page .brand {
    gap: 9px;
  }

  .pack-test-page .brand .logo-crest {
    width: 44px;
    height: 44px;
  }

  .pack-test-page .brand h1 {
    font-size: 17px;
  }

  .pack-test-page .brand p {
    font-size: 11px;
  }

  .pack-test-page .nav button,
  .pack-test-page .nav a {
    min-height: 38px;
    padding: 8px 13px;
  }

  .pack-test-page .status-card {
    width: calc(50% - 5px);
    min-height: 84px;
    margin-top: 9px;
    padding: 10px;
  }

  .pack-test-page .status-card p {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.15;
  }

  .pack-test-page .title h2 {
    max-width: 100%;
    overflow-wrap: normal;
  }

  .pack-test-page .actions input,
  .pack-test-page .actions button,
  .pack-test-page .actions .pill {
    min-height: 46px;
  }

  .pack-open-panel .panel-body {
    min-height: min(380px, calc(100dvh - 300px));
    gap: 10px;
    padding-block: 20px 18px;
  }

  .pack-preview {
    width: min(220px, 62vw);
  }

  .reveal-entry-button {
    min-height: 46px;
    font-size: 15px;
  }

  .odds-grid {
    gap: 8px;
  }

  .pack-open-panel .panel-body {
    min-height: min(560px, calc(100dvh - 220px));
    gap: 14px;
    padding-block: 18px 16px;
  }

  .pack-open-panel .pack-preview,
  .pack-open-panel .sealed-pack {
    width: min(390px, 92vw);
  }

  .pack-open-panel + .panel {
    margin-top: 14px;
  }

  .odds-card {
    min-height: 74px;
    background-color: rgba(13, 18, 27, 0.72);
  }

  .odds-card strong {
    font-size: 27px;
  }

  .reveal-modal .panel-header {
    padding: 12px 12px 10px;
  }

  .reveal-modal .panel-header h3 {
    font-size: 17px;
  }

  .reveal-modal .panel-header .actions {
    display: flex;
    width: auto;
  }

  .reveal-modal .panel-header .secondary {
    min-height: 40px;
    padding-inline: 14px;
  }

  .reveal-modal .panel-body {
    min-height: calc(100dvh - 72px);
    padding: 9px;
  }

  .reveal-modal .reveal-grid {
    align-content: start;
    padding-bottom: 12px;
  }

  .reveal-modal .reveal-card {
    width: min(46.8vw, 186px);
  }

  .reveal-info-box {
    gap: 8px;
    padding: 34px 8px 12px;
  }

  .player-name-full {
    width: 88%;
    max-width: 88%;
    min-height: 42px;
    display: grid;
    place-items: center;
    font-size: clamp(12px, 4vw, 15px);
    line-height: 0.98;
  }

  .reveal-front em {
    font-size: 10px;
    padding: 4px 8px;
  }

  .marquee-signing {
    padding: 20px 12px;
  }

  .marquee-signing .reveal-card {
    width: min(78vw, 330px);
  }

  .marquee-signing .player-name-full {
    min-height: 64px;
    width: 86%;
    max-width: 86%;
    font-size: clamp(22px, 7.2vw, 36px);
  }

  .roster-grid,
  .pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roster-slot,
  .pick-card {
    border-radius: 8px;
  }

  .club-top {
    gap: 8px;
  }

  .club-top .meta {
    font-size: 12px;
  }

  .picker-modal,
  .merge-modal {
    max-height: 94dvh;
  }

  .picker-row {
    min-height: 68px;
    padding: 11px;
  }

  .picker-row span:nth-child(2) {
    min-width: 0;
  }

  .picker-row strong {
    display: block;
    overflow-wrap: anywhere;
  }

  .inventory-team summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .inventory-team summary strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-card {
    min-height: 126px;
  }

  .inventory-card strong {
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .auth-wrap {
    place-items: start center;
    padding: 18px 12px;
  }

  .auth-card {
    padding: 18px;
    background: rgba(12, 17, 25, 0.92);
    backdrop-filter: blur(14px);
  }

  .auth-card > .logo-crest {
    width: min(190px, 62vw);
  }

  .toast {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .pack-test-page .main {
    padding-inline: 8px;
    padding-bottom: 110px;
  }

  .pack-test-page .title h2 {
    font-size: 30px;
  }

  .pack-test-page .status-card {
    width: 100%;
    min-height: auto;
    margin-right: 0;
  }

  .odds-grid,
  .roster-grid,
  .pick-grid,
  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .reveal-modal .reveal-card {
    width: min(46vw, 168px);
  }

  .player-name-full {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sealed-pack,
  .pack-shine,
  .pack-stage.is-opened .sealed-pack,
  .pack-stage.is-opened .pack-lid,
  .pack-stage.is-opened .pack-burst,
  .reveal-inner,
  .merge-card.source,
  .merge-card.result,
  .merge-card.result::before {
    animation: none;
    transition: none;
  }
}

/* Premium game-shell finish */
.pack-test-page .main {
  position: relative;
}

.pack-test-page .main::before {
  content: "";
  position: fixed;
  inset: 0 0 0 276px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(244, 201, 93, 0.06), transparent 18%),
    radial-gradient(circle at 50% 18%, rgba(255, 240, 163, 0.09), transparent 19%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%);
  mix-blend-mode: screen;
}

.pack-test-page .panel,
.inventory-team,
.picker-modal,
.merge-modal,
.auth-card {
  border-color: rgba(244, 201, 93, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), transparent 18%),
    radial-gradient(circle at 90% 0%, rgba(244, 201, 93, 0.09), transparent 28%),
    linear-gradient(145deg, rgba(15, 23, 36, 0.92), rgba(7, 11, 18, 0.88));
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.panel-header {
  background:
    linear-gradient(90deg, rgba(244, 201, 93, 0.12), rgba(125, 211, 252, 0.045) 48%, transparent),
    rgba(255, 255, 255, 0.018);
}

.panel-header .meta {
  color: #bfd2e8;
  font-weight: 850;
}

.pill {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, var(--gold), var(--mint));
  box-shadow: 0 12px 24px rgba(110, 231, 183, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.badge {
  border: 1px solid rgba(125, 211, 252, 0.28);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--club-primary, #2b3442) 34%, transparent), rgba(125, 211, 252, 0.1)),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pack-open-panel {
  position: relative;
  overflow: hidden;
  min-height: 468px;
}

.pack-open-panel::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 13%;
  width: min(620px, 46vw);
  height: 74px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(244, 201, 93, 0.2), rgba(110, 231, 183, 0.08) 38%, transparent 72%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}

.pack-open-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent),
    radial-gradient(circle at 50% 9%, rgba(255, 240, 163, 0.11), transparent 19%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 18%, rgba(0, 0, 0, 0.18));
  opacity: 0.9;
}

.pack-open-panel .panel-body {
  min-height: 468px;
  position: relative;
  z-index: 2;
  align-content: center;
}

.sealed-pack-art {
  filter:
    drop-shadow(0 30px 36px rgba(0, 0, 0, 0.56))
    drop-shadow(0 0 34px rgba(244, 201, 93, 0.22))
    saturate(1.08) contrast(1.05);
}

.pack-preview {
  width: min(290px, 28vw);
}

.reveal-entry-button {
  width: min(320px, 100%);
}

.reveal-entry-button,
.primary {
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.reveal-entry-button:hover,
.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04) saturate(1.03);
  box-shadow:
    0 18px 38px rgba(110, 231, 183, 0.22),
    0 0 28px rgba(244, 201, 93, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.odds-card,
.roster-slot,
.pick-card,
.inventory-card,
.picker-row,
.merge-card {
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.odds-card::after,
.roster-slot::after,
.pick-card::after,
.inventory-card::after,
.picker-row::after,
.merge-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(255, 255, 255, 0.08), transparent 58%),
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.08), transparent 24%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.odds-card:hover::after,
.roster-slot:hover::after,
.pick-card:hover::after,
.inventory-card.owned:hover::after,
.picker-row:hover::after,
.merge-card:hover::after {
  opacity: 1;
}

.roster-slot,
.pick-card {
  border-color: rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--club-primary, #2b3442) 26%, transparent), transparent 30%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), transparent 34%),
    rgba(8, 13, 22, 0.64);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.roster-slot:hover,
.pick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 201, 93, 0.62);
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(244, 201, 93, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.roster-slot.filled {
  border-color: rgba(110, 231, 183, 0.42);
}

.roster-slot.empty strong,
.pick-card.empty strong {
  color: rgba(244, 247, 251, 0.72);
}

.slot-label,
.inventory-card span,
.picker-row small,
.merge-card span,
.merge-card small {
  color: #b7c8dc;
}

.roster-slot em,
.pick-card em,
.picker-row em,
.inventory-card em,
.merge-card em {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.inventory-team summary {
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--club-primary, #2b3442) 24%, transparent), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
}

.inventory-team summary strong {
  font-family: var(--font-display);
  color: #fff6d5;
  text-transform: uppercase;
}

.inventory-card {
  border-color: rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--club-primary, #2b3442) 20%, transparent), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 48%),
    rgba(7, 12, 20, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.inventory-card.owned:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.inventory-card.missing {
  opacity: 0.28;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 8px, transparent 8px 16px),
    rgba(9, 13, 20, 0.64);
}

.picker-modal,
.merge-modal {
  border-color: rgba(244, 201, 93, 0.24);
}

.picker-row {
  border-color: rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(circle at 0% 50%, color-mix(in srgb, var(--club-primary, #2b3442) 22%, transparent), transparent 32%),
    rgba(255, 255, 255, 0.045);
}

.picker-row:hover,
.picker-row.selected {
  transform: translateY(-1px);
  border-color: rgba(244, 201, 93, 0.62);
}

.table {
  background: rgba(8, 13, 22, 0.22);
}

.table th {
  color: #d7e4f3;
  background: rgba(255, 255, 255, 0.035);
}

.table td {
  color: #e9f0f8;
}

.table tr.clickable {
  transition: background 160ms ease, transform 160ms ease;
}

.table tr.clickable:hover {
  background: linear-gradient(90deg, rgba(244, 201, 93, 0.12), rgba(125, 211, 252, 0.045));
}

.modal-backdrop {
  background:
    radial-gradient(circle at 50% 18%, rgba(244, 201, 93, 0.16), transparent 28%),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.auth-card {
  border-color: rgba(244, 201, 93, 0.22);
}

.form-row input,
.auth-card input,
.pack-test-page .actions input,
.club select {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    #090f18;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.form-row input:focus,
.auth-card input:focus,
.pack-test-page .actions input:focus,
.club select:focus {
  outline: 2px solid rgba(244, 201, 93, 0.28);
  border-color: rgba(244, 201, 93, 0.5);
}

@media (max-width: 900px) {
  .pack-test-page .main::before {
    inset: 0;
  }

  .pack-test-page .sidebar {
    overflow: visible;
  }
}
