:root {
  --bg: #12130f;
  --panel: #1d2119;
  --panel-strong: #292d23;
  --text: #f7f4e8;
  --muted: #b8b09e;
  --line: #3d4135;
  --gold: #e6b84a;
  --green: #4fb477;
  --red: #e06258;
  --blue: #5f8dd3;
  --common: #b9b7ad;
  --rare: #57a9e8;
  --epic: #b56ee7;
  --legendary: #efb84f;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.12), transparent 36%),
    linear-gradient(220deg, rgba(0, 0, 0, 0.16), transparent 42%),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
select,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
  padding: 0 16px;
}

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

select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  padding: 0 12px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 128px;
}

.app-shell.app-hidden,
.auth-screen.auth-hidden,
.admin-form.hidden,
.admin-nav.hidden,
.topbar-player.hidden,
.profile-avatar.hidden,
.game-menu-panel.hidden,
.game-menu-option.hidden,
.admin-tools.hidden,
.deck-builder-view.hidden,
.deck-slots-view.hidden,
.hero-picker-grid.hidden,
.edit-panel.hidden,
.battle-loading.hidden,
.battlefield.hidden,
.battle-next-card.hidden,
.battle-hero-badge.hidden,
.battle-hand.hidden,
.battle-help-button.hidden,
.battle-mode-grid.hidden,
.cpu-deck-selection.hidden {
  display: none;
}

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

.auth-panel {
  display: grid;
  gap: 16px;
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 33, 25, 0.94);
  padding: 18px;
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: 0;
}

.auth-tabs,
.auth-form {
  display: grid;
  gap: 10px;
}

.auth-tabs {
  grid-template-columns: 1fr 1fr;
}

.auth-tabs button.active {
  border-color: var(--gold);
  color: var(--gold);
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-form input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  padding: 0 12px;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.admin-form {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  margin-bottom: 14px;
}

.admin-form h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-summary {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.admin-summary p {
  margin: 0;
}

.admin-summary strong {
  color: var(--text);
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-list-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  padding: 8px;
}

.admin-list-item img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

.admin-list-item strong,
.admin-list-item small {
  display: block;
}

.admin-list-item small {
  color: var(--muted);
}

.notice-list-item {
  grid-template-columns: 1fr auto;
}

.danger-action {
  border-color: rgba(224, 98, 88, 0.8);
  color: var(--red);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.topbar-player {
  grid-column: 1;
}

.profile-avatar {
  grid-column: 2;
}

.topbar h1,
.section-heading h2,
.hero h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 1.45rem;
  overflow-wrap: anywhere;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.wallet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  justify-content: flex-start;
  font-weight: 800;
}

.topbar-actions {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topbar-wallet {
  display: none;
}

.topbar-wallet.active {
  display: inline-flex;
  order: 1;
}

.daily-free-packs {
  order: 2;
  display: grid;
  gap: 3px;
  justify-items: center;
  min-height: 58px;
  min-width: 86px;
  border-color: rgba(230, 184, 74, 0.58);
  background: rgba(29, 33, 25, 0.94);
  color: var(--text);
  padding: 6px 8px;
}

.app-shell.packs-topbar .topbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
}

.app-shell.packs-topbar .profile-avatar {
  grid-column: 1;
  align-self: start;
  justify-self: start;
}

.app-shell.packs-topbar .topbar-actions {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  width: 100%;
}

.app-shell.packs-topbar .topbar-wallet.active {
  grid-column: 1;
  align-self: start;
  justify-self: center;
  order: 0;
}

.app-shell.packs-topbar .daily-free-packs {
  grid-column: 2;
  align-self: start;
  justify-self: end;
  order: 0;
}

.daily-free-packs.hidden {
  display: none;
}

.daily-free-packs small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-free-packs strong {
  color: var(--gold);
  font-size: 0.9rem;
}

.daily-pack-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}

.daily-pack-stack img {
  width: 24px;
  height: 32px;
  border: 1px solid rgba(230, 184, 74, 0.7);
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.daily-pack-stack img + img {
  margin-left: -7px;
}

.profile-avatar {
  position: relative;
  display: grid;
  width: 64px;
  min-height: 64px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--panel-strong) 58%, transparent 60%),
    conic-gradient(var(--gold) var(--xp-progress, 0%), rgba(255, 255, 255, 0.18) 0);
  color: var(--text);
  padding: 0;
  box-shadow: var(--shadow);
}

.profile-avatar > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #12130f;
  font-size: 1.35rem;
  font-weight: 900;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar small {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid #12130f;
  border-radius: 50%;
  background: var(--gold);
  color: #1b1609;
  font-size: 0.72rem;
  font-weight: 900;
}

.coin-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #1b1609;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  position: relative;
  display: grid;
  min-height: 422px;
  overflow: hidden;
  border: 1px solid rgba(247, 244, 232, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 42%, rgba(230, 184, 74, 0.16), transparent 30%),
    radial-gradient(circle at 24% 70%, rgba(95, 141, 211, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(18, 24, 23, 0.98), rgba(7, 10, 11, 0.98));
  padding: 22px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 12, 13, 0.74) 0%, rgba(8, 12, 13, 0.32) 44%, transparent 72%),
    url("../assets/ui/logo-tcg.png") 99% 40% / 270px auto no-repeat;
  opacity: 0.72;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  align-self: start;
  display: grid;
  gap: 24px;
  max-width: 260px;
  padding-top: 58px;
}

.hero .eyebrow,
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0;
  color: rgba(230, 184, 74, 0.82);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.inline-icon {
  width: 18px;
  height: 18px;
}

.hero h2 {
  max-width: 10ch;
  margin: 0;
  font-size: 2.68rem;
  line-height: 1.06;
  letter-spacing: 0;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.hero svg,
.home-section svg,
.shop-shortcut svg,
.nav-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.primary-action {
  border-color: transparent;
  background: var(--text);
  color: #1b1609;
  font-weight: 800;
}

.hero-open-pack {
  align-self: end;
  display: grid;
  grid-template-columns: 46px 1fr 24px;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  border: 1px solid rgba(247, 244, 232, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, #f0c85a, #c99725);
  color: #fff;
  padding: 0 18px;
  text-align: left;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

.action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
}

.action-icon-filled {
  background: rgba(255, 255, 255, 0.22);
}

.action-icon svg,
.action-arrow {
  width: 24px;
  height: 24px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.stat span {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
}

.stat small {
  color: var(--muted);
}

.home-section {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.home-section h3 {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: 0;
}

.home-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--gold);
  padding: 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.text-link svg {
  width: 18px;
  height: 18px;
}

.home-collections {
  display: grid;
  grid-auto-columns: minmax(134px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.home-collections::-webkit-scrollbar {
  display: none;
}

.home-collection-card {
  display: grid;
  align-content: end;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid rgba(247, 244, 232, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 10, 11, 0.08), rgba(8, 10, 11, 0.78)),
    var(--collection-image) center 24% / 92px auto no-repeat,
    rgba(16, 19, 18, 0.88);
  padding: 14px;
}

.home-collection-card strong {
  min-height: 42px;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.collection-progress-count {
  margin: 0 0 8px;
  color: rgba(247, 244, 232, 0.9);
  font-size: 0.92rem;
  font-weight: 800;
}

.collection-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(247, 244, 232, 0.1);
}

.collection-progress-fill {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

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

.shop-shortcut {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  border: 1px solid rgba(247, 244, 232, 0.12);
  border-radius: 8px;
  background: rgba(12, 16, 17, 0.72);
  color: var(--text);
  padding: 12px;
  text-align: left;
  box-shadow: none;
}

.shop-shortcut:hover,
.shop-shortcut:focus-visible {
  border-color: rgba(230, 184, 74, 0.58);
  background: rgba(20, 25, 24, 0.92);
}

.shortcut-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: rgba(247, 244, 232, 0.9);
}

.shortcut-icon svg {
  width: 31px;
  height: 31px;
}

.shortcut-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.shortcut-label {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.15;
}

.shortcut-copy small {
  color: rgba(184, 176, 158, 0.9);
  font-size: 0.74rem;
  line-height: 1.25;
}

.trade-status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid rgba(18, 19, 15, 0.9);
  border-radius: 50%;
  color: #10110e;
  font-size: 0.75rem;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.34);
}

.trade-status-badge.hidden {
  display: none;
}

.trade-status-badge.pending {
  background: #f1c84b;
}

.trade-status-badge.accepted {
  background: #42c871;
}

.trade-status-badge.declined {
  background: #e34f4f;
  color: #fff;
}
@media (max-width: 430px) {
  .hero {
    min-height: 422px;
    padding: 18px;
  }

  .hero-copy {
    max-width: 224px;
    padding-top: 52px;
  }

  .hero h2 {
    font-size: 2.32rem;
  }


  .home-shortcuts {
    gap: 8px;
  }

  .shop-shortcut {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 6px;
    min-height: 78px;
    padding: 9px 7px;
  }

  .shortcut-icon {
    width: 26px;
    height: 30px;
  }

  .shortcut-icon svg {
    width: 25px;
    height: 25px;
  }

  .shortcut-label {
    font-size: 0.82rem;
  }

  .shortcut-copy small {
    font-size: 0.66rem;
  }
}

.battle-mode-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 170px));
  justify-content: center;
  align-content: start;
  gap: 14px;
  min-height: 360px;
  background: url("../assets/background-pre-batalha/fundo-pre-batalha.png") top center / 600px auto no-repeat;
  padding-top: 415px;
}

.battle-mode-card {
  display: grid;
  gap: 10px;
  width: 100%;
  min-height: 140px;
  place-items: center;
  border-color: rgba(230, 184, 74, 0.58);
  border-radius: 15%;
  background: rgba(29, 33, 25, 0.94);
  color: var(--text);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}

.battle-mode-icon {
  display: grid;
  min-width: 52px;
  min-height: 52px;
  place-items: center;
  border: 1px solid rgba(230, 184, 74, 0.62);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 900;
}

.battle-loading {
  display: grid;
  min-height: 520px;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.battle-loading strong {
  font-size: 1.1rem;
}

.battle-loading small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.loader-planet {
  width: 80px;
  height: 80px;
  animation: spin 1.8s linear infinite;
}

.loader-planet svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
}

.loader-planet .dot {
  fill: var(--gold);
  stroke: none;
}

.battlefield {
  position: relative;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  min-height: min(78vh, 660px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #030303;
  padding: 14px;
}

.battle-zone {
  display: grid;
  grid-template-rows: 1fr 1.15fr;
  gap: 10px;
  border: 2px solid;
  border-radius: 8px;
  padding: 10px 8px;
}

.cpu-zone {
  border-color: rgba(255, 93, 101, 0.9);
}

.player-zone {
  border-color: rgba(101, 112, 236, 0.95);
}

.battle-identity {
  position: absolute;
  left: 10px;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 62px;
  color: var(--text);
  text-align: center;
  font-size: 0.68rem;
}

.enemy-identity {
  top: 10px;
}

.player-identity {
  bottom: 10px;
}

.battle-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid rgba(230, 184, 74, 0.7);
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--gold);
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 900;
}

.battle-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.battle-identity strong {
  width: 100%;
  overflow-wrap: anywhere;
}

.battle-destroyed-counters {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 8px;
  transform: translate(-50%, -50%);
}

.destroyed-counter {
  display: grid;
  min-width: 48px;
  min-height: 44px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(3, 3, 3, 0.78);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
}

.destroyed-counter span {
  font-size: 1rem;
  line-height: 1;
}

.destroyed-counter small {
  font-size: 0.52rem;
  text-transform: uppercase;
}

.enemy-destroyed {
  color: #ff5d65;
}

