:root {
  --bg: #07040c;
  --bg-2: #14081a;
  --line: #3a2a4a;
  --text: #fff6ea;
  --muted: #c4b4d4;
  --green: #3dff8a;
  --red: #ff4d6d;
  --gold: #c9a45a;
  --gold-bright: #e4c56a;
  --blue: #7ae0ff;
  --pink: #ff6ad5;
  --panel: rgba(16, 8, 24, 0.86);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  background:
    radial-gradient(900px 520px at 50% -18%, #2a1638 0%, transparent 58%),
    radial-gradient(700px 420px at 100% 110%, #141a2c 0%, transparent 50%),
    radial-gradient(600px 380px at 0% 100%, #1a1224 0%, transparent 48%),
    #0b0a10;
  color: var(--text);
  font-family: Outfit, system-ui, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, #05040a 100%);
  opacity: 0.85;
}

#app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

button { font-family: inherit; cursor: pointer; }

.site-chrome {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: #0b0a10;
  position: relative;
  z-index: 1;
}

.screen {
  min-height: 100%;
  flex: 1;
  display: grid;
  place-items: center;
  padding: 28px 16px 40px;
  position: relative;
}

.float-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  filter: drop-shadow(0 12px 18px #000a);
}

.float-row img {
  width: 92px;
  height: 122px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--gold);
  transform: rotate(var(--tilt, -8deg));
  animation: floaty 3.6s ease-in-out infinite;
}

.float-row img:nth-child(2) { --tilt: 6deg; animation-delay: 0.2s; }
.float-row img:nth-child(3) { --tilt: -3deg; animation-delay: 0.4s; width: 110px; height: 146px; }
.float-row img:nth-child(4) { --tilt: 8deg; animation-delay: 0.1s; }
.float-row img:nth-child(5) { --tilt: -6deg; animation-delay: 0.3s; }

@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

.hero {
  width: min(940px, 100%);
  background: var(--panel);
  border: 2px solid #c9a45a88;
  padding: 32px;
  box-shadow: 0 0 0 4px #c9a45a18, 0 20px 50px #0008;
  backdrop-filter: blur(8px);
}

.title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 12px;
}

.mark {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: block;
}

.mark.sm {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.mark.md {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.kicker {
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  font-family: Bangers, "Bebas Neue", sans-serif;
  font-size: clamp(56px, 11vw, 104px);
  line-height: 0.9;
  margin: 0;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #f3e6c4 0%, var(--gold) 55%, #8a6a28 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 3px 0 #2a1c08);
}

.lede {
  color: var(--muted);
  max-width: 64ch;
  font-size: 17px;
  line-height: 1.55;
}

.rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0;
}

.rule {
  border: 1px solid var(--line);
  padding: 14px;
  background: linear-gradient(180deg, #24102e 0%, #120814 100%);
}

.rule strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rule p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  padding: 12px 18px;
  background: linear-gradient(180deg, var(--gold-bright), #b8862a);
  color: #1a0b10;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 0 #7a4a00;
}

.btn:hover { translate: 0 -1px; }

.table .btn {
  padding: 7px 14px;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.table {
  display: grid;
  grid-template-rows: auto 1fr;
  flex: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  gap: 4px;
  padding: 4px 8px 0;
}

.table.your-turn {
  box-shadow: inset 0 0 0 3px #c9a45a55;
}

.arena {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) minmax(210px, 250px);
  gap: 12px;
  align-items: stretch;
  padding: 0 10px 6px;
  min-height: 0;
  overflow: hidden;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poster {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.poster p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.win-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.win-row:last-child { margin-bottom: 0; }

.win-row img {
  width: 44px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--gold);
  flex: 0 0 44px;
}

.win-row b {
  display: block;
  font-size: 13px;
}

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

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.stat-line b { color: var(--text); font-family: "IBM Plex Mono", monospace; }

.art-stack {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-bottom: 8px;
}

.art-stack img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--gold);
  transform: rotate(-8deg);
}

.art-stack img:nth-child(2) { transform: rotate(3deg) translateY(-6px); }
.art-stack img:nth-child(3) { transform: rotate(10deg); }

.opp-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(420px, calc(100dvh - 280px));
  overflow: auto;
}

.play-beat {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #100816;
}

.play-beat.fresh {
  border-color: var(--gold);
  box-shadow: 0 0 12px #c9a45a33;
}

.mini-art {
  width: 52px;
  height: 70px;
  flex: 0 0 52px;
  border-radius: 6px;
  background: #222 center/cover no-repeat;
  border: 1px solid var(--gold);
}

.play-beat b {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.play-beat p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.hud {
  width: min(640px, 100%);
  display: grid;
  grid-template-columns: 150px 1fr 168px;
  gap: 10px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.hud.shake { animation: shake 0.35s ease; }
.hud.glow { box-shadow: 0 0 18px #3dff8a88; }
.hud.gold { box-shadow: 0 0 18px #c9a45a88; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

.hud-id h2 {
  margin: 0;
  font-family: Bangers, sans-serif;
  font-size: 20px;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

.turn-banner {
  font-family: Bangers, sans-serif;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--gold);
  position: relative;
  z-index: 1;
  line-height: 1;
}

.log-dock {
  position: absolute;
  right: 8px;
  top: 0;
  bottom: 12px;
  width: 44px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.log-dock.open {
  width: min(280px, 42vw);
}

.log-tab {
  border: 1px solid var(--line);
  background: #120814;
  color: var(--muted);
  padding: 8px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.log-dock .log {
  display: none;
  flex: 1;
  overflow: auto;
  background: #0c0812ee;
  border: 1px solid var(--line);
  padding: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 1.45;
  color: #d8c8e8;
}

.log-dock.open .log { display: block; }

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-left: 96px;
  min-height: 36px;
}

.brand {
  font-family: Bangers, "Bebas Neue", sans-serif;
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--gold);
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}

.fighter {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 1fr) minmax(180px, 280px);
  gap: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px;
  box-shadow: inset 0 0 0 1px #ffffff08;
}

.name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.name-row h2 {
  margin: 0;
  font-family: Bangers, sans-serif;
  font-size: 26px;
  letter-spacing: 0.04em;
}

.bars { margin-top: 4px; }

.bar-label {
  display: flex;
  justify-content: space-between;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.bar {
  height: 10px;
  background: #1a1f2b;
  overflow: hidden;
  margin-bottom: 4px;
  border: 1px solid #000;
}

.fill { height: 100%; transition: width 0.25s ease; }
.fill.hp { background: linear-gradient(90deg, #14c45a, var(--green)); }
.fill.hp.warn { background: linear-gradient(90deg, #c47a14, #ffb020); }
.fill.hp.dead { background: linear-gradient(90deg, #8a1028, var(--red)); }
.fill.bags { background: linear-gradient(90deg, #c49a20, var(--gold)); }

.statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 18px;
}

.chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  border: 1px solid #7ae0ff66;
  padding: 3px 6px;
  color: var(--blue);
  background: #123;
}

.trump-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.piece {
  border: 1px dashed var(--line);
  min-height: 86px;
  display: grid;
  align-items: end;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background-size: cover;
  background-position: center;
  filter: grayscale(1) brightness(0.45);
  border-radius: 8px;
}

.piece span {
  background: #000c;
  padding: 4px;
}

.piece.on {
  filter: none;
  border-style: solid;
  border-color: var(--gold);
  box-shadow: 0 0 16px #c9a45a66;
}

.mid {
  display: none;
}

.mute-btn,
.wallet-btn {
  border: 1px solid var(--line);
  background: #120814;
  color: var(--text);
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wallet-btn {
  border-color: var(--gold);
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: none;
}

.wallet-btn:disabled {
  opacity: 0.6;
}

.mute-btn[aria-pressed="true"] {
  color: var(--muted);
}

.pit {
  width: min(520px, 94%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  position: relative;
  background: radial-gradient(circle at 50% 40%, #3a184488, #0a0610 70%);
  border: 1px solid #c9a45a33;
  border-radius: 16px;
  padding: 6px 16px 8px;
  flex: 0 0 auto;
}

.pit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("art/emblem.svg") center 46% / 72px no-repeat;
  opacity: 0.14;
  pointer-events: none;
}

#fx-stage {
  position: relative;
  width: 100%;
  height: 44px;
  pointer-events: none;
  overflow: hidden;
  flex: 0 0 44px;
}

.fx-name {
  position: absolute;
  left: 50%;
  top: 2px;
  transform: translateX(-50%);
  font-family: Bangers, sans-serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--gold);
  animation: pop 0.45s ease;
  white-space: nowrap;
}

.fx {
  position: absolute;
  left: 50%;
  top: 16px;
  font-family: Bangers, sans-serif;
  font-size: 16px;
  letter-spacing: 0.04em;
  animation: float-fx 0.7s ease forwards;
  white-space: nowrap;
  text-shadow: 0 2px 0 #000;
}

.fx.up,
.fx.down { top: 16px; }
.fx-hit, .fx-self, .fx-dot { color: var(--red); }
.fx-heal { color: var(--green); }
.fx-steal, .fx-gain, .fx-trump { color: var(--gold); }
.fx-status, .fx-draw { color: var(--blue); }

@keyframes float-fx {
  0% { transform: translate(-50%, 12px) scale(0.7); opacity: 0; }
  20% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  100% { transform: translate(-50%, -28px) scale(1); opacity: 0; }
}

@keyframes pop {
  0% { transform: translateX(-50%) scale(0.6); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.hype-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hype-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--blue);
}

.net-line {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.trump-board.mini {
  width: 168px;
  gap: 4px;
}

.trump-board.mini .piece {
  min-height: 36px;
  font-size: 8px;
}

.log {
  height: 170px;
  overflow: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #f0e4ff;
}

.log p { margin: 0 0 8px; }

.hand {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 2px 6px;
  min-height: 0;
  flex: 1 1 auto;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}

.card {
  flex: 0 0 168px;
  height: 278px;
  border: 2px solid #5a3a70;
  background: #120814;
  padding: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  color: inherit;
  overflow: hidden;
  border-radius: 12px;
  transform: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 0 #0006;
}

.card:hover:not(:disabled) {
  transform: translateY(-12px) rotate(-2deg);
  box-shadow: 0 14px 20px #ff2d9d33;
  z-index: 2;
}

.card:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.card .art {
  height: 98px;
  background: #222 center/cover no-repeat;
  position: relative;
  border-bottom: 2px solid #000;
}

.type-pill {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  background: #000c;
  padding: 2px 6px;
}

.cost {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #fff, var(--blue) 40%, #1b5);
  color: #081018;
  font-weight: 800;
  font-size: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
}

.banner {
  padding: 6px 8px 0;
}

.card h3 {
  margin: 0;
  font-family: Outfit, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card .tag {
  color: var(--gold);
  font-size: 13px;
  margin: 4px 0 6px;
}

.card .text {
  font-size: 12px;
  font-weight: 500;
  color: #fff4ea;
  line-height: 1.35;
  padding: 0 8px 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

.card.type-kol { border-color: #c084fc; }
.card.type-coin { border-color: var(--green); }
.card.type-play { border-color: var(--blue); }
.card.type-trump,
.card.legendary { border-color: var(--gold); box-shadow: 0 10px 0 #5a3a00; }

.card.rarity-legendary .art { box-shadow: inset 0 0 18px #c9a45a88; }

.enemy-hand {
  display: flex;
  gap: 6px;
  justify-content: center;
  min-height: 48px;
  flex: 0 0 auto;
}

.card-back {
  width: 34px;
  height: 48px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  background: url("art/card-back.png") center/cover;
  box-shadow: 0 3px 0 #0007;
}

.sheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}

.sheet div {
  border: 1px solid var(--line);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.sheet b {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hype {
  font-family: "IBM Plex Mono", monospace;
  color: var(--blue);
}

.hype-pips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0 4px;
}

.hype-pips i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2a2033;
  border: 1px solid #000;
  display: block;
}

.hype-pips i.on {
  background: radial-gradient(circle at 30% 30%, #fff, var(--blue));
  box-shadow: 0 0 8px var(--blue);
}

.hype-pips.big i {
  width: 13px;
  height: 13px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(5, 6, 10, 0.82);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(560px, 100%);
  background: #140816;
  border: 2px solid var(--gold);
  padding: 28px;
}

.modal h2 {
  font-family: Bangers, "Bebas Neue", sans-serif;
  font-size: 52px;
  margin: 0 0 8px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal p {
  color: var(--muted);
  line-height: 1.5;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.friend-box {
  margin-top: 28px;
  border: 1px solid var(--line);
  padding: 16px;
  background: #120814;
}

.friend-box .kicker { margin-bottom: 8px; }

.code-input {
  width: 140px;
  border: 1px solid var(--line);
  background: #07080b;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 12px;
}

.code-input:focus { outline: 1px solid var(--gold); }

.code-face {
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(36px, 8vw, 64px);
  letter-spacing: 0.22em;
  color: var(--gold);
  margin: 18px 0 24px;
}

@media (max-height: 1100px) {
  .art-stack { display: none; }
}

@media (max-width: 1100px) {
  .arena { grid-template-columns: 1fr; }
  .rail { display: none; }
}

@media (max-width: 980px) {
  .rules { grid-template-columns: 1fr; }
  .hud { grid-template-columns: 1fr; }
  .stage { padding: 0 8px 8px; }
  .float-row img { width: 58px; height: 78px; }
  .float-row img:nth-child(3) { width: 70px; height: 94px; }
}

.hero.builder {
  width: min(1080px, 100%);
}

.builder-screen {
  align-items: start;
}

.deck-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 8px 0 16px;
}

.deck-meta b {
  font-family: "IBM Plex Mono", monospace;
  color: var(--gold);
  font-size: 18px;
}

.deck-pile {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 20px;
  min-height: 44px;
}

.deck-chip {
  border: 1px solid var(--line);
  background: #120814;
  color: var(--text);
  padding: 6px 10px;
  font-size: 13px;
}

.deck-chip.rarity-legendary { border-color: var(--gold); }
.deck-chip.rarity-epic { border-color: #c084fc; }
.deck-chip.rarity-rare { border-color: var(--blue); }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}

.filter-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-btn.on {
  border-color: var(--gold);
  color: var(--gold);
}

.rarity-head {
  margin: 18px 0 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.rarity-head.rarity-legendary { color: var(--gold); }
.rarity-head.rarity-epic { color: #c084fc; }
.rarity-head.rarity-rare { color: var(--blue); }

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

.catalog-card {
  border: 1px solid var(--line);
  background: #120814;
  color: inherit;
  padding: 0 0 10px;
  text-align: left;
  border-radius: 10px;
  overflow: hidden;
}

.catalog-card .art {
  height: 88px;
  background: #222 center/cover no-repeat;
}

.catalog-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px 0;
}

.catalog-card b {
  display: block;
  font-size: 14px;
}

.catalog-card em {
  font-style: normal;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--gold);
  white-space: nowrap;
}

.catalog-meta {
  display: block;
  padding: 2px 10px 0;
  font-size: 11px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.catalog-text {
  margin: 8px 10px 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
}

.catalog-lock {
  margin: 6px 10px 0;
  font-size: 11px;
  color: var(--gold);
}

.catalog-card.full {
  opacity: 0.72;
}

.catalog-card.locked {
  opacity: 0.55;
  filter: grayscale(0.55);
}

.catalog-card.rarity-legendary,
.pack-pull.rarity-legendary { border-color: var(--gold); }
.catalog-card.rarity-epic,
.pack-pull.rarity-epic { border-color: #c084fc; }
.catalog-card.rarity-rare,
.pack-pull.rarity-rare { border-color: var(--blue); }

.pack-shop {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 18px 0 24px;
}

.pack-tile {
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, #1a1010 0%, #0c080c 100%);
  color: inherit;
  padding: 28px 16px;
  border-radius: 14px;
  text-align: center;
}

.pack-tile img {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}

.pack-tile b {
  display: block;
  font-size: 18px;
}

.pack-tile span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-family: "IBM Plex Mono", monospace;
}

.pack-odds {
  display: grid;
  gap: 14px;
  margin: 16px 0 20px;
}

.pack-odds ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.pack-odds p {
  margin: 6px 0 0;
  color: var(--muted);
}

.open-stage {
  min-height: 280px;
  display: grid;
  place-items: center;
  cursor: pointer;
  margin: 16px 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.pack-sealed {
  width: min(220px, 70%);
  aspect-ratio: 3/4;
  border: 3px solid var(--gold);
  border-radius: 16px;
  background: radial-gradient(circle at 50% 30%, #3a2a18, #0a0608 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: pack-wobble 1.4s ease-in-out infinite;
  box-shadow: 0 16px 40px #000a, 0 0 24px #c9a45a44;
}

.pack-sealed img { width: 64px; height: 64px; }
.pack-sealed b { font-size: 22px; }
.pack-sealed span { color: var(--gold); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }

@keyframes pack-wobble {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-8px); }
}

.pack-one {
  display: grid;
  place-items: center;
  gap: 10px;
}

.pack-pull.big {
  width: 180px;
}

.pack-pull.big .art {
  height: 140px;
}

.pack-pull.just-in {
  animation: card-pop 0.35s ease;
}

.pack-pull.facedown .art {
  background: url("art/card-back.png") center/cover;
  height: 80px;
}

@keyframes card-pop {
  0% { transform: scale(0.6) rotate(-8deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.pack-pull {
  width: 120px;
  border: 1px solid var(--line);
  background: #120814;
  border-radius: 10px;
  overflow: hidden;
}

.pack-pull .art {
  height: 80px;
  background: #222 center/cover no-repeat;
}

.pack-pull b,
.pack-pull span {
  display: block;
  padding: 6px 8px 0;
  font-size: 12px;
}

.pack-pull span {
  color: var(--muted);
  padding-bottom: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}