.player-destroyed {
  color: #6570ec;
}

.battle-turn-indicator {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 2;
  display: grid;
  min-width: 58px;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(230, 184, 74, 0.75);
  border-radius: 8px;
  background: rgba(3, 3, 3, 0.78);
  color: var(--gold);
  font-weight: 900;
  transform: translateY(-50%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
}

.battle-turn-indicator span {
  font-size: 0.52rem;
  text-transform: uppercase;
}

.battle-turn-indicator strong {
  line-height: 1;
}

.battle-turn-indicator small {
  color: var(--muted);
  font-size: 0.48rem;
  text-transform: uppercase;
}

.battle-end-turn {
  position: absolute;
  top: calc(50% + 52px);
  right: 12px;
  z-index: 2;
  min-height: 32px;
  border-radius: 15px;
  border-color: rgba(230, 184, 74, 0.75);
  background: rgba(3, 3, 3, 0.78);
  color: var(--gold);
  padding: 4px 10px;
  font-size: 0.64rem;
  font-weight: 900;
}

.battle-end-turn:disabled {
  opacity: 0.48;
}

.battle-help-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
  border: 2px solid rgba(230, 184, 74, 0.78);
  border-radius: 999px;
  background: rgba(12, 13, 10, 0.9);
  color: var(--gold);
  padding: 6px 10px 6px 7px;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}

.battle-help-button span {
  display: grid;
  width: 26px;
  min-height: 26px;
  place-items: center;
  border-radius: 50%;
  background: rgba(230, 184, 74, 0.16);
  font-size: 1rem;
}

.battle-help-button strong {
  color: var(--text);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.app-shell.battle-active .battle-help-button {
  display: none;
}

.battle-result-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(86%, 330px);
  border: 2px solid;
  border-radius: 12px;
  background: rgba(12, 13, 10, 0.94);
  padding: 18px 16px;
  text-align: center;
  transform: translate(-50%, -50%);
  animation: battle-result-in 520ms cubic-bezier(0.18, 0.88, 0.25, 1.18);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.battle-result-card.hidden {
  display: none;
}

.battle-result-card.win {
  border-color: #6570ec;
}

.battle-result-card.loss {
  border-color: #ff5d65;
}

.battle-result-card strong {
  overflow-wrap: anywhere;
  font-size: 1.35rem;
  line-height: 1.25;
}

.battle-result-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.battle-result-card button {
  min-height: 38px;
  border-radius: 15px;
  border-color: rgba(230, 184, 74, 0.65);
}

.battle-turn-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  min-width: 190px;
  place-items: center;
  border: 2px solid rgba(230, 184, 74, 0.72);
  border-radius: 999px;
  background: rgba(12, 13, 10, 0.88);
  color: var(--text);
  padding: 12px 18px;
  font-size: 1.02rem;
  font-weight: 900;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.battle-turn-banner.hidden {
  display: none;
}

.battle-turn-banner.player {
  border-color: #6570ec;
}

.battle-turn-banner.cpu {
  border-color: #ff5d65;
}

.battle-turn-banner.show {
  animation: battle-turn-banner-in 1350ms ease both;
}

.battle-ability-banner {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 5;
  display: grid;
  justify-items: center;
  min-width: 210px;
  border: 2px solid #71d37c;
  border-radius: 14px;
  background: rgba(12, 13, 10, 0.92);
  padding: 14px 18px;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.52), 0 0 28px rgba(113, 211, 124, 0.22);
  pointer-events: none;
}

.battle-ability-banner.hidden {
  display: none;
}

.battle-ability-banner strong {
  color: #71d37c;
  font-size: 1.1rem;
  line-height: 1.25;
}

.battle-ability-banner span {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.battle-ability-banner.show {
  animation: battle-ability-banner-in 1500ms ease both;
}

.battle-energy-bubble {
  display: grid;
  min-width: 54px;
  min-height: 54px;
  place-items: center;
  border: 2px solid rgba(230, 184, 74, 0.78);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.28), transparent 34%),
    rgba(12, 13, 10, 0.92);
  color: var(--gold);
  padding: 6px;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
}

.battle-energy-bubble strong {
  font-size: 1rem;
  line-height: 1;
}

.battle-energy-bubble small {
  color: var(--muted);
  font-size: 0.46rem;
  font-weight: 900;
  text-transform: uppercase;
}

.battle-control-toggle {
  display: grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  border-radius: 50%;
  border-color: rgba(230, 184, 74, 0.72);
  background: rgba(29, 33, 25, 0.94);
  color: var(--gold);
  padding: 0;
  font-size: 0.86rem;
  font-weight: 900;
}

.battle-control-toggle svg {
  width: 16px;
  height: 16px;
}

.battle-control-menu {
  position: absolute;
  left: 62px;
  bottom: 0;
  z-index: 6;
  display: grid;
  min-width: 104px;
  border: 1px solid rgba(230, 184, 74, 0.58);
  border-radius: 8px;
  background: rgba(12, 13, 10, 0.96);
  padding: 6px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.battle-control-menu.hidden {
  display: none;
}

.battle-control-menu button {
  min-height: 34px;
  border-radius: 7px;
  color: var(--text);
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.battlefield-row {
  display: grid;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 8vw, 74px);
}

.cpu-bench,
.player-bench {
  grid-template-columns: repeat(3, minmax(62px, 92px));
}

.cpu-active,
.player-active {
  grid-template-columns: minmax(62px, 92px);
}

.battle-slot {
  position: relative;
  display: grid;
  place-items: stretch;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 4px;
  background: transparent;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}

.battle-slot.drop-ready {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(230, 184, 74, 0.22), 0 10px 24px rgba(0, 0, 0, 0.38);
}

.cpu-slot {
  background: transparent;
}

.player-slot {
  background: transparent;
}

.active-slot {
  align-self: center;
}

.battle-next-card {
  position: fixed;
  right: 12px;
  bottom: 154px;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 86px;
  border: 1px solid rgba(230, 184, 74, 0.45);
  border-radius: 8px;
  background: rgba(12, 13, 10, 0.96);
  padding: 6px;
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.42);
}

.battle-next-card > span {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.battle-next-preview,
.battle-next-empty {
  display: grid;
  width: 62px;
  min-height: 82px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 5px;
  background: rgba(24, 27, 48, 0.94);
  color: var(--muted);
  padding: 0;
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
}

.battle-next-preview img {
  width: 100%;
  height: 82px;
  border-radius: 4px;
  object-fit: cover;
}

.battle-hero-badge {
  position: fixed;
  left: 50%;
  bottom: 154px;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 88px;
  border: 1px solid rgba(230, 184, 74, 0.5);
  border-radius: 12px;
  background: rgba(12, 13, 10, 0.96);
  color: var(--text);
  padding: 7px 6px 6px;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.42);
  cursor: pointer;
}

.battle-hero-badge.ready {
  border-color: #71d37c;
  box-shadow: 0 0 0 2px rgba(113, 211, 124, 0.24), 0 -12px 28px rgba(0, 0, 0, 0.42);
}

.battle-hero-badge.empty {
  display: none;
}

.battle-hero-badge img {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(230, 184, 74, 0.78);
  border-radius: 50%;
  object-fit: cover;
}

.battle-hero-badge.ready img {
  border-color: #71d37c;
}

.battle-hero-badge small {
  color: var(--gold);
  font-size: 0.55rem;
  font-weight: 900;
  text-transform: uppercase;
}

.battle-hero-badge.ready small,
.battle-hero-badge.ready em {
  color: #71d37c;
}

.battle-hero-badge strong {
  width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-hero-badge em {
  width: 100%;
  overflow: hidden;
  color: var(--gold);
  font-size: 0.5rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-hand {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 520px);
  margin: 0 auto;
  border: 1px solid rgba(230, 184, 74, 0.45);
  border-radius: 14px 14px 0 0;
  background: rgba(12, 13, 10, 0.96);
  padding: 8px 10px 10px;
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.48);
}

.battle-hand.drop-ready {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(230, 184, 74, 0.22), 0 -18px 40px rgba(0, 0, 0, 0.48);
}

.battle-hand-card {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 4px;
  min-height: 126px;
  padding: 5px;
  border-color: rgba(101, 112, 236, 0.7);
  background: rgba(24, 27, 48, 0.94);
  color: var(--text);
  font-size: 0.62rem;
  text-align: center;
  overflow: hidden;
}

.battle-hand-card.unaffordable {
  border-color: #ff5d65;
  background: rgba(82, 18, 22, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 93, 101, 0.42);
}

.battle-hand-card.unaffordable img {
  filter: grayscale(0.35) brightness(0.72) sepia(0.24) hue-rotate(305deg) saturate(1.25);
}

.battle-hand-card.dragging,
.battle-field-card.dragging {
  opacity: 0.45;
}

.battle-hand-card.selected,
.battle-field-card.selected {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.battle-field-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  overflow: hidden;
  cursor: grab;
  transform-origin: center bottom;
}

.battle-field-card.entering {
  animation: battle-card-enter 360ms ease both;
}

.battle-field-card.attacking {
  animation: battle-card-attack 420ms ease both;
  z-index: 3;
}

.battle-field-card.attacking::after {
  content: "";
  position: absolute;
  inset: -24%;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.92) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: battle-card-slash 360ms ease forwards;
  pointer-events: none;
}

.battle-field-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.battle-hand-card img {
  width: 100%;
  height: 96px;
  border-radius: 4px;
  object-fit: cover;
}

.battle-hand-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-card-stat,
.battle-card-cost {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(18, 19, 15, 0.88);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.battle-card-stat small,
.battle-card-cost small {
  display: block;
  margin-top: 1px;
  font-size: 0.42rem;
}

.battle-card-stat {
  top: 4px;
  width: 28px;
  min-height: 32px;
  border-radius: 7px;
}

.battle-attack-stat {
  left: 4px;
  color: #f08a24;
}

.battle-health-stat {
  right: 4px;
  color: #71d37c;
}

.battle-card-cost {
  right: 50%;
  bottom: 22px;
  width: 30px;
  min-height: 30px;
  border-radius: 50%;
  color: var(--gold);
  transform: translateX(50%);
}

@media (max-width: 390px) {
  .battle-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .battle-mode-card {
    min-height: 118px;
    padding: 10px 6px;
  }

  .battle-mode-icon {
    min-width: 44px;
    min-height: 44px;
  }

  .shortcut-label {
    font-size: 0.72rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: 1.6rem;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.pack-actions {
  display: inline-grid;
  grid-template-columns: 44px auto;
  gap: 8px;
  align-items: center;
}

.icon-button,
.pack-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
}

.menu-lines {
  display: grid;
  gap: 4px;
  width: 20px;
}

.menu-lines span {
  display: block;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.booster-list {
  display: none;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 33, 25, 0.96);
  padding: 10px;
}

.booster-list.open {
  display: grid;
}

.booster-option {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 8px;
  text-align: left;
}

.booster-option.active {
  border-color: var(--gold);
  background: #343322;
}

.booster-option img {
  width: 48px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
}

.booster-option strong,
.booster-option small {
  display: block;
}

.booster-option strong {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.booster-option small {
  color: var(--muted);
  font-size: 0.76rem;
}

.pack-stage {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  place-items: center;
  min-height: 330px;
}

.pack-arrow {
  border-color: rgba(230, 184, 74, 0.45);
  color: var(--gold);
  font-size: 1.35rem;
  font-weight: 900;
}

.pack {
  position: relative;
  display: grid;
  place-items: center;
  width: min(210px, 100%);
  aspect-ratio: 210 / 292;
  border: 2px solid rgba(230, 184, 74, 0.8);
  background-color: #25291f;
  color: var(--text);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pack::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.pack-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pack span {
  position: relative;
  z-index: 1;
  align-self: end;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.pack strong {
  position: relative;
  z-index: 1;
  align-self: start;
  font-size: 2rem;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.9);
}

.message,
.deck-summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--muted);
}

.deck-slot-grid {
  display: grid;
  gap: 12px;
}

.deck-slot {
  display: grid;
  grid-template-columns: 1fr 56px;
  align-items: center;
  gap: 12px;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.deck-slot h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.deck-slot span {
  color: var(--muted);
}

.deck-slot-hero {
  display: inline-grid;
  grid-template-columns: 28px minmax(0, auto);
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.deck-slot-hero small {
  grid-column: 2;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
}

.deck-slot-hero img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.deck-slot-empty-hero {
  display: block;
  margin-top: 10px;
  font-size: 0.84rem;
}

.deck-slot-action {
  width: 56px;
  min-height: 56px;
  padding: 0;
  border-color: var(--gold);
  color: var(--gold);
  font-size: 1.25rem;
  font-weight: 900;
}

.deck-builder-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.deck-builder-header strong {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.deck-hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
  margin-bottom: 12px;
}

.selected-hero-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
}

.selected-hero-card img {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
}

.selected-hero-card strong,
.selected-hero-card small {
  display: block;
}

.selected-hero-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.selected-hero-card .hero-buff-text,
.hero-buff-text {
  display: block;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.25;
}

.hero-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.hero-option {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 8px;
  text-align: left;
}

.hero-option.active {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-option img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  object-fit: cover;
}

.hero-option span {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.hero-option small {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.25;
}

.shop-balance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 18px;
  font-size: 1.45rem;
  font-weight: 900;
}

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

.hero-shop-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.hero-shop-card.owned {
  border-color: rgba(230, 184, 74, 0.58);
}

.hero-shop-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  object-fit: cover;
}

.hero-shop-card h3 {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  font-size: 1rem;
  letter-spacing: 0;
}

.hero-shop-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.hero-shop-footer {
  display: grid;
  gap: 8px;
}

.hero-shop-footer strong {
  color: var(--gold);
  font-size: 0.88rem;
}

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

.game-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 232px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px;
  overflow: hidden;
}

.game-card:not(.locked) {
  cursor: zoom-in;
}

.game-card.common {
  border-color: var(--common);
}

.game-card.rare {
  border-color: var(--rare);
}

.game-card.epic {
  border-color: var(--epic);
}

.game-card.legendary {
  border-color: var(--legendary);
}

.game-card.locked {
  filter: grayscale(1);
  opacity: 0.72;
}

.card-battle-stats {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.card-stat {
  display: grid;
  width: 34px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(18, 19, 15, 0.86);
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.36);
}

.card-stat strong,
.card-stat small {
  display: block;
  line-height: 1;
}

.card-stat strong {
  font-size: 0.9rem;
}

.card-stat small {
  margin-top: 2px;
  font-size: 0.5rem;
}

.attack-stat {
  color: #f08a24;
}

.health-stat {
  color: #71d37c;
}

.card-cost {
  position: absolute;
  right: 50%;
  bottom: 8px;
  z-index: 1;
  display: grid;
  width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(18, 19, 15, 0.88);
  color: var(--gold);
  font-weight: 900;
  transform: translateX(50%);
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.36);
}

.card-cost strong,
.card-cost small {
  display: block;
  line-height: 1;
}

.card-cost strong {
  font-size: 0.9rem;
}

.card-cost small {
  margin-top: 2px;
  font-size: 0.48rem;
}

.card-art {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent),
    var(--panel-strong);
  color: rgba(247, 244, 232, 0.7);
  font-size: 2rem;
  font-weight: 900;
  overflow: hidden;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
}

.card-title span:first-child {
  overflow-wrap: anywhere;
}

.copy-count {
  color: var(--gold);
  white-space: nowrap;
}

.rarity {
  width: max-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: #111;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rarity.common {
  background: var(--common);
}

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

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

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

.card-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.card-pack {
  margin: 0;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: min(calc(100% - 28px), 520px);
  margin: 0 auto 8px;
  padding: 8px;
  border: 1px solid rgba(247, 244, 232, 0.12);
  border-radius: 8px;
  background: rgba(9, 12, 13, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.bottom-nav.editing {
  outline: 2px dashed var(--gold);
  outline-offset: 4px;
  cursor: move;
  user-select: none;
}

.bottom-nav.custom-position {
  right: auto;
  bottom: auto;
  left: var(--nav-x);
  top: var(--nav-y);
}
.game-menu-toggle {
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 52px;
  min-height: 52px;
  border-color: rgba(230, 184, 74, 0.72);
  border-radius: 50%;
  background: rgba(217, 218, 216, 0.95);
  color: #111;
  padding: 0;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.game-menu-panel {
  position: fixed;
  right: 18px;
  bottom: 146px;
  z-index: 4;
  display: grid;
  gap: 8px;
  width: min(230px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 33, 25, 0.96);
  padding: 10px;
  box-shadow: var(--shadow);
}

.game-menu-panel button {
  width: 100%;
}

.game-menu-option.active {
  border-color: var(--gold);
  color: var(--gold);
}

.app-shell.app-hidden ~ .game-menu-toggle,
.app-shell.app-hidden ~ .game-menu-panel,
.app-shell.app-hidden ~ .edit-panel {
  display: none;
}

.app-shell.battle-active .bottom-nav,
.app-shell.battle-active ~ .game-menu-toggle,
.app-shell.battle-active ~ .game-menu-panel,
.app-shell.battle-active ~ .edit-panel {
  display: none;
}

#battleView .battle-heading.hidden,
.app-shell.battle-active #battleView .battle-heading {
  display: none;
}

.edit-panel {
  position: fixed;
  top: 68px;
  right: 14px;
  z-index: 4;
  display: grid;
  gap: 8px;
  width: min(260px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 33, 25, 0.96);
  color: var(--text);
  padding: 12px;
  box-shadow: var(--shadow);
}

.edit-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.nav-button {
  display: grid;
  gap: 4px;
  min-height: 64px;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(247, 244, 232, 0.62);
  padding: 7px 6px;
  font-size: 0.74rem;
  font-weight: 700;
}

.nav-button svg,
.nav-icon {
  width: 23px;
  height: 23px;
  color: currentColor;
}

.nav-button span {
  display: block;
  line-height: 1.1;
}

.nav-button.active {
  border-color: transparent;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(230, 184, 74, 0.16), rgba(230, 184, 74, 0.04));
  color: var(--gold);
}

.nav-button.active svg {
  color: var(--gold);
}
.toast {
  position: fixed;
  right: 14px;
  bottom: 82px;
  left: 14px;
  z-index: 2;
  width: min(calc(100% - 28px), 492px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #25291f;
  color: var(--text);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes battle-card-enter {
  0% {
    opacity: 0;
    filter: brightness(1.8) blur(3px);
    transform: translateY(24px) scale(0.84) rotate(-2deg);
  }

  70% {
    opacity: 1;
    filter: brightness(1.25) blur(0);
    transform: translateY(-4px) scale(1.03) rotate(1deg);
  }

  100% {
    opacity: 1;
    filter: brightness(1) blur(0);
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes battle-card-attack {
  0% {
    filter: brightness(1);
    transform: translateY(0) scale(1);
  }

  42% {
    filter: brightness(1.8);
    transform: translateY(-18px) scale(1.08);
  }

  64% {
    filter: brightness(1.5);
    transform: translateY(10px) scale(1.04);
  }

  100% {
    filter: brightness(1);
    transform: translateY(0) scale(1);
  }
}

@keyframes battle-card-slash {
  0% {
    opacity: 0;
    transform: translateX(-120%) rotate(8deg);
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(120%) rotate(8deg);
  }
}

@keyframes battle-result-in {
  0% {
    opacity: 0;
    filter: brightness(1.8) blur(8px);
    transform: translate(-50%, -44%) scale(0.78);
  }

  68% {
    opacity: 1;
    filter: brightness(1.25) blur(0);
    transform: translate(-50%, -50%) scale(1.04);
  }

  100% {
    opacity: 1;
    filter: brightness(1) blur(0);
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes battle-turn-banner-in {
  0% {
    opacity: 0;
    filter: brightness(1.8) blur(6px);
    transform: translate(-50%, -42%) scale(0.72);
  }

  18% {
    opacity: 1;
    filter: brightness(1.25) blur(0);
    transform: translate(-50%, -50%) scale(1.06);
  }

  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    filter: brightness(1) blur(2px);
    transform: translate(-50%, -56%) scale(0.96);
  }
}

@keyframes battle-ability-banner-in {
  0% {
    opacity: 0;
    filter: brightness(2) blur(8px);
    transform: translate(-50%, -38%) scale(0.72);
  }

  18% {
    opacity: 1;
    filter: brightness(1.45) blur(0);
    transform: translate(-50%, -50%) scale(1.08);
  }

  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    filter: brightness(1) blur(2px);
    transform: translate(-50%, -58%) scale(0.96);
  }
}

.card-modal {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: none;
  place-items: center;
  padding: 18px;
}

.card-modal.active {
  display: grid;
}

.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.78);
}

.notice-modal.active {
  display: grid;
}

.notice-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  width: min(100%, 430px);
  max-height: calc(100vh - 36px);
  border: 1px solid rgba(230, 184, 74, 0.6);
  border-radius: 8px;
  background: #151712;
  padding: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.notice-panel h2,
.notice-panel p {
  margin: 0;
}

.notice-panel h2 {
  overflow-wrap: anywhere;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.notice-body {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.notice-body p {
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-wrap;
}

.friendships-modal {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.78);
}

.friendships-modal.active {
  display: grid;
}

.friendships-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  width: min(100%, 430px);
  max-height: calc(100vh - 36px);
  border: 1px solid rgba(230, 184, 74, 0.6);
  border-radius: 8px;
  background: #151712;
  padding: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.friendships-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.friendships-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.friendships-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 80px;
  max-height: min(62vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.friendship-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px;
}

.friendship-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #1b1609;
  font-weight: 900;
  overflow: hidden;
}

.friendship-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friendship-item strong,
.friendship-item small {
  display: block;
}

.friendship-item small {
  color: var(--muted);
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.78);
}

.profile-modal.active {
  display: grid;
}

.profile-panel {
  display: grid;
  gap: 14px;
  width: min(100%, 430px);
  max-height: calc(100vh - 36px);
  border: 1px solid rgba(230, 184, 74, 0.6);
  border-radius: 8px;
  background: #151712;
  padding: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.profile-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.profile-photo-preview {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--text);
  overflow: hidden;
  font-size: 1.6rem;
  font-weight: 900;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card strong,
.profile-card small {
  display: block;
}

.profile-card small {
  color: var(--muted);
  margin-top: 4px;
}

.profile-upload,
.profile-rename-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.pack-reveal-modal {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.16), transparent 32%),
    rgba(0, 0, 0, 0.82);
}

.pack-reveal-modal.active {
  display: grid;
}

.cpu-difficulty-modal {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.78);
}

.cpu-difficulty-modal.active {
  display: grid;
}

.cpu-difficulty-panel,
.player-duel-panel {
  display: grid;
  gap: 14px;
  width: min(100%, 430px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(230, 184, 74, 0.6);
  border-radius: 8px;
  background: #151712;
  padding: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.player-duel-modal,
.battle-help-modal {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.78);
}

.player-duel-modal.active,
.battle-help-modal.active {
  display: grid;
}

.battle-help-panel {
  display: grid;
  gap: 14px;
  width: min(100%, 460px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(230, 184, 74, 0.6);
  border-radius: 8px;
  background: #151712;
  padding: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.battle-help-content {
  display: grid;
  gap: 12px;
}

.battle-help-content section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.battle-help-content h3 {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.battle-help-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.player-duel-view.hidden {
  display: none;
}

.player-duel-list {
  display: grid;
  gap: 10px;
  max-height: min(56vh, 430px);
  overflow: auto;
}

.player-duel-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px;
}

.player-duel-item strong,
.player-duel-item small {
  display: block;
}

.player-duel-item small,
.player-duel-message,
.player-duel-ready {
  color: var(--muted);
}

.player-duel-item button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.player-duel-message {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.player-duel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.player-duel-ready {
  margin: 0;
  text-align: center;
  font-weight: 900;
}

.player-duel-view .loader-planet {
  margin: 8px auto;
}

#playerDuelWaitingView {
  justify-items: center;
  text-align: center;
}


.trade-panel {
  width: min(100%, 560px);
}

.trade-offers {
  display: grid;
  gap: 10px;
}

.trade-offers:empty {
  display: none;
}

.trade-offers h3 {
  margin: 4px 0 0;
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0;
}


.trade-result-notice {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.trade-result-notice.accepted {
  border-color: rgba(66, 200, 113, 0.76);
}

.trade-result-notice.declined {
  border-color: rgba(227, 79, 79, 0.76);
}

.trade-result-notice strong,
.trade-result-notice small {
  display: block;
}

.trade-result-notice small {
  color: var(--muted);
}
.trade-offer-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
}

.trade-offer-item.muted {
  opacity: 0.82;
}

.trade-offer-item strong,
.trade-offer-item small {
  display: block;
}

.trade-offer-item small {
  color: var(--muted);
}

.trade-offer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}


.trade-filter-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: -2px 0 2px;
}

.trade-filter-row select {
  min-width: 0;
}
.trade-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
}

.trade-card-option {
  display: grid;
  gap: 7px;
  min-height: 178px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px;
  color: var(--text);
  text-align: left;
}

.trade-card-option.common {
  border-color: var(--common);
}

.trade-card-option.rare {
  border-color: var(--rare);
}

.trade-card-option.epic {
  border-color: var(--epic);
}

.trade-card-option.legendary {
  border-color: var(--legendary);
}

.trade-card-art {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #0f100d;
}

.trade-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trade-card-option strong,
.trade-card-option small {
  display: block;
}

.trade-card-option small {
  color: var(--muted);
}

.trade-summary {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.trade-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.trade-summary strong {
  color: var(--text);
}
.cpu-difficulty-options {
  display: grid;
  gap: 10px;
}

.cpu-deck-selection {
  display: grid;
  gap: 12px;
}

.battle-deck-choice-grid {
  display: grid;
  gap: 10px;
}

.battle-deck-choice {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  min-height: 66px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(29, 33, 25, 0.94);
  color: var(--text);
  text-align: left;
}

.battle-deck-choice strong,
.battle-deck-choice small {
  overflow-wrap: anywhere;
}

.battle-deck-choice span {
  color: var(--gold);
  font-weight: 900;
}

.battle-deck-choice small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
}

.battle-deck-choice.selected {
  border-color: var(--gold);
  background: rgba(230, 184, 74, 0.16);
  box-shadow: 0 0 0 2px rgba(230, 184, 74, 0.18);
}

.battle-deck-choice:disabled {
  opacity: 0.42;
}

.pack-reveal-panel {
  display: grid;
  gap: 14px;
  width: min(100%, 520px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(230, 184, 74, 0.55);
  border-radius: 8px;
  background: #151712;
  padding: 14px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}

.pack-reveal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pack-reveal-heading h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.pack-reveal-grid {
  align-items: stretch;
}

.reveal-card-shell {
  position: relative;
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  animation: reveal-card-in 640ms ease forwards;
  animation-delay: var(--delay);
  overflow: hidden;
}

.reveal-card-shell::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 2;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.96) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: reveal-card-light 760ms ease forwards;
  animation-delay: calc(var(--delay) + 120ms);
  pointer-events: none;
}

@keyframes reveal-card-in {
  0% {
    opacity: 0;
    filter: brightness(2.2) blur(5px);
    transform: translateY(18px) scale(0.94);
  }

  55% {
    opacity: 1;
    filter: brightness(1.85) blur(1px);
  }

  100% {
    opacity: 1;
    filter: brightness(1) blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes reveal-card-light {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.78);
  padding: 0;
}

.card-preview {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(100%, 430px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #151712;
  padding: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
}

.card-preview.common {
  border-color: var(--common);
}

.card-preview.rare {
  border-color: var(--rare);
}

.card-preview.epic {
  border-color: var(--epic);
}

.card-preview.legendary {
  border-color: var(--legendary);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 42px;
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(18, 19, 15, 0.82);
  padding: 0;
  font-weight: 800;
}

.preview-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  max-height: 62vh;
  border-radius: 6px;
  background: #0d0f0b;
  overflow: hidden;
}

.preview-art img {
  display: block;
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
}

.preview-art span {
  color: var(--muted);
  font-size: 4rem;
  font-weight: 900;
}

.preview-art .preview-battle-stats {
  top: 12px;
  left: 12px;
  right: 12px;
}

.preview-art .preview-card-cost {
  bottom: 12px;
}

.preview-info {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.preview-info h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.25rem;
  letter-spacing: 0;
}

@media (min-width: 700px) {
  .app-shell {
    padding-top: 26px;
  }

  .reveal-grid,
  .card-grid,
  .hero-picker-grid,
  .hero-shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Full visual redesign pass */
:root {
  --bg: #05090b;
  --panel: rgba(15, 18, 18, 0.88);
  --panel-strong: rgba(22, 25, 24, 0.96);
  --text: #f6f3ec;
  --muted: #b5b1aa;
  --line: rgba(246, 243, 236, 0.16);
  --gold: #e2ad2f;
  --gold-strong: #f0c850;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
}

body {
  background:
    radial-gradient(circle at 50% -12%, rgba(226, 173, 47, 0.08), transparent 28%),
    radial-gradient(circle at 10% 30%, rgba(72, 112, 122, 0.08), transparent 26%),
    linear-gradient(180deg, #05090b 0%, #080b0b 52%, #050606 100%);
  font-family: Arial, Helvetica, sans-serif;
}

button,
select,
input,
textarea {
  border-color: var(--line);
  border-radius: 8px;
}

.app-shell {
  width: min(100%, 760px);
  padding: 22px 28px 132px;
}

.topbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  min-height: 112px;
  margin: -22px -28px 28px;
  border-bottom: 1px solid var(--line);
  padding: 24px 30px 18px;
  background: rgba(4, 7, 9, 0.42);
}

.topbar-player {
  grid-column: 2;
}

.topbar .eyebrow,
.section-heading .eyebrow {
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.topbar h1 {
  font-size: 1.85rem;
  line-height: 1;
}

.profile-avatar {
  grid-column: 1;
  width: 86px;
  min-height: 86px;
  background:
    radial-gradient(circle, rgba(8, 10, 10, 0.98) 56%, transparent 58%),
    conic-gradient(var(--gold-strong) var(--xp-progress, 0%), rgba(255,255,255,0.18) 0);
  box-shadow: none;
}

.profile-avatar > span {
  width: 58px;
  height: 58px;
  background: #090d0e;
  font-size: 1.8rem;
}

.profile-avatar small {
  right: 3px;
  bottom: 2px;
  min-width: 28px;
  height: 28px;
  border-color: #05090b;
  background: var(--gold-strong);
  font-size: 0.86rem;
}

.topbar-actions {
  grid-column: 3;
  gap: 18px;
}

.topbar-wallet.active,
.wallet {
  display: inline-flex;
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 900;
}

.coin-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f5cc56, #c8921f);
  color: #14100a;
}

.coin-icon.small {
  width: 28px;
  height: 28px;
  margin-right: 6px;
  font-size: 0.92rem;
}

.daily-free-packs {
  min-width: 138px;
  min-height: 72px;
  border: 1px solid rgba(246, 243, 236, 0.22);
  background: rgba(11, 12, 13, 0.72);
  padding: 8px 14px;
}

.daily-free-packs small,
.daily-free-packs strong {
  color: var(--text);
  font-size: 1rem;
}

.daily-pack-stack img {
  width: 31px;
  height: 42px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 26px 0 24px;
}

.section-heading h2 {
  font-size: 2.75rem;
  line-height: 1.02;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.primary-action,
.hero-buy-button,
.deck-slot-action,
.battle-mode-card .primary-action,
#openPackButton {
  background: linear-gradient(135deg, #edc24f, #c99423);
  color: #12100b;
  font-weight: 900;
}

.bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: min(calc(100% - 28px), 704px);
  min-height: 112px;
  margin-bottom: 8px;
  border: 1px solid rgba(246, 243, 236, 0.18);
  border-radius: 8px;
  background: rgba(8, 10, 11, 0.92);
  padding: 10px 14px;
}

.nav-button {
  gap: 7px;
  min-height: 88px;
  border: 0;
  background: transparent;
  color: rgba(246, 243, 236, 0.66);
  font-size: 0.98rem;
  font-weight: 900;
}

.nav-button svg,
.nav-icon {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.nav-button.active {
  background: linear-gradient(90deg, rgba(226, 173, 47, 0.18), rgba(226, 173, 47, 0.07));
  color: var(--gold);
}

.nav-trade-badge {
  top: 8px;
  right: 18px;
}

/* Packs */
.pack-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-button,
#boosterMenuToggle,
.battle-help-button {
  min-width: 66px;
  min-height: 66px;
  border: 1px solid rgba(246, 243, 236, 0.18);
  background: rgba(13, 16, 17, 0.86);
  color: var(--text);
}

#openPackButton {
  min-width: 180px;
  min-height: 66px;
  background: var(--text);
  color: #12100b;
}

.booster-list {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px;
}

.booster-option {
  min-height: 82px;
  background: rgba(15, 18, 18, 0.82);
}

.pack-stage {
  grid-template-columns: 58px minmax(220px, 340px) 58px;
  min-height: 650px;
  margin: 20px -28px 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(226, 173, 47, 0.18), transparent 30%),
    linear-gradient(90deg, rgba(0,0,0,0.42), transparent 30%, transparent 70%, rgba(0,0,0,0.42));
}

.pack {
  min-height: 560px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: rgba(18, 20, 19, 0.78);
  box-shadow: 0 18px 60px rgba(226, 173, 47, 0.18);
}

.pack-image {
  width: min(78%, 300px);
  max-height: 390px;
}

.pack strong,
.pack span {
  font-size: 1.45rem;
}

.pack-arrow {
  z-index: 1;
  width: 58px;
  min-height: 58px;
  border-radius: 50%;
  border-color: rgba(246, 243, 236, 0.28);
  background: rgba(27, 28, 28, 0.78);
  color: var(--gold);
  font-size: 2rem;
}

/* Collection and cards */
.filter-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.filter-row select,
.filter-row button,
#clearDeck,
#backToDeckSlots {
  min-height: 64px;
  background: rgba(15, 18, 18, 0.88);
  color: var(--text);
  font-size: 1.05rem;
}

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  min-height: 430px;
  border: 1px solid rgba(246, 243, 236, 0.14);
  background: linear-gradient(180deg, rgba(22, 25, 24, 0.9), rgba(11, 13, 13, 0.95));
  padding: 16px;
  box-shadow: none;
}

.game-card.common,
.game-card.rare,
.game-card.epic,
.game-card.legendary {
  border-color: rgba(226, 173, 47, 0.55);
}

.game-card.locked {
  filter: grayscale(1);
  opacity: 0.72;
}

.card-art {
  height: 184px;
  margin: -2px -2px 12px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-lock-icon {
  display: none;
}

.game-card.locked .card-lock-icon {
  position: absolute;
  inset: 112px 0 auto;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: auto;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: transparent;
}

.game-card.locked .card-lock-icon::before {
  content: "";
  width: 20px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 4px;
}

.card-title {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 900;
}

.copy-count {
  color: var(--gold);
}

.rarity {
  width: fit-content;
  border-radius: 8px;
  padding: 5px 9px;
  color: #0c0d0d;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rarity.common { background: #b9b7ad; }
.rarity.rare { background: #8d43d6; color: #09070d; }
.rarity.epic { background: #b948d6; color: #fff; }
.rarity.legendary { background: #e7b449; }

.card-pack {
  color: var(--green);
}

.card-bottom-row {
  display: grid;
  grid-template-columns: 1fr auto 48px;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.card-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

.card-progress i {
  display: block;
  width: var(--progress);
  height: 100%;
  background: #5db848;
}

.card-cost {
  position: static;
  width: 44px;
  min-height: 44px;
  transform: none;
}

.card-actions {
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}

.card-actions button {
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
}

/* Decks */
.deck-slot-grid {
  gap: 20px;
}

.deck-slot {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 140px;
  min-height: 198px;
  overflow: hidden;
  border: 1px solid rgba(246, 243, 236, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(10,13,14,0.98) 0%, rgba(10,13,14,0.82) 48%, rgba(10,13,14,0.24) 100%),
    var(--deck-hero-image, linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02))) right center / 260px auto no-repeat,
    rgba(16, 19, 19, 0.9);
  padding: 28px;
}

.deck-slot.complete,
.deck-slot.has-hero {
  border-color: var(--gold);
}

.deck-slot h3 {
  font-size: 2rem;
}

.deck-slot span {
  color: var(--muted);
  font-size: 1rem;
}

.deck-slot-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 20px;
  border-radius: 999px;
  background: rgba(77, 180, 92, 0.2);
  color: #7ce385;
  padding: 8px 14px;
  font-weight: 900;
}

.deck-slot:not(.complete) .deck-slot-status {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

.deck-slot-menu {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 32px;
  border: 0;
  background: transparent;
  padding: 0;
}

.deck-slot-action {
  align-self: center;
  justify-self: end;
  display: grid;
  gap: 8px;
  width: 118px;
  min-height: 96px;
  place-items: center;
  border: 1px solid var(--gold);
  background: rgba(13, 15, 16, 0.78);
  color: var(--gold);
}

.deck-builder-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.deck-builder-header strong {
  min-height: 64px;
  border-bottom: 3px solid var(--gold);
  padding: 18px 32px;
  font-size: 1.28rem;
}

.deck-hero-panel {
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 112px;
  border: 1px solid rgba(226, 173, 47, 0.52);
  border-radius: 8px;
  background: rgba(15, 18, 18, 0.74);
  padding: 22px 28px;
}

.selected-hero-card {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 14px;
  align-items: center;
}

.selected-hero-card img {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  object-fit: cover;
}

.deck-summary {
  min-height: 88px;
  border: 1px solid rgba(226, 173, 47, 0.28);
  border-radius: 8px;
  background: rgba(15,18,18,0.88);
  padding: 20px;
  color: var(--gold);
  font-size: 1.1rem;
}

/* Shop */
.shop-balance {
  justify-content: center;
  margin: -12px 0 20px;
  color: var(--text);
  font-size: 1.55rem;
}

.hero-shop-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.hero-shop-card {
  position: relative;
  grid-template-columns: 42% 1fr;
  min-height: 292px;
  overflow: hidden;
  border: 1px solid rgba(226, 173, 47, 0.34);
  border-radius: 8px;
  background: rgba(15, 18, 18, 0.92);
  padding: 0 16px 72px 0;
}

.hero-shop-art img {
  width: 100%;
  height: 100%;
  min-height: 218px;
  object-fit: cover;
}

.hero-shop-content {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px 8px 0 18px;
}

.hero-shop-content h3 {
  margin: 0;
  font-size: 1.45rem;
}

.hero-shop-price strong {
  display: flex;
  align-items: center;
  color: var(--gold);
  font-size: 1.5rem;
}

.hero-buy-button {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  min-height: 52px;
}

/* Battle menu */
.battle-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  min-height: 760px;
  background: url("../assets/background-pre-batalha/fundo-pre-batalha.png") center 40px / min(92%, 680px) auto no-repeat;
  padding-top: 360px;
}

.battle-mode-card {
  align-content: start;
  min-height: 430px;
  border: 1px solid rgba(246, 243, 236, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15,18,18,0.78), rgba(9,10,10,0.96));
  padding: 42px 28px;
}

.battle-mode-card:first-child {
  border-color: var(--gold);
}

.battle-mode-icon {
  width: 64px;
  min-height: 64px;
  margin-bottom: 20px;
  border-color: var(--gold);
  color: var(--gold);
}

.battle-mode-card .shortcut-label {
  font-size: 1.45rem;
  text-transform: uppercase;
}

/* Trade */
.player-duel-modal.active {
  align-items: stretch;
  padding: 0;
}

.player-duel-modal.active .player-duel-panel,
#tradeModal.active .player-duel-panel {
  width: min(100%, 760px);
  max-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #05090b;
  padding: 32px 28px 124px;
}

#tradeModal .player-duel-heading {
  margin-bottom: 24px;
}

#tradeModal .player-duel-heading h2 {
  font-size: 2.7rem;
}

.player-duel-item,
.trade-offer-item {
  grid-template-columns: 72px 1fr auto;
  min-height: 108px;
  border: 1px solid rgba(246, 243, 236, 0.14);
  border-radius: 8px;
  background: rgba(15, 18, 18, 0.9);
  padding: 16px 28px;
}

.friendship-avatar {
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, #f5cc56, #c8921f);
  color: #12100b;
  font-size: 1.4rem;
}

.player-duel-item button,
.trade-offer-actions button {
  min-width: 116px;
  border-color: var(--gold);
  background: transparent;
  color: var(--gold);
  font-weight: 900;
}

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

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

@media (max-width: 560px) {
  .app-shell {
    width: min(100%, 520px);
    padding: 16px 8px 118px;
  }

  .topbar {
    margin: -16px -8px 22px;
    padding: 18px 8px 14px;
    gap: 10px;
  }

  .profile-avatar {
    width: 66px;
    min-height: 66px;
  }

  .profile-avatar > span {
    width: 44px;
    height: 44px;
  }

  .topbar h1 {
    font-size: 1.3rem;
  }

  .daily-free-packs {
    min-width: 90px;
    min-height: 58px;
    padding: 6px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    margin: 22px 0 18px;
  }

  .section-heading h2 {
    font-size: 2rem;
  }

  .bottom-nav {
    width: min(calc(100% - 16px), 504px);
    min-height: 82px;
    padding: 8px;
  }

  .nav-button {
    min-height: 64px;
    font-size: 0.74rem;
  }

  .nav-button svg,
  .nav-icon {
    width: 25px;
    height: 25px;
  }

  .pack-stage {
    grid-template-columns: 44px minmax(190px, 1fr) 44px;
    min-height: 500px;
    margin-right: -8px;
    margin-left: -8px;
  }

  .pack {
    min-height: 430px;
  }

  .pack-image {
    width: min(82%, 230px);
  }

  .card-grid,
  .hero-shop-grid,
  .battle-mode-grid,
  .trade-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .game-card {
    min-height: 360px;
    padding: 10px;
  }

  .card-art {
    height: 142px;
  }

  .deck-slot {
    grid-template-columns: 1fr;
    min-height: 188px;
    padding: 22px;
  }

  .deck-slot-action {
    width: 112px;
    min-height: 78px;
    justify-self: end;
  }

  .hero-shop-card {
    grid-template-columns: 1fr;
    padding: 0 12px 70px;
  }

  .hero-shop-art img {
    height: 180px;
  }

  .battle-mode-grid {
    min-height: auto;
    padding-top: 260px;
  }

  .battle-mode-card {
    min-height: 260px;
    padding: 26px 14px;
  }
}

.game-card .card-description {
  display: -webkit-box;
  min-height: 3.6em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.game-card .card-title span:first-child {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 560px) {
  .game-card {
    min-height: 440px;
  }
}

/* Home/topbar correction pass */
.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  margin: -22px -28px 24px;
  padding: 18px 28px 16px;
}

.profile-avatar {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  width: 68px;
  min-height: 68px;
}

.profile-avatar > span {
  width: 46px;
  height: 46px;
  font-size: 1.35rem;
}

.profile-avatar small {
  right: 0;
  bottom: 0;
  min-width: 24px;
  height: 24px;
  font-size: 0.78rem;
}

.topbar-player {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  min-width: 0;
}

.topbar-player .eyebrow {
  margin: 0 0 2px;
  font-size: 0.76rem;
  line-height: 1.08;
}

.topbar h1 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.05;
}

.topbar-actions {
  display: contents;
}

.topbar-wallet.active {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  order: initial;
  display: inline-flex;
  gap: 7px;
  font-size: 1.45rem;
}

.topbar-wallet .coin-icon {
  width: 34px;
  height: 34px;
}

.daily-free-packs {
  grid-column: 4;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  order: initial;
  min-width: 104px;
  min-height: 62px;
  gap: 2px;
  padding: 6px 8px;
}

.daily-pack-stack img {
  width: 28px;
  height: 38px;
}

.daily-free-packs small,
.daily-free-packs strong {
  font-size: 0.82rem;
  line-height: 1.05;
}

@media (max-width: 560px) {
  .topbar {
    grid-template-columns: 68px minmax(86px, 1fr) auto auto;
    gap: 8px;
    min-height: 96px;
    margin: -16px -8px 22px;
    padding: 16px 8px 14px;
  }

  .profile-avatar {
    width: 64px;
    min-height: 64px;
  }

  .profile-avatar > span {
    width: 42px;
    height: 42px;
  }

  .topbar h1 {
    font-size: 1.18rem;
  }

  .topbar-player .eyebrow {
    font-size: 0.72rem;
  }

  .topbar-wallet.active {
    font-size: 1.34rem;
  }

  .topbar-wallet .coin-icon {
    width: 31px;
    height: 31px;
  }

  .daily-free-packs {
    min-width: 96px;
    min-height: 58px;
  }

  .daily-pack-stack img {
    width: 25px;
    height: 34px;
  }

  .daily-free-packs small,
  .daily-free-packs strong {
    font-size: 0.78rem;
  }
}

/* Packs header correction */
#packsView .section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 18px 0 18px;
}

#packsView .section-heading .eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 900;
}

#packsView .section-heading h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.05;
  letter-spacing: 0;
}

#packsView .section-heading p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

#packsView .pack-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#packsView #boosterMenuToggle {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
}

#packsView #openPackButton {
  min-width: 104px;
  min-height: 42px;
  padding: 0 12px;
  border-color: rgba(246, 243, 236, 0.72);
  border-radius: 8px;
  background: var(--text);
  color: #12100b;
  font-size: 0.82rem;
  font-weight: 900;
}

@media (max-width: 560px) {
  #packsView .section-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin: 18px 8px 16px;
  }

  #packsView .section-heading h2 {
    font-size: 1.48rem;
  }

  #packsView .section-heading p:not(.eyebrow) {
    font-size: 0.78rem;
  }

  #packsView #boosterMenuToggle {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  #packsView #openPackButton {
    min-width: 104px;
    min-height: 40px;
    font-size: 0.78rem;
  }
}

/* Pack artwork correction */
#packsView .pack {
  display: grid;
  place-items: center;
  width: min(76vw, 250px);
  min-height: 360px;
  aspect-ratio: 210 / 292;
  overflow: visible;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: rgba(7, 9, 9, 0.82);
  padding: 10px;
}

#packsView .pack-image {
  position: static;
  inset: auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#packsView .pack span,
#packsView .pack strong {
  display: none;
}

@media (max-width: 560px) {
  #packsView .pack {
    width: min(66vw, 220px);
    min-height: 0;
    aspect-ratio: 210 / 292;
    padding: 8px;
  }

  #packsView .pack-image {
    width: 100%;
    height: 100%;
  }
}

/* Pack carousel selection */
#packsView .booster-list {
  display: none;
}

#packsView .booster-list.open {
  display: grid;
}

#packsView .pack-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 430px;
  margin: 10px -8px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(226, 173, 47, 0.18), transparent 24%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.48), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.48));
}

#packsView .pack-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 0.72fr 1.16fr 0.72fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 430px;
  padding: 0 8px;
}

#packsView .pack-choice {
  display: grid;
  justify-items: center;
  min-width: 0;
}

#packsView .pack-choice-body {
  display: grid;
  width: 100%;
  min-height: 330px;
  align-content: start;
  justify-items: center;
  gap: 8px;
  border: 1px solid rgba(246, 243, 236, 0.12);
  border-radius: 8px;
  background: rgba(10, 13, 13, 0.62);
  color: var(--text);
  padding: 12px 8px;
  text-align: center;
}

#packsView .pack-choice.active .pack-choice-body {
  min-height: 410px;
  border: 2px solid var(--gold);
  background: rgba(13, 15, 15, 0.86);
  box-shadow: 0 18px 50px rgba(226, 173, 47, 0.2);
}

#packsView .pack-choice.side .pack-choice-body {
  opacity: 0.78;
  transform: scale(0.94);
}

#packsView .pack-choice img {
  width: min(88%, 118px);
  height: 188px;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.42));
}

#packsView .pack-choice.active img {
  width: min(92%, 164px);
  height: 245px;
}

#packsView .pack-choice strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.15;
}

#packsView .pack-choice.active strong {
  font-size: 1.05rem;
}

#packsView .pack-card-count {
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--gold);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 900;
}

#packsView .pack-choice small {
  min-height: 28px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

#packsView .pack-progress-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

#packsView .pack-progress {
  display: block;
  width: 82%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(246, 243, 236, 0.12);
}

#packsView .pack-progress i {
  display: block;
  width: var(--progress);
  height: 100%;
  background: var(--gold);
}

#packsView .pack-choice-left .pack-progress i {
  background: #53b647;
}

#packsView .pack-choice-right .pack-progress i {
  background: #b146dc;
}

#packsView .pack-select-button {
  width: min(86%, 172px);
  min-height: 46px;
  margin-top: -60px;
  border: 0;
  background: linear-gradient(135deg, #edc24f, #c99423);
  color: #12100b;
  font-size: 0.88rem;
  font-weight: 900;
  z-index: 2;
}

#packsView .pack-arrow {
  position: absolute;
  top: 47%;
  z-index: 3;
  width: 42px;
  min-height: 42px;
  border-radius: 50%;
  background: rgba(25, 26, 26, 0.86);
  color: var(--gold);
  font-size: 1.5rem;
}

#packsView .pack-arrow-left {
  left: calc(28% - 20px);
}

#packsView .pack-arrow-right {
  right: calc(28% - 20px);
}

#packsView .sr-pack-trigger {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 560px) {
  #packsView .pack-stage {
    min-height: 430px;
    margin: 8px -8px 20px;
  }

  #packsView .pack-carousel {
    grid-template-columns: 0.7fr 1.2fr 0.7fr;
    min-height: 430px;
    gap: 6px;
    padding: 0 2px;
  }

  #packsView .pack-choice-body {
    min-height: 310px;
    padding: 10px 5px;
  }

  #packsView .pack-choice.active .pack-choice-body {
    min-height: 405px;
  }

  #packsView .pack-choice img {
    height: 164px;
  }

  #packsView .pack-choice.active img {
    height: 238px;
  }

  #packsView .pack-choice strong {
    font-size: 0.82rem;
  }

  #packsView .pack-choice.active strong {
    font-size: 0.98rem;
  }

  #packsView .pack-choice small {
    display: none;
  }

  #packsView .pack-select-button {
    min-height: 42px;
    margin-top: -56px;
  }

  #packsView .pack-arrow-left {
    left: calc(27% - 18px);
  }

  #packsView .pack-arrow-right {
    right: calc(27% - 18px);
  }
}
/* Hide removed pack select button if cached markup exists */
#packsView .pack-select-button {
  display: none;
}

/* Topbar compact information sizing */
.topbar {
  grid-template-columns: 64px minmax(76px, 1fr) minmax(70px, auto) 102px;
}

.topbar-wallet.active {
  max-width: 92px;
  gap: 5px;
  font-size: 1.05rem;
  line-height: 1;
  white-space: nowrap;
}

.topbar-wallet .coin-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  font-size: 1rem;
}

.daily-free-packs {
  width: 102px;
  min-width: 102px;
  min-height: 58px;
  align-content: center;
  padding: 5px 7px;
  overflow: hidden;
}

.daily-free-packs strong {
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
}

.daily-free-packs small {
  max-width: 100%;
  font-size: 0.68rem;
  line-height: 1.05;
  white-space: normal;
  text-align: center;
}

@media (max-width: 560px) {
  .topbar {
    grid-template-columns: 64px minmax(76px, 1fr) minmax(64px, auto) 96px;
    gap: 6px;
  }

  .topbar-wallet.active {
    max-width: 82px;
    font-size: 1rem;
  }

  .topbar-wallet .coin-icon {
    width: 28px;
    height: 28px;
  }

  .daily-free-packs {
    width: 96px;
    min-width: 96px;
    min-height: 56px;
  }
}

/* Extra compact topbar sizing */
.topbar {
  grid-template-columns: 58px minmax(72px, 1fr) minmax(58px, auto) 88px;
  min-height: 84px;
  gap: 5px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.profile-avatar {
  width: 56px;
  min-height: 56px;
}

.profile-avatar > span {
  width: 36px;
  height: 36px;
  font-size: 1.08rem;
}

.profile-avatar small {
  min-width: 21px;
  height: 21px;
  font-size: 0.68rem;
}

.topbar-player .eyebrow {
  font-size: 0.66rem;
}

.topbar h1 {
  font-size: 1.05rem;
}

.topbar-wallet.active {
  max-width: 70px;
  gap: 4px;
  font-size: 0.92rem;
}

.topbar-wallet .coin-icon {
  width: 27px;
  height: 27px;
  font-size: 0.9rem;
}

.daily-free-packs {
  width: 88px;
  min-width: 88px;
  min-height: 50px;
  padding: 4px 6px;
}

.daily-free-packs strong {
  font-size: 0.62rem;
}

.daily-free-packs small {
  font-size: 0.6rem;
}

@media (max-width: 560px) {
  .topbar {
    grid-template-columns: 58px minmax(72px, 1fr) minmax(58px, auto) 88px;
    min-height: 84px;
    gap: 5px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .profile-avatar {
    width: 56px;
    min-height: 56px;
  }

  .profile-avatar > span {
    width: 36px;
    height: 36px;
  }

  .topbar h1 {
    font-size: 1.05rem;
  }

  .topbar-player .eyebrow {
    font-size: 0.66rem;
  }

  .topbar-wallet.active {
    max-width: 70px;
    font-size: 0.92rem;
  }

  .topbar-wallet .coin-icon {
    width: 27px;
    height: 27px;
  }

  .daily-free-packs {
    width: 88px;
    min-width: 88px;
    min-height: 50px;
  }
}

/* Center wallet in the topbar */
.topbar-wallet.active {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  z-index: 1;
  transform: translateX(50px);
}

.profile-avatar,
.topbar-player,
.daily-free-packs {
  z-index: 2;
}

/* Collection summary card */
.collection-heading {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  align-items: center;
}

.collection-summary-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 72px;
  border: 1px solid rgba(246, 243, 236, 0.12);
  border-radius: 8px;
  background: rgba(15, 18, 18, 0.88);
  padding: 12px 14px;
}

.collection-summary-card svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.collection-summary-card span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.collection-summary-card strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
}

.collection-summary-card strong b {
  font: inherit;
}

.collection-summary-card small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
}

.collection-summary-track {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(246, 243, 236, 0.12);
}

.collection-summary-track em {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

@media (max-width: 560px) {
  .collection-heading {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 178px);
  }

  .collection-summary-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    min-height: 62px;
    padding: 10px;
  }

  .collection-summary-card svg {
    width: 28px;
    height: 28px;
  }

  .collection-summary-card strong {
    font-size: 0.9rem;
  }

  .collection-summary-card small {
    font-size: 0.66rem;
  }
}

/* Locked card icon fix */
.card-art {
  position: relative;
}

.card-lock-icon {
  display: none;
}

.game-card.locked .card-lock-icon {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.game-card.locked .card-lock-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.game-card.locked .card-lock-icon::before {
  content: none;
}

/* Deck slot icon correction */
.deck-slot-hero-badge {
  position: absolute;
  right: 34px;
  top: 50%;
  z-index: 1;
  width: 118px;
  height: 118px;
  transform: translateY(-50%);
  border: 1px solid rgba(226, 173, 47, 0.62);
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.62);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.deck-slot-hero-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deck-slot.has-hero .deck-slot-action {
  position: relative;
  z-index: 2;
}

.deck-slot-copy span b {
  display: inline-block;
  margin: 0 7px;
  color: rgba(246, 243, 236, 0.48);
  font-size: 1.05em;
  line-height: 1;
}

.deck-slot-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text);
}

.deck-slot-menu span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.deck-slot-action strong {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--gold);
  font-size: 1.8rem;
  line-height: 1;
}

.deck-slot-action svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .deck-slot-hero-badge {
    right: 22px;
    width: 82px;
    height: 82px;
    opacity: 0.9;
  }
}
/* Deck slot reference layout */
.deck-slot {
  min-height: 176px;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  gap: 20px;
  border-radius: 22px;
  border-color: rgba(226, 173, 47, 0.78);
  background:
    linear-gradient(90deg, rgba(7, 9, 10, 0.98) 0%, rgba(9, 12, 13, 0.94) 32%, rgba(9, 12, 13, 0.52) 56%, rgba(9, 12, 13, 0.82) 100%),
    linear-gradient(180deg, rgba(7, 9, 10, 0.04) 0%, rgba(7, 9, 10, 0.82) 100%),
    var(--deck-hero-image, linear-gradient(120deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02))) right center / 48% 135% no-repeat,
    rgba(15, 18, 18, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 18px 44px rgba(0, 0, 0, 0.28);
  padding: 26px 30px;
}

.deck-slot-hero-badge {
  display: none;
}

.deck-slot-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.deck-slot-copy .eyebrow {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.86rem;
}

.deck-slot h3 {
  margin-bottom: 16px;
  font-size: clamp(1.75rem, 4.6vw, 2.3rem);
}

.deck-slot-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(246, 243, 236, 0.78) !important;
  font-size: 1.05rem !important;
}

.deck-slot-meta-icon {
  display: inline-flex;
  width: 21px;
  height: 21px;
  color: rgba(246, 243, 236, 0.84);
}

.deck-slot-meta-icon svg,
.deck-slot-status svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.deck-slot-status {
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 15px;
  background: rgba(60, 153, 73, 0.28);
  color: #7ee48a;
}

.deck-slot-status svg {
  width: 16px;
  height: 16px;
  color: #7ee48a;
}

.deck-slot-action {
  position: relative;
  z-index: 2;
  width: 138px;
  min-height: 80px;
  grid-template-columns: auto auto;
  gap: 10px;
  border-radius: 16px;
  background: rgba(9, 11, 12, 0.82);
  font-size: 1.06rem;
}

.deck-slot-action strong {
  width: 26px;
  height: 26px;
}

.deck-slot-action svg {
  width: 26px;
  height: 26px;
}

.deck-slot-menu {
  top: 22px;
  right: 22px;
  z-index: 3;
  width: 44px;
  min-height: 44px;
  border-radius: 999px;
  background: rgba(3, 4, 5, 0.5);
  color: rgba(246, 243, 236, 0.82);
}

@media (max-width: 640px) {
  .deck-slot {
    min-height: 236px;
    grid-template-columns: 1fr;
    background:
      linear-gradient(90deg, rgba(7, 9, 10, 0.98) 0%, rgba(9, 12, 13, 0.82) 56%, rgba(9, 12, 13, 0.6) 100%),
      linear-gradient(180deg, rgba(7, 9, 10, 0.06) 0%, rgba(7, 9, 10, 0.86) 100%),
      var(--deck-hero-image, linear-gradient(120deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02))) right 18px center / 56% auto no-repeat,
      rgba(15, 18, 18, 0.96);
    padding: 24px;
  }

  .deck-slot-action {
    justify-self: end;
    width: 112px;
    min-height: 74px;
  }
}
/* Deck slot exact reference pass */
.deck-slot {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 128px !important;
  min-height: 192px !important;
  align-items: center !important;
  gap: 18px !important;
  overflow: hidden !important;
  border: 1px solid rgba(226, 173, 47, 0.95) !important;
  border-radius: 22px !important;
  background: rgba(9, 12, 13, 0.96) !important;
  padding: 28px 30px !important;
}

.deck-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 10, 11, 1) 0%, rgba(8, 10, 11, 0.98) 34%, rgba(8, 10, 11, 0.62) 58%, rgba(8, 10, 11, 0.88) 100%),
    radial-gradient(circle at 73% 48%, rgba(226, 173, 47, 0.16), transparent 34%);
  pointer-events: none;
}

.deck-slot-art {
  position: absolute;
  top: 0;
  right: 72px;
  bottom: 0;
  z-index: 0;
  display: flex;
  width: min(48%, 360px);
  align-items: center;
  justify-content: center;
  opacity: 0.72;
  filter: saturate(0.85) contrast(1.05);
  pointer-events: none;
}

.deck-slot-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,10,11,0.62), rgba(8,10,11,0.08) 42%, rgba(8,10,11,0.72));
}

.deck-slot-art img {
  width: 100%;
  height: 118%;
  object-fit: cover;
  object-position: center;
}

.deck-slot-art svg {
  width: min(74%, 210px);
  height: 86%;
  fill: none;
  stroke: rgba(226, 173, 47, 0.34);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.55));
}

.deck-slot-copy,
.deck-slot-action,
.deck-slot-menu {
  position: relative !important;
  z-index: 2 !important;
}

.deck-slot-menu {
  top: 24px !important;
  right: 24px !important;
  width: 42px !important;
  min-height: 42px !important;
  background: rgba(0, 0, 0, 0.28) !important;
}

.deck-slot-copy .eyebrow {
  margin: 0 0 12px !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
}

.deck-slot h3 {
  margin: 0 0 17px !important;
  font-size: 2rem !important;
  line-height: 1 !important;
}

.deck-slot-meta {
  gap: 8px !important;
  font-size: 1rem !important;
  line-height: 1.2 !important;
}

.deck-slot-meta-icon {
  width: 19px !important;
  height: 19px !important;
}

.deck-slot-status {
  margin-top: 18px !important;
  padding: 9px 16px !important;
  border-radius: 999px !important;
  font-size: 0.92rem !important;
}

.deck-slot-action {
  width: 112px !important;
  min-height: 74px !important;
  align-self: center !important;
  justify-self: end !important;
  grid-template-columns: auto auto !important;
  gap: 10px !important;
  border-radius: 14px !important;
  padding: 0 14px !important;
  background: rgba(8, 10, 11, 0.78) !important;
}

.deck-slot-action strong,
.deck-slot-action svg {
  width: 25px !important;
  height: 25px !important;
}

@media (max-width: 640px) {
  .deck-slot {
    grid-template-columns: minmax(0, 1fr) 112px !important;
    min-height: 186px !important;
    gap: 12px !important;
    padding: 24px 24px !important;
  }

  .deck-slot-art {
    right: 64px;
    width: 52%;
    opacity: 0.62;
  }

  .deck-slot h3 {
    font-size: 1.78rem !important;
  }

  .deck-slot-meta {
    max-width: 210px;
    font-size: 0.94rem !important;
  }

  .deck-slot-action {
    width: 104px !important;
    min-height: 47px !important;
    padding: 0 10px !important;
  }
}
/* Deck slot hard layout fix */
.deck-slot {
  height: 192px !important;
  max-height: 192px !important;
  grid-auto-rows: 1fr !important;
}

.deck-slot-copy {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: center !important;
}

.deck-slot-action {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: end !important;
}

.deck-slot-meta {
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  max-width: none !important;
}

.deck-slot-meta-icon {
  flex: 0 0 auto !important;
}

@media (max-width: 640px) {
  .deck-slot {
    height: 192px !important;
    max-height: 192px !important;
    grid-template-columns: minmax(0, 1fr) 104px !important;
  }

  .deck-slot-copy {
    padding-right: 0 !important;
  }

  .deck-slot-meta {
    gap: 6px !important;
    font-size: 0.82rem !important;
  }

  .deck-slot-meta-icon {
    width: 16px !important;
    height: 16px !important;
  }

  .deck-slot-status {
    font-size: 0.82rem !important;
  }
}
/* Deck slot background art visibility */
.deck-slot-art {
  opacity: 0.82 !important;
}

.deck-slot-art svg {
  width: min(82%, 240px) !important;
  stroke: rgba(226, 173, 47, 0.48) !important;
}

.deck-slot.has-hero .deck-slot-art {
  opacity: 0.72 !important;
}

@media (max-width: 640px) {
  .deck-slot-art {
    opacity: 0.78 !important;
  }

  .deck-slot.has-hero .deck-slot-art {
    opacity: 0.68 !important;
  }
}
/* Trade standalone screen */
.trade-screen {
  padding-bottom: 108px;
}

.trade-screen-heading {
  align-items: start;
  gap: 18px;
}

.trade-screen-heading > div p:not(.eyebrow) {
  max-width: 520px;
  color: var(--muted);
}

.trade-screen-heading .battle-help-button {
  min-width: 144px;
  min-height: 48px;
  border-radius: 999px;
  background: rgba(226, 173, 47, 0.1);
}

.trade-page-panel {
  width: 100%;
  max-width: none;
  border: 0;
  background: transparent;
  padding: 0;
}

.trade-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin: 18px 0 18px;
}

.trade-search-field {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(246, 243, 236, 0.14);
  border-radius: 8px;
  background: rgba(14, 17, 18, 0.78);
  padding: 0 18px;
  color: var(--muted);
}

.trade-search-field svg,
.trade-filter-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trade-search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.trade-search-field input::placeholder {
  color: rgba(246, 243, 236, 0.5);
}

.trade-filter-button {
  display: inline-flex;
  min-width: 112px;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(246, 243, 236, 0.14);
  border-radius: 8px;
  background: rgba(14, 17, 18, 0.78);
  color: var(--text);
  font-weight: 900;
}

.trade-screen .player-duel-list {
  display: grid;
  gap: 10px;
}

.trade-screen .player-duel-message {
  margin: 0 0 10px;
}

.trade-screen .player-duel-item {
  min-height: 82px;
  border: 1px solid rgba(246, 243, 236, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 21, 22, 0.92), rgba(12, 14, 15, 0.92));
  padding: 14px 20px;
}

.trade-screen .friendship-avatar {
  width: 56px;
  height: 56px;
  border-color: rgba(226, 173, 47, 0.86);
  background: linear-gradient(135deg, #f0c84a, #d99b1f);
  color: #060606;
  font-size: 1.25rem;
}

.trade-screen .friendship-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trade-screen .player-duel-item button {
  min-width: 98px;
  border-color: rgba(226, 173, 47, 0.72);
  color: var(--gold);
}

@media (max-width: 640px) {
  .trade-screen-heading {
    grid-template-columns: 1fr;
  }

  .trade-screen-heading .battle-help-button {
    justify-self: start;
  }

  .trade-toolbar {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .trade-filter-button {
    min-width: 58px;
    padding: 0 14px;
  }

  .trade-filter-button span {
    display: none;
  }

  .trade-screen .player-duel-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 14px;
  }

  .trade-screen .player-duel-item button {
    min-width: 78px;
  }
}
/* Battle menu correction pass */
#battleView:not(.battle-active) {
  padding-bottom: 110px;
}

#battleView .battle-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  margin-bottom: 10px;
}

#battleView .battle-heading h2 {
  margin: 2px 0 8px;
}

#battleView .battle-heading p:not(.eyebrow) {
  max-width: 430px;
  color: var(--muted);
}

#battleView .battle-help-button {
  min-width: 144px;
  min-height: 52px;
  align-self: start;
  border-radius: 999px;
  background: rgba(226, 173, 47, 0.08);
  white-space: nowrap;
}

#battleView .battle-mode-grid {
  position: relative;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  min-height: 640px !important;
  align-items: end;
  margin-top: 0;
  padding: 330px 0 0 !important;
  background:
    linear-gradient(180deg, rgba(4, 7, 8, 0) 0%, rgba(4, 7, 8, 0.16) 42%, rgba(4, 7, 8, 0.9) 84%),
    url("../assets/background-pre-batalha/fundo-pre-batalha.png") center 18px / min(96%, 620px) auto no-repeat !important;
}

#battleView .battle-mode-card {
  position: relative;
  display: grid;
  min-height: 330px !important;
  align-content: start;
  justify-items: center;
  overflow: hidden;
  border: 1px solid rgba(246, 243, 236, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 17, 18, 0.86), rgba(8, 10, 11, 0.96));
  padding: 30px 18px 78px !important;
  text-align: center;
}

#battleView .battle-mode-card:first-child {
  border-color: rgba(226, 173, 47, 0.95);
  box-shadow: 0 0 0 1px rgba(226, 173, 47, 0.1), 0 20px 46px rgba(0, 0, 0, 0.32);
}

#battleView .battle-mode-card::before {
  content: "";
  position: absolute;
  inset: auto 0 48px;
  height: 150px;
  opacity: 0.45;
  background: var(--battle-card-art) center bottom / contain no-repeat;
  pointer-events: none;
}

#battleView .battle-mode-pvp {
  --battle-card-art: url("../assets/background-pre-batalha/fundo-pre-batalha.png");
}

#battleView .battle-mode-cpu {
  --battle-card-art: url("../assets/background-pre-batalha/fundo-pre-batalha.png");
}

#battleView .battle-mode-icon {
  display: inline-grid;
  width: 58px !important;
  height: 58px !important;
  min-height: 58px !important;
  place-items: center;
  margin: 0 0 20px !important;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(226, 173, 47, 0.08);
}

#battleView .battle-mode-icon svg,
#battleView .battle-mode-cta svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#battleView .battle-mode-card > strong {
  color: var(--text);
  font-size: 1.36rem;
  line-height: 1.1;
  text-transform: uppercase;
}

#battleView .battle-mode-card > small {
  margin-top: 4px;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 900;
}

#battleView .battle-mode-copy {
  display: block;
  max-width: 230px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

#battleView .battle-mode-cta {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 1;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #edc44c, #c99421);
  color: #090806;
  font-size: 0.94rem;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  #battleView .battle-heading {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px;
  }

  #battleView .battle-heading p:not(.eyebrow) {
    max-width: 250px;
    font-size: 0.94rem;
    line-height: 1.35;
  }

  #battleView .battle-help-button {
    min-width: 118px;
    min-height: 42px;
    padding: 0 12px;
    font-size: 0.76rem;
  }

  #battleView .battle-help-button span {
    width: 26px;
    min-height: 26px;
    font-size: 0.86rem;
  }

  #battleView .battle-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    min-height: 515px !important;
    padding-top: 250px !important;
    background:
      linear-gradient(180deg, rgba(4, 7, 8, 0) 0%, rgba(4, 7, 8, 0.18) 44%, rgba(4, 7, 8, 0.94) 84%),
      url("../assets/background-pre-batalha/fundo-pre-batalha.png") center 18px / 390px auto no-repeat !important;
  }

  #battleView .battle-mode-card {
    min-height: 276px !important;
    padding: 26px 10px 66px !important;
  }

  #battleView .battle-mode-card::before {
    height: 104px;
    bottom: 48px;
    opacity: 0.32;
  }

  #battleView .battle-mode-icon {
    width: 58px !important;
    height: 58px !important;
    min-height: 58px !important;
    margin-bottom: 16px !important;
  }

  #battleView .battle-mode-card > strong {
    font-size: 1rem;
  }

  #battleView .battle-mode-copy {
    max-width: 150px;
    margin-top: 10px;
    font-size: 0.68rem;
  }

  #battleView .battle-mode-cta {
    right: 10px;
    bottom: 10px;
    left: 10px;
    min-height: 42px;
    gap: 6px;
    font-size: 0.68rem;
  }

  #battleView .battle-mode-cta svg {
    width: 17px;
    height: 17px;
  }
}
/* Battle card equal height fix */
#battleView .battle-mode-card {
  height: 330px !important;
}

@media (max-width: 640px) {
  #battleView .battle-mode-card {
    height: 292px !important;
  }

  #battleView .battle-mode-cpu .battle-mode-cta {
    font-size: 0.62rem !important;
  }
}
/* Battle active state must hide mode selection */
#battleView .battle-mode-grid.hidden,
.app-shell.battle-active #battleView .battle-mode-grid,
.app-shell.battle-active #battleView .battle-help-button,
.app-shell.battle-active #battleView .battle-heading {
  display: none !important;
}

.app-shell.battle-active #battleView {
  padding-bottom: 0 !important;
}
/* Hide player header during active battle */
.app-shell.battle-active .topbar {
  display: none !important;
}

.app-shell.hide-player-topbar .topbar {
  display: none !important;
}

.app-shell.battle-active main {
  padding-top: 0 !important;
}
/* Battle mode screen should not create empty scroll tail */
.app-shell.battle-menu-view:not(.battle-active) {
  padding-bottom: 18px !important;
}

.app-shell.battle-menu-view:not(.battle-active) #battleView {
  padding-bottom: 0 !important;
}

.app-shell.battle-menu-view:not(.battle-active) #battleView .battle-mode-grid {
  min-height: 0 !important;
  height: auto !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

@media (max-width: 640px) {
  .app-shell.battle-menu-view:not(.battle-active) {
    padding-bottom: 20px !important;
  }

  .app-shell.battle-menu-view:not(.battle-active) #battleView .battle-mode-grid {
    padding-top: 198px !important;
  }
}
/* Hide settings gear on battle mode selection */
.app-shell.battle-menu-view:not(.battle-active) ~ .game-menu-toggle,
.app-shell.battle-menu-view:not(.battle-active) ~ .game-menu-panel,
.app-shell.battle-menu-view:not(.battle-active) ~ .edit-panel {
  display: none !important;
}
/* Friendships list layout fix */
.friendships-list .friendship-item {
  grid-template-columns: 60px minmax(0, 1fr) !important;
  gap: 14px !important;
  min-height: 78px;
  padding: 10px !important;
}

.friendships-list .friendship-avatar {
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  font-size: 1.25rem !important;
}

.friendships-list .friendship-item > span:last-child {
  min-width: 0;
  overflow: hidden;
}

.friendships-list .friendship-item strong,
.friendships-list .friendship-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .friendships-list .friendship-item {
    grid-template-columns: 56px minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  .friendships-list .friendship-avatar {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
  }
}
/* Refined login screen */
.auth-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  gap: 18px;
  padding: 56px 18px 42px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(2, 8, 10, 0.25) 0%, rgba(2, 8, 10, 0.72) 44%, rgba(2, 8, 10, 0.97) 100%),
    radial-gradient(circle at 50% 14%, rgba(212, 161, 43, 0.2), transparent 32%),
    url("../assets/background-pre-batalha/fundo-pre-batalha.png") center top / cover no-repeat,
    #030708;
}

.auth-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.64), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.64)),
    radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.36) 64%, rgba(0, 0, 0, 0.82) 100%);
  z-index: 0;
}

.auth-logo-wrap,
.auth-panel {
  position: relative;
  z-index: 1;
}

.auth-logo-wrap {
  width: min(640px, 78vw);
  height: clamp(168px, 30vh, 300px);
  display: grid;
  place-items: center;
  margin-top: 6px;
}

.auth-logo {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 46px rgba(0, 0, 0, 0.75));
}

.auth-panel {
  width: min(100%, 520px);
  gap: 22px;
  padding: 34px 34px 24px;
  border: 1px solid rgba(236, 188, 64, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(42, 39, 27, 0.62), rgba(5, 11, 12, 0.95) 38%, rgba(8, 12, 12, 0.92)),
    rgba(8, 12, 11, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.auth-heading {
  display: grid;
  gap: 8px;
}

.auth-heading .eyebrow {
  color: #f0c644;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
}

.auth-panel h1 {
  max-width: 310px;
  font-size: clamp(2.65rem, 5vw, 4.35rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
}

.auth-panel h1 span {
  color: #f4c847;
}

.auth-heading p:last-child {
  margin: 0;
  color: rgba(244, 244, 238, 0.68);
  font-size: 1.02rem;
  line-height: 1.45;
}

.auth-form {
  gap: 16px;
}

.auth-form label {
  gap: 8px;
  color: rgba(245, 236, 210, 0.92);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.auth-input-shell {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  padding: 0 13px 0 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-input-shell:focus-within {
  border-color: rgba(238, 190, 64, 0.78);
  box-shadow: 0 0 0 3px rgba(238, 190, 64, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-input-shell svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.68);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-form input {
  min-height: 54px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 12px;
  outline: none;
  font-size: 1rem;
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.auth-password-toggle,
.auth-link,
.auth-create-account button,
.auth-socials button {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.auth-password-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
}

.auth-password-toggle:hover {
  background: rgba(255, 255, 255, 0.07);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.94rem;
}

.auth-remember {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  min-width: 0;
  color: rgba(255, 255, 255, 0.74) !important;
  font-size: 0.94rem !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.auth-remember input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-remember span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  border: 1px solid rgba(238, 190, 64, 0.82);
  border-radius: 6px;
  background: rgba(238, 190, 64, 0.08);
}

.auth-remember input:checked + span::after {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 2px solid #f5c747;
  border-bottom: 2px solid #f5c747;
  transform: rotate(-45deg) translateY(-1px);
}

.auth-link,
.auth-create-account button {
  background: transparent;
  color: #f4c847;
  font-weight: 800;
  white-space: nowrap;
}

.auth-form .primary-action {
  min-height: 62px;
  margin-top: 8px;
  border-radius: 8px;
  color: #12100a;
  font-size: 1.2rem;
  box-shadow: 0 14px 30px rgba(209, 156, 35, 0.18);
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-socials {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  justify-content: center;
  gap: 28px;
}

.auth-socials button {
  width: 72px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  color: #f6f6f2;
  font-size: 1.65rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-socials button:first-child {
  color: #fff;
  text-shadow: -1px 0 #4285f4, 0 1px #34a853, 1px 0 #fbbc05, 0 -1px #ea4335;
}

.auth-socials button:nth-child(2) {
  color: #8ea0ff;
}

.auth-socials button:nth-child(3) {
  color: #56a6ff;
}

.auth-create-account {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.76);
}

.auth-create-account button::after {
  content: ">";
  margin-left: 10px;
}

.auth-message {
  min-height: 18px;
  text-align: center;
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 30px 14px 28px;
    gap: 10px;
  }

  .auth-logo-wrap {
    width: min(520px, 94vw);
    height: clamp(120px, 24vh, 210px);
  }

  .auth-panel {
    width: min(100%, 390px);
    padding: 26px 20px 20px;
  }

  .auth-panel h1 {
    font-size: 2.78rem;
  }

  .auth-options {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-socials {
    grid-template-columns: repeat(3, 64px);
    gap: 18px;
  }

  .auth-socials button {
    width: 64px;
    height: 56px;
  }

  .auth-create-account {
    flex-wrap: wrap;
    row-gap: 6px;
  }
}
/* Login mobile refinement */
.auth-panel h1 span {
  display: block;
}

@media (max-width: 640px) {
  .auth-logo-wrap {
    height: clamp(112px, 21vh, 184px);
    margin-top: 0;
  }

  .auth-logo {
    width: 92%;
  }

  .auth-panel {
    margin-top: 0;
  }
}
/* Login compact pass */
.auth-screen {
  gap: 8px;
  padding-top: 20px;
  padding-bottom: 22px;
}

.auth-logo-wrap {
  width: min(300px, 58vw);
  height: clamp(96px, 18vh, 158px);
}

.auth-panel {
  width: min(100%, 460px);
  gap: 16px;
  padding: 24px 28px 18px;
}

.auth-heading {
  gap: 5px;
}

.auth-panel h1 {
  max-width: 260px;
  font-size: clamp(2.15rem, 4.3vw, 3.15rem);
}

.auth-heading p:last-child {
  font-size: 0.92rem;
}

.auth-form {
  gap: 12px;
}

.auth-input-shell {
  min-height: 48px;
}

.auth-form input {
  min-height: 46px;
  font-size: 0.92rem;
}

.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px rgba(12, 17, 17, 0.96) inset;
  caret-color: var(--text);
}

.auth-options {
  font-size: 0.86rem;
}

.auth-remember {
  font-size: 0.86rem !important;
}

.auth-form .primary-action {
  min-height: 54px;
  margin-top: 4px;
  font-size: 1.05rem;
}

.auth-divider,
.auth-socials {
  display: none !important;
}

.auth-create-account {
  justify-content: center;
  padding-top: 14px;
  font-size: 0.9rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.68);
}

.auth-create-account strong {
  color: #f4c847;
}

.auth-create-account button,
.auth-create-account button::after {
  display: none;
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 16px 8px 16px;
  }

  .auth-logo-wrap {
    width: min(220px, 46vw);
    height: 92px;
  }

  .auth-panel {
    width: min(100%, 356px);
    padding: 20px 20px 16px;
    gap: 14px;
  }

  .auth-panel h1 {
    font-size: 2.15rem;
  }

  .auth-heading p:last-child {
    font-size: 0.86rem;
  }

  .auth-input-shell {
    min-height: 46px;
    padding-left: 13px;
  }

  .auth-form input {
    min-height: 44px;
  }

  .auth-options {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .auth-link {
    font-size: 0.82rem;
  }
}